jodit 4.1.11 → 4.1.12

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 (58) hide show
  1. package/CHANGELOG.md +27 -5
  2. package/es2015/jodit.css +1 -1
  3. package/es2015/jodit.fat.min.js +2 -2
  4. package/es2015/jodit.js +90 -62
  5. package/es2015/jodit.min.js +2 -2
  6. package/es2015/plugins/debug/debug.js +1 -1
  7. package/es2015/plugins/debug/debug.min.js +1 -1
  8. package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
  9. package/es2015/plugins/speech-recognize/speech-recognize.js +3 -3
  10. package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
  11. package/es2018/jodit.css +1 -1
  12. package/es2018/jodit.fat.min.js +2 -2
  13. package/es2018/jodit.js +90 -62
  14. package/es2018/jodit.min.js +2 -2
  15. package/es2018/plugins/debug/debug.js +1 -1
  16. package/es2018/plugins/debug/debug.min.js +1 -1
  17. package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
  18. package/es2018/plugins/speech-recognize/speech-recognize.js +3 -3
  19. package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
  20. package/es2021/jodit.css +1 -1
  21. package/es2021/jodit.fat.min.js +2 -2
  22. package/es2021/jodit.js +89 -62
  23. package/es2021/jodit.min.js +2 -2
  24. package/es2021/plugins/debug/debug.js +1 -1
  25. package/es2021/plugins/debug/debug.min.js +1 -1
  26. package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
  27. package/es2021/plugins/speech-recognize/speech-recognize.js +3 -3
  28. package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
  29. package/es2021.en/jodit.css +1 -1
  30. package/es2021.en/jodit.fat.min.js +2 -2
  31. package/es2021.en/jodit.js +89 -62
  32. package/es2021.en/jodit.min.js +2 -2
  33. package/es2021.en/plugins/debug/debug.js +1 -1
  34. package/es2021.en/plugins/debug/debug.min.js +1 -1
  35. package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
  36. package/es2021.en/plugins/speech-recognize/speech-recognize.js +3 -3
  37. package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
  38. package/es5/jodit.css +2 -2
  39. package/es5/jodit.fat.min.js +2 -2
  40. package/es5/jodit.js +91 -63
  41. package/es5/jodit.min.css +2 -2
  42. package/es5/jodit.min.js +2 -2
  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 +3 -3
  47. package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
  48. package/esm/core/constants.js +1 -1
  49. package/esm/core/decorators/watch/watch.d.ts +0 -1
  50. package/esm/core/decorators/watch/watch.js +0 -1
  51. package/esm/modules/file-browser/data-provider.js +1 -0
  52. package/esm/modules/file-browser/file-browser.d.ts +3 -0
  53. package/esm/modules/file-browser/file-browser.js +27 -1
  54. package/esm/plugins/ai-assistant/ai-assistant.js +1 -1
  55. package/esm/plugins/ai-assistant/ui/ui-ai-assistant.js +1 -1
  56. package/package.json +1 -1
  57. package/types/core/decorators/watch/watch.d.ts +0 -1
  58. package/types/modules/file-browser/file-browser.d.ts +3 -0
@@ -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.1.11
4
+ * Version: v4.1.12
5
5
  * Url: https://xdsoft.net/jodit/
6
6
  * License(s): MIT
7
7
  */
@@ -1708,7 +1708,7 @@ __webpack_require__.r(__webpack_exports__);
1708
1708
  * Released under MIT see LICENSE.txt in the project root for license information.
1709
1709
  * Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
1710
1710
  */
1711
- const APP_VERSION = "4.1.11";
1711
+ const APP_VERSION = "4.1.12";
1712
1712
  // prettier-ignore
1713
1713
  const ES = "es2021";
1714
1714
  const IS_ES_MODERN = true;
@@ -2398,14 +2398,14 @@ __webpack_require__.r(__webpack_exports__);
2398
2398
  /* harmony export */ component: function() { return /* reexport safe */ _component_component__WEBPACK_IMPORTED_MODULE_2__.s; },
