@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.
Files changed (114) hide show
  1. package/package.json +23 -22
  2. package/src/bindings/addkeyboardhandlingforgrid.d.ts +27 -0
  3. package/src/bindings/addkeyboardhandlingforgrid.js +42 -34
  4. package/src/bindings/clickoutsidehandler.d.ts +28 -0
  5. package/src/bindings/clickoutsidehandler.js +5 -6
  6. package/src/bindings/csstransitiondisablermixin.d.ts +40 -0
  7. package/src/bindings/csstransitiondisablermixin.js +55 -0
  8. package/src/bindings/injectcsstransitiondisabler.d.ts +59 -0
  9. package/src/bindings/injectcsstransitiondisabler.js +23 -20
  10. package/src/bindings/preventdefault.d.ts +33 -0
  11. package/src/bindings/preventdefault.js +13 -15
  12. package/src/bindings/submithandler.d.ts +57 -0
  13. package/src/bindings/submithandler.js +22 -23
  14. package/src/button/button.d.ts +154 -0
  15. package/src/button/buttonview.d.ts +155 -0
  16. package/src/button/buttonview.js +16 -60
  17. package/src/button/switchbuttonview.d.ts +45 -0
  18. package/src/button/switchbuttonview.js +9 -18
  19. package/src/colorgrid/colorgridview.d.ts +132 -0
  20. package/src/colorgrid/colorgridview.js +8 -40
  21. package/src/colorgrid/colortileview.d.ts +28 -0
  22. package/src/colorgrid/colortileview.js +0 -13
  23. package/src/colorgrid/utils.d.ts +47 -0
  24. package/src/colorgrid/utils.js +7 -13
  25. package/src/componentfactory.d.ts +81 -0
  26. package/src/componentfactory.js +21 -35
  27. package/src/dropdown/button/dropdownbutton.d.ts +25 -0
  28. package/src/dropdown/button/dropdownbuttonview.d.ts +48 -0
  29. package/src/dropdown/button/dropdownbuttonview.js +11 -21
  30. package/src/dropdown/button/splitbuttonview.d.ts +145 -0
  31. package/src/dropdown/button/splitbuttonview.js +10 -51
  32. package/src/dropdown/dropdownpanelfocusable.d.ts +21 -0
  33. package/src/dropdown/dropdownpanelview.d.ts +62 -0
  34. package/src/dropdown/dropdownpanelview.js +2 -30
  35. package/src/dropdown/dropdownview.d.ts +315 -0
  36. package/src/dropdown/dropdownview.js +121 -222
  37. package/src/dropdown/utils.d.ts +219 -0
  38. package/src/dropdown/utils.js +112 -106
  39. package/src/editableui/editableuiview.d.ts +71 -0
  40. package/src/editableui/editableuiview.js +14 -43
  41. package/src/editableui/inline/inlineeditableuiview.d.ts +40 -0
  42. package/src/editableui/inline/inlineeditableuiview.js +5 -15
  43. package/src/editorui/bodycollection.d.ts +51 -0
  44. package/src/editorui/bodycollection.js +2 -16
  45. package/src/editorui/boxed/boxededitoruiview.d.ts +40 -0
  46. package/src/editorui/boxed/boxededitoruiview.js +1 -27
  47. package/src/editorui/editorui.d.ts +264 -0
  48. package/src/editorui/editorui.js +21 -128
  49. package/src/editorui/editoruiview.d.ts +39 -0
  50. package/src/editorui/editoruiview.js +1 -10
  51. package/src/focuscycler.d.ts +183 -0
  52. package/src/focuscycler.js +34 -90
  53. package/src/formheader/formheaderview.d.ts +53 -0
  54. package/src/formheader/formheaderview.js +3 -24
  55. package/src/icon/iconview.d.ts +78 -0
  56. package/src/icon/iconview.js +0 -50
  57. package/src/iframe/iframeview.d.ts +50 -0
  58. package/src/iframe/iframeview.js +2 -2
  59. package/src/index.d.ts +54 -0
  60. package/src/index.js +1 -0
  61. package/src/input/inputview.d.ts +121 -0
  62. package/src/input/inputview.js +0 -82
  63. package/src/inputnumber/inputnumberview.d.ts +49 -0
  64. package/src/inputnumber/inputnumberview.js +5 -28
  65. package/src/inputtext/inputtextview.d.ts +18 -0
  66. package/src/inputtext/inputtextview.js +0 -2
  67. package/src/label/labelview.d.ts +36 -0
  68. package/src/label/labelview.js +0 -20
  69. package/src/labeledfield/labeledfieldview.d.ts +182 -0
  70. package/src/labeledfield/labeledfieldview.js +20 -126
  71. package/src/labeledfield/utils.d.ts +93 -0
  72. package/src/labeledfield/utils.js +24 -18
  73. package/src/labeledinput/labeledinputview.d.ts +125 -0
  74. package/src/labeledinput/labeledinputview.js +7 -90
  75. package/src/list/listitemview.d.ts +35 -0
  76. package/src/list/listitemview.js +0 -16
  77. package/src/list/listseparatorview.d.ts +18 -0
  78. package/src/list/listseparatorview.js +0 -2
  79. package/src/list/listview.d.ts +59 -0
  80. package/src/list/listview.js +0 -33
  81. package/src/model.d.ts +22 -0
  82. package/src/model.js +2 -4
  83. package/src/notification/notification.d.ts +216 -0
  84. package/src/notification/notification.js +64 -51
  85. package/src/panel/balloon/balloonpanelview.d.ts +685 -0
  86. package/src/panel/balloon/balloonpanelview.js +146 -168
  87. package/src/panel/balloon/contextualballoon.d.ts +240 -0
  88. package/src/panel/balloon/contextualballoon.js +41 -171
  89. package/src/panel/sticky/stickypanelview.d.ts +132 -0
  90. package/src/panel/sticky/stickypanelview.js +0 -115
  91. package/src/template.d.ts +940 -0
  92. package/src/template.js +396 -460
  93. package/src/toolbar/balloon/balloontoolbar.d.ts +124 -0
  94. package/src/toolbar/balloon/balloontoolbar.js +15 -81
  95. package/src/toolbar/block/blockbuttonview.d.ts +35 -0
  96. package/src/toolbar/block/blockbuttonview.js +1 -13
  97. package/src/toolbar/block/blocktoolbar.d.ts +159 -0
  98. package/src/toolbar/block/blocktoolbar.js +32 -69
  99. package/src/toolbar/normalizetoolbarconfig.d.ts +39 -0
  100. package/src/toolbar/normalizetoolbarconfig.js +12 -8
  101. package/src/toolbar/toolbarlinebreakview.d.ts +18 -0
  102. package/src/toolbar/toolbarlinebreakview.js +0 -2
  103. package/src/toolbar/toolbarseparatorview.d.ts +18 -0
  104. package/src/toolbar/toolbarseparatorview.js +0 -2
  105. package/src/toolbar/toolbarview.d.ts +241 -0
  106. package/src/toolbar/toolbarview.js +54 -305
  107. package/src/tooltipmanager.d.ts +180 -0
  108. package/src/tooltipmanager.js +47 -94
  109. package/src/uiconfig.d.ts +82 -0
  110. package/src/uiconfig.js +5 -0
  111. package/src/view.d.ts +422 -0
  112. package/src/view.js +182 -251
  113. package/src/viewcollection.d.ts +139 -0
  114. 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
