@ckeditor/ckeditor5-ui 36.0.0 → 37.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +23 -22
- package/src/bindings/addkeyboardhandlingforgrid.d.ts +27 -0
- package/src/bindings/addkeyboardhandlingforgrid.js +42 -34
- package/src/bindings/clickoutsidehandler.d.ts +28 -0
- package/src/bindings/clickoutsidehandler.js +5 -6
- package/src/bindings/csstransitiondisablermixin.d.ts +40 -0
- package/src/bindings/csstransitiondisablermixin.js +55 -0
- package/src/bindings/injectcsstransitiondisabler.d.ts +59 -0
- package/src/bindings/injectcsstransitiondisabler.js +23 -20
- package/src/bindings/preventdefault.d.ts +33 -0
- package/src/bindings/preventdefault.js +13 -15
- package/src/bindings/submithandler.d.ts +57 -0
- package/src/bindings/submithandler.js +22 -23
- package/src/button/button.d.ts +154 -0
- package/src/button/buttonview.d.ts +155 -0
- package/src/button/buttonview.js +16 -60
- package/src/button/switchbuttonview.d.ts +45 -0
- package/src/button/switchbuttonview.js +9 -18
- package/src/colorgrid/colorgridview.d.ts +132 -0
- package/src/colorgrid/colorgridview.js +8 -40
- package/src/colorgrid/colortileview.d.ts +28 -0
- package/src/colorgrid/colortileview.js +0 -13
- package/src/colorgrid/utils.d.ts +47 -0
- package/src/colorgrid/utils.js +7 -13
- package/src/componentfactory.d.ts +81 -0
- package/src/componentfactory.js +21 -35
- package/src/dropdown/button/dropdownbutton.d.ts +25 -0
- package/src/dropdown/button/dropdownbuttonview.d.ts +48 -0
- package/src/dropdown/button/dropdownbuttonview.js +11 -21
- package/src/dropdown/button/splitbuttonview.d.ts +145 -0
- package/src/dropdown/button/splitbuttonview.js +10 -51
- package/src/dropdown/dropdownpanelfocusable.d.ts +21 -0
- package/src/dropdown/dropdownpanelview.d.ts +62 -0
- package/src/dropdown/dropdownpanelview.js +2 -30
- package/src/dropdown/dropdownview.d.ts +315 -0
- package/src/dropdown/dropdownview.js +121 -222
- package/src/dropdown/utils.d.ts +219 -0
- package/src/dropdown/utils.js +112 -106
- package/src/editableui/editableuiview.d.ts +71 -0
- package/src/editableui/editableuiview.js +14 -43
- package/src/editableui/inline/inlineeditableuiview.d.ts +40 -0
- package/src/editableui/inline/inlineeditableuiview.js +5 -15
- package/src/editorui/bodycollection.d.ts +51 -0
- package/src/editorui/bodycollection.js +2 -16
- package/src/editorui/boxed/boxededitoruiview.d.ts +40 -0
- package/src/editorui/boxed/boxededitoruiview.js +1 -27
- package/src/editorui/editorui.d.ts +264 -0
- package/src/editorui/editorui.js +21 -128
- package/src/editorui/editoruiview.d.ts +39 -0
- package/src/editorui/editoruiview.js +1 -10
- package/src/focuscycler.d.ts +183 -0
- package/src/focuscycler.js +34 -90
- package/src/formheader/formheaderview.d.ts +53 -0
- package/src/formheader/formheaderview.js +3 -24
- package/src/icon/iconview.d.ts +78 -0
- package/src/icon/iconview.js +0 -50
- package/src/iframe/iframeview.d.ts +50 -0
- package/src/iframe/iframeview.js +2 -2
- package/src/index.d.ts +54 -0
- package/src/index.js +1 -0
- package/src/input/inputview.d.ts +121 -0
- package/src/input/inputview.js +0 -82
- package/src/inputnumber/inputnumberview.d.ts +49 -0
- package/src/inputnumber/inputnumberview.js +5 -28
- package/src/inputtext/inputtextview.d.ts +18 -0
- package/src/inputtext/inputtextview.js +0 -2
- package/src/label/labelview.d.ts +36 -0
- package/src/label/labelview.js +0 -20
- package/src/labeledfield/labeledfieldview.d.ts +182 -0
- package/src/labeledfield/labeledfieldview.js +20 -126
- package/src/labeledfield/utils.d.ts +93 -0
- package/src/labeledfield/utils.js +24 -18
- package/src/labeledinput/labeledinputview.d.ts +125 -0
- package/src/labeledinput/labeledinputview.js +7 -90
- package/src/list/listitemview.d.ts +35 -0
- package/src/list/listitemview.js +0 -16
- package/src/list/listseparatorview.d.ts +18 -0
- package/src/list/listseparatorview.js +0 -2
- package/src/list/listview.d.ts +59 -0
- package/src/list/listview.js +0 -33
- package/src/model.d.ts +22 -0
- package/src/model.js +2 -4
- package/src/notification/notification.d.ts +216 -0
- package/src/notification/notification.js +64 -51
- package/src/panel/balloon/balloonpanelview.d.ts +685 -0
- package/src/panel/balloon/balloonpanelview.js +146 -168
- package/src/panel/balloon/contextualballoon.d.ts +240 -0
- package/src/panel/balloon/contextualballoon.js +41 -171
- package/src/panel/sticky/stickypanelview.d.ts +132 -0
- package/src/panel/sticky/stickypanelview.js +0 -115
- package/src/template.d.ts +940 -0
- package/src/template.js +396 -460
- package/src/toolbar/balloon/balloontoolbar.d.ts +124 -0
- package/src/toolbar/balloon/balloontoolbar.js +15 -81
- package/src/toolbar/block/blockbuttonview.d.ts +35 -0
- package/src/toolbar/block/blockbuttonview.js +1 -13
- package/src/toolbar/block/blocktoolbar.d.ts +159 -0
- package/src/toolbar/block/blocktoolbar.js +32 -69
- package/src/toolbar/normalizetoolbarconfig.d.ts +39 -0
- package/src/toolbar/normalizetoolbarconfig.js +12 -8
- package/src/toolbar/toolbarlinebreakview.d.ts +18 -0
- package/src/toolbar/toolbarlinebreakview.js +0 -2
- package/src/toolbar/toolbarseparatorview.d.ts +18 -0
- package/src/toolbar/toolbarseparatorview.js +0 -2
- package/src/toolbar/toolbarview.d.ts +241 -0
- package/src/toolbar/toolbarview.js +54 -305
- package/src/tooltipmanager.d.ts +180 -0
- package/src/tooltipmanager.js +47 -94
- package/src/uiconfig.d.ts +82 -0
- package/src/uiconfig.js +5 -0
- package/src/view.d.ts +422 -0
- package/src/view.js +182 -251
- package/src/viewcollection.d.ts +139 -0
- package/src/viewcollection.js +62 -56
|
@@ -16,8 +16,6 @@ import { ContextPlugin } from '@ckeditor/ckeditor5-core';
|
|
|
16
16
|
*
|
|
17
17
|
* Note that every unhandled and not stopped `warning` notification will be displayed as a system alert.
|
|
18
18
|
* See {@link module:ui/notification/notification~Notification#showWarning}.
|
|
19
|
-
*
|
|
20
|
-
* @extends module:core/contextplugin~ContextPlugin
|
|
21
19
|
*/
|
|
22
20
|
export default class Notification extends ContextPlugin {
|
|
23
21
|
/**
|
|
@@ -41,22 +39,26 @@ export default class Notification extends ContextPlugin {
|
|
|
41
39
|
* By default, it fires the {@link #event:show:success `show:success` event} with the given `data`. The event namespace can be extended
|
|
42
40
|
* using the `data.namespace` option. For example:
|
|
43
41
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* showSuccess( 'Image is uploaded.', {
|
|
44
|
+
* namespace: 'upload:image'
|
|
45
|
+
* } );
|
|
46
|
+
* ```
|
|
47
47
|
*
|
|
48
48
|
* will fire the `show:success:upload:image` event.
|
|
49
49
|
*
|
|
50
50
|
* You can provide the title of the notification:
|
|
51
51
|
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
52
|
+
* ```ts
|
|
53
|
+
* showSuccess( 'Image is uploaded.', {
|
|
54
|
+
* title: 'Image upload success'
|
|
55
|
+
* } );
|
|
56
|
+
* ```
|
|
55
57
|
*
|
|
56
|
-
* @param
|
|
57
|
-
* @param
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
58
|
+
* @param message The content of the notification.
|
|
59
|
+
* @param data Additional data.
|
|
60
|
+
* @param data.namespace Additional event namespace.
|
|
61
|
+
* @param data.title The title of the notification.
|
|
60
62
|
*/
|
|
61
63
|
showSuccess(message, data = {}) {
|
|
62
64
|
this._showNotification({
|
|
@@ -72,22 +74,26 @@ export default class Notification extends ContextPlugin {
|
|
|
72
74
|
* By default, it fires the {@link #event:show:info `show:info` event} with the given `data`. The event namespace can be extended
|
|
73
75
|
* using the `data.namespace` option. For example:
|
|
74
76
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
77
|
+
* ```ts
|
|
78
|
+
* showInfo( 'Editor is offline.', {
|
|
79
|
+
* namespace: 'editor:status'
|
|
80
|
+
* } );
|
|
81
|
+
* ```
|
|
78
82
|
*
|
|
79
83
|
* will fire the `show:info:editor:status` event.
|
|
80
84
|
*
|
|
81
85
|
* You can provide the title of the notification:
|
|
82
86
|
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* showInfo( 'Editor is offline.', {
|
|
89
|
+
* title: 'Network information'
|
|
90
|
+
* } );
|
|
91
|
+
* ```
|
|
86
92
|
*
|
|
87
|
-
* @param
|
|
88
|
-
* @param
|
|
89
|
-
* @param
|
|
90
|
-
* @param
|
|
93
|
+
* @param message The content of the notification.
|
|
94
|
+
* @param data Additional data.
|
|
95
|
+
* @param data.namespace Additional event namespace.
|
|
96
|
+
* @param data.title The title of the notification.
|
|
91
97
|
*/
|
|
92
98
|
showInfo(message, data = {}) {
|
|
93
99
|
this._showNotification({
|
|
@@ -103,45 +109,53 @@ export default class Notification extends ContextPlugin {
|
|
|
103
109
|
* By default, it fires the {@link #event:show:warning `show:warning` event}
|
|
104
110
|
* with the given `data`. The event namespace can be extended using the `data.namespace` option. For example:
|
|
105
111
|
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
112
|
+
* ```ts
|
|
113
|
+
* showWarning( 'Image upload error.', {
|
|
114
|
+
* namespace: 'upload:image'
|
|
115
|
+
* } );
|
|
116
|
+
* ```
|
|
109
117
|
*
|
|
110
118
|
* will fire the `show:warning:upload:image` event.
|
|
111
119
|
*
|
|
112
120
|
* You can provide the title of the notification:
|
|
113
121
|
*
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
122
|
+
* ```ts
|
|
123
|
+
* showWarning( 'Image upload error.', {
|
|
124
|
+
* title: 'Upload failed'
|
|
125
|
+
* } );
|
|
126
|
+
* ```
|
|
117
127
|
*
|
|
118
128
|
* Note that each unhandled and not stopped `warning` notification will be displayed as a system alert.
|
|
119
129
|
* The plugin responsible for displaying warnings should `stop()` the event to prevent displaying it as an alert:
|
|
120
130
|
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
131
|
+
* ```ts
|
|
132
|
+
* notifications.on( 'show:warning', ( evt, data ) => {
|
|
133
|
+
* // Do something with the data.
|
|
123
134
|
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
*
|
|
135
|
+
* // Stop this event to prevent displaying it as an alert.
|
|
136
|
+
* evt.stop();
|
|
137
|
+
* } );
|
|
138
|
+
* ```
|
|
127
139
|
*
|
|
128
140
|
* You can attach many listeners to the same event and `stop()` this event in a listener with a low priority:
|
|
129
141
|
*
|
|
130
|
-
*
|
|
131
|
-
*
|
|
132
|
-
*
|
|
142
|
+
* ```ts
|
|
143
|
+
* notifications.on( 'show:warning', ( evt, data ) => {
|
|
144
|
+
* // Show the warning in the UI, but do not stop it.
|
|
145
|
+
* } );
|
|
133
146
|
*
|
|
134
|
-
*
|
|
135
|
-
*
|
|
147
|
+
* notifications.on( 'show:warning', ( evt, data ) => {
|
|
148
|
+
* // Log the warning to some error tracker.
|
|
136
149
|
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
150
|
+
* // Stop this event to prevent displaying it as an alert.
|
|
151
|
+
* evt.stop();
|
|
152
|
+
* }, { priority: 'low' } );
|
|
153
|
+
* ```
|
|
140
154
|
*
|
|
141
|
-
* @param
|
|
142
|
-
* @param
|
|
143
|
-
* @param
|
|
144
|
-
* @param
|
|
155
|
+
* @param message The content of the notification.
|
|
156
|
+
* @param data Additional data.
|
|
157
|
+
* @param data.namespace Additional event namespace.
|
|
158
|
+
* @param data.title The title of the notification.
|
|
145
159
|
*/
|
|
146
160
|
showWarning(message, data = {}) {
|
|
147
161
|
this._showNotification({
|
|
@@ -154,12 +168,11 @@ export default class Notification extends ContextPlugin {
|
|
|
154
168
|
/**
|
|
155
169
|
* Fires the `show` event with the specified type, namespace and message.
|
|
156
170
|
*
|
|
157
|
-
* @
|
|
158
|
-
* @param
|
|
159
|
-
* @param
|
|
160
|
-
* @param
|
|
161
|
-
* @param
|
|
162
|
-
* @param {String} [data.title=''] The title of the notification.
|
|
171
|
+
* @param data The message data.
|
|
172
|
+
* @param data.message The content of the notification.
|
|
173
|
+
* @param data.type The type of the message.
|
|
174
|
+
* @param data.namespace Additional event namespace.
|
|
175
|
+
* @param data.title The title of the notification.
|
|
163
176
|
*/
|
|
164
177
|
_showNotification(data) {
|
|
165
178
|
const event = data.namespace ?
|