Skip to content
This repository has been archived by the owner on Oct 2, 2019. It is now read-only.

Commit

Permalink
upgrade: Angular 6, with knora-core module from knora-ui for services (
Browse files Browse the repository at this point in the history
…#270)

* upgrade: Angular 6, with knora-core module from knora-ui for services

* changed services imports

* enhancement (salsah app): add latest @knora/core version; start with cleaning up code

* enhancement: add @knora/action, @knora/search + update @knora/core, @angular/cli, @angular/material and @angular/core + downgrade typescript version to 2.7.0

* build: update @knora/core to 1.0.8-alpha

* refactor: change path to @knora/core for services (+ ApiServiceError, ApiServiceResult) and refactor indentation, const declaration and quotes if necessary

* refactor (app module): removed unused services which come from @knora/core now

* refactor: removed AuthenticationService (replaced by UsersService from @knora/core)

* refactor: removed ResourceService, SearchParamsService and SearchService, have been replaced by the one from @knora/core

* refactor: removed GravSearchGenerationService, IncomingService, OntologyService, OntologyCacheService, ConvertJSONLD and classes, replaced by the ones from @knora/core, refactor quotes, const declaration and indentation if necessary

* refactor (view/properties): change path of imports to @knora/core instead of readPropertyItem or ReadProperties + refactor indentation + delete files: ReadResource, ReadPropertyItem, ReadProperties

* refactor : delete ApiService and replace the path in files to @knora/core

* refactor (utils.ts): replace AppConfig by KnoraConstants from @knora/core

* enhancement (form/edit-resource-class): update the new syntax with .pipe and add the imports

* enhancement (FileService): comment method because this service is outdated + refactoring

* refactor: remove services in providers (commented)

* refactor: change the path of some imports to @knora/core

* refactor: replace AppConfig by KnoraConstants from @knora/core

* enhancement: change the path to Utils file and update name of RegexUrl interface

* enhancement (StoreService): fix bug with 'map' operator

* enhancement: replace some variables from AppConfig with the ones from Utils and KnoraConstants in @knora/core

* fix: fix bug on specify-property-value component, update path to operator variables from @knora/core and remove it from Salsah

* refactor: replace ProgressIndicator component and html tag to the one in @knora/core + refactoring

* refactor: change path to @knora/action

* refactor: delete Salsah key and reverse pipes, have been replaced by the ones in @knora/action + add kui-sort-button html tag from @knora/action

* refactor: delete webapi/knora/admin/, replaced by @knora/core

* refactor: delete shared/strings.ts, replaced path to @knora/core

* build: update @angular/cli, @angular/core, @angular/material, @knora/core, @knora/action, @knora/search, jdnconvertiblecalendaradapter

* refactor: remove pipes imports and components from @knora/action

* refactor: remove utils.ts because it's located in @knora/core now

* refactor: fix gravsearch service name

* enhancement: replace search component by search module

* enhancement: import @knora/action in app.module

* enhancement / fix: add a provideIn into Injectable decorator and remove services from app.module

* refactor: replace AppConfig by KnoraConstants and refactor indentations

* refactor: implement @knora/search, remove unnecessary folders

* fix: set the lists to List instead of ListInfo

* fix: get the resourcesClasses list from the ontologyCacheService instead of resourceTypesService, rename variables and clean file

* build: update @knora/search

* enhancement: replace the search result method by the knora-ui example

* fix (status message service): bug fix (#276)

- renamed status-msg-service into status-msg
- fix the http get request
- update @knora/search package version

* fix (salsah tests): fix test isues

* fix (status msg): fix status message service

* fix (search): update @knora/search package

* enhancement (ImageDircetive): update usage of knora constants for file and media server

* enhancement (ImageDircetive): update usage of knora constants for file and media server

* fix (typescript version): set typescript version to 2.7.0
resolves two items in issue #275

* build: update json2typescript to version 1.0.6

* enhancement (webapi): Add class identifier to json2typescript class decorator. Resolved issue #278

* enhancement (app module): commented out KnoraSchema and AppConfig, replaced by @knora/core

* test (view): fix basic tests

* enhancement (json2typescript): update json2typescript and @knora/core

* docs: update angular 6

* test (view): fix unit tests

* enhancement (app module): delete AppConfig and sort-by pipe

* test (read value + user): fix path

* test: activate it() function

* test: define id variable and ngOnInit()

* style (search results): fix style issue in search results (padding/margin/scroll)

* fix (authentication): add missing authentication service / module

* fix (authentication): salsah works now with the latest @knora/authentication module

* fix (authentication): fix wrong lifecycle hook implementation

* enhancement (admin): tried to fix the ontology resource class issue

* fix (test): update travis config

* fix (test): fix travis errors

* fix (test): fix travis errors

* fix (test): fix travis errors

* enhancement (resource class): tried to fix the resource class request; but we get wrong iris from the api

* fix (search results): fix search results view

* enhancement (system view): add AuthGuard to System route

* fix (user profile/settings): update user view with new authentication setup

* enhancement (interceptor): add correct implementation of interceptor from @knora/authentication

* test (salsah app): removed unused tests

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

*  test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* test (travis): fix timeout issue

* enhancement (i18n / lists): fix some issues

* test (travis): fix timeout issue
  • Loading branch information
sofiag authored and kilchenmann committed Sep 11, 2018
1 parent eed8679 commit 1d01c5c
Show file tree
Hide file tree
Showing 372 changed files with 5,756 additions and 17,138 deletions.
70 changes: 0 additions & 70 deletions .angular-cli.json

This file was deleted.

20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,35 @@ node_js:
- "8"

cache:
yarn: true
directories:
- "node_modules"
- node_modules

addons:
chrome: stable
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.9

env:
global:
- CXX=g++-4.9

install: export CXX="g++-4.9"

before_script:
- yarn global add @angular/cli
- yarn install

script:
- ng test --reporters=spec --browser=ChromeHeadless --single-run=true
- ng test --watch=false --browsers=ChromeHeadless # --reporters=spec --browser=ChromeHeadless --single-run=true
# this should really be fixed in the package itself (https://github.com/dhlab-basel/JDNConvertibleCalendarDateAdapter/issues/5)
- cp fixes/jdnconvertiblecalendardateadapter/index.d.ts node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts
# - cp fixes/jdnconvertiblecalendardateadapter/index.d.ts node_modules/jdnconvertiblecalendardateadapter/dist/index.d.ts
- ng build --prod --build-optimizer

notifications:
slack:
secure: "fzFYDu/Ooy8SM49Z1FFe/owOp4OXwPkoGjp1Vm3kadP/25pvwqGmQkkEX0urSTpZuMc+LvipLMUD33RxVEP2R4V9qlWzdoZ/AW61GSUzkVdhJZwnJJ5D8BXCulajKgGdXAsv2qZ7Qq7yQnom2gpYClzWo02aXIH+HCN76jUhrMS+ELeeqrxMF4ritw/j32T1E4t+oZRDK3Al08y+5e8zZHAzG5xH9JUOhg15novNveTC77KbXUKkvfSt96tPPwK03W0yC1+AtXcYxC0tLecqxbDFm5RRli8IeTSEq1BKij335MbEWfQepSDg0MlvrbKuP7TJ0c1eBotUBCpfa5NBsD+mFs36EuBsMRdQpDHEPIr0ExhcrblAQJ+2MwzEq5hpDdZDXnZ7zuvzrsb5qlZuaOOZLDxblPxZhrIrgOPPRqvQK0qUUPU0Bjew/cL42MtQpN2/3H6u22NK/ortLVUEZVb9cIT4KnMOB4ExdDiNMc2Y8eqZez/F+QoKEJYYx8W48LGQBaTrrrvL2sBCTK0NjaR8xxDAJWH0NwsBpikWP5S8RtzLKlDgytwTZlc8sxlBVzsyYu1kq6nmT2zMQyyBAB7oVrvsrBcUStCpGIwcspYmDHT7x810INMWzkP8QfdTb/0fLzdhc4fWrf2khMBM47JrWM4fxtCQA65BvfNlj+k="

188 changes: 188 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,188 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"salsah": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"tsConfig": "src/tsconfig.app.json",
"polyfills": "src/polyfills.ts",
"assets": [
"src/favicon.ico",
"src/assets",
"src/data",
"src/i18n"
],
"styles": [
"src/index.style.css",
"src/assets/style/mat-teal-amber.scss",
"src/assets/style/main.scss",
"src/themes/beol/main.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
]
},
"configurations": {
"production": {
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
]
},
"test": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.test.ts"
}
]
},
"mock": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.mock.ts"
}
]
},
"beol": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.beol.ts"
}
]
},
"it": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.integration.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "salsah:build"
},
"configurations": {
"production": {
"browserTarget": "salsah:build:production"
},
"test": {
"browserTarget": "salsah:build:test"
},
"mock": {
"browserTarget": "salsah:build:mock"
},
"beol": {
"browserTarget": "salsah:build:beol"
},
"it": {
"browserTarget": "salsah:build:it"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "salsah:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"karmaConfig": "./karma.conf.js",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js",
"node_modules/svg-overlay/openseadragon-svg-overlay.js"
],
"styles": [
"src/index.style.css",
"src/assets/style/mat-teal-amber.scss",
"src/assets/style/main.scss",
"src/themes/beol/main.scss"
],
"assets": [
"src/favicon.ico",
"src/assets",
"src/data",
"src/i18n"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": []
}
}
}
},
"salsah-e2e": {
"root": "",
"sourceRoot": "e2e",
"projectType": "application",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "./protractor.conf.js",
"devServerTarget": "salsah:serve"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"e2e/tsconfig.e2e.json"
],
"exclude": []
}
}
}
}
},
"defaultProject": "salsah",
"schematics": {
"@schematics/angular:component": {
"prefix": "salsah",
"styleext": "scss"
},
"@schematics/angular:directive": {
"prefix": "salsah"
}
}
}
2 changes: 1 addition & 1 deletion docs/jekyll/_docs/01-getting-started/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ category: Getting Started
order: 1
---

