@ckeditor/ckeditor5-table 38.2.0-alpha.0 → 38.2.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/package.json +2 -2
- package/src/augmentation.d.ts +1 -1
- 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/mergecellcommand.d.ts +3 -3
- package/src/commands/mergecellcommand.js +4 -4
- package/src/commands/mergecellscommand.d.ts +1 -1
- package/src/commands/mergecellscommand.js +4 -4
- 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 +1 -1
- package/src/commands/setheadercolumncommand.js +3 -3
- package/src/commands/setheaderrowcommand.d.ts +1 -1
- package/src/commands/setheaderrowcommand.js +3 -3
- package/src/commands/splitcellcommand.d.ts +1 -1
- package/src/commands/splitcellcommand.js +1 -1
- package/src/converters/downcast.d.ts +3 -3
- package/src/converters/downcast.js +2 -2
- package/src/converters/table-caption-post-fixer.d.ts +1 -1
- package/src/converters/table-cell-paragraph-post-fixer.d.ts +1 -1
- package/src/converters/table-cell-refresh-handler.d.ts +1 -1
- package/src/converters/table-cell-refresh-handler.js +1 -1
- package/src/converters/table-headings-refresh-handler.d.ts +1 -1
- package/src/converters/table-headings-refresh-handler.js +1 -1
- package/src/converters/table-layout-post-fixer.d.ts +1 -1
- package/src/converters/table-layout-post-fixer.js +2 -2
- package/src/converters/tableproperties.d.ts +1 -1
- package/src/converters/upcasttable.d.ts +1 -1
- package/src/converters/upcasttable.js +2 -2
- package/src/index.d.ts +53 -53
- package/src/index.js +23 -23
- package/src/plaintableoutput.d.ts +2 -2
- package/src/plaintableoutput.js +2 -2
- package/src/table.d.ts +8 -8
- package/src/table.js +8 -8
- package/src/tablecaption/tablecaptionediting.d.ts +2 -2
- package/src/tablecaption/tablecaptionediting.js +6 -6
- package/src/tablecaption/tablecaptionui.d.ts +1 -1
- package/src/tablecaption/tablecaptionui.js +3 -3
- package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
- package/src/tablecaption/toggletablecaptioncommand.js +2 -2
- package/src/tablecaption/utils.d.ts +1 -1
- 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 +1 -1
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +3 -3
- package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +3 -3
- package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +3 -3
- 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 +1 -1
- package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +3 -3
- package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellpropertycommand.js +1 -1
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +2 -2
- package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +1 -1
- package/src/tablecellproperties/tablecellpropertiesediting.d.ts +3 -3
- package/src/tablecellproperties/tablecellpropertiesediting.js +15 -15
- package/src/tablecellproperties/tablecellpropertiesui.d.ts +3 -3
- package/src/tablecellproperties/tablecellpropertiesui.js +10 -8
- package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +5 -4
- package/src/tablecellproperties/ui/tablecellpropertiesview.js +9 -7
- 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 -5
- package/src/tableclipboard.d.ts +5 -5
- package/src/tableclipboard.js +5 -5
- package/src/tablecolumnresize/converters.d.ts +2 -2
- package/src/tablecolumnresize/converters.js +1 -1
- package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +4 -4
- package/src/tablecolumnresize/tablecolumnresizeediting.js +10 -10
- package/src/tablecolumnresize/tablewidthscommand.d.ts +2 -2
- package/src/tablecolumnresize/tablewidthscommand.js +2 -2
- package/src/tablecolumnresize/utils.d.ts +3 -3
- package/src/tablecolumnresize/utils.js +2 -2
- package/src/tablecolumnresize.d.ts +3 -3
- package/src/tablecolumnresize.js +3 -3
- package/src/tableconfig.d.ts +14 -2
- package/src/tableediting.d.ts +3 -3
- package/src/tableediting.js +20 -20
- package/src/tablekeyboard.d.ts +5 -5
- package/src/tablekeyboard.js +5 -5
- package/src/tablemouse/mouseeventsobserver.d.ts +1 -1
- package/src/tablemouse/mouseeventsobserver.js +1 -1
- 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 +1 -1
- package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +2 -2
- package/src/tableproperties/commands/tablebackgroundcolorcommand.js +1 -1
- package/src/tableproperties/commands/tablebordercolorcommand.d.ts +3 -3
- package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
- package/src/tableproperties/commands/tableborderstylecommand.d.ts +3 -3
- package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
- package/src/tableproperties/commands/tableborderwidthcommand.d.ts +3 -3
- 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 +2 -2
- 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 +12 -12
- package/src/tableproperties/tablepropertiesui.d.ts +3 -3
- package/src/tableproperties/tablepropertiesui.js +10 -8
- package/src/tableproperties/ui/tablepropertiesview.d.ts +8 -4
- package/src/tableproperties/ui/tablepropertiesview.js +9 -7
- package/src/tableproperties.d.ts +3 -3
- package/src/tableproperties.js +3 -3
- package/src/tableselection.d.ts +3 -3
- package/src/tableselection.js +5 -5
- package/src/tabletoolbar.d.ts +2 -2
- package/src/tabletoolbar.js +3 -3
- package/src/tableui.d.ts +1 -1
- package/src/tableui.js +4 -4
- package/src/tableutils.d.ts +3 -3
- package/src/tableutils.js +5 -5
- package/src/tablewalker.d.ts +1 -1
- package/src/ui/colorinputview.d.ts +5 -8
- package/src/ui/colorinputview.js +54 -37
- package/src/ui/formrowview.d.ts +2 -2
- package/src/ui/formrowview.js +1 -1
- package/src/ui/inserttableview.d.ts +2 -2
- package/src/ui/inserttableview.js +2 -2
- package/src/utils/common.d.ts +2 -2
- package/src/utils/common.js +1 -1
- package/src/utils/structure.d.ts +3 -3
- package/src/utils/structure.js +2 -2
- package/src/utils/table-properties.d.ts +1 -1
- package/src/utils/ui/contextualballoon.d.ts +2 -2
- package/src/utils/ui/contextualballoon.js +3 -3
- package/src/utils/ui/table-properties.d.ts +7 -5
- package/src/utils/ui/table-properties.js +7 -5
- package/src/utils/ui/widget.d.ts +1 -1
- package/src/utils/ui/widget.js +1 -1
- package/theme/tablecaption.css +7 -7
- package/theme/tablecolumnresize.css +2 -2
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table/utils/ui/table-properties
|
|
7
7
|
*/
|
|
8
|
-
import { type ColorOption, type LabeledFieldView, type ListDropdownItemDefinition, type NormalizedColorOption, type ToolbarView, type View } from 'ckeditor5/src/ui';
|
|
9
|
-
import { Collection, type LocaleTranslate } from 'ckeditor5/src/utils';
|
|
10
|
-
import type TableCellPropertiesView from '../../tablecellproperties/ui/tablecellpropertiesview';
|
|
11
|
-
import type TablePropertiesView from '../../tableproperties/ui/tablepropertiesview';
|
|
12
|
-
import ColorInputView from '../../ui/colorinputview';
|
|
8
|
+
import { type ColorOption, type LabeledFieldView, type ListDropdownItemDefinition, type NormalizedColorOption, type ToolbarView, type View, type ColorPickerConfig } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { Collection, type LocaleTranslate } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import type TableCellPropertiesView from '../../tablecellproperties/ui/tablecellpropertiesview.js';
|
|
11
|
+
import type TablePropertiesView from '../../tableproperties/ui/tablepropertiesview.js';
|
|
12
|
+
import ColorInputView from '../../ui/colorinputview.js';
|
|
13
13
|
/**
|
|
14
14
|
* Returns an object containing pairs of CSS border style values and their localized UI
|
|
15
15
|
* labels. Used by {@link module:table/tablecellproperties/ui/tablecellpropertiesview~TableCellPropertiesView}
|
|
@@ -185,9 +185,11 @@ export declare const defaultColors: Array<ColorOption>;
|
|
|
185
185
|
* @param options.columns The configuration of the number of columns the color palette consists of in the input's dropdown.
|
|
186
186
|
* @param options.defaultColorValue If specified, the color input view will replace the "Remove color" button with
|
|
187
187
|
* the "Restore default" button. Instead of clearing the input field, the default color value will be set.
|
|
188
|
+
* @param options.colorPickerConfig The configuration of the color picker. You could disable it or define your output format.
|
|
188
189
|
*/
|
|
189
190
|
export declare function getLabeledColorInputCreator(options: {
|
|
190
191
|
colorConfig: Array<NormalizedColorOption>;
|
|
191
192
|
columns: number;
|
|
192
193
|
defaultColorValue?: string;
|
|
194
|
+
colorPickerConfig: false | ColorPickerConfig;
|
|
193
195
|
}): (labeledFieldView: LabeledFieldView, viewUid: string, statusUid: string) => ColorInputView;
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table/utils/ui/table-properties
|
|
7
7
|
*/
|
|
8
|
-
import { ButtonView, Model } from 'ckeditor5/src/ui';
|
|
9
|
-
import { Collection } from 'ckeditor5/src/utils';
|
|
10
|
-
import { isColor, isLength, isPercentage } from 'ckeditor5/src/engine';
|
|
11
|
-
import ColorInputView from '../../ui/colorinputview';
|
|
8
|
+
import { ButtonView, Model } from 'ckeditor5/src/ui.js';
|
|
9
|
+
import { Collection } from 'ckeditor5/src/utils.js';
|
|
10
|
+
import { isColor, isLength, isPercentage } from 'ckeditor5/src/engine.js';
|
|
11
|
+
import ColorInputView from '../../ui/colorinputview.js';
|
|
12
12
|
const isEmpty = (val) => val === '';
|
|
13
13
|
/**
|
|
14
14
|
* Returns an object containing pairs of CSS border style values and their localized UI
|
|
@@ -318,13 +318,15 @@ export const defaultColors = [
|
|
|
318
318
|
* @param options.columns The configuration of the number of columns the color palette consists of in the input's dropdown.
|
|
319
319
|
* @param options.defaultColorValue If specified, the color input view will replace the "Remove color" button with
|
|
320
320
|
* the "Restore default" button. Instead of clearing the input field, the default color value will be set.
|
|
321
|
+
* @param options.colorPickerConfig The configuration of the color picker. You could disable it or define your output format.
|
|
321
322
|
*/
|
|
322
323
|
export function getLabeledColorInputCreator(options) {
|
|
323
324
|
return (labeledFieldView, viewUid, statusUid) => {
|
|
324
325
|
const colorInputView = new ColorInputView(labeledFieldView.locale, {
|
|
325
326
|
colorDefinitions: colorConfigToColorGridDefinitions(options.colorConfig),
|
|
326
327
|
columns: options.columns,
|
|
327
|
-
defaultColorValue: options.defaultColorValue
|
|
328
|
+
defaultColorValue: options.defaultColorValue,
|
|
329
|
+
colorPickerConfig: options.colorPickerConfig
|
|
328
330
|
});
|
|
329
331
|
colorInputView.inputView.set({
|
|
330
332
|
id: viewUid,
|
package/src/utils/ui/widget.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module table/utils/ui/widget
|
|
7
7
|
*/
|
|
8
|
-
import type { ViewDocumentSelection, ViewElement } from 'ckeditor5/src/engine';
|
|
8
|
+
import type { ViewDocumentSelection, ViewElement } from 'ckeditor5/src/engine.js';
|
|
9
9
|
/**
|
|
10
10
|
* Returns a table widget editing view element if one is selected.
|
|
11
11
|
*/
|
package/src/utils/ui/widget.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2023, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
4
|
*/
|
|
5
|
-
import { isWidget } from 'ckeditor5/src/widget';
|
|
5
|
+
import { isWidget } from 'ckeditor5/src/widget.js';
|
|
6
6
|
/**
|
|
7
7
|
* Returns a table widget editing view element if one is selected.
|
|
8
8
|
*/
|
package/theme/tablecaption.css
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
|
-
--ck-color-
|
|
8
|
-
--ck-color-
|
|
9
|
-
--ck-color-
|
|
7
|
+
--ck-color-selector-caption-background: hsl(0, 0%, 97%);
|
|
8
|
+
--ck-color-selector-caption-text: hsl(0, 0%, 20%);
|
|
9
|
+
--ck-color-selector-caption-highlighted-background: hsl(52deg 100% 50%);
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
/* Content styles */
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
caption-side: top;
|
|
16
16
|
word-break: break-word;
|
|
17
17
|
text-align: center;
|
|
18
|
-
color: var(--ck-color-
|
|
19
|
-
background-color: var(--ck-color-
|
|
18
|
+
color: var(--ck-color-selector-caption-text);
|
|
19
|
+
background-color: var(--ck-color-selector-caption-background);
|
|
20
20
|
padding: .6em;
|
|
21
21
|
font-size: .75em;
|
|
22
22
|
outline-offset: -1px;
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
|
|
45
45
|
@keyframes ck-table-caption-highlight {
|
|
46
46
|
0% {
|
|
47
|
-
background-color: var(--ck-color-
|
|
47
|
+
background-color: var(--ck-color-selector-caption-highlighted-background);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
100% {
|
|
51
|
-
background-color: var(--ck-color-
|
|
51
|
+
background-color: var(--ck-color-selector-caption-background);
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
:root {
|
|
7
|
-
--ck-color-
|
|
7
|
+
--ck-color-selector-column-resizer-hover: var(--ck-color-base-active);
|
|
8
8
|
--ck-table-column-resizer-width: 7px;
|
|
9
9
|
|
|
10
10
|
/* The offset used for absolute positioning of the resizer element, so that it is placed exactly above the cell border.
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
|
|
56
56
|
.ck.ck-editor__editable .table .ck-table-column-resizer:hover,
|
|
57
57
|
.ck.ck-editor__editable .table .ck-table-column-resizer__active {
|
|
58
|
-
background-color: var(--ck-color-
|
|
58
|
+
background-color: var(--ck-color-selector-column-resizer-hover);
|
|
59
59
|
opacity: 0.25;
|
|
60
60
|
}
|
|
61
61
|
|