@dereekb/dbx-web 13.8.0 → 13.9.0

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.
@@ -1168,11 +1168,10 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
1168
1168
  customContent = input(false, { ...(ngDevMode ? { debugName: "customContent" } : /* istanbul ignore next */ {}), transform: isDefinedAndNotFalse });
1169
1169
  allowClickPropagation = input(false, { ...(ngDevMode ? { debugName: "allowClickPropagation" } : /* istanbul ignore next */ {}), transform: isDefinedAndNotFalse });
1170
1170
  mode = input(...(ngDevMode ? [undefined, { debugName: "mode" }] : /* istanbul ignore next */ []));
1171
- typeSignal = computed(() => {
1171
+ styleTypeSignal = computed(() => {
1172
1172
  const style = this.buttonStyle();
1173
1173
  let type = this.type() ?? style?.type;
1174
1174
  if (!type) {
1175
- type = 'basic';
1176
1175
  if (this.iconOnly()) {
1177
1176
  type = 'icon';
1178
1177
  }
@@ -1190,7 +1189,7 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
1190
1189
  }
1191
1190
  }
1192
1191
  return type;
1193
- }, ...(ngDevMode ? [{ debugName: "typeSignal" }] : /* istanbul ignore next */ []));
1192
+ }, ...(ngDevMode ? [{ debugName: "styleTypeSignal" }] : /* istanbul ignore next */ []));
1194
1193
  configSignal = computed(() => {
1195
1194
  // configure custom style
1196
1195
  const customStyle = {};
@@ -1217,7 +1216,7 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
1217
1216
  const fab = this.fab() || buttonStyle?.fab;
1218
1217
  const mode = this.mode() ?? buttonStyle?.mode;
1219
1218
  const working = this.workingSignal();
1220
- const buttonType = this.typeSignal();
1219
+ const buttonType = this.styleTypeSignal();
1221
1220
  const ariaLabel = this.ariaLabel();
1222
1221
  const config = {
1223
1222
  fab,
@@ -1227,7 +1226,7 @@ class DbxButtonComponent extends AbstractDbxButtonDirective {
1227
1226
  customClass: 'dbx-button ' + (isIconOnlyButton ? 'dbx-button-no-text' : ''),
1228
1227
  text: textValue ?? '',
1229
1228
  hasTextContent,
1230
- buttonType,
1229
+ buttonType: buttonType ?? (isIconOnlyButton ? 'icon' : 'basic'),
1231
1230
  buttonColor,
1232
1231
  barColor: 'accent',
1233
1232
  mode,
@@ -3103,14 +3102,27 @@ const DEFAULT_FILTER_POPOVER_BUTTON_DISPLAY_CONTENT = {
3103
3102
  class DbxFilterPopoverButtonComponent extends AbstractFilterPopoverButtonDirective {
3104
3103
  buttonElement = viewChild('button', { ...(ngDevMode ? { debugName: "buttonElement" } : /* istanbul ignore next */ {}), read: ElementRef });
3105
3104
  disabled = input(...(ngDevMode ? [undefined, { debugName: "disabled" }] : /* istanbul ignore next */ []));
3105
+ /**
3106
+ * @deprecated Use buttonDisplayStyle instead.
3107
+ */
3106
3108
  buttonDisplay = input(DEFAULT_FILTER_POPOVER_BUTTON_DISPLAY_CONTENT, { ...(ngDevMode ? { debugName: "buttonDisplay" } : /* istanbul ignore next */ {}), transform: (x) => x ?? DEFAULT_FILTER_POPOVER_BUTTON_DISPLAY_CONTENT });
3109
+ buttonDisplayStyle = input(...(ngDevMode ? [undefined, { debugName: "buttonDisplayStyle" }] : /* istanbul ignore next */ []));
3110
+ buttonDisplaySignal = computed(() => {
3111
+ const pairDisplay = this.buttonDisplayStyle()?.display;
3112
+ const directDisplay = this.buttonDisplay();
3113
+ if (!pairDisplay && !directDisplay) {
3114
+ return undefined;
3115
+ }
3116
+ return { ...pairDisplay, ...directDisplay };
3117
+ }, ...(ngDevMode ? [{ debugName: "buttonDisplaySignal" }] : /* istanbul ignore next */ []));
3118
+ buttonStyleSignal = computed(() => this.buttonDisplayStyle()?.style, ...(ngDevMode ? [{ debugName: "buttonStyleSignal" }] : /* istanbul ignore next */ []));
3107
3119
  showFilterPopover() {
3108
3120
  const origin = this.buttonElement()?.nativeElement;
3109
3121
  this.showPopover(origin);
3110
3122
  }
3111
3123
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFilterPopoverButtonComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3112
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: DbxFilterPopoverButtonComponent, isStandalone: true, selector: "dbx-filter-popover-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, buttonDisplay: { classPropertyName: "buttonDisplay", publicName: "buttonDisplay", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3113
- <dbx-button #button (buttonClick)="showFilterPopover()" [buttonDisplay]="buttonDisplay()" [disabled]="disabled()" iconOnly></dbx-button>
3124
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.2.0", version: "21.2.4", type: DbxFilterPopoverButtonComponent, isStandalone: true, selector: "dbx-filter-popover-button", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, buttonDisplay: { classPropertyName: "buttonDisplay", publicName: "buttonDisplay", isSignal: true, isRequired: false, transformFunction: null }, buttonDisplayStyle: { classPropertyName: "buttonDisplayStyle", publicName: "buttonDisplayStyle", isSignal: true, isRequired: false, transformFunction: null } }, viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef, isSignal: true }], usesInheritance: true, ngImport: i0, template: `
3125
+ <dbx-button #button (buttonClick)="showFilterPopover()" [buttonDisplay]="buttonDisplaySignal()" [buttonStyle]="buttonStyleSignal()" [disabled]="disabled()"></dbx-button>
3114
3126
  `, isInline: true, dependencies: [{ kind: "component", type: DbxButtonComponent, selector: "dbx-button", inputs: ["bar", "type", "buttonStyle", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor", "basic", "tonal", "raised", "stroked", "flat", "iconOnly", "fab", "customContent", "allowClickPropagation", "mode"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
3115
3127
  }
3116
3128
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFilterPopoverButtonComponent, decorators: [{
@@ -3118,13 +3130,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
3118
3130
  args: [{
3119
3131
  selector: 'dbx-filter-popover-button',
3120
3132
  template: `
3121
- <dbx-button #button (buttonClick)="showFilterPopover()" [buttonDisplay]="buttonDisplay()" [disabled]="disabled()" iconOnly></dbx-button>
3133
+ <dbx-button #button (buttonClick)="showFilterPopover()" [buttonDisplay]="buttonDisplaySignal()" [buttonStyle]="buttonStyleSignal()" [disabled]="disabled()"></dbx-button>
3122
3134
  `,
3123
3135
  imports: [DbxButtonComponent],
3124
3136
  changeDetection: ChangeDetectionStrategy.OnPush,
3125
3137
  standalone: true
3126
3138
  }]
3127
- }], propDecorators: { buttonElement: [{ type: i0.ViewChild, args: ['button', { ...{ read: ElementRef }, isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], buttonDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisplay", required: false }] }] } });
3139
+ }], propDecorators: { buttonElement: [{ type: i0.ViewChild, args: ['button', { ...{ read: ElementRef }, isSignal: true }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], buttonDisplay: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisplay", required: false }] }], buttonDisplayStyle: [{ type: i0.Input, args: [{ isSignal: true, alias: "buttonDisplayStyle", required: false }] }] } });
3128
3140
 
3129
3141
  /**
3130
3142
  * Wraps filter form content with apply/reset buttons, integrating with the action system.
@@ -13294,7 +13306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
13294
13306
  * Default HTML template for list wrapper components. Passes through state, config, and content projection slots to a child `dbx-list`.
13295
13307
  */
13296
13308
  const DEFAULT_LIST_WRAPPER_COMPONENT_CONFIGURATION_TEMPLATE = `
13297
- <dbx-list [state]="currentState$" [config]="configSignal()" [hasMore]="hasMore()" [disabled]="disabled()" [selectionMode]="selectionModeSignal()">
13309
+ <dbx-list [state]="currentState$" [config]="configSignal()" [hasMore]="hasMore()" [disabled]="disabledSignal()" [selectionMode]="selectionModeSignal()">
13298
13310
  <ng-content top select="[top]"></ng-content>
13299
13311
  <ng-content bottom select="[bottom]"></ng-content>
13300
13312
  <ng-content empty select="[empty]"></ng-content>
@@ -13325,7 +13337,9 @@ class AbstractDbxListWrapperDirective {
13325
13337
  _config = new BehaviorSubject(undefined);
13326
13338
  _stateOverride = new BehaviorSubject(undefined);
13327
13339
  _selectionModeOverride = new BehaviorSubject(undefined);
13340
+ _disabledOverride = new BehaviorSubject(undefined);
13328
13341
  _selectionModeOverrideSignal = toSignal(this._selectionModeOverride.pipe(maybeValueFromObservableOrValue()));
13342
+ _disabledOverrideSignal = toSignal(this._disabledOverride.pipe(maybeValueFromObservableOrValue()));
13329
13343
  hasMore = input(undefined, ...(ngDevMode ? [{ debugName: "hasMore" }] : /* istanbul ignore next */ []));
13330
13344
  clickItem = output();
13331
13345
  loadMore = output();
@@ -13335,6 +13349,9 @@ class AbstractDbxListWrapperDirective {
13335
13349
  selectionModeSignal = computed(() => {
13336
13350
  return this._selectionModeOverrideSignal() ?? this.selectionMode();
13337
13351
  }, ...(ngDevMode ? [{ debugName: "selectionModeSignal" }] : /* istanbul ignore next */ []));
13352
+ disabledSignal = computed(() => {
13353
+ return this._disabledOverrideSignal() ?? this.disabled();
13354
+ }, ...(ngDevMode ? [{ debugName: "disabledSignal" }] : /* istanbul ignore next */ []));
13338
13355
  currentState$ = combineLatest([this._stateOverride, toObservable(this.state)]).pipe(map(([stateOverride, state]) => stateOverride ?? state), maybeValueFromObservableOrValue(), shareReplay(1));
13339
13356
  config$ = this._config.pipe(maybeValueFromObservableOrValue(), map((x) => (x ? this._buildListConfig(x) : undefined)), shareReplay(1));
13340
13357
  configSignal = toSignal(this.config$);
@@ -13346,6 +13363,7 @@ class AbstractDbxListWrapperDirective {
13346
13363
  this._config.complete();
13347
13364
  this._stateOverride.complete();
13348
13365
  this._selectionModeOverride.complete();
13366
+ this._disabledOverride.complete();
13349
13367
  }
13350
13368
  setState(stateObs) {
13351
13369
  this._stateOverride.next(stateObs);
@@ -13353,6 +13371,9 @@ class AbstractDbxListWrapperDirective {
13353
13371
  setSelectionMode(selectionMode) {
13354
13372
  this._selectionModeOverride.next(selectionMode);
13355
13373
  }
13374
+ setDisabled(disabled) {
13375
+ this._disabledOverride.next(disabled);
13376
+ }
13356
13377
  _buildListConfig(config) {
13357
13378
  return {
13358
13379
  ...config,
@@ -15075,7 +15096,7 @@ class DbxZipPreviewEntryListComponent extends AbstractDbxSelectionListWrapperDir
15075
15096
  });
15076
15097
  }
15077
15098
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxZipPreviewEntryListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15078
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxZipPreviewEntryListComponent, isStandalone: true, selector: "dbx-zip-preview-file-entry-list", providers: provideDbxListViewWrapper(DbxZipPreviewEntryListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15099
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxZipPreviewEntryListComponent, isStandalone: true, selector: "dbx-zip-preview-file-entry-list", providers: provideDbxListViewWrapper(DbxZipPreviewEntryListComponent), usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15079
15100
  }
15080
15101
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxZipPreviewEntryListComponent, decorators: [{
15081
15102
  type: Component,
@@ -15675,7 +15696,7 @@ class DbxWidgetListGridComponent extends AbstractDbxListWrapperDirective {
15675
15696
  });
15676
15697
  }
15677
15698
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxWidgetListGridComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
15678
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxWidgetListGridComponent, isStandalone: true, selector: "dbx-widget-grid", usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabled()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15699
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.4", type: DbxWidgetListGridComponent, isStandalone: true, selector: "dbx-widget-grid", usesInheritance: true, ngImport: i0, template: "\n <dbx-list [state]=\"currentState$\" [config]=\"configSignal()\" [hasMore]=\"hasMore()\" [disabled]=\"disabledSignal()\" [selectionMode]=\"selectionModeSignal()\">\n <ng-content top select=\"[top]\"></ng-content>\n <ng-content bottom select=\"[bottom]\"></ng-content>\n <ng-content empty select=\"[empty]\"></ng-content>\n <ng-content emptyLoading select=\"[emptyLoading]\"></ng-content>\n <ng-content end select=\"[end]\"></ng-content>\n </dbx-list>", isInline: true, dependencies: [{ kind: "ngmodule", type: DbxListWrapperComponentImportsModule }, { kind: "component", type: DbxListComponent, selector: "dbx-list", inputs: ["padded", "state", "config", "disabled", "selectionMode", "hasMore"], outputs: ["contentScrolled"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
15679
15700
  }
15680
15701
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxWidgetListGridComponent, decorators: [{
15681
15702
  type: Component,