gramli-angular-mydatepicker
Version:
Angular datepicker
84 lines (83 loc) • 4.04 kB
TypeScript
import { ElementRef, ViewContainerRef, Renderer2, ChangeDetectorRef, EventEmitter, SimpleChanges, OnChanges, OnDestroy } from "@angular/core";
import { AbstractControl, ControlValueAccessor, Validator } from "@angular/forms";
import { IMyOptions } from "./interfaces/my-options.interface";
import { IMyDateModel } from "./interfaces/my-date-model.interface";
import { IMyRangeDateSelection } from "./interfaces/my-range-date-selection.interface";
import { IMyCalendarViewChanged } from "./interfaces/my-calendar-view-changed.interface";
import { IMyInputFieldChanged } from "./interfaces/my-input-field-changed.interface";
import { IMyDefaultMonth } from "./interfaces/my-default-month.interface";
import { LocaleService } from "./services/angular-mydatepicker.locale.service";
import { UtilService } from "./services/angular-mydatepicker.util.service";
import { DefaultConfigService } from "./services/angular-mydatepicker.config.service";
import { HeaderAction } from "./enums/header-action.enum";
import { ActiveView } from "./enums/active-view.enum";
import * as i0 from "@angular/core";
export declare class AngularMyDatePickerDirective implements OnChanges, OnDestroy, ControlValueAccessor, Validator {
private localeService;
private utilService;
private vcRef;
private renderer;
private cdr;
private elem;
private config;
options: IMyOptions;
locale: string;
defaultMonth: IMyDefaultMonth;
dateChanged: EventEmitter<IMyDateModel>;
inputFieldChanged: EventEmitter<IMyInputFieldChanged>;
calendarViewChanged: EventEmitter<IMyCalendarViewChanged>;
calendarToggle: EventEmitter<number>;
rangeDateSelection: EventEmitter<IMyRangeDateSelection>;
viewActivated: EventEmitter<ActiveView>;
private cRef;
private hostText;
private preventClose;
private disabled;
private selectedValue;
private opts;
onChangeCb: (_: any) => void;
onTouchedCb: () => void;
constructor(localeService: LocaleService, utilService: UtilService, vcRef: ViewContainerRef, renderer: Renderer2, cdr: ChangeDetectorRef, elem: ElementRef, config: DefaultConfigService);
onKeyUp(event: any): void;
onBlur(): void;
private onClickWrapper;
private onClick;
ngOnChanges(changes: SimpleChanges): void;
ngOnDestroy(): void;
setLocaleOptions(): void;
parseOptions(opts: IMyOptions): void;
writeValue(value: any): void;
registerOnChange(fn: any): void;
registerOnTouched(fn: any): void;
setDisabledState(isDisabled: boolean): void;
validate(c: AbstractControl): {
[p: string]: any;
};
openCalendar(): void;
closeCalendar(): void;
toggleCalendar(): boolean | null;
clearDate(): void;
isDateValid(): boolean;
headerAction(headerAction: HeaderAction): void;
setHostValue(value: string): void;
private ignoreKeyPress;
private onAnimateWrapper;
private animationEnd;
private closeSelector;
private removeComponent;
private updateModel;
private getHostValue;
private focusToInput;
private emitDateChanged;
private setSelectedValue;
private emitInputFieldChanged;
private emitCalendarChanged;
private emitRangeDateSelection;
private emitViewActivated;
private emitCalendarToggle;
private appendSelector;
private getSelectorPosition;
private getSelectorDimension;
static ɵfac: i0.ɵɵFactoryDeclaration<AngularMyDatePickerDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<AngularMyDatePickerDirective, "[angular-mydatepicker]", ["angular-mydatepicker"], { "options": { "alias": "options"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "defaultMonth": { "alias": "defaultMonth"; "required": false; }; }, { "dateChanged": "dateChanged"; "inputFieldChanged": "inputFieldChanged"; "calendarViewChanged": "calendarViewChanged"; "calendarToggle": "calendarToggle"; "rangeDateSelection": "rangeDateSelection"; "viewActivated": "viewActivated"; }, never, never, false, never>;
}