@luigi-project/client-support-angular 2.13.1-dev.20240630734 → 2.13.1-dev.20240650026

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.
@@ -1,79 +1,25 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, APP_INITIALIZER, NgModule, inject, NgZone, Injectable } from '@angular/core';
3
- import { LuigiMockEngine } from '@luigi-project/testing-utilities';
2
+ import { Component, Injectable, NgModule, APP_INITIALIZER } from '@angular/core';
4
3
  import * as i1 from '@angular/router';
5
4
  import { BaseRouteReuseStrategy, NavigationEnd, convertToParamMap, RouteReuseStrategy, RouterModule } from '@angular/router';
6
- import { addInitListener, addContextUpdateListener, uxManager, linkManager } from '@luigi-project/client';
7
5
  import { ReplaySubject, Subscription } from 'rxjs';
8
6
  import { first, filter } from 'rxjs/operators';
7
+ import { addInitListener, addContextUpdateListener, isLuigiClientInitialized, uxManager, linkManager } from '@luigi-project/client';
8
+ import { LuigiMockEngine } from '@luigi-project/testing-utilities';
9
9
 
10
10
  class LuigiPreloadComponent {
11
+ constructor() { }
12
+ ngOnInit() { }
11
13
  }
12
14
  LuigiPreloadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiPreloadComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
13
15
  LuigiPreloadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: LuigiPreloadComponent, selector: "lib-client-support-angular", ngImport: i0, template: "<p luigipreload=\"luigipreload\"></p>\n" });
14
16
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiPreloadComponent, decorators: [{
15
17
  type: Component,
16
18
  args: [{ selector: 'lib-client-support-angular', template: "<p luigipreload=\"luigipreload\"></p>\n" }]
17
- }] });
18
-
19
- // @dynamic
20
- /*
21
- * This class mocks Luigi Core related functionality.
22
- *
23
- * Micro Frontends that use Luigi Client would usually communicate with Luigi Core
24
- * back and forth. When testing Luigi Client based components, Luigi Core might
25
- * not be present which leads into limitations on integration/e2e testing for standalone
26
- * microfrontends.
27
- *
28
- * This module adds a hook to the window postMessage API by adding an event listener to the
29
- * global message event of the window object and mocking the callback.
30
- * In the normal workflow this message would picked up by Luigi Core which then sends the response back.
31
- */
32
- class LuigiMockModule {
33
- }
34
- LuigiMockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
35
- LuigiMockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule });
36
- LuigiMockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, providers: [
37
- {
38
- provide: APP_INITIALIZER,
39
- useFactory: LuigiMockEngine.initPostMessageHook,
40
- multi: true
41
- }
42
- ] });
43
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, decorators: [{
44
- type: NgModule,
45
- args: [{
46
- providers: [
47
- {
48
- provide: APP_INITIALIZER,
49
- useFactory: LuigiMockEngine.initPostMessageHook,
50
- multi: true
51
- }
52
- ]
53
- }]
54
- }] });
55
-
56
- class LuigiActivatedRouteSnapshotHelper {
57
- static getCurrent() {
58
- return LuigiActivatedRouteSnapshotHelper._current;
59
- }
60
- static setCurrent(current) {
61
- LuigiActivatedRouteSnapshotHelper._current = current;
62
- }
63
- }
64
- // tslint:disable-next-line:variable-name
65
- LuigiActivatedRouteSnapshotHelper._current = null;
66
-
67
- class LuigiRouteStrategy extends BaseRouteReuseStrategy {
68
- retrieve(route) {
69
- LuigiActivatedRouteSnapshotHelper.setCurrent(route);
70
- return super.retrieve(route);
71
- }
72
- }
19
+ }], ctorParameters: function () { return []; } });
73
20
 
74
21
  class LuigiContextService {
75
22
  }
76
-
77
23
  var ILuigiContextTypes;
78
24
  (function (ILuigiContextTypes) {
79
25
  ILuigiContextTypes[ILuigiContextTypes["INIT"] = 0] = "INIT";
@@ -81,22 +27,17 @@ var ILuigiContextTypes;
81
27
  })(ILuigiContextTypes || (ILuigiContextTypes = {}));
