import * as _angular_core from '@angular/core'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * Selection mode for ``: * * - `single` — one date at a time, bound via `[(date)]` * - `range` — start + end dates, bound via `[(range)]` */ type WrCalendarMode = 'single' | 'range'; /** * @license * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://github.com/thekhegay/ngwr/blob/main/LICENSE */ /** * `[start, end]` tuple used by `` in `range` mode. Either side * may be `null` while the user is mid-selection (start picked, end pending). */ type WrCalendarRange = readonly [Date | null, Date | null]; /** * Month-view calendar. Supports single-date selection (`mode="single"`) or * date-range selection (`mode="range"`). Reusable on its own; consumed by * `` inside an overlay. * * Uses {@link WrDateAdapter} for all date math and formatting — register * one via {@link provideWrDateAdapter} at bootstrap. * * @example * ```html * * * * ``` * * @see https://ngwr.dev/components/calendar */ declare class WrCalendar { /** Selection mode. @default 'single' */ readonly mode: _angular_core.InputSignal; /** Two-way bindable single value (used when `mode === 'single'`). */ readonly date: _angular_core.ModelSignal; /** Two-way bindable `[start, end]` (used when `mode === 'range'`). */ readonly range: _angular_core.ModelSignal; /** Min selectable date (inclusive). */ readonly min: _angular_core.InputSignal; /** Max selectable date (inclusive). */ readonly max: _angular_core.InputSignal; /** Predicate — return `false` to disable specific dates (e.g. weekends only). */ readonly dateFilter: _angular_core.InputSignal<((date: Date) => boolean) | null>; /** Disable interaction entirely. @default false */ readonly disabled: _angular_core.InputSignalWithTransform; private readonly adapter; private readonly host; /** Currently displayed month (any date inside it). */ protected readonly viewDate: _angular_core.WritableSignal; /** Date currently focused by keyboard (single roving tabindex). */ protected readonly focusedDate: _angular_core.WritableSignal; /** Hovered date during range-mode end-pick — drives the preview highlight. */ protected readonly hoverDate: _angular_core.WritableSignal; /** Which sub-view is currently shown. Cycles `day → month → year` on header click. */ protected readonly viewMode: _angular_core.WritableSignal<"day" | "month" | "year">; protected readonly today: _angular_core.Signal; protected readonly weekdayNames: _angular_core.Signal; protected readonly monthsView: _angular_core.Signal; /** 12-year window centered on the floor-aligned decade containing `viewDate`. */ protected readonly yearsView: _angular_core.Signal; protected readonly headerLabel: _angular_core.Signal; /** 6×7 day grid covering the current month plus spillover. */ protected readonly weeks: _angular_core.Signal; protected readonly classes: _angular_core.Signal; constructor(); /** Header `‹` button — steps by month / year / decade based on the active view. */ protected prev(): void; /** Header `›` button — steps by month / year / decade based on the active view. */ protected next(): void; /** Header label click — zooms out (`day → month → year`). No-op at year view. */ protected onLabelClick(): void; protected onMonthSelect(monthIdx: number): void; protected onYearSelect(year: number): void; private stepViewDate; protected isToday(date: Date): boolean; protected isOutOfMonth(date: Date): boolean; protected isSelected(date: Date): boolean; protected isInRange(date: Date): boolean; protected isInRangePreview(date: Date): boolean; protected isFocused(date: Date): boolean; protected isDisabled(date: Date): boolean; protected isMonthCurrent(monthIdx: number): boolean; protected isMonthSelected(monthIdx: number): boolean; protected isMonthDisabled(monthIdx: number): boolean; protected isYearCurrent(year: number): boolean; protected isYearSelected(year: number): boolean; protected isYearDisabled(year: number): boolean; protected onCellClick(date: Date): void; protected onCellEnter(date: Date): void; protected onCellLeave(): void; private applyRangeClick; protected onKeyDown(event: KeyboardEvent): void; private focusActiveCell; /** Used by the template's `track` expression. */ protected trackByTime(_: number, date: Date): number; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } export { WrCalendar }; export type { WrCalendarMode, WrCalendarRange };