@ckeditor/ckeditor5-table 48.2.0 → 48.3.0-alpha.1

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.
Files changed (94) hide show
  1. package/dist/augmentation.d.ts +80 -80
  2. package/dist/commands/insertcolumncommand.d.ts +50 -50
  3. package/dist/commands/insertrowcommand.d.ts +49 -49
  4. package/dist/commands/inserttablecommand.d.ts +43 -43
  5. package/dist/commands/inserttablelayoutcommand.d.ts +34 -34
  6. package/dist/commands/mergecellcommand.d.ts +63 -63
  7. package/dist/commands/mergecellscommand.d.ts +24 -24
  8. package/dist/commands/removecolumncommand.d.ts +24 -24
  9. package/dist/commands/removerowcommand.d.ts +24 -24
  10. package/dist/commands/selectcolumncommand.d.ts +28 -28
  11. package/dist/commands/selectrowcommand.d.ts +28 -28
  12. package/dist/commands/setfooterrowcommand.d.ts +48 -48
  13. package/dist/commands/setheadercolumncommand.d.ts +45 -45
  14. package/dist/commands/setheaderrowcommand.d.ts +48 -48
  15. package/dist/commands/splitcellcommand.d.ts +38 -38
  16. package/dist/converters/downcast.d.ts +77 -77
  17. package/dist/converters/table-caption-post-fixer.d.ts +18 -18
  18. package/dist/converters/table-cell-paragraph-post-fixer.d.ts +30 -30
  19. package/dist/converters/table-cell-refresh-handler.d.ts +16 -16
  20. package/dist/converters/table-layout-post-fixer.d.ts +224 -224
  21. package/dist/converters/table-structure-post-fixer.d.ts +16 -16
  22. package/dist/converters/table-structure-refresh-handler.d.ts +15 -15
  23. package/dist/converters/tableproperties.d.ts +98 -98
  24. package/dist/converters/upcasttable.d.ts +47 -47
  25. package/dist/index.css.map +1 -1
  26. package/dist/index.d.ts +98 -98
  27. package/dist/index.js +12835 -14503
  28. package/dist/index.js.map +1 -1
  29. package/dist/plaintableoutput.d.ts +28 -28
  30. package/dist/table.d.ts +39 -39
  31. package/dist/tablecaption/tablecaptionediting.d.ts +62 -62
  32. package/dist/tablecaption/tablecaptionui.d.ts +18 -18
  33. package/dist/tablecaption/toggletablecaptioncommand.d.ts +61 -61
  34. package/dist/tablecaption/utils.d.ts +31 -31
  35. package/dist/tablecaption.d.ts +23 -23
  36. package/dist/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +27 -27
  37. package/dist/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +32 -32
  38. package/dist/tablecellproperties/commands/tablecellborderstylecommand.d.ts +32 -32
  39. package/dist/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +46 -46
  40. package/dist/tablecellproperties/commands/tablecellheightcommand.d.ts +41 -41
  41. package/dist/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +27 -27
  42. package/dist/tablecellproperties/commands/tablecellpaddingcommand.d.ts +46 -46
  43. package/dist/tablecellproperties/commands/tablecellpropertycommand.d.ts +79 -79
  44. package/dist/tablecellproperties/commands/tablecelltypecommand.d.ts +42 -42
  45. package/dist/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +35 -35
  46. package/dist/tablecellproperties/tablecellpropertiesediting.d.ts +49 -49
  47. package/dist/tablecellproperties/tablecellpropertiesui.d.ts +123 -123
  48. package/dist/tablecellproperties/tablecellpropertiesutils.d.ts +13 -13
  49. package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +257 -257
  50. package/dist/tablecellproperties.d.ts +29 -29
  51. package/dist/tablecellwidth/commands/tablecellwidthcommand.d.ts +41 -41
  52. package/dist/tablecellwidth/tablecellwidthediting.d.ts +28 -28
  53. package/dist/tableclipboard.d.ts +79 -79
  54. package/dist/tablecolumnresize/constants.d.ts +23 -23
  55. package/dist/tablecolumnresize/converters.d.ts +20 -20
  56. package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +184 -184
  57. package/dist/tablecolumnresize/tablewidthscommand.d.ts +31 -31
  58. package/dist/tablecolumnresize/utils.d.ts +127 -127
  59. package/dist/tablecolumnresize.d.ts +25 -25
  60. package/dist/tableconfig.d.ts +670 -670
  61. package/dist/tableediting.d.ts +99 -99
  62. package/dist/tablekeyboard.d.ts +67 -67
  63. package/dist/tablelayout/commands/tabletypecommand.d.ts +38 -38
  64. package/dist/tablelayout/tablelayoutediting.d.ts +58 -58
  65. package/dist/tablelayout/tablelayoutui.d.ts +27 -27
  66. package/dist/tablelayout.d.ts +25 -25
  67. package/dist/tablemouse/mouseeventsobserver.d.ts +54 -54
  68. package/dist/tablemouse.d.ts +47 -47
  69. package/dist/tableproperties/commands/tablealignmentcommand.d.ts +27 -27
  70. package/dist/tableproperties/commands/tablebackgroundcolorcommand.d.ts +27 -27
  71. package/dist/tableproperties/commands/tablebordercolorcommand.d.ts +32 -32
  72. package/dist/tableproperties/commands/tableborderstylecommand.d.ts +32 -32
  73. package/dist/tableproperties/commands/tableborderwidthcommand.d.ts +46 -46
  74. package/dist/tableproperties/commands/tableheightcommand.d.ts +41 -41
  75. package/dist/tableproperties/commands/tablepropertycommand.d.ts +64 -64
  76. package/dist/tableproperties/commands/tablewidthcommand.d.ts +41 -41
  77. package/dist/tableproperties/tablepropertiesediting.d.ts +48 -48
  78. package/dist/tableproperties/tablepropertiesui.d.ts +131 -131
  79. package/dist/tableproperties/ui/tablepropertiesview.d.ts +207 -207
  80. package/dist/tableproperties.d.ts +29 -29
  81. package/dist/tableselection.d.ts +106 -106
  82. package/dist/tabletoolbar.d.ts +31 -31
  83. package/dist/tableui.d.ts +53 -53
  84. package/dist/tableutils.d.ts +532 -532
  85. package/dist/tablewalker.d.ts +342 -350
  86. package/dist/ui/colorinputview.d.ts +137 -137
  87. package/dist/ui/inserttableview.d.ts +78 -78
  88. package/dist/utils/common.d.ts +58 -58
  89. package/dist/utils/structure.d.ts +229 -229
  90. package/dist/utils/table-properties.d.ts +92 -92
  91. package/dist/utils/ui/contextualballoon.d.ts +28 -28
  92. package/dist/utils/ui/table-properties.d.ts +195 -192
  93. package/dist/utils/ui/widget.d.ts +22 -22
  94. package/package.json +9 -9