2399
2399
  /* harmony export */ debounce: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.s; },
2400
2400
  /* harmony export */ derive: function() { return /* reexport safe */ _derive_derive__WEBPACK_IMPORTED_MODULE_4__.C; },
2401
- /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.Nx; },
2401
+ /* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.N; },
2402
2402
  /* harmony export */ hook: function() { return /* reexport safe */ _hook_hook__WEBPACK_IMPORTED_MODULE_5__.A; },
2403
2403
  /* harmony export */ idle: function() { return /* reexport safe */ _idle_idle__WEBPACK_IMPORTED_MODULE_6__.N; },
2404
2404
  /* harmony export */ nonenumerable: function() { return /* reexport safe */ _nonenumerable_nonenumerable__WEBPACK_IMPORTED_MODULE_7__.m; },
2405
2405
  /* harmony export */ persistent: function() { return /* reexport safe */ _persistent_persistent__WEBPACK_IMPORTED_MODULE_8__.y; },
2406
2406
  /* harmony export */ throttle: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.n; },
2407
2407
  /* harmony export */ wait: function() { return /* reexport safe */ _wait_wait__WEBPACK_IMPORTED_MODULE_9__.u; },
2408
- /* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.wB; }
2408
+ /* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.w; }
2409
2409
  /* harmony export */ });
2410
2410
  /* harmony import */ var _autobind_autobind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11961);
2411
2411
  /* harmony import */ var _cache_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87875);
@@ -2566,8 +2566,8 @@ function wait(condition) {
2566
2566
 
2567
2567
  "use strict";
2568
2568
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2569
- /* harmony export */ Nx: function() { return /* binding */ getPropertyDescriptor; },
2570
- /* harmony export */ wB: function() { return /* binding */ watch; }
2569
+ /* harmony export */ N: function() { return /* binding */ getPropertyDescriptor; },
2570
+ /* harmony export */ w: function() { return /* binding */ watch; }
2571
2571
  /* harmony export */ });
2572
2572
  /* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
2573
2573
  /* harmony import */ var jodit_core_event_emitter_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32332);
@@ -2682,7 +2682,6 @@ function watch(observeFields, opts) {
2682
2682
  }
2683
2683
  };
2684
2684
  }
2685
- /* harmony default export */ __webpack_exports__.Ay = (watch);
2686
2685
 
2687
2686
 
2688
2687
  /***/ }),
@@ -4242,7 +4241,7 @@ function observable(obj) {
4242
4241
  const key = _key;
4243
4242
  const prefix = prefixes.concat(key).filter(a => a.length);
4244
4243
  store[key] = dict[key];
4245
- const descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .Nx)(dict, key);
4244
+ const descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .N)(dict, key);
4246
4245
  Object.defineProperty(dict, key, {
4247
4246
  set: (value) => {
4248
4247
  const oldValue = store[key];
@@ -15731,7 +15730,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
15731
15730
  }
15732
15731
  }
15733
15732
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
15734
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .wB)(':rebuildToolbar')
15733
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
15735
15734
  ], ViewWithToolbar.prototype, "buildToolbar", null);
