@luigi-project/client-support-angular 2.9.1-dev.202402191429 → 2.9.1-dev.202402210024

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.
@@ -171,15 +171,7 @@ class LuigiAutoRoutingService {
171
171
  let lm = linkManager().withoutSync();
172
172
  let route;
173
173
  if (current.data.luigiRoute) {
174
- route = current.data.luigiRoute;
175
- if (current.params) {
176
- const pmap = convertToParamMap(current.params);
177
- pmap.keys.forEach(key => {
178
- const val = pmap.getAll(key).forEach(param => {
179
- route = route === null || route === void 0 ? void 0 : route.replace(':' + key, param);
180
- });
181
- });
182
- }
174
+ route = this.getResolvedLuigiRoute(current);
183
175
  if (current.data.fromContext) {
184
176
  if (!this.luigiContextService.getContext()) {
185
177
  console.debug('Ignoring auto navigation request, luigi context not set');
@@ -219,6 +211,31 @@ class LuigiAutoRoutingService {
219
211
  }
220
212
  }
221
213
  }
214
+ getResolvedLuigiRoute(current) {
215
+ let route = current.data.luigiRoute;
216
+ const allParams = this.getAllParamsFromParents(current);
217
+ if (!route || !allParams) {
218
+ return route;
219
+ }
220
+ const pmap = convertToParamMap(allParams);
221
+ pmap.keys.forEach(key => {
222
+ pmap.getAll(key).forEach(param => {
223
+ route = route === null || route === void 0 ? void 0 : route.replace(':' + key, param);
224
+ });
225
+ });
226
+ return route;
227
+ }
228
+ getAllParamsFromParents(current) {
229
+ let allParams = {};
230
+ let currentToCheck = current;
231
+ while (currentToCheck) {
232
+ if (currentToCheck.params) {
233
+ allParams = Object.assign(Object.assign({}, allParams), currentToCheck.params);
234
+ }
235
+ currentToCheck = currentToCheck.parent;
236
+ }
237
+ return allParams;
238
+ }
222
239
  ngOnDestroy() {
223
240
  this.subscription.unsubscribe();
224
241
  }
@@ -309,124 +326,121 @@ class LuigiMockModule {
309
326
  // Add a hook to the post message api to mock the LuigiCore response to the Client
310
327
  static initPostMessageHook() {
311
328
  return () => __awaiter(this, void 0, void 0, function* () {
312
- console.log('luigiMockModule sapluigi client-support-angular');
313
329
  // Check if Luigi Client is running standalone
314
- // if (window.parent === window) {
315
- console.debug('Detected standalone mode');
316
- // Check and skip if Luigi environment is already mocked
317
- if (window.luigiMockEnvironment) {
318
- return;
319
- }
320
- // mock target origin
321
- console.log('(window as any).LuigiClient', window.LuigiClient);
322
- if (window.LuigiClient) {
323
- window.LuigiClient.setTargetOrigin('*');
324
- }
325
- window.luigiMockEnvironment = {
326
- msgListener: function (e) {
327
- console.log('msg starts with luigi. or storage', e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage'));
328
- if (e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage')) {
329
- console.debug('Luigi msg', e.data);
330
- if (e.data.msg === 'luigi.get-context') {
331
- window.postMessage({
332
- msg: 'luigi.init',
333
- emulated: true,
334
- internal: {
335
- viewStackSize: 1
336
- },
337
- context: e.data.context
338
- }, '*');
339
- }
340
- // vizualise retrieved event data
341
- LuigiMockEngine.visualize(JSON.stringify(e.data));
342
- // Check and run mocked callback if it exists
343
- const mockListener = window.luigiMockEnvironment.mockListeners[e.data.msg];
344
- if (mockListener) {
345
- mockListener(e);
330
+ if (window.parent === window) {
331
+ console.debug('Detected standalone mode');
332
+ // Check and skip if Luigi environment is already mocked
333
+ if (window.luigiMockEnvironment) {
334
+ return;
335
+ }
336
+ // mock target origin
337
+ if (window.LuigiClient) {
338
+ window.LuigiClient.setTargetOrigin('*');
339
+ }
340
+ window.luigiMockEnvironment = {
341
+ msgListener: function (e) {
342
+ if (e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage')) {
343
+ console.debug('Luigi msg', e.data);
344
+ if (e.data.msg === 'luigi.get-context') {
345
+ window.postMessage({
346
+ msg: 'luigi.init',
347
+ emulated: true,
348
+ internal: {
349
+ viewStackSize: 1
350
+ },
351
+ context: e.data.context
352
+ }, '*');
353
+ }
354
+ // vizualise retrieved event data
355
+ LuigiMockEngine.visualize(JSON.stringify(e.data));
356
+ // Check and run mocked callback if it exists
357
+ const mockListener = window.luigiMockEnvironment.mockListeners[e.data.msg];
358
+ if (mockListener) {
359
+ mockListener(e);
360
+ }
346
361
  }
347
- }
348
- },
349
- mockListeners: {
350
- 'luigi.navigation.pathExists': (event) => {
351
- const mockData = window.sessionStorage.getItem('luigiMockData');
352
- let mockDataParsed = mockData ? JSON.parse(mockData) : undefined;
353
- const inputPath = event.data.data.link;
354
- const pathExists = mockDataParsed && mockDataParsed.pathExists && mockDataParsed.pathExists[inputPath];
355
- const response = {
356
- msg: 'luigi.navigation.pathExists.answer',
357
- data: {
358
- correlationId: event.data.data.id,
359
- pathExists: pathExists ? pathExists : false
360
- },
361
- emulated: true
362
- };
363
- window.postMessage(response, '*');
364
- },
365
- //ux
366
- 'luigi.ux.confirmationModal.show': (event) => {
367
- const response = {
368
- msg: 'luigi.ux.confirmationModal.hide',
369
- data: event.data,
370
- emulated: true
371
- };
372
- window.postMessage(response, '*');
373
- },
374
- 'luigi.ux.alert.show': (event) => {
375
- const response = {
376
- msg: 'luigi.ux.alert.hide',
377
- data: event.data,
378
- emulated: true
379
- };
380
- window.postMessage(response, '*');
381
- },
382
- 'luigi.ux.set-current-locale': (event) => {
383
- const response = {
384
- msg: 'luigi.current-locale-changed',
385
- currentLocale: event.data.data.currentLocale,
386
- emulated: true
387
- };
388
- window.postMessage(response, '*');
389
362
  },
390
- // linkManager
391
- 'luigi.navigation.open': (event) => {
392
- const response = {
393
- msg: 'luigi.navigate.ok',
394
- data: event.data,
395
- emulated: true
396
- };
397
- window.postMessage(response, '*');
398
- },
399
- 'luigi.navigation.splitview.close': (event) => {
400
- const response = {
401
- msg: 'luigi.navigate.ok',
402
- data: event.data,
403
- emulated: true
404
- };
405
- window.postMessage(response, '*');
406
- },
407
- 'luigi.navigation.splitview.collapse': (event) => {
408
- const response = {
409
- msg: 'luigi.navigate.ok',
410
- data: event.data,
411
- emulated: true
412
- };
413
- window.postMessage(response, '*');
414
- },
415
- 'luigi.navigation.splitview.expand': (event) => {
416
- const response = {
417
- msg: 'luigi.navigate.ok',
418
- data: event.data,
419
- emulated: true
420
- };
421
- window.postMessage(response, '*');
422
- },
423
- // storage
424
- storage: () => { }
425
- }
426
- };
427
- // Listen to the global 'message' event of the window object
428
- window.addEventListener('message', window.luigiMockEnvironment.msgListener);
429
- // }
363
+ mockListeners: {
364
+ 'luigi.navigation.pathExists': (event) => {
365
+ const mockData = window.sessionStorage.getItem('luigiMockData');
366
+ let mockDataParsed = mockData ? JSON.parse(mockData) : undefined;
367
+ const inputPath = event.data.data.link;
368
+ const pathExists = mockDataParsed && mockDataParsed.pathExists && mockDataParsed.pathExists[inputPath];
369
+ const response = {
370
+ msg: 'luigi.navigation.pathExists.answer',
371
+ data: {
372
+ correlationId: event.data.data.id,
373
+ pathExists: pathExists ? pathExists : false
374
+ },
375
+ emulated: true
376
+ };
377
+ window.postMessage(response, '*');
378
+ },
379
+ //ux
380
+ 'luigi.ux.confirmationModal.show': (event) => {
381
+ const response = {
382
+ msg: 'luigi.ux.confirmationModal.hide',
383
+ data: event.data,
384
+ emulated: true
385
+ };
386
+ window.postMessage(response, '*');
387
+ },
388
+ 'luigi.ux.alert.show': (event) => {
389
+ const response = {
390
+ msg: 'luigi.ux.alert.hide',
391
+ data: event.data,
392
+ emulated: true
393
+ };
394
+ window.postMessage(response, '*');
395
+ },
396
+ 'luigi.ux.set-current-locale': (event) => {
397
+ const response = {
398
+ msg: 'luigi.current-locale-changed',
399
+ currentLocale: event.data.data.currentLocale,
400
+ emulated: true
401
+ };
402
+ window.postMessage(response, '*');
403
+ },
404
+ // linkManager
405
+ 'luigi.navigation.open': (event) => {
406
+ const response = {
407
+ msg: 'luigi.navigate.ok',
408
+ data: event.data,
409
+ emulated: true
410
+ };
411
+ window.postMessage(response, '*');
412
+ },
413
+ 'luigi.navigation.splitview.close': (event) => {
414
+ const response = {
415
+ msg: 'luigi.navigate.ok',
416
+ data: event.data,
417
+ emulated: true
418
+ };
419
+ window.postMessage(response, '*');
420
+ },
421
+ 'luigi.navigation.splitview.collapse': (event) => {
422
+ const response = {
423
+ msg: 'luigi.navigate.ok',
424
+ data: event.data,
425
+ emulated: true
426
+ };
427
+ window.postMessage(response, '*');
428
+ },
429
+ 'luigi.navigation.splitview.expand': (event) => {
430
+ const response = {
431
+ msg: 'luigi.navigate.ok',
432
+ data: event.data,
433
+ emulated: true
434
+ };
435
+ window.postMessage(response, '*');
436
+ },
437
+ // storage
438
+ storage: () => { }
439
+ }
440
+ };
441
+ // Listen to the global 'message' event of the window object
442
+ window.addEventListener('message', window.luigiMockEnvironment.msgListener);
443
+ }
430
444
  });
431
445
  }
432
446
  /*
@@ -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 { OperatorFunction, PartialObserver, Subscription } from 'rxjs';\nimport { convertToParamMap, NavigationEnd, ParamMap, Router, RouterEvent } from '@angular/router';\nimport { linkManager, uxManager } from '@luigi-project/client';\nimport { filter } from 'rxjs/operators';\nimport { LuigiActivatedRouteSnapshotHelper } from '../route/luigi-activated-route-snapshot-helper';\nimport { LuigiContextService } from './luigi-context-service';\nimport { ActivatedRouteSnapshot } from '@angular/router';\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) {\n const ux = uxManager();\n let lm = linkManager().withoutSync();\n let route: string | undefined;\n\n if (current.data.luigiRoute) {\n route = current.data.luigiRoute;\n\n if (current.params) {\n const pmap: ParamMap = convertToParamMap(current.params);\n pmap.keys.forEach(key => {\n const val = pmap.getAll(key).forEach(param => {\n route = route?.replace(':' + key, param);\n });\n });\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 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 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 // Add a hook to the post message api to mock the LuigiCore response to the Client\n public static initPostMessageHook() {\n return async (): Promise<void> => {\n console.log('luigiMockModule sapluigi client-support-angular');\n // Check if Luigi Client is running standalone\n // if (window.parent === window) {\n console.debug('Detected standalone mode');\n\n // Check and skip if Luigi environment is already mocked\n if ((window as any).luigiMockEnvironment) {\n return;\n }\n\n // mock target origin\n console.log('(window as any).LuigiClient', (window as any).LuigiClient);\n if ((window as any).LuigiClient) {\n (window as any).LuigiClient.setTargetOrigin('*');\n }\n\n (window as any).luigiMockEnvironment = {\n msgListener: function (e: any) {\n console.log('msg starts with luigi. or storage', e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage'));\n if (e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage')) {\n console.debug('Luigi msg', e.data);\n\n if (e.data.msg === 'luigi.get-context') {\n window.postMessage(\n {\n msg: 'luigi.init',\n emulated: true,\n internal: {\n viewStackSize: 1\n },\n context: e.data.context\n },\n '*'\n );\n }\n\n // vizualise retrieved event data\n LuigiMockEngine.visualize(JSON.stringify(e.data));\n\n // Check and run mocked callback if it exists\n const mockListener = (window as any).luigiMockEnvironment.mockListeners[e.data.msg];\n if (mockListener) {\n mockListener(e);\n }\n }\n },\n mockListeners: {\n 'luigi.navigation.pathExists': (event: any) => {\n const mockData = window.sessionStorage.getItem('luigiMockData');\n let mockDataParsed = mockData ? JSON.parse(mockData) : undefined;\n const inputPath = event.data.data.link;\n const pathExists = mockDataParsed && mockDataParsed.pathExists && mockDataParsed.pathExists[inputPath];\n\n const response = {\n msg: 'luigi.navigation.pathExists.answer',\n data: {\n correlationId: event.data.data.id,\n pathExists: pathExists ? pathExists : false\n },\n emulated: true\n };\n window.postMessage(response, '*');\n },\n //ux\n 'luigi.ux.confirmationModal.show': (event: any) => {\n const response = {\n msg: 'luigi.ux.confirmationModal.hide',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.ux.alert.show': (event: any) => {\n const response = {\n msg: 'luigi.ux.alert.hide',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.ux.set-current-locale': (event: any) => {\n const response = {\n msg: 'luigi.current-locale-changed',\n currentLocale: event.data.data.currentLocale,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n // linkManager\n 'luigi.navigation.open': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.close': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.collapse': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.expand': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n // storage\n storage: () => { }\n }\n };\n\n // Listen to the global 'message' event of the window object\n window.addEventListener('message', (window as any).luigiMockEnvironment.msgListener);\n // }\n };\n }\n\n /*\n * This method takes a data object of type 'any' and vizualizes a simple container\n * which holds data that is useful for e2e testing.\n */\n public static visualize(data: string): void {\n let luigiVisualizationContainer: Element | null = document.querySelector('#luigi-debug-vis-cnt');\n // Construct element structure if not already constructed\n if (!luigiVisualizationContainer) {\n luigiVisualizationContainer = document.createElement('div');\n luigiVisualizationContainer.setAttribute('id', 'luigi-debug-vis-cnt');\n // Hide the added DOM element to avoid interferring/overlapping with other elements during testing.\n luigiVisualizationContainer.setAttribute('style', 'display:none');\n document.body.appendChild(luigiVisualizationContainer);\n }\n const line: HTMLDivElement = document.createElement('div');\n line.textContent = data;\n luigiVisualizationContainer.appendChild(line);\n }\n}\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,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,kECPlC,yCACA,EAAA,CAAA,CAAA;4FDMa,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,SAAS;+BACE,4BAA4B,EAAA,QAAA,EAAA,yCAAA,EAAA,CAAA;;;MEAlB,mBAAmB,CAAA;AAgBxC,CAAA;AAEW,IAAA,mBAGX;AAHD,CAAA,UAAY,kBAAkB,EAAA;IAC5B,kBAAA,CAAA,kBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,C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AI,GAAmB,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;AAC3D,QAAA,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC;AACxB,QAAA,2BAA2B,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;KAC/C;;6GAzJU,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAf,eAAe,EAAA,CAAA,CAAA;AAAf,eAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,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;4FAcU,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;iBACF,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 { ActivatedRouteSnapshot, NavigationEnd, ParamMap, Router, RouterEvent, convertToParamMap } from '@angular/router';\nimport { linkManager, uxManager } 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) {\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 // Add a hook to the post message api to mock the LuigiCore response to the Client\n public static initPostMessageHook() {\n return async (): Promise<void> => {\n // Check if Luigi Client is running standalone\n if (window.parent === window) {\n console.debug('Detected standalone mode');\n\n // Check and skip if Luigi environment is already mocked\n if ((window as any).luigiMockEnvironment) {\n return;\n }\n\n // mock target origin\n if ((window as any).LuigiClient) {\n (window as any).LuigiClient.setTargetOrigin('*');\n }\n\n (window as any).luigiMockEnvironment = {\n msgListener: function(e: any) {\n if (e.data.msg && (e.data.msg.startsWith('luigi.') || e.data.msg === 'storage')) {\n console.debug('Luigi msg', e.data);\n\n if (e.data.msg === 'luigi.get-context') {\n window.postMessage(\n {\n msg: 'luigi.init',\n emulated: true,\n internal: {\n viewStackSize: 1\n },\n context: e.data.context\n },\n '*'\n );\n }\n\n // vizualise retrieved event data\n LuigiMockEngine.visualize(JSON.stringify(e.data));\n\n // Check and run mocked callback if it exists\n const mockListener = (window as any).luigiMockEnvironment.mockListeners[e.data.msg];\n if (mockListener) {\n mockListener(e);\n }\n }\n },\n mockListeners: {\n 'luigi.navigation.pathExists': (event: any) => {\n const mockData = window.sessionStorage.getItem('luigiMockData');\n let mockDataParsed = mockData ? JSON.parse(mockData) : undefined;\n const inputPath = event.data.data.link;\n const pathExists = mockDataParsed && mockDataParsed.pathExists && mockDataParsed.pathExists[inputPath];\n\n const response = {\n msg: 'luigi.navigation.pathExists.answer',\n data: {\n correlationId: event.data.data.id,\n pathExists: pathExists ? pathExists : false\n },\n emulated: true\n };\n window.postMessage(response, '*');\n },\n //ux\n 'luigi.ux.confirmationModal.show': (event: any) => {\n const response = {\n msg: 'luigi.ux.confirmationModal.hide',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.ux.alert.show': (event: any) => {\n const response = {\n msg: 'luigi.ux.alert.hide',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.ux.set-current-locale': (event: any) => {\n const response = {\n msg: 'luigi.current-locale-changed',\n currentLocale: event.data.data.currentLocale,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n // linkManager\n 'luigi.navigation.open': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.close': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.collapse': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n 'luigi.navigation.splitview.expand': (event: any) => {\n const response = {\n msg: 'luigi.navigate.ok',\n data: event.data,\n emulated: true\n };\n window.postMessage(response, '*');\n },\n // storage\n storage: () => {}\n }\n };\n\n // Listen to the global 'message' event of the window object\n window.addEventListener('message', (window as any).luigiMockEnvironment.msgListener);\n }\n };\n }\n\n /*\n * This method takes a data object of type 'any' and vizualizes a simple container\n * which holds data that is useful for e2e testing.\n */\n public static visualize(data: string): void {\n let luigiVisualizationContainer: Element | null = document.querySelector('#luigi-debug-vis-cnt');\n // Construct element structure if not already constructed\n if (!luigiVisualizationContainer) {\n luigiVisualizationContainer = document.createElement('div');\n luigiVisualizationContainer.setAttribute('id', 'luigi-debug-vis-cnt');\n // Hide the added DOM element to avoid interferring/overlapping with other elements during testing.\n luigiVisualizationContainer.setAttribute('style', 'display:none');\n document.body.appendChild(luigiVisualizationContainer);\n }\n const line: HTMLDivElement = document.createElement('div');\n line.textContent = data;\n luigiVisualizationContainer.appendChild(line);\n }\n}\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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