UNPKG

@3kles/kles-material-datepicker

Version:

<!--[![pipeline status](http://gitlab.3kles.local/angular/klesmaterialdatepicker/badges/master/pipeline.svg)](http://gitlab.3kles.local/angular/klesmaterialdatepicker/-/commits/master)-->

65 lines (64 loc) 3.45 kB
import { DateRange, ExtractDateTypeFromSelection, MatCalendar, MatCalendarUserEvent, MatDateRangeSelectionStrategy, MatDateSelectionModel } from '@angular/material/datepicker'; import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy, OnInit } from '@angular/core'; import { ThemePalette } from '@angular/material/core'; import { Subject } from 'rxjs'; import { TemplatePortal } from '@angular/cdk/portal'; import { KlesMatDateAdapter } from '../adapters/date-adapter'; import { KlesMatDatepickerIntl } from '../datepicker-intl/datepicker-intl'; import * as i0 from "@angular/core"; export declare class KlesMatDatepickerContent<S, D = ExtractDateTypeFromSelection<S>> implements OnInit, AfterViewInit, OnDestroy { private _changeDetectorRef; private _globalModel; private _dateAdapter; private _rangeSelectionStrategy; private _subscriptions; _model: MatDateSelectionModel<S, D>; color: ThemePalette; get colorClass(): string; calendarValue: D; timeValue: any; /** Reference to the internal calendar component. */ _calendar: MatCalendar<D>; /** Reference to the datepicker that created the overlay. */ datepicker: any; /** Start of the comparison range. */ comparisonStart: D | null; /** End of the comparison range. */ comparisonEnd: D | null; /** Whether the datepicker is above or below the input. */ _isAbove: boolean; /** Current state of the animation. */ _animationState: 'enter-dropdown' | 'enter-dialog' | 'void'; /** Emits when an animation has finished. */ readonly _animationDone: Subject<void>; /** Text for the close button. */ _cancelButtonText: string; _validateButtonText: string; /** Whether the close button currently has focus. */ _closeButtonFocused: boolean; /** Portal with projected action buttons. */ _actionsPortal: TemplatePortal | null; /** Id of the label for the `role="dialog"` element. */ _dialogLabelId: string | null; constructor(elementRef: ElementRef, _changeDetectorRef: ChangeDetectorRef, _globalModel: MatDateSelectionModel<S, D>, _dateAdapter: KlesMatDateAdapter<D>, _rangeSelectionStrategy: MatDateRangeSelectionStrategy<D>, intl: KlesMatDatepickerIntl); ngOnInit(): void; ngAfterViewInit(): void; ngOnDestroy(): void; _handleUserSelection(event: MatCalendarUserEvent<D | null>): void; _handleUserTimeSelection(value: any): void; close(): void; _startExitAnimation(): void; _getSelected(): D | DateRange<D> | null; /** Applies the current pending selection to the global model. */ _applyPendingSelection(): void; /** * Assigns a new portal containing the datepicker actions. * @param portal Portal with the actions to be assigned. * @param forceRerender Whether a re-render of the portal should be triggered. This isn't * necessary if the portal is assigned during initialization, but it may be required if it's * added at a later point. */ _assignActions(portal: TemplatePortal<any> | null, forceRerender: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration<KlesMatDatepickerContent<any, any>, [null, null, null, null, { optional: true; }, null]>; static ɵcmp: i0.ɵɵComponentDeclaration<KlesMatDatepickerContent<any, any>, "mat-datepicker-content", ["klesMatDatepickerContent"], { "color": { "alias": "color"; "required": false; }; }, {}, never, never, true, never>; }