15736
15735
  (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
15737
15736
  jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Ay
@@ -19103,6 +19102,7 @@ let DataProvider = class DataProvider {
19103
19102
  if (process) {
19104
19103
  const respData = process.call(self, resp);
19105
19104
  if (respData.data.permissions) {
19105
+ this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
19106
19106
  this.__currentPermissions = respData.data.permissions;
19107
19107
  }
19108
19108
  }
@@ -19541,25 +19541,26 @@ async function loadTree(fb) {
19541
19541
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
19542
19542
  /* harmony export */ V: function() { return /* binding */ FileBrowser; }
19543
19543
  /* harmony export */ });
19544
- /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(31635);
19544
+ /* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
19545
19545
  /* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
19546
19546
  /* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
19547
19547
  /* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
19548
- /* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50025);
19549
- /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(65147);
19550
- /* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(63915);
19551
- /* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(58597);
19552
- /* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(14961);
19553
- /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(70265);
19554
- /* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(9979);
19555
- /* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31859);
19556
- /* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(62994);
19557
- /* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(18043);
19558
- /* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(80004);
19559
- /* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(75889);
19560
- /* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(83797);
19561
- /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(10274);
19562
- /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(36115);
19548
+ /* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66927);
19549
+ /* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
19550
+ /* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65147);
19551
+ /* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63915);
19552
+ /* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58597);
19553
+ /* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14961);
19554
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70265);
19555
+ /* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9979);
19556
+ /* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31859);
19557
+ /* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62994);
19558
+ /* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18043);
19559
+ /* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80004);
19560
+ /* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75889);
19561
+ /* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(83797);
19562
+ /* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10274);
19563
+ /* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36115);
19563
19564
  /*!
19564
19565
  * Jodit Editor (https://xdsoft.net/jodit/)
19565
19566
  * Released under MIT see LICENSE.txt in the project root for license information.
@@ -19586,13 +19587,14 @@ async function loadTree(fb) {
19586
19587
 
19587
19588
 
19588
19589
 
19589
- let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_7__/* .ViewWithToolbar */ .T {
19590
+
19591
+ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
19590
19592
  /** @override */
19591
19593
  className() {
19592
19594
  return 'FileBrowser';
19593
19595
  }
19594
19596
  get dataProvider() {
19595
- return (0,_factories__WEBPACK_IMPORTED_MODULE_14__/* .makeDataProvider */ .S)(this, this.options);
19597
+ return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
19596
19598
  }
19597
19599
  // eslint-disable-next-line no-unused-vars
19598
19600
  onSelect(callback) {
@@ -19613,7 +19615,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19613
19615
  files,
19614
19616
  isImages
19615
19617
  };
19616
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isFunction)(callback)) {
19618
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
19617
19619
  callback(data);
19618
19620
  }
19619
19621
  this.close();
@@ -19635,7 +19637,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19635
19637
  * Container for set/get value
19636
19638
  */
19637
19639
  get storage() {
19638
- return jodit_core_storage__WEBPACK_IMPORTED_MODULE_5__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
19640
+ return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
19639
19641
  }
19640
19642
  get isOpened() {
19641
19643
  return this._dialog.isOpened && this.browser.style.display !== 'none';
@@ -19643,6 +19645,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19643
19645
  /**
19644
19646
  * It displays a message in the status bar of filebrowser
19645
19647
  *
19648
+ * @param message - The message that will be displayed
19646
19649
  * @param success - true It will be shown a message light . If no option is specified ,
19647
19650
  * ßan error will be shown the red
19648
19651
  * @example
@@ -19651,13 +19654,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19651
19654
  * ```
19652
19655
  */
19653
19656
  status(message, success) {
19654
- if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isAbortError)(message)) {
19657
+ if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
19655
19658
  return;
19656
19659
  }
19657
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message)) {
19660
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
19658
19661
  message = message.message;
19659
19662
  }
19660
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.trim)(message).length) {
19663
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
19661
19664
  return;
19662
19665
  }
19663
19666
  this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
@@ -19684,7 +19687,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19684
19687
  return this.async
19685
19688
  .promise((resolve, reject) => {
19686
19689
  if (!this.o.items || !this.o.items.url) {
19687
- throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.error)('Need set options.filebrowser.ajax.url');
19690
+ throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
19688
19691
  }
19689
19692
  let localTimeout = 0;
19690
19693
  this.e
@@ -19701,10 +19704,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19701
19704
  .off('select.filebrowser')
19702
19705
  .on('select.filebrowser', this.onSelect(callback));
19703
19706
  const header = this.c.div();
19704
- this.toolbar?.build(this.__getButtons()).appendTo(header);
19707
+ this.toolbar?.appendTo(header);
19708
+ this.__updateToolbarButtons();
19705
19709
  this._dialog.open(this.browser, header);
19706
19710
  this.e.fire('sort.filebrowser', this.state.sortBy);
19707
- (0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_9__/* .loadTree */ .r)(this).then(resolve, reject);
19711
+ (0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
19708
19712
  })
