UNPKG

1.03 kBTypeScriptView Raw
1import { Node as ProseMirrorNode } from 'prosemirror-model';
2import { SideEffects, SideEffectsJSON } from './utils/side-effects/types';
3import { SortOrder } from './constants';
4export declare type ColumnInfo = Map<number, CellStep>;
5export interface AddColumnStepInfo {
6 cells: CellStep[];
7 sideEffects?: SideEffects;
8}
9/**
10 * Information about the cell
11 * from: where the cell will be added removed
12 * to: where the original cell ends
13 * newCell?: the content of the new cells if it's added
14 */
15export interface CellStep {
16 from: number;
17 to: number;
18 newCell?: ProseMirrorNode;
19 mergeWith?: number;
20}
21export interface CellStepJson {
22 from: number;
23 to: number;
24 newCell?: {
25 [key: string]: any;
26 };
27 mergeWith?: number;
28}
29export interface AddColumnStepJson {
30 stepType: 'ak-add-column';
31 tablePos: number;
32 cells: CellStepJson[];
33 sideEffects?: SideEffectsJSON;
34 isDelete: boolean;
35}
36export interface TableColumnOrdering {
37 columnIndex: number;
38 order: SortOrder;
39}