@dereekb/dbx-web 9.23.20 → 9.23.22

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.
Files changed (41) hide show
  1. package/calendar/esm2020/lib/calendar.base.component.mjs +2 -2
  2. package/calendar/esm2020/lib/calendar.store.mjs +8 -3
  3. package/calendar/fesm2015/dereekb-dbx-web-calendar.mjs +9 -4
  4. package/calendar/fesm2015/dereekb-dbx-web-calendar.mjs.map +1 -1
  5. package/calendar/fesm2020/dereekb-dbx-web-calendar.mjs +9 -4
  6. package/calendar/fesm2020/dereekb-dbx-web-calendar.mjs.map +1 -1
  7. package/calendar/lib/calendar.store.d.ts +1 -0
  8. package/calendar/package.json +3 -3
  9. package/esm2020/calendar/lib/calendar.base.component.mjs +2 -2
  10. package/esm2020/calendar/lib/calendar.store.mjs +8 -3
  11. package/esm2020/lib/layout/style/style.mjs +7 -1
  12. package/esm2020/lib/router/layout/navbar/navbar.component.mjs +16 -6
  13. package/esm2020/mapbox/lib/mapbox.rxjs.mjs +1 -1
  14. package/esm2020/mapbox/lib/mapbox.store.mjs +10 -1
  15. package/fesm2015/dereekb-dbx-web-calendar.mjs +9 -4
  16. package/fesm2015/dereekb-dbx-web-calendar.mjs.map +1 -1
  17. package/fesm2015/dereekb-dbx-web-mapbox.mjs +57 -53
  18. package/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  19. package/fesm2015/dereekb-dbx-web.mjs +20 -4
  20. package/fesm2015/dereekb-dbx-web.mjs.map +1 -1
  21. package/fesm2020/dereekb-dbx-web-calendar.mjs +9 -4
  22. package/fesm2020/dereekb-dbx-web-calendar.mjs.map +1 -1
  23. package/fesm2020/dereekb-dbx-web-mapbox.mjs +61 -53
  24. package/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  25. package/fesm2020/dereekb-dbx-web.mjs +20 -4
  26. package/fesm2020/dereekb-dbx-web.mjs.map +1 -1
  27. package/lib/layout/style/_style.scss +25 -0
  28. package/lib/layout/style/style.d.ts +1 -1
  29. package/lib/layout/text/_text.scss +5 -0
  30. package/lib/router/layout/navbar/navbar.component.d.ts +7 -1
  31. package/mapbox/esm2020/lib/mapbox.rxjs.mjs +1 -1
  32. package/mapbox/esm2020/lib/mapbox.store.mjs +10 -1
  33. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs +57 -53
  34. package/mapbox/fesm2015/dereekb-dbx-web-mapbox.mjs.map +1 -1
  35. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs +61 -53
  36. package/mapbox/fesm2020/dereekb-dbx-web-mapbox.mjs.map +1 -1
  37. package/mapbox/lib/mapbox.rxjs.d.ts +2 -1
  38. package/mapbox/lib/mapbox.store.d.ts +3 -1
  39. package/mapbox/package.json +3 -3
  40. package/package.json +3 -3
  41. package/table/package.json +3 -3
@@ -15,7 +15,7 @@ import * as i3 from '@angular/material/progress-spinner';
15
15
  import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
16
16
  import * as i2$1 from '@angular/material/icon';
17
17
  import { MatIconModule } from '@angular/material/icon';
18
- import { getValueFromGetter, mergeObjects, splitCommaSeparatedStringToSet, asPromise, objectHasNoKeys, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, filterMaybeValues, asArray, firstValue, filterUndefinedValues, isMaybeNot, isNotNullOrEmptyString, mapIterable, toReadableError, isDefaultReadableError, build, ServerErrorResponse, UnauthorizedServerErrorResponse, maybeModifierMapToFunction, ModelRelationUtility, encodeModelKeyTypePair, useIterableOrValue } from '@dereekb/util';
18
+ import { getValueFromGetter, mergeObjects, splitCommaSeparatedStringToSet, asPromise, objectHasNoKeys, modifier, combineMaps, addModifiers, removeModifiers, applyBestFit, findNext, filterMaybeValues, asArray, firstValue, filterUndefinedValues, isMaybeNot, isNotNullOrEmptyString, mapIterable, toReadableError, isDefaultReadableError, build, ServerErrorResponse, UnauthorizedServerErrorResponse, maybeModifierMapToFunction, ModelRelationUtility, encodeModelKeyTypePair, useIterableOrValue } from '@dereekb/util';
19
19
  import * as i3$1 from '@angular/material/progress-bar';
20
20
  import { MatProgressBarModule } from '@angular/material/progress-bar';
21
21
  import * as i5 from '@angular/material/core';
@@ -1189,6 +1189,12 @@ function dbxColorBackground(color) {
1189
1189
  case 'warn':
1190
1190
  cssClass = 'dbx-warn-bg';
1191
1191
  break;
1192
+ case 'grey':
1193
+ cssClass = 'dbx-grey-bg';
1194
+ break;
1195
+ case 'disabled':
1196
+ cssClass = 'dbx-disabled-bg';
1197
+ break;
1192
1198
  }
1193
1199
  return cssClass;
1194
1200
  }
@@ -2877,6 +2883,7 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2877
2883
  this._defaultIcon = new BehaviorSubject('menu');
2878
2884
  this._defaultText = new BehaviorSubject(undefined);
2879
2885
  this._inputMode = new BehaviorSubject(undefined);
