import type { HotInstance } from '../../../core/types'; import { BaseComponent } from './_base'; import { MultipleSelectUI } from '../ui/multipleSelect'; import type { BaseUI } from '../ui/_base'; interface ConditionEntry { name: string; args: unknown[]; [key: string]: unknown; } interface ConditionStack { column: number; conditions: ConditionEntry[]; [key: string]: unknown; } interface FilteredRow { value: unknown; meta: { visualRow: number; visualCol: number; [key: string]: unknown; }; [key: string]: unknown; } export interface StateInfo { editedConditionStack: ConditionStack; dependentConditionStacks: ConditionStack[]; conditionArgsChange: unknown; filteredRowsFactory: (physicalColumn: number, conditionsStack?: ConditionStack) => FilteredRow[]; [key: string]: unknown; } /** * @private * @class ValueComponent */ export declare class ValueComponent extends BaseComponent { #private; /** * Narrowed element list — ValueComponent only ever holds MultipleSelectUI instances. */ elements: BaseUI[]; /** * The name of the component. * * @type {string} */ name: string | (() => string); /** * Whether to uncheck filtered queries. * * @type {string} */ searchMode: unknown; /** * Callback that returns `true` when this menu item should be hidden. * * @type {function(): boolean | undefined} */ hiddenWhen: (() => boolean) | undefined; /** * Initializes the value component with the given ID, display name, search mode, and optional visibility predicate. */ constructor(hotInstance: HotInstance, options: { id: string; name: string | (() => string); searchMode: unknown; hiddenWhen?: (() => boolean); }); /** * Register all necessary hooks. * * @private */ registerHooks(): void; /** * Gets the list of elements from which the component is built. * * @returns {BaseUI[]} */ getElements(): (import("../ui/input").InputUI | import("../ui/link").LinkUI | MultipleSelectUI | null)[]; /** * Set state of the component. * * @param {object} value The component value. */ setState(value?: { command: { key: string; }; args: unknown[]; itemsSnapshot: Record[]; locale: string; }): void; /** * Export state of the component (get selected filter and filter arguments). * * @returns {object} Returns object where `command` key keeps used condition filter and `args` key its arguments. */ getState(): { command: { key: string; }; args: unknown[]; itemsSnapshot: unknown[]; }; /** * Update state of component. * * @param {object} stateInfo Information about state containing stack of edited column, * stack of dependent conditions, data factory and optional condition arguments change. It's described by object containing keys: * `editedConditionStack`, `dependentConditionStacks`, `visibleDataFactory` and `conditionArgsChange`. */ updateState(stateInfo: StateInfo): void; /** * Get multiple select element. * * @returns {MultipleSelectUI} */ getMultipleSelectElement(): MultipleSelectUI; /** * Get object descriptor for menu item entry. * * @returns {object} */ getMenuItemDescriptor(): { key: string; name: string | (() => string); isCommand: boolean; disableSelection: boolean; hidden: () => boolean; renderer: (hot: HotInstance, wrapper: HTMLTableCellElement, row: number, col: number, prop: string | number, value: string) => HTMLTableCellElement; }; /** * Reset elements to their initial state. */ reset(): void; /** * Get data for currently selected column. * * @returns {Array} * @private */ _getColumnVisibleValues(): Array<{ value: string; meta: Record; }>; } export {};