@dereekb/dbx-web 9.24.15 → 9.24.17

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.
@@ -1885,6 +1885,9 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1885
1885
  constructor(popover) {
1886
1886
  super(popover);
1887
1887
  this._closeOnChangeSub = new SubscriptionObject();
1888
+ this.showCloseButton = this.config.showCloseButton ?? !(this.config.closeOnFilterChange ?? true);
1889
+ this.closeButtonText = this.config.closeButtonText ?? 'Close';
1890
+ this.customizeButtonText = this.config.customizeButtonText ?? 'Customize';
1888
1891
  /**
1889
1892
  * Whether or not to display buttons to toggle between custom and preset filters.
1890
1893
  */
@@ -1909,7 +1912,6 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1909
1912
  }
1910
1913
  if (closeOnFilterChange !== false) {
1911
1914
  this._closeOnChangeSub.subscription = filterSource.filter$.pipe(skip(1), filterMaybe(), first(), defaultIfEmpty(undefined)).subscribe(() => {
1912
- console.log();
1913
1915
  this.close();
1914
1916
  });
1915
1917
  }
@@ -1918,7 +1920,7 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1918
1920
  return config;
1919
1921
  }));
1920
1922
  }
1921
- static openPopover(popupService, { width, height, isResizable, origin, header, icon, customFilterComponentClass, presetFilterComponentClass, connector, initialFilterObs, closeOnFilterChange }, popoverKey) {
1923
+ static openPopover(popupService, { width, height, isResizable, origin, header, icon, customFilterComponentClass, presetFilterComponentClass, connector, initialFilterObs, closeOnFilterChange, customizeButtonText, showCloseButton, closeButtonText }, popoverKey) {
1922
1924
  return popupService.open({
1923
1925
  key: popoverKey ?? DEFAULT_FILTER_POPOVER_KEY,
1924
1926
  origin,
@@ -1929,6 +1931,9 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1929
1931
  data: {
1930
1932
  header,
1931
1933
  icon,
1934
+ customizeButtonText,
1935
+ showCloseButton,
1936
+ closeButtonText,
1932
1937
  customFilterComponentClass,
1933
1938
  presetFilterComponentClass,
1934
1939
  connector,
@@ -1972,10 +1977,10 @@ class DbxFilterPopoverComponent extends AbstractPopoverDirective {
1972
1977
  }
1973
1978
  }
1974
1979
  DbxFilterPopoverComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFilterPopoverComponent, deps: [{ token: DbxPopoverComponent }], target: i0.ɵɵFactoryTarget.Component });
1975
- DbxFilterPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFilterPopoverComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n <ng-container *ngIf=\"showSwitchButtons\" [ngSwitch]=\"showPreset$ | async\">\n <button *ngSwitchCase=\"true\" mat-flat-button color=\"accent\" (click)=\"showCustom()\">Custom</button>\n <button *ngSwitchCase=\"false\" mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n </ng-container>\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n", dependencies: [{ 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: "component", type: DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "component", type: DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "component", type: i1$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1980
+ DbxFilterPopoverComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFilterPopoverComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n <ng-container *ngIf=\"showSwitchButtons\" [ngSwitch]=\"showPreset$ | async\">\n <button *ngSwitchCase=\"true\" mat-flat-button color=\"accent\" (click)=\"showCustom()\">{{ customizeButtonText }}</button>\n <button *ngSwitchCase=\"false\" mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n </ng-container>\n <ng-container *ngIf=\"showCloseButton\">\n <dbx-button-spacer *ngIf=\"showSwitchButtons\"></dbx-button-spacer>\n <button mat-stroked-button color=\"accent\" (click)=\"close()\">{{ closeButtonText }}</button>\n </ng-container>\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n", dependencies: [{ 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: "component", type: DbxPopoverContentComponent, selector: "dbx-popover-content" }, { kind: "component", type: DbxPopoverHeaderComponent, selector: "dbx-popover-header", inputs: ["header", "icon"] }, { kind: "component", type: DbxPopoverScrollContentComponent, selector: "dbx-popover-scroll-content" }, { kind: "directive", type: DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "component", type: i2.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
1976
1981
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFilterPopoverComponent, decorators: [{
1977
1982
  type: Component,
1978
- args: [{ template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n <ng-container *ngIf=\"showSwitchButtons\" [ngSwitch]=\"showPreset$ | async\">\n <button *ngSwitchCase=\"true\" mat-flat-button color=\"accent\" (click)=\"showCustom()\">Custom</button>\n <button *ngSwitchCase=\"false\" mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n </ng-container>\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n" }]
1983
+ args: [{ template: "<dbx-popover-content>\n <!-- Header -->\n <dbx-popover-header [icon]=\"icon\" [header]=\"header\">\n <ng-container *ngIf=\"showSwitchButtons\" [ngSwitch]=\"showPreset$ | async\">\n <button *ngSwitchCase=\"true\" mat-flat-button color=\"accent\" (click)=\"showCustom()\">{{ customizeButtonText }}</button>\n <button *ngSwitchCase=\"false\" mat-flat-button color=\"accent\" (click)=\"showPresets()\">Presets</button>\n </ng-container>\n <ng-container *ngIf=\"showCloseButton\">\n <dbx-button-spacer *ngIf=\"showSwitchButtons\"></dbx-button-spacer>\n <button mat-stroked-button color=\"accent\" (click)=\"close()\">{{ closeButtonText }}</button>\n </ng-container>\n </dbx-popover-header>\n <!-- Content -->\n <dbx-popover-scroll-content>\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </dbx-popover-scroll-content>\n</dbx-popover-content>\n" }]
1979
1984
  }], ctorParameters: function () { return [{ type: DbxPopoverComponent }]; } });
1980
1985
 
1981
1986
  /**