@dereekb/dbx-form 10.1.0 → 10.1.2

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.
@@ -10,8 +10,8 @@ import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponent
10
10
  import * as i2$1 from '@dereekb/dbx-web';
11
11
  import { DbxActionTransitionSafetyDirective, DbxTextModule, DbxLoadingModule, DbxFlexLayoutModule, DbxSectionLayoutModule, DbxRouterAnchorModule, dbxValueListItemDecisionFunction, DbxButtonModule, DbxListLayoutModule, AbstractDbxSelectionListWrapperDirective, DEFAULT_LIST_WRAPPER_DIRECTIVE_TEMPLATE, AbstractDbxSelectionListViewDirective, addConfigToValueListItems, provideDbxListView, AbstractDbxValueListViewItemComponent, DbxActionModule, mapCompactModeObs, DbxBarLayoutModule } from '@dereekb/dbx-web';
12
12
  import { isPast, addSeconds, startOfDay, addMinutes, addDays, isAfter } from 'date-fns';
13
- import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, shareReplay, Subject, tap, takeUntil, EMPTY, mergeMap, startWith, debounceTime, skipWhile, scan, combineLatestWith, throttleTime, interval, merge, timer } from 'rxjs';
14
- import { LockSet, SubscriptionObject, asObservable, cleanup, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, distinctUntilHasDifferentValues, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, loadingStateHasValue, loadingStateIsLoading, beginLoading, mapLoadingStateValueWithOperator, valueFromLoadingState, loadingStateContext, skipFirstMaybe, asObservableFromGetter, asyncPusherCache, scanCount } from '@dereekb/rxjs';
13
+ import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, shareReplay, Subject, tap, takeUntil, EMPTY, throttleTime, mergeMap, startWith, debounceTime, skipWhile, scan, combineLatestWith, interval, merge, timer } from 'rxjs';
14
+ import { LockSet, SubscriptionObject, asObservable, cleanup, errorOnEmissionsInPeriod, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, distinctUntilHasDifferentValues, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, loadingStateHasValue, loadingStateIsLoading, beginLoading, mapLoadingStateValueWithOperator, valueFromLoadingState, loadingStateContext, skipFirstMaybe, asObservableFromGetter, asyncPusherCache, scanCount } from '@dereekb/rxjs';
15
15
  import * as i1$1 from '@ngx-formly/core';
16
16
  import { FieldType, FieldWrapper, FormlyModule, FieldArrayType } from '@ngx-formly/core';
17
17
  import * as i3$1 from '@angular/forms';
@@ -44,7 +44,7 @@ import * as i6 from '@angular/material/chips';
44
44
  import { MatChipsModule } from '@angular/material/chips';
45
45
  import { MatListModule } from '@angular/material/list';
46
46
  import { ENTER, COMMA } from '@angular/cdk/keycodes';
