UNPKG

@nuralyui/timepicker

Version:

NuralyUI TimePicker - A comprehensive time selection component with clock interface, multiple formats, and validation

72 lines 1.92 kB
/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { TimeValue } from '../timepicker.types.js'; import { TimePickerHost, TimeSelectionController } from '../interfaces/timepicker.interface.js'; /** * Controller for handling time selection logic */ export declare class TimePickerSelectionController implements TimeSelectionController { private host; private selectedTime; constructor(host: TimePickerHost); /** * Select a time value */ selectTime(time: TimeValue): void; /** * Get currently selected time */ getSelectedTime(): TimeValue | null; /** * Clear current selection */ clearSelection(): void; /** * Check if a time is currently selected */ isTimeSelected(time: TimeValue): boolean; /** * Set time without triggering events (for internal use) */ setTimeInternal(time: TimeValue | null): void; /** * Update selected time with partial values */ updateTime(updates: Partial<TimeValue>): void; /** * Increment time component */ incrementTime(component: 'hours' | 'minutes' | 'seconds', step?: number): void; /** * Decrement time component */ decrementTime(component: 'hours' | 'minutes' | 'seconds', step?: number): void; /** * Set time from formatted string */ setTimeFromString(timeString: string): boolean; /** * Get formatted time string */ getFormattedTime(): string; /** * Dispatch time change event */ private dispatchTimeChangeEvent; /** * Reset to initial/default time */ reset(): void; /** * Set time to current time */ setToCurrentTime(): void; /** * Round current time to nearest interval */ roundToInterval(intervalMinutes: number): void; } //# sourceMappingURL=selection.controller.d.ts.map