/** * @license * Copyright 2023 Nuraly, Laabidi Aymen * SPDX-License-Identifier: MIT */ import { BaseInputController, InputHost } from './base.controller.js'; /** * Event controller interface for input components */ export interface EventController { handleKeyDown(event: KeyboardEvent): void; handleValueChange(event: Event): void; handleFocus(event: Event): void; handleBlur(event: Event): void; handleIconKeydown(event: KeyboardEvent): void; handleCopy(): Promise; handleClear(): void; handleTogglePassword(): void; handleIncrement(): void; handleDecrement(): void; } /** * Enhanced input host interface with additional properties needed for events */ export interface InputEventHost extends InputHost { readonly?: boolean; maxLength?: number; withCopy?: boolean; allowClear?: boolean; inputType?: string; focused?: boolean; debounce?: number; isReadonlyKeyAllowed?(keyDownEvent: KeyboardEvent): boolean; isActivationKey?(keyDownEvent: KeyboardEvent): boolean; getCursorPosition?(): number | null; getSelectedText?(): string; increment?(): void; decrement?(): void; dispatchInputEvent(eventName: string, detail: any): void; dispatchFocusEvent(eventName: string, detail: any): void; dispatchActionEvent(eventName: string, detail: any): void; shadowRoot?: ShadowRoot | null; } /** * Event controller that manages all user interactions and event handling * for the input component. This includes keyboard events, focus/blur, * value changes, and action button interactions. */ export declare class InputEventController extends BaseInputController implements EventController { private debounceTimer; protected get eventHost(): InputEventHost; private get inputElement(); /** * Clear debounce timer on disconnect */ clearDebounceTimer(): void; /** * Handle keyboard interactions */ handleKeyDown: (event: KeyboardEvent) => void; /** * Handle input value changes */ handleValueChange: (event: Event) => void; /** * Handle focus events */ handleFocus: (event: Event) => void; /** * Handle blur events */ handleBlur: (event: Event) => void; /** * Handle icon button keyboard interactions */ handleIconKeydown: (event: KeyboardEvent) => void; /** * Handle copy action */ handleCopy: () => Promise; /** * Handle clear action */ handleClear: () => void; /** * Handle password visibility toggle */ handleTogglePassword: () => void; /** * Handle increment action for number inputs */ handleIncrement: () => void; /** * Handle decrement action for number inputs */ handleDecrement: () => void; /** * Helper methods */ private handleNumericKeyDown; private handleNumberIconAction; private dispatchEnterEvent; private validateNumericValue; private restoreCursorPosition; private setFocusState; private getCursorPosition; private getSelectedText; private isReadonlyKeyAllowed; private isActivationKey; } //# sourceMappingURL=event.controller.d.ts.map