@porscheinformatik/clr-addons 19.6.1 → 19.6.2

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.
@@ -4369,6 +4369,7 @@ class ClrHistoryService {
4369
4369
  historySettings.push({ username: username, historyPinned: false });
4370
4370
  }
4371
4371
  this.cookieSettings$.next(historySettings);
4372
+ return historySettings.find(hSetting => hSetting.username === username);
4372
4373
  }
4373
4374
  setHistoryPinned(username, pin, domain) {
4374
4375
  const historySettings = this.getCookieByName(this.cookieNameSettings);
@@ -4539,13 +4540,15 @@ class ClrHistoryPinned {
4539
4540
  * The array of history elements to be displayed.
4540
4541
  */
4541
4542
  this.historyElements$ = new ReplaySubject(1);
4542
- this.active$ = new ReplaySubject(1);
4543
+ this.active$ = new BehaviorSubject(this.initActive());
4544
+ }
4545
+ initActive() {
4546
+ return this.historyService.initializeCookieSettings(this.username, this.domain).historyPinned;
4543
4547
  }
4544
4548
  ngOnInit() {
4545
4549
  this.historyService.getHistory(this.username, this.tenantId).subscribe(elements => {
4546
4550
  this.historyElements$.next(this.historyProvider ? this.historyProvider.getModifiedHistoryEntries(elements) : elements);
4547
4551
  });
4548
- this.historyService.initializeCookieSettings(this.username, this.domain);
4549
4552
  this.settingsSubscription = this.historyService.cookieSettings$.subscribe(settings => {
4550
4553
  const setting = settings.find(setting => setting.username === this.username);
4551
4554
  this.active$.next(setting?.historyPinned);
@@ -4556,11 +4559,11 @@ class ClrHistoryPinned {
4556
4559
  this.settingsSubscription.unsubscribe();
4557
4560
  }
4558
4561
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ClrHistoryPinned, deps: [{ token: ClrHistoryService }, { token: HISTORY_PROVIDER, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4559
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ClrHistoryPinned, isStandalone: false, selector: "clr-history-pinned", inputs: { username: ["clrUsername", "username"], tenantId: ["clrTenantId", "tenantId"], context: ["clrContext", "context"], domain: ["clrDomain", "domain"] }, ngImport: i0, template: "<div [ngClass]=\"{'history-container-pinned': active$ | async}\"></div>\n<nav\n aria-label=\"history\"\n class=\"history-container\"\n *ngIf=\"(active$ | async) && (historyElements$ | async) as historyElements\"\n>\n <ol class=\"history\">\n <ng-container *ngFor=\"let historyItem of historyElements\">\n <li *ngIf=\"historyItem.url\" class=\"history-item\">\n <a [href]=\"historyItem.url\">{{ historyItem.title }}</a>\n </li>\n </ng-container>\n </ol>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
4562
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ClrHistoryPinned, isStandalone: false, selector: "clr-history-pinned", inputs: { username: ["clrUsername", "username"], tenantId: ["clrTenantId", "tenantId"], context: ["clrContext", "context"], domain: ["clrDomain", "domain"] }, ngImport: i0, template: "<div class=\"history-container-pinned\" *ngIf=\"(active$ | async)\"></div>\n<nav\n aria-label=\"history\"\n class=\"history-container\"\n *ngIf=\"(active$ | async) && (historyElements$ | async) as historyElements\"\n>\n <ol class=\"history\">\n <ng-container *ngFor=\"let historyItem of historyElements\">\n <li *ngIf=\"historyItem.url\" class=\"history-item\">\n <a [href]=\"historyItem.url\">{{ historyItem.title }}</a>\n </li>\n </ng-container>\n </ol>\n</nav>\n", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
4560
4563
  }
4561
4564
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ClrHistoryPinned, decorators: [{
4562
4565
  type: Component,
4563
- args: [{ selector: 'clr-history-pinned', standalone: false, template: "<div [ngClass]=\"{'history-container-pinned': active$ | async}\"></div>\n<nav\n aria-label=\"history\"\n class=\"history-container\"\n *ngIf=\"(active$ | async) && (historyElements$ | async) as historyElements\"\n>\n <ol class=\"history\">\n <ng-container *ngFor=\"let historyItem of historyElements\">\n <li *ngIf=\"historyItem.url\" class=\"history-item\">\n <a [href]=\"historyItem.url\">{{ historyItem.title }}</a>\n </li>\n </ng-container>\n </ol>\n</nav>\n" }]
4566
+ args: [{ selector: 'clr-history-pinned', standalone: false, template: "<div class=\"history-container-pinned\" *ngIf=\"(active$ | async)\"></div>\n<nav\n aria-label=\"history\"\n class=\"history-container\"\n *ngIf=\"(active$ | async) && (historyElements$ | async) as historyElements\"\n>\n <ol class=\"history\">\n <ng-container *ngFor=\"let historyItem of historyElements\">\n <li *ngIf=\"historyItem.url\" class=\"history-item\">\n <a [href]=\"historyItem.url\">{{ historyItem.title }}</a>\n </li>\n </ng-container>\n </ol>\n</nav>\n" }]
4564
4567
  }], ctorParameters: () => [{ type: ClrHistoryService }, { type: HistoryProvider, decorators: [{
4565
4568
  type: Inject,
4566
4569
  args: [HISTORY_PROVIDER]