import { IStoreState, ID, ISelection, ICellNN, ICell } from '../index.data'; import { IRowWithCell } from '../SpreadSheetProvider/index.data'; import { Store } from 'unistore'; import { SpreadSheetRuntime } from '../RuntimeContext'; import { IMergeCellUndoContext } from './index.data'; /** * 当前选择模式, 是否可以操作行(增,删,升降级) */ export declare function canModifyRow(state: IStoreState): boolean; /** * 找到当前行的索引 ( 必须确保canModifyRow ) * 如果不允许(增,删,升降级), 则返回-1 */ export declare function getCurrentRowIndex(state: IStoreState): number; export declare function getCurrentRowIndexes(state: IStoreState): number[]; /** * 获取子树, 并拼成 IRowWithCell的样式, 主要供 delete 后恢复 j */ export declare function getRowWithCells_subtree(state: IStoreState, i: number): IRowWithCell[]; export declare function getRowWithCells(state: IStoreState, i: number): IRowWithCell; export declare function restoreSelection(store: Store, id: ID, runtime: SpreadSheetRuntime): void; export declare function bigCell_ij2cells(state: IStoreState, cell: ICellNN): { i: number; j: number; cell: ICell; }[]; /** * cellId对应rowspan, colspan 均 > 1, 将之拆分 * 修改 cell 本身的 rowspan/colspan, 添加新的cells * 在row.cells里相应修改 */ export declare function splitCell(state: IStoreState, cellId: ID, runtime: SpreadSheetRuntime): { newState: Partial; undoContext: IMergeCellUndoContext; }; export declare function placeCells(state: IStoreState, ij2cells: { i: number; j: number; cell: ICell; }[]): IStoreState; export declare function spanedCell_ij2cells(state: IStoreState, cellRange: ISelection['selectedCellRange']): { i: number; j: number; cell: ICell; }[]; export declare function mergeCells(state: IStoreState, cellRange: ISelection['selectedCellRange'], runtime: SpreadSheetRuntime): { newState: Partial; undoContext: IMergeCellUndoContext; };