47
- import { skipUntilTimeElapsedAfterLastEmission, toJsDate, parseISO8601DayStringToDate, formatToISO8601DateString, formatToISO8601DayString, isSameDateHoursAndMinutes, safeToJsDate, guessCurrentTimezone, dateTimezoneUtcNormal, toJsDayDate, isSameDateDay, toLocalReadableTimeString, getTimezoneAbbreviation, utcDayForDate, readableTimeStringToDate, findMinDate, dateFromLogicalDate, findMaxDate, dateTimeMinuteDecisionFunction, DateTimeMinuteInstance, isSameDate, isSameDateDayRange, dateRange, clampDateRangeToDateRange, isDateInDateRange, isSameDateRange, limitDateTimeInstance, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';
47
+ import { skipUntilTimeElapsedAfterLastEmission, toJsDate, parseISO8601DayStringToDate, formatToISO8601DateString, formatToISO8601DayString, isSameDateHoursAndMinutes, safeToJsDate, guessCurrentTimezone, dateTimezoneUtcNormal, toJsDayDate, isSameDateDay, toLocalReadableTimeString, getTimezoneAbbreviation, utcDayForDate, readableTimeStringToDate, findMinDate, dateFromLogicalDate, findMaxDate, isSameDate, dateTimeMinuteWholeDayDecisionFunction, DateTimeMinuteInstance, isSameDateDayRange, dateRange, clampDateRangeToDateRange, isDateInDateRange, isSameDateRange, limitDateTimeInstance, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';
48
48
  import { FieldType as FieldType$2, FormlyMatFormFieldModule } from '@ngx-formly/material/form-field';
49
49
  import * as i3$3 from '@angular/material/select';
50
50
  import { MatSelectModule } from '@angular/material/select';
@@ -340,7 +340,17 @@ function dbxFormSourceObservableFromStream(stream$, inputObs, mode$) {
340
340
  return EMPTY;
341
341
  }
342
342
  else {
343
- return value$;
343
+ let valueObs = value$;
344
+ if (mode === 'always') {
345
+ valueObs = valueObs.pipe(throttleTime(10, undefined, { leading: true, trailing: true }), errorOnEmissionsInPeriod({
346
+ period: 1000,
347
+ maxEmissionsPerPeriod: 50,
348
+ onError: () => {
349
+ console.error('dbxFormSourceObservableFromStream: Error thrown due to too many emissions. There may be an unintentional loop being triggered by dbxFormSource. Typically this can occur in cases where the dbxFormSource directive is used at the same time as dbxFormValueChange directive and the same value is being pushed.');
350
+ }
351
+ }));
352
+ }
353
+ return valueObs;
344
354
  }
345
355
  }));
346
356
  }
@@ -1496,7 +1506,7 @@ class DbxItemListFieldComponent extends FieldType {
1496
1506
  }
1497
1507
  }
1498
1508
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxItemListFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
1499
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxItemListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <dbx-label class=\"dbx-label-padded\" *ngIf=\"label\">{{ label }}</dbx-label>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <dbx-form-description *ngIf=\"description\">{{ description }}</dbx-form-description>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "component", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: i2$1.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "directive", type: i2$1.DbxListItemIsSelectedModifierDirective, selector: "[dbxListItemIsSelectedModifier]", inputs: ["dbxListItemIsSelectedModifier"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1509
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DbxItemListFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-list-item-field\" [dbxListItemModifier] [dbxListItemIsSelectedModifier]=\"isSelectedModifierFunction$ | async\">\n <dbx-label class=\"dbx-label-padded\" *ngIf=\"label\">{{ label }}</dbx-label>\n <div class=\"dbx-list-item-field-content\">\n <dbx-injection [config]=\"config$ | async\"></dbx-injection>\n </div>\n <mat-divider></mat-divider>\n <dbx-form-description *ngIf=\"description\">{{ description }}</dbx-form-description>\n</div>\n", dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "directive", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "component", type: i2.DbxInjectionComponent, selector: "dbx-injection, [dbxInjection], [dbx-injection]", inputs: ["config", "template"] }, { kind: "directive", type: i2$1.DbxValueListItemModifierDirective, selector: "[dbxListItemModifier]", inputs: ["dbxListItemModifier"] }, { kind: "directive", type: i2$1.DbxListItemIsSelectedModifierDirective, selector: "[dbxListItemIsSelectedModifier]", inputs: ["dbxListItemIsSelectedModifier"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
1500
1510
  }
1501
1511
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxItemListFieldComponent, decorators: [{
1502
1512
  type: Component,
@@ -2990,7 +3000,7 @@ class DbxFormSourceSelectFieldComponent extends FieldType$2 {
2990
3000
  this.formControl.markAsTouched();
2991
3001
  }
2992
3002
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
2993
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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", "panelWidth", "hideSingleSelectionIndicator"], 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", "padding", "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" }] }); }
3003
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.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", "panelWidth", "hideSingleSelectionIndicator"], 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", "padding", "context", "loading", "error"] }, { kind: "directive", type: i2.DbxActionButtonDirective, selector: "[dbxActionButton]" }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "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" }] }); }
2994
3004
  }
