import { Id, AreaType, CellsByIdType, CellsByAddressType, PointType, WriterType, Address, CellFilter, Labelers, MatrixType, CellType, Parsers, Renderers, HistoryType, StoreReflectionType, ShapeType } from "../types"; import { FunctionMapping } from "../formula/functions/__base"; import { functions as functionsDefault } from "../formula/mapping"; declare type Props = { numRows?: number; numCols?: number; cells?: CellsByAddressType; parsers?: Parsers; renderers?: Renderers; labelers?: Labelers; useBigInt?: boolean; historyLimit?: number; minNumRows?: number; maxNumRows?: number; minNumCols?: number; maxNumCols?: number; headerHeight?: number; headerWidth?: number; functions?: typeof functionsDefault; }; declare type GetProps = { evaluates?: boolean; raise?: boolean; filter?: CellFilter; }; declare type MoveProps = { src: AreaType; dst: AreaType; reflection?: StoreReflectionType; }; declare type GetFlattenProps = GetProps & { key?: keyof CellType; }; declare type GetPropsWithArea = GetProps & { area?: AreaType; }; declare type GetFlattenPropsWithArea = GetFlattenProps & { area?: AreaType; }; export interface UserTable { changedAt: Date; lastChangedAt?: Date; top: number; left: number; bottom: number; right: number; minNumRows: number; maxNumRows: number; minNumCols: number; maxNumCols: number; totalWidth: number; totalHeight: number; headerWidth: number; headerHeight: number; getRectSize(area: AreaType): ShapeType; getAddressById(id: Id, slideY: number, slideX: number): string | undefined; getAddressesByIds(ids: CellsByIdType): CellsByAddressType; getPointById(id: Id): PointType; getByPoint(point: PointType): CellType | undefined; getById(id: Id): CellType | undefined; getNumRows(base?: number): number; getNumCols(base?: number): number; getMatrixFlatten(args: GetFlattenPropsWithArea): any[][]; getObjectFlatten(args: GetFlattenProps): CellsByAddressType; getRowsFlatten(args: GetFlattenProps): CellsByAddressType[]; getColsFlatten(args: GetFlattenProps): CellsByAddressType[]; getMatrix(args: GetPropsWithArea): (CellType | null)[][]; getObject(args: GetProps): CellsByAddressType; getRows(args: GetProps): CellsByAddressType[]; getCols(args: GetProps): CellsByAddressType[]; move(args: MoveProps): UserTable; copy(args: MoveProps): UserTable; update(args: { diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): UserTable; writeMatrix(args: { point: PointType; matrix: MatrixType; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): UserTable; write(args: { point: PointType; value: string; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): UserTable; addRowsAndUpdate(args: { y: number; numRows: number; baseY: number; diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): UserTable; addRows(args: { y: number; numRows: number; baseY: number; reflection?: StoreReflectionType; }): UserTable; removeRows(args: { y: number; numRows: number; reflection?: StoreReflectionType; }): UserTable; addColsAndUpdate(args: { x: number; numCols: number; baseX: number; diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): UserTable; addCols(args: { x: number; numCols: number; baseX: number; reflection?: StoreReflectionType; }): UserTable; removeCols(args: { x: number; numCols: number; reflection?: StoreReflectionType; }): UserTable; undo(): { history: HistoryType | null; newTable: UserTable; }; redo(): { history: HistoryType | null; newTable: UserTable; }; getHistories(): HistoryType[]; getHistoryIndex(): number; getHistorySize(): number; } export declare class Table implements UserTable { changedAt: Date; lastChangedAt?: Date; minNumRows: number; maxNumRows: number; minNumCols: number; maxNumCols: number; totalWidth: number; totalHeight: number; headerWidth: number; headerHeight: number; private head; private idMatrix; private data; private area; private parsers; private renderers; private labelers; private functions; private lastHistory?; private histories; private historyIndex; private addressesById; private historyLimit; private solvedCaches; constructor({ numRows, numCols, cells, parsers, renderers, labelers, useBigInt, historyLimit: historyLimit, minNumRows, maxNumRows, minNumCols, maxNumCols, headerWidth, headerHeight, functions, }: Props); private generateId; getRectSize({ top, left, bottom, right }: AreaType): { width: number; height: number; }; private setTotalSize; private shallowCopy; getAddressById(id: Id, slideY?: number, slideX?: number): string | undefined; getAddressesByIds(ids: CellsByIdType): CellsByAddressType; getPointById(id: Id): PointType; private getId; getByPoint(point: PointType): CellType | undefined; getById(id: Id): CellType | undefined; getNumRows(base?: number): number; getNumCols(base?: number): number; get top(): number; get left(): number; get bottom(): number; get right(): number; getMatrixFlatten({ area, key, evaluates, raise, filter, }?: GetFlattenProps & { area?: AreaType; }): any[][]; getObjectFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType; getRowsFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType[]; getColsFlatten({ key, evaluates, raise, filter, }?: GetFlattenProps): CellsByAddressType[]; getMatrix({ area, evaluates, raise, filter, }?: GetProps & { area?: AreaType; }): (CellType | null)[][]; getObject({ evaluates, raise, filter, }?: GetProps): CellsByAddressType; getRows({ evaluates, raise, filter, }?: GetProps): CellsByAddressType[]; getCols({ evaluates, raise, filter, }?: GetProps): CellsByAddressType[]; private pushHistory; private cleanObsolete; private cleanStrayed; private getNewIdMatrix; private getIdMatrixFromArea; private setChangedAt; private copyCellLayout; move({ src, dst, reflection, }: MoveProps): Table; copy({ src, dst, reflection, }: MoveProps): Table; private _update; update({ diff, partial, updateChangedAt, reflection, }: { diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): Table; writeMatrix({ point, matrix, updateChangedAt, reflection, }: { point: PointType; matrix: MatrixType; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): Table; write({ point, value, updateChangedAt, reflection, }: { point: PointType; value: string; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): Table; addRowsAndUpdate({ y, numRows, baseY, diff, partial, updateChangedAt, reflection, }: { y: number; numRows: number; baseY: number; diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): Table; addRows({ y, numRows, baseY, reflection, }: { y: number; numRows: number; baseY: number; reflection?: StoreReflectionType; }): Table; removeRows({ y, numRows, reflection, }: { y: number; numRows: number; reflection?: StoreReflectionType; }): Table; addColsAndUpdate({ x, numCols, baseX, diff, partial, updateChangedAt, reflection, }: { x: number; numCols: number; baseX: number; diff: CellsByAddressType; partial?: boolean; updateChangedAt?: boolean; reflection?: StoreReflectionType; }): Table; addCols({ x, numCols, baseX, reflection, }: { x: number; numCols: number; baseX: number; reflection?: StoreReflectionType; }): Table; removeCols({ x, numCols, reflection, }: { x: number; numCols: number; reflection?: StoreReflectionType; }): Table; getHistories(): HistoryType[]; getHistoryIndex(): number; getHistorySize(): number; getHistoryLimit(): number; setFunctions(additionalFunctions: FunctionMapping): void; getArea(): AreaType; parse(point: PointType, value: string): CellType; render(point: PointType, writer?: WriterType): any; stringify(point: PointType, value?: any, evaluates?: boolean): string; trim(area: AreaType): ReadonlyTable; getIdByAddress(address: Address): string | undefined; private applyDiff; undo(): { history: null; newTable: Table; } | { history: HistoryType; newTable: Table; }; redo(): { history: null; newTable: Table; } | { history: HistoryType; newTable: Table; }; getFunction(name: string): any; getLabel(key: string, n: number): string; getBase(): this; getSolvedCache(key: string): any; setSolvedCache(key: string, value: any): void; } export declare class ReadonlyTable extends Table { } export {}; //# sourceMappingURL=table.d.ts.map