jodit-pro-react 5.5.76 → 5.5.78
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.
|
@@ -193,7 +193,7 @@ var APP_VERSION, ES, IS_ES_MODERN, IS_ES_NEXT, IS_PROD, IS_TEST, FAT_MODE, HOMEP
|
|
|
193
193
|
var init_constants = __esm({
|
|
194
194
|
"node_modules/jodit/esm/core/constants.js"() {
|
|
195
195
|
"use strict";
|
|
196
|
-
APP_VERSION = "4.13.
|
|
196
|
+
APP_VERSION = "4.13.17";
|
|
197
197
|
ES = "es2020";
|
|
198
198
|
IS_ES_MODERN = true;
|
|
199
199
|
IS_ES_NEXT = true;
|
|
@@ -4303,7 +4303,7 @@ function inView(elm, root, doc) {
|
|
|
4303
4303
|
while (el && el !== root && el.parentNode) {
|
|
4304
4304
|
el = el.parentNode;
|
|
4305
4305
|
rect = el.getBoundingClientRect();
|
|
4306
|
-
if (
|
|
4306
|
+
if (top + height > rect.bottom && top > rect.top) {
|
|
4307
4307
|
return false;
|
|
4308
4308
|
}
|
|
4309
4309
|
if (top + height <= rect.top) {
|
|
@@ -4311,12 +4311,13 @@ function inView(elm, root, doc) {
|
|
|
4311
4311
|
}
|
|
4312
4312
|
}
|
|
4313
4313
|
const clientHeight = doc.documentElement && doc.documentElement.clientHeight || 0;
|
|
4314
|
-
return top <= clientHeight && top + height >= 0;
|
|
4314
|
+
return (top + height <= clientHeight || top <= 0) && top + height >= 0;
|
|
4315
4315
|
}
|
|
4316
4316
|
function scrollIntoViewIfNeeded(elm, root, doc) {
|
|
4317
4317
|
if (Dom.isHTMLElement(elm) && !inView(elm, root, doc)) {
|
|
4318
4318
|
if (root.clientHeight !== root.scrollHeight) {
|
|
4319
|
-
|
|
4319
|
+
const alignBottom = elm.offsetTop + elm.offsetHeight - root.clientHeight;
|
|
4320
|
+
root.scrollTop = root.scrollTop < alignBottom ? alignBottom : elm.offsetTop;
|
|
4320
4321
|
}
|
|
4321
4322
|
if (!inView(elm, root, doc)) {
|
|
4322
4323
|
elm.scrollIntoView();
|
|
@@ -16783,6 +16784,7 @@ function sendFiles(uploader, files, handlerSuccess, handlerError, process2) {
|
|
|
16783
16784
|
return Promise.all(promises);
|
|
16784
16785
|
}
|
|
16785
16786
|
function readImagesWithReader(fileList, imagesExtensions, promises, uploader, handlerSuccess, defaultHandlerSuccess) {
|
|
16787
|
+
const readerPromises = [];
|
|
16786
16788
|
let file2, i54;
|
|
16787
16789
|
for (i54 = 0; i54 < fileList.length; i54 += 1) {
|
|
16788
16790
|
file2 = fileList[i54];
|
|
@@ -16793,7 +16795,7 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
16793
16795
|
continue;
|
|
16794
16796
|
}
|
|
16795
16797
|
const reader = new FileReader();
|
|
16796
|
-
|
|
16798
|
+
const readerPromise = uploader.j.async.promise((resolve, reject) => {
|
|
16797
16799
|
reader.onerror = reject;
|
|
16798
16800
|
reader.onloadend = () => {
|
|
16799
16801
|
const resp = {
|
|
@@ -16806,10 +16808,18 @@ function readImagesWithReader(fileList, imagesExtensions, promises, uploader, ha
|
|
|
16806
16808
|
resolve(resp);
|
|
16807
16809
|
};
|
|
16808
16810
|
reader.readAsDataURL(file2);
|
|
16809
|
-
})
|
|
16811
|
+
});
|
|
16812
|
+
readerPromises.push(readerPromise);
|
|
16813
|
+
promises.push(readerPromise);
|
|
16810
16814
|
fileList[i54] = null;
|
|
16811
16815
|
}
|
|
16812
16816
|
}
|
|
16817
|
+
if (readerPromises.length) {
|
|
16818
|
+
Promise.all(readerPromises).then(() => {
|
|
16819
|
+
uploader.j.events && uploader.j.e.fire("filesWereUploaded");
|
|
16820
|
+
}).catch(() => {
|
|
16821
|
+
});
|
|
16822
|
+
}
|
|
16813
16823
|
}
|
|
16814
16824
|
|
|
16815
16825
|
// node_modules/jodit/esm/modules/uploader/helpers/process-old-browser-drag.js
|
|
@@ -22167,8 +22177,12 @@ function splitFragment(fake, jodit, block) {
|
|
|
22167
22177
|
}
|
|
22168
22178
|
return;
|
|
22169
22179
|
}
|
|
22170
|
-
const
|
|
22171
|
-
|
|
22180
|
+
const { scrollTop } = jodit.editor;
|
|
22181
|
+
sel.splitSelection(block, fake);
|
|
22182
|
+
if (jodit.editor.scrollTop !== scrollTop) {
|
|
22183
|
+
jodit.editor.scrollTop = scrollTop;
|
|
22184
|
+
}
|
|
22185
|
+
scrollIntoViewIfNeeded(block, jodit.editor, jodit.ed);
|
|
22172
22186
|
}
|
|
22173
22187
|
|
|
22174
22188
|
// node_modules/jodit/esm/plugins/enter/helpers/wrap-text.js
|