UNPKG

@clr/angular

Version:

Angular components for Clarity

61 lines (60 loc) 3.33 kB
import { AfterViewInit, ElementRef, EventEmitter, Injector, OnDestroy, OnInit, Renderer2, ViewContainerRef } from '@angular/core'; import { NgControl } from '@angular/forms'; import { FocusService } from '../common/providers/focus.service'; import { WrappedFormControl } from '../common/wrapped-control'; import { ClrDateContainer } from './date-container'; import { DateFormControlService } from './providers/date-form-control.service'; import { DateIOService } from './providers/date-io.service'; import { DateNavigationService } from './providers/date-navigation.service'; import { DatepickerEnabledService } from './providers/datepicker-enabled.service'; import { DatepickerFocusService } from './providers/datepicker-focus.service'; import * as i0 from "@angular/core"; export declare class ClrDateInput extends WrappedFormControl<ClrDateContainer> implements OnInit, AfterViewInit, OnDestroy { protected el: ElementRef; protected renderer: Renderer2; protected control: NgControl; private container; private dateIOService; private dateNavigationService; private datepickerEnabledService; private dateFormControlService; private platformId; private focusService; private datepickerFocusService; static ngAcceptInputType_date: Date | null | string; placeholder: string; dateChange: EventEmitter<Date>; protected index: number; private initialClrDateInputValue; private previousDateChange; constructor(viewContainerRef: ViewContainerRef, injector: Injector, el: ElementRef, renderer: Renderer2, control: NgControl, container: ClrDateContainer, dateIOService: DateIOService, dateNavigationService: DateNavigationService, datepickerEnabledService: DatepickerEnabledService, dateFormControlService: DateFormControlService, platformId: any, focusService: FocusService, datepickerFocusService: DatepickerFocusService); set date(date: Date | string); set min(dateString: string); set max(dateString: string); get disabled(): boolean | string; set disabled(value: boolean | string); get placeholderText(): string; get inputType(): string; ngOnInit(): void; ngAfterViewInit(): void; setFocusStates(): void; triggerValidation(): void; onValueChange(target: HTMLInputElement): void; private usingClarityDatepicker; private usingNativeDatepicker; private setFocus; private populateServicesFromContainerComponent; private processInitialInputs; private updateDate; private updateInput; private getValidDateValueFromDate; private emitDateOutput; private datepickerHasFormControl; private listenForControlValueChanges; private listenForUserSelectedDayChanges; private listenForTouchChanges; private listenForDirtyChanges; private listenForInputRefocus; static ɵfac: i0.ɵɵFactoryDeclaration<ClrDateInput, [null, null, null, null, { optional: true; self: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, { optional: true; }, null, { optional: true; }, null]>; static ɵdir: i0.ɵɵDirectiveDeclaration<ClrDateInput, "[clrDate]", never, { "placeholder": "placeholder"; "date": "clrDate"; "min": "min"; "max": "max"; "disabled": "disabled"; }, { "dateChange": "clrDateChange"; }, never, never, false, never>; }