UNPKG

5.15 kBTypeScriptView Raw
1import { ChangeDetectorRef, EventEmitter, OnChanges, OnDestroy } from '@angular/core';
2import { ControlValueAccessor } from '@angular/forms';
3import { Subscription } from 'rxjs';
4import { ControlValueAccessorModel } from './models';
5import { TimepickerActions } from './reducer/timepicker.actions';
6import { TimepickerStore } from './reducer/timepicker.store';
7import { TimepickerConfig } from './timepicker.config';
8import { TimeChangeSource, TimepickerComponentState, TimepickerControls } from './timepicker.models';
9import * as ɵngcc0 from '@angular/core';
10export declare const TIMEPICKER_CONTROL_VALUE_ACCESSOR: ControlValueAccessorModel;
11export declare class TimepickerComponent implements ControlValueAccessor, TimepickerComponentState, TimepickerControls, OnChanges, OnDestroy {
12 private _cd;
13 private _store;
14 private _timepickerActions;
15 /** hours change step */
16 hourStep: number;
17 /** minutes change step */
18 minuteStep: number;
19 /** seconds change step */
20 secondsStep: number;
21 /** if true hours and minutes fields will be readonly */
22 readonlyInput: boolean;
23 /** if true hours and minutes fields will be disabled */
24 disabled: boolean;
25 /** if true scroll inside hours and minutes inputs will change time */
26 mousewheel: boolean;
27 /** if true the values of hours and minutes can be changed using the up/down arrow keys on the keyboard */
28 arrowkeys: boolean;
29 /** if true spinner arrows above and below the inputs will be shown */
30 showSpinners: boolean;
31 /** if true meridian button will be shown */
32 showMeridian: boolean;
33 /** show minutes in timepicker */
34 showMinutes: boolean;
35 /** show seconds in timepicker */
36 showSeconds: boolean;
37 /** meridian labels based on locale */
38 meridians: string[];
39 /** minimum time user can select */
40 min?: Date;
41 /** maximum time user can select */
42 max?: Date;
43 /** placeholder for hours field in timepicker */
44 hoursPlaceholder: string;
45 /** placeholder for minutes field in timepicker */
46 minutesPlaceholder: string;
47 /** placeholder for seconds field in timepicker */
48 secondsPlaceholder: string;
49 /** emits true if value is a valid date */
50 isValid: EventEmitter<boolean>;
51 hours: string;
52 minutes: string;
53 seconds: string;
54 meridian: string;
55 invalidHours: boolean;
56 invalidMinutes: boolean;
57 invalidSeconds: boolean;
58 labelHours: string;
59 labelMinutes: string;
60 labelSeconds: string;
61 canIncrementHours: boolean;
62 canIncrementMinutes: boolean;
63 canIncrementSeconds: boolean;
64 canDecrementHours: boolean;
65 canDecrementMinutes: boolean;
66 canDecrementSeconds: boolean;
67 canToggleMeridian: boolean;
68 onChange: Function;
69 onTouched: Function;
70 timepickerSub: Subscription;
71 constructor(_config: TimepickerConfig, _cd: ChangeDetectorRef, _store: TimepickerStore, _timepickerActions: TimepickerActions);
72 /** @deprecated - please use `isEditable` instead */
73 get isSpinnersVisible(): boolean;
74 get isEditable(): boolean;
75 resetValidation(): void;
76 isPM(): boolean;
77 prevDef($event: Event): void;
78 wheelSign($event: WheelEventInit): number;
79 ngOnChanges(): void;
80 changeHours(step: number, source?: TimeChangeSource): void;
81 changeMinutes(step: number, source?: TimeChangeSource): void;
82 changeSeconds(step: number, source?: TimeChangeSource): void;
83 updateHours(target?: Partial<EventTarget> | null): void;
84 updateMinutes(target: Partial<EventTarget> | null): void;
85 updateSeconds(target: Partial<EventTarget> | null): void;
86 isValidLimit(): boolean;
87 _updateTime(): void;
88 toggleMeridian(): void;
89 /**
90 * Write a new value to the element.
91 */
92 writeValue(obj?: string | Date): void;
93 /**
94 * Set the function to be called when the control receives a change event.
95 */
96 registerOnChange(fn: (_: any) => void): void;
97 /**
98 * Set the function to be called when the control receives a touch event.
99 */
100 registerOnTouched(fn: () => void): void;
101 /**
102 * This function is called when the control status changes to or from "disabled".
103 * Depending on the value, it will enable or disable the appropriate DOM element.
104 *
105 * @param isDisabled
106 */
107 setDisabledState(isDisabled: boolean): void;
108 ngOnDestroy(): void;
109 private _renderTime;
110 static ɵfac: ɵngcc0.ɵɵFactoryDef<TimepickerComponent, never>;
111 static ɵcmp: ɵngcc0.ɵɵComponentDefWithMeta<TimepickerComponent, "timepicker", never, { "hourStep": "hourStep"; "minuteStep": "minuteStep"; "secondsStep": "secondsStep"; "readonlyInput": "readonlyInput"; "disabled": "disabled"; "mousewheel": "mousewheel"; "arrowkeys": "arrowkeys"; "showSpinners": "showSpinners"; "showMeridian": "showMeridian"; "showMinutes": "showMinutes"; "showSeconds": "showSeconds"; "meridians": "meridians"; "hoursPlaceholder": "hoursPlaceholder"; "minutesPlaceholder": "minutesPlaceholder"; "secondsPlaceholder": "secondsPlaceholder"; "min": "min"; "max": "max"; }, { "isValid": "isValid"; }, never, never>;
112}
113
114//# sourceMappingURL=timepicker.component.d.ts.map
\No newline at end of file