jodit 4.1.10 → 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.
- package/CHANGELOG.md +31 -5
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +117 -87
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/debug/debug.js +1 -1
- package/es2015/plugins/debug/debug.min.js +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +117 -87
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/debug/debug.js +1 -1
- package/es2018/plugins/debug/debug.min.js +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +116 -87
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/debug/debug.js +1 -1
- package/es2021/plugins/debug/debug.min.js +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +116 -87
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/debug/debug.js +1 -1
- package/es2021.en/plugins/debug/debug.min.js +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +120 -90
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +3 -3
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/core/constants.js +1 -1
- package/esm/core/decorators/watch/watch.d.ts +0 -1
- package/esm/core/decorators/watch/watch.js +0 -1
- package/esm/modules/file-browser/config.d.ts +1 -0
- package/esm/modules/file-browser/config.js +1 -0
- package/esm/modules/file-browser/data-provider.d.ts +1 -1
- package/esm/modules/file-browser/data-provider.js +10 -9
- package/esm/modules/file-browser/file-browser.d.ts +3 -0
- package/esm/modules/file-browser/file-browser.js +27 -1
- package/esm/plugins/ai-assistant/ai-assistant.js +1 -1
- package/esm/plugins/ai-assistant/ui/ui-ai-assistant.js +1 -1
- package/package.json +1 -1
- package/types/core/decorators/watch/watch.d.ts +0 -1
- package/types/modules/file-browser/config.d.ts +1 -0
- package/types/modules/file-browser/data-provider.d.ts +1 -1
- package/types/modules/file-browser/file-browser.d.ts +3 -0
package/es2021.en/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.1.
|
|
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.
|
|
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__.
|
|
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__.
|
|
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 */
|
|
2570
|
-
/* harmony export */
|
|
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 */ .
|
|
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 */ .
|
|
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
|
|
@@ -18661,10 +18660,11 @@ class FileBrowserItem {
|
|
|
18661
18660
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18662
18661
|
|
|
18663
18662
|
"use strict";
|
|
18664
|
-
/* harmony import */ var
|
|
18665
|
-
/* harmony import */ var
|
|
18666
|
-
/* harmony import */ var
|
|
18667
|
-
/* harmony import */ var
|
|
18663
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18664
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18665
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18666
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18667
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18668
18668
|
/*!
|
|
18669
18669
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18670
18670
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18674,19 +18674,20 @@ class FileBrowserItem {
|
|
|
18674
18674
|
|
|
18675
18675
|
|
|
18676
18676
|
|
|
18677
|
-
|
|
18677
|
+
|
|
18678
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18678
18679
|
namespace: '',
|
|
18679
18680
|
cache: true,
|
|
18680
18681
|
extraButtons: [],
|
|
18681
18682
|
filter(item, search) {
|
|
18682
18683
|
search = search.toLowerCase();
|
|
18683
|
-
if ((0,
|
|
18684
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18684
18685
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18685
18686
|
}
|
|
18686
|
-
if ((0,
|
|
18687
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18687
18688
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18688
18689
|
}
|
|
18689
|
-
if ((0,
|
|
18690
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18690
18691
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18691
18692
|
}
|
|
18692
18693
|
return true;
|
|
@@ -18703,14 +18704,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18703
18704
|
}
|
|
18704
18705
|
return 0;
|
|
18705
18706
|
};
|
|
18706
|
-
if ((0,
|
|
18707
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18707
18708
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18708
18709
|
}
|
|
18709
18710
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18710
|
-
if ((0,
|
|
18711
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18711
18712
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18712
18713
|
}
|
|
18713
|
-
if ((0,
|
|
18714
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18714
18715
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18715
18716
|
}
|
|
18716
18717
|
return 0;
|
|
@@ -18721,7 +18722,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18721
18722
|
return asc ? f - s : s - f;
|
|
18722
18723
|
}
|
|
18723
18724
|
case 'size': {
|
|
18724
|
-
const f = (0,
|
|
18725
|
+
const f = (0,jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__/* .humanSizeToBytes */ .z)(a.size), s = (0,jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__/* .humanSizeToBytes */ .z)(b.size);
|
|
18725
18726
|
return asc ? f - s : s - f;
|
|
18726
18727
|
}
|
|
18727
18728
|
}
|
|
@@ -18782,7 +18783,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18782
18783
|
return resp.success;
|
|
18783
18784
|
},
|
|
18784
18785
|
getMessage(resp) {
|
|
18785
|
-
return resp.data.messages !== undefined && (0,
|
|
18786
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18786
18787
|
? resp.data.messages.join(' ')
|
|
18787
18788
|
: '';
|
|
18788
18789
|
},
|
|
@@ -18828,7 +18829,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18828
18829
|
</a>`;
|
|
18829
18830
|
},
|
|
18830
18831
|
ajax: {
|
|
18831
|
-
...
|
|
18832
|
+
...jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions,
|
|
18832
18833
|
url: '',
|
|
18833
18834
|
data: {},
|
|
18834
18835
|
cache: true,
|
|
@@ -18883,13 +18884,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18883
18884
|
data: { action: 'permissions' }
|
|
18884
18885
|
}
|
|
18885
18886
|
};
|
|
18886
|
-
|
|
18887
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18887
18888
|
upload: {
|
|
18888
18889
|
icon: 'plus',
|
|
18889
18890
|
isInput: true,
|
|
18890
18891
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18891
18892
|
getContent: (filebrowser) => {
|
|
18892
|
-
const btn = new
|
|
18893
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18893
18894
|
onlyImages: filebrowser.state.onlyImages
|
|
18894
18895
|
});
|
|
18895
18896
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19037,7 +19038,7 @@ let DataProvider = class DataProvider {
|
|
|
19037
19038
|
this.parent = parent;
|
|
19038
19039
|
this.options = options;
|
|
19039
19040
|
this.__currentPermissions = null;
|
|
19040
|
-
this.
|
|
19041
|
+
this.__ajaxInstances = new Map();
|
|
19041
19042
|
this.progressHandler = (ignore) => { };
|
|
19042
19043
|
}
|
|
19043
19044
|
/**
|
|
@@ -19047,11 +19048,11 @@ let DataProvider = class DataProvider {
|
|
|
19047
19048
|
return this.options;
|
|
19048
19049
|
}
|
|
19049
19050
|
get(name) {
|
|
19050
|
-
const
|
|
19051
|
-
if (
|
|
19052
|
-
const ajax =
|
|
19051
|
+
const instances = this.__ajaxInstances;
|
|
19052
|
+
if (instances.has(name)) {
|
|
19053
|
+
const ajax = instances.get(name);
|
|
19053
19054
|
ajax?.abort();
|
|
19054
|
-
|
|
19055
|
+
instances.delete(name);
|
|
19055
19056
|
}
|
|
19056
19057
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19057
19058
|
? this.options[name]
|
|
@@ -19062,12 +19063,12 @@ let DataProvider = class DataProvider {
|
|
|
19062
19063
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19063
19064
|
}
|
|
19064
19065
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19065
|
-
|
|
19066
|
+
instances.set(name, ajax);
|
|
19066
19067
|
const promise = ajax.send();
|
|
19067
19068
|
promise
|
|
19068
19069
|
.finally(() => {
|
|
19069
19070
|
ajax.destruct();
|
|
19070
|
-
|
|
19071
|
+
instances.delete(name);
|
|
19071
19072
|
this.progressHandler(100);
|
|
19072
19073
|
})
|
|
19073
19074
|
.catch(() => null);
|
|
@@ -19101,6 +19102,7 @@ let DataProvider = class DataProvider {
|
|
|
19101
19102
|
if (process) {
|
|
19102
19103
|
const respData = process.call(self, resp);
|
|
19103
19104
|
if (respData.data.permissions) {
|
|
19105
|
+
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
19104
19106
|
this.__currentPermissions = respData.data.permissions;
|
|
19105
19107
|
}
|
|
19106
19108
|
}
|
|
@@ -19385,8 +19387,8 @@ let DataProvider = class DataProvider {
|
|
|
19385
19387
|
return this.options.isSuccess(resp);
|
|
19386
19388
|
}
|
|
19387
19389
|
destruct() {
|
|
19388
|
-
this.
|
|
19389
|
-
this.
|
|
19390
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19391
|
+
this.__ajaxInstances.clear();
|
|
19390
19392
|
}
|
|
19391
19393
|
};
|
|
19392
19394
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
@@ -19539,25 +19541,26 @@ async function loadTree(fb) {
|
|
|
19539
19541
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19540
19542
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
19541
19543
|
/* harmony export */ });
|
|
19542
|
-
/* harmony import */ var
|
|
19544
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
|
|
19543
19545
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
19544
19546
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
19545
19547
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
19546
|
-
/* harmony import */ var
|
|
19547
|
-
/* harmony import */ var
|
|
19548
|
-
/* harmony import */ var
|
|
19549
|
-
/* harmony import */ var
|
|
19550
|
-
/* harmony import */ var
|
|
19551
|
-
/* harmony import */ var
|
|
19552
|
-
/* harmony import */ var
|
|
19553
|
-
/* harmony import */ var
|
|
19554
|
-
/* harmony import */ var
|
|
19555
|
-
/* harmony import */ var
|
|
19556
|
-
/* harmony import */ var
|
|
19557
|
-
/* harmony import */ var
|
|
19558
|
-
/* harmony import */ var
|
|
19559
|
-
/* harmony import */ var
|
|
19560
|
-
/* harmony import */ var
|
|
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);
|
|
19561
19564
|
/*!
|
|
19562
19565
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19563
19566
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19584,13 +19587,14 @@ async function loadTree(fb) {
|
|
|
19584
19587
|
|
|
19585
19588
|
|
|
19586
19589
|
|
|
19587
|
-
|
|
19590
|
+
|
|
19591
|
+
let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
|
|
19588
19592
|
/** @override */
|
|
19589
19593
|
className() {
|
|
19590
19594
|
return 'FileBrowser';
|
|
19591
19595
|
}
|
|
19592
19596
|
get dataProvider() {
|
|
19593
|
-
return (0,
|
|
19597
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
19594
19598
|
}
|
|
19595
19599
|
// eslint-disable-next-line no-unused-vars
|
|
19596
19600
|
onSelect(callback) {
|
|
@@ -19611,7 +19615,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19611
19615
|
files,
|
|
19612
19616
|
isImages
|
|
19613
19617
|
};
|
|
19614
|
-
if ((0,
|
|
19618
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
19615
19619
|
callback(data);
|
|
19616
19620
|
}
|
|
19617
19621
|
this.close();
|
|
@@ -19633,7 +19637,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19633
19637
|
* Container for set/get value
|
|
19634
19638
|
*/
|
|
19635
19639
|
get storage() {
|
|
19636
|
-
return
|
|
19640
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
19637
19641
|
}
|
|
19638
19642
|
get isOpened() {
|
|
19639
19643
|
return this._dialog.isOpened && this.browser.style.display !== 'none';
|
|
@@ -19641,6 +19645,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19641
19645
|
/**
|
|
19642
19646
|
* It displays a message in the status bar of filebrowser
|
|
19643
19647
|
*
|
|
19648
|
+
* @param message - The message that will be displayed
|
|
19644
19649
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
19645
19650
|
* ßan error will be shown the red
|
|
19646
19651
|
* @example
|
|
@@ -19649,13 +19654,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19649
19654
|
* ```
|
|
19650
19655
|
*/
|
|
19651
19656
|
status(message, success) {
|
|
19652
|
-
if (!message || (0,
|
|
19657
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
19653
19658
|
return;
|
|
19654
19659
|
}
|
|
19655
|
-
if (!(0,
|
|
19660
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
19656
19661
|
message = message.message;
|
|
19657
19662
|
}
|
|
19658
|
-
if (!(0,
|
|
19663
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
|
|
19659
19664
|
return;
|
|
19660
19665
|
}
|
|
19661
19666
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -19682,7 +19687,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19682
19687
|
return this.async
|
|
19683
19688
|
.promise((resolve, reject) => {
|
|
19684
19689
|
if (!this.o.items || !this.o.items.url) {
|
|
19685
|
-
throw (0,
|
|
19690
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
19686
19691
|
}
|
|
19687
19692
|
let localTimeout = 0;
|
|
19688
19693
|
this.e
|
|
@@ -19699,10 +19704,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19699
19704
|
.off('select.filebrowser')
|
|
19700
19705
|
.on('select.filebrowser', this.onSelect(callback));
|
|
19701
19706
|
const header = this.c.div();
|
|
19702
|
-
this.toolbar?.
|
|
19707
|
+
this.toolbar?.appendTo(header);
|
|
19708
|
+
this.__updateToolbarButtons();
|
|
19703
19709
|
this._dialog.open(this.browser, header);
|
|
19704
19710
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
19705
|
-
(0,
|
|
19711
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
|
|
19706
19712
|
})
|
|
19707
19713
|
.catch((e) => {
|
|
19708
19714
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -19713,7 +19719,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19713
19719
|
__getButtons() {
|
|
19714
19720
|
const options = (this.o.buttons ?? []);
|
|
19715
19721
|
return options.filter((btn) => {
|
|
19716
|
-
if (!(0,
|
|
19722
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
19717
19723
|
return true;
|
|
19718
19724
|
}
|
|
19719
19725
|
switch (btn) {
|
|
@@ -19729,8 +19735,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19729
19735
|
});
|
|
19730
19736
|
}
|
|
19731
19737
|
initUploader(editor) {
|
|
19732
|
-
const self = this, options = editor?.options?.uploader, uploaderOptions = (0,
|
|
19733
|
-
const uploadHandler = () => (0,
|
|
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);
|
|
19734
19740
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
19735
19741
|
self.uploader
|
|
19736
19742
|
.setPath(self.state.currentPath)
|
|
@@ -19749,11 +19755,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19749
19755
|
super(options);
|
|
19750
19756
|
this.browser = this.c.div(this.componentName);
|
|
19751
19757
|
this.status_line = this.c.div(this.getFullElName('status'));
|
|
19752
|
-
this.tree = new
|
|
19753
|
-
this.files = new
|
|
19754
|
-
this.state = (0,
|
|
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)({
|
|
19755
19761
|
currentPath: '',
|
|
19756
|
-
currentSource:
|
|
19762
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
19757
19763
|
currentBaseUrl: '',
|
|
19758
19764
|
activeElements: [],
|
|
19759
19765
|
elements: [],
|
|
@@ -19764,7 +19770,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19764
19770
|
onlyImages: false
|
|
19765
19771
|
});
|
|
19766
19772
|
this.errorHandler = (resp) => {
|
|
19767
|
-
if ((0,
|
|
19773
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
19768
19774
|
return;
|
|
19769
19775
|
}
|
|
19770
19776
|
if (resp instanceof Error) {
|
|
@@ -19780,9 +19786,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19780
19786
|
this.close = () => {
|
|
19781
19787
|
this._dialog.close();
|
|
19782
19788
|
};
|
|
19789
|
+
this.__prevButtons = [];
|
|
19783
19790
|
this.attachEvents(options);
|
|
19784
19791
|
const self = this;
|
|
19785
|
-
self.options = (0,
|
|
19792
|
+
self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
|
|
19786
19793
|
self.browser.component = this;
|
|
19787
19794
|
self.container = self.browser;
|
|
19788
19795
|
if (self.o.showFoldersPanel) {
|
|
@@ -19790,9 +19797,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19790
19797
|
}
|
|
19791
19798
|
self.browser.appendChild(self.files.container);
|
|
19792
19799
|
self.browser.appendChild(self.status_line);
|
|
19793
|
-
|
|
19794
|
-
|
|
19795
|
-
|
|
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);
|
|
19796
19803
|
const keys = [
|
|
19797
19804
|
'getLocalFileByUrl',
|
|
19798
19805
|
'crop',
|
|
@@ -19810,7 +19817,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19810
19817
|
];
|
|
19811
19818
|
keys.forEach(key => {
|
|
19812
19819
|
if (this.options[key] != null) {
|
|
19813
|
-
this.options[key] = (0,
|
|
19820
|
+
this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
|
|
19814
19821
|
}
|
|
19815
19822
|
});
|
|
19816
19823
|
const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
|
|
@@ -19854,26 +19861,48 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19854
19861
|
this.events && this.e.off('.filebrowser');
|
|
19855
19862
|
this.uploader && this.uploader.destruct();
|
|
19856
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
|
+
}
|
|
19857
19872
|
};
|
|
19858
|
-
(0,
|
|
19873
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19859
19874
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19860
19875
|
], FileBrowser.prototype, "dataProvider", null);
|
|
19861
|
-
(0,
|
|
19876
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19862
19877
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19863
19878
|
], FileBrowser.prototype, "_dialog", null);
|
|
19864
|
-
(0,
|
|
19879
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19865
19880
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19866
19881
|
], FileBrowser.prototype, "storage", null);
|
|
19867
|
-
(0,
|
|
19882
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19868
19883
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19869
19884
|
], FileBrowser.prototype, "status", null);
|
|
19870
|
-
(0,
|
|
19885
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19871
19886
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19872
19887
|
], FileBrowser.prototype, "open", null);
|
|
19873
|
-
|
|
19874
|
-
(0,
|
|
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)
|
|
19875
19893
|
], FileBrowser);
|
|
19876
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
|
+
}
|
|
19877
19906
|
|
|
19878
19907
|
|
|
19879
19908
|
/***/ }),
|
|
@@ -25125,10 +25154,10 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25125
25154
|
beforeDestruct(_) { }
|
|
25126
25155
|
}
|
|
25127
25156
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25128
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25157
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25129
25158
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25130
25159
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25131
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25160
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':invokeAiAssistant')
|
|
25132
25161
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25133
25162
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25134
25163
|
|
|
@@ -25433,13 +25462,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
|
|
|
25433
25462
|
}
|
|
25434
25463
|
};
|
|
25435
25464
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25436
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25465
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
25437
25466
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
25438
25467
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25439
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25468
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
25440
25469
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
25441
25470
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25442
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25471
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
25443
25472
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
25444
25473
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25445
25474
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -28667,10 +28696,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
|
|
|
28667
28696
|
}
|
|
28668
28697
|
}
|
|
28669
28698
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
28670
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
28699
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
28671
28700
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
28672
28701
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
28673
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
28702
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
28674
28703
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
28675
28704
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
|
|
28676
28705
|
|