UNPKG

@hxui/angular

Version:

An Angular library based on the [HXUI design system](https://hxui.io).

84 lines (83 loc) 3.18 kB
import { ChangeDetectorRef, OnChanges, SimpleChanges } from '@angular/core'; import { ControlValueAccessor } from '@angular/forms'; import { HxaTime } from './hxa-time'; import { HxaTimeAdapter } from './hxa-time-adapter'; import { TimepickerConfig } from './timepicker-config'; import { TimepickerI18n } from './timepicker-i18n'; import * as i0 from "@angular/core"; /** * A directive that helps with wth picking hours, minutes and seconds. */ export declare class Timepicker implements ControlValueAccessor, OnChanges { private readonly _config; private _ngbTimeAdapter; private _cd; i18n: TimepickerI18n; static ngAcceptInputType_size: string; model: HxaTime; private _hourStep; private _minuteStep; private _secondStep; /** * Whether to display 12H or 24H mode. */ meridian: boolean; /** * If `true`, the spinners above and below inputs are visible. */ spinners: boolean; /** * If `true`, it is possible to select seconds. */ seconds: boolean; /** * The number of hours to add/subtract when clicking hour spinners. */ set hourStep(step: number); get hourStep(): number; /** * The number of minutes to add/subtract when clicking minute spinners. */ set minuteStep(step: number); get minuteStep(): number; /** * The number of seconds to add/subtract when clicking second spinners. */ set secondStep(step: number); get secondStep(): number; /** * If `true`, the time-picker is readonly and can't be changed. */ readonlyInputs: boolean; /** * If `true`, the timepicker input is disabled. */ disabled: boolean; /** * The size of inputs and buttons. */ size: 'small' | 'medium' | 'large'; constructor(_config: TimepickerConfig, _ngbTimeAdapter: HxaTimeAdapter<any>, _cd: ChangeDetectorRef, i18n: TimepickerI18n); onChange: (_: any) => void; onTouched: () => void; writeValue(value: any): void; registerOnChange(fn: (value: any) => any): void; registerOnTouched(fn: () => any): void; setDisabledState(isDisabled: boolean): void; changeHour(step: number): void; changeMinute(step: number): void; changeSecond(step: number): void; updateHour(newVal: string): void; updateMinute(newVal: string): void; updateSecond(newVal: string): void; toggleMeridian(): void; formatInput(input: HTMLInputElement): void; formatHour(value?: number): string; formatMinSec(value?: number): string; get isSmallSize(): boolean; get isLargeSize(): boolean; ngOnChanges(changes: SimpleChanges): void; private propagateModelChange; static ɵfac: i0.ɵɵFactoryDeclaration<Timepicker, never>; static ɵcmp: i0.ɵɵComponentDeclaration<Timepicker, "hxa-timepicker", never, { "meridian": "meridian"; "spinners": "spinners"; "seconds": "seconds"; "hourStep": "hourStep"; "minuteStep": "minuteStep"; "secondStep": "secondStep"; "readonlyInputs": "readonlyInputs"; "disabled": "disabled"; "size": "size"; }, {}, never, never>; }