@wolkabout/commons 0.0.12 → 0.0.14
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.
|
@@ -66,7 +66,7 @@ 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
68
|
import { InjectionToken, inject, Injectable, Injector, runInInjectionContext, 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
|
-
import { BehaviorSubject, catchError, of, switchMap, EMPTY, tap, filter, map, combineLatestWith, from,
|
|
69
|
+
import { BehaviorSubject, catchError, of, switchMap, EMPTY, tap, filter, map, combineLatestWith, 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';
|
|
72
72
|
import { takeUntilDestroyed, toSignal } from '@angular/core/rxjs-interop';
|
|
@@ -431,7 +431,16 @@ class FeatureRegistry {
|
|
|
431
431
|
console.info('Loaded feature: ', feature.name);
|
|
432
432
|
}
|
|
433
433
|
loadExternalFeatures(features) {
|
|
434
|
-
|
|
434
|
+
features.forEach((feature) => {
|
|
435
|
+
console.log('Loading external module: ', feature.remote + '/' + feature.feature);
|
|
436
|
+
from(loadRemoteModule(feature.remote, feature.feature)).pipe(map(module => {
|
|
437
|
+
console.log('Received', module);
|
|
438
|
+
return module.default;
|
|
439
|
+
}), catchError((error) => {
|
|
440
|
+
console.warn("Unable to load: ", feature.remote + '/' + feature.feature, error);
|
|
441
|
+
return of(null);
|
|
442
|
+
}), filter((feature) => !!feature)).subscribe((feature) => this.registerFeature(feature));
|
|
443
|
+
});
|
|
435
444
|
}
|
|
436
445
|
get features$() {
|
|
437
446
|
return this._features$.asObservable();
|