We develop the Salsah app with Angular (v5), especially with Angular-cli, which requires the following tools:
We develop the Salsah app with Angular 6, especially with Angular-cli, which requires the following tools:


### Node
Expand Down
14 changes: 6 additions & 8 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['jasmine', '@angular/cli'],
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('karma-html-detailed-reporter'),
require('karma-spec-reporter'),
require('@angular/cli/plugins/karma')
require('@angular-devkit/build-angular/plugins/karma')
],
client:{
captureConsole: true,
Expand All @@ -24,22 +24,20 @@ module.exports = function (config) {
terminal: true
},
files: [
{ pattern: './src/test.ts', watched: false }

],
preprocessors: {
'./src/test.ts': ['@angular/cli']

},
mime: {
'text/x-typescript': ['ts','tsx']
},
coverageIstanbulReporter: {
reports: [ 'html', 'lcovonly' ],
dir: require('path').join(__dirname, 'coverage'), reports: [ 'html', 'lcovonly' ],
fixWebpackSourcePaths: true
},
logLevel: config.LOG_LOG,
angularCli: {
environment: 'dev'
},

reporters: ['progress', 'kjhtml'],
specReporter: {
suppressPassed: false, // do not print information about passed tests
Expand Down
Loading

0 comments on commit 1d01c5c

Please sign in to comment.