You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
4.8 KiB

{"version":3,"file":"multi-year-view.d.ts","sources":["multi-year-view.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\nimport { AfterContentInit, ChangeDetectorRef, EventEmitter, OnDestroy } from '@angular/core';\nimport { DateAdapter } from '@angular/material/core';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { MatCalendarBody, MatCalendarCell, MatCalendarUserEvent, MatCalendarCellClassFunction } from './calendar-body';\nimport { DateRange } from './date-selection-model';\nexport declare const yearsPerPage = 24;\nexport declare const yearsPerRow = 4;\n/**\n * An internal component used to display a year selector in the datepicker.\n * @docs-private\n */\nexport declare class MatMultiYearView<D> implements AfterContentInit, OnDestroy {\n private _changeDetectorRef;\n _dateAdapter: DateAdapter<D>;\n private _dir?;\n private _rerenderSubscription;\n /** Flag used to filter out space/enter keyup events that originated outside of the view. */\n private _selectionKeyPressed;\n /** The date to display in this multi-year view (everything other than the year is ignored). */\n get activeDate(): D;\n set activeDate(value: D);\n private _activeDate;\n /** The currently selected date. */\n get selected(): DateRange<D> | D | null;\n set selected(value: DateRange<D> | D | null);\n private _selected;\n /** The minimum selectable date. */\n get minDate(): D | null;\n set minDate(value: D | null);\n private _minDate;\n /** The maximum selectable date. */\n get maxDate(): D | null;\n set maxDate(value: D | null);\n private _maxDate;\n /** A function used to filter which dates are selectable. */\n dateFilter: (date: D) => boolean;\n /** Function that can be used to add custom CSS classes to date cells. */\n dateClass: MatCalendarCellClassFunction<D>;\n /** Emits when a new year is selected. */\n readonly selectedChange: EventEmitter<D>;\n /** Emits the selected year. This doesn't imply a change on the selected date */\n readonly yearSelected: EventEmitter<D>;\n /** Emits when any date is activated. */\n readonly activeDateChange: EventEmitter<D>;\n /** The body of calendar table */\n _matCalendarBody: MatCalendarBody;\n /** Grid of calendar cells representing the currently displayed years. */\n _years: MatCalendarCell[][];\n /** The year that today falls on. */\n _todayYear: number;\n /** The year of the selected date. Null if the selected date is null. */\n _selectedYear: number | null;\n constructor(_changeDetectorRef: ChangeDetectorRef, _dateAdapter: DateAdapter<D>, _dir?: Directionality | undefined);\n ngAfterContentInit(): void;\n ngOnDestroy(): void;\n /** Initializes this multi-year view. */\n _init(): void;\n /** Handles when a new year is selected. */\n _yearSelected(event: MatCalendarUserEvent<number>): void;\n /** Handles keydown events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeydown(event: KeyboardEvent): void;\n /** Handles keyup events on the calendar body when calendar is in multi-year view. */\n _handleCalendarBodyKeyup(event: KeyboardEvent): void;\n _getActiveCell(): number;\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell(): void;\n /** Creates an MatCalendarCell for the given year. */\n private _createCellForYear;\n /** Whether the given year is enabled. */\n private _shouldEnableYear;\n /** Determines whether the user has the RTL layout direction. */\n private _isRtl;\n /** Sets the currently-highlighted year based on a model value. */\n private _setSelectedYear;\n}\nexport declare function isSameMultiYearView<D>(dateAdapter: DateAdapter<D>, date1: D, date2: D, minDate: D | null, maxDate: D | null): boolean;\n/**\n * When the multi-year view is first opened, the active year will be in view.\n * So we compute how many years are between the active year and the *slot* where our\n * \"startingYear\" will render when paged into view.\n */\nexport declare function getActiveOffset<D>(dateAdapter: DateAdapter<D>, activeDate: D, minDate: D | null, maxDate: D | null): number;\n"]}