@wolkabout/commons 0.0.11 → 0.0.13

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, forkJoin, from, distinctUntilChanged, shareReplay, merge, Subject, takeUntil, combineLatest, take, first } from 'rxjs';
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';
@@ -428,10 +428,12 @@ class FeatureRegistry {
428
428
  registerFeature(feature) {
429
429
  runInInjectionContext(this.injector, () => feature.init?.());
430
430
  this._features$.next([...this._features$.value, feature].sort((a, b) => a.order - b.order));
431
+ console.info('Loaded feature: ', feature.name);
431
432
  }
432
433
  loadExternalFeatures(features) {
433
- forkJoin(features.map(externalFeature => from(loadRemoteModule(externalFeature.remote, externalFeature.feature)).pipe(map(module => module.default), catchError(() => of(null))))).pipe(map(list => list.filter((x) => x !== null))).subscribe((externalFeatures) => {
434
- externalFeatures.forEach(feature => this.registerFeature(feature));
434
+ features.forEach((feature) => {
435
+ console.log('Loading external module: ', feature.remote + '/' + feature.feature);
436
+ from(loadRemoteModule(feature.remote, feature.feature)).pipe(map(module => module.default), catchError(() => of(null)), filter((feature) => !!feature)).subscribe((feature) => this.registerFeature(feature));
435
437
  });
436
438
  }
437
439
  get features$() {