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
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.9.14
4
+ * Version: v4.9.16
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -8107,8 +8107,8 @@ class DataProvider {
8107
8107
  query.data.path = path;
8108
8108
  query.data.name = name;
8109
8109
  query.data.source = source;
8110
- return this.get(type).then(()=>{
8111
- return true;
8110
+ return this.get(type).then((resp)=>{
8111
+ return resp.data.newPath || true;
8112
8112
  });
8113
8113
  }
8114
8114
  /**
@@ -13339,9 +13339,10 @@ const $$temp = ()=>{
13339
13339
  };
13340
13340
  a.href = url;
13341
13341
  j.filebrowser.dataProvider.getPathByUrl(a.href.toString()).then((resp)=>{
13342
- jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_2__.openImageEditor.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, ()=>{
13342
+ jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_2__.openImageEditor.call(j.filebrowser, a.href, resp.name, resp.path, resp.source, (newPath)=>{
13343
13343
  const timestamp = new Date().getTime();
13344
- state.values.imageSrc = url + (url.indexOf('?') !== -1 ? '' : '?') + '&_tmp=' + timestamp.toString();
13344
+ const newUrl = newPath || url;
13345
+ state.values.imageSrc = newUrl + (newUrl.indexOf('?') !== -1 ? '' : '?') + '&_tmp=' + timestamp.toString();
13345
13346
  }, (error)=>{
13346
13347
  j.alert(error.message);
13347
13348
  });
@@ -19199,11 +19200,11 @@ ImageEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorat
19199
19200
  /**
19200
19201
  * Open Image Editor
19201
19202
  */ function openImageEditor(href, name, path, source, onSuccess, onFailed) {
19202
- 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)=>{
19203
- if (ok) {
19203
+ 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)=>{
19204
+ if (result) {
19204
19205
  success();
19205
19206
  if (onSuccess) {
19206
- onSuccess();
19207
+ onSuccess(typeof result === 'string' ? result : undefined);
19207
19208
  }
19208
19209
  }
19209
19210
  }).catch((error)=>{
@@ -35109,7 +35110,7 @@ __webpack_require__.r(__webpack_exports__);
35109
35110
  * ```
35110
35111
  * @packageDocumentation
35111
35112
  * @module constants
35112
- */ const APP_VERSION = "4.9.14";
35113
+ */ const APP_VERSION = "4.9.16";
35113
35114
  // prettier-ignore
35114
35115
  const ES = "es2015";
35115
35116
  const IS_ES_MODERN = true;
@@ -36841,7 +36842,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.showWordsCounter = tr
36841
36842
  content = data;
36842
36843
  }
36843
36844
  if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isArray)(content)) {
36844
- this.toolbar.build(content, target);
36845
+ const disabled = this.j.o.toolbarInlineDisabledButtons;
36846
+ this.toolbar.build(disabled.length ? content.filter((item)=>{
36847
+ const name = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(item) ? item : item.name;
36848
+ return !disabled.includes(name !== null && name !== void 0 ? name : '');
36849
+ }) : content, target);
36845
36850
  this.toolbar.buttonSize = this.j.o.toolbarButtonSize;
36846
36851
  content = this.toolbar.container;
36847
36852
  }