44 */
55
66/**
7- * @module ui/labeledview/labeledview
7+ * @module ui/labeledfield/labeledfieldview
88 */
99
1010import View from '../view' ;
1111import uid from '@ckeditor/ckeditor5-utils/src/uid' ;
1212import LabelView from '../label/labelview' ;
13- import '../../theme/components/labeledview/labeledview .css' ;
13+ import '../../theme/components/labeledfield/labeledfieldview .css' ;
1414
1515/**
16- * The labeled view class. It can be used to enhance any view with the following features:
16+ * The labeled field view class. It can be used to enhance any view with the following features:
1717 *
1818 * * a label,
1919 * * (optional) an error message,
@@ -25,16 +25,16 @@ import '../../theme/components/labeledview/labeledview.css';
2525 * The constructor of this class requires a callback that returns a view to be labeled. The callback
2626 * is called with unique ids that allow binding of DOM properties:
2727 *
28- * const labeledInputView = new LabeledView ( locale, ( labeledView , viewUid, statusUid ) => {
29- * const inputView = new InputTextView( labeledView .locale );
28+ * const labeledInputView = new LabeledFieldView ( locale, ( labeledFieldView , viewUid, statusUid ) => {
29+ * const inputView = new InputTextView( labeledFieldView .locale );
3030 *
3131 * inputView.set( {
3232 * id: viewUid,
3333 * ariaDescribedById: statusUid
3434 * } );
3535 *
36- * inputView.bind( 'isReadOnly' ).to( labeledView , 'isEnabled', value => !value );
37- * inputView.bind( 'hasError' ).to( labeledView , 'errorText', value => !!value );
36+ * inputView.bind( 'isReadOnly' ).to( labeledFieldView , 'isEnabled', value => !value );
37+ * inputView.bind( 'hasError' ).to( labeledFieldView , 'errorText', value => !!value );
3838 *
3939 * return inputView;
4040 * } );
@@ -45,23 +45,23 @@ import '../../theme/components/labeledview/labeledview.css';
4545 *
4646 * document.body.append( labeledInputView.element );
4747 *
48- * See {@link module:ui/labeledview /utils} to discover ready–to–use labeled input helpers for common
48+ * See {@link module:ui/labeledfield /utils} to discover ready–to–use labeled input helpers for common
4949 * UI components.
5050 *
5151 * @extends module:ui/view~View
5252 */
53- export default class LabeledView extends View {
53+ export default class LabeledFieldView extends View {
5454 /**
55- * Creates an instance of the labeled view class using a provided creator function
55+ * Creates an instance of the labeled field view class using a provided creator function
5656 * that provides the view to be labeled.
5757 *
5858 * @param {module:utils/locale~Locale } locale The locale instance.
5959 * @param {Function } viewCreator A function that returns a {@link module:ui/view~View}
6060 * that will be labeled. The following arguments are passed to the creator function:
6161 *
62- * * an instance of the `LabeledView ` to allow binding observable properties,
63- * * an UID string that connects the {@link #labelView label} and the labeled view in DOM,
64- * * an UID string that connects the {@link #statusView status} and the labeled view in DOM.
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.
6565 */
6666 constructor ( locale , viewCreator ) {
6767 super ( locale ) ;
@@ -70,11 +70,11 @@ export default class LabeledView extends View {
7070 const statusUid = `ck-labeled-view-status-${ uid ( ) } ` ;
7171
7272 /**
73- * The view that gets labeled.
73+ * The field view that gets labeled.
7474 *
75- * @member {module:ui/view~View} #view
75+ * @member {module:ui/view~View} #fieldView
7676 */
77- this . view = viewCreator ( this , viewUid , statusUid ) ;
77+ this . fieldView = viewCreator ( this , viewUid , statusUid ) ;
7878
7979 /**
8080 * The text of the label.
@@ -94,19 +94,19 @@ export default class LabeledView extends View {
9494
9595 /**
9696 * The validation error text. When set, it will be displayed
97- * next to the {@link #view } as a typical validation error message.
97+ * next to the {@link #fieldView } as a typical validation error message.
9898 * Set it to `null` to hide the message.
9999 *
100100 * **Note:** Setting this property to anything but `null` will automatically
101- * make the `hasError` of the {@link #view } `true`.
101+ * make the `hasError` of the {@link #fieldView } `true`.
102102 *
103103 * @observable
104104 * @member {String|null} #errorText
105105 */
106106 this . set ( 'errorText' , null ) ;
107107
108108 /**
109- * The additional information text displayed next to the {@link #view } which can
109+ * The additional information text displayed next to the {@link #fieldView } which can
110110 * be used to inform the user about its purpose, provide help or hints.
111111 *
112112 * Set it to `null` to hide the message.
@@ -136,7 +136,7 @@ export default class LabeledView extends View {
136136 this . labelView = this . _createLabelView ( viewUid ) ;
137137
138138 /**
139- * The status view for the {@link #view }. It displays {@link #errorText} and
139+ * The status view for the {@link #fieldView }. It displays {@link #errorText} and
140140 * {@link #infoText}.
141141 *
142142 * @member {module:ui/view~View} #statusView
@@ -175,7 +175,7 @@ export default class LabeledView extends View {
175175 } ,
176176 children : [
177177 this . labelView ,
178- this . view ,
178+ this . fieldView ,
179179 this . statusView
180180 ]
181181 } ) ;
@@ -199,10 +199,10 @@ export default class LabeledView extends View {
199199
200200 /**
201201 * Creates the status view instance. It displays {@link #errorText} and {@link #infoText}
202- * next to the {@link #view }. See {@link #_statusText}.
202+ * next to the {@link #fieldView }. See {@link #_statusText}.
203203 *
204204 * @private
205- * @param {String } statusUid Unique id of the status, shared with the {@link #view view's}
205+ * @param {String } statusUid Unique id of the status, shared with the {@link #fieldView view's}
206206 * `aria-describedby` attribute.
207207 * @returns {module:ui/view~View }
208208 */
@@ -233,9 +233,9 @@ export default class LabeledView extends View {
233233 }
234234
235235 /**
236- * Focuses the {@link #view }.
236+ * Focuses the {@link #fieldView }.
237237 */
238238 focus ( ) {
239- this . view . focus ( ) ;
239+ this . fieldView . focus ( ) ;
240240 }
241241}
0 commit comments