@ckeditor/ckeditor5-ui 48.2.0-alpha.7 → 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.
Files changed (117) hide show
  1. package/dist/arialiveannouncer.d.ts +90 -90
  2. package/dist/augmentation.d.ts +86 -86
  3. package/dist/autocomplete/autocompleteview.d.ts +70 -70
  4. package/dist/badge/badge.d.ts +119 -121
  5. package/dist/bindings/addkeyboardhandlingforgrid.d.ts +22 -22
  6. package/dist/bindings/clickoutsidehandler.d.ts +25 -25
  7. package/dist/bindings/csstransitiondisablermixin.d.ts +47 -36
  8. package/dist/bindings/draggableviewmixin.d.ts +45 -37
  9. package/dist/bindings/preventdefault.d.ts +30 -30
  10. package/dist/bindings/submithandler.d.ts +49 -49
  11. package/dist/button/button.d.ts +167 -167
  12. package/dist/button/buttonlabel.d.ts +28 -28
  13. package/dist/button/buttonlabelview.d.ts +26 -26
  14. package/dist/button/buttonview.d.ts +192 -192
  15. package/dist/button/filedialogbuttonview.d.ts +107 -99
  16. package/dist/button/listitembuttonview.d.ts +73 -73
  17. package/dist/button/switchbuttonview.d.ts +40 -40
  18. package/dist/collapsible/collapsibleview.d.ts +63 -63
  19. package/dist/colorgrid/colorgridview.d.ts +117 -117
  20. package/dist/colorgrid/colortileview.d.ts +21 -21
  21. package/dist/colorgrid/utils.d.ts +35 -35
  22. package/dist/colorpicker/colorpickerview.d.ts +155 -157
  23. package/dist/colorpicker/utils.d.ts +37 -37
  24. package/dist/colorselector/colorgridsfragmentview.d.ts +191 -191
  25. package/dist/colorselector/colorpickerfragmentview.d.ts +129 -129
  26. package/dist/colorselector/colorselectorview.d.ts +227 -229
  27. package/dist/colorselector/documentcolorcollection.d.ts +52 -59
  28. package/dist/componentfactory.d.ts +76 -76
  29. package/dist/dialog/dialog.d.ts +311 -288
  30. package/dist/dialog/dialogactionsview.d.ts +62 -62
  31. package/dist/dialog/dialogcontentview.d.ts +22 -22
  32. package/dist/dialog/dialogview.d.ts +255 -251
  33. package/dist/dropdown/button/dropdownbutton.d.ts +17 -17
  34. package/dist/dropdown/button/dropdownbuttonview.d.ts +41 -41
  35. package/dist/dropdown/button/splitbuttonview.d.ts +155 -155
  36. package/dist/dropdown/dropdownpanelfocusable.d.ts +16 -16
  37. package/dist/dropdown/dropdownpanelview.d.ts +56 -56
  38. package/dist/dropdown/dropdownview.d.ts +326 -326
  39. package/dist/dropdown/menu/dropdownmenubehaviors.d.ts +43 -43
  40. package/dist/dropdown/menu/dropdownmenubuttonview.d.ts +29 -29
  41. package/dist/dropdown/menu/dropdownmenulistitembuttonview.d.ts +12 -12
  42. package/dist/dropdown/menu/dropdownmenulistitemview.d.ts +17 -17
  43. package/dist/dropdown/menu/dropdownmenulistview.d.ts +19 -19
  44. package/dist/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +28 -28
  45. package/dist/dropdown/menu/dropdownmenunestedmenuview.d.ts +126 -126
  46. package/dist/dropdown/menu/dropdownmenurootlistview.d.ts +132 -132
  47. package/dist/dropdown/menu/utils.d.ts +112 -112
  48. package/dist/dropdown/utils.d.ts +272 -272
  49. package/dist/editableui/editableuiview.d.ts +78 -78
  50. package/dist/editableui/inline/inlineeditableuiview.d.ts +38 -38
  51. package/dist/editorui/accessibilityhelp/accessibilityhelp.d.ts +50 -50
  52. package/dist/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +30 -30
  53. package/dist/editorui/bodycollection.d.ts +86 -86
  54. package/dist/editorui/boxed/boxededitoruiview.d.ts +35 -35
  55. package/dist/editorui/editorui.d.ts +348 -351
  56. package/dist/editorui/editoruiview.d.ts +53 -53
  57. package/dist/editorui/evaluationbadge.d.ts +28 -28
  58. package/dist/editorui/poweredby.d.ts +25 -25
  59. package/dist/focuscycler.d.ts +265 -270
  60. package/dist/formheader/formheaderview.d.ts +53 -53
  61. package/dist/formrow/formrowview.d.ts +52 -52
  62. package/dist/highlightedtext/buttonlabelwithhighlightview.d.ts +25 -25
  63. package/dist/highlightedtext/highlightedtextview.d.ts +33 -33
  64. package/dist/highlightedtext/labelwithhighlightview.d.ts +21 -21
  65. package/dist/icon/iconview.d.ts +83 -83
  66. package/dist/iframe/iframeview.d.ts +42 -42
  67. package/dist/index.css.map +1 -1
  68. package/dist/index.d.ts +136 -136
  69. package/dist/index.js +16467 -17751
  70. package/dist/index.js.map +1 -1
  71. package/dist/input/inputbase.d.ts +114 -114
  72. package/dist/input/inputview.d.ts +28 -28
  73. package/dist/inputnumber/inputnumberview.d.ts +44 -44
  74. package/dist/inputtext/inputtextview.d.ts +13 -13
  75. package/dist/label/labelview.d.ts +31 -31
  76. package/dist/labeledfield/labeledfieldview.d.ts +180 -180
  77. package/dist/labeledfield/utils.d.ts +112 -112
  78. package/dist/labeledinput/labeledinputview.d.ts +120 -120
  79. package/dist/legacyerrors.d.ts +0 -4
  80. package/dist/list/listitemgroupview.d.ts +54 -54
  81. package/dist/list/listitemview.d.ts +31 -31
  82. package/dist/list/listseparatorview.d.ts +13 -13
  83. package/dist/list/listview.d.ts +119 -119
  84. package/dist/menubar/menubarmenubuttonview.d.ts +28 -28
  85. package/dist/menubar/menubarmenulistitembuttonview.d.ts +16 -16
  86. package/dist/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +18 -18
  87. package/dist/menubar/menubarmenulistitemview.d.ts +20 -20
  88. package/dist/menubar/menubarmenulistview.d.ts +24 -24
  89. package/dist/menubar/menubarmenupanelview.d.ts +47 -47
  90. package/dist/menubar/menubarmenuview.d.ts +113 -113
  91. package/dist/menubar/menubarview.d.ts +145 -145
  92. package/dist/menubar/utils.d.ts +455 -455
  93. package/dist/model.d.ts +19 -18
  94. package/dist/notification/notification.d.ts +200 -200
  95. package/dist/panel/balloon/balloonpanelview.d.ts +692 -692
  96. package/dist/panel/balloon/contextualballoon.d.ts +298 -298
  97. package/dist/panel/sticky/stickypanelview.d.ts +151 -151
  98. package/dist/search/filteredview.d.ts +23 -23
  99. package/dist/search/filtergroupanditemnames.d.ts +11 -11
  100. package/dist/search/searchinfoview.d.ts +39 -39
  101. package/dist/search/searchresultsview.d.ts +49 -49
  102. package/dist/search/text/searchtextqueryview.d.ts +63 -63
  103. package/dist/search/text/searchtextview.d.ts +203 -203
  104. package/dist/spinner/spinnerview.d.ts +20 -20
  105. package/dist/template.d.ts +897 -902
  106. package/dist/textarea/textareaview.d.ts +96 -96
  107. package/dist/toolbar/balloon/balloontoolbar.d.ts +122 -122
  108. package/dist/toolbar/block/blockbuttonview.d.ts +30 -30
  109. package/dist/toolbar/block/blocktoolbar.d.ts +166 -166
  110. package/dist/toolbar/normalizetoolbarconfig.d.ts +35 -35
  111. package/dist/toolbar/toolbarlinebreakview.d.ts +13 -13
  112. package/dist/toolbar/toolbarseparatorview.d.ts +13 -13
  113. package/dist/toolbar/toolbarview.d.ts +271 -271
  114. package/dist/tooltipmanager.d.ts +190 -193
  115. package/dist/view.d.ts +385 -388
  116. package/dist/viewcollection.d.ts +134 -134
  117. package/package.json +6 -6
