@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.
Files changed (158) hide show
  1. package/build/table.js +1 -1
  2. package/package.json +2 -2
  3. package/src/augmentation.d.ts +1 -1
  4. package/src/commands/insertcolumncommand.d.ts +1 -1
  5. package/src/commands/insertcolumncommand.js +1 -1
  6. package/src/commands/insertrowcommand.d.ts +1 -1
  7. package/src/commands/insertrowcommand.js +1 -1
  8. package/src/commands/inserttablecommand.d.ts +1 -1
  9. package/src/commands/inserttablecommand.js +1 -1
  10. package/src/commands/mergecellcommand.d.ts +3 -3
  11. package/src/commands/mergecellcommand.js +4 -4
  12. package/src/commands/mergecellscommand.d.ts +1 -1
  13. package/src/commands/mergecellscommand.js +4 -4
  14. package/src/commands/removecolumncommand.d.ts +1 -1
  15. package/src/commands/removecolumncommand.js +2 -2
  16. package/src/commands/removerowcommand.d.ts +1 -1
  17. package/src/commands/removerowcommand.js +1 -1
  18. package/src/commands/selectcolumncommand.d.ts +1 -1
  19. package/src/commands/selectcolumncommand.js +2 -2
  20. package/src/commands/selectrowcommand.d.ts +1 -1
  21. package/src/commands/selectrowcommand.js +1 -1
  22. package/src/commands/setheadercolumncommand.d.ts +1 -1
  23. package/src/commands/setheadercolumncommand.js +3 -3
  24. package/src/commands/setheaderrowcommand.d.ts +1 -1
  25. package/src/commands/setheaderrowcommand.js +3 -3
  26. package/src/commands/splitcellcommand.d.ts +1 -1
  27. package/src/commands/splitcellcommand.js +1 -1
  28. package/src/converters/downcast.d.ts +3 -3
  29. package/src/converters/downcast.js +2 -2
  30. package/src/converters/table-caption-post-fixer.d.ts +1 -1
  31. package/src/converters/table-cell-paragraph-post-fixer.d.ts +1 -1
  32. package/src/converters/table-cell-refresh-handler.d.ts +1 -1
  33. package/src/converters/table-cell-refresh-handler.js +1 -1
  34. package/src/converters/table-headings-refresh-handler.d.ts +1 -1
  35. package/src/converters/table-headings-refresh-handler.js +1 -1
  36. package/src/converters/table-layout-post-fixer.d.ts +1 -1
  37. package/src/converters/table-layout-post-fixer.js +2 -2
  38. package/src/converters/tableproperties.d.ts +1 -1
  39. package/src/converters/upcasttable.d.ts +1 -1
  40. package/src/converters/upcasttable.js +2 -2
  41. package/src/index.d.ts +53 -53
  42. package/src/index.js +23 -23
  43. package/src/plaintableoutput.d.ts +2 -2
  44. package/src/plaintableoutput.js +2 -2
  45. package/src/table.d.ts +8 -8
  46. package/src/table.js +8 -8
  47. package/src/tablecaption/tablecaptionediting.d.ts +2 -2
  48. package/src/tablecaption/tablecaptionediting.js +6 -6
  49. package/src/tablecaption/tablecaptionui.d.ts +1 -1
  50. package/src/tablecaption/tablecaptionui.js +3 -3
  51. package/src/tablecaption/toggletablecaptioncommand.d.ts +1 -1
  52. package/src/tablecaption/toggletablecaptioncommand.js +2 -2
  53. package/src/tablecaption/utils.d.ts +1 -1
  54. package/src/tablecaption.d.ts +3 -3
  55. package/src/tablecaption.js +3 -3
  56. package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.d.ts +2 -2
  57. package/src/tablecellproperties/commands/tablecellbackgroundcolorcommand.js +1 -1
  58. package/src/tablecellproperties/commands/tablecellbordercolorcommand.d.ts +3 -3
  59. package/src/tablecellproperties/commands/tablecellbordercolorcommand.js +2 -2
  60. package/src/tablecellproperties/commands/tablecellborderstylecommand.d.ts +3 -3
  61. package/src/tablecellproperties/commands/tablecellborderstylecommand.js +2 -2
  62. package/src/tablecellproperties/commands/tablecellborderwidthcommand.d.ts +3 -3
  63. package/src/tablecellproperties/commands/tablecellborderwidthcommand.js +2 -2
  64. package/src/tablecellproperties/commands/tablecellheightcommand.d.ts +2 -2
  65. package/src/tablecellproperties/commands/tablecellheightcommand.js +2 -2
  66. package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.d.ts +2 -2
  67. package/src/tablecellproperties/commands/tablecellhorizontalalignmentcommand.js +1 -1
  68. package/src/tablecellproperties/commands/tablecellpaddingcommand.d.ts +3 -3
  69. package/src/tablecellproperties/commands/tablecellpaddingcommand.js +2 -2
  70. package/src/tablecellproperties/commands/tablecellpropertycommand.d.ts +2 -2
  71. package/src/tablecellproperties/commands/tablecellpropertycommand.js +1 -1
  72. package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.d.ts +2 -2
  73. package/src/tablecellproperties/commands/tablecellverticalalignmentcommand.js +1 -1
  74. package/src/tablecellproperties/tablecellpropertiesediting.d.ts +3 -3
  75. package/src/tablecellproperties/tablecellpropertiesediting.js +15 -15
  76. package/src/tablecellproperties/tablecellpropertiesui.d.ts +3 -3
  77. package/src/tablecellproperties/tablecellpropertiesui.js +10 -8
  78. package/src/tablecellproperties/ui/tablecellpropertiesview.d.ts +5 -4
  79. package/src/tablecellproperties/ui/tablecellpropertiesview.js +9 -7
  80. package/src/tablecellproperties.d.ts +3 -3
  81. package/src/tablecellproperties.js +3 -3
  82. package/src/tablecellwidth/commands/tablecellwidthcommand.d.ts +2 -2
  83. package/src/tablecellwidth/commands/tablecellwidthcommand.js +2 -2
  84. package/src/tablecellwidth/tablecellwidthediting.d.ts +2 -2
  85. package/src/tablecellwidth/tablecellwidthediting.js +5 -5
  86. package/src/tableclipboard.d.ts +5 -5
  87. package/src/tableclipboard.js +5 -5
  88. package/src/tablecolumnresize/converters.d.ts +2 -2
  89. package/src/tablecolumnresize/converters.js +1 -1
  90. package/src/tablecolumnresize/tablecolumnresizeediting.d.ts +4 -4
  91. package/src/tablecolumnresize/tablecolumnresizeediting.js +10 -10
  92. package/src/tablecolumnresize/tablewidthscommand.d.ts +2 -2
  93. package/src/tablecolumnresize/tablewidthscommand.js +2 -2
  94. package/src/tablecolumnresize/utils.d.ts +3 -3
  95. package/src/tablecolumnresize/utils.js +2 -2
  96. package/src/tablecolumnresize.d.ts +3 -3
  97. package/src/tablecolumnresize.js +3 -3
  98. package/src/tableconfig.d.ts +14 -2
  99. package/src/tableediting.d.ts +3 -3
  100. package/src/tableediting.js +20 -20
  101. package/src/tablekeyboard.d.ts +5 -5
  102. package/src/tablekeyboard.js +5 -5
  103. package/src/tablemouse/mouseeventsobserver.d.ts +1 -1
  104. package/src/tablemouse/mouseeventsobserver.js +1 -1
  105. package/src/tablemouse.d.ts +3 -3
  106. package/src/tablemouse.js +4 -4
  107. package/src/tableproperties/commands/tablealignmentcommand.d.ts +2 -2
  108. package/src/tableproperties/commands/tablealignmentcommand.js +1 -1
  109. package/src/tableproperties/commands/tablebackgroundcolorcommand.d.ts +2 -2
  110. package/src/tableproperties/commands/tablebackgroundcolorcommand.js +1 -1
  111. package/src/tableproperties/commands/tablebordercolorcommand.d.ts +3 -3
  112. package/src/tableproperties/commands/tablebordercolorcommand.js +2 -2
  113. package/src/tableproperties/commands/tableborderstylecommand.d.ts +3 -3
  114. package/src/tableproperties/commands/tableborderstylecommand.js +2 -2
  115. package/src/tableproperties/commands/tableborderwidthcommand.d.ts +3 -3
  116. package/src/tableproperties/commands/tableborderwidthcommand.js +2 -2
  117. package/src/tableproperties/commands/tableheightcommand.d.ts +2 -2
  118. package/src/tableproperties/commands/tableheightcommand.js +2 -2
  119. package/src/tableproperties/commands/tablepropertycommand.d.ts +2 -2
  120. package/src/tableproperties/commands/tablepropertycommand.js +1 -1
  121. package/src/tableproperties/commands/tablewidthcommand.d.ts +2 -2
  122. package/src/tableproperties/commands/tablewidthcommand.js +2 -2
  123. package/src/tableproperties/tablepropertiesediting.d.ts +2 -2
  124. package/src/tableproperties/tablepropertiesediting.js +12 -12
  125. package/src/tableproperties/tablepropertiesui.d.ts +3 -3
  126. package/src/tableproperties/tablepropertiesui.js +10 -8
  127. package/src/tableproperties/ui/tablepropertiesview.d.ts +8 -4
  128. package/src/tableproperties/ui/tablepropertiesview.js +9 -7
  129. package/src/tableproperties.d.ts +3 -3
  130. package/src/tableproperties.js +3 -3
  131. package/src/tableselection.d.ts +3 -3
  132. package/src/tableselection.js +5 -5
  133. package/src/tabletoolbar.d.ts +2 -2
  134. package/src/tabletoolbar.js +3 -3
  135. package/src/tableui.d.ts +1 -1
  136. package/src/tableui.js +4 -4
  137. package/src/tableutils.d.ts +3 -3
  138. package/src/tableutils.js +5 -5
  139. package/src/tablewalker.d.ts +1 -1
  140. package/src/ui/colorinputview.d.ts +5 -8
  141. package/src/ui/colorinputview.js +54 -37
  142. package/src/ui/formrowview.d.ts +2 -2
  143. package/src/ui/formrowview.js +1 -1
  144. package/src/ui/inserttableview.d.ts +2 -2
  145. package/src/ui/inserttableview.js +2 -2
  146. package/src/utils/common.d.ts +2 -2
  147. package/src/utils/common.js +1 -1
  148. package/src/utils/structure.d.ts +3 -3
  149. package/src/utils/structure.js +2 -2
  150. package/src/utils/table-properties.d.ts +1 -1
  151. package/src/utils/ui/contextualballoon.d.ts +2 -2
  152. package/src/utils/ui/contextualballoon.js +3 -3
  153. package/src/utils/ui/table-properties.d.ts +7 -5
  154. package/src/utils/ui/table-properties.js +7 -5
  155. package/src/utils/ui/widget.d.ts +1 -1
  156. package/src/utils/ui/widget.js +1 -1
  157. package/theme/tablecaption.css +7 -7
  158. 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,
@@ -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
  */
@@ -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
  */
@@ -4,9 +4,9 @@
4
4
  */
5
5
 
6
6
  :root {
7
- --ck-color-table-caption-background: hsl(0, 0%, 97%);
8
- --ck-color-table-caption-text: hsl(0, 0%, 20%);
9
- --ck-color-table-caption-highlighted-background: hsl(52deg 100% 50%);
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-table-caption-text);
19
- background-color: var(--ck-color-table-caption-background);
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-table-caption-highlighted-background);
47
+ background-color: var(--ck-color-selector-caption-highlighted-background);
48
48
  }
49
49
 
50
50
  100% {
51
- background-color: var(--ck-color-table-caption-background);
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-table-column-resizer-hover: var(--ck-color-base-active);
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-table-column-resizer-hover);
58
+ background-color: var(--ck-color-selector-column-resizer-hover);
59
59
  opacity: 0.25;
60
60
  }
61
61