@ckeditor/ckeditor5-ui 45.2.1 → 46.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/dist/index-editor.css +19 -19
- package/dist/index.css +34 -34
- package/dist/index.css.map +1 -1
- package/dist/index.js +4994 -4957
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
- package/src/arialiveannouncer.d.ts +6 -7
- package/src/arialiveannouncer.js +2 -2
- package/src/autocomplete/autocompleteview.d.ts +4 -4
- package/src/autocomplete/autocompleteview.js +2 -2
- package/src/badge/badge.d.ts +2 -2
- package/src/badge/badge.js +2 -2
- package/src/bindings/addkeyboardhandlingforgrid.d.ts +2 -2
- package/src/bindings/addkeyboardhandlingforgrid.js +1 -1
- package/src/bindings/clickoutsidehandler.d.ts +1 -1
- package/src/bindings/clickoutsidehandler.js +1 -1
- package/src/bindings/csstransitiondisablermixin.d.ts +5 -4
- package/src/bindings/csstransitiondisablermixin.js +11 -8
- package/src/bindings/draggableviewmixin.d.ts +3 -3
- package/src/bindings/draggableviewmixin.js +2 -2
- package/src/bindings/preventdefault.d.ts +4 -3
- package/src/bindings/preventdefault.js +3 -2
- package/src/bindings/submithandler.d.ts +3 -3
- package/src/bindings/submithandler.js +2 -2
- package/src/button/button.d.ts +1 -1
- package/src/button/buttonlabel.d.ts +2 -2
- package/src/button/buttonlabelview.d.ts +3 -3
- package/src/button/buttonlabelview.js +2 -2
- package/src/button/buttonview.d.ts +6 -6
- package/src/button/buttonview.js +4 -4
- package/src/button/filedialogbuttonview.d.ts +17 -12
- package/src/button/filedialogbuttonview.js +5 -13
- package/src/button/listitembuttonview.d.ts +8 -5
- package/src/button/listitembuttonview.js +8 -5
- package/src/button/switchbuttonview.d.ts +3 -3
- package/src/button/switchbuttonview.js +3 -3
- package/src/collapsible/collapsibleview.d.ts +4 -4
- package/src/collapsible/collapsibleview.js +3 -3
- package/src/colorgrid/colorgridview.d.ts +5 -5
- package/src/colorgrid/colorgridview.js +4 -4
- package/src/colorgrid/colortileview.d.ts +2 -2
- package/src/colorgrid/colortileview.js +2 -2
- package/src/colorpicker/colorpickerview.d.ts +8 -8
- package/src/colorpicker/colorpickerview.js +6 -5
- package/src/colorpicker/utils.d.ts +3 -0
- package/src/colorpicker/utils.js +4 -4
- package/src/colorselector/colorgridsfragmentview.d.ts +6 -6
- package/src/colorselector/colorgridsfragmentview.js +7 -7
- package/src/colorselector/colorpickerfragmentview.d.ts +5 -5
- package/src/colorselector/colorpickerfragmentview.js +4 -4
- package/src/colorselector/colorselectorview.d.ts +6 -6
- package/src/colorselector/colorselectorview.js +6 -6
- package/src/colorselector/documentcolorcollection.d.ts +1 -1
- package/src/colorselector/documentcolorcollection.js +1 -1
- package/src/componentfactory.d.ts +2 -2
- package/src/componentfactory.js +1 -1
- package/src/dialog/dialog.d.ts +3 -3
- package/src/dialog/dialog.js +2 -2
- package/src/dialog/dialogactionsview.d.ts +6 -6
- package/src/dialog/dialogactionsview.js +5 -5
- package/src/dialog/dialogcontentview.d.ts +3 -3
- package/src/dialog/dialogcontentview.js +2 -2
- package/src/dialog/dialogview.d.ts +8 -8
- package/src/dialog/dialogview.js +9 -9
- package/src/dropdown/button/dropdownbutton.d.ts +3 -3
- package/src/dropdown/button/dropdownbuttonview.d.ts +4 -4
- package/src/dropdown/button/dropdownbuttonview.js +3 -3
- package/src/dropdown/button/splitbuttonview.d.ts +6 -6
- package/src/dropdown/button/splitbuttonview.js +3 -3
- package/src/dropdown/dropdownpanelfocusable.d.ts +1 -1
- package/src/dropdown/dropdownpanelview.d.ts +4 -4
- package/src/dropdown/dropdownpanelview.js +2 -2
- package/src/dropdown/dropdownview.d.ts +7 -7
- package/src/dropdown/dropdownview.js +2 -2
- package/src/dropdown/menu/dropdownmenubehaviors.d.ts +8 -2
- package/src/dropdown/menu/dropdownmenubehaviors.js +7 -1
- package/src/dropdown/menu/dropdownmenubuttonview.d.ts +3 -3
- package/src/dropdown/menu/dropdownmenubuttonview.js +3 -3
- package/src/dropdown/menu/dropdownmenulistitembuttonview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenulistitembuttonview.js +2 -2
- package/src/dropdown/menu/dropdownmenulistitemview.d.ts +4 -4
- package/src/dropdown/menu/dropdownmenulistitemview.js +3 -3
- package/src/dropdown/menu/dropdownmenulistview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenulistview.js +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.d.ts +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenupanelview.js +2 -2
- package/src/dropdown/menu/dropdownmenunestedmenuview.d.ts +6 -6
- package/src/dropdown/menu/dropdownmenunestedmenuview.js +5 -5
- package/src/dropdown/menu/dropdownmenurootlistview.d.ts +5 -5
- package/src/dropdown/menu/dropdownmenurootlistview.js +5 -5
- package/src/dropdown/utils.d.ts +7 -7
- package/src/dropdown/utils.js +14 -14
- package/src/editableui/editableuiview.d.ts +2 -2
- package/src/editableui/editableuiview.js +2 -2
- package/src/editableui/inline/inlineeditableuiview.d.ts +3 -4
- package/src/editableui/inline/inlineeditableuiview.js +2 -2
- package/src/editorui/accessibilityhelp/accessibilityhelp.d.ts +3 -3
- package/src/editorui/accessibilityhelp/accessibilityhelp.js +5 -5
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.d.ts +2 -2
- package/src/editorui/accessibilityhelp/accessibilityhelpcontentview.js +3 -3
- package/src/editorui/bodycollection.d.ts +3 -3
- package/src/editorui/bodycollection.js +3 -3
- package/src/editorui/boxed/boxededitoruiview.d.ts +3 -3
- package/src/editorui/boxed/boxededitoruiview.js +3 -3
- package/src/editorui/editorui.d.ts +10 -16
- package/src/editorui/editorui.js +6 -25
- package/src/editorui/editoruiview.d.ts +6 -6
- package/src/editorui/editoruiview.js +3 -3
- package/src/editorui/evaluationbadge.d.ts +3 -3
- package/src/editorui/evaluationbadge.js +3 -3
- package/src/editorui/poweredby.d.ts +4 -6
- package/src/editorui/poweredby.js +4 -4
- package/src/focuscycler.d.ts +3 -3
- package/src/focuscycler.js +1 -1
- package/src/formheader/formheaderview.d.ts +4 -4
- package/src/formheader/formheaderview.js +3 -3
- package/src/formrow/formrowview.d.ts +4 -4
- package/src/formrow/formrowview.js +2 -2
- package/src/highlightedtext/buttonlabelwithhighlightview.d.ts +3 -3
- package/src/highlightedtext/buttonlabelwithhighlightview.js +2 -2
- package/src/highlightedtext/highlightedtextview.d.ts +2 -2
- package/src/highlightedtext/highlightedtextview.js +2 -2
- package/src/highlightedtext/labelwithhighlightview.d.ts +3 -3
- package/src/highlightedtext/labelwithhighlightview.js +2 -2
- package/src/icon/iconview.d.ts +2 -2
- package/src/icon/iconview.js +2 -2
- package/src/iframe/iframeview.d.ts +2 -2
- package/src/iframe/iframeview.js +2 -2
- package/src/index.d.ts +128 -85
- package/src/index.js +122 -82
- package/src/input/inputbase.d.ts +2 -2
- package/src/input/inputbase.js +2 -2
- package/src/input/inputview.d.ts +2 -2
- package/src/input/inputview.js +2 -2
- package/src/inputnumber/inputnumberview.d.ts +2 -2
- package/src/inputnumber/inputnumberview.js +2 -2
- package/src/inputtext/inputtextview.d.ts +2 -2
- package/src/inputtext/inputtextview.js +2 -2
- package/src/label/labelview.d.ts +2 -2
- package/src/label/labelview.js +2 -2
- package/src/labeledfield/labeledfieldview.d.ts +4 -4
- package/src/labeledfield/labeledfieldview.js +3 -3
- package/src/labeledfield/utils.d.ts +4 -4
- package/src/labeledfield/utils.js +3 -3
- package/src/labeledinput/labeledinputview.d.ts +4 -4
- package/src/labeledinput/labeledinputview.js +3 -3
- package/src/legacyerrors.d.ts +5 -0
- package/src/legacyerrors.js +20 -0
- package/src/list/listitemgroupview.d.ts +5 -5
- package/src/list/listitemgroupview.js +5 -5
- package/src/list/listitemview.d.ts +3 -3
- package/src/list/listitemview.js +2 -2
- package/src/list/listseparatorview.d.ts +2 -2
- package/src/list/listseparatorview.js +2 -2
- package/src/list/listview.d.ts +7 -7
- package/src/list/listview.js +6 -6
- package/src/menubar/menubarmenubuttonview.d.ts +3 -3
- package/src/menubar/menubarmenubuttonview.js +3 -3
- package/src/menubar/menubarmenulistitembuttonview.d.ts +2 -2
- package/src/menubar/menubarmenulistitembuttonview.js +2 -2
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.d.ts +1 -1
- package/src/menubar/menubarmenulistitemfiledialogbuttonview.js +1 -1
- package/src/menubar/menubarmenulistitemview.d.ts +3 -3
- package/src/menubar/menubarmenulistitemview.js +2 -2
- package/src/menubar/menubarmenulistview.d.ts +2 -2
- package/src/menubar/menubarmenulistview.js +5 -5
- package/src/menubar/menubarmenupanelview.d.ts +3 -3
- package/src/menubar/menubarmenupanelview.js +2 -2
- package/src/menubar/menubarmenuview.d.ts +4 -4
- package/src/menubar/menubarmenuview.js +4 -4
- package/src/menubar/menubarview.d.ts +6 -7
- package/src/menubar/menubarview.js +9 -9
- package/src/menubar/utils.d.ts +10 -3
- package/src/menubar/utils.js +10 -2
- package/src/model.d.ts +2 -2
- package/src/model.js +1 -1
- package/src/notification/notification.d.ts +1 -1
- package/src/notification/notification.js +1 -1
- package/src/panel/balloon/balloonpanelview.d.ts +13 -13
- package/src/panel/balloon/balloonpanelview.js +9 -9
- package/src/panel/balloon/contextualballoon.d.ts +14 -13
- package/src/panel/balloon/contextualballoon.js +8 -7
- package/src/panel/sticky/stickypanelview.d.ts +3 -3
- package/src/panel/sticky/stickypanelview.js +3 -3
- package/src/search/filteredview.d.ts +1 -1
- package/src/search/filtergroupanditemnames.d.ts +5 -5
- package/src/search/filtergroupanditemnames.js +1 -1
- package/src/search/searchinfoview.d.ts +2 -2
- package/src/search/searchinfoview.js +2 -2
- package/src/search/searchresultsview.d.ts +4 -4
- package/src/search/searchresultsview.js +3 -3
- package/src/search/text/searchtextqueryview.d.ts +5 -5
- package/src/search/text/searchtextqueryview.js +4 -4
- package/src/search/text/searchtextview.d.ts +9 -9
- package/src/search/text/searchtextview.js +6 -6
- package/src/spinner/spinnerview.d.ts +2 -2
- package/src/spinner/spinnerview.js +2 -2
- package/src/template.d.ts +6 -5
- package/src/template.js +4 -4
- package/src/textarea/textareaview.d.ts +2 -2
- package/src/textarea/textareaview.js +2 -2
- package/src/toolbar/balloon/balloontoolbar.d.ts +3 -3
- package/src/toolbar/balloon/balloontoolbar.js +5 -5
- package/src/toolbar/block/blockbuttonview.d.ts +2 -2
- package/src/toolbar/block/blockbuttonview.js +2 -2
- package/src/toolbar/block/blocktoolbar.d.ts +6 -6
- package/src/toolbar/block/blocktoolbar.js +8 -8
- package/src/toolbar/normalizetoolbarconfig.d.ts +1 -1
- package/src/toolbar/normalizetoolbarconfig.js +1 -1
- package/src/toolbar/toolbarlinebreakview.d.ts +2 -2
- package/src/toolbar/toolbarlinebreakview.js +2 -2
- package/src/toolbar/toolbarseparatorview.d.ts +2 -2
- package/src/toolbar/toolbarseparatorview.js +2 -2
- package/src/toolbar/toolbarview.d.ts +10 -7
- package/src/toolbar/toolbarview.js +11 -8
- package/src/tooltipmanager.d.ts +3 -3
- package/src/tooltipmanager.js +3 -3
- package/src/view.d.ts +3 -3
- package/src/view.js +3 -3
- package/src/viewcollection.d.ts +2 -2
- package/src/viewcollection.js +1 -1
- package/src/bindings/injectcsstransitiondisabler.d.ts +0 -59
- package/src/bindings/injectcsstransitiondisabler.js +0 -71
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ckeditor/ckeditor5-ui",
|
3
|
-
"version": "
|
3
|
+
"version": "46.0.0-alpha.1",
|
4
4
|
"description": "The UI framework and standard UI library of CKEditor 5.",
|
5
5
|
"keywords": [
|
6
6
|
"ckeditor",
|
@@ -17,15 +17,15 @@
|
|
17
17
|
"type": "module",
|
18
18
|
"main": "src/index.js",
|
19
19
|
"dependencies": {
|
20
|
-
"@ckeditor/ckeditor5-core": "
|
21
|
-
"@ckeditor/ckeditor5-editor-multi-root": "
|
22
|
-
"@ckeditor/ckeditor5-engine": "
|
23
|
-
"@ckeditor/ckeditor5-icons": "
|
24
|
-
"@ckeditor/ckeditor5-utils": "
|
20
|
+
"@ckeditor/ckeditor5-core": "46.0.0-alpha.1",
|
21
|
+
"@ckeditor/ckeditor5-editor-multi-root": "46.0.0-alpha.1",
|
22
|
+
"@ckeditor/ckeditor5-engine": "46.0.0-alpha.1",
|
23
|
+
"@ckeditor/ckeditor5-icons": "46.0.0-alpha.1",
|
24
|
+
"@ckeditor/ckeditor5-utils": "46.0.0-alpha.1",
|
25
25
|
"@types/color-convert": "2.0.4",
|
26
|
-
"color-convert": "
|
27
|
-
"color-parse": "
|
28
|
-
"es-toolkit": "1.
|
26
|
+
"color-convert": "3.1.0",
|
27
|
+
"color-parse": "2.0.2",
|
28
|
+
"es-toolkit": "1.39.5",
|
29
29
|
"vanilla-colorful": "0.7.2"
|
30
30
|
},
|
31
31
|
"author": "CKSource (http://cksource.com/)",
|
@@ -4,8 +4,8 @@
|
|
4
4
|
*/
|
5
5
|
import type { Editor } from '@ckeditor/ckeditor5-core';
|
6
6
|
import type { Locale } from '@ckeditor/ckeditor5-utils';
|
7
|
-
import type ViewCollection from './viewcollection.js';
|
8
|
-
import View from './view.js';
|
7
|
+
import { type ViewCollection } from './viewcollection.js';
|
8
|
+
import { View } from './view.js';
|
9
9
|
import '../theme/components/arialiveannouncer/arialiveannouncer.css';
|
10
10
|
/**
|
11
11
|
* The politeness level of an `aria-live` announcement.
|
@@ -33,7 +33,7 @@ export declare const AriaLiveAnnouncerPoliteness: {
|
|
33
33
|
* editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );
|
34
34
|
* ```
|
35
35
|
*/
|
36
|
-
export
|
36
|
+
export declare class AriaLiveAnnouncer {
|
37
37
|
/**
|
38
38
|
* The editor instance.
|
39
39
|
*/
|
@@ -97,13 +97,12 @@ export declare class AriaLiveAnnouncerRegionView extends View {
|
|
97
97
|
*/
|
98
98
|
private get _listElement();
|
99
99
|
}
|
100
|
-
type AriaLiveAnnouncerPolitenessValue = typeof AriaLiveAnnouncerPoliteness[keyof typeof AriaLiveAnnouncerPoliteness];
|
101
|
-
type AriaLiveAppendContentAttributes = {
|
100
|
+
export type AriaLiveAnnouncerPolitenessValue = typeof AriaLiveAnnouncerPoliteness[keyof typeof AriaLiveAnnouncerPoliteness];
|
101
|
+
export type AriaLiveAppendContentAttributes = {
|
102
102
|
announcement: string;
|
103
103
|
isUnsafeHTML?: boolean;
|
104
104
|
};
|
105
|
-
type AriaLiveAnnounceConfig = {
|
105
|
+
export type AriaLiveAnnounceConfig = {
|
106
106
|
politeness: AriaLiveAnnouncerPolitenessValue;
|
107
107
|
isUnsafeHTML?: boolean;
|
108
108
|
};
|
109
|
-
export {};
|
package/src/arialiveannouncer.js
CHANGED
@@ -2,7 +2,7 @@
|
|
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
|
-
import View from './view.js';
|
5
|
+
import { View } from './view.js';
|
6
6
|
import '../theme/components/arialiveannouncer/arialiveannouncer.css';
|
7
7
|
/**
|
8
8
|
* The politeness level of an `aria-live` announcement.
|
@@ -30,7 +30,7 @@ export const AriaLiveAnnouncerPoliteness = {
|
|
30
30
|
* editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );
|
31
31
|
* ```
|
32
32
|
*/
|
33
|
-
export
|
33
|
+
export class AriaLiveAnnouncer {
|
34
34
|
/**
|
35
35
|
* The editor instance.
|
36
36
|
*/
|
@@ -6,16 +6,16 @@
|
|
6
6
|
* @module ui/autocomplete/autocompleteview
|
7
7
|
*/
|
8
8
|
import { type PositioningFunction, type Locale } from '@ckeditor/ckeditor5-utils';
|
9
|
-
import SearchTextView,
|
10
|
-
import type SearchResultsView from '../search/searchresultsview.js';
|
11
|
-
import type InputBase from '../input/inputbase.js';
|
9
|
+
import { SearchTextView, type SearchTextViewConfig } from '../search/text/searchtextview.js';
|
10
|
+
import { type SearchResultsView } from '../search/searchresultsview.js';
|
11
|
+
import { type InputBase } from '../input/inputbase.js';
|
12
12
|
import '../../theme/components/autocomplete/autocomplete.css';
|
13
13
|
/**
|
14
14
|
* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class
|
15
15
|
* with a floating {@link #resultsView} that shows up when the user starts typing and hides when they blur
|
16
16
|
* the component.
|
17
17
|
*/
|
18
|
-
export
|
18
|
+
export declare class AutocompleteView<TQueryFieldView extends InputBase<HTMLInputElement | HTMLTextAreaElement>> extends SearchTextView<TQueryFieldView> {
|
19
19
|
/**
|
20
20
|
* The configuration of the autocomplete view.
|
21
21
|
*/
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/autocomplete/autocompleteview
|
7
7
|
*/
|
8
8
|
import { getOptimalPosition, global, toUnit, Rect } from '@ckeditor/ckeditor5-utils';
|
9
|
-
import SearchTextView from '../search/text/searchtextview.js';
|
9
|
+
import { SearchTextView } from '../search/text/searchtextview.js';
|
10
10
|
import '../../theme/components/autocomplete/autocomplete.css';
|
11
11
|
/**
|
12
12
|
* The autocomplete component's view class. It extends the {@link module:ui/search/text/searchtextview~SearchTextView} class
|
@@ -155,4 +155,4 @@ class AutocompleteView extends SearchTextView {
|
|
155
155
|
*/
|
156
156
|
static _getOptimalPosition = getOptimalPosition;
|
157
157
|
}
|
158
|
-
export
|
158
|
+
export { AutocompleteView };
|
package/src/badge/badge.d.ts
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/badge/badge
|
7
7
|
*/
|
8
8
|
import type { Editor } from '@ckeditor/ckeditor5-core';
|
9
|
-
import type View from '../view.js';
|
9
|
+
import { type View } from '../view.js';
|
10
10
|
declare const Badge_base: {
|
11
11
|
new (): import("@ckeditor/ckeditor5-utils").DomEmitter;
|
12
12
|
prototype: import("@ckeditor/ckeditor5-utils").DomEmitter;
|
@@ -17,7 +17,7 @@ declare const Badge_base: {
|
|
17
17
|
*
|
18
18
|
* @private
|
19
19
|
*/
|
20
|
-
export
|
20
|
+
export declare abstract class Badge extends /* #__PURE__ */ Badge_base {
|
21
21
|
/**
|
22
22
|
* Editor instance the helper was created for.
|
23
23
|
*/
|
package/src/badge/badge.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
4
4
|
*/
|
5
5
|
import { Rect, DomEmitterMixin } from '@ckeditor/ckeditor5-utils';
|
6
|
-
import BalloonPanelView from '../panel/balloon/balloonpanelview.js';
|
6
|
+
import { BalloonPanelView } from '../panel/balloon/balloonpanelview.js';
|
7
7
|
import { throttle } from 'es-toolkit/compat';
|
8
8
|
// ⚠ Note, whenever changing the threshold, make sure to update the docs/support/managing-ckeditor-logo.md docs
|
9
9
|
// as this information is also mentioned there ⚠.
|
@@ -15,7 +15,7 @@ const NARROW_ROOT_WIDTH_THRESHOLD = 350;
|
|
15
15
|
*
|
16
16
|
* @private
|
17
17
|
*/
|
18
|
-
export
|
18
|
+
export class Badge extends /* #__PURE__ */ DomEmitterMixin() {
|
19
19
|
/**
|
20
20
|
* Editor instance the helper was created for.
|
21
21
|
*/
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/bindings/addkeyboardhandlingforgrid
|
7
7
|
*/
|
8
8
|
import type { FocusTracker, KeystrokeHandler } from '@ckeditor/ckeditor5-utils';
|
9
|
-
import type ViewCollection from '../viewcollection.js';
|
9
|
+
import { type ViewCollection } from '../viewcollection.js';
|
10
10
|
/**
|
11
11
|
* A helper that adds a keyboard navigation support (arrow up/down/left/right) for grids.
|
12
12
|
*
|
@@ -18,7 +18,7 @@ import type ViewCollection from '../viewcollection.js';
|
|
18
18
|
* the number (e.g. for responsive grids).
|
19
19
|
* @param options.uiLanguageDirection String of ui language direction.
|
20
20
|
*/
|
21
|
-
export
|
21
|
+
export declare function addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }: {
|
22
22
|
keystrokeHandler: KeystrokeHandler;
|
23
23
|
focusTracker: FocusTracker;
|
24
24
|
gridItems: ViewCollection;
|
@@ -13,7 +13,7 @@
|
|
13
13
|
* the number (e.g. for responsive grids).
|
14
14
|
* @param options.uiLanguageDirection String of ui language direction.
|
15
15
|
*/
|
16
|
-
export
|
16
|
+
export function addKeyboardHandlingForGrid({ keystrokeHandler, focusTracker, gridItems, numberOfColumns, uiLanguageDirection }) {
|
17
17
|
const getNumberOfColumns = typeof numberOfColumns === 'number' ? () => numberOfColumns : numberOfColumns;
|
18
18
|
keystrokeHandler.set('arrowright', getGridItemFocuser((focusedElementIndex, gridItems) => {
|
19
19
|
return uiLanguageDirection === 'rtl' ?
|
@@ -21,7 +21,7 @@ import type { CallbackOptions, DomEmitter } from '@ckeditor/ckeditor5-utils';
|
|
21
21
|
* @param options.callback An action executed by the handler.
|
22
22
|
* @param options.listenerOptions Additional options for the listener (like priority).
|
23
23
|
*/
|
24
|
-
export
|
24
|
+
export declare function clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }: {
|
25
25
|
emitter: DomEmitter;
|
26
26
|
activator: () => boolean;
|
27
27
|
contextElements: Array<Element> | (() => Array<Element>);
|
@@ -17,7 +17,7 @@
|
|
17
17
|
* @param options.callback An action executed by the handler.
|
18
18
|
* @param options.listenerOptions Additional options for the listener (like priority).
|
19
19
|
*/
|
20
|
-
export
|
20
|
+
export function clickOutsideHandler({ emitter, activator, callback, contextElements, listenerOptions }) {
|
21
21
|
emitter.listenTo(document, 'mousedown', (evt, domEvt) => {
|
22
22
|
if (!activator()) {
|
23
23
|
return;
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/bindings/csstransitiondisablermixin
|
7
7
|
*/
|
8
8
|
import type { Constructor, Mixed } from '@ckeditor/ckeditor5-utils';
|
9
|
-
import type View from '../view.js';
|
9
|
+
import { type View } from '../view.js';
|
10
10
|
/**
|
11
11
|
* A mixin that brings the possibility to temporarily disable CSS transitions using
|
12
12
|
* {@link module:ui/view~View} methods. It is helpful when, for instance, the transitions should not happen
|
@@ -33,8 +33,9 @@ import type View from '../view.js';
|
|
33
33
|
*
|
34
34
|
* @param view View instance that should get this functionality.
|
35
35
|
*/
|
36
|
-
export
|
37
|
-
export
|
36
|
+
export declare function CssTransitionDisablerMixin<Base extends Constructor<View>>(view: Base): Mixed<Base, ViewWithCssTransitionDisabler>;
|
37
|
+
export declare class ViewWithCssTransitionDisabler extends View {
|
38
38
|
disableCssTransitions(): void;
|
39
39
|
enableCssTransitions(): void;
|
40
|
-
|
40
|
+
protected initializeCssTransitionDisablerMixin(): void;
|
41
|
+
}
|
@@ -28,7 +28,7 @@
|
|
28
28
|
*
|
29
29
|
* @param view View instance that should get this functionality.
|
30
30
|
*/
|
31
|
-
export
|
31
|
+
export function CssTransitionDisablerMixin(view) {
|
32
32
|
class Mixin extends view {
|
33
33
|
disableCssTransitions() {
|
34
34
|
this._isCssTransitionsDisabled = true;
|
@@ -42,14 +42,17 @@ export default function CssTransitionDisablerMixin(view) {
|
|
42
42
|
this.initializeCssTransitionDisablerMixin();
|
43
43
|
}
|
44
44
|
initializeCssTransitionDisablerMixin() {
|
45
|
-
this.
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
45
|
+
if (this.template) {
|
46
|
+
this.extendTemplate({
|
47
|
+
attributes: {
|
48
|
+
class: [
|
49
|
+
this.bindTemplate.if('_isCssTransitionsDisabled', 'ck-transitions-disabled')
|
50
|
+
]
|
51
|
+
}
|
52
|
+
});
|
53
|
+
}
|
52
54
|
}
|
53
55
|
}
|
54
56
|
return Mixin;
|
55
57
|
}
|
58
|
+
;
|
@@ -5,14 +5,14 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/bindings/draggableviewmixin
|
7
7
|
*/
|
8
|
-
import type View from '../view.js';
|
8
|
+
import { type View } from '../view.js';
|
9
9
|
import { type Constructor, type Mixed } from '@ckeditor/ckeditor5-utils';
|
10
10
|
/**
|
11
11
|
* A mixin that brings the possibility to observe dragging of the view element.
|
12
12
|
* The view has to implement the {@link ~DraggableView} interface to use it:
|
13
13
|
*
|
14
14
|
* ```js
|
15
|
-
* export
|
15
|
+
* export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {
|
16
16
|
* // ...
|
17
17
|
* }
|
18
18
|
* ```
|
@@ -25,7 +25,7 @@ import { type Constructor, type Mixed } from '@ckeditor/ckeditor5-utils';
|
|
25
25
|
* The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -
|
26
26
|
* it is up to the developer to implement it.
|
27
27
|
*/
|
28
|
-
export
|
28
|
+
export declare function DraggableViewMixin<Base extends Constructor<View>>(view: Base): Mixed<Base, DraggableView>;
|
29
29
|
/**
|
30
30
|
* An interface that should be implemented by views that want to be draggable.
|
31
31
|
*/
|
@@ -8,7 +8,7 @@ import { global } from '@ckeditor/ckeditor5-utils';
|
|
8
8
|
* The view has to implement the {@link ~DraggableView} interface to use it:
|
9
9
|
*
|
10
10
|
* ```js
|
11
|
-
* export
|
11
|
+
* export class MyDraggableView extends DraggableViewMixin( View ) implements DraggableView {
|
12
12
|
* // ...
|
13
13
|
* }
|
14
14
|
* ```
|
@@ -21,7 +21,7 @@ import { global } from '@ckeditor/ckeditor5-utils';
|
|
21
21
|
* The mixin itself does not provide a visual feedback (that is, the dragged element does not change its position) -
|
22
22
|
* it is up to the developer to implement it.
|
23
23
|
*/
|
24
|
-
export
|
24
|
+
export function DraggableViewMixin(view) {
|
25
25
|
class DraggableMixin extends view {
|
26
26
|
/**
|
27
27
|
* A bound version of {@link #_onDrag}.
|
@@ -6,7 +6,7 @@
|
|
6
6
|
* @module ui/bindings/preventdefault
|
7
7
|
*/
|
8
8
|
import type { ListenerBinding } from '../template.js';
|
9
|
-
import type View from '../view.js';
|
9
|
+
import { type View } from '../view.js';
|
10
10
|
/**
|
11
11
|
* A helper which executes a native `Event.preventDefault()` if the target of an event equals the
|
12
12
|
* {@link module:ui/view~View#element element of the view}. It shortens the definition of a
|
@@ -14,7 +14,7 @@ import type View from '../view.js';
|
|
14
14
|
*
|
15
15
|
* ```ts
|
16
16
|
* // In a class extending View.
|
17
|
-
* import preventDefault from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
|
17
|
+
* import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
|
18
18
|
*
|
19
19
|
* // ...
|
20
20
|
*
|
@@ -29,5 +29,6 @@ import type View from '../view.js';
|
|
29
29
|
* ```
|
30
30
|
*
|
31
31
|
* @param view View instance that defines the template.
|
32
|
+
* @internal
|
32
33
|
*/
|
33
|
-
export
|
34
|
+
export declare function preventDefault(view: View): ListenerBinding;
|
@@ -9,7 +9,7 @@
|
|
9
9
|
*
|
10
10
|
* ```ts
|
11
11
|
* // In a class extending View.
|
12
|
-
* import preventDefault from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
|
12
|
+
* import { preventDefault } from '@ckeditor/ckeditor5-ui/src/bindings/preventdefault';
|
13
13
|
*
|
14
14
|
* // ...
|
15
15
|
*
|
@@ -24,8 +24,9 @@
|
|
24
24
|
* ```
|
25
25
|
*
|
26
26
|
* @param view View instance that defines the template.
|
27
|
+
* @internal
|
27
28
|
*/
|
28
|
-
export
|
29
|
+
export function preventDefault(view) {
|
29
30
|
return view.bindTemplate.to(evt => {
|
30
31
|
if (evt.target === view.element) {
|
31
32
|
evt.preventDefault();
|
@@ -5,7 +5,7 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/bindings/submithandler
|
7
7
|
*/
|
8
|
-
import type View from '../view.js';
|
8
|
+
import { type View } from '../view.js';
|
9
9
|
/**
|
10
10
|
* A handler useful for {@link module:ui/view~View views} working as HTML forms. It intercepts a native DOM
|
11
11
|
* `submit` event, prevents the default web browser behavior (navigation and page reload) and
|
@@ -13,7 +13,7 @@ import type View from '../view.js';
|
|
13
13
|
* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.
|
14
14
|
*
|
15
15
|
* ```ts
|
16
|
-
* import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
16
|
+
* import { submitHandler } from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
17
17
|
*
|
18
18
|
* // ...
|
19
19
|
*
|
@@ -43,7 +43,7 @@ import type View from '../view.js';
|
|
43
43
|
* @param options Configuration options.
|
44
44
|
* @param options.view The view which DOM `submit` events should be handled.
|
45
45
|
*/
|
46
|
-
export
|
46
|
+
export declare function submitHandler({ view }: {
|
47
47
|
view: View;
|
48
48
|
}): void;
|
49
49
|
/**
|
@@ -9,7 +9,7 @@
|
|
9
9
|
* {@link module:utils/dom/emittermixin~DomEmitter emitter}, e.g. to serialize the form data.
|
10
10
|
*
|
11
11
|
* ```ts
|
12
|
-
* import submitHandler from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
12
|
+
* import { submitHandler } from '@ckeditor/ckeditor5-ui/src/bindings/submithandler';
|
13
13
|
*
|
14
14
|
* // ...
|
15
15
|
*
|
@@ -39,7 +39,7 @@
|
|
39
39
|
* @param options Configuration options.
|
40
40
|
* @param options.view The view which DOM `submit` events should be handled.
|
41
41
|
*/
|
42
|
-
export
|
42
|
+
export function submitHandler({ view }) {
|
43
43
|
view.listenTo(view.element, 'submit', (evt, domEvt) => {
|
44
44
|
domEvt.preventDefault();
|
45
45
|
view.fire('submit');
|
package/src/button/button.d.ts
CHANGED
@@ -10,7 +10,7 @@
|
|
10
10
|
* {@link module:ui/dropdown/button/splitbuttonview~SplitButtonView} and
|
11
11
|
* {@link module:ui/dropdown/button/dropdownbuttonview~DropdownButtonView}.
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export interface Button {
|
14
14
|
/**
|
15
15
|
* The label of the button view visible to the user when {@link #withText} is `true`.
|
16
16
|
* It can also be used to create a {@link #tooltip}.
|
@@ -5,12 +5,12 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/buttonlabel
|
7
7
|
*/
|
8
|
-
import type View from '../view.js';
|
8
|
+
import { type View } from '../view.js';
|
9
9
|
/**
|
10
10
|
* The button label interface. Implemented by the {@link module:ui/button/buttonlabelview~ButtonLabelView}
|
11
11
|
* and any label view that can be used with the {@link module:ui/button/buttonview~ButtonView}.
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export interface ButtonLabel extends View {
|
14
14
|
/**
|
15
15
|
* The `id` attribute of the button label. It is used for accessibility purposes
|
16
16
|
* to describe the button.
|
@@ -5,13 +5,13 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/buttonlabelview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import type ButtonLabel from './buttonlabel.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { type ButtonLabel } from './buttonlabel.js';
|
10
10
|
/**
|
11
11
|
* A default implementation of the button view's label. It comes with a dynamic text support
|
12
12
|
* via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.
|
13
13
|
*/
|
14
|
-
export
|
14
|
+
export declare class ButtonLabelView extends View implements ButtonLabel {
|
15
15
|
/**
|
16
16
|
* @inheritDoc
|
17
17
|
*/
|
@@ -5,12 +5,12 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/buttonlabelview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
8
|
+
import { View } from '../view.js';
|
9
9
|
/**
|
10
10
|
* A default implementation of the button view's label. It comes with a dynamic text support
|
11
11
|
* via {@link module:ui/button/buttonlabelview~ButtonLabelView#text} property.
|
12
12
|
*/
|
13
|
-
export
|
13
|
+
export class ButtonLabelView extends View {
|
14
14
|
/**
|
15
15
|
* @inheritDoc
|
16
16
|
*/
|
@@ -5,11 +5,11 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/buttonview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import IconView from '../icon/iconview.js';
|
10
|
-
import type ViewCollection from '../viewcollection.js';
|
11
|
-
import type {
|
12
|
-
import type ButtonLabel from './buttonlabel.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { IconView } from '../icon/iconview.js';
|
10
|
+
import { type ViewCollection } from '../viewcollection.js';
|
11
|
+
import type { Button } from './button.js';
|
12
|
+
import { type ButtonLabel } from './buttonlabel.js';
|
13
13
|
import { type Locale } from '@ckeditor/ckeditor5-utils';
|
14
14
|
import '../../theme/components/button/button.css';
|
15
15
|
/**
|
@@ -30,7 +30,7 @@ import '../../theme/components/button/button.css';
|
|
30
30
|
* document.body.append( view.element );
|
31
31
|
* ```
|
32
32
|
*/
|
33
|
-
export
|
33
|
+
export declare class ButtonView extends View<HTMLButtonElement> implements Button {
|
34
34
|
/**
|
35
35
|
* Collection of the child views inside of the button {@link #element}.
|
36
36
|
*/
|
package/src/button/buttonview.js
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/buttonview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import IconView from '../icon/iconview.js';
|
10
|
-
import ButtonLabelView from './buttonlabelview.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { IconView } from '../icon/iconview.js';
|
10
|
+
import { ButtonLabelView } from './buttonlabelview.js';
|
11
11
|
import { env, getEnvKeystrokeText, uid, delay } from '@ckeditor/ckeditor5-utils';
|
12
12
|
import '../../theme/components/button/button.css';
|
13
13
|
/**
|
@@ -28,7 +28,7 @@ import '../../theme/components/button/button.css';
|
|
28
28
|
* document.body.append( view.element );
|
29
29
|
* ```
|
30
30
|
*/
|
31
|
-
export
|
31
|
+
export class ButtonView extends View {
|
32
32
|
/**
|
33
33
|
* Collection of the child views inside of the button {@link #element}.
|
34
34
|
*/
|
@@ -5,10 +5,10 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/filedialogbuttonview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import ButtonView from './buttonview.js';
|
10
|
-
import type { Mixed } from '@ckeditor/ckeditor5-utils';
|
11
|
-
import ListItemButtonView from './listitembuttonview.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { ButtonView } from './buttonview.js';
|
10
|
+
import type { Constructor, Mixed } from '@ckeditor/ckeditor5-utils';
|
11
|
+
import { ListItemButtonView } from './listitembuttonview.js';
|
12
12
|
declare const FileDialogButtonView_base: Mixed<typeof ButtonView, FileDialogButtonViewBase>;
|
13
13
|
/**
|
14
14
|
* The file dialog button view.
|
@@ -34,7 +34,7 @@ declare const FileDialogButtonView_base: Mixed<typeof ButtonView, FileDialogButt
|
|
34
34
|
* } );
|
35
35
|
* ```
|
36
36
|
*/
|
37
|
-
export
|
37
|
+
export declare class FileDialogButtonView extends /* #__PURE__ */ FileDialogButtonView_base {
|
38
38
|
}
|
39
39
|
declare const FileDialogListItemButtonView_base: Mixed<typeof ListItemButtonView, FileDialogButtonViewBase>;
|
40
40
|
/**
|
@@ -63,16 +63,21 @@ declare const FileDialogListItemButtonView_base: Mixed<typeof ListItemButtonView
|
|
63
63
|
*/
|
64
64
|
export declare class FileDialogListItemButtonView extends /* #__PURE__ */ FileDialogListItemButtonView_base {
|
65
65
|
}
|
66
|
+
/**
|
67
|
+
* Mixin function that enhances a base button view class with file dialog functionality. It is used
|
68
|
+
* to create a button view class that opens the native select file dialog when clicked.
|
69
|
+
*
|
70
|
+
* The enhanced view includes a button and a hidden file input. When the button is clicked, the file dialog is opened.
|
71
|
+
* The mixin adds properties and methods to the base class to handle the file selection.
|
72
|
+
*
|
73
|
+
* @param view The base class to be enhanced with file dialog functionality.
|
74
|
+
* @returns A new class that extends the base class and includes the file dialog functionality.
|
75
|
+
*/
|
76
|
+
export declare function FileDialogViewMixin<Base extends Constructor<ButtonView>>(view: Base): Mixed<Base, FileDialogButtonViewBase>;
|
66
77
|
/**
|
67
78
|
* Represents the base view for a file dialog button component.
|
68
79
|
*/
|
69
|
-
type FileDialogButtonViewBase = View & {
|
70
|
-
/**
|
71
|
-
* The button view of the component.
|
72
|
-
*
|
73
|
-
* @deprecated
|
74
|
-
*/
|
75
|
-
buttonView: ButtonView;
|
80
|
+
export type FileDialogButtonViewBase = View & {
|
76
81
|
/**
|
77
82
|
* Accepted file types. Can be provided in form of file extensions, media type or one of:
|
78
83
|
* * `audio/*`,
|
@@ -5,9 +5,9 @@
|
|
5
5
|
/**
|
6
6
|
* @module ui/button/filedialogbuttonview
|
7
7
|
*/
|
8
|
-
import View from '../view.js';
|
9
|
-
import ButtonView from './buttonview.js';
|
10
|
-
import ListItemButtonView from './listitembuttonview.js';
|
8
|
+
import { View } from '../view.js';
|
9
|
+
import { ButtonView } from './buttonview.js';
|
10
|
+
import { ListItemButtonView } from './listitembuttonview.js';
|
11
11
|
/**
|
12
12
|
* The file dialog button view.
|
13
13
|
*
|
@@ -32,7 +32,7 @@ import ListItemButtonView from './listitembuttonview.js';
|
|
32
32
|
* } );
|
33
33
|
* ```
|
34
34
|
*/
|
35
|
-
export
|
35
|
+
export class FileDialogButtonView extends /* #__PURE__ */ FileDialogViewMixin(ButtonView) {
|
36
36
|
}
|
37
37
|
/**
|
38
38
|
* The file dialog button view used in a lists.
|
@@ -70,14 +70,8 @@ export class FileDialogListItemButtonView extends /* #__PURE__ */ FileDialogView
|
|
70
70
|
* @param view The base class to be enhanced with file dialog functionality.
|
71
71
|
* @returns A new class that extends the base class and includes the file dialog functionality.
|
72
72
|
*/
|
73
|
-
function FileDialogViewMixin(view) {
|
73
|
+
export function FileDialogViewMixin(view) {
|
74
74
|
class FileDialogView extends view {
|
75
|
-
/**
|
76
|
-
* The button view of the component.
|
77
|
-
*
|
78
|
-
* @deprecated
|
79
|
-
*/
|
80
|
-
buttonView;
|
81
75
|
/**
|
82
76
|
* A hidden `<input>` view used to execute file dialog.
|
83
77
|
*/
|
@@ -87,8 +81,6 @@ function FileDialogViewMixin(view) {
|
|
87
81
|
*/
|
88
82
|
constructor(...args) {
|
89
83
|
super(...args);
|
90
|
-
// For backward compatibility.
|
91
|
-
this.buttonView = this;
|
92
84
|
this._fileInputView = new FileInputView(this.locale);
|
93
85
|
this._fileInputView.bind('acceptedType').to(this);
|
94
86
|
this._fileInputView.bind('allowMultipleFiles').to(this);
|