@@ -1,196 +1,196 @@
1
1
  /**
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
- */
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
- * @module ui/colorselector/colorgridsfragmentview
7
- */
8
- import { View } from '../view.js';
9
- import { ButtonView } from '../button/buttonview.js';
10
- import { ColorGridView, type ColorDefinition } from '../colorgrid/colorgridview.js';
11
- import { DocumentColorCollection } from './documentcolorcollection.js';
12
- import type { Model } from '@ckeditor/ckeditor5-engine';
13
- import type { FocusTracker, Locale } from '@ckeditor/ckeditor5-utils';
14
- import { type ViewCollection } from '../viewcollection.js';
15
- import type { FocusableView } from '../focuscycler.js';
6
+ * @module ui/colorselector/colorgridsfragmentview
7
+ */
8
+ import { View } from "../view.js";
9
+ import { ButtonView } from "../button/buttonview.js";
10
+ import { ColorGridView, type ColorDefinition } from "../colorgrid/colorgridview.js";
11
+ import { DocumentColorCollection } from "./documentcolorcollection.js";
12
+ import type { Model } from "@ckeditor/ckeditor5-engine";
13
+ import type { FocusTracker, Locale } from "@ckeditor/ckeditor5-utils";
14
+ import { type ViewCollection } from "../viewcollection.js";
15
+ import type { FocusableView } from "../focuscycler.js";
16
16
  /**
17
- * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
18
- *
19
- * It provides a UI that allows users to select colors from the a predefined set and from existing document colors.
20
- *
21
- * It consists of the following sub–components:
22
- *
23
- * * A "Remove color" button,
24
- * * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,
25
- * * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.
26
- * * If color picker is configured, the "Color Picker" button is visible too.
27
- */
17
+ * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
18
+ *
19
+ * It provides a UI that allows users to select colors from the a predefined set and from existing document colors.
20
+ *
21
+ * It consists of the following sub–components:
22
+ *
23
+ * * A "Remove color" button,
24
+ * * A static {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors defined in the configuration,
25
+ * * A dynamic {@link module:ui/colorgrid/colorgridview~ColorGridView} of colors used in the document.
26
+ * * If color picker is configured, the "Color Picker" button is visible too.
27
+ */
28
28
  export declare class ColorGridsFragmentView extends View {
29
- /**
30
- * A collection of the children of the table.
31
- */
32
- readonly items: ViewCollection;
33
- /**
34
- * An array with objects representing colors to be displayed in the grid.
35
- */
36
- colorDefinitions: Array<ColorDefinition>;
37
- /**
38
- * Tracks information about the DOM focus in the list.
39
- */
40
- readonly focusTracker: FocusTracker;
41
- /**
42
- * The number of columns in the color grid.
43
- */
44
- columns: number;
45
- /**
46
- * Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect
47
- * definitions that store the document colors.
48
- *
49
- * @readonly
50
- */
51
- documentColors: DocumentColorCollection;
52
- /**
53
- * The maximum number of colors in the document colors section.
54
- * If it equals 0, the document colors section is not added.
55
- *
56
- * @readonly
57
- */
58
- documentColorsCount?: number;
59
- /**
60
- * Keeps the value of the command associated with the table for the current selection.
61
- */
62
- selectedColor: string;
63
- /**
64
- * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create
65
- * the default (static) color set.
66
- *
67
- * The property is loaded once the the parent dropdown is opened the first time.
68
- *
69
- * @readonly
70
- */
71
- staticColorsGrid: ColorGridView | undefined;
72
- /**
73
- * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create
74
- * the document colors. It remains undefined if the document colors feature is disabled.
75
- *
76
- * The property is loaded once the the parent dropdown is opened the first time.
77
- *
78
- * @readonly
79
- */
80
- documentColorsGrid: ColorGridView | undefined;
81
- /**
82
- * The "Color picker" button view.
83
- */
84
- colorPickerButtonView?: ButtonView;
85
- /**
86
- * The "Remove color" button view.
87
- */
88
- removeColorButtonView: ButtonView;
89
- /**
90
- * The property which is responsible for is component visible or not.
91
- */
92
- isVisible: boolean;
93
- /**
94
- * A collection of views that can be focused in the view.
95
- *
96
- * @readonly
97
- */
98
- protected _focusables: ViewCollection<FocusableView>;
99
- /**
100
- * Document color section's label.
101
- *
102
- * @readonly
103
- */
104
- private _documentColorsLabel?;
105
- /**
106
- * The label of the button responsible for removing color attributes.
107
- */
108
- private _removeButtonLabel;
109
- /**
110
- * The label of the button responsible for switching to the color picker component.
111
- */
112
- private _colorPickerLabel;
113
- /**
114
- * Creates an instance of the view.
115
- *
116
- * @param locale The localization services instance.
117
- * @param options Constructor options.
118
- * @param options.colors An array with definitions of colors to be displayed in the table.
119
- * @param options.columns The number of columns in the color grid.
120
- * @param options.removeButtonLabel The label of the button responsible for removing the color.
121
- * @param options.colorPickerLabel The label of the button responsible for color picker appearing.
122
- * @param options.documentColorsLabel The label for the section with the document colors.
123
- * @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.
124
- * @param options.focusTracker Tracks information about the DOM focus in the list.
125
- * @param options.focusables A collection of views that can be focused in the view.
126
- */
127
- constructor(locale: Locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, focusTracker, focusables }: {
128
- colors: Array<ColorDefinition>;
129
- columns: number;
130
- removeButtonLabel: string;
131
- colorPickerLabel: string;
132
- documentColorsLabel?: string;
133
- documentColorsCount?: number;
134
- focusTracker: FocusTracker;
135
- focusables: ViewCollection<FocusableView>;
136
- });
137
- /**
138
- * Scans through the editor model and searches for text node attributes with the given attribute name.
139
- * Found entries are set as document colors.
140
- *
141
- * All the previously stored document colors will be lost in the process.
142
- *
143
- * @param model The model used as a source to obtain the document colors.
144
- * @param attributeName Determines the name of the related model's attribute for a given dropdown.
145
- */
146
- updateDocumentColors(model: Model, attributeName: string): void;
147
- /**
148
- * Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s
149
- * available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will
150
- * occur only in one of them.
151
- */
152
- updateSelectedColors(): void;
153
- /**
154
- * @inheritDoc
155
- */
156
- render(): void;
157
- /**
158
- * Focuses the component.
159
- */
160
- focus(): void;
161
- /**
162
- * @inheritDoc
163
- */
164
- destroy(): void;
165
- /**
166
- * Handles displaying the color picker button (if it was previously created) and making it focusable.
167
- */
168
- addColorPickerButton(): void;
169
- /**
170
- * Adds color selector elements to focus tracker.
171
- */
172
- private _addColorSelectorElementsToFocusTracker;
173
- /**
174
- * Creates the button responsible for displaying the color picker component.
175
- */
176
- private _createColorPickerButton;
177
- /**
178
- * Adds the remove color button as a child of the current view.
179
- */
180
- private _createRemoveColorButton;
181
- /**
182
- * Creates a static color grid based on the editor configuration.
183
- */
184
- private _createStaticColorsGrid;
185
- /**
186
- * Creates the document colors section view and binds it to {@link #documentColors}.
187
- */
188
- private _createDocumentColorsGrid;
189
- /**
190
- * Adds a given color to the document colors list. If possible, the method will attempt to use
191
- * data from the {@link #colorDefinitions} (label, color options).
192
- *
193
- * @param color A string that stores the value of the recently applied color.
194
- */
195
- private _addColorToDocumentColors;
29
+ /**
30
+ * A collection of the children of the table.
31
+ */
32
+ readonly items: ViewCollection;
33
+ /**
34
+ * An array with objects representing colors to be displayed in the grid.
35
+ */
36
+ colorDefinitions: Array<ColorDefinition>;
37
+ /**
38
+ * Tracks information about the DOM focus in the list.
39
+ */
40
+ readonly focusTracker: FocusTracker;
41
+ /**
42
+ * The number of columns in the color grid.
43
+ */
44
+ columns: number;
45
+ /**
46
+ * Preserves the reference to {@link module:ui/colorselector/documentcolorcollection~DocumentColorCollection} used to collect
47
+ * definitions that store the document colors.
48
+ *
49
+ * @readonly
50
+ */
51
+ documentColors: DocumentColorCollection;
52
+ /**
53
+ * The maximum number of colors in the document colors section.
54
+ * If it equals 0, the document colors section is not added.
55
+ *
56
+ * @readonly
57
+ */
58
+ documentColorsCount?: number;
59
+ /**
60
+ * Keeps the value of the command associated with the table for the current selection.
61
+ */
62
+ selectedColor: string;
63
+ /**
64
+ * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create
65
+ * the default (static) color set.
66
+ *
67
+ * The property is loaded once the the parent dropdown is opened the first time.
68
+ *
69
+ * @readonly
70
+ */
71
+ staticColorsGrid: ColorGridView | undefined;
72
+ /**
73
+ * Preserves the reference to {@link module:ui/colorgrid/colorgridview~ColorGridView} used to create
74
+ * the document colors. It remains undefined if the document colors feature is disabled.
75
+ *
76
+ * The property is loaded once the the parent dropdown is opened the first time.
77
+ *
78
+ * @readonly
79
+ */
80
+ documentColorsGrid: ColorGridView | undefined;
81
+ /**
82
+ * The "Color picker" button view.
83
+ */
84
+ colorPickerButtonView?: ButtonView;
85
+ /**
86
+ * The "Remove color" button view.
87
+ */
88
+ removeColorButtonView: ButtonView;
89
+ /**
90
+ * The property which is responsible for is component visible or not.
91
+ */
92
+ isVisible: boolean;
93
+ /**
94
+ * A collection of views that can be focused in the view.
95
+ *
96
+ * @readonly
97
+ */
98
+ protected _focusables: ViewCollection<FocusableView>;
99
+ /**
100
+ * Document color section's label.
101
+ *
102
+ * @readonly
103
+ */
104
+ private _documentColorsLabel?;
105
+ /**
106
+ * The label of the button responsible for removing color attributes.
107
+ */
108
+ private _removeButtonLabel;
109
+ /**
110
+ * The label of the button responsible for switching to the color picker component.
111
+ */
112
+ private _colorPickerLabel;
113
+ /**
114
+ * Creates an instance of the view.
115
+ *
116
+ * @param locale The localization services instance.
117
+ * @param options Constructor options.
118
+ * @param options.colors An array with definitions of colors to be displayed in the table.
119
+ * @param options.columns The number of columns in the color grid.
120
+ * @param options.removeButtonLabel The label of the button responsible for removing the color.
121
+ * @param options.colorPickerLabel The label of the button responsible for color picker appearing.
122
+ * @param options.documentColorsLabel The label for the section with the document colors.
123
+ * @param options.documentColorsCount The number of colors in the document colors section inside the color dropdown.
124
+ * @param options.focusTracker Tracks information about the DOM focus in the list.
125
+ * @param options.focusables A collection of views that can be focused in the view.
126
+ */
127
+ constructor(locale: Locale, { colors, columns, removeButtonLabel, documentColorsLabel, documentColorsCount, colorPickerLabel, focusTracker, focusables }: {
128
+ colors: Array<ColorDefinition>;
129
+ columns: number;
130
+ removeButtonLabel: string;
131
+ colorPickerLabel: string;
132
+ documentColorsLabel?: string;
133
+ documentColorsCount?: number;
134
+ focusTracker: FocusTracker;
135
+ focusables: ViewCollection<FocusableView>;
136
+ });
137
+ /**
138
+ * Scans through the editor model and searches for text node attributes with the given attribute name.
139
+ * Found entries are set as document colors.
140
+ *
141
+ * All the previously stored document colors will be lost in the process.
142
+ *
143
+ * @param model The model used as a source to obtain the document colors.
144
+ * @param attributeName Determines the name of the related model's attribute for a given dropdown.
145
+ */
146
+ updateDocumentColors(model: Model, attributeName: string): void;
147
+ /**
148
+ * Refreshes the state of the selected color in one or both {@link module:ui/colorgrid/colorgridview~ColorGridView}s
149
+ * available in the {@link module:ui/colorselector/colorselectorview~ColorSelectorView}. It guarantees that the selection will
150
+ * occur only in one of them.
151
+ */
152
+ updateSelectedColors(): void;
153
+ /**
154
+ * @inheritDoc
155
+ */
156
+ override render(): void;
157
+ /**
158
+ * Focuses the component.
159
+ */
160
+ focus(): void;
161
+ /**
162
+ * @inheritDoc
163
+ */
164
+ override destroy(): void;
165
+ /**
166
+ * Handles displaying the color picker button (if it was previously created) and making it focusable.
167
+ */
168
+ addColorPickerButton(): void;
169
+ /**
170
+ * Adds color selector elements to focus tracker.
171
+ */
172
+ private _addColorSelectorElementsToFocusTracker;
173
+ /**
174
+ * Creates the button responsible for displaying the color picker component.
175
+ */
176
+ private _createColorPickerButton;
177
+ /**
178
+ * Adds the remove color button as a child of the current view.
179
+ */
180
+ private _createRemoveColorButton;
181
+ /**
182
+ * Creates a static color grid based on the editor configuration.
183
+ */
184
+ private _createStaticColorsGrid;
185
+ /**
186
+ * Creates the document colors section view and binds it to {@link #documentColors}.
187
+ */
188
+ private _createDocumentColorsGrid;
189
+ /**
190
+ * Adds a given color to the document colors list. If possible, the method will attempt to use
191
+ * data from the {@link #colorDefinitions} (label, color options).
192
+ *
193
+ * @param color A string that stores the value of the recently applied color.
194
+ */
195
+ private _addColorToDocumentColors;
196
196
  }
