@dereekb/dbx-form 9.23.27 → 9.24.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/calendar/lib/field/schedule/calendar.schedule.field.component.d.ts +2 -2
- package/esm2020/calendar/lib/calendar.schedule.selection.days.component.mjs +1 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.popover.content.component.mjs +1 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.range.component.mjs +1 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.store.mjs +8 -8
- package/esm2020/calendar/lib/field/schedule/calendar.schedule.field.component.mjs +1 -1
- package/esm2020/lib/form/action/form.action.directive.mjs +11 -4
- package/esm2020/lib/formly/field/selection/pickable/pickable.field.mjs +1 -1
- package/esm2020/lib/formly/field/selection/pickable/pickable.util.mjs +1 -1
- package/esm2020/lib/formly/field/selection/selection.mjs +1 -1
- package/esm2020/lib/formly/field/value/date/date.field.module.mjs +18 -6
- package/esm2020/lib/formly/field/value/date/date.value.mjs +73 -0
- package/esm2020/lib/formly/field/value/date/datetime.field.component.mjs +61 -107
- package/esm2020/lib/formly/field/value/date/datetime.field.mjs +31 -4
- package/esm2020/lib/formly/field/value/date/datetime.field.service.mjs +31 -0
- package/esm2020/lib/formly/field/value/date/datetime.mjs +26 -0
- package/esm2020/lib/formly/field/value/date/datetime.preset.mjs +31 -0
- package/esm2020/lib/formly/field/value/date/fixeddaterange.field.component.mjs +451 -0
- package/esm2020/lib/formly/field/value/date/index.mjs +5 -1
- package/esm2020/lib/formly/template/login.mjs +1 -1
- package/esm2020/mapbox/lib/field/latlng/latlng.field.component.mjs +1 -1
- package/fesm2015/dereekb-dbx-form-calendar.mjs +8 -8
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2015/dereekb-dbx-form.mjs +648 -67
- package/fesm2015/dereekb-dbx-form.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs +8 -8
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form.mjs +644 -61
- package/fesm2020/dereekb-dbx-form.mjs.map +1 -1
- package/lib/form/action/form.action.directive.d.ts +13 -7
- package/lib/formly/field/selection/pickable/pickable.util.d.ts +1 -2
- package/lib/formly/field/value/date/_date.scss +29 -0
- package/lib/formly/field/value/date/date.field.module.d.ts +18 -17
- package/lib/formly/field/value/date/date.value.d.ts +20 -0
- package/lib/formly/field/value/date/datetime.d.ts +56 -0
- package/lib/formly/field/value/date/datetime.field.component.d.ts +31 -27
- package/lib/formly/field/value/date/datetime.field.d.ts +8 -4
- package/lib/formly/field/value/date/datetime.field.service.d.ts +15 -0
- package/lib/formly/field/value/date/datetime.preset.d.ts +2 -0
- package/lib/formly/field/value/date/fixeddaterange.field.component.d.ts +154 -0
- package/lib/formly/field/value/date/index.d.ts +4 -0
- package/mapbox/esm2020/lib/field/latlng/latlng.field.component.mjs +1 -1
- package/mapbox/fesm2015/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/mapbox/fesm2020/dereekb-dbx-form-mapbox.mjs.map +1 -1
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { forwardRef, Directive, Host, Input, NgModule, EventEmitter, Output, Component, ViewChild, InjectionToken, Inject, 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 i2$1 from '@dereekb/dbx-web';
|
|
@@ -8,7 +8,7 @@ import { isPast, addSeconds, startOfDay, addMinutes, addDays } from 'date-fns';
|
|
|
8
8
|
import { BehaviorSubject, switchMap, first, exhaustMap, of, catchError, delay, filter, combineLatest, map, distinctUntilChanged, shareReplay, Subject, tap, takeUntil, EMPTY, mergeMap, startWith, debounceTime, skipWhile, scan, combineLatestWith, throttleTime, interval, merge, timer } from 'rxjs';
|
|
9
9
|
import { LockSet, SubscriptionObject, asObservable, cleanup, loadingStateHasFinishedLoading, switchMapMaybeObs, filterMaybe, switchMapMaybeDefault, SimpleLoadingContext, distinctUntilHasDifferentValues, startWithBeginLoading, mapLoadingStateResults, successResult, ListLoadingStateContextInstance, isListLoadingStateEmpty, LoadingStateContextInstance, loadingStateHasValue, loadingStateIsLoading, beginLoading, mapLoadingStateValueWithOperator, valueFromLoadingState, loadingStateContext, skipFirstMaybe, asObservableFromGetter, asyncPusherCache, scanCount } from '@dereekb/rxjs';
|
|
10
10
|
import * as i2 from '@dereekb/dbx-core';
|
|
11
|
-
import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges } from '@dereekb/dbx-core';
|
|
11
|
+
import { AbstractSubscriptionDirective, safeDetectChanges, DbxInjectionComponentModule, DbxDatePipeModule, mergeDbxInjectionComponentConfigs, tapDetectChanges, DbxValuePipeModule } from '@dereekb/dbx-core';
|
|
12
12
|
import * as i3 from '@uirouter/core';
|
|
13
13
|
import * as i4 from '@angular/material/dialog';
|
|
14
14
|
import { MatDialogModule } from '@angular/material/dialog';
|
|
@@ -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,
|
|
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
|
|
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,
|
|
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
|
|
52
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
53
|
-
import * as
|
|
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';
|
|
@@ -215,11 +215,16 @@ class DbxActionFormDirective {
|
|
|
215
215
|
return combineLatest([validatorObs, modifiedObs]).pipe(first(), map(([valid, modified]) => valid && modified));
|
|
216
216
|
}
|
|
217
217
|
readyValue(value) {
|
|
218
|
-
|
|
218
|
+
if (this.dbxActionFormMapValue) {
|
|
219
|
+
return asObservable(this.dbxActionFormMapValue(value));
|
|
220
|
+
}
|
|
221
|
+
else {
|
|
222
|
+
return of({ value: value });
|
|
223
|
+
}
|
|
219
224
|
}
|
|
220
225
|
}
|
|
221
226
|
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 });
|
|
222
|
-
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 });
|
|
227
|
+
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 });
|
|
223
228
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxActionFormDirective, decorators: [{
|
|
224
229
|
type: Directive,
|
|
225
230
|
args: [{
|
|
@@ -233,6 +238,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
233
238
|
type: Input
|
|
234
239
|
}], dbxActionFormModified: [{
|
|
235
240
|
type: Input
|
|
241
|
+
}], dbxActionFormMapValue: [{
|
|
242
|
+
type: Input
|
|
236
243
|
}], formDisabledOnWorking: [{
|
|
237
244
|
type: Input
|
|
238
245
|
}] } });
|
|
@@ -3579,21 +3586,31 @@ export function acceptTermsField({ key = 'accept', label = 'Accept Terms', descr
|
|
|
3579
3586
|
}
|
|
3580
3587
|
*/
|
|
3581
3588
|
|
|
3582
|
-
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
|
|
3596
|
-
|
|
3589
|
+
/**
|
|
3590
|
+
* Creates a DateTimePreset from a DateTimePresetConfiguration
|
|
3591
|
+
*
|
|
3592
|
+
* @param config
|
|
3593
|
+
*/
|
|
3594
|
+
function dateTimePreset(config) {
|
|
3595
|
+
let value;
|
|
3596
|
+
if (config.logicalDate) {
|
|
3597
|
+
value = () => ({ logicalDate: getValueFromGetter(config.logicalDate) });
|
|
3598
|
+
}
|
|
3599
|
+
else if (config.timeString) {
|
|
3600
|
+
value = () => ({ timeString: getValueFromGetter(config.timeString) });
|
|
3601
|
+
}
|
|
3602
|
+
else {
|
|
3603
|
+
value = () => ({ logicalDate: 'now' });
|
|
3604
|
+
}
|
|
3605
|
+
if (!config.dynamic) {
|
|
3606
|
+
value = asGetter(value()); // get/calculate the value now and return it if not dynamic
|
|
3607
|
+
}
|
|
3608
|
+
return {
|
|
3609
|
+
label: asGetter(config.label),
|
|
3610
|
+
value
|
|
3611
|
+
};
|
|
3612
|
+
}
|
|
3613
|
+
|
|
3597
3614
|
var DbxDateTimeValueMode;
|
|
3598
3615
|
(function (DbxDateTimeValueMode) {
|
|
3599
3616
|
/**
|
|
@@ -3659,6 +3676,59 @@ function dbxDateTimeOutputValueFactory(mode, timezoneInstance) {
|
|
|
3659
3676
|
}
|
|
3660
3677
|
return factory;
|
|
3661
3678
|
}
|
|
3679
|
+
function dbxDateTimeIsSameDateTimeFieldValue(a, b) {
|
|
3680
|
+
return a && b ? (typeof a === 'string' ? a === b : isSameDateHoursAndMinutes(a, b)) : a == b;
|
|
3681
|
+
}
|
|
3682
|
+
function dbxDateRangeIsSameDateRangeFieldValue(a, b) {
|
|
3683
|
+
return a && b ? dbxDateTimeIsSameDateTimeFieldValue(a.start, b.start) && dbxDateTimeIsSameDateTimeFieldValue(a.end, b.end) : a == b;
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3686
|
+
const DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN = new InjectionToken('DbxDateTimeFieldMenuPresetsServicePresets');
|
|
3687
|
+
class DbxDateTimeFieldMenuPresetsService {
|
|
3688
|
+
constructor(initialConfigs) {
|
|
3689
|
+
var _a;
|
|
3690
|
+
this.initialConfigs = initialConfigs;
|
|
3691
|
+
this._configurations = new BehaviorSubject((_a = this.initialConfigs) !== null && _a !== void 0 ? _a : []);
|
|
3692
|
+
this.configurations$ = this._configurations.asObservable();
|
|
3693
|
+
}
|
|
3694
|
+
get configurations() {
|
|
3695
|
+
return this._configurations.value;
|
|
3696
|
+
}
|
|
3697
|
+
set configurations(configurations) {
|
|
3698
|
+
this._configurations.next(configurations);
|
|
3699
|
+
}
|
|
3700
|
+
}
|
|
3701
|
+
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 });
|
|
3702
|
+
DbxDateTimeFieldMenuPresetsService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, providedIn: 'root' });
|
|
3703
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldMenuPresetsService, decorators: [{
|
|
3704
|
+
type: Injectable,
|
|
3705
|
+
args: [{
|
|
3706
|
+
providedIn: 'root'
|
|
3707
|
+
}]
|
|
3708
|
+
}], ctorParameters: function () {
|
|
3709
|
+
return [{ type: undefined, decorators: [{
|
|
3710
|
+
type: Inject,
|
|
3711
|
+
args: [DBX_DATE_TIME_FIELD_MENU_PRESETS_TOKEN]
|
|
3712
|
+
}, {
|
|
3713
|
+
type: Optional
|
|
3714
|
+
}] }];
|
|
3715
|
+
} });
|
|
3716
|
+
|
|
3717
|
+
var DbxDateTimeFieldTimeMode;
|
|
3718
|
+
(function (DbxDateTimeFieldTimeMode) {
|
|
3719
|
+
/**
|
|
3720
|
+
* Time is required.
|
|
3721
|
+
*/
|
|
3722
|
+
DbxDateTimeFieldTimeMode["REQUIRED"] = "required";
|
|
3723
|
+
/**
|
|
3724
|
+
* Time is optional.
|
|
3725
|
+
*/
|
|
3726
|
+
DbxDateTimeFieldTimeMode["OPTIONAL"] = "optional";
|
|
3727
|
+
/**
|
|
3728
|
+
* Time is permenantly off.
|
|
3729
|
+
*/
|
|
3730
|
+
DbxDateTimeFieldTimeMode["NONE"] = "none";
|
|
3731
|
+
})(DbxDateTimeFieldTimeMode || (DbxDateTimeFieldTimeMode = {}));
|
|
3662
3732
|
function syncConfigValueObs(parseConfigsObs, type) {
|
|
3663
3733
|
return parseConfigsObs.pipe(switchMap((x) => {
|
|
3664
3734
|
const config = x.find((y) => y.syncType === type);
|
|
@@ -3673,29 +3743,28 @@ function syncConfigValueObs(parseConfigsObs, type) {
|
|
|
3673
3743
|
return result;
|
|
3674
3744
|
}), distinctUntilChanged(), shareReplay(1));
|
|
3675
3745
|
}
|
|
3676
|
-
|
|
3677
|
-
return a && b ? (typeof a === 'string' ? a === b : isSameDateHoursAndMinutes(a, b)) : a == b;
|
|
3678
|
-
}
|
|
3679
|
-
const TIME_OUTPUT_THROTTLE_TIME = 10;
|
|
3746
|
+
const TIME_OUTPUT_THROTTLE_TIME$1 = 10;
|
|
3680
3747
|
class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
3681
|
-
constructor(cdRef) {
|
|
3748
|
+
constructor(cdRef, dbxDateTimeFieldConfigService) {
|
|
3682
3749
|
super();
|
|
3683
3750
|
this.cdRef = cdRef;
|
|
3751
|
+
this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
|
|
3684
3752
|
this._sub = new SubscriptionObject();
|
|
3685
3753
|
this._valueSub = new SubscriptionObject();
|
|
3754
|
+
this._config = new BehaviorSubject(undefined);
|
|
3755
|
+
this._syncConfigObs = new BehaviorSubject(undefined);
|
|
3686
3756
|
this._defaultTimezone = new BehaviorSubject(undefined);
|
|
3687
|
-
this.
|
|
3757
|
+
this._presets = new BehaviorSubject(of([]));
|
|
3688
3758
|
this._fullDayControlObs = new BehaviorSubject(undefined);
|
|
3689
3759
|
this.fullDayControl$ = this._fullDayControlObs.pipe(filterMaybe());
|
|
3690
3760
|
this._offset = new BehaviorSubject(0);
|
|
3691
3761
|
this._formControlObs = new BehaviorSubject(undefined);
|
|
3692
3762
|
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
3693
3763
|
this._updateTime = new Subject();
|
|
3694
|
-
this.timezone$ =
|
|
3695
|
-
|
|
3696
|
-
return (_a = customTimezone !== null && customTimezone !== void 0 ? customTimezone : defaultTimezone) !== null && _a !== void 0 ? _a : guessCurrentTimezone();
|
|
3764
|
+
this.timezone$ = this._defaultTimezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
|
|
3765
|
+
return defaultTimezone !== null && defaultTimezone !== void 0 ? defaultTimezone : guessCurrentTimezone();
|
|
3697
3766
|
}), distinctUntilChanged(), shareReplay(1));
|
|
3698
|
-
this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (
|
|
3767
|
+
this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
|
|
3699
3768
|
this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
|
|
3700
3769
|
return x.pipe(map(dbxDateTimeInputValueParseFactory(this.valueMode, timezoneInstance)));
|
|
3701
3770
|
}), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
|
|
@@ -3711,8 +3780,6 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3711
3780
|
this.timeInputCtrl = new FormControl('', {
|
|
3712
3781
|
validators: [Validators.pattern(/^(now)$|^([0-9]|(0[0-9])|(1[0-9])|(2[0-3]))(:)?([0-5][0-9])?(\s)?([apAP][Mm])?(\\s)*$/)]
|
|
3713
3782
|
});
|
|
3714
|
-
this._config = new BehaviorSubject(undefined);
|
|
3715
|
-
this._syncConfigObs = new BehaviorSubject(undefined);
|
|
3716
3783
|
this.fullDay$ = this.fullDayControl$.pipe(switchMap((control) => control.valueChanges.pipe(startWith(control.value))), distinctUntilChanged(), shareReplay(1));
|
|
3717
3784
|
this.showTimeInput$ = this.fullDay$.pipe(map((x) => !x && this.timeMode !== DbxDateTimeFieldTimeMode.NONE));
|
|
3718
3785
|
this.showAddTime$ = this.showTimeInput$.pipe(map((x) => !x && this.timeMode === DbxDateTimeFieldTimeMode.OPTIONAL), shareReplay(1));
|
|
@@ -3772,13 +3839,13 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3772
3839
|
}
|
|
3773
3840
|
return result;
|
|
3774
3841
|
}), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
|
|
3775
|
-
this.config$ = combineLatest([this._config.pipe(switchMapMaybeDefault()
|
|
3842
|
+
this.config$ = combineLatest([this._config.pipe(switchMapMaybeDefault()), this.dateInputMin$, this.dateInputMax$]).pipe(map(([x, dateInputMin, dateInputMax]) => {
|
|
3776
3843
|
var _a;
|
|
3777
3844
|
let result = x;
|
|
3778
3845
|
if (dateInputMin != null || dateInputMax != null) {
|
|
3779
3846
|
const { min: limitMin, max: limitMax } = (_a = x === null || x === void 0 ? void 0 : x.limits) !== null && _a !== void 0 ? _a : {};
|
|
3780
|
-
const min = findMinDate([dateInputMin, limitMin]);
|
|
3781
|
-
const max = findMaxDate([dateInputMax, limitMax]);
|
|
3847
|
+
const min = findMinDate([dateInputMin, dateFromLogicalDate(limitMin)]);
|
|
3848
|
+
const max = findMaxDate([dateInputMax, dateFromLogicalDate(limitMax)]);
|
|
3782
3849
|
result = Object.assign(Object.assign({}, x), { limits: Object.assign(Object.assign({}, x === null || x === void 0 ? void 0 : x.limits), { min,
|
|
3783
3850
|
max }) });
|
|
3784
3851
|
}
|
|
@@ -3794,7 +3861,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3794
3861
|
}
|
|
3795
3862
|
}), shareReplay(1));
|
|
3796
3863
|
this.defaultPickerFilter = () => true;
|
|
3797
|
-
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]) => {
|
|
3864
|
+
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]) => {
|
|
3798
3865
|
if (date != null) {
|
|
3799
3866
|
const instance = new DateTimeMinuteInstance(Object.assign(Object.assign({ date }, config), { roundDownToMinute: true }));
|
|
3800
3867
|
date = instance.limit(date);
|
|
@@ -3803,6 +3870,7 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3803
3870
|
}
|
|
3804
3871
|
return date;
|
|
3805
3872
|
}), distinctUntilChanged(isSameDateHoursAndMinutes), shareReplay(1));
|
|
3873
|
+
this.presets$ = this._presets.pipe(switchMapMaybeObs(), map((x) => x.map(dateTimePreset)), shareReplay(1));
|
|
3806
3874
|
}
|
|
3807
3875
|
get dateLabel() {
|
|
3808
3876
|
var _a;
|
|
@@ -3864,17 +3932,18 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3864
3932
|
var _a;
|
|
3865
3933
|
return (_a = this.field.props.showTimezone) !== null && _a !== void 0 ? _a : true;
|
|
3866
3934
|
}
|
|
3867
|
-
get
|
|
3868
|
-
return
|
|
3935
|
+
get presets() {
|
|
3936
|
+
return this.field.props.presets;
|
|
3869
3937
|
}
|
|
3870
3938
|
ngOnInit() {
|
|
3871
|
-
var _a, _b
|
|
3939
|
+
var _a, _b;
|
|
3872
3940
|
this._formControlObs.next(this.formControl);
|
|
3873
|
-
|
|
3874
|
-
this.
|
|
3941
|
+
const inputPickerConfig = this.dateTimeField.getConfigObs || this.dateTimeField.pickerConfig;
|
|
3942
|
+
this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : undefined);
|
|
3943
|
+
this._syncConfigObs.next((_b = (_a = this.dateTimeField).getSyncFieldsObs) === null || _b === void 0 ? void 0 : _b.call(_a));
|
|
3875
3944
|
this._sub.subscription = this.valueInSystemTimezone$
|
|
3876
|
-
.pipe(combineLatestWith(this.timezoneInstance$.pipe(map((timezoneInstance) => dbxDateTimeOutputValueFactory(this.valueMode, timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }), switchMap(([currentValue, valueFactory]) => {
|
|
3877
|
-
return this.timeOutput$.pipe(throttleTime(TIME_OUTPUT_THROTTLE_TIME * 2, undefined, { leading: false, trailing: true }), skipFirstMaybe(), distinctUntilChanged(isSameDateHoursAndMinutes), map((x) => valueFactory(x)), filter((x) => !
|
|
3945
|
+
.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]) => {
|
|
3946
|
+
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)));
|
|
3878
3947
|
}))
|
|
3879
3948
|
.subscribe((value) => {
|
|
3880
3949
|
this.formControl.setValue(value);
|
|
@@ -3928,19 +3997,34 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
3928
3997
|
this.addTime();
|
|
3929
3998
|
break;
|
|
3930
3999
|
}
|
|
4000
|
+
if (this.presets != null) {
|
|
4001
|
+
this._presets.next(asObservableFromGetter(this.presets));
|
|
4002
|
+
}
|
|
4003
|
+
else {
|
|
4004
|
+
this._presets.next(this.dbxDateTimeFieldConfigService.configurations$);
|
|
4005
|
+
}
|
|
3931
4006
|
}
|
|
3932
4007
|
ngOnDestroy() {
|
|
3933
4008
|
super.ngOnDestroy();
|
|
4009
|
+
this._sub.destroy();
|
|
4010
|
+
this._valueSub.destroy();
|
|
4011
|
+
this._config.complete();
|
|
3934
4012
|
this._defaultTimezone.complete();
|
|
3935
|
-
this.
|
|
4013
|
+
this._presets.complete();
|
|
3936
4014
|
this._fullDayControlObs.complete();
|
|
3937
4015
|
this._offset.complete();
|
|
3938
4016
|
this._formControlObs.complete();
|
|
3939
|
-
this._config.complete();
|
|
3940
4017
|
this._updateTime.complete();
|
|
3941
4018
|
this._syncConfigObs.complete();
|
|
3942
|
-
|
|
3943
|
-
|
|
4019
|
+
}
|
|
4020
|
+
selectPreset(preset) {
|
|
4021
|
+
const value = preset.value();
|
|
4022
|
+
if (value.logicalDate) {
|
|
4023
|
+
this.setLogicalTime(value.logicalDate);
|
|
4024
|
+
}
|
|
4025
|
+
else if (value.timeString) {
|
|
4026
|
+
this.setTime(value.timeString);
|
|
4027
|
+
}
|
|
3944
4028
|
}
|
|
3945
4029
|
datePicked(event) {
|
|
3946
4030
|
const date = event.value;
|
|
@@ -4039,17 +4123,454 @@ class DbxDateTimeFieldComponent extends FieldType$1 {
|
|
|
4039
4123
|
});
|
|
4040
4124
|
}
|
|
4041
4125
|
}
|
|
4042
|
-
DbxDateTimeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4043
|
-
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" }] });
|
|
4126
|
+
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 });
|
|
4127
|
+
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" }] });
|
|
4044
4128
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxDateTimeFieldComponent, decorators: [{
|
|
4045
4129
|
type: Component,
|
|
4046
|
-
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 <
|
|
4047
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; } });
|
|
4130
|
+
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" }]
|
|
4131
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: DbxDateTimeFieldMenuPresetsService }]; } });
|
|
4132
|
+
|
|
4133
|
+
function dbxFixedDateRangeInputValueFactory(mode, timezoneInstance) {
|
|
4134
|
+
const dateInputTransformer = dbxDateTimeInputValueParseFactory(mode, timezoneInstance);
|
|
4135
|
+
return (y) => {
|
|
4136
|
+
let result;
|
|
4137
|
+
if (y) {
|
|
4138
|
+
result = {
|
|
4139
|
+
start: dateInputTransformer(y.start),
|
|
4140
|
+
end: dateInputTransformer(y.end)
|
|
4141
|
+
};
|
|
4142
|
+
}
|
|
4143
|
+
return result;
|
|
4144
|
+
};
|
|
4145
|
+
}
|
|
4146
|
+
function dbxFixedDateRangeOutputValueFactory(mode, timezoneInstance) {
|
|
4147
|
+
const dateOutputTransformer = dbxDateTimeOutputValueFactory(mode, timezoneInstance);
|
|
4148
|
+
return (y) => {
|
|
4149
|
+
let result;
|
|
4150
|
+
if (y) {
|
|
4151
|
+
result = {
|
|
4152
|
+
start: dateOutputTransformer(y.start),
|
|
4153
|
+
end: dateOutputTransformer(y.end)
|
|
4154
|
+
};
|
|
4155
|
+
}
|
|
4156
|
+
return result;
|
|
4157
|
+
};
|
|
4158
|
+
}
|
|
4159
|
+
const TIME_OUTPUT_THROTTLE_TIME = 10;
|
|
4160
|
+
class DbxFixedDateRangeFieldComponent extends FieldType$1 {
|
|
4161
|
+
constructor(dbxDateTimeFieldConfigService) {
|
|
4162
|
+
super();
|
|
4163
|
+
this.dbxDateTimeFieldConfigService = dbxDateTimeFieldConfigService;
|
|
4164
|
+
this._sub = new SubscriptionObject();
|
|
4165
|
+
this._inputRangeFormSub = new SubscriptionObject();
|
|
4166
|
+
this._inputRangeFormValueSub = new SubscriptionObject();
|
|
4167
|
+
this._dateRangeInputSub = new SubscriptionObject();
|
|
4168
|
+
this._currentSelectionModeSub = new SubscriptionObject();
|
|
4169
|
+
this._latestBoundarySub = new SubscriptionObject();
|
|
4170
|
+
this._disableEndSub = new SubscriptionObject();
|
|
4171
|
+
this._activeDateSub = new SubscriptionObject();
|
|
4172
|
+
this._currentDateRangeInput = {};
|
|
4173
|
+
this._currentSelectionMode = 'single';
|
|
4174
|
+
this._latestBoundary = null;
|
|
4175
|
+
this._config = new BehaviorSubject(undefined);
|
|
4176
|
+
this._selectionMode = new BehaviorSubject(undefined);
|
|
4177
|
+
this._dateRangeInput = new BehaviorSubject(undefined);
|
|
4178
|
+
this._timezone = new BehaviorSubject(undefined);
|
|
4179
|
+
this._presets = new BehaviorSubject(of([]));
|
|
4180
|
+
this._selectedDateRange = new Subject();
|
|
4181
|
+
this._formControlObs = new BehaviorSubject(undefined);
|
|
4182
|
+
this.formControl$ = this._formControlObs.pipe(filterMaybe());
|
|
4183
|
+
this.config$ = this._config.pipe(filterMaybe(), switchMap((x) => x), distinctUntilChanged(), shareReplay(1));
|
|
4184
|
+
this.limitDateTimeInstance$ = this.config$.pipe(map(limitDateTimeInstance), shareReplay(1));
|
|
4185
|
+
this.selectionMode$ = this._selectionMode.pipe(switchMapMaybeDefault('single'), map((x) => x !== null && x !== void 0 ? x : 'single'), distinctUntilChanged(), shareReplay(1));
|
|
4186
|
+
this.dateRangeInput$ = this._dateRangeInput.pipe(switchMapMaybeDefault(), shareReplay(1));
|
|
4187
|
+
this.timezone$ = this._timezone.pipe(switchMapMaybeDefault(), distinctUntilChanged()).pipe(map((defaultTimezone) => {
|
|
4188
|
+
return defaultTimezone !== null && defaultTimezone !== void 0 ? defaultTimezone : guessCurrentTimezone();
|
|
4189
|
+
}), distinctUntilChanged(), shareReplay(1));
|
|
4190
|
+
this.timezoneInstance$ = this.timezone$.pipe(map((timezone) => (timezone ? dateTimezoneUtcNormal({ timezone }) : undefined)), shareReplay(1));
|
|
4191
|
+
this.valueInSystemTimezone$ = this.formControl$.pipe(map((control) => control.valueChanges.pipe(startWith(control.value), shareReplay(1))), combineLatestWith(this.timezoneInstance$), switchMap(([x, timezoneInstance]) => {
|
|
4192
|
+
return x.pipe(map(dbxFixedDateRangeInputValueFactory(this.valueMode, timezoneInstance)));
|
|
4193
|
+
}), throttleTime(20, undefined, { leading: false, trailing: true }), // throttle incoming values and timezone changes
|
|
4194
|
+
distinctUntilChanged(isSameDateDayRange), shareReplay(1));
|
|
4195
|
+
this.startDate$ = this.valueInSystemTimezone$.pipe(map((x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.start) !== null && _a !== void 0 ? _a : null; }), distinctUntilChanged(), filterMaybe(), shareReplay(1));
|
|
4196
|
+
this.fullBoundary$ = this.dateRangeSelectionForMode('single').pipe(shareReplay(1));
|
|
4197
|
+
this.latestBoundary$ = this.selectionMode$.pipe(switchMap((mode) => {
|
|
4198
|
+
if (mode === 'arbitrary_quick') {
|
|
4199
|
+
// in arbitrary_quick mode, the latest value is the boundary, since we always set the value immediately.
|
|
4200
|
+
return this.valueInSystemTimezone$;
|
|
4201
|
+
}
|
|
4202
|
+
else {
|
|
4203
|
+
return this.fullBoundary$;
|
|
4204
|
+
}
|
|
4205
|
+
}));
|
|
4206
|
+
this.dateRangeSelection$ = this.selectionMode$.pipe(switchMap((mode) => this.dateRangeSelectionForMode(mode)));
|
|
4207
|
+
this.calendarSelection$ = this.valueInSystemTimezone$.pipe(map((x) => (x ? new DateRange(x.start, x.end) : null)), shareReplay(1));
|
|
4208
|
+
this.endDisabled$ = this.selectionMode$.pipe(map((x) => x === 'single'), distinctUntilChanged(), shareReplay(1));
|
|
4209
|
+
this.inputRangeForm = new FormGroup({
|
|
4210
|
+
start: new FormControl(null),
|
|
4211
|
+
end: new FormControl(null)
|
|
4212
|
+
});
|
|
4213
|
+
this.minMaxRange$ = this.limitDateTimeInstance$.pipe(combineLatestWith(timer(MS_IN_MINUTE)), // refresh every minute
|
|
4214
|
+
map(([x]) => x.dateRange()), distinctUntilChanged(isSameDateDayRange), shareReplay(1));
|
|
4215
|
+
this.min$ = this.minMaxRange$.pipe(map((x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.start) !== null && _a !== void 0 ? _a : null; }), distinctUntilChanged(), shareReplay(1));
|
|
4216
|
+
this.max$ = this.minMaxRange$.pipe(map((x) => { var _a; return (_a = x === null || x === void 0 ? void 0 : x.end) !== null && _a !== void 0 ? _a : null; }), distinctUntilChanged(), shareReplay(1));
|
|
4217
|
+
this.pickerFilter$ = this.config$.pipe(distinctUntilChanged(), map((x) => {
|
|
4218
|
+
if (x) {
|
|
4219
|
+
const filter = dateTimeMinuteDecisionFunction(x);
|
|
4220
|
+
return (x) => (x != null ? filter(x) : true);
|
|
4221
|
+
}
|
|
4222
|
+
else {
|
|
4223
|
+
return () => true;
|
|
4224
|
+
}
|
|
4225
|
+
}), shareReplay(1));
|
|
4226
|
+
this.defaultPickerFilter = () => true;
|
|
4227
|
+
}
|
|
4228
|
+
get currentDateRangeInput() {
|
|
4229
|
+
return this._currentDateRangeInput;
|
|
4230
|
+
}
|
|
4231
|
+
get currentSelectionMode() {
|
|
4232
|
+
return this._currentSelectionMode;
|
|
4233
|
+
}
|
|
4234
|
+
get latestBoundary() {
|
|
4235
|
+
return this._latestBoundary;
|
|
4236
|
+
}
|
|
4237
|
+
dateRangeSelectionForMode(mode) {
|
|
4238
|
+
const result = combineLatest([this.dateRangeInput$, this.limitDateTimeInstance$]).pipe(switchMap(([dateRangeInput, limitInstance]) => {
|
|
4239
|
+
const minMaxClamp = (dateRange) => limitInstance.clampDateRange(dateRange);
|
|
4240
|
+
if (mode === 'single') {
|
|
4241
|
+
// only use the start date.
|
|
4242
|
+
return this._selectedDateRange.pipe(distinctUntilChanged(isSameDateDayRange), map((inputDateRange) => {
|
|
4243
|
+
const date = inputDateRange === null || inputDateRange === void 0 ? void 0 : inputDateRange.start;
|
|
4244
|
+
return date ? minMaxClamp(dateRange(Object.assign(Object.assign({}, dateRangeInput), { date }))) : null;
|
|
4245
|
+
}));
|
|
4246
|
+
}
|
|
4247
|
+
else {
|
|
4248
|
+
// take the first date, then wait unless the date is outside of the range.
|
|
4249
|
+
return this._selectedDateRange.pipe(scan((acc, nextDateRange) => {
|
|
4250
|
+
let result;
|
|
4251
|
+
if (nextDateRange && nextDateRange.start != null) {
|
|
4252
|
+
const { start: startOrNextDate, end } = nextDateRange;
|
|
4253
|
+
const potentialBoundary = dateRange(Object.assign(Object.assign({}, dateRangeInput), { date: startOrNextDate }));
|
|
4254
|
+
// only comes through when passed by the text inputs
|
|
4255
|
+
if (startOrNextDate && end) {
|
|
4256
|
+
const range = clampDateRangeToDateRange(nextDateRange, potentialBoundary);
|
|
4257
|
+
result = {
|
|
4258
|
+
lastDateRange: nextDateRange,
|
|
4259
|
+
boundary: range,
|
|
4260
|
+
range
|
|
4261
|
+
};
|
|
4262
|
+
}
|
|
4263
|
+
else {
|
|
4264
|
+
let range = undefined;
|
|
4265
|
+
let boundary = potentialBoundary;
|
|
4266
|
+
if (acc.boundary && isDateInDateRange(startOrNextDate, acc.boundary)) {
|
|
4267
|
+
// if in the date range, uses the pick as the last date.
|
|
4268
|
+
range = {
|
|
4269
|
+
start: acc.boundary.start,
|
|
4270
|
+
end: startOrNextDate
|
|
4271
|
+
};
|
|
4272
|
+
if (mode === 'arbitrary_quick') {
|
|
4273
|
+
// modify boundary to match range
|
|
4274
|
+
if (isSameDateRange(acc.range, range) && isSameDateDay(range.end, startOrNextDate)) {
|
|
4275
|
+
// if we clicked on the end range, then expand the boundary again to the full range.
|
|
4276
|
+
range = dateRange(Object.assign(Object.assign({}, dateRangeInput), { date: range.start }));
|
|
4277
|
+
boundary = range;
|
|
4278
|
+
}
|
|
4279
|
+
else {
|
|
4280
|
+
boundary = range;
|
|
4281
|
+
}
|
|
4282
|
+
}
|
|
4283
|
+
else {
|
|
4284
|
+
boundary = acc.boundary;
|
|
4285
|
+
}
|
|
4286
|
+
}
|
|
4287
|
+
else if (mode === 'arbitrary_quick') {
|
|
4288
|
+
range = potentialBoundary;
|
|
4289
|
+
}
|
|
4290
|
+
result = {
|
|
4291
|
+
lastDateRange: nextDateRange,
|
|
4292
|
+
boundary,
|
|
4293
|
+
range
|
|
4294
|
+
};
|
|
4295
|
+
}
|
|
4296
|
+
}
|
|
4297
|
+
else {
|
|
4298
|
+
result = {
|
|
4299
|
+
lastDateRange: nextDateRange
|
|
4300
|
+
};
|
|
4301
|
+
}
|
|
4302
|
+
if (result) {
|
|
4303
|
+
result = {
|
|
4304
|
+
lastDateRange: result.lastDateRange,
|
|
4305
|
+
boundary: result.boundary ? minMaxClamp(result.boundary) : undefined,
|
|
4306
|
+
range: result.range ? minMaxClamp(result.range) : undefined
|
|
4307
|
+
};
|
|
4308
|
+
}
|
|
4309
|
+
return result;
|
|
4310
|
+
}, {}), filter((x) => !x.lastDateRange || x.range != null), // pass through null/date clearings or ranges
|
|
4311
|
+
map((x) => { var _a; return (_a = x.range) !== null && _a !== void 0 ? _a : null; }) // return the range
|
|
4312
|
+
);
|
|
4313
|
+
}
|
|
4314
|
+
}));
|
|
4315
|
+
return result;
|
|
4316
|
+
}
|
|
4317
|
+
get fixedDateRangeField() {
|
|
4318
|
+
return this.field.props;
|
|
4319
|
+
}
|
|
4320
|
+
get selectionMode() {
|
|
4321
|
+
return this.field.props.selectionMode;
|
|
4322
|
+
}
|
|
4323
|
+
get valueMode() {
|
|
4324
|
+
var _a;
|
|
4325
|
+
return (_a = this.field.props.valueMode) !== null && _a !== void 0 ? _a : DbxDateTimeValueMode.DATE;
|
|
4326
|
+
}
|
|
4327
|
+
get description() {
|
|
4328
|
+
return this.field.props.description;
|
|
4329
|
+
}
|
|
4330
|
+
get timezone() {
|
|
4331
|
+
return this.field.props.timezone;
|
|
4332
|
+
}
|
|
4333
|
+
get showTimezone() {
|
|
4334
|
+
var _a;
|
|
4335
|
+
return (_a = this.field.props.showTimezone) !== null && _a !== void 0 ? _a : true;
|
|
4336
|
+
}
|
|
4337
|
+
get presets() {
|
|
4338
|
+
return this.field.props.presets;
|
|
4339
|
+
}
|
|
4340
|
+
get showRangeInput() {
|
|
4341
|
+
var _a;
|
|
4342
|
+
return (_a = this.field.props.showRangeInput) !== null && _a !== void 0 ? _a : true;
|
|
4343
|
+
}
|
|
4344
|
+
ngOnInit() {
|
|
4345
|
+
this._formControlObs.next(this.formControl);
|
|
4346
|
+
const dateRangeSelection = this.dateRangeSelection$.pipe(shareReplay(1));
|
|
4347
|
+
const setInputFormValue = (value) => {
|
|
4348
|
+
var _a, _b;
|
|
4349
|
+
if (!isSameDateDayRange(value, this.inputRangeForm.value)) {
|
|
4350
|
+
this.inputRangeForm.setValue({
|
|
4351
|
+
start: (_a = value === null || value === void 0 ? void 0 : value.start) !== null && _a !== void 0 ? _a : null,
|
|
4352
|
+
end: (_b = value === null || value === void 0 ? void 0 : value.end) !== null && _b !== void 0 ? _b : null
|
|
4353
|
+
});
|
|
4354
|
+
}
|
|
4355
|
+
};
|
|
4356
|
+
this._sub.subscription = this.valueInSystemTimezone$
|
|
4357
|
+
.pipe(combineLatestWith(this.timezoneInstance$.pipe(map((timezoneInstance) => dbxFixedDateRangeOutputValueFactory(this.valueMode, timezoneInstance)))), throttleTime(TIME_OUTPUT_THROTTLE_TIME, undefined, { leading: false, trailing: true }), switchMap(([currentValue, valueFactory]) => {
|
|
4358
|
+
return dateRangeSelection.pipe(skipFirstMaybe(), distinctUntilChanged(isSameDateDayRange), map((x) => [x, currentValue, valueFactory]));
|
|
4359
|
+
}))
|
|
4360
|
+
.subscribe(([rawValue, currentValue, valueFactory]) => {
|
|
4361
|
+
const value = rawValue ? valueFactory(rawValue) : null;
|
|
4362
|
+
const isSameRange = dbxDateRangeIsSameDateRangeFieldValue(value, currentValue);
|
|
4363
|
+
if (!isSameRange) {
|
|
4364
|
+
this.formControl.setValue(value);
|
|
4365
|
+
this.formControl.markAsDirty();
|
|
4366
|
+
this.formControl.markAsTouched();
|
|
4367
|
+
}
|
|
4368
|
+
else if (rawValue != null) {
|
|
4369
|
+
// update the input text again
|
|
4370
|
+
setInputFormValue(rawValue);
|
|
4371
|
+
}
|
|
4372
|
+
});
|
|
4373
|
+
if (this.selectionMode) {
|
|
4374
|
+
this._selectionMode.next(asObservableFromGetter(this.selectionMode));
|
|
4375
|
+
}
|
|
4376
|
+
this._currentSelectionModeSub.subscription = this.selectionMode$.subscribe((x) => (this._currentSelectionMode = x));
|
|
4377
|
+
this._dateRangeInputSub.subscription = this.dateRangeInput$.subscribe((x) => (this._currentDateRangeInput = x));
|
|
4378
|
+
this._inputRangeFormSub.subscription = this.valueInSystemTimezone$.subscribe((x) => {
|
|
4379
|
+
setInputFormValue(x);
|
|
4380
|
+
});
|
|
4381
|
+
if (this.showRangeInput) {
|
|
4382
|
+
this._inputRangeFormValueSub.subscription = this.valueInSystemTimezone$
|
|
4383
|
+
.pipe(throttleTime(100), // throttle to prevent the value from changing too fast
|
|
4384
|
+
switchMap(() => {
|
|
4385
|
+
return this.inputRangeForm.valueChanges.pipe(debounceTime(500), filter(() => {
|
|
4386
|
+
var _a, _b;
|
|
4387
|
+
const startString = (_a = this.startDateInputElement.nativeElement) === null || _a === void 0 ? void 0 : _a.value;
|
|
4388
|
+
let valid = isMonthDaySlashDate(startString);
|
|
4389
|
+
if (valid && this._currentSelectionMode !== 'single') {
|
|
4390
|
+
const endString = (_b = this.endDateInputElement.nativeElement) === null || _b === void 0 ? void 0 : _b.value;
|
|
4391
|
+
valid = isMonthDaySlashDate(endString);
|
|
4392
|
+
}
|
|
4393
|
+
return valid; // must be a valid text input
|
|
4394
|
+
}), map((x) => x));
|
|
4395
|
+
}), distinctUntilChanged(isSameDateRange))
|
|
4396
|
+
.subscribe((x) => {
|
|
4397
|
+
if (this._currentSelectionMode === 'single') {
|
|
4398
|
+
this.setDateRange((x === null || x === void 0 ? void 0 : x.start) ? { start: x.start } : null);
|
|
4399
|
+
}
|
|
4400
|
+
else {
|
|
4401
|
+
let rangeToSet = x;
|
|
4402
|
+
if (this._currentSelectionMode === 'arbitrary_quick' && this._latestBoundary && (x === null || x === void 0 ? void 0 : x.start) && (x === null || x === void 0 ? void 0 : x.end)) {
|
|
4403
|
+
if (!isDateInDateRange(x.start, this._latestBoundary)) {
|
|
4404
|
+
// 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
|
|
4405
|
+
const boundary = dateRange(Object.assign(Object.assign({}, this._currentDateRangeInput), { date: x.start }));
|
|
4406
|
+
rangeToSet = { start: x.start, end: boundary.end };
|
|
4407
|
+
}
|
|
4408
|
+
}
|
|
4409
|
+
this.setDateRange(rangeToSet);
|
|
4410
|
+
}
|
|
4411
|
+
});
|
|
4412
|
+
}
|
|
4413
|
+
this._latestBoundarySub.subscription = this.latestBoundary$.subscribe((x) => (this._latestBoundary = x));
|
|
4414
|
+
this._dateRangeInput.next(asObservableFromGetter(this.fixedDateRangeField.dateRangeInput));
|
|
4415
|
+
this._disableEndSub.subscription = this.endDisabled$.subscribe((disabled) => {
|
|
4416
|
+
const end = this.inputRangeForm.get('end');
|
|
4417
|
+
if (end) {
|
|
4418
|
+
if (disabled) {
|
|
4419
|
+
end.disable();
|
|
4420
|
+
}
|
|
4421
|
+
else {
|
|
4422
|
+
end.enable();
|
|
4423
|
+
}
|
|
4424
|
+
}
|
|
4425
|
+
});
|
|
4426
|
+
const inputPickerConfig = this.fixedDateRangeField.pickerConfig;
|
|
4427
|
+
this._config.next(inputPickerConfig ? asObservableFromGetter(inputPickerConfig) : undefined);
|
|
4428
|
+
// Set default timezone if provided.
|
|
4429
|
+
if (this.timezone && !this.fixedDateRangeField.fullDayInUTC) {
|
|
4430
|
+
this._timezone.next(asObservableFromGetter(this.timezone));
|
|
4431
|
+
}
|
|
4432
|
+
// Watch for disabled changes so we can propogate them properly.
|
|
4433
|
+
this.formControl.registerOnDisabledChange((disabled) => {
|
|
4434
|
+
if (disabled) {
|
|
4435
|
+
this.inputRangeForm.disable();
|
|
4436
|
+
}
|
|
4437
|
+
else {
|
|
4438
|
+
this.inputRangeForm.enable();
|
|
4439
|
+
this.endDisabled$.pipe(first()).subscribe((disabled) => {
|
|
4440
|
+
const end = this.inputRangeForm.get('end');
|
|
4441
|
+
if (end) {
|
|
4442
|
+
if (disabled) {
|
|
4443
|
+
end.disable();
|
|
4444
|
+
}
|
|
4445
|
+
else {
|
|
4446
|
+
end.enable();
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4449
|
+
});
|
|
4450
|
+
}
|
|
4451
|
+
});
|
|
4452
|
+
if (this.presets != null) {
|
|
4453
|
+
this._presets.next(asObservableFromGetter(this.presets));
|
|
4454
|
+
}
|
|
4455
|
+
else {
|
|
4456
|
+
this._presets.next(this.dbxDateTimeFieldConfigService.configurations$);
|
|
4457
|
+
}
|
|
4458
|
+
this._activeDateSub.subscription = this.startDate$.subscribe((x) => {
|
|
4459
|
+
this.calendar.activeDate = x;
|
|
4460
|
+
});
|
|
4461
|
+
}
|
|
4462
|
+
ngOnDestroy() {
|
|
4463
|
+
super.ngOnDestroy();
|
|
4464
|
+
this._sub.destroy();
|
|
4465
|
+
this._inputRangeFormSub.destroy();
|
|
4466
|
+
this._inputRangeFormValueSub.destroy();
|
|
4467
|
+
this._dateRangeInputSub.destroy();
|
|
4468
|
+
this._currentSelectionModeSub.destroy();
|
|
4469
|
+
this._latestBoundarySub.destroy();
|
|
4470
|
+
this._disableEndSub.destroy();
|
|
4471
|
+
this._activeDateSub.destroy();
|
|
4472
|
+
this._config.complete();
|
|
4473
|
+
this._selectionMode.complete();
|
|
4474
|
+
this._dateRangeInput.complete();
|
|
4475
|
+
this._timezone.complete();
|
|
4476
|
+
this._presets.complete();
|
|
4477
|
+
this._selectedDateRange.complete();
|
|
4478
|
+
this._formControlObs.complete();
|
|
4479
|
+
}
|
|
4480
|
+
selectedChange(date) {
|
|
4481
|
+
this.setDateRange(date ? { start: date } : null);
|
|
4482
|
+
}
|
|
4483
|
+
setDateRange(dateRange) {
|
|
4484
|
+
this._selectedDateRange.next(dateRange);
|
|
4485
|
+
}
|
|
4486
|
+
_createDateRange(date) {
|
|
4487
|
+
return date ? dateRange(Object.assign(Object.assign({}, this._currentDateRangeInput), { date })) : undefined;
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
DbxFixedDateRangeFieldComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, deps: [{ token: DbxDateTimeFieldMenuPresetsService }], target: i0.ɵɵFactoryTarget.Component });
|
|
4491
|
+
DbxFixedDateRangeFieldComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxFixedDateRangeFieldComponent, selector: "ng-component", providers: [
|
|
4492
|
+
{
|
|
4493
|
+
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
4494
|
+
useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
|
|
4495
|
+
}
|
|
4496
|
+
], 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" }] });
|
|
4497
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldComponent, decorators: [{
|
|
4498
|
+
type: Component,
|
|
4499
|
+
args: [{ providers: [
|
|
4500
|
+
{
|
|
4501
|
+
provide: MAT_DATE_RANGE_SELECTION_STRATEGY,
|
|
4502
|
+
useClass: forwardRef(() => DbxFixedDateRangeFieldSelectionStrategy)
|
|
4503
|
+
}
|
|
4504
|
+
], 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" }]
|
|
4505
|
+
}], ctorParameters: function () { return [{ type: DbxDateTimeFieldMenuPresetsService }]; }, propDecorators: { calendar: [{
|
|
4506
|
+
type: ViewChild,
|
|
4507
|
+
args: [MatCalendar]
|
|
4508
|
+
}], startDateInputElement: [{
|
|
4509
|
+
type: ViewChild,
|
|
4510
|
+
args: ['startDateInput', { read: ElementRef }]
|
|
4511
|
+
}], endDateInputElement: [{
|
|
4512
|
+
type: ViewChild,
|
|
4513
|
+
args: ['endDateInput', { read: ElementRef }]
|
|
4514
|
+
}] } });
|
|
4515
|
+
class DbxFixedDateRangeFieldSelectionStrategy {
|
|
4516
|
+
constructor(_dateAdapter, dbxFixedDateRangeFieldComponent) {
|
|
4517
|
+
this._dateAdapter = _dateAdapter;
|
|
4518
|
+
this.dbxFixedDateRangeFieldComponent = dbxFixedDateRangeFieldComponent;
|
|
4519
|
+
}
|
|
4520
|
+
selectionFinished(date, currentRange, event) {
|
|
4521
|
+
// unused
|
|
4522
|
+
return currentRange;
|
|
4523
|
+
}
|
|
4524
|
+
createPreview(activeDate, currentRange, event) {
|
|
4525
|
+
if (activeDate != null && this.dbxFixedDateRangeFieldComponent.currentSelectionMode !== 'single') {
|
|
4526
|
+
const latestBoundary = this.dbxFixedDateRangeFieldComponent.latestBoundary;
|
|
4527
|
+
const date = this.dateFromAdapterDate(activeDate);
|
|
4528
|
+
if (latestBoundary && isDateInDateRange(date, latestBoundary)) {
|
|
4529
|
+
const exampleDateRange = this._createDateRange(latestBoundary);
|
|
4530
|
+
return exampleDateRange;
|
|
4531
|
+
}
|
|
4532
|
+
}
|
|
4533
|
+
return this._createDateRangeWithDate(activeDate);
|
|
4534
|
+
}
|
|
4535
|
+
_createDateRangeWithDate(input) {
|
|
4536
|
+
let dateRange;
|
|
4537
|
+
if (input) {
|
|
4538
|
+
const date = this.dateFromAdapterDate(input);
|
|
4539
|
+
dateRange = this.dbxFixedDateRangeFieldComponent._createDateRange(date);
|
|
4540
|
+
}
|
|
4541
|
+
return this._createDateRange(dateRange);
|
|
4542
|
+
}
|
|
4543
|
+
_createDateRange(input) {
|
|
4544
|
+
if (input) {
|
|
4545
|
+
return new DateRange(this.adapterDateFromDate(input.start), this.adapterDateFromDate(input.end));
|
|
4546
|
+
}
|
|
4547
|
+
else {
|
|
4548
|
+
return new DateRange(null, null);
|
|
4549
|
+
}
|
|
4550
|
+
}
|
|
4551
|
+
dateFromAdapterDate(input) {
|
|
4552
|
+
const day = this._dateAdapter.getDate(input);
|
|
4553
|
+
const monthIndex = this._dateAdapter.getMonth(input);
|
|
4554
|
+
const year = this._dateAdapter.getYear(input);
|
|
4555
|
+
return new Date(year, monthIndex, day);
|
|
4556
|
+
}
|
|
4557
|
+
adapterDateFromDate(date) {
|
|
4558
|
+
const day = date.getDate();
|
|
4559
|
+
const monthIndex = date.getMonth();
|
|
4560
|
+
const year = date.getFullYear();
|
|
4561
|
+
return this._dateAdapter.createDate(year, monthIndex, day);
|
|
4562
|
+
}
|
|
4563
|
+
}
|
|
4564
|
+
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 });
|
|
4565
|
+
DbxFixedDateRangeFieldSelectionStrategy.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy });
|
|
4566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFixedDateRangeFieldSelectionStrategy, decorators: [{
|
|
4567
|
+
type: Injectable
|
|
4568
|
+
}], ctorParameters: function () { return [{ type: i4$1.DateAdapter }, { type: DbxFixedDateRangeFieldComponent }]; } });
|
|
4048
4569
|
|
|
4049
4570
|
class DbxFormFormlyDateFieldModule {
|
|
4050
4571
|
}
|
|
4051
4572
|
DbxFormFormlyDateFieldModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4052
|
-
DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent], imports: [CommonModule,
|
|
4573
|
+
DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent], imports: [CommonModule,
|
|
4053
4574
|
FormsModule,
|
|
4054
4575
|
MatInputModule,
|
|
4055
4576
|
MatDividerModule,
|
|
@@ -4061,6 +4582,7 @@ DbxFormFormlyDateFieldModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.
|
|
|
4061
4582
|
MatMenuModule,
|
|
4062
4583
|
ReactiveFormsModule,
|
|
4063
4584
|
DbxDatePipeModule,
|
|
4585
|
+
DbxValuePipeModule,
|
|
4064
4586
|
MatChipsModule,
|
|
4065
4587
|
MatIconModule,
|
|
4066
4588
|
FlexLayoutModule, i1$2.FormlyModule], exports: [DbxFormFormlyWrapperModule] });
|
|
@@ -4076,11 +4598,16 @@ DbxFormFormlyDateFieldModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.
|
|
|
4076
4598
|
MatMenuModule,
|
|
4077
4599
|
ReactiveFormsModule,
|
|
4078
4600
|
DbxDatePipeModule,
|
|
4601
|
+
DbxValuePipeModule,
|
|
4079
4602
|
MatChipsModule,
|
|
4080
4603
|
MatIconModule,
|
|
4081
4604
|
FlexLayoutModule,
|
|
4082
4605
|
FormlyModule.forChild({
|
|
4083
|
-
types: [
|
|
4606
|
+
types: [
|
|
4607
|
+
//
|
|
4608
|
+
{ name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] },
|
|
4609
|
+
{ name: 'fixeddaterange', component: DbxFixedDateRangeFieldComponent, wrappers: ['style', 'form-field'] }
|
|
4610
|
+
]
|
|
4084
4611
|
}), DbxFormFormlyWrapperModule] });
|
|
4085
4612
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxFormFormlyDateFieldModule, decorators: [{
|
|
4086
4613
|
type: NgModule,
|
|
@@ -4098,14 +4625,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
4098
4625
|
MatMenuModule,
|
|
4099
4626
|
ReactiveFormsModule,
|
|
4100
4627
|
DbxDatePipeModule,
|
|
4628
|
+
DbxValuePipeModule,
|
|
4101
4629
|
MatChipsModule,
|
|
4102
4630
|
MatIconModule,
|
|
4103
4631
|
FlexLayoutModule,
|
|
4104
4632
|
FormlyModule.forChild({
|
|
4105
|
-
types: [
|
|
4633
|
+
types: [
|
|
4634
|
+
//
|
|
4635
|
+
{ name: 'datetime', component: DbxDateTimeFieldComponent, wrappers: ['style', 'form-field'] },
|
|
4636
|
+
{ name: 'fixeddaterange', component: DbxFixedDateRangeFieldComponent, wrappers: ['style', 'form-field'] }
|
|
4637
|
+
]
|
|
4106
4638
|
})
|
|
4107
4639
|
],
|
|
4108
|
-
declarations: [DbxDateTimeFieldComponent],
|
|
4640
|
+
declarations: [DbxDateTimeFieldComponent, DbxFixedDateRangeFieldComponent],
|
|
4109
4641
|
exports: [DbxFormFormlyWrapperModule]
|
|
4110
4642
|
}]
|
|
4111
4643
|
}] });
|
|
@@ -4121,18 +4653,20 @@ function timeOnlyField(config = {}) {
|
|
|
4121
4653
|
return dateTimeField(Object.assign(Object.assign({}, config), { timeMode: DbxDateTimeFieldTimeMode.REQUIRED, timeOnly: true }));
|
|
4122
4654
|
}
|
|
4123
4655
|
function dateTimeField(config = {}) {
|
|
4124
|
-
const { key = 'date', dateLabel, timeLabel, allDayLabel, atTimeLabel, timezone, showTimezone, timeMode = DbxDateTimeFieldTimeMode.REQUIRED, valueMode, fullDayInUTC, fullDayFieldName, getConfigObs, getSyncFieldsObs, hideDatePicker, hideDateHint, timeOnly = false, materialFormField } = config;
|
|
4656
|
+
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;
|
|
4125
4657
|
const fieldConfig = formlyField(Object.assign({ key, type: 'datetime' }, propsAndConfigForFieldConfig(config, Object.assign(Object.assign({}, materialFormField), { appearance: 'standard', dateLabel,
|
|
4126
4658
|
timeLabel,
|
|
4127
4659
|
allDayLabel,
|
|
4128
4660
|
atTimeLabel,
|
|
4129
4661
|
valueMode,
|
|
4130
|
-
timeOnly,
|
|
4662
|
+
timeOnly,
|
|
4663
|
+
presets, timeMode: timeOnly ? DbxDateTimeFieldTimeMode.REQUIRED : timeMode, timezone,
|
|
4131
4664
|
showTimezone,
|
|
4132
4665
|
fullDayFieldName,
|
|
4133
4666
|
fullDayInUTC,
|
|
4134
4667
|
hideDatePicker,
|
|
4135
4668
|
hideDateHint,
|
|
4669
|
+
pickerConfig,
|
|
4136
4670
|
getConfigObs,
|
|
4137
4671
|
getSyncFieldsObs }))));
|
|
4138
4672
|
return styleWrapper(fieldConfig, {
|
|
@@ -4141,14 +4675,14 @@ function dateTimeField(config = {}) {
|
|
|
4141
4675
|
}
|
|
4142
4676
|
function dateRangeField(config = {}) {
|
|
4143
4677
|
var _a, _b, _c;
|
|
4144
|
-
const { required: inputRequired, start, end, timezone, showTimezone } = config;
|
|
4678
|
+
const { required: inputRequired, start, end, timezone, showTimezone, presets } = config;
|
|
4145
4679
|
const required = (_a = inputRequired !== null && inputRequired !== void 0 ? inputRequired : start === null || start === void 0 ? void 0 : start.required) !== null && _a !== void 0 ? _a : false;
|
|
4146
4680
|
const startFieldKey = (_b = start === null || start === void 0 ? void 0 : start.key) !== null && _b !== void 0 ? _b : 'start';
|
|
4147
4681
|
const endFieldKey = (_c = end === null || end === void 0 ? void 0 : end.key) !== null && _c !== void 0 ? _c : 'end';
|
|
4148
|
-
const startField = dateTimeField(Object.assign(Object.assign({ dateLabel: 'Start', timeMode: DbxDateTimeFieldTimeMode.NONE, getSyncFieldsObs: () => of([{ syncWith: endFieldKey, syncType: 'after' }]) }, start), { timezone,
|
|
4682
|
+
const startField = dateTimeField(Object.assign(Object.assign({ dateLabel: 'Start', timeMode: DbxDateTimeFieldTimeMode.NONE, getSyncFieldsObs: () => of([{ syncWith: endFieldKey, syncType: 'after' }]), presets }, start), { timezone,
|
|
4149
4683
|
showTimezone,
|
|
4150
4684
|
required, key: startFieldKey }));
|
|
4151
|
-
const endField = dateTimeField(Object.assign(Object.assign({ dateLabel: 'End', timeMode: DbxDateTimeFieldTimeMode.NONE, getSyncFieldsObs: () => of([{ syncWith: startFieldKey, syncType: 'before' }]) }, end), { timezone,
|
|
4685
|
+
const endField = dateTimeField(Object.assign(Object.assign({ dateLabel: 'End', timeMode: DbxDateTimeFieldTimeMode.NONE, getSyncFieldsObs: () => of([{ syncWith: startFieldKey, syncType: 'before' }]), presets }, end), { timezone,
|
|
4152
4686
|
showTimezone,
|
|
4153
4687
|
required, key: endFieldKey }));
|
|
4154
4688
|
return {
|
|
@@ -4158,7 +4692,7 @@ function dateRangeField(config = {}) {
|
|
|
4158
4692
|
}
|
|
4159
4693
|
function dateTimeRangeField(inputConfig = {}) {
|
|
4160
4694
|
var _a, _b;
|
|
4161
|
-
const { required = false, start: inputStart, end: inputEnd, timezone, showTimezone } = inputConfig;
|
|
4695
|
+
const { required = false, start: inputStart, end: inputEnd, timezone, showTimezone, presets } = inputConfig;
|
|
4162
4696
|
function dateTimeRangeFieldConfig(config) {
|
|
4163
4697
|
return Object.assign(Object.assign({}, config), { required, timeMode: DbxDateTimeFieldTimeMode.REQUIRED, getSyncFieldsObs: undefined, timeOnly: true, hideDateHint: true });
|
|
4164
4698
|
}
|
|
@@ -4169,11 +4703,58 @@ function dateTimeRangeField(inputConfig = {}) {
|
|
|
4169
4703
|
const config = {
|
|
4170
4704
|
timezone,
|
|
4171
4705
|
showTimezone,
|
|
4706
|
+
presets,
|
|
4172
4707
|
start,
|
|
4173
4708
|
end
|
|
4174
4709
|
};
|
|
4175
4710
|
return dateRangeField(config);
|
|
4176
4711
|
}
|
|
4712
|
+
function fixedDateRangeField(config = {}) {
|
|
4713
|
+
const { key = 'dateRange', dateRangeInput, pickerConfig, timezone, selectionMode, showTimezone, valueMode, fullDayInUTC, presets, showRangeInput, materialFormField } = config;
|
|
4714
|
+
const fieldConfig = formlyField(Object.assign({ key, type: 'fixeddaterange' }, propsAndConfigForFieldConfig(config, Object.assign(Object.assign({}, materialFormField), { dateRangeInput,
|
|
4715
|
+
pickerConfig,
|
|
4716
|
+
valueMode,
|
|
4717
|
+
presets,
|
|
4718
|
+
timezone,
|
|
4719
|
+
selectionMode,
|
|
4720
|
+
showTimezone,
|
|
4721
|
+
fullDayInUTC,
|
|
4722
|
+
showRangeInput }))));
|
|
4723
|
+
return styleWrapper(fieldConfig, {
|
|
4724
|
+
classGetter: 'dbx-mat-form-field-disable-underline dbx-form-fixed-date-range-field-wrapper'
|
|
4725
|
+
});
|
|
4726
|
+
}
|
|
4727
|
+
|
|
4728
|
+
const DEFAULT_DATE_TIME_FIELD_MENU_PRESETS_PRESETS = [
|
|
4729
|
+
{
|
|
4730
|
+
label: '6:00AM',
|
|
4731
|
+
timeString: '6:00AM'
|
|
4732
|
+
},
|
|
4733
|
+
{
|
|
4734
|
+
label: '8:00AM',
|
|
4735
|
+
timeString: '8:00AM'
|
|
4736
|
+
},
|
|
4737
|
+
{
|
|
4738
|
+
label: '10:00AM',
|
|
4739
|
+
timeString: '10:00AM'
|
|
4740
|
+
},
|
|
4741
|
+
{
|
|
4742
|
+
label: 'Noon',
|
|
4743
|
+
timeString: '12:00PM'
|
|
4744
|
+
},
|
|
4745
|
+
{
|
|
4746
|
+
label: '2:00PM',
|
|
4747
|
+
timeString: '2:00PM'
|
|
4748
|
+
},
|
|
4749
|
+
{
|
|
4750
|
+
label: '5:00PM',
|
|
4751
|
+
timeString: '5:00PM'
|
|
4752
|
+
},
|
|
4753
|
+
{
|
|
4754
|
+
label: 'Midnight',
|
|
4755
|
+
timeString: '12:00AM'
|
|
4756
|
+
}
|
|
4757
|
+
];
|
|
4177
4758
|
|
|
4178
4759
|
function isTruthy() {
|
|
4179
4760
|
return (control) => {
|
|
@@ -5327,5 +5908,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
5327
5908
|
* Generated bundle index. Do not edit.
|
|
5328
5909
|
*/
|
|
5329
5910
|
|
|
5330
|
-
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 };
|
|
5911
|
+
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 };
|
|
5331
5912
|
//# sourceMappingURL=dereekb-dbx-form.mjs.map
|