jodit 4.7.4 → 4.7.6

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 (65) hide show
  1. package/CHANGELOG.md +87 -31
  2. package/README.md +4 -18
  3. package/es2015/jodit.css +1 -1
  4. package/es2015/jodit.fat.min.js +8 -8
  5. package/es2015/jodit.js +103 -148
  6. package/es2015/jodit.min.js +7 -7
  7. package/es2015/plugins/debug/debug.css +1 -1
  8. package/es2015/plugins/debug/debug.js +1 -1
  9. package/es2015/plugins/debug/debug.min.js +1 -1
  10. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  11. package/es2015/plugins/speech-recognize/speech-recognize.js +9 -3
  12. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  13. package/es2018/jodit.fat.min.js +8 -8
  14. package/es2018/jodit.min.js +7 -7
  15. package/es2018/plugins/debug/debug.min.js +1 -1
  16. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  17. package/es2021/jodit.css +1 -1
  18. package/es2021/jodit.fat.min.js +11 -11
  19. package/es2021/jodit.js +103 -148
  20. package/es2021/jodit.min.js +10 -10
  21. package/es2021/plugins/debug/debug.css +1 -1
  22. package/es2021/plugins/debug/debug.js +1 -1
  23. package/es2021/plugins/debug/debug.min.js +1 -1
  24. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  25. package/es2021/plugins/speech-recognize/speech-recognize.js +9 -3
  26. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  27. package/es2021.en/jodit.css +1 -1
  28. package/es2021.en/jodit.fat.min.js +12 -12
  29. package/es2021.en/jodit.js +103 -148
  30. package/es2021.en/jodit.min.js +11 -11
  31. package/es2021.en/plugins/debug/debug.css +1 -1
  32. package/es2021.en/plugins/debug/debug.js +1 -1
  33. package/es2021.en/plugins/debug/debug.min.js +1 -1
  34. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.js +9 -3
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  37. package/es5/jodit.css +2 -2
  38. package/es5/jodit.fat.min.js +2 -2
  39. package/es5/jodit.js +106 -152
  40. package/es5/jodit.min.css +2 -2
  41. package/es5/jodit.min.js +2 -2
  42. package/es5/plugins/debug/debug.css +1 -1
  43. package/es5/plugins/debug/debug.js +1 -1
  44. package/es5/plugins/debug/debug.min.js +1 -1
  45. package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
  46. package/es5/plugins/speech-recognize/speech-recognize.js +9 -3
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  48. package/es5/polyfills.fat.min.js +1 -1
  49. package/es5/polyfills.js +1 -1
  50. package/es5/polyfills.min.js +1 -1
  51. package/esm/core/constants.js +1 -1
  52. package/esm/core/decorators/autobind/autobind.d.ts +19 -1
  53. package/esm/core/decorators/autobind/autobind.js +40 -1
  54. package/esm/modules/file-browser/data-provider.js +2 -17
  55. package/esm/modules/uploader/helpers/send.js +17 -11
  56. package/esm/modules/widget/file-selector/file-selector.js +5 -3
  57. package/esm/plugins/resize-handler/resize-handler.js +10 -5
  58. package/esm/plugins/size/size.js +8 -6
  59. package/esm/plugins/speech-recognize/helpers/recognize-manager.js +13 -9
  60. package/esm/tsconfig.json +1 -1
  61. package/esm/types/uploader.d.ts +14 -0
  62. package/package.json +1 -1
  63. package/types/core/decorators/autobind/autobind.d.ts +19 -1
  64. package/types/tsconfig.json +1 -1
  65. package/types/types/uploader.d.ts +14 -0
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.7.4
4
+ * Version: v4.7.6
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -530,7 +530,7 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 24 24\">
530
530
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25045);
531
531
  /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
