@ama-mfe/ng-utils 14.5.0-prerelease.3 → 14.5.0-prerelease.31
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.
|
@@ -58,10 +58,10 @@ class ConnectDirective {
|
|
|
58
58
|
});
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
62
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
61
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConnectDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
62
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: ConnectDirective, isStandalone: true, selector: "iframe[connect]", inputs: { connect: { classPropertyName: "connect", publicName: "connect", isSignal: true, isRequired: true, transformFunction: null }, src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "src": "this.srcAttr" } }, ngImport: i0 }); }
|
|
63
63
|
}
|
|
64
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
64
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConnectDirective, decorators: [{
|
|
65
65
|
type: Directive,
|
|
66
66
|
args: [{
|
|
67
67
|
selector: 'iframe[connect]',
|
|
@@ -143,10 +143,10 @@ class ProducerManagerService {
|
|
|
143
143
|
}
|
|
144
144
|
return handlersPresent;
|
|
145
145
|
}
|
|
146
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
147
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
146
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProducerManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
147
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProducerManagerService, providedIn: 'root' }); }
|
|
148
148
|
}
|
|
149
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ProducerManagerService, decorators: [{
|
|
150
150
|
type: Injectable,
|
|
151
151
|
args: [{
|
|
152
152
|
providedIn: 'root'
|
|
@@ -267,16 +267,52 @@ class ConsumerManagerService {
|
|
|
267
267
|
return consumers.filter((c) => c !== consumer);
|
|
268
268
|
});
|
|
269
269
|
}
|
|
270
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
271
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
270
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConsumerManagerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
271
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConsumerManagerService, providedIn: 'root' }); }
|
|
272
272
|
}
|
|
273
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ConsumerManagerService, decorators: [{
|
|
274
274
|
type: Injectable,
|
|
275
275
|
args: [{
|
|
276
276
|
providedIn: 'root'
|
|
277
277
|
}]
|
|
278
278
|
}], ctorParameters: () => [] });
|
|
279
279
|
|
|
280
|
+
/**
|
|
281
|
+
* An abstract base class for message consumers that provides common functionality for registering and unregistering with the ConsumerManagerService.
|
|
282
|
+
*
|
|
283
|
+
* This class implements the MessageConsumer interface and provides a default implementation for the start and stop methods.
|
|
284
|
+
* It also handles the automatic registration and unregistration of the consumer with the ConsumerManagerService when the service is created and destroyed.
|
|
285
|
+
*
|
|
286
|
+
* To use this class, simply extend it and implement the required properties (type and supportedVersions) and any additional logic needed to consume messages.
|
|
287
|
+
*/
|
|
288
|
+
class AbstractMessageConsumer {
|
|
289
|
+
/**
|
|
290
|
+
* Creates an instance of AbstractMessageConsumer and optionally starts it.
|
|
291
|
+
* @param autoStart If true, the consumer will be started immediately after creation. Defaults to true.
|
|
292
|
+
*/
|
|
293
|
+
constructor(autoStart = true) {
|
|
294
|
+
/** The service used to register the consumer */
|
|
295
|
+
this.consumerManagerService = inject(ConsumerManagerService);
|
|
296
|
+
/** The reference used to handle the destruction of the consumer */
|
|
297
|
+
this.destroyRef = inject(DestroyRef);
|
|
298
|
+
if (autoStart) {
|
|
299
|
+
this.start();
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
/** @inheritdoc */
|
|
303
|
+
start() {
|
|
304
|
+
this.consumerManagerService.register(this);
|
|
305
|
+
this.unregisterCallback?.();
|
|
306
|
+
this.unregisterCallback = this.destroyRef.onDestroy(() => this.stop());
|
|
307
|
+
}
|
|
308
|
+
/** @inheritdoc */
|
|
309
|
+
stop() {
|
|
310
|
+
this.consumerManagerService.unregister(this);
|
|
311
|
+
this.unregisterCallback?.();
|
|
312
|
+
this.unregisterCallback = undefined;
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
|
|
280
316
|
/**
|
|
281
317
|
* Method to call in the constructor of a producer
|
|
282
318
|
* @note should be used in injection context
|
|
@@ -307,8 +343,9 @@ const registerConsumer = (consumer) => {
|
|
|
307
343
|
*
|
|
308
344
|
* This service listens for history messages and navigates accordingly.
|
|
309
345
|
*/
|
|
310
|
-
class HistoryConsumerService {
|
|
346
|
+
class HistoryConsumerService extends AbstractMessageConsumer {
|
|
311
347
|
constructor() {
|
|
348
|
+
super();
|
|
312
349
|
/**
|
|
313
350
|
* The type of messages this service handles.
|
|
314
351
|
*/
|
|
@@ -325,26 +362,11 @@ class HistoryConsumerService {
|
|
|
325
362
|
history.go(message.payload.delta);
|
|
326
363
|
}
|
|
327
364
|
};
|
|
328
|
-
this.consumerManagerService = inject(ConsumerManagerService);
|
|
329
|
-
this.start();
|
|
330
|
-
inject(DestroyRef).onDestroy(() => this.stop());
|
|
331
|
-
}
|
|
332
|
-
/**
|
|
333
|
-
* @inheritdoc
|
|
334
|
-
*/
|
|
335
|
-
start() {
|
|
336
|
-
this.consumerManagerService.register(this);
|
|
337
365
|
}
|
|
338
|
-
/**
|
|
339
|
-
|
|
340
|
-
*/
|
|
341
|
-
stop() {
|
|
342
|
-
this.consumerManagerService.unregister(this);
|
|
343
|
-
}
|
|
344
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: HistoryConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
345
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: HistoryConsumerService, providedIn: 'root' }); }
|
|
366
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: HistoryConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
367
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: HistoryConsumerService, providedIn: 'root' }); }
|
|
346
368
|
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
369
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: HistoryConsumerService, decorators: [{
|
|
348
370
|
type: Injectable,
|
|
349
371
|
args: [{
|
|
350
372
|
providedIn: 'root'
|
|
@@ -460,10 +482,10 @@ class HostInfoPipe {
|
|
|
460
482
|
return typeof url === 'string' ? moduleUrlStringyfied : this.domSanitizer.bypassSecurityTrustResourceUrl(moduleUrlStringyfied);
|
|
461
483
|
}
|
|
462
484
|
}
|
|
463
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
464
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
485
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: HostInfoPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
486
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: HostInfoPipe, isStandalone: true, name: "hostInfo" }); }
|
|
465
487
|
}
|
|
466
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
488
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: HostInfoPipe, decorators: [{
|
|
467
489
|
type: Pipe,
|
|
468
490
|
args: [{
|
|
469
491
|
name: 'hostInfo'
|
|
@@ -549,8 +571,9 @@ function provideConnection(connectionConfigOptions) {
|
|
|
549
571
|
/**
|
|
550
572
|
* This service listens for resize messages and updates the height of elements based on the received messages.
|
|
551
573
|
*/
|
|
552
|
-
class ResizeConsumerService {
|
|
574
|
+
class ResizeConsumerService extends AbstractMessageConsumer {
|
|
553
575
|
constructor() {
|
|
576
|
+
super();
|
|
554
577
|
this.newHeight = signal(undefined, ...(ngDevMode ? [{ debugName: "newHeight" }] : /* istanbul ignore next */ []));
|
|
555
578
|
/**
|
|
556
579
|
* A readonly signal that provides the new height information from the channel.
|
|
@@ -570,26 +593,11 @@ class ResizeConsumerService {
|
|
|
570
593
|
*/
|
|
571
594
|
'1.0': (message) => this.newHeight.set({ height: message.payload.height, channelId: message.from })
|
|
572
595
|
};
|
|
573
|
-
this.consumerManagerService = inject(ConsumerManagerService);
|
|
574
|
-
this.start();
|
|
575
|
-
inject(DestroyRef).onDestroy(() => this.stop());
|
|
576
|
-
}
|
|
577
|
-
/**
|
|
578
|
-
* Starts the resize handler service by registering it into the consumer manager service.
|
|
579
|
-
*/
|
|
580
|
-
start() {
|
|
581
|
-
this.consumerManagerService.register(this);
|
|
582
|
-
}
|
|
583
|
-
/**
|
|
584
|
-
* Stops the resize handler service by unregistering it from the consumer manager service.
|
|
585
|
-
*/
|
|
586
|
-
stop() {
|
|
587
|
-
this.consumerManagerService.unregister(this);
|
|
588
596
|
}
|
|
589
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
590
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
597
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
598
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeConsumerService, providedIn: 'root' }); }
|
|
591
599
|
}
|
|
592
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
600
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeConsumerService, decorators: [{
|
|
593
601
|
type: Injectable,
|
|
594
602
|
args: [{
|
|
595
603
|
providedIn: 'root'
|
|
@@ -723,10 +731,10 @@ class ScalableDirective {
|
|
|
723
731
|
this.renderer.setStyle(this.elem.nativeElement, 'min-height', `${height}px`);
|
|
724
732
|
}
|
|
725
733
|
}
|
|
726
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
727
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
734
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScalableDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
735
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: ScalableDirective, isStandalone: true, selector: "[scalable]", inputs: { connect: { classPropertyName: "connect", publicName: "connect", isSignal: true, isRequired: false, transformFunction: null }, scalable: { classPropertyName: "scalable", publicName: "scalable", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
728
736
|
}
|
|
729
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
737
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ScalableDirective, decorators: [{
|
|
730
738
|
type: Directive,
|
|
731
739
|
args: [{
|
|
732
740
|
selector: '[scalable]',
|
|
@@ -884,10 +892,10 @@ class ThemeProducerService {
|
|
|
884
892
|
this.logger.error('Error in theme service message', message);
|
|
885
893
|
this.revertToPreviousTheme();
|
|
886
894
|
}
|
|
887
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
888
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
895
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeProducerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
896
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeProducerService, providedIn: 'root' }); }
|
|
889
897
|
}
|
|
890
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
898
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeProducerService, decorators: [{
|
|
891
899
|
type: Injectable,
|
|
892
900
|
args: [{
|
|
893
901
|
providedIn: 'root'
|
|
@@ -920,10 +928,10 @@ class ApplyTheme {
|
|
|
920
928
|
}
|
|
921
929
|
return undefined;
|
|
922
930
|
}
|
|
923
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
924
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
931
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplyTheme, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
932
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: ApplyTheme, isStandalone: true, name: "applyTheme" }); }
|
|
925
933
|
}
|
|
926
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ApplyTheme, decorators: [{
|
|
927
935
|
type: Pipe,
|
|
928
936
|
args: [{
|
|
929
937
|
name: 'applyTheme'
|
|
@@ -952,10 +960,10 @@ class SandboxDirective {
|
|
|
952
960
|
ngOnInit() {
|
|
953
961
|
this.renderer.setAttribute(this.elementRef.nativeElement, 'sandbox', this.mfeSandbox());
|
|
954
962
|
}
|
|
955
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
956
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
963
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SandboxDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
964
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: SandboxDirective, isStandalone: true, selector: "iframe[mfeSandbox]", inputs: { mfeSandbox: { classPropertyName: "mfeSandbox", publicName: "mfeSandbox", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
957
965
|
}
|
|
958
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
966
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: SandboxDirective, decorators: [{
|
|
959
967
|
type: Directive,
|
|
960
968
|
args: [{
|
|
961
969
|
selector: 'iframe[mfeSandbox]'
|
|
@@ -988,10 +996,10 @@ class IframeEmbedComponent {
|
|
|
988
996
|
*/
|
|
989
997
|
this.sandbox = input('allow-scripts allow-same-origin', ...(ngDevMode ? [{ debugName: "sandbox" }] : /* istanbul ignore next */ []));
|
|
990
998
|
}
|
|
991
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
992
|
-
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.
|
|
999
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IframeEmbedComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1000
|
+
/** @nocollapse */ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.17", type: IframeEmbedComponent, isStandalone: true, selector: "mfe-iframe-embed", inputs: { src: { classPropertyName: "src", publicName: "src", isSignal: true, isRequired: true, transformFunction: null }, moduleId: { classPropertyName: "moduleId", publicName: "moduleId", isSignal: true, isRequired: true, transformFunction: null }, hostApplicationId: { classPropertyName: "hostApplicationId", publicName: "hostApplicationId", isSignal: true, isRequired: true, transformFunction: null }, sandbox: { classPropertyName: "sandbox", publicName: "sandbox", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@let hostInfoOptions = {hostId: hostApplicationId(), moduleId: moduleId()};\n<iframe\n [connect]=\"hostInfoOptions.moduleId\"\n scalable\n [src]=\"safeSrc() | hostInfo: hostInfoOptions | applyTheme\"\n [mfeSandbox]=\"sandbox()\">\n</iframe>\n", styles: ["mfe-iframe-embed iframe{height:100%;width:100%;display:block}\n"], dependencies: [{ kind: "directive", type: ConnectDirective, selector: "iframe[connect]", inputs: ["connect", "src"] }, { kind: "directive", type: ScalableDirective, selector: "[scalable]", inputs: ["connect", "scalable"] }, { kind: "directive", type: SandboxDirective, selector: "iframe[mfeSandbox]", inputs: ["mfeSandbox"] }, { kind: "pipe", type: ApplyTheme, name: "applyTheme" }, { kind: "pipe", type: HostInfoPipe, name: "hostInfo" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
993
1001
|
}
|
|
994
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1002
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IframeEmbedComponent, decorators: [{
|
|
995
1003
|
type: Component,
|
|
996
1004
|
args: [{ selector: 'mfe-iframe-embed', imports: [
|
|
997
1005
|
ConnectDirective,
|
|
@@ -1007,8 +1015,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1007
1015
|
*
|
|
1008
1016
|
* This service listens for navigation messages and updates the router state accordingly.
|
|
1009
1017
|
*/
|
|
1010
|
-
class NavigationConsumerService {
|
|
1018
|
+
class NavigationConsumerService extends AbstractMessageConsumer {
|
|
1011
1019
|
constructor() {
|
|
1020
|
+
super();
|
|
1012
1021
|
this.router = inject(Router);
|
|
1013
1022
|
this.activeRoute = inject(ActivatedRoute);
|
|
1014
1023
|
this.requestedUrl = new Subject();
|
|
@@ -1046,9 +1055,6 @@ class NavigationConsumerService {
|
|
|
1046
1055
|
this.navigate(message.payload.url, message.payload.extras);
|
|
1047
1056
|
}
|
|
1048
1057
|
};
|
|
1049
|
-
this.consumerManagerService = inject(ConsumerManagerService);
|
|
1050
|
-
this.start();
|
|
1051
|
-
inject(DestroyRef).onDestroy(() => this.stop());
|
|
1052
1058
|
}
|
|
1053
1059
|
/**
|
|
1054
1060
|
* Parses a URL and returns an object containing the paths and query parameters.
|
|
@@ -1076,22 +1082,10 @@ class NavigationConsumerService {
|
|
|
1076
1082
|
replaceUrl: extras?.replaceUrl
|
|
1077
1083
|
});
|
|
1078
1084
|
}
|
|
1079
|
-
/**
|
|
1080
|
-
|
|
1081
|
-
*/
|
|
1082
|
-
start() {
|
|
1083
|
-
this.consumerManagerService.register(this);
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
* @inheritdoc
|
|
1087
|
-
*/
|
|
1088
|
-
stop() {
|
|
1089
|
-
this.consumerManagerService.unregister(this);
|
|
1090
|
-
}
|
|
1091
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: NavigationConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1092
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.15", ngImport: i0, type: NavigationConsumerService, providedIn: 'root' }); }
|
|
1085
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1086
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationConsumerService, providedIn: 'root' }); }
|
|
1093
1087
|
}
|
|
1094
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1088
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: NavigationConsumerService, decorators: [{
|
|
1095
1089
|
type: Injectable,
|
|
1096
1090
|
args: [{
|
|
1097
1091
|
providedIn: 'root'
|
|
@@ -1134,10 +1128,10 @@ class RouteMemorizeService {
|
|
|
1134
1128
|
getRoute(channelId) {
|
|
1135
1129
|
return this.routeStack[channelId];
|
|
1136
1130
|
}
|
|
1137
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1138
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1131
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RouteMemorizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1132
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RouteMemorizeService, providedIn: 'root' }); }
|
|
1139
1133
|
}
|
|
1140
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1134
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RouteMemorizeService, decorators: [{
|
|
1141
1135
|
type: Injectable,
|
|
1142
1136
|
args: [{
|
|
1143
1137
|
providedIn: 'root'
|
|
@@ -1185,10 +1179,10 @@ class RestoreRoute {
|
|
|
1185
1179
|
return typeof url === 'string' ? moduleUrlStringyfied : this.domSanitizer.bypassSecurityTrustResourceUrl(moduleUrlStringyfied);
|
|
1186
1180
|
}
|
|
1187
1181
|
}
|
|
1188
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1189
|
-
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.
|
|
1182
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RestoreRoute, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1183
|
+
/** @nocollapse */ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.17", ngImport: i0, type: RestoreRoute, isStandalone: true, name: "restoreRoute" }); }
|
|
1190
1184
|
}
|
|
1191
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RestoreRoute, decorators: [{
|
|
1192
1186
|
type: Pipe,
|
|
1193
1187
|
args: [{
|
|
1194
1188
|
name: 'restoreRoute'
|
|
@@ -1242,10 +1236,10 @@ class RouteMemorizeDirective {
|
|
|
1242
1236
|
}
|
|
1243
1237
|
});
|
|
1244
1238
|
}
|
|
1245
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1246
|
-
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.
|
|
1239
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RouteMemorizeDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1240
|
+
/** @nocollapse */ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.17", type: RouteMemorizeDirective, isStandalone: true, selector: "iframe[memorizeRoute]", inputs: { memorizeRoute: { classPropertyName: "memorizeRoute", publicName: "memorizeRoute", isSignal: true, isRequired: false, transformFunction: null }, memorizeRouteId: { classPropertyName: "memorizeRouteId", publicName: "memorizeRouteId", isSignal: true, isRequired: false, transformFunction: null }, memorizeMaxAge: { classPropertyName: "memorizeMaxAge", publicName: "memorizeMaxAge", isSignal: true, isRequired: false, transformFunction: null }, memorizeRouteMaxAge: { classPropertyName: "memorizeRouteMaxAge", publicName: "memorizeRouteMaxAge", isSignal: true, isRequired: false, transformFunction: null }, connect: { classPropertyName: "connect", publicName: "connect", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
|
|
1247
1241
|
}
|
|
1248
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RouteMemorizeDirective, decorators: [{
|
|
1249
1243
|
type: Directive,
|
|
1250
1244
|
args: [{
|
|
1251
1245
|
selector: 'iframe[memorizeRoute]',
|
|
@@ -1359,10 +1353,10 @@ class RoutingService {
|
|
|
1359
1353
|
}
|
|
1360
1354
|
});
|
|
1361
1355
|
}
|
|
1362
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1363
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1356
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RoutingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1357
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RoutingService, providedIn: 'root' }); }
|
|
1364
1358
|
}
|
|
1365
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1359
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: RoutingService, decorators: [{
|
|
1366
1360
|
type: Injectable,
|
|
1367
1361
|
args: [{
|
|
1368
1362
|
providedIn: 'root'
|
|
@@ -1409,10 +1403,10 @@ class ResizeService {
|
|
|
1409
1403
|
});
|
|
1410
1404
|
afterNextRender(() => this.resizeObserver?.observe(document.body));
|
|
1411
1405
|
}
|
|
1412
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1413
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1406
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1407
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeService, providedIn: 'root' }); }
|
|
1414
1408
|
}
|
|
1415
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ResizeService, decorators: [{
|
|
1416
1410
|
type: Injectable,
|
|
1417
1411
|
args: [{
|
|
1418
1412
|
providedIn: 'root'
|
|
@@ -1422,10 +1416,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1422
1416
|
/**
|
|
1423
1417
|
* A service that handles theme messages and applies the received theme.
|
|
1424
1418
|
*/
|
|
1425
|
-
class ThemeConsumerService {
|
|
1419
|
+
class ThemeConsumerService extends AbstractMessageConsumer {
|
|
1426
1420
|
constructor() {
|
|
1421
|
+
super();
|
|
1427
1422
|
this.domSanitizer = inject(DomSanitizer);
|
|
1428
|
-
this.consumerManagerService = inject(ConsumerManagerService);
|
|
1429
1423
|
this.logger = inject(LoggerService);
|
|
1430
1424
|
/**
|
|
1431
1425
|
* The type of messages this service handles ('theme').
|
|
@@ -1453,25 +1447,11 @@ class ThemeConsumerService {
|
|
|
1453
1447
|
}
|
|
1454
1448
|
}
|
|
1455
1449
|
};
|
|
1456
|
-
this.start();
|
|
1457
|
-
inject(DestroyRef).onDestroy(() => this.stop());
|
|
1458
|
-
}
|
|
1459
|
-
/**
|
|
1460
|
-
* Starts the theme handler service by registering it into the consumer manager service.
|
|
1461
|
-
*/
|
|
1462
|
-
start() {
|
|
1463
|
-
this.consumerManagerService.register(this);
|
|
1464
|
-
}
|
|
1465
|
-
/**
|
|
1466
|
-
* Stops the theme handler service by unregistering it from the consumer manager service.
|
|
1467
|
-
*/
|
|
1468
|
-
stop() {
|
|
1469
|
-
this.consumerManagerService.unregister(this);
|
|
1470
1450
|
}
|
|
1471
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1472
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1451
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1452
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeConsumerService, providedIn: 'root' }); }
|
|
1473
1453
|
}
|
|
1474
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1454
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ThemeConsumerService, decorators: [{
|
|
1475
1455
|
type: Injectable,
|
|
1476
1456
|
args: [{
|
|
1477
1457
|
providedIn: 'root'
|
|
@@ -1644,10 +1624,10 @@ class IframeActivityTrackerService {
|
|
|
1644
1624
|
this.stopActivityInterval();
|
|
1645
1625
|
this.config = undefined;
|
|
1646
1626
|
}
|
|
1647
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1648
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1627
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IframeActivityTrackerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1628
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IframeActivityTrackerService, providedIn: 'root' }); }
|
|
1649
1629
|
}
|
|
1650
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1630
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: IframeActivityTrackerService, decorators: [{
|
|
1651
1631
|
type: Injectable,
|
|
1652
1632
|
args: [{
|
|
1653
1633
|
providedIn: 'root'
|
|
@@ -1824,10 +1804,10 @@ class ActivityProducerService {
|
|
|
1824
1804
|
this.lastEmitTimestamps.clear();
|
|
1825
1805
|
this.iframeActivityTracker.stop();
|
|
1826
1806
|
}
|
|
1827
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1828
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1807
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityProducerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1808
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityProducerService, providedIn: 'root' }); }
|
|
1829
1809
|
}
|
|
1830
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1810
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityProducerService, decorators: [{
|
|
1831
1811
|
type: Injectable,
|
|
1832
1812
|
args: [{
|
|
1833
1813
|
providedIn: 'root'
|
|
@@ -1880,10 +1860,10 @@ class ActivityConsumerService {
|
|
|
1880
1860
|
stop() {
|
|
1881
1861
|
this.consumerManagerService.unregister(this);
|
|
1882
1862
|
}
|
|
1883
|
-
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.
|
|
1884
|
-
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.
|
|
1863
|
+
/** @nocollapse */ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityConsumerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1864
|
+
/** @nocollapse */ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityConsumerService, providedIn: 'root' }); }
|
|
1885
1865
|
}
|
|
1886
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.
|
|
1866
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.17", ngImport: i0, type: ActivityConsumerService, decorators: [{
|
|
1887
1867
|
type: Injectable,
|
|
1888
1868
|
args: [{
|
|
1889
1869
|
providedIn: 'root'
|
|
@@ -1894,5 +1874,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.15", ngImpo
|
|
|
1894
1874
|
* Generated bundle index. Do not edit.
|
|
1895
1875
|
*/
|
|
1896
1876
|
|
|
1897
|
-
export { ACTIVITY_EVENTS, ActivityConsumerService, ActivityProducerService, ApplyTheme, ConnectDirective, ConsumerManagerService, DEFAULT_ACTIVITY_PRODUCER_CONFIG, ERROR_MESSAGE_TYPE, HIGH_FREQUENCY_EVENTS, HistoryConsumerService, HostInfoPipe, IFRAME_INTERACTION_EVENT, IframeActivityTrackerService, IframeEmbedComponent, KNOWN_MESSAGES, MFE_HOST_APPLICATION_ID_PARAM, MFE_HOST_URL_PARAM, MFE_MODULE_APPLICATION_ID_PARAM, NavigationConsumerService, ProducerManagerService, ResizeConsumerService, ResizeService, RestoreRoute, RouteMemorizeDirective, RouteMemorizeService, RoutingService, ScalableDirective, THEME_QUERY_PARAM_NAME, THEME_URL_SUFFIX, ThemeConsumerService, ThemeProducerService, VISIBILITY_CHANGE_EVENT, applyInitialTheme, applyTheme, downloadApplicationThemeCss, getAvailableConsumers, getDefaultClientEndpointStartOptions, getHostInfo, getStyle, hostQueryParams, isEmbedded, isErrorMessage, isUserActivityMessage, persistHostInfo, provideConnection, provideHistoryOverrides, registerConsumer, registerProducer, sendError };
|
|
1877
|
+
export { ACTIVITY_EVENTS, AbstractMessageConsumer, ActivityConsumerService, ActivityProducerService, ApplyTheme, ConnectDirective, ConsumerManagerService, DEFAULT_ACTIVITY_PRODUCER_CONFIG, ERROR_MESSAGE_TYPE, HIGH_FREQUENCY_EVENTS, HistoryConsumerService, HostInfoPipe, IFRAME_INTERACTION_EVENT, IframeActivityTrackerService, IframeEmbedComponent, KNOWN_MESSAGES, MFE_HOST_APPLICATION_ID_PARAM, MFE_HOST_URL_PARAM, MFE_MODULE_APPLICATION_ID_PARAM, NavigationConsumerService, ProducerManagerService, ResizeConsumerService, ResizeService, RestoreRoute, RouteMemorizeDirective, RouteMemorizeService, RoutingService, ScalableDirective, THEME_QUERY_PARAM_NAME, THEME_URL_SUFFIX, ThemeConsumerService, ThemeProducerService, VISIBILITY_CHANGE_EVENT, applyInitialTheme, applyTheme, downloadApplicationThemeCss, getAvailableConsumers, getDefaultClientEndpointStartOptions, getHostInfo, getStyle, hostQueryParams, isEmbedded, isErrorMessage, isUserActivityMessage, persistHostInfo, provideConnection, provideHistoryOverrides, registerConsumer, registerProducer, sendError };
|
|
1898
1878
|
//# sourceMappingURL=ama-mfe-ng-utils.mjs.map
|