@wolkabout/commons 0.0.44 → 0.0.45
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.
|
@@ -65,7 +65,7 @@ import { MatTabsModule } from '@angular/material/tabs';
|
|
|
65
65
|
import * as i32 from '@angular/cdk/drag-drop';
|
|
66
66
|
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
67
67
|
import * as i0 from '@angular/core';
|
|
68
|
-
import { NgModule, InjectionToken, inject, Injectable,
|
|
68
|
+
import { NgModule, InjectionToken, inject, Injectable, Injector, DOCUMENT, Inject, Input, Directive, forwardRef, HostListener, TemplateRef, PLATFORM_ID, Pipe, ViewChild, ContentChild, Optional, Self, Component, input, computed, untracked, signal, viewChild, afterNextRender, effect, output, afterRenderEffect, contentChild } from '@angular/core';
|
|
69
69
|
import { BehaviorSubject, catchError, of, switchMap, EMPTY, tap, filter, map, combineLatestWith, forkJoin, from, distinctUntilChanged, shareReplay, merge, Subject, takeUntil, combineLatest, take, first } from 'rxjs';
|
|
70
70
|
import { jwtDecode } from 'jwt-decode';
|
|
71
71
|
import { loadRemoteModule } from '@angular-architects/native-federation';
|
|
@@ -512,7 +512,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
|
|
|
512
512
|
}] });
|
|
513
513
|
|
|
514
514
|
class FeatureRegistry {
|
|
515
|
-
injector = inject(
|
|
515
|
+
injector = inject(Injector);
|
|
516
516
|
loadedFeatures = [];
|
|
517
517
|
_features$ = new BehaviorSubject([]);
|
|
518
518
|
/**
|
|
@@ -534,23 +534,18 @@ class FeatureRegistry {
|
|
|
534
534
|
console.warn("Unable to load: ", feature.remote + '/' + feature.feature, error);
|
|
535
535
|
return of(null);
|
|
536
536
|
})))).subscribe((results) => {
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
});
|
|
537
|
+
results.forEach((feature) => {
|
|
538
|
+
if (feature) {
|
|
539
|
+
this.registerFeature(feature);
|
|
540
|
+
}
|
|
543
541
|
});
|
|
544
542
|
this._features$.next([...this.loadedFeatures]);
|
|
545
543
|
});
|
|
546
544
|
}
|
|
547
545
|
registerFeature(feature) {
|
|
548
|
-
runInInjectionContext(this.injector, () => this.initiateFeature(feature));
|
|
549
|
-
}
|
|
550
|
-
initiateFeature(feature) {
|
|
551
546
|
this.loadedFeatures.push(feature);
|
|
552
547
|
if (feature.init) {
|
|
553
|
-
feature.init();
|
|
548
|
+
feature.init(this.injector);
|
|
554
549
|
}
|
|
555
550
|
console.info('Loaded feature: ', feature.name);
|
|
556
551
|
}
|