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.
Files changed (60) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +3 -3
  4. package/es2015/jodit.js +28 -7
  5. package/es2015/jodit.min.js +10 -10
  6. package/es2015/plugins/debug/debug.css +1 -1
  7. package/es2015/plugins/debug/debug.js +1 -1
  8. package/es2015/plugins/debug/debug.min.js +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.js +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
  12. package/es2018/jodit.fat.min.js +3 -3
  13. package/es2018/jodit.min.js +3 -3
  14. package/es2018/plugins/debug/debug.min.js +1 -1
  15. package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
  16. package/es2021/jodit.css +1 -1
  17. package/es2021/jodit.fat.min.js +3 -3
  18. package/es2021/jodit.js +28 -7
  19. package/es2021/jodit.min.js +3 -3
  20. package/es2021/plugins/debug/debug.css +1 -1
  21. package/es2021/plugins/debug/debug.js +1 -1
  22. package/es2021/plugins/debug/debug.min.js +1 -1
  23. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.js +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
  26. package/es2021.en/jodit.css +1 -1
  27. package/es2021.en/jodit.fat.min.js +3 -3
  28. package/es2021.en/jodit.js +28 -7
  29. package/es2021.en/jodit.min.js +3 -3
  30. package/es2021.en/plugins/debug/debug.css +1 -1
  31. package/es2021.en/plugins/debug/debug.js +1 -1
  32. package/es2021.en/plugins/debug/debug.min.js +1 -1
  33. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
  36. package/es5/jodit.css +2 -2
  37. package/es5/jodit.fat.min.js +2 -2
  38. package/es5/jodit.js +28 -7
  39. package/es5/jodit.min.css +2 -2
  40. package/es5/jodit.min.js +2 -2
  41. package/es5/plugins/debug/debug.css +1 -1
  42. package/es5/plugins/debug/debug.js +1 -1
  43. package/es5/plugins/debug/debug.min.js +1 -1
  44. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
  47. package/es5/polyfills.fat.min.js +1 -1
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +1 -1
  50. package/esm/core/constants.js +1 -1
  51. package/esm/modules/file-browser/data-provider.d.ts +1 -0
  52. package/esm/modules/file-browser/data-provider.js +26 -5
  53. package/package.json +1 -1
  54. package/types/modules/file-browser/data-provider.d.ts +1 -0
  55. package/.nvmrc +0 -1
  56. package/examples/build/es2015/jodit.min.css +0 -1
  57. package/examples/build/es2015/jodit.min.js +0 -10
  58. package/examples/build/es2015/plugins/debug/debug.min.js +0 -10
  59. package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.css +0 -1
  60. package/examples/build/es2015/plugins/speech-recognize/speech-recognize.min.js +0 -10
package/es5/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.3
4
+ * Version: v4.17.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -2129,7 +2129,7 @@ __webpack_require__.r(__webpack_exports__);
2129
2129
  * @packageDocumentation
2130
2130
  * @module constants
2131
2131
  */
2132
- var APP_VERSION = "4.17.3";
2132
+ var APP_VERSION = "4.17.4";
2133
2133
  // prettier-ignore
2134
2134
  var ES = "es5";
2135
2135
  var IS_ES_MODERN = false;
@@ -25164,6 +25164,16 @@ var DOCS_URL = 'https://xdsoft.net/jodit/docs/modules/file_browser.html';
25164
25164
  });
25165
25165
  return resp;
25166
25166
  }
25167
+ /**
25168
+ * Actions that only read from the connector. A newer request for one of them
25169
+ * makes the older one pointless, so it is aborted; every other action changes
25170
+ * server state and must be allowed to finish.
25171
+ */ var REPLACEABLE_ACTIONS = new Set([
25172
+ 'items',
25173
+ 'folder',
25174
+ 'permissions',
25175
+ 'getLocalFileByUrl'
25176
+ ]);
25167
25177
  var DataProvider = /*#__PURE__*/ function() {
25168
25178
  "use strict";
25169
25179
  function DataProvider(parent, options) {
@@ -25172,11 +25182,13 @@ var DataProvider = /*#__PURE__*/ function() {
25172
25182
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "options", void 0);
25173
25183
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "__currentPermissions", void 0);
25174
25184
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "__ajaxInstances", void 0);
25185
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "__requestSerial", void 0);
25175
25186
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(this, "progressHandler", void 0);
25176
25187
  this.parent = parent;
25177
25188
  this.options = options;
25178
25189
  this.__currentPermissions = null;
25179
25190
  this.__ajaxInstances = new Map();
25191
+ this.__requestSerial = 0;
25180
25192
  this.progressHandler = function(ignore) {};
25181
25193
  }
25182
25194
  ;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(DataProvider, [
@@ -25193,10 +25205,19 @@ var DataProvider = /*#__PURE__*/ function() {
25193
25205
  value: function get(name) {
25194
25206
  var _this = this;
25195
25207
  var instances = this.__ajaxInstances;
25196
- if (instances.has(name)) {
25197
- var ajax = instances.get(name);
25208
+ // A listing asked for again supersedes the one still loading, so the
25209
+ // earlier request is aborted. That must never happen to a request
25210
+ // that changes something on the server: aborting it does not undo it,
25211
+ // the caller just never hears the result. Removing several files at
25212
+ // once used to send one `fileRemove` per file and abort all but the
25213
+ // last, so only the last one was ever removed. Mutating requests get a
25214
+ // key of their own and run side by side.
25215
+ var replaceable = REPLACEABLE_ACTIONS.has(name);
25216
+ var key = replaceable ? name : "".concat(name, "#").concat(++this.__requestSerial);
25217
+ if (replaceable && instances.has(key)) {
25218
+ var ajax = instances.get(key);
25198
25219
  ajax === null || ajax === void 0 ? void 0 : ajax.abort();
25199
- instances.delete(name);
25220
+ instances.delete(key);
25200
25221
  }
25201
25222
  var opts = (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers_utils_config_proto__WEBPACK_IMPORTED_MODULE_15__.ConfigProto)({
25202
25223
  onProgress: this.progressHandler
@@ -25205,11 +25226,11 @@ var DataProvider = /*#__PURE__*/ function() {
25205
25226
  opts.data = opts.prepareData.call(this, opts.data);
25206
25227
  }
25207
25228
  var ajax1 = new jodit_core_request_ajax__WEBPACK_IMPORTED_MODULE_18__.Ajax(opts);
25208
- instances.set(name, ajax1);
25229
+ instances.set(key, ajax1);
25209
25230
  var promise = ajax1.send();
25210
25231
  promise.finally(function() {
25211
25232
  ajax1.destruct();
25212
- instances.delete(name);
25233
+ instances.delete(key);
25213
25234
  _this.progressHandler(100);
25214
25235
  }).catch(function() {
25215
25236
  return null;
package/es5/jodit.min.css CHANGED
@@ -1,14 +1,14 @@
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.3
4
+ * Version: v4.17.4
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
8
8
  /*!
9
9
  * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
10
10
  * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
11
- * Version: v4.17.3
11
+ * Version: v4.17.4
12
12
  * Url: https://xdsoft.net/jodit/
13
13
  * License(s): MIT
14
14
  */