@ckeditor/ckeditor5-ui 35.2.1 → 35.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.
Files changed (59) hide show
  1. package/package.json +31 -23
  2. package/src/bindings/addkeyboardhandlingforgrid.js +45 -57
  3. package/src/bindings/clickoutsidehandler.js +15 -21
  4. package/src/bindings/injectcsstransitiondisabler.js +16 -20
  5. package/src/bindings/preventdefault.js +6 -8
  6. package/src/bindings/submithandler.js +5 -7
  7. package/src/button/button.js +5 -0
  8. package/src/button/buttonview.js +220 -259
  9. package/src/button/switchbuttonview.js +56 -71
  10. package/src/colorgrid/colorgridview.js +135 -197
  11. package/src/colorgrid/colortileview.js +37 -47
  12. package/src/colorgrid/utils.js +57 -66
  13. package/src/componentfactory.js +79 -93
  14. package/src/dropdown/button/dropdownbutton.js +5 -0
  15. package/src/dropdown/button/dropdownbuttonview.js +44 -57
  16. package/src/dropdown/button/splitbuttonview.js +159 -207
  17. package/src/dropdown/dropdownpanelfocusable.js +5 -0
  18. package/src/dropdown/dropdownpanelview.js +101 -112
  19. package/src/dropdown/dropdownview.js +396 -438
  20. package/src/dropdown/utils.js +164 -213
  21. package/src/editableui/editableuiview.js +125 -141
  22. package/src/editableui/inline/inlineeditableuiview.js +44 -54
  23. package/src/editorui/bodycollection.js +61 -75
  24. package/src/editorui/boxed/boxededitoruiview.js +91 -104
  25. package/src/editorui/editoruiview.js +30 -39
  26. package/src/focuscycler.js +214 -245
  27. package/src/formheader/formheaderview.js +58 -70
  28. package/src/icon/iconview.js +145 -111
  29. package/src/iframe/iframeview.js +37 -49
  30. package/src/index.js +0 -17
  31. package/src/input/inputview.js +170 -198
  32. package/src/inputnumber/inputnumberview.js +48 -56
  33. package/src/inputtext/inputtextview.js +14 -18
  34. package/src/label/labelview.js +44 -53
  35. package/src/labeledfield/labeledfieldview.js +212 -235
  36. package/src/labeledfield/utils.js +39 -57
  37. package/src/labeledinput/labeledinputview.js +190 -221
  38. package/src/list/listitemview.js +40 -50
  39. package/src/list/listseparatorview.js +15 -19
  40. package/src/list/listview.js +94 -115
  41. package/src/model.js +19 -25
  42. package/src/notification/notification.js +151 -202
  43. package/src/panel/balloon/balloonpanelview.js +535 -628
  44. package/src/panel/balloon/contextualballoon.js +611 -732
  45. package/src/panel/sticky/stickypanelview.js +238 -270
  46. package/src/template.js +1049 -1479
  47. package/src/toolbar/balloon/balloontoolbar.js +337 -424
  48. package/src/toolbar/block/blockbuttonview.js +32 -42
  49. package/src/toolbar/block/blocktoolbar.js +375 -477
  50. package/src/toolbar/normalizetoolbarconfig.js +17 -21
  51. package/src/toolbar/toolbarlinebreakview.js +15 -19
  52. package/src/toolbar/toolbarseparatorview.js +15 -19
  53. package/src/toolbar/toolbarview.js +866 -1053
  54. package/src/tooltipmanager.js +324 -353
  55. package/src/view.js +389 -430
  56. package/src/viewcollection.js +147 -178
  57. package/src/button/button.jsdoc +0 -165
  58. package/src/dropdown/button/dropdownbutton.jsdoc +0 -22
  59. package/src/dropdown/dropdownpanelfocusable.jsdoc +0 -27
@@ -2,16 +2,13 @@
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module ui/labeledfield/labeledfieldview
8
7
  */
9
-
10
8
  import View from '../view';
11
9
  import uid from '@ckeditor/ckeditor5-utils/src/uid';
12
10
  import LabelView from '../label/labelview';
13
11
  import '../../theme/components/labeledfield/labeledfieldview.css';
