@ux-aspects/ux-aspects
Version:
Open source user interface framework for building modern, responsive, mobile big data applications
79 lines (78 loc) • 4.61 kB
TypeScript
import { EventEmitter } from '@angular/core';
import { ControlValueAccessor } from '@angular/forms';
import * as i0 from "@angular/core";
export declare const TIME_PICKER_VALUE_ACCESSOR: {
provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
useExisting: import("@angular/core").Type<any>;
multi: boolean;
};
export declare class TimePickerComponent implements ControlValueAccessor {
private readonly _changeDetector;
/** Whether the arrow keys can be used to increment or decrement the selected time component. */
arrowkeys: boolean;
/** Whether the mouse scroll wheel can be used to increment or decrement the selected time component. */
mousewheel: boolean;
/** Whether the control is disabled. */
disabled: boolean;
/** Whether the control is readonly. */
readOnly: boolean;
/** Whether to show the meridian (AM/PM) selector. If this is false, the 24-hour clock will be used. */
showMeridian: boolean;
/** Whether to show the hour selector. */
showHours: boolean;
/** Whether to show the minute selector. */
showMinutes: boolean;
/** Whether to show the second selector. */
showSeconds: boolean;
/** Whether to show increment and decrement buttons in the time picker. */
showSpinners: boolean;
/** The number of hours to increment or decrement by when using the spinner buttons, arrow keys, or mouse scroll wheel. */
hourStep: number;
/** The number of minutes to increment or decrement by when using the spinner buttons, arrow keys, or mouse scroll wheel. */
minuteStep: number;
/** The number of seconds to increment or decrement by when using the spinner buttons, arrow keys, or mouse scroll wheel. */
secondStep: number;
/** The minimum value that the component will allow. */
min: Date;
/** The maximum value that the component will allow. */
max: Date;
/** An array containing the labels to show in the meridian selector. */
meridians: string[];
/** The value to display. */
set value(value: Date);
get value(): Date;
get _meridian(): string;
get _valid(): boolean;
/** Emitted when the `value` changes. */
valueChange: EventEmitter<Date>;
/** Emitted when the validity of the control changes. */
isValid: EventEmitter<boolean>;
onTouchedCallback: () => void;
onChangeCallback: (_: Date) => void;
private _value;
private _isValid;
protected get isValidDate(): boolean;
writeValue(value: Date): void;
registerOnChange(fn: (_: Date) => void): void;
registerOnTouched(fn: () => void): void;
setDisabledState(isDisabled: boolean): void;
getMeridianTime(hour: number): number;
setHour(hour: number): void;
setMinute(minute: number): void;
setSeconds(seconds: number): void;
incrementHour(arrowkey?: boolean): void;
decrementHour(arrowkey?: boolean): void;
incrementMinute(arrowkey?: boolean): void;
decrementMinute(arrowkey?: boolean): void;
incrementSecond(arrowkey?: boolean): void;
decrementSecond(arrowkey?: boolean): void;
selectMeridian(meridian: string): void;
checkValidity(date: Date): boolean;
hourChange(value: string | number): void;
minuteChange(value: string | number): void;
secondChange(value: string | number): void;
/** Normalise a date's year/month/date components. */
private normalizeDate;
static ɵfac: i0.ɵɵFactoryDeclaration<TimePickerComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<TimePickerComponent, "ux-time-picker", never, { "arrowkeys": { "alias": "arrowkeys"; "required": false; }; "mousewheel": { "alias": "mousewheel"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "showMeridian": { "alias": "showMeridian"; "required": false; }; "showHours": { "alias": "showHours"; "required": false; }; "showMinutes": { "alias": "showMinutes"; "required": false; }; "showSeconds": { "alias": "showSeconds"; "required": false; }; "showSpinners": { "alias": "showSpinners"; "required": false; }; "hourStep": { "alias": "hourStep"; "required": false; }; "minuteStep": { "alias": "minuteStep"; "required": false; }; "secondStep": { "alias": "secondStep"; "required": false; }; "min": { "alias": "min"; "required": false; }; "max": { "alias": "max"; "required": false; }; "meridians": { "alias": "meridians"; "required": false; }; "value": { "alias": "value"; "required": false; }; }, { "valueChange": "valueChange"; "isValid": "isValid"; }, never, never, false, never>;
}