@ckeditor/ckeditor5-ui 44.3.0 → 45.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/ckeditor5-metadata.json +1 -1
- package/dist/index-editor.css +28 -0
- package/dist/index.css +33 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +196 -74
- package/dist/index.js.map +1 -1
- package/dist/translations/be.d.ts +8 -0
- package/dist/translations/be.js +5 -0
- package/dist/translations/be.umd.js +11 -0
- package/lang/translations/be.po +208 -0
- package/package.json +12 -6
- package/src/arialiveannouncer.js +24 -0
- package/src/autocomplete/autocompleteview.js +29 -25
- package/src/badge/badge.js +23 -15
- package/src/bindings/draggableviewmixin.js +12 -12
- package/src/button/buttonview.js +35 -5
- package/src/button/filedialogbuttonview.js +11 -1
- package/src/button/listitembuttonview.js +14 -10
- package/src/button/switchbuttonview.js +4 -0
- package/src/collapsible/collapsibleview.d.ts +1 -4
- package/src/collapsible/collapsibleview.js +13 -2
- package/src/colorgrid/colorgridview.js +18 -2
- package/src/colorgrid/colortileview.d.ts +1 -4
- package/src/colorgrid/colortileview.js +3 -3
- package/src/colorpicker/colorpickerview.js +28 -1
- package/src/colorselector/colorgridsfragmentview.js +80 -4
- package/src/colorselector/colorpickerfragmentview.js +44 -3
- package/src/colorselector/colorselectorview.js +36 -0
- package/src/componentfactory.js +8 -4
- package/src/dialog/dialog.js +18 -0
- package/src/dialog/dialogactionsview.js +20 -0
- package/src/dialog/dialogcontentview.js +4 -0
- package/src/dialog/dialogview.d.ts +1 -1
- package/src/dialog/dialogview.js +56 -11
- package/src/dropdown/button/dropdownbuttonview.d.ts +0 -3
- package/src/dropdown/button/dropdownbuttonview.js +6 -2
- package/src/dropdown/button/splitbuttonview.d.ts +1 -4
- package/src/dropdown/button/splitbuttonview.js +27 -3
- package/src/dropdown/dropdownpanelview.js +8 -0
- package/src/dropdown/dropdownview.js +235 -184
- package/src/dropdown/menu/dropdownmenubuttonview.d.ts +0 -3
- package/src/dropdown/menu/dropdownmenubuttonview.js +6 -2
- package/src/dropdown/menu/dropdownmenulistitembuttonview.js +1 -0
- package/src/dropdown/menu/dropdownmenulistitemview.js +4 -0
- package/src/dropdown/menu/dropdownmenunestedmenuview.js +31 -8
- package/src/dropdown/menu/dropdownmenurootlistview.js +16 -8
- package/src/editableui/editableuiview.js +22 -4
- package/src/editableui/inline/inlineeditableuiview.js +4 -0
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +8 -11
- package/src/editorui/bodycollection.js +13 -0
- package/src/editorui/boxed/boxededitoruiview.js +14 -0
- package/src/editorui/editorui.d.ts +1 -1
- package/src/editorui/editorui.js +56 -25
- package/src/editorui/editoruiview.d.ts +15 -1
- package/src/editorui/editoruiview.js +22 -0
- package/src/editorui/evaluationbadge.js +5 -5
- package/src/editorui/poweredby.d.ts +1 -4
- package/src/editorui/poweredby.js +5 -2
- package/src/focuscycler.js +31 -0
- package/src/formheader/formheaderview.js +8 -0
- package/src/formrow/formrowview.d.ts +57 -0
- package/src/formrow/formrowview.js +56 -0
- package/src/highlightedtext/highlightedtextview.js +1 -1
- package/src/highlightedtext/labelwithhighlightview.js +4 -0
- package/src/icon/iconview.js +25 -16
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/input/inputbase.js +5 -0
- package/src/label/labelview.js +5 -0
- package/src/labeledfield/labeledfieldview.js +20 -0
- package/src/labeledinput/labeledinputview.js +13 -0
- package/src/list/listitemgroupview.js +15 -0
- package/src/list/listitemview.js +4 -0
- package/src/list/listview.js +27 -5
- package/src/menubar/menubarmenubuttonview.d.ts +0 -3
- package/src/menubar/menubarmenubuttonview.js +6 -2
- package/src/menubar/menubarmenupanelview.js +4 -0
- package/src/menubar/menubarmenuview.js +23 -6
- package/src/menubar/menubarview.d.ts +8 -0
- package/src/menubar/menubarview.js +27 -7
- package/src/menubar/utils.d.ts +6 -0
- package/src/menubar/utils.js +16 -3
- package/src/model.js +1 -1
- package/src/panel/balloon/balloonpanelview.js +464 -449
- package/src/panel/balloon/contextualballoon.js +60 -24
- package/src/panel/sticky/stickypanelview.js +14 -0
- package/src/search/searchresultsview.js +18 -0
- package/src/search/text/searchtextqueryview.d.ts +0 -3
- package/src/search/text/searchtextqueryview.js +15 -3
- package/src/search/text/searchtextview.js +43 -3
- package/src/template.js +69 -1
- package/src/textarea/textareaview.js +12 -5
- package/src/toolbar/balloon/balloontoolbar.d.ts +1 -1
- package/src/toolbar/balloon/balloontoolbar.js +38 -11
- package/src/toolbar/block/blocktoolbar.js +24 -8
- package/src/toolbar/toolbarview.d.ts +15 -2
- package/src/toolbar/toolbarview.js +206 -58
- package/src/tooltipmanager.js +50 -32
- package/src/view.js +76 -0
- package/src/viewcollection.js +4 -0
- package/theme/components/form/form.css +87 -0
- package/theme/components/formrow/formrow.css +32 -0
- package/theme/icons/accessibility.svg +0 -1
- package/theme/icons/color-tile-check.svg +0 -1
- package/theme/icons/dropdown-arrow.svg +0 -1
- package/theme/icons/project-logo.svg +0 -1
|
@@ -13,6 +13,19 @@ import '../../theme/components/labeledinput/labeledinput.css';
|
|
|
13
13
|
* The labeled input view class.
|
|
14
14
|
*/
|
|
15
15
|
export default class LabeledInputView extends View {
|
|
16
|
+
/**
|
|
17
|
+
* The label view.
|
|
18
|
+
*/
|
|
19
|
+
labelView;
|
|
20
|
+
/**
|
|
21
|
+
* The input view.
|
|
22
|
+
*/
|
|
23
|
+
inputView;
|
|
24
|
+
/**
|
|
25
|
+
* The status view for the {@link #inputView}. It displays {@link #errorText} and
|
|
26
|
+
* {@link #infoText}.
|
|
27
|
+
*/
|
|
28
|
+
statusView;
|
|
16
29
|
/**
|
|
17
30
|
* Creates an instance of the labeled input view class.
|
|
18
31
|
*
|
|
@@ -13,6 +13,21 @@ import ListSeparatorView from './listseparatorview.js';
|
|
|
13
13
|
* The list item group view class.
|
|
14
14
|
*/
|
|
15
15
|
export default class ListItemGroupView extends View {
|
|
16
|
+
/**
|
|
17
|
+
* Label of the group view. Its text is configurable using the {@link #label label attribute}.
|
|
18
|
+
*
|
|
19
|
+
* If a custom label view is not passed in `ListItemGroupView` constructor, the label is an instance
|
|
20
|
+
* of {@link module:ui/label/labelview~LabelView}.
|
|
21
|
+
*/
|
|
22
|
+
labelView;
|
|
23
|
+
/**
|
|
24
|
+
* Collection of the child list items inside this group.
|
|
25
|
+
*/
|
|
26
|
+
items;
|
|
27
|
+
/**
|
|
28
|
+
* Collection of the child elements of the group.
|
|
29
|
+
*/
|
|
30
|
+
children;
|
|
16
31
|
/**
|
|
17
32
|
* Creates an instance of the list item group view class.
|
|
18
33
|
*
|
package/src/list/listitemview.js
CHANGED
package/src/list/listview.js
CHANGED
|
@@ -16,16 +16,38 @@ import '../../theme/components/list/list.css';
|
|
|
16
16
|
* The list view class.
|
|
17
17
|
*/
|
|
18
18
|
export default class ListView extends View {
|
|
19
|
+
/**
|
|
20
|
+
* The collection of focusable views in the list. It is used to determine accessible navigation
|
|
21
|
+
* between the {@link module:ui/list/listitemview~ListItemView list items} and
|
|
22
|
+
* {@link module:ui/list/listitemgroupview~ListItemGroupView list groups}.
|
|
23
|
+
*/
|
|
24
|
+
focusables;
|
|
25
|
+
/**
|
|
26
|
+
* Collection of the child list views.
|
|
27
|
+
*/
|
|
28
|
+
items;
|
|
29
|
+
/**
|
|
30
|
+
* Tracks information about DOM focus in the list.
|
|
31
|
+
*/
|
|
32
|
+
focusTracker;
|
|
33
|
+
/**
|
|
34
|
+
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}.
|
|
35
|
+
*/
|
|
36
|
+
keystrokes;
|
|
37
|
+
/**
|
|
38
|
+
* Helps cycling over focusable {@link #items} in the list.
|
|
39
|
+
*/
|
|
40
|
+
_focusCycler;
|
|
41
|
+
/**
|
|
42
|
+
* A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.
|
|
43
|
+
* Used for accessibility and keyboard navigation purposes.
|
|
44
|
+
*/
|
|
45
|
+
_listItemGroupToChangeListeners = new WeakMap();
|
|
19
46
|
/**
|
|
20
47
|
* @inheritDoc
|
|
21
48
|
*/
|
|
22
49
|
constructor(locale) {
|
|
23
50
|
super(locale);
|
|
24
|
-
/**
|
|
25
|
-
* A cached map of {@link module:ui/list/listitemgroupview~ListItemGroupView} to `change` event listeners for their `items`.
|
|
26
|
-
* Used for accessibility and keyboard navigation purposes.
|
|
27
|
-
*/
|
|
28
|
-
this._listItemGroupToChangeListeners = new WeakMap();
|
|
29
51
|
const bind = this.bindTemplate;
|
|
30
52
|
this.focusables = new ViewCollection();
|
|
31
53
|
this.items = this.createCollection();
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
* @license Copyright (c) 2003-2025, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
6
|
-
* @module ui/menubar/menubarmenubuttonview
|
|
7
|
-
*/
|
|
8
5
|
import IconView from '../icon/iconview.js';
|
|
9
6
|
import ListItemButtonView from '../button/listitembuttonview.js';
|
|
10
7
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
|
@@ -5,15 +5,19 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @module ui/menubar/menubarmenubuttonview
|
|
7
7
|
*/
|
|
8
|
+
import { IconDropdownArrow } from '@ckeditor/ckeditor5-icons';
|
|
8
9
|
import IconView from '../icon/iconview.js';
|
|
9
10
|
import ListItemButtonView from '../button/listitembuttonview.js';
|
|
10
|
-
import dropdownArrowIcon from '../../theme/icons/dropdown-arrow.svg';
|
|
11
11
|
import '../../theme/components/menubar/menubarmenubutton.css';
|
|
12
12
|
/**
|
|
13
13
|
* A menu {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#buttonView} class. Buttons like this one
|
|
14
14
|
* open both top-level bar menus as well as sub-menus.
|
|
15
15
|
*/
|
|
16
16
|
export default class MenuBarMenuButtonView extends ListItemButtonView {
|
|
17
|
+
/**
|
|
18
|
+
* An icon that displays an arrow to indicate a direction of the menu.
|
|
19
|
+
*/
|
|
20
|
+
arrowView;
|
|
17
21
|
/**
|
|
18
22
|
* Creates an instance of the menu bar button view.
|
|
19
23
|
*
|
|
@@ -53,7 +57,7 @@ export default class MenuBarMenuButtonView extends ListItemButtonView {
|
|
|
53
57
|
*/
|
|
54
58
|
_createArrowView() {
|
|
55
59
|
const arrowView = new IconView();
|
|
56
|
-
arrowView.content =
|
|
60
|
+
arrowView.content = IconDropdownArrow;
|
|
57
61
|
arrowView.extendTemplate({
|
|
58
62
|
attributes: {
|
|
59
63
|
class: 'ck-menu-bar__menu__button__arrow'
|
|
@@ -8,6 +8,10 @@ import '../../theme/components/menubar/menubarmenupanel.css';
|
|
|
8
8
|
* A view representing a {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} of a menu.
|
|
9
9
|
*/
|
|
10
10
|
export default class MenuBarMenuPanelView extends View {
|
|
11
|
+
/**
|
|
12
|
+
* Collection of the child views in this panel.
|
|
13
|
+
*/
|
|
14
|
+
children;
|
|
11
15
|
/**
|
|
12
16
|
* Creates an instance of the menu panel view.
|
|
13
17
|
*
|
|
@@ -16,6 +16,23 @@ import '../../theme/components/menubar/menubarmenu.css';
|
|
|
16
16
|
* they host other sub-menus and menu items (buttons) that users can interact with.
|
|
17
17
|
*/
|
|
18
18
|
class MenuBarMenuView extends View {
|
|
19
|
+
/**
|
|
20
|
+
* Button of the menu view.
|
|
21
|
+
*/
|
|
22
|
+
buttonView;
|
|
23
|
+
/**
|
|
24
|
+
* Panel of the menu. It hosts children of the menu.
|
|
25
|
+
*/
|
|
26
|
+
panelView;
|
|
27
|
+
/**
|
|
28
|
+
* Tracks information about the DOM focus in the menu.
|
|
29
|
+
*/
|
|
30
|
+
focusTracker;
|
|
31
|
+
/**
|
|
32
|
+
* Instance of the {@link module:utils/keystrokehandler~KeystrokeHandler}. It manages
|
|
33
|
+
* keystrokes of the menu.
|
|
34
|
+
*/
|
|
35
|
+
keystrokes;
|
|
19
36
|
/**
|
|
20
37
|
* Creates an instance of the menu view.
|
|
21
38
|
*
|
|
@@ -172,11 +189,11 @@ class MenuBarMenuView extends View {
|
|
|
172
189
|
}
|
|
173
190
|
}
|
|
174
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* A function used to calculate the optimal position for the dropdown panel.
|
|
194
|
+
*
|
|
195
|
+
* Referenced for unit testing purposes.
|
|
196
|
+
*/
|
|
197
|
+
static _getOptimalPosition = getOptimalPosition;
|
|
175
198
|
}
|
|
176
|
-
/**
|
|
177
|
-
* A function used to calculate the optimal position for the dropdown panel.
|
|
178
|
-
*
|
|
179
|
-
* Referenced for unit testing purposes.
|
|
180
|
-
*/
|
|
181
|
-
MenuBarMenuView._getOptimalPosition = getOptimalPosition;
|
|
182
199
|
export default MenuBarMenuView;
|
|
@@ -69,6 +69,14 @@ export default class MenuBarView extends View implements FocusableView {
|
|
|
69
69
|
* Closes all menus in the bar.
|
|
70
70
|
*/
|
|
71
71
|
close(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Disables all menus in the bar.
|
|
74
|
+
*/
|
|
75
|
+
disable(): void;
|
|
76
|
+
/**
|
|
77
|
+
* Enables all menus in the bar.
|
|
78
|
+
*/
|
|
79
|
+
enable(): void;
|
|
72
80
|
/**
|
|
73
81
|
* Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered
|
|
74
82
|
* in the menu bar to be properly managed.
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import { logWarning } from '@ckeditor/ckeditor5-utils';
|
|
9
9
|
import View from '../view.js';
|
|
10
|
-
import { isObject } from '
|
|
10
|
+
import { isObject } from 'es-toolkit/compat';
|
|
11
11
|
import ListItemView from '../list/listitemview.js';
|
|
12
12
|
import ListSeparatorView from '../list/listseparatorview.js';
|
|
13
13
|
import MenuBarMenuView from './menubarmenuview.js';
|
|
@@ -23,6 +23,16 @@ import '../../theme/components/menubar/menubar.css';
|
|
|
23
23
|
* to organize and access a large number of buttons.
|
|
24
24
|
*/
|
|
25
25
|
export default class MenuBarView extends View {
|
|
26
|
+
/**
|
|
27
|
+
* Collection of the child views inside the {@link #element}.
|
|
28
|
+
*/
|
|
29
|
+
children;
|
|
30
|
+
/**
|
|
31
|
+
* A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.
|
|
32
|
+
*
|
|
33
|
+
* @observable
|
|
34
|
+
*/
|
|
35
|
+
menus = [];
|
|
26
36
|
/**
|
|
27
37
|
* Creates an instance of the menu bar view.
|
|
28
38
|
*
|
|
@@ -30,12 +40,6 @@ export default class MenuBarView extends View {
|
|
|
30
40
|
*/
|
|
31
41
|
constructor(locale) {
|
|
32
42
|
super(locale);
|
|
33
|
-
/**
|
|
34
|
-
* A list of {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instances registered in the menu bar.
|
|
35
|
-
*
|
|
36
|
-
* @observable
|
|
37
|
-
*/
|
|
38
|
-
this.menus = [];
|
|
39
43
|
const t = locale.t;
|
|
40
44
|
const bind = this.bindTemplate;
|
|
41
45
|
this.set({
|
|
@@ -111,6 +115,22 @@ export default class MenuBarView extends View {
|
|
|
111
115
|
topLevelCategoryMenuView.isOpen = false;
|
|
112
116
|
}
|
|
113
117
|
}
|
|
118
|
+
/**
|
|
119
|
+
* Disables all menus in the bar.
|
|
120
|
+
*/
|
|
121
|
+
disable() {
|
|
122
|
+
for (const topLevelCategoryMenuView of this.children) {
|
|
123
|
+
topLevelCategoryMenuView.isEnabled = false;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Enables all menus in the bar.
|
|
128
|
+
*/
|
|
129
|
+
enable() {
|
|
130
|
+
for (const topLevelCategoryMenuView of this.children) {
|
|
131
|
+
topLevelCategoryMenuView.isEnabled = true;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
114
134
|
/**
|
|
115
135
|
* Registers a menu view in the menu bar. Every {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} instance must be registered
|
|
116
136
|
* in the menu bar to be properly managed.
|
package/src/menubar/utils.d.ts
CHANGED
|
@@ -250,6 +250,12 @@ export declare const MenuBarMenuViewPanelPositioningFunctions: Record<string, Po
|
|
|
250
250
|
* ]
|
|
251
251
|
* },
|
|
252
252
|
* {
|
|
253
|
+
* groupId: 'fullscreen',
|
|
254
|
+
* items: [
|
|
255
|
+
* 'menuBar:fullscreen'
|
|
256
|
+
* ]
|
|
257
|
+
* },
|
|
258
|
+
* {
|
|
253
259
|
* groupId: 'restrictedEditingException',
|
|
254
260
|
* items: [
|
|
255
261
|
* 'menuBar:restrictedEditingException'
|
package/src/menubar/utils.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
import MenuBarMenuListItemView from './menubarmenulistitemview.js';
|
|
9
9
|
import clickOutsideHandler from '../bindings/clickoutsidehandler.js';
|
|
10
10
|
import { logWarning } from '@ckeditor/ckeditor5-utils';
|
|
11
|
-
import { cloneDeep } from '
|
|
11
|
+
import { cloneDeep } from 'es-toolkit/compat';
|
|
12
12
|
const NESTED_PANEL_HORIZONTAL_OFFSET = 5;
|
|
13
13
|
/**
|
|
14
14
|
* Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.
|
|
@@ -158,7 +158,7 @@ export const MenuBarMenuBehaviors = {
|
|
|
158
158
|
*/
|
|
159
159
|
openAndFocusPanelOnArrowDownKey(menuView) {
|
|
160
160
|
menuView.keystrokes.set('arrowdown', (data, cancel) => {
|
|
161
|
-
if (menuView.focusTracker.focusedElement === menuView.buttonView.element) {
|
|
161
|
+
if (menuView.isEnabled && menuView.focusTracker.focusedElement === menuView.buttonView.element) {
|
|
162
162
|
if (!menuView.isOpen) {
|
|
163
163
|
menuView.isOpen = true;
|
|
164
164
|
}
|
|
@@ -478,6 +478,12 @@ export const MenuBarMenuViewPanelPositioningFunctions = {
|
|
|
478
478
|
* ]
|
|
479
479
|
* },
|
|
480
480
|
* {
|
|
481
|
+
* groupId: 'fullscreen',
|
|
482
|
+
* items: [
|
|
483
|
+
* 'menuBar:fullscreen'
|
|
484
|
+
* ]
|
|
485
|
+
* },
|
|
486
|
+
* {
|
|
481
487
|
* groupId: 'restrictedEditingException',
|
|
482
488
|
* items: [
|
|
483
489
|
* 'menuBar:restrictedEditingException'
|
|
@@ -742,6 +748,12 @@ export const DefaultMenuBarItems = [
|
|
|
742
748
|
'menuBar:previewMergeFields'
|
|
743
749
|
]
|
|
744
750
|
},
|
|
751
|
+
{
|
|
752
|
+
groupId: 'fullscreen',
|
|
753
|
+
items: [
|
|
754
|
+
'menuBar:fullscreen'
|
|
755
|
+
]
|
|
756
|
+
},
|
|
745
757
|
{
|
|
746
758
|
groupId: 'restrictedEditing',
|
|
747
759
|
items: [
|
|
@@ -760,7 +772,8 @@ export const DefaultMenuBarItems = [
|
|
|
760
772
|
'menuBar:insertImage',
|
|
761
773
|
'menuBar:ckbox',
|
|
762
774
|
'menuBar:ckfinder',
|
|
763
|
-
'menuBar:insertTable'
|
|
775
|
+
'menuBar:insertTable',
|
|
776
|
+
'menuBar:insertTableLayout'
|
|
764
777
|
]
|
|
765
778
|
},
|
|
766
779
|
{
|