import { BooleanInput, NumberInput } from '@angular/cdk/coercion'; import { ChangeDetectorRef, ElementRef, EventEmitter } from '@angular/core'; import { ControlValueAccessor, NgControl } from '@angular/forms'; import { MatFormFieldAppearance } from '@angular/material/form-field'; import { Destroy } from '@deja-js/component/core'; import { Subject } from 'rxjs'; import * as i0 from "@angular/core"; export declare type TimePickerDisplayMode = 'fullTime' | 'fullTimeWithHoursDisabled' | 'fullTimeWithMinutesDisabled' | 'hoursOnly' | 'minutesOnly'; export declare type DateOrDuration = Date | Duration; declare type DataType = 'date' | 'duration'; declare type FieldType = 'hours' | 'minutes'; /** * Time-picker component for Angular */ export declare class DejaTimePickerComponent extends Destroy implements ControlValueAccessor { private changeDetectorRef; control: NgControl; hours: ElementRef; minutes: ElementRef; readonly timeChange: EventEmitter; /** Display mode for the time-picker */ mode: TimePickerDisplayMode; /** Data type to manage (Date or Duration) */ dataType: DataType; /** * Force the hour or minute to be null (only if the other field is disabled) * * For instance, if set to true and the hours are disabled, the minutes input value will be null * This is useful to force the user to provide a value */ forceNullValue: boolean; appearance: MatFormFieldAppearance; set autoFocus(value: BooleanInput); defaultPlaceholderHours: string; defaultPlaceholderMinutes: string; set time(value: DateOrDuration); get time(): DateOrDuration; /** Step of the arrows */ set step(value: NumberInput); /** To get the step of the minutes arrows */ get step(): NumberInput; /** Disabled property setter. Can be string or empty so you can use it like : */ set disabled(value: BooleanInput); /** To get disabled attribute. */ get disabled(): BooleanInput; onHoursChange$: Subject; onMinutesChange$: Subject; _step: number; private _disabled; private _value; private _autoFocus; constructor(changeDetectorRef: ChangeDetectorRef, control: NgControl); onKeyDown($event: KeyboardEvent, mode: 'hours' | 'minutes'): void; get hoursValue(): number; get minutesValue(): number; incrementValue(fieldType: FieldType): void; decrementValue(fieldType: FieldType): void; onClick(mode: 'hours' | 'minutes'): void; /** set accessor including call the onchange callback */ set value(v: DateOrDuration); /** get accessor */ get value(): DateOrDuration; /** From ControlValueAccessor interface */ writeValue(value: DateOrDuration): void; /** From ControlValueAccessor interface */ registerOnChange(fn: (_a: unknown) => void): void; /** From ControlValueAccessor interface */ registerOnTouched(fn: () => void): void; setDisabledState(isDisabled: boolean): void; protected onChangeCallback: (_a: unknown) => void; protected onTouchedCallback: () => void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } export {};