@ckeditor/ckeditor5-ui 41.3.0-alpha.4 → 41.3.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/ckeditor5-metadata.json +1 -1
- package/lang/contexts.json +12 -2
- package/lang/translations/af.po +210 -0
- package/lang/translations/ar.po +44 -4
- package/lang/translations/ast.po +44 -4
- package/lang/translations/az.po +44 -4
- package/lang/translations/bg.po +44 -4
- package/lang/translations/bn.po +44 -4
- package/lang/translations/bs.po +210 -0
- package/lang/translations/ca.po +44 -4
- package/lang/translations/cs.po +44 -4
- package/lang/translations/da.po +44 -4
- package/lang/translations/de-ch.po +44 -4
- package/lang/translations/de.po +44 -4
- package/lang/translations/el.po +44 -4
- package/lang/translations/en-au.po +44 -4
- package/lang/translations/en-gb.po +44 -4
- package/lang/translations/en.po +44 -4
- package/lang/translations/eo.po +44 -4
- package/lang/translations/es-co.po +210 -0
- package/lang/translations/es.po +44 -4
- package/lang/translations/et.po +44 -4
- package/lang/translations/eu.po +44 -4
- package/lang/translations/fa.po +44 -4
- package/lang/translations/fi.po +44 -4
- package/lang/translations/fr.po +44 -4
- package/lang/translations/gl.po +44 -4
- package/lang/translations/he.po +44 -4
- package/lang/translations/hi.po +44 -4
- package/lang/translations/hr.po +44 -4
- package/lang/translations/hu.po +44 -4
- package/lang/translations/id.po +44 -4
- package/lang/translations/it.po +44 -4
- package/lang/translations/ja.po +44 -4
- package/lang/translations/jv.po +210 -0
- package/lang/translations/km.po +44 -4
- package/lang/translations/kn.po +44 -4
- package/lang/translations/ko.po +44 -4
- package/lang/translations/ku.po +44 -4
- package/lang/translations/lt.po +44 -4
- package/lang/translations/lv.po +44 -4
- package/lang/translations/ms.po +44 -4
- package/lang/translations/nb.po +44 -4
- package/lang/translations/ne.po +44 -4
- package/lang/translations/nl.po +44 -4
- package/lang/translations/no.po +44 -4
- package/lang/translations/pl.po +44 -4
- package/lang/translations/pt-br.po +44 -4
- package/lang/translations/pt.po +44 -4
- package/lang/translations/ro.po +44 -4
- package/lang/translations/ru.po +44 -4
- package/lang/translations/sk.po +44 -4
- package/lang/translations/sl.po +44 -4
- package/lang/translations/sq.po +44 -4
- package/lang/translations/sr-latn.po +44 -4
- package/lang/translations/sr.po +44 -4
- package/lang/translations/sv.po +44 -4
- package/lang/translations/th.po +44 -4
- package/lang/translations/tk.po +44 -4
- package/lang/translations/tr.po +44 -4
- package/lang/translations/tt.po +44 -4
- package/lang/translations/ug.po +44 -4
- package/lang/translations/uk.po +44 -4
- package/lang/translations/ur.po +44 -4
- package/lang/translations/uz.po +44 -4
- package/lang/translations/vi.po +44 -4
- package/lang/translations/zh-cn.po +44 -4
- package/lang/translations/zh.po +44 -4
- package/package.json +3 -4
- package/src/button/button.d.ts +6 -0
- package/src/button/buttonview.d.ts +4 -0
- package/src/button/buttonview.js +1 -0
- package/src/button/filedialogbuttonview.d.ts +80 -0
- package/src/button/filedialogbuttonview.js +103 -0
- package/src/dropdown/utils.js +1 -5
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +4 -0
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +25 -9
- package/src/index.d.ts +12 -3
- package/src/index.js +10 -2
- package/src/menubar/menubarmenubuttonview.d.ts +35 -0
- package/src/menubar/menubarmenubuttonview.js +64 -0
- package/src/menubar/menubarmenulistitembuttonview.d.ts +21 -0
- package/src/menubar/menubarmenulistitembuttonview.js +30 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +23 -0
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +32 -0
- package/src/menubar/menubarmenulistitemview.d.ts +25 -0
- package/src/menubar/menubarmenulistitemview.js +34 -0
- package/src/menubar/menubarmenulistview.d.ts +24 -0
- package/src/menubar/menubarmenulistview.js +23 -0
- package/src/menubar/menubarmenupanelview.d.ts +53 -0
- package/src/menubar/menubarmenupanelview.js +60 -0
- package/src/menubar/menubarmenuview.d.ts +109 -0
- package/src/menubar/menubarmenuview.js +159 -0
- package/src/menubar/menubarview.d.ts +164 -0
- package/src/menubar/menubarview.js +254 -0
- package/src/menubar/utils.d.ts +432 -0
- package/src/menubar/utils.js +1320 -0
- package/src/toolbar/toolbarview.js +5 -3
- package/src/tooltipmanager.d.ts +11 -0
- package/src/tooltipmanager.js +37 -6
- package/theme/components/menubar/menubar.css +10 -0
- package/theme/components/menubar/menubarmenu.css +9 -0
- package/theme/components/menubar/menubarmenubutton.css +11 -0
- package/theme/components/menubar/menubarmenulistitem.css +10 -0
- package/theme/components/menubar/menubarmenulistitembutton.css +10 -0
- package/theme/components/menubar/menubarmenupanel.css +62 -0
- package/theme/components/tooltip/tooltip.css +0 -3
- package/theme/globals/_reset.css +13 -0
- package/theme/globals/globals.css +1 -0
- package/dist/content-index.css +0 -4
- package/dist/editor-index.css +0 -445
- package/dist/index.css +0 -844
- package/dist/index.css.map +0 -1
- package/dist/translations/ar.d.ts +0 -8
- package/dist/translations/ar.js +0 -5
- package/dist/translations/ast.d.ts +0 -8
- package/dist/translations/ast.js +0 -5
- package/dist/translations/az.d.ts +0 -8
- package/dist/translations/az.js +0 -5
- package/dist/translations/bg.d.ts +0 -8
- package/dist/translations/bg.js +0 -5
- package/dist/translations/bn.d.ts +0 -8
- package/dist/translations/bn.js +0 -5
- package/dist/translations/ca.d.ts +0 -8
- package/dist/translations/ca.js +0 -5
- package/dist/translations/cs.d.ts +0 -8
- package/dist/translations/cs.js +0 -5
- package/dist/translations/da.d.ts +0 -8
- package/dist/translations/da.js +0 -5
- package/dist/translations/de-ch.d.ts +0 -8
- package/dist/translations/de-ch.js +0 -5
- package/dist/translations/de.d.ts +0 -8
- package/dist/translations/de.js +0 -5
- package/dist/translations/el.d.ts +0 -8
- package/dist/translations/el.js +0 -5
- package/dist/translations/en-au.d.ts +0 -8
- package/dist/translations/en-au.js +0 -5
- package/dist/translations/en-gb.d.ts +0 -8
- package/dist/translations/en-gb.js +0 -5
- package/dist/translations/en.d.ts +0 -8
- package/dist/translations/en.js +0 -5
- package/dist/translations/eo.d.ts +0 -8
- package/dist/translations/eo.js +0 -5
- package/dist/translations/es.d.ts +0 -8
- package/dist/translations/es.js +0 -5
- package/dist/translations/et.d.ts +0 -8
- package/dist/translations/et.js +0 -5
- package/dist/translations/eu.d.ts +0 -8
- package/dist/translations/eu.js +0 -5
- package/dist/translations/fa.d.ts +0 -8
- package/dist/translations/fa.js +0 -5
- package/dist/translations/fi.d.ts +0 -8
- package/dist/translations/fi.js +0 -5
- package/dist/translations/fr.d.ts +0 -8
- package/dist/translations/fr.js +0 -5
- package/dist/translations/gl.d.ts +0 -8
- package/dist/translations/gl.js +0 -5
- package/dist/translations/he.d.ts +0 -8
- package/dist/translations/he.js +0 -5
- package/dist/translations/hi.d.ts +0 -8
- package/dist/translations/hi.js +0 -5
- package/dist/translations/hr.d.ts +0 -8
- package/dist/translations/hr.js +0 -5
- package/dist/translations/hu.d.ts +0 -8
- package/dist/translations/hu.js +0 -5
- package/dist/translations/id.d.ts +0 -8
- package/dist/translations/id.js +0 -5
- package/dist/translations/it.d.ts +0 -8
- package/dist/translations/it.js +0 -5
- package/dist/translations/ja.d.ts +0 -8
- package/dist/translations/ja.js +0 -5
- package/dist/translations/km.d.ts +0 -8
- package/dist/translations/km.js +0 -5
- package/dist/translations/kn.d.ts +0 -8
- package/dist/translations/kn.js +0 -5
- package/dist/translations/ko.d.ts +0 -8
- package/dist/translations/ko.js +0 -5
- package/dist/translations/ku.d.ts +0 -8
- package/dist/translations/ku.js +0 -5
- package/dist/translations/lt.d.ts +0 -8
- package/dist/translations/lt.js +0 -5
- package/dist/translations/lv.d.ts +0 -8
- package/dist/translations/lv.js +0 -5
- package/dist/translations/ms.d.ts +0 -8
- package/dist/translations/ms.js +0 -5
- package/dist/translations/nb.d.ts +0 -8
- package/dist/translations/nb.js +0 -5
- package/dist/translations/ne.d.ts +0 -8
- package/dist/translations/ne.js +0 -5
- package/dist/translations/nl.d.ts +0 -8
- package/dist/translations/nl.js +0 -5
- package/dist/translations/no.d.ts +0 -8
- package/dist/translations/no.js +0 -5
- package/dist/translations/pl.d.ts +0 -8
- package/dist/translations/pl.js +0 -5
- package/dist/translations/pt-br.d.ts +0 -8
- package/dist/translations/pt-br.js +0 -5
- package/dist/translations/pt.d.ts +0 -8
- package/dist/translations/pt.js +0 -5
- package/dist/translations/ro.d.ts +0 -8
- package/dist/translations/ro.js +0 -5
- package/dist/translations/ru.d.ts +0 -8
- package/dist/translations/ru.js +0 -5
- package/dist/translations/sk.d.ts +0 -8
- package/dist/translations/sk.js +0 -5
- package/dist/translations/sl.d.ts +0 -8
- package/dist/translations/sl.js +0 -5
- package/dist/translations/sq.d.ts +0 -8
- package/dist/translations/sq.js +0 -5
- package/dist/translations/sr-latn.d.ts +0 -8
- package/dist/translations/sr-latn.js +0 -5
- package/dist/translations/sr.d.ts +0 -8
- package/dist/translations/sr.js +0 -5
- package/dist/translations/sv.d.ts +0 -8
- package/dist/translations/sv.js +0 -5
- package/dist/translations/th.d.ts +0 -8
- package/dist/translations/th.js +0 -5
- package/dist/translations/tk.d.ts +0 -8
- package/dist/translations/tk.js +0 -5
- package/dist/translations/tr.d.ts +0 -8
- package/dist/translations/tr.js +0 -5
- package/dist/translations/tt.d.ts +0 -8
- package/dist/translations/tt.js +0 -5
- package/dist/translations/ug.d.ts +0 -8
- package/dist/translations/ug.js +0 -5
- package/dist/translations/uk.d.ts +0 -8
- package/dist/translations/uk.js +0 -5
- package/dist/translations/ur.d.ts +0 -8
- package/dist/translations/ur.js +0 -5
- package/dist/translations/uz.d.ts +0 -8
- package/dist/translations/uz.js +0 -5
- package/dist/translations/vi.d.ts +0 -8
- package/dist/translations/vi.js +0 -5
- package/dist/translations/zh-cn.d.ts +0 -8
- package/dist/translations/zh-cn.js +0 -5
- package/dist/translations/zh.d.ts +0 -8
- package/dist/translations/zh.js +0 -5
- package/dist/types/arialiveannouncer.d.ts +0 -102
- package/dist/types/augmentation.d.ts +0 -92
- package/dist/types/autocomplete/autocompleteview.d.ts +0 -85
- package/dist/types/bindings/addkeyboardhandlingforgrid.d.ts +0 -31
- package/dist/types/bindings/clickoutsidehandler.d.ts +0 -32
- package/dist/types/bindings/csstransitiondisablermixin.d.ts +0 -44
- package/dist/types/bindings/draggableviewmixin.d.ts +0 -50
- package/dist/types/bindings/injectcsstransitiondisabler.d.ts +0 -63
- package/dist/types/bindings/preventdefault.d.ts +0 -37
- package/dist/types/bindings/submithandler.d.ts +0 -61
- package/dist/types/button/button.d.ts +0 -179
- package/dist/types/button/buttonlabel.d.ts +0 -38
- package/dist/types/button/buttonlabelview.d.ts +0 -35
- package/dist/types/button/buttonview.d.ts +0 -185
- package/dist/types/button/switchbuttonview.d.ts +0 -49
- package/dist/types/collapsible/collapsibleview.d.ts +0 -74
- package/dist/types/colorgrid/colorgridview.d.ts +0 -136
- package/dist/types/colorgrid/colortileview.d.ts +0 -32
- package/dist/types/colorgrid/utils.d.ts +0 -51
- package/dist/types/colorpicker/colorpickerview.d.ts +0 -146
- package/dist/types/colorpicker/utils.d.ts +0 -52
- package/dist/types/colorselector/colorgridsfragmentview.d.ts +0 -199
- package/dist/types/colorselector/colorpickerfragmentview.d.ts +0 -133
- package/dist/types/colorselector/colorselectorview.d.ts +0 -246
- package/dist/types/colorselector/documentcolorcollection.d.ts +0 -74
- package/dist/types/componentfactory.d.ts +0 -85
- package/dist/types/dialog/dialog.d.ts +0 -277
- package/dist/types/dialog/dialogactionsview.d.ts +0 -73
- package/dist/types/dialog/dialogcontentview.d.ts +0 -31
- package/dist/types/dialog/dialogview.d.ts +0 -260
- package/dist/types/dropdown/button/dropdownbutton.d.ts +0 -29
- package/dist/types/dropdown/button/dropdownbuttonview.d.ts +0 -52
- package/dist/types/dropdown/button/splitbuttonview.d.ts +0 -166
- package/dist/types/dropdown/dropdownpanelfocusable.d.ts +0 -25
- package/dist/types/dropdown/dropdownpanelview.d.ts +0 -66
- package/dist/types/dropdown/dropdownview.d.ts +0 -319
- package/dist/types/dropdown/utils.d.ts +0 -239
- package/dist/types/editableui/editableuiview.d.ts +0 -76
- package/dist/types/editableui/inline/inlineeditableuiview.d.ts +0 -44
- package/dist/types/editorui/accessibilityhelp/accessibilityhelp.d.ts +0 -51
- package/dist/types/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +0 -39
- package/dist/types/editorui/bodycollection.d.ts +0 -59
- package/dist/types/editorui/boxed/boxededitoruiview.d.ts +0 -44
- package/dist/types/editorui/editorui.d.ts +0 -292
- package/dist/types/editorui/editoruiview.d.ts +0 -43
- package/dist/types/editorui/poweredby.d.ts +0 -75
- package/dist/types/focuscycler.d.ts +0 -249
- package/dist/types/formheader/formheaderview.d.ts +0 -63
- package/dist/types/highlightedtext/highlightedtextview.d.ts +0 -42
- package/dist/types/icon/iconview.d.ts +0 -92
- package/dist/types/iframe/iframeview.d.ts +0 -54
- package/dist/types/index.d.ts +0 -78
- package/dist/types/input/inputbase.d.ts +0 -123
- package/dist/types/input/inputview.d.ts +0 -40
- package/dist/types/inputnumber/inputnumberview.d.ts +0 -53
- package/dist/types/inputtext/inputtextview.d.ts +0 -22
- package/dist/types/label/labelview.d.ts +0 -40
- package/dist/types/labeledfield/labeledfieldview.d.ts +0 -191
- package/dist/types/labeledfield/utils.d.ts +0 -127
- package/dist/types/labeledinput/labeledinputview.d.ts +0 -129
- package/dist/types/list/listitemgroupview.d.ts +0 -63
- package/dist/types/list/listitemview.d.ts +0 -40
- package/dist/types/list/listseparatorview.d.ts +0 -22
- package/dist/types/list/listview.d.ts +0 -128
- package/dist/types/model.d.ts +0 -26
- package/dist/types/notification/notification.d.ts +0 -215
- package/dist/types/panel/balloon/balloonpanelview.d.ts +0 -689
- package/dist/types/panel/balloon/contextualballoon.d.ts +0 -303
- package/dist/types/panel/sticky/stickypanelview.d.ts +0 -160
- package/dist/types/search/filteredview.d.ts +0 -35
- package/dist/types/search/searchinfoview.d.ts +0 -49
- package/dist/types/search/searchresultsview.d.ts +0 -58
- package/dist/types/search/text/searchtextqueryview.d.ts +0 -80
- package/dist/types/search/text/searchtextview.d.ts +0 -223
- package/dist/types/spinner/spinnerview.d.ts +0 -29
- package/dist/types/template.d.ts +0 -946
- package/dist/types/textarea/textareaview.d.ts +0 -108
- package/dist/types/toolbar/balloon/balloontoolbar.d.ts +0 -121
- package/dist/types/toolbar/block/blockbuttonview.d.ts +0 -39
- package/dist/types/toolbar/block/blocktoolbar.d.ts +0 -157
- package/dist/types/toolbar/normalizetoolbarconfig.d.ts +0 -44
- package/dist/types/toolbar/toolbarlinebreakview.d.ts +0 -22
- package/dist/types/toolbar/toolbarseparatorview.d.ts +0 -22
- package/dist/types/toolbar/toolbarview.d.ts +0 -271
- package/dist/types/tooltipmanager.d.ts +0 -188
- package/dist/types/view.d.ts +0 -426
- package/dist/types/viewcollection.d.ts +0 -143
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type MenuBarMenuView from './menubarmenuview.js';
|
|
6
|
+
import type { default as MenuBarView, MenuBarConfig, MenuBarConfigObject, NormalizedMenuBarConfigObject } from './menubarview.js';
|
|
7
|
+
import { type Locale, type PositioningFunction } from '@ckeditor/ckeditor5-utils';
|
|
8
|
+
import type ComponentFactory from '../componentfactory.js';
|
|
9
|
+
type DeepReadonly<T> = Readonly<{
|
|
10
|
+
[K in keyof T]: T[K] extends string ? Readonly<T[K]> : T[K] extends Array<infer A> ? Readonly<Array<DeepReadonly<A>>> : DeepReadonly<T[K]>;
|
|
11
|
+
}>;
|
|
12
|
+
/**
|
|
13
|
+
* Behaviors of the {@link module:ui/menubar/menubarview~MenuBarView} component.
|
|
14
|
+
*/
|
|
15
|
+
export declare const MenuBarBehaviors: {
|
|
16
|
+
/**
|
|
17
|
+
* When the bar is already open:
|
|
18
|
+
* * Opens the menu when the user hovers over its button.
|
|
19
|
+
* * Closes open menu when another menu's button gets hovered.
|
|
20
|
+
*/
|
|
21
|
+
toggleMenusAndFocusItemsOnHover(menuBarView: MenuBarView): void;
|
|
22
|
+
/**
|
|
23
|
+
* Moves between top-level menus using the arrow left and right keys.
|
|
24
|
+
*
|
|
25
|
+
* If the menubar has already been open, the arrow keys move focus between top-level menu buttons and open them.
|
|
26
|
+
* If the menubar is closed, the arrow keys only move focus between top-level menu buttons.
|
|
27
|
+
*/
|
|
28
|
+
focusCycleMenusOnArrows(menuBarView: MenuBarView): void;
|
|
29
|
+
/**
|
|
30
|
+
* Closes the entire sub-menu structure when the bar is closed. This prevents sub-menus from being open if the user
|
|
31
|
+
* closes the entire bar, and then re-opens some top-level menu.
|
|
32
|
+
*/
|
|
33
|
+
closeMenusWhenTheBarCloses(menuBarView: MenuBarView): void;
|
|
34
|
+
/**
|
|
35
|
+
* Handles the following case:
|
|
36
|
+
* 1. Hover to open a sub-menu (A). The button has focus.
|
|
37
|
+
* 2. Press arrow up/down to move focus to another sub-menu (B) button.
|
|
38
|
+
* 3. Press arrow right to open the sub-menu (B).
|
|
39
|
+
* 4. The sub-menu (A) should close as it would with `toggleMenusAndFocusItemsOnHover()`.
|
|
40
|
+
*/
|
|
41
|
+
closeMenuWhenAnotherOnTheSameLevelOpens(menuBarView: MenuBarView): void;
|
|
42
|
+
/**
|
|
43
|
+
* Closes the bar when the user clicked outside of it (page body, editor root, etc.).
|
|
44
|
+
*/
|
|
45
|
+
closeOnClickOutside(menuBarView: MenuBarView): void;
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* Behaviors of the {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} component.
|
|
49
|
+
*/
|
|
50
|
+
export declare const MenuBarMenuBehaviors: {
|
|
51
|
+
/**
|
|
52
|
+
* If the button of the menu is focused, pressing the arrow down key should open the panel and focus it.
|
|
53
|
+
* This is analogous to the {@link module:ui/dropdown/dropdownview~DropdownView}.
|
|
54
|
+
*/
|
|
55
|
+
openAndFocusPanelOnArrowDownKey(menuView: MenuBarMenuView): void;
|
|
56
|
+
/**
|
|
57
|
+
* Open the menu on the right arrow key press. This allows for navigating to sub-menus using the keyboard.
|
|
58
|
+
*/
|
|
59
|
+
openOnArrowRightKey(menuView: MenuBarMenuView): void;
|
|
60
|
+
/**
|
|
61
|
+
* Opens the menu on its button click. Note that this behavior only opens but never closes the menu (unlike
|
|
62
|
+
* {@link module:ui/dropdown/dropdownview~DropdownView}).
|
|
63
|
+
*/
|
|
64
|
+
openOnButtonClick(menuView: MenuBarMenuView): void;
|
|
65
|
+
/**
|
|
66
|
+
* Toggles the menu on its button click. This behavior is analogous to {@link module:ui/dropdown/dropdownview~DropdownView}.
|
|
67
|
+
*/
|
|
68
|
+
toggleOnButtonClick(menuView: MenuBarMenuView): void;
|
|
69
|
+
/**
|
|
70
|
+
* Closes the menu on the right left key press. This allows for navigating to sub-menus using the keyboard.
|
|
71
|
+
*/
|
|
72
|
+
closeOnArrowLeftKey(menuView: MenuBarMenuView): void;
|
|
73
|
+
/**
|
|
74
|
+
* Closes the menu on the esc key press. This allows for navigating to sub-menus using the keyboard.
|
|
75
|
+
*/
|
|
76
|
+
closeOnEscKey(menuView: MenuBarMenuView): void;
|
|
77
|
+
/**
|
|
78
|
+
* Closes the menu when its parent menu also closed. This prevents from orphaned open menus when the parent menu re-opens.
|
|
79
|
+
*/
|
|
80
|
+
closeOnParentClose(menuView: MenuBarMenuView): void;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Contains every positioning function used by {@link module:ui/menubar/menubarmenuview~MenuBarMenuView} that decides where the
|
|
84
|
+
* {@link module:ui/menubar/menubarmenuview~MenuBarMenuView#panelView} should be placed.
|
|
85
|
+
*
|
|
86
|
+
* Top-level menu positioning functions:
|
|
87
|
+
*
|
|
88
|
+
* ┌──────┐
|
|
89
|
+
* │ │
|
|
90
|
+
* ├──────┴────────┐
|
|
91
|
+
* │ │
|
|
92
|
+
* │ │
|
|
93
|
+
* │ │
|
|
94
|
+
* │ SE │
|
|
95
|
+
* └───────────────┘
|
|
96
|
+
*
|
|
97
|
+
* ┌──────┐
|
|
98
|
+
* │ │
|
|
99
|
+
* ┌────────┴──────┤
|
|
100
|
+
* │ │
|
|
101
|
+
* │ │
|
|
102
|
+
* │ │
|
|
103
|
+
* │ SW │
|
|
104
|
+
* └───────────────┘
|
|
105
|
+
*
|
|
106
|
+
* ┌───────────────┐
|
|
107
|
+
* │ NW │
|
|
108
|
+
* │ │
|
|
109
|
+
* │ │
|
|
110
|
+
* │ │
|
|
111
|
+
* └────────┬──────┤
|
|
112
|
+
* │ │
|
|
113
|
+
* └──────┘
|
|
114
|
+
*
|
|
115
|
+
* ┌───────────────┐
|
|
116
|
+
* │ NE │
|
|
117
|
+
* │ │
|
|
118
|
+
* │ │
|
|
119
|
+
* │ │
|
|
120
|
+
* ├──────┬────────┘
|
|
121
|
+
* │ │
|
|
122
|
+
* └──────┘
|
|
123
|
+
*
|
|
124
|
+
* Sub-menu positioning functions:
|
|
125
|
+
*
|
|
126
|
+
* ┌──────┬───────────────┐
|
|
127
|
+
* │ │ │
|
|
128
|
+
* └──────┤ │
|
|
129
|
+
* │ │
|
|
130
|
+
* │ ES │
|
|
131
|
+
* └───────────────┘
|
|
132
|
+
*
|
|
133
|
+
* ┌───────────────┬──────┐
|
|
134
|
+
* │ │ │
|
|
135
|
+
* │ ├──────┘
|
|
136
|
+
* │ │
|
|
137
|
+
* │ WS │
|
|
138
|
+
* └───────────────┘
|
|
139
|
+
*
|
|
140
|
+
* ┌───────────────┐
|
|
141
|
+
* │ EN │
|
|
142
|
+
* │ │
|
|
143
|
+
* ┌──────┤ │
|
|
144
|
+
* │ │ │
|
|
145
|
+
* └──────┴───────────────┘
|
|
146
|
+
*
|
|
147
|
+
* ┌───────────────┐
|
|
148
|
+
* │ WN │
|
|
149
|
+
* │ │
|
|
150
|
+
* │ ├──────┐
|
|
151
|
+
* │ │ │
|
|
152
|
+
* └───────────────┴──────┘
|
|
153
|
+
*/
|
|
154
|
+
export declare const MenuBarMenuViewPanelPositioningFunctions: Record<string, PositioningFunction>;
|
|
155
|
+
/**
|
|
156
|
+
* The default items {@link module:core/editor/editorconfig~EditorConfig#menuBar configuration} of the
|
|
157
|
+
* {@link module:ui/menubar/menubarview~MenuBarView} component. It contains names of all menu bar components
|
|
158
|
+
* registered in the {@link module:ui/componentfactory~ComponentFactory component factory} (available in the project).
|
|
159
|
+
*
|
|
160
|
+
* **Note**: Menu bar component names provided by core editor features are prefixed with `menuBar:` in order to distinguish
|
|
161
|
+
* them from components referenced by the {@link module:core/editor/editorconfig~EditorConfig#toolbar toolbar configuration}, for instance,
|
|
162
|
+
* `'menuBar:bold'` is a menu bar button but `'bold'` is a toolbar button.
|
|
163
|
+
*
|
|
164
|
+
* Below is the preset menu bar structure (the default value of `config.menuBar.items` property):
|
|
165
|
+
*
|
|
166
|
+
* ```ts
|
|
167
|
+
* [
|
|
168
|
+
* {
|
|
169
|
+
* menuId: 'file',
|
|
170
|
+
* label: 'File',
|
|
171
|
+
* groups: [
|
|
172
|
+
* {
|
|
173
|
+
* groupId: 'export',
|
|
174
|
+
* items: [
|
|
175
|
+
* 'menuBar:exportPdf',
|
|
176
|
+
* 'menuBar:exportWord'
|
|
177
|
+
* ]
|
|
178
|
+
* },
|
|
179
|
+
* {
|
|
180
|
+
* groupId: 'import',
|
|
181
|
+
* items: [
|
|
182
|
+
* 'menuBar:importWord'
|
|
183
|
+
* ]
|
|
184
|
+
* },
|
|
185
|
+
* {
|
|
186
|
+
* groupId: 'revisionHistory',
|
|
187
|
+
* items: [
|
|
188
|
+
* 'menuBar:revisionHistory'
|
|
189
|
+
* ]
|
|
190
|
+
* }
|
|
191
|
+
* ]
|
|
192
|
+
* },
|
|
193
|
+
* {
|
|
194
|
+
* menuId: 'edit',
|
|
195
|
+
* label: 'Edit',
|
|
196
|
+
* groups: [
|
|
197
|
+
* {
|
|
198
|
+
* groupId: 'undo',
|
|
199
|
+
* items: [
|
|
200
|
+
* 'menuBar:undo',
|
|
201
|
+
* 'menuBar:redo'
|
|
202
|
+
* ]
|
|
203
|
+
* },
|
|
204
|
+
* {
|
|
205
|
+
* groupId: 'selectAll',
|
|
206
|
+
* items: [
|
|
207
|
+
* 'menuBar:selectAll'
|
|
208
|
+
* ]
|
|
209
|
+
* },
|
|
210
|
+
* {
|
|
211
|
+
* groupId: 'findAndReplace',
|
|
212
|
+
* items: [
|
|
213
|
+
* 'menuBar:findAndReplace'
|
|
214
|
+
* ]
|
|
215
|
+
* }
|
|
216
|
+
* ]
|
|
217
|
+
* },
|
|
218
|
+
* {
|
|
219
|
+
* menuId: 'view',
|
|
220
|
+
* label: 'View',
|
|
221
|
+
* groups: [
|
|
222
|
+
* {
|
|
223
|
+
* groupId: 'sourceEditing',
|
|
224
|
+
* items: [
|
|
225
|
+
* 'menuBar:sourceEditing'
|
|
226
|
+
* ]
|
|
227
|
+
* },
|
|
228
|
+
* {
|
|
229
|
+
* groupId: 'showBlocks',
|
|
230
|
+
* items: [
|
|
231
|
+
* 'menuBar:showBlocks'
|
|
232
|
+
* ]
|
|
233
|
+
* },
|
|
234
|
+
* {
|
|
235
|
+
* groupId: 'restrictedEditingException',
|
|
236
|
+
* items: [
|
|
237
|
+
* 'menuBar:restrictedEditingException'
|
|
238
|
+
* ]
|
|
239
|
+
* }
|
|
240
|
+
* ]
|
|
241
|
+
* },
|
|
242
|
+
* {
|
|
243
|
+
* menuId: 'insert',
|
|
244
|
+
* label: 'Insert',
|
|
245
|
+
* groups: [
|
|
246
|
+
* {
|
|
247
|
+
* groupId: 'insertMainWidgets',
|
|
248
|
+
* items: [
|
|
249
|
+
* 'menuBar:uploadImage',
|
|
250
|
+
* 'menuBar:ckbox',
|
|
251
|
+
* 'menuBar:ckfinder',
|
|
252
|
+
* 'menuBar:insertTable'
|
|
253
|
+
* ]
|
|
254
|
+
* },
|
|
255
|
+
* {
|
|
256
|
+
* groupId: 'insertInline',
|
|
257
|
+
* items: [
|
|
258
|
+
* 'menuBar:link',
|
|
259
|
+
* 'menuBar:comment'
|
|
260
|
+
* ]
|
|
261
|
+
* },
|
|
262
|
+
* {
|
|
263
|
+
* groupId: 'insertMinorWidgets',
|
|
264
|
+
* items: [
|
|
265
|
+
* 'menuBar:insertTemplate',
|
|
266
|
+
* 'menuBar:blockQuote',
|
|
267
|
+
* 'menuBar:codeBlock',
|
|
268
|
+
* 'menuBar:htmlEmbed'
|
|
269
|
+
* ]
|
|
270
|
+
* },
|
|
271
|
+
* {
|
|
272
|
+
* groupId: 'insertStructureWidgets',
|
|
273
|
+
* items: [
|
|
274
|
+
* 'menuBar:horizontalLine',
|
|
275
|
+
* 'menuBar:pageBreak',
|
|
276
|
+
* 'menuBar:tableOfContents'
|
|
277
|
+
* ]
|
|
278
|
+
* },
|
|
279
|
+
* {
|
|
280
|
+
* groupId: 'restrictedEditing',
|
|
281
|
+
* items: [
|
|
282
|
+
* 'menuBar:restrictedEditing'
|
|
283
|
+
* ]
|
|
284
|
+
* }
|
|
285
|
+
* ]
|
|
286
|
+
* },
|
|
287
|
+
* {
|
|
288
|
+
* menuId: 'format',
|
|
289
|
+
* label: 'Format',
|
|
290
|
+
* groups: [
|
|
291
|
+
* {
|
|
292
|
+
* groupId: 'textAndFont',
|
|
293
|
+
* items: [
|
|
294
|
+
* {
|
|
295
|
+
* menuId: 'text',
|
|
296
|
+
* label: 'Text',
|
|
297
|
+
* groups: [
|
|
298
|
+
* {
|
|
299
|
+
* groupId: 'basicStyles',
|
|
300
|
+
* items: [
|
|
301
|
+
* 'menuBar:bold',
|
|
302
|
+
* 'menuBar:italic',
|
|
303
|
+
* 'menuBar:underline',
|
|
304
|
+
* 'menuBar:strikethrough',
|
|
305
|
+
* 'menuBar:superscript',
|
|
306
|
+
* 'menuBar:subscript',
|
|
307
|
+
* 'menuBar:code'
|
|
308
|
+
* ]
|
|
309
|
+
* },
|
|
310
|
+
* {
|
|
311
|
+
* groupId: 'textPartLanguage',
|
|
312
|
+
* items: [
|
|
313
|
+
* 'menuBar:textPartLanguage'
|
|
314
|
+
* ]
|
|
315
|
+
* }
|
|
316
|
+
* ]
|
|
317
|
+
* },
|
|
318
|
+
* {
|
|
319
|
+
* menuId: 'font',
|
|
320
|
+
* label: 'Font',
|
|
321
|
+
* groups: [
|
|
322
|
+
* {
|
|
323
|
+
* groupId: 'fontProperties',
|
|
324
|
+
* items: [
|
|
325
|
+
* 'menuBar:fontSize',
|
|
326
|
+
* 'menuBar:fontFamily'
|
|
327
|
+
* ]
|
|
328
|
+
* },
|
|
329
|
+
* {
|
|
330
|
+
* groupId: 'fontColors',
|
|
331
|
+
* items: [
|
|
332
|
+
* 'menuBar:fontColor',
|
|
333
|
+
* 'menuBar:fontBackgroundColor'
|
|
334
|
+
* ]
|
|
335
|
+
* },
|
|
336
|
+
* {
|
|
337
|
+
* groupId: 'highlight',
|
|
338
|
+
* items: [
|
|
339
|
+
* 'menuBar:highlight'
|
|
340
|
+
* ]
|
|
341
|
+
* }
|
|
342
|
+
* ]
|
|
343
|
+
* },
|
|
344
|
+
* 'menuBar:heading'
|
|
345
|
+
* ]
|
|
346
|
+
* },
|
|
347
|
+
* {
|
|
348
|
+
* groupId: 'list',
|
|
349
|
+
* items: [
|
|
350
|
+
* 'menuBar:bulletedList',
|
|
351
|
+
* 'menuBar:numberedList',
|
|
352
|
+
* 'menuBar:todoList'
|
|
353
|
+
* ]
|
|
354
|
+
* },
|
|
355
|
+
* {
|
|
356
|
+
* groupId: 'indent',
|
|
357
|
+
* items: [
|
|
358
|
+
* 'menuBar:alignment',
|
|
359
|
+
* 'menuBar:indent',
|
|
360
|
+
* 'menuBar:outdent'
|
|
361
|
+
* ]
|
|
362
|
+
* },
|
|
363
|
+
* {
|
|
364
|
+
* groupId: 'caseChange',
|
|
365
|
+
* items: [
|
|
366
|
+
* 'menuBar:caseChange'
|
|
367
|
+
* ]
|
|
368
|
+
* },
|
|
369
|
+
* {
|
|
370
|
+
* groupId: 'removeFormat',
|
|
371
|
+
* items: [
|
|
372
|
+
* 'menuBar:removeFormat'
|
|
373
|
+
* ]
|
|
374
|
+
* }
|
|
375
|
+
* ]
|
|
376
|
+
* },
|
|
377
|
+
* {
|
|
378
|
+
* menuId: 'tools',
|
|
379
|
+
* label: 'Tools',
|
|
380
|
+
* groups: [
|
|
381
|
+
* {
|
|
382
|
+
* groupId: 'aiTools',
|
|
383
|
+
* items: [
|
|
384
|
+
* 'menuBar:aiAssistant',
|
|
385
|
+
* 'menuBar:aiCommands'
|
|
386
|
+
* ]
|
|
387
|
+
* },
|
|
388
|
+
* {
|
|
389
|
+
* groupId: 'tools',
|
|
390
|
+
* items: [
|
|
391
|
+
* 'menuBar:trackChanges',
|
|
392
|
+
* 'menuBar:commentsArchive'
|
|
393
|
+
* ]
|
|
394
|
+
* }
|
|
395
|
+
* ]
|
|
396
|
+
* },
|
|
397
|
+
* {
|
|
398
|
+
* menuId: 'help',
|
|
399
|
+
* label: 'Help',
|
|
400
|
+
* groups: [
|
|
401
|
+
* {
|
|
402
|
+
* groupId: 'help',
|
|
403
|
+
* items: [
|
|
404
|
+
* 'menuBar:accessibilityHelp'
|
|
405
|
+
* ]
|
|
406
|
+
* }
|
|
407
|
+
* ]
|
|
408
|
+
* }
|
|
409
|
+
* ];
|
|
410
|
+
* ```
|
|
411
|
+
*
|
|
412
|
+
* The menu bar can be customized using the `config.menuBar.removeItems` and `config.menuBar.addItems` properties.
|
|
413
|
+
*/
|
|
414
|
+
export declare const DefaultMenuBarItems: DeepReadonly<MenuBarConfigObject['items']>;
|
|
415
|
+
/**
|
|
416
|
+
* Performs a cleanup and normalization of the menu bar configuration.
|
|
417
|
+
*/
|
|
418
|
+
export declare function normalizeMenuBarConfig(config: Readonly<MenuBarConfig>): NormalizedMenuBarConfigObject;
|
|
419
|
+
/**
|
|
420
|
+
* Processes a normalized menu bar config and returns a config clone with the following modifications:
|
|
421
|
+
*
|
|
422
|
+
* * Removed components that are not available in the component factory,
|
|
423
|
+
* * Removed obsolete separators,
|
|
424
|
+
* * Purged empty menus,
|
|
425
|
+
* * Localized top-level menu labels.
|
|
426
|
+
*/
|
|
427
|
+
export declare function processMenuBarConfig({ normalizedConfig, locale, componentFactory }: {
|
|
428
|
+
normalizedConfig: NormalizedMenuBarConfigObject;
|
|
429
|
+
locale: Locale;
|
|
430
|
+
componentFactory: ComponentFactory;
|
|
431
|
+
}): NormalizedMenuBarConfigObject;
|
|
432
|
+
export {};
|