import type { IndexMapper } from '../../translations'; import type { default as CellRange } from '../../3rdparty/walkontable/src/cell/range'; import type MergedCellCoords from './cellCoords'; /** * Data shape for focus order linked list nodes. */ export interface FocusNodeData { selectionLayer: number; colStart: number; colEnd: number; rowStart: number; rowEnd: number; } /** * Class responsible for providing the correct focus order (vertical and horizontal) within a selection that * contains merged cells. * * @private */ export declare class FocusOrder { #private; /** * Initializes the focus order manager with the merged cell getter and row and column index mappers used to navigate focus through merged regions. */ constructor({ mergedCellsGetter, rowIndexMapper, columnIndexMapper }: { mergedCellsGetter: (row: number, column: number) => MergedCellCoords | false; rowIndexMapper: IndexMapper; columnIndexMapper: IndexMapper; }); /** * Gets the currently selected node data from the vertical focus order list. * * @returns {NodeStructure} */ getCurrentVerticalNode(): unknown; /** * Gets the first node data from the vertical focus order list. * * @returns {NodeStructure} */ getFirstVerticalNode(): unknown; /** * Gets the next selected node data from the vertical focus order list. * * @returns {FocusNodeData} */ getNextVerticalNode(): FocusNodeData; /** * Gets the previous selected node data from the vertical focus order list. * * @returns {FocusNodeData} */ getPrevVerticalNode(): FocusNodeData; /** * Gets the currently selected node data from the horizontal focus order list. * * @returns {NodeStructure} */ getCurrentHorizontalNode(): unknown; /** * Gets the first node data from the horizontal focus order list. * * @returns {NodeStructure} */ getFirstHorizontalNode(): unknown; /** * Gets the next selected node data from the horizontal focus order list. * * @returns {FocusNodeData} */ getNextHorizontalNode(): FocusNodeData; /** * Gets the previous selected node data from the horizontal focus order list. * * @returns {FocusNodeData} */ getPrevHorizontalNode(): FocusNodeData; /** * Sets the previous node from the vertical focus order list as active. */ setPrevNodeAsActive(): void; /** * Sets the previous node from the horizontal focus order list as active. */ setNextNodeAsActive(): void; /** * Rebuilds the focus order list based on the provided selection. * * @param {CellRange[]} selectedRanges The selected ranges to build the focus order for. */ buildFocusOrder(selectedRanges: CellRange[]): void; /** * Sets the active node based on the provided row and column. * * @param {number} row The visual row index. * @param {number} column The visual column index. * @param {number} selectionLayerIndex The index of the selection layer to which the focus should be marked as active. * @returns {FocusOrder} */ setActiveNode(row: number, column: number, selectionLayerIndex?: number): this; }