Skip to content

Commit

Permalink
v.2.1.0.1013
Browse files Browse the repository at this point in the history
  • Loading branch information
joerglang committed Dec 18, 2023
1 parent 67a495c commit 753c40f
Show file tree
Hide file tree
Showing 40 changed files with 2,159 additions and 1,779 deletions.
3,187 changes: 1,590 additions & 1,597 deletions package-lock.json

Large diffs are not rendered by default.

60 changes: 30 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,55 @@
"link": "npm link ../cmi-viaduc-web-core/dist/@cmi/viaduc-web-core"
},
"dependencies": {
"@angular/animations": "14.2.6",
"@angular/common": "14.2.6",
"@angular/compiler": "14.2.6",
"@angular/core": "14.2.6",
"@angular/forms": "14.2.6",
"@angular/language-service": "14.2.6",
"@angular/platform-browser": "14.2.6",
"@angular/platform-browser-dynamic": "14.2.6",
"@angular/router": "14.2.6",
"@cmi/viaduc-web-core": "2.0.1106",
"@angular/animations": "14.3.0",
"@angular/common": "14.3.0",
"@angular/compiler": "14.3.0",
"@angular/core": "14.3.0",
"@angular/forms": "14.3.0",
"@angular/language-service": "14.3.0",
"@angular/platform-browser": "14.3.0",
"@angular/platform-browser-dynamic": "14.3.0",
"@angular/router": "14.3.0",
"@cmi/viaduc-web-core": "2.0.1117",
"angularx-flatpickr": "^7.0.0",
"core-js": "^2.6.12",
"flatpickr": "^4.6.13",
"karma-jasmine": "^5.1.0",
"ngx-device-detector": "4.0.1",
"@jonkoops/matomo-tracker": "0.7.0",
"rxjs": "^7.5.7",
"rxjs": "^7.8.1",
"web-animations-js": "^2.3.2",
"zone.js": "~0.11.6"
"zone.js": "~0.11.8"
},
"devDependencies": {
"@angular-devkit/build-angular": "^14.2.6",
"@angular-eslint/builder": "^14.1.2",
"@angular/cli": "^14.2.6",
"@angular/compiler-cli": "14.2.6",
"@angular/language-service": "14.2.6",
"@cmi/viaduc-web-core": "2.0.1103",
"@angular-devkit/build-angular": "^14.2.13",
"@angular-eslint/builder": "^14.4.0",
"@angular/cli": "^14.2.13",
"@angular/compiler-cli": "14.3.0",
"@angular/language-service": "14.3.0",
"@cmi/viaduc-web-core": "2.0.1117",
"@grapecity/wijmo.angular2.all": "^5.20221.857",
"@types/file-saver": "^2.0.5",
"@types/jasmine": "^4.3.0",
"@types/jasminewd2": "^2.0.10",
"@types/file-saver": "^2.0.7",
"@types/jasmine": "^4.6.2",
"@types/jasminewd2": "^2.0.13",
"@types/node": "^18.11.2",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"eslint": "^8.25.0",
"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",
"eslint": "^8.53.0",
"file-saver": "2.0.5",
"jasmine-core": "^4.4.0",
"jasmine-core": "^4.6.0",
"jasmine-spec-reporter": "~7.0.0",
"jszip": "^3.10.1",
"karma": "^6.4.1",
"karma-chrome-launcher": "~3.1.1",
"karma": "^6.4.2",
"karma-chrome-launcher": "~3.2.0",
"karma-cli": "~2.0.0",
"karma-coverage": "2.2.0",
"karma-jasmine-html-reporter": "^2.0.0",
"karma-coverage": "2.2.1",
"karma-jasmine-html-reporter": "^2.1.0",
"karma-jasmine-utils": "^1.3.0",
"karma-teamcity-reporter": "^1.1.0",
"moment": "^2.29.4",
"ngx-markdown": "^13.1.0",
"ngx-toastr": "^15.2.1",
"ngx-toastr": "^15.2.2",
"protractor": "~7.0.0",
"puppeteer": "^19.0.0",
"ts-node": "^10.9.1",
Expand Down
71 changes: 36 additions & 35 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,78 @@
# cmi-viaduc-web-core
- [cmi-viaduc](https://github.com/SwissFederalArchives/cmi-viaduc)
- **[cmi-viaduc-web-core](https://github.com/SwissFederalArchives/cmi-viaduc-web-core)** :triangular_flag_on_post:
- [cmi-viaduc-web-frontend](https://github.com/SwissFederalArchives/cmi-viaduc-web-frontend)
- [cmi-viaduc-web-management](https://github.com/SwissFederalArchives/cmi-viaduc-web-management)
- [cmi-viaduc-backend](https://github.com/SwissFederalArchives/cmi-viaduc-backend)
- [cmi-iiif-frontend](https://github.com/SwissFederalArchives/cmi-iiif-frontend)
- [cmi-iiif-backend](https://github.com/SwissFederalArchives/cmi-iiif-backend)
# cmi-viaduc-web-frontend

- [cmi-viaduc](https://github.com/SwissFederalArchives/cmi-viaduc)
- [cmi-viaduc-web-core](https://github.com/SwissFederalArchives/cmi-viaduc-web-core)
- **[cmi-viaduc-web-frontend](https://github.com/SwissFederalArchives/cmi-viaduc-web-frontend)** :triangular_flag_on_post:
- [cmi-viaduc-web-management](https://github.com/SwissFederalArchives/cmi-viaduc-web-management)
- [cmi-viaduc-backend](https://github.com/SwissFederalArchives/cmi-viaduc-backend)
- [cmi-iiif-frontend](https://github.com/SwissFederalArchives/cmi-iiif-frontend)
- [cmi-iiif-backend](https://github.com/SwissFederalArchives/cmi-iiif-backend)

# Context

The [Viaduc](https://github.com/SwissFederalArchives/cmi-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](https://github.com/SwissFederalArchives/cmi-viaduc-web-frontend)) and _internal management_ ([cmi-viaduc-web-management](https://github.com/SwissFederalArchives/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](https://github.com/SwissFederalArchives/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](https://github.com/SwissFederalArchives/cmi-iiif-frontend)) and the required _backend_ ([cmi-iiif-backend](https://github.com/SwissFederalArchives/cmi-iiif-backend)) that adds the required IIIF services like search.
The [Viaduc](https://github.com/SwissFederalArchives/cmi-viaduc) project includes 6 code repositories. The present repository `cmi-viaduc-web-frontend` provides the source code of an Angular application that constitutes the public part of the online access.
Together with the internal management application ([cmi-viaduc-web-management](https://github.com/SwissFederalArchives/cmi-viaduc-web-management)), it uses a common code library ([cmi-viaduc-web-core](https://github.com/SwissFederalArchives/cmi-viaduc-web-core)). The front-end applications are hosted in an `ASP.NET` container (see backend repository [cmi-viaduc-backend](https://github.com/SwissFederalArchives/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](https://github.com/SwissFederalArchives/cmi-iiif-frontend)) and the required _backend_ ([cmi-iiif-backend](https://github.com/SwissFederalArchives/cmi-iiif-backend)) that adds the required IIIF services like search.

![The Big-Picture](docs/imgs/context.svg)

> Note: A general description of the repositories can be found in the repository [cmi-viaduc](https://github.com/SwissFederalArchives/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](https://github.com/SwissFederalArchives/cmi-viaduc-web-frontend) and [cmi-viaduc-web-management](https://github.com/SwissFederalArchives/cmi-viaduc-web-management) projects.
It contains components, services and model classes that are needed in both projects.
This is an Angular CLI project in the form of an application.
The files generated by the build process are stored in the `client` folder within the `CMI.Viaduc.Web.Frontend` WebAPI project.

The application contains the GUI for the main application, the public area of the online access.

## 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`.
- `app`
- Components that are directly accessed by routing (1st level route) (`pages`)
- `client`
- Components and services used within the pages, e.g. for searching, ordering, navigation, etc.

# Installation
# First steps

## Preparations

- [Node.js download](https://nodejs.org/en/), LTS-version
- [Node.js download](https://nodejs.org/en/), 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`
- Clone repository [cmi-viaduc-web-core](https://github.com/SwissFederalArchives/cmi-viaduc-web-core) to a directory (e.g. C:\Viaduc)
- Clone repository `cmi-viaduc-web-frontend` into the same root directory (e.g. C:\Viaduc)
- Change to the `cmi-viaduc-web-core` directory with a command line
- Run: `npm i` to install the dependencies
- Run: `npm run build` to build the library

## Install

- Install packages with `npm i`
- Build library with `npm run build`
- Use the command line to change to the `cmi-viaduc-web-frontend` directory
- Run: `npm run link` to link `cmi-viaduc-web-core` as a component
- Run: `npm i` to install the dependencies
- Run: `npm run build` build the project to a `dist` folder inside `cmi-viaduc-web-frontend`.

# Customization

## General

- Pay attention to TSLint
- Move business logic to services
- Move business logic into 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.
## Execute

- 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`.
- Variant a.)
- build using `npm run build` and start ASP.NET (`CMI.Viaduc.Web.Frontend`)
- Variant b.)
- Start running build (file-watch) using `npm run start` and ASP.NET (`CMI.Viaduc.Web.Frontend`)

# Authors

Expand All @@ -80,7 +81,7 @@ The library `cmi-viaduc-web-core` must be delivered as part of an application.

# License

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

# Contribute

Expand Down
Loading

0 comments on commit 753c40f

Please sign in to comment.