@@ -1,134 +1,134 @@
1
1
  /**
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
- */
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
- * @module ui/colorselector/colorpickerfragmentview
7
- */
8
- import { View } from '../view.js';
9
- import { ButtonView } from '../button/buttonview.js';
10
- import { type ViewCollection } from '../viewcollection.js';
11
- import type { FocusableView } from '../focuscycler.js';
12
- import { ColorPickerView } from '../colorpicker/colorpickerview.js';
13
- import type { FocusTracker, KeystrokeHandler, Locale } from '@ckeditor/ckeditor5-utils';
14
- import type { ColorPickerViewConfig } from '../colorpicker/utils.js';
6
+ * @module ui/colorselector/colorpickerfragmentview
7
+ */
8
+ import { View } from "../view.js";
9
+ import { ButtonView } from "../button/buttonview.js";
10
+ import { type ViewCollection } from "../viewcollection.js";
11
+ import type { FocusableView } from "../focuscycler.js";
12
+ import { ColorPickerView } from "../colorpicker/colorpickerview.js";
13
+ import type { FocusTracker, KeystrokeHandler, Locale } from "@ckeditor/ckeditor5-utils";
14
+ import type { ColorPickerViewConfig } from "../colorpicker/utils.js";
15
15
  /**
16
- * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
17
- *
18
- * It allows users to select a color from a color picker.
19
- *
20
- * It consists of the following sub–components:
21
- *
22
- * * A color picker saturation and hue sliders,
23
- * * A text input accepting colors in HEX format,
24
- * * "Save" and "Cancel" action buttons.
25
- */
16
+ * One of the fragments of {@link module:ui/colorselector/colorselectorview~ColorSelectorView}.
17
+ *
18
+ * It allows users to select a color from a color picker.
19
+ *
20
+ * It consists of the following sub–components:
21
+ *
22
+ * * A color picker saturation and hue sliders,
23
+ * * A text input accepting colors in HEX format,
24
+ * * "Save" and "Cancel" action buttons.
25
+ */
26
26
  export declare class ColorPickerFragmentView extends View {
27
- /**
28
- * A collection of component's children.
29
- */
30
- readonly items: ViewCollection;
31
- /**
32
- * A view with saturation and hue sliders and color input.
33
- */
34
- colorPickerView?: ColorPickerView;
35
- /**
36
- * The "Save" button view.
37
- */
38
- saveButtonView: ButtonView;
39
- /**
40
- * The "Cancel" button view.
41
- */
42
- cancelButtonView: ButtonView;
43
- /**
44
- * The action bar where are "Save" button and "Cancel" button.
45
- */
46
- actionBarView: View;
47
- /**
48
- * Tracks information about the DOM focus in the list.
49
- */
50
- readonly focusTracker: FocusTracker;
51
- /**
52
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
53
- */
54
- readonly keystrokes: KeystrokeHandler;
55
- /**
56
- * Indicates whether the component is visible or not.
57
- */
58
- isVisible: boolean;
59
- /**
60
- * Keeps the value of the command associated with the component for the current selection.
61
- */
62
- selectedColor?: string;
63
- /**
64
- * A collection of views that can be focused in the view.
65
- *
66
- * @readonly
67
- */
68
- protected _focusables: ViewCollection<FocusableView>;
69
- /**
70
- * A reference to the configuration of {@link #colorPickerView}. `false` when the view was
71
- * configured without a color picker.
72
- *
73
- * @readonly
74
- */
75
- private _colorPickerViewConfig;
76
- /**
77
- * Creates an instance of the view.
78
- *
79
- * @param locale The localization services instance.
80
- * @param options Constructor options.
81
- * @param options.focusTracker Tracks information about the DOM focus in the list.
82
- * @param options.focusables A collection of views that can be focused in the view.
83
- * @param options.keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
84
- * @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker
85
- * will not be rendered.
86
- */
87
- constructor(locale: Locale, { focusTracker, focusables, keystrokes, colorPickerViewConfig }: {
88
- focusTracker: FocusTracker;
89
- focusables: ViewCollection<FocusableView>;
90
- keystrokes: KeystrokeHandler;
91
- colorPickerViewConfig: ColorPickerViewConfig | false;
92
- });
93
- /**
94
- * @inheritDoc
95
- */
96
- render(): void;
97
- /**
98
- * @inheritDoc
99
- */
100
- destroy(): void;
101
- /**
102
- * Focuses the color picker.
103
- */
104
- focus(): void;
105
- /**
106
- * Reset validation messages.
107
- */
108
- resetValidationStatus(): void;
109
- /**
110
- * When color picker is focused and "enter" is pressed it executes command.
111
- */
112
- private _executeOnEnterPress;
113
- /**
114
- * Removes default behavior of arrow keys in dropdown.
115
- */
116
- private _stopPropagationOnArrowsKeys;
117
- /**
118
- * Adds color picker elements to focus tracker.
119
- */
120
- private _addColorPickersElementsToFocusTracker;
121
- /**
122
- * Creates bar containing "Save" and "Cancel" buttons.
123
- */
124
- private _createActionBarView;
125
- /**
126
- * Creates "Save" and "Cancel" buttons.
127
- */
128
- private _createActionButtons;
129
- /**
130
- * Fires the `execute` event if color in color picker has been changed
131
- * by the user.
132
- */
133
- private _executeUponColorChange;
27
+ /**
28
+ * A collection of component's children.
29
+ */
30
+ readonly items: ViewCollection;
31
+ /**
32
+ * A view with saturation and hue sliders and color input.
33
+ */
34
+ colorPickerView?: ColorPickerView;
35
+ /**
36
+ * The "Save" button view.
37
+ */
38
+ saveButtonView: ButtonView;
39
+ /**
40
+ * The "Cancel" button view.
41
+ */
42
+ cancelButtonView: ButtonView;
43
+ /**
44
+ * The action bar where are "Save" button and "Cancel" button.
45
+ */
46
+ actionBarView: View;
47
+ /**
48
+ * Tracks information about the DOM focus in the list.
49
+ */
50
+ readonly focusTracker: FocusTracker;
51
+ /**
52
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
53
+ */
54
+ readonly keystrokes: KeystrokeHandler;
55
+ /**
56
+ * Indicates whether the component is visible or not.
57
+ */
58
+ isVisible: boolean;
59
+ /**
60
+ * Keeps the value of the command associated with the component for the current selection.
61
+ */
62
+ selectedColor?: string;
63
+ /**
64
+ * A collection of views that can be focused in the view.
65
+ *
66
+ * @readonly
67
+ */
68
+ protected _focusables: ViewCollection<FocusableView>;
69
+ /**
70
+ * A reference to the configuration of {@link #colorPickerView}. `false` when the view was
71
+ * configured without a color picker.
72
+ *
73
+ * @readonly
74
+ */
75
+ private _colorPickerViewConfig;
76
+ /**
77
+ * Creates an instance of the view.
78
+ *
79
+ * @param locale The localization services instance.
80
+ * @param options Constructor options.
81
+ * @param options.focusTracker Tracks information about the DOM focus in the list.
82
+ * @param options.focusables A collection of views that can be focused in the view.
83
+ * @param options.keystrokes An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
84
+ * @param options.colorPickerViewConfig The configuration of color picker feature. If set to `false`, the color picker
85
+ * will not be rendered.
86
+ */
87
+ constructor(locale: Locale, { focusTracker, focusables, keystrokes, colorPickerViewConfig }: {
88
+ focusTracker: FocusTracker;
89
+ focusables: ViewCollection<FocusableView>;
90
+ keystrokes: KeystrokeHandler;
91
+ colorPickerViewConfig: ColorPickerViewConfig | false;
92
+ });
93
+ /**
94
+ * @inheritDoc
95
+ */
96
+ override render(): void;
97
+ /**
98
+ * @inheritDoc
99
+ */
100
+ override destroy(): void;
101
+ /**
102
+ * Focuses the color picker.
103
+ */
104
+ focus(): void;
105
+ /**
106
+ * Reset validation messages.
107
+ */
108
+ resetValidationStatus(): void;
109
+ /**
110
+ * When color picker is focused and "enter" is pressed it executes command.
111
+ */
112
+ private _executeOnEnterPress;
113
+ /**
114
+ * Removes default behavior of arrow keys in dropdown.
115
+ */
116
+ private _stopPropagationOnArrowsKeys;
117
+ /**
118
+ * Adds color picker elements to focus tracker.
119
+ */
120
+ private _addColorPickersElementsToFocusTracker;
121
+ /**
122
+ * Creates bar containing "Save" and "Cancel" buttons.
123
+ */
124
+ private _createActionBarView;
125
+ /**
126
+ * Creates "Save" and "Cancel" buttons.
127
+ */
128
+ private _createActionButtons;
129
+ /**
130
+ * Fires the `execute` event if color in color picker has been changed
131
+ * by the user.
132
+ */
133
+ private _executeUponColorChange;
134
134
  }