jodit 4.9.14 → 4.9.16

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 (61) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +5 -5
  4. package/es2015/jodit.js +15 -10
  5. package/es2015/jodit.min.js +5 -5
  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 +5 -5
  13. package/es2018/jodit.min.js +23 -23
  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 +5 -5
  18. package/es2021/jodit.js +15 -10
  19. package/es2021/jodit.min.js +5 -5
  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 +5 -5
  28. package/es2021.en/jodit.js +15 -10
  29. package/es2021.en/jodit.min.js +5 -5
  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 +15 -10
  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 +2 -2
  48. package/es5/polyfills.js +1 -1
  49. package/es5/polyfills.min.js +2 -2
  50. package/esm/core/constants.js +1 -1
  51. package/esm/modules/file-browser/data-provider.d.ts +2 -2
  52. package/esm/modules/file-browser/data-provider.js +2 -2
  53. package/esm/modules/image-editor/image-editor.d.ts +1 -1
  54. package/esm/modules/image-editor/image-editor.js +3 -3
  55. package/esm/plugins/image-properties/utils/open-image-editor.js +4 -3
  56. package/esm/plugins/inline-popup/inline-popup.js +7 -1
  57. package/esm/types/file-browser.d.ts +3 -2
  58. package/package.json +1 -1
  59. package/types/modules/file-browser/data-provider.d.ts +2 -2
  60. package/types/modules/image-editor/image-editor.d.ts +1 -1
  61. package/types/types/file-browser.d.ts +3 -2
@@ -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.9.14
4
+ * Version: v4.9.16
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -7694,8 +7694,8 @@ class DataProvider {
7694
7694
  query.data.path = path;
7695
7695
  query.data.name = name;
7696
7696
  query.data.source = source;
7697
- return this.get(type).then(()=>{
7698
- return true;
7697
+ return this.get(type).then((resp)=>{
7698
+ return resp.data.newPath || true;
7699
7699
  });
7700
7700
  }
7701
7701
  /**
@@ -12809,9 +12809,10 @@ const $$temp = ()=>{
12809
12809
  };
12810
12810
  a.href = url;
12811
12811
  j.filebrowser.dataProvider.getPathByUrl(a.href.toString()).then((resp)=>{
12812
- jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_2__.openImageEditor.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, ()=>{
12812
+ jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_2__.openImageEditor.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, (newPath)=>{
12813
12813
  const timestamp = new Date().getTime();
12814
- state.values.imageSrc = url + (url.indexOf('?') !== -1 ? '' : '?') + '&_tmp=' + timestamp.toString();
12814
+ const newUrl = newPath || url;
12815
+ state.values.imageSrc = newUrl + (newUrl.indexOf('?') !== -1 ? '' : '?') + '&_tmp=' + timestamp.toString();
12815
12816
  }, (error)=>{
12816
12817
  j.alert(error.message);
12817
12818
  });
@@ -18237,11 +18238,11 @@ ImageEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorat
18237
18238
  /**
18238
18239
  * Open Image Editor
18239
18240
  */ function openImageEditor(href, name, path, source, onSuccess, onFailed) {
18240
- return this.getInstance('ImageEditor', this.o).open(href, (newname, box, success, failed)=>(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_10__.call)(box.action === 'resize' ? this.dataProvider.resize : this.dataProvider.crop, path, source, name, newname, box.box).then((ok)=>{
18241
- if (ok) {
18241
+ return this.getInstance('ImageEditor', this.o).open(href, (newname, box, success, failed)=>(0,jodit_core_helpers_utils_utils__WEBPACK_IMPORTED_MODULE_10__.call)(box.action === 'resize' ? this.dataProvider.resize : this.dataProvider.crop, path, source, name, newname, box.box).then((result)=>{
18242
+ if (result) {
18242
18243
  success();
18243
18244
  if (onSuccess) {
18244
- onSuccess();
18245
+ onSuccess(typeof result === 'string' ? result : undefined);
18245
18246
  }
18246
18247
  }
18247
18248
  }).catch((error)=>{
@@ -33523,7 +33524,7 @@ __webpack_require__.r(__webpack_exports__);
33523
33524
  * ```
33524
33525
  * @packageDocumentation
33525
33526
  * @module constants
33526
- */ const APP_VERSION = "4.9.14";
33527
+ */ const APP_VERSION = "4.9.16";
33527
33528
  // prettier-ignore
33528
33529
  const ES = "es2021";
33529
33530
  const IS_ES_MODERN = true;
@@ -35117,7 +35118,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.showWordsCounter = tr
35117
35118
  content = data;
35118
35119
  }
35119
35120
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isArray)(content)) {
35120
- this.toolbar.build(content, target);
35121
+ const disabled = this.j.o.toolbarInlineDisabledButtons;
35122
+ this.toolbar.build(disabled.length ? content.filter((item)=>{
35123
+ const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(item) ? item : item.name;
35124
+ return !disabled.includes(name ?? '');
35125
+ }) : content, target);
35121
35126
  this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
35122
35127
  content = this.toolbar.container;
35123
35128
  }