19709
19713
  .catch((e) => {
19710
19714
  if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
@@ -19715,7 +19719,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19715
19719
  __getButtons() {
19716
19720
  const options = (this.o.buttons ?? []);
19717
19721
  return options.filter((btn) => {
19718
- if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(btn)) {
19722
+ if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
19719
19723
  return true;
19720
19724
  }
19721
19725
  switch (btn) {
@@ -19731,8 +19735,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19731
19735
  });
19732
19736
  }
19733
19737
  initUploader(editor) {
19734
- const self = this, options = editor?.options?.uploader, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_16__/* .Config */ .T.defaultOptions.uploader);
19735
- const uploadHandler = () => (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_17__/* .loadItems */ .f)(this);
19738
+ const self = this, options = editor?.options?.uploader, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.uploader);
19739
+ const uploadHandler = () => (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
19736
19740
  self.uploader = self.getInstance('Uploader', uploaderOptions);
19737
19741
  self.uploader
19738
19742
  .setPath(self.state.currentPath)
@@ -19751,11 +19755,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19751
19755
  super(options);
19752
19756
  this.browser = this.c.div(this.componentName);
19753
19757
  this.status_line = this.c.div(this.getFullElName('status'));
19754
- this.tree = new _ui__WEBPACK_IMPORTED_MODULE_15__/* .FileBrowserTree */ .V(this);
19755
- this.files = new _ui__WEBPACK_IMPORTED_MODULE_15__/* .FileBrowserFiles */ .Q(this);
19756
- this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_3__/* .observable */ .sH)({
19758
+ this.tree = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserTree */ .V(this);
19759
+ this.files = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserFiles */ .Q(this);
19760
+ this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .sH)({
19757
19761
  currentPath: '',
19758
- currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_13__/* .DEFAULT_SOURCE_NAME */ .o,
19762
+ currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
19759
19763
  currentBaseUrl: '',
19760
19764
  activeElements: [],
19761
19765
  elements: [],
@@ -19766,7 +19770,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19766
19770
  onlyImages: false
19767
19771
  });
19768
19772
  this.errorHandler = (resp) => {
19769
- if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isAbortError)(resp)) {
19773
+ if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
19770
19774
  return;
19771
19775
  }
19772
19776
  if (resp instanceof Error) {
@@ -19782,9 +19786,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19782
19786
  this.close = () => {
19783
19787
  this._dialog.close();
19784
19788
  };
19789
+ this.__prevButtons = [];
19785
19790
  this.attachEvents(options);
19786
19791
  const self = this;
19787
- self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_16__/* .Config */ .T.defaultOptions.filebrowser);
19792
+ self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
19788
19793
  self.browser.component = this;
19789
19794
  self.container = self.browser;
19790
19795
  if (self.o.showFoldersPanel) {
@@ -19792,9 +19797,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19792
19797
  }
19793
19798
  self.browser.appendChild(self.files.container);
19794
19799
  self.browser.appendChild(self.status_line);
19795
- _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_11__/* .selfListeners */ .c.call(self);
19796
- _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_10__/* .nativeListeners */ .nW.call(self);
19797
- _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_12__/* .stateListeners */ .r.call(self);
19800
+ _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__/* .selfListeners */ .c.call(self);
19801
+ _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__/* .nativeListeners */ .nW.call(self);
19802
+ _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__/* .stateListeners */ .r.call(self);
19798
19803
  const keys = [
19799
19804
  'getLocalFileByUrl',
19800
19805
  'crop',
@@ -19812,7 +19817,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19812
19817
  ];
19813
19818
  keys.forEach(key => {
19814
19819
  if (this.options[key] != null) {
19815
- this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(this.options[key], this.o.ajax);
19820
+ this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
19816
19821
  }
19817
19822
  });
19818
19823
  const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
@@ -19856,26 +19861,48 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
19856
19861
  this.events && this.e.off('.filebrowser');
19857
19862
  this.uploader && this.uploader.destruct();
19858
19863
  }
