@dereekb/dbx-form 9.23.28 → 9.24.1

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 (40) hide show
  1. package/calendar/lib/calendar.schedule.selection.dialog.button.component.d.ts +4 -1
  2. package/calendar/lib/calendar.schedule.selection.dialog.component.d.ts +11 -4
  3. package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +6 -1
  4. package/esm2020/calendar/lib/calendar.schedule.selection.days.component.mjs +1 -1
  5. package/esm2020/calendar/lib/calendar.schedule.selection.dialog.button.component.mjs +5 -3
  6. package/esm2020/calendar/lib/calendar.schedule.selection.dialog.component.mjs +22 -7
  7. package/esm2020/calendar/lib/calendar.schedule.selection.range.component.mjs +1 -1
  8. package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +7 -4
  9. package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.mjs +7 -4
  10. package/esm2020/lib/form/action/form.action.directive.mjs +11 -4
  11. package/esm2020/lib/formly/field/value/date/date.field.module.mjs +18 -6
  12. package/esm2020/lib/formly/field/value/date/date.value.mjs +73 -0
  13. package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +60 -106
  14. package/esm2020/lib/formly/field/value/date/datetime.field.mjs +31 -4
  15. package/esm2020/lib/formly/field/value/date/datetime.field.service.mjs +31 -0
  16. package/esm2020/lib/formly/field/value/date/datetime.mjs +26 -0
  17. package/esm2020/lib/formly/field/value/date/datetime.preset.mjs +31 -0
  18. package/esm2020/lib/formly/field/value/date/fixeddaterange.field.component.mjs +451 -0
  19. package/esm2020/lib/formly/field/value/date/index.mjs +5 -1
  20. package/fesm2015/dereekb-dbx-form-calendar.mjs +39 -17
  21. package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
  22. package/fesm2015/dereekb-dbx-form.mjs +647 -66
  23. package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
  24. package/fesm2020/dereekb-dbx-form-calendar.mjs +39 -17
  25. package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
  26. package/fesm2020/dereekb-dbx-form.mjs +643 -60
  27. package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
  28. package/lib/form/action/form.action.directive.d.ts +13 -7
  29. package/lib/formly/field/value/date/_date.scss +29 -0
  30. package/lib/formly/field/value/date/date.field.module.d.ts +18 -17
  31. package/lib/formly/field/value/date/date.value.d.ts +20 -0
  32. package/lib/formly/field/value/date/datetime.d.ts +56 -0
  33. package/lib/formly/field/value/date/datetime.field.component.d.ts +31 -27
  34. package/lib/formly/field/value/date/datetime.field.d.ts +8 -4
  35. package/lib/formly/field/value/date/datetime.field.service.d.ts +15 -0
  36. package/lib/formly/field/value/date/datetime.preset.d.ts +2 -0
  37. package/lib/formly/field/value/date/fixeddaterange.field.component.d.ts +154 -0
  38. package/lib/formly/field/value/date/index.d.ts +4 -0
  39. package/mapbox/package.json +4 -4
  40. package/package.json +4 -4
@@ -1,12 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, ElementRef, Optional } from '@angular/core';
2
+ import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, ElementRef, Optional, Injectable } 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';
6
6
  import { MatDialogModule } from '@angular/material/dialog';
7
7
  import * as i3 from '@uirouter/core';
8
8
  import * as i2 from '@dereekb/dbx-core';
9
- import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges } from '@dereekb/dbx-core';
9
+ import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges, DbxValuePipeModule } from '@dereekb/dbx-core';
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 } from 'date-fns';
@@ -26,7 +26,7 @@ import * as i1$1 from '@angular/material/button';
26
26
  import { MatButtonModule } from '@angular/material/button';
27
27
  import * as i3$2 from '@angular/flex-layout/flex';
28
28
  import { FlexLayoutModule } from '@angular/flex-layout';
29
- import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, isSelectedDecisionFunctionFactory, readKeysFrom, hasDifferentValues, makeValuesGroupMap, separateValues, filterUniqueValues, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, sortByStringFunction, mergeIntoArray, lastValue, arrayToMap, setContainsAllValues, addToSetCopy, setsAreEquivalent, filterMaybeValues, mergeArrays, cachedGetter, makeGetter, asDecisionFunction, getValueFromGetter, dateFromLogicalDate, WEBSITE_DOMAIN_NAME_REGEX, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, mapMaybeFunction, transformNumberFunction, concatArrays, transformStringFunction, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX, LAT_LNG_PATTERN, BooleanStringKeyArrayUtilityInstance, capitalizeFirstLetter } from '@dereekb/util';
29
+ import { objectIsEmpty, mergeObjectsFunction, filterFromPOJOFunction, mergeObjects, filterFromPOJO, asArray, objectHasNoKeys, addPlusPrefixToNumber, convertMaybeToArray, isSelectedDecisionFunctionFactory, readKeysFrom, hasDifferentValues, makeValuesGroupMap, separateValues, filterUniqueValues, searchStringFilterFunction, caseInsensitiveFilterByIndexOfDecisionFactory, sortByStringFunction, mergeIntoArray, lastValue, arrayToMap, setContainsAllValues, addToSetCopy, setsAreEquivalent, filterMaybeValues, mergeArrays, cachedGetter, makeGetter, asDecisionFunction, getValueFromGetter, asGetter, MS_IN_MINUTE, isMonthDaySlashDate, WEBSITE_DOMAIN_NAME_REGEX, KeyValueTypleValueFilter, valuesFromPOJO, allObjectsAreEqual, isNumberDivisibleBy, nearestDivisibleValues, mapMaybeFunction, transformNumberFunction, concatArrays, transformStringFunction, US_STATE_CODE_STRING_REGEX, ZIP_CODE_STRING_REGEX, LAT_LNG_PATTERN, BooleanStringKeyArrayUtilityInstance, capitalizeFirstLetter } from '@dereekb/util';
30
30
  import * as i2$2 from '@angular/material/slide-toggle';
31
31
  import { MatSlideToggleModule } from '@angular/material/slide-toggle';
32
32
  import * as i2$3 from '@angular/flex-layout/extended';
@@ -34,7 +34,7 @@ import * as i5 from '@angular/material/divider';
34
34
  import { MatDividerModule } from '@angular/material/divider';
35
35
  import * as i4$4 from '@angular/material/autocomplete';
36
36
  import { MatAutocompleteModule } from '@angular/material/autocomplete';
37
- import * as i3$4 from '@angular/material/form-field';
37
+ import * as i4$7 from '@angular/material/form-field';
38
38
  import { MatFormFieldModule } from '@angular/material/form-field';
39
39
  import * as i4$3 from '@angular/material/input';
40
40
  import { MatInputModule } from '@angular/material/input';
@@ -44,13 +44,13 @@ 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, safeToJsDate, isSameDateHoursAndMinutes, guessCurrentTimezone, dateTimezoneUtcNormal, toLocalReadableTimeString, getTimezoneAbbreviation, isSameDateDay, utcDayForDate, readableTimeStringToDate, findMinDate, findMaxDate, dateTimeMinuteDecisionFunction, DateTimeMinuteInstance, allTimezoneInfos, timezoneInfoForSystem, searchTimezoneInfos } from '@dereekb/date';
47
+ import { skipUntilTimeElapsedAfterLastEmission, toJsDate, parseISO8601DayStringToDate, formatToISO8601DateString, formatToISO8601DayString, isSameDateHoursAndMinutes, safeToJsDate, guessCurrentTimezone, dateTimezoneUtcNormal, toLocalReadableTimeString, getTimezoneAbbreviation, isSameDateDay, utcDayForDate, readableTimeStringToDate, findMinDate, dateFromLogicalDate, findMaxDate, dateTimeMinuteDecisionFunction, DateTimeMinuteInstance, limitDateTimeInstance, isSameDateDayRange, dateRange, clampDateRangeToDateRange, isDateInDateRange, isSameDateRange, 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';
51
- import * as i8 from '@angular/material/datepicker';
52
- import { MatDatepickerModule } from '@angular/material/datepicker';
53
- import * as i9 from '@angular/material/menu';
51
+ import * as i5$1 from '@angular/material/datepicker';
52
+ import { MatDatepickerModule, DateRange, MAT_DATE_RANGE_SELECTION_STRATEGY, MatCalendar } from '@angular/material/datepicker';
53
+ import * as i10 from '@angular/material/menu';
54
54
  import { MatMenuModule } from '@angular/material/menu';
55
55
  import * as i4$5 from 'ngx-editor';
56
56
  import { Editor, NgxEditorModule } from 'ngx-editor';
@@ -214,11 +214,16 @@ class DbxActionFormDirective {
214
214
  return combineLatest([validatorObs, modifiedObs]).pipe(first(), map(([valid, modified]) => valid && modified));
215
215
  }
216
216
  readyValue(value) {
217
- return of({ value });
217
+ if (this.dbxActionFormMapValue) {
218
+ return asObservable(this.dbxActionFormMapValue(value));
219
+ }
220
+ else {
221
+ return of({ value: value });
222
+ }
218
223
  }
219
224
  }
220
225
  DbxActionFormDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxActionFormDirective, deps: [{ token: DbxMutableForm, host: true }, { token: i2.DbxActionContextStoreSourceInstance }], target: i0.ɵɵFactoryTarget.Directive });
