@dereekb/dbx-form 9.23.23 → 9.23.24
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/calendar.schedule.selection.store.d.ts +2 -1
- package/esm2020/calendar/lib/calendar.schedule.selection.range.component.mjs +3 -3
- package/esm2020/calendar/lib/calendar.schedule.selection.store.mjs +34 -20
- package/fesm2015/dereekb-dbx-form-calendar.mjs +33 -19
- package/fesm2015/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/fesm2020/dereekb-dbx-form-calendar.mjs +37 -23
- package/fesm2020/dereekb-dbx-form-calendar.mjs.map +1 -1
- package/mapbox/package.json +4 -4
- package/package.json +4 -4
|
@@ -7,7 +7,7 @@ import { Injectable, SkipSelf, Directive, Injector, Optional, Component, Inject,
|
|
|
7
7
|
import { FieldType } from '@ngx-formly/material';
|
|
8
8
|
import { switchMap, first, tap, map, distinctUntilChanged, shareReplay, combineLatestWith, BehaviorSubject, of, startWith, filter, throttleTime } from 'rxjs';
|
|
9
9
|
import { filterMaybe, SubscriptionObject, asObservable } from '@dereekb/rxjs';
|
|
10
|
-
import { DateScheduleDayCode, expandDateScheduleDayCodesToDayOfWeekSet, dateTimingRelativeIndexFactory, dateBlockDayOfWeekFactory, findMaxDate, findMinDate, isSameDateRange, isSameDateDay, isSameDate, isSameDateScheduleRange,
|
|
10
|
+
import { DateScheduleDayCode, expandDateScheduleDayCodesToDayOfWeekSet, dateTimingRelativeIndexFactory, dateBlockDayOfWeekFactory, findMaxDate, findMinDate, isSameDateRange, isSameDateDay, isSameDate, isSameDateScheduleRange, dateTimingRelativeIndexArrayFactory, isInfiniteDateRange, copyDateScheduleDateFilterConfig, dateScheduleDateFilter, dateTimezoneUtcNormal, expandDateScheduleDayCodes, isDateInDateRangeFunction, isDateWithinDateBlockRangeFunction, copyHoursAndMinutesFromDate, dateScheduleEncodedWeek, dateBlockTimingDateFactory, enabledDaysFromDateScheduleDayCodes, dateScheduleDayCodesFromEnabledDays, formatToMonthDayString } from '@dereekb/date';
|
|
11
11
|
import { setsAreEquivalent, unique, mergeArrays, iterableToArray, toggleInSet, addToSet, isIndexNumberInIndexRangeFunction, range, minAndMaxNumber, getDaysOfWeekNames } from '@dereekb/util';
|
|
12
12
|
import { ComponentStore } from '@ngrx/component-store';
|
|
13
13
|
import { startOfDay, endOfDay, isBefore } from 'date-fns';
|
|
@@ -188,20 +188,20 @@ class DbxCalendarScheduleSelectionStore extends ComponentStore {
|
|
|
188
188
|
this.cellContentFactory$ = this.state$.pipe(map((x) => x.cellContentFactory), distinctUntilChanged(), shareReplay(1));
|
|
189
189
|
this.isCustomized$ = this.state$.pipe(map((x) => x.selectedIndexes.size > 0), distinctUntilChanged(), shareReplay(1));
|
|
190
190
|
// MARK: State Changes
|
|
191
|
-
this.setMinMaxDateRange = this.updater(
|
|
192
|
-
this.setFilter = this.updater(
|
|
193
|
-
this.setExclusions = this.updater(
|
|
194
|
-
this.setComputeSelectionResultRelativeToFilter = this.updater(
|
|
191
|
+
this.setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);
|
|
192
|
+
this.setFilter = this.updater(updateStateWithFilter);
|
|
193
|
+
this.setExclusions = this.updater(updateStateWithExclusions);
|
|
194
|
+
this.setComputeSelectionResultRelativeToFilter = this.updater(updateStateWithComputeSelectionResultRelativeToFilter);
|
|
195
195
|
this.clearFilter = this.updater((state) => updateStateWithFilter(state, undefined));
|
|
196
|
-
this.setTimezone = this.updater(
|
|
197
|
-
this.setInputRange = this.updater(
|
|
196
|
+
this.setTimezone = this.updater(updateStateWithTimezoneValue);
|
|
197
|
+
this.setInputRange = this.updater(updateStateWithChangedRange);
|
|
198
198
|
this.toggleSelectedDates = this.updater((state, toggle) => updateStateWithChangedDates(state, { toggle }));
|
|
199
199
|
this.addSelectedDates = this.updater((state, add) => updateStateWithChangedDates(state, { add }));
|
|
200
200
|
this.removeSelectedDates = this.updater((state, remove) => updateStateWithChangedDates(state, { remove }));
|
|
201
201
|
this.setSelectedDates = this.updater((state, set) => updateStateWithChangedDates(state, { set }));
|
|
202
202
|
this.selectAllDates = this.updater((state, selectAll = 'all') => updateStateWithChangedDates(state, { selectAll }));
|
|
203
|
-
this.setInitialSelectionState = this.updater(
|
|
204
|
-
this.setScheduleDays = this.updater(
|
|
203
|
+
this.setInitialSelectionState = this.updater(updateStateWithInitialSelectionState);
|
|
204
|
+
this.setScheduleDays = this.updater(updateStateWithChangedScheduleDays);
|
|
205
205
|
this.setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, null));
|
|
206
206
|
this.setDateScheduleRangeValue = this.updater((state, value) => updateStateWithDateScheduleRangeValue(state, value));
|
|
207
207
|
this.setCellContentFactory = this.updater((state, cellContentFactory) => ({ ...state, cellContentFactory }));
|
|
@@ -305,22 +305,36 @@ function updateStateWithFilter(state, inputFilter) {
|
|
|
305
305
|
}
|
|
306
306
|
return state;
|
|
307
307
|
}
|
|
308
|
+
function updateStateWithTimezoneValue(state, timezone) {
|
|
309
|
+
const { currentSelectionValue } = state;
|
|
310
|
+
const timezoneNormal = timezone ? dateTimezoneUtcNormal({ timezone }) : undefined;
|
|
311
|
+
if (timezoneNormal && currentSelectionValue) {
|
|
312
|
+
// update the selection value to reflect the timezone changes.
|
|
313
|
+
const { dateScheduleRange: currentDateScheduleRange } = currentSelectionValue;
|
|
314
|
+
const start = timezoneNormal.targetDateToSystemDate(currentDateScheduleRange.start);
|
|
315
|
+
const end = timezoneNormal.targetDateToSystemDate(currentDateScheduleRange.end);
|
|
316
|
+
const newRange = {
|
|
317
|
+
...currentSelectionValue.dateScheduleRange,
|
|
318
|
+
start,
|
|
319
|
+
end
|
|
320
|
+
};
|
|
321
|
+
return updateStateWithDateScheduleRangeValue({ ...state, timezone, timezoneNormal }, newRange);
|
|
322
|
+
}
|
|
323
|
+
else {
|
|
324
|
+
return { ...state, timezone, timezoneNormal }; // no change in value
|
|
325
|
+
}
|
|
326
|
+
}
|
|
308
327
|
function updateStateWithDateScheduleRangeValue(state, change) {
|
|
309
|
-
const { timezoneNormal } = state;
|
|
310
|
-
let currentDateScheduleRange =
|
|
328
|
+
const { timezoneNormal, currentSelectionValue } = state;
|
|
329
|
+
let currentDateScheduleRange = currentSelectionValue?.dateScheduleRange; // current range is always in system time
|
|
311
330
|
if (!calendarScheduleStartBeingUsedFromFilter(state) && timezoneNormal) {
|
|
331
|
+
// When using timezones, always return from the start of the day. Inputs are converted to the system time and used as the start of the day.
|
|
332
|
+
// Outputs remain accurate.
|
|
312
333
|
if (change) {
|
|
313
334
|
change = {
|
|
314
335
|
...change,
|
|
315
|
-
start: timezoneNormal.systemDateToTargetDate(change.start),
|
|
316
|
-
end: timezoneNormal.systemDateToTargetDate(change.end)
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
if (currentDateScheduleRange) {
|
|
320
|
-
currentDateScheduleRange = {
|
|
321
|
-
...currentDateScheduleRange,
|
|
322
|
-
start: timezoneNormal.targetDateToSystemDate(currentDateScheduleRange.start),
|
|
323
|
-
end: timezoneNormal.targetDateToSystemDate(currentDateScheduleRange.end)
|
|
336
|
+
start: startOfDay(timezoneNormal.systemDateToTargetDate(change.start)),
|
|
337
|
+
end: startOfDay(timezoneNormal.systemDateToTargetDate(change.end))
|
|
324
338
|
};
|
|
325
339
|
}
|
|
326
340
|
}
|
|
@@ -719,10 +733,10 @@ class DbxScheduleSelectionCalendarDateRangeComponent {
|
|
|
719
733
|
}
|
|
720
734
|
}
|
|
721
735
|
DbxScheduleSelectionCalendarDateRangeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateRangeComponent, deps: [{ token: i1.DbxCalendarStore }, { token: DbxCalendarScheduleSelectionStore }, { token: MAT_FORM_FIELD_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Component });
|
|
722
|
-
DbxScheduleSelectionCalendarDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: { label: "label", hint: "hint", disabled: "disabled", showCustomize: "showCustomize", required: "required" }, ngImport: i0, template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input [required]=\"required$ | async\" [min]=\"minDate$ | async\" [max]=\"maxDate$ | async\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-flex-bar dbx-faint dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n <mat-error *ngIf=\"range.hasError('required')\">Date range is required</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matStartDateInvalid')\">Invalid start date</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matEndDateInvalid')\">Invalid end date</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMin')\">Start date is too early</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMin')\">End date is too early.</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMax')\">Start date is too late.</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMax')\">End date is too late</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i3.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i7.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i7.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TimezoneAbbreviationPipe, name: "timezoneAbbreviation" }] });
|
|
736
|
+
DbxScheduleSelectionCalendarDateRangeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: DbxScheduleSelectionCalendarDateRangeComponent, selector: "dbx-schedule-selection-calendar-date-range", inputs: { label: "label", hint: "hint", disabled: "disabled", showCustomize: "showCustomize", required: "required" }, ngImport: i0, template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input [required]=\"required$ | async\" [min]=\"minDate$ | async\" [max]=\"maxDate$ | async\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-flex-bar dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n <mat-error *ngIf=\"range.hasError('required')\">Date range is required</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matStartDateInvalid')\">Invalid start date</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matEndDateInvalid')\">Invalid end date</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMin')\">Start date is too early</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMin')\">End date is too early.</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMax')\">Start date is too late.</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMax')\">End date is too late</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n", dependencies: [{ kind: "directive", type: i3.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.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i5.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1$1.DbxButtonSpacerDirective, selector: "dbx-button-spacer,[dbxButtonSpacer]" }, { kind: "component", type: i7.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "component", type: i7.MatDateRangeInput, selector: "mat-date-range-input", inputs: ["rangePicker", "required", "dateFilter", "min", "max", "disabled", "separator", "comparisonStart", "comparisonEnd"], exportAs: ["matDateRangeInput"] }, { kind: "directive", type: i7.MatStartDate, selector: "input[matStartDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "directive", type: i7.MatEndDate, selector: "input[matEndDate]", inputs: ["errorStateMatcher"], outputs: ["dateChange", "dateInput"] }, { kind: "component", type: i7.MatDateRangePicker, selector: "mat-date-range-picker", exportAs: ["matDateRangePicker"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }, { kind: "pipe", type: i3$1.TimezoneAbbreviationPipe, name: "timezoneAbbreviation" }] });
|
|
723
737
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: DbxScheduleSelectionCalendarDateRangeComponent, decorators: [{
|
|
724
738
|
type: Component,
|
|
725
|
-
args: [{ selector: 'dbx-schedule-selection-calendar-date-range', template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input [required]=\"required$ | async\" [min]=\"minDate$ | async\" [max]=\"maxDate$ | async\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-flex-bar dbx-faint dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n <mat-error *ngIf=\"range.hasError('required')\">Date range is required</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matStartDateInvalid')\">Invalid start date</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matEndDateInvalid')\">Invalid end date</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMin')\">Start date is too early</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMin')\">End date is too early.</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMax')\">Start date is too late.</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMax')\">End date is too late</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n" }]
|
|
739
|
+
args: [{ selector: 'dbx-schedule-selection-calendar-date-range', template: "<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n <mat-label *ngIf=\"label\">{{ label }}</mat-label>\n <div *ngIf=\"showCustomize && (isCustomized$ | async)\" class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input [required]=\"required$ | async\" [min]=\"minDate$ | async\" [max]=\"maxDate$ | async\" [formGroup]=\"range\" [rangePicker]=\"picker\">\n <input [errorStateMatcher]=\"errorStateMatcher\" matStartDate formControlName=\"start\" placeholder=\"Start date\" />\n <input [errorStateMatcher]=\"errorStateMatcher\" matEndDate formControlName=\"end\" placeholder=\"End date\" />\n </mat-date-range-input>\n <span *ngIf=\"timezone$ | async\" class=\"dbx-flex-bar dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezone$ | async | timezoneAbbreviation: (timezoneReleventDate$ | async) }}</span>\n <div *ngIf=\"showCustomize\">\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n <mat-error *ngIf=\"range.hasError('required')\">Date range is required</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matStartDateInvalid')\">Invalid start date</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matEndDateInvalid')\">Invalid end date</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMin')\">Start date is too early</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMin')\">End date is too early.</mat-error>\n <mat-error *ngIf=\"range.controls.start.hasError('matDatepickerMax')\">Start date is too late.</mat-error>\n <mat-error *ngIf=\"range.controls.end.hasError('matDatepickerMax')\">End date is too late</mat-error>\n <mat-hint>{{ hint }}</mat-hint>\n</mat-form-field>\n" }]
|
|
726
740
|
}], ctorParameters: function () { return [{ type: i1.DbxCalendarStore }, { type: DbxCalendarScheduleSelectionStore }, { type: undefined, decorators: [{
|
|
727
741
|
type: Inject,
|
|
728
742
|
args: [MAT_FORM_FIELD_DEFAULT_OPTIONS]
|
|
@@ -1400,5 +1414,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
1400
1414
|
* Generated bundle index. Do not edit.
|
|
1401
1415
|
*/
|
|
1402
1416
|
|
|
1403
|
-
export { CalendarScheduleSelectionDayState, DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY, DbxCalendarScheduleSelectionStore, DbxCalendarScheduleSelectionStoreInjectionBlockDirective, DbxCalendarScheduleSelectionStoreProviderBlock, DbxFormCalendarDateScheduleRangeFieldComponent, DbxFormCalendarModule, DbxFormDateScheduleRangeFieldModule, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarComponent, DbxScheduleSelectionCalendarDateDaysComponent, DbxScheduleSelectionCalendarDateDaysFormComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent, DbxScheduleSelectionCalendarDateDialogComponent, DbxScheduleSelectionCalendarDatePopoverButtonComponent, DbxScheduleSelectionCalendarDatePopoverComponent, DbxScheduleSelectionCalendarDatePopoverContentComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent, calendarScheduleMaxDate, calendarScheduleMinAndMaxDateRange, calendarScheduleMinDate, calendarScheduleStartBeingUsedFromFilter, computeCalendarScheduleSelectionDateBlockRange, computeCalendarScheduleSelectionRange, computeScheduleSelectionRangeAndExclusion, computeScheduleSelectionValue, dateScheduleRangeField, dbxScheduleSelectionCalendarDateDaysFormDayFields, dbxScheduleSelectionCalendarDateDaysFormFields, defaultCalendarScheduleSelectionCellContentFactory, finalizeNewCalendarScheduleSelectionState, initialCalendarScheduleSelectionState, isEnabledDayInCalendarScheduleSelectionState, noSelectionCalendarScheduleSelectionState, provideCalendarScheduleSelectionStoreIfParentIsUnavailable, updateStateWithChangedDates, updateStateWithChangedRange, updateStateWithChangedScheduleDays, updateStateWithComputeSelectionResultRelativeToFilter, updateStateWithDateScheduleRangeValue, updateStateWithExclusions, updateStateWithFilter, updateStateWithInitialSelectionState, updateStateWithMinMaxDateRange };
|
|
1417
|
+
export { CalendarScheduleSelectionDayState, DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY, DbxCalendarScheduleSelectionStore, DbxCalendarScheduleSelectionStoreInjectionBlockDirective, DbxCalendarScheduleSelectionStoreProviderBlock, DbxFormCalendarDateScheduleRangeFieldComponent, DbxFormCalendarModule, DbxFormDateScheduleRangeFieldModule, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarComponent, DbxScheduleSelectionCalendarDateDaysComponent, DbxScheduleSelectionCalendarDateDaysFormComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent, DbxScheduleSelectionCalendarDateDialogComponent, DbxScheduleSelectionCalendarDatePopoverButtonComponent, DbxScheduleSelectionCalendarDatePopoverComponent, DbxScheduleSelectionCalendarDatePopoverContentComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent, calendarScheduleMaxDate, calendarScheduleMinAndMaxDateRange, calendarScheduleMinDate, calendarScheduleStartBeingUsedFromFilter, computeCalendarScheduleSelectionDateBlockRange, computeCalendarScheduleSelectionRange, computeScheduleSelectionRangeAndExclusion, computeScheduleSelectionValue, dateScheduleRangeField, dbxScheduleSelectionCalendarDateDaysFormDayFields, dbxScheduleSelectionCalendarDateDaysFormFields, defaultCalendarScheduleSelectionCellContentFactory, finalizeNewCalendarScheduleSelectionState, initialCalendarScheduleSelectionState, isEnabledDayInCalendarScheduleSelectionState, noSelectionCalendarScheduleSelectionState, provideCalendarScheduleSelectionStoreIfParentIsUnavailable, updateStateWithChangedDates, updateStateWithChangedRange, updateStateWithChangedScheduleDays, updateStateWithComputeSelectionResultRelativeToFilter, updateStateWithDateScheduleRangeValue, updateStateWithExclusions, updateStateWithFilter, updateStateWithInitialSelectionState, updateStateWithMinMaxDateRange, updateStateWithTimezoneValue };
|
|
1404
1418
|
//# sourceMappingURL=dereekb-dbx-form-calendar.mjs.map
|