import { DynamicText, FieldMeta, ValidationMessages, BaseValueField, FieldDef, FormConfig } from '@ng-forge/dynamic-forms'; import * as _dereekb_util from '@dereekb/util'; import { FactoryWithRequiredInput, MaybeMap, Maybe, ArrayOrValue, TimezoneString, DayOfWeek, DecisionFunction, AllOrNoneSelection, IterableOrValue, ISO8601DayString, Building, EnabledDays } from '@dereekb/util'; import { ObservableOrValue, ObservableOrValueGetter, IsModifiedFunction, WorkUsingObservable } from '@dereekb/rxjs'; import * as _dereekb_date from '@dereekb/date'; import { DateCellIndex, DateCellScheduleDateRange, DateRange, DateCellRangeWithRange, DateCellScheduleDayCode, DateCellScheduleDateFilterConfig, DateOrDateRangeOrDateCellIndexOrDateCellRange, DateTimezoneUtcNormalInstance, DateCellTimingRelativeIndexFactory, DateCellDayOfWeekFactory, DateCellTimingRelativeIndexFactoryInput, DateCellDurationSpan, DateCell, FullDateCellScheduleRangeInputDateRange } from '@dereekb/date'; import * as rxjs from 'rxjs'; import { Observable, Subject } from 'rxjs'; import { ComponentStore } from '@ngrx/component-store'; import { CalendarMonthViewDay, CalendarMonthViewBeforeRenderEvent, CalendarEvent } from 'angular-calendar'; import * as _angular_core from '@angular/core'; import { InjectionToken, Injector, InputSignal, Signal, OnInit, ElementRef, Provider } from '@angular/core'; import * as _angular_material_dialog from '@angular/material/dialog'; import { MatDialog } from '@angular/material/dialog'; import { DbxDialogContentFooterConfig, DbxDialogContentConfig, AbstractDialogDirective, CompactContextStore, DbxPopoverService, AbstractPopoverDirective, DbxPopoverKey } from '@dereekb/dbx-web'; import { DbxInjectionComponentConfig, DbxButtonDisplay } from '@dereekb/dbx-core'; import { FieldTree } from '@angular/forms/signals'; import { AbstractSyncForgeFormDirective } from '@dereekb/dbx-form'; import { DbxCalendarStore, DbxCalendarEvent } from '@dereekb/dbx-web/calendar'; import { NgPopoverRef } from 'ng-overlay-container'; import { FormGroup, FormControl } from '@angular/forms'; import { MatFormFieldDefaultOptions } from '@angular/material/form-field'; import { ErrorStateMatcher } from '@angular/material/core'; import { MatDateRangePicker, DateFilterFn } from '@angular/material/datepicker'; import * as _dereekb_dbx_form_calendar from '@dereekb/dbx-form/calendar'; import { FieldTypeDefinition } from '@ng-forge/dynamic-forms/integration'; interface CalendarScheduleSelectionValue { /** * Schedule range. */ readonly dateScheduleRange: DateCellScheduleDateRange; /** * Min and max dates in the selection. */ readonly minMaxRange: DateRange; } declare enum CalendarScheduleSelectionDayState { NOT_APPLICABLE = 0, DISABLED = 1, NOT_SELECTED = 2, SELECTED = 3 } interface CalendarScheduleSelectionMetadata { readonly state: CalendarScheduleSelectionDayState; readonly i: DateCellIndex; } interface CalendarScheduleSelectionCellContent { readonly icon?: string; readonly text?: string; } type CalendarScheduleSelectionCellContentFactory = FactoryWithRequiredInput>; declare const defaultCalendarScheduleSelectionCellContentFactory: CalendarScheduleSelectionCellContentFactory; interface CalendarScheduleSelectionInputDateRange { /** * Input Start Date */ readonly inputStart: Date; /** * Input End Date */ readonly inputEnd: Date; } type PartialCalendarScheduleSelectionInputDateRange = Partial>; /** * DbxCalendarScheduleSelectionStore selection mode. * * When in single mode the toggle function is treated as a set that clears all values and only selects the toggle'd value. */ type DbxCalendarScheduleSelectionStoreSelectionMode = 'multiple' | 'single'; interface CalendarScheduleSelectionState extends PartialCalendarScheduleSelectionInputDateRange { /** * Selection mode for this calendar. Defaults to "multiple" */ readonly selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode; /** * Readonly state of the view. * * 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. */ readonly isViewReadonly?: Maybe; /** * Set of the days of week that are allowed by default. */ readonly defaultScheduleDays: Set; /** * Filters the days of the schedule to only allow selecting days in the schedule. * * The output will be relative to this filter, and in it's timezone unless computeSelectionResultRelativeToFilter is false. * * This is a copy of any set/configured input filter and will have a start date set from start or startsAt. */ readonly filter?: Maybe; /** * Additional exclusions that may not be defined within the filter. */ readonly inputExclusions?: Maybe>; /** * The computed exclusions given the input exclusions. */ readonly computedExclusions?: Maybe; /** * 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. */ readonly minMaxDateRange?: Maybe>; /** * Start date. Is updated as the inputStart is modified or filter is provided that provides the start date. * * Defaults to today and the current timezone. */ readonly start: DateCellScheduleDateRange['start']; /** * System Timezone. Does not change. */ readonly systemTimezone: TimezoneString; /** * Timezone to use when outputting the value. Only influences the output start date. */ readonly outputTimezone?: Maybe; /** * Current timezone normal with the current timezone. */ readonly outputTimezoneNormal?: Maybe; /** * DateCellTimingRelativeIndexFactory */ readonly indexFactory: DateCellTimingRelativeIndexFactory; /** * Array of manually selected dates within the picked range. This is NOT the set of all selected indexes in terms of output. * * Values that exist outside of the "input" range are considered toggled on, while those * that are selected within the range are considered toggled off. * * If dates are selected, and then a range is selected, then those dates within the range that fall * within the range are cleared from selection. * * These indexes are relative to the start date. */ readonly toggledIndexes: Set; /** * Days of the schedule that are allowed to be picked. If not defined, defaults to defaultScheduleDays. */ readonly scheduleDays?: Maybe>; /** * The current DateCellScheduleDayCode value. */ readonly effectiveScheduleDays: Set; /** * Set of the days of week that are allowed. Derived from the current schedule days value. */ readonly allowedDaysOfWeek: Set; /** * */ readonly indexDayOfWeek: DateCellDayOfWeekFactory; /** * Decision function that returns true if a value is enabled given the current filter. */ readonly isEnabledFilterDay: DecisionFunction; /** * Decision function that returns true if a value is enabled. * * This function does not take the current filter into account. */ readonly isEnabledDay: DecisionFunction; /** * CalendarScheduleSelectionCellContentFactory for the view. */ readonly cellContentFactory: CalendarScheduleSelectionCellContentFactory; /** * Current selection value. */ readonly currentSelectionValue?: Maybe; /** * Whether or not to use the filter as the start and end range instead of optimizing for the current index. * * Defaults to true. */ readonly computeSelectionResultRelativeToFilter?: Maybe; /** * The initial selection state when the calendar is reset. */ readonly initialSelectionState?: Maybe; } /** * Creates the default initial state for the calendar schedule selection store, * using the current system timezone and all days of the week enabled. * * @returns A fresh CalendarScheduleSelectionState with default values. */ declare function initialCalendarScheduleSelectionState(): CalendarScheduleSelectionState; /** * Computes the effective min and max date range by combining the filter and the explicit minMaxDateRange constraints. * * @param x - State containing filter and minMaxDateRange to compute from. * @returns A partial date range with the effective start and end boundaries. */ declare function calendarScheduleMinAndMaxDateRange(x: Pick): Partial; /** * Returns the effective minimum date by taking the latest start date between the filter and minMaxDateRange. * * @param x - State containing filter and minMaxDateRange. * @returns The latest start date, or undefined if none. */ declare function calendarScheduleMinDate(x: Pick): Maybe; /** * Returns the effective maximum date by taking the earliest end date between the filter and minMaxDateRange. * * @param x - State containing filter and minMaxDateRange. * @returns The earliest end date, or undefined if none. */ declare function calendarScheduleMaxDate(x: Pick): Maybe; /** * Returns whether the filter's start date is being used as the effective start for the selection result computation. * * @param x - State containing filter and computeSelectionResultRelativeToFilter. * @returns True if the filter start is being used for the selection result. */ declare function calendarScheduleStartBeingUsedFromFilter(x: Pick): boolean | _dereekb_util.MaybeNot; declare class DbxCalendarScheduleSelectionStore extends ComponentStore { constructor(); readonly toggleSelection: (observableOrValue?: void | Observable | undefined) => rxjs.Subscription; readonly selectionMode$: Observable; readonly filter$: Observable>; readonly minMaxDateRange$: Observable>>; readonly minDate$: Observable>; readonly maxDate$: Observable>; readonly hasConfiguredMinMaxRange$: Observable; readonly inputStart$: Observable>; readonly inputEnd$: Observable>; readonly currentInputRange$: Observable>; readonly inputRange$: Observable; readonly isEnabledFilterDayFunction$: Observable>; readonly isEnabledDayFunction$: Observable>; readonly currentDateRange$: Observable>; readonly computeSelectionResultRelativeToFilter$: Observable>; readonly startBeingUsedFromFilter$: Observable>; readonly dateRange$: Observable; readonly allowedDaysOfWeek$: Observable>; readonly isInAllowedDaysOfWeekFunction$: Observable & { readonly _readValue: (input: Date | DayOfWeek) => DayOfWeek; readonly _set: Set; }>; readonly scheduleDays$: Observable>; readonly outputTimezone$: Observable>; /** * The timezone of the output values. * * If an outputTimezone is not specified, this defaults to the system timezone. */ readonly effectiveOutputTimezone$: Observable; /** * An outputTimezoneNormal to use. * * If an outputTimezone is not specified, this is undefined. */ readonly effectiveOutputTimezoneNormal$: Observable>; readonly currentSelectionValue$: Observable>; readonly currentSelectionValueStart$: Observable>; readonly currentSelectionValueDateCellTimingDateFactory$: Observable<_dereekb_date.DateCellTimingDateFactory<{ startsAt: Date; timezone: string; }> | undefined>; readonly currentSelectionValueDateCellDurationSpanExpansion$: Observable[]>; /** * State-anchored coordinate contract: the emitted indexes are anchored at * `state.start` (== `filter.start` when a filter is set, otherwise `today` from * `initialCalendarScheduleSelectionState()`). Consumers can use them directly * with `state.indexFactory(date)`. * * This holds because `currentSelectionValue.dateScheduleRange.start` always * equals `state.start` for filter-relative outputs, so the expansion's `i` * values share the same anchor. If a future change re-introduces a non- * `state.start` output anchor, translate output indexes back via * `state.indexFactory(dateScheduleRange.start)` here. */ readonly selectionValueSelectedIndexes$: Observable>; readonly selectionValueSelectedDates$: Observable>; readonly selectionValue$: Observable; readonly currentSelectionValueWithTimezone$: Observable>; readonly selectionValueWithTimezone$: Observable; readonly selectionValueWithTimezoneDateCellDurationSpanExpansion$: Observable[]>; readonly nextToggleSelection$: Observable>; readonly currentDateCellScheduleRangeValue$: Observable>; readonly dateCellScheduleRangeValue$: Observable; readonly cellContentFactory$: Observable; readonly isCustomized$: Observable; readonly isViewReadonly$: Observable>; readonly setMinMaxDateRange: (() => void) | ((observableOrValue: Maybe> | Observable>>) => rxjs.Subscription); readonly setDefaultWeek: (() => void) | ((observableOrValue: Maybe> | Observable>>) => rxjs.Subscription); readonly setFilter: (() => void) | ((observableOrValue: Maybe | Observable>) => rxjs.Subscription); readonly setExclusions: (() => void) | ((observableOrValue: Maybe> | Observable>>) => rxjs.Subscription); readonly setComputeSelectionResultRelativeToFilter: (() => void) | ((observableOrValue: Maybe | Observable>) => rxjs.Subscription); readonly clearFilter: () => void; readonly setOutputTimezone: (() => void) | ((observableOrValue: Maybe | Observable>) => rxjs.Subscription); /** * Sets the "input" date range. This is the range that gets displayed on the date range picker. */ readonly setInputRange: (observableOrValue: CalendarScheduleSelectionInputDateRange | Observable) => rxjs.Subscription; readonly toggleSelectedDates: (observableOrValue: IterableOrValue | Observable>) => rxjs.Subscription; readonly addSelectedDates: (observableOrValue: IterableOrValue | Observable>) => rxjs.Subscription; readonly removeSelectedDates: (observableOrValue: IterableOrValue | Observable>) => rxjs.Subscription; readonly setSelectedDates: (observableOrValue: IterableOrValue | Observable>) => rxjs.Subscription; readonly selectAllDates: (observableOrValue: AllOrNoneSelection | Observable) => rxjs.Subscription; readonly setSelectedIndexes: (observableOrValue: IterableOrValue | Observable>) => rxjs.Subscription; readonly setInitialSelectionState: (() => void) | ((observableOrValue: Maybe | Observable>) => rxjs.Subscription); readonly setDefaultScheduleDays: (() => void) | ((observableOrValue: Maybe> | Observable>>) => rxjs.Subscription); readonly setScheduleDays: (() => void) | ((observableOrValue: Maybe> | Observable>>) => rxjs.Subscription); readonly setAllowAllScheduleDays: () => void; readonly setDateScheduleRangeValue: (() => void) | ((observableOrValue: Maybe | Observable>) => rxjs.Subscription); readonly setCellContentFactory: (observableOrValue: CalendarScheduleSelectionCellContentFactory | Observable) => rxjs.Subscription; /** * Sets the selection mode. */ readonly setSelectionMode: (observableOrValue: DbxCalendarScheduleSelectionStoreSelectionMode | Observable) => rxjs.Subscription; /** * Used by the parent view to propogate a readonly state. * * Should typically not be used by the user directly with the intention of the parent synchronizing to this state. */ readonly setViewReadonlyState: (observableOrValue: boolean | Observable) => rxjs.Subscription; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } /** * Updates the state with an initial selection (all or none) and applies it when no dates are currently toggled. * * @param state - The current selection state. * @param initialSelectionState - The initial selection mode ('all' or 'none') * @returns The updated selection state. */ declare function updateStateWithInitialSelectionState(state: CalendarScheduleSelectionState, initialSelectionState: Maybe): CalendarScheduleSelectionState; /** * Updates the computeSelectionResultRelativeToFilter flag and recalculates the state if the value changed. * * @param currentState - The current selection state. * @param computeSelectionResultRelativeToFilter - Whether to compute results relative to the filter. * @returns The updated selection state. */ declare function updateStateWithComputeSelectionResultRelativeToFilter(currentState: CalendarScheduleSelectionState, computeSelectionResultRelativeToFilter: Maybe): CalendarScheduleSelectionState; /** * Updates the state with date exclusions, converting input dates/ranges to cell indexes and reapplying the filter. * * @param state - The current selection state. * @param inputExclusions - Dates, date ranges, or cell indexes to exclude. * @returns The updated selection state with exclusions applied. */ declare function updateStateWithExclusions(state: CalendarScheduleSelectionState, inputExclusions: Maybe>): CalendarScheduleSelectionState; /** * Sets the min/max date range constraint on the state, normalizing start to startOfDay and end to endOfDay. * * @param state - The current selection state. * @param minMaxDateRange - The min/max boundary dates to enforce. * @returns The updated selection state with the boundary applied. */ declare function updateStateWithMinMaxDateRange(state: CalendarScheduleSelectionState, minMaxDateRange: Maybe>): CalendarScheduleSelectionState; /** * Applies a date cell schedule filter to the selection state, computing the enabled day function * from the filter, exclusions, and min/max date range constraints. * * @param currentState - The current selection state * @param inputFilter - The filter configuration to apply * @returns The updated selection state with the filter applied */ /** * Applies a date cell schedule filter to the selection state, computing the enabled day function * from the filter, exclusions, and min/max date range constraints. * * @param currentState - The current selection state. * @param inputFilter - The filter configuration to apply. * @returns The updated selection state with the filter applied. */ declare function updateStateWithFilter(currentState: CalendarScheduleSelectionState, inputFilter: Maybe): CalendarScheduleSelectionState; /** * Updates the output timezone and transforms the current selection value to reflect the new timezone. * * @param state - The current selection state. * @param timezone - The target timezone string. * @returns The updated selection state with timezone-adjusted values. */ declare function updateStateWithTimezoneValue(state: CalendarScheduleSelectionState, timezone: Maybe): CalendarScheduleSelectionState; /** * Updates the state from an external date cell schedule range value, converting timezone-aware inputs * to system time and synchronizing the internal selection indexes. * * @param state - The current selection state. * @param inputChange - The date cell schedule range to apply. * @returns The updated selection state. */ declare function updateStateWithDateCellScheduleRangeValue(state: CalendarScheduleSelectionState, inputChange: Maybe): CalendarScheduleSelectionState; /** * Updates the default schedule day codes (used when no explicit schedule days are set) and recalculates allowed days. * * @param state - The current selection state. * @param change - The new default schedule day codes. * @returns The updated selection state. */ declare function updateStateWithChangedDefaultScheduleDays(state: CalendarScheduleSelectionState, change: Maybe>): CalendarScheduleSelectionState; /** * Updates the explicit schedule day codes override and recalculates allowed days of the week. * * @param state - The current selection state. * @param change - The new schedule day codes, or null/undefined to clear the override. * @returns The updated selection state. */ declare function updateStateWithChangedScheduleDays(state: CalendarScheduleSelectionState, change: Maybe>): CalendarScheduleSelectionState; /** * Switches between single and multiple selection mode, trimming the selection to a single value when switching to single mode. * * @param state - The current selection state. * @param selectionMode - The new selection mode. * @returns The updated selection state. */ declare function updateStateWithSelectionMode(state: CalendarScheduleSelectionState, selectionMode: DbxCalendarScheduleSelectionStoreSelectionMode): CalendarScheduleSelectionState; /** * Finalizes a schedule days change by recalculating allowed days of the week and updating toggled indexes accordingly. * * @param previousState - The state before the schedule days change. * @param nextState - The state with updated schedule day codes. * @returns The finalized selection state with recalculated allowed days and toggled indexes. */ declare function finalizeUpdateStateWithChangedScheduleDays(previousState: CalendarScheduleSelectionState, nextState: CalendarScheduleSelectionState): CalendarScheduleSelectionState; interface CalendarScheduleSelectionStateDatesChange { reset?: true; toggle?: IterableOrValue; add?: IterableOrValue; remove?: IterableOrValue; set?: IterableOrValue; selectAll?: AllOrNoneSelection; /** * Inverts the set date changing behavior so that the set input is treated as items that should be retained instead of excluded. * * Ignored when set is not used. Ignored for selectAll. */ invertSetBehavior?: boolean; } /** * Applies date changes (toggle, add, remove, set, selectAll, or reset) to the calendar selection state, * updating toggled indexes and input start/end accordingly. * * @param state - The current selection state * @param change - The date changes to apply * @returns The updated selection state */ /** * Applies date changes (toggle, add, remove, set, selectAll, or reset) to the calendar selection state, * updating toggled indexes and input start/end accordingly. * * @param state - The current selection state. * @param change - The date changes to apply. * @returns The updated selection state. */ declare function updateStateWithChangedDates(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionStateDatesChange): CalendarScheduleSelectionState; /** * Clears all date selections from the state, retaining other configuration like schedule days and filter. * * @param state - The current selection state. * @returns The state with all selections cleared. */ declare function noSelectionCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): CalendarScheduleSelectionState; /** * Updates the selection state with a new start/end date range, retaining toggled indexes within the new range bounds. * * @param state - The current selection state. * @param change - The new input start and end dates. * @returns The updated selection state. */ declare function updateStateWithChangedRange(state: CalendarScheduleSelectionState, change: CalendarScheduleSelectionInputDateRange): CalendarScheduleSelectionState; /** * Finalizes a partially-built state by recomputing the isEnabledDay function and the current selection value. * * @param nextState - The partially-built selection state to finalize. * @returns The finalized selection state. */ declare function finalizeNewCalendarScheduleSelectionState(nextState: Building): CalendarScheduleSelectionState; /** * Builds a decision function that determines whether a given day index is enabled (selected) in the current state. * * @param state - The selection state to derive the enabled-day function from. * @returns Returns true if the given day is enabled/selected. */ declare function isEnabledDayInCalendarScheduleSelectionState(state: CalendarScheduleSelectionState): DecisionFunction; /** * Computes the output DateCellScheduleDateRange value from the current selection state, * applying timezone offsets and filter-relative computations as needed. * * @param state - The current selection state to compute from. * @returns The computed selection value, or null if nothing is selected. */ declare function computeScheduleSelectionValue(state: CalendarScheduleSelectionState): Maybe; /** * The selected date range and the corresponding cell range. */ interface CalendarScheduleSelectionRangeAndExclusion extends DateRange { /** * Corresponds to the start and end indexes in the date range. */ dateCellRange: DateCellRangeWithRange; /** * All excluded indexes. */ excluded: DateCellIndex[]; } /** * Computes the selected date range with its corresponding cell range and all excluded day indexes. * Returns null if no days are selected. * * @param state - The current selection state. * @returns The range and exclusion data, or null if nothing is selected. */ declare function computeScheduleSelectionRangeAndExclusion(state: CalendarScheduleSelectionState): Maybe; /** * Computes the selected date range (start and end dates) from the current selection state. * * @param state - The current selection state. * @returns The selected date range, or undefined if nothing is selected. */ declare function computeCalendarScheduleSelectionRange(state: CalendarScheduleSelectionState): Maybe; /** * Computes the date cell index range (i, to) that spans all selected and toggled days in the current state. * * @param state - The current selection state. * @returns The cell range spanning all selected days, or undefined if nothing is selected. */ declare function computeCalendarScheduleSelectionDateCellRange(state: CalendarScheduleSelectionState): Maybe; /** * Token used to configure the default DbxScheduleSelectionCalendarDatePopupConfig for DbxScheduleSelectionCalendarDateDialogComponent. */ declare const DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN: InjectionToken; interface DbxScheduleSelectionCalendarDatePopupContentConfig { readonly closeConfig?: DbxDialogContentFooterConfig; readonly dialogConfig?: DbxDialogContentConfig; } interface DbxScheduleSelectionCalendarDatePopupConfig { readonly injector: Injector; readonly contentConfig?: Maybe; } declare class DbxScheduleSelectionCalendarDateDialogComponent extends AbstractDialogDirective { get contentConfig(): Maybe; get closeConfig(): DbxDialogContentFooterConfig | undefined; static openDialog(matDialog: MatDialog, config: DbxScheduleSelectionCalendarDatePopupConfig): _angular_material_dialog.MatDialogRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Custom props for the forge calendar date schedule range field. */ interface DbxForgeCalendarDateScheduleRangeFieldComponentProps extends Pick, Partial> { readonly label?: string; readonly description?: string; readonly appearance?: string; readonly allowTextInput?: boolean; readonly hideCustomize?: boolean; readonly allowCustomizeWithoutDateRange?: boolean; readonly outputTimezone?: ObservableOrValue>; readonly defaultScheduleDays?: ObservableOrValue>>; readonly minMaxDateRange?: ObservableOrValue>>; readonly filter?: ObservableOrValue>; readonly exclusions?: ObservableOrValue>>; readonly dialogContentConfig?: Maybe; readonly customDetailsConfig?: Maybe; } /** * Forge custom field component for calendar date schedule range selection. * * This is the forge equivalent of {@link DbxFormCalendarDateScheduleRangeFieldComponent}. * It bridges ng-forge Signal Forms with the {@link DbxCalendarScheduleSelectionStore}. * * Registered as ng-forge type 'dbx-forge-calendar-date-schedule-range'. */ declare class DbxForgeCalendarDateScheduleRangeFieldComponent { readonly compact: CompactContextStore | null; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; private readonly elementRef; readonly field: InputSignal>; readonly key: InputSignal; readonly label: InputSignal; readonly placeholder: InputSignal; readonly className: InputSignal; readonly tabIndex: InputSignal; readonly props: InputSignal; readonly meta: InputSignal; readonly validationMessages: InputSignal; readonly defaultValidationMessages: InputSignal; private readonly _syncSub; private readonly _valueSub; private readonly _timezoneSub; private readonly _minMaxDateRangeSub; private readonly _defaultWeekSub; private readonly _filterSub; private readonly _exclusionsSub; readonly fieldValueSignal: Signal; readonly isDisabledSignal: Signal; readonly isRequiredSignal: Signal; readonly labelTextSignal: Signal>; readonly descriptionSignal: Signal>; readonly isReadonlyOrDisabledSignal: Signal; readonly openPickerOnTextClickSignal: Signal; readonly showCustomizeSignal: Signal; readonly dialogContentConfigSignal: Signal>; readonly customDetailsConfigSignal: Signal>>; readonly allowCustomizeWithoutDateRangeSignal: Signal; readonly disableCustomizeSignal: Signal; private _setFieldValue; constructor(); static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Custom mapper for the forge calendar date schedule range field. * * Uses the standard buildValueFieldInputs to bridge the ng-forge field definition * to the component's input signals. * * @param fieldDef - Field definition configuration. * @param fieldDef.key - Form model key for the field. * @returns Signal containing a Record of input names to values for ngComponentOutlet. */ declare function calendarDateScheduleRangeFieldMapper(fieldDef: { key: string; }): Signal>; /** * The custom forge field type name for the calendar date schedule range field. */ declare const FORGE_CALENDAR_DATE_SCHEDULE_RANGE_FIELD_TYPE: "dbx-forge-calendar-date-schedule-range"; /** * Field definition type for a forge calendar date schedule range field. */ type DbxForgeCalendarDateScheduleRangeFieldDef = BaseValueField & { readonly type: typeof FORGE_CALENDAR_DATE_SCHEDULE_RANGE_FIELD_TYPE; }; /** * Configuration for a forge calendar date schedule range field. */ interface DbxForgeCalendarDateScheduleRangeFieldConfig extends Pick, Partial> { readonly key?: string; readonly label?: string; readonly description?: string; readonly required?: boolean; readonly readonly?: boolean; readonly appearance?: string; /** * Whether or not to allow inputting custom text into the picker. * * If false, when the input text is picked the date picker will open. * * Is false by default. */ readonly allowTextInput?: boolean; /** * Whether or not to hide the customize button. Defaults to false. */ readonly hideCustomize?: boolean; /** * Whether or not to allow customizing before picking a date range to customize. * * Defaults to false. */ readonly allowCustomizeWithoutDateRange?: boolean; /** * (Optional) Timezone to use for the output start date. * * If a filter is provided, this timezone overrides the filter's timezone output. */ readonly outputTimezone?: ObservableOrValue>; /** * (Optional) Default schedule days to allow. */ readonly defaultScheduleDays?: ObservableOrValue>>; /** * Optional min/max date range to filter on. Works in conjunction with the filter. */ readonly minMaxDateRange?: ObservableOrValue>>; /** * (Optional) Observable with a filter value to apply to the date range. */ readonly filter?: ObservableOrValue>; /** * (Optional) Observable with days and values to exclude from the date range. */ readonly exclusions?: ObservableOrValue>>; /** * Custom dialog content config for the popup */ readonly dialogContentConfig?: Maybe; /** * Custom details config for the date range */ readonly customDetailsConfig?: Maybe; } /** * Creates a forge field definition for a calendar date schedule range picker. * * This is the forge equivalent of {@link dateScheduleRangeField}. * * @param config - Optional schedule range field configuration overrides. * @returns A validated forge field definition for date schedule range selection. */ declare function dbxForgeDateScheduleRangeField(config?: DbxForgeCalendarDateScheduleRangeFieldConfig): DbxForgeCalendarDateScheduleRangeFieldDef; /** * Creates forge form fields for selecting which days of the week are enabled in a schedule selection calendar * as a vertical list of toggle fields with styled boxes. * * This is the forge equivalent of {@link dbxScheduleSelectionCalendarDateDaysFormFields}. * * @returns A FormConfig with toggle fields for each day of the week. */ declare function dbxScheduleSelectionCalendarDateDaysForgeFormFields(): FormConfig; /** * Creates an array of forge toggle field definitions, one for each day of the week, keyed by lowercase day name. * * @returns The forge toggle field definitions for each day of the week. */ declare function dbxScheduleSelectionCalendarDateDaysForgeFormDayFields(): FieldDef[]; type DbxScheduleSelectionCalendarDateDaysForgeFormValue = EnabledDays; declare class DbxScheduleSelectionCalendarDateDaysForgeFormComponent extends AbstractSyncForgeFormDirective { readonly formConfig: FormConfig; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class DbxScheduleSelectionCalendarCellComponent { readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly day: _angular_core.InputSignal>; readonly day$: rxjs.Observable>; readonly cellContent$: rxjs.Observable; readonly contentSignal: Signal; readonly iconSignal: Signal; readonly textSignal: Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } interface DbxScheduleSelectionCalendarComponentConfig { /** * Whether or not the selection calendar is readonly. Defaults to 'false'. */ readonly readonly?: Maybe>>; /** * Whether or not to show the configured buttons when readonly is true. Defaults to false. */ readonly showButtonsOnReadonly?: boolean; /** * Whether or not to show the clear selection button. Defaults to `true`. */ readonly showClearSelectionButton?: boolean; /** * Configuration for displaying a custom selection button. When null/undefined/true is passed, will show the default DbxScheduleSelectionCalendarDatePopoverButtonComponent. */ readonly buttonInjectionConfig?: Maybe | boolean>>>; /** * Customize day function. When a new function is piped through the calendar is refreshed. */ readonly customizeDay?: Maybe>>; /** * Optional full control over the beforeMonthViewRender */ readonly beforeMonthViewRenderFunctionFactory?: Maybe>; } type DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction = (viewDay: CalendarMonthViewDay, state: CalendarScheduleSelectionState) => void; type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction = (renderEvent: CalendarMonthViewBeforeRenderEvent) => void; type DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory = (state: Observable) => DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction; /** * Creates a factory that produces a beforeMonthViewRender handler for the schedule selection calendar. * The handler applies CSS classes and metadata to each day cell based on the current selection state. * * @param inputModifyFn - Optional function to further customize each day cell after default processing. * @returns A factory function that accepts a state observable and produces a render handler. */ declare function dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory(inputModifyFn?: Maybe): DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory; declare class DbxScheduleSelectionCalendarComponent implements OnInit { readonly calendarStore: DbxCalendarStore; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly clickEvent: _angular_core.OutputEmitterRef>; readonly config: _angular_core.InputSignal>; readonly readonly: _angular_core.InputSignal>; private readonly _centerRangeSub; readonly config$: Observable>; readonly readonly$: Observable; readonly showButtonsOnReadonly$: Observable; readonly showButtons$: Observable; readonly showClearSelectionButton$: Observable; readonly datePopoverButtonInjectionConfig$: Observable>>; readonly state$: Observable; readonly beforeMonthViewRender$: Observable; readonly refresh$: Subject; readonly events$: Observable[]>; readonly viewDate$: Observable; readonly beforeMonthViewRenderSignal: _angular_core.Signal; readonly readonlySignal: _angular_core.Signal; readonly showClearSelectionButtonSignal: _angular_core.Signal; readonly datePopoverButtonInjectionConfigSignal: _angular_core.Signal>>; readonly eventsSignal: _angular_core.Signal[]>; readonly viewDateSignal: _angular_core.Signal; ngOnInit(): void; dayClicked({ date }: { date: Date; }): void; eventClicked(action: string, event: CalendarEvent): void; beforeMonthViewRender(renderEvent: CalendarMonthViewBeforeRenderEvent): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration, never>; static ɵcmp: _angular_core.ɵɵComponentDeclaration, "dbx-schedule-selection-calendar", never, { "config": { "alias": "config"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "clickEvent": "clickEvent"; }, never, never, true, never>; } declare class DbxScheduleSelectionCalendarDateDaysComponent { readonly dbxCalendarStore: DbxCalendarStore; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly template$: Observable; readonly isFormModified: IsModifiedFunction; readonly updateScheduleDays: WorkUsingObservable; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class DbxScheduleSelectionCalendarDateDialogButtonComponent { readonly injector: Injector; readonly matDialog: MatDialog; readonly buttonText: _angular_core.InputSignal; readonly disabled: _angular_core.InputSignal>; readonly contentConfig: _angular_core.InputSignal>; clickCustomize(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class DbxScheduleSelectionCalendarDatePopoverButtonComponent { readonly injector: Injector; readonly popoverService: DbxPopoverService; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly buttonPopoverOrigin: _angular_core.Signal>; readonly disabled$: rxjs.Observable<_dereekb_util.Maybe>; readonly buttonText$: rxjs.Observable; readonly disabledSignal: _angular_core.Signal<_dereekb_util.Maybe>; readonly buttonTextSignal: _angular_core.Signal; openPopover(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare const DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY = "calendarselection"; interface DbxScheduleSelectionCalendarDatePopoverConfig { readonly origin: ElementRef; readonly injector: Injector; } declare class DbxScheduleSelectionCalendarDatePopoverComponent extends AbstractPopoverDirective { static openPopover(popoverService: DbxPopoverService, { origin, injector }: DbxScheduleSelectionCalendarDatePopoverConfig, popoverKey?: DbxPopoverKey): NgPopoverRef; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class DbxScheduleSelectionCalendarDatePopoverContentComponent { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class DbxScheduleSelectionCalendarDateRangeComponent implements OnInit { readonly dbxCalendarStore: DbxCalendarStore; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly matFormFieldDefaultOptions: MatFormFieldDefaultOptions | null; readonly picker: _angular_core.Signal>; readonly required: _angular_core.InputSignal; readonly openPickerOnTextClick: _angular_core.InputSignal; readonly label: _angular_core.InputSignal>; readonly hint: _angular_core.InputSignal>; readonly disabled: _angular_core.InputSignal>; readonly showCustomize: _angular_core.InputSignal; readonly timezone$: Observable; protected readonly _disabledEffect: _angular_core.EffectRef; private readonly _pickerOpened; private readonly _syncSub; private readonly _valueSub; readonly range: FormGroup<{ start: FormControl>; end: FormControl>; }>; readonly errorStateMatcher: ErrorStateMatcher; readonly minDate$: Observable>; readonly maxDate$: Observable>; readonly timezoneReleventDate$: Observable; readonly isCustomized$: Observable; readonly currentErrorMessage$: Observable; readonly datePickerFilter$: Observable>; readonly timezoneSignal: _angular_core.Signal; readonly timezoneReleventDateSignal: _angular_core.Signal; readonly isCustomizedSignal: _angular_core.Signal; readonly showCustomLabelSignal: _angular_core.Signal; readonly currentErrorMessageSignal: _angular_core.Signal; readonly datePickerFilterSignal: _angular_core.Signal | (() => boolean)>; protected readonly _requiredUpdateValidatorsEffect: _angular_core.EffectRef; ngOnInit(): void; clickedDateRangeInput(): void; pickerOpened(): void; pickerClosed(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * Token used by provideCalendarScheduleSelectionStoreIfDoesNotExist() to prevent injecting a parent DbxCalendarScheduleSelectionStore into the child view. */ declare class DbxCalendarScheduleSelectionStoreProviderBlock { readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class DbxCalendarScheduleSelectionStoreInjectionBlockDirective { static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } /** * Creates a Provider that initializes a new DbxCalendarScheduleSelectionStore if a parent does not exist. * * If a DbxCalendarScheduleSelectionStoreInjectionBlock is available in the context, and references the same dbxCalendarScheduleSelectionStore that is attempting to be injected, a new DbxCalendarScheduleSelectionStore is created. * * @returns */ declare function provideCalendarScheduleSelectionStoreIfParentIsUnavailable(): Provider; /** * Toggle button for selecting and clearing the current selection. */ declare class DbxScheduleSelectionCalendarSelectionToggleButtonComponent { readonly disabled: _angular_core.InputSignal>; readonly dbxCalendarScheduleSelectionStore: DbxCalendarScheduleSelectionStore; readonly selectionModeSignal: _angular_core.Signal<_dereekb_dbx_form_calendar.DbxCalendarScheduleSelectionStoreSelectionMode>; readonly nextToggleSelectionSignal: _angular_core.Signal>; readonly disableButtonSignal: _angular_core.Signal; readonly buttonDisplaySignal: _angular_core.Signal; toggleSelection(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } /** * All custom dbx-form/calendar forge field type definitions. */ declare const DBX_FORGE_CALENDAR_FIELD_TYPES: FieldTypeDefinition[]; export { CalendarScheduleSelectionDayState, DBX_FORGE_CALENDAR_FIELD_TYPES, DEFAULT_DBX_SCHEDULE_SELECTION_CALENDAR_DATE_POPUP_CONTENT_CONFIG_TOKEN, DEFAULT_SCHEDULE_SELECTION_CALENDAR_DATE_POPOVER_KEY, DbxCalendarScheduleSelectionStore, DbxCalendarScheduleSelectionStoreInjectionBlockDirective, DbxCalendarScheduleSelectionStoreProviderBlock, DbxForgeCalendarDateScheduleRangeFieldComponent, DbxScheduleSelectionCalendarCellComponent, DbxScheduleSelectionCalendarComponent, DbxScheduleSelectionCalendarDateDaysComponent, DbxScheduleSelectionCalendarDateDaysForgeFormComponent, DbxScheduleSelectionCalendarDateDialogButtonComponent, DbxScheduleSelectionCalendarDateDialogComponent, DbxScheduleSelectionCalendarDatePopoverButtonComponent, DbxScheduleSelectionCalendarDatePopoverComponent, DbxScheduleSelectionCalendarDatePopoverContentComponent, DbxScheduleSelectionCalendarDateRangeComponent, DbxScheduleSelectionCalendarSelectionToggleButtonComponent, FORGE_CALENDAR_DATE_SCHEDULE_RANGE_FIELD_TYPE, calendarDateScheduleRangeFieldMapper, calendarScheduleMaxDate, calendarScheduleMinAndMaxDateRange, calendarScheduleMinDate, calendarScheduleStartBeingUsedFromFilter, computeCalendarScheduleSelectionDateCellRange, computeCalendarScheduleSelectionRange, computeScheduleSelectionRangeAndExclusion, computeScheduleSelectionValue, dbxForgeDateScheduleRangeField, dbxScheduleSelectionCalendarBeforeMonthViewRenderFactory, dbxScheduleSelectionCalendarDateDaysForgeFormDayFields, dbxScheduleSelectionCalendarDateDaysForgeFormFields, defaultCalendarScheduleSelectionCellContentFactory, finalizeNewCalendarScheduleSelectionState, finalizeUpdateStateWithChangedScheduleDays, initialCalendarScheduleSelectionState, isEnabledDayInCalendarScheduleSelectionState, noSelectionCalendarScheduleSelectionState, provideCalendarScheduleSelectionStoreIfParentIsUnavailable, updateStateWithChangedDates, updateStateWithChangedDefaultScheduleDays, updateStateWithChangedRange, updateStateWithChangedScheduleDays, updateStateWithComputeSelectionResultRelativeToFilter, updateStateWithDateCellScheduleRangeValue, updateStateWithExclusions, updateStateWithFilter, updateStateWithInitialSelectionState, updateStateWithMinMaxDateRange, updateStateWithSelectionMode, updateStateWithTimezoneValue }; export type { CalendarScheduleSelectionCellContent, CalendarScheduleSelectionCellContentFactory, CalendarScheduleSelectionInputDateRange, CalendarScheduleSelectionMetadata, CalendarScheduleSelectionRangeAndExclusion, CalendarScheduleSelectionState, CalendarScheduleSelectionStateDatesChange, CalendarScheduleSelectionValue, DbxCalendarScheduleSelectionStoreSelectionMode, DbxForgeCalendarDateScheduleRangeFieldComponentProps, DbxForgeCalendarDateScheduleRangeFieldConfig, DbxForgeCalendarDateScheduleRangeFieldDef, DbxScheduleSelectionCalendarBeforeMonthViewRenderFunction, DbxScheduleSelectionCalendarBeforeMonthViewRenderFunctionFactory, DbxScheduleSelectionCalendarBeforeMonthViewRenderModifyDayFunction, DbxScheduleSelectionCalendarComponentConfig, DbxScheduleSelectionCalendarDateDaysForgeFormValue, DbxScheduleSelectionCalendarDatePopoverConfig, DbxScheduleSelectionCalendarDatePopupConfig, DbxScheduleSelectionCalendarDatePopupContentConfig, PartialCalendarScheduleSelectionInputDateRange };