UNPKG

@antv/s2

Version:

effective spreadsheet render core lib

29 lines (28 loc) 1.45 kB
import { HeaderCell } from '../../cell'; import { CellType } from '../../common/constant'; import type { CellMeta, OnUpdateCells, S2CellType, ViewMeta } from '../../common/interface'; import type { Node } from '../../facet/layout/node'; import type { SpreadSheet } from '../../sheet-type'; export declare const isMultiSelectionKey: (e: KeyboardEvent) => boolean; export declare const isMouseEventWithMeta: (e: MouseEvent) => boolean; export declare const getCellMeta: (cell: S2CellType) => CellMeta; export declare function getRangeIndex<T extends CellMeta | ViewMeta | Node>(start: T, end: T): { start: { rowIndex: number; colIndex: number; }; end: { rowIndex: number; colIndex: number; }; }; export declare function getRowCellForSelectedCell(meta: ViewMeta, spreadsheet: SpreadSheet): HeaderCell[]; export declare const getRowHeaderByCellId: (cellId: string, s2: SpreadSheet) => Node[]; export declare const getColHeaderByCellId: (cellId: string, s2: SpreadSheet) => Node[]; export declare const getInteractionCells: (cell: CellMeta, s2: SpreadSheet) => Array<CellMeta>; export declare const getInteractionCellsBySelectedCells: (selectedCells: CellMeta[], s2: SpreadSheet) => Array<CellMeta>; export declare const afterSelectDataCells: OnUpdateCells; export type SelectedIds = { [type in CellType]?: string[]; }; export declare const groupSelectedCells: (selectedCells: CellMeta[]) => SelectedIds;