More migration fixes
This commit is contained in:
parent
511f1f4731
commit
80ddf816b0
16
projects/common-map/package-lock.json
generated
16
projects/common-map/package-lock.json
generated
@ -4,10 +4,10 @@
|
|||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"elm-pep": {
|
"@openlayers/pepjs": {
|
||||||
"version": "1.0.6",
|
"version": "0.5.3",
|
||||||
"resolved": "https://registry.npmjs.org/elm-pep/-/elm-pep-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@openlayers/pepjs/-/pepjs-0.5.3.tgz",
|
||||||
"integrity": "sha512-1DJ6ReFk8+GtgoqRiEhBo28K69Rxe9Bfc7h16+1VMQT2KlCuPBYj5W33OYa2AZpqkuqCBLhcNzO10zxJVakapA=="
|
"integrity": "sha512-Bgvi5c14BS0FJWyYWWFstNEnXsB30nK8Jt8hkAAdqr7E0gDdBBWVDglF3Ub19wTxvgJ/CVHyTY6VuCtnyRzglg=="
|
||||||
},
|
},
|
||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.1.13",
|
"version": "1.1.13",
|
||||||
@ -23,11 +23,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ol": {
|
"ol": {
|
||||||
"version": "6.2.1",
|
"version": "6.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/ol/-/ol-6.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/ol/-/ol-6.1.1.tgz",
|
||||||
"integrity": "sha512-CT2szew/COd7Zf9Bls+pdzewBYZNgyfxFivJ3L4Jv9Th7JdWjcQAT+pqMPH25L9SbVT+T17RCMq2H2m9uBCl1A==",
|
"integrity": "sha512-0dL3i3eJqgOpqIjDKEY3grkeQnjAYfV5L/JCxhOu4SxiaizRwFrFgeas6LILRoxKa03jhQFbut2r2bbgcLGQeA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"elm-pep": "^1.0.4",
|
"@openlayers/pepjs": "^0.5.3",
|
||||||
"pbf": "3.2.1",
|
"pbf": "3.2.1",
|
||||||
"pixelworks": "1.1.0",
|
"pixelworks": "1.1.0",
|
||||||
"rbush": "^3.0.1"
|
"rbush": "^3.0.1"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"ngx-openlayers": "1.0.0-next.13",
|
"ngx-openlayers": "1.0.0-next.13",
|
||||||
"ol": "6.2.1"
|
"ol": "6.1.1"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@angular/core": "^9.1.0",
|
"@angular/core": "^9.1.0",
|
||||||
|
@ -22,7 +22,8 @@
|
|||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"enableResourceInlining": true
|
"enableResourceInlining": true,
|
||||||
|
"enableIvy": false
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.lib.json",
|
|
||||||
"angularCompilerOptions": {
|
|
||||||
"enableIvy": false
|
|
||||||
}
|
|
||||||
}
|
|
@ -38,8 +38,6 @@ export class AuthGuard implements CanActivate, CanLoad, CanActivateChild {
|
|||||||
|
|
||||||
checkLogin(url: string): boolean {
|
checkLogin(url: string): boolean {
|
||||||
if (!this.oauthService.hasValidAccessToken()) {
|
if (!this.oauthService.hasValidAccessToken()) {
|
||||||
this.oauthService.responseType
|
|
||||||
if(this.oauthService.responseType == "code")
|
|
||||||
if(this.oauthService.getRefreshToken() != null ) {
|
if(this.oauthService.getRefreshToken() != null ) {
|
||||||
this.oauthService.refreshToken().then(() => {
|
this.oauthService.refreshToken().then(() => {
|
||||||
this.store.dispatch(new appCommonActions.InitUser());
|
this.store.dispatch(new appCommonActions.InitUser());
|
||||||
@ -53,9 +51,6 @@ export class AuthGuard implements CanActivate, CanLoad, CanActivateChild {
|
|||||||
this.oauthService.initCodeFlow(url);
|
this.oauthService.initCodeFlow(url);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
this.oauthService.initImplicitFlow(url);
|
|
||||||
return false;
|
|
||||||
} else {
|
} else {
|
||||||
this.store.dispatch(new appCommonActions.InitUser());
|
this.store.dispatch(new appCommonActions.InitUser());
|
||||||
return true;
|
return true;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
import { Location} from '@angular/common';
|
import { Location} from '@angular/common';
|
||||||
import { Router,UrlSerializer } from '@angular/router';
|
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 { AppConfig } from "./app.config";
|
||||||
import {ItemTypeService} from '../services/itemtype.service';
|
import {ItemTypeService} from '../services/itemtype.service';
|
||||||
import { IAuthconfigFactory } from './authconfigFactory';
|
import { IAuthconfigFactory } from './authconfigFactory';
|
||||||
@ -26,21 +26,12 @@ export function appConfigFactory(injector:Injector, appConfig: AppConfig, oauthS
|
|||||||
});
|
});
|
||||||
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
oauthService.configure(authconfigFactory.getAuthConfig(appConfig));
|
||||||
oauthService.setStorage(authStorage);
|
oauthService.setStorage(authStorage);
|
||||||
oauthService.tokenValidationHandler = new JwksValidationHandler();
|
|
||||||
oauthService.tokenValidationHandler.validateAtHash = function () {
|
|
||||||
return new Promise<boolean>((res) => { res(true); })
|
|
||||||
};
|
|
||||||
oauthService.setupAutomaticSilentRefresh();
|
oauthService.setupAutomaticSilentRefresh();
|
||||||
let location = injector.get(Location);
|
let location = injector.get(Location);
|
||||||
let router = injector.get(Router);
|
let router = injector.get(Router);
|
||||||
let urlPath = location.path();
|
|
||||||
oauthService.loadDiscoveryDocument().then(() => {
|
oauthService.loadDiscoveryDocument().then(() => {
|
||||||
oauthService.tryLogin({
|
oauthService.tryLoginCodeFlow().then(() => {
|
||||||
onTokenReceived: (info) => {
|
router.navigateByUrl(decodeURIComponent(oauthService.state));
|
||||||
urlPath = info.state;
|
|
||||||
}
|
|
||||||
}).then(() => {
|
|
||||||
router.navigateByUrl(urlPath);
|
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
@ -29,7 +29,8 @@
|
|||||||
"strictMetadataEmit": true,
|
"strictMetadataEmit": true,
|
||||||
"fullTemplateTypeCheck": true,
|
"fullTemplateTypeCheck": true,
|
||||||
"strictInjectionParameters": true,
|
"strictInjectionParameters": true,
|
||||||
"enableResourceInlining": true
|
"enableResourceInlining": true,
|
||||||
|
"enableIvy": false
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"src/test.ts",
|
"src/test.ts",
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "./tsconfig.lib.json",
|
|
||||||
"angularCompilerOptions": {
|
|
||||||
"enableIvy": false
|
|
||||||
}
|
|
||||||
}
|
|
@ -61,7 +61,12 @@ export function provideBootstrapEffects(effects: Type<any>[]) {
|
|||||||
AppCommonServiceModule.forRoot(),
|
AppCommonServiceModule.forRoot(),
|
||||||
AppCommonMapModule.forRoot(),
|
AppCommonMapModule.forRoot(),
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
StoreModule.forRoot({}),
|
StoreModule.forRoot({},{runtimeChecks: { // TODO fix this should all be true
|
||||||
|
strictStateImmutability: false,
|
||||||
|
strictActionImmutability: false,
|
||||||
|
strictStateSerializability: false,
|
||||||
|
strictActionSerializability: false
|
||||||
|
}}),
|
||||||
EffectsModule.forRoot([])
|
EffectsModule.forRoot([])
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
|
@ -10,5 +10,8 @@
|
|||||||
],
|
],
|
||||||
"include": [
|
"include": [
|
||||||
"src/**/*.d.ts"
|
"src/**/*.d.ts"
|
||||||
]
|
],
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"enableIvy": false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user