@@ -7,10 +7,10 @@
* @module utils/collection
*/
-import EmitterMixin from './emittermixin.js';
-import CKEditorError from './ckeditorerror.js';
-import uid from './uid.js';
-import mix from './mix.js';
+import EmitterMixin from './emittermixin';
+import CKEditorError from './ckeditorerror';
+import uid from './uid';
+import mix from './mix';
/**
* Collections are ordered sets of objects. Items in the collection can be retrieved by their indexes
@@ -7,7 +7,7 @@
* @module utils/config
-import isPlainObject from './lib/lodash/isPlainObject.js';
+import isPlainObject from './lib/lodash/isPlainObject';
* Handles a configuration dictionary.
@@ -7,8 +7,8 @@
* @module utils/dom/createelement
-import isString from '../lib/lodash/isString.js';
-import isIterable from '../isiterable.js';
+import isString from '../lib/lodash/isString';
+import isIterable from '../isiterable';
* Creates element with attributes and children.
* @module utils/dom/emittermixin
-import EmitterMixin from '../emittermixin.js';
-import uid from '../uid.js';
-import extend from '../lib/lodash/extend.js';
-import isNative from '../lib/lodash/isNative.js';
+import EmitterMixin from '../emittermixin';
+import uid from '../uid';
+import extend from '../lib/lodash/extend';
+import isNative from '../lib/lodash/isNative';
* Mixin that injects the DOM events API into its host. It provides the API
* @module utils/dom/getcommonancestor
-import getAncestors from './getancestors.js';
+import getAncestors from './getancestors';
* Searches and returns the lowest common ancestor of two given nodes.
* @module utils/dom/getpositionedancestor
-import global from './global.js';
+import global from './global';
* For a given element, returns the nearest ancestor element which CSS position is not "static".
@@ -7,9 +7,9 @@
* @module utils/dom/position
-import Rect from './rect.js';
-import getPositionedAncestor from './getpositionedancestor.js';
+import Rect from './rect';
+import getPositionedAncestor from './getpositionedancestor';
* Calculates the `position: absolute` coordinates of a given element so it can be positioned with respect to the
* @module utils/dom/rect
-import isRange from './isrange.js';
-import isElement from '../../utils/lib/lodash/isElement.js';
+import isRange from './isrange';
+import isElement from '../lib/lodash/isElement';
const rectProperties = [ 'top', 'right', 'bottom', 'left', 'width', 'height' ];
* @module utils/emittermixin
-import EventInfo from './eventinfo.js';
-import priorities from './priorities.js';
+import EventInfo from './eventinfo';
+import priorities from './priorities';
* Mixin that injects the events API into its host.
* @module utils/eventinfo
-import spy from './spy.js';
+import spy from './spy';
* The event object passed to event callbacks. It is used to provide information about the event as well as a tool to
@@ -9,10 +9,10 @@
* @module utils/focustracker
-import DomEmitterMixin from './dom/emittermixin.js';
-import ObservableMixin from './observablemixin.js';
+import DomEmitterMixin from './dom/emittermixin';
+import ObservableMixin from './observablemixin';
* Allows observing a group of `HTMLElement`s whether at least one of them is focused.
@@ -9,8 +9,8 @@
* @module utils/keyboard
-import env from './env.js';
+import env from './env';
* Object with `keyName => keyCode` pairs for a set of known keys.
* @module utils/observablemixin
-import extend from './lib/lodash/extend.js';
-import isObject from './lib/lodash/isObject.js';
+import extend from './lib/lodash/extend';
+import isObject from './lib/lodash/isObject';
const attributesSymbol = Symbol( 'attributes' );
const boundObservablesSymbol = Symbol( 'boundObservables' );
* @module utils/tomap
-import objectToMap from './objecttomap.js';
+import objectToMap from './objecttomap';
* Transforms object or iterable to map. Iterable needs to be in the format acceptable by the `Map` constructor.
@@ -3,7 +3,7 @@
* For licensing, see LICENSE.md.
-import normalizeHtml from 'tests/utils/_utils/normalizehtml.js';
+import normalizeHtml from 'ckeditor5-utils/tests/_utils/normalizehtml';
describe( 'utils', () => {
describe( 'normalizeHtml', () => {
@@ -3,10 +3,10 @@
-import testUtils from 'tests/core/_utils/utils.js';
-import utilsTestUtils from 'tests/utils/_utils/utils.js';
-import ObesrvableMixin from 'ckeditor5/utils/observablemixin.js';
-import EmitterMixin from 'ckeditor5/utils/emittermixin.js';
+import testUtils from 'ckeditor5-core/tests/_utils/utils';
+import utilsTestUtils from 'ckeditor5-utils/tests/_utils/utils';
+import ObesrvableMixin from 'ckeditor5-utils/src/observablemixin';
+import EmitterMixin from 'ckeditor5-utils/src/emittermixin';
testUtils.createSinonSandbox();
@@ -3,8 +3,8 @@
-import HtmlDataProcessor from 'ckeditor5/engine/dataprocessor/htmldataprocessor.js';
-import { stringify } from 'ckeditor5/engine/dev-utils/view.js';
+import HtmlDataProcessor from 'ckeditor5-engine/src/dataprocessor/htmldataprocessor';
+import { stringify } from 'ckeditor5-engine/src/dev-utils/view';
* Parses given string of HTML and returns normalized HTML.
@@ -5,7 +5,7 @@
/* global console:false */
const utils = {
-import CKEditorError from 'ckeditor5/utils/ckeditorerror.js';
+import CKEditorError from 'ckeditor5-utils/src/ckeditorerror';
describe( 'CKEditorError', () => {
it( 'inherits from Error', () => {
@@ -3,9 +3,9 @@
-import Collection from 'ckeditor5/utils/collection.js';
+import Collection from 'ckeditor5-utils/src/collection';
-import compareArrays from 'ckeditor5/utils/comparearrays.js';
+import compareArrays from 'ckeditor5-utils/src/comparearrays';
describe( 'compareArrays', () => {
-import Config from 'ckeditor5/utils/config.js';
+import Config from 'ckeditor5-utils/src/config';
describe( 'Config', () => {
let config;
-import count from 'ckeditor5/utils/count.js';
+import count from 'ckeditor5-utils/src/count';
describe( 'count', () => {
-import diff from 'ckeditor5/utils/diff.js';
+import diff from 'ckeditor5-utils/src/diff';
describe( 'diff', () => {
it( 'should diff strings', () => {
-import diffToChanges from 'ckeditor5/utils/difftochanges.js';
+import diffToChanges from 'ckeditor5-utils/src/difftochanges';
describe( 'diffToChanges', () => {
describe( 'equal patterns', () => {
@@ -6,7 +6,7 @@
/* globals document */
/* bender-tags: dom, browser-only */
-import createElement from 'ckeditor5/utils/dom/createelement.js';
+import createElement from 'ckeditor5-utils/src/dom/createelement';
describe( 'createElement', () => {
it( 'should create element', () => {
@@ -6,9 +6,9 @@
/* globals document, window, Event, MouseEvent */
/* bender-tags: ui */
-import DomEmitterMixin from 'ckeditor5/utils/dom/emittermixin.js';
+import DomEmitterMixin from 'ckeditor5-utils/src/dom/emittermixin';
@@ -6,8 +6,8 @@
-import getAncestors from 'ckeditor5/utils/dom/getancestors.js';
+import getAncestors from 'ckeditor5-utils/src/dom/getancestors';
describe( 'getAncestors', () => {
it( 'should return all parents of given node and the node itself, starting from top-most parent', () => {
-import getCommonAncestor from 'ckeditor5/utils/dom/getcommonancestor.js';
+import getCommonAncestor from 'ckeditor5-utils/src/dom/getcommonancestor';
describe( 'getParents', () => {
let b, span1, span2, p1, p2, i, div;
-import getDataFromElement from 'ckeditor5/utils/dom/getdatafromelement.js';
+import getDataFromElement from 'ckeditor5-utils/src/dom/getdatafromelement';
describe( 'getDataFromElement', () => {
let divEl;
/* global document */
-import getPositionedAncestor from 'ckeditor5/utils/dom/getpositionedancestor.js';
+import getPositionedAncestor from 'ckeditor5-utils/src/dom/getpositionedancestor';
describe( 'getPositionedAncestor', () => {
let element;
@@ -5,8 +5,8 @@
/* global window, document */
-import global from 'ckeditor5/utils/dom/global.js';
+import global from 'ckeditor5-utils/src/dom/global';
-import indexOf from 'ckeditor5/utils/dom/indexof.js';
+import indexOf from 'ckeditor5-utils/src/dom/indexof';
describe( 'indexOf', () => {
it( 'should return 0 if element has no parent', () => {
-import insertAt from 'ckeditor5/utils/dom/insertat.js';
+import insertAt from 'ckeditor5-utils/src/dom/insertat';
describe( 'insertAt', () => {
it( 'should insert at given position', () => {
/* global Range */
-import isRange from 'ckeditor5/utils/dom/isrange.js';
+import isRange from 'ckeditor5-utils/src/dom/isrange';
describe( 'isRange()', () => {
it( 'detects native DOM Range', () => {
@@ -5,9 +5,9 @@
/* global document, window */
-import { getOptimalPosition } from 'ckeditor5/utils/dom/position.js';
+import { getOptimalPosition } from 'ckeditor5-utils/src/dom/position';
-import Rect from 'ckeditor5/utils/dom/rect.js';
+import Rect from 'ckeditor5-utils/src/dom/rect';
-import remove from 'ckeditor5/utils/dom/remove.js';
+import remove from 'ckeditor5-utils/src/dom/remove';
describe( 'remove', () => {
it( 'should remove element form parent', () => {
-import setDataInElement from 'ckeditor5/utils/dom/setdatainelement.js';
+import setDataInElement from 'ckeditor5-utils/src/dom/setdatainelement';
describe( 'setDataInElement', () => {
[ 'textarea', 'template', 'div' ].forEach( ( elementName ) => {
/* bender-tags: dom */
-import toUnit from 'ckeditor5/utils/dom/tounit.js';
+import toUnit from 'ckeditor5-utils/src/dom/tounit';
describe( 'toUnit', () => {
it( 'should be a function', () => {
/* bender-tags: browser-only */
-import ElementReplacer from 'ckeditor5/utils/elementreplacer.js';
+import ElementReplacer from 'ckeditor5-utils/src/elementreplacer';
describe( 'ElementReplacer', () => {
let replacer;
-import EventInfo from 'ckeditor5/utils/eventinfo.js';
+import EventInfo from 'ckeditor5-utils/src/eventinfo';
describe( 'EmitterMixin', () => {
let emitter, listener;
-import env, { isMac } from 'ckeditor5/utils/env.js';
+import env, { isMac } from 'ckeditor5-utils/src/env';
describe( 'Env', () => {
beforeEach( () => {
describe( 'EventInfo', () => {
it( 'should be created properly', () => {
/* global document, Event */
-import FocusTracker from 'ckeditor5/utils/focustracker.js';
+import FocusTracker from 'ckeditor5-utils/src/focustracker';
-import isIterable from 'ckeditor5/utils/isiterable.js';
+import isIterable from 'ckeditor5-utils/src/isiterable';
describe( 'isIterable', () => {
-import env from 'ckeditor5/utils/env.js';
-import { keyCodes, getCode, parseKeystroke, getEnvKeystrokeText } from 'ckeditor5/utils/keyboard.js';
+import env from 'ckeditor5-utils/src/env';
+import { keyCodes, getCode, parseKeystroke, getEnvKeystrokeText } from 'ckeditor5-utils/src/keyboard';
describe( 'Keyboard', () => {
describe( 'keyCodes', () => {
-import Locale from 'ckeditor5/utils/locale.js';
+import Locale from 'ckeditor5-utils/src/locale';
describe( 'Locale', () => {
let locale;
-import extend from 'ckeditor5/utils/lib/lodash/extend.js';
+import extend from 'ckeditor5-utils/src/lib/lodash/extend';
describe( 'extend()', () => {
/* globals console */
-import log from 'ckeditor5/utils/log.js';
+import log from 'ckeditor5-utils/src/log';
describe( 'log', () => {
let spy;
const focusTracker = new FocusTracker();
const counters = document.querySelectorAll( '.status b' );
-import mapsEqual from 'ckeditor5/utils/mapsequal.js';
+import mapsEqual from 'ckeditor5-utils/src/mapsequal';
describe( 'mapsEqual', () => {
-import mix from 'ckeditor5/utils/mix.js';
+import mix from 'ckeditor5-utils/src/mix';
describe( 'mix', () => {
-import nth from 'ckeditor5/utils/nth.js';
+import nth from 'ckeditor5-utils/src/nth';
describe( 'nth', () => {
@@ -3,13 +3,13 @@
-import ObservableMixin from 'ckeditor5/utils/observablemixin.js';
+import ObservableMixin from 'ckeditor5-utils/src/observablemixin';
const assertBinding = utilsTestUtils.assertBinding;
-import priorities from 'ckeditor5/utils/priorities.js';
+import priorities from 'ckeditor5-utils/src/priorities';
describe( 'get', () => {
it( 'should return correct value for string priority', () => {
-import spy from 'ckeditor5/utils/spy.js';
+import spy from 'ckeditor5-utils/src/spy';
describe( 'spy', () => {
-import toMap from 'ckeditor5/utils/tomap.js';
+import toMap from 'ckeditor5-utils/src/tomap';
describe( 'toMap', () => {
-import uid from 'ckeditor5/utils/uid.js';
+import uid from 'ckeditor5-utils/src/uid';
describe( 'uid', () => {
@@ -9,7 +9,7 @@ import {
isCombiningMark,
isInsideSurrogatePair,
isInsideCombinedSymbol
-} from 'ckeditor5/utils/unicode.js';
+} from 'ckeditor5-utils/src/unicode';
describe( 'unicode', () => {