82
28
 
83
29
  class LuigiContextServiceImpl {
84
- constructor() {
30
+ constructor(zone) {
31
+ this.zone = zone;
85
32
  this.subject = new ReplaySubject(1);
86
- this.ngZone = inject(NgZone);
87
- addInitListener((initContext) => {
33
+ this.currentContext = null;
34
+ addInitListener(initContext => {
88
35
  this.addListener(ILuigiContextTypes.INIT, initContext);
89
36
  });
90
- addContextUpdateListener((updateContext) => {
37
+ addContextUpdateListener(updateContext => {
91
38
  this.addListener(ILuigiContextTypes.UPDATE, updateContext);
92
39
  });
93
40
  }
94
- addListener(contextType, context) {
95
- this.setContext({
96
- contextType,
97
- context
98
- });
99
- }
100
41
  contextObservable() {
101
42
  return this.subject.asObservable();
102
43
  }
@@ -104,23 +45,22 @@ class LuigiContextServiceImpl {
104
45
  * Get latest context object retrieved from luigi core application or empty object, if not yet set.
105
46
  */
106
47
  getContext() {
107
- var _a;
108
- return ((_a = this.currentContext) === null || _a === void 0 ? void 0 : _a.context) || {};
48
+ return (this.currentContext && this.currentContext.context) || {};
109
49
  }
110
50
  /**
111
51
  * Get a promise that resolves when context is set.
112
52
  */
113
53
  getContextAsync() {
114
54
  return new Promise((resolve, reject) => {
115
- var _a;
116
- const context = this.getContext();
117
- if (this.isObject(context) && ((_a = Object.keys(context)) === null || _a === void 0 ? void 0 : _a.length)) {
55
+ if (this.isObject(this.getContext()) && Object.keys(this.getContext()).length > 0) {
118
56
  resolve(this.getContext());
119
57
  }
120
58
  else {
121
59
  this.contextObservable()
122
60
  .pipe(first())
123
- .subscribe((ctx) => resolve(ctx.context));
61
+ .subscribe(ctx => {
62
+ resolve(ctx.context);
63
+ });
124
64
  }
125
65
  });
126
66
  }
@@ -136,41 +76,58 @@ class LuigiContextServiceImpl {
136
76
  * Set current context
137
77
  */
138
78
  setContext(obj) {
139
- this.ngZone.run(() => {
79
+ this.zone.run(() => {
140
80
  this.currentContext = obj;
141
81
  this.subject.next(obj);
142
82
  });
143
83
  }
84
+ addListener(contextType, context) {
85
+ this.setContext({
86
+ contextType,
87
+ context
88
+ });
89
+ }
144
90
  }
145
- LuigiContextServiceImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiContextServiceImpl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
91
+ LuigiContextServiceImpl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiContextServiceImpl, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
146
92
  LuigiContextServiceImpl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiContextServiceImpl, providedIn: 'root' });
147
93
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiContextServiceImpl, decorators: [{
148
94
  type: Injectable,
149
95
  args: [{
150
96
  providedIn: 'root'
151
97
  }]
152
- }], ctorParameters: function () { return []; } });
98
+ }], ctorParameters: function () { return [{ type: i0.NgZone }]; } });
99
+
100
+ class LuigiActivatedRouteSnapshotHelper {
101
+ static getCurrent() {
102
+ return LuigiActivatedRouteSnapshotHelper._current;
103
+ }
104
+ static setCurrent(current) {
105
+ LuigiActivatedRouteSnapshotHelper._current = current;
106
+ }
107
+ }
108
+ // tslint:disable-next-line:variable-name
109
+ LuigiActivatedRouteSnapshotHelper._current = null;
110
+
111
+ class LuigiRouteStrategy extends BaseRouteReuseStrategy {
112
+ retrieve(route) {
113
+ LuigiActivatedRouteSnapshotHelper.setCurrent(route);
114
+ return super.retrieve(route);
115
+ }
116
+ }
153
117
 
154
118
  class LuigiAutoRoutingService {
155
119
  constructor(router, luigiContextService) {
156
120
  this.router = router;
157
121
  this.luigiContextService = luigiContextService;
158
122
  this.subscription = new Subscription();
159
- const routerEvents = this.router
160
- .events;
161
- this.subscription.add(routerEvents
162
- .pipe(this.doFilter())
163
- .subscribe((event) => this.doSubscription(event)));
164
- }
165
- ngOnDestroy() {
166
- this.subscription.unsubscribe();
123
+ this.subscription.add(this.router.events.pipe(this.doFilter()).subscribe(this.doSubscription.bind(this)));
167
124
  }
168
125
  doFilter() {
169
126
  return filter((event) => {
170
- var _a, _b;
171
127
  return !!(event instanceof NavigationEnd &&
172
- ((_a = event === null || event === void 0 ? void 0 : event.url) === null || _a === void 0 ? void 0 : _a.length) &&
173
- !((_b = history === null || history === void 0 ? void 0 : history.state) === null || _b === void 0 ? void 0 : _b.luigiInduced));
128
+ event.url &&
129
+ event.url.length > 0 &&
130
+ !(history.state && history.state.luigiInduced));
174
131
  });
175
132
  }
176
133
  /**
@@ -189,11 +146,11 @@ class LuigiAutoRoutingService {
189
146
  let current = LuigiActivatedRouteSnapshotHelper.getCurrent();
190
147
  if (!current) {
191
148
  current = this.router.routerState.root.snapshot;
192
- while ((_a = current === null || current === void 0 ? void 0 : current.children) === null || _a === void 0 ? void 0 : _a.length) {
149
+ while (((_a = current === null || current === void 0 ? void 0 : current.children) === null || _a === void 0 ? void 0 : _a.length) > 0) {
193
150
  // handle multiple children
194
151
  let primary = null;
195
- current.children.forEach((childSnapshot) => {
196
- if ((childSnapshot === null || childSnapshot === void 0 ? void 0 : childSnapshot.outlet) === 'primary') {
152
+ current === null || current === void 0 ? void 0 : current.children.forEach(childSnapshot => {
153
+ if (childSnapshot.outlet === 'primary') {
197
154
  primary = childSnapshot;
198
155
  }
199
156
  });
@@ -208,7 +165,7 @@ class LuigiAutoRoutingService {
208
165
  }
209
166
  }
210
167
  }
211
- if (current === null || current === void 0 ? void 0 : current.data) {
168
+ if ((current === null || current === void 0 ? void 0 : current.data) && isLuigiClientInitialized()) {
212
169
  const ux = uxManager();
213
170
  let lm = linkManager().withoutSync();
214
171
  let route;
@@ -232,11 +189,11 @@ class LuigiAutoRoutingService {
232
189
  const truncate = current.data.fromVirtualTreeRoot.truncate;
233
190
  if (truncate) {
234
191
  if (truncate.indexOf('*') === 0) {
235
- const index = url.indexOf(truncate.substring(1));
236
- url = url.substring(index + truncate.length - 1);
192
+ const index = url.indexOf(truncate.substr(1));
193
+ url = url.substr(index + truncate.length - 1);
237
194
  }
238
195
  else if (url.indexOf(truncate) === 0) {
239
- url = url.substring(truncate.length);
196
+ url = url.substr(truncate.length);
240
197
  }
241
198
  }
242
199
  route = url;
@@ -260,8 +217,8 @@ class LuigiAutoRoutingService {
260
217
  return route;
261
218
  }
262
219
  const pmap = convertToParamMap(allParams);
263
- pmap.keys.forEach((key) => {
264
- pmap.getAll(key).forEach((param) => {
220
+ pmap.keys.forEach(key => {
221
+ pmap.getAll(key).forEach(param => {
265
222
  route = route === null || route === void 0 ? void 0 : route.replace(':' + key, param);
266
223
  });
267
224
  });
@@ -278,6 +235,9 @@ class LuigiAutoRoutingService {
278
235
  }
279
236
  return allParams;
280
237
  }
238
+ ngOnDestroy() {
239
+ this.subscription.unsubscribe();
240
+ }
281
241
  }
282
242
  LuigiAutoRoutingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiAutoRoutingService, deps: [{ token: i1.Router }, { token: LuigiContextService }], target: i0.ɵɵFactoryTarget.Injectable });
283
243
  LuigiAutoRoutingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiAutoRoutingService, providedIn: 'root' });
@@ -348,6 +308,43 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
348
308
  }]
349
309
  }], ctorParameters: function () { return [{ type: LuigiAutoRoutingService }, { type: LuigiContextService }]; } });
350
310
 
311
+ // @dynamic
312
+ /*
313
+ * This class mocks Luigi Core related functionality.
314
+ *
315
+ * Micro Frontends that use Luigi Client would usually communicate with Luigi Core
316
+ * back and forth. When testing Luigi Client based components, Luigi Core might
317
+ * not be present which leads into limitations on integration/e2e testing for standalone
318
+ * microfrontends.
319
+ *
320
+ * This module adds a hook to the window postMessage API by adding an event listener to the
321
+ * global message event of the window object and mocking the callback.
322
+ * In the normal workflow this message would picked up by Luigi Core which then sends the response back.
323
+ */
324
+ class LuigiMockModule {
325
+ }
326
+ LuigiMockModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
327
+ LuigiMockModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule });
328
+ LuigiMockModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, providers: [
329
+ {
330
+ provide: APP_INITIALIZER,
331
+ useFactory: LuigiMockEngine.initPostMessageHook,
332
+ multi: true
333
+ }
334
+ ] });
335
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: LuigiMockModule, decorators: [{
336
+ type: NgModule,
337
+ args: [{
338
+ providers: [
339
+ {
340
+ provide: APP_INITIALIZER,
341
+ useFactory: LuigiMockEngine.initPostMessageHook,
342
+ multi: true
343
+ }
344
+ ]
345
+ }]
346
+ }] });
347
+
351
348
  /*
352
349
  * Public API Surface of client-support-angular
353
350
  */
