Răsfoiți Sursa

Changed paths and API docs.

Piotrek Koszuliński 10 ani în urmă
părinte
comite
2135d10fb6

+ 5 - 5
packages/ckeditor5-ui/src/ui/bindings/toolbar.js → packages/ckeditor5-ui/src/bindings/toolbar.js

@@ -5,12 +5,12 @@
 
 'use strict';
 
-import BaseToolbar from '../../../ui/toolbar/toolbar.js';
+import BaseToolbar from '../toolbar/toolbar.js';
 
 /**
  * The editor toolbar controller class.
  *
- * @memberOf core.ui.bindings
+ * @memberOf ui.bindings
  * @extends ui.toolbar.Toolbar
  */
 
@@ -18,8 +18,8 @@ export default class Toolbar extends BaseToolbar {
 	/**
 	 * Creates a new toolbar instance.
 	 *
-	 * @param {core.ui.Model} model
-	 * @param {core.ui.View} view
+	 * @param {ui.Model} model
+	 * @param {ui.View} view
 	 * @param {core.Editor} editor
 	 */
 	constructor( model, view, editor ) {
@@ -29,7 +29,7 @@ export default class Toolbar extends BaseToolbar {
 	}
 
 	/**
-	 * Adds buttons to the toolbar. Buttons are taken from the {@link core.editorUI.EditorUI#featureComponents}
+	 * Adds buttons to the toolbar. Buttons are taken from the {@link ui.editorUI.EditorUI#featureComponents}
 	 * factory.
 	 *
 	 * @param {String[]} buttons The name of the buttons to add to the toolbar.

+ 6 - 6
packages/ckeditor5-ui/src/ui/componentfactory.js → packages/ckeditor5-ui/src/componentfactory.js

@@ -5,7 +5,7 @@
 
 'use strict';
 
-import CKEditorError from '../../utils/ckeditorerror.js';
+import CKEditorError from '../utils/ckeditorerror.js';
 
 /**
  * Class implementing the UI component factory.
@@ -16,7 +16,7 @@ import CKEditorError from '../../utils/ckeditorerror.js';
  *
  * The main use case for the component factory is the {@link core.editorUI.EditorUI#featureComponents} factory.
  *
- * @memberOf core.ui
+ * @memberOf ui
  */
 
 export default class ComponentFactory {
@@ -29,7 +29,7 @@ export default class ComponentFactory {
 	constructor( editor ) {
 		/**
 		 * @readonly
-		 * @member {core.Editor} core.ui.ComponentFactory#editor
+		 * @member {core.Editor} ui.ComponentFactory#editor
 		 */
 		this.editor = editor;
 
@@ -37,7 +37,7 @@ export default class ComponentFactory {
 		 * Registered component factories.
 		 *
 		 * @private
-		 * @member {Map} core.ui.ComponentFactory#_components
+		 * @member {Map} ui.ComponentFactory#_components
 		 */
 		this._components = new Map();
 	}
@@ -48,7 +48,7 @@ export default class ComponentFactory {
 	 * @param {String} name The name of the component.
 	 * @param {Function} ControllerClass The component controller constructor.
 	 * @param {Function} ViewClass The component view constructor.
-	 * @param {core.ui.Model} model The model of the component.
+	 * @param {ui.Model} model The model of the component.
 	 */
 	add( name, ControllerClass, ViewClass, model ) {
 		if ( this._components.get( name ) ) {
@@ -68,7 +68,7 @@ export default class ComponentFactory {
 	 * Creates a component instance.
 	 *
 	 * @param {String} name The name of the component.
-	 * @returns {core.ui.Controller} The instantiated component.
+	 * @returns {ui.Controller} The instantiated component.
 	 */
 	create( name ) {
 		const component = this._components.get( name );

+ 16 - 16
packages/ckeditor5-ui/src/ui/controller.js → packages/ckeditor5-ui/src/controller.js

@@ -5,44 +5,44 @@
 
 'use strict';
 
-import Collection from '../../utils/collection.js';
-import CKEditorError from '../../utils/ckeditorerror.js';
-import EmitterMixin from '../../utils/emittermixin.js';
-import utils from '../../utils/utils.js';
+import Collection from '../utils/collection.js';
+import CKEditorError from '../utils/ckeditorerror.js';
+import EmitterMixin from '../utils/emittermixin.js';
+import utils from '../utils/utils.js';
 
 /**
  * Basic Controller class.
  *
- * @memberOf core.ui
- * @mixes core.EmitterMixin
+ * @memberOf ui
+ * @mixes utils.EmitterMixin
  */
 
 export default class Controller {
 	/**
-	 * Creates an instance of the {@link core.ui.Controller} class.
+	 * Creates an instance of the {@link ui.Controller} class.
 	 *
-	 * @param {core.ui.Model} [model] Model of this Controller.
-	 * @param {core.ui.View} [view] View instance of this Controller.
+	 * @param {ui.Model} [model] Model of this Controller.
+	 * @param {ui.View} [view] View instance of this Controller.
 	 */
 	constructor( model, view ) {
 		/**
 		 * Model of this controller.
 		 *
-		 * @member {core.ui.Model} core.ui.Controller#model
+		 * @member {ui.Model} ui.Controller#model
 		 */
 		this.model = model || null;
 
 		/**
 		 * Set `true` after {@link #init}.
 		 *
-		 * @member {Boolean} core.ui.Controller#ready
+		 * @member {Boolean} ui.Controller#ready
 		 */
 		this.ready = false;
 
 		/**
 		 * View of this controller.
 		 *
-		 * @member {core.ui.View} core.ui.Controller#view
+		 * @member {ui.View} ui.Controller#view
 		 */
 		this.view = view || null;
 
@@ -50,7 +50,7 @@ export default class Controller {
 		 * A collection of {@link ControllerCollection} instances containing
 		 * child controllers.
 		 *
-		 * @member {utils.Collection} core.ui.Controller#collections
+		 * @member {utils.Collection} ui.Controller#collections
 		 */
 		this.collections = new Collection( {
 			idProperty: 'name'
@@ -156,7 +156,7 @@ export default class Controller {
 	 * Adds a child {@link Controller} instance to {@link #collections} at given index.
 	 *
 	 * @param {String} collectionName Name of the Controller Collection.
-	 * @param {core.ui.Controller} controller A controller instance to be added.
+	 * @param {ui.Controller} controller A controller instance to be added.
 	 * @param {Number} [index] An index in the collection.
 	 */
 	add( collectionName, controller, index ) {
@@ -164,10 +164,10 @@ export default class Controller {
 	}
 
 	/**
-	 * Removes a child {@link Controller} instance from one of {@link #collections}.
+	 * Removes a child {@link ui.Controller} instance from one of {@link ui.Controller#collections}.
 	 *
 	 * @param {String} collectionName Name of the Controller Collection.
-	 * @param {core.ui.Controller|Number} toRemove A Controller instance or index to be removed.
+	 * @param {ui.Controller|Number} toRemove A Controller instance or index to be removed.
 	 */
 	remove( collectionName, toRemove ) {
 		return this.collections.get( collectionName ).remove( toRemove );

+ 8 - 8
packages/ckeditor5-ui/src/ui/controllercollection.js → packages/ckeditor5-ui/src/controllercollection.js

@@ -5,13 +5,13 @@
 
 'use strict';
 
-import Collection from '../../utils/collection.js';
-import CKEditorError from '../../utils/ckeditorerror.js';
+import Collection from '../utils/collection.js';
+import CKEditorError from '../utils/ckeditorerror.js';
 
 /**
  * Manages UI Controllers.
  *
- * @memberOf core.ui
+ * @memberOf ui
  * @extends utils.Collection
  */
 export default class ControllerCollection extends Collection {
@@ -33,25 +33,25 @@ export default class ControllerCollection extends Collection {
 		/**
 		 * Name of this collection.
 		 *
-		 * @member {String} core.ui.ControllerCollection#name
+		 * @member {String} ui.ControllerCollection#name
 		 */
 		this.name = name;
 
 		/**
 		 * Parent controller of this collection.
 		 *
-		 * @member {core.ui.Controller} core.ui.ControllerCollection#parent
+		 * @member {ui.Controller} ui.ControllerCollection#parent
 		 */
 		this.parent = null;
 	}
 
 	/**
-	 * Adds a child controller to the collection. If {@link #parent} {@link Controller}
+	 * Adds a child controller to the collection. If {@link ui.ControllerCollection#parent} {@link ui.Controller}
 	 * instance is ready, the child view is initialized when added.
 	 *
-	 * @param {core.ui.Controller} controller A child controller.
+	 * @param {ui.Controller} controller A child controller.
 	 * @param {Number} [index] Index at which the child will be added to the collection.
-	 * @returns {Promise} A Promise resolved when the child {@link Controller#init} is done.
+	 * @returns {Promise} A Promise resolved when the child {@link ui.Controller#init} is done.
 	 */
 	add( controller, index ) {
 		super.add( controller, index );

+ 24 - 24
packages/ckeditor5-ui/src/ui/domemittermixin.js → packages/ckeditor5-ui/src/domemittermixin.js

@@ -5,18 +5,18 @@
 
 'use strict';
 
-import EmitterMixin from '../../utils/emittermixin.js';
-import utils from '../../utils/utils.js';
-import extend from '../../utils/lib/lodash/extend.js';
-import log from '../../utils/log.js';
+import EmitterMixin from '../utils/emittermixin.js';
+import utils from '../utils/utils.js';
+import extend from '../utils/lib/lodash/extend.js';
+import log from '../utils/log.js';
 
 /**
  * Creates a ProxyEmitter instance. Such an instance is a bridge between a DOM Node firing events
- * and any Host listening to them. It is backwards compatible with {@link EmitterMixin#on}.
+ * and any Host listening to them. It is backwards compatible with {@link utils.EmitterMixin#on}.
  *
- * @memberOf core.ui
- * @mixes core.EmitterMixin
- * @implements core.ui.DOMEmitter
+ * @memberOf ui
+ * @mixes utils.EmitterMixin
+ * @implements ui.DOMEmitter
  */
 class ProxyEmitter {
 	/**
@@ -37,7 +37,7 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 * Collection of native DOM listeners.
 	 *
 	 * @private
-	 * @member {Object} core.ui.ProxyEmitter#_domListeners
+	 * @member {Object} ui.ProxyEmitter#_domListeners
 	 */
 
 	/**
@@ -53,7 +53,7 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 * @param {Number} [priority=10] The priority of this callback in relation to other callbacks to that same event.
 	 * Lower values are called first.
 	 *
-	 * @method core.ui.ProxyEmitter#on
+	 * @method ui.ProxyEmitter#on
 	 */
 	on( event ) {
 		// Execute parent class method first.
@@ -87,7 +87,7 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 * @param {Object} [ctx] The context object to be removed, pared with the given callback. To handle cases where
 	 * the same callback is used several times with different contexts.
 	 *
-	 * @method core.ui.ProxyEmitter#off
+	 * @method ui.ProxyEmitter#off
 	 */
 	off( event ) {
 		// Execute parent class method first.
@@ -110,7 +110,7 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 	 *
 	 * @param {String} event
 	 *
-	 * @method core.ui.ProxyEmitter#_createDomListener
+	 * @method ui.ProxyEmitter#_createDomListener
 	 * @returns {Function} The DOM listener callback.
 	 */
 	_createDomListener( event ) {
@@ -132,7 +132,7 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
 
 /**
  * Mixin that injects the DOM events API into its host. It provides the API
- * compatible with {@link EmitterMixin}.
+ * compatible with {@link utils.EmitterMixin}.
  *
  *                                  listenTo( click, ... )
  *                    +-----------------------------------------+
@@ -156,23 +156,23 @@ extend( ProxyEmitter.prototype, EmitterMixin, {
  *                    +-----------------------------------------+
  *                                fire( click, DOM Event )
  *
- * @mixin core.ui.DOMEmitterMixin
+ * @mixin ui.DOMEmitterMixin
  * @mixes core.EmitterMixin
- * @implements core.ui.DOMEmitter
+ * @implements ui.DOMEmitter
  */
 const DOMEmitterMixin = extend( {}, EmitterMixin, {
 	/**
 	 * Registers a callback function to be executed when an event is fired in a specific Emitter or DOM Node.
-	 * It is backwards compatible with {@link core.EmitterMixin#listenTo}.
+	 * It is backwards compatible with {@link utils.EmitterMixin#listenTo}.
 	 *
-	 * @param {Emitter|Node} emitter The object that fires the event.
+	 * @param {utils.Emitter|Node} emitter The object that fires the event.
 	 * @param {String} event The name of the event.
 	 * @param {Function} callback The function to be called on event.
 	 * @param {Object} [ctx] The object that represents `this` in the callback. Defaults to `emitter`.
 	 * @param {Number} [priority=10] The priority of this callback in relation to other callbacks to that same event.
 	 * Lower values are called first.
 	 *
-	 * @method core.ui.DOMEmitterMixin#listenTo
+	 * @method ui.DOMEmitterMixin#listenTo
 	 */
 	listenTo() {
 		const args = Array.prototype.slice.call( arguments );
@@ -190,20 +190,20 @@ const DOMEmitterMixin = extend( {}, EmitterMixin, {
 
 	/**
 	 * Stops listening for events. It can be used at different levels:
-	 * It is backwards compatible with {@link EmitterMixin#listenTo}.
+	 * It is backwards compatible with {@link utils.EmitterMixin#listenTo}.
 	 *
 	 * * To stop listening to a specific callback.
 	 * * To stop listening to a specific event.
 	 * * To stop listening to all events fired by a specific object.
 	 * * To stop listening to all events fired by all object.
 	 *
-	 * @param {Emitter|Node} [emitter] The object to stop listening to. If omitted, stops it for all objects.
+	 * @param {utils.Emitter|Node} [emitter] The object to stop listening to. If omitted, stops it for all objects.
 	 * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it
 	 * for all events from `emitter`.
 	 * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given
 	 * `event`.
 	 *
-	 * @method core.ui.DOMEmitterMixin#stopListening
+	 * @method ui.DOMEmitterMixin#stopListening
 	 */
 	stopListening() {
 		const args = Array.prototype.slice.call( arguments );
@@ -231,7 +231,7 @@ const DOMEmitterMixin = extend( {}, EmitterMixin, {
 	 * Retrieves ProxyEmitter instance for given DOM Node residing in this Host.
 	 *
 	 * @param {Node} node DOM Node of the ProxyEmitter.
-	 * @method core.ui.DOMEmitterMixin#_getProxyEmitter
+	 * @method ui.DOMEmitterMixin#_getProxyEmitter
 	 * @return {ProxyEmitter} ProxyEmitter instance or null.
 	 */
 	_getProxyEmitter( node ) {
@@ -272,7 +272,7 @@ function isDomNode( node ) {
 }
 
 /**
- * Interface representing classes which mix in {@link core.ui.DOMEmitter}.
+ * Interface representing classes which mix in {@link ui.DOMEmitter}.
  *
- * @interface core.ui.DOMEmitter
+ * @interface ui.DOMEmitter
  */

+ 1 - 1
packages/ckeditor5-ui/src/editable.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.editable
+ * @namespace ui.editable
  */

+ 12 - 12
packages/ckeditor5-ui/src/editable/editable.js

@@ -5,14 +5,14 @@
 
 'use strict';
 
-import Controller from '../ui/controller.js';
-import Model from '../ui/model.js';
-import utils from '../../utils/utils.js';
-import ObservableMixin from '../../utils/observablemixin.js';
+import Controller from '../controller.js';
+import Model from '../model.js';
+import utils from '../utils/utils.js';
+import ObservableMixin from '../utils/observablemixin.js';
 
 /**
- * @memberOf core.editable
- * @extends core.ui.Controller
+ * @memberOf ui.editable
+ * @extends ui.Controller
  * @mixes utils.ObservaleMixin
  */
 export default class Editable extends Controller {
@@ -29,7 +29,7 @@ export default class Editable extends Controller {
 		/**
 		 * Whether the editable is in read-write or read-only mode.
 		 *
-		 * @member {Boolean} core.editable.Editable#isEditable
+		 * @member {Boolean} ui.editable.Editable#isEditable
 		 */
 		this.set( 'isEditable', true );
 
@@ -37,7 +37,7 @@ export default class Editable extends Controller {
 		 * Whether the editable is focused.
 		 *
 		 * @readonly
-		 * @member {Boolean} core.editable.Editable#isFocused
+		 * @member {Boolean} ui.editable.Editable#isFocused
 		 */
 		this.set( 'isFocused', false );
 	}
@@ -46,7 +46,7 @@ export default class Editable extends Controller {
 	 * The model for the editable view.
 	 *
 	 * @readonly
-	 * @type {core.ui.Model}
+	 * @type {ui.Model}
 	 */
 	get viewModel() {
 		if ( this._viewModel ) {
@@ -88,18 +88,18 @@ utils.mix( Editable, ObservableMixin );
 /**
  * The editable model interface.
  *
- * @memberOf core.editable
+ * @memberOf ui.editable
  * @interface EditableModel
  */
 
 /**
  * Whether the editable has focus.
  *
- * @member {Boolean} core.editable.EditableModel#isFocused
+ * @member {Boolean} ui.editable.EditableModel#isFocused
  */
 
 /**
  * Whether the editable is not in read-only mode.
  *
- * @member {Boolean} core.editable.EditableModel#isEditable
+ * @member {Boolean} ui.editable.EditableModel#isEditable
  */

+ 5 - 5
packages/ckeditor5-ui/src/editable/editableview.js

@@ -5,19 +5,19 @@
 
 'use strict';
 
-import View from '../ui/view.js';
-import CKEditorError from '../../utils/ckeditorerror.js';
+import View from '../view.js';
+import CKEditorError from '../utils/ckeditorerror.js';
 
 /**
- * @memberOf core.editable
- * @extends core.ui.View
+ * @memberOf ui.editable
+ * @extends ui.View
  */
 export default class EditableView extends View {
 	/**
 	 * The element which is the main editable element (usually the one with `contentEditable="true"`).
 	 *
 	 * @readonly
-	 * @member {HTMLElement} core.editable.EditableView#editableElement
+	 * @member {HTMLElement} ui.editable.EditableView#editableElement
 	 */
 
 	/**

+ 1 - 1
packages/ckeditor5-ui/src/ui.jsdoc → packages/ckeditor5-ui/src/editorui.jsdoc

@@ -4,5 +4,5 @@
  */
 
 /**
- * @namespace core.ui
+ * @namespace ui.editorUI
  */

+ 7 - 7
packages/ckeditor5-ui/src/editorui/editorui.js

@@ -5,17 +5,17 @@
 
 'use strict';
 
-import Controller from '../ui/controller.js';
-import ControllerCollection from '../ui/controllercollection.js';
-import ComponentFactory from '../ui/componentfactory.js';
-import ObservableMixin from '../../utils/observablemixin.js';
-import utils from '../../utils/utils.js';
+import Controller from '../controller.js';
+import ControllerCollection from '../controllercollection.js';
+import ComponentFactory from '../componentfactory.js';
+import ObservableMixin from '../utils/observablemixin.js';
+import utils from '../utils/utils.js';
 
 /**
  * Base class for the editor main view controllers.
  *
- * @memberOf core.editorUI
- * @extends core.ui.Controller
+ * @memberOf ui.editorUI
+ * @extends ui.Controller
  * @mixes utils.ObservaleMixin
  */
 

+ 4 - 4
packages/ckeditor5-ui/src/editorui/editoruiview.js

@@ -5,13 +5,13 @@
 
 'use strict';
 
-import View from '../ui/view.js';
+import View from '../view.js';
 
 /**
  * Base class for the editor main views.
  *
- * @memberOf core.editorUI
- * @extends core.ui.View
+ * @memberOf ui.editorUI
+ * @extends ui.View
  */
 
 export default class EditorUIView extends View {
@@ -24,7 +24,7 @@ export default class EditorUIView extends View {
 		 * The element holding elements of the 'body' region.
 		 *
 		 * @private
-		 * @member {HTMLElement} core.editorUI.EditorUIView#_bodyRegionContainer
+		 * @member {HTMLElement} ui.editorUI.EditorUIView#_bodyRegionContainer
 		 */
 	}
 

+ 4 - 4
packages/ckeditor5-ui/src/ui/model.js → packages/ckeditor5-ui/src/model.js

@@ -5,14 +5,14 @@
 
 'use strict';
 
-import extend from '../../utils/lib/lodash/extend.js';
-import utils from '../../utils/utils.js';
-import ObservableMixin from '../../utils/observablemixin.js';
+import extend from '../utils/lib/lodash/extend.js';
+import utils from '../utils/utils.js';
+import ObservableMixin from '../utils/observablemixin.js';
 
 /**
  * The base MVC model class.
  *
- * @memberOf core.ui
+ * @memberOf ui
  * @mixes utils.ObservaleMixin
  */
 export default class Model {

+ 3 - 3
packages/ckeditor5-ui/src/ui/region.js → packages/ckeditor5-ui/src/region.js

@@ -5,16 +5,16 @@
 
 'use strict';
 
-import Collection from '../../utils/collection.js';
+import Collection from '../utils/collection.js';
 
 /**
  * Basic Region class.
  *
- * @memberOf core.ui
+ * @memberOf ui
  */
 export default class Region {
 	/**
-	 * Creates an instance of the {@link Region} class.
+	 * Creates an instance of the {@link ui.Region} class.
 	 *
 	 * @param {String} name The name of the Region.
 	 */

+ 35 - 40
packages/ckeditor5-ui/src/ui/template.js → packages/ckeditor5-ui/src/template.js

@@ -12,27 +12,28 @@ import CKEditorError from '../../utils/ckeditorerror.js';
 /**
  * Basic Template class.
  *
- * @memberOf core.ui
+ * @memberOf ui
  */
 export default class Template {
 	/**
-	 * Creates an instance of the {@link Template} class.
+	 * Creates an instance of the {@link ui.Template} class.
 	 *
-	 * @param {core.ui.TemplateDefinition} def The definition of the template.
+	 * @param {ui.TemplateDefinition} def The definition of the template.
 	 */
 	constructor( def ) {
 		/**
 		 * Definition of this template.
 		 *
-		 * @type {core.ui.TemplateDefinition}
+		 * @readonly
+		 * @member {ui.TemplateDefinition} ui.Template#definition
 		 */
 		this.definition = def;
 	}
 
 	/**
-	 * Renders DOM Node using {@link core.ui.Template#definition}.
+	 * Renders DOM Node using {@link ui.Template#definition}.
 	 *
-	 * @see core.ui.Template#apply
+	 * @see ui.Template#apply
 	 *
 	 * @returns {HTMLElement}
 	 */
@@ -41,12 +42,12 @@ export default class Template {
 	}
 
 	/**
-	 * Applies template {@link core.ui.Template#def} to existing DOM tree.
+	 * Applies template {@link ui.Template#def} to existing DOM tree.
 	 *
 	 * **Note:** No new DOM nodes (elements, text nodes) will be created.
 	 *
-	 * @see core.ui.Template#render
-	 * @see core.ui.View#applyTemplateToElement.
+	 * @see ui.Template#render
+	 * @see ui.View#applyTemplateToElement.
 	 *
 	 * @param {Node} element Root element for template to apply.
 	 */
@@ -67,7 +68,7 @@ export default class Template {
 	 * Renders a DOM Node from definition.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Definition of a Node.
+	 * @param {ui.TemplateDefinition} def Definition of a Node.
 	 * @param {Node} applyNode If specified, template `def` will be applied to existing DOM Node.
 	 * @param {Boolean} intoFragment If set, children are rendered into DocumentFragment.
 	 * @returns {HTMLElement} A rendered Node.
@@ -102,7 +103,7 @@ export default class Template {
 	 * Renders an HTMLElement from TemplateDefinition.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Definition of an element.
+	 * @param {ui.TemplateDefinition} def Definition of an element.
 	 * @param {HTMLElement} applyElement If specified, template `def` will be applied to existing HTMLElement.
 	 * @param {Boolean} intoFragment If set, children are rendered into DocumentFragment.
 	 * @returns {HTMLElement} A rendered element.
@@ -165,7 +166,7 @@ export default class Template {
 	 * Renders element attributes from definition.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Definition of an element.
+	 * @param {ui.TemplateDefinition} def Definition of an element.
 	 * @param {HTMLElement} el Element which is rendered.
 	 */
 	_renderElementAttributes( def, el ) {
@@ -208,10 +209,10 @@ export default class Template {
 
 	/**
 	 * Recursively renders element children from definition by
-	 * calling {@link core.ui.Template#_renderElement}.
+	 * calling {@link ui.Template#_renderElement}.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Definition of an element.
+	 * @param {ui.TemplateDefinition} def Definition of an element.
 	 * @param {HTMLElement} el Element which is rendered.
 	 * @param {Boolean} isApply Traverse existing DOM structure only, don't modify DOM.
 	 */
@@ -231,7 +232,7 @@ export default class Template {
 	 * Activates element `on` listeners passed in element definition.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Definition of an element.
+	 * @param {ui.TemplateDefinition} def Definition of an element.
 	 * @param {HTMLElement} el Element which is rendered.
 	 */
 	_activateElementListenerAttachers( def, el ) {
@@ -258,16 +259,13 @@ export default class Template {
 	}
 }
 
-/**
- * Returns an object consisting of `set` and `remove` functions, which
- * can be used in the context of DOM Node to set or reset `textContent`.
- * @see core.ui.View#_getModelBinder
- *
- * @ignore
- * @private
- * @param {Node} node DOM Node to be modified.
- * @returns {Object}
- */
+// Returns an object consisting of `set` and `remove` functions, which
+// can be used in the context of DOM Node to set or reset `textContent`.
+// @see ui.View#_getModelBinder
+//
+// @private
+// @param {Node} node DOM Node to be modified.
+// @returns {Object}
 function getTextNodeUpdater( node ) {
 	return {
 		set( value ) {
@@ -280,17 +278,14 @@ function getTextNodeUpdater( node ) {
 	};
 }
 
-/**
- * Returns an object consisting of `set` and `remove` functions, which
- * can be used in the context of DOM Node to set or reset an attribute.
- * @see core.ui.View#_getModelBinder
- *
- * @ignore
- * @private
- * @param {Node} node DOM Node to be modified.
- * @param {String} attrName Name of the attribute to be modified.
- * @returns {Object}
- */
+// Returns an object consisting of `set` and `remove` functions, which
+// can be used in the context of DOM Node to set or reset an attribute.
+// @see ui.View#_getModelBinder
+//
+// @private
+// @param {Node} node DOM Node to be modified.
+// @param {String} attrName Name of the attribute to be modified.
+// @returns {Object}
 function getElementAttributeUpdater( el, attrName ) {
 	return {
 		set( value ) {
@@ -305,7 +300,7 @@ function getElementAttributeUpdater( el, attrName ) {
 
 /**
  * Definition of {@link Template}.
- * See: {@link core.ui.TemplateValueSchema}.
+ * See: {@link ui.TemplateValueSchema}.
  *
  *		{
  *			tag: 'p',
@@ -337,7 +332,7 @@ function getElementAttributeUpdater( el, attrName ) {
  *			}
  *		}
  *
- * @typedef core.ui.TemplateDefinition
+ * @typedef ui.TemplateDefinition
  * @type Object
  * @property {String} tag
  * @property {Array} [children]
@@ -349,7 +344,7 @@ function getElementAttributeUpdater( el, attrName ) {
 
 /**
  * Describes a value of HTMLElement attribute or `textContent`.
- * See: {@link core.ui.TemplateDefinition}.
+ * See: {@link ui.TemplateDefinition}.
  *
  *		{
  *			tag: 'p',
@@ -365,6 +360,6 @@ function getElementAttributeUpdater( el, attrName ) {
  *			}
  *		}
  *
- * @typedef core.ui.TemplateValueSchema
+ * @typedef ui.TemplateValueSchema
  * @type {Object|String|Array}
  */

+ 53 - 55
packages/ckeditor5-ui/src/ui/view.js → packages/ckeditor5-ui/src/view.js

@@ -5,13 +5,13 @@
 
 'use strict';
 
-import Collection from '../../utils/collection.js';
+import Collection from '../utils/collection.js';
 import Region from './region.js';
 import Template from './template.js';
-import CKEditorError from '../../utils/ckeditorerror.js';
+import CKEditorError from '../utils/ckeditorerror.js';
 import DOMEmitterMixin from './domemittermixin.js';
-import utils from '../../utils/utils.js';
-import isPlainObject from '../../utils/lib/lodash/isPlainObject.js';
+import utils from '../utils/utils.js';
+import isPlainObject from '../utils/lib/lodash/isPlainObject.js';
 
 const bindToSymbol = Symbol( 'bindTo' );
 const bindIfSymbol = Symbol( 'bindIf' );
@@ -19,27 +19,27 @@ const bindIfSymbol = Symbol( 'bindIf' );
 /**
  * Basic View class.
  *
- * @memberOf core.ui
+ * @memberOf ui
  * @mixes DOMEmitterMixin
  */
 export default class View {
 	/**
 	 * Creates an instance of the {@link View} class.
 	 *
-	 * @param {core.ui.Model} model (View)Model of this View.
+	 * @param {ui.Model} model (View)Model of this View.
 	 * @param {utils.Locale} [locale] The {@link core.Editor#locale editor's locale} instance.
 	 */
 	constructor( model, locale ) {
 		/**
 		 * Model of this view.
 		 *
-		 * @member {core.ui.Model} core.ui.View#model
+		 * @member {ui.Model} ui.View#model
 		 */
 		this.model = model;
 
 		/**
 		 * @readonly
-		 * @member {utils.Locale} core.ui.View#locale
+		 * @member {utils.Locale} ui.View#locale
 		 */
 		this.locale = locale;
 
@@ -49,14 +49,14 @@ export default class View {
 		 * Note: If locale instance hasn't been passed to the view this method may not be available.
 		 *
 		 * @see utils.Locale#t
-		 * @method core.ui.View#t
+		 * @method ui.View#t
 		 */
 		this.t = locale && locale.t;
 
 		/**
-		 * Regions of this view. See {@link core.ui.View#register}.
+		 * Regions of this view. See {@link ui.View#register}.
 		 *
-		 * @member {utils.Collection} core.ui.View#regions
+		 * @member {utils.Collection} ui.View#regions
 		 */
 		this.regions = new Collection( {
 			idProperty: 'name'
@@ -65,14 +65,14 @@ export default class View {
 		/**
 		 * Template of this view.
 		 *
-		 * @member {Object} core.ui.View#template
+		 * @member {Object} ui.View#template
 		 */
 
 		/**
-		 * Region selectors of this view. See {@link core.ui.View#register}.
+		 * Region selectors of this view. See {@link ui.View#register}.
 		 *
 		 * @private
-		 * @member {Object} core.ui.View#_regionSelectors
+		 * @member {Object} ui.View#_regionSelectors
 		 */
 		this._regionSelectors = {};
 
@@ -80,20 +80,20 @@ export default class View {
 		 * Element of this view.
 		 *
 		 * @private
-		 * @member {HTMLElement} core.ui.View.#_element
+		 * @member {HTMLElement} ui.View.#_element
 		 */
 
 		/**
-		 * An instance of Template to generate {@link core.ui.View#_el}.
+		 * An instance of Template to generate {@link ui.View#_el}.
 		 *
 		 * @private
-		 * @member {core.ui.Template} core.ui.View#_template
+		 * @member {ui.Template} ui.View#_template
 		 */
 	}
 
 	/**
 	 * Element of this view. The element is rendered on first reference
-	 * using {@link core.ui.View#template} definition.
+	 * using {@link ui.View#template} definition.
 	 *
 	 * @type {HTMLElement}
 	 */
@@ -128,7 +128,7 @@ export default class View {
 	 * is synchronized with {@link View#model}.
 	 *
 	 * @readonly
-	 * @type core.ui.ViewModelBinding
+	 * @type ui.ViewModelBinding
 	 */
 	get attributeBinder() {
 		if ( this._attributeBinder ) {
@@ -156,7 +156,7 @@ export default class View {
 			 * @property {attributeBinder.to}
 			 * @param {String} attribute Name of {@link View#model} used in the binding.
 			 * @param {Function} [callback] Allows processing of the value. Accepts `Node` and `value` as arguments.
-			 * @return {core.ui.ViewModelBinding}
+			 * @return {ui.ViewModelBinding}
 			 */
 			to( attribute, callback ) {
 				return {
@@ -193,7 +193,7 @@ export default class View {
 			 * @param {String} attribute Name of {@link View#model} used in the binding.
 			 * @param {String} [valueIfTrue] Value set when {@link View#model} attribute is not undefined/null/false/''.
 			 * @param {Function} [callback] Allows processing of the value. Accepts `Node` and `value` as arguments.
-			 * @return {core.ui.ViewModelBinding}
+			 * @return {ui.ViewModelBinding}
 			 */
 			if( attribute, valueIfTrue, callback ) {
 				return {
@@ -212,7 +212,7 @@ export default class View {
 	/**
 	 * Initializes the view.
 	 *
-	 * Note: {@link core.Controller} supports if a promise is returned by this method,
+	 * Note: {@link ui.Controller} supports if a promise is returned by this method,
 	 * what means that view initialization may be asynchronous.
 	 */
 	init() {
@@ -220,7 +220,7 @@ export default class View {
 	}
 
 	/**
-	 * Registers a region in {@link core.ui.View#regions}.
+	 * Registers a region in {@link ui.View#regions}.
 	 *
 	 *		let view = new View();
 	 *
@@ -239,7 +239,7 @@ export default class View {
 	 * @param {String|Region} stringOrRegion The name or an instance of the Region
 	 * to be registered. If `String`, the region will be created on the fly.
 	 * @param {String|Function|true} regionSelector The selector to retrieve region's element
-	 * in DOM when the region instance is initialized (see {@link Region#init}, {@link core.ui.View#init}).
+	 * in DOM when the region instance is initialized (see {@link Region#init}, {@link ui.View#init}).
 	 * @param {Boolean} [override] When set `true` it will allow overriding of registered regions.
 	 */
 	register( ...args ) {
@@ -315,10 +315,10 @@ export default class View {
 	 *
 	 *		element.outerHTML == "<div id="first-div" class="my-div">Div text.</div>"
 	 *
-	 * See: {@link Template#apply}.
+	 * See: {@link ui.Template#apply}.
 	 *
 	 * @param {DOMElement} element DOM Element to initialize.
-	 * @param {core.ui.TemplateDefinition} def Template definition to be applied.
+	 * @param {ui.TemplateDefinition} def Template definition to be applied.
 	 */
 	applyTemplateToElement( element, def ) {
 		// Prepare pre–defined listeners.
@@ -333,9 +333,9 @@ export default class View {
 	/**
 	 * Destroys the view instance. The process includes:
 	 *
-	 * 1. Removal of child views from {@link core.ui.View#regions}.
-	 * 2. Destruction of the {@link core.ui.View#regions}.
-	 * 3. Removal of {#link #_el} from DOM.
+	 * 1. Removal of child views from {@link ui.View#regions}.
+	 * 2. Destruction of the {@link ui.View#regions}.
+	 * 3. Removal of {@link #_el} from DOM.
 	 */
 	destroy() {
 		let childView;
@@ -359,8 +359,8 @@ export default class View {
 	}
 
 	/**
-	 * Initializes {@link core.ui.View#regions} of this view by passing a DOM element
-	 * generated from {@link core.ui.View#_regionSelectors} into {@link Region#init}.
+	 * Initializes {@link ui.View#regions} of this view by passing a DOM element
+	 * generated from {@link ui.View#_regionSelectors} into {@link Region#init}.
 	 *
 	 * @protected
 	 */
@@ -434,28 +434,26 @@ export default class View {
 	}
 
 	/**
-	 * For given {@link core.ui.TemplateValueSchema} found by (@link _extendTemplateWithModelBinders} containing
-	 * {@link core.ui.ViewModelBinding} it returns a function, which when called by {@link Template#render}
+	 * For given {@link ui.TemplateValueSchema} found by (@link _extendTemplateWithModelBinders} containing
+	 * {@link ui.ViewModelBinding} it returns a function, which when called by {@link Template#render}
 	 * or {@link Template#apply} activates the binding and sets its initial value.
 	 *
-	 * Note: {@link core.ui.TemplateValueSchema} can be for HTMLElement attributes or Text Node `textContent`.
+	 * Note: {@link ui.TemplateValueSchema} can be for HTMLElement attributes or Text Node `textContent`.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateValueSchema}
+	 * @param {ui.TemplateValueSchema}
 	 * @return {Function}
 	 */
 	_getModelBinder( valueSchema ) {
 		valueSchema = normalizeBinderValueSchema( valueSchema );
 
-		/**
-		 * Assembles the value using {@link core.ui.TemplateValueSchema} and stores it in a form of
-		 * an Array. Each entry of an Array corresponds to one of {@link core.ui.TemplateValueSchema}
-		 * items.
-		 *
-		 * @private
-		 * @param {Node} node
-		 * @return {Array}
-		 */
+		// Assembles the value using {@link ui.TemplateValueSchema} and stores it in a form of
+		// an Array. Each entry of an Array corresponds to one of {@link ui.TemplateValueSchema}
+		// items.
+		//
+		// @private
+		// @param {Node} node
+		// @return {Array}
 		const getBoundValue = ( node ) => {
 			let model, modelValue;
 
@@ -478,7 +476,7 @@ export default class View {
 
 		/**
 		 * Attaches a listener to {@link View#model}, which updates DOM with a value constructed from
-		 * {@link core.ui.TemplateValueSchema} when {@link View#model} attribute value changes.
+		 * {@link ui.TemplateValueSchema} when {@link View#model} attribute value changes.
 		 *
 		 * This function is called by {@link Template#render} or {@link Template#apply}.
 		 *
@@ -526,12 +524,12 @@ export default class View {
 
 	/**
 	 * Iterates over "attributes" and "text" properties in {@link TemplateDefinition} and
-	 * locates existing {@link core.ui.ViewModelBinding} created by {@link core.ui.View#attributeBinder}.
+	 * locates existing {@link ui.ViewModelBinding} created by {@link ui.View#attributeBinder}.
 	 * Then, for each such a binding, it creates corresponding entry in {@link Template#_modelBinders},
 	 * which can be then activated by {@link Template#render} or {@link Template#apply}.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def
+	 * @param {ui.TemplateDefinition} def
 	 */
 	_extendTemplateWithModelBinders( def ) {
 		const attributes = def.attributes;
@@ -577,7 +575,7 @@ export default class View {
 	 * of an element, attaches native DOM listener to that element.
 	 *
 	 * @protected
-	 * @param {core.ui.TemplateDefinition} def Template definition.
+	 * @param {ui.TemplateDefinition} def Template definition.
 	 */
 	_extendTemplateWithListenerAttachers( def ) {
 		const on = def.on;
@@ -650,7 +648,7 @@ function isValidRegionSelector( selector ) {
 }
 
 /**
- * Normalizes given {@link core.ui.TemplateValueSchema} it's always in an Array–like format:
+ * Normalizes given {@link ui.TemplateValueSchema} it's always in an Array–like format:
  *
  * 		{ attributeName/text: 'bar' } ->
  * 			{ attributeName/text: [ 'bar' ] }
@@ -662,7 +660,7 @@ function isValidRegionSelector( selector ) {
  *
  * @ignore
  * @private
- * @param {core.ui.TemplateValueSchema} valueSchema
+ * @param {ui.TemplateValueSchema} valueSchema
  * @returns {Array}
  */
 function normalizeBinderValueSchema( valueSchema ) {
@@ -670,12 +668,12 @@ function normalizeBinderValueSchema( valueSchema ) {
 }
 
 /**
- * Checks whether given {@link core.ui.TemplateValueSchema} contains a
- * {@link core.ui.ViewModelBinding}.
+ * Checks whether given {@link ui.TemplateValueSchema} contains a
+ * {@link ui.ViewModelBinding}.
  *
  * @ignore
  * @private
- * @param {core.ui.TemplateValueSchema} valueSchema
+ * @param {ui.TemplateValueSchema} valueSchema
  * @returns {Boolean}
  */
 function hasModelBinding( valueSchema ) {
@@ -705,10 +703,10 @@ function binderValueReducer( prev, cur ) {
 /**
  * Describes Model binding created by {@link View#attributeBinder}.
  *
- * @typedef core.ui.ViewModelBinding
+ * @typedef ui.ViewModelBinding
  * @type Object
  * @property {Symbol} type
- * @property {core.ui.Model} model
+ * @property {ui.Model} model
  * @property {String} attribute
  * @property {String} [valueIfTrue]
  * @property {Function} [callback]

+ 0 - 0
packages/ckeditor5-ui/tests/ui/bindings/toolbar.js → packages/ckeditor5-ui/tests/bindings/toolbar.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/componentfactory.js → packages/ckeditor5-ui/tests/componentfactory.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/controller.js → packages/ckeditor5-ui/tests/controller.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/controllercollection.js → packages/ckeditor5-ui/tests/controllercollection.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/domemittermixin.js → packages/ckeditor5-ui/tests/domemittermixin.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/model.js → packages/ckeditor5-ui/tests/model.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/region.js → packages/ckeditor5-ui/tests/region.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/template.js → packages/ckeditor5-ui/tests/template.js


+ 0 - 0
packages/ckeditor5-ui/tests/ui/view.js → packages/ckeditor5-ui/tests/view.js