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
14 KiB
1 lines
14 KiB
{"version":3,"file":"datepicker-base.d.ts","sources":["datepicker-base.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;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 { Directionality } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { Overlay, ScrollStrategy } from '@angular/cdk/overlay';\nimport { ComponentType, TemplatePortal } from '@angular/cdk/portal';\nimport { AfterViewInit, ElementRef, EventEmitter, InjectionToken, NgZone, OnDestroy, ViewContainerRef, ChangeDetectorRef, OnChanges, SimpleChanges, OnInit } from '@angular/core';\nimport { CanColor, DateAdapter, ThemePalette } from '@angular/material/core';\nimport { Subject, Observable } from 'rxjs';\nimport { MatCalendar, MatCalendarView } from './calendar';\nimport { MatCalendarUserEvent, MatCalendarCellClassFunction } from './calendar-body';\nimport { DateFilterFn } from './datepicker-input-base';\nimport { ExtractDateTypeFromSelection, MatDateSelectionModel, DateRange } from './date-selection-model';\nimport { MatDateRangeSelectionStrategy } from './date-range-selection-strategy';\nimport { MatDatepickerIntl } from './datepicker-intl';\n/** Injection token that determines the scroll handling while the calendar is open. */\nexport declare const MAT_DATEPICKER_SCROLL_STRATEGY: InjectionToken<() => ScrollStrategy>;\n/** @docs-private */\nexport declare function MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY(overlay: Overlay): () => ScrollStrategy;\n/** Possible positions for the datepicker dropdown along the X axis. */\nexport declare type DatepickerDropdownPositionX = 'start' | 'end';\n/** Possible positions for the datepicker dropdown along the Y axis. */\nexport declare type DatepickerDropdownPositionY = 'above' | 'below';\n/** @docs-private */\nexport declare const MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY_PROVIDER: {\n provide: InjectionToken<() => ScrollStrategy>;\n deps: (typeof Overlay)[];\n useFactory: typeof MAT_DATEPICKER_SCROLL_STRATEGY_FACTORY;\n};\n/** @docs-private */\ndeclare const _MatDatepickerContentBase: import(\"@angular/material/core/common-behaviors/constructor\").Constructor<CanColor> & import(\"@angular/material/core/common-behaviors/constructor\").AbstractConstructor<CanColor> & {\n new (_elementRef: ElementRef): {\n _elementRef: ElementRef;\n };\n};\n/**\n * Component used as the content for the datepicker overlay. We use this instead of using\n * MatCalendar directly as the content so we can control the initial focus. This also gives us a\n * place to put additional features of the overlay that are not part of the calendar itself in the\n * future. (e.g. confirmation buttons).\n * @docs-private\n */\nexport declare class MatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>> extends _MatDatepickerContentBase implements OnInit, AfterViewInit, OnDestroy, CanColor {\n private _changeDetectorRef;\n private _globalModel;\n private _dateAdapter;\n private _rangeSelectionStrategy;\n private _subscriptions;\n private _model;\n /** Reference to the internal calendar component. */\n _calendar: MatCalendar<D>;\n /** Reference to the datepicker that created the overlay. */\n datepicker: MatDatepickerBase<any, S, D>;\n /** Start of the comparison range. */\n comparisonStart: D | null;\n /** End of the comparison range. */\n comparisonEnd: D | null;\n /** Whether the datepicker is above or below the input. */\n _isAbove: boolean;\n /** Current state of the animation. */\n _animationState: 'enter-dropdown' | 'enter-dialog' | 'void';\n /** Emits when an animation has finished. */\n readonly _animationDone: Subject<void>;\n /** Text for the close button. */\n _closeButtonText: string;\n /** Whether the close button currently has focus. */\n _closeButtonFocused: boolean;\n /** Portal with projected action buttons. */\n _actionsPortal: TemplatePortal | null;\n constructor(elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _globalModel: MatDateSelectionModel<S, D>, _dateAdapter: DateAdapter<D>, _rangeSelectionStrategy: MatDateRangeSelectionStrategy<D>, intl: MatDatepickerIntl);\n ngOnInit(): void;\n ngAfterViewInit(): void;\n ngOnDestroy(): void;\n _handleUserSelection(event: MatCalendarUserEvent<D | null>): void;\n _startExitAnimation(): void;\n _getSelected(): D | DateRange<D> | null;\n /** Applies the current pending selection to the global model. */\n _applyPendingSelection(): void;\n}\n/** Form control that can be associated with a datepicker. */\nexport interface MatDatepickerControl<D> {\n getStartValue(): D | null;\n getThemePalette(): ThemePalette;\n min: D | null;\n max: D | null;\n disabled: boolean;\n dateFilter: DateFilterFn<D>;\n getConnectedOverlayOrigin(): ElementRef;\n getOverlayLabelId(): string | null;\n stateChanges: Observable<void>;\n}\n/** A datepicker that can be attached to a {@link MatDatepickerControl}. */\nexport interface MatDatepickerPanel<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> {\n /** Stream that emits whenever the date picker is closed. */\n closedStream: EventEmitter<void>;\n /** Color palette to use on the datepicker's calendar. */\n color: ThemePalette;\n /** The input element the datepicker is associated with. */\n datepickerInput: C;\n /** Whether the datepicker pop-up should be disabled. */\n disabled: boolean;\n /** The id for the datepicker's calendar. */\n id: string;\n /** Whether the datepicker is open. */\n opened: boolean;\n /** Stream that emits whenever the date picker is opened. */\n openedStream: EventEmitter<void>;\n /** Emits when the datepicker's state changes. */\n stateChanges: Subject<void>;\n /** Opens the datepicker. */\n open(): void;\n /** Register an input with the datepicker. */\n registerInput(input: C): MatDateSelectionModel<S, D>;\n}\n/** Base class for a datepicker. */\nexport declare abstract class MatDatepickerBase<C extends MatDatepickerControl<D>, S, D = ExtractDateTypeFromSelection<S>> implements MatDatepickerPanel<C, S, D>, OnDestroy, OnChanges {\n private _overlay;\n private _ngZone;\n private _viewContainerRef;\n private _dateAdapter;\n private _dir;\n private _model;\n private _scrollStrategy;\n private _inputStateChanges;\n /** An input indicating the type of the custom header component for the calendar, if set. */\n calendarHeaderComponent: ComponentType<any>;\n /** The date to open the calendar to initially. */\n get startAt(): D | null;\n set startAt(value: D | null);\n private _startAt;\n /** The view that the calendar should start in. */\n startView: 'month' | 'year' | 'multi-year';\n /** Color palette to use on the datepicker's calendar. */\n get color(): ThemePalette;\n set color(value: ThemePalette);\n _color: ThemePalette;\n /**\n * Whether the calendar UI is in touch mode. In touch mode the calendar opens in a dialog rather\n * than a dropdown and elements have more padding to allow for bigger touch targets.\n */\n get touchUi(): boolean;\n set touchUi(value: boolean);\n private _touchUi;\n /** Whether the datepicker pop-up should be disabled. */\n get disabled(): boolean;\n set disabled(value: boolean);\n private _disabled;\n /** Preferred position of the datepicker in the X axis. */\n xPosition: DatepickerDropdownPositionX;\n /** Preferred position of the datepicker in the Y axis. */\n yPosition: DatepickerDropdownPositionY;\n /**\n * Whether to restore focus to the previously-focused element when the calendar is closed.\n * Note that automatic focus restoration is an accessibility feature and it is recommended that\n * you provide your own equivalent, if you decide to turn it off.\n */\n get restoreFocus(): boolean;\n set restoreFocus(value: boolean);\n private _restoreFocus;\n /**\n * Emits selected year in multiyear view.\n * This doesn't imply a change on the selected date.\n */\n readonly yearSelected: EventEmitter<D>;\n /**\n * Emits selected month in year view.\n * This doesn't imply a change on the selected date.\n */\n readonly monthSelected: EventEmitter<D>;\n /**\n * Emits when the current view changes.\n */\n readonly viewChanged: EventEmitter<MatCalendarView>;\n /** Function that can be used to add custom CSS classes to dates. */\n dateClass: MatCalendarCellClassFunction<D>;\n /** Emits when the datepicker has been opened. */\n readonly openedStream: EventEmitter<void>;\n /** Emits when the datepicker has been closed. */\n readonly closedStream: EventEmitter<void>;\n /**\n * Classes to be passed to the date picker panel.\n * Supports string and string array values, similar to `ngClass`.\n */\n get panelClass(): string | string[];\n set panelClass(value: string | string[]);\n private _panelClass;\n /** Whether the calendar is open. */\n get opened(): boolean;\n set opened(value: boolean);\n private _opened;\n /** The id for the datepicker calendar. */\n id: string;\n /** The minimum selectable date. */\n _getMinDate(): D | null;\n /** The maximum selectable date. */\n _getMaxDate(): D | null;\n _getDateFilter(): DateFilterFn<D>;\n /** A reference to the overlay into which we've rendered the calendar. */\n private _overlayRef;\n /** Reference to the component instance rendered in the overlay. */\n private _componentRef;\n /** The element that was focused before the datepicker was opened. */\n private _focusedElementBeforeOpen;\n /** Unique class that will be added to the backdrop so that the test harnesses can look it up. */\n private _backdropHarnessClass;\n /** Currently-registered actions portal. */\n private _actionsPortal;\n /** The input element this datepicker is associated with. */\n datepickerInput: C;\n /** Emits when the datepicker's state changes. */\n readonly stateChanges: Subject<void>;\n constructor(\n /**\n * @deprecated `_dialog` parameter is no longer being used and it will be removed.\n * @breaking-change 13.0.0\n */\n _dialog: any, _overlay: Overlay, _ngZone: NgZone, _viewContainerRef: ViewContainerRef, scrollStrategy: any, _dateAdapter: DateAdapter<D>, _dir: Directionality, \n /**\n * @deprecated No longer being used. To be removed.\n * @breaking-change 13.0.0\n */\n _document: any, _model: MatDateSelectionModel<S, D>);\n ngOnChanges(changes: SimpleChanges): void;\n ngOnDestroy(): void;\n /** Selects the given date */\n select(date: D): void;\n /** Emits the selected year in multiyear view */\n _selectYear(normalizedYear: D): void;\n /** Emits selected month in year view */\n _selectMonth(normalizedMonth: D): void;\n /** Emits changed view */\n _viewChanged(view: MatCalendarView): void;\n /**\n * Register an input with this datepicker.\n * @param input The datepicker input to register with this datepicker.\n * @returns Selection model that the input should hook itself up to.\n */\n registerInput(input: C): MatDateSelectionModel<S, D>;\n /**\n * Registers a portal containing action buttons with the datepicker.\n * @param portal Portal to be registered.\n */\n registerActions(portal: TemplatePortal): void;\n /**\n * Removes a portal containing action buttons from the datepicker.\n * @param portal Portal to be removed.\n */\n removeActions(portal: TemplatePortal): void;\n /** Open the calendar. */\n open(): void;\n /** Close the calendar. */\n close(): void;\n /** Applies the current pending selection on the overlay to the model. */\n _applyPendingSelection(): void;\n /** Forwards relevant values from the datepicker to the datepicker content inside the overlay. */\n protected _forwardContentValues(instance: MatDatepickerContent<S, D>): void;\n /** Opens the overlay with the calendar. */\n private _openOverlay;\n /** Destroys the current overlay. */\n private _destroyOverlay;\n /** Gets a position strategy that will open the calendar as a dropdown. */\n private _getDialogStrategy;\n /** Gets a position strategy that will open the calendar as a dropdown. */\n private _getDropdownStrategy;\n /** Sets the positions of the datepicker in dropdown mode based on the current configuration. */\n private _setConnectedPositions;\n /** Gets an observable that will emit when the overlay is supposed to be closed. */\n private _getCloseStream;\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_opened: BooleanInput;\n static ngAcceptInputType_touchUi: BooleanInput;\n static ngAcceptInputType_restoreFocus: BooleanInput;\n}\nexport {};\n"]}
|