@onecx/angular-accelerator 7.0.0-rc.11 → 7.0.0-rc.12

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.
@@ -450,13 +450,22 @@ class ManualBreadcrumbsTopic extends Topic {
450
450
  }
451
451
  }
452
452
  let BreadcrumbService = class BreadcrumbService {
453
+ get itemsSource$() {
454
+ this._itemSource$ ??= new ManualBreadcrumbsTopic();
455
+ return this._itemSource$;
456
+ }
457
+ set itemsSource$(source) {
458
+ this._itemSource$ = source;
459
+ }
460
+ get itemsHandler() {
461
+ this._itemsHandler ??= this.itemsSource$.pipe(map((manualBreadcrumbs) => manualBreadcrumbs.menuItems));
462
+ return this._itemsHandler;
463
+ }
453
464
  constructor() {
454
465
  this.router = inject(Router);
455
466
  this.activeRoute = inject(ActivatedRoute);
456
467
  this.translateService = inject(TranslateService);
457
- this.itemsSource$ = new ManualBreadcrumbsTopic();
458
468
  this.generatedItemsSource = new BehaviorSubject([]);
459
- this.itemsHandler = this.itemsSource$.pipe(map((manualBreadcrumbs) => manualBreadcrumbs.menuItems));
460
469
  this.generateBreadcrumbs(this.activeRoute.snapshot);
461
470
  this.router.events
462
471
  .pipe(untilDestroyed(this), filter((e) => e instanceof NavigationEnd))
@@ -465,6 +474,9 @@ let BreadcrumbService = class BreadcrumbService {
465
474
  this.generateBreadcrumbs(root);
466
475
  });
467
476
  }
477
+ ngOnDestroy() {
478
+ this._itemSource$?.destroy();
479
+ }
468
480
  generateBreadcrumbs(route) {
469
481
  if (route?.data['mfeInfo']) {
470
482
  const breadcrumbs = [
@@ -5486,11 +5498,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
5486
5498
  }] } });
5487
5499
 
5488
5500
  class PortalDialogService {
5501
+ get eventsTopic() {
5502
+ this._eventsTopic$ ??= new EventsTopic();
5503
+ return this._eventsTopic$;
5504
+ }
5505
+ set eventsTopic(source) {
5506
+ this._eventsTopic$ = source;
5507
+ }
5489
5508
  constructor() {
5490
5509
  this.dialogService = inject(DialogService);
5491
5510
  this.translateService = inject(TranslateService);
5492
5511
  this.router = inject(Router);
5493
- this.eventsTopic = new EventsTopic();
5494
5512
  this.skipStyleScoping = inject(SKIP_STYLE_SCOPING, { optional: true });
5495
5513
  this.remoteComponentConfig = inject(REMOTE_COMPONENT_CONFIG, { optional: true });
5496
5514
  this.appStateService = inject(AppStateService);
@@ -5510,7 +5528,7 @@ class PortalDialogService {
5510
5528
  }
5511
5529
  ngOnDestroy() {
5512
5530
  this.cleanupAndCloseDialog();
5513
- this.eventsTopic.destroy();
5531
+ this._eventsTopic$?.destroy();
5514
5532
  }
5515
5533
  openDialog(title, componentOrMessage, primaryButtonTranslationKeyOrDetails, secondaryButtonTranslationKeyOrDetails, extrasOrShowXButton = {}) {
5516
5534
  const dialogOptions = typeof extrasOrShowXButton === 'object'