@ckeditor/ckeditor5-ui 48.2.0 → 48.3.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 (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,290 +1,290 @@
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/toolbar/toolbarview
7
- */
8
- import { View } from '../view.js';
9
- import { type FocusableView } from '../focuscycler.js';
10
- import { type ComponentFactory } from '../componentfactory.js';
11
- import { type ViewCollection } from '../viewcollection.js';
12
- import { type DropdownPanelFocusable } from '../dropdown/dropdownpanelfocusable.js';
13
- import { FocusTracker, KeystrokeHandler, type Locale } from '@ckeditor/ckeditor5-utils';
14
- import type { ToolbarConfig } from '@ckeditor/ckeditor5-core';
15
- import '../../theme/components/toolbar/toolbar.css';
6
+ * @module ui/toolbar/toolbarview
7
+ */
8
+ import { View } from "../view.js";
9
+ import { type FocusableView } from "../focuscycler.js";
10
+ import { type ComponentFactory } from "../componentfactory.js";
11
+ import { type ViewCollection } from "../viewcollection.js";
12
+ import { type DropdownPanelFocusable } from "../dropdown/dropdownpanelfocusable.js";
13
+ import { FocusTracker, KeystrokeHandler, type Locale } from "@ckeditor/ckeditor5-utils";
14
+ import type { ToolbarConfig } from "@ckeditor/ckeditor5-core";
15
+ import "../../theme/components/toolbar/toolbar.css";
16
16
  /**
17
- * @internal
18
- */
17
+ * @internal
18
+ */
19
19
  export declare const NESTED_TOOLBAR_ICONS: Record<string, string | undefined>;
20
20
  /**
21
- * The toolbar view class.
22
- */
21
+ * The toolbar view class.
22
+ */
23
23
  export declare class ToolbarView extends View implements DropdownPanelFocusable {
24
- /**
25
- * A reference to the options object passed to the constructor.
26
- */
27
- readonly options: ToolbarOptions;
28
- /**
29
- * A collection of toolbar items (buttons, dropdowns, etc.).
30
- */
31
- readonly items: ViewCollection;
32
- /**
33
- * Tracks information about the DOM focus in the toolbar.
34
- */
35
- readonly focusTracker: FocusTracker;
36
- /**
37
- * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}
38
- * to handle keyboard navigation in the toolbar.
39
- */
40
- readonly keystrokes: KeystrokeHandler;
41
- /**
42
- * A (child) view containing {@link #items toolbar items}.
43
- */
44
- readonly itemsView: ItemsView;
45
- /**
46
- * A top–level collection aggregating building blocks of the toolbar.
47
- *
48
- * ┌───────────────── ToolbarView ─────────────────┐
49
- * | ┌──────────────── #children ────────────────┐ |
50
- * | | ┌──────────── #itemsView ───────────┐ | |
51
- * | | | [ item1 ] [ item2 ] ... [ itemN ] | | |
52
- * | | └──────────────────────────────────-┘ | |
53
- * | └───────────────────────────────────────────┘ |
54
- * └───────────────────────────────────────────────┘
55
- *
56
- * By default, it contains the {@link #itemsView} but it can be extended with additional
57
- * UI elements when necessary.
58
- */
59
- readonly children: ViewCollection;
60
- /**
61
- * A collection of {@link #items} that take part in the focus cycling
62
- * (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with
63
- * some optional UI elements that also belong to the toolbar and should be focusable
64
- * by the user.
65
- */
66
- readonly focusables: ViewCollection<FocusableView>;
67
- locale: Locale;
68
- /**
69
- * The property reflected by the `role` DOM attribute to be used by assistive technologies.
70
- *
71
- * @observable
72
- * @default 'toolbar'
73
- */
74
- role: string | undefined;
75
- /**
76
- * Label used by assistive technologies to describe this toolbar element.
77
- *
78
- * @observable
79
- * @default 'Editor toolbar'
80
- */
81
- ariaLabel: string;
82
- /**
83
- * The maximum width of the toolbar element.
84
- *
85
- * **Note**: When set to a specific value (e.g. `'200px'`), the value will affect the behavior of the
86
- * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}
87
- * option by changing the number of {@link #items} that will be displayed in the toolbar at a time.
88
- *
89
- * @observable
90
- * @default 'auto'
91
- */
92
- maxWidth: string;
93
- /**
94
- * An additional CSS class added to the {@link #element}.
95
- *
96
- * @observable
97
- * @type {String}
98
- */
99
- class: string | undefined;
100
- /**
101
- * When set true, makes the toolbar look compact with {@link #element}.
102
- *
103
- * @observable
104
- * @default false
105
- */
106
- isCompact: boolean;
107
- /**
108
- * Controls the orientation of toolbar items. Only available when
109
- * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull dynamic items grouping}
110
- * is **disabled**.
111
- *
112
- * @observable
113
- */
114
- isVertical: boolean;
115
- /**
116
- * Indicates whether the toolbar responds to changes in the geometry (e.g. window resize) by grouping excessive items or not.
117
- */
118
- isGrouping: boolean;
119
- /**
120
- * Helps cycling over {@link #focusables focusable items} in the toolbar.
121
- */
122
- private readonly _focusCycler;
123
- /**
124
- * An instance of the active toolbar behavior that shapes its look and functionality.
125
- *
126
- * See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.
127
- */
128
- private _behavior;
129
- /**
130
- * Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.
131
- *
132
- * Also see {@link #render}.
133
- *
134
- * @param locale The localization services instance.
135
- * @param options Configuration options of the toolbar.
136
- */
137
- constructor(locale: Locale, options?: ToolbarOptions);
138
- /**
139
- * @inheritDoc
140
- */
141
- render(): void;
142
- /**
143
- * @inheritDoc
144
- */
145
- destroy(): void;
146
- /**
147
- * Focuses the first focusable in {@link #focusables}.
148
- */
149
- focus(): void;
150
- /**
151
- * Focuses the last focusable in {@link #focusables}.
152
- */
153
- focusLast(): void;
154
- /**
155
- * A utility that expands the plain toolbar configuration into
156
- * {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.
157
- *
158
- * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.
159
- * @param factory A factory producing toolbar items.
160
- * @param removeItems An array of items names to be removed from the configuration. When present, applies
161
- * to this toolbar and all nested ones as well.
162
- */
163
- fillFromConfig(itemsOrConfig: ToolbarConfig | undefined, factory: ComponentFactory, removeItems?: Array<string>): void;
164
- /**
165
- * Changes the behavior of toolbar if it does not fit into the available space.
166
- */
167
- switchBehavior(newBehaviorType: 'dynamic' | 'static'): void;
168
- /**
169
- * A utility that expands the plain toolbar configuration into a list of view items using a given component factory.
170
- *
171
- * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.
172
- * @param factory A factory producing toolbar items.
173
- * @param removeItems An array of items names to be removed from the configuration. When present, applies
174
- * to this toolbar and all nested ones as well.
175
- */
176
- private _buildItemsFromConfig;
177
- /**
178
- * Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and
179
- * duplicated (obsolete) separators or line breaks.
180
- *
181
- * @param items The toolbar items configuration.
182
- * @param factory A factory producing toolbar items.
183
- * @param removeItems An array of items names to be removed from the configuration.
184
- * @returns Items after the clean-up.
185
- */
186
- private _cleanItemsConfiguration;
187
- /**
188
- * Remove leading, trailing, and duplicated separators (`-` and `|`).
189
- *
190
- * @returns Toolbar items after the separator and line break clean-up.
191
- */
192
- private _cleanSeparatorsAndLineBreaks;
193
- /**
194
- * Creates a user-defined dropdown containing a toolbar with items.
195
- *
196
- * @param definition A definition of the nested toolbar dropdown.
197
- * @param definition.label A label of the dropdown.
198
- * @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',
199
- * 'paragraph' or an SVG string. When `false` is passed, no icon will be used.
200
- * @param definition.withText When set `true`, the label of the dropdown will be visible. See
201
- * {@link module:ui/button/buttonview~ButtonView#withText} to learn more.
202
- * @param definition.tooltip A tooltip of the dropdown button. See
203
- * {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.
204
- * @param componentFactory Component factory used to create items
205
- * of the nested toolbar.
206
- */
207
- private _createNestedToolbarDropdown;
24
+ /**
25
+ * A reference to the options object passed to the constructor.
26
+ */
27
+ readonly options: ToolbarOptions;
28
+ /**
29
+ * A collection of toolbar items (buttons, dropdowns, etc.).
30
+ */
31
+ readonly items: ViewCollection;
32
+ /**
33
+ * Tracks information about the DOM focus in the toolbar.
34
+ */
35
+ readonly focusTracker: FocusTracker;
36
+ /**
37
+ * An instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}
38
+ * to handle keyboard navigation in the toolbar.
39
+ */
40
+ readonly keystrokes: KeystrokeHandler;
41
+ /**
42
+ * A (child) view containing {@link #items toolbar items}.
43
+ */
44
+ readonly itemsView: ItemsView;
45
+ /**
46
+ * A top–level collection aggregating building blocks of the toolbar.
47
+ *
48
+ * ┌───────────────── ToolbarView ─────────────────┐
49
+ * | ┌──────────────── #children ────────────────┐ |
50
+ * | | ┌──────────── #itemsView ───────────┐ | |
51
+ * | | | [ item1 ] [ item2 ] ... [ itemN ] | | |
52
+ * | | └──────────────────────────────────-┘ | |
53
+ * | └───────────────────────────────────────────┘ |
54
+ * └───────────────────────────────────────────────┘
55
+ *
56
+ * By default, it contains the {@link #itemsView} but it can be extended with additional
57
+ * UI elements when necessary.
58
+ */
59
+ readonly children: ViewCollection;
60
+ /**
61
+ * A collection of {@link #items} that take part in the focus cycling
62
+ * (i.e. navigation using the keyboard). Usually, it contains a subset of {@link #items} with
63
+ * some optional UI elements that also belong to the toolbar and should be focusable
64
+ * by the user.
65
+ */
66
+ readonly focusables: ViewCollection<FocusableView>;
67
+ locale: Locale;
68
+ /**
69
+ * The property reflected by the `role` DOM attribute to be used by assistive technologies.
70
+ *
71
+ * @observable
72
+ * @default 'toolbar'
73
+ */
74
+ role: string | undefined;
75
+ /**
76
+ * Label used by assistive technologies to describe this toolbar element.
77
+ *
78
+ * @observable
79
+ * @default 'Editor toolbar'
80
+ */
81
+ ariaLabel: string;
82
+ /**
83
+ * The maximum width of the toolbar element.
84
+ *
85
+ * **Note**: When set to a specific value (e.g. `'200px'`), the value will affect the behavior of the
86
+ * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}
87
+ * option by changing the number of {@link #items} that will be displayed in the toolbar at a time.
88
+ *
89
+ * @observable
90
+ * @default 'auto'
91
+ */
92
+ maxWidth: string;
93
+ /**
94
+ * An additional CSS class added to the {@link #element}.
95
+ *
96
+ * @observable
97
+ * @type {String}
98
+ */
99
+ class: string | undefined;
100
+ /**
101
+ * When set true, makes the toolbar look compact with {@link #element}.
102
+ *
103
+ * @observable
104
+ * @default false
105
+ */
106
+ isCompact: boolean;
107
+ /**
108
+ * Controls the orientation of toolbar items. Only available when
109
+ * {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull dynamic items grouping}
110
+ * is **disabled**.
111
+ *
112
+ * @observable
113
+ */
114
+ isVertical: boolean;
115
+ /**
116
+ * Indicates whether the toolbar responds to changes in the geometry (e.g. window resize) by grouping excessive items or not.
117
+ */
118
+ isGrouping: boolean;
119
+ /**
120
+ * Helps cycling over {@link #focusables focusable items} in the toolbar.
121
+ */
122
+ private readonly _focusCycler;
123
+ /**
124
+ * An instance of the active toolbar behavior that shapes its look and functionality.
125
+ *
126
+ * See {@link module:ui/toolbar/toolbarview~ToolbarBehavior} to learn more.
127
+ */
128
+ private _behavior;
129
+ /**
130
+ * Creates an instance of the {@link module:ui/toolbar/toolbarview~ToolbarView} class.
131
+ *
132
+ * Also see {@link #render}.
133
+ *
134
+ * @param locale The localization services instance.
135
+ * @param options Configuration options of the toolbar.
136
+ */
137
+ constructor(locale: Locale, options?: ToolbarOptions);
138
+ /**
139
+ * @inheritDoc
140
+ */
141
+ override render(): void;
142
+ /**
143
+ * @inheritDoc
144
+ */
145
+ override destroy(): void;
146
+ /**
147
+ * Focuses the first focusable in {@link #focusables}.
148
+ */
149
+ focus(): void;
150
+ /**
151
+ * Focuses the last focusable in {@link #focusables}.
152
+ */
153
+ focusLast(): void;
154
+ /**
155
+ * A utility that expands the plain toolbar configuration into
156
+ * {@link module:ui/toolbar/toolbarview~ToolbarView#items} using a given component factory.
157
+ *
158
+ * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.
159
+ * @param factory A factory producing toolbar items.
160
+ * @param removeItems An array of items names to be removed from the configuration. When present, applies
161
+ * to this toolbar and all nested ones as well.
162
+ */
163
+ fillFromConfig(itemsOrConfig: ToolbarConfig | undefined, factory: ComponentFactory, removeItems?: Array<string>): void;
164
+ /**
165
+ * Changes the behavior of toolbar if it does not fit into the available space.
166
+ */
167
+ switchBehavior(newBehaviorType: "dynamic" | "static"): void;
168
+ /**
169
+ * A utility that expands the plain toolbar configuration into a list of view items using a given component factory.
170
+ *
171
+ * @param itemsOrConfig The toolbar items or the entire toolbar configuration object.
172
+ * @param factory A factory producing toolbar items.
173
+ * @param removeItems An array of items names to be removed from the configuration. When present, applies
174
+ * to this toolbar and all nested ones as well.
175
+ */
176
+ private _buildItemsFromConfig;
177
+ /**
178
+ * Cleans up the {@link module:ui/toolbar/toolbarview~ToolbarView#items} of the toolbar by removing unwanted items and
179
+ * duplicated (obsolete) separators or line breaks.
180
+ *
181
+ * @param items The toolbar items configuration.
182
+ * @param factory A factory producing toolbar items.
183
+ * @param removeItems An array of items names to be removed from the configuration.
184
+ * @returns Items after the clean-up.
185
+ */
186
+ private _cleanItemsConfiguration;
187
+ /**
188
+ * Remove leading, trailing, and duplicated separators (`-` and `|`).
189
+ *
190
+ * @returns Toolbar items after the separator and line break clean-up.
191
+ */
192
+ private _cleanSeparatorsAndLineBreaks;
193
+ /**
194
+ * Creates a user-defined dropdown containing a toolbar with items.
195
+ *
196
+ * @param definition A definition of the nested toolbar dropdown.
197
+ * @param definition.label A label of the dropdown.
198
+ * @param definition.icon An icon of the drop-down. One of 'bold', 'plus', 'text', 'importExport', 'alignLeft',
199
+ * 'paragraph' or an SVG string. When `false` is passed, no icon will be used.
200
+ * @param definition.withText When set `true`, the label of the dropdown will be visible. See
201
+ * {@link module:ui/button/buttonview~ButtonView#withText} to learn more.
202
+ * @param definition.tooltip A tooltip of the dropdown button. See
203
+ * {@link module:ui/button/buttonview~ButtonView#tooltip} to learn more. Defaults to `true`.
204
+ * @param componentFactory Component factory used to create items
205
+ * of the nested toolbar.
206
+ */
207
+ private _createNestedToolbarDropdown;
208
208
  }
209
209
  /**
210
- * Fired when some toolbar {@link ~ToolbarView#items} were grouped or ungrouped as a result of some change
211
- * in the toolbar geometry.
212
- *
213
- * **Note**: This event is always fired **once** regardless of the number of items that were be
214
- * grouped or ungrouped at a time.
215
- *
216
- * **Note**: This event is fired only if the items grouping functionality was enabled in
217
- * the first place (see {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}).
218
- *
219
- * @eventName ~ToolbarView#groupedItemsUpdate
220
- */
210
+ * Fired when some toolbar {@link ~ToolbarView#items} were grouped or ungrouped as a result of some change
211
+ * in the toolbar geometry.
212
+ *
213
+ * **Note**: This event is always fired **once** regardless of the number of items that were be
214
+ * grouped or ungrouped at a time.
215
+ *
216
+ * **Note**: This event is fired only if the items grouping functionality was enabled in
217
+ * the first place (see {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull}).
218
+ *
219
+ * @eventName ~ToolbarView#groupedItemsUpdate
220
+ */
221
221
  export type ToolbarViewGroupedItemsUpdateEvent = {
222
- name: 'groupedItemsUpdate';
223
- args: [];
222
+ name: "groupedItemsUpdate";
223
+ args: [];
224
224
  };
225
225
  /**
226
- * An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its
227
- * {@link module:ui/toolbar/toolbarview~ToolbarView#items}.
228
- */
226
+ * An inner block of the {@link module:ui/toolbar/toolbarview~ToolbarView} hosting its
227
+ * {@link module:ui/toolbar/toolbarview~ToolbarView#items}.
228
+ */
229
229
  export declare class ItemsView extends View {
230
- /**
231
- * A collection of items (buttons, dropdowns, etc.).
232
- */
233
- readonly children: ViewCollection;
234
- /**
235
- * @inheritDoc
236
- */
237
- constructor(locale?: Locale);
230
+ /**
231
+ * A collection of items (buttons, dropdowns, etc.).
232
+ */
233
+ readonly children: ViewCollection;
234
+ /**
235
+ * @inheritDoc
236
+ */
237
+ constructor(locale?: Locale);
238
238
  }
239
239
  /**
240
- * Options passed to the {@link module:ui/toolbar/toolbarview~ToolbarView#constructor} of the toolbar.
241
- */
240
+ * Options passed to the {@link module:ui/toolbar/toolbarview~ToolbarView#constructor} of the toolbar.
241
+ */
242
242
  export interface ToolbarOptions {
243
- /**
244
- * When set to `true`, the toolbar will automatically group {@link module:ui/toolbar/toolbarview~ToolbarView#items} that
245
- * would normally wrap to the next line when there is not enough space to display them in a single row, for
246
- * instance, if the parent container of the toolbar is narrow. For toolbars in absolutely positioned containers
247
- * without width restrictions also the {@link module:ui/toolbar/toolbarview~ToolbarOptions#isFloating} option is required to be `true`.
248
- *
249
- * See also: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.
250
- */
251
- shouldGroupWhenFull?: boolean;
252
- /**
253
- * This option should be enabled for toolbars in absolutely positioned containers without width restrictions
254
- * to enable automatic {@link module:ui/toolbar/toolbarview~ToolbarView#items} grouping.
255
- * When this option is set to `true`, the items will stop wrapping to the next line
256
- * and together with {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull},
257
- * this will allow grouping them when there is not enough space in a single row.
258
- */
259
- isFloating?: boolean;
243
+ /**
244
+ * When set to `true`, the toolbar will automatically group {@link module:ui/toolbar/toolbarview~ToolbarView#items} that
245
+ * would normally wrap to the next line when there is not enough space to display them in a single row, for
246
+ * instance, if the parent container of the toolbar is narrow. For toolbars in absolutely positioned containers
247
+ * without width restrictions also the {@link module:ui/toolbar/toolbarview~ToolbarOptions#isFloating} option is required to be `true`.
248
+ *
249
+ * See also: {@link module:ui/toolbar/toolbarview~ToolbarView#maxWidth}.
250
+ */
251
+ shouldGroupWhenFull?: boolean;
252
+ /**
253
+ * This option should be enabled for toolbars in absolutely positioned containers without width restrictions
254
+ * to enable automatic {@link module:ui/toolbar/toolbarview~ToolbarView#items} grouping.
255
+ * When this option is set to `true`, the items will stop wrapping to the next line
256
+ * and together with {@link module:ui/toolbar/toolbarview~ToolbarOptions#shouldGroupWhenFull},
257
+ * this will allow grouping them when there is not enough space in a single row.
258
+ */
259
+ isFloating?: boolean;
260
260
  }
261
261
  /**
262
- * A class interface defining the behavior of the {@link module:ui/toolbar/toolbarview~ToolbarView}.
263
- *
264
- * Toolbar behaviors extend its look and functionality and have an impact on the
265
- * {@link module:ui/toolbar/toolbarview~ToolbarView#element} template or
266
- * {@link module:ui/toolbar/toolbarview~ToolbarView#render rendering}. They can be enabled
267
- * conditionally, e.g. depending on the configuration of the toolbar.
268
- * @internal
269
- */
262
+ * A class interface defining the behavior of the {@link module:ui/toolbar/toolbarview~ToolbarView}.
263
+ *
264
+ * Toolbar behaviors extend its look and functionality and have an impact on the
265
+ * {@link module:ui/toolbar/toolbarview~ToolbarView#element} template or
266
+ * {@link module:ui/toolbar/toolbarview~ToolbarView#render rendering}. They can be enabled
267
+ * conditionally, e.g. depending on the configuration of the toolbar.
268
+ * @internal
269
+ */
270
270
  export interface ToolbarBehavior {
271
- /**
272
- * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#render rendered}.
273
- * It can be used to, for example, customize the behavior of the toolbar when its
274
- * {@link module:ui/toolbar/toolbarview~ToolbarView#element} is available.
275
- *
276
- * @param view An instance of the toolbar being rendered.
277
- */
278
- render(view: ToolbarView): void;
279
- /**
280
- * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#destroy destroyed}.
281
- * It allows cleaning up after the toolbar behavior, for instance, this is the right place to detach
282
- * event listeners, free up references, etc.
283
- */
284
- destroy(): void;
285
- /**
286
- * Indicates the type of the toolbar behavior. Dynamic toolbar can hide items that do not fit into the available space.
287
- * Static toolbar does not hide items and does not respond to the changes of the viewport.
288
- */
289
- type: 'dynamic' | 'static';
271
+ /**
272
+ * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#render rendered}.
273
+ * It can be used to, for example, customize the behavior of the toolbar when its
274
+ * {@link module:ui/toolbar/toolbarview~ToolbarView#element} is available.
275
+ *
276
+ * @param view An instance of the toolbar being rendered.
277
+ */
278
+ render(view: ToolbarView): void;
279
+ /**
280
+ * A method called after the toolbar has been {@link module:ui/toolbar/toolbarview~ToolbarView#destroy destroyed}.
281
+ * It allows cleaning up after the toolbar behavior, for instance, this is the right place to detach
282
+ * event listeners, free up references, etc.
283
+ */
284
+ destroy(): void;
285
+ /**
286
+ * Indicates the type of the toolbar behavior. Dynamic toolbar can hide items that do not fit into the available space.
287
+ * Static toolbar does not hide items and does not respond to the changes of the viewport.
288
+ */
289
+ type: "dynamic" | "static";
290
290
  }