532
532
  /* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(69364);
533
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(52201);
533
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(49574);
534
534
  /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(68616);
535
535
  /* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(23211);
536
536
  /* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(45664);
@@ -662,7 +662,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_11__
662
662
  (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_4__.watch)(':rebuildToolbar')
663
663
  ], ViewWithToolbar.prototype, "buildToolbar", null);
664
664
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
665
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__["default"]
665
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_3__.autobind
666
666
  ], ViewWithToolbar.prototype, "beforeToolbarBuild", null);
667
667
 
668
668
 
@@ -7226,7 +7226,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.iframeSandbox = null;
7226
7226
  /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(31635);
7227
7227
  /* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(91231);
7228
7228
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81937);
7229
- /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(52201);
7229
+ /* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(49574);
7230
7230
  /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65946);
7231
7231
  /* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(33201);
7232
7232
  /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(5266);
@@ -7394,7 +7394,7 @@ class Ajax {
7394
7394
  }
7395
7395
  (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__._)(Ajax, "log", []);
7396
7396
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_3__.__decorate)([
7397
- jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__["default"]
7397
+ jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_6__.autobind
7398
7398
  ], Ajax.prototype, "destruct", null);
7399
7399
 
7400
7400
 
@@ -7544,12 +7544,10 @@ class Ajax {
7544
7544
  /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25045);
7545
7545
  /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(41411);
7546
7546
  /* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(15366);
7547
- /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(31635);
7548
- /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(81937);
7549
- /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(84839);
7550
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65946);
7551
- /* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(73714);
7552
- /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(58664);
7547
+ /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81937);
7548
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65946);
7549
+ /* harmony import */ var jodit_core_request__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(73714);
7550
+ /* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58664);
7553
7551
  /*!
7554
7552
  * Jodit Editor (https://xdsoft.net/jodit/)
7555
7553
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -7564,8 +7562,6 @@ class Ajax {
7564
7562
 
7565
7563
 
7566
7564
 
7567
-
7568
-
7569
7565
  const DEFAULT_SOURCE_NAME = 'default';
7570
7566
  const possibleRules = new Set([
7571
7567
  'allowFiles',
@@ -7595,13 +7591,13 @@ class DataProvider {
7595
7591
  ajax === null || ajax === void 0 ? void 0 : ajax.abort();
7596
7592
  instances.delete(name);
7597
7593
  }
7598
- const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.ConfigProto)({
7594
+ const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)({
7599
7595
  onProgress: this.progressHandler
7600
7596
  }, this.o.ajax));
7601
7597
  if (opts.prepareData) {
7602
7598
  opts.data = opts.prepareData.call(this, opts.data);
7603
7599
  }
7604
- const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_8__.Ajax(opts);
7600
+ const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_6__.Ajax(opts);
7605
7601
  instances.set(name, ajax);
7606
7602
  const promise = ajax.send();
7607
7603
  promise.finally(()=>{
@@ -7631,7 +7627,7 @@ class DataProvider {
7631
7627
  if (this.o.permissions.url) {
7632
7628
  return this.get('permissions').then((resp)=>{
7633
7629
  if (this.parent.isInDestruct) {
7634
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.abort)();
7630
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.abort)();
7635
7631
  }
7636
7632
  let process = this.o.permissions.process;
7637
7633
  if (!process) {
@@ -7652,9 +7648,9 @@ class DataProvider {
7652
7648
  }
7653
7649
  canI(action) {
7654
7650
  const rule = 'allow' + action;
7655
- if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_5__.IS_PROD) {
7651
+ if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_4__.IS_PROD) {
7656
7652
  if (!possibleRules.has(rule)) {
7657
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)('Wrong action ' + action);
7653
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Wrong action ' + action);
7658
7654
  }
7659
7655
  }
7660
7656
  const presetValue = this.o.permissionsPresets[rule];
@@ -7706,12 +7702,12 @@ class DataProvider {
7706
7702
  sources.forEach((source)=>{
7707
7703
  if (source.files && source.files.length) {
7708
7704
  const { sort } = this.o;
7709
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.isFunction)(sort) && mods.sortBy) {
7705
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(sort) && mods.sortBy) {
7710
7706
  source.files.sort((a, b)=>sort(a, b, mods.sortBy));
7711
7707
  }
7712
7708
  source.files.forEach((item)=>{
7713
7709
  if (inFilter(item) && canBeFile(item)) {
7714
- elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_9__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, item), {
7710
+ elements.push(jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_7__.FileBrowserItem.create((0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_3__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_2__._)({}, item), {
7715
7711
  sourceName: source.name,
7716
7712
  source
7717
7713
  })));
@@ -7723,7 +7719,7 @@ class DataProvider {
7723
7719
  }
7724
7720
  tree(path, source) {
7725
7721
  return (0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
7726
- path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.normalizeRelativePath)(path);
7722
+ path = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.normalizeRelativePath)(path);
7727
7723
  if (!this.o.folder) {
7728
7724
  return Promise.reject(Error('Set Folder Api options'));
7729
7725
  }
@@ -7745,12 +7741,12 @@ class DataProvider {
7745
7741
  /**
7746
7742
  * Get path by url. You can use this method in another modules
7747
7743
  */ getPathByUrl(url) {
7748
- (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.set)('options.getLocalFileByUrl.data.url', url, this);
7744
+ (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.set)('options.getLocalFileByUrl.data.url', url, this);
7749
7745
  return this.get('getLocalFileByUrl').then((resp)=>{
7750
7746
  if (this.isSuccess(resp)) {
7751
7747
  return resp.data;
7752
7748
  }
7753
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)(this.getMessage(resp));
7749
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
7754
7750
  });