2886
+ this._buttonMode = new BehaviorSubject('menu');
2880
2887
  this._breakpoint = new BehaviorSubject('large');
2881
2888
  this._anchors = new BehaviorSubject([]);
2882
2889
  this.isBreakpointActive$ = this._dbxScreenMediaService.isBreakpointActive(this._breakpoint);
@@ -2893,9 +2900,12 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2893
2900
  });
2894
2901
  return applyBestFit(results, (x) => x.selected, (a, b) => this._dbxRouterService.comparePrecision(a.anchor, b.anchor), (nonBestFit) => (Object.assign(Object.assign({}, nonBestFit), { selected: false })));
2895
2902
  }), tapDetectChanges(this.cdRef), shareReplay(1));
2903
+ this.buttonMode$ = this._buttonMode.pipe(distinctUntilChanged(), shareReplay(1));
2896
2904
  this.selectedAnchor$ = this.anchors$.pipe(map((x) => x.find((y) => y.selected)));
2905
+ this.nextRotateAnchor$ = this.anchors$.pipe(map((x) => findNext(x, (y) => y.selected) || x[0]));
2897
2906
  this.hasNoAnchors$ = this.anchors$.pipe(map((x) => x.length === 0), distinctUntilChanged(), shareReplay(1));
2898
- this.buttonDisplay$ = combineLatest([this._defaultIcon, this._icon, this._defaultText, this.selectedAnchor$, this.mode$]).pipe(map(([defaultIcon, icon, defaultText, selectedAnchor, mode]) => {
2907
+ this.buttonNavAnchor$ = this.buttonMode$.pipe(switchMap((x) => (x === 'menu' ? this.selectedAnchor$ : this.nextRotateAnchor$)), distinctUntilChanged(), shareReplay(1));
2908
+ this.buttonDisplay$ = combineLatest([this._defaultIcon, this._icon, this._defaultText, this.buttonNavAnchor$, this.mode$]).pipe(map(([defaultIcon, icon, defaultText, selectedAnchor, mode]) => {
2899
2909
  var _a;
2900
2910
  let content;
2901
2911
  if (icon) {
@@ -2920,6 +2930,7 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2920
2930
  this._defaultIcon.complete();
2921
2931
  this._defaultText.complete();
2922
2932
  this._inputMode.complete();
2933
+ this._buttonMode.complete();
2923
2934
  this._breakpoint.complete();
2924
2935
  this._anchors.complete();
2925
2936
  }
@@ -2936,6 +2947,9 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2936
2947
  set anchors(anchors) {
2937
2948
  this._anchors.next(anchors !== null && anchors !== void 0 ? anchors : []);
2938
2949
  }
2950
+ set buttonMode(mode) {
2951
+ this._buttonMode.next(mode !== null && mode !== void 0 ? mode : 'menu');
2952
+ }
2939
2953
  set mode(mode) {
2940
2954
  this._inputMode.next(mode);
2941
2955
  }
@@ -2944,12 +2958,12 @@ class DbxNavbarComponent extends AbstractTransitionDirective {
2944
2958
  }
2945
2959
  }
2946
2960
  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 });
2947
- 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 });
2961
+ 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", buttonMode: "buttonMode", 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 <ng-container [ngSwitch]=\"buttonMode$ | async\">\n <ng-container *ngSwitchCase=\"'menu'\">\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 <ng-container *ngSwitchCase=\"'rotate'\">\n <dbx-anchor [anchor]=\"(nextRotateAnchor$ | async)?.anchor\">\n <dbx-icon-button class=\"nav-menu-button\" aria-label=\"open navigation\" [buttonDisplay]=\"buttonDisplay$ | async\" [disabled]=\"hasNoAnchors$ | async\"></dbx-icon-button>\n </dbx-anchor>\n </ng-container>\n </ng-container>\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 });
2948
2962
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxNavbarComponent, decorators: [{
2949
2963
  type: Component,
2950
2964
  args: [{ selector: 'dbx-navbar', changeDetection: ChangeDetectionStrategy.OnPush, host: {
2951
2965
  class: 'dbx-navbar'
2952
- }, 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" }]
2966
+ }, template: "<ng-container [ngSwitch]=\"mode$ | async\">\n <!-- Button -->\n <ng-container *ngSwitchDefault>\n <ng-container [ngSwitch]=\"buttonMode$ | async\">\n <ng-container *ngSwitchCase=\"'menu'\">\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 <ng-container *ngSwitchCase=\"'rotate'\">\n <dbx-anchor [anchor]=\"(nextRotateAnchor$ | async)?.anchor\">\n <dbx-icon-button class=\"nav-menu-button\" aria-label=\"open navigation\" [buttonDisplay]=\"buttonDisplay$ | async\" [disabled]=\"hasNoAnchors$ | async\"></dbx-icon-button>\n </dbx-anchor>\n </ng-container>\n </ng-container>\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" }]
2953
2967
  }], ctorParameters: function () { return [{ type: i1$2.DbxRouterTransitionService }, { type: i0.ChangeDetectorRef }, { type: DbxScreenMediaService }, { type: i1$2.DbxRouterService }]; }, propDecorators: { navAlign: [{
2954
2968
  type: Input
2955
2969
  }], icon: [{
@@ -2960,6 +2974,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
2960
2974
  type: Input
2961
2975
  }], anchors: [{
2962
2976
  type: Input
2977
+ }], buttonMode: [{
2978
+ type: Input
2963
2979
  }], mode: [{
2964
2980
  type: Input
2965
2981
  }], breakpoint: [{