@dereekb/dbx-form 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.
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, Optional } from '@angular/core';
2
+ import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, ElementRef, Optional } from '@angular/core';
3
3
  import * as i1 from '@angular/common';
4
4
  import { CommonModule } from '@angular/common';
5
5
  import * as i4 from '@angular/material/dialog';
@@ -2879,7 +2879,8 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
2879
2879
  this.handleSelectOptions = (_, context) => {
2880
2880
  const { openSource } = this;
2881
2881
  if (openSource) {
2882
- const sourceObs = openSource();
2882
+ const origin = this.buttonElement.nativeElement;
2883
+ const sourceObs = openSource({ origin });
2883
2884
  context.startWorkingWithObservable(sourceObs.pipe(first(), tap((result) => {
2884
2885
  const valuesToAdd = mergeArrays([result.select, result.options]);
2885
2886
  if (valuesToAdd.length) {
@@ -3038,11 +3039,14 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
3038
3039
  }
3039
3040
  }
3040
3041
  DbxFormSourceSelectFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
3041
- DbxFormSourceSelectFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormSourceSelectFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\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: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "iconOnly", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
3042
+ DbxFormSourceSelectFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFormSourceSelectFieldComponent, selector: "ng-component", viewQueries: [{ propertyName: "buttonElement", first: true, predicate: ["button"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\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: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "component", type: i4$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i4$1.MatOptgroup, selector: "mat-optgroup", inputs: ["disabled"], exportAs: ["matOptgroup"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i2$1.DbxLoadingComponent, selector: "dbx-loading", inputs: ["show", "text", "mode", "color", "diameter", "linear", "context", "loading", "error"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "raised", "stroked", "flat", "iconOnly", "color", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "directive", type: i2.DbxActionDirective, selector: "dbx-action,[dbxAction],dbx-action-context,[dbxActionContext]", exportAs: ["action", "dbxAction"] }, { kind: "directive", type: i2.DbxActionHandlerDirective, selector: "[dbxActionHandler]", inputs: ["dbxActionHandler"] }, { kind: "directive", type: i2.DbxActionValueDirective, selector: "[dbxActionValue]", inputs: ["dbxActionValue"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
3042
3043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, decorators: [{
3043
3044
  type: Component,
3044
- args: [{ template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n" }]
3045
- }] });
3045
+ args: [{ template: "<div class=\"dbx-source-select-field\">\n <div class=\"dbx-source-select-field-content\">\n <mat-select class=\"dbx-source-select-field-select\" [id]=\"id\" [formControl]=\"formControl\" [multiple]=\"props.multiple\">\n <mat-option *ngFor=\"let value of nonGroupedValues$ | async\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n <mat-optgroup *ngFor=\"let optionGroup of groupedOptions$ | async\" [label]=\"optionGroup.label\">\n <mat-option *ngFor=\"let value of optionGroup.values\" [value]=\"value.value\">\n {{ value.label }}\n </mat-option>\n </mat-optgroup>\n </mat-select>\n <ng-container *ngIf=\"showOpenSourceButton\">\n <dbx-button-spacer></dbx-button-spacer>\n <dbx-action dbxActionValue [dbxActionHandler]=\"handleSelectOptions\" class=\"dbx-source-select-field-button\">\n <dbx-button #button dbxActionButton [iconOnly]=\"true\" [icon]=\"selectButtonIcon\"></dbx-button>\n </dbx-action>\n </ng-container>\n </div>\n <dbx-loading class=\"dbx-source-select-field-loading\" [linear]=\"true\" [context]=\"context\"></dbx-loading>\n</div>\n" }]
3046
+ }], propDecorators: { buttonElement: [{
3047
+ type: ViewChild,
3048
+ args: ['button', { read: ElementRef, static: false }]
3049
+ }] } });
3046
3050
 
3047
3051
  function sourceSelectField(config) {
3048
3052
  const { key, materialFormField } = config;
@@ -5381,6 +5385,7 @@ function timezoneStringField(config = {}) {
5381
5385
  return searchableTextField({
5382
5386
  key: 'timezone',
5383
5387
  label: 'Timezone',
5388
+ asArrayValue: false,
5384
5389
  ...config,
5385
5390
  searchOnEmptyText: true,
5386
5391
  search: timezoneStringSearchFunction(),