import { AfterContentInit, ChangeDetectorRef, EventEmitter } from '@angular/core'; import { TypeRef } from '@sbb-esta/angular-core/common-behaviors'; import { SbbDateAdapter, SbbDateFormats } from '@sbb-esta/angular-core/datetime'; import { SbbCalendarBody, SbbCalendarCell } from '../calendar-body/calendar-body.component'; import { SbbDateRange } from '../date-range'; import type { SbbDatepicker } from '../datepicker/datepicker.component'; export declare class SbbMonthView implements AfterContentInit { _dateAdapter: SbbDateAdapter; locale: string; private _changeDetectorRef; private _dateFormats; /** The date to display in this month view (everything other than the month and year is ignored). */ get activeDate(): D; set activeDate(value: D); private _activeDate; /** The currently selected date. */ get selected(): D | null; set selected(value: D | null); private _selected; /** The minimum selectable date. */ get minDate(): D | null; set minDate(value: D | null); private _minDate; /** The maximum selectable date. */ get maxDate(): D | null; set maxDate(value: D | null); private _maxDate; /** A function used to filter which dates are selectable. */ dateFilter: (date: D) => boolean; /** Emits when a new date is selected. */ readonly selectedChange: EventEmitter; /** Emits when any date is selected. */ readonly userSelection: EventEmitter; /** Emits when any date is activated. */ readonly activeDateChange: EventEmitter; /** The body of calendar table */ sbbCalendarBody: SbbCalendarBody; /** The label for this month (e.g. "January 2017"). */ monthLabel: string; /** Grid of calendar cells representing the dates of the month. */ weeks: SbbCalendarCell[][]; /** The number of blank cells in the first row before the 1st of the month. */ firstWeekOffset: number; /** * The date of the month that the currently selected Date falls on. * Null if the currently selected Date is in another month. */ selectedDate: number | null; /** The date of the month that today falls on. Null if today is in another month. */ todayDate: number | null; /** The names of the weekdays. */ weekdays: { long: string; narrow: string; }[]; dateRange: SbbDateRange | null; constructor(_dateAdapter: SbbDateAdapter, locale: string, _changeDetectorRef: ChangeDetectorRef, _dateFormats: SbbDateFormats, datepicker: TypeRef>); ngAfterContentInit(): void; /** Handles when a new date is selected. */ dateSelected(date: number): void; /** Handles keydown events on the calendar body when calendar is in month view. */ handleCalendarBodyKeydown(event: KeyboardEvent): void; /** Initializes this month view. */ init(): void; /** Focuses the active cell after the microtask queue is empty. */ focusActiveCell(): void; /** Creates MatCalendarCells for the dates in this month. */ private _createWeekCells; private _shouldApplyRangeBackground; private _isRangeLimit; /** Date filter for the month */ private _shouldEnableDate; /** * Gets the date in this month that the given Date falls on. * Returns null if the given Date is in another month. */ private _getDateInCurrentMonth; /** Checks whether the 2 dates are non-null and fall within the same month of the same year. */ private _hasSameMonthAndYear; /** * @param obj The object to check. * @returns The given object if it is both a date instance and valid, otherwise null. */ private _getValidDateOrNull; }