import type { HotInstance } from '../../../core/types'; import EventManager from '../../../eventManager'; export interface BaseUIOptions { className?: string; value?: unknown; tagName?: string; children?: BaseUI[]; wrapIt?: boolean; tabIndex?: number; role?: string; menuContainer?: HTMLElement; [key: string]: unknown; } /** * @private */ export declare class BaseUI { /** * Returns the default configuration options applied to a new UI component instance. */ static get DEFAULTS(): BaseUIOptions; /** * Instance of Handsontable. * * @type {Core} */ hot: HotInstance | null; /** * Instance of EventManager. * * @type {EventManager} */ eventManager: EventManager | null; /** * List of element options. * * @type {object} */ options: BaseUIOptions; /** * Build root DOM element. * * @type {Element} * @private */ _element: HTMLElement | null; /** * Flag which determines build state of element. * * @type {string} */ buildState: string | undefined; /** * Initializes the UI component with the Handsontable instance and merged configuration options. */ constructor(hotInstance: HotInstance, options: Record); /** * Set the element value. * * @param {*} value Set the component value. */ setValue(value: unknown): void; /** * Get the element value. * * @returns {*} */ getValue(): unknown; /** * Get element as a DOM object. * * @returns {Element} */ get element(): HTMLElement | null; /** * Check if element was built (built whole DOM structure). * * @returns {boolean} */ isBuilt(): boolean; /** * Translate value if it is possible. It's checked if value belongs to namespace of translated phrases. * * @param {*} value Value which will may be translated. * @returns {*} Translated value if translation was possible, original value otherwise. */ translateIfPossible(value: unknown): unknown; /** * Build DOM structure. */ build(): void; /** * Update DOM structure. */ update(): void; /** * Reset to initial state. */ reset(): void; /** * Show element. */ show(): void; /** * Hide element. */ hide(): void; /** * Focus element. */ focus(): void; /** * Destroys the UI component by releasing the event manager, nulling references, and removing the element from the DOM. */ destroy(): void; } export interface BaseUI { addLocalHook(key: string, callback: Function): this; removeLocalHook(key: string, callback: Function): this; runLocalHooks(key: string, ...args: unknown[]): void; clearLocalHooks(): this; }