@ckeditor/ckeditor5-utils 44.0.0 → 44.1.0-alpha.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.
- package/dist/abortabledebounce.d.ts +1 -1
- package/dist/areconnectedthroughproperties.d.ts +1 -1
- package/dist/ckeditorerror.d.ts +1 -1
- package/dist/collection.d.ts +1 -1
- package/dist/comparearrays.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/count.d.ts +1 -1
- package/dist/crc32.d.ts +1 -1
- package/dist/delay.d.ts +1 -1
- package/dist/diff.d.ts +1 -1
- package/dist/difftochanges.d.ts +1 -1
- package/dist/dom/createelement.d.ts +1 -1
- package/dist/dom/emittermixin.d.ts +1 -1
- package/dist/dom/findclosestscrollableancestor.d.ts +1 -1
- package/dist/dom/getancestors.d.ts +1 -1
- package/dist/dom/getborderwidths.d.ts +1 -1
- package/dist/dom/getcommonancestor.d.ts +1 -1
- package/dist/dom/getdatafromelement.d.ts +1 -1
- package/dist/dom/getpositionedancestor.d.ts +1 -1
- package/dist/dom/getrangefrommouseevent.d.ts +1 -1
- package/dist/dom/global.d.ts +1 -1
- package/dist/dom/indexof.d.ts +1 -1
- package/dist/dom/insertat.d.ts +1 -1
- package/dist/dom/iscomment.d.ts +1 -1
- package/dist/dom/isnode.d.ts +1 -1
- package/dist/dom/isrange.d.ts +1 -1
- package/dist/dom/istext.d.ts +1 -1
- package/dist/dom/isvalidattributename.d.ts +1 -1
- package/dist/dom/isvisible.d.ts +1 -1
- package/dist/dom/iswindow.d.ts +1 -1
- package/dist/dom/position.d.ts +1 -1
- package/dist/dom/rect.d.ts +1 -1
- package/dist/dom/remove.d.ts +1 -1
- package/dist/dom/resizeobserver.d.ts +1 -1
- package/dist/dom/scroll.d.ts +1 -1
- package/dist/dom/setdatainelement.d.ts +1 -1
- package/dist/dom/tounit.d.ts +1 -1
- package/dist/elementreplacer.d.ts +1 -1
- package/dist/emittermixin.d.ts +1 -1
- package/dist/env.d.ts +1 -1
- package/dist/eventinfo.d.ts +1 -1
- package/dist/fastdiff.d.ts +1 -1
- package/dist/first.d.ts +1 -1
- package/dist/focustracker.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +73 -78
- package/dist/index.js.map +1 -1
- package/dist/inserttopriorityarray.d.ts +1 -1
- package/dist/isiterable.d.ts +1 -1
- package/dist/keyboard.d.ts +1 -1
- package/dist/keystrokehandler.d.ts +1 -1
- package/dist/language.d.ts +1 -1
- package/dist/locale.d.ts +1 -1
- package/dist/mapsequal.d.ts +1 -1
- package/dist/mix.d.ts +1 -1
- package/dist/nth.d.ts +1 -1
- package/dist/objecttomap.d.ts +1 -1
- package/dist/observablemixin.d.ts +1 -1
- package/dist/parsebase64encodedobject.d.ts +1 -1
- package/dist/priorities.d.ts +1 -1
- package/dist/retry.d.ts +1 -1
- package/dist/splicearray.d.ts +12 -11
- package/dist/spy.d.ts +1 -1
- package/dist/toarray.d.ts +1 -1
- package/dist/tomap.d.ts +1 -1
- package/dist/translation-service.d.ts +1 -1
- package/dist/uid.d.ts +1 -1
- package/dist/unicode.d.ts +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/wait.d.ts +1 -1
- package/package.json +2 -2
- package/src/abortabledebounce.d.ts +1 -1
- package/src/abortabledebounce.js +1 -1
- package/src/areconnectedthroughproperties.d.ts +1 -1
- package/src/areconnectedthroughproperties.js +1 -1
- package/src/ckeditorerror.d.ts +1 -1
- package/src/ckeditorerror.js +1 -1
- package/src/collection.d.ts +1 -1
- package/src/collection.js +1 -1
- package/src/comparearrays.d.ts +1 -1
- package/src/comparearrays.js +1 -1
- package/src/config.d.ts +1 -1
- package/src/config.js +1 -1
- package/src/count.d.ts +1 -1
- package/src/count.js +1 -1
- package/src/crc32.d.ts +1 -1
- package/src/crc32.js +1 -1
- package/src/delay.d.ts +1 -1
- package/src/delay.js +1 -1
- package/src/diff.d.ts +1 -1
- package/src/diff.js +1 -1
- package/src/difftochanges.d.ts +1 -1
- package/src/difftochanges.js +1 -1
- package/src/dom/createelement.d.ts +1 -1
- package/src/dom/createelement.js +1 -1
- package/src/dom/emittermixin.d.ts +1 -1
- package/src/dom/emittermixin.js +1 -1
- package/src/dom/findclosestscrollableancestor.d.ts +1 -1
- package/src/dom/findclosestscrollableancestor.js +1 -1
- package/src/dom/getancestors.d.ts +1 -1
- package/src/dom/getancestors.js +1 -1
- package/src/dom/getborderwidths.d.ts +1 -1
- package/src/dom/getborderwidths.js +1 -1
- package/src/dom/getcommonancestor.d.ts +1 -1
- package/src/dom/getcommonancestor.js +1 -1
- package/src/dom/getdatafromelement.d.ts +1 -1
- package/src/dom/getdatafromelement.js +1 -1
- package/src/dom/getpositionedancestor.d.ts +1 -1
- package/src/dom/getpositionedancestor.js +1 -1
- package/src/dom/getrangefrommouseevent.d.ts +1 -1
- package/src/dom/getrangefrommouseevent.js +1 -1
- package/src/dom/global.d.ts +1 -1
- package/src/dom/global.js +1 -1
- package/src/dom/indexof.d.ts +1 -1
- package/src/dom/indexof.js +1 -1
- package/src/dom/insertat.d.ts +1 -1
- package/src/dom/insertat.js +1 -1
- package/src/dom/iscomment.d.ts +1 -1
- package/src/dom/iscomment.js +1 -1
- package/src/dom/isnode.d.ts +1 -1
- package/src/dom/isnode.js +1 -1
- package/src/dom/isrange.d.ts +1 -1
- package/src/dom/isrange.js +1 -1
- package/src/dom/istext.d.ts +1 -1
- package/src/dom/istext.js +1 -1
- package/src/dom/isvalidattributename.d.ts +1 -1
- package/src/dom/isvalidattributename.js +1 -1
- package/src/dom/isvisible.d.ts +1 -1
- package/src/dom/isvisible.js +1 -1
- package/src/dom/iswindow.d.ts +1 -1
- package/src/dom/iswindow.js +1 -1
- package/src/dom/position.d.ts +1 -1
- package/src/dom/position.js +1 -1
- package/src/dom/rect.d.ts +1 -1
- package/src/dom/rect.js +1 -1
- package/src/dom/remove.d.ts +1 -1
- package/src/dom/remove.js +1 -1
- package/src/dom/resizeobserver.d.ts +1 -1
- package/src/dom/resizeobserver.js +1 -1
- package/src/dom/scroll.d.ts +1 -1
- package/src/dom/scroll.js +1 -1
- package/src/dom/setdatainelement.d.ts +1 -1
- package/src/dom/setdatainelement.js +1 -1
- package/src/dom/tounit.d.ts +1 -1
- package/src/dom/tounit.js +1 -1
- package/src/elementreplacer.d.ts +1 -1
- package/src/elementreplacer.js +1 -1
- package/src/emittermixin.d.ts +1 -1
- package/src/emittermixin.js +17 -19
- package/src/env.d.ts +1 -1
- package/src/env.js +1 -1
- package/src/eventinfo.d.ts +1 -1
- package/src/eventinfo.js +1 -1
- package/src/fastdiff.d.ts +1 -1
- package/src/fastdiff.js +1 -1
- package/src/first.d.ts +1 -1
- package/src/first.js +1 -1
- package/src/focustracker.d.ts +1 -1
- package/src/focustracker.js +1 -1
- package/src/index.d.ts +1 -1
- package/src/index.js +1 -1
- package/src/inserttopriorityarray.d.ts +1 -1
- package/src/inserttopriorityarray.js +1 -1
- package/src/isiterable.d.ts +1 -1
- package/src/isiterable.js +1 -1
- package/src/keyboard.d.ts +1 -1
- package/src/keyboard.js +1 -1
- package/src/keystrokehandler.d.ts +1 -1
- package/src/keystrokehandler.js +1 -1
- package/src/language.d.ts +1 -1
- package/src/language.js +1 -1
- package/src/locale.d.ts +1 -1
- package/src/locale.js +1 -1
- package/src/mapsequal.d.ts +1 -1
- package/src/mapsequal.js +1 -1
- package/src/mix.d.ts +1 -1
- package/src/mix.js +1 -1
- package/src/nth.d.ts +1 -1
- package/src/nth.js +1 -1
- package/src/objecttomap.d.ts +1 -1
- package/src/objecttomap.js +1 -1
- package/src/observablemixin.d.ts +1 -1
- package/src/observablemixin.js +1 -1
- package/src/parsebase64encodedobject.d.ts +1 -1
- package/src/parsebase64encodedobject.js +1 -1
- package/src/priorities.d.ts +1 -1
- package/src/priorities.js +1 -1
- package/src/retry.d.ts +1 -1
- package/src/retry.js +1 -1
- package/src/splicearray.d.ts +12 -11
- package/src/splicearray.js +17 -19
- package/src/spy.d.ts +1 -1
- package/src/spy.js +1 -1
- package/src/toarray.d.ts +1 -1
- package/src/toarray.js +1 -1
- package/src/tomap.d.ts +1 -1
- package/src/tomap.js +1 -1
- package/src/translation-service.d.ts +1 -1
- package/src/translation-service.js +1 -1
- package/src/uid.d.ts +1 -1
- package/src/uid.js +1 -1
- package/src/unicode.d.ts +1 -1
- package/src/unicode.js +1 -1
- package/src/version.d.ts +2 -2
- package/src/version.js +3 -3
- package/src/wait.d.ts +1 -1
- package/src/wait.js +1 -1
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { isObject, isString, isPlainObject, cloneDeepWith, isElement as isElemen
|
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
9
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
9
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
10
10
|
*/ /* globals window, document */ /**
|
|
11
11
|
* @module utils/dom/global
|
|
12
12
|
*/ // This interface exists to make our API pages more readable.
|
|
@@ -171,7 +171,7 @@ const userAgent = /* #__PURE__ */ getUserAgent();
|
|
|
171
171
|
|
|
172
172
|
/**
|
|
173
173
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
174
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
174
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
175
175
|
*/ /**
|
|
176
176
|
* @module utils/fastdiff
|
|
177
177
|
*/ /**
|
|
@@ -524,7 +524,7 @@ diff.fastDiff = fastDiff;
|
|
|
524
524
|
|
|
525
525
|
/**
|
|
526
526
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
527
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
527
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
528
528
|
*/ /**
|
|
529
529
|
* @module utils/difftochanges
|
|
530
530
|
*/ /**
|
|
@@ -599,7 +599,7 @@ diff.fastDiff = fastDiff;
|
|
|
599
599
|
|
|
600
600
|
/**
|
|
601
601
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
602
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
602
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
603
603
|
*/ /**
|
|
604
604
|
* @module utils/mix
|
|
605
605
|
*/ /**
|
|
@@ -647,7 +647,7 @@ diff.fastDiff = fastDiff;
|
|
|
647
647
|
|
|
648
648
|
/**
|
|
649
649
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
650
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
650
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
651
651
|
*/ /**
|
|
652
652
|
* @module utils/spy
|
|
653
653
|
*/ /**
|
|
@@ -714,7 +714,7 @@ diff.fastDiff = fastDiff;
|
|
|
714
714
|
|
|
715
715
|
/**
|
|
716
716
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
717
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
717
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
718
718
|
*/ /**
|
|
719
719
|
* @module utils/uid
|
|
720
720
|
*/ /**
|
|
@@ -739,7 +739,7 @@ diff.fastDiff = fastDiff;
|
|
|
739
739
|
|
|
740
740
|
/**
|
|
741
741
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
742
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
742
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
743
743
|
*/ /**
|
|
744
744
|
* @module utils/priorities
|
|
745
745
|
*/ /**
|
|
@@ -785,7 +785,7 @@ diff.fastDiff = fastDiff;
|
|
|
785
785
|
|
|
786
786
|
/**
|
|
787
787
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
788
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
788
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
789
789
|
*/ /**
|
|
790
790
|
* @module utils/ckeditorerror
|
|
791
791
|
*/ /* globals console */ /**
|
|
@@ -959,9 +959,9 @@ diff.fastDiff = fastDiff;
|
|
|
959
959
|
];
|
|
960
960
|
}
|
|
961
961
|
|
|
962
|
-
const version = '44.0.
|
|
962
|
+
const version = '44.1.0-alpha.1';
|
|
963
963
|
// The second argument is not a month. It is `monthIndex` and starts from `0`.
|
|
964
|
-
const releaseDate = new Date(2024, 11,
|
|
964
|
+
const releaseDate = new Date(2024, 11, 12);
|
|
965
965
|
/* istanbul ignore next -- @preserve */ if (globalThis.CKEDITOR_VERSION) {
|
|
966
966
|
/**
|
|
967
967
|
* This error is thrown when, due to a mistake in the way CKEditor 5 was installed,
|
|
@@ -1242,24 +1242,20 @@ function EmitterMixin(base) {
|
|
|
1242
1242
|
eventInfo.path.push(this);
|
|
1243
1243
|
// Handle event listener callbacks first.
|
|
1244
1244
|
if (callbacks) {
|
|
1245
|
-
// Arguments passed to each callback.
|
|
1246
|
-
const callbackArgs = [
|
|
1247
|
-
eventInfo,
|
|
1248
|
-
...args
|
|
1249
|
-
];
|
|
1250
1245
|
// Copying callbacks array is the easiest and most secure way of preventing infinite loops, when event callbacks
|
|
1251
1246
|
// are added while processing other callbacks. Previous solution involved adding counters (unique ids) but
|
|
1252
1247
|
// failed if callbacks were added to the queue before currently processed callback.
|
|
1253
1248
|
// If this proves to be too inefficient, another method is to change `.on()` so callbacks are stored if same
|
|
1254
1249
|
// event is currently processed. Then, `.fire()` at the end, would have to add all stored events.
|
|
1255
|
-
callbacks =
|
|
1250
|
+
callbacks = callbacks.slice();
|
|
1256
1251
|
for(let i = 0; i < callbacks.length; i++){
|
|
1257
|
-
callbacks[i].callback
|
|
1252
|
+
const fn = callbacks[i].callback;
|
|
1253
|
+
fn.call(this, eventInfo, ...args);
|
|
1258
1254
|
// Remove the callback from future requests if off() has been called.
|
|
1259
1255
|
if (eventInfo.off.called) {
|
|
1260
1256
|
// Remove the called mark for the next calls.
|
|
1261
1257
|
delete eventInfo.off.called;
|
|
1262
|
-
this._removeEventListener(event,
|
|
1258
|
+
this._removeEventListener(event, fn);
|
|
1263
1259
|
}
|
|
1264
1260
|
// Do not execute next callbacks if stop() was called.
|
|
1265
1261
|
if (eventInfo.stop.called) {
|
|
@@ -1499,19 +1495,19 @@ function EmitterMixin(base) {
|
|
|
1499
1495
|
* If there are no callbacks registered for given event, it checks if this is a specific event and looks
|
|
1500
1496
|
* for callbacks for it's more generic version.
|
|
1501
1497
|
*/ function getCallbacksForEvent(source, eventName) {
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
// There are no callbacks registered for specified eventName.
|
|
1505
|
-
// But this could be a specific-type event that is in a namespace.
|
|
1506
|
-
if (eventName.indexOf(':') > -1) {
|
|
1507
|
-
// If the eventName is specific, try to find callback lists for more generic event.
|
|
1508
|
-
return getCallbacksForEvent(source, eventName.substr(0, eventName.lastIndexOf(':')));
|
|
1509
|
-
} else {
|
|
1510
|
-
// If this is a top-level generic event, return null;
|
|
1511
|
-
return null;
|
|
1512
|
-
}
|
|
1498
|
+
if (!source._events) {
|
|
1499
|
+
return null;
|
|
1513
1500
|
}
|
|
1514
|
-
|
|
1501
|
+
let currentEventName = eventName;
|
|
1502
|
+
do {
|
|
1503
|
+
const event = source._events[currentEventName];
|
|
1504
|
+
if (event && event.callbacks && event.callbacks.length) {
|
|
1505
|
+
return event.callbacks;
|
|
1506
|
+
}
|
|
1507
|
+
const colonIndex = currentEventName.lastIndexOf(':');
|
|
1508
|
+
currentEventName = colonIndex > -1 ? currentEventName.substring(0, colonIndex) : '';
|
|
1509
|
+
}while (currentEventName)
|
|
1510
|
+
return null;
|
|
1515
1511
|
}
|
|
1516
1512
|
/**
|
|
1517
1513
|
* Fires delegated events for given map of destinations.
|
|
@@ -2132,7 +2128,7 @@ function initObservable(observable) {
|
|
|
2132
2128
|
|
|
2133
2129
|
/**
|
|
2134
2130
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2135
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2131
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2136
2132
|
*/ /**
|
|
2137
2133
|
* @module utils/elementreplacer
|
|
2138
2134
|
*/ /**
|
|
@@ -2177,7 +2173,7 @@ function initObservable(observable) {
|
|
|
2177
2173
|
|
|
2178
2174
|
/**
|
|
2179
2175
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2180
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2176
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2181
2177
|
*/ /**
|
|
2182
2178
|
* @module utils/abortabledebounce
|
|
2183
2179
|
*/ /**
|
|
@@ -2197,7 +2193,7 @@ function initObservable(observable) {
|
|
|
2197
2193
|
|
|
2198
2194
|
/**
|
|
2199
2195
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2200
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2196
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2201
2197
|
*/ /**
|
|
2202
2198
|
* @module utils/count
|
|
2203
2199
|
*/ /**
|
|
@@ -2220,7 +2216,7 @@ function initObservable(observable) {
|
|
|
2220
2216
|
|
|
2221
2217
|
/**
|
|
2222
2218
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2223
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2219
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2224
2220
|
*/ /**
|
|
2225
2221
|
* @module utils/comparearrays
|
|
2226
2222
|
*/ /**
|
|
@@ -2263,7 +2259,7 @@ function initObservable(observable) {
|
|
|
2263
2259
|
|
|
2264
2260
|
/**
|
|
2265
2261
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2266
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2262
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2267
2263
|
*/ /**
|
|
2268
2264
|
* @module utils/isiterable
|
|
2269
2265
|
*/ /**
|
|
@@ -2460,7 +2456,7 @@ function initObservable(observable) {
|
|
|
2460
2456
|
|
|
2461
2457
|
/**
|
|
2462
2458
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2463
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2459
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2464
2460
|
*/ /**
|
|
2465
2461
|
* @module utils/dom/isnode
|
|
2466
2462
|
*/ /**
|
|
@@ -2478,7 +2474,7 @@ function initObservable(observable) {
|
|
|
2478
2474
|
|
|
2479
2475
|
/**
|
|
2480
2476
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2481
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2477
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2482
2478
|
*/ /**
|
|
2483
2479
|
* @module utils/dom/iswindow
|
|
2484
2480
|
*/ /**
|
|
@@ -2762,7 +2758,7 @@ function DomEmitterMixin(base) {
|
|
|
2762
2758
|
|
|
2763
2759
|
/**
|
|
2764
2760
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2765
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2761
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2766
2762
|
*/ /* globals Node */ /**
|
|
2767
2763
|
* @module utils/dom/getancestors
|
|
2768
2764
|
*/ /**
|
|
@@ -2786,7 +2782,7 @@ function DomEmitterMixin(base) {
|
|
|
2786
2782
|
|
|
2787
2783
|
/**
|
|
2788
2784
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2789
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2785
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2790
2786
|
*/ /* globals HTMLTextAreaElement */ /**
|
|
2791
2787
|
* @module utils/dom/getdatafromelement
|
|
2792
2788
|
*/ /**
|
|
@@ -2803,7 +2799,7 @@ function DomEmitterMixin(base) {
|
|
|
2803
2799
|
|
|
2804
2800
|
/**
|
|
2805
2801
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2806
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2802
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2807
2803
|
*/ /**
|
|
2808
2804
|
* @module utils/dom/getborderwidths
|
|
2809
2805
|
*/ /**
|
|
@@ -2825,7 +2821,7 @@ function DomEmitterMixin(base) {
|
|
|
2825
2821
|
|
|
2826
2822
|
/**
|
|
2827
2823
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2828
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2824
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2829
2825
|
*/ /**
|
|
2830
2826
|
* @module utils/dom/getrangefrommouseevent
|
|
2831
2827
|
*/ /**
|
|
@@ -2854,7 +2850,7 @@ function DomEmitterMixin(base) {
|
|
|
2854
2850
|
|
|
2855
2851
|
/**
|
|
2856
2852
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2857
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2853
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2858
2854
|
*/ /**
|
|
2859
2855
|
* @module utils/dom/istext
|
|
2860
2856
|
*/ /**
|
|
@@ -2865,7 +2861,7 @@ function DomEmitterMixin(base) {
|
|
|
2865
2861
|
|
|
2866
2862
|
/**
|
|
2867
2863
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
2868
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
2864
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
2869
2865
|
*/ /**
|
|
2870
2866
|
* @module utils/dom/isrange
|
|
2871
2867
|
*/ /**
|
|
@@ -3473,7 +3469,7 @@ const rectProperties = [
|
|
|
3473
3469
|
|
|
3474
3470
|
/**
|
|
3475
3471
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3476
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3472
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3477
3473
|
*/ /**
|
|
3478
3474
|
* @module utils/dom/setdatainelement
|
|
3479
3475
|
*/ /* globals HTMLTextAreaElement */ /**
|
|
@@ -3490,7 +3486,7 @@ const rectProperties = [
|
|
|
3490
3486
|
|
|
3491
3487
|
/**
|
|
3492
3488
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3493
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3489
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3494
3490
|
*/ /**
|
|
3495
3491
|
* @module utils/dom/tounit
|
|
3496
3492
|
*/ /**
|
|
@@ -3504,7 +3500,7 @@ const rectProperties = [
|
|
|
3504
3500
|
|
|
3505
3501
|
/**
|
|
3506
3502
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3507
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3503
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3508
3504
|
*/ /**
|
|
3509
3505
|
* @module utils/dom/indexof
|
|
3510
3506
|
*/ /**
|
|
@@ -3523,7 +3519,7 @@ const rectProperties = [
|
|
|
3523
3519
|
|
|
3524
3520
|
/**
|
|
3525
3521
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3526
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3522
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3527
3523
|
*/ /**
|
|
3528
3524
|
* @module utils/dom/insertat
|
|
3529
3525
|
*/ /**
|
|
@@ -3538,7 +3534,7 @@ const rectProperties = [
|
|
|
3538
3534
|
|
|
3539
3535
|
/**
|
|
3540
3536
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3541
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3537
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3542
3538
|
*/ /* globals Node */ /**
|
|
3543
3539
|
* @module utils/dom/iscomment
|
|
3544
3540
|
*/ /**
|
|
@@ -3886,7 +3882,7 @@ const rectProperties = [
|
|
|
3886
3882
|
|
|
3887
3883
|
/**
|
|
3888
3884
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3889
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
3885
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
3890
3886
|
*/ /**
|
|
3891
3887
|
* @module utils/dom/remove
|
|
3892
3888
|
*/ /**
|
|
@@ -4500,7 +4496,7 @@ function splitKeystrokeText(keystroke) {
|
|
|
4500
4496
|
|
|
4501
4497
|
/**
|
|
4502
4498
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4503
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
4499
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4504
4500
|
*/ /**
|
|
4505
4501
|
* @module utils/language
|
|
4506
4502
|
*/ /**
|
|
@@ -4530,7 +4526,7 @@ function splitKeystrokeText(keystroke) {
|
|
|
4530
4526
|
|
|
4531
4527
|
/**
|
|
4532
4528
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
4533
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
4529
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
4534
4530
|
*/ /**
|
|
4535
4531
|
* @module utils/toarray
|
|
4536
4532
|
*/ /**
|
|
@@ -5350,7 +5346,7 @@ function getNumberOfLanguages(translations) {
|
|
|
5350
5346
|
|
|
5351
5347
|
/**
|
|
5352
5348
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5353
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5349
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5354
5350
|
*/ /**
|
|
5355
5351
|
* @module utils/first
|
|
5356
5352
|
*/ /**
|
|
@@ -5774,7 +5770,7 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5774
5770
|
|
|
5775
5771
|
/**
|
|
5776
5772
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5777
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5773
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5778
5774
|
*/ /**
|
|
5779
5775
|
* @module utils/objecttomap
|
|
5780
5776
|
*/ /**
|
|
@@ -5818,7 +5814,7 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5818
5814
|
|
|
5819
5815
|
/**
|
|
5820
5816
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5821
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5817
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5822
5818
|
*/ /**
|
|
5823
5819
|
* @module utils/wait
|
|
5824
5820
|
*/ /**
|
|
@@ -5886,22 +5882,19 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5886
5882
|
|
|
5887
5883
|
/**
|
|
5888
5884
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5889
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5885
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5890
5886
|
*/ /**
|
|
5891
5887
|
* @module utils/splicearray
|
|
5892
|
-
*/
|
|
5893
|
-
|
|
5894
|
-
*
|
|
5895
|
-
*
|
|
5896
|
-
*
|
|
5897
|
-
* Note: in contrary to Array.splice, this function does not modify the original `target`.
|
|
5888
|
+
*/ /**
|
|
5889
|
+
* Splices one array into another. To be used instead of `Array.prototype.splice` for better
|
|
5890
|
+
* performance and because the latter may throw "Maximum call stack size exceeded" error when
|
|
5891
|
+
* passing huge number of items to insert.
|
|
5898
5892
|
*
|
|
5899
5893
|
* ```ts
|
|
5900
|
-
* spliceArray( [ 1, 2 ], [ 3, 4 ], 0
|
|
5901
|
-
* spliceArray( [ 1, 2 ], [ 3, 4 ], 1
|
|
5902
|
-
* spliceArray( [ 1, 2 ], [ 3, 4 ],
|
|
5903
|
-
* spliceArray( [ 1, 2 ], [
|
|
5904
|
-
* spliceArray( [ 1, 2 ], [], 0, 1 ); // [ 2 ]
|
|
5894
|
+
* spliceArray( [ 1, 2 ], [ 3, 4 ], 0 ); // [ 3, 4, 1, 2 ]
|
|
5895
|
+
* spliceArray( [ 1, 2 ], [ 3, 4 ], 1 ); // [ 1, 3, 4, 2 ]
|
|
5896
|
+
* spliceArray( [ 1, 2 ], [ 3, 4 ], 2 ); // [ 1, 2, 3, 4 ]
|
|
5897
|
+
* spliceArray( [ 1, 2 ], [], 0 ); // [ 1, 2 ]
|
|
5905
5898
|
* ```
|
|
5906
5899
|
*
|
|
5907
5900
|
* @param target Array to be spliced.
|
|
@@ -5910,20 +5903,22 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5910
5903
|
* @param count Number of items.
|
|
5911
5904
|
*
|
|
5912
5905
|
* @returns New spliced array.
|
|
5913
|
-
*/ function spliceArray(
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5906
|
+
*/ function spliceArray(targetArray, insertArray, index) {
|
|
5907
|
+
const originalLength = targetArray.length;
|
|
5908
|
+
const insertLength = insertArray.length;
|
|
5909
|
+
// Shift elements in the target array to make space for insertArray
|
|
5910
|
+
for(let i = originalLength - 1; i >= index; i--){
|
|
5911
|
+
targetArray[i + insertLength] = targetArray[i];
|
|
5912
|
+
}
|
|
5913
|
+
// Copy elements from insertArray into the target array
|
|
5914
|
+
for(let i = 0; i < insertLength; i++){
|
|
5915
|
+
targetArray[index + i] = insertArray[i];
|
|
5921
5916
|
}
|
|
5922
5917
|
}
|
|
5923
5918
|
|
|
5924
5919
|
/**
|
|
5925
5920
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5926
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5921
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5927
5922
|
*/ /**
|
|
5928
5923
|
* @module utils/delay
|
|
5929
5924
|
*/ /* globals setTimeout, clearTimeout */ /**
|
|
@@ -5946,7 +5941,7 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5946
5941
|
|
|
5947
5942
|
/**
|
|
5948
5943
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5949
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5944
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5950
5945
|
*/ /**
|
|
5951
5946
|
* @module utils/parsebase64encodedobject
|
|
5952
5947
|
*/ /**
|
|
@@ -5965,7 +5960,7 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
5965
5960
|
|
|
5966
5961
|
/**
|
|
5967
5962
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
5968
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
5963
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
5969
5964
|
*/ /**
|
|
5970
5965
|
* @module utils/crc32
|
|
5971
5966
|
*/ /**
|
|
@@ -6024,7 +6019,7 @@ function isFocusedView(subTreeRoot, view) {
|
|
|
6024
6019
|
|
|
6025
6020
|
/**
|
|
6026
6021
|
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
6027
|
-
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-
|
|
6022
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-licensing-options
|
|
6028
6023
|
*/ /**
|
|
6029
6024
|
* Set of utils to handle unicode characters.
|
|
6030
6025
|
*
|