221
- DbxActionFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: { dbxActionFormValidator: "dbxActionFormValidator", dbxActionFormModified: "dbxActionFormModified", formDisabledOnWorking: "formDisabledOnWorking" }, ngImport: i0 });
226
+ DbxActionFormDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.12", type: DbxActionFormDirective, selector: "[dbxActionForm]", inputs: { dbxActionFormValidator: "dbxActionFormValidator", dbxActionFormModified: "dbxActionFormModified", dbxActionFormMapValue: "dbxActionFormMapValue", formDisabledOnWorking: "formDisabledOnWorking" }, ngImport: i0 });
222
227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxActionFormDirective, decorators: [{
223
228
  type: Directive,
224
229
  args: [{
@@ -230,6 +235,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
230
235
  type: Input
231
236
  }], dbxActionFormModified: [{
232
237
  type: Input
238
+ }], dbxActionFormMapValue: [{
239
+ type: Input
233
240
  }], formDisabledOnWorking: [{
234
241
  type: Input
235
242
  }] } });
@@ -3653,21 +3660,59 @@ export function acceptTermsField({ key = 'accept', label = 'Accept Terms', descr
3653
3660
  }
3654
3661
  */
3655
3662
 
3656
- var DbxDateTimeFieldTimeMode;
3657
- (function (DbxDateTimeFieldTimeMode) {
3658
- /**
3659
- * Time is required.
3660
- */
3661
- DbxDateTimeFieldTimeMode["REQUIRED"] = "required";
3662
- /**
3663
- * Time is optional.
3664
- */
3665
- DbxDateTimeFieldTimeMode["OPTIONAL"] = "optional";
3666
- /**
3667
- * Time is permenantly off.
3668
- */
3669
- DbxDateTimeFieldTimeMode["NONE"] = "none";
3670
- })(DbxDateTimeFieldTimeMode || (DbxDateTimeFieldTimeMode = {}));
3663
+ /**
3664
+ * Creates a DateTimePreset from a DateTimePresetConfiguration
3665
+ *
3666
+ * @param config
3667
+ */
3668
+ function dateTimePreset(config) {
3669
+ let value;
3670
+ if (config.logicalDate) {
3671
+ value = () => ({ logicalDate: getValueFromGetter(config.logicalDate) });
3672
+ }
3673
+ else if (config.timeString) {
3674
+ value = () => ({ timeString: getValueFromGetter(config.timeString) });
3675
+ }
3676
+ else {
3677
+ value = () => ({ logicalDate: 'now' });
3678
+ }
3679
+ if (!config.dynamic) {
3680
+ value = asGetter(value()); // get/calculate the value now and return it if not dynamic
3681
+ }
3682
+ return {
3683
+ label: asGetter(config.label),
3684
+ value
3685
+ };
3686
+ }
3687
+
3688
+ const DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN = new InjectionToken('DbxDateTimeFieldMenuPresetsServicePresets');
3689
+ class DbxDateTimeFieldMenuPresetsService {
3690
+ constructor(initialConfigs) {
3691
+ this.initialConfigs = initialConfigs;
3692
+ this._configurations = new BehaviorSubject(this.initialConfigs ?? []);
3693
+ this.configurations$ = this._configurations.asObservable();
3694
+ }
3695
+ get configurations() {
3696
+ return this._configurations.value;
3697
+ }
3698
+ set configurations(configurations) {
3699
+ this._configurations.next(configurations);
3700
+ }
3701
+ }
3702
+ DbxDateTimeFieldMenuPresetsService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, deps: [{ token: DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
3703
+ DbxDateTimeFieldMenuPresetsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, providedIn: 'root' });
3704
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, decorators: [{
3705
+ type: Injectable,
3706
+ args: [{
3707
+ providedIn: 'root'
3708
+ }]
3709
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
3710
+ type: Inject,
3711
+ args: [DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN]
3712
+ }, {
3713
+ type: Optional
3714
+ }] }]; } });
3715
+
3671
3716
  var DbxDateTimeValueMode;