@@ -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/luigi-mock/luigi-mock.module.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-context.service.ts","../../../projects/client-support-angular/src/lib/service/luigi-context.model.ts","../../../projects/client-support-angular/src/lib/service/luigi-context.service.impl.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/public-api.ts","../../../projects/client-support-angular/src/luigi-project-client-support-angular.ts"],"sourcesContent":["import { Component } from '@angular/core';\n\n@Component({\n selector: 'lib-client-support-angular',\n templateUrl: './luigi.preload.component.html',\n})\nexport class LuigiPreloadComponent {}\n","<p luigipreload=\"luigipreload\"></p>\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","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 { Context } from '@luigi-project/client';\nimport { Observable } from 'rxjs';\nimport { IContextMessage } from './luigi-context.model';\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","import { Context } from '@luigi-project/client';\n\nexport enum ILuigiContextTypes {\n INIT,\n UPDATE\n}\n\nexport interface IContextMessage {\n context: Context;\n contextType: ILuigiContextTypes;\n}\n","import { inject, Injectable, NgZone } from '@angular/core';\nimport { Context, addInitListener, addContextUpdateListener } from '@luigi-project/client';\nimport { ReplaySubject, Observable } from 'rxjs';\nimport { first } from 'rxjs/operators';\nimport { IContextMessage, ILuigiContextTypes } from './luigi-context.model';\nimport { 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;\n private ngZone = inject(NgZone);\n\n constructor() {\n addInitListener((initContext: Context) => {\n this.addListener(ILuigiContextTypes.INIT, initContext);\n });\n addContextUpdateListener((updateContext: Context) => {\n this.addListener(ILuigiContextTypes.UPDATE, updateContext);\n });\n }\n\n public addListener(contextType: ILuigiContextTypes, context: Context): void {\n this.setContext({\n contextType,\n context\n } as IContextMessage);\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?.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 const context: Context = this.getContext();\n\n if (this.isObject(context) && Object.keys(context)?.length) {\n resolve(this.getContext());\n } else {\n this.contextObservable()\n .pipe(first())\n .subscribe((ctx: IContextMessage) => resolve(ctx.context));\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): boolean {\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.ngZone.run(() => {\n this.currentContext = obj;\n this.subject.next(obj);\n });\n }\n}\n","import { Injectable, OnDestroy } from '@angular/core';\nimport {\n ActivatedRouteSnapshot,\n Event,\n NavigationEnd,\n ParamMap,\n Router,\n RouterEvent,\n convertToParamMap,\n} from '@angular/router';\nimport { linkManager, uxManager } from '@luigi-project/client';\nimport { Observable, 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 const routerEvents: Observable<Event> = this.router\n .events as unknown as Observable<Event>;\n\n this.subscription.add(\n routerEvents\n .pipe(this.doFilter())\n .subscribe((event: RouterEvent) =>\n this.doSubscription(event as NavigationEnd)\n )\n );\n }\n\n ngOnDestroy(): void {\n this.subscription.unsubscribe();\n }\n\n doFilter(): OperatorFunction<Event, RouterEvent> {\n return filter(\n (event: Event): event is NavigationEnd =>\n !!(\n event instanceof NavigationEnd &&\n event?.url?.length &&\n !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\n while (current?.children?.length) {\n // handle multiple children\n let primary: ActivatedRouteSnapshot | null = null;\n\n current.children.forEach((childSnapshot: ActivatedRouteSnapshot) => {\n if (childSnapshot?.outlet === 'primary') {\n primary = childSnapshot;\n }\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\n if (current?.data) {\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\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\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\n if (truncate) {\n if (truncate.indexOf('*') === 0) {\n const index = url.indexOf(truncate.substring(1));\n\n url = url.substring(index + truncate.length - 1);\n } else if (url.indexOf(truncate) === 0) {\n url = url.substring(truncate.length);\n }\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(\n current: ActivatedRouteSnapshot\n ): 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: string) => {\n pmap.getAll(key).forEach((param: string) => {\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\n currentToCheck = currentToCheck.parent;\n }\n\n return allParams;\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RouteReuseStrategy, RouterModule, Routes } from '@angular/router';\nimport { LuigiPreloadComponent } from './component/luigi.preload.component';\nimport { LuigiRouteStrategy } from './route/luigi-route-strategy';\nimport { LuigiContextService } from './service/luigi-context.service';\nimport { LuigiContextServiceImpl } from './service/luigi-context.service.impl';\nimport { LuigiAutoRoutingService } from './service/luigi-auto-routing.service';\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","/*\n * Public API Surface of client-support-angular\n */\n\nexport * from './lib/component/luigi.preload.component';\nexport * from './lib/luigi-mock/luigi-mock.module';\nexport * from './lib/luigi.angular.support.module';\nexport * from './lib/service/luigi-auto-routing.service';\nexport * from './lib/service/luigi-context.model';\nexport * from './lib/service/luigi-context.service';\nexport * from './lib/service/luigi-context.service.impl';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.LuigiContextService","i1.LuigiAutoRoutingService","i3"],"mappings":";;;;;;;;;MAMa,qBAAqB,CAAA;;mHAArB,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,SAAA,EAAA,IAAA,EAAA,qBAAqB,kECNlC,yCACA,EAAA,CAAA,CAAA;4FDKa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,SAAS;+BACE,4BAA4B,EAAA,QAAA,EAAA,yCAAA,EAAA,CAAA;;;AEAxC;AAUA;;;;;;;;;;;AAWG;MACU,eAAe,CAAA;;6GAAf,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,C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,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;AAC9C,oBAAA,SAAS,EAAE;AACT,wBAAA;AACE,4BAAA,OAAO,EAAE,mBAAmB;AAC5B,4BAAA,QAAQ,EAAE,uBAAuB;AAClC,yBAAA;AACD,wBAAA;AACE,4BAAA,OAAO,EAAE,kBAAkB;AAC3B,4BAAA,QAAQ,EAAE,kBAAkB;AAC7B,yBAAA;AACF,qBAAA;oBACD,OAAO,EAAE,CAAC,qBAAqB,CAAC;iBACjC,CAAA;;;ACjDD;;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 { ActivatedRouteSnapshot, NavigationEnd, ParamMap, Router, RouterEvent, convertToParamMap } 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(\n current: ActivatedRouteSnapshot\n ): 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;;mHAFR,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,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