7755
7751
  }
7756
7752
  /**
@@ -7762,7 +7758,7 @@ class DataProvider {
7762
7758
  */ createFolder(name, path, source) {
7763
7759
  const { create } = this.o;
7764
7760
  if (!create) {
7765
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)('Set Create api options');
7761
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Set Create api options');
7766
7762
  }
7767
7763
  create.data.source = source;
7768
7764
  create.data.path = path;
@@ -7771,7 +7767,7 @@ class DataProvider {
7771
7767
  if (this.isSuccess(resp)) {
7772
7768
  return true;
7773
7769
  }
7774
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)(this.getMessage(resp));
7770
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
7775
7771
  });
7776
7772
  }
7777
7773
  /**
@@ -7783,7 +7779,7 @@ class DataProvider {
7783
7779
  const mode = isFile ? 'fileMove' : 'folderMove';
7784
7780
  const option = this.options[mode];
7785
7781
  if (!option) {
7786
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)('Set Move api options');
7782
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Set Move api options');
7787
7783
  }
7788
7784
  option.data.from = filepath;
7789
7785
  option.data.path = path;
@@ -7792,7 +7788,7 @@ class DataProvider {
7792
7788
  if (this.isSuccess(resp)) {
7793
7789
  return true;
7794
7790
  }
7795
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)(this.getMessage(resp));
7791
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(this.getMessage(resp));
7796
7792
  });
7797
7793
  }
7798
7794
  /**
@@ -7804,7 +7800,7 @@ class DataProvider {
7804
7800
  */ remove(action, path, file, source) {
7805
7801
  const fr = this.o[action];
7806
7802
  if (!fr) {
7807
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)(`Set "${action}" api options`);
7803
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(`Set "${action}" api options`);
7808
7804
  }
7809
7805
  fr.data.path = path;
7810
7806
  fr.data.name = file;
@@ -7844,7 +7840,7 @@ class DataProvider {
7844
7840
  */ rename(action, path, name, newname, source) {
7845
7841
  const fr = this.o[action];
7846
7842
  if (!fr) {
7847
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_7__.error)(`Set "${action}" api options`);
7843
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)(`Set "${action}" api options`);
7848
7844
  }
7849
7845
  fr.data.path = path;
7850
7846
  fr.data.name = name;
@@ -7924,9 +7920,6 @@ class DataProvider {
7924
7920
  }
7925
7921
  }
7926
7922
 
7927
- DataProvider = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_4__.__decorate)([
7928
- jodit_core_decorators__WEBPACK_IMPORTED_MODULE_6__.autobind
7929
- ], DataProvider);
7930
7923
 
7931
7924
 
7932
7925
  /***/ }),
