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. | Read-only mirror of https://github.com/SwissFederalArchives/cmi-viaduc-web-core — Schweizerisches Bundesarchiv. Issues & pull requests at the source.
  • TypeScript 91.6%
  • HTML 3.5%
  • Less 2.5%
  • JavaScript 2%
  • SCSS 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2025-09-01 11:07:09 +02:00
docs/imgs v.2.0.0.1113 2023-03-15 16:34:30 +01:00
scripts v.1.6.0.1077 2022-11-15 10:56:18 +01:00
src v.2.3.0.1054 2024-09-25 10:16:10 +02:00
.browserslistrc v.2.0.0.1113 2023-03-15 16:34:30 +01:00
.editorconfig Version vom 19.04.2021 2021-04-19 17:44:46 +02:00
.eslintrc.js v.2.0.0.1113 2023-03-15 16:34:30 +01:00
.eslintrc.json v.2.0.0.1113 2023-03-15 16:34:30 +01:00
.gitignore v.2.0.0.1113 2023-03-15 16:34:30 +01:00
angular.json v.2.1.0.1048 2024-05-10 12:44:14 +02:00
karma.conf.js v.1.5.0.1071 2022-02-01 16:25:03 +01:00
karma.github.conf.js v.2.0.0.1113 2023-03-15 16:34:30 +01:00
karma.teamcity.conf.js v.1.5.0.1071 2022-02-01 16:25:03 +01:00
LICENSE.TXT Version vom 19.04.2021 2021-04-19 17:44:46 +02:00
package-lock.json v.2.3.0.1054 2024-09-25 10:16:10 +02:00
package.json v.2.3.0.1054 2024-09-25 10:16:10 +02:00
protractor.conf.js Version vom 19.04.2021 2021-04-19 17:44:46 +02:00
README.md Add deprecation notice to README 2025-09-01 11:07:09 +02:00
tsconfig.json v.2.0.0.1113 2023-03-15 16:34:30 +01:00
tsconfig.tsnode.json Version vom 19.04.2021 2021-04-19 17:44:46 +02:00
tslint-to-eslint-config.log v.2.0.0.1113 2023-03-15 16:34:30 +01:00
version.json v.1.6.0.1077 2022-11-15 10:56:18 +01:00

Deprecated

This repository is archived, because the code has moved to the main repo under https://github.com/SwissFederalArchives/cmi-viaduc

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.