jodit 4.1.10 → 4.1.11
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/CHANGELOG.md +9 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +29 -27
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +29 -27
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +29 -27
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +29 -27
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +31 -29
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/modules/file-browser/config.d.ts +1 -0
- package/esm/modules/file-browser/config.js +1 -0
- package/esm/modules/file-browser/data-provider.d.ts +1 -1
- package/esm/modules/file-browser/data-provider.js +9 -9
- package/package.json +1 -1
- package/types/modules/file-browser/config.d.ts +1 -0
- package/types/modules/file-browser/data-provider.d.ts +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.1.
|
|
4
|
+
* Version: v4.1.11
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1707,7 +1707,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1707
1707
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1708
1708
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1709
1709
|
*/
|
|
1710
|
-
const APP_VERSION = "4.1.
|
|
1710
|
+
const APP_VERSION = "4.1.11";
|
|
1711
1711
|
// prettier-ignore
|
|
1712
1712
|
const ES = "es2015";
|
|
1713
1713
|
const IS_ES_MODERN = true;
|
|
@@ -18669,10 +18669,11 @@ class FileBrowserItem {
|
|
|
18669
18669
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18670
18670
|
|
|
18671
18671
|
"use strict";
|
|
18672
|
-
/* harmony import */ var
|
|
18673
|
-
/* harmony import */ var
|
|
18674
|
-
/* harmony import */ var
|
|
18675
|
-
/* harmony import */ var
|
|
18672
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18673
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18674
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18675
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18676
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18676
18677
|
/*!
|
|
18677
18678
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18678
18679
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18682,19 +18683,20 @@ class FileBrowserItem {
|
|
|
18682
18683
|
|
|
18683
18684
|
|
|
18684
18685
|
|
|
18685
|
-
|
|
18686
|
+
|
|
18687
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18686
18688
|
namespace: '',
|
|
18687
18689
|
cache: true,
|
|
18688
18690
|
extraButtons: [],
|
|
18689
18691
|
filter(item, search) {
|
|
18690
18692
|
search = search.toLowerCase();
|
|
18691
|
-
if ((0,
|
|
18693
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18692
18694
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18693
18695
|
}
|
|
18694
|
-
if ((0,
|
|
18696
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18695
18697
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18696
18698
|
}
|
|
18697
|
-
if ((0,
|
|
18699
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18698
18700
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18699
18701
|
}
|
|
18700
18702
|
return true;
|
|
@@ -18711,14 +18713,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18711
18713
|
}
|
|
18712
18714
|
return 0;
|
|
18713
18715
|
};
|
|
18714
|
-
if ((0,
|
|
18716
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18715
18717
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18716
18718
|
}
|
|
18717
18719
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18718
|
-
if ((0,
|
|
18720
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18719
18721
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18720
18722
|
}
|
|
18721
|
-
if ((0,
|
|
18723
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18722
18724
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18723
18725
|
}
|
|
18724
18726
|
return 0;
|
|
@@ -18729,7 +18731,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18729
18731
|
return asc ? f - s : s - f;
|
|
18730
18732
|
}
|
|
18731
18733
|
case 'size': {
|
|
18732
|
-
const f = (0,
|
|
18734
|
+
const f = (0,jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__/* .humanSizeToBytes */ .z)(a.size), s = (0,jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__/* .humanSizeToBytes */ .z)(b.size);
|
|
18733
18735
|
return asc ? f - s : s - f;
|
|
18734
18736
|
}
|
|
18735
18737
|
}
|
|
@@ -18790,7 +18792,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18790
18792
|
return resp.success;
|
|
18791
18793
|
},
|
|
18792
18794
|
getMessage(resp) {
|
|
18793
|
-
return resp.data.messages !== undefined && (0,
|
|
18795
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18794
18796
|
? resp.data.messages.join(' ')
|
|
18795
18797
|
: '';
|
|
18796
18798
|
},
|
|
@@ -18835,7 +18837,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18835
18837
|
${showName || showSize || showTime ? info : ''}
|
|
18836
18838
|
</a>`;
|
|
18837
18839
|
},
|
|
18838
|
-
ajax: Object.assign(Object.assign({},
|
|
18840
|
+
ajax: Object.assign(Object.assign({}, jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions), { url: '', data: {}, cache: true, contentType: 'application/x-www-form-urlencoded; charset=UTF-8', method: 'POST', processData: true, headers: {}, prepareData(data) {
|
|
18839
18841
|
return data;
|
|
18840
18842
|
},
|
|
18841
18843
|
process(resp) {
|
|
@@ -18881,13 +18883,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18881
18883
|
data: { action: 'permissions' }
|
|
18882
18884
|
}
|
|
18883
18885
|
};
|
|
18884
|
-
|
|
18886
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18885
18887
|
upload: {
|
|
18886
18888
|
icon: 'plus',
|
|
18887
18889
|
isInput: true,
|
|
18888
18890
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18889
18891
|
getContent: (filebrowser) => {
|
|
18890
|
-
const btn = new
|
|
18892
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18891
18893
|
onlyImages: filebrowser.state.onlyImages
|
|
18892
18894
|
});
|
|
18893
18895
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19035,7 +19037,7 @@ let DataProvider = class DataProvider {
|
|
|
19035
19037
|
this.parent = parent;
|
|
19036
19038
|
this.options = options;
|
|
19037
19039
|
this.__currentPermissions = null;
|
|
19038
|
-
this.
|
|
19040
|
+
this.__ajaxInstances = new Map();
|
|
19039
19041
|
this.progressHandler = (ignore) => { };
|
|
19040
19042
|
}
|
|
19041
19043
|
/**
|
|
@@ -19045,11 +19047,11 @@ let DataProvider = class DataProvider {
|
|
|
19045
19047
|
return this.options;
|
|
19046
19048
|
}
|
|
19047
19049
|
get(name) {
|
|
19048
|
-
const
|
|
19049
|
-
if (
|
|
19050
|
-
const ajax =
|
|
19050
|
+
const instances = this.__ajaxInstances;
|
|
19051
|
+
if (instances.has(name)) {
|
|
19052
|
+
const ajax = instances.get(name);
|
|
19051
19053
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
19052
|
-
|
|
19054
|
+
instances.delete(name);
|
|
19053
19055
|
}
|
|
19054
19056
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19055
19057
|
? this.options[name]
|
|
@@ -19060,12 +19062,12 @@ let DataProvider = class DataProvider {
|
|
|
19060
19062
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19061
19063
|
}
|
|
19062
19064
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19063
|
-
|
|
19065
|
+
instances.set(name, ajax);
|
|
19064
19066
|
const promise = ajax.send();
|
|
19065
19067
|
promise
|
|
19066
19068
|
.finally(() => {
|
|
19067
19069
|
ajax.destruct();
|
|
19068
|
-
|
|
19070
|
+
instances.delete(name);
|
|
19069
19071
|
this.progressHandler(100);
|
|
19070
19072
|
})
|
|
19071
19073
|
.catch(() => null);
|
|
@@ -19386,8 +19388,8 @@ let DataProvider = class DataProvider {
|
|
|
19386
19388
|
return this.options.isSuccess(resp);
|
|
19387
19389
|
}
|
|
19388
19390
|
destruct() {
|
|
19389
|
-
this.
|
|
19390
|
-
this.
|
|
19391
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19392
|
+
this.__ajaxInstances.clear();
|
|
19391
19393
|
}
|
|
19392
19394
|
};
|
|
19393
19395
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|