import { Selection, RevoGrid } from '../../interfaces'; import Cell = Selection.Cell; export declare type EventData = { el: HTMLElement; rows: RevoGrid.DimensionSettingsState; cols: RevoGrid.DimensionSettingsState; lastCell: Selection.Cell; }; /** * Grabs the cell based on this dimension. * Returns two things. * 1. Cell position within its dimension * 2. The dimension type - 'col' or 'colPinStart' */ export declare function getCellByElement(element: Element | null): { cell: Cell; colKey: RevoGrid.DimensionCols; } | null; /** Calculate cell based on x, y position */ export declare function getCurrentCell({ x, y }: Cell, { el, rows, cols }: EventData): Cell | null; export declare function getCoordinate(range: Selection.RangeArea, focus: Cell, changes: Partial, isMulti?: boolean): { start: { x: number; y: number; }; end: { x: number; y: number; }; } | null; /** check if out of range */ export declare function isAfterLast({ x, y }: Cell, { lastCell }: EventData): boolean; /** check if out of range */ export declare function isBeforeFirst({ x, y }: Cell): boolean; export declare function isValidRange(firstCell: Cell | null, lastCell: Cell | null, range: Selection.RangeArea | null): boolean; /** Compare cells, only 1 coordinate difference is possible */ export declare function getDirectionCoordinate(initial: Cell, last: Cell): Partial | null; export declare function getLargestAxis(initial: Cell, last: Cell): Partial | null; export declare function getCell({ x, y, x1, y1 }: Selection.RangeArea, dimensionRow: RevoGrid.DimensionSettingsState, dimensionCol: RevoGrid.DimensionSettingsState): { left: number; right: number; top: number; bottom: number; width: number; height: number; }; export declare function getElStyle(range: Selection.RangeArea, dimensionRow: RevoGrid.DimensionSettingsState, dimensionCol: RevoGrid.DimensionSettingsState): Selection.RangeAreaCss; export declare function getCellFocusBorderStyle(x: number, y: number): string;