3672
3717
  (function (DbxDateTimeValueMode) {
3673
3718
  /**
@@ -3733,6 +3778,28 @@ function dbxDateTimeOutputValueFactory(mode, timezoneInstance) {
3733
3778
  }
3734
3779
  return factory;
3735
3780
  }
3781
+ function dbxDateTimeIsSameDateTimeFieldValue(a, b) {
3782
+ return a && b ? (typeof a === 'string' ? a === b : isSameDateHoursAndMinutes(a, b)) : a == b;
3783
+ }
3784
+ function dbxDateRangeIsSameDateRangeFieldValue(a, b) {
3785
+ return a && b ? dbxDateTimeIsSameDateTimeFieldValue(a.start, b.start) && dbxDateTimeIsSameDateTimeFieldValue(a.end, b.end) : a == b;
3786
+ }
3787
+
3788
+ var DbxDateTimeFieldTimeMode;
3789
+ (function (DbxDateTimeFieldTimeMode) {
3790
+ /**
3791
+ * Time is required.
3792
+ */
3793
+ DbxDateTimeFieldTimeMode["REQUIRED"] = "required";
3794
+ /**
3795
+ * Time is optional.
3796
+ */
3797
+ DbxDateTimeFieldTimeMode["OPTIONAL"] = "optional";
3798
+ /**
3799
+ * Time is permenantly off.
3800
+ */
3801
+ DbxDateTimeFieldTimeMode["NONE"] = "none";
3802
+ })(DbxDateTimeFieldTimeMode || (DbxDateTimeFieldTimeMode = {}));
3736
3803
  function syncConfigValueObs(parseConfigsObs, type) {
3737
3804
  return parseConfigsObs.pipe(switchMap((x) => {
3738
3805
  const config = x.find((y) => y.syncType === type);
@@ -3747,26 +3814,26 @@ function syncConfigValueObs(parseConfigsObs, type) {
3747
3814
  return result;
3748
3815
  }), distinctUntilChanged(), shareReplay(1));
3749
3816
  }
3750
- function isSameDateTimeFieldValue(a, b) {
3751
- return a && b ? (typeof a === 'string' ? a === b : isSameDateHoursAndMinutes(a, b)) : a == b;
3752
- }
3753
- const TIME_OUTPUT_THROTTLE_TIME = 10;
3817
+ const TIME_OUTPUT_THROTTLE_TIME$1 = 10;
3754
3818
  class DbxDateTimeFieldComponent extends FieldType$1 {
3755
- constructor(cdRef) {
3819
+ constructor(cdRef, dbxDateTimeFieldConfigService) {
3756
3820
  super();
3757
3821
  this.cdRef = cdRef;
3822
+ this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
3758
3823
  this._sub = new SubscriptionObject();
3759
3824
  this._valueSub = new SubscriptionObject();
3825
+ this._config = new BehaviorSubject(undefined);
3826
+ this._syncConfigObs = new BehaviorSubject(undefined);
3760
3827
  this._defaultTimezone = new BehaviorSubject(undefined);
3761
- this._customTimezone = new BehaviorSubject(undefined);
3828
+ this._presets = new BehaviorSubject(of([]));
3762
3829
  this._fullDayControlObs = new BehaviorSubject(undefined);
3763
3830
  this.fullDayControl$ = this._fullDayControlObs.pipe(filterMaybe());
3764
3831
  this._offset = new BehaviorSubject(0);
3765
3832
  this._formControlObs = new BehaviorSubject(undefined);
3766
3833
  this.formControl$ = this._formControlObs.pipe(filterMaybe());
3767
3834
  this._updateTime = new Subject();
3768
- this.timezone$ = combineLatest([this._defaultTimezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()), this._customTimezone]).pipe(map(([defaultTimezone, customTimezone]) => {
3769
- return customTimezone ?? defaultTimezone ?? guessCurrentTimezone();
3835
+ this.timezone$ = this._defaultTimezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
3836
+ return defaultTimezone ?? guessCurrentTimezone();
3770
3837
  }), distinctUntilChanged(), shareReplay(1));
3771
3838
  this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
3772
3839
  this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
@@ -3784,8 +3851,6 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3784
3851
  this.timeInputCtrl = new FormControl('', {
3785
3852
  validators: [Validators.pattern(/^(now)$|^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)]
3786
3853
  });
3787
- this._config = new BehaviorSubject(undefined);
3788
- this._syncConfigObs = new BehaviorSubject(undefined);
3789
3854
  this.fullDay$ = this.fullDayControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), distinctUntilChanged(), shareReplay(1));
3790
3855
  this.showTimeInput$ = this.fullDay$.pipe(map((x) => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
3791
3856
  this.showAddTime$ = this.showTimeInput$.pipe(map((x) => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
@@ -3847,12 +3912,12 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3847
3912
  }
3848
3913
  return result;
3849
3914
  }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
3850
- this.config$ = combineLatest([this._config.pipe(switchMapMaybeDefault(), shareReplay(1)), this.dateInputMin$, this.dateInputMax$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
3915
+ this.config$ = combineLatest([this._config.pipe(switchMapMaybeDefault()), this.dateInputMin$, this.dateInputMax$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
3851
3916
  let result = x;
3852
3917
  if (dateInputMin != null || dateInputMax != null) {
3853
3918
  const { min: limitMin, max: limitMax } = x?.limits ?? {};
3854
- const min = findMinDate([dateInputMin, limitMin]);
3855
- const max = findMaxDate([dateInputMax, limitMax]);
3919
+ const min = findMinDate([dateInputMin, dateFromLogicalDate(limitMin)]);
3920
+ const max = findMaxDate([dateInputMax, dateFromLogicalDate(limitMax)]);
3856
3921
  result = {
3857
3922
  ...x,
3858
3923
  limits: {
@@ -3874,7 +3939,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3874
3939
  }
3875
3940
  }), shareReplay(1));
3876
3941
  this.defaultPickerFilter = () => true;
3877
- this.timeOutput$ = combineLatest([this.rawDateTime$, this._offset, this.config$]).pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }), distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0), tap(([, stepsOffset]) => (stepsOffset ? this._offset.next(0) : 0)), map(([date, stepsOffset, config]) => {
3942
+ this.timeOutput$ = combineLatest([this.rawDateTime$, this._offset, this.config$]).pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME$1, undefined, { leading: false, trailing: true }), distinctUntilChanged((current, next) => current[0] === next[0] && next[1] === 0), tap(([, stepsOffset]) => (stepsOffset ? this._offset.next(0) : 0)), map(([date, stepsOffset, config]) => {
3878
3943
  if (date != null) {
3879
3944
  const instance = new DateTimeMinuteInstance({
3880
3945
  date,
@@ -3887,6 +3952,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3887
3952
  }
3888
3953
  return date;
3889
3954
  }), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
3955
+ this.presets$ = this._presets.pipe(switchMapMaybeObs(), map((x) => x.map(dateTimePreset)), shareReplay(1));
3890
3956
  }
3891
3957
  get dateLabel() {
3892
3958
  return this.props.dateLabel ?? 'Date';
@@ -3939,16 +4005,17 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
3939
4005
  get showTimezone() {
3940
4006
  return this.field.props.showTimezone ?? true;
3941
4007
  }
3942
- get allowChangeTimezone() {
3943
- return false; // unused
4008
+ get presets() {
4009
+ return this.field.props.presets;
3944
4010
  }
3945
4011
  ngOnInit() {
3946
4012
  this._formControlObs.next(this.formControl);
3947
- this._config.next(this.dateTimeField.getConfigObs?.());
4013
+ const inputPickerConfig = this.dateTimeField.getConfigObs || this.dateTimeField.pickerConfig;
4014
+ this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : undefined);
3948
4015
  this._syncConfigObs.next(this.dateTimeField.getSyncFieldsObs?.());
3949
4016
  this._sub.subscription = this.valueInSystemTimezone$
3950
- .pipe(combineLatestWith(this.timezoneInstance$.pipe(map((timezoneInstance) => dbxDateTimeOutputValueFactory(this.valueMode, timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }), switchMap(([currentValue, valueFactory]) => {
3951
- return this.timeOutput$.pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME * 2, undefined, { leading: false, trailing: true }), skipFirstMaybe(), distinctUntilChanged(isSameDateHoursAndMinutes), map((x) => valueFactory(x)), filter((x) => !isSameDateTimeFieldValue(x, currentValue)));
4017
+ .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]) => {
4018
+ return this.timeOutput$.pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME$1 * 2, undefined, { leading: false, trailing: true }), skipFirstMaybe(), distinctUntilChanged(isSameDateHoursAndMinutes), map((x) => valueFactory(x)), filter((x) => !dbxDateTimeIsSameDateTimeFieldValue(x, currentValue)));
3952
4019
  }))
3953
4020
  .subscribe((value) => {
3954
4021
  this.formControl.setValue(value);
@@ -4002,19 +4069,34 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
4002
4069
  this.addTime();
4003
4070
  break;
4004
4071
  }
4072
+ if (this.presets != null) {
4073
+ this._presets.next(asObservableFromGetter(this.presets));
4074
+ }
4075
+ else {
4076
+ this._presets.next(this.dbxDateTimeFieldConfigService.configurations$);
4077
+ }
4005
4078
  }
4006
4079
  ngOnDestroy() {
4007
4080
  super.ngOnDestroy();
4081
+ this._sub.destroy();
4082
+ this._valueSub.destroy();
4083
+ this._config.complete();
4008
4084
  this._defaultTimezone.complete();
4009
- this._customTimezone.complete();
4085
+ this._presets.complete();
4010
4086
  this._fullDayControlObs.complete();
4011
4087
  this._offset.complete();
4012
4088
  this._formControlObs.complete();
4013
- this._config.complete();
4014
4089
  this._updateTime.complete();
4015
4090
  this._syncConfigObs.complete();
4016
- this._sub.destroy();
4017
- this._valueSub.destroy();
4091
+ }
4092
+ selectPreset(preset) {
4093
+ const value = preset.value();
4094
+ if (value.logicalDate) {
4095
+ this.setLogicalTime(value.logicalDate);
4096
+ }
4097
+ else if (value.timeString) {
4098
+ this.setTime(value.timeString);
4099
+ }
4018
4100
  }
4019
4101
  datePicked(event) {
4020
4102
  const date = event.value;
@@ -4111,17 +4193,449 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
4111
4193
  });
4112
4194
  }
4113
4195
  }
4114
- DbxDateTimeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
4115
- DbxDateTimeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxDateTimeFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n <!-- Additional spacing -->\n <dbx-button-spacer *ngIf=\"!dateOnly\"></dbx-button-spacer>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button class=\"dbx-button-spacer\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\" [ngClass]=\"{ 'dbx-datetime-row-field-full-width': hideDatePicker }\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <span matSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button class=\"dbx-button-spacer\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <button mat-menu-item (click)=\"setLogicalTime('now')\">\n <span>Now</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00AM')\">\n <span>Midnight</span>\n </button>\n <button mat-menu-item (click)=\"setTime('6:00AM')\">\n <span>6:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('8:00AM')\">\n <span>8:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('10:00AM')\">\n <span>10:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00PM')\">\n <span>Noon</span>\n </button>\n <button mat-menu-item (click)=\"setTime('2:00PM')\">\n <span>2:00PM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('5:00PM')\">\n <span>5:00PM</span>\n </button>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <span matSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n", 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: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i3$4.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$4.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$1.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: "component", type: i8.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i8.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i9.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i9.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i9.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i2.DateDistancePipe, name: "dateDistance" }, { kind: "pipe", type: i2.TimeDistancePipe, name: "timeDistance" }] });
4196
+ DbxDateTimeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: DbxDateTimeFieldMenuPresetsService }], target: i0.ɵɵFactoryTarget.Component });
4197
+ DbxDateTimeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxDateTimeFieldComponent, selector: "ng-component", usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n <!-- Additional spacing -->\n <dbx-button-spacer *ngIf=\"!dateOnly\"></dbx-button-spacer>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button class=\"dbx-button-spacer\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\" [ngClass]=\"{ 'dbx-datetime-row-field-full-width': hideDatePicker }\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <span matSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button class=\"dbx-button-spacer\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <ng-container *ngFor=\"let preset of presets$ | async\">\n <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n </ng-container>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <span matSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\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.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i1.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i1.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "component", type: i4$7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$7.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4$7.MatSuffix, selector: "[matSuffix]" }, { kind: "directive", type: i4$3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i2$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i1$1.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: "component", type: i5$1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i5$1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i10.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i10.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i10.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "directive", type: i3$1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: i7.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3$2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i3$2.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i3$2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i2$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "pipe", type: i2.DateDistancePipe, name: "dateDistance" }, { kind: "pipe", type: i2.TimeDistancePipe, name: "timeDistance" }, { kind: "pipe", type: i2.GetValuePipe, name: "getValue" }] });
4116
4198
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, decorators: [{
4117
4199
  type: Component,
4118
- args: [{ template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n <!-- Additional spacing -->\n <dbx-button-spacer *ngIf=\"!dateOnly\"></dbx-button-spacer>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button class=\"dbx-button-spacer\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\" [ngClass]=\"{ 'dbx-datetime-row-field-full-width': hideDatePicker }\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <span matSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button class=\"dbx-button-spacer\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <button mat-menu-item (click)=\"setLogicalTime('now')\">\n <span>Now</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00AM')\">\n <span>Midnight</span>\n </button>\n <button mat-menu-item (click)=\"setTime('6:00AM')\">\n <span>6:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('8:00AM')\">\n <span>8:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('10:00AM')\">\n <span>10:00AM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('12:00PM')\">\n <span>Noon</span>\n </button>\n <button mat-menu-item (click)=\"setTime('2:00PM')\">\n <span>2:00PM</span>\n </button>\n <button mat-menu-item (click)=\"setTime('5:00PM')\">\n <span>5:00PM</span>\n </button>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <span matSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n" }]
4119
- }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
4200
+ args: [{ template: "<div class=\"dbx-datetime-field\" fxLayout=\"row wrap\" fxLayout.xs=\"column wrap\" fxLayoutAlign=\"space-evenly stretch\">\n <!-- Date -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"dateOnly ? '100' : '50'\" *ngIf=\"showDateInput\">\n <ng-container *ngTemplateOutlet=\"dateInputTemplate\"></ng-container>\n <!-- Additional spacing -->\n <dbx-button-spacer *ngIf=\"!dateOnly\"></dbx-button-spacer>\n </div>\n <!-- Time -->\n <div class=\"dbx-datetime-row\" fxFlex.lt-sm=\"100\" [fxFlex]=\"showDateInput ? '50' : '100'\">\n <ng-container *ngIf=\"showTimeInput$ | async\">\n <ng-container *ngTemplateOutlet=\"timeMenuAndInputTemplate\"></ng-container>\n </ng-container>\n <div *ngIf=\"showAddTime$ | async\" class=\"add-time-button-wrapper\">\n <button mat-button class=\"dbx-button-spacer add-time-button\" ngClass.lt-sm=\"add-time-button-full\" (click)=\"addTime()\">\n <mat-icon>timer</mat-icon>\n Add Time\n </button>\n </div>\n </div>\n <div *ngIf=\"!hideDateHint\" class=\"dbx-datetime-row dbx-datetime-hint-row\" fxFlex=\"100\">\n <div class=\"dbx-hint\" [ngSwitch]=\"fullDay$ | async\">\n <small *ngSwitchCase=\"true\">\n <b class=\"dbx-ok\">{{ allDayLabel }}</b>\n {{ displayValue$ | async | date: 'fullDate' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | dateDistance }})\n </small>\n <small *ngSwitchCase=\"false\">\n <ng-container *ngIf=\"displayValue$ | async\">\n <b class=\"dbx-ok\">{{ atTimeLabel }}</b>\n {{ displayValue$ | async | date: 'medium' }} {{ timezoneAbbreviation$ | async }} ({{ displayValue$ | async | timeDistance }})\n </ng-container>\n </small>\n </div>\n </div>\n</div>\n\n<!-- Date Input Template -->\n<ng-template #dateInputTemplate>\n <button class=\"dbx-button-spacer\" *ngIf=\"!hideDatePicker\" mat-icon-button (click)=\"picker.open()\" [disabled]=\"disabled\">\n <mat-icon>calendar_today</mat-icon>\n </button>\n <mat-form-field class=\"dbx-datetime-row-field\" [ngClass]=\"{ 'dbx-datetime-row-field-full-width': hideDatePicker }\">\n <mat-label>{{ dateLabel }}</mat-label>\n <input #dateInput matInput [min]=\"dateInputMin$ | async\" [max]=\"dateInputMax$ | async\" [matDatepicker]=\"picker\" [matDatepickerFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" (dateChange)=\"datePicked($event)\" [value]=\"dateValue$ | async\" (keydown)=\"keydownOnDateInput($event)\" />\n <mat-datepicker #picker></mat-datepicker>\n <span matSuffix *ngIf=\"!(showTimeInput$ | async)\">\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Time Menu/Input Template -->\n<ng-template #timeMenuAndInputTemplate>\n <button class=\"dbx-button-spacer\" mat-icon-button [matMenuTriggerFor]=\"timemenu\" aria-label=\"opens the time menu\" [disabled]=\"disabled\">\n <mat-icon>timer</mat-icon>\n </button>\n <mat-menu #timemenu=\"matMenu\">\n <ng-container *ngIf=\"timeMode === 'optional'\">\n <button mat-menu-item (click)=\"removeTime()\">\n <span>Remove Time</span>\n </button>\n <mat-divider></mat-divider>\n </ng-container>\n <ng-container *ngFor=\"let preset of presets$ | async\">\n <button mat-menu-item (click)=\"selectPreset(preset)\">{{ preset.label | getValue }}</button>\n </ng-container>\n </mat-menu>\n <mat-form-field class=\"dbx-datetime-row-field\">\n <mat-label>{{ timeLabel }}</mat-label>\n <input #timeInput matInput [formControl]=\"timeInputCtrl\" (focus)=\"focusTime()\" (focusout)=\"focusOutTime()\" (keydown)=\"keydownOnTimeInput($event)\" />\n <span matSuffix>\n <ng-container *ngTemplateOutlet=\"timezoneSuffixTemplate\"></ng-container>\n </span>\n </mat-form-field>\n</ng-template>\n\n<!-- Timezone Suffix -->\n<ng-template #timezoneSuffixTemplate>\n <span *ngIf=\"showTimezone\" class=\"dbx-datetime-timezone dbx-faint\">{{ timezoneAbbreviation$ | async }}</span>\n</ng-template>\n" }]
4201
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: DbxDateTimeFieldMenuPresetsService }]; } });
4202
+
4203
+ function dbxFixedDateRangeInputValueFactory(mode, timezoneInstance) {
4204
+ const dateInputTransformer = dbxDateTimeInputValueParseFactory(mode, timezoneInstance);
4205
+ return (y) => {
4206
+ let result;
4207
+ if (y) {
4208
+ result = {
4209
+ start: dateInputTransformer(y.start),
4210
+ end: dateInputTransformer(y.end)
4211
+ };
4212
+ }
4213
+ return result;
4214
+ };
4215
+ }
4216
+ function dbxFixedDateRangeOutputValueFactory(mode, timezoneInstance) {
4217
+ const dateOutputTransformer = dbxDateTimeOutputValueFactory(mode, timezoneInstance);
4218
+ return (y) => {
4219
+ let result;
4220
+ if (y) {
4221
+ result = {
4222
+ start: dateOutputTransformer(y.start),
4223
+ end: dateOutputTransformer(y.end)
4224
+ };
4225
+ }
4226
+ return result;
4227
+ };
4228
+ }
4229
+ const TIME_OUTPUT_THROTTLE_TIME = 10;
4230
+ class DbxFixedDateRangeFieldComponent extends FieldType$1 {
4231
+ constructor(dbxDateTimeFieldConfigService) {
4232
+ super();
4233
+ this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
4234
+ this._sub = new SubscriptionObject();
4235
+ this._inputRangeFormSub = new SubscriptionObject();
4236
+ this._inputRangeFormValueSub = new SubscriptionObject();
4237
+ this._dateRangeInputSub = new SubscriptionObject();
4238
+ this._currentSelectionModeSub = new SubscriptionObject();
4239
+ this._latestBoundarySub = new SubscriptionObject();
4240
+ this._disableEndSub = new SubscriptionObject();
4241
+ this._activeDateSub = new SubscriptionObject();
4242
+ this._currentDateRangeInput = {};
4243
+ this._currentSelectionMode = 'single';
4244
+ this._latestBoundary = null;
4245
+ this._config = new BehaviorSubject(undefined);
4246
+ this._selectionMode = new BehaviorSubject(undefined);
4247
+ this._dateRangeInput = new BehaviorSubject(undefined);
4248
+ this._timezone = new BehaviorSubject(undefined);
4249
+ this._presets = new BehaviorSubject(of([]));
4250
+ this._selectedDateRange = new Subject();
4251
+ this._formControlObs = new BehaviorSubject(undefined);
4252
+ this.formControl$ = this._formControlObs.pipe(filterMaybe());
4253
+ this.config$ = this._config.pipe(filterMaybe(), switchMap((x) => x), distinctUntilChanged(), shareReplay(1));
4254
+ this.limitDateTimeInstance$ = this.config$.pipe(map(limitDateTimeInstance), shareReplay(1));
4255
+ this.selectionMode$ = this._selectionMode.pipe(switchMapMaybeDefault('single'), map((x) => x ?? 'single'), distinctUntilChanged(), shareReplay(1));
4256
+ this.dateRangeInput$ = this._dateRangeInput.pipe(switchMapMaybeDefault(), shareReplay(1));
4257
+ this.timezone$ = this._timezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
4258
+ return defaultTimezone ?? guessCurrentTimezone();
4259
+ }), distinctUntilChanged(), shareReplay(1));
4260
+ this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
4261
+ this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
4262
+ return x.pipe(map(dbxFixedDateRangeInputValueFactory(this.valueMode, timezoneInstance)));
4263
+ }), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
4264
+ distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4265
+ this.startDate$ = this.valueInSystemTimezone$.pipe(map((x) => x?.start ?? null), distinctUntilChanged(), filterMaybe(), shareReplay(1));
4266
+ this.fullBoundary$ = this.dateRangeSelectionForMode('single').pipe(shareReplay(1));
4267
+ this.latestBoundary$ = this.selectionMode$.pipe(switchMap((mode) => {
4268
+ if (mode === 'arbitrary_quick') {
4269
+ // in arbitrary_quick mode, the latest value is the boundary, since we always set the value immediately.
4270
+ return this.valueInSystemTimezone$;
4271
+ }
4272
+ else {
4273
+ return this.fullBoundary$;
4274
+ }
4275
+ }));
4276
+ this.dateRangeSelection$ = this.selectionMode$.pipe(switchMap((mode) => this.dateRangeSelectionForMode(mode)));
4277
+ this.calendarSelection$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? new DateRange(x.start, x.end) : null)), shareReplay(1));
4278
+ this.endDisabled$ = this.selectionMode$.pipe(map((x) => x === 'single'), distinctUntilChanged(), shareReplay(1));
4279
+ this.inputRangeForm = new FormGroup({
4280
+ start: new FormControl(null),
4281
+ end: new FormControl(null)
4282
+ });
4283
+ this.minMaxRange$ = this.limitDateTimeInstance$.pipe(combineLatestWith(timer(MS_IN_MINUTE)), // refresh every minute
4284
+ map(([x]) => x.dateRange()), distinctUntilChanged(isSameDateDayRange), shareReplay(1));
4285
+ this.min$ = this.minMaxRange$.pipe(map((x) => x?.start ?? null), distinctUntilChanged(), shareReplay(1));
4286
+ this.max$ = this.minMaxRange$.pipe(map((x) => x?.end ?? null), distinctUntilChanged(), shareReplay(1));
4287
+ this.pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
4288
+ if (x) {
4289
+ const filter = dateTimeMinuteDecisionFunction(x);
4290
+ return (x) => (x != null ? filter(x) : true);
4291
+ }
4292
+ else {
4293
+ return () => true;
4294
+ }
4295
+ }), shareReplay(1));
4296
+ this.defaultPickerFilter = () => true;
4297
+ }
4298
+ get currentDateRangeInput() {
4299
+ return this._currentDateRangeInput;
4300
+ }
4301
+ get currentSelectionMode() {
4302
+ return this._currentSelectionMode;
4303
+ }
4304
+ get latestBoundary() {
4305
+ return this._latestBoundary;
4306
+ }
4307
+ dateRangeSelectionForMode(mode) {
4308
+ const result = combineLatest([this.dateRangeInput$, this.limitDateTimeInstance$]).pipe(switchMap(([dateRangeInput, limitInstance]) => {
4309
+ const minMaxClamp = (dateRange) => limitInstance.clampDateRange(dateRange);
4310
+ if (mode === 'single') {
4311
+ // only use the start date.
4312
+ return this._selectedDateRange.pipe(distinctUntilChanged(isSameDateDayRange), map((inputDateRange) => {
4313
+ const date = inputDateRange?.start;
4314
+ return date ? minMaxClamp(dateRange({ ...dateRangeInput, date })) : null;
4315
+ }));
4316
+ }
4317
+ else {
4318
+ // take the first date, then wait unless the date is outside of the range.
4319
+ return this._selectedDateRange.pipe(scan((acc, nextDateRange) => {
4320
+ let result;
4321
+ if (nextDateRange && nextDateRange.start != null) {
4322
+ const { start: startOrNextDate, end } = nextDateRange;
4323
+ const potentialBoundary = dateRange({ ...dateRangeInput, date: startOrNextDate });
4324
+ // only comes through when passed by the text inputs
4325
+ if (startOrNextDate && end) {
4326
+ const range = clampDateRangeToDateRange(nextDateRange, potentialBoundary);
4327
+ result = {
4328
+ lastDateRange: nextDateRange,
4329
+ boundary: range,
4330
+ range
4331
+ };
4332
+ }
4333
+ else {
4334
+ let range = undefined;
4335
+ let boundary = potentialBoundary;
4336
+ if (acc.boundary && isDateInDateRange(startOrNextDate, acc.boundary)) {
4337
+ // if in the date range, uses the pick as the last date.
4338
+ range = {
4339
+ start: acc.boundary.start,
4340
+ end: startOrNextDate
4341
+ };
4342
+ if (mode === 'arbitrary_quick') {
4343
+ // modify boundary to match range
4344
+ if (isSameDateRange(acc.range, range) && isSameDateDay(range.end, startOrNextDate)) {
4345
+ // if we clicked on the end range, then expand the boundary again to the full range.
4346
+ range = dateRange({ ...dateRangeInput, date: range.start });
4347
+ boundary = range;
4348
+ }
4349
+ else {
4350
+ boundary = range;
4351
+ }
4352
+ }
4353
+ else {
4354
+ boundary = acc.boundary;
4355
+ }
4356
+ }
4357
+ else if (mode === 'arbitrary_quick') {
4358
+ range = potentialBoundary;
4359
+ }
4360
+ result = {
4361
+ lastDateRange: nextDateRange,
4362
+ boundary,
4363
+ range
4364
+ };
4365
+ }
4366
+ }
4367
+ else {
4368
+ result = {
4369
+ lastDateRange: nextDateRange
4370
+ };
4371
+ }
4372
+ if (result) {
4373
+ result = {
4374
+ lastDateRange: result.lastDateRange,
4375
+ boundary: result.boundary ? minMaxClamp(result.boundary) : undefined,
4376
+ range: result.range ? minMaxClamp(result.range) : undefined
4377
+ };
4378
+ }
4379
+ return result;
4380
+ }, {}), filter((x) => !x.lastDateRange || x.range != null), // pass through null/date clearings or ranges
4381
+ map((x) => x.range ?? null) // return the range
4382
+ );
4383
+ }
4384
+ }));
4385
+ return result;
4386
+ }
4387
+ get fixedDateRangeField() {
4388
+ return this.field.props;
4389
+ }
4390
+ get selectionMode() {
4391
+ return this.field.props.selectionMode;
4392
+ }
4393
+ get valueMode() {
4394
+ return this.field.props.valueMode ?? DbxDateTimeValueMode.DATE;
4395
+ }
4396
+ get description() {
4397
+ return this.field.props.description;
4398
+ }
4399
+ get timezone() {
4400
+ return this.field.props.timezone;
4401
+ }
4402
+ get showTimezone() {
4403
+ return this.field.props.showTimezone ?? true;
4404
+ }
4405
+ get presets() {
4406
+ return this.field.props.presets;
4407
+ }
4408
+ get showRangeInput() {
4409
+ return this.field.props.showRangeInput ?? true;
4410
+ }
4411
+ ngOnInit() {
4412
+ this._formControlObs.next(this.formControl);
4413
+ const dateRangeSelection = this.dateRangeSelection$.pipe(shareReplay(1));
4414
+ const setInputFormValue = (value) => {
4415
+ if (!isSameDateDayRange(value, this.inputRangeForm.value)) {
4416
+ this.inputRangeForm.setValue({
4417
+ start: value?.start ?? null,
4418
+ end: value?.end ?? null
4419
+ });
4420
+ }
4421
+ };
4422
+ this._sub.subscription = this.valueInSystemTimezone$
4423
+ .pipe(combineLatestWith(this.timezoneInstance$.pipe(map((timezoneInstance) => dbxFixedDateRangeOutputValueFactory(this.valueMode, timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }), switchMap(([currentValue, valueFactory]) => {
4424
+ return dateRangeSelection.pipe(skipFirstMaybe(), distinctUntilChanged(isSameDateDayRange), map((x) => [x, currentValue, valueFactory]));
4425
+ }))
4426
+ .subscribe(([rawValue, currentValue, valueFactory]) => {
4427
+ const value = rawValue ? valueFactory(rawValue) : null;
4428
+ const isSameRange = dbxDateRangeIsSameDateRangeFieldValue(value, currentValue);
4429
+ if (!isSameRange) {
4430
+ this.formControl.setValue(value);
4431
+ this.formControl.markAsDirty();
4432
+ this.formControl.markAsTouched();
4433
+ }
4434
+ else if (rawValue != null) {
4435
+ // update the input text again
4436
+ setInputFormValue(rawValue);
4437
+ }
4438
+ });
4439
+ if (this.selectionMode) {
4440
+ this._selectionMode.next(asObservableFromGetter(this.selectionMode));
4441
+ }
4442
+ this._currentSelectionModeSub.subscription = this.selectionMode$.subscribe((x) => (this._currentSelectionMode = x));
4443
+ this._dateRangeInputSub.subscription = this.dateRangeInput$.subscribe((x) => (this._currentDateRangeInput = x));
4444
+ this._inputRangeFormSub.subscription = this.valueInSystemTimezone$.subscribe((x) => {
4445
+ setInputFormValue(x);
4446
+ });
4447
+ if (this.showRangeInput) {
4448
+ this._inputRangeFormValueSub.subscription = this.valueInSystemTimezone$
4449
+ .pipe(throttleTime(100), // throttle to prevent the value from changing too fast
4450
+ switchMap(() => {
4451
+ return this.inputRangeForm.valueChanges.pipe(debounceTime(500), filter(() => {
4452
+ const startString = this.startDateInputElement.nativeElement?.value;
4453
+ let valid = isMonthDaySlashDate(startString);
4454
+ if (valid && this._currentSelectionMode !== 'single') {
4455
+ const endString = this.endDateInputElement.nativeElement?.value;
4456
+ valid = isMonthDaySlashDate(endString);
4457
+ }
4458
+ return valid; // must be a valid text input
4459
+ }), map((x) => x));
4460
+ }), distinctUntilChanged(isSameDateRange))
4461
+ .subscribe((x) => {
4462
+ if (this._currentSelectionMode === 'single') {
4463
+ this.setDateRange(x?.start ? { start: x.start } : null);
4464
+ }
4465
+ else {
4466
+ let rangeToSet = x;
4467
+ if (this._currentSelectionMode === 'arbitrary_quick' && this._latestBoundary && x?.start && x?.end) {
4468
+ if (!isDateInDateRange(x.start, this._latestBoundary)) {
4469
+ // if the end date it outside of the current range (i.e. a range was typed in only to the start date) then set the end to the boundary end
4470
+ const boundary = dateRange({ ...this._currentDateRangeInput, date: x.start });
4471
+ rangeToSet = { start: x.start, end: boundary.end };
4472
+ }
4473
+ }
4474
+ this.setDateRange(rangeToSet);
4475
+ }
4476
+ });
4477
+ }
4478
+ this._latestBoundarySub.subscription = this.latestBoundary$.subscribe((x) => (this._latestBoundary = x));
4479
+ this._dateRangeInput.next(asObservableFromGetter(this.fixedDateRangeField.dateRangeInput));
4480
+ this._disableEndSub.subscription = this.endDisabled$.subscribe((disabled) => {
4481
+ const end = this.inputRangeForm.get('end');
4482
+ if (end) {
4483
+ if (disabled) {
4484
+ end.disable();
4485
+ }
4486
+ else {
4487
+ end.enable();
4488
+ }
4489
+ }
4490
+ });
4491
+ const inputPickerConfig = this.fixedDateRangeField.pickerConfig;
4492
+ this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : undefined);
4493
+ // Set default timezone if provided.
4494
+ if (this.timezone && !this.fixedDateRangeField.fullDayInUTC) {
4495
+ this._timezone.next(asObservableFromGetter(this.timezone));
4496
+ }
4497
+ // Watch for disabled changes so we can propogate them properly.
4498
+ this.formControl.registerOnDisabledChange((disabled) => {
4499
+ if (disabled) {
4500
+ this.inputRangeForm.disable();
4501
+ }
4502
+ else {
4503
+ this.inputRangeForm.enable();
4504
+ this.endDisabled$.pipe(first()).subscribe((disabled) => {
4505
+ const end = this.inputRangeForm.get('end');
4506
+ if (end) {
4507
+ if (disabled) {
4508
+ end.disable();
4509
+ }
4510
+ else {
4511
+ end.enable();
4512
+ }
4513
+ }
4514
+ });
4515
+ }
4516
+ });
4517
+ if (this.presets != null) {
4518
+ this._presets.next(asObservableFromGetter(this.presets));
4519
+ }
4520
+ else {
4521
+ this._presets.next(this.dbxDateTimeFieldConfigService.configurations$);
4522
+ }
4523
+ this._activeDateSub.subscription = this.startDate$.subscribe((x) => {
4524
+ this.calendar.activeDate = x;
4525
+ });
4526
+ }
4527
+ ngOnDestroy() {
4528
+ super.ngOnDestroy();
4529
+ this._sub.destroy();
4530
+ this._inputRangeFormSub.destroy();
4531
+ this._inputRangeFormValueSub.destroy();
4532
+ this._dateRangeInputSub.destroy();
4533
+ this._currentSelectionModeSub.destroy();
4534
+ this._latestBoundarySub.destroy();
4535
+ this._disableEndSub.destroy();
4536
+ this._activeDateSub.destroy();
4537
+ this._config.complete();
4538
+ this._selectionMode.complete();
4539
+ this._dateRangeInput.complete();
4540
+ this._timezone.complete();
4541
+ this._presets.complete();
4542
+ this._selectedDateRange.complete();
4543
+ this._formControlObs.complete();
4544
+ }
4545
+ selectedChange(date) {
4546
+ this.setDateRange(date ? { start: date } : null);
4547
+ }
4548
+ setDateRange(dateRange) {
4549
+ this._selectedDateRange.next(dateRange);
4550
+ }
4551
+ _createDateRange(date) {
4552
+ return date ? dateRange({ ...this._currentDateRangeInput, date }) : undefined;
4553
+ }
4554
+ }
4555
+ DbxFixedDateRangeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, deps: [{ token: DbxDateTimeFieldMenuPresetsService }], target: i0.ɵɵFactoryTarget.Component });
4556
+ DbxFixedDateRangeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFixedDateRangeFieldComponent, selector: "ng-component", providers: [
4557
+ {
4558
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
4559
+ useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
4560
+ }
4561
+ ], viewQueries: [{ propertyName: "calendar", first: true, predicate: MatCalendar, descendants: true }, { propertyName: "startDateInputElement", first: true, predicate: ["startDateInput"], descendants: true, read: ElementRef }, { propertyName: "endDateInputElement", first: true, predicate: ["endDateInput"], descendants: true, read: ElementRef }], usesInheritance: true, ngImport: i0, template: "<div class=\"dbx-fixeddaterange-field\">\n <mat-calendar #calendarView [selected]=\"calendarSelection$ | async\" [dateFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" [minDate]=\"min$ | async\" [maxDate]=\"max$ | async\" (selectedChange)=\"selectedChange($event)\"></mat-calendar>\n <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n <mat-date-range-input *ngIf=\"showRangeInput\" [formGroup]=\"inputRangeForm\">\n <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input #endDateInput [ngClass]=\"(endDisabled$ | async) ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"(endDisabled$ | async) ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n </mat-form-field>\n <mat-error *ngIf=\"formControl.hasError('required')\">Date range is required</mat-error>\n</div>\n", 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: i3$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { 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: i4$7.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$7.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "component", type: i5$1.MatCalendar, selector: "mat-calendar", inputs: ["headerComponent", "startAt", "startView", "selected", "minDate", "maxDate", "dateFilter", "dateClass", "comparisonStart", "comparisonEnd"], outputs: ["selectedChange", "yearSelected", "monthSelected", "viewChanged", "_userSelection"], exportAs: ["matCalendar"] }, { kind: "component", type: i5$1.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i5$1.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i5$1.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { 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: "directive", type: i2$3.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] });
4562
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, decorators: [{
4563
+ type: Component,
4564
+ args: [{ providers: [
4565
+ {
4566
+ provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
4567
+ useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
4568
+ }
4569
+ ], template: "<div class=\"dbx-fixeddaterange-field\">\n <mat-calendar #calendarView [selected]=\"calendarSelection$ | async\" [dateFilter]=\"(pickerFilter$ | async) || defaultPickerFilter\" [minDate]=\"min$ | async\" [maxDate]=\"max$ | async\" (selectedChange)=\"selectedChange($event)\"></mat-calendar>\n <mat-form-field class=\"dbx-fixeddaterange-field-input\" appearance=\"fill\">\n <mat-date-range-input *ngIf=\"showRangeInput\" [formGroup]=\"inputRangeForm\">\n <input #startDateInput matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input #endDateInput [ngClass]=\"(endDisabled$ | async) ? 'dbx-fixeddaterange-field-input-end' : ''\" [attr.tabindex]=\"(endDisabled$ | async) ? -1 : 0\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n </mat-form-field>\n <mat-error *ngIf=\"formControl.hasError('required')\">Date range is required</mat-error>\n</div>\n" }]
4570
+ }], ctorParameters: function () { return [{ type: DbxDateTimeFieldMenuPresetsService }]; }, propDecorators: { calendar: [{
4571
+ type: ViewChild,
4572
+ args: [MatCalendar]
4573
+ }], startDateInputElement: [{
4574
+ type: ViewChild,
4575
+ args: ['startDateInput', { read: ElementRef }]
4576
+ }], endDateInputElement: [{
4577
+ type: ViewChild,
4578
+ args: ['endDateInput', { read: ElementRef }]
4579
+ }] } });
4580
+ class DbxFixedDateRangeFieldSelectionStrategy {
4581
+ constructor(_dateAdapter, dbxFixedDateRangeFieldComponent) {
4582
+ this._dateAdapter = _dateAdapter;
4583
+ this.dbxFixedDateRangeFieldComponent = dbxFixedDateRangeFieldComponent;
4584
+ }
4585
+ selectionFinished(date, currentRange, event) {
4586
+ // unused
4587
+ return currentRange;
4588
+ }
4589
+ createPreview(activeDate, currentRange, event) {
4590
+ if (activeDate != null && this.dbxFixedDateRangeFieldComponent.currentSelectionMode !== 'single') {
4591
+ const latestBoundary = this.dbxFixedDateRangeFieldComponent.latestBoundary;
4592
+ const date = this.dateFromAdapterDate(activeDate);
4593
+ if (latestBoundary && isDateInDateRange(date, latestBoundary)) {
4594
+ const exampleDateRange = this._createDateRange(latestBoundary);
4595
+ return exampleDateRange;
4596
+ }
4597
+ }
4598
+ return this._createDateRangeWithDate(activeDate);
4599
+ }
4600
+ _createDateRangeWithDate(input) {
4601
+ let dateRange;
4602
+ if (input) {
4603
+ const date = this.dateFromAdapterDate(input);
4604
+ dateRange = this.dbxFixedDateRangeFieldComponent._createDateRange(date);
4605
+ }
4606
+ return this._createDateRange(dateRange);
4607
+ }
4608
+ _createDateRange(input) {
4609
+ if (input) {
4610
+ return new DateRange(this.adapterDateFromDate(input.start), this.adapterDateFromDate(input.end));
4611
+ }
4612
+ else {
4613
+ return new DateRange(null, null);
4614
+ }
4615
+ }
4616
+ dateFromAdapterDate(input) {
4617
+ const day = this._dateAdapter.getDate(input);
4618
+ const monthIndex = this._dateAdapter.getMonth(input);
4619
+ const year = this._dateAdapter.getYear(input);
4620
+ return new Date(year, monthIndex, day);
4621
+ }
4622
+ adapterDateFromDate(date) {
4623
+ const day = date.getDate();
4624
+ const monthIndex = date.getMonth();
4625
+ const year = date.getFullYear();
4626
+ return this._dateAdapter.createDate(year, monthIndex, day);
4627
+ }
4628
+ }
4629
+ DbxFixedDateRangeFieldSelectionStrategy.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, deps: [{ token: i4$1.DateAdapter }, { token: DbxFixedDateRangeFieldComponent }], target: i0.ɵɵFactoryTarget.Injectable });
4630
+ DbxFixedDateRangeFieldSelectionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy });
4631
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, decorators: [{
4632
+ type: Injectable
4633
+ }], ctorParameters: function () { return [{ type: i4$1.DateAdapter }, { type: DbxFixedDateRangeFieldComponent }]; } });
4120
4634
 