@@ -8463,10 +8456,11 @@ module.exports = "<svg xmlns='http://www.w3.org/2000/svg' viewBox=\"0 0 1792 179
8463
8456
  */ const FileSelectorWidget = (editor, callbacks, elm, close, isImage = true)=>{
8464
8457
  let currentImage;
8465
8458
  const tabs = [];
8466
- if (callbacks.upload && editor.o.uploader && (editor.o.uploader.url || editor.o.uploader.insertImageAsBase64URI)) {
8459
+ const options = editor.o.uploader;
8460
+ if (callbacks.upload && (options.url || options.insertImageAsBase64URI || options.customUploadFunction)) {
8467
8461
  const dragBox = editor.c.fromHTML('<div class="jodit-drag-and-drop__file-box">' + `<strong>${editor.i18n(isImage ? 'Drop image' : 'Drop file')}</strong>` + `<span><br>${editor.i18n('or click')}</span>` + `<input type="file" accept="${isImage ? 'image/*' : '*'}" tabindex="-1" dir="auto" multiple=""/>` + '</div>');
8468
8462
  editor.uploader.bind(dragBox, (resp)=>{
8469
- const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : editor.o.uploader.defaultHandlerSuccess;
8463
+ const handler = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(callbacks.upload) ? callbacks.upload : options.defaultHandlerSuccess;
8470
8464
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(handler)) {
8471
8465
  handler.call(editor, resp);
8472
8466
  }
@@ -19004,7 +18998,9 @@ const map = {};
19004
18998
 
19005
18999
 
19006
19000
 
19007
- class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
19001
+ /**
19002
+ * Calculate sizes for editor workspace and handle setHeight and setWidth events
19003
+ */ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin {
19008
19004
  afterInit(editor) {
19009
19005
  editor.e.on('setHeight.size', this.__setHeight).on('setWidth.size', this.__setWidth).on('afterInit.size changePlace.size', this.__initialize, {
19010
19006
  top: true
@@ -19139,10 +19135,13 @@ class size extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_6__.Plugin
19139
19135
  ], size.prototype, "__initialize", null);
19140
19136
  (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
19141
19137
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
19142
- ], size.prototype, "__resizeWorkspaceImd", null);
19143
- size = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
19138
+ ], size.prototype, "__setHeight", null);
19139
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
19144
19140
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
19145
- ], size);
19141
+ ], size.prototype, "__setWidth", null);
19142
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
19143
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
19144
+ ], size.prototype, "__resizeWorkspaceImd", null);
19146
19145
  jodit_core_global__WEBPACK_IMPORTED_MODULE_3__.pluginSystem.add('size', size);
19147
19146
 
19148
19147
 
@@ -20802,18 +20801,56 @@ function _async_to_generator(fn) {
20802
20801
 
20803
20802
  "use strict";
20804
20803
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20805
- /* harmony export */ autobind: function() { return /* reexport safe */ autobind_decorator__WEBPACK_IMPORTED_MODULE_0__["default"]; }
20804
+ /* harmony export */ autobind: function() { return /* binding */ autobind; }
20806
20805
  /* harmony export */ });
20807
- /* harmony import */ var autobind_decorator__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(52201);
20806
+ /* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(91565);
20808
20807
  /*!
20809
20808
  * Jodit Editor (https://xdsoft.net/jodit/)
20810
20809
  * Released under MIT see LICENSE.txt in the project root for license information.
20811
20810
  * Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
20812
- */ /**
20811
+ */
20812
+ /**
20813
20813
  * [[include:core/decorators/autobind/README.md]]
20814
20814
  * @packageDocumentation
20815
20815
  * @module decorators/autobind
20816
- */
20816
+ */ /**
20817
+ * Decorator that automatically binds a method to its class instance.
20818
+ * This is useful when passing methods as callbacks to preserve the correct `this` context.
20819
+ *
20820
+ * @example
20821
+ * ```typescript
20822
+ * class MyComponent {
20823
+ * @autobind
20824
+ * handleClick() {
20825
+ * console.log(this); // Always refers to MyComponent instance
20826
+ * }
20827
+ * }
20828
+ *
20829
+ * const component = new MyComponent();
20830
+ * const button = document.createElement('button');
20831
+ * button.addEventListener('click', component.handleClick); // `this` is correctly bound
20832
+ * ```
20833
+ */ function autobind(_target, propertyKey, descriptor) {
20834
+ if (!(0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_0__.isFunction)(descriptor.value)) {
20835
+ throw new TypeError(`@autobind can only be applied to methods, but "${propertyKey}" is not a function`);
20836
+ }
20837
+ const originalMethod = descriptor.value;
20838
+ return {
20839
+ configurable: true,
20840
+ get () {
20841
+ // Create a bound version of the method and cache it on the instance
20842
+ const boundMethod = originalMethod.bind(this);
20843
+ // Define the bound method as a property on the instance
20844
+ // This ensures the same bound function is returned on subsequent accesses
20845
+ Object.defineProperty(this, propertyKey, {
20846
+ value: boundMethod,
20847
+ configurable: true,
20848
+ writable: true
20849
+ });
20850
+ return boundMethod;
20851
+ }
20852
+ };
20853
+ }
20817
20854
 