@@ -1,541 +1,541 @@
1
1
  /**
2
- * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
- * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
- */
5
- import { Plugin } from '@ckeditor/ckeditor5-core';
6
- import type { ModelDocumentSelection, ModelElement, ModelRange, ModelSelection, ModelWriter } from '@ckeditor/ckeditor5-engine';
7
- import { TableWalker, type TableWalkerOptions } from './tablewalker.js';
2
+ * @license Copyright (c) 2003-2026, CKSource Holding sp. z o.o. All rights reserved.
3
+ * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
4
+ */
5
+ import { Plugin } from "@ckeditor/ckeditor5-core";
6
+ import type { ModelDocumentSelection, ModelElement, ModelRange, ModelSelection, ModelWriter } from "@ckeditor/ckeditor5-engine";
7
+ import { TableWalker, type TableWalkerOptions } from "./tablewalker.js";
8
8
  export type TableIndexesObject = {
9
- first: number;
10
- last: number;
9
+ first: number;
10
+ last: number;
11
11
  };
12
12
  /**
13
- * The table utilities plugin.
14
- */
13
+ * The table utilities plugin.
14
+ */
15
15
  export declare class TableUtils extends Plugin {
16
- /**
17
- * @inheritDoc
18
- */
19
- static get pluginName(): "TableUtils";
20
- /**
21
- * @inheritDoc
22
- */
23
- static get isOfficialPlugin(): true;
24
- /**
25
- * @inheritDoc
26
- */
27
- init(): void;
28
- /**
29
- * Returns the table cell location as an object with table row and table column indexes.
30
- *
31
- * For instance, in the table below:
32
- *
33
- * 0 1 2 3
34
- * +---+---+---+---+
35
- * 0 | a | b | c |
36
- * + + +---+
37
- * 1 | | | d |
38
- * +---+---+ +---+
39
- * 2 | e | | f |
40
- * +---+---+---+---+
41
- *
42
- * the method will return:
43
- *
44
- * ```ts
45
- * const cellA = table.getNodeByPath( [ 0, 0 ] );
46
- * editor.plugins.get( 'TableUtils' ).getCellLocation( cellA );
47
- * // will return { row: 0, column: 0 }
48
- *
49
- * const cellD = table.getNodeByPath( [ 1, 0 ] );
50
- * editor.plugins.get( 'TableUtils' ).getCellLocation( cellD );
51
- * // will return { row: 1, column: 3 }
52
- * ```
53
- *
54
- * @returns Returns a `{row, column}` object.
55
- */
56
- getCellLocation(tableCell: ModelElement): {
57
- row: number;
58
- column: number;
59
- };
60
- /**
61
- * Creates an empty table with a proper structure. The table needs to be inserted into the model,
62
- * for example, by using the {@link module:engine/model/model~Model#insertContent} function.
63
- *
64
- * ```ts
65
- * model.change( ( writer ) => {
66
- * // Create a table of 2 rows and 7 columns:
67
- * const table = tableUtils.createTable( writer, { rows: 2, columns: 7 } );
68
- *
69
- * // Insert a table to the model at the best position taking the current selection:
70
- * model.insertContent( table );
71
- * }
72
- * ```
73
- *
74
- * @param writer The model writer.
75
- * @param options.rows The number of rows to create. Default value is 2.
76
- * @param options.columns The number of columns to create. Default value is 2.
77
- * @param options.headingRows The number of heading rows. Default value is 0.
78
- * @param options.headingColumns The number of heading columns. Default value is 0.
79
- * @param options.footerRows The number of footer rows. Default value is 0.
80
- * @returns The created table element.
81
- */
82
- createTable(writer: ModelWriter, options: {
83
- rows?: number;
84
- columns?: number;
85
- headingRows?: number;
86
- headingColumns?: number;
87
- footerRows?: number;
88
- }): ModelElement;
89
- /**
90
- * Inserts rows into a table.
91
- *
92
- * ```ts
93
- * editor.plugins.get( 'TableUtils' ).insertRows( table, { at: 1, rows: 2 } );
94
- * ```
95
- *
96
- * Assuming the table on the left, the above code will transform it to the table on the right:
97
- *
98
- * row index
99
- * 0 +---+---+---+ `at` = 1, +---+---+---+ 0
100
- * | a | b | c | `rows` = 2, | a | b | c |
101
- * 1 + +---+---+ <-- insert here + +---+---+ 1
102
- * | | d | e | | | | |
103
- * 2 + +---+---+ will give: + +---+---+ 2
104
- * | | f | g | | | | |
105
- * 3 +---+---+---+ + +---+---+ 3
106
- * | | d | e |
107
- * + +---+---+ 4
108
- * + + f | g |
109
- * +---+---+---+ 5
110
- *
111
- * @param table The table model element where the rows will be inserted.
112
- * @param options.at The row index at which the rows will be inserted. Default value is 0.
113
- * @param options.rows The number of rows to insert. Default value is 1.
114
- * @param options.copyStructureFromAbove The flag for copying row structure. Note that
115
- * the row structure will not be copied if this option is not provided.
116
- */
117
- insertRows(table: ModelElement, options?: {
118
- at?: number;
119
- rows?: number;
120
- copyStructureFromAbove?: boolean;
121
- }): void;
122
- /**
123
- * Inserts columns into a table.
124
- *
125
- * ```ts
126
- * editor.plugins.get( 'TableUtils' ).insertColumns( table, { at: 1, columns: 2 } );
127
- * ```
128
- *
129
- * Assuming the table on the left, the above code will transform it to the table on the right:
130
- *
131
- * 0 1 2 3 0 1 2 3 4 5
132
- * +---+---+---+ +---+---+---+---+---+
133
- * | a | b | | a | b |
134
- * + +---+ + +---+
135
- * | | c | | | c |
136
- * +---+---+---+ will give: +---+---+---+---+---+
137
- * | d | e | f | | d | | | e | f |
138
- * +---+ +---+ +---+---+---+ +---+
139
- * | g | | h | | g | | | | h |
140
- * +---+---+---+ +---+---+---+---+---+
141
- * | i | | i |
142
- * +---+---+---+ +---+---+---+---+---+
143
- * ^---- insert here, `at` = 1, `columns` = 2
144
- *
145
- * @param table The table model element where the columns will be inserted.
146
- * @param options.at The column index at which the columns will be inserted. Default value is 0.
147
- * @param options.columns The number of columns to insert. Default value is 1.
148
- */
149
- insertColumns(table: ModelElement, options?: {
150
- at?: number;
151
- columns?: number;
152
- }): void;
153
- /**
154
- * Removes rows from the given `table`.
155
- *
156
- * This method re-calculates the table geometry including `rowspan` attribute of table cells overlapping removed rows
157
- * and table headings values.
158
- *
159
- * ```ts
160
- * editor.plugins.get( 'TableUtils' ).removeRows( table, { at: 1, rows: 2 } );
161
- * ```
162
- *
163
- * Executing the above code in the context of the table on the left will transform its structure as presented on the right:
164
- *
165
- * row index
166
- * ┌───┬───┬───┐ `at` = 1 ┌───┬───┬───┐
167
- * 0 │ a │ b │ c │ `rows` = 2 │ a │ b │ c │ 0
168
- * │ ├───┼───┤ │ ├───┼───┤
169
- * 1 │ │ d │ e │ <-- remove from here │ │ d │ g │ 1
170
- * │ │ ├───┤ will give: ├───┼───┼───┤
171
- * 2 │ │ │ f │ │ h │ i │ j │ 2
172
- * │ │ ├───┤ └───┴───┴───┘
173
- * 3 │ │ │ g │
174
- * ├───┼───┼───┤
175
- * 4 │ h │ i │ j │
176
- * └───┴───┴───┘
177
- *
178
- * @param options.at The row index at which the removing rows will start.
179
- * @param options.rows The number of rows to remove. Default value is 1.
180
- */
181
- removeRows(table: ModelElement, options: {
182
- at: number;
183
- rows?: number;
184
- }): void;
185
- /**
186
- * Removes columns from the given `table`.
187
- *
188
- * This method re-calculates the table geometry including the `colspan` attribute of table cells overlapping removed columns
189
- * and table headings values.
190
- *
191
- * ```ts
192
- * editor.plugins.get( 'TableUtils' ).removeColumns( table, { at: 1, columns: 2 } );
193
- * ```
194
- *
195
- * Executing the above code in the context of the table on the left will transform its structure as presented on the right:
196
- *
197
- * 0 1 2 3 4 0 1 2
198
- * ┌───────────────┬───┐ ┌───────┬───┐
199
- * │ a │ b │ │ a │ b │
200
- * │ ├───┤ │ ├───┤
201
- * │ │ c │ │ │ c │
202
- * ├───┬───┬───┬───┼───┤ will give: ├───┬───┼───┤
203
- * │ d │ e │ f │ g │ h │ │ d │ g │ h │
204
- * ├───┼───┼───┤ ├───┤ ├───┤ ├───┤
205
- * │ i │ j │ k │ │ l │ │ i │ │ l │
206
- * ├───┴───┴───┴───┴───┤ ├───┴───┴───┤
207
- * │ m │ │ m │
208
- * └───────────────────┘ └───────────┘
209
- * ^---- remove from here, `at` = 1, `columns` = 2
210
- *
211
- * @param options.at The row index at which the removing columns will start.
212
- * @param options.columns The number of columns to remove.
213
- */
214
- removeColumns(table: ModelElement, options: {
215
- at: number;
216
- columns?: number;
217
- }): void;
218
- /**
219
- * Divides a table cell vertically into several ones.
220
- *
221
- * The cell will be visually split into more cells by updating colspans of other cells in a column
222
- * and inserting cells (columns) after that cell.
223
- *
224
- * In the table below, if cell "a" is split into 3 cells:
225
- *
226
- * +---+---+---+
227
- * | a | b | c |
228
- * +---+---+---+
229
- * | d | e | f |
230
- * +---+---+---+
231
- *
232
- * it will result in the table below:
233
- *
234
- * +---+---+---+---+---+
235
- * | a | | | b | c |
236
- * +---+---+---+---+---+
237
- * | d | e | f |
238
- * +---+---+---+---+---+
239
- *
240
- * So cell "d" will get its `colspan` updated to `3` and 2 cells will be added (2 columns will be created).
241
- *
242
- * Splitting a cell that already has a `colspan` attribute set will distribute the cell `colspan` evenly and the remainder
243
- * will be left to the original cell:
244
- *
245
- * +---+---+---+
246
- * | a |
247
- * +---+---+---+
248
- * | b | c | d |
249
- * +---+---+---+
250
- *
251
- * Splitting cell "a" with `colspan=3` into 2 cells will create 1 cell with a `colspan=a` and cell "a" that will have `colspan=2`:
252
- *
253
- * +---+---+---+
254
- * | a | |
255
- * +---+---+---+
256
- * | b | c | d |
257
- * +---+---+---+
258
- */
259
- splitCellVertically(tableCell: ModelElement, numberOfCells?: number): void;
260
- /**
261
- * Divides a table cell horizontally into several ones.
262
- *
263
- * The cell will be visually split into more cells by updating rowspans of other cells in the row and inserting rows with a single cell
264
- * below.
265
- *
266
- * If in the table below cell "b" is split into 3 cells:
267
- *
268
- * +---+---+---+
269
- * | a | b | c |
270
- * +---+---+---+
271
- * | d | e | f |
272
- * +---+---+---+
273
- *
274
- * It will result in the table below:
275
- *
276
- * +---+---+---+
277
- * | a | b | c |
278
- * + +---+ +
279
- * | | | |
280
- * + +---+ +
281
- * | | | |
282
- * +---+---+---+
283
- * | d | e | f |
284
- * +---+---+---+
285
- *
286
- * So cells "a" and "b" will get their `rowspan` updated to `3` and 2 rows with a single cell will be added.
287
- *
288
- * Splitting a cell that already has a `rowspan` attribute set will distribute the cell `rowspan` evenly and the remainder
289
- * will be left to the original cell:
290
- *
291
- * +---+---+---+
292
- * | a | b | c |
293
- * + +---+---+
294
- * | | d | e |
295
- * + +---+---+
296
- * | | f | g |
297
- * + +---+---+
298
- * | | h | i |
299
- * +---+---+---+
300
- *
301
- * Splitting cell "a" with `rowspan=4` into 3 cells will create 2 cells with a `rowspan=1` and cell "a" will have `rowspan=2`:
302
- *
303
- * +---+---+---+
304
- * | a | b | c |
305
- * + +---+---+
306
- * | | d | e |
307
- * +---+---+---+
308
- * | | f | g |
309
- * +---+---+---+
310
- * | | h | i |
311
- * +---+---+---+
312
- */
313
- splitCellHorizontally(tableCell: ModelElement, numberOfCells?: number): void;
314
- /**
315
- * Returns the number of columns for a given table.
316
- *
317
- * ```ts
318
- * editor.plugins.get( 'TableUtils' ).getColumns( table );
319
- * ```
320
- *
321
- * @param table The table to analyze.
322
- */
323
- getColumns(table: ModelElement): number;
324
- /**
325
- * Returns the number of rows for a given table. Any other element present in the table model is omitted.
326
- *
327
- * ```ts
328
- * editor.plugins.get( 'TableUtils' ).getRows( table );
329
- * ```
330
- *
331
- * @param table The table to analyze.
332
- */
333
- getRows(table: ModelElement): number;
334
- /**
335
- * Creates an instance of the table walker.
336
- *
337
- * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.
338
- * It walks row by row and column by column in order to output values defined in the options.
339
- * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,
340
- * pass the `includeAllSlots` option.
341
- *
342
- * @internal
343
- * @param table A table over which the walker iterates.
344
- * @param options An object with configuration.
345
- */
346
- createTableWalker(table: ModelElement, options?: TableWalkerOptions): TableWalker;
347
- /**
348
- * Returns all model table cells that are fully selected (from the outside)
349
- * within the provided model selection's ranges.
350
- *
351
- * To obtain the cells selected from the inside, use
352
- * {@link #getTableCellsContainingSelection}.
353
- */
354
- getSelectedTableCells(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
355
- /**
356
- * Sets the number of footer rows for the given `table`.
357
- *
358
- * * If number of footer rows is greater than the number of rows in the table, it will be truncated to the number of rows.
359
- * * If footer rows and heading rows overlap, the number of heading rows will be adjusted
360
- *
361
- * It'll have no effect if {@link module:table/tableconfig~TableConfig#enableFooters `table.enableFooters`} is set to `false`.
362
- *
363
- * @param writer The model writer.
364
- * @param table The table model element.
365
- * @param footerRows The number of footer rows to set.
366
- */
367
- setFooterRowsCount(writer: ModelWriter, table: ModelElement, footerRows: number): void;
368
- /**
369
- * Sets the number of heading rows for the given `table`.
370
- *
371
- * If number of heading rows is greater than the number of rows in the table,
372
- * it will be truncated to the number of rows.
373
- *
374
- * @param writer The model writer.
375
- * @param table The table model element.
376
- * @param headingRows The number of heading rows to set.
377
- * @param options Additional options.
378
- * @param options.updateCellType If set to `false` it will only update the `headingRows` attribute
379
- * without updating the cell types in the table. Default is `true`.
380
- * @param options.resetFormerHeadingCells If set to `true`, it will check if the rows that are no longer in the heading section
381
- * should be updated to body cells. Default is `true`.
382
- * @param options.autoExpand If set to `true`, it will check if the following rows look like a header and expand the heading section.
383
- * Default is `true`.
384
- */
385
- setHeadingRowsCount(writer: ModelWriter, table: ModelElement, headingRows: number, options?: UpdateTableHeadingsOptions): void;
386
- /**
387
- * Sets the number of heading columns for the given `table`.
388
- *
389
- * If number of heading columns is greater than the number of columns in the table,
390
- * it will be truncated to the number of columns.
391
- *
392
- * @param writer The model writer to use.
393
- * @param table The table model element.
394
- * @param headingColumns The number of heading columns to set.
395
- * @param options Additional options.
396
- * @param options.updateCellType If set to `false` it will only update the `headingColumns` attribute
397
- * without updating the cell types in the table. Default is `true`.
398
- * @param options.resetFormerHeadingCells If set to `true`, it will check if the columns that are no longer in the heading section
399
- * should be updated to body cells. Default is `true`.
400
- * @param options.autoExpand If set to `true`, it will check if the following columns look like a header and expand the heading section.
401
- * Default is `true`.
402
- */
403
- setHeadingColumnsCount(writer: ModelWriter, table: ModelElement, headingColumns: number, options?: UpdateTableHeadingsOptions): void;
404
- /**
405
- * Returns all model table cells that the provided model selection's ranges
406
- * {@link module:engine/model/range~ModelRange#start} inside.
407
- *
408
- * To obtain the cells selected from the outside, use
409
- * {@link #getSelectedTableCells}.
410
- */
411
- getTableCellsContainingSelection(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
412
- /**
413
- * Returns all model table cells that are either completely selected
414
- * by selection ranges or host selection range
415
- * {@link module:engine/model/range~ModelRange#start start positions} inside them.
416
- *
417
- * Combines {@link #getTableCellsContainingSelection} and
418
- * {@link #getSelectedTableCells}.
419
- */
420
- getSelectionAffectedTableCells(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
421
- /**
422
- * Returns an object with the `first` and `last` row index contained in the given `tableCells`.
423
- *
424
- * ```ts
425
- * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );
426
- *
427
- * const { first, last } = getRowIndexes( selectedTableCells );
428
- *
429
- * console.log( `Selected rows: ${ first } to ${ last }` );
430
- * ```
431
- *
432
- * @returns Returns an object with the `first` and `last` table row indexes.
433
- */
434
- getRowIndexes(tableCells: Array<ModelElement>): TableIndexesObject;
435
- /**
436
- * Returns an object with the `first` and `last` column index contained in the given `tableCells`.
437
- *
438
- * ```ts
439
- * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );
440
- *
441
- * const { first, last } = getColumnIndexes( selectedTableCells );
442
- *
443
- * console.log( `Selected columns: ${ first } to ${ last }` );
444
- * ```
445
- *
446
- * @returns Returns an object with the `first` and `last` table column indexes.
447
- */
448
- getColumnIndexes(tableCells: Array<ModelElement>): TableIndexesObject;
449
- /**
450
- * Checks if the selection contains cells that do not exceed rectangular selection.
451
- *
452
- * In a table below:
453
- *
454
- * ┌───┬───┬───┬───┐
455
- * │ a │ b │ c │ d │
456
- * ├───┴───┼───┤ │
457
- * │ e │ f │ │
458
- * │ ├───┼───┤
459
- * │ │ g │ h │
460
- * └───────┴───┴───┘
461
- *
462
- * Valid selections are these which create a solid rectangle (without gaps), such as:
463
- * - a, b (two horizontal cells)
464
- * - c, f (two vertical cells)
465
- * - a, b, e (cell "e" spans over four cells)
466
- * - c, d, f (cell d spans over a cell in the row below)
467
- *
468
- * While an invalid selection would be:
469
- * - a, c (the unselected cell "b" creates a gap)
470
- * - f, g, h (cell "d" spans over a cell from the row of "f" cell - thus creates a gap)
471
- */
472
- isSelectionRectangular(selectedTableCells: Array<ModelElement>): boolean;
473
- /**
474
- * Returns array of sorted ranges.
475
- */
476
- sortRanges(ranges: Iterable<ModelRange>): Array<ModelRange>;
477
- /**
478
- * Helper method to get an object with `first` and `last` indexes from an unsorted array of indexes.
479
- */
480
- private _getFirstLastIndexesObject;
481
- /**
482
- * Checks if the selection does not mix a header (column or row) with other cells.
483
- *
484
- * For instance, in the table below valid selections consist of cells with the same letter only.
485
- * So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.
486
- *
487
- * header columns
488
- * ↓ ↓
489
- * ┌───┬───┬───┬───┐
490
- * │ a │ a │ b │ b │ ← header row
491
- * ├───┼───┼───┼───┤
492
- * │ c │ c │ d │ d │
493
- * ├───┼───┼───┼───┤
494
- * │ c │ c │ d │ d │
495
- * └───┴───┴───┴───┘
496
- */
497
- private _areCellInTheSameTableSection;
498
- /**
499
- * Unified check if table rows/columns indexes are in the same heading/body section.
500
- */
501
- private _areIndexesInSameHeadingSection;
502
- /**
503
- * Unified check if table rows indexes are in the same footer/body section.
504
- */
505
- private _areIndexesInSameFooterSection;
16
+ /**
17
+ * @inheritDoc
18
+ */
19
+ static get pluginName(): "TableUtils";
20
+ /**
21
+ * @inheritDoc
22
+ */
23
+ static override get isOfficialPlugin(): true;
24
+ /**
25
+ * @inheritDoc
26
+ */
27
+ init(): void;
28
+ /**
29
+ * Returns the table cell location as an object with table row and table column indexes.
30
+ *
31
+ * For instance, in the table below:
32
+ *
33
+ * 0 1 2 3
34
+ * +---+---+---+---+
35
+ * 0 | a | b | c |
36
+ * + + +---+
37
+ * 1 | | | d |
38
+ * +---+---+ +---+
39
+ * 2 | e | | f |
40
+ * +---+---+---+---+
41
+ *
42
+ * the method will return:
43
+ *
44
+ * ```ts
45
+ * const cellA = table.getNodeByPath( [ 0, 0 ] );
46
+ * editor.plugins.get( 'TableUtils' ).getCellLocation( cellA );
47
+ * // will return { row: 0, column: 0 }
48
+ *
49
+ * const cellD = table.getNodeByPath( [ 1, 0 ] );
50
+ * editor.plugins.get( 'TableUtils' ).getCellLocation( cellD );
51
+ * // will return { row: 1, column: 3 }
52
+ * ```
53
+ *
54
+ * @returns Returns a `{row, column}` object.
55
+ */
56
+ getCellLocation(tableCell: ModelElement): {
57
+ row: number;
58
+ column: number;
59
+ };
60
+ /**
61
+ * Creates an empty table with a proper structure. The table needs to be inserted into the model,
62
+ * for example, by using the {@link module:engine/model/model~Model#insertContent} function.
63
+ *
64
+ * ```ts
65
+ * model.change( ( writer ) => {
66
+ * // Create a table of 2 rows and 7 columns:
67
+ * const table = tableUtils.createTable( writer, { rows: 2, columns: 7 } );
68
+ *
69
+ * // Insert a table to the model at the best position taking the current selection:
70
+ * model.insertContent( table );
71
+ * }
72
+ * ```
73
+ *
74
+ * @param writer The model writer.
75
+ * @param options.rows The number of rows to create. Default value is 2.
76
+ * @param options.columns The number of columns to create. Default value is 2.
77
+ * @param options.headingRows The number of heading rows. Default value is 0.
78
+ * @param options.headingColumns The number of heading columns. Default value is 0.
79
+ * @param options.footerRows The number of footer rows. Default value is 0.
80
+ * @returns The created table element.
81
+ */
82
+ createTable(writer: ModelWriter, options: {
83
+ rows?: number;
84
+ columns?: number;
85
+ headingRows?: number;
86
+ headingColumns?: number;
87
+ footerRows?: number;
88
+ }): ModelElement;
89
+ /**
90
+ * Inserts rows into a table.
91
+ *
92
+ * ```ts
93
+ * editor.plugins.get( 'TableUtils' ).insertRows( table, { at: 1, rows: 2 } );
94
+ * ```
95
+ *
96
+ * Assuming the table on the left, the above code will transform it to the table on the right:
97
+ *
98
+ * row index
99
+ * 0 +---+---+---+ `at` = 1, +---+---+---+ 0
100
+ * | a | b | c | `rows` = 2, | a | b | c |
101
+ * 1 + +---+---+ <-- insert here + +---+---+ 1
102
+ * | | d | e | | | | |
103
+ * 2 + +---+---+ will give: + +---+---+ 2
104
+ * | | f | g | | | | |
105
+ * 3 +---+---+---+ + +---+---+ 3
106
+ * | | d | e |
107
+ * + +---+---+ 4
108
+ * + + f | g |
109
+ * +---+---+---+ 5
110
+ *
111
+ * @param table The table model element where the rows will be inserted.
112
+ * @param options.at The row index at which the rows will be inserted. Default value is 0.
113
+ * @param options.rows The number of rows to insert. Default value is 1.
114
+ * @param options.copyStructureFromAbove The flag for copying row structure. Note that
115
+ * the row structure will not be copied if this option is not provided.
116
+ */
117
+ insertRows(table: ModelElement, options?: {
118
+ at?: number;
119
+ rows?: number;
120
+ copyStructureFromAbove?: boolean;
121
+ }): void;
122
+ /**
123
+ * Inserts columns into a table.
124
+ *
125
+ * ```ts
126
+ * editor.plugins.get( 'TableUtils' ).insertColumns( table, { at: 1, columns: 2 } );
127
+ * ```
128
+ *
129
+ * Assuming the table on the left, the above code will transform it to the table on the right:
130
+ *
131
+ * 0 1 2 3 0 1 2 3 4 5
132
+ * +---+---+---+ +---+---+---+---+---+
133
+ * | a | b | | a | b |
134
+ * + +---+ + +---+
135
+ * | | c | | | c |
136
+ * +---+---+---+ will give: +---+---+---+---+---+
137
+ * | d | e | f | | d | | | e | f |
138
+ * +---+ +---+ +---+---+---+ +---+
139
+ * | g | | h | | g | | | | h |
140
+ * +---+---+---+ +---+---+---+---+---+
141
+ * | i | | i |
142
+ * +---+---+---+ +---+---+---+---+---+
143
+ * ^---- insert here, `at` = 1, `columns` = 2
144
+ *
145
+ * @param table The table model element where the columns will be inserted.
146
+ * @param options.at The column index at which the columns will be inserted. Default value is 0.
147
+ * @param options.columns The number of columns to insert. Default value is 1.
148
+ */
149
+ insertColumns(table: ModelElement, options?: {
150
+ at?: number;
151
+ columns?: number;
152
+ }): void;
153
+ /**
154
+ * Removes rows from the given `table`.
155
+ *
156
+ * This method re-calculates the table geometry including `rowspan` attribute of table cells overlapping removed rows
157
+ * and table headings values.
158
+ *
159
+ * ```ts
160
+ * editor.plugins.get( 'TableUtils' ).removeRows( table, { at: 1, rows: 2 } );
161
+ * ```
162
+ *
163
+ * Executing the above code in the context of the table on the left will transform its structure as presented on the right:
164
+ *
165
+ * row index
166
+ * ┌───┬───┬───┐ `at` = 1 ┌───┬───┬───┐
167
+ * 0 │ a │ b │ c │ `rows` = 2 │ a │ b │ c │ 0
168
+ * │ ├───┼───┤ │ ├───┼───┤
169
+ * 1 │ │ d │ e │ <-- remove from here │ │ d │ g │ 1
170
+ * │ │ ├───┤ will give: ├───┼───┼───┤
171
+ * 2 │ │ │ f │ │ h │ i │ j │ 2
172
+ * │ │ ├───┤ └───┴───┴───┘
173
+ * 3 │ │ │ g │
174
+ * ├───┼───┼───┤
175
+ * 4 │ h │ i │ j │
176
+ * └───┴───┴───┘
177
+ *
178
+ * @param options.at The row index at which the removing rows will start.
179
+ * @param options.rows The number of rows to remove. Default value is 1.
180
+ */
181
+ removeRows(table: ModelElement, options: {
182
+ at: number;
183
+ rows?: number;
184
+ }): void;
185
+ /**
186
+ * Removes columns from the given `table`.
187
+ *
188
+ * This method re-calculates the table geometry including the `colspan` attribute of table cells overlapping removed columns
189
+ * and table headings values.
190
+ *
191
+ * ```ts
192
+ * editor.plugins.get( 'TableUtils' ).removeColumns( table, { at: 1, columns: 2 } );
193
+ * ```
194
+ *
195
+ * Executing the above code in the context of the table on the left will transform its structure as presented on the right:
196
+ *
197
+ * 0 1 2 3 4 0 1 2
198
+ * ┌───────────────┬───┐ ┌───────┬───┐
199
+ * │ a │ b │ │ a │ b │
200
+ * │ ├───┤ │ ├───┤
201
+ * │ │ c │ │ │ c │
202
+ * ├───┬───┬───┬───┼───┤ will give: ├───┬───┼───┤
203
+ * │ d │ e │ f │ g │ h │ │ d │ g │ h │
204
+ * ├───┼───┼───┤ ├───┤ ├───┤ ├───┤
205
+ * │ i │ j │ k │ │ l │ │ i │ │ l │
206
+ * ├───┴───┴───┴───┴───┤ ├───┴───┴───┤
207
+ * │ m │ │ m │
208
+ * └───────────────────┘ └───────────┘
209
+ * ^---- remove from here, `at` = 1, `columns` = 2
210
+ *
211
+ * @param options.at The row index at which the removing columns will start.
212
+ * @param options.columns The number of columns to remove.
213
+ */
214
+ removeColumns(table: ModelElement, options: {
215
+ at: number;
216
+ columns?: number;
217
+ }): void;
218
+ /**
219
+ * Divides a table cell vertically into several ones.
220
+ *
221
+ * The cell will be visually split into more cells by updating colspans of other cells in a column
222
+ * and inserting cells (columns) after that cell.
223
+ *
224
+ * In the table below, if cell "a" is split into 3 cells:
225
+ *
226
+ * +---+---+---+
227
+ * | a | b | c |
228
+ * +---+---+---+
229
+ * | d | e | f |
230
+ * +---+---+---+
231
+ *
232
+ * it will result in the table below:
233
+ *
234
+ * +---+---+---+---+---+
235
+ * | a | | | b | c |
236
+ * +---+---+---+---+---+
237
+ * | d | e | f |
238
+ * +---+---+---+---+---+
239
+ *
240
+ * So cell "d" will get its `colspan` updated to `3` and 2 cells will be added (2 columns will be created).
241
+ *
242
+ * Splitting a cell that already has a `colspan` attribute set will distribute the cell `colspan` evenly and the remainder
243
+ * will be left to the original cell:
244
+ *
245
+ * +---+---+---+
246
+ * | a |
247
+ * +---+---+---+
248
+ * | b | c | d |
249
+ * +---+---+---+
250
+ *
251
+ * Splitting cell "a" with `colspan=3` into 2 cells will create 1 cell with a `colspan=a` and cell "a" that will have `colspan=2`:
252
+ *
253
+ * +---+---+---+
254
+ * | a | |
255
+ * +---+---+---+
256
+ * | b | c | d |
257
+ * +---+---+---+
258
+ */
259
+ splitCellVertically(tableCell: ModelElement, numberOfCells?: number): void;
260
+ /**
261
+ * Divides a table cell horizontally into several ones.
262
+ *
263
+ * The cell will be visually split into more cells by updating rowspans of other cells in the row and inserting rows with a single cell
264
+ * below.
265
+ *
266
+ * If in the table below cell "b" is split into 3 cells:
267
+ *
268
+ * +---+---+---+
269
+ * | a | b | c |
270
+ * +---+---+---+
271
+ * | d | e | f |
272
+ * +---+---+---+
273
+ *
274
+ * It will result in the table below:
275
+ *
276
+ * +---+---+---+
277
+ * | a | b | c |
278
+ * + +---+ +
279
+ * | | | |
280
+ * + +---+ +
281
+ * | | | |
282
+ * +---+---+---+
283
+ * | d | e | f |
284
+ * +---+---+---+
285
+ *
286
+ * So cells "a" and "b" will get their `rowspan` updated to `3` and 2 rows with a single cell will be added.
287
+ *
288
+ * Splitting a cell that already has a `rowspan` attribute set will distribute the cell `rowspan` evenly and the remainder
289
+ * will be left to the original cell:
290
+ *
291
+ * +---+---+---+
292
+ * | a | b | c |
293
+ * + +---+---+
294
+ * | | d | e |
295
+ * + +---+---+
296
+ * | | f | g |
297
+ * + +---+---+
298
+ * | | h | i |
299
+ * +---+---+---+
300
+ *
301
+ * Splitting cell "a" with `rowspan=4` into 3 cells will create 2 cells with a `rowspan=1` and cell "a" will have `rowspan=2`:
302
+ *
303
+ * +---+---+---+
304
+ * | a | b | c |
305
+ * + +---+---+
306
+ * | | d | e |
307
+ * +---+---+---+
308
+ * | | f | g |
309
+ * +---+---+---+
310
+ * | | h | i |
311
+ * +---+---+---+
312
+ */
313
+ splitCellHorizontally(tableCell: ModelElement, numberOfCells?: number): void;
314
+ /**
315
+ * Returns the number of columns for a given table.
316
+ *
317
+ * ```ts
318
+ * editor.plugins.get( 'TableUtils' ).getColumns( table );
319
+ * ```
320
+ *
321
+ * @param table The table to analyze.
322
+ */
323
+ getColumns(table: ModelElement): number;
324
+ /**
325
+ * Returns the number of rows for a given table. Any other element present in the table model is omitted.
326
+ *
327
+ * ```ts
328
+ * editor.plugins.get( 'TableUtils' ).getRows( table );
329
+ * ```
330
+ *
331
+ * @param table The table to analyze.
332
+ */
333
+ getRows(table: ModelElement): number;
334
+ /**
335
+ * Creates an instance of the table walker.
336
+ *
337
+ * The table walker iterates internally by traversing the table from row index = 0 and column index = 0.
338
+ * It walks row by row and column by column in order to output values defined in the options.
339
+ * By default it will output only the locations that are occupied by a cell. To include also spanned rows and columns,
340
+ * pass the `includeAllSlots` option.
341
+ *
342
+ * @internal
343
+ * @param table A table over which the walker iterates.
344
+ * @param options An object with configuration.
345
+ */
346
+ createTableWalker(table: ModelElement, options?: TableWalkerOptions): TableWalker;
347
+ /**
348
+ * Returns all model table cells that are fully selected (from the outside)
349
+ * within the provided model selection's ranges.
350
+ *
351
+ * To obtain the cells selected from the inside, use
352
+ * {@link #getTableCellsContainingSelection}.
353
+ */
354
+ getSelectedTableCells(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
355
+ /**
356
+ * Sets the number of footer rows for the given `table`.
357
+ *
358
+ * * If number of footer rows is greater than the number of rows in the table, it will be truncated to the number of rows.
359
+ * * If footer rows and heading rows overlap, the number of heading rows will be adjusted
360
+ *
361
+ * It'll have no effect if {@link module:table/tableconfig~TableConfig#enableFooters `table.enableFooters`} is set to `false`.
362
+ *
363
+ * @param writer The model writer.
364
+ * @param table The table model element.
365
+ * @param footerRows The number of footer rows to set.
366
+ */
367
+ setFooterRowsCount(writer: ModelWriter, table: ModelElement, footerRows: number): void;
368
+ /**
369
+ * Sets the number of heading rows for the given `table`.
370
+ *
371
+ * If number of heading rows is greater than the number of rows in the table,
372
+ * it will be truncated to the number of rows.
373
+ *
374
+ * @param writer The model writer.
375
+ * @param table The table model element.
376
+ * @param headingRows The number of heading rows to set.
377
+ * @param options Additional options.
378
+ * @param options.updateCellType If set to `false` it will only update the `headingRows` attribute
379
+ * without updating the cell types in the table. Default is `true`.
380
+ * @param options.resetFormerHeadingCells If set to `true`, it will check if the rows that are no longer in the heading section
381
+ * should be updated to body cells. Default is `true`.
382
+ * @param options.autoExpand If set to `true`, it will check if the following rows look like a header and expand the heading section.
383
+ * Default is `true`.
384
+ */
385
+ setHeadingRowsCount(writer: ModelWriter, table: ModelElement, headingRows: number, options?: UpdateTableHeadingsOptions): void;
386
+ /**
387
+ * Sets the number of heading columns for the given `table`.
388
+ *
389
+ * If number of heading columns is greater than the number of columns in the table,
390
+ * it will be truncated to the number of columns.
391
+ *
392
+ * @param writer The model writer to use.
393
+ * @param table The table model element.
394
+ * @param headingColumns The number of heading columns to set.
395
+ * @param options Additional options.
396
+ * @param options.updateCellType If set to `false` it will only update the `headingColumns` attribute
397
+ * without updating the cell types in the table. Default is `true`.
398
+ * @param options.resetFormerHeadingCells If set to `true`, it will check if the columns that are no longer in the heading section
399
+ * should be updated to body cells. Default is `true`.
400
+ * @param options.autoExpand If set to `true`, it will check if the following columns look like a header and expand the heading section.
401
+ * Default is `true`.
402
+ */
403
+ setHeadingColumnsCount(writer: ModelWriter, table: ModelElement, headingColumns: number, options?: UpdateTableHeadingsOptions): void;
404
+ /**
405
+ * Returns all model table cells that the provided model selection's ranges
406
+ * {@link module:engine/model/range~ModelRange#start} inside.
407
+ *
408
+ * To obtain the cells selected from the outside, use
409
+ * {@link #getSelectedTableCells}.
410
+ */
411
+ getTableCellsContainingSelection(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
412
+ /**
413
+ * Returns all model table cells that are either completely selected
414
+ * by selection ranges or host selection range
415
+ * {@link module:engine/model/range~ModelRange#start start positions} inside them.
416
+ *
417
+ * Combines {@link #getTableCellsContainingSelection} and
418
+ * {@link #getSelectedTableCells}.
419
+ */
420
+ getSelectionAffectedTableCells(selection: ModelSelection | ModelDocumentSelection): Array<ModelElement>;
421
+ /**
422
+ * Returns an object with the `first` and `last` row index contained in the given `tableCells`.
423
+ *
424
+ * ```ts
425
+ * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );
426
+ *
427
+ * const { first, last } = getRowIndexes( selectedTableCells );
428
+ *
429
+ * console.log( `Selected rows: ${ first } to ${ last }` );
430
+ * ```
431
+ *
432
+ * @returns Returns an object with the `first` and `last` table row indexes.
433
+ */
434
+ getRowIndexes(tableCells: Array<ModelElement>): TableIndexesObject;
435
+ /**
436
+ * Returns an object with the `first` and `last` column index contained in the given `tableCells`.
437
+ *
438
+ * ```ts
439
+ * const selectedTableCells = getSelectedTableCells( editor.model.document.selection );
440
+ *
441
+ * const { first, last } = getColumnIndexes( selectedTableCells );
442
+ *
443
+ * console.log( `Selected columns: ${ first } to ${ last }` );
444
+ * ```
445
+ *
446
+ * @returns Returns an object with the `first` and `last` table column indexes.
447
+ */
448
+ getColumnIndexes(tableCells: Array<ModelElement>): TableIndexesObject;
449
+ /**
450
+ * Checks if the selection contains cells that do not exceed rectangular selection.
451
+ *
452
+ * In a table below:
453
+ *
454
+ * ┌───┬───┬───┬───┐
455
+ * │ a │ b │ c │ d │
456
+ * ├───┴───┼───┤ │
457
+ * │ e │ f │ │
458
+ * │ ├───┼───┤
459
+ * │ │ g │ h │
460
+ * └───────┴───┴───┘
461
+ *
462
+ * Valid selections are these which create a solid rectangle (without gaps), such as:
463
+ * - a, b (two horizontal cells)
464
+ * - c, f (two vertical cells)
465
+ * - a, b, e (cell "e" spans over four cells)
466
+ * - c, d, f (cell d spans over a cell in the row below)
467
+ *
468
+ * While an invalid selection would be:
469
+ * - a, c (the unselected cell "b" creates a gap)
470
+ * - f, g, h (cell "d" spans over a cell from the row of "f" cell - thus creates a gap)
471
+ */
472
+ isSelectionRectangular(selectedTableCells: Array<ModelElement>): boolean;
473
+ /**
474
+ * Returns array of sorted ranges.
475
+ */
476
+ sortRanges(ranges: Iterable<ModelRange>): Array<ModelRange>;
477
+ /**
478
+ * Helper method to get an object with `first` and `last` indexes from an unsorted array of indexes.
479
+ */
480
+ private _getFirstLastIndexesObject;
481
+ /**
482
+ * Checks if the selection does not mix a header (column or row) with other cells.
483
+ *
484
+ * For instance, in the table below valid selections consist of cells with the same letter only.
485
+ * So, a-a (same heading row and column) or d-d (body cells) are valid while c-d or a-b are not.
486
+ *
487
+ * header columns
488
+ * ↓ ↓
489
+ * ┌───┬───┬───┬───┐
490
+ * │ a │ a │ b │ b │ ← header row
491
+ * ├───┼───┼───┼───┤
492
+ * │ c │ c │ d │ d │
493
+ * ├───┼───┼───┼───┤
494
+ * │ c │ c │ d │ d │
495
+ * └───┴───┴───┴───┘
496
+ */
497
+ private _areCellInTheSameTableSection;
498
+ /**
499
+ * Unified check if table rows/columns indexes are in the same heading/body section.
500
+ */
501
+ private _areIndexesInSameHeadingSection;
502
+ /**
503
+ * Unified check if table rows indexes are in the same footer/body section.
504
+ */
505
+ private _areIndexesInSameFooterSection;
506
506
  }
507
507
  /**
508
- * Options for the {@link module:table/tableutils~TableUtils#setHeadingRowsCount} and
509
- * {@link module:table/tableutils~TableUtils#setHeadingColumnsCount} methods.
510
- */
508
+ * Options for the {@link module:table/tableutils~TableUtils#setHeadingRowsCount} and
509
+ * {@link module:table/tableutils~TableUtils#setHeadingColumnsCount} methods.
510
+ */
511
511
  export type UpdateTableHeadingsOptions = {
512
- /**
513
- * If set to `false` it will only update the `headingRows`/`headingColumns` attribute
514
- * without updating the cell types in the table.
515
- *
516
- * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
517
- * is not loaded.
518
- *
519
- * @default true
520
- */
521
- updateCellType?: boolean;
522
- /**
523
- * If set to `true`, it will check if the rows/columns that are no longer in the heading section
524
- * should be updated to body cells.
525
- *
526
- * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
527
- * is not loaded.
528
- *
529
- * @default true
530
- */
531
- resetFormerHeadingCells?: boolean;
532
- /**
533
- * If set to `true`, it will check if the following rows/columns look like a header and expand the heading section.
534
- *
535
- * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
536
- * is not loaded.
537
- *
538
- * @default true
539
- */
540
- autoExpand?: boolean;
512
+ /**
513
+ * If set to `false` it will only update the `headingRows`/`headingColumns` attribute
514
+ * without updating the cell types in the table.
515
+ *
516
+ * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
517
+ * is not loaded.
518
+ *
519
+ * @default true
520
+ */
521
+ updateCellType?: boolean;
522
+ /**
523
+ * If set to `true`, it will check if the rows/columns that are no longer in the heading section
524
+ * should be updated to body cells.
525
+ *
526
+ * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
527
+ * is not loaded.
528
+ *
529
+ * @default true
530
+ */
531
+ resetFormerHeadingCells?: boolean;
532
+ /**
533
+ * If set to `true`, it will check if the following rows/columns look like a header and expand the heading section.
534
+ *
535
+ * This option has no effect if {@link module:table/tablecellproperties/tablecellpropertiesediting~TableCellPropertiesEditing}
536
+ * is not loaded.
537
+ *
538
+ * @default true
539
+ */
540
+ autoExpand?: boolean;
541
541
  };