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/es2018/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 = "es2018";
|
|
1713
1713
|
const IS_ES_MODERN = true;
|
|
@@ -18731,10 +18731,11 @@ class FileBrowserItem {
|
|
|
18731
18731
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18732
18732
|
|
|
18733
18733
|
"use strict";
|
|
18734
|
-
/* harmony import */ var
|
|
18735
|
-
/* harmony import */ var
|
|
18736
|
-
/* harmony import */ var
|
|
18737
|
-
/* harmony import */ var
|
|
18734
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18735
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18736
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18737
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18738
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18738
18739
|
/*!
|
|
18739
18740
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18740
18741
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18744,19 +18745,20 @@ class FileBrowserItem {
|
|
|
18744
18745
|
|
|
18745
18746
|
|
|
18746
18747
|
|
|
18747
|
-
|
|
18748
|
+
|
|
18749
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18748
18750
|
namespace: '',
|
|
18749
18751
|
cache: true,
|
|
18750
18752
|
extraButtons: [],
|
|
18751
18753
|
filter(item, search) {
|
|
18752
18754
|
search = search.toLowerCase();
|
|
18753
|
-
if ((0,
|
|
18755
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18754
18756
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18755
18757
|
}
|
|
18756
|
-
if ((0,
|
|
18758
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18757
18759
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18758
18760
|
}
|
|
18759
|
-
if ((0,
|
|
18761
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18760
18762
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18761
18763
|
}
|
|
18762
18764
|
return true;
|
|
@@ -18773,14 +18775,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18773
18775
|
}
|
|
18774
18776
|
return 0;
|
|
18775
18777
|
};
|
|
18776
|
-
if ((0,
|
|
18778
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18777
18779
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18778
18780
|
}
|
|
18779
18781
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18780
|
-
if ((0,
|
|
18782
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18781
18783
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18782
18784
|
}
|
|
18783
|
-
if ((0,
|
|
18785
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18784
18786
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18785
18787
|
}
|
|
18786
18788
|
return 0;
|
|
@@ -18791,7 +18793,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18791
18793
|
return asc ? f - s : s - f;
|
|
18792
18794
|
}
|
|
18793
18795
|
case 'size': {
|
|
18794
|
-
const f = (0,
|
|
18796
|
+
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);
|
|
18795
18797
|
return asc ? f - s : s - f;
|
|
18796
18798
|
}
|
|
18797
18799
|
}
|
|
@@ -18852,7 +18854,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18852
18854
|
return resp.success;
|
|
18853
18855
|
},
|
|
18854
18856
|
getMessage(resp) {
|
|
18855
|
-
return resp.data.messages !== undefined && (0,
|
|
18857
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18856
18858
|
? resp.data.messages.join(' ')
|
|
18857
18859
|
: '';
|
|
18858
18860
|
},
|
|
@@ -18898,7 +18900,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18898
18900
|
</a>`;
|
|
18899
18901
|
},
|
|
18900
18902
|
ajax: {
|
|
18901
|
-
...
|
|
18903
|
+
...jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions,
|
|
18902
18904
|
url: '',
|
|
18903
18905
|
data: {},
|
|
18904
18906
|
cache: true,
|
|
@@ -18953,13 +18955,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18953
18955
|
data: { action: 'permissions' }
|
|
18954
18956
|
}
|
|
18955
18957
|
};
|
|
18956
|
-
|
|
18958
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18957
18959
|
upload: {
|
|
18958
18960
|
icon: 'plus',
|
|
18959
18961
|
isInput: true,
|
|
18960
18962
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18961
18963
|
getContent: (filebrowser) => {
|
|
18962
|
-
const btn = new
|
|
18964
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18963
18965
|
onlyImages: filebrowser.state.onlyImages
|
|
18964
18966
|
});
|
|
18965
18967
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19107,7 +19109,7 @@ let DataProvider = class DataProvider {
|
|
|
19107
19109
|
this.parent = parent;
|
|
19108
19110
|
this.options = options;
|
|
19109
19111
|
this.__currentPermissions = null;
|
|
19110
|
-
this.
|
|
19112
|
+
this.__ajaxInstances = new Map();
|
|
19111
19113
|
this.progressHandler = (ignore) => { };
|
|
19112
19114
|
}
|
|
19113
19115
|
/**
|
|
@@ -19117,11 +19119,11 @@ let DataProvider = class DataProvider {
|
|
|
19117
19119
|
return this.options;
|
|
19118
19120
|
}
|
|
19119
19121
|
get(name) {
|
|
19120
|
-
const
|
|
19121
|
-
if (
|
|
19122
|
-
const ajax =
|
|
19122
|
+
const instances = this.__ajaxInstances;
|
|
19123
|
+
if (instances.has(name)) {
|
|
19124
|
+
const ajax = instances.get(name);
|
|
19123
19125
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
19124
|
-
|
|
19126
|
+
instances.delete(name);
|
|
19125
19127
|
}
|
|
19126
19128
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19127
19129
|
? this.options[name]
|
|
@@ -19132,12 +19134,12 @@ let DataProvider = class DataProvider {
|
|
|
19132
19134
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19133
19135
|
}
|
|
19134
19136
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19135
|
-
|
|
19137
|
+
instances.set(name, ajax);
|
|
19136
19138
|
const promise = ajax.send();
|
|
19137
19139
|
promise
|
|
19138
19140
|
.finally(() => {
|
|
19139
19141
|
ajax.destruct();
|
|
19140
|
-
|
|
19142
|
+
instances.delete(name);
|
|
19141
19143
|
this.progressHandler(100);
|
|
19142
19144
|
})
|
|
19143
19145
|
.catch(() => null);
|
|
@@ -19458,8 +19460,8 @@ let DataProvider = class DataProvider {
|
|
|
19458
19460
|
return this.options.isSuccess(resp);
|
|
19459
19461
|
}
|
|
19460
19462
|
destruct() {
|
|
19461
|
-
this.
|
|
19462
|
-
this.
|
|
19463
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19464
|
+
this.__ajaxInstances.clear();
|
|
19463
19465
|
}
|
|
19464
19466
|
};
|
|
19465
19467
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|