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
7.6 KiB

{"version":3,"file":"calendar-body.d.ts","sources":["calendar-body.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;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 { ElementRef, EventEmitter, NgZone, OnChanges, SimpleChanges, OnDestroy } from '@angular/core';\n/** Extra CSS classes that can be associated with a calendar cell. */\nexport declare type MatCalendarCellCssClasses = string | string[] | Set<string> | {\n [key: string]: any;\n};\n/** Function that can generate the extra classes that should be added to a calendar cell. */\nexport declare type MatCalendarCellClassFunction<D> = (date: D, view: 'month' | 'year' | 'multi-year') => MatCalendarCellCssClasses;\n/**\n * An internal class that represents the data corresponding to a single calendar cell.\n * @docs-private\n */\nexport declare class MatCalendarCell<D = any> {\n value: number;\n displayValue: string;\n ariaLabel: string;\n enabled: boolean;\n cssClasses: MatCalendarCellCssClasses;\n compareValue: number;\n rawValue?: D | undefined;\n constructor(value: number, displayValue: string, ariaLabel: string, enabled: boolean, cssClasses?: MatCalendarCellCssClasses, compareValue?: number, rawValue?: D | undefined);\n}\n/** Event emitted when a date inside the calendar is triggered as a result of a user action. */\nexport interface MatCalendarUserEvent<D> {\n value: D;\n event: Event;\n}\n/**\n * An internal component used to display calendar data in a table.\n * @docs-private\n */\nexport declare class MatCalendarBody implements OnChanges, OnDestroy {\n private _elementRef;\n private _ngZone;\n /**\n * Used to skip the next focus event when rendering the preview range.\n * We need a flag like this, because some browsers fire focus events asynchronously.\n */\n private _skipNextFocus;\n /** The label for the table. (e.g. \"Jan 2017\"). */\n label: string;\n /** The cells to display in the table. */\n rows: MatCalendarCell[][];\n /** The value in the table that corresponds to today. */\n todayValue: number;\n /** Start value of the selected date range. */\n startValue: number;\n /** End value of the selected date range. */\n endValue: number;\n /** The minimum number of free cells needed to fit the label in the first row. */\n labelMinRequiredCells: number;\n /** The number of columns in the table. */\n numCols: number;\n /** The cell number of the active cell in the table. */\n activeCell: number;\n /** Whether a range is being selected. */\n isRange: boolean;\n /**\n * The aspect ratio (width / height) to use for the cells in the table. This aspect ratio will be\n * maintained even as the table resizes.\n */\n cellAspectRatio: number;\n /** Start of the comparison range. */\n comparisonStart: number | null;\n /** End of the comparison range. */\n comparisonEnd: number | null;\n /** Start of the preview range. */\n previewStart: number | null;\n /** End of the preview range. */\n previewEnd: number | null;\n /** Emits when a new value is selected. */\n readonly selectedValueChange: EventEmitter<MatCalendarUserEvent<number>>;\n /** Emits when the preview has changed as a result of a user action. */\n readonly previewChange: EventEmitter<MatCalendarUserEvent<MatCalendarCell<any> | null>>;\n /** The number of blank cells to put at the beginning for the first row. */\n _firstRowOffset: number;\n /** Padding for the individual date cells. */\n _cellPadding: string;\n /** Width of an individual cell. */\n _cellWidth: string;\n constructor(_elementRef: ElementRef<HTMLElement>, _ngZone: NgZone);\n /** Called when a cell is clicked. */\n _cellClicked(cell: MatCalendarCell, event: MouseEvent): void;\n /** Returns whether a cell should be marked as selected. */\n _isSelected(value: number): boolean;\n ngOnChanges(changes: SimpleChanges): void;\n ngOnDestroy(): void;\n /** Returns whether a cell is active. */\n _isActiveCell(rowIndex: number, colIndex: number): boolean;\n /** Focuses the active cell after the microtask queue is empty. */\n _focusActiveCell(movePreview?: boolean): void;\n /** Gets whether a value is the start of the main range. */\n _isRangeStart(value: number): boolean;\n /** Gets whether a value is the end of the main range. */\n _isRangeEnd(value: number): boolean;\n /** Gets whether a value is within the currently-selected range. */\n _isInRange(value: number): boolean;\n /** Gets whether a value is the start of the comparison range. */\n _isComparisonStart(value: number): boolean;\n /** Whether the cell is a start bridge cell between the main and comparison ranges. */\n _isComparisonBridgeStart(value: number, rowIndex: number, colIndex: number): boolean;\n /** Whether the cell is an end bridge cell between the main and comparison ranges. */\n _isComparisonBridgeEnd(value: number, rowIndex: number, colIndex: number): boolean;\n /** Gets whether a value is the end of the comparison range. */\n _isComparisonEnd(value: number): boolean;\n /** Gets whether a value is within the current comparison range. */\n _isInComparisonRange(value: number): boolean;\n /**\n * Gets whether a value is the same as the start and end of the comparison range.\n * For context, the functions that we use to determine whether something is the start/end of\n * a range don't allow for the start and end to be on the same day, because we'd have to use\n * much more specific CSS selectors to style them correctly in all scenarios. This is fine for\n * the regular range, because when it happens, the selected styles take over and still show where\n * the range would've been, however we don't have these selected styles for a comparison range.\n * This function is used to apply a class that serves the same purpose as the one for selected\n * dates, but it only applies in the context of a comparison range.\n */\n _isComparisonIdentical(value: number): boolean;\n /** Gets whether a value is the start of the preview range. */\n _isPreviewStart(value: number): boolean;\n /** Gets whether a value is the end of the preview range. */\n _isPreviewEnd(value: number): boolean;\n /** Gets whether a value is inside the preview range. */\n _isInPreview(value: number): boolean;\n /**\n * Event handler for when the user enters an element\n * inside the calendar body (e.g. by hovering in or focus).\n */\n private _enterHandler;\n /**\n * Event handler for when the user's pointer leaves an element\n * inside the calendar body (e.g. by hovering out or blurring).\n */\n private _leaveHandler;\n /** Finds the MatCalendarCell that corresponds to a DOM node. */\n private _getCellFromElement;\n}\n"]}