14
-
15
12
  /**
16
13
  * The labeled field view class. It can be used to enhance any view with the following features:
17
14
  *
@@ -51,236 +48,216 @@ import '../../theme/components/labeledfield/labeledfieldview.css';
51
48
  * @extends module:ui/view~View
52
49
  */
53
50
  export default class LabeledFieldView extends View {
54
- /**
55
- * Creates an instance of the labeled field view class using a provided creator function
56
- * that provides the view to be labeled.
57
- *
58
- * @param {module:utils/locale~Locale} locale The locale instance.
59
- * @param {Function} viewCreator A function that returns a {@link module:ui/view~View}
60
- * that will be labeled. The following arguments are passed to the creator function:
61
- *
62
- * * an instance of the `LabeledFieldView` to allow binding observable properties,
63
- * * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,
64
- * * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.
65
- */
66
- constructor( locale, viewCreator ) {
67
- super( locale );
68
-
69
- const viewUid = `ck-labeled-field-view-${ uid() }`;
70
- const statusUid = `ck-labeled-field-view-status-${ uid() }`;
71
-
72
- /**
73
- * The field view that gets labeled.
74
- *
75
- * @member {module:ui/view~View} #fieldView
76
- */
77
- this.fieldView = viewCreator( this, viewUid, statusUid );
78
-
79
- /**
80
- * The text of the label.
81
- *
82
- * @observable
83
- * @member {String} #label
84
- */
85
- this.set( 'label' );
86
-
87
- /**
88
- * Controls whether the component is in read-only mode.
89
- *
90
- * @observable
91
- * @member {Boolean} #isEnabled
92
- */
93
- this.set( 'isEnabled', true );
94
-
95
- /**
96
- * An observable flag set to `true` when {@link #fieldView} is empty (`false` otherwise).
97
- *
98
- * @readonly
99
- * @observable
100
- * @member {Boolean} #isEmpty
101
- * @default true
102
- */
103
- this.set( 'isEmpty', true );
104
-
105
- /**
106
- * An observable flag set to `true` when {@link #fieldView} is currently focused by
107
- * the user (`false` otherwise).
108
- *
109
- * @readonly
110
- * @observable
111
- * @member {Boolean} #isFocused
112
- * @default false
113
- */
114
- this.set( 'isFocused', false );
115
-
116
- /**
117
- * The validation error text. When set, it will be displayed
118
- * next to the {@link #fieldView} as a typical validation error message.
119
- * Set it to `null` to hide the message.
120
- *
121
- * **Note:** Setting this property to anything but `null` will automatically
122
- * make the `hasError` of the {@link #fieldView} `true`.
123
- *
124
- * @observable
125
- * @member {String|null} #errorText
126
- */
127
- this.set( 'errorText', null );
128
-
129
- /**
130
- * The additional information text displayed next to the {@link #fieldView} which can
131
- * be used to inform the user about its purpose, provide help or hints.
132
- *
133
- * Set it to `null` to hide the message.
134
- *
135
- * **Note:** This text will be displayed in the same place as {@link #errorText} but the
136
- * latter always takes precedence: if the {@link #errorText} is set, it replaces
137
- * {@link #infoText}.
138
- *
139
- * @observable
140
- * @member {String|null} #infoText
141
- * @default null
142
- */
143
- this.set( 'infoText', null );
144
-
145
- /**
146
- * (Optional) The additional CSS class set on the dropdown {@link #element}.
147
- *
148
- * @observable
149
- * @member {String} #class
150
- */
151
- this.set( 'class' );
152
-
153
- /**
154
- * The content of the `placeholder` attribute of the {@link #fieldView}.
155
- *
156
- * @observable
157
- * @member {String} #placeholder
158
- */
159
- this.set( 'placeholder' );
160
-
161
- /**
162
- * The label view instance that describes the entire view.
163
- *
164
- * @member {module:ui/label/labelview~LabelView} #labelView
165
- */
166
- this.labelView = this._createLabelView( viewUid );
167
-
168
- /**
169
- * The status view for the {@link #fieldView}. It displays {@link #errorText} and
170
- * {@link #infoText}.
171
- *
172
- * @member {module:ui/view~View} #statusView
173
- */
174
- this.statusView = this._createStatusView( statusUid );
175
-
176
- /**
177
- * The combined status text made of {@link #errorText} and {@link #infoText}.
178
- * Note that when present, {@link #errorText} always takes precedence in the
179
- * status.
180
- *
181
- * @see #errorText
182
- * @see #infoText
183
- * @see #statusView
184
- * @private
185
- * @observable
186
- * @member {String|null} #_statusText
187
- */
188
- this.bind( '_statusText' ).to(
189
- this, 'errorText',
190
- this, 'infoText',
191
- ( errorText, infoText ) => errorText || infoText
192
- );
193
-
194
- const bind = this.bindTemplate;
195
-
196
- this.setTemplate( {
197
- tag: 'div',
198
- attributes: {
199
- class: [
200
- 'ck',
201
- 'ck-labeled-field-view',
202
- bind.to( 'class' ),
203
- bind.if( 'isEnabled', 'ck-disabled', value => !value ),
204
- bind.if( 'isEmpty', 'ck-labeled-field-view_empty' ),
205
- bind.if( 'isFocused', 'ck-labeled-field-view_focused' ),
206
- bind.if( 'placeholder', 'ck-labeled-field-view_placeholder' ),
207
- bind.if( 'errorText', 'ck-error' )
208
- ]
209
- },
210
- children: [
211
- {
212
- tag: 'div',
213
- attributes: {
214
- class: [
215
- 'ck',
216
- 'ck-labeled-field-view__input-wrapper'
217
- ]
218
- },
219
- children: [
220
- this.fieldView,
221
- this.labelView
222
- ]
223
- },
224
- this.statusView
225
- ]
226
- } );
227
- }
228
-
229
- /**
230
- * Creates label view class instance and bind with view.
231
- *
232
- * @private
233
- * @param {String} id Unique id to set as labelView#for attribute.
234
- * @returns {module:ui/label/labelview~LabelView}
235
- */
236
- _createLabelView( id ) {
237
- const labelView = new LabelView( this.locale );
238
-
239
- labelView.for = id;
240
- labelView.bind( 'text' ).to( this, 'label' );
241
-
242
- return labelView;
243
- }
244
-
245
- /**
246
- * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}
247
- * next to the {@link #fieldView}. See {@link #_statusText}.
248
- *
249
- * @private
250
- * @param {String} statusUid Unique id of the status, shared with the {@link #fieldView view's}
251
- * `aria-describedby` attribute.
252
- * @returns {module:ui/view~View}
253
- */
254
- _createStatusView( statusUid ) {
255
- const statusView = new View( this.locale );
256
- const bind = this.bindTemplate;
257
-
258
- statusView.setTemplate( {
259
- tag: 'div',
260
- attributes: {
261
- class: [
262
- 'ck',
263
- 'ck-labeled-field-view__status',
264
- bind.if( 'errorText', 'ck-labeled-field-view__status_error' ),
265
- bind.if( '_statusText', 'ck-hidden', value => !value )
266
- ],
267
- id: statusUid,
268
- role: bind.if( 'errorText', 'alert' )
269
- },
270
- children: [
271
- {
272
- text: bind.to( '_statusText' )
273
- }
274
- ]
275
- } );
276
-
277
- return statusView;
278
- }
279
-
280
- /**
281
- * Focuses the {@link #fieldView}.
282
- */
283
- focus() {
284
- this.fieldView.focus();
285
- }
51
+ /**
52
+ * Creates an instance of the labeled field view class using a provided creator function
53
+ * that provides the view to be labeled.
54
+ *
55
+ * @param {module:utils/locale~Locale} locale The locale instance.
56
+ * @param {Function} viewCreator A function that returns a {@link module:ui/view~View}
57
+ * that will be labeled. The following arguments are passed to the creator function:
58
+ *
59
+ * * an instance of the `LabeledFieldView` to allow binding observable properties,
60
+ * * an UID string that connects the {@link #labelView label} and the labeled field view in DOM,
61
+ * * an UID string that connects the {@link #statusView status} and the labeled field view in DOM.
62
+ */
63
+ constructor(locale, viewCreator) {
64
+ super(locale);
65
+ const viewUid = `ck-labeled-field-view-${uid()}`;
66
+ const statusUid = `ck-labeled-field-view-status-${uid()}`;
67
+ /**
68
+ * The field view that gets labeled.
69
+ *
70
+ * @member {module:ui/view~View} #fieldView
71
+ */
72
+ this.fieldView = viewCreator(this, viewUid, statusUid);
73
+ /**
74
+ * The text of the label.
75
+ *
76
+ * @observable
77
+ * @member {String} #label
78
+ */
79
+ this.set('label', undefined);
80
+ /**
81
+ * Controls whether the component is in read-only mode.
82
+ *
83
+ * @observable
84
+ * @member {Boolean} #isEnabled
85
+ */
86
+ this.set('isEnabled', true);
87
+ /**
88
+ * An observable flag set to `true` when {@link #fieldView} is empty (`false` otherwise).
89
+ *
90
+ * @readonly
91
+ * @observable
92
+ * @member {Boolean} #isEmpty
93
+ * @default true
94
+ */
95
+ this.set('isEmpty', true);
96
+ /**
97
+ * An observable flag set to `true` when {@link #fieldView} is currently focused by
98
+ * the user (`false` otherwise).
99
+ *
100
+ * @readonly
101
+ * @observable
102
+ * @member {Boolean} #isFocused
103
+ * @default false
104
+ */
105
+ this.set('isFocused', false);
106
+ /**
107
+ * The validation error text. When set, it will be displayed
108
+ * next to the {@link #fieldView} as a typical validation error message.
109
+ * Set it to `null` to hide the message.
110
+ *
111
+ * **Note:** Setting this property to anything but `null` will automatically
112
+ * make the `hasError` of the {@link #fieldView} `true`.
113
+ *
114
+ * @observable
115
+ * @member {String|null} #errorText
116
+ */
117
+ this.set('errorText', null);
118
+ /**
119
+ * The additional information text displayed next to the {@link #fieldView} which can
120
+ * be used to inform the user about its purpose, provide help or hints.
121
+ *
122
+ * Set it to `null` to hide the message.
123
+ *
124
+ * **Note:** This text will be displayed in the same place as {@link #errorText} but the
125
+ * latter always takes precedence: if the {@link #errorText} is set, it replaces
126
+ * {@link #infoText}.
127
+ *
128
+ * @observable
129
+ * @member {String|null} #infoText
130
+ * @default null
131
+ */
132
+ this.set('infoText', null);
133
+ /**
134
+ * (Optional) The additional CSS class set on the dropdown {@link #element}.
135
+ *
136
+ * @observable
137
+ * @member {String} #class
138
+ */
139
+ this.set('class', undefined);
140
+ /**
141
+ * The content of the `placeholder` attribute of the {@link #fieldView}.
142
+ *
143
+ * @observable
144
+ * @member {String} #placeholder
145
+ */
146
+ this.set('placeholder', undefined);
147
+ /**
148
+ * The label view instance that describes the entire view.
149
+ *
150
+ * @member {module:ui/label/labelview~LabelView} #labelView
151
+ */
152
+ this.labelView = this._createLabelView(viewUid);
153
+ /**
154
+ * The status view for the {@link #fieldView}. It displays {@link #errorText} and
155
+ * {@link #infoText}.
156
+ *
157
+ * @member {module:ui/view~View} #statusView
158
+ */
159
+ this.statusView = this._createStatusView(statusUid);
160
+ /**
161
+ * A collection of children of the internal wrapper element. Allows inserting additional DOM elements (views) next to
162
+ * the {@link #fieldView} for easy styling (e.g. positioning).
163
+ *
164
+ * By default, the collection contains {@link #fieldView} and {@link #labelView}.
165
+ *
166
+ * @member {module:ui/viewcollection~ViewCollection} #fieldWrapperChildren
167
+ */
168
+ this.fieldWrapperChildren = this.createCollection([this.fieldView, this.labelView]);
169
+ /**
170
+ * The combined status text made of {@link #errorText} and {@link #infoText}.
171
+ * Note that when present, {@link #errorText} always takes precedence in the
172
+ * status.
173
+ *
174
+ * @see #errorText
175
+ * @see #infoText
176
+ * @see #statusView
177
+ * @private
178
+ * @observable
179
+ * @member {String|null} #_statusText
180
+ */
181
+ this.bind('_statusText').to(this, 'errorText', this, 'infoText', (errorText, infoText) => errorText || infoText);
182
+ const bind = this.bindTemplate;
183
+ this.setTemplate({
184
+ tag: 'div',
185
+ attributes: {
186
+ class: [
187
+ 'ck',
188
+ 'ck-labeled-field-view',
189
+ bind.to('class'),
190
+ bind.if('isEnabled', 'ck-disabled', value => !value),
191
+ bind.if('isEmpty', 'ck-labeled-field-view_empty'),
192
+ bind.if('isFocused', 'ck-labeled-field-view_focused'),
193
+ bind.if('placeholder', 'ck-labeled-field-view_placeholder'),
194
+ bind.if('errorText', 'ck-error')
195
+ ]
196
+ },
197
+ children: [
198
+ {
199
+ tag: 'div',
200
+ attributes: {
201
+ class: [
202
+ 'ck',
203
+ 'ck-labeled-field-view__input-wrapper'
204
+ ]
205
+ },
206
+ children: this.fieldWrapperChildren
207
+ },
208
+ this.statusView
209
+ ]
210
+ });
211
+ }
212
+ /**
213
+ * Creates label view class instance and bind with view.
214
+ *
215
+ * @private
216
+ * @param {String} id Unique id to set as labelView#for attribute.
217
+ * @returns {module:ui/label/labelview~LabelView}
218
+ */
219
+ _createLabelView(id) {
220
+ const labelView = new LabelView(this.locale);
221
+ labelView.for = id;
222
+ labelView.bind('text').to(this, 'label');
223
+ return labelView;
224
+ }
225
+ /**
226
+ * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}
227
+ * next to the {@link #fieldView}. See {@link #_statusText}.
228
+ *
229
+ * @private
230
+ * @param {String} statusUid Unique id of the status, shared with the {@link #fieldView view's}
231
+ * `aria-describedby` attribute.
232
+ * @returns {module:ui/view~View}
233
+ */
234
+ _createStatusView(statusUid) {
235
+ const statusView = new View(this.locale);
236
+ const bind = this.bindTemplate;
237
+ statusView.setTemplate({
238
+ tag: 'div',
239
+ attributes: {
240
+ class: [
241
+ 'ck',
242
+ 'ck-labeled-field-view__status',
243
+ bind.if('errorText', 'ck-labeled-field-view__status_error'),
244
+ bind.if('_statusText', 'ck-hidden', value => !value)
245
+ ],
246
+ id: statusUid,
247
+ role: bind.if('errorText', 'alert')
248
+ },
249
+ children: [
250
+ {
251
+ text: bind.to('_statusText')
252
+ }
253
+ ]
254
+ });
255
+ return statusView;
256
+ }
257
+ /**
258
+ * Focuses the {@link #fieldView}.
259
+ */
260
+ focus() {
261
+ this.fieldView.focus();
262
+ }
286
263
  }
