import * as React from 'react'; import { IStoreState, ID, IRow, ICellNN } from '../../index.data'; import { IRowWithCell } from '../../SpreadSheetProvider/index.data'; import { FormulaManagerConfig } from '../../formula-manager/index.data'; import { SpreadSheetRuntime } from '../../RuntimeContext'; /** * @deprecated * 填充row-no型cell的value * 每当tree-context或collapsed发生变化时调用 */ export declare function fillRowNoCellValue(state: IStoreState): Record; /** * @param replace 如果replace=true, 则直接覆盖整个style ( undo场合 ) */ export declare function setCellStyle(state: IStoreState, ids: ID[], style: React.CSSProperties, replace?: boolean): { cells: { [id: string]: ICellNN; }; }; /** * @deprecated * 设置某个单元格的值 */ export declare function setCellValue(state: IStoreState, id: ID, value: any): { cells: { [x: string]: ICellNN | { value: any; id: string | number; rowId?: string | number | undefined; i?: number | undefined; j?: number | undefined; colspan?: number | undefined; rowspan?: number | undefined; style?: React.CSSProperties | undefined; format?: import("../../index.data").NumericFormat | undefined; type?: string | undefined; dataType?: string | undefined; locked?: boolean | undefined; delay?: boolean | undefined; meta?: any; formula?: string | undefined; formulaDisabled?: boolean | undefined; error?: string | null | undefined; }; }; } | undefined; /** * patch某个单元格 * @param replace 在undo时, 应直接replace为整个老cell, 而在do时, 一般应merge新cell到老cell */ export declare function setCellData(state: IStoreState, id: ID, cellData: Partial, replace: boolean | undefined, runtime: SpreadSheetRuntime): Partial; /** * 单元格A0 -> [A1,A2], 则A0 的变化, 将引起 A1与A2的变化, 这个变化将一直传递 * 这个方法只负责传播变化 ( 假定变化真的发生了 ) * 访问这个方法前, 请自行确保 value 已发生变化 */ export declare function valuePropagation(state: IStoreState, cellId: ID, config?: FormulaManagerConfig, disableAutoRecalculate?: boolean): { cells: Record; }; export declare function tryEnableFormula(state: IStoreState, affectedRowIds: ID[], helpers?: { normalizeRow: (rows: IRow[], row: IRowWithCell) => IRowWithCell; }): { rows: IRow[]; cells: Record; }; /** * 对于affectedRowIds, 逐个检查并设置单元格的 disabledFormula属性 * update- 1: 对于非叶子行, 若有dynamicFormula.nonleaf的单元格, 则将之复制到 formula * old 1.对于有children的行内单元格, 并且存在 sumChildren, 那么开启公式 * * update- 2: 对于叶子行, 若有dynamicFormula.leaf的单元格, 则将之复制到 formula * old 2. 对于没有children的行内单元格, 并且存在 sumChildren, 那么关闭公式 * * update- 3: 不检查具体公式, 而是检查 dynamicFormula * old 3. 具体来说, 目前仅 sumChildren 需要检查 * @param state * @param affectedRowIds : 受影响的行, 比如 新插入行1, 则[行1, 行1.parent受影响] * @returns : {id:cell}, 注意这是patch部分, 也就是: 只有变动的 cell会进入 */