///
///
import { IStoreState, IRow, IColumn, EditorUsage } from '../index.data';
import { IRowWithCell } from './index.data';
import { Store } from 'unistore';
import { CommandManager } from 'valor-unistore-undo';
import { InsertTreeRowCommandParams } from '../commands/InsertTreeRowCommand';
import { MoveRowCommandParams } from '../commands/MoveRowCommand';
import { PushRowCommandParams } from '../commands/PushRowCommand';
import { DeleteRowCommandParams } from '../commands/DeleteRowCommand';
import { SelectCellCommandParams } from '../commands/SelectCellCommand';
import { InsertRowCommandParams } from '../commands/InsertRowCommand';
import { SpreadSheetRuntime } from '../RuntimeContext';
import { FormulaManagerConfig } from '../formula-manager/index.data';
import { MergeCellCommandParams } from '../commands/MergeCellCommand';
import { InsertColumnCommandParams } from '../commands/InsertColumnCommand';
import { DeleteColumnCommandParams } from '../commands/DeleteColumnCommand';
export declare const defaultStoreState: IStoreState;
export declare function validate(sheet: {
rows: IRowWithCell[];
columns: IColumn[];
}): void;
/**
* 将rows+columns, 改造成state格式
* 用途: 例如在跨表引用时, 为获取 sheet1!A1, 外部需要自己将id转成 A1
* 使用这个方法后, 可再使用其它的内部方法完成这个转换
*/
export declare function makeStoreState(sheet: {
rows: IRowWithCell[];
columns: IColumn[];
}): IStoreState;
export declare function initStoreState(sheet: {
rows: IRowWithCell[];
columns: IColumn[];
}, env?: 'test', usage?: EditorUsage, isLabelFormula?: 'label' | 'id', formulaConfig?: FormulaManagerConfig, freezeAt?: IStoreState['freezeAt'], padding?: IStoreState['padding']): IStoreState;
export declare function initStore(props: {
env?: 'test';
usage: EditorUsage;
rows: IRowWithCell[];
columns: IColumn[];
isLabelFormula?: 'label' | 'id';
formulaConfig?: FormulaManagerConfig;
freezeAt?: IStoreState['freezeAt'];
padding?: IStoreState['padding'];
}): Store;
export declare function getQueries(runtime: SpreadSheetRuntime): {
getSelection(): {
selectionType: "row" | "cell" | "column" | null;
selectionRowRange: [import("../index.data").ID, import("../index.data").ID];
selectedColumnRange: [import("../index.data").ID, import("../index.data").ID];
selectedCellRange: [import("../index.data").ID, import("../index.data").ID];
};
recalculateNeeded(): boolean;
};
export declare function getCommands(manager: CommandManager): {
setCellStyle({ style }: {
style: import("react").CSSProperties;
}): void;
setCellData(cellPatch: Partial | null): void;
setRowData(rowPatch: Partial): void;
insertTreeRow(params: InsertTreeRowCommandParams): void;
insertRow(params: InsertRowCommandParams): void;
insertColumn(params: InsertColumnCommandParams): void;
deleteColumn(params: DeleteColumnCommandParams): void;
pushRow(params: PushRowCommandParams): void;
moveRow(params: MoveRowCommandParams): void;
deleteRow(params: DeleteRowCommandParams): void;
mergeCell(params: MergeCellCommandParams): void;
recalculate(): void;
clearSelection(): void;
selectCell(params: SelectCellCommandParams): void;
undo(): void;
redo(): void;
};
/**
* 将 formula="A1+K!A2" => formula="{{id11}}+{{id1!12}}"
*/
export declare function translateLabelFormula(state: IStoreState, config?: FormulaManagerConfig): IStoreState;