@ckeditor/ckeditor5-table 48.2.0 → 48.3.0-alpha.0
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/dist/augmentation.d.ts +80 -80
- package/dist/commands/insertcolumncommand.d.ts +50 -50
- package/dist/commands/insertrowcommand.d.ts +49 -49
- package/dist/commands/inserttablecommand.d.ts +43 -43
- package/dist/commands/inserttablelayoutcommand.d.ts +34 -34
- package/dist/commands/mergecellcommand.d.ts +63 -63
- package/dist/commands/mergecellscommand.d.ts +24 -24
- package/dist/commands/removecolumncommand.d.ts +24 -24
- package/dist/commands/removerowcommand.d.ts +24 -24
- package/dist/commands/selectcolumncommand.d.ts +28 -28
- package/dist/commands/selectrowcommand.d.ts +28 -28
- package/dist/commands/setfooterrowcommand.d.ts +48 -48
- package/dist/commands/setheadercolumncommand.d.ts +45 -45
- package/dist/commands/setheaderrowcommand.d.ts +48 -48
- package/dist/commands/splitcellcommand.d.ts +38 -38
- package/dist/converters/downcast.d.ts +77 -77
- package/dist/converters/table-caption-post-fixer.d.ts +18 -18
- package/dist/converters/table-cell-paragraph-post-fixer.d.ts +30 -30
- package/dist/converters/table-cell-refresh-handler.d.ts +16 -16
- package/dist/converters/table-layout-post-fixer.d.ts +224 -224
- package/dist/converters/table-structure-post-fixer.d.ts +16 -16
- package/dist/converters/table-structure-refresh-handler.d.ts +15 -15
- package/dist/converters/tableproperties.d.ts +98 -98
- package/dist/converters/upcasttable.d.ts +47 -47
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +98 -98
- package/dist/index.js +12835 -14503
- package/dist/index.js.map +1 -1
- package/dist/plaintableoutput.d.ts +28 -28
- package/dist/table.d.ts +39 -39
- package/dist/tablecaption/tablecaptionediting.d.ts +62 -62
- package/dist/tablecaption/tablecaptionui.d.ts +18 -18
- package/dist/tablecaption/toggletablecaptioncommand.d.ts +61 -61
- package/dist/tablecaption/utils.d.ts +31 -31
- package/dist/tablecaption.d.ts +23 -23
- package/dist/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +27 -27
- package/dist/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +32 -32
- package/dist/tablecellproperties/commands/tablecellborderstylecommand.d.ts +32 -32
- package/dist/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +46 -46
- package/dist/tablecellproperties/commands/tablecellheightcommand.d.ts +41 -41
- package/dist/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +27 -27
- package/dist/tablecellproperties/commands/tablecellpaddingcommand.d.ts +46 -46
- package/dist/tablecellproperties/commands/tablecellpropertycommand.d.ts +79 -79
- package/dist/tablecellproperties/commands/tablecelltypecommand.d.ts +42 -42
- package/dist/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +35 -35
- package/dist/tablecellproperties/tablecellpropertiesediting.d.ts +49 -49
- package/dist/tablecellproperties/tablecellpropertiesui.d.ts +123 -123
- package/dist/tablecellproperties/tablecellpropertiesutils.d.ts +13 -13
- package/dist/tablecellproperties/ui/tablecellpropertiesview.d.ts +257 -257
- package/dist/tablecellproperties.d.ts +29 -29
- package/dist/tablecellwidth/commands/tablecellwidthcommand.d.ts +41 -41
- package/dist/tablecellwidth/tablecellwidthediting.d.ts +28 -28
- package/dist/tableclipboard.d.ts +79 -79
- package/dist/tablecolumnresize/constants.d.ts +23 -23
- package/dist/tablecolumnresize/converters.d.ts +20 -20
- package/dist/tablecolumnresize/tablecolumnresizeediting.d.ts +184 -184
- package/dist/tablecolumnresize/tablewidthscommand.d.ts +31 -31
- package/dist/tablecolumnresize/utils.d.ts +127 -127
- package/dist/tablecolumnresize.d.ts +25 -25
- package/dist/tableconfig.d.ts +670 -670
- package/dist/tableediting.d.ts +99 -99
- package/dist/tablekeyboard.d.ts +67 -67
- package/dist/tablelayout/commands/tabletypecommand.d.ts +38 -38
- package/dist/tablelayout/tablelayoutediting.d.ts +58 -58
- package/dist/tablelayout/tablelayoutui.d.ts +27 -27
- package/dist/tablelayout.d.ts +25 -25
- package/dist/tablemouse/mouseeventsobserver.d.ts +54 -54
- package/dist/tablemouse.d.ts +47 -47
- package/dist/tableproperties/commands/tablealignmentcommand.d.ts +27 -27
- package/dist/tableproperties/commands/tablebackgroundcolorcommand.d.ts +27 -27
- package/dist/tableproperties/commands/tablebordercolorcommand.d.ts +32 -32
- package/dist/tableproperties/commands/tableborderstylecommand.d.ts +32 -32
- package/dist/tableproperties/commands/tableborderwidthcommand.d.ts +46 -46
- package/dist/tableproperties/commands/tableheightcommand.d.ts +41 -41
- package/dist/tableproperties/commands/tablepropertycommand.d.ts +64 -64
- package/dist/tableproperties/commands/tablewidthcommand.d.ts +41 -41
- package/dist/tableproperties/tablepropertiesediting.d.ts +48 -48
- package/dist/tableproperties/tablepropertiesui.d.ts +131 -131
- package/dist/tableproperties/ui/tablepropertiesview.d.ts +207 -207
- package/dist/tableproperties.d.ts +29 -29
- package/dist/tableselection.d.ts +106 -106
- package/dist/tabletoolbar.d.ts +31 -31
- package/dist/tableui.d.ts +53 -53
- package/dist/tableutils.d.ts +532 -532
- package/dist/tablewalker.d.ts +342 -350
- package/dist/ui/colorinputview.d.ts +137 -137
- package/dist/ui/inserttableview.d.ts +78 -78
- package/dist/utils/common.d.ts +58 -58
- package/dist/utils/structure.d.ts +229 -229
- package/dist/utils/table-properties.d.ts +92 -92
- package/dist/utils/ui/contextualballoon.d.ts +28 -28
- package/dist/utils/ui/table-properties.d.ts +195 -192
- package/dist/utils/ui/widget.d.ts +22 -22
- package/package.json +9 -9
|
@@ -1,259 +1,259 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
5
|
/**
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import type { ModelElement, ModelWriter, ViewElement } from
|
|
9
|
-
import { type TableSlot } from
|
|
10
|
-
import { type TableUtils } from
|
|
6
|
+
* @module table/utils/structure
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement, ModelWriter, ViewElement } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { type TableSlot } from "../tablewalker.js";
|
|
10
|
+
import { type TableUtils } from "../tableutils.js";
|
|
11
11
|
/**
|
|
12
|
-
|
|
12
|
+
* Returns a cropped table according to given dimensions.
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
14
|
+
* To return a cropped table that starts at first row and first column and end in third row and column:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* const croppedTable = cropTableToDimensions( table, {
|
|
18
|
+
* startRow: 1,
|
|
19
|
+
* endRow: 3,
|
|
20
|
+
* startColumn: 1,
|
|
21
|
+
* endColumn: 3
|
|
22
|
+
* }, writer );
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* Calling the code above for the table below:
|
|
26
|
+
*
|
|
27
|
+
* 0 1 2 3 4 0 1 2
|
|
28
|
+
* ┌───┬───┬───┬───┬───┐
|
|
29
|
+
* 0 │ a │ b │ c │ d │ e │
|
|
30
|
+
* ├───┴───┤ ├───┴───┤ ┌───┬───┬───┐
|
|
31
|
+
* 1 │ f │ │ g │ │ │ │ g │ 0
|
|
32
|
+
* ├───┬───┴───┼───┬───┤ will return: ├───┴───┼───┤
|
|
33
|
+
* 2 │ h │ i │ j │ k │ │ i │ j │ 1
|
|
34
|
+
* ├───┤ ├───┤ │ │ ├───┤
|
|
35
|
+
* 3 │ l │ │ m │ │ │ │ m │ 2
|
|
36
|
+
* ├───┼───┬───┤ ├───┤ └───────┴───┘
|
|
37
|
+
* 4 │ n │ o │ p │ │ q │
|
|
38
|
+
* └───┴───┴───┴───┴───┘
|
|
39
|
+
*
|
|
40
|
+
* @internal
|
|
41
|
+
*/
|
|
42
42
|
export declare function cropTableToDimensions(sourceTable: ModelElement, cropDimensions: {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
startRow: number;
|
|
44
|
+
startColumn: number;
|
|
45
|
+
endRow: number;
|
|
46
|
+
endColumn: number;
|
|
47
47
|
}, writer: ModelWriter): ModelElement;
|
|
48
48
|
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
49
|
+
* Returns slot info of cells that starts above and overlaps a given row.
|
|
50
|
+
*
|
|
51
|
+
* In a table below, passing `overlapRow = 3`
|
|
52
|
+
*
|
|
53
|
+
* ┌───┬───┬───┬───┬───┐
|
|
54
|
+
* 0 │ a │ b │ c │ d │ e │
|
|
55
|
+
* │ ├───┼───┼───┼───┤
|
|
56
|
+
* 1 │ │ f │ g │ h │ i │
|
|
57
|
+
* ├───┤ ├───┼───┤ │
|
|
58
|
+
* 2 │ j │ │ k │ l │ │
|
|
59
|
+
* │ │ │ ├───┼───┤
|
|
60
|
+
* 3 │ │ │ │ m │ n │ <- overlap row to check
|
|
61
|
+
* ├───┼───┤ │ ├───│
|
|
62
|
+
* 4 │ o │ p │ │ │ q │
|
|
63
|
+
* └───┴───┴───┴───┴───┘
|
|
64
|
+
*
|
|
65
|
+
* will return slot info for cells: "j", "f", "k".
|
|
66
|
+
*
|
|
67
|
+
* @internal
|
|
68
|
+
* @param table The table to check.
|
|
69
|
+
* @param overlapRow The index of the row to check.
|
|
70
|
+
* @param startRow row to start analysis. Use it when it is known that the cells above that row will not overlap. Default value is 0.
|
|
71
|
+
*/
|
|
72
72
|
export declare function getVerticallyOverlappingCells(table: ModelElement, overlapRow: number, startRow?: number): Array<TableSlot>;
|
|
73
73
|
/**
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
74
|
+
* Splits the table cell horizontally.
|
|
75
|
+
*
|
|
76
|
+
* @internal
|
|
77
|
+
* @returns Created table cell, if any were created.
|
|
78
|
+
*/
|
|
79
79
|
export declare function splitHorizontally(tableCell: ModelElement, splitRow: number, writer: ModelWriter): ModelElement | null;
|
|
80
80
|
/**
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
81
|
+
* Returns slot info of cells that starts before and overlaps a given column.
|
|
82
|
+
*
|
|
83
|
+
* In a table below, passing `overlapColumn = 3`
|
|
84
|
+
*
|
|
85
|
+
* 0 1 2 3 4
|
|
86
|
+
* ┌───────┬───────┬───┐
|
|
87
|
+
* │ a │ b │ c │
|
|
88
|
+
* │───┬───┴───────┼───┤
|
|
89
|
+
* │ d │ e │ f │
|
|
90
|
+
* ├───┼───┬───────┴───┤
|
|
91
|
+
* │ g │ h │ i │
|
|
92
|
+
* ├───┼───┼───┬───────┤
|
|
93
|
+
* │ j │ k │ l │ m │
|
|
94
|
+
* ├───┼───┴───┼───┬───┤
|
|
95
|
+
* │ n │ o │ p │ q │
|
|
96
|
+
* └───┴───────┴───┴───┘
|
|
97
|
+
* ^
|
|
98
|
+
* Overlap column to check
|
|
99
|
+
*
|
|
100
|
+
* will return slot info for cells: "b", "e", "i".
|
|
101
|
+
*
|
|
102
|
+
* @internal
|
|
103
|
+
* @param table The table to check.
|
|
104
|
+
* @param overlapColumn The index of the column to check.
|
|
105
|
+
*/
|
|
106
106
|
export declare function getHorizontallyOverlappingCells(table: ModelElement, overlapColumn: number): Array<TableSlot>;
|
|
107
107
|
/**
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
108
|
+
* Splits the table cell vertically.
|
|
109
|
+
*
|
|
110
|
+
* @internal
|
|
111
|
+
* @param columnIndex The table cell column index.
|
|
112
|
+
* @param splitColumn The index of column to split cell on.
|
|
113
|
+
* @returns Created table cell.
|
|
114
|
+
*/
|
|
115
115
|
export declare function splitVertically(tableCell: ModelElement, columnIndex: number, splitColumn: number, writer: ModelWriter): ModelElement;
|
|
116
116
|
/**
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
* Adjusts table cell dimensions to not exceed limit row and column.
|
|
118
|
+
*
|
|
119
|
+
* If table cell width (or height) covers a column (or row) that is after a limit column (or row)
|
|
120
|
+
* this method will trim "colspan" (or "rowspan") attribute so the table cell will fit in a defined limits.
|
|
121
|
+
*
|
|
122
|
+
* @internal
|
|
123
|
+
*/
|
|
124
124
|
export declare function trimTableCellIfNeeded(tableCell: ModelElement, cellRow: number, cellColumn: number, limitRow: number, limitColumn: number, writer: ModelWriter): void;
|
|
125
125
|
/**
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
126
|
+
* Removes columns that have no cells anchored.
|
|
127
|
+
*
|
|
128
|
+
* In table below:
|
|
129
|
+
*
|
|
130
|
+
* +----+----+----+----+----+----+----+
|
|
131
|
+
* | 00 | 01 | 03 | 04 | 06 |
|
|
132
|
+
* +----+----+----+----+ +----+
|
|
133
|
+
* | 10 | 11 | 13 | | 16 |
|
|
134
|
+
* +----+----+----+----+----+----+----+
|
|
135
|
+
* | 20 | 21 | 23 | 24 | 26 |
|
|
136
|
+
* +----+----+----+----+----+----+----+
|
|
137
|
+
* ^--- empty ---^
|
|
138
|
+
*
|
|
139
|
+
* Will remove columns 2 and 5.
|
|
140
|
+
*
|
|
141
|
+
* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.
|
|
142
|
+
* To remove a column from a table use {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`}.
|
|
143
|
+
*
|
|
144
|
+
* @internal
|
|
145
|
+
* @returns True if removed some columns.
|
|
146
|
+
*/
|
|
147
147
|
export declare function removeEmptyColumns(table: ModelElement, tableUtils: TableUtils): boolean;
|
|
148
148
|
/**
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
149
|
+
* Removes rows that have no cells anchored.
|
|
150
|
+
*
|
|
151
|
+
* In table below:
|
|
152
|
+
*
|
|
153
|
+
* +----+----+----+
|
|
154
|
+
* | 00 | 01 | 02 |
|
|
155
|
+
* +----+----+----+
|
|
156
|
+
* | 10 | 11 | 12 |
|
|
157
|
+
* + + + +
|
|
158
|
+
* | | | | <-- empty
|
|
159
|
+
* +----+----+----+
|
|
160
|
+
* | 30 | 31 | 32 |
|
|
161
|
+
* +----+----+----+
|
|
162
|
+
* | 40 | 42 |
|
|
163
|
+
* + + +
|
|
164
|
+
* | | | <-- empty
|
|
165
|
+
* +----+----+----+
|
|
166
|
+
* | 60 | 61 | 62 |
|
|
167
|
+
* +----+----+----+
|
|
168
|
+
*
|
|
169
|
+
* Will remove rows 2 and 5.
|
|
170
|
+
*
|
|
171
|
+
* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.
|
|
172
|
+
* To remove a row from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`}.
|
|
173
|
+
*
|
|
174
|
+
* @internal
|
|
175
|
+
* @returns True if removed some rows.
|
|
176
|
+
*/
|
|
177
177
|
export declare function removeEmptyRows(table: ModelElement, tableUtils: TableUtils): boolean;
|
|
178
178
|
/**
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
179
|
+
* Removes rows and columns that have no cells anchored.
|
|
180
|
+
*
|
|
181
|
+
* In table below:
|
|
182
|
+
*
|
|
183
|
+
* +----+----+----+----+
|
|
184
|
+
* | 00 | 02 |
|
|
185
|
+
* +----+----+ +
|
|
186
|
+
* | 10 | |
|
|
187
|
+
* +----+----+----+----+
|
|
188
|
+
* | 20 | 22 | 23 |
|
|
189
|
+
* + + + +
|
|
190
|
+
* | | | | <-- empty row
|
|
191
|
+
* +----+----+----+----+
|
|
192
|
+
* ^--- empty column
|
|
193
|
+
*
|
|
194
|
+
* Will remove row 3 and column 1.
|
|
195
|
+
*
|
|
196
|
+
* **Note:** This is a low-level helper method for clearing invalid model state when doing table modifications.
|
|
197
|
+
* To remove a rows from a table use {@link module:table/tableutils~TableUtils#removeRows `TableUtils.removeRows()`} and
|
|
198
|
+
* {@link module:table/tableutils~TableUtils#removeColumns `TableUtils.removeColumns()`} to remove a column.
|
|
199
|
+
*
|
|
200
|
+
* @internal
|
|
201
|
+
*/
|
|
202
202
|
export declare function removeEmptyRowsColumns(table: ModelElement, tableUtils: TableUtils): void;
|
|
203
203
|
/**
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
204
|
+
* Returns adjusted last row index if selection covers part of a row with empty slots (spanned by other cells).
|
|
205
|
+
* The `dimensions.lastRow` is equal to last row index but selection might be bigger.
|
|
206
|
+
*
|
|
207
|
+
* This happens *only* on rectangular selection so we analyze a case like this:
|
|
208
|
+
*
|
|
209
|
+
* +---+---+---+---+
|
|
210
|
+
* 0 | a | b | c | d |
|
|
211
|
+
* + + +---+---+
|
|
212
|
+
* 1 | | e | f | g |
|
|
213
|
+
* + +---+ +---+
|
|
214
|
+
* 2 | | h | | i | <- last row, each cell has rowspan = 2,
|
|
215
|
+
* + + + + + so we need to return 3, not 2
|
|
216
|
+
* 3 | | | | |
|
|
217
|
+
* +---+---+---+---+
|
|
218
|
+
*
|
|
219
|
+
* @internal
|
|
220
|
+
* @returns Adjusted last row index.
|
|
221
|
+
*/
|
|
222
222
|
export declare function adjustLastRowIndex(table: ModelElement, dimensions: {
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
223
|
+
firstRow: number;
|
|
224
|
+
firstColumn: number;
|
|
225
|
+
lastRow: number;
|
|
226
|
+
lastColumn: number;
|
|
227
227
|
}): number;
|
|
228
228
|
/**
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
229
|
+
* Returns adjusted last column index if selection covers part of a column with empty slots (spanned by other cells).
|
|
230
|
+
* The `dimensions.lastColumn` is equal to last column index but selection might be bigger.
|
|
231
|
+
*
|
|
232
|
+
* This happens *only* on rectangular selection so we analyze a case like this:
|
|
233
|
+
*
|
|
234
|
+
* 0 1 2 3
|
|
235
|
+
* +---+---+---+---+
|
|
236
|
+
* | a |
|
|
237
|
+
* +---+---+---+---+
|
|
238
|
+
* | b | c | d |
|
|
239
|
+
* +---+---+---+---+
|
|
240
|
+
* | e | f |
|
|
241
|
+
* +---+---+---+---+
|
|
242
|
+
* | g | h |
|
|
243
|
+
* +---+---+---+---+
|
|
244
|
+
* ^
|
|
245
|
+
* last column, each cell has colspan = 2, so we need to return 3, not 2
|
|
246
|
+
*
|
|
247
|
+
* @internal
|
|
248
|
+
* @returns Adjusted last column index.
|
|
249
|
+
*/
|
|
250
250
|
export declare function adjustLastColumnIndex(table: ModelElement, dimensions: {
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
251
|
+
firstRow: number;
|
|
252
|
+
firstColumn: number;
|
|
253
|
+
lastRow: number;
|
|
254
|
+
lastColumn: number;
|
|
255
255
|
}): number;
|
|
256
256
|
/**
|
|
257
|
-
|
|
258
|
-
|
|
257
|
+
* Get view `<table>` element from the wrapper.
|
|
258
|
+
*/
|
|
259
259
|
export declare function getViewTableFromWrapper(wrapperView: ViewElement): ViewElement | undefined;
|