20818
20855
 
20819
20856
  /***/ }),
@@ -22294,100 +22331,6 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('xpath', xpath);
22294
22331
  }
22295
22332
 
22296
22333
 
22297
- /***/ }),
22298
-
22299
- /***/ 52201:
22300
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
22301
-
22302
- "use strict";
22303
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
22304
- /* harmony export */ "default": function() { return /* binding */ autobind; }
22305
- /* harmony export */ });
22306
- /* unused harmony exports boundMethod, boundClass */
22307
- function _typeof(obj) {
22308
- if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
22309
- _typeof = function _typeof(obj) {
22310
- return typeof obj;
22311
- };
22312
- } else {
22313
- _typeof = function _typeof(obj) {
22314
- return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
22315
- };
22316
- }
22317
- return _typeof(obj);
22318
- }
22319
- /**
22320
- * Return a descriptor removing the value and returning a getter
22321
- * The getter will return a .bind version of the function
22322
- * and memoize the result against a symbol on the instance
22323
- */ function boundMethod(target, key, descriptor) {
22324
- var fn = descriptor.value;
22325
- if (typeof fn !== 'function') {
22326
- throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(_typeof(fn)));
22327
- } // In IE11 calling Object.defineProperty has a side-effect of evaluating the
22328
- // getter for the property which is being replaced. This causes infinite
22329
- // recursion and an "Out of stack space" error.
22330
- var definingProperty = false;
22331
- return {
22332
- configurable: true,
22333
- get: function get() {
22334
- // eslint-disable-next-line no-prototype-builtins
22335
- if (definingProperty || this === target.prototype || this.hasOwnProperty(key) || typeof fn !== 'function') {
22336
- return fn;
22337
- }
22338
- var boundFn = fn.bind(this);
22339
- definingProperty = true;
22340
- Object.defineProperty(this, key, {
22341
- configurable: true,
22342
- get: function get() {
22343
- return boundFn;
22344
- },
22345
- set: function set(value) {
22346
- fn = value;
22347
- delete this[key];
22348
- }
22349
- });
22350
- definingProperty = false;
22351
- return boundFn;
22352
- },
22353
- set: function set(value) {
22354
- fn = value;
22355
- }
22356
- };
22357
- }
22358
- /**
22359
- * Use boundMethod to bind all methods on the target.prototype
22360
- */ function boundClass(target) {
22361
- // (Using reflect to get all keys including symbols)
22362
- var keys; // Use Reflect if exists
22363
- if (typeof Reflect !== 'undefined' && typeof Reflect.ownKeys === 'function') {
22364
- keys = Reflect.ownKeys(target.prototype);
22365
- } else {
22366
- keys = Object.getOwnPropertyNames(target.prototype); // Use symbols if support is provided
22367
- if (typeof Object.getOwnPropertySymbols === 'function') {
22368
- keys = keys.concat(Object.getOwnPropertySymbols(target.prototype));
22369
- }
22370
- }
22371
- keys.forEach(function(key) {
22372
- // Ignore special case target method
22373
- if (key === 'constructor') {
22374
- return;
22375
- }
22376
- var descriptor = Object.getOwnPropertyDescriptor(target.prototype, key); // Only methods need binding
22377
- if (typeof descriptor.value === 'function') {
22378
- Object.defineProperty(target.prototype, key, boundMethod(target, key, descriptor));
22379
- }
22380
- });
22381
- return target;
22382
- }
22383
- function autobind() {
22384
- if (arguments.length === 1) {
22385
- return boundClass.apply(void 0, arguments);
22386
- }
22387
- return boundMethod.apply(void 0, arguments);
22388
- }
22389
-
22390
-
22391
22334
  /***/ }),
