jodit 4.17.3 → 4.17.4
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 +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +28 -7
- package/es2015/jodit.min.js +10 -10
- package/es2015/plugins/debug/debug.css +1 -1
- 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.fat.min.js +3 -3
- package/es2018/jodit.min.js +3 -3
- package/es2018/plugins/debug/debug.min.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 +3 -3
- package/es2021/jodit.js +28 -7
- package/es2021/jodit.min.js +3 -3
- package/es2021/plugins/debug/debug.css +1 -1
- 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 +3 -3
- package/es2021.en/jodit.js +28 -7
- package/es2021.en/jodit.min.js +3 -3
- package/es2021.en/plugins/debug/debug.css +1 -1
- 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 +28 -7
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- 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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/modules/file-browser/data-provider.d.ts +1 -0
- package/esm/modules/file-browser/data-provider.js +26 -5
- package/package.json +1 -1
- package/types/modules/file-browser/data-provider.d.ts +1 -0
- package/.nvmrc +0 -1
- package/examples/build/es2015/jodit.min.css +0 -1
- package/examples/build/es2015/jodit.min.js +0 -10
- package/examples/build/es2015/plugins/debug/debug.min.js +0 -10
- package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.css +0 -1
- package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.js +0 -10
package/es2021/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.17.
|
|
4
|
+
* Version: v4.17.4
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1799,7 +1799,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1799
1799
|
* ```
|
|
1800
1800
|
* @packageDocumentation
|
|
1801
1801
|
* @module constants
|
|
1802
|
-
*/ const APP_VERSION = "4.17.
|
|
1802
|
+
*/ const APP_VERSION = "4.17.4";
|
|
1803
1803
|
// prettier-ignore
|
|
1804
1804
|
const ES = "es2021";
|
|
1805
1805
|
const IS_ES_MODERN = true;
|
|
@@ -20788,6 +20788,16 @@ const DOCS_URL = 'https://xdsoft.net/jodit/docs/modules/file_browser.html';
|
|
|
20788
20788
|
});
|
|
20789
20789
|
return resp;
|
|
20790
20790
|
}
|
|
20791
|
+
/**
|
|
20792
|
+
* Actions that only read from the connector. A newer request for one of them
|
|
20793
|
+
* makes the older one pointless, so it is aborted; every other action changes
|
|
20794
|
+
* server state and must be allowed to finish.
|
|
20795
|
+
*/ const REPLACEABLE_ACTIONS = new Set([
|
|
20796
|
+
'items',
|
|
20797
|
+
'folder',
|
|
20798
|
+
'permissions',
|
|
20799
|
+
'getLocalFileByUrl'
|
|
20800
|
+
]);
|
|
20791
20801
|
class DataProvider {
|
|
20792
20802
|
/**
|
|
20793
20803
|
* Alias for options
|
|
@@ -20796,10 +20806,19 @@ class DataProvider {
|
|
|
20796
20806
|
}
|
|
20797
20807
|
get(name) {
|
|
20798
20808
|
const instances = this.__ajaxInstances;
|
|
20799
|
-
|
|
20800
|
-
|
|
20809
|
+
// A listing asked for again supersedes the one still loading, so the
|
|
20810
|
+
// earlier request is aborted. That must never happen to a request
|
|
20811
|
+
// that changes something on the server: aborting it does not undo it,
|
|
20812
|
+
// the caller just never hears the result. Removing several files at
|
|
20813
|
+
// once used to send one `fileRemove` per file and abort all but the
|
|
20814
|
+
// last, so only the last one was ever removed. Mutating requests get a
|
|
20815
|
+
// key of their own and run side by side.
|
|
20816
|
+
const replaceable = REPLACEABLE_ACTIONS.has(name);
|
|
20817
|
+
const key = replaceable ? name : `${name}#${++this.__requestSerial}`;
|
|
20818
|
+
if (replaceable && instances.has(key)) {
|
|
20819
|
+
const ajax = instances.get(key);
|
|
20801
20820
|
ajax?.abort();
|
|
20802
|
-
instances.delete(
|
|
20821
|
+
instances.delete(key);
|
|
20803
20822
|
}
|
|
20804
20823
|
const opts = (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_8__.ConfigProto)({
|
|
20805
20824
|
onProgress: this.progressHandler
|
|
@@ -20808,11 +20827,11 @@ class DataProvider {
|
|
|
20808
20827
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
20809
20828
|
}
|
|
20810
20829
|
const ajax = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_11__.Ajax(opts);
|
|
20811
|
-
instances.set(
|
|
20830
|
+
instances.set(key, ajax);
|
|
20812
20831
|
const promise = ajax.send();
|
|
20813
20832
|
promise.finally(()=>{
|
|
20814
20833
|
ajax.destruct();
|
|
20815
|
-
instances.delete(
|
|
20834
|
+
instances.delete(key);
|
|
20816
20835
|
this.progressHandler(100);
|
|
20817
20836
|
}).catch(()=>null);
|
|
20818
20837
|
return promise.then((resp)=>resp.json()).then((resp)=>{
|
|
@@ -21117,11 +21136,13 @@ class DataProvider {
|
|
|
21117
21136
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0);
|
|
21118
21137
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__currentPermissions", void 0);
|
|
21119
21138
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__ajaxInstances", void 0);
|
|
21139
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "__requestSerial", void 0);
|
|
21120
21140
|
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "progressHandler", void 0);
|
|
21121
21141
|
this.parent = parent;
|
|
21122
21142
|
this.options = options;
|
|
21123
21143
|
this.__currentPermissions = null;
|
|
21124
21144
|
this.__ajaxInstances = new Map();
|
|
21145
|
+
this.__requestSerial = 0;
|
|
21125
21146
|
this.progressHandler = (ignore)=>{};
|
|
21126
21147
|
}
|
|
21127
21148
|
}
|