@dereekb/dbx-form 13.4.0 → 13.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"dereekb-dbx-form-calendar.mjs","sources":["../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.field.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.store.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.store.provide.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.form.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.days.form.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.days.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.range.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.range.component.html","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.content.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.cell.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.toggle.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.component.html","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.dialog.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.dialog.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.field.component.ts","../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.module.ts","../../../../packages/dbx-form/calendar/src/lib/field/index.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.module.ts","../../../../packages/dbx-form/calendar/src/dereekb-dbx-form-calendar.ts"],"sourcesContent":["import { type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig } from '@dereekb/dbx-form';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormCalendarDateCellScheduleRangeFieldProps } from './calendar.schedule.field.component';\n\nexport interface DateScheduleRangeFieldConfig extends Omit<LabeledFieldConfig, 'key' | 'placeholder'>, DescriptionFieldConfig, Partial<FieldConfig>, DbxFormCalendarDateCellScheduleRangeFieldProps {}\n\nexport function dateScheduleRangeField(config: DateScheduleRangeFieldConfig = {}): FormlyFieldConfig {\n const { key = 'schedule', appearance, hideCustomize, allowTextInput, filter, outputTimezone, initialSelectionState, computeSelectionResultRelativeToFilter, exclusions, defaultScheduleDays, minMaxDateRange, cellContentFactory, dialogContentConfig, customDetailsConfig } = config;\n\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'date-schedule-range',\n ...propsAndConfigForFieldConfig(config, {\n label: config.label ?? 'Schedule',\n allowTextInput,\n appearance,\n hideCustomize,\n outputTimezone,\n defaultScheduleDays,\n minMaxDateRange,\n filter,\n exclusions,\n dialogContentConfig,\n computeSelectionResultRelativeToFilter,\n initialSelectionState,\n cellContentFactory,\n customDetailsConfig\n })\n })\n };\n\n return fieldConfig;\n}\n","import { type DateCellIndex, type DateRange, type DateCellScheduleDateRange } from '@dereekb/date';\nimport { type FactoryWithRequiredInput } from '@dereekb/util';\nimport { type CalendarMonthViewDay } from 'angular-calendar';\n\nexport interface CalendarScheduleSelectionValue {\n /**\n * Schedule range.\n */\n readonly dateScheduleRange: DateCellScheduleDateRange;\n /**\n * Min and max dates in the selection.\n */\n readonly minMaxRange: DateRange;\n}\n\nexport enum CalendarScheduleSelectionDayState {\n NOT_APPLICABLE = 0,\n DISABLED = 1,\n NOT_SELECTED = 2,\n SELECTED = 3\n}\n\nexport interface CalendarScheduleSelectionMetadata {\n readonly state: CalendarScheduleSelectionDayState;\n readonly i: DateCellIndex;\n}\n\nexport interface CalendarScheduleSelectionCellContent {\n readonly icon?: string;\n readonly text?: string;\n}\n\nexport type CalendarScheduleSelectionCellContentFactory<M extends CalendarScheduleSelectionMetadata = CalendarScheduleSelectionMetadata> = FactoryWithRequiredInput<CalendarScheduleSelectionCellContent, CalendarMonthViewDay<M>>;\n\nexport const defaultCalendarScheduleSelectionCellContentFactory: CalendarScheduleSelectionCellContentFactory = (day: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>) => {\n let icon: string | undefined;\n let text: string | undefined;\n\n switch (day.meta?.state) {\n case CalendarScheduleSelectionDayState.SELECTED:\n icon = 'check_box';\n break;\n case CalendarScheduleSelectionDayState.DISABLED:\n icon = 'block';\n break;\n case CalendarScheduleSelectionDayState.NOT_APPLICABLE:\n break;\n case CalendarScheduleSelectionDayState.NOT_SELECTED:\n icon = 'check_box_outline_blank';\n text = 'Add';\n break;\n }\n\n const result: CalendarScheduleSelectionCellContent = {\n icon,\n text\n };\n\n return result;\n};\n","import { Injectable } from '@angular/core';\nimport {\n type DateCellDayOfWeekFactory,\n dateCellDayOfWeekFactory,\n type DateCellIndex,\n type DateCellRangeWithRange,\n dateCellTimingDateFactory,\n type DateRange,\n dateCellScheduleDateFilter,\n copyDateCellScheduleDateFilterConfig,\n type DateCellScheduleDateFilterConfig,\n DateCellScheduleDayCode,\n dateCellScheduleEncodedWeek,\n type DateCellScheduleEncodedWeek,\n type DateCellTimingRelativeIndexFactory,\n dateCellTimingRelativeIndexFactory,\n expandDateCellScheduleDayCodes,\n expandDateCellScheduleDayCodesToDayOfWeekSet,\n findMaxDate,\n findMinDate,\n isDateInDateRangeFunction,\n type IsDateWithinDateCellRangeFunction,\n isDateWithinDateCellRangeFunction,\n isSameDate,\n isSameDateDay,\n isSameDateRange,\n type DateOrDateRangeOrDateCellIndexOrDateCellRange,\n dateCellTimingRelativeIndexArrayFactory,\n isInfiniteDateRange,\n dateTimezoneUtcNormal,\n type DateTimezoneUtcNormalInstance,\n expandDateCellScheduleRange,\n type DateCell,\n type DateCellDurationSpan,\n formatToISO8601DayStringForSystem,\n type DateCellTimingRelativeIndexFactoryInput,\n dateCellScheduleDayCodesAreSetsEquivalent,\n simplifyDateCellScheduleDayCodes,\n fullWeekDateCellScheduleDayCodes,\n dateCellTimingStartDateFactory,\n type DateCellScheduleDateRange,\n dateCellTimingStartsAtForStartOfDay,\n isSameDateCellScheduleDateRange,\n type FullDateCellScheduleRangeInputDateRange,\n fullDateCellScheduleRange,\n dateCellTimingTimezoneNormalInstance,\n changeDateCellScheduleDateRangeToTimezone,\n SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE\n} from '@dereekb/date';\nimport { distinctUntilHasDifferentValues, filterMaybe } from '@dereekb/rxjs';\nimport { type Maybe, type TimezoneString, type DecisionFunction, type IterableOrValue, iterableToArray, addToSet, toggleInSet, isIndexNumberInIndexRangeFunction, type MaybeMap, minAndMaxNumber, type DayOfWeek, range, type AllOrNoneSelection, unique, mergeArrays, type ArrayOrValue, type ISO8601DayString, mapValuesToSet, isInAllowedDaysOfWeekSet, type Building, firstValueFromIterable, isIterable, removeFromSet, type Configurable } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { startOfDay, endOfDay, isBefore } from 'date-fns';\nimport { type Observable, distinctUntilChanged, map, shareReplay, switchMap, tap, first, combineLatestWith, of } from 'rxjs';\nimport { type CalendarScheduleSelectionCellContentFactory, type CalendarScheduleSelectionValue, defaultCalendarScheduleSelectionCellContentFactory } from './calendar.schedule.selection';\n\nexport interface CalendarScheduleSelectionInputDateRange {\n /**\n * Input Start Date\n */\n readonly inputStart: Date;\n /**\n * Input End Date\n */\n readonly inputEnd: Date;\n}\n\nexport type PartialCalendarScheduleSelectionInputDateRange = Partial<MaybeMap<CalendarScheduleSelectionInputDateRange>>;\n\n/**\n * DbxCalendarScheduleSelectionStore selection mode.\n *\n * When in single mode the toggle function is treated as a set that clears all values and only selects the toggle'd value.\n */\nexport type DbxCalendarScheduleSelectionStoreSelectionMode = 'multiple' | 'single';\n\nexport interface CalendarScheduleSelectionState extends PartialCalendarScheduleSelectionInputDateRange {\n /**\n * Selection mode for this calendar. Defaults to \"multiple\"\n */\n readonly selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode;\n /**\n * Readonly state of the view.\n *\n * Does not affect state changes directly, but instead acts as a flag for the parent view to set and the consuming views to update on.\n */\n readonly isViewReadonly?: Maybe<boolean>;\n /**\n * Set of the days of week that are allowed by default.\n */\n readonly defaultScheduleDays: Set<DateCellScheduleDayCode>;\n /**\n * Filters the days of the schedule to only allow selecting days in the schedule.\n *\n * The output will be relative to this filter, and in it's timezone unless computeSelectionResultRelativeToFilter is false.\n *\n * This is a copy of any set/configured input filter and will have a start date set from start or startsAt.\n */\n readonly filter?: Maybe<DateCellScheduleDateFilterConfig>;\n /**\n * Additional exclusions that may not be defined within the filter.\n */\n readonly inputExclusions?: Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>;\n /**\n * The computed exclusions given the input exclusions.\n */\n readonly computedExclusions?: Maybe<DateCellIndex[]>;\n /**\n * The min/max date range. Used for restricting the min/max value. Works with the filter. The greater/lesser of the start/end dates are used if both are provided.\n */\n readonly minMaxDateRange?: Maybe<Partial<DateRange>>;\n /**\n * Start date. Is updated as the inputStart is modified or filter is provided that provides the start date.\n *\n * Defaults to today and the current timezone.\n */\n readonly start: DateCellScheduleDateRange['start'];\n /**\n * System Timezone. Does not change.\n */\n readonly systemTimezone: TimezoneString;\n /**\n * Timezone to use when outputting the value. Only influences the output start date.\n */\n readonly outputTimezone?: Maybe<TimezoneString>;\n /**\n * Current timezone normal with the current timezone.\n */\n readonly outputTimezoneNormal?: Maybe<DateTimezoneUtcNormalInstance>;\n /**\n * DateCellTimingRelativeIndexFactory\n */\n readonly indexFactory: DateCellTimingRelativeIndexFactory;\n /**\n * Array of manually selected dates within the picked range. This is NOT the set of all selected indexes in terms of output.\n *\n * Values that exist outside of the \"input\" range are considered toggled on, while those\n * that are selected within the range are considered toggled off.\n *\n * If dates are selected, and then a range is selected, then those dates within the range that fall\n * within the range are cleared from selection.\n *\n * These indexes are relative to the start date.\n */\n readonly toggledIndexes: Set<DateCellIndex>;\n /**\n * Days of the schedule that are allowed to be picked. If not defined, defaults to defaultScheduleDays.\n */\n readonly scheduleDays?: Maybe<Set<DateCellScheduleDayCode>>;\n /**\n * The current DateCellScheduleDayCode value.\n */\n readonly effectiveScheduleDays: Set<DateCellScheduleDayCode>;\n /**\n * Set of the days of week that are allowed. Derived from the current schedule days value.\n */\n readonly allowedDaysOfWeek: Set<DayOfWeek>;\n /**\n *\n */\n readonly indexDayOfWeek: DateCellDayOfWeekFactory;\n /**\n * Decision function that returns true if a value is enabled given the current filter.\n */\n readonly isEnabledFilterDay: DecisionFunction<DateCellTimingRelativeIndexFactoryInput>;\n /**\n * Decision function that returns true if a value is enabled.\n *\n * This function does not take the current filter into account.\n */\n readonly isEnabledDay: DecisionFunction<DateCellTimingRelativeIndexFactoryInput>;\n /**\n * CalendarScheduleSelectionCellContentFactory for the view.\n */\n readonly cellContentFactory: CalendarScheduleSelectionCellContentFactory;\n /**\n * Current selection value.\n */\n readonly currentSelectionValue?: Maybe<CalendarScheduleSelectionValue>;\n /**\n * Whether or not to use the filter as the start and end range instead of optimizing for the current index.\n *\n * Defaults to true.\n */\n readonly computeSelectionResultRelativeToFilter?: Maybe<boolean>;\n /**\n * The initial selection state when the calendar is reset.\n */\n readonly initialSelectionState?: Maybe<AllOrNoneSelection>;\n}\n\nexport function initialCalendarScheduleSelectionState(): CalendarScheduleSelectionState {\n const defaultScheduleDays = new Set([DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]);\n const allowedDaysOfWeek = expandDateCellScheduleDayCodesToDayOfWeekSet(defaultScheduleDays);\n const defaultStartsAt = dateCellTimingStartsAtForStartOfDay(); // get midnight of the current timezone\n const { startsAt, timezone: systemTimezone } = defaultStartsAt;\n const indexFactory = dateCellTimingRelativeIndexFactory(defaultStartsAt);\n const indexDayOfWeek = dateCellDayOfWeekFactory(startsAt);\n\n return {\n selectionMode: 'multiple',\n start: startsAt,\n systemTimezone,\n indexFactory,\n toggledIndexes: new Set(),\n defaultScheduleDays,\n effectiveScheduleDays: defaultScheduleDays,\n allowedDaysOfWeek,\n indexDayOfWeek,\n isEnabledFilterDay: () => true,\n isEnabledDay: () => false,\n computeSelectionResultRelativeToFilter: true,\n cellContentFactory: defaultCalendarScheduleSelectionCellContentFactory\n };\n}\n\n/**\n * This is used in cases where the dates in the min/max date range need to be shifted to the filter's timezone.\n *\n * This is because the index factory is always in system timezone, but when selecting all/none with a filter we need to use the filter's timezone.\n *\n * @param x\n * @returns\n */\nfunction calendarScheduleMinAndMaxDateRangeRelativeToFilter(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Partial<DateRange> {\n let input: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'> = x;\n\n if (x.filter?.timezone && x.minMaxDateRange != null) {\n const filterNormal = dateTimezoneUtcNormal(x.filter.timezone);\n const transformFn = filterNormal.transformFunction('systemDateToTargetDate');\n\n input = {\n filter: x.filter,\n minMaxDateRange: {\n start: x.minMaxDateRange.start ? transformFn(x.minMaxDateRange.start) : undefined,\n end: x.minMaxDateRange.end ? transformFn(x.minMaxDateRange.end) : undefined\n }\n };\n }\n\n return calendarScheduleMinAndMaxDateRange(input);\n}\n\nexport function calendarScheduleMinAndMaxDateRange(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Partial<DateRange> {\n return {\n start: calendarScheduleMinDate(x) || undefined,\n end: calendarScheduleMaxDate(x) || undefined\n };\n}\n\nexport function calendarScheduleMinDate(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Maybe<Date> {\n return findMaxDate([x.filter?.start, x.minMaxDateRange?.start]);\n}\n\nexport function calendarScheduleMaxDate(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Maybe<Date> {\n return findMinDate([x.filter?.end, x.minMaxDateRange?.end]);\n}\n\nexport function calendarScheduleStartBeingUsedFromFilter(x: Pick<CalendarScheduleSelectionState, 'filter' | 'computeSelectionResultRelativeToFilter'>) {\n return x.computeSelectionResultRelativeToFilter && x.filter?.start != null; // may be using either\n}\n\n@Injectable()\nexport class DbxCalendarScheduleSelectionStore extends ComponentStore<CalendarScheduleSelectionState> {\n constructor() {\n super(initialCalendarScheduleSelectionState());\n }\n\n // MARK:\n readonly toggleSelection = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.nextToggleSelection$.pipe(\n first(),\n filterMaybe(),\n tap((x) => {\n this.selectAllDates(x);\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n readonly selectionMode$ = this.state$.pipe(\n map((x) => x.selectionMode),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly filter$ = this.state$.pipe(\n map((x) => x.filter),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly minMaxDateRange$ = this.state$.pipe(map(calendarScheduleMinAndMaxDateRange), distinctUntilChanged(isSameDateRange), shareReplay(1));\n\n readonly minDate$ = this.minMaxDateRange$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n readonly maxDate$ = this.minMaxDateRange$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly hasConfiguredMinMaxRange$ = this.minMaxDateRange$.pipe(\n map((x) => x != null && x.start != null && x.end != null),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly inputStart$ = this.state$.pipe(\n map((x) => x.inputStart),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly inputEnd$ = this.state$.pipe(\n map((x) => x.inputEnd),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly currentInputRange$: Observable<Maybe<CalendarScheduleSelectionInputDateRange>> = this.state$.pipe(\n map(({ inputStart, inputEnd }) => ({ start: inputStart, end: inputEnd })),\n distinctUntilChanged((a, b) => isSameDateRange(a as DateRange, b as DateRange)),\n map((x) => ({ inputStart: x.start, inputEnd: x.end })),\n map((x) => {\n if (x.inputStart && x.inputEnd) {\n return x as CalendarScheduleSelectionInputDateRange;\n } else {\n return undefined;\n }\n }),\n shareReplay(1)\n );\n\n readonly inputRange$: Observable<CalendarScheduleSelectionInputDateRange> = this.currentInputRange$.pipe(filterMaybe(), shareReplay(1));\n\n readonly isEnabledFilterDayFunction$: Observable<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = this.state$.pipe(\n map((x) => x.isEnabledFilterDay),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isEnabledDayFunction$: Observable<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = this.state$.pipe(\n map((x) => x.isEnabledDay),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentDateRange$: Observable<Maybe<DateRange>> = this.state$.pipe(\n map(computeCalendarScheduleSelectionRange),\n distinctUntilChanged((a, b) => isSameDateRange(a, b)),\n shareReplay(1)\n );\n\n readonly computeSelectionResultRelativeToFilter$: Observable<Maybe<boolean>> = this.state$.pipe(\n map((x) => x.computeSelectionResultRelativeToFilter),\n shareReplay(1)\n );\n\n readonly startBeingUsedFromFilter$: Observable<Maybe<boolean>> = this.state$.pipe(\n //\n map(calendarScheduleStartBeingUsedFromFilter),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly dateRange$: Observable<DateRange> = this.currentDateRange$.pipe(filterMaybe(), shareReplay(1));\n\n readonly allowedDaysOfWeek$: Observable<Set<DayOfWeek>> = this.state$.pipe(\n map((x) => x.allowedDaysOfWeek),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly isInAllowedDaysOfWeekFunction$ = this.allowedDaysOfWeek$.pipe(\n map((x) => isInAllowedDaysOfWeekSet(x)),\n shareReplay(1)\n );\n\n readonly scheduleDays$: Observable<Set<DateCellScheduleDayCode>> = this.state$.pipe(\n map((x) => x.effectiveScheduleDays),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly outputTimezone$: Observable<Maybe<TimezoneString>> = this.state$.pipe(\n map((x) => x.outputTimezone),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * The timezone of the output values.\n *\n * If an outputTimezone is not specified, this defaults to the system timezone.\n */\n readonly effectiveOutputTimezone$: Observable<TimezoneString> = this.state$.pipe(\n map((x) => x.outputTimezone || x.systemTimezone),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * An outputTimezoneNormal to use.\n *\n * If an outputTimezone is not specified, this is undefined.\n */\n readonly effectiveOutputTimezoneNormal$: Observable<Maybe<DateTimezoneUtcNormalInstance>> = this.state$.pipe(\n map((x) => (x.outputTimezoneNormal ? x.outputTimezoneNormal : undefined)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentSelectionValue$ = this.state$.pipe(\n map((x) => x.currentSelectionValue),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentSelectionValueStart$ = this.currentSelectionValue$.pipe(\n map((x) => x?.dateScheduleRange.start),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly currentSelectionValueDateCellTimingDateFactory$ = this.currentSelectionValue$.pipe(\n map((x) => (x ? dateCellTimingDateFactory({ startsAt: x.dateScheduleRange.start, timezone: x.dateScheduleRange.timezone }) : undefined)),\n shareReplay(1)\n );\n\n readonly currentSelectionValueDateCellDurationSpanExpansion$: Observable<DateCellDurationSpan<DateCell>[]> = this.currentSelectionValue$.pipe(\n map((x) => (x ? expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange }) : [])),\n shareReplay(1)\n );\n\n readonly selectionValueSelectedIndexes$: Observable<Set<DateCellIndex>> = this.currentSelectionValueDateCellDurationSpanExpansion$.pipe(\n map((x) => new Set(x.map((y) => y.i))),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly selectionValueSelectedDates$: Observable<Set<ISO8601DayString>> = this.currentSelectionValueDateCellTimingDateFactory$.pipe(\n switchMap((dateFactory) => {\n return dateFactory ? this.selectionValueSelectedIndexes$.pipe(map((x) => mapValuesToSet(x, (y) => formatToISO8601DayStringForSystem(dateFactory(y))))) : of(new Set<ISO8601DayString>());\n }),\n shareReplay(1)\n );\n\n readonly selectionValue$ = this.currentSelectionValue$.pipe(filterMaybe(), shareReplay(1));\n\n readonly currentSelectionValueWithTimezone$ = this.currentSelectionValue$.pipe(\n combineLatestWith(this.effectiveOutputTimezoneNormal$),\n map(([x, timezoneNormal]) => {\n let currentValueWithTimezone = x;\n\n if (x && timezoneNormal) {\n currentValueWithTimezone = {\n dateScheduleRange: changeDateCellScheduleDateRangeToTimezone(x.dateScheduleRange, timezoneNormal),\n minMaxRange: x.minMaxRange\n } as CalendarScheduleSelectionValue;\n }\n\n return currentValueWithTimezone;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly selectionValueWithTimezone$ = this.currentSelectionValueWithTimezone$.pipe(filterMaybe(), shareReplay(1));\n\n readonly selectionValueWithTimezoneDateCellDurationSpanExpansion$: Observable<DateCellDurationSpan<DateCell>[]> = this.selectionValueWithTimezone$.pipe(\n map((x) => expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange })),\n shareReplay(1)\n );\n\n readonly nextToggleSelection$: Observable<Maybe<AllOrNoneSelection>> = this.hasConfiguredMinMaxRange$.pipe(\n switchMap((hasConfiguredMinMaxRange) => {\n let obs: Observable<Maybe<AllOrNoneSelection>>;\n\n if (hasConfiguredMinMaxRange) {\n obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : 'all')));\n } else {\n obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : undefined)));\n }\n\n return obs;\n }),\n shareReplay(1)\n );\n\n readonly currentDateCellScheduleRangeValue$ = this.currentSelectionValueWithTimezone$.pipe(\n map((x) => x?.dateScheduleRange),\n distinctUntilChanged(isSameDateCellScheduleDateRange),\n shareReplay(1)\n );\n\n readonly dateCellScheduleRangeValue$ = this.currentDateCellScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));\n\n readonly cellContentFactory$ = this.state$.pipe(\n map((x) => x.cellContentFactory),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isCustomized$ = this.state$.pipe(\n map((x) => x.toggledIndexes.size > 0),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isViewReadonly$ = this.state$.pipe(\n map((x) => x.isViewReadonly),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n readonly setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);\n readonly setDefaultWeek = this.updater(updateStateWithMinMaxDateRange);\n readonly setFilter = this.updater(updateStateWithFilter);\n readonly setExclusions = this.updater(updateStateWithExclusions);\n readonly setComputeSelectionResultRelativeToFilter = this.updater(updateStateWithComputeSelectionResultRelativeToFilter);\n readonly clearFilter = this.updater((state) => updateStateWithFilter(state, undefined));\n\n readonly setOutputTimezone = this.updater(updateStateWithTimezoneValue);\n /**\n * Sets the \"input\" date range. This is the range that gets displayed on the date range picker.\n */\n readonly setInputRange = this.updater(updateStateWithChangedRange);\n\n // NOTE: Selected dates are NOT selected indexes. They are the internal selected dates that are excluded from the selection.\n readonly toggleSelectedDates = this.updater((state, toggle: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { toggle }));\n readonly addSelectedDates = this.updater((state, add: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { add }));\n readonly removeSelectedDates = this.updater((state, remove: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { remove }));\n readonly setSelectedDates = this.updater((state, set: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { set }));\n readonly selectAllDates = this.updater((state, selectAll: AllOrNoneSelection = 'all') => updateStateWithChangedDates(state, { selectAll }));\n\n // NOTE: Selected indexes are the typical/expected indexes that are selected or not.\n readonly setSelectedIndexes = this.updater((state, set: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { set, invertSetBehavior: true }));\n readonly setInitialSelectionState = this.updater(updateStateWithInitialSelectionState);\n\n readonly setDefaultScheduleDays = this.updater(updateStateWithChangedDefaultScheduleDays);\n readonly setScheduleDays = this.updater(updateStateWithChangedScheduleDays);\n readonly setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, [DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]));\n\n readonly setDateScheduleRangeValue = this.updater((state, value: Maybe<FullDateCellScheduleRangeInputDateRange>) => updateStateWithDateCellScheduleRangeValue(state, value));\n readonly setCellContentFactory = this.updater((state, cellContentFactory: CalendarScheduleSelectionCellContentFactory) => ({ ...state, cellContentFactory }));\n\n /**\n * Sets the selection mode.\n */\n readonly setSelectionMode = this.updater(updateStateWithSelectionMode);\n\n /**\n * Used by the parent view to propogate a readonly state.\n *\n * Should typically not be used by the user directly with the intention of the parent synchronizing to this state.\n */\n readonly setViewReadonlyState = this.updater((state, isViewReadonly: boolean) => ({ ...state, isViewReadonly }));\n}\n\nexport function updateStateWithInitialSelectionState(state: CalendarScheduleSelectionState, initialSelectionState: Maybe<AllOrNoneSelection>): CalendarScheduleSelectionState {\n const { toggledIndexes } = state;\n\n if (toggledIndexes.size === 0 && initialSelectionState === 'all') {\n state = updateStateWithChangedDates(state, { selectAll: initialSelectionState });\n }\n\n return { ...state, initialSelectionState };\n}\n\nexport function updateStateWithComputeSelectionResultRelativeToFilter(currentState: CalendarScheduleSelectionState, computeSelectionResultRelativeToFilter: Maybe<boolean>): CalendarScheduleSelectionState {\n let state: CalendarScheduleSelectionState = { ...currentState, computeSelectionResultRelativeToFilter };\n\n if (Boolean(currentState.computeSelectionResultRelativeToFilter) !== Boolean(computeSelectionResultRelativeToFilter)) {\n state = updateStateWithChangedDates(state, {}); // recalculate if change occurs as it will affect the output value\n }\n\n return state;\n}\n\nexport function updateStateWithExclusions(state: CalendarScheduleSelectionState, inputExclusions: Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>): CalendarScheduleSelectionState {\n let computedExclusions: Maybe<DateCellIndex[]>;\n\n if (inputExclusions) {\n const { indexFactory } = state;\n const indexArrayFactory = dateCellTimingRelativeIndexArrayFactory(indexFactory);\n computedExclusions = indexArrayFactory(inputExclusions);\n }\n\n state = { ...state, inputExclusions, computedExclusions };\n return updateStateWithFilter(state, state.filter);\n}\n\nexport function updateStateWithMinMaxDateRange(state: CalendarScheduleSelectionState, minMaxDateRange: Maybe<Partial<DateRange>>): CalendarScheduleSelectionState {\n if (minMaxDateRange != null && !isInfiniteDateRange(minMaxDateRange)) {\n state = {\n ...state,\n minMaxDateRange: {\n start: minMaxDateRange.start != null ? startOfDay(minMaxDateRange.start) : undefined,\n end: minMaxDateRange.end != null ? endOfDay(minMaxDateRange.end) : undefined\n }\n };\n } else {\n state = { ...state, minMaxDateRange: undefined };\n }\n\n return updateStateWithFilter(state, state.filter);\n}\n\nexport function updateStateWithFilter(currentState: CalendarScheduleSelectionState, inputFilter: Maybe<DateCellScheduleDateFilterConfig>): CalendarScheduleSelectionState {\n const { computedExclusions: exclusions, minMaxDateRange, systemTimezone } = currentState;\n\n let isEnabledFilterDay: Maybe<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = () => true;\n let filter: Maybe<DateCellScheduleDateFilterConfig> = null;\n\n // create the filter using inputFilter, exclusions, and minMaxDateRange\n if (inputFilter || exclusions?.length || minMaxDateRange) {\n let enabledFilter: Configurable<DateCellScheduleDateFilterConfig>;\n let filterStart: Maybe<Date> = null; // the start date that will be used/set on the filter.\n\n if (inputFilter) {\n filter = copyDateCellScheduleDateFilterConfig(inputFilter); // copy filter\n\n let nextFilterTimezone: TimezoneString | undefined; // only set if inputFilter.start or inputFilter.startsAt\n\n // configure filter start\n if (inputFilter.start) {\n filterStart = inputFilter.start;\n\n // if no timezone is specified, then use the system timezone and align filterStart to the start of the day.\n if (!inputFilter.timezone) {\n filterStart = SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = systemTimezone;\n } else {\n nextFilterTimezone = inputFilter.timezone;\n }\n } else if (inputFilter.startsAt) {\n if (inputFilter.timezone) {\n // if no timezone is provided, use startsAt as-is\n const timezoneNormal = dateTimezoneUtcNormal(inputFilter.timezone);\n filterStart = timezoneNormal.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = inputFilter.timezone;\n } else {\n // set to the start of today in the system timezone.\n filterStart = SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = systemTimezone;\n }\n }\n\n filter.start = filterStart ?? undefined;\n filter.timezone = nextFilterTimezone;\n\n // configure exclusions\n if (exclusions?.length) {\n enabledFilter = {\n ...filter,\n ex: unique(mergeArrays([filter.ex, exclusions]))\n };\n } else {\n enabledFilter = filter;\n }\n } else {\n enabledFilter = {\n w: '89',\n ex: exclusions as number[]\n };\n }\n\n if (minMaxDateRange) {\n enabledFilter.minMaxDateRange = minMaxDateRange;\n enabledFilter.setStartAsMinDate = filterStart ? true : false; // If a start date is set, then it becomes the floor.\n }\n\n /**\n * If the input filter has a start date, use that as the relative start to ensure indexes are compared the same,\n * otherwise use the state's start. This is important for the index calculations.\n */\n let finalEnabledStart: Date;\n let finalEnabledTimezone: TimezoneString;\n // filter?.start ?? state.start;\n\n if (!enabledFilter.start) {\n // use the current state's start, but make sure it is in the proper timezone.\n if (enabledFilter.timezone) {\n const timezoneNormal = dateTimezoneUtcNormal(enabledFilter.timezone);\n finalEnabledStart = timezoneNormal.startOfDayInTargetTimezone(currentState.start); // get the start of the day for the current start\n finalEnabledTimezone = enabledFilter.timezone;\n } else {\n finalEnabledStart = currentState.start;\n finalEnabledTimezone = systemTimezone;\n }\n } else if (!enabledFilter.timezone) {\n finalEnabledTimezone = systemTimezone;\n\n const timezoneNormal = dateTimezoneUtcNormal(finalEnabledTimezone);\n finalEnabledStart = timezoneNormal.startOfDayInTargetTimezone(enabledFilter.start); // get the start of the day for the target timezone\n } else {\n finalEnabledStart = enabledFilter.start;\n finalEnabledTimezone = enabledFilter.timezone;\n }\n\n enabledFilter.start = finalEnabledStart;\n enabledFilter.timezone = finalEnabledTimezone;\n\n // create the filter\n isEnabledFilterDay = dateCellScheduleDateFilter(enabledFilter);\n }\n\n let nextState: Building<CalendarScheduleSelectionState> = { ...currentState, filter, isEnabledFilterDay };\n\n // For the same reason as above, use the filter's start date as the relative start if applicable.\n if (filter && filter.start) {\n let startForSystemTimezone: Date = filter.start;\n\n if (filter.timezone) {\n const timezoneNormal = dateTimezoneUtcNormal(filter.timezone);\n startForSystemTimezone = timezoneNormal.systemDateToTargetDate(filter.start); // get the start of the day for the system timezone\n }\n\n nextState.start = startForSystemTimezone;\n nextState.indexFactory = dateCellTimingRelativeIndexFactory({ startsAt: startForSystemTimezone, timezone: systemTimezone });\n nextState.indexDayOfWeek = dateCellDayOfWeekFactory(startForSystemTimezone);\n }\n\n // attempt to re-apply the initial selection state once filter is applied\n if (nextState.initialSelectionState) {\n nextState = updateStateWithInitialSelectionState(nextState as CalendarScheduleSelectionState, nextState.initialSelectionState);\n }\n\n // re-calculate the selection given the filter\n const { inputStart, inputEnd } = nextState;\n\n if (inputStart && inputEnd) {\n nextState = updateStateWithChangedRange(nextState as CalendarScheduleSelectionState, { inputStart, inputEnd });\n }\n\n return nextState as CalendarScheduleSelectionState;\n}\n\nexport function updateStateWithTimezoneValue(state: CalendarScheduleSelectionState, timezone: Maybe<TimezoneString>): CalendarScheduleSelectionState {\n const { currentSelectionValue } = state;\n const timezoneNormal = timezone ? dateTimezoneUtcNormal({ timezone }) : undefined;\n\n if (timezoneNormal && currentSelectionValue) {\n // update the selection value to reflect the timezone changes.\n const { dateScheduleRange: currentDateCellScheduleRange } = currentSelectionValue;\n const start = timezoneNormal.targetDateToSystemDate(currentDateCellScheduleRange.start);\n const end = timezoneNormal.targetDateToSystemDate(currentDateCellScheduleRange.end);\n\n const newRange: DateCellScheduleDateRange = {\n ...currentSelectionValue.dateScheduleRange,\n start,\n end\n };\n\n return updateStateWithDateCellScheduleRangeValue({ ...state, outputTimezone: timezone, outputTimezoneNormal: timezoneNormal }, newRange);\n } else {\n return { ...state, outputTimezone: timezone, outputTimezoneNormal: timezoneNormal }; // no change in value\n }\n}\n\nexport function updateStateWithDateCellScheduleRangeValue(state: CalendarScheduleSelectionState, inputChange: Maybe<FullDateCellScheduleRangeInputDateRange>): CalendarScheduleSelectionState {\n const { currentSelectionValue, systemTimezone } = state;\n const currentDateCellScheduleRange = currentSelectionValue?.dateScheduleRange; // current range is always in system time\n let change: Maybe<Pick<DateCellScheduleDateRange, 'start' | 'end' | 'ex' | 'w' | 'timezone'>>;\n\n // 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.\n // Outputs remain accurate.\n\n if (inputChange) {\n // make sure a timezone is set. Input may not have a timezone attached. Default to system time.\n const inputChangeWithTimezoneSet = {\n ...inputChange,\n timezone: inputChange.timezone ?? systemTimezone\n };\n\n // calculate the schedule range\n const fullChange = fullDateCellScheduleRange({ dateCellScheduleRange: inputChangeWithTimezoneSet });\n const inputNormal = dateCellTimingTimezoneNormalInstance(fullChange);\n\n const startInSystemTz = inputNormal.systemDateToTargetDate(fullChange.start);\n const endInSystemTz = startOfDay(inputNormal.systemDateToTargetDate(fullChange.end));\n\n // convert the start/end to system time\n change = {\n start: startInSystemTz,\n end: endInSystemTz,\n w: fullChange.w,\n ex: fullChange.ex,\n timezone: fullChange.timezone\n };\n }\n\n const isSameValue = isSameDateCellScheduleDateRange(currentDateCellScheduleRange, change);\n\n if (isSameValue) {\n return state;\n } else {\n if (change != null) {\n const nextState: CalendarScheduleSelectionState = { ...state, inputStart: change.start, inputEnd: change.end, toggledIndexes: new Set(change.ex) };\n return updateStateWithChangedScheduleDays(finalizeNewCalendarScheduleSelectionState(nextState), expandDateCellScheduleDayCodes(change.w || '89'));\n } else {\n return noSelectionCalendarScheduleSelectionState(state); // clear selection, retain disabled days\n }\n }\n}\n\nexport function updateStateWithChangedDefaultScheduleDays(state: CalendarScheduleSelectionState, change: Maybe<Iterable<DateCellScheduleDayCode>>): CalendarScheduleSelectionState {\n const { defaultScheduleDays: currentDefaultScheduleDays } = state;\n const defaultScheduleDays = new Set(change ?? fullWeekDateCellScheduleDayCodes());\n\n if (dateCellScheduleDayCodesAreSetsEquivalent(defaultScheduleDays, currentDefaultScheduleDays)) {\n return state; // no change\n } else {\n return finalizeUpdateStateWithChangedScheduleDays(state, { ...state, defaultScheduleDays });\n }\n}\n\nexport function updateStateWithChangedScheduleDays(state: CalendarScheduleSelectionState, change: Maybe<Iterable<DateCellScheduleDayCode>>): CalendarScheduleSelectionState {\n const { scheduleDays: currentScheduleDays } = state;\n const scheduleDays = new Set(change ?? []);\n\n let newScheduleDays: Set<DateCellScheduleDayCode> | null | undefined;\n\n if (currentScheduleDays != null && change != null) {\n if (dateCellScheduleDayCodesAreSetsEquivalent(scheduleDays, currentScheduleDays)) {\n newScheduleDays = undefined; //no change\n } else {\n newScheduleDays = scheduleDays;\n }\n } else if (currentScheduleDays !== change) {\n newScheduleDays = change ? scheduleDays : null; // set the new one, or clear it\n }\n\n if (newScheduleDays === undefined) {\n return state;\n } else {\n return finalizeUpdateStateWithChangedScheduleDays(state, { ...state, scheduleDays: newScheduleDays ?? undefined });\n }\n}\n\nexport function updateStateWithSelectionMode(state: CalendarScheduleSelectionState, selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode): CalendarScheduleSelectionState {\n const { selectionMode: currentSelectionMode } = state;\n\n if (currentSelectionMode !== selectionMode) {\n const nextState = { ...state, selectionMode };\n\n if (selectionMode === 'multiple') {\n return nextState;\n } else {\n const currentSelectionRange = computeCalendarScheduleSelectionDateCellRange(nextState);\n return currentSelectionRange ? updateStateWithChangedDates(nextState, { set: [currentSelectionRange.i], invertSetBehavior: true }) : nextState;\n }\n } else {\n return state;\n }\n}\n\nexport function finalizeUpdateStateWithChangedScheduleDays(previousState: CalendarScheduleSelectionState, nextState: CalendarScheduleSelectionState): CalendarScheduleSelectionState {\n const previousScheduleDays = previousState.effectiveScheduleDays;\n const nextScheduleDays = nextState.scheduleDays ?? nextState.defaultScheduleDays;\n\n if (dateCellScheduleDayCodesAreSetsEquivalent(nextScheduleDays, previousScheduleDays)) {\n return nextState; // the default or input schedule changed but the schedule is still the same, so no need for an update.\n } else {\n const effectiveScheduleDays = new Set(simplifyDateCellScheduleDayCodes(nextScheduleDays));\n const allowedDaysOfWeek = expandDateCellScheduleDayCodesToDayOfWeekSet(nextScheduleDays);\n\n return finalizeNewCalendarScheduleSelectionState({\n ...nextState,\n // update the effective schedule days and allowed days of week\n effectiveScheduleDays,\n allowedDaysOfWeek\n });\n }\n}\n\nexport interface CalendarScheduleSelectionStateDatesChange {\n reset?: true;\n toggle?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n add?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n remove?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n set?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n selectAll?: AllOrNoneSelection;\n /**\n * Inverts the set date changing behavior so that the set input is treated as items that should be retained instead of excluded.\n *\n * Ignored when set is not used. Ignored for selectAll.\n */\n invertSetBehavior?: boolean;\n}\n\nexport function updateStateWithChangedDates(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionStateDatesChange): CalendarScheduleSelectionState {\n const { selectionMode, allowedDaysOfWeek, indexFactory, indexDayOfWeek, inputStart: currentInputStart, inputEnd: currentInputEnd, minMaxDateRange, filter } = state;\n const { start: minDateFromFilter, end: maxDateFromFilter } = calendarScheduleMinAndMaxDateRangeRelativeToFilter(state);\n let inputStart = currentInputStart;\n let inputEnd = currentInputEnd;\n\n /**\n * This is a set of indexes that are internally \"selected\" so that they are excluded from the inputStart/inputEnd date range.\n *\n * Do not confuse this with the actual indexes that are selected.\n */\n let toggledIndexes: Set<DateCellIndex>;\n\n function asIndexes(indexes: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>): DateCellIndex[] {\n return iterableToArray(indexes).map(indexFactory);\n }\n\n // When using selection mode \"single\" we update the change to reflect the single selection.\n if (selectionMode === 'single') {\n function setFromFirstValue(input: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>): Set<DateCellTimingRelativeIndexFactoryInput> {\n const firstValue = isIterable(input) ? firstValueFromIterable(input) : input;\n const set = new Set<DateCellTimingRelativeIndexFactoryInput>();\n\n if (firstValue != null) {\n set.add(firstValue);\n }\n\n return set;\n }\n\n if (change.set) {\n change = { set: setFromFirstValue(change.set), invertSetBehavior: true };\n } else if (change.toggle) {\n const nextSet = setFromFirstValue(change.toggle);\n\n if (nextSet.size) {\n const firstSetValueIndex = indexFactory(firstValueFromIterable(nextSet) as DateCellTimingRelativeIndexFactoryInput);\n\n if (state.toggledIndexes.has(firstSetValueIndex) || (inputStart && indexFactory(inputStart) === firstSetValueIndex)) {\n nextSet.clear(); // clear with the next set\n }\n\n change = { set: nextSet, invertSetBehavior: true };\n }\n }\n\n // set, selectAll, add, and remove are treated as they normally are.\n }\n\n if (change.reset || change.selectAll != null || change.set != null) {\n let set: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>> = change.set ?? [];\n const selectAll: Maybe<AllOrNoneSelection> = change.reset === true ? state.initialSelectionState : change.selectAll;\n\n switch (selectAll) {\n case 'all':\n if (minDateFromFilter != null && maxDateFromFilter != null) {\n inputStart = minDateFromFilter;\n inputEnd = maxDateFromFilter;\n set = [];\n }\n break;\n case 'none':\n inputStart = null;\n inputEnd = null;\n set = [];\n break;\n }\n\n const inputSetIndexes = asIndexes(set);\n toggledIndexes = new Set(inputSetIndexes);\n\n if (change.invertSetBehavior && !selectAll) {\n let minIndex: Maybe<number>;\n let maxIndex: Maybe<number>;\n\n if (minDateFromFilter != null && maxDateFromFilter != null) {\n // only applicable when the filter is set.\n minIndex = indexFactory(minDateFromFilter);\n maxIndex = indexFactory(maxDateFromFilter);\n\n inputStart = minDateFromFilter;\n inputEnd = maxDateFromFilter;\n } else {\n // when the filter is not set, use the least and greatest indexes from the input set.\n const minAndMax = minAndMaxNumber(inputSetIndexes);\n\n if (minAndMax != null) {\n minIndex = minAndMax.min;\n maxIndex = minAndMax.max;\n const dateFactory = dateCellTimingStartDateFactory(indexFactory._timing);\n\n inputStart = dateFactory(minAndMax.min);\n inputEnd = minAndMax.min === minAndMax.max ? inputStart : dateFactory(minAndMax.max);\n } else {\n // equivalent to an empty set / using \"none\" with selectAll.\n inputStart = null;\n inputEnd = null;\n toggledIndexes = new Set();\n }\n }\n\n // toggledIndexes should not include any indexes we want to include\n if (minIndex != null && maxIndex != null) {\n toggledIndexes = new Set(range(minIndex, maxIndex + 1).filter((x) => !toggledIndexes.has(x)));\n }\n }\n } else {\n toggledIndexes = new Set(state.toggledIndexes); // copy the set\n\n if (change.toggle) {\n const allowedToToggle = asIndexes(change.toggle).filter((i) => allowedDaysOfWeek.has(indexDayOfWeek(i)));\n toggleInSet(toggledIndexes, allowedToToggle);\n }\n\n let addToExclusion: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>>;\n let removeFromExclusion: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>>;\n\n if (change.add) {\n if (change.invertSetBehavior) {\n addToExclusion = change.add;\n } else {\n removeFromExclusion = change.add;\n }\n }\n\n if (change.remove) {\n if (change.invertSetBehavior) {\n removeFromExclusion = change.remove;\n } else {\n addToExclusion = change.remove;\n }\n }\n\n if (addToExclusion) {\n removeFromSet(toggledIndexes, asIndexes(addToExclusion));\n }\n\n if (removeFromExclusion) {\n addToSet(toggledIndexes, asIndexes(removeFromExclusion));\n }\n }\n\n const nextState = { ...state, inputStart, inputEnd, toggledIndexes };\n nextState.isEnabledDay = isEnabledDayInCalendarScheduleSelectionState(nextState);\n\n // Recalculate the range and simplified to exclusions\n const rangeAndExclusion = computeScheduleSelectionRangeAndExclusion(nextState);\n\n if (rangeAndExclusion) {\n return finalizeNewCalendarScheduleSelectionState({ ...nextState, toggledIndexes: new Set(rangeAndExclusion.excluded), inputStart: rangeAndExclusion.start, inputEnd: rangeAndExclusion.end });\n } else {\n // no selected days\n return noSelectionCalendarScheduleSelectionState(nextState);\n }\n}\n\nexport function noSelectionCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): CalendarScheduleSelectionState {\n return finalizeNewCalendarScheduleSelectionState({ ...state, toggledIndexes: new Set(), inputStart: null, inputEnd: null });\n}\n\nexport function updateStateWithChangedRange(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionInputDateRange): CalendarScheduleSelectionState {\n const { inputStart: currentInputStart, inputEnd: currentInputEnd, indexFactory } = state;\n const { start: minDate, end: maxDate } = calendarScheduleMinAndMaxDateRange(state);\n\n const inputStart: Date = startOfDay(change.inputStart);\n const inputEnd: Date = startOfDay(change.inputEnd); // midnight of the last day\n\n const isValidRange = minDate != null || maxDate != null ? isDateInDateRangeFunction({ start: minDate ?? undefined, end: maxDate ?? undefined }) : () => true;\n\n if (!isValidRange(inputStart) || !isValidRange(inputEnd) || (isSameDateDay(inputStart, currentInputStart) && isSameDateDay(inputEnd, currentInputEnd))) {\n return state; // if no change, return the current state.\n }\n\n // retain all indexes that are within the new range\n const minIndex = indexFactory(inputStart);\n const maxIndex = indexFactory(inputEnd) + 1;\n\n const currentIndexes: DateCellIndex[] = Array.from(state.toggledIndexes);\n const isInCurrentRange = isIndexNumberInIndexRangeFunction({ minIndex, maxIndex });\n const excludedIndexesInNewRange = currentIndexes.filter(isInCurrentRange);\n const toggledIndexes = new Set(excludedIndexesInNewRange);\n\n const nextState = { ...state, toggledIndexes, inputStart, inputEnd };\n return finalizeNewCalendarScheduleSelectionState(nextState);\n}\n\nexport function finalizeNewCalendarScheduleSelectionState(nextState: Building<CalendarScheduleSelectionState>): CalendarScheduleSelectionState {\n nextState.isEnabledDay = isEnabledDayInCalendarScheduleSelectionState(nextState as CalendarScheduleSelectionState);\n nextState.currentSelectionValue = computeScheduleSelectionValue(nextState as CalendarScheduleSelectionState);\n return nextState as CalendarScheduleSelectionState;\n}\n\nexport function isEnabledDayInCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): DecisionFunction<DateCellTimingRelativeIndexFactoryInput> {\n const { allowedDaysOfWeek, indexFactory, inputStart, inputEnd, indexDayOfWeek, systemTimezone } = state;\n let isInStartAndEndRange: IsDateWithinDateCellRangeFunction;\n\n if (inputStart && inputEnd) {\n isInStartAndEndRange = isDateWithinDateCellRangeFunction({ startsAt: { startsAt: state.start, timezone: systemTimezone }, range: { start: inputStart, end: inputEnd } });\n } else {\n isInStartAndEndRange = () => false;\n }\n\n return (input: DateCellTimingRelativeIndexFactoryInput) => {\n const index = indexFactory(input);\n const dayOfWeek = indexDayOfWeek(index);\n\n const isInSelectedRange = isInStartAndEndRange(index);\n const isSelected = state.toggledIndexes.has(index);\n const isAllowedDayOfWeek = allowedDaysOfWeek.has(dayOfWeek);\n\n const result = isAllowedDayOfWeek && ((isInSelectedRange && !isSelected) || (isSelected && !isInSelectedRange));\n return result;\n };\n}\n\nexport function computeScheduleSelectionValue(state: CalendarScheduleSelectionState): Maybe<CalendarScheduleSelectionValue> {\n const { indexFactory: systemIndexFactory, allowedDaysOfWeek, effectiveScheduleDays, indexDayOfWeek, computeSelectionResultRelativeToFilter, filter, systemTimezone } = state;\n let timezone = systemTimezone;\n const rangeAndExclusion = computeScheduleSelectionRangeAndExclusion(state);\n\n if (rangeAndExclusion == null) {\n return null;\n }\n\n const { start: rangeStart, end: rangeEnd, excluded: allExcluded, dateCellRange } = rangeAndExclusion;\n let filterOffsetExcludedRange: DateCellIndex[] = [];\n let indexOffset = dateCellRange.i;\n\n let start = rangeStart;\n let end = rangeEnd;\n\n // If computeSelectionResultRelativeToFilter is true, then we need to offset the values to be relative to that start.\n if (computeSelectionResultRelativeToFilter && filter?.start) {\n start = filter.start; // always start at the filter's start date\n let startInSystemTimezone = start;\n\n if (filter.timezone) {\n timezone = filter.timezone;\n const filterNormal = dateTimezoneUtcNormal(timezone);\n end = filterNormal.startOfDayInTargetTimezone(end);\n startInSystemTimezone = filterNormal.systemDateToTargetDate(start); // convert the start to the system timezone normal for deriving the index\n }\n\n const rangeStartIndex = systemIndexFactory(rangeStart);\n const startIndex = systemIndexFactory(startInSystemTimezone);\n const filterStartIndexOffset = rangeStartIndex - startIndex;\n filterOffsetExcludedRange = range(0, filterStartIndexOffset);\n indexOffset = indexOffset - filterStartIndexOffset;\n }\n\n const excluded = computeSelectionResultRelativeToFilter\n ? allExcluded.filter((x) => {\n const isExcludedIndex = allowedDaysOfWeek.has(indexDayOfWeek(x)); // ???\n return isExcludedIndex;\n })\n : allExcluded;\n\n const offsetExcluded: DateCellIndex[] = excluded.map((x) => x - indexOffset); // set to the proper offset\n\n const ex = [...filterOffsetExcludedRange, ...offsetExcluded];\n\n const w: DateCellScheduleEncodedWeek = dateCellScheduleEncodedWeek(effectiveScheduleDays);\n const d: DateCellIndex[] = []; // \"included\" blocks are never used/calculated.\n\n // Always ensure the end is after or equal to the start.\n if (isBefore(end, start)) {\n end = start; // end is start\n }\n\n const dateScheduleRange: DateCellScheduleDateRange = {\n timezone,\n start,\n end,\n w,\n d,\n ex\n };\n\n return {\n dateScheduleRange,\n minMaxRange: { start, end }\n };\n}\n\n/**\n * The selected date range and the corresponding cell range.\n */\nexport interface CalendarScheduleSelectionRangeAndExclusion extends DateRange {\n /**\n * Corresponds to the start and end indexes in the date range.\n */\n dateCellRange: DateCellRangeWithRange;\n /**\n * All excluded indexes.\n */\n excluded: DateCellIndex[];\n}\n\nexport function computeScheduleSelectionRangeAndExclusion(state: CalendarScheduleSelectionState): Maybe<CalendarScheduleSelectionRangeAndExclusion> {\n const { start: currentStart, isEnabledDay, isEnabledFilterDay, systemTimezone } = state;\n\n const dateFactory = dateCellTimingStartDateFactory({ startsAt: currentStart, timezone: systemTimezone });\n const dateCellRange = computeCalendarScheduleSelectionDateCellRange(state);\n\n if (dateCellRange == null) {\n return null; // returns null if no items are selected.\n }\n\n const start = dateFactory(dateCellRange.i);\n const end = dateFactory(dateCellRange.to);\n\n const excluded: DateCellIndex[] = range(dateCellRange.i, dateCellRange.to + 1).filter((x) => {\n const isExcludedIndex = !isEnabledDay(x) || !isEnabledFilterDay(x);\n return isExcludedIndex;\n });\n\n const result: CalendarScheduleSelectionRangeAndExclusion = {\n dateCellRange,\n start,\n end,\n excluded\n };\n\n return result;\n}\n\nexport function computeCalendarScheduleSelectionRange(state: CalendarScheduleSelectionState): Maybe<DateRange> {\n const dateFactory = dateCellTimingDateFactory({ startsAt: state.start, timezone: state.systemTimezone });\n const dateCellRange = computeCalendarScheduleSelectionDateCellRange(state);\n const dateRange: Maybe<DateRange> = dateCellRange != null ? { start: dateFactory(dateCellRange.i), end: dateFactory(dateCellRange.to as number) } : undefined;\n return dateRange;\n}\n\nexport function computeCalendarScheduleSelectionDateCellRange(state: CalendarScheduleSelectionState): Maybe<DateCellRangeWithRange> {\n const { allowedDaysOfWeek, indexFactory, inputStart, inputEnd, indexDayOfWeek, isEnabledDay, isEnabledFilterDay } = state;\n const enabledExclusionIndexes = Array.from(state.toggledIndexes).filter((i) => allowedDaysOfWeek.has(indexDayOfWeek(i)));\n const minAndMaxSelectedValues = minAndMaxNumber(enabledExclusionIndexes);\n\n let startRange: Maybe<DateCellIndex>;\n let endRange: Maybe<DateCellIndex>;\n\n if (minAndMaxSelectedValues) {\n startRange = minAndMaxSelectedValues.min;\n endRange = minAndMaxSelectedValues.max;\n }\n\n if (inputStart != null && inputEnd != null) {\n const inputStartIndex = indexFactory(inputStart);\n const inputEndIndex = indexFactory(inputEnd);\n\n startRange = startRange != null ? Math.min(inputStartIndex, startRange) : inputStartIndex;\n endRange = endRange != null ? Math.max(inputEndIndex, endRange) : inputEndIndex;\n }\n\n if (startRange != null && endRange != null) {\n const scanStartIndex = startRange;\n const scanEndIndex = endRange;\n\n // clear start and end\n startRange = undefined;\n endRange = undefined;\n\n // if the min is equal to the start index, then we are in the range and need to iterate dates until we find one that is not selected/excluded.\n for (let i = scanStartIndex; i <= scanEndIndex; i += 1) {\n if (isEnabledFilterDay(i) && isEnabledDay(i)) {\n startRange = i;\n break;\n }\n }\n\n // same with the max\n for (let i = scanEndIndex; i >= scanStartIndex; i -= 1) {\n if (isEnabledFilterDay(i) && isEnabledDay(i)) {\n endRange = i;\n break;\n }\n }\n }\n\n if (startRange != null && endRange != null) {\n return { i: startRange, to: endRange };\n } else {\n return undefined;\n }\n}\n","import { Directive, Injectable, Injector, Optional, type Provider, SkipSelf, inject } from '@angular/core';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\n\n/**\n * Token used by provideCalendarScheduleSelectionStoreIfDoesNotExist() to prevent injecting a parent DbxCalendarScheduleSelectionStore into the child view.\n */\n@Injectable()\nexport class DbxCalendarScheduleSelectionStoreProviderBlock {\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore, { skipSelf: true });\n}\n\n@Directive({\n selector: '[dbxCalendarScheduleSelectionStoreParentBlocker]',\n providers: [DbxCalendarScheduleSelectionStoreProviderBlock],\n standalone: true\n})\nexport class DbxCalendarScheduleSelectionStoreInjectionBlockDirective {}\n\n/**\n * Creates a Provider that initializes a new DbxCalendarScheduleSelectionStore if a parent does not exist.\n *\n * If a DbxCalendarScheduleSelectionStoreInjectionBlock is available in the context, and references the same dbxCalendarScheduleSelectionStore that is attempting to be injected, a new DbxCalendarScheduleSelectionStore is created.\n *\n * @returns\n */\nexport function provideCalendarScheduleSelectionStoreIfParentIsUnavailable(): Provider {\n return {\n provide: DbxCalendarScheduleSelectionStore,\n useFactory: (parentInjector: Injector, dbxCalendarScheduleSelectionStoreInjectionBlock?: DbxCalendarScheduleSelectionStoreProviderBlock, dbxCalendarScheduleSelectionStore?: DbxCalendarScheduleSelectionStore) => {\n if (!dbxCalendarScheduleSelectionStore || (dbxCalendarScheduleSelectionStore && dbxCalendarScheduleSelectionStoreInjectionBlock != null && dbxCalendarScheduleSelectionStoreInjectionBlock.dbxCalendarScheduleSelectionStore === dbxCalendarScheduleSelectionStore)) {\n // create a new dbxCalendarScheduleSelectionStore to use\n const injector = Injector.create({ providers: [{ provide: DbxCalendarScheduleSelectionStore }], parent: parentInjector });\n dbxCalendarScheduleSelectionStore = injector.get(DbxCalendarScheduleSelectionStore);\n }\n\n return dbxCalendarScheduleSelectionStore;\n },\n deps: [Injector, [new Optional(), DbxCalendarScheduleSelectionStoreProviderBlock], [new Optional(), new SkipSelf(), DbxCalendarScheduleSelectionStore]]\n };\n}\n","import { flexLayoutWrapper, toggleField } from '@dereekb/dbx-form';\nimport { getDaysOfWeekNames } from '@dereekb/util';\n\nexport function dbxScheduleSelectionCalendarDateDaysFormFields() {\n const fields = dbxScheduleSelectionCalendarDateDaysFormDayFields();\n return [flexLayoutWrapper(fields, { relative: true, size: 3 })];\n}\n\nexport function dbxScheduleSelectionCalendarDateDaysFormDayFields() {\n return getDaysOfWeekNames(false).map((dayOfWeekName: string) => {\n return toggleField({\n key: dayOfWeekName.toLowerCase(),\n label: dayOfWeekName\n });\n });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AbstractSyncFormlyFormDirective, dbxFormlyFormComponentProviders, DBX_FORMLY_FORM_COMPONENT_TEMPLATE, DbxFormlyFormComponentImportsModule, DbxFormFormlyWrapperModule, DbxFormFormlyBooleanFieldModule } from '@dereekb/dbx-form';\nimport { type EnabledDays } from '@dereekb/util';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { dbxScheduleSelectionCalendarDateDaysFormFields } from './calendar.schedule.selection.form';\n\nexport type DbxScheduleSelectionCalendarDateDaysFormValue = EnabledDays;\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-days-form',\n template: DBX_FORMLY_FORM_COMPONENT_TEMPLATE,\n providers: dbxFormlyFormComponentProviders(),\n imports: [DbxFormlyFormComponentImportsModule, DbxFormFormlyWrapperModule, DbxFormFormlyBooleanFieldModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDaysFormComponent extends AbstractSyncFormlyFormDirective<DbxScheduleSelectionCalendarDateDaysFormValue> {\n readonly fields: FormlyFieldConfig[] = dbxScheduleSelectionCalendarDateDaysFormFields();\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { dateCellScheduleDayCodesAreSetsEquivalent, dateCellScheduleDayCodesFromEnabledDays, enabledDaysFromDateCellScheduleDayCodes } from '@dereekb/date';\nimport { type WorkUsingObservable, type IsModifiedFunction } from '@dereekb/rxjs';\nimport { DbxCalendarStore } from '@dereekb/dbx-web/calendar';\nimport { map, shareReplay, type Observable, of } from 'rxjs';\nimport { DbxScheduleSelectionCalendarDateDaysFormComponent, type DbxScheduleSelectionCalendarDateDaysFormValue } from './calendar.schedule.selection.days.form.component';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { DbxActionModule } from '@dereekb/dbx-web';\nimport { DbxActionFormDirective, DbxFormSourceDirective } from '@dereekb/dbx-form';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-days',\n template: `\n <div class=\"dbx-schedule-selection-calendar-date-days\" dbxAction dbxActionAutoTrigger dbxActionEnforceModified [useInstantTriggerPreset]=\"true\" [dbxActionHandler]=\"updateScheduleDays\">\n <dbx-schedule-selection-calendar-date-days-form dbxActionForm [dbxFormSource]=\"template$\" [dbxActionFormIsModified]=\"isFormModified\"></dbx-schedule-selection-calendar-date-days-form>\n </div>\n `,\n imports: [DbxScheduleSelectionCalendarDateDaysFormComponent, DbxFormSourceDirective, DbxActionModule, DbxActionFormDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDaysComponent {\n readonly dbxCalendarStore = inject(DbxCalendarStore);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly template$: Observable<DbxScheduleSelectionCalendarDateDaysFormValue> = this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map(enabledDaysFromDateCellScheduleDayCodes), shareReplay(1));\n\n readonly isFormModified: IsModifiedFunction<DbxScheduleSelectionCalendarDateDaysFormValue> = (value: DbxScheduleSelectionCalendarDateDaysFormValue) => {\n const newSetValue = new Set(dateCellScheduleDayCodesFromEnabledDays(value));\n return this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(\n map((currentSet) => {\n const result = !dateCellScheduleDayCodesAreSetsEquivalent(newSetValue, currentSet);\n return result;\n })\n );\n };\n\n readonly updateScheduleDays: WorkUsingObservable<DbxScheduleSelectionCalendarDateDaysFormValue> = (value) => {\n this.dbxCalendarScheduleSelectionStore.setScheduleDays(new Set(dateCellScheduleDayCodesFromEnabledDays(value)));\n return of(true);\n };\n}\n","import { SubscriptionObject } from '@dereekb/rxjs';\nimport { Component, type OnDestroy, type OnInit, inject, viewChild, input, effect, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { DbxCalendarStore } from '@dereekb/dbx-web/calendar';\nimport { FormGroup, FormControl, type AbstractControl, ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { type Maybe } from '@dereekb/util';\nimport { switchMap, throttleTime, distinctUntilChanged, filter, BehaviorSubject, startWith, type Observable, map, shareReplay, combineLatest, EMPTY } from 'rxjs';\nimport { isSameDateDay } from '@dereekb/date';\nimport { type MatFormFieldDefaultOptions, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';\nimport { type ErrorStateMatcher } from '@angular/material/core';\nimport { type DateFilterFn, type MatDateRangePicker, MatDatepickerModule } from '@angular/material/datepicker';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { TimezoneAbbreviationPipe } from '@dereekb/dbx-core';\n\ninterface RangeValue {\n readonly start?: Maybe<Date>;\n readonly end?: Maybe<Date>;\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-range',\n templateUrl: './calendar.schedule.selection.range.component.html',\n imports: [MatFormFieldModule, FormsModule, ReactiveFormsModule, DbxButtonSpacerDirective, MatDatepickerModule, TimezoneAbbreviationPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateRangeComponent implements OnInit, OnDestroy {\n readonly dbxCalendarStore = inject(DbxCalendarStore);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n readonly matFormFieldDefaultOptions = inject<MatFormFieldDefaultOptions>(MAT_FORM_FIELD_DEFAULT_OPTIONS, { optional: true });\n\n readonly picker = viewChild.required<MatDateRangePicker<Date>>('picker');\n\n readonly required = input<boolean>(false);\n readonly openPickerOnTextClick = input<boolean>(true);\n\n readonly label = input<Maybe<string>>('Enter a date range');\n readonly hint = input<Maybe<string>>();\n\n readonly disabled = input<Maybe<boolean>>();\n readonly showCustomize = input<boolean>(false);\n\n readonly timezone$ = this.dbxCalendarScheduleSelectionStore.effectiveOutputTimezone$;\n\n protected readonly _disabledEffect = effect(() => {\n const disabled = this.disabled();\n if (disabled) {\n this.range.disable();\n } else {\n this.range.enable();\n }\n });\n\n private readonly _pickerOpened = new BehaviorSubject<boolean>(false);\n\n private readonly _syncSub = new SubscriptionObject();\n private readonly _valueSub = new SubscriptionObject();\n\n readonly range = new FormGroup({\n start: new FormControl<Maybe<Date>>(null),\n end: new FormControl<Maybe<Date>>(null)\n });\n\n readonly errorStateMatcher: ErrorStateMatcher = {\n isErrorState: (control: AbstractControl | null, form) => {\n if (control) {\n return (control.invalid && (control.dirty || control.touched)) || (control.touched && this.range.invalid);\n } else {\n return false;\n }\n }\n };\n\n readonly minDate$ = this.dbxCalendarScheduleSelectionStore.minDate$;\n readonly maxDate$ = this.dbxCalendarScheduleSelectionStore.maxDate$;\n\n readonly timezoneReleventDate$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(\n map((currentDateRange) => {\n return (currentDateRange ? (currentDateRange.start ?? currentDateRange.end) : undefined) ?? new Date();\n }),\n shareReplay(1)\n );\n\n readonly isCustomized$ = this.dbxCalendarScheduleSelectionStore.isCustomized$;\n readonly currentErrorMessage$ = this.range.statusChanges.pipe(\n filter((x) => x === 'INVALID' || x === 'VALID'),\n map((x) => {\n let currentErrorMessage: string | undefined;\n\n if (x === 'INVALID') {\n const { start, end } = this.range.controls;\n\n if (this.range.hasError('required')) {\n currentErrorMessage = 'Date range is required';\n } else if (start.hasError('matStartDateInvalid')) {\n currentErrorMessage = 'Invalid start date';\n } else if (start.hasError('matDatepickerMin')) {\n currentErrorMessage = 'Start date is too early';\n } else if (start.hasError('matDatepickerMax')) {\n currentErrorMessage = 'Start date is too late';\n } else if (end.hasError('matStartDateInvalid')) {\n currentErrorMessage = 'Invalid end date';\n } else if (end.hasError('matDatepickerMin')) {\n currentErrorMessage = 'End date is too early';\n } else if (end.hasError('matDatepickerMax')) {\n currentErrorMessage = 'End date is too late';\n }\n }\n\n return currentErrorMessage;\n }),\n shareReplay(1)\n );\n\n readonly datePickerFilter$: Observable<DateFilterFn<Date>> = combineLatest([this.dbxCalendarScheduleSelectionStore.isEnabledFilterDayFunction$, this.dbxCalendarScheduleSelectionStore.isInAllowedDaysOfWeekFunction$]).pipe(\n map(([isEnabled, isAllowedDayOfWeek]) => {\n const fn = (date: Date | null) => {\n const result = date ? isAllowedDayOfWeek(date) && isEnabled(date) : true;\n return result;\n };\n\n return fn;\n }),\n shareReplay(1)\n );\n\n readonly timezoneSignal = toSignal(this.timezone$);\n readonly timezoneReleventDateSignal = toSignal(this.timezoneReleventDate$, { initialValue: new Date() });\n readonly isCustomizedSignal = toSignal(this.isCustomized$, { initialValue: false });\n\n readonly showCustomLabelSignal = computed(() => this.showCustomize() && this.isCustomizedSignal());\n readonly currentErrorMessageSignal = toSignal(this.currentErrorMessage$);\n readonly datePickerFilterSignal = toSignal(this.datePickerFilter$, { initialValue: (() => true) as DateFilterFn<Date> });\n\n protected readonly _requiredUpdateValidatorsEffect = effect(() => {\n const validators = this.required()\n ? [\n (control: AbstractControl) => {\n const range = control.value;\n\n if (!range || !range.start || !range.end) {\n return { required: true };\n }\n\n return null;\n }\n ]\n : [];\n\n this.range.setValidators(validators);\n });\n\n ngOnInit(): void {\n this._syncSub.subscription = this.dbxCalendarScheduleSelectionStore.currentInputRange$.subscribe((x) => {\n this.range.setValue({\n start: x?.inputStart ?? null,\n end: x?.inputEnd ?? null\n });\n });\n\n this._valueSub.subscription = this._pickerOpened\n .pipe(\n distinctUntilChanged(),\n switchMap((opened) => {\n let obs: Observable<RangeValue>;\n\n if (opened) {\n obs = EMPTY;\n } else {\n obs = this.range.valueChanges.pipe(startWith(this.range.value));\n }\n\n return obs;\n }),\n filter((x) => Boolean(x.start && x.end)),\n distinctUntilChanged((a, b) => isSameDateDay(a.start, b.start) && isSameDateDay(a.end, b.end)),\n throttleTime(100, undefined, { trailing: true })\n )\n .subscribe((x) => {\n if (x.start && x.end) {\n this.dbxCalendarScheduleSelectionStore.setInputRange({ inputStart: x.start, inputEnd: x.end });\n }\n });\n }\n\n ngOnDestroy(): void {\n this._syncSub.destroy();\n this._valueSub.destroy();\n }\n\n clickedDateRangeInput() {\n if (this.openPickerOnTextClick()) {\n const picker = this.picker();\n if (picker) {\n picker.open();\n }\n }\n }\n\n pickerOpened() {\n this._pickerOpened.next(true);\n }\n\n pickerClosed() {\n this._pickerOpened.next(false);\n }\n}\n","<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n @if (label()) {\n <mat-label>{{ label() }}</mat-label>\n }\n <div class=\"dbx-schedule-selection-calendar-date-range-field-content\">\n <!-- Primary Content -->\n <div class=\"dbx-flex-bar\">\n @if (showCustomLabelSignal()) {\n <div class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n }\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle class=\"mat-datepicker-button-highlight\" matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input (click)=\"clickedDateRangeInput()\" [required]=\"required()\" [dateFilter]=\"datePickerFilterSignal()\" [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 @if (timezoneSignal()) {\n <span class=\"dbx-schedule-selection-timezone dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezoneSignal() | timezoneAbbreviation: timezoneReleventDateSignal() }}</span>\n }\n @if (showCustomize()) {\n <div>\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n }\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n </div>\n <!-- Custom Content -->\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n @if (currentErrorMessageSignal()) {\n <mat-error>{{ currentErrorMessageSignal() }}</mat-error>\n }\n <mat-hint>{{ hint() }}</mat-hint>\n</mat-form-field>\n","import { DbxScheduleSelectionCalendarDateDaysComponent } from './calendar.schedule.selection.days.component';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { DbxContentContainerDirective, DbxLabelBlockComponent } from '@dereekb/dbx-web';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from './calendar.schedule.selection.range.component';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover-content',\n template: `\n <dbx-content-container padding=\"min\" topPadding=\"normal\">\n <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]=\"false\"></dbx-schedule-selection-calendar-date-range>\n <dbx-label-block header=\"Allowed Days Of Week\">\n <dbx-schedule-selection-calendar-date-days></dbx-schedule-selection-calendar-date-days>\n </dbx-label-block>\n </dbx-content-container>\n `,\n imports: [DbxContentContainerDirective, DbxScheduleSelectionCalendarDateRangeComponent, DbxLabelBlockComponent, DbxScheduleSelectionCalendarDateDaysComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverContentComponent {}\n","import { ChangeDetectionStrategy, Component, type ElementRef, type Injector } from '@angular/core';\nimport { type DbxPopoverKey, AbstractPopoverDirective, type DbxPopoverService, DbxPopoverInteractionModule } from '@dereekb/dbx-web';\nimport { type NgPopoverRef } from 'ng-overlay-container';\nimport { DbxScheduleSelectionCalendarDatePopoverContentComponent } from './calendar.schedule.selection.popover.content.component';\n\nexport const DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY = 'calendarselection';\n\nexport interface DbxScheduleSelectionCalendarDatePopoverConfig {\n origin: ElementRef;\n injector: Injector;\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover',\n template: `\n <dbx-popover-content>\n <dbx-popover-scroll-content>\n <dbx-schedule-selection-calendar-date-popover-content></dbx-schedule-selection-calendar-date-popover-content>\n </dbx-popover-scroll-content>\n </dbx-popover-content>\n `,\n imports: [DbxPopoverInteractionModule, DbxScheduleSelectionCalendarDatePopoverContentComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverComponent extends AbstractPopoverDirective<void> {\n static openPopover(popoverService: DbxPopoverService, { origin, injector }: DbxScheduleSelectionCalendarDatePopoverConfig, popoverKey?: DbxPopoverKey): NgPopoverRef<any, number> {\n return popoverService.open({\n key: popoverKey ?? DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY,\n origin,\n componentClass: DbxScheduleSelectionCalendarDatePopoverComponent,\n injector\n });\n }\n}\n","import { DbxScheduleSelectionCalendarDatePopoverComponent } from './calendar.schedule.selection.popover.component';\nimport { ChangeDetectionStrategy, Component, ElementRef, Injector, inject, viewChild } from '@angular/core';\nimport { DbxPopoverService, DbxButtonComponent } from '@dereekb/dbx-web';\nimport { map, shareReplay } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { formatToMonthDayString } from '@dereekb/date';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover-button',\n template: `\n <dbx-button #buttonPopoverOrigin icon=\"date_range\" [disabled]=\"disabledSignal()\" [raised]=\"true\" color=\"accent\" [text]=\"buttonTextSignal()\" (buttonClick)=\"openPopover()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverButtonComponent {\n readonly injector = inject(Injector);\n readonly popoverService = inject(DbxPopoverService);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly buttonPopoverOrigin = viewChild.required<string, ElementRef<HTMLButtonElement>>('buttonPopoverOrigin', { read: ElementRef });\n\n readonly disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;\n readonly buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(\n map((x) => {\n if (x?.start && x.end) {\n const startString = formatToMonthDayString(x.start);\n const endString = formatToMonthDayString(x.end);\n return startString === endString ? startString : `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;\n } else {\n return 'Pick a Date Range';\n }\n }),\n shareReplay(1)\n );\n\n readonly disabledSignal = toSignal(this.disabled$, { initialValue: false });\n readonly buttonTextSignal = toSignal(this.buttonText$, { initialValue: 'Pick a Date Range' });\n\n openPopover() {\n const buttonElement = this.buttonPopoverOrigin();\n if (buttonElement) {\n DbxScheduleSelectionCalendarDatePopoverComponent.openPopover(this.popoverService, { origin: buttonElement, injector: this.injector });\n }\n }\n}\n","import { Component, inject, ChangeDetectionStrategy, input, computed, type Signal } from '@angular/core';\nimport { type CalendarMonthViewDay } from 'angular-calendar';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { type CalendarScheduleSelectionCellContent, type CalendarScheduleSelectionMetadata } from './calendar.schedule.selection';\nimport { MatIconModule } from '@angular/material/icon';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { map, shareReplay, switchMap } from 'rxjs';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-cell',\n template: `\n @if (iconSignal()) {\n <mat-icon>{{ iconSignal() }}</mat-icon>\n }\n <span>{{ textSignal() }}</span>\n `,\n host: {\n class: 'dbx-schedule-selection-calendar-cell'\n },\n imports: [MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarCellComponent {\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly day = input.required<CalendarMonthViewDay<CalendarScheduleSelectionMetadata>>();\n readonly day$ = toObservable(this.day);\n\n readonly cellContent$ = this.dbxCalendarScheduleSelectionStore.cellContentFactory$.pipe(\n switchMap((fn) => this.day$.pipe(map((x) => fn(x)))),\n shareReplay(1)\n );\n\n readonly contentSignal: Signal<CalendarScheduleSelectionCellContent> = toSignal(this.cellContent$, { initialValue: {} });\n\n readonly iconSignal = computed(() => this.contentSignal().icon);\n readonly textSignal = computed(() => this.contentSignal().text);\n}\n","import { Component, inject, ChangeDetectionStrategy, computed, input } from '@angular/core';\nimport { DbxButtonComponent } from '@dereekb/dbx-web';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { type DbxButtonDisplay } from '@dereekb/dbx-core';\nimport { type Maybe } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n/**\n * Toggle button for selecting and clearing the current selection.\n */\n@Component({\n selector: 'dbx-schedule-selection-calendar-selection-toggle-button',\n template: `\n <dbx-button [disabled]=\"disableButtonSignal()\" [buttonDisplay]=\"buttonDisplaySignal()\" [raised]=\"true\" (buttonClick)=\"toggleSelection()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {\n readonly disabled = input<Maybe<boolean>>();\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly selectionModeSignal = toSignal(this.dbxCalendarScheduleSelectionStore.selectionMode$, { initialValue: 'multiple' });\n readonly nextToggleSelectionSignal = toSignal(this.dbxCalendarScheduleSelectionStore.nextToggleSelection$, { initialValue: 'none' });\n\n readonly disableButtonSignal = computed(() => {\n const disabled = this.disabled();\n const nextToggleSelection = this.nextToggleSelectionSignal();\n let disableButton = false;\n\n if (disabled) {\n disableButton = true;\n } else {\n disableButton = !nextToggleSelection;\n }\n\n return disableButton;\n });\n\n readonly buttonDisplaySignal = computed(() => {\n const selectionMode = this.selectionModeSignal();\n const nextToggleSelection = this.nextToggleSelectionSignal();\n\n let buttonDisplay: DbxButtonDisplay;\n\n switch (nextToggleSelection) {\n case 'all':\n buttonDisplay = {\n icon: 'select_all',\n text: 'Select All'\n };\n break;\n default:\n case 'none':\n buttonDisplay = {\n icon: 'clear',\n text: selectionMode === 'multiple' ? 'Clear All' : 'Clear'\n };\n break;\n }\n\n return buttonDisplay;\n });\n\n toggleSelection() {\n this.dbxCalendarScheduleSelectionStore.toggleSelection();\n }\n}\n","import { Component, type OnDestroy, type OnInit, inject, ChangeDetectionStrategy, input, output } from '@angular/core';\nimport { type CalendarEvent, type CalendarMonthViewBeforeRenderEvent, type CalendarMonthViewDay, CalendarModule } from 'angular-calendar';\nimport { map, shareReplay, type Subject, first, throttleTime, distinctUntilChanged, type Observable, combineLatest, switchMap, of, combineLatestWith } from 'rxjs';\nimport { type DbxCalendarEvent, DbxCalendarStore, prepareAndSortCalendarEvents, DbxCalendarBaseComponent } from '@dereekb/dbx-web/calendar';\nimport { type DayOfWeek, type Maybe, reduceBooleansWithAnd } from '@dereekb/util';\nimport { type CalendarScheduleSelectionState, DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { CalendarScheduleSelectionDayState, type CalendarScheduleSelectionMetadata } from './calendar.schedule.selection';\nimport { type DbxInjectionComponentConfig, switchMapDbxInjectionComponentConfig, DbxInjectionComponent } from '@dereekb/dbx-core';\nimport { type ObservableOrValue, type ObservableOrValueGetter, SubscriptionObject, asObservable, asObservableFromGetter } from '@dereekb/rxjs';\nimport { DbxScheduleSelectionCalendarDatePopoverButtonComponent } from './calendar.schedule.selection.popover.button.component';\nimport { DateRangeType, dateRange, isSameDate } from '@dereekb/date';\nimport { endOfWeek } from 'date-fns';\nimport { toSignal, toObservable } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport { DbxScheduleSelectionCalendarCellComponent } from './calendar.schedule.selection.cell.component';\nimport { DbxScheduleSelectionCalendarSelectionToggleButtonComponent } from './calendar.schedule.selection.toggle.button.component';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\n\nexport interface DbxScheduleSelectionCalendarComponentConfig {\n /**\n * Whether or not the selection calendar is readonly. Defaults to 'false'.\n */\n readonly readonly?: Maybe<ObservableOrValueGetter<Maybe<boolean>>>;\n /**\n * Whether or not to show the configured buttons when readonly is true. Defaults to false.\n */\n readonly showButtonsOnReadonly?: boolean;\n /**\n * Whether or not to show the clear selection button. Defaults to `true`.\n */\n readonly showClearSelectionButton?: boolean;\n /**\n * Configuration for displaying a custom selection button. When null/undefined/true is passed, will show the default DbxScheduleSelectionCalendarDatePopoverButtonComponent.\n */\n readonly buttonInjectionConfig?: Maybe<ObservableOrValueGetter<Maybe<DbxInjectionComponentConfig<any> | boolean>>>;\n /**\n * Customize day function. When a new function is piped through the calendar is refreshed.\n */\n readonly customizeDay?: Maybe<ObservableOrValue<Maybe<DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction>>>;\n /**\n * Optional full control over the beforeMonthViewRender\n */\n readonly beforeMonthViewRenderFunctionFactory?: Maybe<ObservableOrValue<DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory>>;\n}\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction = (viewDay: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>, state: CalendarScheduleSelectionState) => void;\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction = (renderEvent: CalendarMonthViewBeforeRenderEvent) => void;\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory = (state: Observable<CalendarScheduleSelectionState>) => DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction;\n\nexport function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn?: Maybe<DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction>): DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory {\n const modifyFn = inputModifyFn || (() => {});\n\n return (state$: Observable<CalendarScheduleSelectionState>) => {\n return (renderEvent: CalendarMonthViewBeforeRenderEvent) => {\n const { body }: { body: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>[] } = renderEvent;\n\n // use latest/current state\n state$.pipe(first()).subscribe((calendarScheduleState: CalendarScheduleSelectionState) => {\n const { isEnabledDay, indexFactory, isEnabledFilterDay, allowedDaysOfWeek } = calendarScheduleState;\n body.forEach((viewDay) => {\n const { date } = viewDay;\n const i = indexFactory(date);\n const day = date.getDay();\n\n let state: CalendarScheduleSelectionDayState;\n\n if (!isEnabledFilterDay(i)) {\n viewDay.cssClass = 'cal-day-not-applicable';\n state = CalendarScheduleSelectionDayState.NOT_APPLICABLE;\n } else if (!allowedDaysOfWeek.has(day as DayOfWeek)) {\n viewDay.cssClass = 'cal-day-disabled';\n state = CalendarScheduleSelectionDayState.DISABLED;\n } else if (isEnabledDay(i)) {\n viewDay.cssClass = 'cal-day-selected';\n state = CalendarScheduleSelectionDayState.SELECTED;\n } else {\n viewDay.cssClass = 'cal-day-not-selected';\n state = CalendarScheduleSelectionDayState.NOT_SELECTED;\n }\n\n const meta = {\n state,\n i\n };\n\n viewDay.meta = meta;\n modifyFn(viewDay, calendarScheduleState);\n });\n });\n };\n };\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar',\n templateUrl: './calendar.schedule.selection.component.html',\n imports: [NgClass, CalendarModule, DbxCalendarBaseComponent, DbxInjectionComponent, DbxButtonSpacerDirective, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent],\n providers: [DbxCalendarStore],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarComponent<T> implements OnInit, OnDestroy {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly config = input<Maybe<DbxScheduleSelectionCalendarComponentConfig>>();\n readonly readonly = input<Maybe<boolean>>(false);\n\n private readonly _centerRangeSub = new SubscriptionObject();\n\n readonly config$: Observable<Maybe<DbxScheduleSelectionCalendarComponentConfig>> = toObservable(this.config).pipe(distinctUntilChanged(), shareReplay(1));\n\n readonly readonly$: Observable<boolean> = this.config$.pipe(\n switchMap((x) => (x?.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))),\n combineLatestWith(toObservable(this.readonly)),\n map(([configReadonly, inputReadonly]) => {\n return configReadonly || inputReadonly || false;\n }),\n shareReplay(1)\n );\n\n readonly showButtonsOnReadonly$: Observable<boolean> = this.config$.pipe(\n map((x) => x?.showButtonsOnReadonly ?? false),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showButtons$ = this.showButtonsOnReadonly$.pipe(\n switchMap((x) => {\n if (x) {\n return of(true);\n } else {\n return this.readonly$.pipe(map((x) => !x));\n }\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showClearSelectionButton$ = this.config$.pipe(\n map((config) => config?.showClearSelectionButton ?? true),\n combineLatestWith(this.showButtons$),\n map((x) => reduceBooleansWithAnd(x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly datePopoverButtonInjectionConfig$: Observable<Maybe<DbxInjectionComponentConfig<any>>> = this.config$.pipe(\n map((x) => x?.buttonInjectionConfig),\n switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent),\n combineLatestWith(this.showButtons$),\n map(([config, showButton]) => (showButton ? config : undefined)),\n shareReplay(1)\n );\n\n // refresh any time the selected day function updates\n readonly state$ = this.dbxCalendarScheduleSelectionStore.state$;\n\n readonly beforeMonthViewRender$ = this.config$.pipe(\n switchMap((x) => {\n let factory: Observable<DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory>;\n\n if (x?.beforeMonthViewRenderFunctionFactory) {\n factory = asObservable(x.beforeMonthViewRenderFunctionFactory);\n } else {\n factory = asObservable(x?.customizeDay).pipe(map((x) => dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(x)));\n }\n\n return factory.pipe(map((x) => x(this.state$)));\n }),\n shareReplay(1)\n );\n\n readonly refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(\n throttleTime(20, undefined, { leading: true, trailing: true }),\n map(() => undefined)\n ) as Subject<undefined>;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly beforeMonthViewRenderSignal = toSignal(this.beforeMonthViewRender$);\n readonly readonlySignal = toSignal(this.readonly$, { initialValue: false });\n readonly showClearSelectionButtonSignal = toSignal(this.showClearSelectionButton$);\n readonly datePopoverButtonInjectionConfigSignal = toSignal(this.datePopoverButtonInjectionConfig$);\n\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n\n ngOnInit(): void {\n this.dbxCalendarScheduleSelectionStore.setViewReadonlyState(this.readonly$); // sync the readonly state\n\n this.calendarStore.setNavigationRangeLimit(this.dbxCalendarScheduleSelectionStore.minMaxDateRange$); // set navigation limit to the min/max allowed dates.\n this.calendarStore.setShowPageButtons(true);\n\n // when a new filter is set, if the first two pages of selectable indexes fit within the calendar month, focus on that calendar month.\n this._centerRangeSub.subscription = this.dbxCalendarScheduleSelectionStore.currentDateRange$\n .pipe(\n first(),\n switchMap((x) => {\n const result: Observable<[typeof x, boolean]> = x\n ? of([x, true])\n : this.dbxCalendarScheduleSelectionStore.minMaxDateRange$.pipe(\n first(),\n map((y) => [y, false] as [typeof x, boolean])\n );\n return result;\n })\n )\n .subscribe(([x, isFromSelectedDateRange]) => {\n if (x?.start) {\n let tapDay: Maybe<Date>;\n const startMonth = dateRange({ date: x.start, type: DateRangeType.CALENDAR_MONTH });\n const monthToFocus = endOfWeek(startMonth.start);\n\n if (x.end != null) {\n const endMonth = dateRange({ date: x.end, type: DateRangeType.CALENDAR_MONTH });\n\n if (isSameDate(startMonth.start, endMonth.start)) {\n tapDay = monthToFocus;\n }\n }\n\n if (!tapDay && isFromSelectedDateRange) {\n tapDay = monthToFocus;\n }\n\n if (tapDay) {\n this.calendarStore.tapDay(tapDay);\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this._centerRangeSub.destroy();\n }\n\n dayClicked({ date }: { date: Date }): void {\n if (!this.readonlySignal()) {\n this.dbxCalendarScheduleSelectionStore.toggleSelectedDates(date);\n }\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n beforeMonthViewRender(renderEvent: CalendarMonthViewBeforeRenderEvent): void {\n this.beforeMonthViewRenderSignal()?.(renderEvent);\n }\n}\n","<dbx-calendar-base class=\"dbx-schedule-selection-calendar\" [ngClass]=\"readonlySignal() ? 'dbx-schedule-selection-calendar-readonly' : ''\">\n <ng-container controls>\n @if (showClearSelectionButtonSignal()) {\n <dbx-schedule-selection-calendar-selection-toggle-button [disabled]=\"readonlySignal()\"></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <dbx-injection [config]=\"datePopoverButtonInjectionConfigSignal()\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"viewDateSignal()!\" [events]=\"eventsSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n @if (day.badgeTotal > 0) {\n <span class=\"cal-day-badge\">{{ day.badgeTotal }}</span>\n }\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber' : locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, InjectionToken, type Injector } from '@angular/core';\nimport { type MatDialog } from '@angular/material/dialog';\nimport { AbstractDialogDirective, type DbxDialogContentConfig, type DbxDialogContentFooterConfig, DbxDialogModule, sanitizeDbxDialogContentConfig } from '@dereekb/dbx-web';\nimport { KeyValueTypleValueFilter, type Maybe, mergeObjects } from '@dereekb/util';\nimport { DbxScheduleSelectionCalendarComponent } from './calendar.schedule.selection.component';\n\n/**\n * Token used to configure the default DbxScheduleSelectionCalendarDatePopupConfig for DbxScheduleSelectionCalendarDateDialogComponent.\n */\nexport const DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN = new InjectionToken('DbxScheduleSelectionCalendarDatePopupContentConfig');\n\nexport interface DbxScheduleSelectionCalendarDatePopupContentConfig {\n readonly closeConfig?: DbxDialogContentFooterConfig;\n readonly dialogConfig?: DbxDialogContentConfig;\n}\n\nexport interface DbxScheduleSelectionCalendarDatePopupConfig {\n readonly injector: Injector;\n readonly contentConfig?: Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>;\n}\n\n@Component({\n template: `\n <dbx-dialog-content class=\"dbx-schedule-selection-calendar-date-dialog\">\n <dbx-dialog-content-close (close)=\"close()\"></dbx-dialog-content-close>\n <dbx-schedule-selection-calendar></dbx-schedule-selection-calendar>\n <dbx-dialog-content-footer [config]=\"closeConfig\" (close)=\"close()\"></dbx-dialog-content-footer>\n </dbx-dialog-content>\n `,\n standalone: true,\n imports: [DbxDialogModule, DbxScheduleSelectionCalendarComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxScheduleSelectionCalendarDateDialogComponent extends AbstractDialogDirective<void, DbxScheduleSelectionCalendarDatePopupConfig> {\n get contentConfig() {\n return this.data.contentConfig;\n }\n\n get closeConfig() {\n return this.contentConfig?.closeConfig;\n }\n\n static openDialog(matDialog: MatDialog, config: DbxScheduleSelectionCalendarDatePopupConfig) {\n const { injector, contentConfig: inputContentConfig } = config;\n const defaultContentConfig = injector.get<Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>>(DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN, null);\n const contentConfig = mergeObjects([defaultContentConfig, inputContentConfig], KeyValueTypleValueFilter.NULL);\n return matDialog.open(DbxScheduleSelectionCalendarDateDialogComponent, {\n height: 'calc(var(--vh100) * 0.9)',\n width: '80vw',\n minHeight: 400,\n minWidth: 360,\n ...sanitizeDbxDialogContentConfig(contentConfig.dialogConfig),\n injector,\n data: {\n config,\n contentConfig\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, Injector, inject, input } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DbxScheduleSelectionCalendarDateDialogComponent, type DbxScheduleSelectionCalendarDatePopupContentConfig } from './calendar.schedule.selection.dialog.component';\nimport { type Maybe } from '@dereekb/util';\nimport { DbxButtonComponent } from '@dereekb/dbx-web';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-dialog-button',\n template: `\n <dbx-button [raised]=\"true\" color=\"accent\" [text]=\"buttonText()\" [disabled]=\"disabled()\" (buttonClick)=\"clickCustomize()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDialogButtonComponent {\n readonly injector = inject(Injector);\n readonly matDialog = inject(MatDialog);\n\n readonly buttonText = input<string>('Customize');\n\n readonly disabled = input<Maybe<boolean>>();\n\n readonly contentConfig = input<Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>>();\n\n clickCustomize() {\n DbxScheduleSelectionCalendarDateDialogComponent.openDialog(this.matDialog, { injector: this.injector, contentConfig: this.contentConfig() });\n }\n}\n","import { type AbstractControl, type FormGroup } from '@angular/forms';\nimport { CompactContextStore } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { type ArrayOrValue, type TimezoneString, type Maybe } from '@dereekb/util';\nimport { FieldType } from '@ngx-formly/material';\nimport { BehaviorSubject, distinctUntilChanged, map, shareReplay, startWith, type Subscription, switchMap } from 'rxjs';\nimport { filterMaybe, type ObservableOrValue, SubscriptionObject, asObservable } from '@dereekb/rxjs';\nimport { type DateRange, isSameDateCellScheduleDateRange, type DateCellScheduleDateFilterConfig, type DateCellScheduleDayCode, type DateOrDateRangeOrDateCellIndexOrDateCellRange } from '@dereekb/date';\nimport { type CalendarScheduleSelectionState, DbxCalendarScheduleSelectionStore } from '../../calendar.schedule.selection.store';\nimport { provideCalendarScheduleSelectionStoreIfParentIsUnavailable } from '../../calendar.schedule.selection.store.provide';\nimport { type MatFormFieldAppearance } from '@angular/material/form-field';\nimport { type DbxScheduleSelectionCalendarDatePopupContentConfig } from '../../calendar.schedule.selection.dialog.component';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxScheduleSelectionCalendarDateDialogButtonComponent } from '../../calendar.schedule.selection.dialog.button.component';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from '../../calendar.schedule.selection.range.component';\n\nexport interface DbxFormCalendarDateCellScheduleRangeFieldProps extends Pick<FormlyFieldProps, 'label' | 'description' | 'readonly' | 'required'>, Pick<CalendarScheduleSelectionState, 'computeSelectionResultRelativeToFilter' | 'initialSelectionState'>, Partial<Pick<CalendarScheduleSelectionState, 'cellContentFactory'>> {\n readonly appearance?: MatFormFieldAppearance;\n /**\n * Whether or not to allow inputting custom text into the picker.\n *\n * If false, when the input text is picked the date picker will open.\n *\n * Is false by default.\n */\n readonly allowTextInput?: boolean;\n /**\n * Whether or not to hide the customize button. Defaults to false.\n */\n readonly hideCustomize?: boolean;\n /**\n * Whether or not to allow customizing before picking a date range to customize.\n *\n * Defaults to false.\n */\n readonly allowCustomizeWithoutDateRange?: boolean;\n /**\n * (Optional) Timezone to use for the output start date.\n *\n * If a filter is provided, this timezone overrides the filter's timezone output.\n */\n readonly outputTimezone?: ObservableOrValue<Maybe<TimezoneString>>;\n /**\n * (Optional) Default schedule days to allow.\n */\n readonly defaultScheduleDays?: ObservableOrValue<Maybe<Iterable<DateCellScheduleDayCode>>>;\n /**\n * Optional min/max date range to filter on. Works in conjuction with the filter.\n */\n readonly minMaxDateRange?: ObservableOrValue<Maybe<Partial<DateRange>>>;\n /**\n * (Optional) Observable with a filter value to apply to the date range.\n */\n readonly filter?: ObservableOrValue<Maybe<DateCellScheduleDateFilterConfig>>;\n /**\n * (Optional) Observable with days and values to exclude from the date range.\n */\n readonly exclusions?: ObservableOrValue<Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>>;\n /**\n * Custom dialog content config for the popup\n */\n readonly dialogContentConfig?: Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>;\n /**\n * Custom details config for the date range\n */\n readonly customDetailsConfig?: Maybe<DbxInjectionComponentConfig>;\n}\n\n@Component({\n template: `\n <div class=\"dbx-schedule-selection-field\">\n <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]=\"openPickerOnTextClick\" [showCustomize]=\"showCustomize\" [required]=\"required\" [disabled]=\"isReadonlyOrDisabled\" [label]=\"label\" [hint]=\"description\">\n <dbx-schedule-selection-calendar-date-dialog-button customizeButton [disabled]=\"disabledSignal()\" [contentConfig]=\"dialogContentConfig\"></dbx-schedule-selection-calendar-date-dialog-button>\n <dbx-injection [config]=\"customDetailsConfig\"></dbx-injection>\n </dbx-schedule-selection-calendar-date-range>\n </div>\n `,\n providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()],\n imports: [DbxInjectionComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormCalendarDateScheduleRangeFieldComponent<T extends DbxFormCalendarDateCellScheduleRangeFieldProps = DbxFormCalendarDateCellScheduleRangeFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n readonly compact = inject(CompactContextStore, { optional: true });\n\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n private readonly _syncSub = new SubscriptionObject();\n private readonly _valueSub = new SubscriptionObject();\n private readonly _timezoneSub = new SubscriptionObject();\n private readonly _minMaxDateRangeSub = new SubscriptionObject();\n private readonly _defaultWeekSub = new SubscriptionObject();\n private readonly _filterSub = new SubscriptionObject();\n private readonly _exclusionsSub = new SubscriptionObject();\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly disableCustomize$ = this.value$.pipe(\n map((x) => (this.allowCustomizeWithoutDateRange ? false : !x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly disabledSignal = toSignal(this.disableCustomize$);\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get openPickerOnTextClick() {\n return this.props.allowTextInput !== true; // Opposite of allowTextInput\n }\n\n get allowCustomizeWithoutDateRange() {\n return this.props.allowCustomizeWithoutDateRange ?? false;\n }\n\n get showCustomize() {\n return !this.props.hideCustomize;\n }\n\n get defaultScheduleDays() {\n return this.props.defaultScheduleDays;\n }\n\n get minMaxDateRange() {\n return this.props.minMaxDateRange;\n }\n\n get filter() {\n return this.props.filter;\n }\n\n get exclusions() {\n return this.props.exclusions;\n }\n\n get outputTimezone() {\n return this.props.outputTimezone;\n }\n\n get initialSelectionState() {\n return this.props.initialSelectionState;\n }\n\n get computeSelectionResultRelativeToFilter() {\n return this.props.computeSelectionResultRelativeToFilter;\n }\n\n get dialogContentConfig() {\n return this.props.dialogContentConfig;\n }\n\n get customDetailsConfig() {\n return this.props.customDetailsConfig;\n }\n\n get cellContentFactory() {\n return this.props.cellContentFactory;\n }\n\n ngOnInit(): void {\n this._formControlObs.next(this.formControl);\n\n this._syncSub.subscription = this.value$.pipe(distinctUntilChanged(isSameDateCellScheduleDateRange)).subscribe((x) => {\n this.dbxCalendarScheduleSelectionStore.setDateScheduleRangeValue(x);\n });\n\n this._valueSub.subscription = this.dbxCalendarScheduleSelectionStore.currentDateCellScheduleRangeValue$.subscribe((x) => {\n this.formControl.setValue(x);\n });\n\n const { outputTimezone, minMaxDateRange, filter, exclusions, defaultScheduleDays } = this;\n\n if (filter != null) {\n this._filterSub.subscription = this.dbxCalendarScheduleSelectionStore.setFilter(asObservable(filter)) as Subscription;\n }\n\n if (defaultScheduleDays != null) {\n this._defaultWeekSub.subscription = this.dbxCalendarScheduleSelectionStore.setDefaultScheduleDays(asObservable(defaultScheduleDays)) as Subscription;\n }\n\n if (minMaxDateRange != null) {\n this._minMaxDateRangeSub.subscription = this.dbxCalendarScheduleSelectionStore.setMinMaxDateRange(asObservable(minMaxDateRange)) as Subscription;\n }\n\n if (exclusions != null) {\n this._exclusionsSub.subscription = this.dbxCalendarScheduleSelectionStore.setExclusions(asObservable(exclusions)) as Subscription;\n }\n\n if (outputTimezone != null) {\n this.dbxCalendarScheduleSelectionStore.setOutputTimezone(asObservable(this.outputTimezone));\n }\n\n if (this.initialSelectionState !== undefined) {\n this.dbxCalendarScheduleSelectionStore.setInitialSelectionState(this.initialSelectionState);\n }\n\n if (this.computeSelectionResultRelativeToFilter != null) {\n this.dbxCalendarScheduleSelectionStore.setComputeSelectionResultRelativeToFilter(this.computeSelectionResultRelativeToFilter);\n }\n\n if (this.cellContentFactory != null) {\n this.dbxCalendarScheduleSelectionStore.setCellContentFactory(this.cellContentFactory);\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._syncSub.destroy();\n this._valueSub.destroy();\n this._filterSub.destroy();\n this._timezoneSub.destroy();\n this._minMaxDateRangeSub.destroy();\n this._exclusionsSub.destroy();\n this._formControlObs.complete();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormCalendarDateScheduleRangeFieldComponent } from './calendar.schedule.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormCalendarDateScheduleRangeFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'date-schedule-range', component: DbxFormCalendarDateScheduleRangeFieldComponent }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormDateScheduleRangeFieldModule {}\n","export * from './schedule';\n// export * from './selection';\n","import { NgModule } from '@angular/core';\nimport { DbxScheduleSelectionCalendarComponent } from './calendar.schedule.selection.component';\nimport { DbxScheduleSelectionCalendarDatePopoverButtonComponent } from './calendar.schedule.selection.popover.button.component';\nimport { DbxScheduleSelectionCalendarDateDaysComponent } from './calendar.schedule.selection.days.component';\nimport { DbxScheduleSelectionCalendarDatePopoverComponent } from './calendar.schedule.selection.popover.component';\nimport { DbxScheduleSelectionCalendarDatePopoverContentComponent } from './calendar.schedule.selection.popover.content.component';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from './calendar.schedule.selection.range.component';\nimport { DbxScheduleSelectionCalendarDateDaysFormComponent } from './calendar.schedule.selection.days.form.component';\nimport { DbxScheduleSelectionCalendarCellComponent } from './calendar.schedule.selection.cell.component';\nimport { DbxCalendarScheduleSelectionStoreInjectionBlockDirective } from './calendar.schedule.selection.store.provide';\nimport { DbxScheduleSelectionCalendarDateDialogComponent } from './calendar.schedule.selection.dialog.component';\nimport { DbxScheduleSelectionCalendarDateDialogButtonComponent } from './calendar.schedule.selection.dialog.button.component';\nimport { DbxScheduleSelectionCalendarSelectionToggleButtonComponent } from './calendar.schedule.selection.toggle.button.component';\nimport { DbxFormFormlyWrapperModule } from '@dereekb/dbx-form';\n\nconst importsAndExports = [\n DbxScheduleSelectionCalendarComponent,\n DbxScheduleSelectionCalendarDateDaysComponent,\n DbxScheduleSelectionCalendarDateDaysFormComponent,\n DbxScheduleSelectionCalendarDateRangeComponent,\n DbxScheduleSelectionCalendarDatePopoverButtonComponent,\n DbxScheduleSelectionCalendarCellComponent,\n DbxScheduleSelectionCalendarDatePopoverComponent,\n DbxScheduleSelectionCalendarDatePopoverContentComponent,\n DbxCalendarScheduleSelectionStoreInjectionBlockDirective,\n DbxScheduleSelectionCalendarDateDialogComponent,\n DbxScheduleSelectionCalendarDateDialogButtonComponent,\n DbxScheduleSelectionCalendarSelectionToggleButtonComponent,\n //\n DbxFormFormlyWrapperModule\n];\n\n@NgModule({\n imports: importsAndExports,\n exports: importsAndExports\n})\nexport class DbxFormCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","importsAndExports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMM,SAAU,sBAAsB,CAAC,MAAA,GAAuC,EAAE,EAAA;AAC9E,IAAA,MAAM,EAAE,GAAG,GAAG,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,sCAAsC,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,MAAM;AAErR,IAAA,MAAM,WAAW,GAAsB;AACrC,QAAA,GAAG,WAAW,CAAC;YACb,GAAG;AACH,YAAA,IAAI,EAAE,qBAAqB;YAC3B,GAAG,4BAA4B,CAAC,MAAM,EAAE;AACtC,gBAAA,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,UAAU;gBACjC,cAAc;gBACd,UAAU;gBACV,aAAa;gBACb,cAAc;gBACd,mBAAmB;gBACnB,eAAe;gBACf,MAAM;gBACN,UAAU;gBACV,mBAAmB;gBACnB,sCAAsC;gBACtC,qBAAqB;gBACrB,kBAAkB;gBAClB;aACD;SACF;KACF;AAED,IAAA,OAAO,WAAW;AACpB;;IClBY;AAAZ,CAAA,UAAY,iCAAiC,EAAA;AAC3C,IAAA,iCAAA,CAAA,iCAAA,CAAA,gBAAA,CAAA,GAAA,CAAA,CAAA,GAAA,gBAAkB;AAClB,IAAA,iCAAA,CAAA,iCAAA,CAAA,UAAA,CAAA,GAAA,CAAA,CAAA,GAAA,UAAY;AACZ,IAAA,iCAAA,CAAA,iCAAA,CAAA,cAAA,CAAA,GAAA,CA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AA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YApBhC,qCAAqC;YACrC,6CAA6C;YAC7C,iDAAiD;YACjD,8CAA8C;YAC9C,sDAAsD;YACtD,yCAAyC;YACzC,gDAAgD;YAChD,uDAAuD;YAEvD,+CAA+C;YAC/C,qDAAqD;YACrD,0DAA0D;;YAE1D,0BAA0B;;YAA1B,0BAA0B,CAAA,EAAA,CAAA;;2FAOf,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAJjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,iBAAiB;AAC1B,oBAAA,OAAO,EAAE;AACV,iBAAA;;;ACnCD;;AAEG;;;;"}
1
+ {"version":3,"file":"dereekb-dbx-form-calendar.mjs","sources":["../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.field.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.store.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.store.provide.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.form.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.days.form.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.days.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.range.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.range.component.html","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.content.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.popover.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.cell.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.toggle.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.component.html","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.dialog.component.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.schedule.selection.dialog.button.component.ts","../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.field.component.ts","../../../../packages/dbx-form/calendar/src/lib/field/schedule/calendar.schedule.module.ts","../../../../packages/dbx-form/calendar/src/lib/field/index.ts","../../../../packages/dbx-form/calendar/src/lib/calendar.module.ts","../../../../packages/dbx-form/calendar/src/dereekb-dbx-form-calendar.ts"],"sourcesContent":["import { type DescriptionFieldConfig, type FieldConfig, formlyField, type LabeledFieldConfig, propsAndConfigForFieldConfig } from '@dereekb/dbx-form';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { type DbxFormCalendarDateCellScheduleRangeFieldProps } from './calendar.schedule.field.component';\n\nexport interface DateScheduleRangeFieldConfig extends Omit<LabeledFieldConfig, 'key' | 'placeholder'>, DescriptionFieldConfig, Partial<FieldConfig>, DbxFormCalendarDateCellScheduleRangeFieldProps {}\n\n/**\n * Creates a Formly field configuration for a date schedule range picker with calendar-based selection.\n *\n * @param config - Optional schedule range field configuration overrides\n * @returns A validated Formly field configuration for date schedule range selection\n */\nexport function dateScheduleRangeField(config: DateScheduleRangeFieldConfig = {}): FormlyFieldConfig {\n const { key = 'schedule', appearance, hideCustomize, allowTextInput, filter, outputTimezone, initialSelectionState, computeSelectionResultRelativeToFilter, exclusions, defaultScheduleDays, minMaxDateRange, cellContentFactory, dialogContentConfig, customDetailsConfig } = config;\n\n const fieldConfig: FormlyFieldConfig = {\n ...formlyField({\n key,\n type: 'date-schedule-range',\n ...propsAndConfigForFieldConfig(config, {\n label: config.label ?? 'Schedule',\n allowTextInput,\n appearance,\n hideCustomize,\n outputTimezone,\n defaultScheduleDays,\n minMaxDateRange,\n filter,\n exclusions,\n dialogContentConfig,\n computeSelectionResultRelativeToFilter,\n initialSelectionState,\n cellContentFactory,\n customDetailsConfig\n })\n })\n };\n\n return fieldConfig;\n}\n","import { type DateCellIndex, type DateRange, type DateCellScheduleDateRange } from '@dereekb/date';\nimport { type FactoryWithRequiredInput } from '@dereekb/util';\nimport { type CalendarMonthViewDay } from 'angular-calendar';\n\nexport interface CalendarScheduleSelectionValue {\n /**\n * Schedule range.\n */\n readonly dateScheduleRange: DateCellScheduleDateRange;\n /**\n * Min and max dates in the selection.\n */\n readonly minMaxRange: DateRange;\n}\n\nexport enum CalendarScheduleSelectionDayState {\n NOT_APPLICABLE = 0,\n DISABLED = 1,\n NOT_SELECTED = 2,\n SELECTED = 3\n}\n\nexport interface CalendarScheduleSelectionMetadata {\n readonly state: CalendarScheduleSelectionDayState;\n readonly i: DateCellIndex;\n}\n\nexport interface CalendarScheduleSelectionCellContent {\n readonly icon?: string;\n readonly text?: string;\n}\n\nexport type CalendarScheduleSelectionCellContentFactory<M extends CalendarScheduleSelectionMetadata = CalendarScheduleSelectionMetadata> = FactoryWithRequiredInput<CalendarScheduleSelectionCellContent, CalendarMonthViewDay<M>>;\n\nexport const defaultCalendarScheduleSelectionCellContentFactory: CalendarScheduleSelectionCellContentFactory = (day: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>) => {\n let icon: string | undefined;\n let text: string | undefined;\n\n switch (day.meta?.state) {\n case CalendarScheduleSelectionDayState.SELECTED:\n icon = 'check_box';\n break;\n case CalendarScheduleSelectionDayState.DISABLED:\n icon = 'block';\n break;\n case CalendarScheduleSelectionDayState.NOT_APPLICABLE:\n break;\n case CalendarScheduleSelectionDayState.NOT_SELECTED:\n icon = 'check_box_outline_blank';\n text = 'Add';\n break;\n default:\n // meta.state is undefined when no metadata is attached to the day cell\n break;\n }\n\n const result: CalendarScheduleSelectionCellContent = {\n icon,\n text\n };\n\n return result;\n};\n","import { Injectable } from '@angular/core';\nimport {\n type DateCellDayOfWeekFactory,\n dateCellDayOfWeekFactory,\n type DateCellIndex,\n type DateCellRangeWithRange,\n dateCellTimingDateFactory,\n type DateRange,\n dateCellScheduleDateFilter,\n copyDateCellScheduleDateFilterConfig,\n type DateCellScheduleDateFilterConfig,\n DateCellScheduleDayCode,\n dateCellScheduleEncodedWeek,\n type DateCellScheduleEncodedWeek,\n type DateCellTimingRelativeIndexFactory,\n dateCellTimingRelativeIndexFactory,\n expandDateCellScheduleDayCodes,\n expandDateCellScheduleDayCodesToDayOfWeekSet,\n findMaxDate,\n findMinDate,\n isDateInDateRangeFunction,\n type IsDateWithinDateCellRangeFunction,\n isDateWithinDateCellRangeFunction,\n isSameDate,\n isSameDateDay,\n isSameDateRange,\n type DateOrDateRangeOrDateCellIndexOrDateCellRange,\n dateCellTimingRelativeIndexArrayFactory,\n isInfiniteDateRange,\n dateTimezoneUtcNormal,\n type DateTimezoneUtcNormalInstance,\n expandDateCellScheduleRange,\n type DateCell,\n type DateCellDurationSpan,\n formatToISO8601DayStringForSystem,\n type DateCellTimingRelativeIndexFactoryInput,\n dateCellScheduleDayCodesAreSetsEquivalent,\n simplifyDateCellScheduleDayCodes,\n fullWeekDateCellScheduleDayCodes,\n dateCellTimingStartDateFactory,\n type DateCellScheduleDateRange,\n dateCellTimingStartsAtForStartOfDay,\n isSameDateCellScheduleDateRange,\n type FullDateCellScheduleRangeInputDateRange,\n fullDateCellScheduleRange,\n dateCellTimingTimezoneNormalInstance,\n changeDateCellScheduleDateRangeToTimezone,\n SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE\n} from '@dereekb/date';\nimport { distinctUntilHasDifferentValues, filterMaybe } from '@dereekb/rxjs';\nimport { type Maybe, type TimezoneString, type DecisionFunction, type IterableOrValue, iterableToArray, addToSet, toggleInSet, isIndexNumberInIndexRangeFunction, type MaybeMap, minAndMaxNumber, type DayOfWeek, range, type AllOrNoneSelection, unique, mergeArrays, type ArrayOrValue, type ISO8601DayString, mapValuesToSet, isInAllowedDaysOfWeekSet, type Building, firstValueFromIterable, isIterable, removeFromSet, type Configurable } from '@dereekb/util';\nimport { ComponentStore } from '@ngrx/component-store';\nimport { startOfDay, endOfDay, isBefore } from 'date-fns';\nimport { type Observable, distinctUntilChanged, map, shareReplay, switchMap, tap, first, combineLatestWith, of } from 'rxjs';\nimport { type CalendarScheduleSelectionCellContentFactory, type CalendarScheduleSelectionValue, defaultCalendarScheduleSelectionCellContentFactory } from './calendar.schedule.selection';\n\nexport interface CalendarScheduleSelectionInputDateRange {\n /**\n * Input Start Date\n */\n readonly inputStart: Date;\n /**\n * Input End Date\n */\n readonly inputEnd: Date;\n}\n\nexport type PartialCalendarScheduleSelectionInputDateRange = Partial<MaybeMap<CalendarScheduleSelectionInputDateRange>>;\n\n/**\n * DbxCalendarScheduleSelectionStore selection mode.\n *\n * When in single mode the toggle function is treated as a set that clears all values and only selects the toggle'd value.\n */\nexport type DbxCalendarScheduleSelectionStoreSelectionMode = 'multiple' | 'single';\n\nexport interface CalendarScheduleSelectionState extends PartialCalendarScheduleSelectionInputDateRange {\n /**\n * Selection mode for this calendar. Defaults to \"multiple\"\n */\n readonly selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode;\n /**\n * Readonly state of the view.\n *\n * Does not affect state changes directly, but instead acts as a flag for the parent view to set and the consuming views to update on.\n */\n readonly isViewReadonly?: Maybe<boolean>;\n /**\n * Set of the days of week that are allowed by default.\n */\n readonly defaultScheduleDays: Set<DateCellScheduleDayCode>;\n /**\n * Filters the days of the schedule to only allow selecting days in the schedule.\n *\n * The output will be relative to this filter, and in it's timezone unless computeSelectionResultRelativeToFilter is false.\n *\n * This is a copy of any set/configured input filter and will have a start date set from start or startsAt.\n */\n readonly filter?: Maybe<DateCellScheduleDateFilterConfig>;\n /**\n * Additional exclusions that may not be defined within the filter.\n */\n readonly inputExclusions?: Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>;\n /**\n * The computed exclusions given the input exclusions.\n */\n readonly computedExclusions?: Maybe<DateCellIndex[]>;\n /**\n * The min/max date range. Used for restricting the min/max value. Works with the filter. The greater/lesser of the start/end dates are used if both are provided.\n */\n readonly minMaxDateRange?: Maybe<Partial<DateRange>>;\n /**\n * Start date. Is updated as the inputStart is modified or filter is provided that provides the start date.\n *\n * Defaults to today and the current timezone.\n */\n readonly start: DateCellScheduleDateRange['start'];\n /**\n * System Timezone. Does not change.\n */\n readonly systemTimezone: TimezoneString;\n /**\n * Timezone to use when outputting the value. Only influences the output start date.\n */\n readonly outputTimezone?: Maybe<TimezoneString>;\n /**\n * Current timezone normal with the current timezone.\n */\n readonly outputTimezoneNormal?: Maybe<DateTimezoneUtcNormalInstance>;\n /**\n * DateCellTimingRelativeIndexFactory\n */\n readonly indexFactory: DateCellTimingRelativeIndexFactory;\n /**\n * Array of manually selected dates within the picked range. This is NOT the set of all selected indexes in terms of output.\n *\n * Values that exist outside of the \"input\" range are considered toggled on, while those\n * that are selected within the range are considered toggled off.\n *\n * If dates are selected, and then a range is selected, then those dates within the range that fall\n * within the range are cleared from selection.\n *\n * These indexes are relative to the start date.\n */\n readonly toggledIndexes: Set<DateCellIndex>;\n /**\n * Days of the schedule that are allowed to be picked. If not defined, defaults to defaultScheduleDays.\n */\n readonly scheduleDays?: Maybe<Set<DateCellScheduleDayCode>>;\n /**\n * The current DateCellScheduleDayCode value.\n */\n readonly effectiveScheduleDays: Set<DateCellScheduleDayCode>;\n /**\n * Set of the days of week that are allowed. Derived from the current schedule days value.\n */\n readonly allowedDaysOfWeek: Set<DayOfWeek>;\n /**\n *\n */\n readonly indexDayOfWeek: DateCellDayOfWeekFactory;\n /**\n * Decision function that returns true if a value is enabled given the current filter.\n */\n readonly isEnabledFilterDay: DecisionFunction<DateCellTimingRelativeIndexFactoryInput>;\n /**\n * Decision function that returns true if a value is enabled.\n *\n * This function does not take the current filter into account.\n */\n readonly isEnabledDay: DecisionFunction<DateCellTimingRelativeIndexFactoryInput>;\n /**\n * CalendarScheduleSelectionCellContentFactory for the view.\n */\n readonly cellContentFactory: CalendarScheduleSelectionCellContentFactory;\n /**\n * Current selection value.\n */\n readonly currentSelectionValue?: Maybe<CalendarScheduleSelectionValue>;\n /**\n * Whether or not to use the filter as the start and end range instead of optimizing for the current index.\n *\n * Defaults to true.\n */\n readonly computeSelectionResultRelativeToFilter?: Maybe<boolean>;\n /**\n * The initial selection state when the calendar is reset.\n */\n readonly initialSelectionState?: Maybe<AllOrNoneSelection>;\n}\n\n/**\n * Creates the default initial state for the calendar schedule selection store,\n * using the current system timezone and all days of the week enabled.\n *\n * @returns A fresh CalendarScheduleSelectionState with default values\n */\nexport function initialCalendarScheduleSelectionState(): CalendarScheduleSelectionState {\n const defaultScheduleDays = new Set([DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]);\n const allowedDaysOfWeek = expandDateCellScheduleDayCodesToDayOfWeekSet(defaultScheduleDays);\n const defaultStartsAt = dateCellTimingStartsAtForStartOfDay(); // get midnight of the current timezone\n const { startsAt, timezone: systemTimezone } = defaultStartsAt;\n const indexFactory = dateCellTimingRelativeIndexFactory(defaultStartsAt);\n const indexDayOfWeek = dateCellDayOfWeekFactory(startsAt);\n\n return {\n selectionMode: 'multiple',\n start: startsAt,\n systemTimezone,\n indexFactory,\n toggledIndexes: new Set(),\n defaultScheduleDays,\n effectiveScheduleDays: defaultScheduleDays,\n allowedDaysOfWeek,\n indexDayOfWeek,\n isEnabledFilterDay: () => true,\n isEnabledDay: () => false,\n computeSelectionResultRelativeToFilter: true,\n cellContentFactory: defaultCalendarScheduleSelectionCellContentFactory\n };\n}\n\n/**\n * This is used in cases where the dates in the min/max date range need to be shifted to the filter's timezone.\n *\n * This is because the index factory is always in system timezone, but when selecting all/none with a filter we need to use the filter's timezone.\n *\n * @param x\n * @returns\n */\nfunction calendarScheduleMinAndMaxDateRangeRelativeToFilter(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Partial<DateRange> {\n let input: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'> = x;\n\n if (x.filter?.timezone && x.minMaxDateRange != null) {\n const filterNormal = dateTimezoneUtcNormal(x.filter.timezone);\n const transformFn = filterNormal.transformFunction('systemDateToTargetDate');\n\n input = {\n filter: x.filter,\n minMaxDateRange: {\n start: x.minMaxDateRange.start ? transformFn(x.minMaxDateRange.start) : undefined,\n end: x.minMaxDateRange.end ? transformFn(x.minMaxDateRange.end) : undefined\n }\n };\n }\n\n return calendarScheduleMinAndMaxDateRange(input);\n}\n\n/**\n * Computes the effective min and max date range by combining the filter and the explicit minMaxDateRange constraints.\n *\n * @param x - State containing filter and minMaxDateRange to compute from\n * @returns A partial date range with the effective start and end boundaries\n */\nexport function calendarScheduleMinAndMaxDateRange(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Partial<DateRange> {\n return {\n start: calendarScheduleMinDate(x) || undefined,\n end: calendarScheduleMaxDate(x) || undefined\n };\n}\n\n/**\n * Returns the effective minimum date by taking the latest start date between the filter and minMaxDateRange.\n *\n * @param x - State containing filter and minMaxDateRange\n * @returns The latest start date, or undefined if none\n */\nexport function calendarScheduleMinDate(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Maybe<Date> {\n return findMaxDate([x.filter?.start, x.minMaxDateRange?.start]);\n}\n\n/**\n * Returns the effective maximum date by taking the earliest end date between the filter and minMaxDateRange.\n *\n * @param x - State containing filter and minMaxDateRange\n * @returns The earliest end date, or undefined if none\n */\nexport function calendarScheduleMaxDate(x: Pick<CalendarScheduleSelectionState, 'filter' | 'minMaxDateRange'>): Maybe<Date> {\n return findMinDate([x.filter?.end, x.minMaxDateRange?.end]);\n}\n\n/**\n * Returns whether the filter's start date is being used as the effective start for the selection result computation.\n *\n * @param x - State containing filter and computeSelectionResultRelativeToFilter\n * @returns True if the filter start is being used for the selection result\n */\nexport function calendarScheduleStartBeingUsedFromFilter(x: Pick<CalendarScheduleSelectionState, 'filter' | 'computeSelectionResultRelativeToFilter'>) {\n return x.computeSelectionResultRelativeToFilter && x.filter?.start != null; // may be using either\n}\n\n@Injectable()\nexport class DbxCalendarScheduleSelectionStore extends ComponentStore<CalendarScheduleSelectionState> {\n constructor() {\n super(initialCalendarScheduleSelectionState());\n }\n\n // MARK:\n readonly toggleSelection = this.effect((input: Observable<void>) => {\n return input.pipe(\n switchMap(() =>\n this.nextToggleSelection$.pipe(\n first(),\n filterMaybe(),\n tap((x) => {\n this.selectAllDates(x);\n })\n )\n )\n );\n });\n\n // MARK: Accessors\n readonly selectionMode$ = this.state$.pipe(\n map((x) => x.selectionMode),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly filter$ = this.state$.pipe(\n map((x) => x.filter),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly minMaxDateRange$ = this.state$.pipe(map(calendarScheduleMinAndMaxDateRange), distinctUntilChanged(isSameDateRange), shareReplay(1));\n\n readonly minDate$ = this.minMaxDateRange$.pipe(\n map((x) => x?.start),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n readonly maxDate$ = this.minMaxDateRange$.pipe(\n map((x) => x?.end),\n distinctUntilChanged(isSameDateDay),\n shareReplay(1)\n );\n\n readonly hasConfiguredMinMaxRange$ = this.minMaxDateRange$.pipe(\n map((x) => x?.start != null && x.end != null),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly inputStart$ = this.state$.pipe(\n map((x) => x.inputStart),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly inputEnd$ = this.state$.pipe(\n map((x) => x.inputEnd),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly currentInputRange$: Observable<Maybe<CalendarScheduleSelectionInputDateRange>> = this.state$.pipe(\n map(({ inputStart, inputEnd }) => ({ start: inputStart, end: inputEnd })),\n distinctUntilChanged((a, b) => isSameDateRange(a as DateRange, b as DateRange)),\n map((x) => ({ inputStart: x.start, inputEnd: x.end })),\n map((x) => {\n if (x.inputStart && x.inputEnd) {\n return x as CalendarScheduleSelectionInputDateRange;\n } else {\n return undefined;\n }\n }),\n shareReplay(1)\n );\n\n readonly inputRange$: Observable<CalendarScheduleSelectionInputDateRange> = this.currentInputRange$.pipe(filterMaybe(), shareReplay(1));\n\n readonly isEnabledFilterDayFunction$: Observable<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = this.state$.pipe(\n map((x) => x.isEnabledFilterDay),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isEnabledDayFunction$: Observable<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = this.state$.pipe(\n map((x) => x.isEnabledDay),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentDateRange$: Observable<Maybe<DateRange>> = this.state$.pipe(\n map(computeCalendarScheduleSelectionRange),\n distinctUntilChanged((a, b) => isSameDateRange(a, b)),\n shareReplay(1)\n );\n\n readonly computeSelectionResultRelativeToFilter$: Observable<Maybe<boolean>> = this.state$.pipe(\n map((x) => x.computeSelectionResultRelativeToFilter),\n shareReplay(1)\n );\n\n readonly startBeingUsedFromFilter$: Observable<Maybe<boolean>> = this.state$.pipe(\n //\n map(calendarScheduleStartBeingUsedFromFilter),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly dateRange$: Observable<DateRange> = this.currentDateRange$.pipe(filterMaybe(), shareReplay(1));\n\n readonly allowedDaysOfWeek$: Observable<Set<DayOfWeek>> = this.state$.pipe(\n map((x) => x.allowedDaysOfWeek),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly isInAllowedDaysOfWeekFunction$ = this.allowedDaysOfWeek$.pipe(\n map((x) => isInAllowedDaysOfWeekSet(x)),\n shareReplay(1)\n );\n\n readonly scheduleDays$: Observable<Set<DateCellScheduleDayCode>> = this.state$.pipe(\n map((x) => x.effectiveScheduleDays),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly outputTimezone$: Observable<Maybe<TimezoneString>> = this.state$.pipe(\n map((x) => x.outputTimezone),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * The timezone of the output values.\n *\n * If an outputTimezone is not specified, this defaults to the system timezone.\n */\n readonly effectiveOutputTimezone$: Observable<TimezoneString> = this.state$.pipe(\n map((x) => x.outputTimezone || x.systemTimezone),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n /**\n * An outputTimezoneNormal to use.\n *\n * If an outputTimezone is not specified, this is undefined.\n */\n readonly effectiveOutputTimezoneNormal$: Observable<Maybe<DateTimezoneUtcNormalInstance>> = this.state$.pipe(\n map((x) => (x.outputTimezoneNormal ? x.outputTimezoneNormal : undefined)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentSelectionValue$ = this.state$.pipe(\n map((x) => x.currentSelectionValue),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly currentSelectionValueStart$ = this.currentSelectionValue$.pipe(\n map((x) => x?.dateScheduleRange.start),\n distinctUntilChanged(isSameDate),\n shareReplay(1)\n );\n\n readonly currentSelectionValueDateCellTimingDateFactory$ = this.currentSelectionValue$.pipe(\n map((x) => (x ? dateCellTimingDateFactory({ startsAt: x.dateScheduleRange.start, timezone: x.dateScheduleRange.timezone }) : undefined)),\n shareReplay(1)\n );\n\n readonly currentSelectionValueDateCellDurationSpanExpansion$: Observable<DateCellDurationSpan<DateCell>[]> = this.currentSelectionValue$.pipe(\n map((x) => (x ? expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange }) : [])),\n shareReplay(1)\n );\n\n readonly selectionValueSelectedIndexes$: Observable<Set<DateCellIndex>> = this.currentSelectionValueDateCellDurationSpanExpansion$.pipe(\n map((x) => new Set(x.map((y) => y.i))),\n distinctUntilHasDifferentValues(),\n shareReplay(1)\n );\n\n readonly selectionValueSelectedDates$: Observable<Set<ISO8601DayString>> = this.currentSelectionValueDateCellTimingDateFactory$.pipe(\n switchMap((dateFactory) => {\n return dateFactory ? this.selectionValueSelectedIndexes$.pipe(map((x) => mapValuesToSet(x, (y) => formatToISO8601DayStringForSystem(dateFactory(y))))) : of(new Set<ISO8601DayString>());\n }),\n shareReplay(1)\n );\n\n readonly selectionValue$ = this.currentSelectionValue$.pipe(filterMaybe(), shareReplay(1));\n\n readonly currentSelectionValueWithTimezone$ = this.currentSelectionValue$.pipe(\n combineLatestWith(this.effectiveOutputTimezoneNormal$),\n map(([x, timezoneNormal]) => {\n let currentValueWithTimezone = x;\n\n if (x && timezoneNormal) {\n currentValueWithTimezone = {\n dateScheduleRange: changeDateCellScheduleDateRangeToTimezone(x.dateScheduleRange, timezoneNormal),\n minMaxRange: x.minMaxRange\n } as CalendarScheduleSelectionValue;\n }\n\n return currentValueWithTimezone;\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly selectionValueWithTimezone$ = this.currentSelectionValueWithTimezone$.pipe(filterMaybe(), shareReplay(1));\n\n readonly selectionValueWithTimezoneDateCellDurationSpanExpansion$: Observable<DateCellDurationSpan<DateCell>[]> = this.selectionValueWithTimezone$.pipe(\n map((x) => expandDateCellScheduleRange({ dateCellScheduleRange: x.dateScheduleRange })),\n shareReplay(1)\n );\n\n readonly nextToggleSelection$: Observable<Maybe<AllOrNoneSelection>> = this.hasConfiguredMinMaxRange$.pipe(\n switchMap((hasConfiguredMinMaxRange) => {\n let obs: Observable<Maybe<AllOrNoneSelection>>;\n\n if (hasConfiguredMinMaxRange) {\n obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : 'all')));\n } else {\n obs = this.currentSelectionValue$.pipe(map((x) => (x ? 'none' : undefined)));\n }\n\n return obs;\n }),\n shareReplay(1)\n );\n\n readonly currentDateCellScheduleRangeValue$ = this.currentSelectionValueWithTimezone$.pipe(\n map((x) => x?.dateScheduleRange),\n distinctUntilChanged(isSameDateCellScheduleDateRange),\n shareReplay(1)\n );\n\n readonly dateCellScheduleRangeValue$ = this.currentDateCellScheduleRangeValue$.pipe(filterMaybe(), shareReplay(1));\n\n readonly cellContentFactory$ = this.state$.pipe(\n map((x) => x.cellContentFactory),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isCustomized$ = this.state$.pipe(\n map((x) => x.toggledIndexes.size > 0),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly isViewReadonly$ = this.state$.pipe(\n map((x) => x.isViewReadonly),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n // MARK: State Changes\n readonly setMinMaxDateRange = this.updater(updateStateWithMinMaxDateRange);\n readonly setDefaultWeek = this.updater(updateStateWithMinMaxDateRange);\n readonly setFilter = this.updater(updateStateWithFilter);\n readonly setExclusions = this.updater(updateStateWithExclusions);\n readonly setComputeSelectionResultRelativeToFilter = this.updater(updateStateWithComputeSelectionResultRelativeToFilter);\n readonly clearFilter = this.updater((state) => updateStateWithFilter(state, undefined));\n\n readonly setOutputTimezone = this.updater(updateStateWithTimezoneValue);\n /**\n * Sets the \"input\" date range. This is the range that gets displayed on the date range picker.\n */\n readonly setInputRange = this.updater(updateStateWithChangedRange);\n\n // NOTE: Selected dates are NOT selected indexes. They are the internal selected dates that are excluded from the selection.\n readonly toggleSelectedDates = this.updater((state, toggle: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { toggle }));\n readonly addSelectedDates = this.updater((state, add: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { add }));\n readonly removeSelectedDates = this.updater((state, remove: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { remove }));\n readonly setSelectedDates = this.updater((state, set: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { set }));\n readonly selectAllDates = this.updater((state, selectAll: AllOrNoneSelection = 'all') => updateStateWithChangedDates(state, { selectAll }));\n\n // NOTE: Selected indexes are the typical/expected indexes that are selected or not.\n readonly setSelectedIndexes = this.updater((state, set: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>) => updateStateWithChangedDates(state, { set, invertSetBehavior: true }));\n readonly setInitialSelectionState = this.updater(updateStateWithInitialSelectionState);\n\n readonly setDefaultScheduleDays = this.updater(updateStateWithChangedDefaultScheduleDays);\n readonly setScheduleDays = this.updater(updateStateWithChangedScheduleDays);\n readonly setAllowAllScheduleDays = this.updater((state) => updateStateWithChangedScheduleDays(state, [DateCellScheduleDayCode.WEEKDAY, DateCellScheduleDayCode.WEEKEND]));\n\n readonly setDateScheduleRangeValue = this.updater((state, value: Maybe<FullDateCellScheduleRangeInputDateRange>) => updateStateWithDateCellScheduleRangeValue(state, value));\n readonly setCellContentFactory = this.updater((state, cellContentFactory: CalendarScheduleSelectionCellContentFactory) => ({ ...state, cellContentFactory }));\n\n /**\n * Sets the selection mode.\n */\n readonly setSelectionMode = this.updater(updateStateWithSelectionMode);\n\n /**\n * Used by the parent view to propogate a readonly state.\n *\n * Should typically not be used by the user directly with the intention of the parent synchronizing to this state.\n */\n readonly setViewReadonlyState = this.updater((state, isViewReadonly: boolean) => ({ ...state, isViewReadonly }));\n}\n\n/**\n * Updates the state with an initial selection (all or none) and applies it when no dates are currently toggled.\n *\n * @param state - The current selection state\n * @param initialSelectionState - The initial selection mode ('all' or 'none')\n * @returns The updated selection state\n */\nexport function updateStateWithInitialSelectionState(state: CalendarScheduleSelectionState, initialSelectionState: Maybe<AllOrNoneSelection>): CalendarScheduleSelectionState {\n const { toggledIndexes } = state;\n\n if (toggledIndexes.size === 0 && initialSelectionState === 'all') {\n state = updateStateWithChangedDates(state, { selectAll: initialSelectionState });\n }\n\n return { ...state, initialSelectionState };\n}\n\n/**\n * Updates the computeSelectionResultRelativeToFilter flag and recalculates the state if the value changed.\n *\n * @param currentState - The current selection state\n * @param computeSelectionResultRelativeToFilter - Whether to compute results relative to the filter\n * @returns The updated selection state\n */\nexport function updateStateWithComputeSelectionResultRelativeToFilter(currentState: CalendarScheduleSelectionState, computeSelectionResultRelativeToFilter: Maybe<boolean>): CalendarScheduleSelectionState {\n let state: CalendarScheduleSelectionState = { ...currentState, computeSelectionResultRelativeToFilter };\n\n if (Boolean(currentState.computeSelectionResultRelativeToFilter) !== Boolean(computeSelectionResultRelativeToFilter)) {\n state = updateStateWithChangedDates(state, {}); // recalculate if change occurs as it will affect the output value\n }\n\n return state;\n}\n\n/**\n * Updates the state with date exclusions, converting input dates/ranges to cell indexes and reapplying the filter.\n *\n * @param state - The current selection state\n * @param inputExclusions - Dates, date ranges, or cell indexes to exclude\n * @returns The updated selection state with exclusions applied\n */\nexport function updateStateWithExclusions(state: CalendarScheduleSelectionState, inputExclusions: Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>): CalendarScheduleSelectionState {\n let computedExclusions: Maybe<DateCellIndex[]>;\n\n if (inputExclusions) {\n const { indexFactory } = state;\n const indexArrayFactory = dateCellTimingRelativeIndexArrayFactory(indexFactory);\n computedExclusions = indexArrayFactory(inputExclusions);\n }\n\n state = { ...state, inputExclusions, computedExclusions };\n return updateStateWithFilter(state, state.filter);\n}\n\n/**\n * Sets the min/max date range constraint on the state, normalizing start to startOfDay and end to endOfDay.\n *\n * @param state - The current selection state\n * @param minMaxDateRange - The min/max boundary dates to enforce\n * @returns The updated selection state with the boundary applied\n */\nexport function updateStateWithMinMaxDateRange(state: CalendarScheduleSelectionState, minMaxDateRange: Maybe<Partial<DateRange>>): CalendarScheduleSelectionState {\n if (minMaxDateRange != null && !isInfiniteDateRange(minMaxDateRange)) {\n state = {\n ...state,\n minMaxDateRange: {\n start: minMaxDateRange.start != null ? startOfDay(minMaxDateRange.start) : undefined,\n end: minMaxDateRange.end != null ? endOfDay(minMaxDateRange.end) : undefined\n }\n };\n } else {\n state = { ...state, minMaxDateRange: undefined };\n }\n\n return updateStateWithFilter(state, state.filter);\n}\n\n/**\n * Applies a date cell schedule filter to the selection state, computing the enabled day function\n * from the filter, exclusions, and min/max date range constraints.\n *\n * @param currentState - The current selection state\n * @param inputFilter - The filter configuration to apply\n * @returns The updated selection state with the filter applied\n */\n/**\n * Applies a date cell schedule filter to the selection state, computing the enabled day function\n * from the filter, exclusions, and min/max date range constraints.\n *\n * @param currentState - The current selection state\n * @param inputFilter - The filter configuration to apply\n * @returns The updated selection state with the filter applied\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nexport function updateStateWithFilter(currentState: CalendarScheduleSelectionState, inputFilter: Maybe<DateCellScheduleDateFilterConfig>): CalendarScheduleSelectionState {\n const { computedExclusions: exclusions, minMaxDateRange, systemTimezone } = currentState;\n\n let isEnabledFilterDay: Maybe<DecisionFunction<DateCellTimingRelativeIndexFactoryInput>> = () => true;\n let filter: Maybe<DateCellScheduleDateFilterConfig> = null;\n\n // create the filter using inputFilter, exclusions, and minMaxDateRange\n if (inputFilter || exclusions?.length || minMaxDateRange) {\n let enabledFilter: Configurable<DateCellScheduleDateFilterConfig>;\n let filterStart: Maybe<Date> = null; // the start date that will be used/set on the filter.\n\n if (inputFilter) {\n filter = copyDateCellScheduleDateFilterConfig(inputFilter); // copy filter\n\n let nextFilterTimezone: TimezoneString | undefined; // only set if inputFilter.start or inputFilter.startsAt\n\n // configure filter start\n if (inputFilter.start) {\n filterStart = inputFilter.start;\n\n // if no timezone is specified, then use the system timezone and align filterStart to the start of the day.\n if (!inputFilter.timezone) {\n filterStart = SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = systemTimezone;\n } else {\n nextFilterTimezone = inputFilter.timezone;\n }\n } else if (inputFilter.startsAt) {\n if (inputFilter.timezone) {\n // if no timezone is provided, use startsAt as-is\n const timezoneNormal = dateTimezoneUtcNormal(inputFilter.timezone);\n filterStart = timezoneNormal.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = inputFilter.timezone;\n } else {\n // set to the start of today in the system timezone.\n filterStart = SYSTEM_DATE_TIMEZONE_UTC_NORMAL_INSTANCE.startOfDayInTargetTimezone(inputFilter.startsAt);\n nextFilterTimezone = systemTimezone;\n }\n }\n\n filter.start = filterStart ?? undefined;\n filter.timezone = nextFilterTimezone;\n\n // configure exclusions\n if (exclusions?.length) {\n enabledFilter = {\n ...filter,\n ex: unique(mergeArrays([filter.ex, exclusions]))\n };\n } else {\n enabledFilter = filter;\n }\n } else {\n enabledFilter = {\n w: '89',\n ex: exclusions as number[]\n };\n }\n\n if (minMaxDateRange) {\n enabledFilter.minMaxDateRange = minMaxDateRange;\n enabledFilter.setStartAsMinDate = filterStart ? true : false; // If a start date is set, then it becomes the floor.\n }\n\n /**\n * If the input filter has a start date, use that as the relative start to ensure indexes are compared the same,\n * otherwise use the state's start. This is important for the index calculations.\n */\n let finalEnabledStart: Date;\n let finalEnabledTimezone: TimezoneString;\n // filter?.start ?? state.start;\n\n if (!enabledFilter.start) {\n // use the current state's start, but make sure it is in the proper timezone.\n if (enabledFilter.timezone) {\n const timezoneNormal = dateTimezoneUtcNormal(enabledFilter.timezone);\n finalEnabledStart = timezoneNormal.startOfDayInTargetTimezone(currentState.start); // get the start of the day for the current start\n finalEnabledTimezone = enabledFilter.timezone;\n } else {\n finalEnabledStart = currentState.start;\n finalEnabledTimezone = systemTimezone;\n }\n } else if (!enabledFilter.timezone) {\n finalEnabledTimezone = systemTimezone;\n\n const timezoneNormal = dateTimezoneUtcNormal(finalEnabledTimezone);\n finalEnabledStart = timezoneNormal.startOfDayInTargetTimezone(enabledFilter.start); // get the start of the day for the target timezone\n } else {\n finalEnabledStart = enabledFilter.start;\n finalEnabledTimezone = enabledFilter.timezone;\n }\n\n enabledFilter.start = finalEnabledStart;\n enabledFilter.timezone = finalEnabledTimezone;\n\n // create the filter\n isEnabledFilterDay = dateCellScheduleDateFilter(enabledFilter);\n }\n\n let nextState: Building<CalendarScheduleSelectionState> = { ...currentState, filter, isEnabledFilterDay };\n\n // For the same reason as above, use the filter's start date as the relative start if applicable.\n if (filter?.start) {\n let startForSystemTimezone: Date = filter.start;\n\n if (filter.timezone) {\n const timezoneNormal = dateTimezoneUtcNormal(filter.timezone);\n startForSystemTimezone = timezoneNormal.systemDateToTargetDate(filter.start); // get the start of the day for the system timezone\n }\n\n nextState.start = startForSystemTimezone;\n nextState.indexFactory = dateCellTimingRelativeIndexFactory({ startsAt: startForSystemTimezone, timezone: systemTimezone });\n nextState.indexDayOfWeek = dateCellDayOfWeekFactory(startForSystemTimezone);\n }\n\n // attempt to re-apply the initial selection state once filter is applied\n if (nextState.initialSelectionState) {\n nextState = updateStateWithInitialSelectionState(nextState as CalendarScheduleSelectionState, nextState.initialSelectionState);\n }\n\n // re-calculate the selection given the filter\n const { inputStart, inputEnd } = nextState;\n\n if (inputStart && inputEnd) {\n nextState = updateStateWithChangedRange(nextState as CalendarScheduleSelectionState, { inputStart, inputEnd });\n }\n\n return nextState as CalendarScheduleSelectionState;\n}\n\n/**\n * Updates the output timezone and transforms the current selection value to reflect the new timezone.\n *\n * @param state - The current selection state\n * @param timezone - The target timezone string\n * @returns The updated selection state with timezone-adjusted values\n */\nexport function updateStateWithTimezoneValue(state: CalendarScheduleSelectionState, timezone: Maybe<TimezoneString>): CalendarScheduleSelectionState {\n const { currentSelectionValue } = state;\n const timezoneNormal = timezone ? dateTimezoneUtcNormal({ timezone }) : undefined;\n\n if (timezoneNormal && currentSelectionValue) {\n // update the selection value to reflect the timezone changes.\n const { dateScheduleRange: currentDateCellScheduleRange } = currentSelectionValue;\n const start = timezoneNormal.targetDateToSystemDate(currentDateCellScheduleRange.start);\n const end = timezoneNormal.targetDateToSystemDate(currentDateCellScheduleRange.end);\n\n const newRange: DateCellScheduleDateRange = {\n ...currentSelectionValue.dateScheduleRange,\n start,\n end\n };\n\n return updateStateWithDateCellScheduleRangeValue({ ...state, outputTimezone: timezone, outputTimezoneNormal: timezoneNormal }, newRange);\n } else {\n return { ...state, outputTimezone: timezone, outputTimezoneNormal: timezoneNormal }; // no change in value\n }\n}\n\n/**\n * Updates the state from an external date cell schedule range value, converting timezone-aware inputs\n * to system time and synchronizing the internal selection indexes.\n *\n * @param state - The current selection state\n * @param inputChange - The date cell schedule range to apply\n * @returns The updated selection state\n */\nexport function updateStateWithDateCellScheduleRangeValue(state: CalendarScheduleSelectionState, inputChange: Maybe<FullDateCellScheduleRangeInputDateRange>): CalendarScheduleSelectionState {\n const { currentSelectionValue, systemTimezone } = state;\n const currentDateCellScheduleRange = currentSelectionValue?.dateScheduleRange; // current range is always in system time\n let change: Maybe<Pick<DateCellScheduleDateRange, 'start' | 'end' | 'ex' | 'w' | 'timezone'>>;\n\n // 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.\n // Outputs remain accurate.\n\n if (inputChange) {\n // make sure a timezone is set. Input may not have a timezone attached. Default to system time.\n const inputChangeWithTimezoneSet = {\n ...inputChange,\n timezone: inputChange.timezone ?? systemTimezone\n };\n\n // calculate the schedule range\n const fullChange = fullDateCellScheduleRange({ dateCellScheduleRange: inputChangeWithTimezoneSet });\n const inputNormal = dateCellTimingTimezoneNormalInstance(fullChange);\n\n const startInSystemTz = inputNormal.systemDateToTargetDate(fullChange.start);\n const endInSystemTz = startOfDay(inputNormal.systemDateToTargetDate(fullChange.end));\n\n // convert the start/end to system time\n change = {\n start: startInSystemTz,\n end: endInSystemTz,\n w: fullChange.w,\n ex: fullChange.ex,\n timezone: fullChange.timezone\n };\n }\n\n const isSameValue = isSameDateCellScheduleDateRange(currentDateCellScheduleRange, change);\n\n if (isSameValue) {\n return state;\n } else {\n if (change != null) {\n const nextState: CalendarScheduleSelectionState = { ...state, inputStart: change.start, inputEnd: change.end, toggledIndexes: new Set(change.ex) };\n return updateStateWithChangedScheduleDays(finalizeNewCalendarScheduleSelectionState(nextState), expandDateCellScheduleDayCodes(change.w || '89'));\n } else {\n return noSelectionCalendarScheduleSelectionState(state); // clear selection, retain disabled days\n }\n }\n}\n\n/**\n * Updates the default schedule day codes (used when no explicit schedule days are set) and recalculates allowed days.\n *\n * @param state - The current selection state\n * @param change - The new default schedule day codes\n * @returns The updated selection state\n */\nexport function updateStateWithChangedDefaultScheduleDays(state: CalendarScheduleSelectionState, change: Maybe<Iterable<DateCellScheduleDayCode>>): CalendarScheduleSelectionState {\n const { defaultScheduleDays: currentDefaultScheduleDays } = state;\n const defaultScheduleDays = new Set(change ?? fullWeekDateCellScheduleDayCodes());\n\n if (dateCellScheduleDayCodesAreSetsEquivalent(defaultScheduleDays, currentDefaultScheduleDays)) {\n return state; // no change\n } else {\n return finalizeUpdateStateWithChangedScheduleDays(state, { ...state, defaultScheduleDays });\n }\n}\n\n/**\n * Updates the explicit schedule day codes override and recalculates allowed days of the week.\n *\n * @param state - The current selection state\n * @param change - The new schedule day codes, or null/undefined to clear the override\n * @returns The updated selection state\n */\nexport function updateStateWithChangedScheduleDays(state: CalendarScheduleSelectionState, change: Maybe<Iterable<DateCellScheduleDayCode>>): CalendarScheduleSelectionState {\n const { scheduleDays: currentScheduleDays } = state;\n const scheduleDays = new Set(change ?? []);\n\n let newScheduleDays: Set<DateCellScheduleDayCode> | null | undefined;\n\n if (currentScheduleDays != null && change != null) {\n if (dateCellScheduleDayCodesAreSetsEquivalent(scheduleDays, currentScheduleDays)) {\n newScheduleDays = undefined; //no change\n } else {\n newScheduleDays = scheduleDays;\n }\n } else if (currentScheduleDays !== change) {\n newScheduleDays = change ? scheduleDays : null; // set the new one, or clear it\n }\n\n if (newScheduleDays === undefined) {\n return state;\n } else {\n return finalizeUpdateStateWithChangedScheduleDays(state, { ...state, scheduleDays: newScheduleDays ?? undefined });\n }\n}\n\n/**\n * Switches between single and multiple selection mode, trimming the selection to a single value when switching to single mode.\n *\n * @param state - The current selection state\n * @param selectionMode - The new selection mode\n * @returns The updated selection state\n */\nexport function updateStateWithSelectionMode(state: CalendarScheduleSelectionState, selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode): CalendarScheduleSelectionState {\n const { selectionMode: currentSelectionMode } = state;\n\n if (currentSelectionMode !== selectionMode) {\n const nextState = { ...state, selectionMode };\n\n if (selectionMode === 'multiple') {\n return nextState;\n } else {\n const currentSelectionRange = computeCalendarScheduleSelectionDateCellRange(nextState);\n return currentSelectionRange ? updateStateWithChangedDates(nextState, { set: [currentSelectionRange.i], invertSetBehavior: true }) : nextState;\n }\n } else {\n return state;\n }\n}\n\n/**\n * Finalizes a schedule days change by recalculating allowed days of the week and updating toggled indexes accordingly.\n *\n * @param previousState - The state before the schedule days change\n * @param nextState - The state with updated schedule day codes\n * @returns The finalized selection state with recalculated allowed days and toggled indexes\n */\nexport function finalizeUpdateStateWithChangedScheduleDays(previousState: CalendarScheduleSelectionState, nextState: CalendarScheduleSelectionState): CalendarScheduleSelectionState {\n const previousScheduleDays = previousState.effectiveScheduleDays;\n const nextScheduleDays = nextState.scheduleDays ?? nextState.defaultScheduleDays;\n\n if (dateCellScheduleDayCodesAreSetsEquivalent(nextScheduleDays, previousScheduleDays)) {\n return nextState; // the default or input schedule changed but the schedule is still the same, so no need for an update.\n } else {\n const effectiveScheduleDays = new Set(simplifyDateCellScheduleDayCodes(nextScheduleDays));\n const allowedDaysOfWeek = expandDateCellScheduleDayCodesToDayOfWeekSet(nextScheduleDays);\n\n return finalizeNewCalendarScheduleSelectionState({\n ...nextState,\n // update the effective schedule days and allowed days of week\n effectiveScheduleDays,\n allowedDaysOfWeek\n });\n }\n}\n\nexport interface CalendarScheduleSelectionStateDatesChange {\n reset?: true;\n toggle?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n add?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n remove?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n set?: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>;\n selectAll?: AllOrNoneSelection;\n /**\n * Inverts the set date changing behavior so that the set input is treated as items that should be retained instead of excluded.\n *\n * Ignored when set is not used. Ignored for selectAll.\n */\n invertSetBehavior?: boolean;\n}\n\n/**\n * Applies date changes (toggle, add, remove, set, selectAll, or reset) to the calendar selection state,\n * updating toggled indexes and input start/end accordingly.\n *\n * @param state - The current selection state\n * @param change - The date changes to apply\n * @returns The updated selection state\n */\n/**\n * Applies date changes (toggle, add, remove, set, selectAll, or reset) to the calendar selection state,\n * updating toggled indexes and input start/end accordingly.\n *\n * @param state - The current selection state\n * @param change - The date changes to apply\n * @returns The updated selection state\n */\n// eslint-disable-next-line sonarjs/cognitive-complexity\nexport function updateStateWithChangedDates(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionStateDatesChange): CalendarScheduleSelectionState {\n const { selectionMode, allowedDaysOfWeek, indexFactory, indexDayOfWeek, inputStart: currentInputStart, inputEnd: currentInputEnd, minMaxDateRange: _minMaxDateRange, filter: _filter } = state;\n const { start: minDateFromFilter, end: maxDateFromFilter } = calendarScheduleMinAndMaxDateRangeRelativeToFilter(state);\n let inputStart = currentInputStart;\n let inputEnd = currentInputEnd;\n\n /**\n * This is a set of indexes that are internally \"selected\" so that they are excluded from the inputStart/inputEnd date range.\n *\n * Do not confuse this with the actual indexes that are selected.\n */\n let toggledIndexes: Set<DateCellIndex>;\n\n function asIndexes(indexes: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>): DateCellIndex[] {\n return iterableToArray(indexes).map(indexFactory);\n }\n\n // When using selection mode \"single\" we update the change to reflect the single selection.\n if (selectionMode === 'single') {\n function setFromFirstValue(input: IterableOrValue<DateCellTimingRelativeIndexFactoryInput>): Set<DateCellTimingRelativeIndexFactoryInput> {\n const firstValue = isIterable(input) ? firstValueFromIterable(input) : input;\n const set = new Set<DateCellTimingRelativeIndexFactoryInput>();\n\n if (firstValue != null) {\n set.add(firstValue);\n }\n\n return set;\n }\n\n if (change.set) {\n change = { set: setFromFirstValue(change.set), invertSetBehavior: true };\n } else if (change.toggle) {\n const nextSet = setFromFirstValue(change.toggle);\n\n if (nextSet.size) {\n const firstSetValueIndex = indexFactory(firstValueFromIterable(nextSet) as DateCellTimingRelativeIndexFactoryInput);\n\n if (state.toggledIndexes.has(firstSetValueIndex) || (inputStart && indexFactory(inputStart) === firstSetValueIndex)) {\n nextSet.clear(); // clear with the next set\n }\n\n change = { set: nextSet, invertSetBehavior: true };\n }\n }\n\n // set, selectAll, add, and remove are treated as they normally are.\n }\n\n if (change.reset || change.selectAll != null || change.set != null) {\n let set: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>> = change.set ?? [];\n const selectAll: Maybe<AllOrNoneSelection> = change.reset === true ? state.initialSelectionState : change.selectAll;\n\n switch (selectAll) {\n case 'all':\n if (minDateFromFilter != null && maxDateFromFilter != null) {\n inputStart = minDateFromFilter;\n inputEnd = maxDateFromFilter;\n set = [];\n }\n break;\n case 'none':\n inputStart = null;\n inputEnd = null;\n set = [];\n break;\n default:\n // selectAll is undefined or null; no bulk selection change needed\n break;\n }\n\n const inputSetIndexes = asIndexes(set);\n toggledIndexes = new Set(inputSetIndexes);\n\n if (change.invertSetBehavior && !selectAll) {\n let minIndex: Maybe<number>;\n let maxIndex: Maybe<number>;\n\n if (minDateFromFilter != null && maxDateFromFilter != null) {\n // only applicable when the filter is set.\n minIndex = indexFactory(minDateFromFilter);\n maxIndex = indexFactory(maxDateFromFilter);\n\n inputStart = minDateFromFilter;\n inputEnd = maxDateFromFilter;\n } else {\n // when the filter is not set, use the least and greatest indexes from the input set.\n const minAndMax = minAndMaxNumber(inputSetIndexes);\n\n if (minAndMax != null) {\n minIndex = minAndMax.min;\n maxIndex = minAndMax.max;\n const dateFactory = dateCellTimingStartDateFactory(indexFactory._timing);\n\n inputStart = dateFactory(minAndMax.min);\n inputEnd = minAndMax.min === minAndMax.max ? inputStart : dateFactory(minAndMax.max);\n } else {\n // equivalent to an empty set / using \"none\" with selectAll.\n inputStart = null;\n inputEnd = null;\n toggledIndexes = new Set();\n }\n }\n\n // toggledIndexes should not include any indexes we want to include\n if (minIndex != null && maxIndex != null) {\n toggledIndexes = new Set(range(minIndex, maxIndex + 1).filter((x) => !toggledIndexes.has(x)));\n }\n }\n } else {\n toggledIndexes = new Set(state.toggledIndexes); // copy the set\n\n if (change.toggle) {\n const allowedToToggle = asIndexes(change.toggle).filter((i) => allowedDaysOfWeek.has(indexDayOfWeek(i)));\n toggleInSet(toggledIndexes, allowedToToggle);\n }\n\n let addToExclusion: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>>;\n let removeFromExclusion: Maybe<IterableOrValue<DateCellTimingRelativeIndexFactoryInput>>;\n\n if (change.add) {\n if (change.invertSetBehavior) {\n addToExclusion = change.add;\n } else {\n removeFromExclusion = change.add;\n }\n }\n\n if (change.remove) {\n if (change.invertSetBehavior) {\n removeFromExclusion = change.remove;\n } else {\n addToExclusion = change.remove;\n }\n }\n\n if (addToExclusion) {\n removeFromSet(toggledIndexes, asIndexes(addToExclusion));\n }\n\n if (removeFromExclusion) {\n addToSet(toggledIndexes, asIndexes(removeFromExclusion));\n }\n }\n\n const nextState = { ...state, inputStart, inputEnd, toggledIndexes };\n nextState.isEnabledDay = isEnabledDayInCalendarScheduleSelectionState(nextState);\n\n // Recalculate the range and simplified to exclusions\n const rangeAndExclusion = computeScheduleSelectionRangeAndExclusion(nextState);\n\n if (rangeAndExclusion) {\n return finalizeNewCalendarScheduleSelectionState({ ...nextState, toggledIndexes: new Set(rangeAndExclusion.excluded), inputStart: rangeAndExclusion.start, inputEnd: rangeAndExclusion.end });\n } else {\n // no selected days\n return noSelectionCalendarScheduleSelectionState(nextState);\n }\n}\n\n/**\n * Clears all date selections from the state, retaining other configuration like schedule days and filter.\n *\n * @param state - The current selection state\n * @returns The state with all selections cleared\n */\nexport function noSelectionCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): CalendarScheduleSelectionState {\n return finalizeNewCalendarScheduleSelectionState({ ...state, toggledIndexes: new Set(), inputStart: null, inputEnd: null });\n}\n\n/**\n * Updates the selection state with a new start/end date range, retaining toggled indexes within the new range bounds.\n *\n * @param state - The current selection state\n * @param change - The new input start and end dates\n * @returns The updated selection state\n */\nexport function updateStateWithChangedRange(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionInputDateRange): CalendarScheduleSelectionState {\n const { inputStart: currentInputStart, inputEnd: currentInputEnd, indexFactory } = state;\n const { start: minDate, end: maxDate } = calendarScheduleMinAndMaxDateRange(state);\n\n const inputStart: Date = startOfDay(change.inputStart);\n const inputEnd: Date = startOfDay(change.inputEnd); // midnight of the last day\n\n const isValidRange = minDate != null || maxDate != null ? isDateInDateRangeFunction({ start: minDate ?? undefined, end: maxDate ?? undefined }) : () => true;\n\n if (!isValidRange(inputStart) || !isValidRange(inputEnd) || (isSameDateDay(inputStart, currentInputStart) && isSameDateDay(inputEnd, currentInputEnd))) {\n return state; // if no change, return the current state.\n }\n\n // retain all indexes that are within the new range\n const minIndex = indexFactory(inputStart);\n const maxIndex = indexFactory(inputEnd) + 1;\n\n const currentIndexes: DateCellIndex[] = [...state.toggledIndexes];\n const isInCurrentRange = isIndexNumberInIndexRangeFunction({ minIndex, maxIndex });\n const excludedIndexesInNewRange = currentIndexes.filter(isInCurrentRange);\n const toggledIndexes = new Set(excludedIndexesInNewRange);\n\n const nextState = { ...state, toggledIndexes, inputStart, inputEnd };\n return finalizeNewCalendarScheduleSelectionState(nextState);\n}\n\n/**\n * Finalizes a partially-built state by recomputing the isEnabledDay function and the current selection value.\n *\n * @param nextState - The partially-built selection state to finalize\n * @returns The finalized selection state\n */\nexport function finalizeNewCalendarScheduleSelectionState(nextState: Building<CalendarScheduleSelectionState>): CalendarScheduleSelectionState {\n nextState.isEnabledDay = isEnabledDayInCalendarScheduleSelectionState(nextState as CalendarScheduleSelectionState);\n nextState.currentSelectionValue = computeScheduleSelectionValue(nextState as CalendarScheduleSelectionState);\n return nextState as CalendarScheduleSelectionState;\n}\n\n/**\n * Builds a decision function that determines whether a given day index is enabled (selected) in the current state.\n *\n * @param state - The selection state to derive the enabled-day function from\n * @returns A function that returns true if the given day is enabled/selected\n */\nexport function isEnabledDayInCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): DecisionFunction<DateCellTimingRelativeIndexFactoryInput> {\n const { allowedDaysOfWeek, indexFactory, inputStart, inputEnd, indexDayOfWeek, systemTimezone } = state;\n let isInStartAndEndRange: IsDateWithinDateCellRangeFunction;\n\n if (inputStart && inputEnd) {\n isInStartAndEndRange = isDateWithinDateCellRangeFunction({ startsAt: { startsAt: state.start, timezone: systemTimezone }, range: { start: inputStart, end: inputEnd } });\n } else {\n isInStartAndEndRange = () => false;\n }\n\n return (input: DateCellTimingRelativeIndexFactoryInput) => {\n const index = indexFactory(input);\n const dayOfWeek = indexDayOfWeek(index);\n\n const isInSelectedRange = isInStartAndEndRange(index);\n const isSelected = state.toggledIndexes.has(index);\n const isAllowedDayOfWeek = allowedDaysOfWeek.has(dayOfWeek);\n\n return isAllowedDayOfWeek && ((isInSelectedRange && !isSelected) || (isSelected && !isInSelectedRange));\n };\n}\n\n/**\n * Computes the output DateCellScheduleDateRange value from the current selection state,\n * applying timezone offsets and filter-relative computations as needed.\n *\n * @param state - The current selection state to compute from\n * @returns The computed selection value, or null if nothing is selected\n */\nexport function computeScheduleSelectionValue(state: CalendarScheduleSelectionState): Maybe<CalendarScheduleSelectionValue> {\n const { indexFactory: systemIndexFactory, allowedDaysOfWeek, effectiveScheduleDays, indexDayOfWeek, computeSelectionResultRelativeToFilter, filter, systemTimezone } = state;\n let timezone = systemTimezone;\n const rangeAndExclusion = computeScheduleSelectionRangeAndExclusion(state);\n\n if (rangeAndExclusion == null) {\n return null;\n }\n\n const { start: rangeStart, end: rangeEnd, excluded: allExcluded, dateCellRange } = rangeAndExclusion;\n let filterOffsetExcludedRange: DateCellIndex[] = [];\n let indexOffset = dateCellRange.i;\n\n let start = rangeStart;\n let end = rangeEnd;\n\n // If computeSelectionResultRelativeToFilter is true, then we need to offset the values to be relative to that start.\n if (computeSelectionResultRelativeToFilter && filter?.start) {\n start = filter.start; // always start at the filter's start date\n let startInSystemTimezone = start;\n\n if (filter.timezone) {\n timezone = filter.timezone;\n const filterNormal = dateTimezoneUtcNormal(timezone);\n end = filterNormal.startOfDayInTargetTimezone(end);\n startInSystemTimezone = filterNormal.systemDateToTargetDate(start); // convert the start to the system timezone normal for deriving the index\n }\n\n const rangeStartIndex = systemIndexFactory(rangeStart);\n const startIndex = systemIndexFactory(startInSystemTimezone);\n const filterStartIndexOffset = rangeStartIndex - startIndex;\n filterOffsetExcludedRange = range(0, filterStartIndexOffset);\n indexOffset = indexOffset - filterStartIndexOffset;\n }\n\n const excluded = computeSelectionResultRelativeToFilter\n ? allExcluded.filter((x) => {\n // ???\n return allowedDaysOfWeek.has(indexDayOfWeek(x));\n })\n : allExcluded;\n\n const offsetExcluded: DateCellIndex[] = excluded.map((x) => x - indexOffset); // set to the proper offset\n\n const ex = [...filterOffsetExcludedRange, ...offsetExcluded];\n\n const w: DateCellScheduleEncodedWeek = dateCellScheduleEncodedWeek(effectiveScheduleDays);\n const d: DateCellIndex[] = []; // \"included\" blocks are never used/calculated.\n\n // Always ensure the end is after or equal to the start.\n if (isBefore(end, start)) {\n end = start; // end is start\n }\n\n const dateScheduleRange: DateCellScheduleDateRange = {\n timezone,\n start,\n end,\n w,\n d,\n ex\n };\n\n return {\n dateScheduleRange,\n minMaxRange: { start, end }\n };\n}\n\n/**\n * The selected date range and the corresponding cell range.\n */\nexport interface CalendarScheduleSelectionRangeAndExclusion extends DateRange {\n /**\n * Corresponds to the start and end indexes in the date range.\n */\n dateCellRange: DateCellRangeWithRange;\n /**\n * All excluded indexes.\n */\n excluded: DateCellIndex[];\n}\n\n/**\n * Computes the selected date range with its corresponding cell range and all excluded day indexes.\n * Returns null if no days are selected.\n *\n * @param state - The current selection state\n * @returns The range and exclusion data, or null if nothing is selected\n */\nexport function computeScheduleSelectionRangeAndExclusion(state: CalendarScheduleSelectionState): Maybe<CalendarScheduleSelectionRangeAndExclusion> {\n const { start: currentStart, isEnabledDay, isEnabledFilterDay, systemTimezone } = state;\n\n const dateFactory = dateCellTimingStartDateFactory({ startsAt: currentStart, timezone: systemTimezone });\n const dateCellRange = computeCalendarScheduleSelectionDateCellRange(state);\n\n if (dateCellRange == null) {\n return null; // returns null if no items are selected.\n }\n\n const start = dateFactory(dateCellRange.i);\n const end = dateFactory(dateCellRange.to);\n\n const excluded: DateCellIndex[] = range(dateCellRange.i, dateCellRange.to + 1).filter((x) => {\n return !isEnabledDay(x) || !isEnabledFilterDay(x);\n });\n\n const result: CalendarScheduleSelectionRangeAndExclusion = {\n dateCellRange,\n start,\n end,\n excluded\n };\n\n return result;\n}\n\n/**\n * Computes the selected date range (start and end dates) from the current selection state.\n *\n * @param state - The current selection state\n * @returns The selected date range, or undefined if nothing is selected\n */\nexport function computeCalendarScheduleSelectionRange(state: CalendarScheduleSelectionState): Maybe<DateRange> {\n const dateFactory = dateCellTimingDateFactory({ startsAt: state.start, timezone: state.systemTimezone });\n const dateCellRange = computeCalendarScheduleSelectionDateCellRange(state);\n const dateRange: Maybe<DateRange> = dateCellRange != null ? { start: dateFactory(dateCellRange.i), end: dateFactory(dateCellRange.to as number) } : undefined;\n return dateRange;\n}\n\n/**\n * Computes the date cell index range (i, to) that spans all selected and toggled days in the current state.\n *\n * @param state - The current selection state\n * @returns The cell range spanning all selected days, or undefined if nothing is selected\n */\nexport function computeCalendarScheduleSelectionDateCellRange(state: CalendarScheduleSelectionState): Maybe<DateCellRangeWithRange> {\n const { allowedDaysOfWeek, indexFactory, inputStart, inputEnd, indexDayOfWeek, isEnabledDay, isEnabledFilterDay } = state;\n const enabledExclusionIndexes = [...state.toggledIndexes].filter((i) => allowedDaysOfWeek.has(indexDayOfWeek(i)));\n const minAndMaxSelectedValues = minAndMaxNumber(enabledExclusionIndexes);\n\n let startRange: Maybe<DateCellIndex>;\n let endRange: Maybe<DateCellIndex>;\n\n if (minAndMaxSelectedValues) {\n startRange = minAndMaxSelectedValues.min;\n endRange = minAndMaxSelectedValues.max;\n }\n\n if (inputStart != null && inputEnd != null) {\n const inputStartIndex = indexFactory(inputStart);\n const inputEndIndex = indexFactory(inputEnd);\n\n startRange = startRange != null ? Math.min(inputStartIndex, startRange) : inputStartIndex;\n endRange = endRange != null ? Math.max(inputEndIndex, endRange) : inputEndIndex;\n }\n\n if (startRange != null && endRange != null) {\n const scanStartIndex = startRange;\n const scanEndIndex = endRange;\n\n // clear start and end\n startRange = undefined;\n endRange = undefined;\n\n // if the min is equal to the start index, then we are in the range and need to iterate dates until we find one that is not selected/excluded.\n for (let i = scanStartIndex; i <= scanEndIndex; i += 1) {\n if (isEnabledFilterDay(i) && isEnabledDay(i)) {\n startRange = i;\n break;\n }\n }\n\n // same with the max\n for (let i = scanEndIndex; i >= scanStartIndex; i -= 1) {\n if (isEnabledFilterDay(i) && isEnabledDay(i)) {\n endRange = i;\n break;\n }\n }\n }\n\n if (startRange != null && endRange != null) {\n return { i: startRange, to: endRange };\n } else {\n return undefined;\n }\n}\n","import { Directive, Injectable, Injector, Optional, type Provider, SkipSelf, inject } from '@angular/core';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\n\n/**\n * Token used by provideCalendarScheduleSelectionStoreIfDoesNotExist() to prevent injecting a parent DbxCalendarScheduleSelectionStore into the child view.\n */\n@Injectable()\nexport class DbxCalendarScheduleSelectionStoreProviderBlock {\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore, { skipSelf: true });\n}\n\n@Directive({\n selector: '[dbxCalendarScheduleSelectionStoreParentBlocker]',\n providers: [DbxCalendarScheduleSelectionStoreProviderBlock],\n standalone: true\n})\nexport class DbxCalendarScheduleSelectionStoreInjectionBlockDirective {}\n\n/**\n * Creates a Provider that initializes a new DbxCalendarScheduleSelectionStore if a parent does not exist.\n *\n * If a DbxCalendarScheduleSelectionStoreInjectionBlock is available in the context, and references the same dbxCalendarScheduleSelectionStore that is attempting to be injected, a new DbxCalendarScheduleSelectionStore is created.\n *\n * @returns\n */\nexport function provideCalendarScheduleSelectionStoreIfParentIsUnavailable(): Provider {\n return {\n provide: DbxCalendarScheduleSelectionStore,\n useFactory: (parentInjector: Injector, dbxCalendarScheduleSelectionStoreInjectionBlock?: DbxCalendarScheduleSelectionStoreProviderBlock, dbxCalendarScheduleSelectionStore?: DbxCalendarScheduleSelectionStore) => {\n if (!dbxCalendarScheduleSelectionStore || (dbxCalendarScheduleSelectionStore && dbxCalendarScheduleSelectionStoreInjectionBlock?.dbxCalendarScheduleSelectionStore === dbxCalendarScheduleSelectionStore)) {\n // create a new dbxCalendarScheduleSelectionStore to use\n const injector = Injector.create({ providers: [{ provide: DbxCalendarScheduleSelectionStore }], parent: parentInjector });\n dbxCalendarScheduleSelectionStore = injector.get(DbxCalendarScheduleSelectionStore);\n }\n\n return dbxCalendarScheduleSelectionStore;\n },\n deps: [Injector, [new Optional(), DbxCalendarScheduleSelectionStoreProviderBlock], [new Optional(), new SkipSelf(), DbxCalendarScheduleSelectionStore]]\n };\n}\n","import { flexLayoutWrapper, toggleField } from '@dereekb/dbx-form';\nimport { getDaysOfWeekNames } from '@dereekb/util';\n\n/**\n * Creates form fields for selecting which days of the week are enabled in a schedule selection calendar,\n * wrapped in a responsive flex layout.\n *\n * @returns An array of Formly field configs with toggle fields for each day of the week\n */\nexport function dbxScheduleSelectionCalendarDateDaysFormFields() {\n const fields = dbxScheduleSelectionCalendarDateDaysFormDayFields();\n return [flexLayoutWrapper(fields, { relative: true, size: 3 })];\n}\n\n/**\n * Creates an array of toggle field configs, one for each day of the week, keyed by lowercase day name.\n *\n * @returns An array of toggle Formly field configs for each day of the week\n */\nexport function dbxScheduleSelectionCalendarDateDaysFormDayFields() {\n return getDaysOfWeekNames(false).map((dayOfWeekName: string) => {\n return toggleField({\n key: dayOfWeekName.toLowerCase(),\n label: dayOfWeekName\n });\n });\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { AbstractSyncFormlyFormDirective, dbxFormlyFormComponentProviders, DBX_FORMLY_FORM_COMPONENT_TEMPLATE, DbxFormlyFormComponentImportsModule, DbxFormFormlyWrapperModule, DbxFormFormlyBooleanFieldModule } from '@dereekb/dbx-form';\nimport { type EnabledDays } from '@dereekb/util';\nimport { type FormlyFieldConfig } from '@ngx-formly/core';\nimport { dbxScheduleSelectionCalendarDateDaysFormFields } from './calendar.schedule.selection.form';\n\nexport type DbxScheduleSelectionCalendarDateDaysFormValue = EnabledDays;\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-days-form',\n template: DBX_FORMLY_FORM_COMPONENT_TEMPLATE,\n providers: dbxFormlyFormComponentProviders(),\n imports: [DbxFormlyFormComponentImportsModule, DbxFormFormlyWrapperModule, DbxFormFormlyBooleanFieldModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDaysFormComponent extends AbstractSyncFormlyFormDirective<DbxScheduleSelectionCalendarDateDaysFormValue> {\n readonly fields: FormlyFieldConfig[] = dbxScheduleSelectionCalendarDateDaysFormFields();\n}\n","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { dateCellScheduleDayCodesAreSetsEquivalent, dateCellScheduleDayCodesFromEnabledDays, enabledDaysFromDateCellScheduleDayCodes } from '@dereekb/date';\nimport { type WorkUsingObservable, type IsModifiedFunction } from '@dereekb/rxjs';\nimport { DbxCalendarStore } from '@dereekb/dbx-web/calendar';\nimport { map, shareReplay, type Observable, of } from 'rxjs';\nimport { DbxScheduleSelectionCalendarDateDaysFormComponent, type DbxScheduleSelectionCalendarDateDaysFormValue } from './calendar.schedule.selection.days.form.component';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { DbxActionModule } from '@dereekb/dbx-web';\nimport { DbxActionFormDirective, DbxFormSourceDirective } from '@dereekb/dbx-form';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-days',\n template: `\n <div class=\"dbx-schedule-selection-calendar-date-days\" dbxAction dbxActionAutoTrigger dbxActionEnforceModified [useInstantTriggerPreset]=\"true\" [dbxActionHandler]=\"updateScheduleDays\">\n <dbx-schedule-selection-calendar-date-days-form dbxActionForm [dbxFormSource]=\"template$\" [dbxActionFormIsModified]=\"isFormModified\"></dbx-schedule-selection-calendar-date-days-form>\n </div>\n `,\n imports: [DbxScheduleSelectionCalendarDateDaysFormComponent, DbxFormSourceDirective, DbxActionModule, DbxActionFormDirective],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDaysComponent {\n readonly dbxCalendarStore = inject(DbxCalendarStore);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly template$: Observable<DbxScheduleSelectionCalendarDateDaysFormValue> = this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(map(enabledDaysFromDateCellScheduleDayCodes), shareReplay(1));\n\n readonly isFormModified: IsModifiedFunction<DbxScheduleSelectionCalendarDateDaysFormValue> = (value: DbxScheduleSelectionCalendarDateDaysFormValue) => {\n const newSetValue = new Set(dateCellScheduleDayCodesFromEnabledDays(value));\n return this.dbxCalendarScheduleSelectionStore.scheduleDays$.pipe(\n map((currentSet) => {\n return !dateCellScheduleDayCodesAreSetsEquivalent(newSetValue, currentSet);\n })\n );\n };\n\n readonly updateScheduleDays: WorkUsingObservable<DbxScheduleSelectionCalendarDateDaysFormValue> = (value) => {\n this.dbxCalendarScheduleSelectionStore.setScheduleDays(new Set(dateCellScheduleDayCodesFromEnabledDays(value)));\n return of(true);\n };\n}\n","import { SubscriptionObject } from '@dereekb/rxjs';\nimport { Component, type OnDestroy, type OnInit, inject, viewChild, input, effect, computed, ChangeDetectionStrategy } from '@angular/core';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { DbxCalendarStore } from '@dereekb/dbx-web/calendar';\nimport { FormGroup, FormControl, type AbstractControl, ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { type Maybe } from '@dereekb/util';\nimport { switchMap, throttleTime, distinctUntilChanged, filter, BehaviorSubject, startWith, type Observable, map, shareReplay, combineLatest, EMPTY } from 'rxjs';\nimport { isSameDateDay } from '@dereekb/date';\nimport { type MatFormFieldDefaultOptions, MAT_FORM_FIELD_DEFAULT_OPTIONS, MatFormFieldModule } from '@angular/material/form-field';\nimport { type ErrorStateMatcher } from '@angular/material/core';\nimport { type DateFilterFn, type MatDateRangePicker, MatDatepickerModule } from '@angular/material/datepicker';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\nimport { TimezoneAbbreviationPipe } from '@dereekb/dbx-core';\n\ninterface RangeValue {\n readonly start?: Maybe<Date>;\n readonly end?: Maybe<Date>;\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-range',\n templateUrl: './calendar.schedule.selection.range.component.html',\n imports: [MatFormFieldModule, FormsModule, ReactiveFormsModule, DbxButtonSpacerDirective, MatDatepickerModule, TimezoneAbbreviationPipe],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateRangeComponent implements OnInit, OnDestroy {\n readonly dbxCalendarStore = inject(DbxCalendarStore);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n readonly matFormFieldDefaultOptions = inject<MatFormFieldDefaultOptions>(MAT_FORM_FIELD_DEFAULT_OPTIONS, { optional: true });\n\n readonly picker = viewChild.required<MatDateRangePicker<Date>>('picker');\n\n readonly required = input<boolean>(false);\n readonly openPickerOnTextClick = input<boolean>(true);\n\n readonly label = input<Maybe<string>>('Enter a date range');\n readonly hint = input<Maybe<string>>();\n\n readonly disabled = input<Maybe<boolean>>();\n readonly showCustomize = input<boolean>(false);\n\n readonly timezone$ = this.dbxCalendarScheduleSelectionStore.effectiveOutputTimezone$;\n\n protected readonly _disabledEffect = effect(() => {\n const disabled = this.disabled();\n if (disabled) {\n this.range.disable();\n } else {\n this.range.enable();\n }\n });\n\n private readonly _pickerOpened = new BehaviorSubject<boolean>(false);\n\n private readonly _syncSub = new SubscriptionObject();\n private readonly _valueSub = new SubscriptionObject();\n\n readonly range = new FormGroup({\n start: new FormControl<Maybe<Date>>(null),\n end: new FormControl<Maybe<Date>>(null)\n });\n\n readonly errorStateMatcher: ErrorStateMatcher = {\n isErrorState: (control: AbstractControl | null, _form) => {\n if (control) {\n return (control.invalid && (control.dirty || control.touched)) || (control.touched && this.range.invalid);\n } else {\n return false;\n }\n }\n };\n\n readonly minDate$ = this.dbxCalendarScheduleSelectionStore.minDate$;\n readonly maxDate$ = this.dbxCalendarScheduleSelectionStore.maxDate$;\n\n readonly timezoneReleventDate$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(\n map((currentDateRange) => {\n return (currentDateRange ? (currentDateRange.start ?? currentDateRange.end) : undefined) ?? new Date();\n }),\n shareReplay(1)\n );\n\n readonly isCustomized$ = this.dbxCalendarScheduleSelectionStore.isCustomized$;\n readonly currentErrorMessage$ = this.range.statusChanges.pipe(\n filter((x) => x === 'INVALID' || x === 'VALID'),\n map((x) => {\n let currentErrorMessage: string | undefined;\n\n if (x === 'INVALID') {\n const { start, end } = this.range.controls;\n\n if (this.range.hasError('required')) {\n currentErrorMessage = 'Date range is required';\n } else if (start.hasError('matStartDateInvalid')) {\n currentErrorMessage = 'Invalid start date';\n } else if (start.hasError('matDatepickerMin')) {\n currentErrorMessage = 'Start date is too early';\n } else if (start.hasError('matDatepickerMax')) {\n currentErrorMessage = 'Start date is too late';\n } else if (end.hasError('matStartDateInvalid')) {\n currentErrorMessage = 'Invalid end date';\n } else if (end.hasError('matDatepickerMin')) {\n currentErrorMessage = 'End date is too early';\n } else if (end.hasError('matDatepickerMax')) {\n currentErrorMessage = 'End date is too late';\n }\n }\n\n return currentErrorMessage;\n }),\n shareReplay(1)\n );\n\n readonly datePickerFilter$: Observable<DateFilterFn<Date>> = combineLatest([this.dbxCalendarScheduleSelectionStore.isEnabledFilterDayFunction$, this.dbxCalendarScheduleSelectionStore.isInAllowedDaysOfWeekFunction$]).pipe(\n map(([isEnabled, isAllowedDayOfWeek]) => {\n const fn = (date: Date | null) => {\n return date ? isAllowedDayOfWeek(date) && isEnabled(date) : true;\n };\n\n return fn;\n }),\n shareReplay(1)\n );\n\n readonly timezoneSignal = toSignal(this.timezone$);\n readonly timezoneReleventDateSignal = toSignal(this.timezoneReleventDate$, { initialValue: new Date() });\n readonly isCustomizedSignal = toSignal(this.isCustomized$, { initialValue: false });\n\n readonly showCustomLabelSignal = computed(() => this.showCustomize() && this.isCustomizedSignal());\n readonly currentErrorMessageSignal = toSignal(this.currentErrorMessage$);\n readonly datePickerFilterSignal = toSignal(this.datePickerFilter$, { initialValue: (() => true) as DateFilterFn<Date> });\n\n protected readonly _requiredUpdateValidatorsEffect = effect(() => {\n const validators = this.required()\n ? [\n (control: AbstractControl) => {\n const range = control.value;\n\n if (!range?.start || !range.end) {\n return { required: true };\n }\n\n return null;\n }\n ]\n : [];\n\n this.range.setValidators(validators);\n });\n\n ngOnInit(): void {\n this._syncSub.subscription = this.dbxCalendarScheduleSelectionStore.currentInputRange$.subscribe((x) => {\n this.range.setValue({\n start: x?.inputStart ?? null,\n end: x?.inputEnd ?? null\n });\n });\n\n this._valueSub.subscription = this._pickerOpened\n .pipe(\n distinctUntilChanged(),\n switchMap((opened) => {\n let obs: Observable<RangeValue>;\n\n if (opened) {\n obs = EMPTY;\n } else {\n obs = this.range.valueChanges.pipe(startWith(this.range.value));\n }\n\n return obs;\n }),\n filter((x) => Boolean(x.start && x.end)),\n distinctUntilChanged((a, b) => isSameDateDay(a.start, b.start) && isSameDateDay(a.end, b.end)),\n throttleTime(100, undefined, { trailing: true })\n )\n .subscribe((x) => {\n if (x.start && x.end) {\n this.dbxCalendarScheduleSelectionStore.setInputRange({ inputStart: x.start, inputEnd: x.end });\n }\n });\n }\n\n ngOnDestroy(): void {\n this._syncSub.destroy();\n this._valueSub.destroy();\n }\n\n clickedDateRangeInput() {\n if (this.openPickerOnTextClick()) {\n const picker = this.picker();\n if (picker) {\n picker.open();\n }\n }\n }\n\n pickerOpened() {\n this._pickerOpened.next(true);\n }\n\n pickerClosed() {\n this._pickerOpened.next(false);\n }\n}\n","<mat-form-field class=\"dbx-schedule-selection-calendar-date-range-field\">\n @if (label()) {\n <mat-label>{{ label() }}</mat-label>\n }\n <div class=\"dbx-schedule-selection-calendar-date-range-field-content\">\n <!-- Primary Content -->\n <div class=\"dbx-flex-bar\">\n @if (showCustomLabelSignal()) {\n <div class=\"date-range-field-customized\">\n <span class=\"dbx-accent-bg date-range-field-customized-text\">Custom</span>\n </div>\n }\n <dbx-button-spacer></dbx-button-spacer>\n <mat-datepicker-toggle class=\"mat-datepicker-button-highlight\" matIconSuffix [for]=\"picker\"></mat-datepicker-toggle>\n <dbx-button-spacer></dbx-button-spacer>\n <mat-date-range-input (click)=\"clickedDateRangeInput()\" [required]=\"required()\" [dateFilter]=\"datePickerFilterSignal()\" [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 @if (timezoneSignal()) {\n <span class=\"dbx-schedule-selection-timezone dbx-faint dbx-nowrap dbx-icon-spacer\">{{ timezoneSignal() | timezoneAbbreviation: timezoneReleventDateSignal() }}</span>\n }\n @if (showCustomize()) {\n <div>\n <dbx-button-spacer></dbx-button-spacer>\n <ng-content select=\"[customizeButton]\"></ng-content>\n </div>\n }\n <mat-date-range-picker #picker (opened)=\"pickerOpened()\" (closed)=\"pickerClosed()\"></mat-date-range-picker>\n </div>\n <!-- Custom Content -->\n <div>\n <ng-content></ng-content>\n </div>\n </div>\n @if (currentErrorMessageSignal()) {\n <mat-error>{{ currentErrorMessageSignal() }}</mat-error>\n }\n <mat-hint>{{ hint() }}</mat-hint>\n</mat-form-field>\n","import { DbxScheduleSelectionCalendarDateDaysComponent } from './calendar.schedule.selection.days.component';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\nimport { DbxContentContainerDirective, DbxLabelBlockComponent } from '@dereekb/dbx-web';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from './calendar.schedule.selection.range.component';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover-content',\n template: `\n <dbx-content-container padding=\"min\" topPadding=\"normal\">\n <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]=\"false\"></dbx-schedule-selection-calendar-date-range>\n <dbx-label-block header=\"Allowed Days Of Week\">\n <dbx-schedule-selection-calendar-date-days></dbx-schedule-selection-calendar-date-days>\n </dbx-label-block>\n </dbx-content-container>\n `,\n imports: [DbxContentContainerDirective, DbxScheduleSelectionCalendarDateRangeComponent, DbxLabelBlockComponent, DbxScheduleSelectionCalendarDateDaysComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverContentComponent {}\n","import { ChangeDetectionStrategy, Component, type ElementRef, type Injector } from '@angular/core';\nimport { type DbxPopoverKey, AbstractPopoverDirective, type DbxPopoverService, DbxPopoverInteractionModule } from '@dereekb/dbx-web';\nimport { type NgPopoverRef } from 'ng-overlay-container';\nimport { DbxScheduleSelectionCalendarDatePopoverContentComponent } from './calendar.schedule.selection.popover.content.component';\n\nexport const DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY = 'calendarselection';\n\nexport interface DbxScheduleSelectionCalendarDatePopoverConfig {\n origin: ElementRef;\n injector: Injector;\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover',\n template: `\n <dbx-popover-content>\n <dbx-popover-scroll-content>\n <dbx-schedule-selection-calendar-date-popover-content></dbx-schedule-selection-calendar-date-popover-content>\n </dbx-popover-scroll-content>\n </dbx-popover-content>\n `,\n imports: [DbxPopoverInteractionModule, DbxScheduleSelectionCalendarDatePopoverContentComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverComponent extends AbstractPopoverDirective<void> {\n static openPopover(popoverService: DbxPopoverService, { origin, injector }: DbxScheduleSelectionCalendarDatePopoverConfig, popoverKey?: DbxPopoverKey): NgPopoverRef<any, number> {\n return popoverService.open({\n key: popoverKey ?? DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY,\n origin,\n componentClass: DbxScheduleSelectionCalendarDatePopoverComponent,\n injector\n });\n }\n}\n","import { DbxScheduleSelectionCalendarDatePopoverComponent } from './calendar.schedule.selection.popover.component';\nimport { ChangeDetectionStrategy, Component, ElementRef, Injector, inject, viewChild } from '@angular/core';\nimport { DbxPopoverService, DbxButtonComponent } from '@dereekb/dbx-web';\nimport { map, shareReplay } from 'rxjs';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { formatToMonthDayString } from '@dereekb/date';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-popover-button',\n template: `\n <dbx-button #buttonPopoverOrigin icon=\"date_range\" [disabled]=\"disabledSignal()\" [raised]=\"true\" color=\"accent\" [text]=\"buttonTextSignal()\" (buttonClick)=\"openPopover()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDatePopoverButtonComponent {\n readonly injector = inject(Injector);\n readonly popoverService = inject(DbxPopoverService);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly buttonPopoverOrigin = viewChild.required<string, ElementRef<HTMLButtonElement>>('buttonPopoverOrigin', { read: ElementRef });\n\n readonly disabled$ = this.dbxCalendarScheduleSelectionStore.isViewReadonly$;\n readonly buttonText$ = this.dbxCalendarScheduleSelectionStore.currentDateRange$.pipe(\n map((x) => {\n if (x?.start && x.end) {\n const startString = formatToMonthDayString(x.start);\n const endString = formatToMonthDayString(x.end);\n return startString === endString ? startString : `${formatToMonthDayString(x.start)} - ${formatToMonthDayString(x.end)}`;\n } else {\n return 'Pick a Date Range';\n }\n }),\n shareReplay(1)\n );\n\n readonly disabledSignal = toSignal(this.disabled$, { initialValue: false });\n readonly buttonTextSignal = toSignal(this.buttonText$, { initialValue: 'Pick a Date Range' });\n\n openPopover() {\n const buttonElement = this.buttonPopoverOrigin();\n if (buttonElement) {\n DbxScheduleSelectionCalendarDatePopoverComponent.openPopover(this.popoverService, { origin: buttonElement, injector: this.injector });\n }\n }\n}\n","import { Component, inject, ChangeDetectionStrategy, input, computed, type Signal } from '@angular/core';\nimport { type CalendarMonthViewDay } from 'angular-calendar';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { type CalendarScheduleSelectionCellContent, type CalendarScheduleSelectionMetadata } from './calendar.schedule.selection';\nimport { MatIconModule } from '@angular/material/icon';\nimport { toObservable, toSignal } from '@angular/core/rxjs-interop';\nimport { map, shareReplay, switchMap } from 'rxjs';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-cell',\n template: `\n @if (iconSignal()) {\n <mat-icon>{{ iconSignal() }}</mat-icon>\n }\n <span>{{ textSignal() }}</span>\n `,\n host: {\n class: 'dbx-schedule-selection-calendar-cell'\n },\n imports: [MatIconModule],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarCellComponent {\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly day = input.required<CalendarMonthViewDay<CalendarScheduleSelectionMetadata>>();\n readonly day$ = toObservable(this.day);\n\n readonly cellContent$ = this.dbxCalendarScheduleSelectionStore.cellContentFactory$.pipe(\n switchMap((fn) => this.day$.pipe(map((x) => fn(x)))),\n shareReplay(1)\n );\n\n readonly contentSignal: Signal<CalendarScheduleSelectionCellContent> = toSignal(this.cellContent$, { initialValue: {} });\n\n readonly iconSignal = computed(() => this.contentSignal().icon);\n readonly textSignal = computed(() => this.contentSignal().text);\n}\n","import { Component, inject, ChangeDetectionStrategy, computed, input } from '@angular/core';\nimport { DbxButtonComponent } from '@dereekb/dbx-web';\nimport { DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { type DbxButtonDisplay } from '@dereekb/dbx-core';\nimport { type Maybe } from '@dereekb/util';\nimport { toSignal } from '@angular/core/rxjs-interop';\n\n/**\n * Toggle button for selecting and clearing the current selection.\n */\n@Component({\n selector: 'dbx-schedule-selection-calendar-selection-toggle-button',\n template: `\n <dbx-button [disabled]=\"disableButtonSignal()\" [buttonDisplay]=\"buttonDisplaySignal()\" [raised]=\"true\" (buttonClick)=\"toggleSelection()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarSelectionToggleButtonComponent {\n readonly disabled = input<Maybe<boolean>>();\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly selectionModeSignal = toSignal(this.dbxCalendarScheduleSelectionStore.selectionMode$, { initialValue: 'multiple' });\n readonly nextToggleSelectionSignal = toSignal(this.dbxCalendarScheduleSelectionStore.nextToggleSelection$, { initialValue: 'none' });\n\n readonly disableButtonSignal = computed(() => {\n const disabled = this.disabled();\n const nextToggleSelection = this.nextToggleSelectionSignal();\n let disableButton = false;\n\n if (disabled) {\n disableButton = true;\n } else {\n disableButton = !nextToggleSelection;\n }\n\n return disableButton;\n });\n\n readonly buttonDisplaySignal = computed(() => {\n const selectionMode = this.selectionModeSignal();\n const nextToggleSelection = this.nextToggleSelectionSignal();\n\n let buttonDisplay: DbxButtonDisplay;\n\n switch (nextToggleSelection) {\n case 'all':\n buttonDisplay = {\n icon: 'select_all',\n text: 'Select All'\n };\n break;\n default:\n case 'none':\n buttonDisplay = {\n icon: 'clear',\n text: selectionMode === 'multiple' ? 'Clear All' : 'Clear'\n };\n break;\n }\n\n return buttonDisplay;\n });\n\n toggleSelection() {\n this.dbxCalendarScheduleSelectionStore.toggleSelection();\n }\n}\n","import { Component, type OnDestroy, type OnInit, inject, ChangeDetectionStrategy, input, output } from '@angular/core';\nimport { type CalendarEvent, type CalendarMonthViewBeforeRenderEvent, type CalendarMonthViewDay, CalendarMonthViewComponent, CalendarDatePipe } from 'angular-calendar';\nimport { map, shareReplay, type Subject, first, throttleTime, distinctUntilChanged, type Observable, combineLatest, switchMap, of, combineLatestWith } from 'rxjs';\nimport { type DbxCalendarEvent, DbxCalendarStore, prepareAndSortCalendarEvents, DbxCalendarBaseComponent } from '@dereekb/dbx-web/calendar';\nimport { type DayOfWeek, type Maybe, reduceBooleansWithAnd } from '@dereekb/util';\nimport { type CalendarScheduleSelectionState, DbxCalendarScheduleSelectionStore } from './calendar.schedule.selection.store';\nimport { CalendarScheduleSelectionDayState, type CalendarScheduleSelectionMetadata } from './calendar.schedule.selection';\nimport { type DbxInjectionComponentConfig, switchMapDbxInjectionComponentConfig, DbxInjectionComponent } from '@dereekb/dbx-core';\nimport { type ObservableOrValue, type ObservableOrValueGetter, SubscriptionObject, asObservable, asObservableFromGetter } from '@dereekb/rxjs';\nimport { DbxScheduleSelectionCalendarDatePopoverButtonComponent } from './calendar.schedule.selection.popover.button.component';\nimport { DateRangeType, dateRange, isSameDate } from '@dereekb/date';\nimport { endOfWeek } from 'date-fns';\nimport { toSignal, toObservable } from '@angular/core/rxjs-interop';\nimport { NgClass } from '@angular/common';\nimport { DbxScheduleSelectionCalendarCellComponent } from './calendar.schedule.selection.cell.component';\nimport { DbxScheduleSelectionCalendarSelectionToggleButtonComponent } from './calendar.schedule.selection.toggle.button.component';\nimport { DbxButtonSpacerDirective } from '@dereekb/dbx-web';\n\nexport interface DbxScheduleSelectionCalendarComponentConfig {\n /**\n * Whether or not the selection calendar is readonly. Defaults to 'false'.\n */\n readonly readonly?: Maybe<ObservableOrValueGetter<Maybe<boolean>>>;\n /**\n * Whether or not to show the configured buttons when readonly is true. Defaults to false.\n */\n readonly showButtonsOnReadonly?: boolean;\n /**\n * Whether or not to show the clear selection button. Defaults to `true`.\n */\n readonly showClearSelectionButton?: boolean;\n /**\n * Configuration for displaying a custom selection button. When null/undefined/true is passed, will show the default DbxScheduleSelectionCalendarDatePopoverButtonComponent.\n */\n readonly buttonInjectionConfig?: Maybe<ObservableOrValueGetter<Maybe<DbxInjectionComponentConfig<any> | boolean>>>;\n /**\n * Customize day function. When a new function is piped through the calendar is refreshed.\n */\n readonly customizeDay?: Maybe<ObservableOrValue<Maybe<DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction>>>;\n /**\n * Optional full control over the beforeMonthViewRender\n */\n readonly beforeMonthViewRenderFunctionFactory?: Maybe<ObservableOrValue<DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory>>;\n}\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction = (viewDay: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>, state: CalendarScheduleSelectionState) => void;\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction = (renderEvent: CalendarMonthViewBeforeRenderEvent) => void;\n\nexport type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory = (state: Observable<CalendarScheduleSelectionState>) => DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction;\n\n/**\n * Creates a factory that produces a beforeMonthViewRender handler for the schedule selection calendar.\n * The handler applies CSS classes and metadata to each day cell based on the current selection state.\n *\n * @param inputModifyFn - Optional function to further customize each day cell after default processing\n * @returns A factory function that accepts a state observable and produces a render handler\n */\nexport function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn?: Maybe<DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction>): DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory {\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n const modifyFn = inputModifyFn || (() => {});\n\n return (state$: Observable<CalendarScheduleSelectionState>) => {\n return (renderEvent: CalendarMonthViewBeforeRenderEvent) => {\n const { body }: { body: CalendarMonthViewDay<CalendarScheduleSelectionMetadata>[] } = renderEvent;\n\n // use latest/current state\n state$.pipe(first()).subscribe((calendarScheduleState: CalendarScheduleSelectionState) => {\n const { isEnabledDay, indexFactory, isEnabledFilterDay, allowedDaysOfWeek } = calendarScheduleState;\n body.forEach((viewDay) => {\n const { date } = viewDay;\n const i = indexFactory(date);\n const day = date.getDay();\n\n let state: CalendarScheduleSelectionDayState;\n\n if (!isEnabledFilterDay(i)) {\n viewDay.cssClass = 'cal-day-not-applicable';\n state = CalendarScheduleSelectionDayState.NOT_APPLICABLE;\n } else if (!allowedDaysOfWeek.has(day as DayOfWeek)) {\n viewDay.cssClass = 'cal-day-disabled';\n state = CalendarScheduleSelectionDayState.DISABLED;\n } else if (isEnabledDay(i)) {\n viewDay.cssClass = 'cal-day-selected';\n state = CalendarScheduleSelectionDayState.SELECTED;\n } else {\n viewDay.cssClass = 'cal-day-not-selected';\n state = CalendarScheduleSelectionDayState.NOT_SELECTED;\n }\n\n const meta = {\n state,\n i\n };\n\n viewDay.meta = meta;\n modifyFn(viewDay, calendarScheduleState);\n });\n });\n };\n };\n}\n\n@Component({\n selector: 'dbx-schedule-selection-calendar',\n templateUrl: './calendar.schedule.selection.component.html',\n imports: [NgClass, CalendarMonthViewComponent, CalendarDatePipe, DbxCalendarBaseComponent, DbxInjectionComponent, DbxButtonSpacerDirective, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent],\n providers: [DbxCalendarStore],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarComponent<T> implements OnInit, OnDestroy {\n readonly calendarStore = inject(DbxCalendarStore<T>);\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n readonly clickEvent = output<DbxCalendarEvent<T>>();\n\n readonly config = input<Maybe<DbxScheduleSelectionCalendarComponentConfig>>();\n readonly readonly = input<Maybe<boolean>>(false);\n\n private readonly _centerRangeSub = new SubscriptionObject();\n\n readonly config$: Observable<Maybe<DbxScheduleSelectionCalendarComponentConfig>> = toObservable(this.config).pipe(distinctUntilChanged(), shareReplay(1));\n\n readonly readonly$: Observable<boolean> = this.config$.pipe(\n switchMap((x) => (x?.readonly != null ? asObservableFromGetter(x.readonly) : of(undefined))),\n combineLatestWith(toObservable(this.readonly)),\n map(([configReadonly, inputReadonly]) => {\n return configReadonly || inputReadonly || false;\n }),\n shareReplay(1)\n );\n\n readonly showButtonsOnReadonly$: Observable<boolean> = this.config$.pipe(\n map((x) => x?.showButtonsOnReadonly ?? false),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showButtons$ = this.showButtonsOnReadonly$.pipe(\n switchMap((x) => {\n if (x) {\n return of(true);\n } else {\n return this.readonly$.pipe(map((x) => !x));\n }\n }),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly showClearSelectionButton$ = this.config$.pipe(\n map((config) => config?.showClearSelectionButton ?? true),\n combineLatestWith(this.showButtons$),\n map((x) => reduceBooleansWithAnd(x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly datePopoverButtonInjectionConfig$: Observable<Maybe<DbxInjectionComponentConfig<any>>> = this.config$.pipe(\n map((x) => x?.buttonInjectionConfig),\n switchMapDbxInjectionComponentConfig(DbxScheduleSelectionCalendarDatePopoverButtonComponent),\n combineLatestWith(this.showButtons$),\n map(([config, showButton]) => (showButton ? config : undefined)),\n shareReplay(1)\n );\n\n // refresh any time the selected day function updates\n readonly state$ = this.dbxCalendarScheduleSelectionStore.state$;\n\n readonly beforeMonthViewRender$ = this.config$.pipe(\n switchMap((x) => {\n let factory: Observable<DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory>;\n\n if (x?.beforeMonthViewRenderFunctionFactory) {\n factory = asObservable(x.beforeMonthViewRenderFunctionFactory);\n } else {\n factory = asObservable(x?.customizeDay).pipe(map((x) => dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(x)));\n }\n\n return factory.pipe(map((x) => x(this.state$)));\n }),\n shareReplay(1)\n );\n\n readonly refresh$ = combineLatest([this.state$, this.beforeMonthViewRender$]).pipe(\n throttleTime(20, undefined, { leading: true, trailing: true }),\n map(() => undefined)\n ) as Subject<undefined>;\n\n readonly events$ = this.calendarStore.visibleEvents$.pipe(map(prepareAndSortCalendarEvents), shareReplay(1));\n readonly viewDate$ = this.calendarStore.date$;\n\n readonly beforeMonthViewRenderSignal = toSignal(this.beforeMonthViewRender$);\n readonly readonlySignal = toSignal(this.readonly$, { initialValue: false });\n readonly showClearSelectionButtonSignal = toSignal(this.showClearSelectionButton$);\n readonly datePopoverButtonInjectionConfigSignal = toSignal(this.datePopoverButtonInjectionConfig$);\n\n readonly eventsSignal = toSignal(this.events$, { initialValue: [] });\n readonly viewDateSignal = toSignal(this.viewDate$, { initialValue: new Date() });\n\n ngOnInit(): void {\n this.dbxCalendarScheduleSelectionStore.setViewReadonlyState(this.readonly$); // sync the readonly state\n\n this.calendarStore.setNavigationRangeLimit(this.dbxCalendarScheduleSelectionStore.minMaxDateRange$); // set navigation limit to the min/max allowed dates.\n this.calendarStore.setShowPageButtons(true);\n\n // when a new filter is set, if the first two pages of selectable indexes fit within the calendar month, focus on that calendar month.\n this._centerRangeSub.subscription = this.dbxCalendarScheduleSelectionStore.currentDateRange$\n .pipe(\n first(),\n switchMap((x) => {\n const result: Observable<[typeof x, boolean]> = x\n ? of([x, true])\n : this.dbxCalendarScheduleSelectionStore.minMaxDateRange$.pipe(\n first(),\n map((y) => [y, false] as [typeof x, boolean])\n );\n return result;\n })\n )\n .subscribe(([x, isFromSelectedDateRange]) => {\n if (x?.start) {\n let tapDay: Maybe<Date>;\n const startMonth = dateRange({ date: x.start, type: DateRangeType.CALENDAR_MONTH });\n const monthToFocus = endOfWeek(startMonth.start);\n\n if (x.end != null) {\n const endMonth = dateRange({ date: x.end, type: DateRangeType.CALENDAR_MONTH });\n\n if (isSameDate(startMonth.start, endMonth.start)) {\n tapDay = monthToFocus;\n }\n }\n\n if (!tapDay && isFromSelectedDateRange) {\n tapDay = monthToFocus;\n }\n\n if (tapDay) {\n this.calendarStore.tapDay(tapDay);\n }\n }\n });\n }\n\n ngOnDestroy(): void {\n this._centerRangeSub.destroy();\n }\n\n dayClicked({ date }: { date: Date }): void {\n if (!this.readonlySignal()) {\n this.dbxCalendarScheduleSelectionStore.toggleSelectedDates(date);\n }\n }\n\n eventClicked(action: string, event: CalendarEvent<T>): void {\n this.clickEvent.emit({ action, event });\n }\n\n beforeMonthViewRender(renderEvent: CalendarMonthViewBeforeRenderEvent): void {\n this.beforeMonthViewRenderSignal()?.(renderEvent);\n }\n}\n","<dbx-calendar-base class=\"dbx-schedule-selection-calendar\" [ngClass]=\"readonlySignal() ? 'dbx-schedule-selection-calendar-readonly' : ''\">\n <ng-container controls>\n @if (showClearSelectionButtonSignal()) {\n <dbx-schedule-selection-calendar-selection-toggle-button [disabled]=\"readonlySignal()\"></dbx-schedule-selection-calendar-selection-toggle-button>\n <dbx-button-spacer></dbx-button-spacer>\n }\n <dbx-injection [config]=\"datePopoverButtonInjectionConfigSignal()\"></dbx-injection>\n </ng-container>\n <div class=\"dbx-calendar-content dbx-calendar-content-month\">\n <mwl-calendar-month-view [refresh]=\"refresh$\" [viewDate]=\"viewDateSignal()!\" [events]=\"eventsSignal()\" (dayClicked)=\"dayClicked($event.day)\" (eventClicked)=\"eventClicked('Clicked', $event.event)\" (beforeViewRender)=\"beforeMonthViewRender($event)\" [cellTemplate]=\"monthDayCellTemplate\"></mwl-calendar-month-view>\n </div>\n</dbx-calendar-base>\n\n<!-- Cell -->\n<ng-template #monthDayCellTemplate let-day=\"day\" let-locale=\"locale\">\n <div class=\"cal-cell-top\">\n @if (day.badgeTotal > 0) {\n <span class=\"cal-day-badge\">{{ day.badgeTotal }}</span>\n }\n <span class=\"cal-day-number\">{{ day.date | calendarDate: 'monthViewDayNumber' : locale }}</span>\n </div>\n <dbx-schedule-selection-calendar-cell [day]=\"day\"></dbx-schedule-selection-calendar-cell>\n</ng-template>\n","import { ChangeDetectionStrategy, Component, InjectionToken, type Injector } from '@angular/core';\nimport { type MatDialog } from '@angular/material/dialog';\nimport { AbstractDialogDirective, type DbxDialogContentConfig, type DbxDialogContentFooterConfig, DbxDialogModule, sanitizeDbxDialogContentConfig } from '@dereekb/dbx-web';\nimport { KeyValueTypleValueFilter, type Maybe, mergeObjects } from '@dereekb/util';\nimport { DbxScheduleSelectionCalendarComponent } from './calendar.schedule.selection.component';\n\n/**\n * Token used to configure the default DbxScheduleSelectionCalendarDatePopupConfig for DbxScheduleSelectionCalendarDateDialogComponent.\n */\nexport const DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN = new InjectionToken('DbxScheduleSelectionCalendarDatePopupContentConfig');\n\nexport interface DbxScheduleSelectionCalendarDatePopupContentConfig {\n readonly closeConfig?: DbxDialogContentFooterConfig;\n readonly dialogConfig?: DbxDialogContentConfig;\n}\n\nexport interface DbxScheduleSelectionCalendarDatePopupConfig {\n readonly injector: Injector;\n readonly contentConfig?: Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>;\n}\n\n@Component({\n template: `\n <dbx-dialog-content class=\"dbx-schedule-selection-calendar-date-dialog\">\n <dbx-dialog-content-close (close)=\"close()\"></dbx-dialog-content-close>\n <dbx-schedule-selection-calendar></dbx-schedule-selection-calendar>\n <dbx-dialog-content-footer [config]=\"closeConfig\" (close)=\"close()\"></dbx-dialog-content-footer>\n </dbx-dialog-content>\n `,\n standalone: true,\n imports: [DbxDialogModule, DbxScheduleSelectionCalendarComponent],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DbxScheduleSelectionCalendarDateDialogComponent extends AbstractDialogDirective<void, DbxScheduleSelectionCalendarDatePopupConfig> {\n get contentConfig() {\n return this.data.contentConfig;\n }\n\n get closeConfig() {\n return this.contentConfig?.closeConfig;\n }\n\n static openDialog(matDialog: MatDialog, config: DbxScheduleSelectionCalendarDatePopupConfig) {\n const { injector, contentConfig: inputContentConfig } = config;\n const defaultContentConfig = injector.get<Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>>(DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN, null);\n const contentConfig = mergeObjects([defaultContentConfig, inputContentConfig], KeyValueTypleValueFilter.NULL);\n return matDialog.open(DbxScheduleSelectionCalendarDateDialogComponent, {\n height: 'calc(var(--vh100) * 0.9)',\n width: '80vw',\n minHeight: 400,\n minWidth: 360,\n ...sanitizeDbxDialogContentConfig(contentConfig.dialogConfig),\n injector,\n data: {\n config,\n contentConfig\n }\n });\n }\n}\n","import { ChangeDetectionStrategy, Component, Injector, inject, input } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { DbxScheduleSelectionCalendarDateDialogComponent, type DbxScheduleSelectionCalendarDatePopupContentConfig } from './calendar.schedule.selection.dialog.component';\nimport { type Maybe } from '@dereekb/util';\nimport { DbxButtonComponent } from '@dereekb/dbx-web';\n\n@Component({\n selector: 'dbx-schedule-selection-calendar-date-dialog-button',\n template: `\n <dbx-button [raised]=\"true\" color=\"accent\" [text]=\"buttonText()\" [disabled]=\"disabled()\" (buttonClick)=\"clickCustomize()\"></dbx-button>\n `,\n imports: [DbxButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxScheduleSelectionCalendarDateDialogButtonComponent {\n readonly injector = inject(Injector);\n readonly matDialog = inject(MatDialog);\n\n readonly buttonText = input<string>('Customize');\n\n readonly disabled = input<Maybe<boolean>>();\n\n readonly contentConfig = input<Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>>();\n\n clickCustomize() {\n DbxScheduleSelectionCalendarDateDialogComponent.openDialog(this.matDialog, { injector: this.injector, contentConfig: this.contentConfig() });\n }\n}\n","import { type AbstractControl, type FormGroup } from '@angular/forms';\nimport { CompactContextStore } from '@dereekb/dbx-web';\nimport { ChangeDetectionStrategy, Component, type OnDestroy, type OnInit, inject } from '@angular/core';\nimport { type FieldTypeConfig, type FormlyFieldProps } from '@ngx-formly/core';\nimport { type ArrayOrValue, type TimezoneString, type Maybe } from '@dereekb/util';\nimport { FieldType } from '@ngx-formly/material';\nimport { BehaviorSubject, distinctUntilChanged, map, shareReplay, startWith, type Subscription, switchMap } from 'rxjs';\nimport { filterMaybe, type ObservableOrValue, SubscriptionObject, asObservable } from '@dereekb/rxjs';\nimport { type DateRange, isSameDateCellScheduleDateRange, type DateCellScheduleDateFilterConfig, type DateCellScheduleDayCode, type DateOrDateRangeOrDateCellIndexOrDateCellRange } from '@dereekb/date';\nimport { type CalendarScheduleSelectionState, DbxCalendarScheduleSelectionStore } from '../../calendar.schedule.selection.store';\nimport { provideCalendarScheduleSelectionStoreIfParentIsUnavailable } from '../../calendar.schedule.selection.store.provide';\nimport { type MatFormFieldAppearance } from '@angular/material/form-field';\nimport { type DbxScheduleSelectionCalendarDatePopupContentConfig } from '../../calendar.schedule.selection.dialog.component';\nimport { DbxInjectionComponent, type DbxInjectionComponentConfig } from '@dereekb/dbx-core';\nimport { toSignal } from '@angular/core/rxjs-interop';\nimport { DbxScheduleSelectionCalendarDateDialogButtonComponent } from '../../calendar.schedule.selection.dialog.button.component';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from '../../calendar.schedule.selection.range.component';\n\nexport interface DbxFormCalendarDateCellScheduleRangeFieldProps extends Pick<FormlyFieldProps, 'label' | 'description' | 'readonly' | 'required'>, Pick<CalendarScheduleSelectionState, 'computeSelectionResultRelativeToFilter' | 'initialSelectionState'>, Partial<Pick<CalendarScheduleSelectionState, 'cellContentFactory'>> {\n readonly appearance?: MatFormFieldAppearance;\n /**\n * Whether or not to allow inputting custom text into the picker.\n *\n * If false, when the input text is picked the date picker will open.\n *\n * Is false by default.\n */\n readonly allowTextInput?: boolean;\n /**\n * Whether or not to hide the customize button. Defaults to false.\n */\n readonly hideCustomize?: boolean;\n /**\n * Whether or not to allow customizing before picking a date range to customize.\n *\n * Defaults to false.\n */\n readonly allowCustomizeWithoutDateRange?: boolean;\n /**\n * (Optional) Timezone to use for the output start date.\n *\n * If a filter is provided, this timezone overrides the filter's timezone output.\n */\n readonly outputTimezone?: ObservableOrValue<Maybe<TimezoneString>>;\n /**\n * (Optional) Default schedule days to allow.\n */\n readonly defaultScheduleDays?: ObservableOrValue<Maybe<Iterable<DateCellScheduleDayCode>>>;\n /**\n * Optional min/max date range to filter on. Works in conjuction with the filter.\n */\n readonly minMaxDateRange?: ObservableOrValue<Maybe<Partial<DateRange>>>;\n /**\n * (Optional) Observable with a filter value to apply to the date range.\n */\n readonly filter?: ObservableOrValue<Maybe<DateCellScheduleDateFilterConfig>>;\n /**\n * (Optional) Observable with days and values to exclude from the date range.\n */\n readonly exclusions?: ObservableOrValue<Maybe<ArrayOrValue<DateOrDateRangeOrDateCellIndexOrDateCellRange>>>;\n /**\n * Custom dialog content config for the popup\n */\n readonly dialogContentConfig?: Maybe<DbxScheduleSelectionCalendarDatePopupContentConfig>;\n /**\n * Custom details config for the date range\n */\n readonly customDetailsConfig?: Maybe<DbxInjectionComponentConfig>;\n}\n\n@Component({\n template: `\n <div class=\"dbx-schedule-selection-field\">\n <dbx-schedule-selection-calendar-date-range [openPickerOnTextClick]=\"openPickerOnTextClick\" [showCustomize]=\"showCustomize\" [required]=\"required\" [disabled]=\"isReadonlyOrDisabled\" [label]=\"label\" [hint]=\"description\">\n <dbx-schedule-selection-calendar-date-dialog-button customizeButton [disabled]=\"disabledSignal()\" [contentConfig]=\"dialogContentConfig\"></dbx-schedule-selection-calendar-date-dialog-button>\n <dbx-injection [config]=\"customDetailsConfig\"></dbx-injection>\n </dbx-schedule-selection-calendar-date-range>\n </div>\n `,\n providers: [provideCalendarScheduleSelectionStoreIfParentIsUnavailable()],\n imports: [DbxInjectionComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: true\n})\nexport class DbxFormCalendarDateScheduleRangeFieldComponent<T extends DbxFormCalendarDateCellScheduleRangeFieldProps = DbxFormCalendarDateCellScheduleRangeFieldProps> extends FieldType<FieldTypeConfig<T>> implements OnInit, OnDestroy {\n readonly compact = inject(CompactContextStore, { optional: true });\n\n readonly dbxCalendarScheduleSelectionStore = inject(DbxCalendarScheduleSelectionStore);\n\n private readonly _syncSub = new SubscriptionObject();\n private readonly _valueSub = new SubscriptionObject();\n private readonly _timezoneSub = new SubscriptionObject();\n private readonly _minMaxDateRangeSub = new SubscriptionObject();\n private readonly _defaultWeekSub = new SubscriptionObject();\n private readonly _filterSub = new SubscriptionObject();\n private readonly _exclusionsSub = new SubscriptionObject();\n\n private readonly _formControlObs = new BehaviorSubject<Maybe<AbstractControl>>(undefined);\n readonly formControl$ = this._formControlObs.pipe(filterMaybe());\n\n readonly value$ = this.formControl$.pipe(\n switchMap((control) => control.valueChanges.pipe(startWith(control.value))),\n shareReplay(1)\n );\n\n readonly disableCustomize$ = this.value$.pipe(\n map((x) => (this.allowCustomizeWithoutDateRange ? false : !x)),\n distinctUntilChanged(),\n shareReplay(1)\n );\n\n readonly disabledSignal = toSignal(this.disableCustomize$);\n\n get formGroupName(): string {\n return this.field.key as string;\n }\n\n get formGroup(): FormGroup {\n return this.form as FormGroup;\n }\n\n get label(): Maybe<string> {\n return this.field.props?.label;\n }\n\n get description(): Maybe<string> {\n return this.props.description;\n }\n\n get isReadonlyOrDisabled() {\n return this.props.readonly || this.disabled;\n }\n\n get openPickerOnTextClick() {\n return this.props.allowTextInput !== true; // Opposite of allowTextInput\n }\n\n get allowCustomizeWithoutDateRange() {\n return this.props.allowCustomizeWithoutDateRange ?? false;\n }\n\n get showCustomize() {\n return !this.props.hideCustomize;\n }\n\n get defaultScheduleDays() {\n return this.props.defaultScheduleDays;\n }\n\n get minMaxDateRange() {\n return this.props.minMaxDateRange;\n }\n\n get filter() {\n return this.props.filter;\n }\n\n get exclusions() {\n return this.props.exclusions;\n }\n\n get outputTimezone() {\n return this.props.outputTimezone;\n }\n\n get initialSelectionState() {\n return this.props.initialSelectionState;\n }\n\n get computeSelectionResultRelativeToFilter() {\n return this.props.computeSelectionResultRelativeToFilter;\n }\n\n get dialogContentConfig() {\n return this.props.dialogContentConfig;\n }\n\n get customDetailsConfig() {\n return this.props.customDetailsConfig;\n }\n\n get cellContentFactory() {\n return this.props.cellContentFactory;\n }\n\n ngOnInit(): void {\n this._formControlObs.next(this.formControl);\n\n this._syncSub.subscription = this.value$.pipe(distinctUntilChanged(isSameDateCellScheduleDateRange)).subscribe((x) => {\n this.dbxCalendarScheduleSelectionStore.setDateScheduleRangeValue(x);\n });\n\n this._valueSub.subscription = this.dbxCalendarScheduleSelectionStore.currentDateCellScheduleRangeValue$.subscribe((x) => {\n this.formControl.setValue(x);\n });\n\n const { outputTimezone, minMaxDateRange, filter, exclusions, defaultScheduleDays } = this;\n\n if (filter != null) {\n this._filterSub.subscription = this.dbxCalendarScheduleSelectionStore.setFilter(asObservable(filter)) as Subscription;\n }\n\n if (defaultScheduleDays != null) {\n this._defaultWeekSub.subscription = this.dbxCalendarScheduleSelectionStore.setDefaultScheduleDays(asObservable(defaultScheduleDays)) as Subscription;\n }\n\n if (minMaxDateRange != null) {\n this._minMaxDateRangeSub.subscription = this.dbxCalendarScheduleSelectionStore.setMinMaxDateRange(asObservable(minMaxDateRange)) as Subscription;\n }\n\n if (exclusions != null) {\n this._exclusionsSub.subscription = this.dbxCalendarScheduleSelectionStore.setExclusions(asObservable(exclusions)) as Subscription;\n }\n\n if (outputTimezone != null) {\n this.dbxCalendarScheduleSelectionStore.setOutputTimezone(asObservable(this.outputTimezone));\n }\n\n if (this.initialSelectionState !== undefined) {\n this.dbxCalendarScheduleSelectionStore.setInitialSelectionState(this.initialSelectionState);\n }\n\n if (this.computeSelectionResultRelativeToFilter != null) {\n this.dbxCalendarScheduleSelectionStore.setComputeSelectionResultRelativeToFilter(this.computeSelectionResultRelativeToFilter);\n }\n\n if (this.cellContentFactory != null) {\n this.dbxCalendarScheduleSelectionStore.setCellContentFactory(this.cellContentFactory);\n }\n }\n\n override ngOnDestroy(): void {\n super.ngOnDestroy();\n this._syncSub.destroy();\n this._valueSub.destroy();\n this._filterSub.destroy();\n this._timezoneSub.destroy();\n this._minMaxDateRangeSub.destroy();\n this._exclusionsSub.destroy();\n this._formControlObs.complete();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { DbxFormCalendarDateScheduleRangeFieldComponent } from './calendar.schedule.field.component';\nimport { FormlyModule } from '@ngx-formly/core';\n\nconst importsAndExports = [DbxFormCalendarDateScheduleRangeFieldComponent];\n\n@NgModule({\n imports: [\n ...importsAndExports,\n FormlyModule.forChild({\n types: [{ name: 'date-schedule-range', component: DbxFormCalendarDateScheduleRangeFieldComponent }]\n })\n ],\n exports: importsAndExports\n})\nexport class DbxFormDateScheduleRangeFieldModule {}\n","export * from './schedule';\n// export * from './selection';\n","import { NgModule } from '@angular/core';\nimport { DbxScheduleSelectionCalendarComponent } from './calendar.schedule.selection.component';\nimport { DbxScheduleSelectionCalendarDatePopoverButtonComponent } from './calendar.schedule.selection.popover.button.component';\nimport { DbxScheduleSelectionCalendarDateDaysComponent } from './calendar.schedule.selection.days.component';\nimport { DbxScheduleSelectionCalendarDatePopoverComponent } from './calendar.schedule.selection.popover.component';\nimport { DbxScheduleSelectionCalendarDatePopoverContentComponent } from './calendar.schedule.selection.popover.content.component';\nimport { DbxScheduleSelectionCalendarDateRangeComponent } from './calendar.schedule.selection.range.component';\nimport { DbxScheduleSelectionCalendarDateDaysFormComponent } from './calendar.schedule.selection.days.form.component';\nimport { DbxScheduleSelectionCalendarCellComponent } from './calendar.schedule.selection.cell.component';\nimport { DbxCalendarScheduleSelectionStoreInjectionBlockDirective } from './calendar.schedule.selection.store.provide';\nimport { DbxScheduleSelectionCalendarDateDialogComponent } from './calendar.schedule.selection.dialog.component';\nimport { DbxScheduleSelectionCalendarDateDialogButtonComponent } from './calendar.schedule.selection.dialog.button.component';\nimport { DbxScheduleSelectionCalendarSelectionToggleButtonComponent } from './calendar.schedule.selection.toggle.button.component';\nimport { DbxFormFormlyWrapperModule } from '@dereekb/dbx-form';\n\nconst importsAndExports = [\n DbxScheduleSelectionCalendarComponent,\n DbxScheduleSelectionCalendarDateDaysComponent,\n DbxScheduleSelectionCalendarDateDaysFormComponent,\n DbxScheduleSelectionCalendarDateRangeComponent,\n DbxScheduleSelectionCalendarDatePopoverButtonComponent,\n DbxScheduleSelectionCalendarCellComponent,\n DbxScheduleSelectionCalendarDatePopoverComponent,\n DbxScheduleSelectionCalendarDatePopoverContentComponent,\n DbxCalendarScheduleSelectionStoreInjectionBlockDirective,\n DbxScheduleSelectionCalendarDateDialogComponent,\n DbxScheduleSelectionCalendarDateDialogButtonComponent,\n DbxScheduleSelectionCalendarSelectionToggleButtonComponent,\n //\n DbxFormFormlyWrapperModule\n];\n\n@NgModule({\n imports: importsAndExports,\n exports: importsAndExports\n})\nexport class DbxFormCalendarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","importsAndExports"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA;;;;;AAKG;AACG,SAAU,sBAAsB,CAAC,MAAA,GAAuC,EAAE,EAAA;AAC9E,IAAA,MAAM,EAAE,GAAG,GAAG,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,EAAE,qBAAqB,EAAE,sCAAsC,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,GAAG,MAAM;AAErR,IAAA,MAAM,WAAW,GAAsB;AACrC,QAAA,GAAG,WAAW,CAAC;YACb,GAAG;AACH,YAAA,IAAI,EAAE,qBAAqB;YAC3B,GAAG,4BAA4B,CAAC,MAAM,EAAE;AACtC,gBAAA,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,UAAU;gBACjC,cAAc;gBACd,UAAU;gBACV,aAAa;gBACb,cAAc;gBACd,mBAAmB;gBACnB,eAAe;gBACf,MAAM;gBACN,UAAU;gBACV,mBAAmB;gBACnB,sCAAsC;gBACtC,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