- * showSuccess( 'Image is uploaded.', {
45
- * namespace: 'upload:image'
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
- * showSuccess( 'Image is uploaded.', {
53
- * title: 'Image upload success'
54
- * } );
52
+ * ```ts
53
+ * showSuccess( 'Image is uploaded.', {
54
+ * title: 'Image upload success'
55
+ * } );
56
+ * ```
55
57
  *
56
- * @param {String} message The content of the notification.
57
- * @param {Object} [data={}] Additional data.
58
- * @param {String} [data.namespace] Additional event namespace.
59
- * @param {String} [data.title] The title of the notification.
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
- * showInfo( 'Editor is offline.', {
76
- * namespace: 'editor:status'
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
- * showInfo( 'Editor is offline.', {
84
- * title: 'Network information'
85
- * } );
87
+ * ```ts
88
+ * showInfo( 'Editor is offline.', {
89
+ * title: 'Network information'
90
+ * } );
91
+ * ```
86
92
  *
87
- * @param {String} message The content of the notification.
88
- * @param {Object} [data={}] Additional data.
89
- * @param {String} [data.namespace] Additional event namespace.
90
- * @param {String} [data.title] The title of the notification.
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
- * showWarning( 'Image upload error.', {
107
- * namespace: 'upload:image'
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
- * showWarning( 'Image upload error.', {
115
- * title: 'Upload failed'
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
- * notifications.on( 'show:warning', ( evt, data ) => {
122
- * // Do something with the data.
131
+ * ```ts
132
+ * notifications.on( 'show:warning', ( evt, data ) => {
133
+ * // Do something with the data.
123
134
  *
124
- * // Stop this event to prevent displaying it as an alert.
125
- * evt.stop();
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
- * notifications.on( 'show:warning', ( evt, data ) => {
131
- * // Show the warning in the UI, but do not stop it.
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
- * notifications.on( 'show:warning', ( evt, data ) => {
135
- * // Log the warning to some error tracker.
147
+ * notifications.on( 'show:warning', ( evt, data ) => {
148
+ * // Log the warning to some error tracker.
136
149
  *
137
- * // Stop this event to prevent displaying it as an alert.
138
- * evt.stop();
139
- * }, { priority: 'low' } );
150
+ * // Stop this event to prevent displaying it as an alert.
151
+ * evt.stop();
152
+ * }, { priority: 'low' } );
153
+ * ```
140
154
  *
141
- * @param {String} message The content of the notification.
142
- * @param {Object} [data={}] Additional data.
143
- * @param {String} [data.namespace] Additional event namespace.
144
- * @param {String} [data.title] The title of the notification.
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
- * @private
158
- * @param {Object} data The message data.
159
- * @param {String} data.message The content of the notification.
160
- * @param {'success'|'info'|'warning'} data.type The type of the message.
161
- * @param {String} [data.namespace] Additional event namespace.
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 ?