4121
4635
  class DbxFormFormlyDateFieldModule {
4122
4636
  }
4123
4637
  DbxFormFormlyDateFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
4124
- DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent], imports: [CommonModule,
4638
+ DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent], imports: [CommonModule,
4125
4639
  FormsModule,
4126
4640
  MatInputModule,
4127
4641
  MatDividerModule,
@@ -4133,6 +4647,7 @@ DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
4133
4647
  MatMenuModule,
4134
4648
  ReactiveFormsModule,
4135
4649
  DbxDatePipeModule,
4650
+ DbxValuePipeModule,
4136
4651
  MatChipsModule,
4137
4652
  MatIconModule,
4138
4653
  FlexLayoutModule, i1$2.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
@@ -4148,11 +4663,16 @@ DbxFormFormlyDateFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
4148
4663
  MatMenuModule,
4149
4664
  ReactiveFormsModule,
4150
4665
  DbxDatePipeModule,
4666
+ DbxValuePipeModule,
4151
4667
  MatChipsModule,
4152
4668
  MatIconModule,
4153
4669
  FlexLayoutModule,
4154
4670
  FormlyModule.forChild({
4155
- types: [{ name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] }]
4671
+ types: [
4672
+ //
4673
+ { name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] },
4674
+ { name: 'fixeddaterange', component: DbxFixedDateRangeFieldComponent, wrappers: ['style', 'form-field'] }
4675
+ ]
4156
4676
  }), DbxFormFormlyWrapperModule] });
