import { Calendar, CalendarDate, DateDuration, DateFormatter, DateValue } from '@internationalized/date'; import { CalendarView, CalendarViewImpl } from './calendar-view'; import { EventEmitter, OnDestroy, OnInit } from '@angular/core'; import { BooleanInput } from '@angular/cdk/coercion'; import { ControlValueAccessor } from '@angular/forms'; import * as i0 from "@angular/core"; export declare abstract class CalendarBase implements OnInit, OnDestroy, ControlValueAccessor { pageChange: EventEmitter<"next" | "previous">; blurred: EventEmitter; /** * The date that's currently focused in the calendar. * - It determines the currently visible month/year/etc. * - When calendar gets focused, the button corresponding to that date gets focused. */ get focusedDate(): CalendarDate; set focusedDate(value: DateValue | undefined); protected _focusedDate?: CalendarDate | undefined; size: 'sm' | 'md' | 'lg'; readonly: BooleanInput; disabled: BooleanInput; /** * If the calendar should always show a fixed number of rows regardless of * the current month's number of weeks. This helps preserve the calendar * height as the user scrolls through months. * @default false */ showFixedWeeks: BooleanInput; locale: string; abstract minValue?: DateValue | null; abstract maxValue?: DateValue | null; abstract autoFocus?: BooleanInput; /** * Callback that is called for each date of the calendar. If it returns true, then the date is * unavailable. */ isDateUnavailable?: (date: DateValue) => boolean; /** * Calendar's view (day, month, year). */ view: CalendarView; canBroadenView: () => boolean; get viewImpl(): CalendarViewImpl; startDate: CalendarDate; get endDate(): CalendarDate; set visibleDuration(value: DateDuration); get visibleDuration(): DateDuration; private _visibleDuration?; dateFormatterByLocale: Record; weekDayFormatterByLocale: Record; calendarsByName: Record; private get dateFormatter(); private get weekDayFormatter(); get calendar(): Calendar; private focusMonitor; private elementRef; shouldFocusGrid: boolean; constructor(); abstract isSelected(date: CalendarDate): boolean; /** * Called to select a date via UI. */ abstract selectDate(date: CalendarDate): void; ngOnInit(): void; ngOnDestroy(): void; getTimezone(): string; /** Sets the focused date. * @param date the date to set as focused date * @param focus whether the calendar should also get focused **/ setFocusedDate(date: DateValue, focus?: boolean): void; /** Moves focus to the previous page of dates, e.g. the previous month if one month is visible. */ previousPage(): void; /** Moves focus to the next page of dates, e.g. the next month if one month is visible. */ nextPage(): void; /** Returns whether the given date is disabled according to the `minValue, `maxValue`, and `isDisabled` props. */ isDateDisabled(date: CalendarDate): boolean; canNarrowView(): boolean; broadenView(): void; narrowView(): void; setView(view: CalendarView): void; /** Selects the currently focused date. */ selectCell(cellDate: CalendarDate): void; getWeekDays(): string[]; protected adjustStartDate(): void; setGridFocused(): void; private _valueAccessorOnTouched?; protected valueAccessorOnChange?: (value: any) => void; abstract writeValue(obj: any): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState?(isDisabled: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; }