UNPKG

@wizco/fenixds-ngx

Version:

Componentes fenix design system para Angular.

118 lines 5.6 kB
import { ElementRef, EventEmitter, OnInit } from '@angular/core'; import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms'; import { WcoDateInput, WcoDatepickerMode, WcoDatepickerValue, WcoDatepickerValueFormat } from './datepicker.types'; import * as i0 from "@angular/core"; type CalendarView = 'day' | 'month' | 'year'; type DayCell = { date: Date; label: number; inMonth: boolean; disabled: boolean; isToday: boolean; isSelected: boolean; isRangeStart: boolean; isRangeEnd: boolean; isInRange: boolean; }; export declare class DatepickerComponent implements ControlValueAccessor, Validator, OnInit { private el; openedChange: EventEmitter<boolean>; mode: WcoDatepickerMode; valueFormat: WcoDatepickerValueFormat; inline: boolean; label: string; placeholder?: string; placeholderStart: string; placeholderEnd: string; labelStart: string; labelEnd: string; inputId: string; inputName?: string; required: boolean; readonly: boolean; showError: boolean; allowTyping: boolean; autoClose: boolean; showClear: boolean; highlightToday: boolean; disableFuture: boolean; disablePast: boolean; minDate?: WcoDateInput | null; maxDate?: WcoDateInput | null; disableWeekends: boolean; disableHolidays: boolean; holidays: WcoDateInput[]; dateFilter?: (date: Date) => boolean; locale: string; weekStartsOn: 0 | 1; displayFormat?: string; apiFormat?: string; isMobile: boolean; isOpen: boolean; view: CalendarView; private control; disabled: boolean; private selected; private rangeStart; private rangeEnd; activeMonth: Date; activeYearPageStart: number; inputValue: string; timeValue: string; private manualInputError; onTouched: () => void; private propagateChange; constructor(el: ElementRef); ngOnInit(): void; writeValue(obj: WcoDatepickerValue): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; setDisabledState(isDisabled: boolean): void; validate(control: AbstractControl): ValidationErrors | null; get hasError(): boolean; get canInteract(): boolean; get resolvedPlaceholder(): string; open(): void; close(): void; toggleOpen(): void; onInputChange(value: string): void; onInputBlur(): void; onTimeChange(value: string): void; selectDay(day: DayCell): void; selectMonth(monthIndex: number): void; selectYear(year: number): void; prev(): void; next(): void; switchView(): void; get headerLabel(): string; get weekdayLabels(): string[]; get days(): DayCell[]; isCurrentYear(year: number): boolean; isSelectedYear(year: number): boolean; isCurrentMonth(monthIndex: number): boolean; isSelectedMonth(monthIndex: number): boolean; get monthLabels(): { index: number; label: string; disabled: boolean; }[]; get years(): number[]; onDocumentClick(event: MouseEvent): void; onResize(): void; private getFixedContainingBlock; private emitValue; private buildOutgoingValue; private resolvedApiFormat; private resolvedDisplayFormat; private syncInputText; private parseUserText; private parseRangeText; private applySingleSelection; private coerceSingle; private coerceRange; private buildIsDisabled; static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent, "wco-datepicker", never, { "mode": { "alias": "mode"; "required": false; }; "valueFormat": { "alias": "valueFormat"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "placeholderStart": { "alias": "placeholderStart"; "required": false; }; "placeholderEnd": { "alias": "placeholderEnd"; "required": false; }; "labelStart": { "alias": "labelStart"; "required": false; }; "labelEnd": { "alias": "labelEnd"; "required": false; }; "inputId": { "alias": "inputId"; "required": false; }; "inputName": { "alias": "inputName"; "required": false; }; "required": { "alias": "required"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "showError": { "alias": "showError"; "required": false; }; "allowTyping": { "alias": "allowTyping"; "required": false; }; "autoClose": { "alias": "autoClose"; "required": false; }; "showClear": { "alias": "showClear"; "required": false; }; "highlightToday": { "alias": "highlightToday"; "required": false; }; "disableFuture": { "alias": "disableFuture"; "required": false; }; "disablePast": { "alias": "disablePast"; "required": false; }; "minDate": { "alias": "minDate"; "required": false; }; "maxDate": { "alias": "maxDate"; "required": false; }; "disableWeekends": { "alias": "disableWeekends"; "required": false; }; "disableHolidays": { "alias": "disableHolidays"; "required": false; }; "holidays": { "alias": "holidays"; "required": false; }; "dateFilter": { "alias": "dateFilter"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "weekStartsOn": { "alias": "weekStartsOn"; "required": false; }; "displayFormat": { "alias": "displayFormat"; "required": false; }; "apiFormat": { "alias": "apiFormat"; "required": false; }; }, { "openedChange": "openedChange"; }, never, never, true, never>; } export {}; //# sourceMappingURL=datepicker.component.d.ts.map