import { ICommand } from 'valor-unistore-undo'; import { IStoreState, ID, IRow, ICellNN } from '../index.data'; import { IRowWithCell } from '../SpreadSheetProvider/index.data'; import { SpreadSheetRuntime } from '../RuntimeContext'; export interface InsertTreeRowCommandParams { type: 'sibling' | 'child' | 'auto'; rows: IRowWithCell[]; helpers: { normalizeRow: (rows: IRow[], row: IRowWithCell) => IRowWithCell; }; } interface IUndoContext { parentRowCells: Record; insertAt: number; } declare class InsertTreeRowCommand extends ICommand { baseI?: number; /** * 批量插入, 注意 要插入的 rows必须是一个层级结构, 而不能是一个展平的或混合的结构 * 以下是正确的: * - row1 * - row1.1 * - row1.2 */ execute: () => boolean; undo: () => void; } export default InsertTreeRowCommand;