@@ -2,15 +2,12 @@
2
2
  * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved.
3
3
  * For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
4
4
  */
5
-
6
5
  /**
7
6
  * @module ui/labeledfield/utils
8
7
  */
9
-
10
8
  import InputTextView from '../inputtext/inputtextview';
11
9
  import InputNumberView from '../inputnumber/inputnumberview';
12
10
  import { createDropdown } from '../dropdown/utils';
13
-
14
11
  /**
15
12
  * A helper for creating labeled inputs.
16
13
  *
@@ -36,28 +33,22 @@ import { createDropdown } from '../dropdown/utils';
36
33
  * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.
37
34
  * @returns {module:ui/inputtext/inputtextview~InputTextView} The input text view instance.
38
35
  */
39
- export function createLabeledInputText( labeledFieldView, viewUid, statusUid ) {
40
- const inputView = new InputTextView( labeledFieldView.locale );
41
-
42
- inputView.set( {
43
- id: viewUid,
44
- ariaDescribedById: statusUid
45
- } );
46
-
47
- inputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );
48
- inputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );
49
-
50
- inputView.on( 'input', () => {
51
- // UX: Make the error text disappear and disable the error indicator as the user
52
- // starts fixing the errors.
53
- labeledFieldView.errorText = null;
54
- } );
55
-
56
- labeledFieldView.bind( 'isEmpty', 'isFocused', 'placeholder' ).to( inputView );
57
-
58
- return inputView;
36
+ export function createLabeledInputText(labeledFieldView, viewUid, statusUid) {
37
+ const inputView = new InputTextView(labeledFieldView.locale);
38
+ inputView.set({
39
+ id: viewUid,
40
+ ariaDescribedById: statusUid
41
+ });
42
+ inputView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', value => !value);
43
+ inputView.bind('hasError').to(labeledFieldView, 'errorText', value => !!value);
44
+ inputView.on('input', () => {
45
+ // UX: Make the error text disappear and disable the error indicator as the user
46
+ // starts fixing the errors.
47
+ labeledFieldView.errorText = null;
48
+ });
49
+ labeledFieldView.bind('isEmpty', 'isFocused', 'placeholder').to(inputView);
50
+ return inputView;
59
51
  }
