Skip to content

Commit

Permalink
Upgrade to Angular 9 (#283)
Browse files Browse the repository at this point in the history
* chore: Update package.json

* chore: Remove angular/http from package.json

* chore: Update to Angular 9

* chore: Remove flex-layout

* chore: Update angular material and cdk to version 9

* chore: Upgrade dependencies version

* refactor: Remove entryComponents

* refactor: Replace TestBed.get by TestBed.inject

* chore: Update the config

* refactor: Update imports and selectors

* refactor: Update the title

* refactor(main): Update imports and selectors

* refactor(main): Update session service methods

* refactor(project): Update selectors and imports

* refactor(project): Update imports and selectors

* refactor(system): Update imports and selectors

* refactor(user): Update imports and selectors

* refactor(workspace): Update imports and selectors

* refactor(help): Replace knoraApiConfig and KuiConfig

* refactor(login): Update import and selector

* fix(source-type-property): Add missing AutocompleteItem

* refactor(app-init.service): Remove deprecated service

* fix(package): Add missing ngx-color-picker

* refactor(angular.json): Update scripts

* refactor(main.ts): Update main.ts

* refactor(app): Update imports

* refactor(search): Update inputs and outputs

* refactor(dialog): Disable app-ontology-form

* refactor(main): Update imports in spec

* refactor(project): Update imports in spec

* refactor(system): Update imports in spec

* fix(users-list): Update parameters in updateSystemAdminAdminMembership()

* refactor(user): Update imports in spec

* refactor(workspace): Update imports in spec

* refactor: Update name to dsp-app

* refactor(app): Update name to dsp in comments

* refactor(main): Update  login-form selectors

* fix(login): Fix css and login function

* chore: Update dsp-ui and dsp-js

* refactor: Replace get session, get user name and sysAdmin

* refactor: Clean up

* feat(search): Complete openResource() with navigate

* refactor(header): Replace route input by router.navigate()

* refactor(results): Complete openResource() + clean up

* fix(main+system): Fix tests

* test(main): Mock sessionStorage

* fix(main): Replace flexLayout by css-grid + hardcode dsp-api version number

* refactor: Rename Knora (app) to DSP-APP and DSP-API

* feat(header): Add project iri in route in case of selected project

* fix(projects): User's projects list

* fix(search): Search results and routing fixed

* test: Fix tests in main component

Co-authored-by: flaurens <flavie.laurens@unibas.ch>
Co-authored-by: André Kilchenmann <github@milchkannen.ch>
  • Loading branch information
3 people committed Aug 13, 2020
1 parent 14eb93d commit 441ffdb
Show file tree
Hide file tree
Showing 152 changed files with 15,535 additions and 14,312 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -4,7 +4,7 @@
[![CI](https://github.com/dasch-swiss/dsp-app/workflows/CI/badge.svg)](https://github.com/dasch-swiss/dsp-app/actions?query=workflow%3ACI)
[![Docker](https://img.shields.io/docker/cloud/build/daschswiss/dsp-app)](https://hub.docker.com/r/daschswiss/dsp-app)

This app is a simple user interface for the Data and Service Center for the Humanities DaSCH, which uses the DSP/Knora server application in the backend. It's a system for annotation and linkage of sources in arts and humanities.
This app is a simple user interface for the Data and Service Center for the Humanities DaSCH, which uses the DSP-API/Knora server application in the backend. It's a system for annotation and linkage of sources in arts and humanities.

DSP-APP implements [DSP-JS-LIB](https://www.npmjs.com/package/@dasch-swiss/dsp-js) to connect with [DSP-API](https://docs.dasch.swiss/developers/knora/api-reference/). DSP-API is a software framework for storing, sharing, and working with primary sources and data in the humanities.

Expand Down
285 changes: 143 additions & 142 deletions angular.json
@@ -1,151 +1,152 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"knora-app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"styleext": "scss"
}
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/knora-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/config"
],
"styles": [
"node_modules/@knora/action/assets/style/action.scss",
"node_modules/@knora/search/assets/style/search.scss",
"src/styles.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"dsp-app": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "5mb"
},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/dsp-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets",
"src/config"
],
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "3mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "dsp-app:build"
},
"configurations": {
"production": {
"browserTarget": "dsp-app:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "dsp-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
],
"assets": [
"src/favicon.ico",
"src/assets",
"src/config"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "knora-app:build"
},
"configurations": {
"production": {
"browserTarget": "knora-app:build:production"
"dsp-app-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "dsp-app:serve"
},
"configurations": {
"production": {
"devServerTarget": "dsp-app:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "knora-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"node_modules/@knora/action/assets/style/action.scss",
"node_modules/@knora/search/assets/style/search.scss",
"src/styles.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
],
"assets": [
"src/favicon.ico",
"src/assets",
"src/config"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"knora-app-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "knora-app:serve"
},
"configurations": {
"production": {
"devServerTarget": "knora-app:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "knora-app"
"defaultProject": "dsp-app"
}
6 changes: 3 additions & 3 deletions e2e/src/footer.e2e-spec.ts
Expand Up @@ -8,11 +8,11 @@ fdescribe('footer', () => {
footer = new FooterPage();
});

it('should start the description with "Knora app is built with"', async () => {
it('should start the description with "DSP-APP is built with"', async () => {
await browser.waitForAngularEnabled(false);
footer.navigateTo();
await browser.waitForAngularEnabled(true);
expect(footer.getFooterText()).toContain('Knora app is built with');
expect(footer.getFooterText()).toContain('DSP-APP is built with');
});

it('should route to Angular page', async () => {
Expand Down Expand Up @@ -83,7 +83,7 @@ fdescribe('footer', () => {
});
});

it('should route to Knora doc page', async () => {
it('should route to DSP-API doc page', async () => {
await browser.waitForAngularEnabled(false);
footer.navigateTo();
await browser.waitForAngularEnabled(true);
Expand Down
2 changes: 1 addition & 1 deletion e2e/src/page-objects/login.po.ts
Expand Up @@ -27,7 +27,7 @@ export class LoginPage {
}

getLoginButton() {
return element(by.css('kui-login-form form button'));
return element(by.css('dsp-login-form form button'));
}

}

0 comments on commit 441ffdb

Please sign in to comment.