@luigi-project/client-support-angular 2.21.4-dev.20250590035 → 20.0.0-next.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{fesm2020 → fesm2022}/luigi-project-client-support-angular.mjs +40 -42
- package/{fesm2020 → fesm2022}/luigi-project-client-support-angular.mjs.map +1 -1
- package/index.d.ts +110 -5
- package/package.json +6 -14
- package/esm2020/lib/component/luigi.preload.component.mjs +0 -13
- package/esm2020/lib/luigi-mock/luigi-mock.module.mjs +0 -40
- package/esm2020/lib/luigi.angular.support.module.mjs +0 -70
- package/esm2020/lib/route/luigi-activated-route-snapshot-helper.mjs +0 -11
- package/esm2020/lib/route/luigi-route-strategy.mjs +0 -9
- package/esm2020/lib/service/luigi-auto-routing.service.mjs +0 -141
- package/esm2020/lib/service/luigi-context-service.mjs +0 -8
- package/esm2020/lib/service/luigi-context.service.impl.mjs +0 -77
- package/esm2020/luigi-project-client-support-angular.mjs +0 -5
- package/esm2020/public-api.mjs +0 -10
- package/fesm2015/luigi-project-client-support-angular.mjs +0 -357
- package/fesm2015/luigi-project-client-support-angular.mjs.map +0 -1
- package/lib/component/luigi.preload.component.d.ts +0 -8
- package/lib/luigi-mock/luigi-mock.module.d.ts +0 -6
- package/lib/luigi.angular.support.module.d.ts +0 -13
- package/lib/route/luigi-activated-route-snapshot-helper.d.ts +0 -6
- package/lib/route/luigi-route-strategy.d.ts +0 -5
- package/lib/service/luigi-auto-routing.service.d.ts +0 -31
- package/lib/service/luigi-context-service.d.ts +0 -25
- package/lib/service/luigi-context.service.impl.d.ts +0 -33
- package/public-api.d.ts +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Component, Injectable, NgModule, APP_INITIALIZER } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/router';
|
|
4
|
-
import { BaseRouteReuseStrategy, NavigationEnd, convertToParamMap,
|
|
4
|
+
import { BaseRouteReuseStrategy, NavigationEnd, convertToParamMap, RouterModule, RouteReuseStrategy } from '@angular/router';
|
|
5
5
|
import { ReplaySubject, Subscription } from 'rxjs';
|
|
6
6
|
import { first, filter } from 'rxjs/operators';
|
|
7
7
|
import { addInitListener, addContextUpdateListener, isLuigiClientInitialized, uxManager, linkManager } from '@luigi-project/client';
|
|
@@ -10,13 +10,13 @@ import { LuigiMockEngine } from '@luigi-project/testing-utilities';
|
|
|
10
10
|
class LuigiPreloadComponent {
|
|
11
11
|
constructor() { }
|
|
12
12
|
ngOnInit() { }
|
|
13
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiPreloadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.0.0-next.9", type: LuigiPreloadComponent, isStandalone: true, selector: "lib-client-support-angular", ngImport: i0, template: "<p luigipreload=\"luigipreload\"></p>\n" }); }
|
|
13
15
|
}
|
|
14
|
-
|
|
15
|
-
LuigiPreloadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LuigiPreloadComponent, selector: "lib-client-support-angular", ngImport: i0, template: "<p luigipreload=\"luigipreload\"></p>\n" });
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiPreloadComponent, decorators: [{
|
|
16
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiPreloadComponent, decorators: [{
|
|
17
17
|
type: Component,
|
|
18
18
|
args: [{ selector: 'lib-client-support-angular', template: "<p luigipreload=\"luigipreload\"></p>\n" }]
|
|
19
|
-
}], ctorParameters:
|
|
19
|
+
}], ctorParameters: () => [] });
|
|
20
20
|
|
|
21
21
|
class LuigiContextService {
|
|
22
22
|
}
|
|
@@ -87,17 +87,19 @@ class LuigiContextServiceImpl {
|
|
|
87
87
|
context
|
|
88
88
|
});
|
|
89
89
|
}
|
|
90
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiContextServiceImpl, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
91
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiContextServiceImpl, providedIn: 'root' }); }
|
|
90
92
|
}
|
|
91
|
-
|
|
92
|
-
LuigiContextServiceImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiContextServiceImpl, providedIn: 'root' });
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiContextServiceImpl, decorators: [{
|
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiContextServiceImpl, decorators: [{
|
|
94
94
|
type: Injectable,
|
|
95
95
|
args: [{
|
|
96
96
|
providedIn: 'root'
|
|
97
97
|
}]
|
|
98
|
-
}], ctorParameters:
|
|
98
|
+
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
99
99
|
|
|
100
100
|
class LuigiActivatedRouteSnapshotHelper {
|
|
101
|
+
// tslint:disable-next-line:variable-name
|
|
102
|
+
static { this._current = null; }
|
|
101
103
|
static getCurrent() {
|
|
102
104
|
return LuigiActivatedRouteSnapshotHelper._current;
|
|
103
105
|
}
|
|
@@ -105,8 +107,6 @@ class LuigiActivatedRouteSnapshotHelper {
|
|
|
105
107
|
LuigiActivatedRouteSnapshotHelper._current = current;
|
|
106
108
|
}
|
|
107
109
|
}
|
|
108
|
-
// tslint:disable-next-line:variable-name
|
|
109
|
-
LuigiActivatedRouteSnapshotHelper._current = null;
|
|
110
110
|
|
|
111
111
|
class LuigiRouteStrategy extends BaseRouteReuseStrategy {
|
|
112
112
|
retrieve(route) {
|
|
@@ -237,15 +237,15 @@ class LuigiAutoRoutingService {
|
|
|
237
237
|
ngOnDestroy() {
|
|
238
238
|
this.subscription.unsubscribe();
|
|
239
239
|
}
|
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAutoRoutingService, deps: [{ token: i1.Router }, { token: LuigiContextService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
241
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAutoRoutingService, providedIn: 'root' }); }
|
|
240
242
|
}
|
|
241
|
-
|
|
242
|
-
LuigiAutoRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAutoRoutingService, providedIn: 'root' });
|
|
243
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAutoRoutingService, decorators: [{
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAutoRoutingService, decorators: [{
|
|
244
244
|
type: Injectable,
|
|
245
245
|
args: [{
|
|
246
246
|
providedIn: 'root'
|
|
247
247
|
}]
|
|
248
|
-
}], ctorParameters:
|
|
248
|
+
}], ctorParameters: () => [{ type: i1.Router }, { type: LuigiContextService }] });
|
|
249
249
|
|
|
250
250
|
const staticRoutes = [
|
|
251
251
|
/** here an example if you want to specify that this component is a virtualTree element in Luigi Core navigation*/
|
|
@@ -275,23 +275,22 @@ const staticRoutes = [
|
|
|
275
275
|
];
|
|
276
276
|
class LuigiAngularSupportModule {
|
|
277
277
|
constructor(navigation, context) { }
|
|
278
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAngularSupportModule, deps: [{ token: LuigiAutoRoutingService }, { token: LuigiContextService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
279
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAngularSupportModule, imports: [i1.RouterModule] }); }
|
|
280
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAngularSupportModule, providers: [
|
|
281
|
+
{
|
|
282
|
+
provide: LuigiContextService,
|
|
283
|
+
useClass: LuigiContextServiceImpl
|
|
284
|
+
},
|
|
285
|
+
{
|
|
286
|
+
provide: RouteReuseStrategy,
|
|
287
|
+
useClass: LuigiRouteStrategy
|
|
288
|
+
}
|
|
289
|
+
], imports: [RouterModule.forChild(staticRoutes)] }); }
|
|
278
290
|
}
|
|
279
|
-
|
|
280
|
-
LuigiAngularSupportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, declarations: [LuigiPreloadComponent], imports: [i1.RouterModule], exports: [LuigiPreloadComponent] });
|
|
281
|
-
LuigiAngularSupportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, providers: [
|
|
282
|
-
{
|
|
283
|
-
provide: LuigiContextService,
|
|
284
|
-
useClass: LuigiContextServiceImpl
|
|
285
|
-
},
|
|
286
|
-
{
|
|
287
|
-
provide: RouteReuseStrategy,
|
|
288
|
-
useClass: LuigiRouteStrategy
|
|
289
|
-
}
|
|
290
|
-
], imports: [RouterModule.forChild(staticRoutes)] });
|
|
291
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, decorators: [{
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiAngularSupportModule, decorators: [{
|
|
292
292
|
type: NgModule,
|
|
293
293
|
args: [{
|
|
294
|
-
declarations: [LuigiPreloadComponent],
|
|
295
294
|
imports: [RouterModule.forChild(staticRoutes)],
|
|
296
295
|
providers: [
|
|
297
296
|
{
|
|
@@ -302,10 +301,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
302
301
|
provide: RouteReuseStrategy,
|
|
303
302
|
useClass: LuigiRouteStrategy
|
|
304
303
|
}
|
|
305
|
-
]
|
|
306
|
-
exports: [LuigiPreloadComponent]
|
|
304
|
+
]
|
|
307
305
|
}]
|
|
308
|
-
}], ctorParameters:
|
|
306
|
+
}], ctorParameters: () => [{ type: LuigiAutoRoutingService }, { type: LuigiContextService }] });
|
|
309
307
|
|
|
310
308
|
// @dynamic
|
|
311
309
|
/*
|
|
@@ -321,17 +319,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImpor
|
|
|
321
319
|
* In the normal workflow this message would picked up by Luigi Core which then sends the response back.
|
|
322
320
|
*/
|
|
323
321
|
class LuigiMockModule {
|
|
322
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
323
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiMockModule }); }
|
|
324
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiMockModule, providers: [
|
|
325
|
+
{
|
|
326
|
+
provide: APP_INITIALIZER,
|
|
327
|
+
useFactory: LuigiMockEngine.initPostMessageHook,
|
|
328
|
+
multi: true
|
|
329
|
+
}
|
|
330
|
+
] }); }
|
|
324
331
|
}
|
|
325
|
-
|
|
326
|
-
LuigiMockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule });
|
|
327
|
-
LuigiMockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule, providers: [
|
|
328
|
-
{
|
|
329
|
-
provide: APP_INITIALIZER,
|
|
330
|
-
useFactory: LuigiMockEngine.initPostMessageHook,
|
|
331
|
-
multi: true
|
|
332
|
-
}
|
|
333
|
-
] });
|
|
334
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule, decorators: [{
|
|
332
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.0.0-next.9", ngImport: i0, type: LuigiMockModule, decorators: [{
|
|
335
333
|
type: NgModule,
|
|
336
334
|
args: [{
|
|
337
335
|
providers: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"luigi-project-client-support-angular.mjs","sources":["../../../projects/client-support-angular/src/lib/component/luigi.preload.component.ts","../../../projects/client-support-angular/src/lib/component/luigi.preload.component.html","../../../projects/client-support-angular/src/lib/service/luigi-context-service.ts","../../../projects/client-support-angular/src/lib/service/luigi-context.service.impl.ts","../../../projects/client-support-angular/src/lib/route/luigi-activated-route-snapshot-helper.ts","../../../projects/client-support-angular/src/lib/route/luigi-route-strategy.ts","../../../projects/client-support-angular/src/lib/service/luigi-auto-routing.service.ts","../../../projects/client-support-angular/src/lib/luigi.angular.support.module.ts","../../../projects/client-support-angular/src/lib/luigi-mock/luigi-mock.module.ts","../../../projects/client-support-angular/src/public-api.ts","../../../projects/client-support-angular/src/luigi-project-client-support-angular.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'lib-client-support-angular',\n templateUrl: './luigi.preload.component.html',\n styles: []\n})\nexport class LuigiPreloadComponent implements OnInit {\n constructor() {}\n ngOnInit(): void {}\n}\n","<p luigipreload=\"luigipreload\"></p>\n","import { Context } from '@luigi-project/client';\nimport { Observable } from 'rxjs';\n\nexport abstract class LuigiContextService {\n /**\n * Listen to context changes\n * Receives current value, even if the event was already dispatched earlier.\n */\n abstract contextObservable(): Observable<IContextMessage>;\n\n /**\n * Get latest set context object\n */\n abstract getContext(): Context;\n\n /**\n * Get a promise that resolves when context is set.\n */\n abstract getContextAsync(): Promise<Context>;\n}\n\nexport enum ILuigiContextTypes {\n INIT,\n UPDATE\n}\n\nexport interface IContextMessage {\n contextType: ILuigiContextTypes; // will be init or update\n context: Context;\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { ReplaySubject, Observable } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport { Context, addInitListener, addContextUpdateListener } from '@luigi-project/client';\nimport { IContextMessage, ILuigiContextTypes, LuigiContextService } from './luigi-context-service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LuigiContextServiceImpl implements LuigiContextService {\n private subject: ReplaySubject<IContextMessage> = new ReplaySubject<IContextMessage>(1);\n private currentContext: IContextMessage = (null as unknown) as IContextMessage;\n\n constructor(private zone: NgZone) {\n addInitListener(initContext => {\n this.addListener(ILuigiContextTypes.INIT, initContext);\n });\n addContextUpdateListener(updateContext => {\n this.addListener(ILuigiContextTypes.UPDATE, updateContext);\n });\n }\n\n public contextObservable(): Observable<IContextMessage> {\n return this.subject.asObservable();\n }\n\n /**\n * Get latest context object retrieved from luigi core application or empty object, if not yet set.\n */\n public getContext(): Context {\n return (this.currentContext && this.currentContext.context) || {};\n }\n\n /**\n * Get a promise that resolves when context is set.\n */\n public getContextAsync(): Promise<Context> {\n return new Promise<Context>((resolve, reject) => {\n if (this.isObject(this.getContext()) && Object.keys(this.getContext()).length > 0) {\n resolve(this.getContext());\n } else {\n this.contextObservable()\n .pipe(first())\n .subscribe(ctx => {\n resolve(ctx.context);\n });\n }\n });\n }\n\n /**\n * Checks if input is an object.\n * @param objectToCheck mixed\n * @returns {boolean}\n */\n private isObject(objectToCheck: any) {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Set current context\n */\n protected setContext(obj: IContextMessage): void {\n this.zone.run(() => {\n this.currentContext = obj;\n this.subject.next(obj);\n });\n }\n\n addListener(contextType: ILuigiContextTypes, context: Context): void {\n this.setContext({\n contextType,\n context\n } as IContextMessage);\n }\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\nexport class LuigiActivatedRouteSnapshotHelper {\n // tslint:disable-next-line:variable-name\n private static _current: ActivatedRouteSnapshot = (null as unknown) as ActivatedRouteSnapshot;\n\n static getCurrent(): ActivatedRouteSnapshot {\n return LuigiActivatedRouteSnapshotHelper._current;\n }\n\n static setCurrent(current: ActivatedRouteSnapshot): void {\n LuigiActivatedRouteSnapshotHelper._current = current;\n }\n}\n","import { BaseRouteReuseStrategy } from '@angular/router';\nimport { ActivatedRouteSnapshot, DetachedRouteHandle } from '@angular/router';\nimport { LuigiActivatedRouteSnapshotHelper } from './luigi-activated-route-snapshot-helper';\n\nexport class LuigiRouteStrategy extends BaseRouteReuseStrategy {\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n LuigiActivatedRouteSnapshotHelper.setCurrent(route);\n return super.retrieve(route);\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n NavigationEnd,\n ParamMap,\n Router,\n RouterEvent,\n convertToParamMap\n} from '@angular/router';\nimport { linkManager, uxManager, isLuigiClientInitialized } from '@luigi-project/client';\nimport { OperatorFunction, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { LuigiActivatedRouteSnapshotHelper } from '../route/luigi-activated-route-snapshot-helper';\nimport { LuigiContextService } from './luigi-context-service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LuigiAutoRoutingService implements OnDestroy {\n private subscription: Subscription = new Subscription();\n\n constructor(private router: Router, private luigiContextService: LuigiContextService) {\n this.subscription.add(\n this.router.events.pipe(this.doFilter()).subscribe(this.doSubscription.bind(this) as () => void)\n );\n }\n\n doFilter(): OperatorFunction<unknown, RouterEvent> {\n return filter((event): event is RouterEvent => {\n return !!(\n event instanceof NavigationEnd &&\n event.url &&\n event.url.length > 0 &&\n !(history.state && history.state.luigiInduced)\n );\n });\n }\n\n /**\n * This method will be take in consideration angular route that having in data object the paramter\n * fromVirtualTreeRoot: true, here an example:\n * {path: 'demo', component: DemoComponent, data:{fromVirtualTreeRoot: true}}\n * Another option is to specify the LuigiPath: if you add in route data luigiRoute:'/xxxx/xxx';\n * in the case we will update the path in LuigiCore navigation, here an example\n * {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}}\n * If updateModalPathParam is specified, than modalPathParam will be updated upon internal navigation:\n * {path: 'demo', component: DemoComponent, data:{updateModalPathParam: true}}\n * @param event the NavigationEnd event\n */\n doSubscription(event: NavigationEnd): void {\n let current: ActivatedRouteSnapshot | null = LuigiActivatedRouteSnapshotHelper.getCurrent();\n\n if (!current) {\n current = this.router.routerState.root.snapshot;\n while (current?.children?.length > 0) {\n // handle multiple children\n let primary: ActivatedRouteSnapshot | null = null;\n\n current?.children.forEach(childSnapshot => {\n if (childSnapshot.outlet === 'primary') {\n primary = childSnapshot;\n }\n });\n if (primary) {\n current = primary;\n } else if (current.firstChild) {\n current = current.firstChild;\n } else {\n break;\n }\n }\n }\n if (current?.data && isLuigiClientInitialized()) {\n const ux = uxManager();\n let lm = linkManager().withoutSync();\n let route: string | undefined;\n\n if (current.data.luigiRoute) {\n route = this.getResolvedLuigiRoute(current);\n if (current.data.fromContext) {\n if (!this.luigiContextService.getContext()) {\n console.debug('Ignoring auto navigation request, luigi context not set');\n return;\n }\n if (current.data.fromContext === true) {\n lm = lm.fromClosestContext();\n } else {\n lm = lm.fromContext(current.data.fromContext);\n }\n }\n } else if (current.data.fromVirtualTreeRoot) {\n let url = event.url;\n const truncate = current.data.fromVirtualTreeRoot.truncate;\n if (truncate) {\n if (truncate.indexOf('*') === 0) {\n const index = url.indexOf(truncate.substr(1));\n url = url.substr(index + truncate.length - 1);\n } else if (url.indexOf(truncate) === 0) {\n url = url.substr(truncate.length);\n }\n }\n route = url;\n console.debug('Calling fromVirtualTreeRoot for url ==> ' + route);\n lm = lm.fromVirtualTreeRoot();\n }\n\n if (ux.isModal()) {\n if (current.data.updateModalDataPath) {\n lm.updateModalPathInternalNavigation(route as string, {}, current.data.addHistoryEntry);\n }\n } else if (route) {\n lm.navigate(route);\n }\n }\n }\n\n getResolvedLuigiRoute(current: ActivatedRouteSnapshot): string | undefined {\n let route: string | undefined = current.data.luigiRoute;\n const allParams = this.getAllParamsFromParents(current);\n\n if (!route || !allParams) {\n return route;\n }\n\n const pmap: ParamMap = convertToParamMap(allParams);\n\n pmap.keys.forEach(key => {\n pmap.getAll(key).forEach(param => {\n route = route?.replace(':' + key, param);\n });\n });\n\n return route;\n }\n\n getAllParamsFromParents(current: ActivatedRouteSnapshot): { [key: string]: string } | undefined {\n let allParams: { [key: string]: string } = {};\n let currentToCheck: ActivatedRouteSnapshot | null = current;\n\n while (currentToCheck) {\n if (currentToCheck.params) {\n allParams = { ...allParams, ...currentToCheck.params };\n }\n currentToCheck = currentToCheck.parent;\n }\n\n return allParams;\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouteReuseStrategy, RouterModule, Routes } from '@angular/router';\nimport { LuigiPreloadComponent } from './component/luigi.preload.component';\nimport { LuigiContextService } from './service/luigi-context-service';\nimport { LuigiContextServiceImpl } from './service/luigi-context.service.impl';\nimport { LuigiAutoRoutingService } from './service/luigi-auto-routing.service';\nimport { LuigiRouteStrategy } from './route/luigi-route-strategy';\n\nexport const staticRoutes: Routes = [\n /** here an example if you want to specify that this component is a virtualTree element in Luigi Core navigation*/\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { fromVirtualTreeRoot: true }\n },\n /** here an example if you want to specify that this component it is a luigi component and u want to change the navigation in Luigi core*/\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { luigiRoute: '/home/reload' }\n },\n /** here an example if you want to reuse the component and not recreating every time you navigate to it (a singleton Component) It requires in your module to redefine */\n {\n path: 'luigi-client-support-preload=component',\n component: LuigiPreloadComponent,\n data: { reuse: true }\n },\n /** here an example if you want to update modalPathParam on internal navigation */\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { updateModalPathParam: true }\n }\n];\n\n@NgModule({\n declarations: [LuigiPreloadComponent],\n imports: [RouterModule.forChild(staticRoutes)],\n providers: [\n {\n provide: LuigiContextService,\n useClass: LuigiContextServiceImpl\n },\n {\n provide: RouteReuseStrategy,\n useClass: LuigiRouteStrategy\n }\n ],\n exports: [LuigiPreloadComponent]\n})\nexport class LuigiAngularSupportModule {\n constructor(navigation: LuigiAutoRoutingService, context: LuigiContextService) {}\n}\n","import { APP_INITIALIZER, NgModule } from '@angular/core';\nimport { LuigiMockEngine } from '@luigi-project/testing-utilities';\n\n// @dynamic\n@NgModule({\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: LuigiMockEngine.initPostMessageHook,\n multi: true\n }\n ]\n})\n/*\n * This class mocks Luigi Core related functionality.\n *\n * Micro Frontends that use Luigi Client would usually communicate with Luigi Core\n * back and forth. When testing Luigi Client based components, Luigi Core might\n * not be present which leads into limitations on integration/e2e testing for standalone\n * microfrontends.\n *\n * This module adds a hook to the window postMessage API by adding an event listener to the\n * global message event of the window object and mocking the callback.\n * In the normal workflow this message would picked up by Luigi Core which then sends the response back.\n */\nexport class LuigiMockModule {}\n","/*\n * Public API Surface of client-support-angular\n */\n\nexport * from './lib/component/luigi.preload.component';\nexport * from './lib/luigi.angular.support.module';\nexport * from './lib/service/luigi-context-service';\nexport * from './lib/service/luigi-context.service.impl';\nexport * from './lib/service/luigi-auto-routing.service';\nexport * from './lib/luigi-mock/luigi-mock.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.LuigiContextService","i1.LuigiAutoRoutingService","i3"],"mappings":";;;;;;;;;MAOa,qBAAqB,CAAA;AAChC,IAAA,WAAA,GAAA,GAAgB;AAChB,IAAA,QAAQ,MAAW;;kHAFR,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,qBAAqB,kECPlC,yCACA,EAAA,CAAA,CAAA;2FDMa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,SAAS;+BACE,4BAA4B,EAAA,QAAA,EAAA,yCAAA,EAAA,CAAA;;;MEAlB,mBAAmB,CAAA;AAgBxC,CAAA;IAEW,mBAGX;AAHD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAI,CAAA;AACJ,IAAA,kBAAA,CAAA,kBAAA,CAAA,QAAA,CAAA,GAAA,CAAA,CAAA,GAAA,QAAM,CAAA;AACR,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,GAG7B,EAAA,CAAA,CAAA;;MCfY,uBAAuB,CAAA;AAIlC,IAAA,WAAA,CAAoB,IAAY,EAAA;QAAZ,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAQ;AAHxB,QAAA,IAAA,CAAA,OAAO,GAAmC,IAAI,aAAa,CAAkB,CAAC,CAAC,CAAC;QAChF,IAAc,CAAA,cAAA,GAAqB,IAAmC,CAAC;QAG7E,eAAe,CAAC,WAAW,IAAG;YAC5B,IAAI,CAAC,WAA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,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EApBf,SAAA,EAAA;AACT,QAAA;AACE,YAAA,OAAO,EAAE,eAAe;YACxB,UAAU,EAAE,eAAe,CAAC,mBAAmB;AAC/C,YAAA,KAAK,EAAE,IAAI;AACZ,SAAA;AACF,KAAA,EAAA,CAAA,CAAA;2FAcU,eAAe,EAAA,UAAA,EAAA,CAAA;kBArB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;4BACxB,UAAU,EAAE,eAAe,CAAC,mBAAmB;AAC/C,4BAAA,KAAK,EAAE,IAAI;AACZ,yBAAA;AACF,qBAAA;AACF,iBAAA,CAAA;;;ACZD;;AAEG;;ACFH;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"luigi-project-client-support-angular.mjs","sources":["../../../projects/client-support-angular/src/lib/component/luigi.preload.component.ts","../../../projects/client-support-angular/src/lib/component/luigi.preload.component.html","../../../projects/client-support-angular/src/lib/service/luigi-context-service.ts","../../../projects/client-support-angular/src/lib/service/luigi-context.service.impl.ts","../../../projects/client-support-angular/src/lib/route/luigi-activated-route-snapshot-helper.ts","../../../projects/client-support-angular/src/lib/route/luigi-route-strategy.ts","../../../projects/client-support-angular/src/lib/service/luigi-auto-routing.service.ts","../../../projects/client-support-angular/src/lib/luigi.angular.support.module.ts","../../../projects/client-support-angular/src/lib/luigi-mock/luigi-mock.module.ts","../../../projects/client-support-angular/src/public-api.ts","../../../projects/client-support-angular/src/luigi-project-client-support-angular.ts"],"sourcesContent":["import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'lib-client-support-angular',\n templateUrl: './luigi.preload.component.html',\n styles: []\n})\nexport class LuigiPreloadComponent implements OnInit {\n constructor() {}\n ngOnInit(): void {}\n}\n","<p luigipreload=\"luigipreload\"></p>\n","import { Context } from '@luigi-project/client';\nimport { Observable } from 'rxjs';\n\nexport abstract class LuigiContextService {\n /**\n * Listen to context changes\n * Receives current value, even if the event was already dispatched earlier.\n */\n abstract contextObservable(): Observable<IContextMessage>;\n\n /**\n * Get latest set context object\n */\n abstract getContext(): Context;\n\n /**\n * Get a promise that resolves when context is set.\n */\n abstract getContextAsync(): Promise<Context>;\n}\n\nexport enum ILuigiContextTypes {\n INIT,\n UPDATE\n}\n\nexport interface IContextMessage {\n contextType: ILuigiContextTypes; // will be init or update\n context: Context;\n}\n","import { Injectable, NgZone } from '@angular/core';\nimport { ReplaySubject, Observable } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport { Context, addInitListener, addContextUpdateListener } from '@luigi-project/client';\nimport { IContextMessage, ILuigiContextTypes, LuigiContextService } from './luigi-context-service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LuigiContextServiceImpl implements LuigiContextService {\n private subject: ReplaySubject<IContextMessage> = new ReplaySubject<IContextMessage>(1);\n private currentContext: IContextMessage = (null as unknown) as IContextMessage;\n\n constructor(private zone: NgZone) {\n addInitListener(initContext => {\n this.addListener(ILuigiContextTypes.INIT, initContext);\n });\n addContextUpdateListener(updateContext => {\n this.addListener(ILuigiContextTypes.UPDATE, updateContext);\n });\n }\n\n public contextObservable(): Observable<IContextMessage> {\n return this.subject.asObservable();\n }\n\n /**\n * Get latest context object retrieved from luigi core application or empty object, if not yet set.\n */\n public getContext(): Context {\n return (this.currentContext && this.currentContext.context) || {};\n }\n\n /**\n * Get a promise that resolves when context is set.\n */\n public getContextAsync(): Promise<Context> {\n return new Promise<Context>((resolve, reject) => {\n if (this.isObject(this.getContext()) && Object.keys(this.getContext()).length > 0) {\n resolve(this.getContext());\n } else {\n this.contextObservable()\n .pipe(first())\n .subscribe(ctx => {\n resolve(ctx.context);\n });\n }\n });\n }\n\n /**\n * Checks if input is an object.\n * @param objectToCheck mixed\n * @returns {boolean}\n */\n private isObject(objectToCheck: any) {\n return !!(objectToCheck && typeof objectToCheck === 'object' && !Array.isArray(objectToCheck));\n }\n\n /**\n * Set current context\n */\n protected setContext(obj: IContextMessage): void {\n this.zone.run(() => {\n this.currentContext = obj;\n this.subject.next(obj);\n });\n }\n\n addListener(contextType: ILuigiContextTypes, context: Context): void {\n this.setContext({\n contextType,\n context\n } as IContextMessage);\n }\n}\n","import { ActivatedRouteSnapshot } from '@angular/router';\n\nexport class LuigiActivatedRouteSnapshotHelper {\n // tslint:disable-next-line:variable-name\n private static _current: ActivatedRouteSnapshot = (null as unknown) as ActivatedRouteSnapshot;\n\n static getCurrent(): ActivatedRouteSnapshot {\n return LuigiActivatedRouteSnapshotHelper._current;\n }\n\n static setCurrent(current: ActivatedRouteSnapshot): void {\n LuigiActivatedRouteSnapshotHelper._current = current;\n }\n}\n","import { BaseRouteReuseStrategy } from '@angular/router';\nimport { ActivatedRouteSnapshot, DetachedRouteHandle } from '@angular/router';\nimport { LuigiActivatedRouteSnapshotHelper } from './luigi-activated-route-snapshot-helper';\n\nexport class LuigiRouteStrategy extends BaseRouteReuseStrategy {\n retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n LuigiActivatedRouteSnapshotHelper.setCurrent(route);\n return super.retrieve(route);\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n NavigationEnd,\n ParamMap,\n Router,\n RouterEvent,\n convertToParamMap\n} from '@angular/router';\nimport { linkManager, uxManager, isLuigiClientInitialized } from '@luigi-project/client';\nimport { OperatorFunction, Subscription } from 'rxjs';\nimport { filter } from 'rxjs/operators';\nimport { LuigiActivatedRouteSnapshotHelper } from '../route/luigi-activated-route-snapshot-helper';\nimport { LuigiContextService } from './luigi-context-service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class LuigiAutoRoutingService implements OnDestroy {\n private subscription: Subscription = new Subscription();\n\n constructor(private router: Router, private luigiContextService: LuigiContextService) {\n this.subscription.add(\n this.router.events.pipe(this.doFilter()).subscribe(this.doSubscription.bind(this) as () => void)\n );\n }\n\n doFilter(): OperatorFunction<unknown, RouterEvent> {\n return filter((event): event is RouterEvent => {\n return !!(\n event instanceof NavigationEnd &&\n event.url &&\n event.url.length > 0 &&\n !(history.state && history.state.luigiInduced)\n );\n });\n }\n\n /**\n * This method will be take in consideration angular route that having in data object the paramter\n * fromVirtualTreeRoot: true, here an example:\n * {path: 'demo', component: DemoComponent, data:{fromVirtualTreeRoot: true}}\n * Another option is to specify the LuigiPath: if you add in route data luigiRoute:'/xxxx/xxx';\n * in the case we will update the path in LuigiCore navigation, here an example\n * {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}}\n * If updateModalPathParam is specified, than modalPathParam will be updated upon internal navigation:\n * {path: 'demo', component: DemoComponent, data:{updateModalPathParam: true}}\n * @param event the NavigationEnd event\n */\n doSubscription(event: NavigationEnd): void {\n let current: ActivatedRouteSnapshot | null = LuigiActivatedRouteSnapshotHelper.getCurrent();\n\n if (!current) {\n current = this.router.routerState.root.snapshot;\n while (current?.children?.length > 0) {\n // handle multiple children\n let primary: ActivatedRouteSnapshot | null = null;\n\n current?.children.forEach(childSnapshot => {\n if (childSnapshot.outlet === 'primary') {\n primary = childSnapshot;\n }\n });\n if (primary) {\n current = primary;\n } else if (current.firstChild) {\n current = current.firstChild;\n } else {\n break;\n }\n }\n }\n if (current?.data && isLuigiClientInitialized()) {\n const ux = uxManager();\n let lm = linkManager().withoutSync();\n let route: string | undefined;\n\n if (current.data.luigiRoute) {\n route = this.getResolvedLuigiRoute(current);\n if (current.data.fromContext) {\n if (!this.luigiContextService.getContext()) {\n console.debug('Ignoring auto navigation request, luigi context not set');\n return;\n }\n if (current.data.fromContext === true) {\n lm = lm.fromClosestContext();\n } else {\n lm = lm.fromContext(current.data.fromContext);\n }\n }\n } else if (current.data.fromVirtualTreeRoot) {\n let url = event.url;\n const truncate = current.data.fromVirtualTreeRoot.truncate;\n if (truncate) {\n if (truncate.indexOf('*') === 0) {\n const index = url.indexOf(truncate.substr(1));\n url = url.substr(index + truncate.length - 1);\n } else if (url.indexOf(truncate) === 0) {\n url = url.substr(truncate.length);\n }\n }\n route = url;\n console.debug('Calling fromVirtualTreeRoot for url ==> ' + route);\n lm = lm.fromVirtualTreeRoot();\n }\n\n if (ux.isModal()) {\n if (current.data.updateModalDataPath) {\n lm.updateModalPathInternalNavigation(route as string, {}, current.data.addHistoryEntry);\n }\n } else if (route) {\n lm.navigate(route);\n }\n }\n }\n\n getResolvedLuigiRoute(current: ActivatedRouteSnapshot): string | undefined {\n let route: string | undefined = current.data.luigiRoute;\n const allParams = this.getAllParamsFromParents(current);\n\n if (!route || !allParams) {\n return route;\n }\n\n const pmap: ParamMap = convertToParamMap(allParams);\n\n pmap.keys.forEach(key => {\n pmap.getAll(key).forEach(param => {\n route = route?.replace(':' + key, param);\n });\n });\n\n return route;\n }\n\n getAllParamsFromParents(current: ActivatedRouteSnapshot): { [key: string]: string } | undefined {\n let allParams: { [key: string]: string } = {};\n let currentToCheck: ActivatedRouteSnapshot | null = current;\n\n while (currentToCheck) {\n if (currentToCheck.params) {\n allParams = { ...allParams, ...currentToCheck.params };\n }\n currentToCheck = currentToCheck.parent;\n }\n\n return allParams;\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouteReuseStrategy, RouterModule, Routes } from '@angular/router';\nimport { LuigiPreloadComponent } from './component/luigi.preload.component';\nimport { LuigiContextService } from './service/luigi-context-service';\nimport { LuigiContextServiceImpl } from './service/luigi-context.service.impl';\nimport { LuigiAutoRoutingService } from './service/luigi-auto-routing.service';\nimport { LuigiRouteStrategy } from './route/luigi-route-strategy';\n\nexport const staticRoutes: Routes = [\n /** here an example if you want to specify that this component is a virtualTree element in Luigi Core navigation*/\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { fromVirtualTreeRoot: true }\n },\n /** here an example if you want to specify that this component it is a luigi component and u want to change the navigation in Luigi core*/\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { luigiRoute: '/home/reload' }\n },\n /** here an example if you want to reuse the component and not recreating every time you navigate to it (a singleton Component) It requires in your module to redefine */\n {\n path: 'luigi-client-support-preload=component',\n component: LuigiPreloadComponent,\n data: { reuse: true }\n },\n /** here an example if you want to update modalPathParam on internal navigation */\n {\n path: 'luigi-client-support-preload',\n component: LuigiPreloadComponent,\n data: { updateModalPathParam: true }\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(staticRoutes)],\n providers: [\n {\n provide: LuigiContextService,\n useClass: LuigiContextServiceImpl\n },\n {\n provide: RouteReuseStrategy,\n useClass: LuigiRouteStrategy\n }\n ]\n})\nexport class LuigiAngularSupportModule {\n constructor(navigation: LuigiAutoRoutingService, context: LuigiContextService) {}\n}\n","import { APP_INITIALIZER, NgModule } from '@angular/core';\nimport { LuigiMockEngine } from '@luigi-project/testing-utilities';\n\n// @dynamic\n@NgModule({\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: LuigiMockEngine.initPostMessageHook,\n multi: true\n }\n ]\n})\n/*\n * This class mocks Luigi Core related functionality.\n *\n * Micro Frontends that use Luigi Client would usually communicate with Luigi Core\n * back and forth. When testing Luigi Client based components, Luigi Core might\n * not be present which leads into limitations on integration/e2e testing for standalone\n * microfrontends.\n *\n * This module adds a hook to the window postMessage API by adding an event listener to the\n * global message event of the window object and mocking the callback.\n * In the normal workflow this message would picked up by Luigi Core which then sends the response back.\n */\nexport class LuigiMockModule {}\n","/*\n * Public API Surface of client-support-angular\n */\n\nexport * from './lib/component/luigi.preload.component';\nexport * from './lib/luigi.angular.support.module';\nexport * from './lib/service/luigi-context-service';\nexport * from './lib/service/luigi-context.service.impl';\nexport * from './lib/service/luigi-auto-routing.service';\nexport * from './lib/luigi-mock/luigi-mock.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.LuigiContextService","i1.LuigiAutoRoutingService","i3"],"mappings":";;;;;;;;;MAOa,qBAAqB,CAAA;AAChC,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eAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,EApBf,SAAA,EAAA;AACT,YAAA;AACE,gBAAA,OAAO,EAAE,eAAe;gBACxB,UAAU,EAAE,eAAe,CAAC,mBAAmB;AAC/C,gBAAA,KAAK,EAAE;AACR;AACF,SAAA,EAAA,CAAA,CAAA;;kGAcU,eAAe,EAAA,UAAA,EAAA,CAAA;kBArB3B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,eAAe;4BACxB,UAAU,EAAE,eAAe,CAAC,mBAAmB;AAC/C,4BAAA,KAAK,EAAE;AACR;AACF;AACF,iBAAA;;;ACZD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,110 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnInit, OnDestroy, NgZone } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/router';
|
|
4
|
+
import { Router, RouterEvent, NavigationEnd, ActivatedRouteSnapshot, Routes } from '@angular/router';
|
|
5
|
+
import { Context } from '@luigi-project/client';
|
|
6
|
+
import { Observable, OperatorFunction } from 'rxjs';
|
|
7
|
+
|
|
8
|
+
declare class LuigiPreloadComponent implements OnInit {
|
|
9
|
+
constructor();
|
|
10
|
+
ngOnInit(): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuigiPreloadComponent, never>;
|
|
12
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<LuigiPreloadComponent, "lib-client-support-angular", never, {}, {}, never, never, true, never>;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
declare abstract class LuigiContextService {
|
|
16
|
+
/**
|
|
17
|
+
* Listen to context changes
|
|
18
|
+
* Receives current value, even if the event was already dispatched earlier.
|
|
19
|
+
*/
|
|
20
|
+
abstract contextObservable(): Observable<IContextMessage>;
|
|
21
|
+
/**
|
|
22
|
+
* Get latest set context object
|
|
23
|
+
*/
|
|
24
|
+
abstract getContext(): Context;
|
|
25
|
+
/**
|
|
26
|
+
* Get a promise that resolves when context is set.
|
|
27
|
+
*/
|
|
28
|
+
abstract getContextAsync(): Promise<Context>;
|
|
29
|
+
}
|
|
30
|
+
declare enum ILuigiContextTypes {
|
|
31
|
+
INIT = 0,
|
|
32
|
+
UPDATE = 1
|
|
33
|
+
}
|
|
34
|
+
interface IContextMessage {
|
|
35
|
+
contextType: ILuigiContextTypes;
|
|
36
|
+
context: Context;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
declare class LuigiAutoRoutingService implements OnDestroy {
|
|
40
|
+
private router;
|
|
41
|
+
private luigiContextService;
|
|
42
|
+
private subscription;
|
|
43
|
+
constructor(router: Router, luigiContextService: LuigiContextService);
|
|
44
|
+
doFilter(): OperatorFunction<unknown, RouterEvent>;
|
|
45
|
+
/**
|
|
46
|
+
* This method will be take in consideration angular route that having in data object the paramter
|
|
47
|
+
* fromVirtualTreeRoot: true, here an example:
|
|
48
|
+
* {path: 'demo', component: DemoComponent, data:{fromVirtualTreeRoot: true}}
|
|
49
|
+
* Another option is to specify the LuigiPath: if you add in route data luigiRoute:'/xxxx/xxx';
|
|
50
|
+
* in the case we will update the path in LuigiCore navigation, here an example
|
|
51
|
+
* {path: 'demo', component: DemoComponent, data:{luigiRoute: '/home/demo''}}
|
|
52
|
+
* If updateModalPathParam is specified, than modalPathParam will be updated upon internal navigation:
|
|
53
|
+
* {path: 'demo', component: DemoComponent, data:{updateModalPathParam: true}}
|
|
54
|
+
* @param event the NavigationEnd event
|
|
55
|
+
*/
|
|
56
|
+
doSubscription(event: NavigationEnd): void;
|
|
57
|
+
getResolvedLuigiRoute(current: ActivatedRouteSnapshot): string | undefined;
|
|
58
|
+
getAllParamsFromParents(current: ActivatedRouteSnapshot): {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
} | undefined;
|
|
61
|
+
ngOnDestroy(): void;
|
|
62
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuigiAutoRoutingService, never>;
|
|
63
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LuigiAutoRoutingService>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
declare const staticRoutes: Routes;
|
|
67
|
+
declare class LuigiAngularSupportModule {
|
|
68
|
+
constructor(navigation: LuigiAutoRoutingService, context: LuigiContextService);
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuigiAngularSupportModule, never>;
|
|
70
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LuigiAngularSupportModule, never, [typeof i1.RouterModule], never>;
|
|
71
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LuigiAngularSupportModule>;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare class LuigiContextServiceImpl implements LuigiContextService {
|
|
75
|
+
private zone;
|
|
76
|
+
private subject;
|
|
77
|
+
private currentContext;
|
|
78
|
+
constructor(zone: NgZone);
|
|
79
|
+
contextObservable(): Observable<IContextMessage>;
|
|
80
|
+
/**
|
|
81
|
+
* Get latest context object retrieved from luigi core application or empty object, if not yet set.
|
|
82
|
+
*/
|
|
83
|
+
getContext(): Context;
|
|
84
|
+
/**
|
|
85
|
+
* Get a promise that resolves when context is set.
|
|
86
|
+
*/
|
|
87
|
+
getContextAsync(): Promise<Context>;
|
|
88
|
+
/**
|
|
89
|
+
* Checks if input is an object.
|
|
90
|
+
* @param objectToCheck mixed
|
|
91
|
+
* @returns {boolean}
|
|
92
|
+
*/
|
|
93
|
+
private isObject;
|
|
94
|
+
/**
|
|
95
|
+
* Set current context
|
|
96
|
+
*/
|
|
97
|
+
protected setContext(obj: IContextMessage): void;
|
|
98
|
+
addListener(contextType: ILuigiContextTypes, context: Context): void;
|
|
99
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuigiContextServiceImpl, never>;
|
|
100
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LuigiContextServiceImpl>;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
declare class LuigiMockModule {
|
|
104
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LuigiMockModule, never>;
|
|
105
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LuigiMockModule, never, never, never>;
|
|
106
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LuigiMockModule>;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export { ILuigiContextTypes, LuigiAngularSupportModule, LuigiAutoRoutingService, LuigiContextService, LuigiContextServiceImpl, LuigiMockModule, LuigiPreloadComponent, staticRoutes };
|
|
110
|
+
export type { IContextMessage };
|
package/package.json
CHANGED
|
@@ -7,23 +7,19 @@
|
|
|
7
7
|
"url": "ssh://github.com/SAP/luigi.git"
|
|
8
8
|
},
|
|
9
9
|
"peerDependencies": {
|
|
10
|
-
"@angular/common": "
|
|
11
|
-
"@angular/core": "
|
|
10
|
+
"@angular/common": "20.0.0-next.9",
|
|
11
|
+
"@angular/core": "20.0.0-next.9",
|
|
12
12
|
"@luigi-project/testing-utilities": "^2.0.0",
|
|
13
13
|
"@luigi-project/client": "^2.0.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"tslib": "^2.
|
|
16
|
+
"tslib": "^2.8.1"
|
|
17
17
|
},
|
|
18
18
|
"publishConfig": {
|
|
19
19
|
"tag": "client-support-angular"
|
|
20
20
|
},
|
|
21
|
-
"version": "
|
|
22
|
-
"module": "
|
|
23
|
-
"es2020": "fesm2020/luigi-project-client-support-angular.mjs",
|
|
24
|
-
"esm2020": "esm2020/luigi-project-client-support-angular.mjs",
|
|
25
|
-
"fesm2020": "fesm2020/luigi-project-client-support-angular.mjs",
|
|
26
|
-
"fesm2015": "fesm2015/luigi-project-client-support-angular.mjs",
|
|
21
|
+
"version": "20.0.0-next.9",
|
|
22
|
+
"module": "fesm2022/luigi-project-client-support-angular.mjs",
|
|
27
23
|
"typings": "index.d.ts",
|
|
28
24
|
"exports": {
|
|
29
25
|
"./package.json": {
|
|
@@ -31,11 +27,7 @@
|
|
|
31
27
|
},
|
|
32
28
|
".": {
|
|
33
29
|
"types": "./index.d.ts",
|
|
34
|
-
"
|
|
35
|
-
"es2020": "./fesm2020/luigi-project-client-support-angular.mjs",
|
|
36
|
-
"es2015": "./fesm2015/luigi-project-client-support-angular.mjs",
|
|
37
|
-
"node": "./fesm2015/luigi-project-client-support-angular.mjs",
|
|
38
|
-
"default": "./fesm2020/luigi-project-client-support-angular.mjs"
|
|
30
|
+
"default": "./fesm2022/luigi-project-client-support-angular.mjs"
|
|
39
31
|
}
|
|
40
32
|
},
|
|
41
33
|
"sideEffects": false
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Component } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export class LuigiPreloadComponent {
|
|
4
|
-
constructor() { }
|
|
5
|
-
ngOnInit() { }
|
|
6
|
-
}
|
|
7
|
-
LuigiPreloadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiPreloadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
8
|
-
LuigiPreloadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: LuigiPreloadComponent, selector: "lib-client-support-angular", ngImport: i0, template: "<p luigipreload=\"luigipreload\"></p>\n" });
|
|
9
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiPreloadComponent, decorators: [{
|
|
10
|
-
type: Component,
|
|
11
|
-
args: [{ selector: 'lib-client-support-angular', template: "<p luigipreload=\"luigipreload\"></p>\n" }]
|
|
12
|
-
}], ctorParameters: function () { return []; } });
|
|
13
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxl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@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { APP_INITIALIZER, NgModule } from '@angular/core';
|
|
2
|
-
import { LuigiMockEngine } from '@luigi-project/testing-utilities';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
// @dynamic
|
|
5
|
-
/*
|
|
6
|
-
* This class mocks Luigi Core related functionality.
|
|
7
|
-
*
|
|
8
|
-
* Micro Frontends that use Luigi Client would usually communicate with Luigi Core
|
|
9
|
-
* back and forth. When testing Luigi Client based components, Luigi Core might
|
|
10
|
-
* not be present which leads into limitations on integration/e2e testing for standalone
|
|
11
|
-
* microfrontends.
|
|
12
|
-
*
|
|
13
|
-
* This module adds a hook to the window postMessage API by adding an event listener to the
|
|
14
|
-
* global message event of the window object and mocking the callback.
|
|
15
|
-
* In the normal workflow this message would picked up by Luigi Core which then sends the response back.
|
|
16
|
-
*/
|
|
17
|
-
export class LuigiMockModule {
|
|
18
|
-
}
|
|
19
|
-
LuigiMockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
20
|
-
LuigiMockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule });
|
|
21
|
-
LuigiMockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule, providers: [
|
|
22
|
-
{
|
|
23
|
-
provide: APP_INITIALIZER,
|
|
24
|
-
useFactory: LuigiMockEngine.initPostMessageHook,
|
|
25
|
-
multi: true
|
|
26
|
-
}
|
|
27
|
-
] });
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiMockModule, decorators: [{
|
|
29
|
-
type: NgModule,
|
|
30
|
-
args: [{
|
|
31
|
-
providers: [
|
|
32
|
-
{
|
|
33
|
-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NzYWdlIHdvdWxkIHBpY2tlZCB1cCBieSBMdWlnaSBDb3JlIHdoaWNoIHRoZW4gc2VuZHMgdGhlIHJlc3BvbnNlIGJhY2suXG4gKi9cbmV4cG9ydCBjbGFzcyBMdWlnaU1vY2tNb2R1bGUge31cbiJdfQ==
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { NgModule } from '@angular/core';
|
|
2
|
-
import { RouteReuseStrategy, RouterModule } from '@angular/router';
|
|
3
|
-
import { LuigiPreloadComponent } from './component/luigi.preload.component';
|
|
4
|
-
import { LuigiContextService } from './service/luigi-context-service';
|
|
5
|
-
import { LuigiContextServiceImpl } from './service/luigi-context.service.impl';
|
|
6
|
-
import { LuigiRouteStrategy } from './route/luigi-route-strategy';
|
|
7
|
-
import * as i0 from "@angular/core";
|
|
8
|
-
import * as i1 from "./service/luigi-auto-routing.service";
|
|
9
|
-
import * as i2 from "./service/luigi-context-service";
|
|
10
|
-
import * as i3 from "@angular/router";
|
|
11
|
-
export const staticRoutes = [
|
|
12
|
-
/** here an example if you want to specify that this component is a virtualTree element in Luigi Core navigation*/
|
|
13
|
-
{
|
|
14
|
-
path: 'luigi-client-support-preload',
|
|
15
|
-
component: LuigiPreloadComponent,
|
|
16
|
-
data: { fromVirtualTreeRoot: true }
|
|
17
|
-
},
|
|
18
|
-
/** here an example if you want to specify that this component it is a luigi component and u want to change the navigation in Luigi core*/
|
|
19
|
-
{
|
|
20
|
-
path: 'luigi-client-support-preload',
|
|
21
|
-
component: LuigiPreloadComponent,
|
|
22
|
-
data: { luigiRoute: '/home/reload' }
|
|
23
|
-
},
|
|
24
|
-
/** here an example if you want to reuse the component and not recreating every time you navigate to it (a singleton Component) It requires in your module to redefine */
|
|
25
|
-
{
|
|
26
|
-
path: 'luigi-client-support-preload=component',
|
|
27
|
-
component: LuigiPreloadComponent,
|
|
28
|
-
data: { reuse: true }
|
|
29
|
-
},
|
|
30
|
-
/** here an example if you want to update modalPathParam on internal navigation */
|
|
31
|
-
{
|
|
32
|
-
path: 'luigi-client-support-preload',
|
|
33
|
-
component: LuigiPreloadComponent,
|
|
34
|
-
data: { updateModalPathParam: true }
|
|
35
|
-
}
|
|
36
|
-
];
|
|
37
|
-
export class LuigiAngularSupportModule {
|
|
38
|
-
constructor(navigation, context) { }
|
|
39
|
-
}
|
|
40
|
-
LuigiAngularSupportModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, deps: [{ token: i1.LuigiAutoRoutingService }, { token: i2.LuigiContextService }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
41
|
-
LuigiAngularSupportModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, declarations: [LuigiPreloadComponent], imports: [i3.RouterModule], exports: [LuigiPreloadComponent] });
|
|
42
|
-
LuigiAngularSupportModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, providers: [
|
|
43
|
-
{
|
|
44
|
-
provide: LuigiContextService,
|
|
45
|
-
useClass: LuigiContextServiceImpl
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
provide: RouteReuseStrategy,
|
|
49
|
-
useClass: LuigiRouteStrategy
|
|
50
|
-
}
|
|
51
|
-
], imports: [RouterModule.forChild(staticRoutes)] });
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: LuigiAngularSupportModule, decorators: [{
|
|
53
|
-
type: NgModule,
|
|
54
|
-
args: [{
|
|
55
|
-
declarations: [LuigiPreloadComponent],
|
|
56
|
-
imports: [RouterModule.forChild(staticRoutes)],
|
|
57
|
-
providers: [
|
|
58
|
-
{
|
|
59
|
-
provide: LuigiContextService,
|
|
60
|
-
useClass: LuigiContextServiceImpl
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
provide: RouteReuseStrategy,
|
|
64
|
-
useClass: LuigiRouteStrategy
|
|
65
|
-
}
|
|
66
|
-
],
|
|
67
|
-
exports: [LuigiPreloadComponent]
|
|
68
|
-
}]
|
|
69
|
-
}], ctorParameters: function () { return [{ type: i1.LuigiAutoRoutingService }, { type: i2.LuigiContextService }]; } });
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2kuYW5ndWxhci5zdXBwb3J0Lm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC1zdXBwb3J0LWFuZ3VsYXIvc3JjL2xpYi9sdWlnaS5hbmd1bGFyLnN1cHBvcnQubW9kdWxlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDekMsT0FBTyxFQUFFLGtCQUFrQixFQUFFLFlBQVksRUFBVSxNQUFNLGlCQUFpQixDQUFDO0FBQzNFLE9BQU8sRUFBRSxxQkFBcUIsRUFBRSxNQUFNLHFDQUFxQyxDQUFDO0FBQzVFLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSx1QkFBdUIsRUFBRSxNQUFNLHNDQUFzQyxDQUFDO0FBRS9FLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDhCQUE4QixDQUFDOzs7OztBQUVsRSxNQUFNLENBQUMsTUFBTSxZQUFZLEdBQVc7SUFDbEMsa0hBQWtIO0lBQ2xIO1FBQ0UsSUFBSSxFQUFFLDhCQUE4QjtRQUNwQyxTQUFTLEVBQUUscUJBQXFCO1FBQ2hDLElBQUksRUFBRSxFQUFFLG1CQUFtQixFQUFFLElBQUksRUFBRTtLQUNwQztJQUNELDBJQUEwSTtJQUMxST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G9uIGludGVybmFsIG5hdmlnYXRpb24gICovXG4gIHtcbiAgICBwYXRoOiAnbHVpZ2ktY2xpZW50LXN1cHBvcnQtcHJlbG9hZCcsXG4gICAgY29tcG9uZW50OiBMdWlnaVByZWxvYWRDb21wb25lbnQsXG4gICAgZGF0YTogeyB1cGRhdGVNb2RhbFBhdGhQYXJhbTogdHJ1ZSB9XG4gIH1cbl07XG5cbkBOZ01vZHVsZSh7XG4gIGRlY2xhcmF0aW9uczogW0x1aWdpUHJlbG9hZENvbXBvbmVudF0sXG4gIGltcG9ydHM6IFtSb3V0ZXJNb2R1bGUuZm9yQ2hpbGQoc3RhdGljUm91dGVzKV0sXG4gIHByb3ZpZGVyczogW1xuICAgIHtcbiAgICAgIHByb3ZpZGU6IEx1aWdpQ29udGV4dFNlcnZpY2UsXG4gICAgICB1c2VDbGFzczogTHVpZ2lDb250ZXh0U2VydmljZUltcGxcbiAgICB9LFxuICAgIHtcbiAgICAgIHByb3ZpZGU6IFJvdXRlUmV1c2VTdHJhdGVneSxcbiAgICAgIHVzZUNsYXNzOiBMdWlnaVJvdXRlU3RyYXRlZ3lcbiAgICB9XG4gIF0sXG4gIGV4cG9ydHM6IFtMdWlnaVByZWxvYWRDb21wb25lbnRdXG59KVxuZXhwb3J0IGNsYXNzIEx1aWdpQW5ndWxhclN1cHBvcnRNb2R1bGUge1xuICBjb25zdHJ1Y3RvcihuYXZpZ2F0aW9uOiBMdWlnaUF1dG9Sb3V0aW5nU2VydmljZSwgY29udGV4dDogTHVpZ2lDb250ZXh0U2VydmljZSkge31cbn1cbiJdfQ==
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export class LuigiActivatedRouteSnapshotHelper {
|
|
2
|
-
static getCurrent() {
|
|
3
|
-
return LuigiActivatedRouteSnapshotHelper._current;
|
|
4
|
-
}
|
|
5
|
-
static setCurrent(current) {
|
|
6
|
-
LuigiActivatedRouteSnapshotHelper._current = current;
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
// tslint:disable-next-line:variable-name
|
|
10
|
-
LuigiActivatedRouteSnapshotHelper._current = null;
|
|
11
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktYWN0aXZhdGVkLXJvdXRlLXNuYXBzaG90LWhlbHBlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NsaWVudC1zdXBwb3J0LWFuZ3VsYXIvc3JjL2xpYi9yb3V0ZS9sdWlnaS1hY3RpdmF0ZWQtcm91dGUtc25hcHNob3QtaGVscGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVBLE1BQU0sT0FBTyxpQ0FBaUM7SUFJNUMsTUFBTSxDQUFDLFVBQVU7UUFDZixPQUFPLGlDQUFpQyxDQUFDLFFBQVEsQ0FBQztJQUNwRCxDQUFDO0lBRUQsTUFBTSxDQUFDLFVBQVUsQ0FBQyxPQUErQjtRQUMvQyxpQ0FBaUMsQ0FBQyxRQUFRLEdBQUcsT0FBTyxDQUFDO0lBQ3ZELENBQUM7O0FBVEQseUNBQXlDO0FBQzFCLDBDQUFRLEdBQTRCLElBQTBDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90IH0gZnJvbSAnQGFuZ3VsYXIvcm91dGVyJztcblxuZXhwb3J0IGNsYXNzIEx1aWdpQWN0aXZhdGVkUm91dGVTbmFwc2hvdEhlbHBlciB7XG4gIC8vIHRzbGludDpkaXNhYmxlLW5leHQtbGluZTp2YXJpYWJsZS1uYW1lXG4gIHByaXZhdGUgc3RhdGljIF9jdXJyZW50OiBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90ID0gKG51bGwgYXMgdW5rbm93bikgYXMgQWN0aXZhdGVkUm91dGVTbmFwc2hvdDtcblxuICBzdGF0aWMgZ2V0Q3VycmVudCgpOiBBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90IHtcbiAgICByZXR1cm4gTHVpZ2lBY3RpdmF0ZWRSb3V0ZVNuYXBzaG90SGVscGVyLl9jdXJyZW50O1xuICB9XG5cbiAgc3RhdGljIHNldEN1cnJlbnQoY3VycmVudDogQWN0aXZhdGVkUm91dGVTbmFwc2hvdCk6IHZvaWQge1xuICAgIEx1aWdpQWN0aXZhdGVkUm91dGVTbmFwc2hvdEhlbHBlci5fY3VycmVudCA9IGN1cnJlbnQ7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BaseRouteReuseStrategy } from '@angular/router';
|
|
2
|
-
import { LuigiActivatedRouteSnapshotHelper } from './luigi-activated-route-snapshot-helper';
|
|
3
|
-
export class LuigiRouteStrategy extends BaseRouteReuseStrategy {
|
|
4
|
-
retrieve(route) {
|
|
5
|
-
LuigiActivatedRouteSnapshotHelper.setCurrent(route);
|
|
6
|
-
return super.retrieve(route);
|
|
7
|
-
}
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibHVpZ2ktcm91dGUtc3RyYXRlZ3kuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jbGllbnQtc3VwcG9ydC1hbmd1bGFyL3NyYy9saWIvcm91dGUvbHVpZ2ktcm91dGUtc3RyYXRlZ3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0saUJBQWlCLENBQUM7QUFFekQsT0FBTyxFQUFFLGlDQUFpQyxFQUFFLE1BQU0seUNBQXlDLENBQUM7QUFFNUYsTUFBTSxPQUFPLGtCQUFtQixTQUFRLHNCQUFzQjtJQUM1RCxRQUFRLENBQUMsS0FBNkI7UUFDcEMsaUNBQWlDLENBQUMsVUFBVSxD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