@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,188 +1,188 @@
|
|
|
1
1
|
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { Plugin, type Editor } from
|
|
6
|
-
import type { ModelElement } from
|
|
7
|
-
import { TableEditing } from
|
|
8
|
-
import { TableUtils } from
|
|
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, type Editor, type PluginDependenciesOf } from "@ckeditor/ckeditor5-core";
|
|
6
|
+
import type { ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
7
|
+
import { TableEditing } from "../tableediting.js";
|
|
8
|
+
import { TableUtils } from "../tableutils.js";
|
|
9
9
|
/**
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
* The table column resize editing plugin.
|
|
11
|
+
*/
|
|
12
12
|
export declare class TableColumnResizeEditing extends Plugin {
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
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
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A flag indicating if the column resizing is in progress.
|
|
15
|
+
*/
|
|
16
|
+
private _isResizingActive;
|
|
17
|
+
/**
|
|
18
|
+
* A flag indicating if the column resizing is allowed. It is not allowed if the editor is in read-only
|
|
19
|
+
* or comments-only mode or the `TableColumnResize` plugin is disabled.
|
|
20
|
+
*
|
|
21
|
+
* @observable
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
_isResizingAllowed: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* A temporary storage for the required data needed to correctly calculate the widths of the resized columns. This storage is
|
|
27
|
+
* initialized when column resizing begins, and is purged upon completion.
|
|
28
|
+
*/
|
|
29
|
+
private _resizingData;
|
|
30
|
+
/**
|
|
31
|
+
* DOM emitter.
|
|
32
|
+
*/
|
|
33
|
+
private _domEmitter;
|
|
34
|
+
/**
|
|
35
|
+
* A local reference to the {@link module:table/tableutils~TableUtils} plugin.
|
|
36
|
+
*/
|
|
37
|
+
private _tableUtilsPlugin;
|
|
38
|
+
/**
|
|
39
|
+
* Starting mouse position data used to add a threshold to the resizing process.
|
|
40
|
+
*/
|
|
41
|
+
private _initialMouseEventData;
|
|
42
|
+
/**
|
|
43
|
+
* @inheritDoc
|
|
44
|
+
*/
|
|
45
|
+
static get requires(): PluginDependenciesOf<[TableEditing, TableUtils]>;
|
|
46
|
+
/**
|
|
47
|
+
* @inheritDoc
|
|
48
|
+
*/
|
|
49
|
+
static get pluginName(): "TableColumnResizeEditing";
|
|
50
|
+
/**
|
|
51
|
+
* @inheritDoc
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
static get licenseFeatureCode(): string;
|
|
55
|
+
/**
|
|
56
|
+
* @inheritDoc
|
|
57
|
+
*/
|
|
58
|
+
static override get isOfficialPlugin(): true;
|
|
59
|
+
/**
|
|
60
|
+
* @inheritDoc
|
|
61
|
+
*/
|
|
62
|
+
static override get isPremiumPlugin(): true;
|
|
63
|
+
/**
|
|
64
|
+
* @inheritDoc
|
|
65
|
+
*/
|
|
66
|
+
constructor(editor: Editor);
|
|
67
|
+
/**
|
|
68
|
+
* @inheritDoc
|
|
69
|
+
*/
|
|
70
|
+
init(): void;
|
|
71
|
+
/**
|
|
72
|
+
* @inheritDoc
|
|
73
|
+
*/
|
|
74
|
+
override destroy(): void;
|
|
75
|
+
/**
|
|
76
|
+
* Returns a 'tableColumnGroup' element from the 'table'.
|
|
77
|
+
*
|
|
78
|
+
* @param element A 'table' or 'tableColumnGroup' element.
|
|
79
|
+
* @returns A 'tableColumnGroup' element.
|
|
80
|
+
*/
|
|
81
|
+
getColumnGroupElement(element: ModelElement): ModelElement | undefined;
|
|
82
|
+
/**
|
|
83
|
+
* Returns an array of 'tableColumn' elements.
|
|
84
|
+
*
|
|
85
|
+
* @param element A 'table' or 'tableColumnGroup' element.
|
|
86
|
+
* @returns An array of 'tableColumn' elements.
|
|
87
|
+
*/
|
|
88
|
+
getTableColumnElements(element: ModelElement): Array<ModelElement>;
|
|
89
|
+
/**
|
|
90
|
+
* Returns an array of table column widths.
|
|
91
|
+
*
|
|
92
|
+
* @param element A 'table' or 'tableColumnGroup' element.
|
|
93
|
+
* @returns An array of table column widths.
|
|
94
|
+
*/
|
|
95
|
+
getTableColumnsWidths(element: ModelElement): Array<string>;
|
|
96
|
+
/**
|
|
97
|
+
* Registers new attributes for a table model element.
|
|
98
|
+
*/
|
|
99
|
+
private _extendSchema;
|
|
100
|
+
/**
|
|
101
|
+
* Registers table column resize post-fixer.
|
|
102
|
+
*
|
|
103
|
+
* It checks if the change from the differ concerns a table-related element or attribute. For detected changes it:
|
|
104
|
+
* * Adjusts the `columnWidths` attribute to guarantee that the sum of the widths from all columns is 100%.
|
|
105
|
+
* * Checks if the `columnWidths` attribute gets updated accordingly after columns have been added or removed.
|
|
106
|
+
*/
|
|
107
|
+
private _registerPostFixer;
|
|
108
|
+
/**
|
|
109
|
+
* Registers table column resize converters.
|
|
110
|
+
*/
|
|
111
|
+
private _registerConverters;
|
|
112
|
+
/**
|
|
113
|
+
* Registers listeners to handle resizing process.
|
|
114
|
+
*/
|
|
115
|
+
private _registerResizingListeners;
|
|
116
|
+
/**
|
|
117
|
+
* Calculate and set `top` and `bottom` styles to the column resizer element to fit the height of the table.
|
|
118
|
+
*
|
|
119
|
+
* @param viewResizer The column resizer element.
|
|
120
|
+
*/
|
|
121
|
+
private _recalculateResizerElement;
|
|
122
|
+
/**
|
|
123
|
+
* Remove `top` and `bottom` styles of the column resizer element.
|
|
124
|
+
*
|
|
125
|
+
* @param viewResizer The column resizer element.
|
|
126
|
+
*/
|
|
127
|
+
private _resetResizerStyles;
|
|
128
|
+
/**
|
|
129
|
+
* Handles the `mouseover` event on column resizer element.
|
|
130
|
+
* Recalculates the `top` and `bottom` styles of the column resizer element to fit the height of the table.
|
|
131
|
+
*
|
|
132
|
+
* @param eventInfo An object containing information about the fired event.
|
|
133
|
+
* @param domEventData The data related to the DOM event.
|
|
134
|
+
*/
|
|
135
|
+
private _onMouseOverHandler;
|
|
136
|
+
/**
|
|
137
|
+
* Handles the `mouseout` event on column resizer element.
|
|
138
|
+
* When resizing is not active, it resets the `top` and `bottom` styles of the column resizer element.
|
|
139
|
+
*
|
|
140
|
+
* @param eventInfo An object containing information about the fired event.
|
|
141
|
+
* @param domEventData The data related to the DOM event.
|
|
142
|
+
*/
|
|
143
|
+
private _onMouseOutHandler;
|
|
144
|
+
/**
|
|
145
|
+
* Handles the `mousedown` event on column resizer element:
|
|
146
|
+
* * calculates the initial column pixel widths,
|
|
147
|
+
* * inserts the `<colgroup>` element if it is not present in the `<table>`,
|
|
148
|
+
* * puts the necessary data in the temporary storage,
|
|
149
|
+
* * applies the attributes to the `<table>` view element.
|
|
150
|
+
*
|
|
151
|
+
* @param eventInfo An object containing information about the fired event.
|
|
152
|
+
* @param domEventData The data related to the DOM event.
|
|
153
|
+
*/
|
|
154
|
+
private _onMouseDownHandler;
|
|
155
|
+
/**
|
|
156
|
+
* Starts the resizing process after the threshold is reached.
|
|
157
|
+
*/
|
|
158
|
+
private _startResizingAfterThreshold;
|
|
159
|
+
/**
|
|
160
|
+
* Handles the `mousemove` event.
|
|
161
|
+
* * If resizing process is not in progress, it does nothing.
|
|
162
|
+
* * If resizing is active but not allowed, it stops the resizing process instantly calling the `mousedown` event handler.
|
|
163
|
+
* * Otherwise it dynamically updates the widths of the resized columns.
|
|
164
|
+
*
|
|
165
|
+
* @param eventInfo An object containing information about the fired event.
|
|
166
|
+
* @param mouseEventData The native DOM event.
|
|
167
|
+
*/
|
|
168
|
+
private _onMouseMoveHandler;
|
|
169
|
+
/**
|
|
170
|
+
* Handles the `mouseup` event.
|
|
171
|
+
* * If resizing process is not in progress, it does nothing.
|
|
172
|
+
* * If resizing is active but not allowed, it cancels the resizing process restoring the original widths.
|
|
173
|
+
* * Otherwise it propagates the changes from view to the model by executing the adequate commands.
|
|
174
|
+
*/
|
|
175
|
+
private _onMouseUpHandler;
|
|
176
|
+
/**
|
|
177
|
+
* Retrieves and returns required data needed for the resizing process.
|
|
178
|
+
*
|
|
179
|
+
* @param domEventData The data of the `mousedown` event.
|
|
180
|
+
* @param columnWidths The current widths of the columns.
|
|
181
|
+
* @returns The data needed for the resizing process.
|
|
182
|
+
*/
|
|
183
|
+
private _getResizingData;
|
|
184
|
+
/**
|
|
185
|
+
* Registers a listener ensuring that each resizable cell have a resizer handle.
|
|
186
|
+
*/
|
|
187
|
+
private _registerResizerInserter;
|
|
188
188
|
}
|
|
@@ -1,38 +1,38 @@
|
|
|
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 } from
|
|
9
|
-
import { Command } from
|
|
6
|
+
* @module table/tablecolumnresize/tablewidthscommand
|
|
7
|
+
*/
|
|
8
|
+
import type { ModelElement } from "@ckeditor/ckeditor5-engine";
|
|
9
|
+
import { Command } from "@ckeditor/ckeditor5-core";
|
|
10
10
|
/**
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
* Command used by the {@link module:table/tablecolumnresize~TableColumnResize Table column resize feature} that
|
|
12
|
+
* updates the width of the whole table as well as its individual columns.
|
|
13
|
+
*/
|
|
14
14
|
export declare class TableWidthsCommand extends Command {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @inheritDoc
|
|
17
|
+
*/
|
|
18
|
+
override refresh(): void;
|
|
19
|
+
/**
|
|
20
|
+
* Updated the `tableWidth` attribute of the table and the `columnWidth` attribute of the columns of that table.
|
|
21
|
+
*/
|
|
22
|
+
override execute(options?: TableWidthsCommandOptions): void;
|
|
23
23
|
}
|
|
24
24
|
export interface TableWidthsCommandOptions {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
25
|
+
/**
|
|
26
|
+
* New value of the `columnWidths` attribute. Must be array of strings or string with comma-separated values.
|
|
27
|
+
* If skipped, the column widths information will be deleted.
|
|
28
|
+
*/
|
|
29
|
+
columnWidths?: Array<string> | string;
|
|
30
|
+
/**
|
|
31
|
+
* The new table width. If skipped, the model attribute will be removed.
|
|
32
|
+
*/
|
|
33
|
+
tableWidth?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The table that is having the columns resized.
|
|
36
|
+
*/
|
|
37
|
+
table?: ModelElement;
|
|
38
38
|
}
|