@wolkabout/commons 0.0.7 → 0.0.8

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.
@@ -427,7 +427,7 @@ class FeatureRegistry {
427
427
  _features = new BehaviorSubject([]);
428
428
  registerFeature(feature) {
429
429
  runInInjectionContext(this.injector, () => feature.init?.());
430
- this._features.next([...this._features.value, feature]);
430
+ this._features.next([...this._features.value, feature].sort((a, b) => a.order - b.order));
431
431
  }
432
432
  loadExternalFeatures(features) {
433
433
  forkJoin(features.map(externalFeature => from(loadRemoteModule(externalFeature.remote, externalFeature.exposedModule)).pipe(map(module => module.default), catchError(() => of(null))))).pipe(map(list => list.filter((x) => x !== null))).subscribe((externalFeatures) => {
@@ -435,7 +435,7 @@ class FeatureRegistry {
435
435
  });
436
436
  }
437
437
  get features() {
438
- return this._features.pipe(map(features => [...features].sort((a, b) => a.order - b.order)));
438
+ return this._features.asObservable();
439
439
  }
440
440
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FeatureRegistry, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
441
441
  static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: FeatureRegistry, providedIn: 'root' });