UNPKG

@material-extra/timepicker

Version:
68 lines 3.29 kB
import { DecimalPipe } from '@angular/common'; import { ElementRef, EventEmitter, OnDestroy } from '@angular/core'; import { AbstractControl, ControlValueAccessor, ValidationErrors, Validator } from '@angular/forms'; import { ThemePalette } from '@angular/material/core'; import { MatFormField } from '@angular/material/form-field'; import { Duration } from './timepicker.model'; import { MateTimepickerComponent } from './timepicker/timepicker.component'; import * as i0 from "@angular/core"; export declare const MATE_TIMEPICKER_VALUE_ACCESSOR: any; export declare const MATE_TIMEPICKER_VALIDATORS: any; export declare class MateTimepickerInputEvent { target: MateTimepickerInputDirective; targetElement: HTMLElement; value: Duration; constructor(target: MateTimepickerInputDirective, targetElement: HTMLElement); } export declare class MateTimepickerInputDirective implements ControlValueAccessor, OnDestroy, Validator { private _decimalPipe; private _elementRef; private _formField; private _value; private _disabled; private _defaultValue; private _timepickerSubscription; private _validator; /** Whether the last value set on the input was valid. */ private _lastValueValid; _timepicker: MateTimepickerComponent; _disabledChange: EventEmitter<boolean>; _valueChange: EventEmitter<Duration>; maxLength: number; set mateTimepicker(value: MateTimepickerComponent); get value(): Duration | null; set value(value: Duration | null); get disabled(): boolean; set disabled(value: boolean); set defaultValue(value: Duration); get defaultValue(): Duration; readonly timeChange: EventEmitter<MateTimepickerInputEvent>; readonly timeInput: EventEmitter<MateTimepickerInputEvent>; private _onTouched; private _validatorOnChange; private _cvaOnChange; constructor(_decimalPipe: DecimalPipe, _elementRef: ElementRef<HTMLInputElement>, _formField: MatFormField); private _formatValidator; private _validateRegex; ngOnDestroy(): void; _onKeydown(event: KeyboardEvent): void; _emitChange(value: Duration | null): void; _onInput(value: string): void; _onChange(): void; _onBlur(): void; _getThemePalette(): ThemePalette; reformatValue(): void; sameTime(v1: Duration | null, v2: Duration | null): boolean; _convertValue(value: any): Duration | null; private _formatValue; getPopupConnectionElementRef(): ElementRef; getConnectedOverlayOrigin(): ElementRef; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; registerOnValidatorChange(fn: () => void): void; validate(control: AbstractControl): ValidationErrors | null; writeValue(obj: any): void; static ɵfac: i0.ɵɵFactoryDef<MateTimepickerInputDirective, [null, null, { optional: true; }]>; static ɵdir: i0.ɵɵDirectiveDefWithMeta<MateTimepickerInputDirective, "input[mateTimepicker]", ["mateDatepickerInput"], { "mateTimepicker": "mateTimepicker"; "value": "value"; "disabled": "disabled"; "defaultValue": "defaultValue"; }, { "timeChange": "timeChange"; "timeInput": "timeInput"; }, never>; } //# sourceMappingURL=timepicker-input.directive.d.ts.map