Merge branch 'feature/Upgrade_to_angular_9' into develop
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/develop This commit looks good
This commit is contained in:
commit
0d78fa29f3
15
angular.json
15
angular.json
@ -13,6 +13,7 @@
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"aot": true,
|
||||
"outputPath": "dist/farmmaps-lib-app",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
@ -67,6 +68,10 @@
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "7mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -160,6 +165,11 @@
|
||||
"tsConfig": "projects/common/tsconfig.lib.json",
|
||||
"project": "projects/common/ng-package.json"
|
||||
}
|
||||
, "configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/common/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
@ -195,6 +205,11 @@
|
||||
"tsConfig": "projects/common-map/tsconfig.lib.json",
|
||||
"project": "projects/common-map/ng-package.json"
|
||||
}
|
||||
, "configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/common-map/tsconfig.lib.prod.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
|
7721
package-lock.json
generated
7721
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
59
package.json
59
package.json
@ -11,55 +11,58 @@
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~8.2.14",
|
||||
"@angular/common": "~8.2.14",
|
||||
"@angular/compiler": "~8.2.14",
|
||||
"@angular/core": "~8.2.14",
|
||||
"@angular/forms": "~8.2.14",
|
||||
"@angular/platform-browser": "~8.2.14",
|
||||
"@angular/platform-browser-dynamic": "~8.2.14",
|
||||
"@angular/router": "~8.2.14",
|
||||
"@angular/animations": "~9.1.0",
|
||||
"@angular/common": "~9.1.0",
|
||||
"@angular/compiler": "~9.1.0",
|
||||
"@angular/core": "~9.1.0",
|
||||
"@angular/forms": "~9.1.0",
|
||||
"@angular/platform-browser": "~9.1.0",
|
||||
"@angular/platform-browser-dynamic": "~9.1.0",
|
||||
"@angular/router": "~9.1.0",
|
||||
"@aspnet/signalr": "^1.1.4",
|
||||
"@farmmaps/common": ">=0.0.1-prerelease.226 <0.0.1",
|
||||
"@farmmaps/common-map": ">=0.0.1-prerelease.226 <0.0.1",
|
||||
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
|
||||
"@ngrx/effects": "^8.6.0",
|
||||
"@ngrx/router-store": "^8.6.0",
|
||||
"@ngrx/store": "^8.6.0",
|
||||
"@ng-bootstrap/ng-bootstrap": "^6.0",
|
||||
"@ngrx/effects": "^9.0",
|
||||
"@ngrx/router-store": "^9.0",
|
||||
"@ngrx/store": "^9.0",
|
||||
"ngx-uploadx": "^3.3.4",
|
||||
"angular-oauth2-oidc": "^8.0.2",
|
||||
"angular-oauth2-oidc": "^9.1",
|
||||
"bootstrap": "^4.4.1",
|
||||
"core-js": "^2.6.11",
|
||||
"font-awesome": "^4.7.0",
|
||||
"ngrx-store-localstorage": "^8.0.0",
|
||||
"ngrx-store-localstorage": "^9.0",
|
||||
"resumablejs": "^1.1.0",
|
||||
"rxjs": "^6.5.4",
|
||||
"tassign": "^1.0.0",
|
||||
"zone.js": "~0.9.1"
|
||||
"tslib": "^1.10.0",
|
||||
"zone.js": "~0.10.2",
|
||||
"minimist": "^1.2.3",
|
||||
"ol": "6.1.1"
|
||||
|
||||
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.803.23",
|
||||
"@angular-devkit/build-ng-packagr": "^0.803.25",
|
||||
"@angular/cli": "^8.3.25",
|
||||
"@angular/compiler-cli": "~8.2.14",
|
||||
"@angular/language-service": "~8.2.14",
|
||||
"@angular-devkit/build-angular": "~0.901.0",
|
||||
"@angular-devkit/build-ng-packagr": "~0.901.0",
|
||||
"@angular/cli": "^9.1.0",
|
||||
"@angular/compiler-cli": "~9.1.0",
|
||||
"@angular/language-service": "~9.1.0",
|
||||
"@types/jasmine": "~2.8.8",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "~8.9.4",
|
||||
"codelyzer": "^5.2.1",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^5.1.2",
|
||||
"jasmine-core": "~2.99.1",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~4.0.0",
|
||||
"karma": "^4.4.1",
|
||||
"karma-chrome-launcher": "~2.2.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.0.1",
|
||||
"karma-jasmine": "~1.1.2",
|
||||
"karma-jasmine-html-reporter": "^0.2.2",
|
||||
"ng-packagr": "^5.4.0",
|
||||
"ng-packagr": "^9.0.0",
|
||||
"protractor": "^5.4.3",
|
||||
"ts-node": "~7.0.0",
|
||||
"tsickle": "^0.37.0",
|
||||
"tslib": "^1.9.0",
|
||||
"ts-node": "^8.8.1",
|
||||
"tslint": "~5.11.0",
|
||||
"typescript": "~3.5.3"
|
||||
"typescript": "~3.8.3"
|
||||
}
|
||||
}
|
||||
|
6
projects/common-map/package-lock.json
generated
6
projects/common-map/package-lock.json
generated
@ -48,9 +48,9 @@
|
||||
"integrity": "sha1-Hwla1I3Ki/ihyCWOAJIDGkTyLKU="
|
||||
},
|
||||
"protocol-buffers-schema": {
|
||||
"version": "3.3.2",
|
||||
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.3.2.tgz",
|
||||
"integrity": "sha512-Xdayp8sB/mU+sUV4G7ws8xtYMGdQnxbeIfLjyO9TZZRJdztBGhlmbI5x1qcY4TG5hBkIKGnc28i7nXxaugu88w=="
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.4.0.tgz",
|
||||
"integrity": "sha512-G/2kcamPF2S49W5yaMGdIpkG6+5wZF0fzBteLKgEHjbNzqjZQ85aAs1iJGto31EJaSTkNvHs5IXuHSaTLWBAiA=="
|
||||
},
|
||||
"quickselect": {
|
||||
"version": "2.0.0",
|
||||
|
@ -4,17 +4,15 @@
|
||||
"publishConfig": {
|
||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||
},
|
||||
"dependencies": {
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^9.1.0",
|
||||
"ngrx-store-localstorage": "^9.0",
|
||||
"@ngrx/effects": "^9.0",
|
||||
"@ngrx/router-store": "^9.0",
|
||||
"@ngrx/store": "^9.0",
|
||||
"tassign": "^1.0.0",
|
||||
"@farmmaps/common": ">=0.0.1-prerelease.181 <0.0.1",
|
||||
"ngx-openlayers": "1.0.0-next.13",
|
||||
"ol": "6.1.1"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/core": "^8.2.0",
|
||||
"ngrx-store-localstorage": "^8.0.0",
|
||||
"@ngrx/effects": "^8.2",
|
||||
"@ngrx/router-store": "^8.2",
|
||||
"@ngrx/store": "^8.2",
|
||||
"tassign": "^1.0.0",
|
||||
"@farmmaps/common": ">=0.0.1-prerelease.181 <0.0.1"
|
||||
}
|
||||
}
|
||||
|
@ -251,7 +251,7 @@ export {
|
||||
|
||||
|
||||
export class AppCommonMapModule {
|
||||
static forRoot(): ModuleWithProviders {
|
||||
static forRoot(): ModuleWithProviders<AppCommonMapModule> {
|
||||
return {
|
||||
ngModule: AppCommonMapModule,
|
||||
providers: [
|
||||
|
@ -20,8 +20,8 @@ import * as style from 'ol/style';
|
||||
})
|
||||
export class FeatureListFeatureCropfieldComponent extends AbstractFeatureListFeatureComponent implements AfterViewInit {
|
||||
|
||||
@ViewChild('canvas', { static: false }) canvas;
|
||||
@ViewChild('container', { static: false }) container;
|
||||
@ViewChild('canvas') canvas;
|
||||
@ViewChild('container') container;
|
||||
|
||||
constructor(store: Store<mapReducers.State | commonReducers.State>, itemTypeService: ItemTypeService,config:AppConfig) {
|
||||
super(store, itemTypeService,config);
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input, Injectable} from '@angular/core';
|
||||
import { Component, Input, Injectable,Directive} from '@angular/core';
|
||||
import { Feature } from 'ol';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
@ -7,6 +7,7 @@ import { commonReducers,ItemTypeService,AppConfig } from '@farmmaps/common';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractFeatureListFeatureComponent {
|
||||
@Input() feature: Feature
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input, Injectable } from '@angular/core';
|
||||
import { Component, Input, Injectable,Directive } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { Feature } from 'ol';
|
||||
import { Store } from '@ngrx/store';
|
||||
@ -12,6 +12,7 @@ import { IQueryState } from '@farmmaps/common';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractFeatureListComponent {
|
||||
@Input() features: Array<Feature>;
|
||||
@Input() queryState: IQueryState;
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input, Injectable} from '@angular/core';
|
||||
import { Component, Input, Injectable,Directive} from '@angular/core';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
|
||||
@ -6,6 +6,7 @@ import { commonReducers,ItemTypeService,IListItem } from '@farmmaps/common';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractItemListItemComponent {
|
||||
@Input() item: IListItem
|
||||
|
||||
@ -14,6 +15,7 @@ export abstract class AbstractItemListItemComponent {
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractItemWidgetComponent {
|
||||
@Input() item: IListItem
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { Component, Input, Injectable } from '@angular/core';
|
||||
import { Component, Input, Injectable, Directive } from '@angular/core';
|
||||
import { Location } from '@angular/common';
|
||||
import { Store } from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
@ -8,6 +8,7 @@ import { tassign } from 'tassign';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractItemListComponent {
|
||||
@Input() items: Array<IListItem>
|
||||
constructor(public store: Store<mapReducers.State | commonReducers.State>, public itemTypeService: ItemTypeService, private location: Location) {
|
||||
|
@ -79,7 +79,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public styles$:Observable<IStyles> = this.store.select(mapReducers.selectGetStyles);
|
||||
private setStateCount$:Observable<number> = this.store.select(mapReducers.selectgetSetStateCount);
|
||||
|
||||
@ViewChild('map', { static: false }) map;
|
||||
@ViewChild('map') map;
|
||||
|
||||
constructor(private store: Store<mapReducers.State | commonReducers.State>,
|
||||
private route: ActivatedRoute,
|
||||
|
@ -1,4 +1,4 @@
|
||||
import {Component, Injectable, Input} from '@angular/core';
|
||||
import {Component, Injectable, Input, Directive} from '@angular/core';
|
||||
import {Location} from '@angular/common';
|
||||
import {Store} from '@ngrx/store';
|
||||
import * as mapReducers from '../../reducers/map.reducer';
|
||||
@ -9,6 +9,7 @@ import { IItemLayer } from '../../models/item.layer';
|
||||
|
||||
|
||||
@Injectable()
|
||||
@Directive()
|
||||
export abstract class AbstractSelectedItemComponent {
|
||||
@Input() item: IItem
|
||||
@Input() itemLayer: IItemLayer;
|
||||
|
@ -18,12 +18,12 @@
|
||||
]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true
|
||||
"enableResourceInlining": true,
|
||||
"enableIvy": false
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -5,18 +5,18 @@
|
||||
"registry": "https://repository.akkerweb.nl/repository/npm-hosted/"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@ng-bootstrap/ng-bootstrap": "^4.2.1",
|
||||
"@angular/common": "^8.2.0",
|
||||
"@angular/core": "^8.2.0",
|
||||
"@angular/forms": "^8.2.0",
|
||||
"@ngrx/effects": "^8.2",
|
||||
"@ngrx/router-store": "^8.2",
|
||||
"@ngrx/store": "^8.2",
|
||||
"@ng-bootstrap/ng-bootstrap": "^6.0",
|
||||
"@angular/common": "~9.1.0",
|
||||
"@angular/core": "~9.1.0",
|
||||
"@angular/forms": "~9.1.0",
|
||||
"@ngrx/effects": "^9.0",
|
||||
"@ngrx/router-store": "^9.0",
|
||||
"@ngrx/store": "^9.0",
|
||||
"tassign": "^1.0.0",
|
||||
"bootstrap": "^4.3.1",
|
||||
"bootstrap": "^4.4.1",
|
||||
"@aspnet/signalr": "^1.1.4",
|
||||
"font-awesome": "^4.7.0",
|
||||
"ngx-uploadx": "^3.3.2",
|
||||
"angular-oauth2-oidc": "^8.0.2"
|
||||
"ngx-uploadx": "^3.3.4",
|
||||
"angular-oauth2-oidc": "^9.1"
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ export class AppCommonServiceModule {
|
||||
'AppCommonServiceModule is already loaded. Import it in the AppModule only');
|
||||
}
|
||||
}
|
||||
static forRoot(): ModuleWithProviders {
|
||||
static forRoot(): ModuleWithProviders<AppCommonServiceModule> {
|
||||
return {
|
||||
ngModule: AppCommonServiceModule,
|
||||
providers: [
|
||||
|
@ -13,7 +13,7 @@ export class SidePanelComponent implements OnChanges {
|
||||
@Input() public collapsable: boolean;
|
||||
@Input() public resizeable: boolean = false;
|
||||
@Input() public left: boolean = false;
|
||||
@ViewChild("resizeGrip", { static: false }) elementView: ElementRef;
|
||||
@ViewChild("resizeGrip") elementView: ElementRef;
|
||||
public mobile:boolean = true;
|
||||
private parentHeight:number = 0;
|
||||
public top = "100%";
|
||||
|
@ -38,8 +38,6 @@ export class AuthGuard implements CanActivate, CanLoad, CanActivateChild {
|
||||
|
||||
checkLogin(url: string): boolean {
|
||||
if (!this.oauthService.hasValidAccessToken()) {
|
||||
this.oauthService.responseType
|
||||
if(this.oauthService.responseType == "code")
|
||||
if(this.oauthService.getRefreshToken() != null ) {
|
||||
this.oauthService.refreshToken().then(() => {
|
||||
this.store.dispatch(new appCommonActions.InitUser());
|
||||
@ -53,9 +51,6 @@ export class AuthGuard implements CanActivate, CanLoad, CanActivateChild {
|
||||
this.oauthService.initCodeFlow(url);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
this.oauthService.initImplicitFlow(url);
|
||||
return false;
|
||||
} else {
|
||||
this.store.dispatch(new appCommonActions.InitUser());
|
||||
return true;
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { Injector } from '@angular/core';
|
||||
import { Location} from '@angular/common';
|
||||
import { Router,UrlSerializer } from '@angular/router';
|
||||
import { AuthConfig, OAuthService, JwksValidationHandler, OAuthErrorEvent, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { AuthConfig, OAuthService, OAuthErrorEvent, OAuthStorage } from 'angular-oauth2-oidc';
|
||||
import { AppConfig } from "./app.config";
|
||||
import {ItemTypeService} from '../services/itemtype.service';
|
||||
import { IAuthconfigFactory } from './authconfigFactory';
|
||||
@ -26,21 +26,12 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
||||
});
|
||||
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
||||
oauthService.setStorage(authStorage);
|
||||
oauthService.tokenValidationHandler = new JwksValidationHandler();
|
||||
oauthService.tokenValidationHandler.validateAtHash = function () {
|
||||
return new Promise<boolean>((res) => { res(true); })
|
||||
};
|
||||
oauthService.setupAutomaticSilentRefresh();
|
||||
let location = injector.get(Location);
|
||||
let router = injector.get(Router);
|
||||
let urlPath = location.path();
|
||||
oauthService.loadDiscoveryDocument().then(() => {
|
||||
oauthService.tryLogin({
|
||||
onTokenReceived: (info) => {
|
||||
urlPath = info.state;
|
||||
}
|
||||
}).then(() => {
|
||||
router.navigateByUrl(urlPath);
|
||||
oauthService.tryLoginCodeFlow().then(() => {
|
||||
router.navigateByUrl(decodeURIComponent(oauthService.state));
|
||||
});
|
||||
})
|
||||
}).then(() => {
|
||||
|
@ -25,12 +25,12 @@
|
||||
}
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"annotateForClosureCompiler": true,
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true
|
||||
"enableResourceInlining": true,
|
||||
"enableIvy": false
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
|
@ -61,7 +61,12 @@ export function provideBootstrapEffects(effects: Type<any>[]) {
|
||||
AppCommonServiceModule.forRoot(),
|
||||
AppCommonMapModule.forRoot(),
|
||||
BrowserModule,
|
||||
StoreModule.forRoot({}),
|
||||
StoreModule.forRoot({},{runtimeChecks: { // TODO fix this should all be true
|
||||
strictStateImmutability: false,
|
||||
strictActionImmutability: false,
|
||||
strictStateSerializability: false,
|
||||
strictActionSerializability: false
|
||||
}}),
|
||||
EffectsModule.forRoot([])
|
||||
],
|
||||
providers: [
|
||||
|
@ -1,6 +1,8 @@
|
||||
import { IAuthconfigFactory, AppConfig } from '@farmmaps/common';
|
||||
import { AuthConfig } from 'angular-oauth2-oidc';
|
||||
import { Injectable } from "@angular/core";
|
||||
|
||||
@Injectable()
|
||||
export class Id4AuthconfigFactory implements IAuthconfigFactory {
|
||||
constructor() {
|
||||
|
||||
|
@ -4,8 +4,14 @@
|
||||
"outDir": "../out-tsc/app",
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
"files": [
|
||||
"main.ts",
|
||||
"polyfills.ts"
|
||||
],
|
||||
"include": [
|
||||
"src/**/*.d.ts"
|
||||
],
|
||||
"angularCompilerOptions": {
|
||||
"enableIvy": false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user