@dereekb/dbx-web 9.23.7 → 9.23.9

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.
@@ -2829,6 +2829,7 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2829
2829
  this.navAlign = 'center';
2830
2830
  this._icon = new BehaviorSubject(undefined);
2831
2831
  this._defaultIcon = new BehaviorSubject('menu');
2832
+ this._defaultText = new BehaviorSubject(undefined);
2832
2833
  this._inputMode = new BehaviorSubject(undefined);
2833
2834
  this._breakpoint = new BehaviorSubject('large');
2834
2835
  this._anchors = new BehaviorSubject([]);
@@ -2848,16 +2849,16 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2848
2849
  }), tapDetectChanges(this.cdRef), shareReplay(1));
2849
2850
  this.selectedAnchor$ = this.anchors$.pipe(map((x) => x.find((y) => y.selected)));
2850
2851
  this.hasNoAnchors$ = this.anchors$.pipe(map((x) => x.length === 0), distinctUntilChanged(), shareReplay(1));
2851
- this.buttonDisplay$ = combineLatest([this._defaultIcon, this._icon, this.selectedAnchor$, this.mode$]).pipe(map(([defaultIcon, icon, selectedAmchor, mode]) => {
2852
+ this.buttonDisplay$ = combineLatest([this._defaultIcon, this._icon, this._defaultText, this.selectedAnchor$, this.mode$]).pipe(map(([defaultIcon, icon, defaultText, selectedAnchor, mode]) => {
2852
2853
  let content;
2853
2854
  if (icon) {
2854
- content = { icon };
2855
+ content = { icon, text: defaultText };
2855
2856
  }
2856
- else if (selectedAmchor) {
2857
- content = { icon: selectedAmchor.anchor.icon ?? this._defaultIcon.value, text: selectedAmchor.anchor.title };
2857
+ else if (selectedAnchor) {
2858
+ content = { icon: selectedAnchor.anchor.icon ?? defaultIcon, text: selectedAnchor.anchor.title };
2858
2859
  }
2859
2860
  else {
2860
- content = { icon: this._defaultIcon.value ?? 'menu' };
2861
+ content = { icon: defaultIcon ?? 'menu', text: defaultText };
2861
2862
  }
2862
2863
  if (mode === 'icon') {
2863
2864
  return { icon: content.icon };
@@ -2870,6 +2871,7 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2870
2871
  ngOnDestroy() {
2871
2872
  this._icon.complete();
2872
2873
  this._defaultIcon.complete();
2874
+ this._defaultText.complete();
2873
2875
  this._inputMode.complete();
2874
2876
  this._breakpoint.complete();
2875
2877
  this._anchors.complete();
@@ -2881,6 +2883,9 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2881
2883
  set defaultIcon(defaultIcon) {
2882
2884
  this._defaultIcon.next(defaultIcon);
2883
2885
  }
2886
+ set defaultText(defaultText) {
2887
+ this._defaultText.next(defaultText);
2888
+ }
2884
2889
  set anchors(anchors) {
2885
2890
  this._anchors.next(anchors ?? []);
2886
2891
  }
@@ -2892,7 +2897,7 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2892
2897
  }
2893
2898
  }
2894
2899
  DbxNavbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxNavbarComponent, deps: [{ token: i1$2.DbxRouterTransitionService }, { token: i0.ChangeDetectorRef }, { token: DbxScreenMediaService }, { token: i1$2.DbxRouterService }], target: i0.ɵɵFactoryTarget.Component });
2895
- DbxNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxNavbarComponent, selector: "dbx-navbar", inputs: { navAlign: "navAlign", icon: "icon", defaultIcon: "defaultIcon", anchors: "anchors", mode: "mode", breakpoint: "breakpoint" }, host: { classAttribute: "dbx-navbar" }, usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"mode$ | async\">\n <!-- Button -->\n <ng-container *ngSwitchDefault>\n <dbx-icon-button class=\"nav-menu-button\" aria-label=\"open navigation\" [buttonDisplay]=\"buttonDisplay$ | async\" [matMenuTriggerFor]=\"menu\" [disabled]=\"hasNoAnchors$ | async\"></dbx-icon-button>\n <mat-menu #menu>\n <dbx-anchor *ngFor=\"let x of anchors$ | async\" [anchor]=\"x.anchor\">\n <button mat-menu-item [ngClass]=\"x.selected ? 'active' : ''\">\n <mat-icon *ngIf=\"x.anchor.icon\">{{ x.anchor.icon }}</mat-icon>\n {{ x.anchor.title }}\n </button>\n </dbx-anchor>\n </mat-menu>\n </ng-container>\n <!-- Bar -->\n <nav *ngSwitchCase=\"'bar'\" mat-tab-nav-bar [attr.mat-align-tabs]=\"navAlign\">\n <dbx-anchor *ngFor=\"let x of anchors$ | async\" [anchor]=\"x.anchor\">\n <a mat-tab-link [active]=\"x.selected\">{{ x.anchor.title }}</a>\n </dbx-anchor>\n </nav>\n</ng-container>\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: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: DbxIconButtonComponent, selector: "dbx-icon-button" }, { kind: "component", type: i5$1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["color"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "directive", type: i5$1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matTabLink"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2900
+ DbxNavbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxNavbarComponent, selector: "dbx-navbar", inputs: { navAlign: "navAlign", icon: "icon", defaultIcon: "defaultIcon", defaultText: "defaultText", anchors: "anchors", mode: "mode", breakpoint: "breakpoint" }, host: { classAttribute: "dbx-navbar" }, usesInheritance: true, ngImport: i0, template: "<ng-container [ngSwitch]=\"mode$ | async\">\n <!-- Button -->\n <ng-container *ngSwitchDefault>\n <dbx-icon-button class=\"nav-menu-button\" aria-label=\"open navigation\" [buttonDisplay]=\"buttonDisplay$ | async\" [matMenuTriggerFor]=\"menu\" [disabled]=\"hasNoAnchors$ | async\"></dbx-icon-button>\n <mat-menu #menu>\n <dbx-anchor *ngFor=\"let x of anchors$ | async\" [anchor]=\"x.anchor\">\n <button mat-menu-item [ngClass]=\"x.selected ? 'active' : ''\">\n <mat-icon *ngIf=\"x.anchor.icon\">{{ x.anchor.icon }}</mat-icon>\n {{ x.anchor.title }}\n </button>\n </dbx-anchor>\n </mat-menu>\n </ng-container>\n <!-- Bar -->\n <nav *ngSwitchCase=\"'bar'\" mat-tab-nav-bar [attr.mat-align-tabs]=\"navAlign\">\n <dbx-anchor *ngFor=\"let x of anchors$ | async\" [anchor]=\"x.anchor\">\n <a mat-tab-link [active]=\"x.selected\">{{ x.anchor.title }}</a>\n </dbx-anchor>\n </nav>\n</ng-container>\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: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i1.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "component", type: DbxIconButtonComponent, selector: "dbx-icon-button" }, { kind: "component", type: i5$1.MatTabNav, selector: "[mat-tab-nav-bar]", inputs: ["color"], exportAs: ["matTabNavBar", "matTabNav"] }, { kind: "directive", type: i5$1.MatTabLink, selector: "[mat-tab-link], [matTabLink]", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matTabLink"] }, { kind: "component", type: i2$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i4$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i4$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: DbxAnchorComponent, selector: "dbx-anchor, [dbx-anchor]", inputs: ["block"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
2896
2901
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxNavbarComponent, decorators: [{
2897
2902
  type: Component,
2898
2903
  args: [{ selector: 'dbx-navbar', changeDetection: ChangeDetectionStrategy.OnPush, host: {
@@ -2904,6 +2909,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2904
2909
  type: Input
2905
2910
  }], defaultIcon: [{
2906
2911
  type: Input
2912
+ }], defaultText: [{
2913
+ type: Input
2907
2914
  }], anchors: [{
2908
2915
  type: Input
2909
2916
  }], mode: [{