2995
3005
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormSourceSelectFieldComponent, decorators: [{
2996
3006
  type: Component,
@@ -3189,7 +3199,7 @@ class DbxTextEditorFieldComponent extends FieldType$1 {
3189
3199
  </div>
3190
3200
  <dbx-form-description *ngIf="description">{{ description }}</dbx-form-description>
3191
3201
  </div>
3192
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "component", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$5.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i4$5.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
3202
+ `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.DbxLabelComponent, selector: "dbx-label" }, { kind: "directive", type: i2$1.DbxFormDescriptionComponent, selector: "dbx-form-description" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$5.NgxEditorComponent, selector: "ngx-editor", inputs: ["editor", "outputFormat", "placeholder"], outputs: ["focusOut", "focusIn"] }, { kind: "component", type: i4$5.MenuComponent, selector: "ngx-editor-menu", inputs: ["toolbar", "colorPresets", "disabled", "editor", "customMenuRef", "dropdownPlacement"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
3193
3203
  }
3194
3204
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxTextEditorFieldComponent, decorators: [{
3195
3205
  type: Component,
@@ -3436,7 +3446,7 @@ class DbxFormRepeatArrayTypeComponent extends FieldArrayType {
3436
3446
  </div>
3437
3447
  </dbx-subsection>
3438
3448
  </div>
3439
- `, isInline: true, 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: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i2$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i2$1.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { 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: "component", type: i1$1.FormlyField, selector: "formly-field", inputs: ["field"] }] }); }
3449
+ `, isInline: true, 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: "component", type: i8.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4$6.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i4$6.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i4$6.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "directive", type: i4$6.CdkDragPlaceholder, selector: "ng-template[cdkDragPlaceholder]", inputs: ["data"] }, { kind: "component", type: i2$1.DbxSubSectionComponent, selector: "dbx-subsection" }, { kind: "directive", type: i2$1.DbxBarDirective, selector: "dbx-bar,[dbxBar]", inputs: ["color"] }, { kind: "component", type: i2$1.DbxButtonComponent, selector: "dbx-button", inputs: ["type", "basic", "raised", "stroked", "flat", "iconOnly", "color", "spinnerColor", "customButtonColor", "customTextColor", "customSpinnerColor"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$1.FormlyField, selector: "formly-field", inputs: ["field"] }] }); }
3440
3450
  }
3441
3451
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DbxFormRepeatArrayTypeComponent, decorators: [{
3442
3452
  type: Component,
@@ -3868,12 +3878,15 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3868
3878
  }), distinctUntilChanged(isSameDateDay), shareReplay(1));
3869
3879
  this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
3870
3880
  return x.pipe(map(dbxDateTimeInputValueParseFactory(this.valueMode, timezoneInstance)));
3871
- }), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
3881
+ }), throttleTime(20, undefined, { leading: true, trailing: true }), // throttle incoming values and timezone changes
3872
3882
  distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
3883
+ this.refreshInteral$ = interval(10 * 1000);
3873
3884
  /**
3874
3885
  * Used to trigger/display visual updates (specifically on timeDistance, etc.).
3875
3886
  */
3876
- this.displayValue$ = interval(10 * 1000).pipe(startWith(0), map(() => new Date().getMinutes()), distinctUntilChanged(), tap(() => this.cdRef.markForCheck()), switchMap(() => this.valueInSystemTimezone$), shareReplay(1));
3887
+ this.displayValue$ = this.refreshInteral$.pipe(
3888
+ // every 10 seconds, refresh w/interval
3889
+ startWith(0), map(() => new Date().getMinutes()), distinctUntilChanged(), tap(() => this.cdRef.markForCheck()), switchMap(() => this.valueInSystemTimezone$), shareReplay(1));
3877
3890
  this.timeString$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? toLocalReadableTimeString(x) : '')), distinctUntilChanged(), shareReplay(1));
3878
3891
  this.dateInputCtrl = new FormControl(new Date(), {
3879
3892
  validators: []
@@ -3912,9 +3925,6 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3912
3925
  }), shareReplay(1));
3913
3926
  this.syncConfigBeforeValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'before');
3914
3927
  this.syncConfigAfterValue$ = syncConfigValueObs(this.parsedSyncConfigs$, 'after');
3915
- // TODO: Get min/max using the DateTimePickerConfiguration too
3916
- this.dateInputMin$ = this.syncConfigBeforeValue$;
3917
- this.dateInputMax$ = this.syncConfigAfterValue$;
3918
3928
  this.rawDateTime$ = combineLatest([this.dateValue$, this.timeInput$.pipe(startWith(null)), this.fullDay$, this.timeDate$]).pipe(map(([date, timeString, fullDay, timeDate]) => {
3919
3929
  let result;
3920
3930
  if (!date || this.timeOnly) {
@@ -3942,7 +3952,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3942
3952
  }
3943
3953
  return result;
3944
3954
  }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
3945
- this.config$ = combineLatest([this._config.pipe(switchMapMaybeDefault()), this.dateInputMin$, this.dateInputMax$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
3955
+ this.config$ = combineLatest([this._config.pipe(switchMapMaybeObs()), this.syncConfigBeforeValue$, this.syncConfigAfterValue$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
3946
3956
  let result = x;
3947
3957
  if (dateInputMin != null || dateInputMax != null) {
3948
3958
  const { min: limitMin, max: limitMax } = x?.limits ?? {};
@@ -3959,9 +3969,11 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3959
3969
  }
3960
3970
  return result;
3961
3971
  }), distinctUntilChanged(), shareReplay(1));
3972
+ this.dateInputMin$ = this.config$.pipe(map((x) => (x?.limits?.min ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
3973
+ this.dateInputMax$ = this.config$.pipe(map((x) => (x?.limits?.max ?? null)), distinctUntilChanged(isSameDate), shareReplay(1));
3962
3974
  this.pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
3963
3975
  if (x) {
3964
- const filter = dateTimeMinuteDecisionFunction(x);
3976
+ const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
3965
3977
  return (x) => (x != null ? filter(x) : true);
3966
3978
  }
3967
3979
  else {
@@ -3978,7 +3990,10 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3978
3990
  });
3979
3991
  date = instance.clamp(date);
3980
3992
  const minutes = stepsOffset * 5;
3981
- date = addMinutes(date, minutes);
3993
+ if (minutes != 0) {
3994
+ date = addMinutes(date, minutes);
3995
+ date = instance.clamp(date); // clamp the date again
3996
+ }
3982
3997
  }
3983
3998
  return date;
3984
3999
  }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
@@ -3987,7 +4002,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3987
4002
  ngOnInit() {
3988
4003
  this._formControlObs.next(this.formControl);
3989
4004
  const inputPickerConfig = this.dateTimeField.pickerConfig;
3990
- this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : undefined);
4005
+ this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : of({}));
3991
4006
  this._syncConfigObs.next(this.dateTimeField.getSyncFieldsObs?.());
3992
4007
  this._sub.subscription = this.valueInSystemTimezone$
3993
4008
  .pipe(combineLatestWith(this.timezoneInstance$.pipe(map((timezoneInstance) => dbxDateTimeOutputValueFactory(this.valueMode, timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME$1, undefined, { leading: false, trailing: true }), switchMap(([currentValue, valueFactory]) => {
@@ -4449,7 +4464,7 @@ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4449
4464
  this.max$ = this.minMaxRange$.pipe(map((x) => x?.end ?? null), distinctUntilChanged(), shareReplay(1));
4450
4465
  this.pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
4451
4466
  if (x) {
4452
- const filter = dateTimeMinuteDecisionFunction(x);
4467
+ const filter = dateTimeMinuteWholeDayDecisionFunction(x, false);
4453
4468
  return (x) => (x != null ? filter(x) : true);
4454
4469
  }
4455
4470
  else {