@ckeditor/ckeditor5-table 45.2.1 → 46.0.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.
- package/build/table.js +1 -1
- package/dist/index-content.css +6 -5
- package/dist/index-editor.css +46 -46
- package/dist/index.css +63 -62
- package/dist/index.css.map +1 -1
- package/dist/index.js +306 -49
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
- package/src/commands/insertcolumncommand.d.ts +1 -1
- package/src/commands/insertcolumncommand.js +1 -1
- package/src/commands/insertrowcommand.d.ts +1 -1
- package/src/commands/insertrowcommand.js +1 -1
- package/src/commands/inserttablecommand.d.ts +1 -1
- package/src/commands/inserttablecommand.js +1 -1
- package/src/commands/inserttablelayoutcommand.d.ts +1 -1
- package/src/commands/inserttablelayoutcommand.js +1 -1
- package/src/commands/mergecellcommand.d.ts +3 -3
- package/src/commands/mergecellcommand.js +2 -2
- package/src/commands/mergecellscommand.d.ts +1 -1
- package/src/commands/mergecellscommand.js +2 -2
- package/src/commands/removecolumncommand.d.ts +1 -1
- package/src/commands/removecolumncommand.js +2 -2
- package/src/commands/removerowcommand.d.ts +1 -1
- package/src/commands/removerowcommand.js +1 -1
- package/src/commands/selectcolumncommand.d.ts +1 -1
- package/src/commands/selectcolumncommand.js +2 -2
- package/src/commands/selectrowcommand.d.ts +1 -1
- package/src/commands/selectrowcommand.js +1 -1
- package/src/commands/setheadercolumncommand.d.ts +2 -2
- package/src/commands/setheadercolumncommand.js +1 -1
- package/src/commands/setheaderrowcommand.d.ts +2 -2
- package/src/commands/setheaderrowcommand.js +1 -1
- package/src/commands/splitcellcommand.d.ts +1 -1
- package/src/commands/splitcellcommand.js +1 -1
- package/src/converters/downcast.d.ts +21 -9
- package/src/converters/downcast.js +11 -3
- package/src/converters/table-caption-post-fixer.d.ts +3 -1
- package/src/converters/table-caption-post-fixer.js +3 -1
- package/src/converters/table-cell-paragraph-post-fixer.d.ts +3 -1
- package/src/converters/table-cell-paragraph-post-fixer.js +3 -1
- package/src/converters/table-cell-refresh-handler.d.ts +3 -1
- package/src/converters/table-cell-refresh-handler.js +3 -1
- package/src/converters/table-headings-refresh-handler.d.ts +3 -1
- package/src/converters/table-headings-refresh-handler.js +4 -2
- package/src/converters/table-layout-post-fixer.d.ts +3 -1
- package/src/converters/table-layout-post-fixer.js +4 -2
- package/src/converters/tableproperties.d.ts +17 -1
- package/src/converters/tableproperties.js +49 -2
- package/src/converters/upcasttable.d.ts +6 -1
- package/src/converters/upcasttable.js +6 -1
- package/src/index.d.ts +89 -56
- package/src/index.js +84 -24
- package/src/plaintableoutput.d.ts +2 -2
- package/src/plaintableoutput.js +2 -2
- package/src/table.d.ts +7 -7
- package/src/table.js +7 -7
- package/src/tablecaption/tablecaptionediting.d.ts +6 -6
- package/src/tablecaption/tablecaptionediting.js +8 -8
- package/src/tablecaption/tablecaptionui.d.ts +1 -1
- package/src/tablecaption/tablecaptionui.js +1 -1
- package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
- package/src/tablecaption/toggletablecaptioncommand.js +1 -1
- package/src/tablecaption/utils.d.ts +8 -4
- package/src/tablecaption/utils.js +4 -0
- package/src/tablecaption.d.ts +3 -3
- package/src/tablecaption.js +3 -3
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellheightcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellheightcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +4 -4
- package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +3 -3
- package/src/tablecellproperties/commands/tablecellpropertycommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +2 -2
- package/src/tablecellproperties/tablecellpropertiesediting.d.ts +3 -3
- package/src/tablecellproperties/tablecellpropertiesediting.js +44 -19
- package/src/tablecellproperties/tablecellpropertiesui.d.ts +2 -2
- package/src/tablecellproperties/tablecellpropertiesui.js +2 -2
- package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +2 -2
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +1 -1
- package/src/tablecellproperties.d.ts +3 -3
- package/src/tablecellproperties.js +3 -3
- package/src/tablecellwidth/commands/tablecellwidthcommand.d.ts +2 -2
- package/src/tablecellwidth/commands/tablecellwidthcommand.js +2 -2
- package/src/tablecellwidth/tablecellwidthediting.d.ts +2 -2
- package/src/tablecellwidth/tablecellwidthediting.js +5 -3
- package/src/tableclipboard.d.ts +6 -6
- package/src/tableclipboard.js +4 -4
- package/src/tablecolumnresize/constants.d.ts +9 -0
- package/src/tablecolumnresize/constants.js +9 -0
- package/src/tablecolumnresize/converters.d.ts +11 -1
- package/src/tablecolumnresize/converters.js +16 -0
- package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +7 -7
- package/src/tablecolumnresize/tablecolumnresizeediting.js +13 -11
- package/src/tablecolumnresize/tablewidthscommand.d.ts +3 -3
- package/src/tablecolumnresize/tablewidthscommand.js +1 -1
- package/src/tablecolumnresize/utils.d.ts +23 -11
- package/src/tablecolumnresize/utils.js +14 -2
- package/src/tablecolumnresize.d.ts +3 -3
- package/src/tablecolumnresize.js +3 -3
- package/src/tableconfig.d.ts +3 -1
- package/src/tableediting.d.ts +7 -7
- package/src/tableediting.js +19 -19
- package/src/tablekeyboard.d.ts +8 -8
- package/src/tablekeyboard.js +7 -7
- package/src/tablelayout/commands/tabletypecommand.d.ts +1 -1
- package/src/tablelayout/commands/tabletypecommand.js +1 -1
- package/src/tablelayout/tablelayoutediting.d.ts +2 -2
- package/src/tablelayout/tablelayoutediting.js +4 -4
- package/src/tablelayout/tablelayoutui.d.ts +1 -1
- package/src/tablelayout/tablelayoutui.js +4 -4
- package/src/tablelayout.d.ts +5 -5
- package/src/tablelayout.js +5 -5
- package/src/tablemouse/mouseeventsobserver.d.ts +13 -11
- package/src/tablemouse/mouseeventsobserver.js +4 -2
- package/src/tablemouse.d.ts +3 -3
- package/src/tablemouse.js +4 -4
- package/src/tableproperties/commands/tablealignmentcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablealignmentcommand.js +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.js +2 -2
- package/src/tableproperties/commands/tablebordercolorcommand.d.ts +4 -4
- package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
- package/src/tableproperties/commands/tableborderstylecommand.d.ts +4 -4
- package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
- package/src/tableproperties/commands/tableborderwidthcommand.d.ts +4 -4
- package/src/tableproperties/commands/tableborderwidthcommand.js +2 -2
- package/src/tableproperties/commands/tableheightcommand.d.ts +2 -2
- package/src/tableproperties/commands/tableheightcommand.js +2 -2
- package/src/tableproperties/commands/tablepropertycommand.d.ts +4 -4
- package/src/tableproperties/commands/tablepropertycommand.js +1 -1
- package/src/tableproperties/commands/tablewidthcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablewidthcommand.js +2 -2
- package/src/tableproperties/tablepropertiesediting.d.ts +2 -2
- package/src/tableproperties/tablepropertiesediting.js +49 -21
- package/src/tableproperties/tablepropertiesui.d.ts +2 -2
- package/src/tableproperties/tablepropertiesui.js +2 -2
- package/src/tableproperties/ui/tablepropertiesview.d.ts +2 -2
- package/src/tableproperties/ui/tablepropertiesview.js +1 -1
- package/src/tableproperties.d.ts +3 -3
- package/src/tableproperties.js +3 -3
- package/src/tableselection.d.ts +9 -9
- package/src/tableselection.js +4 -4
- package/src/tabletoolbar.d.ts +1 -1
- package/src/tabletoolbar.js +1 -1
- package/src/tableui.d.ts +1 -1
- package/src/tableui.js +4 -4
- package/src/tableutils.d.ts +25 -26
- package/src/tableutils.js +4 -4
- package/src/tablewalker.d.ts +8 -8
- package/src/tablewalker.js +2 -2
- package/src/ui/colorinputview.d.ts +6 -1
- package/src/ui/colorinputview.js +1 -1
- package/src/ui/inserttableview.d.ts +3 -1
- package/src/ui/inserttableview.js +3 -1
- package/src/utils/common.d.ts +16 -7
- package/src/utils/common.js +9 -1
- package/src/utils/structure.d.ts +24 -14
- package/src/utils/structure.js +11 -1
- package/src/utils/table-properties.d.ts +15 -2
- package/src/utils/table-properties.js +6 -0
- package/src/utils/ui/contextualballoon.d.ts +5 -3
- package/src/utils/ui/contextualballoon.js +2 -0
- package/src/utils/ui/table-properties.d.ts +20 -7
- package/src/utils/ui/table-properties.js +24 -11
- package/src/utils/ui/widget.d.ts +6 -0
- package/src/utils/ui/widget.js +6 -0
- package/theme/tablecaption.css +9 -8
- package/theme/tablecolumnresize.css +2 -2
|
@@ -11,18 +11,27 @@ import type { Conversion, UpcastConversionData, ViewElement } from 'ckeditor5/sr
|
|
|
11
11
|
*
|
|
12
12
|
* @param options.modelAttribute The attribute to set.
|
|
13
13
|
* @param options.styleName The style name to convert.
|
|
14
|
+
* @param options.attributeName The HTML attribute name to convert.
|
|
15
|
+
* @param options.attributeType The HTML attribute type for value normalization.
|
|
14
16
|
* @param options.viewElement The view element name that should be converted.
|
|
15
17
|
* @param options.defaultValue The default value for the specified `modelAttribute`.
|
|
16
18
|
* @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.
|
|
19
|
+
* @internal
|
|
17
20
|
*/
|
|
18
21
|
export declare function upcastStyleToAttribute(conversion: Conversion, options: {
|
|
19
22
|
modelAttribute: string;
|
|
20
23
|
styleName: string;
|
|
24
|
+
attributeName?: string;
|
|
25
|
+
attributeType?: 'length' | 'color';
|
|
21
26
|
viewElement: string | RegExp;
|
|
22
27
|
defaultValue: string;
|
|
23
28
|
reduceBoxSides?: boolean;
|
|
24
|
-
shouldUpcast?: (viewElement: ViewElement) => boolean;
|
|
25
29
|
}): void;
|
|
30
|
+
/**
|
|
31
|
+
* The style values for border styles.
|
|
32
|
+
*
|
|
33
|
+
* @internal
|
|
34
|
+
*/
|
|
26
35
|
export interface StyleValues {
|
|
27
36
|
color: string;
|
|
28
37
|
style: string;
|
|
@@ -35,10 +44,13 @@ export interface StyleValues {
|
|
|
35
44
|
* @param defaultBorder.color The default `borderColor` value.
|
|
36
45
|
* @param defaultBorder.style The default `borderStyle` value.
|
|
37
46
|
* @param defaultBorder.width The default `borderWidth` value.
|
|
47
|
+
* @internal
|
|
38
48
|
*/
|
|
39
49
|
export declare function upcastBorderStyles(conversion: Conversion, viewElementName: string, modelAttributes: StyleValues, defaultBorder: StyleValues): void;
|
|
40
50
|
/**
|
|
41
51
|
* Conversion helper for downcasting an attribute to a style.
|
|
52
|
+
*
|
|
53
|
+
* @internal
|
|
42
54
|
*/
|
|
43
55
|
export declare function downcastAttributeToStyle(conversion: Conversion, options: {
|
|
44
56
|
modelElement: string;
|
|
@@ -47,6 +59,8 @@ export declare function downcastAttributeToStyle(conversion: Conversion, options
|
|
|
47
59
|
}): void;
|
|
48
60
|
/**
|
|
49
61
|
* Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).
|
|
62
|
+
*
|
|
63
|
+
* @internal
|
|
50
64
|
*/
|
|
51
65
|
export declare function downcastTableAttribute(conversion: Conversion, options: {
|
|
52
66
|
modelAttribute: string;
|
|
@@ -54,5 +68,7 @@ export declare function downcastTableAttribute(conversion: Conversion, options:
|
|
|
54
68
|
}): void;
|
|
55
69
|
/**
|
|
56
70
|
* Returns the default value for table or table cell property adjusted for layout tables.
|
|
71
|
+
*
|
|
72
|
+
* @internal
|
|
57
73
|
*/
|
|
58
74
|
export declare function getDefaultValueAdjusted(defaultValue: string, layoutTableDefault: string, data: UpcastConversionData<ViewElement>): string;
|
|
@@ -8,12 +8,15 @@ import { first } from 'ckeditor5/src/utils.js';
|
|
|
8
8
|
*
|
|
9
9
|
* @param options.modelAttribute The attribute to set.
|
|
10
10
|
* @param options.styleName The style name to convert.
|
|
11
|
+
* @param options.attributeName The HTML attribute name to convert.
|
|
12
|
+
* @param options.attributeType The HTML attribute type for value normalization.
|
|
11
13
|
* @param options.viewElement The view element name that should be converted.
|
|
12
14
|
* @param options.defaultValue The default value for the specified `modelAttribute`.
|
|
13
15
|
* @param options.shouldUpcast The function which returns `true` if style should be upcasted from this element.
|
|
16
|
+
* @internal
|
|
14
17
|
*/
|
|
15
18
|
export function upcastStyleToAttribute(conversion, options) {
|
|
16
|
-
const { modelAttribute, styleName, viewElement, defaultValue, reduceBoxSides = false
|
|
19
|
+
const { modelAttribute, styleName, attributeName, attributeType, viewElement, defaultValue, reduceBoxSides = false } = options;
|
|
17
20
|
conversion.for('upcast').attributeToAttribute({
|
|
18
21
|
view: {
|
|
19
22
|
name: viewElement,
|
|
@@ -24,7 +27,9 @@ export function upcastStyleToAttribute(conversion, options) {
|
|
|
24
27
|
model: {
|
|
25
28
|
key: modelAttribute,
|
|
26
29
|
value: (viewElement, conversionApi, data) => {
|
|
27
|
-
|
|
30
|
+
// Ignore table elements inside figures and figures without the table class.
|
|
31
|
+
if (viewElement.name == 'table' && viewElement.parent.name == 'figure' ||
|
|
32
|
+
viewElement.name == 'figure' && !viewElement.hasClass('table')) {
|
|
28
33
|
return;
|
|
29
34
|
}
|
|
30
35
|
const localDefaultValue = getDefaultValueAdjusted(defaultValue, '', data);
|
|
@@ -33,9 +38,44 @@ export function upcastStyleToAttribute(conversion, options) {
|
|
|
33
38
|
if (localDefaultValue !== value) {
|
|
34
39
|
return value;
|
|
35
40
|
}
|
|
41
|
+
// Consume the style even if not applied to the element so it won't be processed by other converters.
|
|
42
|
+
conversionApi.consumable.consume(viewElement, { styles: styleName });
|
|
36
43
|
}
|
|
37
44
|
}
|
|
38
45
|
});
|
|
46
|
+
if (attributeName) {
|
|
47
|
+
conversion.for('upcast').attributeToAttribute({
|
|
48
|
+
view: {
|
|
49
|
+
name: viewElement,
|
|
50
|
+
attributes: {
|
|
51
|
+
[attributeName]: /.+/
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
model: {
|
|
55
|
+
key: modelAttribute,
|
|
56
|
+
value: (viewElement, conversionApi, data) => {
|
|
57
|
+
// Convert attributes of table and table cell elements, ignore figure.
|
|
58
|
+
// Do not convert attribute if related style is set as it has a higher priority.
|
|
59
|
+
// Do not convert attribute if the element is a table inside a figure with the related style set.
|
|
60
|
+
if (viewElement.name == 'figure' ||
|
|
61
|
+
viewElement.hasStyle(styleName) ||
|
|
62
|
+
viewElement.name == 'table' && viewElement.parent.name == 'figure' && viewElement.parent.hasStyle(styleName)) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
const localDefaultValue = getDefaultValueAdjusted(defaultValue, '', data);
|
|
66
|
+
let value = viewElement.getAttribute(attributeName);
|
|
67
|
+
if (value && attributeType == 'length' && !value.endsWith('px')) {
|
|
68
|
+
value += 'px';
|
|
69
|
+
}
|
|
70
|
+
if (localDefaultValue !== value) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
// Consume the attribute even if not applied to the element so it won't be processed by other converters.
|
|
74
|
+
conversionApi.consumable.consume(viewElement, { attributes: attributeName });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
39
79
|
}
|
|
40
80
|
/**
|
|
41
81
|
* Conversion helper for upcasting border styles for view elements.
|
|
@@ -44,6 +84,7 @@ export function upcastStyleToAttribute(conversion, options) {
|
|
|
44
84
|
* @param defaultBorder.color The default `borderColor` value.
|
|
45
85
|
* @param defaultBorder.style The default `borderStyle` value.
|
|
46
86
|
* @param defaultBorder.width The default `borderWidth` value.
|
|
87
|
+
* @internal
|
|
47
88
|
*/
|
|
48
89
|
export function upcastBorderStyles(conversion, viewElementName, modelAttributes, defaultBorder) {
|
|
49
90
|
conversion.for('upcast').add(dispatcher => dispatcher.on('element:' + viewElementName, (evt, data, conversionApi) => {
|
|
@@ -112,6 +153,8 @@ export function upcastBorderStyles(conversion, viewElementName, modelAttributes,
|
|
|
112
153
|
}
|
|
113
154
|
/**
|
|
114
155
|
* Conversion helper for downcasting an attribute to a style.
|
|
156
|
+
*
|
|
157
|
+
* @internal
|
|
115
158
|
*/
|
|
116
159
|
export function downcastAttributeToStyle(conversion, options) {
|
|
117
160
|
const { modelElement, modelAttribute, styleName } = options;
|
|
@@ -130,6 +173,8 @@ export function downcastAttributeToStyle(conversion, options) {
|
|
|
130
173
|
}
|
|
131
174
|
/**
|
|
132
175
|
* Conversion helper for downcasting attributes from the model table to a view table (not to `<figure>`).
|
|
176
|
+
*
|
|
177
|
+
* @internal
|
|
133
178
|
*/
|
|
134
179
|
export function downcastTableAttribute(conversion, options) {
|
|
135
180
|
const { modelAttribute, styleName } = options;
|
|
@@ -150,6 +195,8 @@ export function downcastTableAttribute(conversion, options) {
|
|
|
150
195
|
}
|
|
151
196
|
/**
|
|
152
197
|
* Returns the default value for table or table cell property adjusted for layout tables.
|
|
198
|
+
*
|
|
199
|
+
* @internal
|
|
153
200
|
*/
|
|
154
201
|
export function getDefaultValueAdjusted(defaultValue, layoutTableDefault, data) {
|
|
155
202
|
const modelElement = data.modelRange && first(data.modelRange.getItems({ shallow: true }));
|
|
@@ -18,6 +18,8 @@ import type { UpcastDispatcher } from 'ckeditor5/src/engine.js';
|
|
|
18
18
|
* ```xml
|
|
19
19
|
* <table></table>
|
|
20
20
|
* ```
|
|
21
|
+
*
|
|
22
|
+
* @internal
|
|
21
23
|
*/
|
|
22
24
|
export declare function upcastTableFigure(): (dispatcher: UpcastDispatcher) => void;
|
|
23
25
|
/**
|
|
@@ -26,8 +28,9 @@ export declare function upcastTableFigure(): (dispatcher: UpcastDispatcher) => v
|
|
|
26
28
|
* This conversion helper converts the table element as well as table rows.
|
|
27
29
|
*
|
|
28
30
|
* @returns Conversion helper.
|
|
31
|
+
* @internal
|
|
29
32
|
*/
|
|
30
|
-
export
|
|
33
|
+
export declare function upcastTable(): (dispatcher: UpcastDispatcher) => void;
|
|
31
34
|
/**
|
|
32
35
|
* A conversion helper that skips empty <tr> elements from upcasting at the beginning of the table.
|
|
33
36
|
*
|
|
@@ -38,12 +41,14 @@ export default function upcastTable(): (dispatcher: UpcastDispatcher) => void;
|
|
|
38
41
|
* *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
|
|
39
42
|
* of an improper table with all empty rows.
|
|
40
43
|
*
|
|
44
|
+
* @internal
|
|
41
45
|
* @returns Conversion helper.
|
|
42
46
|
*/
|
|
43
47
|
export declare function skipEmptyTableRow(): (dispatcher: UpcastDispatcher) => void;
|
|
44
48
|
/**
|
|
45
49
|
* A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
|
|
46
50
|
*
|
|
51
|
+
* @internal
|
|
47
52
|
* @returns Conversion helper.
|
|
48
53
|
*/
|
|
49
54
|
export declare function ensureParagraphInTableCell(elementName: string): (dispatcher: UpcastDispatcher) => void;
|
|
@@ -16,6 +16,8 @@ import { first } from 'ckeditor5/src/utils.js';
|
|
|
16
16
|
* ```xml
|
|
17
17
|
* <table></table>
|
|
18
18
|
* ```
|
|
19
|
+
*
|
|
20
|
+
* @internal
|
|
19
21
|
*/
|
|
20
22
|
export function upcastTableFigure() {
|
|
21
23
|
return (dispatcher) => {
|
|
@@ -53,8 +55,9 @@ export function upcastTableFigure() {
|
|
|
53
55
|
* This conversion helper converts the table element as well as table rows.
|
|
54
56
|
*
|
|
55
57
|
* @returns Conversion helper.
|
|
58
|
+
* @internal
|
|
56
59
|
*/
|
|
57
|
-
export
|
|
60
|
+
export function upcastTable() {
|
|
58
61
|
return (dispatcher) => {
|
|
59
62
|
dispatcher.on('element:table', (evt, data, conversionApi) => {
|
|
60
63
|
const viewTable = data.viewItem;
|
|
@@ -100,6 +103,7 @@ export default function upcastTable() {
|
|
|
100
103
|
* *Note:* Only the first empty rows are removed because they have no meaning and it solves the issue
|
|
101
104
|
* of an improper table with all empty rows.
|
|
102
105
|
*
|
|
106
|
+
* @internal
|
|
103
107
|
* @returns Conversion helper.
|
|
104
108
|
*/
|
|
105
109
|
export function skipEmptyTableRow() {
|
|
@@ -114,6 +118,7 @@ export function skipEmptyTableRow() {
|
|
|
114
118
|
/**
|
|
115
119
|
* A converter that ensures an empty paragraph is inserted in a table cell if no other content was converted.
|
|
116
120
|
*
|
|
121
|
+
* @internal
|
|
117
122
|
* @returns Conversion helper.
|
|
118
123
|
*/
|
|
119
124
|
export function ensureParagraphInTableCell(elementName) {
|
package/src/index.d.ts
CHANGED
|
@@ -5,60 +5,93 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export
|
|
33
|
-
export
|
|
34
|
-
export
|
|
35
|
-
export
|
|
36
|
-
export
|
|
37
|
-
export
|
|
38
|
-
export
|
|
39
|
-
export
|
|
40
|
-
export
|
|
41
|
-
export
|
|
42
|
-
export
|
|
43
|
-
export
|
|
44
|
-
export
|
|
45
|
-
export
|
|
46
|
-
export
|
|
47
|
-
export
|
|
48
|
-
export
|
|
49
|
-
export
|
|
50
|
-
export
|
|
51
|
-
export
|
|
52
|
-
export
|
|
53
|
-
export
|
|
54
|
-
export
|
|
55
|
-
export
|
|
56
|
-
export
|
|
57
|
-
export
|
|
58
|
-
export
|
|
59
|
-
export
|
|
60
|
-
export
|
|
61
|
-
export
|
|
62
|
-
export
|
|
63
|
-
export
|
|
8
|
+
export { PlainTableOutput } from './plaintableoutput.js';
|
|
9
|
+
export { Table } from './table.js';
|
|
10
|
+
export { TableWalker, type TableSlot, type TableWalkerOptions } from './tablewalker.js';
|
|
11
|
+
export { TableEditing, type TableConversionAdditionalSlot } from './tableediting.js';
|
|
12
|
+
export { TableUI } from './tableui.js';
|
|
13
|
+
export { TableToolbar } from './tabletoolbar.js';
|
|
14
|
+
export { TableCellProperties } from './tablecellproperties.js';
|
|
15
|
+
export { TableCellPropertiesEditing } from './tablecellproperties/tablecellpropertiesediting.js';
|
|
16
|
+
export { TableCellPropertiesUI } from './tablecellproperties/tablecellpropertiesui.js';
|
|
17
|
+
export { TableCellPropertiesView, type TableCellPropertiesViewOptions } from './tablecellproperties/ui/tablecellpropertiesview.js';
|
|
18
|
+
export { TableCellWidthEditing } from './tablecellwidth/tablecellwidthediting.js';
|
|
19
|
+
export { TableLayout } from './tablelayout.js';
|
|
20
|
+
export { TableLayoutEditing } from './tablelayout/tablelayoutediting.js';
|
|
21
|
+
export { TableLayoutUI } from './tablelayout/tablelayoutui.js';
|
|
22
|
+
export { TableProperties } from './tableproperties.js';
|
|
23
|
+
export { TablePropertiesEditing } from './tableproperties/tablepropertiesediting.js';
|
|
24
|
+
export { TablePropertiesUI } from './tableproperties/tablepropertiesui.js';
|
|
25
|
+
export { TablePropertiesView, type TablePropertiesViewOptions } from './tableproperties/ui/tablepropertiesview.js';
|
|
26
|
+
export { TableCaption } from './tablecaption.js';
|
|
27
|
+
export { TableCaptionEditing } from './tablecaption/tablecaptionediting.js';
|
|
28
|
+
export { TableCaptionUI } from './tablecaption/tablecaptionui.js';
|
|
29
|
+
export { TableClipboard } from './tableclipboard.js';
|
|
30
|
+
export { TableMouse } from './tablemouse.js';
|
|
31
|
+
export { TableKeyboard } from './tablekeyboard.js';
|
|
32
|
+
export { TableSelection } from './tableselection.js';
|
|
33
|
+
export { TableUtils, type TableIndexesObject } from './tableutils.js';
|
|
34
|
+
export { TableColumnResize } from './tablecolumnresize.js';
|
|
35
|
+
export { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';
|
|
36
|
+
export { TableWidthsCommand, type TableWidthsCommandOptions } from './tablecolumnresize/tablewidthscommand.js';
|
|
37
|
+
export { InsertColumnCommand } from './commands/insertcolumncommand.js';
|
|
38
|
+
export { InsertRowCommand } from './commands/insertrowcommand.js';
|
|
39
|
+
export { InsertTableCommand } from './commands/inserttablecommand.js';
|
|
40
|
+
export { InsertTableLayoutCommand } from './commands/inserttablelayoutcommand.js';
|
|
41
|
+
export { TableTypeCommand } from './tablelayout/commands/tabletypecommand.js';
|
|
42
|
+
export { MergeCellCommand } from './commands/mergecellcommand.js';
|
|
43
|
+
export { MergeCellsCommand } from './commands/mergecellscommand.js';
|
|
44
|
+
export { RemoveColumnCommand } from './commands/removecolumncommand.js';
|
|
45
|
+
export { RemoveRowCommand } from './commands/removerowcommand.js';
|
|
46
|
+
export { SelectColumnCommand } from './commands/selectcolumncommand.js';
|
|
47
|
+
export { SelectRowCommand } from './commands/selectrowcommand.js';
|
|
48
|
+
export { SetHeaderColumnCommand } from './commands/setheadercolumncommand.js';
|
|
49
|
+
export { SetHeaderRowCommand } from './commands/setheaderrowcommand.js';
|
|
50
|
+
export { SplitCellCommand } from './commands/splitcellcommand.js';
|
|
51
|
+
export { ToggleTableCaptionCommand } from './tablecaption/toggletablecaptioncommand.js';
|
|
52
|
+
export { TableCellBackgroundColorCommand } from './tablecellproperties/commands/tablecellbackgroundcolorcommand.js';
|
|
53
|
+
export { TableCellBorderColorCommand } from './tablecellproperties/commands/tablecellbordercolorcommand.js';
|
|
54
|
+
export { TableCellBorderStyleCommand } from './tablecellproperties/commands/tablecellborderstylecommand.js';
|
|
55
|
+
export { TableCellBorderWidthCommand } from './tablecellproperties/commands/tablecellborderwidthcommand.js';
|
|
56
|
+
export { TableCellHeightCommand } from './tablecellproperties/commands/tablecellheightcommand.js';
|
|
57
|
+
export { TableCellHorizontalAlignmentCommand } from './tablecellproperties/commands/tablecellhorizontalalignmentcommand.js';
|
|
58
|
+
export { TableCellPaddingCommand } from './tablecellproperties/commands/tablecellpaddingcommand.js';
|
|
59
|
+
export { TableCellVerticalAlignmentCommand } from './tablecellproperties/commands/tablecellverticalalignmentcommand.js';
|
|
60
|
+
export { TableCellPropertyCommand } from './tablecellproperties/commands/tablecellpropertycommand.js';
|
|
61
|
+
export { TableCellWidthCommand } from './tablecellwidth/commands/tablecellwidthcommand.js';
|
|
62
|
+
export { TableAlignmentCommand } from './tableproperties/commands/tablealignmentcommand.js';
|
|
63
|
+
export { TableBackgroundColorCommand } from './tableproperties/commands/tablebackgroundcolorcommand.js';
|
|
64
|
+
export { TableBorderColorCommand } from './tableproperties/commands/tablebordercolorcommand.js';
|
|
65
|
+
export { TableBorderStyleCommand } from './tableproperties/commands/tableborderstylecommand.js';
|
|
66
|
+
export { TableBorderWidthCommand } from './tableproperties/commands/tableborderwidthcommand.js';
|
|
67
|
+
export { TableHeightCommand } from './tableproperties/commands/tableheightcommand.js';
|
|
68
|
+
export { TableWidthCommand } from './tableproperties/commands/tablewidthcommand.js';
|
|
69
|
+
export { TablePropertyCommand, type TablePropertyCommandExecuteOptions } from './tableproperties/commands/tablepropertycommand.js';
|
|
70
|
+
export type { ViewDocumentTableMouseMoveEvent, ViewDocumentTableMouseLeaveEvent } from './tablemouse/mouseeventsobserver.js';
|
|
71
|
+
export type { TableConfig, TablePropertiesConfig, TablePropertiesOptions, TableCellPropertiesConfig, TableColorConfig, TableCellPropertiesOptions, TableLayoutConfig, TableType } from './tableconfig.js';
|
|
72
|
+
export { downcastTable as _downcastTable, downcastRow as _downcastTableRow, downcastCell as _downcastTableCell, convertParagraphInTableCell as _convertParagraphInTableCell, isSingleParagraphWithoutAttributes as _isSingleTableParagraphWithoutAttributes } from './converters/downcast.js';
|
|
73
|
+
export type { DowncastTableOptions as _DowncastTableOptions } from './converters/downcast.js';
|
|
74
|
+
export { injectTableCaptionPostFixer as _injectTableCaptionPostFixer } from './converters/table-caption-post-fixer.js';
|
|
75
|
+
export { injectTableCellParagraphPostFixer as _injectTableCellParagraphPostFixer } from './converters/table-cell-paragraph-post-fixer.js';
|
|
76
|
+
export { tableCellRefreshHandler as _tableCellRefreshHandler } from './converters/table-cell-refresh-handler.js';
|
|
77
|
+
export { tableHeadingsRefreshHandler as _tableHeadingsRefreshHandler } from './converters/table-headings-refresh-handler.js';
|
|
78
|
+
export { injectTableLayoutPostFixer as _injectTableLayoutPostFixer } from './converters/table-layout-post-fixer.js';
|
|
79
|
+
export { upcastStyleToAttribute as _upcastNormalizedTableStyleToAttribute, upcastBorderStyles as _upcastTableBorderStyles, downcastAttributeToStyle as _downcastTableAttributeToStyle, downcastTableAttribute as _downcastTableAttribute, getDefaultValueAdjusted as _getDefaultTableValueAdjusted } from './converters/tableproperties.js';
|
|
80
|
+
export type { StyleValues as _TableStyleValues } from './converters/tableproperties.js';
|
|
81
|
+
export { upcastTableFigure as _upcastTableFigure, upcastTable as _upcastTable, skipEmptyTableRow as _skipEmptyTableRow, ensureParagraphInTableCell as _ensureParagraphInTableCell } from './converters/upcasttable.js';
|
|
82
|
+
export { isTable as _isTableModelElement, getCaptionFromTableModelElement as _getTableCaptionFromModelElement, getCaptionFromModelSelection as _getTableCaptionFromModelSelection, matchTableCaptionViewElement as _matchTableCaptionViewElement } from './tablecaption/utils.js';
|
|
83
|
+
export { COLUMN_MIN_WIDTH_AS_PERCENTAGE as _TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE, COLUMN_MIN_WIDTH_IN_PIXELS as _TABLE_COLUMN_MIN_WIDTH_IN_PIXELS, COLUMN_WIDTH_PRECISION as _TABLE_COLUMN_WIDTH_PRECISION, COLUMN_RESIZE_DISTANCE_THRESHOLD as _TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD } from './tablecolumnresize/constants.js';
|
|
84
|
+
export { upcastColgroupElement as _upcastTableColgroupElement, downcastTableResizedClass as _downcastTableResizedClass } from './tablecolumnresize/converters.js';
|
|
85
|
+
export { getChangedResizedTables as _getChangedResizedTables, getColumnMinWidthAsPercentage as _getTableColumnMinWidthAsPercentage, getTableWidthInPixels as _getTableWidthInPixels, getElementWidthInPixels as _getElementWidthInPixels, getColumnEdgesIndexes as _getTableColumnEdgesIndexes, toPrecision as _toPrecision, clamp as _clamp, createFilledArray as _createFilledArray, sumArray as _sumArray, normalizeColumnWidths as _normalizeTableColumnWidths, getDomCellOuterWidth as _getDomTableCellOuterWidth, updateColumnElements as _updateTableColumnElements, getColumnGroupElement as _getTableColumnGroupElement, getTableColumnElements as _getTableColumnElements, getTableColumnsWidths as _getTableColumnsWidths, translateColSpanAttribute as _translateTableColspanAttribute } from './tablecolumnresize/utils.js';
|
|
86
|
+
export { MouseEventsObserver as _TableMouseEventsObserver } from './tablemouse/mouseeventsobserver.js';
|
|
87
|
+
export type { ColorInputViewOptions as _TableColorInputViewOptions } from './ui/colorinputview.js';
|
|
88
|
+
export { ColorInputView as _TableColorInputView } from './ui/colorinputview.js';
|
|
89
|
+
export { InsertTableView as _InsertTableView } from './ui/inserttableview.js';
|
|
90
|
+
export { updateNumericAttribute as _updateTableNumericAttribute, createEmptyTableCell as _createEmptyTableCell, isHeadingColumnCell as _isTableHeadingColumnCell, enableProperty as _enableTableCellProperty, getSelectionAffectedTable as _getSelectionAffectedTable } from './utils/common.js';
|
|
91
|
+
export { cropTableToDimensions as _cropTableToDimensions, getVerticallyOverlappingCells as _getVerticallyOverlappingTableCells, splitHorizontally as _splitTableCellHorizontally, getHorizontallyOverlappingCells as _getHorizontallyOverlappingTableCells, splitVertically as _splitTableCellVertically, trimTableCellIfNeeded as _trimTableCellIfNeeded, removeEmptyColumns as _removeEmptyTableColumns, removeEmptyRows as _removeEmptyTableRows, removeEmptyRowsColumns as _removeEmptyTableRowsColumns, adjustLastRowIndex as _adjustLastTableRowIndex, adjustLastColumnIndex as _adjustLastTableColumnIndex } from './utils/structure.js';
|
|
92
|
+
export { getSingleValue as _getTableBorderBoxSingleValue, addDefaultUnitToNumericValue as _addDefaultUnitToNumericValue, getNormalizedDefaultProperties as _getNormalizedDefaultTableBaseProperties, getNormalizedDefaultTableProperties as _getNormalizedDefaultTableProperties, getNormalizedDefaultCellProperties as _getNormalizedDefaultTableCellProperties } from './utils/table-properties.js';
|
|
93
|
+
export type { NormalizedDefaultProperties as _NormalizedTableDefaultProperties, NormalizeTableDefaultPropertiesOptions as _NormalizeTableDefaultPropertiesOptions } from './utils/table-properties.js';
|
|
94
|
+
export { repositionContextualBalloon as _repositionTableContextualBalloon, getBalloonTablePositionData as _getBalloonTablePositionData, getBalloonCellPositionData as _getBalloonTableCellPositionData } from './utils/ui/contextualballoon.js';
|
|
95
|
+
export { getBorderStyleLabels as _getBorderTableStyleLabels, getLocalizedColorErrorText as _getLocalizedTableColorErrorText, getLocalizedLengthErrorText as _getLocalizedTableLengthErrorText, colorFieldValidator as _colorTableFieldValidator, lengthFieldValidator as _lengthTableFieldValidator, lineWidthFieldValidator as _lineWidthTableFieldValidator, getBorderStyleDefinitions as _getTableOrCellBorderStyleDefinitions, fillToolbar as _fillTableOrCellToolbar, defaultColors as _TABLE_DEFAULT_COLORS, getLabeledColorInputCreator as _getLabeledTableColorInputCreator } from './utils/ui/table-properties.js';
|
|
96
|
+
export { getSelectionAffectedTableWidget as _getSelectionAffectedTableWidget, getSelectedTableWidget as _getSelectedTableWidget, getTableWidgetAncestor as _getTableWidgetAncestor } from './utils/ui/widget.js';
|
|
64
97
|
import './augmentation.js';
|
package/src/index.js
CHANGED
|
@@ -5,28 +5,88 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table
|
|
7
7
|
*/
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
8
|
+
export { PlainTableOutput } from './plaintableoutput.js';
|
|
9
|
+
export { Table } from './table.js';
|
|
10
|
+
export { TableWalker } from './tablewalker.js';
|
|
11
|
+
export { TableEditing } from './tableediting.js';
|
|
12
|
+
export { TableUI } from './tableui.js';
|
|
13
|
+
export { TableToolbar } from './tabletoolbar.js';
|
|
14
|
+
export { TableCellProperties } from './tablecellproperties.js';
|
|
15
|
+
export { TableCellPropertiesEditing } from './tablecellproperties/tablecellpropertiesediting.js';
|
|
16
|
+
export { TableCellPropertiesUI } from './tablecellproperties/tablecellpropertiesui.js';
|
|
17
|
+
export { TableCellPropertiesView } from './tablecellproperties/ui/tablecellpropertiesview.js';
|
|
18
|
+
export { TableCellWidthEditing } from './tablecellwidth/tablecellwidthediting.js';
|
|
19
|
+
export { TableLayout } from './tablelayout.js';
|
|
20
|
+
export { TableLayoutEditing } from './tablelayout/tablelayoutediting.js';
|
|
21
|
+
export { TableLayoutUI } from './tablelayout/tablelayoutui.js';
|
|
22
|
+
export { TableProperties } from './tableproperties.js';
|
|
23
|
+
export { TablePropertiesEditing } from './tableproperties/tablepropertiesediting.js';
|
|
24
|
+
export { TablePropertiesUI } from './tableproperties/tablepropertiesui.js';
|
|
25
|
+
export { TablePropertiesView } from './tableproperties/ui/tablepropertiesview.js';
|
|
26
|
+
export { TableCaption } from './tablecaption.js';
|
|
27
|
+
export { TableCaptionEditing } from './tablecaption/tablecaptionediting.js';
|
|
28
|
+
export { TableCaptionUI } from './tablecaption/tablecaptionui.js';
|
|
29
|
+
export { TableClipboard } from './tableclipboard.js';
|
|
30
|
+
export { TableMouse } from './tablemouse.js';
|
|
31
|
+
export { TableKeyboard } from './tablekeyboard.js';
|
|
32
|
+
export { TableSelection } from './tableselection.js';
|
|
33
|
+
export { TableUtils } from './tableutils.js';
|
|
34
|
+
export { TableColumnResize } from './tablecolumnresize.js';
|
|
35
|
+
export { TableColumnResizeEditing } from './tablecolumnresize/tablecolumnresizeediting.js';
|
|
36
|
+
export { TableWidthsCommand } from './tablecolumnresize/tablewidthscommand.js';
|
|
37
|
+
export { InsertColumnCommand } from './commands/insertcolumncommand.js';
|
|
38
|
+
export { InsertRowCommand } from './commands/insertrowcommand.js';
|
|
39
|
+
export { InsertTableCommand } from './commands/inserttablecommand.js';
|
|
40
|
+
export { InsertTableLayoutCommand } from './commands/inserttablelayoutcommand.js';
|
|
41
|
+
export { TableTypeCommand } from './tablelayout/commands/tabletypecommand.js';
|
|
42
|
+
export { MergeCellCommand } from './commands/mergecellcommand.js';
|
|
43
|
+
export { MergeCellsCommand } from './commands/mergecellscommand.js';
|
|
44
|
+
export { RemoveColumnCommand } from './commands/removecolumncommand.js';
|
|
45
|
+
export { RemoveRowCommand } from './commands/removerowcommand.js';
|
|
46
|
+
export { SelectColumnCommand } from './commands/selectcolumncommand.js';
|
|
47
|
+
export { SelectRowCommand } from './commands/selectrowcommand.js';
|
|
48
|
+
export { SetHeaderColumnCommand } from './commands/setheadercolumncommand.js';
|
|
49
|
+
export { SetHeaderRowCommand } from './commands/setheaderrowcommand.js';
|
|
50
|
+
export { SplitCellCommand } from './commands/splitcellcommand.js';
|
|
51
|
+
export { ToggleTableCaptionCommand } from './tablecaption/toggletablecaptioncommand.js';
|
|
52
|
+
export { TableCellBackgroundColorCommand } from './tablecellproperties/commands/tablecellbackgroundcolorcommand.js';
|
|
53
|
+
export { TableCellBorderColorCommand } from './tablecellproperties/commands/tablecellbordercolorcommand.js';
|
|
54
|
+
export { TableCellBorderStyleCommand } from './tablecellproperties/commands/tablecellborderstylecommand.js';
|
|
55
|
+
export { TableCellBorderWidthCommand } from './tablecellproperties/commands/tablecellborderwidthcommand.js';
|
|
56
|
+
export { TableCellHeightCommand } from './tablecellproperties/commands/tablecellheightcommand.js';
|
|
57
|
+
export { TableCellHorizontalAlignmentCommand } from './tablecellproperties/commands/tablecellhorizontalalignmentcommand.js';
|
|
58
|
+
export { TableCellPaddingCommand } from './tablecellproperties/commands/tablecellpaddingcommand.js';
|
|
59
|
+
export { TableCellVerticalAlignmentCommand } from './tablecellproperties/commands/tablecellverticalalignmentcommand.js';
|
|
60
|
+
export { TableCellPropertyCommand } from './tablecellproperties/commands/tablecellpropertycommand.js';
|
|
61
|
+
export { TableCellWidthCommand } from './tablecellwidth/commands/tablecellwidthcommand.js';
|
|
62
|
+
export { TableAlignmentCommand } from './tableproperties/commands/tablealignmentcommand.js';
|
|
63
|
+
export { TableBackgroundColorCommand } from './tableproperties/commands/tablebackgroundcolorcommand.js';
|
|
64
|
+
export { TableBorderColorCommand } from './tableproperties/commands/tablebordercolorcommand.js';
|
|
65
|
+
export { TableBorderStyleCommand } from './tableproperties/commands/tableborderstylecommand.js';
|
|
66
|
+
export { TableBorderWidthCommand } from './tableproperties/commands/tableborderwidthcommand.js';
|
|
67
|
+
export { TableHeightCommand } from './tableproperties/commands/tableheightcommand.js';
|
|
68
|
+
export { TableWidthCommand } from './tableproperties/commands/tablewidthcommand.js';
|
|
69
|
+
export { TablePropertyCommand } from './tableproperties/commands/tablepropertycommand.js';
|
|
70
|
+
// Internal exports.
|
|
71
|
+
export { downcastTable as _downcastTable, downcastRow as _downcastTableRow, downcastCell as _downcastTableCell, convertParagraphInTableCell as _convertParagraphInTableCell, isSingleParagraphWithoutAttributes as _isSingleTableParagraphWithoutAttributes } from './converters/downcast.js';
|
|
72
|
+
export { injectTableCaptionPostFixer as _injectTableCaptionPostFixer } from './converters/table-caption-post-fixer.js';
|
|
73
|
+
export { injectTableCellParagraphPostFixer as _injectTableCellParagraphPostFixer } from './converters/table-cell-paragraph-post-fixer.js';
|
|
74
|
+
export { tableCellRefreshHandler as _tableCellRefreshHandler } from './converters/table-cell-refresh-handler.js';
|
|
75
|
+
export { tableHeadingsRefreshHandler as _tableHeadingsRefreshHandler } from './converters/table-headings-refresh-handler.js';
|
|
76
|
+
export { injectTableLayoutPostFixer as _injectTableLayoutPostFixer } from './converters/table-layout-post-fixer.js';
|
|
77
|
+
export { upcastStyleToAttribute as _upcastNormalizedTableStyleToAttribute, upcastBorderStyles as _upcastTableBorderStyles, downcastAttributeToStyle as _downcastTableAttributeToStyle, downcastTableAttribute as _downcastTableAttribute, getDefaultValueAdjusted as _getDefaultTableValueAdjusted } from './converters/tableproperties.js';
|
|
78
|
+
export { upcastTableFigure as _upcastTableFigure, upcastTable as _upcastTable, skipEmptyTableRow as _skipEmptyTableRow, ensureParagraphInTableCell as _ensureParagraphInTableCell } from './converters/upcasttable.js';
|
|
79
|
+
export { isTable as _isTableModelElement, getCaptionFromTableModelElement as _getTableCaptionFromModelElement, getCaptionFromModelSelection as _getTableCaptionFromModelSelection, matchTableCaptionViewElement as _matchTableCaptionViewElement } from './tablecaption/utils.js';
|
|
80
|
+
export { COLUMN_MIN_WIDTH_AS_PERCENTAGE as _TABLE_COLUMN_MIN_WIDTH_AS_PERCENTAGE, COLUMN_MIN_WIDTH_IN_PIXELS as _TABLE_COLUMN_MIN_WIDTH_IN_PIXELS, COLUMN_WIDTH_PRECISION as _TABLE_COLUMN_WIDTH_PRECISION, COLUMN_RESIZE_DISTANCE_THRESHOLD as _TABLE_COLUMN_RESIZE_DISTANCE_THRESHOLD } from './tablecolumnresize/constants.js';
|
|
81
|
+
export { upcastColgroupElement as _upcastTableColgroupElement, downcastTableResizedClass as _downcastTableResizedClass } from './tablecolumnresize/converters.js';
|
|
82
|
+
export { getChangedResizedTables as _getChangedResizedTables, getColumnMinWidthAsPercentage as _getTableColumnMinWidthAsPercentage, getTableWidthInPixels as _getTableWidthInPixels, getElementWidthInPixels as _getElementWidthInPixels, getColumnEdgesIndexes as _getTableColumnEdgesIndexes, toPrecision as _toPrecision, clamp as _clamp, createFilledArray as _createFilledArray, sumArray as _sumArray, normalizeColumnWidths as _normalizeTableColumnWidths, getDomCellOuterWidth as _getDomTableCellOuterWidth, updateColumnElements as _updateTableColumnElements, getColumnGroupElement as _getTableColumnGroupElement, getTableColumnElements as _getTableColumnElements, getTableColumnsWidths as _getTableColumnsWidths, translateColSpanAttribute as _translateTableColspanAttribute } from './tablecolumnresize/utils.js';
|
|
83
|
+
export { MouseEventsObserver as _TableMouseEventsObserver } from './tablemouse/mouseeventsobserver.js';
|
|
84
|
+
export { ColorInputView as _TableColorInputView } from './ui/colorinputview.js';
|
|
85
|
+
export { InsertTableView as _InsertTableView } from './ui/inserttableview.js';
|
|
86
|
+
export { updateNumericAttribute as _updateTableNumericAttribute, createEmptyTableCell as _createEmptyTableCell, isHeadingColumnCell as _isTableHeadingColumnCell, enableProperty as _enableTableCellProperty, getSelectionAffectedTable as _getSelectionAffectedTable } from './utils/common.js';
|
|
87
|
+
export { cropTableToDimensions as _cropTableToDimensions, getVerticallyOverlappingCells as _getVerticallyOverlappingTableCells, splitHorizontally as _splitTableCellHorizontally, getHorizontallyOverlappingCells as _getHorizontallyOverlappingTableCells, splitVertically as _splitTableCellVertically, trimTableCellIfNeeded as _trimTableCellIfNeeded, removeEmptyColumns as _removeEmptyTableColumns, removeEmptyRows as _removeEmptyTableRows, removeEmptyRowsColumns as _removeEmptyTableRowsColumns, adjustLastRowIndex as _adjustLastTableRowIndex, adjustLastColumnIndex as _adjustLastTableColumnIndex } from './utils/structure.js';
|
|
88
|
+
export { getSingleValue as _getTableBorderBoxSingleValue, addDefaultUnitToNumericValue as _addDefaultUnitToNumericValue, getNormalizedDefaultProperties as _getNormalizedDefaultTableBaseProperties, getNormalizedDefaultTableProperties as _getNormalizedDefaultTableProperties, getNormalizedDefaultCellProperties as _getNormalizedDefaultTableCellProperties } from './utils/table-properties.js';
|
|
89
|
+
export { repositionContextualBalloon as _repositionTableContextualBalloon, getBalloonTablePositionData as _getBalloonTablePositionData, getBalloonCellPositionData as _getBalloonTableCellPositionData } from './utils/ui/contextualballoon.js';
|
|
90
|
+
export { getBorderStyleLabels as _getBorderTableStyleLabels, getLocalizedColorErrorText as _getLocalizedTableColorErrorText, getLocalizedLengthErrorText as _getLocalizedTableLengthErrorText, colorFieldValidator as _colorTableFieldValidator, lengthFieldValidator as _lengthTableFieldValidator, lineWidthFieldValidator as _lineWidthTableFieldValidator, getBorderStyleDefinitions as _getTableOrCellBorderStyleDefinitions, fillToolbar as _fillTableOrCellToolbar, defaultColors as _TABLE_DEFAULT_COLORS, getLabeledColorInputCreator as _getLabeledTableColorInputCreator } from './utils/ui/table-properties.js';
|
|
91
|
+
export { getSelectionAffectedTableWidget as _getSelectionAffectedTableWidget, getSelectedTableWidget as _getSelectedTableWidget, getTableWidgetAncestor as _getTableWidgetAncestor } from './utils/ui/widget.js';
|
|
32
92
|
import './augmentation.js';
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* @module table/plaintableoutput
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import Table from './table.js';
|
|
9
|
+
import { Table } from './table.js';
|
|
10
10
|
/**
|
|
11
11
|
* The plain table output feature.
|
|
12
12
|
*
|
|
13
13
|
* This feature strips the `<figure>` tag from the table data. This is because this tag is not supported
|
|
14
14
|
* by most popular email clients and removing it ensures compatibility.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export declare class PlainTableOutput extends Plugin {
|
|
17
17
|
/**
|
|
18
18
|
* @inheritDoc
|
|
19
19
|
*/
|
package/src/plaintableoutput.js
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
* @module table/plaintableoutput
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
|
-
import Table from './table.js';
|
|
9
|
+
import { Table } from './table.js';
|
|
10
10
|
/**
|
|
11
11
|
* The plain table output feature.
|
|
12
12
|
*
|
|
13
13
|
* This feature strips the `<figure>` tag from the table data. This is because this tag is not supported
|
|
14
14
|
* by most popular email clients and removing it ensures compatibility.
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export class PlainTableOutput extends Plugin {
|
|
17
17
|
/**
|
|
18
18
|
* @inheritDoc
|
|
19
19
|
*/
|
package/src/table.d.ts
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { Widget } from 'ckeditor5/src/widget.js';
|
|
10
|
-
import TableEditing from './tableediting.js';
|
|
11
|
-
import TableUI from './tableui.js';
|
|
12
|
-
import TableSelection from './tableselection.js';
|
|
13
|
-
import TableClipboard from './tableclipboard.js';
|
|
14
|
-
import TableKeyboard from './tablekeyboard.js';
|
|
15
|
-
import TableMouse from './tablemouse.js';
|
|
10
|
+
import { TableEditing } from './tableediting.js';
|
|
11
|
+
import { TableUI } from './tableui.js';
|
|
12
|
+
import { TableSelection } from './tableselection.js';
|
|
13
|
+
import { TableClipboard } from './tableclipboard.js';
|
|
14
|
+
import { TableKeyboard } from './tablekeyboard.js';
|
|
15
|
+
import { TableMouse } from './tablemouse.js';
|
|
16
16
|
import '../theme/table.css';
|
|
17
17
|
/**
|
|
18
18
|
* The table plugin.
|
|
@@ -28,7 +28,7 @@ import '../theme/table.css';
|
|
|
28
28
|
* * {@link module:table/tableclipboard~TableClipboard clipboard feature},
|
|
29
29
|
* * {@link module:table/tableui~TableUI UI feature}.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export declare class Table extends Plugin {
|
|
32
32
|
/**
|
|
33
33
|
* @inheritDoc
|
|
34
34
|
*/
|
package/src/table.js
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { Plugin } from 'ckeditor5/src/core.js';
|
|
9
9
|
import { Widget } from 'ckeditor5/src/widget.js';
|
|
10
|
-
import TableEditing from './tableediting.js';
|
|
11
|
-
import TableUI from './tableui.js';
|
|
12
|
-
import TableSelection from './tableselection.js';
|
|
13
|
-
import TableClipboard from './tableclipboard.js';
|
|
14
|
-
import TableKeyboard from './tablekeyboard.js';
|
|
15
|
-
import TableMouse from './tablemouse.js';
|
|
10
|
+
import { TableEditing } from './tableediting.js';
|
|
11
|
+
import { TableUI } from './tableui.js';
|
|
12
|
+
import { TableSelection } from './tableselection.js';
|
|
13
|
+
import { TableClipboard } from './tableclipboard.js';
|
|
14
|
+
import { TableKeyboard } from './tablekeyboard.js';
|
|
15
|
+
import { TableMouse } from './tablemouse.js';
|
|
16
16
|
import '../theme/table.css';
|
|
17
17
|
/**
|
|
18
18
|
* The table plugin.
|
|
@@ -28,7 +28,7 @@ import '../theme/table.css';
|
|
|
28
28
|
* * {@link module:table/tableclipboard~TableClipboard clipboard feature},
|
|
29
29
|
* * {@link module:table/tableui~TableUI UI feature}.
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export class Table extends Plugin {
|
|
32
32
|
/**
|
|
33
33
|
* @inheritDoc
|
|
34
34
|
*/
|