/cmi-viaduc-web-core

The present repository is an Angular library. This library is used in the other two applications public access (cmi-viaduc-web-frontend) and internal management (cmi-viaduc-web-management) as a common code base and component library.

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

cmi-viaduc-web-core

Context

The Viaduc project includes 4 code repositories. The present repository cmi-viaduc-web-core is an Angular library. This library is used in the other two applications public access (cmi-viaduc-web-frontend) and internal management (cmi-viaduc-web-management) as a common code base and component library. The frontend applications are hosted in an ASP.NET container (see backend repository cmi-viaduc-backend) and communicate with the system via web API. With the release 2.0.0.1113, two new repositories were added to provide the system with IIIF viewer capabilities. There is the actual IIIF-Viewer (cmi-iiif-frontend) and the required backend (cmi-iiif-backend) that adds the required IIIF services like search.

The Big-Picture

Note: A general description of the repositories can be found in the repository cmi-viaduc.

Architecture and components

This is an Angular CLI library published in an internal package feed and included in the cmi-viaduc-web-frontend and cmi-viaduc-web-management projects. It contains components, services and model classes that are needed in both projects.

Modules

  • core
    • Common components for running the application, e.g. Configs, BreadCrumbs, ErrorHandling, Modals
  • orders
    • Components for the order management part in the public and management client
  • tooltip
    • Tooltip component
  • wijmo
    • Custom implementation of the Wijmo grid with extended functionality (e.g. save sort states, filters, etc.)
    • Note: For productive use of this component a Wijmo license is required. It can be ordered at https://www.grapecity.com/wijmo/licensing.

Installation

Preparations

  • Node.js download, LTS-version
  • Make sure that old angular/cli versions are uninstalled
    • npm uninstall angular-cli
    • npm uninstall @angular/cli
    • npm cache clean --force
  • Install Angular CLI
    • npm install -g @angular/cli

Install

  • Install packages with npm i
  • Build library with npm run build

Customization

General

  • Pay attention to TSLint
  • Move business logic to services

Run tests

  • Run tests once ng test --watch=false
  • Run tests as watcher ng test

Embedding the library

The library cmi-viaduc-web-core must be delivered as part of an application.

  • Either this is done via the internal MyGet feed using npm i in the application (e.g.: cmi-viaduc-web-frontend)
  • Or the library can be included locally. For this, the following steps are required:
    • Make sure that cmi-viaduc-web-core, cmi-viaduc-web-management and cmi-viaduc-web-frontend are in the same root in the filesystem (e.g. C:\Viaduc).
    • Build the library cmi-viaduc-web-core with npm run build.
    • In the target application (e.g. cmi-viaduc-web-frontend) link the library using npm run link.

Authors

License

GNU Affero General Public License (AGPLv3), see LICENSE.

Contribute

This repository is a copy which is updated regularly - therefore contributions via pull requests are not possible. However, independent copies (forks) are possible under consideration of the AGPLV3 license.

Contact

  • For general questions (and technical support), please contact the Swiss Federal Archives by e-mail at bundesarchiv@bar.admin.ch.
  • Technical questions or problems concerning the source code can be posted here on GitHub via the "Issues" interface.