4157
4677
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, decorators: [{
4158
4678
  type: NgModule,
@@ -4170,14 +4690,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
4170
4690
  MatMenuModule,
4171
4691
  ReactiveFormsModule,
4172
4692
  DbxDatePipeModule,
4693
+ DbxValuePipeModule,
4173
4694
  MatChipsModule,
4174
4695
  MatIconModule,
4175
4696
  FlexLayoutModule,
4176
4697
  FormlyModule.forChild({
4177
- types: [{ name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] }]
4698
+ types: [
4699
+ //
4700
+ { name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] },
4701
+ { name: 'fixeddaterange', component: DbxFixedDateRangeFieldComponent, wrappers: ['style', 'form-field'] }
4702
+ ]
4178
4703
  })
4179
4704
  ],
4180
- declarations: [DbxDateTimeFieldComponent],
4705
+ declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent],
4181
4706
  exports: [DbxFormFormlyWrapperModule]
4182
4707
  }]
4183
4708
  }] });
@@ -4197,7 +4722,7 @@ function timeOnlyField(config = {}) {
4197
4722
  });
4198
4723
  }
4199
4724
  function dateTimeField(config = {}) {
4200
- const { key = 'date', dateLabel, timeLabel, allDayLabel, atTimeLabel, timezone, showTimezone, timeMode = DbxDateTimeFieldTimeMode.REQUIRED, valueMode, fullDayInUTC, fullDayFieldName, getConfigObs, getSyncFieldsObs, hideDatePicker, hideDateHint, timeOnly = false, materialFormField } = config;
4725
+ const { key = 'date', dateLabel, timeLabel, allDayLabel, atTimeLabel, timezone, showTimezone, timeMode = DbxDateTimeFieldTimeMode.REQUIRED, valueMode, fullDayInUTC, fullDayFieldName, pickerConfig, getConfigObs, getSyncFieldsObs, hideDatePicker, hideDateHint, timeOnly = false, presets, materialFormField } = config;
4201
4726
  const fieldConfig = formlyField({
4202
4727
  key,
4203
4728
  type: 'datetime',
@@ -4210,6 +4735,7 @@ function dateTimeField(config = {}) {
4210
4735
  atTimeLabel,
4211
4736
  valueMode,
4212
4737
  timeOnly,
4738
+ presets,
4213
4739
  timeMode: timeOnly ? DbxDateTimeFieldTimeMode.REQUIRED : timeMode,
4214
4740
  timezone,
4215
4741
  showTimezone,
@@ -4217,6 +4743,7 @@ function dateTimeField(config = {}) {
4217
4743
  fullDayInUTC,
4218
4744
  hideDatePicker,
4219
4745
  hideDateHint,
4746
+ pickerConfig,
4220
4747
  getConfigObs,
4221
4748
  getSyncFieldsObs
4222
4749
  })
@@ -4226,7 +4753,7 @@ function dateTimeField(config = {}) {
4226
4753
  });
4227
4754
  }
4228
4755
  function dateRangeField(config = {}) {
4229
- const { required: inputRequired, start, end, timezone, showTimezone } = config;
4756
+ const { required: inputRequired, start, end, timezone, showTimezone, presets } = config;
4230
4757
  const required = inputRequired ?? start?.required ?? false;
4231
4758
  const startFieldKey = start?.key ?? 'start';
4232
4759
  const endFieldKey = end?.key ?? 'end';
@@ -4234,6 +4761,7 @@ function dateRangeField(config = {}) {
4234
4761
  dateLabel: 'Start',
4235
4762
  timeMode: DbxDateTimeFieldTimeMode.NONE,
4236
4763
  getSyncFieldsObs: () => of([{ syncWith: endFieldKey, syncType: 'after' }]),
4764
+ presets,
4237
4765
  ...start,
4238
4766
  timezone,
4239
4767
  showTimezone,
@@ -4244,6 +4772,7 @@ function dateRangeField(config = {}) {
4244
4772
  dateLabel: 'End',
4245
4773
  timeMode: DbxDateTimeFieldTimeMode.NONE,
4246
4774
  getSyncFieldsObs: () => of([{ syncWith: startFieldKey, syncType: 'before' }]),
4775
+ presets,
4247
4776
  ...end,
4248
4777
  timezone,
4249
4778
  showTimezone,
@@ -4256,7 +4785,7 @@ function dateRangeField(config = {}) {
4256
4785
  };
4257
4786
  }
4258
4787
  function dateTimeRangeField(inputConfig = {}) {
4259
- const { required = false, start: inputStart, end: inputEnd, timezone, showTimezone } = inputConfig;
4788
+ const { required = false, start: inputStart, end: inputEnd, timezone, showTimezone, presets } = inputConfig;
4260
4789
  function dateTimeRangeFieldConfig(config) {
4261
4790
  return {
4262
4791
  ...config,
@@ -4282,11 +4811,65 @@ function dateTimeRangeField(inputConfig = {}) {
4282
4811
  const config = {
4283
4812
  timezone,
4284
4813
  showTimezone,
4814
+ presets,
4285
4815
  start,
4286
4816
  end
4287
4817
  };
4288
4818
  return dateRangeField(config);
4289
4819
  }
4820
+ function fixedDateRangeField(config = {}) {
4821
+ const { key = 'dateRange', dateRangeInput, pickerConfig, timezone, selectionMode, showTimezone, valueMode, fullDayInUTC, presets, showRangeInput, materialFormField } = config;
4822
+ const fieldConfig = formlyField({
4823
+ key,
4824
+ type: 'fixeddaterange',
4825
+ ...propsAndConfigForFieldConfig(config, {
4826
+ ...materialFormField,
4827
+ dateRangeInput,
4828
+ pickerConfig,
4829
+ valueMode,
4830
+ presets,
4831
+ timezone,
4832
+ selectionMode,
4833
+ showTimezone,
4834
+ fullDayInUTC,
4835
+ showRangeInput
4836
+ })
4837
+ });
4838
+ return styleWrapper(fieldConfig, {
4839
+ classGetter: 'dbx-mat-form-field-disable-underline dbx-form-fixed-date-range-field-wrapper'
4840
+ });
4841
+ }
4842
+
4843
+ const DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS = [
4844
+ {
4845
+ label: '6:00AM',
4846
+ timeString: '6:00AM'
4847
+ },
4848
+ {
4849
+ label: '8:00AM',
4850
+ timeString: '8:00AM'
4851
+ },
4852
+ {
4853
+ label: '10:00AM',
4854
+ timeString: '10:00AM'
4855
+ },
4856
+ {
4857
+ label: 'Noon',
4858
+ timeString: '12:00PM'
4859
+ },
4860
+ {
4861
+ label: '2:00PM',
4862
+ timeString: '2:00PM'
4863
+ },
4864
+ {
4865
+ label: '5:00PM',
4866
+ timeString: '5:00PM'
4867
+ },
4868
+ {
4869
+ label: 'Midnight',
4870
+ timeString: '12:00AM'
4871
+ }
4872
+ ];
4290
4873
 
4291
4874
  function isTruthy() {
4292
4875
  return (control) => {
@@ -5541,5 +6124,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
5541
6124
  * Generated bundle index. Do not edit.
5542
6125
  */
5543
6126
 
5544
- export { APP_ACTION_FORM_DISABLED_KEY, AUTO_TOUCH_WRAPPER_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective, AbstractFormExpandableSectionWrapperDirective, AbstractFormlyFormDirective, AbstractSyncFormlyFormDirective, AutoTouchFieldWrapperComponent, ChecklistItemFieldDataSetBuilder, DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN, DEFAULT_FORM_DISABLED_KEY, DEFAULT_HAS_VALUE_FN, DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySelectionModule, DbxFormFormlySourceSelectModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyTextFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule, DbxFormInfoWrapperComponent, DbxFormIoModule, DbxFormLayoutModule, DbxFormLoadingSourceDirective, DbxFormModule, DbxFormRepeatArrayTypeComponent, DbxFormSearchFormComponent, DbxFormSectionWrapperComponent, DbxFormSourceDirective, DbxFormSourceSelectFieldComponent, DbxFormSpacerComponent, DbxFormState, DbxFormSubsectionWrapperComponent, DbxFormToggleWrapperComponent, DbxFormValueChangesDirective, DbxFormWorkingWrapperComponent, DbxFormlyContext, DbxFormlyFieldsContextDirective, DbxFormlyFormComponent, DbxFormlyModule, DbxItemListFieldComponent, DbxMutableForm, DbxPhoneFieldComponent, DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent, DbxSearchableChipFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxSearchableTextFieldComponent, DbxTextEditorFieldComponent, EXPANDABLE_WRAPPER_KEY, FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY, FLEX_WRAPPER_KEY, INFO_WRAPPER_KEY, INVALID_PHONE_NUMBER_MESSAGE, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, SECTION_WRAPPER_KEY, STYLE_WRAPPER_KEY, SUBSECTION_WRAPPER_KEY, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, TOGGLE_WRAPPER_KEY, WORKING_WRAPPER_KEY, addValueSelectionOptionFunction, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dateTimeRangeField, dbxDateTimeInputValueParseFactory, dbxDateTimeOutputValueFactory, dbxFormSearchFormFields, dbxFormSourceObservable, dbxFormSourceObservableFromStream, dbxListField, defaultValidationMessages, disableFormlyFieldAutofillAttributes, dollarAmountField, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDivisibleBy, isDomain, isInRange, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, pickableValueFieldValuesConfigForStaticLabeledValues, propsAndConfigForFieldConfig, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, sortPickableItemsByLabelStringFunction, sourceSelectField, stateField, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
6127
+ export { APP_ACTION_FORM_DISABLED_KEY, AUTO_TOUCH_WRAPPER_KEY, AbstractAsyncFormlyFormDirective, AbstractConfigAsyncFormlyFormDirective, AbstractDbxPickableItemFieldDirective, AbstractDbxSearchableFieldDisplayDirective, AbstractDbxSearchableValueFieldDirective, AbstractFormExpandableSectionWrapperDirective, AbstractFormlyFormDirective, AbstractSyncFormlyFormDirective, AutoTouchFieldWrapperComponent, ChecklistItemFieldDataSetBuilder, DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN, DBX_SEARCHABLE_FIELD_COMPONENT_DATA_TOKEN, DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS, DEFAULT_FORM_DISABLED_KEY, DEFAULT_HAS_VALUE_FN, DEFAULT_LAT_LNG_TEXT_FIELD_PATTERN_MESSAGE, DEFAULT_LAT_LNG_TEXT_FIELD_PLACEHOLDER, DEFAULT_PREFERRED_COUNTRIES, DISPLAY_FOR_TIMEZONE_STRING_VALUE, DbxActionFormDirective, DbxActionFormSafetyDirective, DbxChecklistItemContentComponent, DbxChecklistItemFieldComponent, DbxDateTimeFieldComponent, DbxDateTimeFieldMenuPresetsService, DbxDateTimeFieldTimeMode, DbxDateTimeValueMode, DbxDefaultChecklistItemFieldDisplayComponent, DbxDefaultSearchableFieldDisplayComponent, DbxForm, DbxFormActionModule, DbxFormActionTransitionModule, DbxFormComponentFieldComponent, DbxFormExpandWrapperComponent, DbxFormExtensionModule, DbxFormFlexWrapperComponent, DbxFormFormlyArrayFieldModule, DbxFormFormlyBooleanFieldModule, DbxFormFormlyChecklistItemFieldModule, DbxFormFormlyComponentFieldModule, DbxFormFormlyDateFieldModule, DbxFormFormlyDbxListFieldModule, DbxFormFormlyFieldModule, DbxFormFormlyFormModule, DbxFormFormlyNumberFieldModule, DbxFormFormlyPhoneFieldModule, DbxFormFormlyPickableFieldModule, DbxFormFormlySearchableFieldModule, DbxFormFormlySelectionModule, DbxFormFormlySourceSelectModule, DbxFormFormlyTextEditorFieldModule, DbxFormFormlyTextFieldModule, DbxFormFormlyValueModule, DbxFormFormlyWrapperModule, DbxFormInfoWrapperComponent, DbxFormIoModule, DbxFormLayoutModule, DbxFormLoadingSourceDirective, DbxFormModule, DbxFormRepeatArrayTypeComponent, DbxFormSearchFormComponent, DbxFormSectionWrapperComponent, DbxFormSourceDirective, DbxFormSourceSelectFieldComponent, DbxFormSpacerComponent, DbxFormState, DbxFormSubsectionWrapperComponent, DbxFormToggleWrapperComponent, DbxFormValueChangesDirective, DbxFormWorkingWrapperComponent, DbxFormlyContext, DbxFormlyFieldsContextDirective, DbxFormlyFormComponent, DbxFormlyModule, DbxItemListFieldComponent, DbxMutableForm, DbxPhoneFieldComponent, DbxPickableChipListFieldComponent, DbxPickableListFieldComponent, DbxPickableListFieldItemListComponent, DbxPickableListFieldItemListViewComponent, DbxPickableListFieldItemListViewItemComponent, DbxSearchableChipFieldComponent, DbxSearchableFieldAutocompleteItemComponent, DbxSearchableTextFieldComponent, DbxTextEditorFieldComponent, EXPANDABLE_WRAPPER_KEY, FIELD_VALUES_ARE_EQUAL_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_ERROR_VALIDATION_KEY, FIELD_VALUE_IS_AVAILABLE_VALIDATION_KEY, FLEX_WRAPPER_KEY, INFO_WRAPPER_KEY, INVALID_PHONE_NUMBER_MESSAGE, IS_DIVISIBLE_BY_VALIDATION_KEY, LABEL_STRING_MAX_LENGTH, MAX_LENGTH_VALIDATION_MESSAGE, MAX_VALIDATION_MESSAGE, MIN_LENGTH_VALIDATION_MESSAGE, MIN_VALIDATION_MESSAGE, PHONE_LABEL_MAX_LENGTH, REQUIRED_VALIDATION_MESSAGE, SEARCH_STRING_MAX_LENGTH, SECTION_WRAPPER_KEY, STYLE_WRAPPER_KEY, SUBSECTION_WRAPPER_KEY, TAKE_NEXT_UPCOMING_TIME_CONFIG_OBS, TOGGLE_WRAPPER_KEY, WORKING_WRAPPER_KEY, addValueSelectionOptionFunction, addWrapperToFormlyFieldConfig, addressField, addressFormlyFields, addressLineField, addressListField, autoTouchWrapper, checkIsFieldFlexLayoutGroupFieldConfig, checkboxField, checklistItemField, chipTextField, cityField, componentField, countryField, dateRangeField, dateTimeField, dateTimePreset, dateTimeRangeField, dbxDateRangeIsSameDateRangeFieldValue, dbxDateTimeInputValueParseFactory, dbxDateTimeIsSameDateTimeFieldValue, dbxDateTimeOutputValueFactory, dbxFormSearchFormFields, dbxFormSourceObservable, dbxFormSourceObservableFromStream, dbxListField, defaultValidationMessages, disableFormlyFieldAutofillAttributes, dollarAmountField, emailField, expandWrapper, fieldValueIsAvailableValidator, fieldValuesAreEqualValidator, filterPartialPotentialFieldConfigValuesFromObject, filterPickableItemFieldValuesByLabel, filterPickableItemFieldValuesByLabelFilterFunction, fixedDateRangeField, flexLayoutWrapper, formlyField, hiddenField, infoWrapper, isDivisibleBy, isDomain, isInRange, isTruthy, latLngTextField, makeMetaFilterSearchableFieldValueDisplayFn, maxLengthValidationMessage, maxValidationMessage, mergePropsValueObjects, minLengthValidationMessage, minValidationMessage, nameField, numberField, numberFieldTransformParser, partialPotentialFieldConfigKeys, partialPotentialFieldConfigKeysFilter, phoneAndLabelSectionField, phoneField, phoneListField, pickableItemChipField, pickableItemListField, pickableValueFieldValuesConfigForStaticLabeledValues, propsAndConfigForFieldConfig, propsForFieldConfig, propsValueForFieldConfig, provideDbxForm, provideDbxMutableForm, provideFormlyContext, repeatArrayField, searchableChipField, searchableStringChipField, searchableTextField, sectionWrapper, sortPickableItemsByLabel, sortPickableItemsByLabelStringFunction, sourceSelectField, stateField, styleWrapper, subsectionWrapper, syncConfigValueObs, textAreaField, textEditorField, textField, textFieldTransformParser, textIsAvailableField, textPasswordField, textPasswordWithVerifyFieldGroup, textVerifyPasswordField, timeOnlyField, timezoneStringField, timezoneStringSearchFunction, toggleField, toggleWrapper, usernamePasswordLoginFields, validatorsForFieldConfig, valueSelectionField, workingWrapper, wrappedPhoneAndLabelField, zipCodeField };
5545
6128
  //# sourceMappingURL=dereekb-dbx-form.mjs.map