22392
22335
 
22393
22336
  /***/ 52433:
@@ -29444,9 +29387,15 @@ class resizeHandler extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__.Plugi
29444
29387
  /** @override **/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(resizeHandler, "requires", [
29445
29388
  'size'
29446
29389
  ]);
29447
- resizeHandler = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
29390
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
29391
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
29392
+ ], resizeHandler.prototype, "onHandleResizeStart", null);
29393
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
29394
+ jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
29395
+ ], resizeHandler.prototype, "onHandleResize", null);
29396
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
29448
29397
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
29449
- ], resizeHandler);
29398
+ ], resizeHandler.prototype, "onHandleResizeEnd", null);
29450
29399
  jodit_core_global__WEBPACK_IMPORTED_MODULE_4__.pluginSystem.add('resizeHandler', resizeHandler);
29451
29400
 
29452
29401
 
@@ -33050,24 +32999,27 @@ function ConfigFlatten(obj) {
33050
32999
  const ajaxInstances = new WeakMap();
33051
33000
  function send(uploader, data) {
33052
33001
  const requestData = (0,jodit_modules_uploader_helpers_build_data__WEBPACK_IMPORTED_MODULE_2__.buildData)(uploader, data);
33053
- const sendData = (request)=>{
33002
+ const showProgress = (progress)=>{
33003
+ uploader.j.progressbar.show().progress(progress);
33004
+ if (progress >= 100) {
33005
+ uploader.j.progressbar.hide();
33006
+ }
33007
+ };
33008
+ let sendData = (request, showProgress)=>{
33054
33009
  const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_1__.Ajax({
33055
33010
  xhr: ()=>{
33056
33011
  const xhr = new XMLHttpRequest();
33057
33012
  if (uploader.j.ow.FormData !== undefined && xhr.upload) {
33058
- uploader.j.progressbar.show().progress(10);
33013
+ showProgress(10);
33059
33014
  xhr.upload.addEventListener('progress', (evt)=>{
33060
33015
  if (evt.lengthComputable) {
33061
33016
  let percentComplete = evt.loaded / evt.total;
33062
33017
  percentComplete *= 100;
33063
- uploader.j.progressbar.show().progress(percentComplete);
33064
- if (percentComplete >= 100) {
33065
- uploader.j.progressbar.hide();
33066
- }
33018
+ showProgress(percentComplete);
33067
33019
  }
33068
33020
  }, false);
33069
33021
  } else {
33070
- uploader.j.progressbar.hide();
33022
+ showProgress(100);
33071
33023
  }
33072
33024
  return xhr;
33073
33025
  },
@@ -33100,12 +33052,15 @@ function send(uploader, data) {
33100
33052
  instances === null || instances === void 0 ? void 0 : instances.delete(ajax);
33101
33053
  });
33102
33054
  };
33055
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isFunction)(uploader.o.customUploadFunction)) {
33056
+ sendData = uploader.o.customUploadFunction;
33057
+ }
33103
33058
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.isPromise)(requestData)) {
33104
- return requestData.then(sendData).catch((error)=>{
33059
+ return requestData.then((data)=>sendData(data, showProgress)).catch((error)=>{
33105
33060
  uploader.o.error.call(uploader, error);
33106
33061
  });
33107
33062
  }
33108
- return sendData(requestData);
33063
+ return sendData(requestData, showProgress);
33109
33064
  }
33110
33065
 
33111
33066
 
@@ -34623,7 +34578,7 @@ __webpack_require__.r(__webpack_exports__);
34623
34578
  * ```
34624
34579
  * @packageDocumentation
34625
34580
  * @module constants
34626
- */ const APP_VERSION = "4.7.4";
34581
+ */ const APP_VERSION = "4.7.6";
34627
34582
  // prettier-ignore
34628
34583
  const ES = "es2015";
34629
34584
  const IS_ES_MODERN = true;