60
-
61
52
  /**
62
53
  * A helper for creating labeled number inputs.
63
54
  *
@@ -83,29 +74,23 @@ export function createLabeledInputText( labeledFieldView, viewUid, statusUid ) {
83
74
  * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view's status} and the input.
84
75
  * @returns {module:ui/inputnumber/inputnumberview~InputNumberView} The input number view instance.
85
76
  */
86
- export function createLabeledInputNumber( labeledFieldView, viewUid, statusUid ) {
87
- const inputView = new InputNumberView( labeledFieldView.locale );
88
-
89
- inputView.set( {
90
- id: viewUid,
91
- ariaDescribedById: statusUid,
92
- inputMode: 'numeric'
93
- } );
94
-
95
- inputView.bind( 'isReadOnly' ).to( labeledFieldView, 'isEnabled', value => !value );
96
- inputView.bind( 'hasError' ).to( labeledFieldView, 'errorText', value => !!value );
97
-
98
- inputView.on( 'input', () => {
99
- // UX: Make the error text disappear and disable the error indicator as the user
100
- // starts fixing the errors.
101
- labeledFieldView.errorText = null;
102
- } );
103
-
104
- labeledFieldView.bind( 'isEmpty', 'isFocused', 'placeholder' ).to( inputView );
105
-
106
- return inputView;
77
+ export function createLabeledInputNumber(labeledFieldView, viewUid, statusUid) {
78
+ const inputView = new InputNumberView(labeledFieldView.locale);
79
+ inputView.set({
80
+ id: viewUid,
81
+ ariaDescribedById: statusUid,
82
+ inputMode: 'numeric'
83
+ });
84
+ inputView.bind('isReadOnly').to(labeledFieldView, 'isEnabled', value => !value);
85
+ inputView.bind('hasError').to(labeledFieldView, 'errorText', value => !!value);
86
+ inputView.on('input', () => {
87
+ // UX: Make the error text disappear and disable the error indicator as the user
88
+ // starts fixing the errors.
89
+ labeledFieldView.errorText = null;
90
+ });
91
+ labeledFieldView.bind('isEmpty', 'isFocused', 'placeholder').to(inputView);
92
+ return inputView;
107
93
  }
108
-
109
94
  /**
110
95
  * A helper for creating labeled dropdowns.
111
96
  *
@@ -129,15 +114,12 @@ export function createLabeledInputNumber( labeledFieldView, viewUid, statusUid )
129
114
  * {@link module:ui/labeledfield/labeledfieldview~LabeledFieldView#statusView labeled view status} and the dropdown.
130
115
  * @returns {module:ui/dropdown/dropdownview~DropdownView} The dropdown view instance.
131
116
  */
132
- export function createLabeledDropdown( labeledFieldView, viewUid, statusUid ) {
133
- const dropdownView = createDropdown( labeledFieldView.locale );
134
-
135
- dropdownView.set( {
136
- id: viewUid,
137
- ariaDescribedById: statusUid
138
- } );
139
-
140
- dropdownView.bind( 'isEnabled' ).to( labeledFieldView );
141
-
142
- return dropdownView;
117
+ export function createLabeledDropdown(labeledFieldView, viewUid, statusUid) {
118
+ const dropdownView = createDropdown(labeledFieldView.locale);
119
+ dropdownView.set({
120
+ id: viewUid,
121
+ ariaDescribedById: statusUid
122
+ });
123
+ dropdownView.bind('isEnabled').to(labeledFieldView);
124
+ return dropdownView;
143
125
  }