- TypeScript 91.6%
- HTML 3.5%
- Less 2.5%
- JavaScript 2%
- SCSS 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| docs/imgs | ||
| scripts | ||
| src | ||
| .browserslistrc | ||
| .editorconfig | ||
| .eslintrc.js | ||
| .eslintrc.json | ||
| .gitignore | ||
| angular.json | ||
| karma.conf.js | ||
| karma.github.conf.js | ||
| karma.teamcity.conf.js | ||
| LICENSE.TXT | ||
| package-lock.json | ||
| package.json | ||
| protractor.conf.js | ||
| README.md | ||
| tsconfig.json | ||
| tsconfig.tsnode.json | ||
| tslint-to-eslint-config.log | ||
| version.json | ||
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.
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-clinpm uninstall @angular/clinpm 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 iin 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-managementandcmi-viaduc-web-frontendare in the same root in the filesystem (e.g.C:\Viaduc). - Build the library
cmi-viaduc-web-corewithnpm run build. - In the target application (e.g.
cmi-viaduc-web-frontend) link the library usingnpm run link.
- Make sure that
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.