19864
+ __updateToolbarButtons() {
19865
+ const buttons = this.__getButtons();
19866
+ if (isEqualButtonList(this.__prevButtons, buttons)) {
19867
+ return;
19868
+ }
19869
+ this.__prevButtons = buttons;
19870
+ this.toolbar?.build(buttons);
19871
+ }
19859
19872
  };
19860
- (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19873
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19861
19874
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
19862
19875
  ], FileBrowser.prototype, "dataProvider", null);
19863
- (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19876
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19864
19877
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
19865
19878
  ], FileBrowser.prototype, "_dialog", null);
19866
- (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19879
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19867
19880
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
19868
19881
  ], FileBrowser.prototype, "storage", null);
19869
- (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19882
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19870
19883
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
19871
19884
  ], FileBrowser.prototype, "status", null);
19872
- (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19885
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19873
19886
  jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
19874
19887
  ], FileBrowser.prototype, "open", null);
19875
- FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
19876
- (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_6__/* .Dlgs */ .z)
19888
+ (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19889
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__/* .watch */ .w)('dataProvider:changePermissions')
19890
+ ], FileBrowser.prototype, "__updateToolbarButtons", null);
19891
+ FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
19892
+ (0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__/* .Dlgs */ .z)
19877
19893
  ], FileBrowser);
19878
19894
 
19895
+ function isEqualButtonList(prevButtons, buttons) {
19896
+ if (prevButtons.length !== buttons.length) {
19897
+ return false;
19898
+ }
19899
+ for (let i = 0; i < prevButtons.length; i++) {
19900
+ if (prevButtons[i] !== buttons[i]) {
19901
+ return false;
19902
+ }
19903
+ }
19904
+ return true;
19905
+ }
19879
19906
 
19880
19907
 
19881
19908
  /***/ }),
@@ -25127,10 +25154,10 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
25127
25154
  beforeDestruct(_) { }
25128
25155
  }
25129
25156
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
25130
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)(':generateAiAssistantForm.ai-assistant')
25157
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
25131
25158
  ], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
25132
25159
  (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
25133
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)(':invokeAiAssistant')
25160
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':invokeAiAssistant')
25134
25161
  ], aiAssistant.prototype, "onInvokeAiAssistant", null);
25135
25162
  jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
25136
25163
 
@@ -25435,13 +25462,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
25435
25462
  }
25436
25463
  };
25437
25464
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
25438
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)(':ai-assistant-response')
25465
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
25439
25466
  ], UiAiAssistant.prototype, "onAiAssistentResponse", null);
25440
25467
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
25441
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)(':ai-assistant-error')
25468
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
25442
25469
  ], UiAiAssistant.prototype, "onAiAssistentError", null);
25443
25470
  (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
25444
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay)('promptInput:change')
25471
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
25445
25472
  ], UiAiAssistant.prototype, "onChangePromptValue", null);
25446
25473
  UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
25447
25474
  jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
@@ -28669,10 +28696,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
28669
28696
  }
28670
28697
  }
28671
28698
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
28672
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .wB)(':beforeInsertNode')
28699
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
28673
28700
  ], dtd.prototype, "__onBeforeInsertNode", null);
28674
28701
  (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
28675
- (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .wB)(':afterInsertNode')
28702
+ (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
28676
28703
  ], dtd.prototype, "__onAfterInsertNode", null);
28677
28704
  jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
28678
28705