@lofcz/platejs-table 52.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +24 -0
- package/README.md +11 -0
- package/dist/constants-B6Sm9BNa.js +2536 -0
- package/dist/constants-B6Sm9BNa.js.map +1 -0
- package/dist/index-CbSGuAlP.d.ts +638 -0
- package/dist/index-CbSGuAlP.d.ts.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +85 -0
- package/dist/index.js.map +1 -0
- package/dist/react/index.d.ts +157 -0
- package/dist/react/index.d.ts.map +1 -0
- package/dist/react/index.js +879 -0
- package/dist/react/index.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
import { Descendant, Editor, EditorAboveOptions, ElementEntry, InsertNodesOptions, NodeEntry, NormalizeInitialValue, OmitFirst, OverrideEditor, Path, PluginConfig, SlateEditor, TElement, TLocation, TRange, TTableCellBorder, TTableCellElement, TTableElement, TTableRowElement } from "platejs";
|
|
2
|
+
|
|
3
|
+
//#region src/lib/utils/computeCellIndices.d.ts
|
|
4
|
+
declare function computeCellIndices(editor: SlateEditor, {
|
|
5
|
+
all,
|
|
6
|
+
cellNode,
|
|
7
|
+
tableNode
|
|
8
|
+
}: {
|
|
9
|
+
all?: boolean;
|
|
10
|
+
cellNode?: TTableCellElement;
|
|
11
|
+
tableNode?: TTableElement;
|
|
12
|
+
}): {
|
|
13
|
+
col: number;
|
|
14
|
+
row: number;
|
|
15
|
+
} | undefined;
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/lib/utils/getCellIndices.d.ts
|
|
18
|
+
type CellIndices = {
|
|
19
|
+
col: number;
|
|
20
|
+
row: number;
|
|
21
|
+
};
|
|
22
|
+
declare const getCellIndices: (editor: SlateEditor, element: TTableCellElement) => CellIndices;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/lib/utils/getCellRowIndexByPath.d.ts
|
|
25
|
+
declare const getCellRowIndexByPath: (cellPath: Path) => number;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/lib/utils/getCellType.d.ts
|
|
28
|
+
/** Get td and th types */
|
|
29
|
+
declare const getCellTypes: (editor: SlateEditor) => any;
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/lib/types.d.ts
|
|
32
|
+
type BorderDirection = 'bottom' | 'left' | 'right' | 'top';
|
|
33
|
+
type CreateCellOptions = {
|
|
34
|
+
children?: Descendant[];
|
|
35
|
+
header?: boolean;
|
|
36
|
+
row?: TTableRowElement;
|
|
37
|
+
};
|
|
38
|
+
type TableStoreSizeOverrides = Map<number, number>;
|
|
39
|
+
//#endregion
|
|
40
|
+
//#region src/lib/api/getEmptyCellNode.d.ts
|
|
41
|
+
declare const getEmptyCellNode: (editor: SlateEditor, {
|
|
42
|
+
children,
|
|
43
|
+
header,
|
|
44
|
+
row
|
|
45
|
+
}?: CreateCellOptions) => {
|
|
46
|
+
children: any[];
|
|
47
|
+
type: any;
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region src/lib/api/getEmptyRowNode.d.ts
|
|
51
|
+
interface GetEmptyRowNodeOptions extends CreateCellOptions {
|
|
52
|
+
colCount?: number;
|
|
53
|
+
}
|
|
54
|
+
declare const getEmptyRowNode: (editor: SlateEditor, {
|
|
55
|
+
colCount,
|
|
56
|
+
...cellOptions
|
|
57
|
+
}?: GetEmptyRowNodeOptions) => {
|
|
58
|
+
children: any[];
|
|
59
|
+
type: any;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/lib/api/getEmptyTableNode.d.ts
|
|
63
|
+
interface GetEmptyTableNodeOptions extends GetEmptyRowNodeOptions {
|
|
64
|
+
rowCount?: number;
|
|
65
|
+
}
|
|
66
|
+
declare const getEmptyTableNode: (editor: SlateEditor, {
|
|
67
|
+
colCount,
|
|
68
|
+
header,
|
|
69
|
+
rowCount,
|
|
70
|
+
...cellOptions
|
|
71
|
+
}?: GetEmptyTableNodeOptions) => TTableElement;
|
|
72
|
+
//#endregion
|
|
73
|
+
//#region src/lib/merge/deleteColumn.d.ts
|
|
74
|
+
declare const deleteTableMergeColumn: (editor: SlateEditor) => void;
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/lib/merge/deleteColumnWhenExpanded.d.ts
|
|
77
|
+
declare const deleteColumnWhenExpanded: (editor: SlateEditor, tableEntry: NodeEntry<TTableCellElement>) => void;
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region src/lib/merge/deleteRow.d.ts
|
|
80
|
+
declare const deleteTableMergeRow: (editor: SlateEditor) => void;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region src/lib/merge/deleteRowWhenExpanded.d.ts
|
|
83
|
+
declare const deleteRowWhenExpanded: (editor: SlateEditor, [table, tablePath]: NodeEntry<TTableCellElement>) => void;
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/lib/merge/findCellByIndexes.d.ts
|
|
86
|
+
declare const findCellByIndexes: (editor: SlateEditor, table: TTableElement, searchRowIndex: number, searchColIndex: number) => any;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/lib/merge/getCellIndicesWithSpans.d.ts
|
|
89
|
+
declare const getCellIndicesWithSpans: ({
|
|
90
|
+
col,
|
|
91
|
+
row
|
|
92
|
+
}: {
|
|
93
|
+
col: number;
|
|
94
|
+
row: number;
|
|
95
|
+
}, endCell: TTableCellElement) => {
|
|
96
|
+
col: number;
|
|
97
|
+
row: number;
|
|
98
|
+
};
|
|
99
|
+
//#endregion
|
|
100
|
+
//#region src/lib/merge/getCellPath.d.ts
|
|
101
|
+
declare const getCellPath: (editor: SlateEditor, tableEntry: NodeEntry<TTableElement>, curRowIndex: number, curColIndex: number) => any;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/lib/merge/getSelectionWidth.d.ts
|
|
104
|
+
declare const getSelectionWidth: <T extends [TTableCellElement, Path]>(cells: T[]) => number;
|
|
105
|
+
//#endregion
|
|
106
|
+
//#region src/lib/merge/getTableGridByRange.d.ts
|
|
107
|
+
type FormatType = 'all' | 'cell' | 'table';
|
|
108
|
+
type GetTableGridByRangeOptions$1<T extends FormatType> = {
|
|
109
|
+
at: TRange;
|
|
110
|
+
/**
|
|
111
|
+
* Format of the output:
|
|
112
|
+
*
|
|
113
|
+
* - Table element
|
|
114
|
+
* - Array of cells
|
|
115
|
+
*/
|
|
116
|
+
format?: T;
|
|
117
|
+
};
|
|
118
|
+
type GetTableGridReturnType<T> = T extends 'all' ? TableGridEntries : ElementEntry[];
|
|
119
|
+
type TableGridEntries = {
|
|
120
|
+
cellEntries: ElementEntry[];
|
|
121
|
+
tableEntries: ElementEntry[];
|
|
122
|
+
};
|
|
123
|
+
/**
|
|
124
|
+
* Get sub table between 2 cell paths. Ensure that the selection is always a
|
|
125
|
+
* valid table grid.
|
|
126
|
+
*/
|
|
127
|
+
declare const getTableMergeGridByRange: <T extends FormatType>(editor: SlateEditor, {
|
|
128
|
+
at,
|
|
129
|
+
format
|
|
130
|
+
}: GetTableGridByRangeOptions$1<T>) => GetTableGridReturnType<T>;
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/lib/merge/getTableMergedColumnCount.d.ts
|
|
133
|
+
declare const getTableMergedColumnCount: (tableNode: TElement) => any;
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/lib/merge/insertTableColumn.d.ts
|
|
136
|
+
declare const insertTableMergeColumn: (editor: SlateEditor, {
|
|
137
|
+
at,
|
|
138
|
+
before,
|
|
139
|
+
fromCell,
|
|
140
|
+
header,
|
|
141
|
+
select: shouldSelect
|
|
142
|
+
}?: {
|
|
143
|
+
/** Exact path of the cell to insert the column at. Will overrule `fromCell`. */
|
|
144
|
+
at?: Path;
|
|
145
|
+
/** Insert the column before the current column instead of after */
|
|
146
|
+
before?: boolean;
|
|
147
|
+
/** Path of the cell to insert the column from. */
|
|
148
|
+
fromCell?: Path;
|
|
149
|
+
header?: boolean;
|
|
150
|
+
select?: boolean;
|
|
151
|
+
}) => void;
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region src/lib/merge/insertTableRow.d.ts
|
|
154
|
+
declare const insertTableMergeRow: (editor: SlateEditor, {
|
|
155
|
+
at,
|
|
156
|
+
before,
|
|
157
|
+
fromRow,
|
|
158
|
+
header,
|
|
159
|
+
select: shouldSelect
|
|
160
|
+
}?: {
|
|
161
|
+
/** Exact path of the row to insert the column at. Will overrule `fromRow`. */
|
|
162
|
+
at?: Path;
|
|
163
|
+
/** Insert the row before the current row instead of after */
|
|
164
|
+
before?: boolean;
|
|
165
|
+
fromRow?: Path;
|
|
166
|
+
header?: boolean;
|
|
167
|
+
select?: boolean;
|
|
168
|
+
}) => void;
|
|
169
|
+
//#endregion
|
|
170
|
+
//#region src/lib/merge/isTableRectangular.d.ts
|
|
171
|
+
/**
|
|
172
|
+
* Checks if the given table is rectangular, meaning all rows have the same
|
|
173
|
+
* effective number of cells, considering colspan and rowspan.
|
|
174
|
+
*/
|
|
175
|
+
declare const isTableRectangular: (table?: TTableElement) => boolean;
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region src/lib/merge/mergeTableCells.d.ts
|
|
178
|
+
/** Merges multiple selected cells into one. */
|
|
179
|
+
declare const mergeTableCells: (editor: SlateEditor) => void;
|
|
180
|
+
//#endregion
|
|
181
|
+
//#region src/lib/merge/splitTableCell.d.ts
|
|
182
|
+
declare const splitTableCell: (editor: SlateEditor) => void;
|
|
183
|
+
//#endregion
|
|
184
|
+
//#region src/lib/queries/getCellInNextTableRow.d.ts
|
|
185
|
+
declare const getCellInNextTableRow: (editor: Editor, currentRowPath: Path) => NodeEntry | undefined;
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region src/lib/queries/getCellInPreviousTableRow.d.ts
|
|
188
|
+
declare const getCellInPreviousTableRow: (editor: Editor, currentRowPath: Path) => NodeEntry | undefined;
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/lib/queries/getColSpan.d.ts
|
|
191
|
+
/**
|
|
192
|
+
* Returns the colspan attribute of the table cell element.
|
|
193
|
+
*
|
|
194
|
+
* @default 1 if undefined.
|
|
195
|
+
*/
|
|
196
|
+
declare const getColSpan: (cellElem: TTableCellElement) => any;
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/lib/queries/getLeftTableCell.d.ts
|
|
199
|
+
declare const getLeftTableCell: (editor: SlateEditor, {
|
|
200
|
+
at: cellPath
|
|
201
|
+
}?: {
|
|
202
|
+
at?: Path;
|
|
203
|
+
}) => any;
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/lib/queries/getNextTableCell.d.ts
|
|
206
|
+
declare const getNextTableCell: (editor: Editor, _currentCell: NodeEntry, currentPath: Path, currentRow: NodeEntry) => NodeEntry | undefined;
|
|
207
|
+
//#endregion
|
|
208
|
+
//#region src/lib/queries/getPreviousTableCell.d.ts
|
|
209
|
+
declare const getPreviousTableCell: (editor: Editor, _currentCell: NodeEntry, currentPath: Path, currentRow: NodeEntry) => NodeEntry | undefined;
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/lib/queries/getRowSpan.d.ts
|
|
212
|
+
/**
|
|
213
|
+
* Returns the rowspan attribute of the table cell element.
|
|
214
|
+
*
|
|
215
|
+
* @default 1 if undefined
|
|
216
|
+
*/
|
|
217
|
+
declare const getRowSpan: (cellElem: TTableCellElement) => any;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/lib/queries/getSelectedCellsBorders.d.ts
|
|
220
|
+
type GetSelectedCellsBordersOptions = {
|
|
221
|
+
select?: {
|
|
222
|
+
none?: boolean;
|
|
223
|
+
outer?: boolean;
|
|
224
|
+
side?: boolean;
|
|
225
|
+
};
|
|
226
|
+
};
|
|
227
|
+
type TableBorderStates = {
|
|
228
|
+
bottom: boolean;
|
|
229
|
+
left: boolean;
|
|
230
|
+
none: boolean;
|
|
231
|
+
outer: boolean;
|
|
232
|
+
right: boolean;
|
|
233
|
+
top: boolean;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* Get all border states for the selected cells at once. Returns an object with
|
|
237
|
+
* boolean flags for each border state:
|
|
238
|
+
*
|
|
239
|
+
* - Top/bottom/left/right: true if border is visible (size > 0)
|
|
240
|
+
* - Outer: true if all outer borders are visible
|
|
241
|
+
* - None: true if all borders are hidden (size === 0)
|
|
242
|
+
*/
|
|
243
|
+
declare const getSelectedCellsBorders: (editor: SlateEditor, selectedCells?: TElement[] | null, options?: GetSelectedCellsBordersOptions) => TableBorderStates;
|
|
244
|
+
/**
|
|
245
|
+
* Tells if the entire selection is currently borderless (size=0 on all edges).
|
|
246
|
+
* If **any** edge is > 0, returns false.
|
|
247
|
+
*/
|
|
248
|
+
declare function isSelectedCellBordersNone(editor: SlateEditor, cells: TTableCellElement[]): boolean;
|
|
249
|
+
/**
|
|
250
|
+
* Tells if the bounding rectangle for the entire selection is fully set for the
|
|
251
|
+
* **outer** edges, i.e. top/left/bottom/right edges have size=1. We ignore
|
|
252
|
+
* internal edges, only bounding rectangle edges.
|
|
253
|
+
*/
|
|
254
|
+
declare function isSelectedCellBordersOuter(editor: SlateEditor, cells: TTableCellElement[]): boolean;
|
|
255
|
+
/**
|
|
256
|
+
* Tells if the bounding rectangle for the entire selection is fully set for
|
|
257
|
+
* that single side. Example: border='top' => if every cell that sits along the
|
|
258
|
+
* top boundary has top=1.
|
|
259
|
+
*/
|
|
260
|
+
declare function isSelectedCellBorder(editor: SlateEditor, cells: TTableCellElement[], side: BorderDirection): boolean;
|
|
261
|
+
//#endregion
|
|
262
|
+
//#region src/lib/queries/getSelectedCellsBoundingBox.d.ts
|
|
263
|
+
/** Return bounding box [minRow..maxRow, minCol..maxCol] of all selected cells. */
|
|
264
|
+
declare function getSelectedCellsBoundingBox(editor: SlateEditor, cells: TTableCellElement[]): {
|
|
265
|
+
maxCol: number;
|
|
266
|
+
maxRow: number;
|
|
267
|
+
minCol: number;
|
|
268
|
+
minRow: number;
|
|
269
|
+
};
|
|
270
|
+
//#endregion
|
|
271
|
+
//#region src/lib/queries/getTableAbove.d.ts
|
|
272
|
+
declare const getTableAbove: (editor: SlateEditor, options?: EditorAboveOptions) => any;
|
|
273
|
+
//#endregion
|
|
274
|
+
//#region src/lib/queries/getTableCellBorders.d.ts
|
|
275
|
+
type BorderStylesDefault = {
|
|
276
|
+
bottom: TTableCellBorder;
|
|
277
|
+
right: TTableCellBorder;
|
|
278
|
+
left?: TTableCellBorder;
|
|
279
|
+
top?: TTableCellBorder;
|
|
280
|
+
};
|
|
281
|
+
declare const getTableCellBorders: (editor: SlateEditor, {
|
|
282
|
+
cellIndices,
|
|
283
|
+
defaultBorder,
|
|
284
|
+
element
|
|
285
|
+
}: {
|
|
286
|
+
element: TTableCellElement;
|
|
287
|
+
cellIndices?: CellIndices;
|
|
288
|
+
defaultBorder?: TTableCellBorder;
|
|
289
|
+
}) => BorderStylesDefault;
|
|
290
|
+
//#endregion
|
|
291
|
+
//#region src/lib/queries/getTableCellSize.d.ts
|
|
292
|
+
/** Get the width of a cell with colSpan support. */
|
|
293
|
+
declare const getTableCellSize: (editor: SlateEditor, {
|
|
294
|
+
cellIndices,
|
|
295
|
+
colSizes,
|
|
296
|
+
element,
|
|
297
|
+
rowSize
|
|
298
|
+
}: {
|
|
299
|
+
element: TTableCellElement;
|
|
300
|
+
cellIndices?: CellIndices;
|
|
301
|
+
colSizes?: number[];
|
|
302
|
+
rowSize?: number;
|
|
303
|
+
}) => {
|
|
304
|
+
minHeight: number | undefined;
|
|
305
|
+
width: number;
|
|
306
|
+
};
|
|
307
|
+
//#endregion
|
|
308
|
+
//#region src/lib/queries/getTableColumnCount.d.ts
|
|
309
|
+
declare const getTableColumnCount: (tableNode: TElement) => number;
|
|
310
|
+
//#endregion
|
|
311
|
+
//#region src/lib/queries/getTableColumnIndex.d.ts
|
|
312
|
+
/** Get table column index of a cell node. */
|
|
313
|
+
declare const getTableColumnIndex: (editor: Editor, cellNode: TElement) => number;
|
|
314
|
+
//#endregion
|
|
315
|
+
//#region src/lib/queries/getTableEntries.d.ts
|
|
316
|
+
/**
|
|
317
|
+
* If at (default = selection) is in table>tr>td|th, return table, row, and cell
|
|
318
|
+
* node entries.
|
|
319
|
+
*/
|
|
320
|
+
declare const getTableEntries: (editor: SlateEditor, {
|
|
321
|
+
at
|
|
322
|
+
}?: {
|
|
323
|
+
at?: TLocation | null;
|
|
324
|
+
}) => {
|
|
325
|
+
cell: any;
|
|
326
|
+
row: any;
|
|
327
|
+
table: any;
|
|
328
|
+
} | undefined;
|
|
329
|
+
//#endregion
|
|
330
|
+
//#region src/lib/queries/getTableGridByRange.d.ts
|
|
331
|
+
type GetTableGridByRangeOptions = {
|
|
332
|
+
at: TRange;
|
|
333
|
+
/**
|
|
334
|
+
* Format of the output:
|
|
335
|
+
*
|
|
336
|
+
* - Table element
|
|
337
|
+
* - Array of cells
|
|
338
|
+
*/
|
|
339
|
+
format?: 'cell' | 'table';
|
|
340
|
+
};
|
|
341
|
+
/** Get sub table between 2 cell paths. */
|
|
342
|
+
declare const getTableGridByRange: (editor: SlateEditor, {
|
|
343
|
+
at,
|
|
344
|
+
format
|
|
345
|
+
}: GetTableGridByRangeOptions) => ElementEntry[];
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/lib/queries/getTableGridAbove.d.ts
|
|
348
|
+
type GetTableGridAboveOptions = EditorAboveOptions & Pick<GetTableGridByRangeOptions, 'format'>;
|
|
349
|
+
/** Get sub table above anchor and focus. Format: tables or cells. */
|
|
350
|
+
declare const getTableGridAbove: (editor: SlateEditor, {
|
|
351
|
+
format,
|
|
352
|
+
...options
|
|
353
|
+
}?: GetTableGridAboveOptions) => ElementEntry[];
|
|
354
|
+
//#endregion
|
|
355
|
+
//#region src/lib/queries/getTableOverriddenColSizes.d.ts
|
|
356
|
+
/**
|
|
357
|
+
* Returns node.colSizes if it exists, applying overrides, otherwise returns a
|
|
358
|
+
* 0-filled array.
|
|
359
|
+
*/
|
|
360
|
+
declare const getTableOverriddenColSizes: (tableNode: TTableElement, colSizeOverrides?: TableStoreSizeOverrides) => number[];
|
|
361
|
+
//#endregion
|
|
362
|
+
//#region src/lib/queries/getTableRowIndex.d.ts
|
|
363
|
+
/** Get table row index of a cell node. */
|
|
364
|
+
declare const getTableRowIndex: (editor: Editor, cellNode: TElement) => any;
|
|
365
|
+
//#endregion
|
|
366
|
+
//#region src/lib/queries/getTopTableCell.d.ts
|
|
367
|
+
declare const getTopTableCell: (editor: SlateEditor, {
|
|
368
|
+
at: cellPath
|
|
369
|
+
}?: {
|
|
370
|
+
at?: Path;
|
|
371
|
+
}) => any;
|
|
372
|
+
//#endregion
|
|
373
|
+
//#region src/lib/queries/isTableBorderHidden.d.ts
|
|
374
|
+
declare const isTableBorderHidden: (editor: SlateEditor, border: BorderDirection) => boolean;
|
|
375
|
+
//#endregion
|
|
376
|
+
//#region src/lib/transforms/deleteColumn.d.ts
|
|
377
|
+
declare const deleteColumn: (editor: SlateEditor) => void;
|
|
378
|
+
//#endregion
|
|
379
|
+
//#region src/lib/transforms/deleteRow.d.ts
|
|
380
|
+
declare const deleteRow: (editor: SlateEditor) => void;
|
|
381
|
+
//#endregion
|
|
382
|
+
//#region src/lib/transforms/deleteTable.d.ts
|
|
383
|
+
declare const deleteTable: (editor: SlateEditor) => void;
|
|
384
|
+
//#endregion
|
|
385
|
+
//#region src/lib/transforms/insertTable.d.ts
|
|
386
|
+
/**
|
|
387
|
+
* Insert table. If selection in table and no 'at' specified, insert after
|
|
388
|
+
* current table. Select start of new table.
|
|
389
|
+
*/
|
|
390
|
+
declare const insertTable: (editor: SlateEditor, {
|
|
391
|
+
colCount,
|
|
392
|
+
header,
|
|
393
|
+
rowCount
|
|
394
|
+
}?: GetEmptyTableNodeOptions, {
|
|
395
|
+
select: shouldSelect,
|
|
396
|
+
...options
|
|
397
|
+
}?: InsertNodesOptions) => void;
|
|
398
|
+
//#endregion
|
|
399
|
+
//#region src/lib/transforms/insertTableColumn.d.ts
|
|
400
|
+
declare const insertTableColumn: (editor: SlateEditor, options?: {
|
|
401
|
+
/** Exact path of the cell to insert the column at. Will overrule `fromCell`. */
|
|
402
|
+
at?: Path;
|
|
403
|
+
/** Insert the column before the current column instead of after */
|
|
404
|
+
before?: boolean;
|
|
405
|
+
/** Path of the cell to insert the column from. */
|
|
406
|
+
fromCell?: Path;
|
|
407
|
+
header?: boolean;
|
|
408
|
+
select?: boolean;
|
|
409
|
+
}) => void;
|
|
410
|
+
//#endregion
|
|
411
|
+
//#region src/lib/transforms/insertTableRow.d.ts
|
|
412
|
+
declare const insertTableRow: (editor: SlateEditor, options?: {
|
|
413
|
+
/**
|
|
414
|
+
* Exact path of the row to insert the column at. Pass the table path to
|
|
415
|
+
* insert at the end of the table. Will overrule `fromRow`.
|
|
416
|
+
*/
|
|
417
|
+
at?: Path;
|
|
418
|
+
/** Insert the row before the current row instead of after */
|
|
419
|
+
before?: boolean;
|
|
420
|
+
fromRow?: Path;
|
|
421
|
+
header?: boolean;
|
|
422
|
+
select?: boolean;
|
|
423
|
+
}) => void;
|
|
424
|
+
//#endregion
|
|
425
|
+
//#region src/lib/transforms/moveSelectionFromCell.d.ts
|
|
426
|
+
/** Move selection by cell unit. */
|
|
427
|
+
declare const moveSelectionFromCell: (editor: SlateEditor, {
|
|
428
|
+
at,
|
|
429
|
+
edge,
|
|
430
|
+
fromOneCell,
|
|
431
|
+
reverse
|
|
432
|
+
}?: {
|
|
433
|
+
at?: TLocation;
|
|
434
|
+
/** Expand cell selection to an edge. */
|
|
435
|
+
edge?: "bottom" | "left" | "right" | "top";
|
|
436
|
+
/** Move selection from one selected cell */
|
|
437
|
+
fromOneCell?: boolean;
|
|
438
|
+
/** False: move selection to cell below true: move selection to cell above */
|
|
439
|
+
reverse?: boolean;
|
|
440
|
+
}) => true | undefined;
|
|
441
|
+
//#endregion
|
|
442
|
+
//#region src/lib/transforms/overrideSelectionFromCell.d.ts
|
|
443
|
+
/**
|
|
444
|
+
* Override the new selection if the previous selection and the new one are in
|
|
445
|
+
* different cells.
|
|
446
|
+
*/
|
|
447
|
+
declare const overrideSelectionFromCell: (editor: SlateEditor, newSelection?: TRange | null) => void;
|
|
448
|
+
//#endregion
|
|
449
|
+
//#region src/lib/transforms/setBorderSize.d.ts
|
|
450
|
+
declare const setBorderSize: (editor: SlateEditor, size: number, {
|
|
451
|
+
at,
|
|
452
|
+
border
|
|
453
|
+
}?: {
|
|
454
|
+
at?: Path;
|
|
455
|
+
border?: BorderDirection | "all";
|
|
456
|
+
}) => void;
|
|
457
|
+
//#endregion
|
|
458
|
+
//#region src/lib/transforms/setCellBackground.d.ts
|
|
459
|
+
declare const setCellBackground: (editor: SlateEditor, options: {
|
|
460
|
+
color: string | null;
|
|
461
|
+
selectedCells?: TElement[];
|
|
462
|
+
}) => void;
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region src/lib/transforms/setTableColSize.d.ts
|
|
465
|
+
declare const setTableColSize: (editor: SlateEditor, {
|
|
466
|
+
colIndex,
|
|
467
|
+
width
|
|
468
|
+
}: {
|
|
469
|
+
colIndex: number;
|
|
470
|
+
width: number;
|
|
471
|
+
}, options?: EditorAboveOptions) => void;
|
|
472
|
+
//#endregion
|
|
473
|
+
//#region src/lib/transforms/setTableMarginLeft.d.ts
|
|
474
|
+
declare const setTableMarginLeft: (editor: SlateEditor, {
|
|
475
|
+
marginLeft
|
|
476
|
+
}: {
|
|
477
|
+
marginLeft: number;
|
|
478
|
+
}, options?: EditorAboveOptions) => void;
|
|
479
|
+
//#endregion
|
|
480
|
+
//#region src/lib/transforms/setTableRowSize.d.ts
|
|
481
|
+
declare const setTableRowSize: (editor: SlateEditor, {
|
|
482
|
+
height,
|
|
483
|
+
rowIndex
|
|
484
|
+
}: {
|
|
485
|
+
height: number;
|
|
486
|
+
rowIndex: number;
|
|
487
|
+
}, options?: EditorAboveOptions) => void;
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/lib/BaseTablePlugin.d.ts
|
|
490
|
+
declare const BaseTableRowPlugin: any;
|
|
491
|
+
declare const BaseTableCellPlugin: any;
|
|
492
|
+
declare const BaseTableCellHeaderPlugin: any;
|
|
493
|
+
type TableConfig = PluginConfig<'table', {
|
|
494
|
+
/** @private Keeps Track of cell indices by id. */
|
|
495
|
+
_cellIndices: Record<string, {
|
|
496
|
+
col: number;
|
|
497
|
+
row: number;
|
|
498
|
+
}>;
|
|
499
|
+
/** The currently selected cells. */
|
|
500
|
+
selectedCells: TElement[] | null;
|
|
501
|
+
/** The currently selected tables. */
|
|
502
|
+
selectedTables: TElement[] | null;
|
|
503
|
+
/** Disable expanding the table when inserting cells. */
|
|
504
|
+
disableExpandOnInsert?: boolean;
|
|
505
|
+
disableMarginLeft?: boolean;
|
|
506
|
+
/**
|
|
507
|
+
* Disable cell merging functionality.
|
|
508
|
+
*
|
|
509
|
+
* @default false
|
|
510
|
+
*/
|
|
511
|
+
disableMerge?: boolean;
|
|
512
|
+
/**
|
|
513
|
+
* Disable unsetting the first column width when the table has one column.
|
|
514
|
+
* Set it to true if you want to resize the table width when there is only
|
|
515
|
+
* one column. Keep it false if you have a full-width table.
|
|
516
|
+
*/
|
|
517
|
+
enableUnsetSingleColSize?: boolean;
|
|
518
|
+
/**
|
|
519
|
+
* If defined, a normalizer will set each undefined table `colSizes` to this
|
|
520
|
+
* value divided by the number of columns. Merged cells not supported.
|
|
521
|
+
*/
|
|
522
|
+
initialTableWidth?: number;
|
|
523
|
+
/**
|
|
524
|
+
* The minimum width of a column.
|
|
525
|
+
*
|
|
526
|
+
* @default 48
|
|
527
|
+
*/
|
|
528
|
+
minColumnWidth?: number;
|
|
529
|
+
}, {
|
|
530
|
+
create: {
|
|
531
|
+
table: OmitFirst<typeof getEmptyTableNode>;
|
|
532
|
+
/** Cell node factory used each time a cell is created. */
|
|
533
|
+
tableCell: OmitFirst<typeof getEmptyCellNode>;
|
|
534
|
+
tableRow: OmitFirst<typeof getEmptyRowNode>;
|
|
535
|
+
};
|
|
536
|
+
table: {
|
|
537
|
+
getCellBorders: OmitFirst<typeof getTableCellBorders>;
|
|
538
|
+
getCellSize: OmitFirst<typeof getTableCellSize>;
|
|
539
|
+
getColSpan: typeof getColSpan;
|
|
540
|
+
getRowSpan: typeof getRowSpan;
|
|
541
|
+
getCellChildren: (cell: TTableCellElement) => Descendant[];
|
|
542
|
+
};
|
|
543
|
+
}, {
|
|
544
|
+
insert: {
|
|
545
|
+
table: OmitFirst<typeof insertTable>;
|
|
546
|
+
tableColumn: OmitFirst<typeof insertTableColumn>;
|
|
547
|
+
tableRow: OmitFirst<typeof insertTableRow>;
|
|
548
|
+
};
|
|
549
|
+
remove: {
|
|
550
|
+
table: OmitFirst<typeof deleteTable>;
|
|
551
|
+
tableColumn: OmitFirst<typeof deleteColumn>;
|
|
552
|
+
tableRow: OmitFirst<typeof deleteRow>;
|
|
553
|
+
};
|
|
554
|
+
table: {
|
|
555
|
+
merge: OmitFirst<typeof mergeTableCells>;
|
|
556
|
+
split: OmitFirst<typeof splitTableCell>;
|
|
557
|
+
};
|
|
558
|
+
}, {
|
|
559
|
+
cellIndices?: (id: string) => CellIndices;
|
|
560
|
+
}>;
|
|
561
|
+
/** Enables support for tables. */
|
|
562
|
+
declare const BaseTablePlugin: any;
|
|
563
|
+
//#endregion
|
|
564
|
+
//#region src/lib/constants.d.ts
|
|
565
|
+
declare const KEY_SHIFT_EDGES: {
|
|
566
|
+
'shift+down': string;
|
|
567
|
+
'shift+left': string;
|
|
568
|
+
'shift+right': string;
|
|
569
|
+
'shift+up': string;
|
|
570
|
+
};
|
|
571
|
+
//#endregion
|
|
572
|
+
//#region src/lib/normalizeInitialValueTable.d.ts
|
|
573
|
+
declare const normalizeInitialValueTable: NormalizeInitialValue<TableConfig>;
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/lib/withApplyTable.d.ts
|
|
576
|
+
/**
|
|
577
|
+
* Selection table:
|
|
578
|
+
*
|
|
579
|
+
* - If anchor is in table, focus in a block before: set focus to start of table
|
|
580
|
+
* - If anchor is in table, focus in a block after: set focus to end of table
|
|
581
|
+
* - If focus is in table, anchor in a block before: set focus to end of table
|
|
582
|
+
* - If focus is in table, anchor in a block after: set focus to the point before
|
|
583
|
+
* start of table
|
|
584
|
+
*/
|
|
585
|
+
declare const withApplyTable: OverrideEditor<TableConfig>;
|
|
586
|
+
//#endregion
|
|
587
|
+
//#region src/lib/withDeleteTable.d.ts
|
|
588
|
+
/**
|
|
589
|
+
* Return true if:
|
|
590
|
+
*
|
|
591
|
+
* - At start/end of a cell.
|
|
592
|
+
* - Next to a table cell. Move selection to the table cell.
|
|
593
|
+
*/
|
|
594
|
+
declare const preventDeleteTableCell: (editor: SlateEditor, {
|
|
595
|
+
reverse,
|
|
596
|
+
unit
|
|
597
|
+
}: {
|
|
598
|
+
reverse?: boolean;
|
|
599
|
+
unit?: "block" | "character" | "line" | "word";
|
|
600
|
+
}) => true | undefined;
|
|
601
|
+
/** Prevent cell deletion. */
|
|
602
|
+
declare const withDeleteTable: OverrideEditor<TableConfig>;
|
|
603
|
+
//#endregion
|
|
604
|
+
//#region src/lib/withGetFragmentTable.d.ts
|
|
605
|
+
/** If selection is in a table, get subtable above. */
|
|
606
|
+
declare const withGetFragmentTable: OverrideEditor<TableConfig>;
|
|
607
|
+
//#endregion
|
|
608
|
+
//#region src/lib/withInsertFragmentTable.d.ts
|
|
609
|
+
/**
|
|
610
|
+
* If inserting a table, If block above anchor is a table,
|
|
611
|
+
*
|
|
612
|
+
* - Replace each cell above by the inserted table until out of bounds.
|
|
613
|
+
* - Select the inserted cells.
|
|
614
|
+
*/
|
|
615
|
+
declare const withInsertFragmentTable: OverrideEditor<TableConfig>;
|
|
616
|
+
//#endregion
|
|
617
|
+
//#region src/lib/withInsertTextTable.d.ts
|
|
618
|
+
declare const withInsertTextTable: OverrideEditor<TableConfig>;
|
|
619
|
+
//#endregion
|
|
620
|
+
//#region src/lib/withNormalizeTable.d.ts
|
|
621
|
+
/**
|
|
622
|
+
* Normalize table:
|
|
623
|
+
*
|
|
624
|
+
* - Wrap cell children in a paragraph if they are texts.
|
|
625
|
+
*/
|
|
626
|
+
declare const withNormalizeTable: OverrideEditor<TableConfig>;
|
|
627
|
+
//#endregion
|
|
628
|
+
//#region src/lib/withSetFragmentDataTable.d.ts
|
|
629
|
+
declare const withSetFragmentDataTable: OverrideEditor<TableConfig>;
|
|
630
|
+
//#endregion
|
|
631
|
+
//#region src/lib/withTable.d.ts
|
|
632
|
+
declare const withTable: OverrideEditor<TableConfig>;
|
|
633
|
+
//#endregion
|
|
634
|
+
//#region src/lib/withTableCellSelection.d.ts
|
|
635
|
+
declare const withTableCellSelection: OverrideEditor<TableConfig>;
|
|
636
|
+
//#endregion
|
|
637
|
+
export { getRowSpan as $, deleteColumn as A, getCellRowIndexByPath as At, getTableColumnIndex as B, overrideSelectionFromCell as C, GetEmptyRowNodeOptions as Ct, insertTable as D, CreateCellOptions as Dt, insertTableColumn as E, BorderDirection as Et, GetTableGridAboveOptions as F, getTableAbove as G, getTableCellSize as H, getTableGridAbove as I, TableBorderStates as J, getSelectedCellsBoundingBox as K, GetTableGridByRangeOptions as L, getTopTableCell as M, getCellIndices as Mt, getTableRowIndex as N, computeCellIndices as Nt, deleteTable as O, TableStoreSizeOverrides as Ot, getTableOverriddenColSizes as P, isSelectedCellBordersOuter as Q, getTableGridByRange as R, setBorderSize as S, getEmptyTableNode as St, insertTableRow as T, getEmptyCellNode as Tt, BorderStylesDefault as U, getTableColumnCount as V, getTableCellBorders as W, isSelectedCellBorder as X, getSelectedCellsBorders as Y, isSelectedCellBordersNone as Z, TableConfig as _, deleteRowWhenExpanded as _t, withInsertTextTable as a, getCellInNextTableRow as at, setTableColSize as b, deleteTableMergeColumn as bt, preventDeleteTableCell as c, isTableRectangular as ct, normalizeInitialValueTable as d, getTableMergedColumnCount as dt, getPreviousTableCell as et, KEY_SHIFT_EDGES as f, getTableMergeGridByRange as ft, BaseTableRowPlugin as g, findCellByIndexes as gt, BaseTablePlugin as h, getCellIndicesWithSpans as ht, withNormalizeTable as i, getCellInPreviousTableRow as it, isTableBorderHidden as j, CellIndices as jt, deleteRow as k, getCellTypes as kt, withDeleteTable as l, insertTableMergeRow as lt, BaseTableCellPlugin as m, getCellPath as mt, withTable as n, getLeftTableCell as nt, withInsertFragmentTable as o, splitTableCell as ot, BaseTableCellHeaderPlugin as p, getSelectionWidth as pt, GetSelectedCellsBordersOptions as q, withSetFragmentDataTable as r, getColSpan as rt, withGetFragmentTable as s, mergeTableCells as st, withTableCellSelection as t, getNextTableCell as tt, withApplyTable as u, insertTableMergeColumn as ut, setTableRowSize as v, deleteTableMergeRow as vt, moveSelectionFromCell as w, getEmptyRowNode as wt, setCellBackground as x, GetEmptyTableNodeOptions as xt, setTableMarginLeft as y, deleteColumnWhenExpanded as yt, getTableEntries as z };
|
|
638
|
+
//# sourceMappingURL=index-CbSGuAlP.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index-CbSGuAlP.d.ts","names":[],"sources":["../src/lib/utils/computeCellIndices.ts","../src/lib/utils/getCellIndices.ts","../src/lib/utils/getCellRowIndexByPath.ts","../src/lib/utils/getCellType.ts","../src/lib/types.ts","../src/lib/api/getEmptyCellNode.ts","../src/lib/api/getEmptyRowNode.ts","../src/lib/api/getEmptyTableNode.ts","../src/lib/merge/deleteColumn.ts","../src/lib/merge/deleteColumnWhenExpanded.ts","../src/lib/merge/deleteRow.ts","../src/lib/merge/deleteRowWhenExpanded.ts","../src/lib/merge/findCellByIndexes.ts","../src/lib/merge/getCellIndicesWithSpans.ts","../src/lib/merge/getCellPath.ts","../src/lib/merge/getSelectionWidth.ts","../src/lib/merge/getTableGridByRange.ts","../src/lib/merge/getTableMergedColumnCount.ts","../src/lib/merge/insertTableColumn.ts","../src/lib/merge/insertTableRow.ts","../src/lib/merge/isTableRectangular.ts","../src/lib/merge/mergeTableCells.ts","../src/lib/merge/splitTableCell.ts","../src/lib/queries/getCellInNextTableRow.ts","../src/lib/queries/getCellInPreviousTableRow.ts","../src/lib/queries/getColSpan.ts","../src/lib/queries/getLeftTableCell.ts","../src/lib/queries/getNextTableCell.ts","../src/lib/queries/getPreviousTableCell.ts","../src/lib/queries/getRowSpan.ts","../src/lib/queries/getSelectedCellsBorders.ts","../src/lib/queries/getSelectedCellsBoundingBox.ts","../src/lib/queries/getTableAbove.ts","../src/lib/queries/getTableCellBorders.ts","../src/lib/queries/getTableCellSize.ts","../src/lib/queries/getTableColumnCount.ts","../src/lib/queries/getTableColumnIndex.ts","../src/lib/queries/getTableEntries.ts","../src/lib/queries/getTableGridByRange.ts","../src/lib/queries/getTableGridAbove.ts","../src/lib/queries/getTableOverriddenColSizes.ts","../src/lib/queries/getTableRowIndex.ts","../src/lib/queries/getTopTableCell.ts","../src/lib/queries/isTableBorderHidden.ts","../src/lib/transforms/deleteColumn.ts","../src/lib/transforms/deleteRow.ts","../src/lib/transforms/deleteTable.ts","../src/lib/transforms/insertTable.ts","../src/lib/transforms/insertTableColumn.ts","../src/lib/transforms/insertTableRow.ts","../src/lib/transforms/moveSelectionFromCell.ts","../src/lib/transforms/overrideSelectionFromCell.ts","../src/lib/transforms/setBorderSize.ts","../src/lib/transforms/setCellBackground.ts","../src/lib/transforms/setTableColSize.ts","../src/lib/transforms/setTableMarginLeft.ts","../src/lib/transforms/setTableRowSize.ts","../src/lib/BaseTablePlugin.ts","../src/lib/constants.ts","../src/lib/normalizeInitialValueTable.ts","../src/lib/withApplyTable.ts","../src/lib/withDeleteTable.ts","../src/lib/withGetFragmentTable.ts","../src/lib/withInsertFragmentTable.ts","../src/lib/withInsertTextTable.ts","../src/lib/withNormalizeTable.ts","../src/lib/withSetFragmentDataTable.ts","../src/lib/withTable.ts","../src/lib/withTableCellSelection.tsx"],"sourcesContent":[],"mappings":";;;iBAWgB,kBAAA,SACN;;;;;;EADM,QAAA,CAAA,EAQD,iBARmB;EACxB,SAAA,CAAA,EAQM,aARN;CAEN,CAAA,EAAA;EACA,GAAA,EAAA,MAAA;EACA,GAAA,EAAA,MAAA;CAGW,GAAA,SAAA;;;KCRH,WAAA;;EDAI,GAAA,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EA1BS,CAAA;CACc,EAAA;EAAV,WAAA,CAAA,EAAA,CAAA,EAAA,EAAA,MAAA,EAAA,GgDsKoB,WhDtKpB;CAAS,CAAA;;cgD2KV;;;cCzLA;;;E1DWG,aAAA,EAAA,MAAkB;EACxB,UAAA,EAAA,MAAA;CAEN;;;c2DRS,4BAA4B,sBAAsB;;;;A3DK/D;;;;;;;;c4DgBa,gBAAgB,eAAe;;;;A5DhB5C;;;;;AAQe,c6DRF,sB7DQE,EAAA,CAAA,MAAA,E6DPL,W7DOK,EAAA;EAAA,OAAA;EAAA;CAAA,EAAA;EACC,OAAA,CAAA,EAAA,OAAA;EAAa,IAAA,CAAA,EAAA,OAAA,GAAA,WAAA,GAAA,MAAA,GAAA,MAAA;;;c6DqChB,iBAAiB,eAAe;;;;A7D9C7B,c8DEH,oB9DFqB,E8DEC,c9DFD,C8DEgB,W9DFhB,CAAA;;;;AAAlC;;;;;AAQe,c+DEF,uB/DFE,E+DEuB,c/DFvB,C+DEsC,W/DFtC,CAAA;;;cgEdF,qBAAqB,eAAe;;;;AhEMjD;;;;AAKI,ciEIS,kBjEJT,EiEI6B,cjEJ7B,CiEI4C,WjEJ5C,CAAA;;;ckEHS,0BAA0B,eAAe;;;cCMzC,WAAW,eAAe;;;cCP1B,wBAAwB,eAAe"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { $ as getRowSpan, A as deleteColumn, At as getCellRowIndexByPath, B as getTableColumnIndex, C as overrideSelectionFromCell, Ct as GetEmptyRowNodeOptions, D as insertTable, Dt as CreateCellOptions, E as insertTableColumn, Et as BorderDirection, F as GetTableGridAboveOptions, G as getTableAbove, H as getTableCellSize, I as getTableGridAbove, J as TableBorderStates, K as getSelectedCellsBoundingBox, L as GetTableGridByRangeOptions, M as getTopTableCell, Mt as getCellIndices, N as getTableRowIndex, Nt as computeCellIndices, O as deleteTable, Ot as TableStoreSizeOverrides, P as getTableOverriddenColSizes, Q as isSelectedCellBordersOuter, R as getTableGridByRange, S as setBorderSize, St as getEmptyTableNode, T as insertTableRow, Tt as getEmptyCellNode, U as BorderStylesDefault, V as getTableColumnCount, W as getTableCellBorders, X as isSelectedCellBorder, Y as getSelectedCellsBorders, Z as isSelectedCellBordersNone, _ as TableConfig, _t as deleteRowWhenExpanded, a as withInsertTextTable, at as getCellInNextTableRow, b as setTableColSize, bt as deleteTableMergeColumn, c as preventDeleteTableCell, ct as isTableRectangular, d as normalizeInitialValueTable, dt as getTableMergedColumnCount, et as getPreviousTableCell, f as KEY_SHIFT_EDGES, ft as getTableMergeGridByRange, g as BaseTableRowPlugin, gt as findCellByIndexes, h as BaseTablePlugin, ht as getCellIndicesWithSpans, i as withNormalizeTable, it as getCellInPreviousTableRow, j as isTableBorderHidden, jt as CellIndices, k as deleteRow, kt as getCellTypes, l as withDeleteTable, lt as insertTableMergeRow, m as BaseTableCellPlugin, mt as getCellPath, n as withTable, nt as getLeftTableCell, o as withInsertFragmentTable, ot as splitTableCell, p as BaseTableCellHeaderPlugin, pt as getSelectionWidth, q as GetSelectedCellsBordersOptions, r as withSetFragmentDataTable, rt as getColSpan, s as withGetFragmentTable, st as mergeTableCells, t as withTableCellSelection, tt as getNextTableCell, u as withApplyTable, ut as insertTableMergeColumn, v as setTableRowSize, vt as deleteTableMergeRow, w as moveSelectionFromCell, wt as getEmptyRowNode, x as setCellBackground, xt as GetEmptyTableNodeOptions, y as setTableMarginLeft, yt as deleteColumnWhenExpanded, z as getTableEntries } from "./index-CbSGuAlP";
|
|
2
|
+
export { BaseTableCellHeaderPlugin, BaseTableCellPlugin, BaseTablePlugin, BaseTableRowPlugin, BorderDirection, BorderStylesDefault, CellIndices, CreateCellOptions, GetEmptyRowNodeOptions, GetEmptyTableNodeOptions, GetSelectedCellsBordersOptions, GetTableGridAboveOptions, GetTableGridByRangeOptions, KEY_SHIFT_EDGES, TableBorderStates, TableConfig, TableStoreSizeOverrides, computeCellIndices, deleteColumn, deleteColumnWhenExpanded, deleteRow, deleteRowWhenExpanded, deleteTable, deleteTableMergeColumn, deleteTableMergeRow, findCellByIndexes, getCellInNextTableRow, getCellInPreviousTableRow, getCellIndices, getCellIndicesWithSpans, getCellPath, getCellRowIndexByPath, getCellTypes, getColSpan, getEmptyCellNode, getEmptyRowNode, getEmptyTableNode, getLeftTableCell, getNextTableCell, getPreviousTableCell, getRowSpan, getSelectedCellsBorders, getSelectedCellsBoundingBox, getSelectionWidth, getTableAbove, getTableCellBorders, getTableCellSize, getTableColumnCount, getTableColumnIndex, getTableEntries, getTableGridAbove, getTableGridByRange, getTableMergeGridByRange, getTableMergedColumnCount, getTableOverriddenColSizes, getTableRowIndex, getTopTableCell, insertTable, insertTableColumn, insertTableMergeColumn, insertTableMergeRow, insertTableRow, isSelectedCellBorder, isSelectedCellBordersNone, isSelectedCellBordersOuter, isTableBorderHidden, isTableRectangular, mergeTableCells, moveSelectionFromCell, normalizeInitialValueTable, overrideSelectionFromCell, preventDeleteTableCell, setBorderSize, setCellBackground, setTableColSize, setTableMarginLeft, setTableRowSize, splitTableCell, withApplyTable, withDeleteTable, withGetFragmentTable, withInsertFragmentTable, withInsertTextTable, withNormalizeTable, withSetFragmentDataTable, withTable, withTableCellSelection };
|