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/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
|
|
@@ -18679,10 +18678,11 @@ class FileBrowserItem {
|
|
|
18679
18678
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18680
18679
|
|
|
18681
18680
|
"use strict";
|
|
18682
|
-
/* harmony import */ var
|
|
18683
|
-
/* harmony import */ var
|
|
18684
|
-
/* harmony import */ var
|
|
18685
|
-
/* harmony import */ var
|
|
18681
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18682
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18683
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18684
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18685
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18686
18686
|
/*!
|
|
18687
18687
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18688
18688
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18692,19 +18692,20 @@ class FileBrowserItem {
|
|
|
18692
18692
|
|
|
18693
18693
|
|
|
18694
18694
|
|
|
18695
|
-
|
|
18695
|
+
|
|
18696
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18696
18697
|
namespace: '',
|
|
18697
18698
|
cache: true,
|
|
18698
18699
|
extraButtons: [],
|
|
18699
18700
|
filter(item, search) {
|
|
18700
18701
|
search = search.toLowerCase();
|
|
18701
|
-
if ((0,
|
|
18702
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18702
18703
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18703
18704
|
}
|
|
18704
|
-
if ((0,
|
|
18705
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18705
18706
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18706
18707
|
}
|
|
18707
|
-
if ((0,
|
|
18708
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18708
18709
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18709
18710
|
}
|
|
18710
18711
|
return true;
|
|
@@ -18721,14 +18722,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18721
18722
|
}
|
|
18722
18723
|
return 0;
|
|
18723
18724
|
};
|
|
18724
|
-
if ((0,
|
|
18725
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18725
18726
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18726
18727
|
}
|
|
18727
18728
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18728
|
-
if ((0,
|
|
18729
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18729
18730
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18730
18731
|
}
|
|
18731
|
-
if ((0,
|
|
18732
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18732
18733
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18733
18734
|
}
|
|
18734
18735
|
return 0;
|
|
@@ -18739,7 +18740,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18739
18740
|
return asc ? f - s : s - f;
|
|
18740
18741
|
}
|
|
18741
18742
|
case 'size': {
|
|
18742
|
-
const f = (0,
|
|
18743
|
+
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);
|
|
18743
18744
|
return asc ? f - s : s - f;
|
|
18744
18745
|
}
|
|
18745
18746
|
}
|
|
@@ -18800,7 +18801,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18800
18801
|
return resp.success;
|
|
18801
18802
|
},
|
|
18802
18803
|
getMessage(resp) {
|
|
18803
|
-
return resp.data.messages !== undefined && (0,
|
|
18804
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18804
18805
|
? resp.data.messages.join(' ')
|
|
18805
18806
|
: '';
|
|
18806
18807
|
},
|
|
@@ -18846,7 +18847,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18846
18847
|
</a>`;
|
|
18847
18848
|
},
|
|
18848
18849
|
ajax: {
|
|
18849
|
-
...
|
|
18850
|
+
...jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions,
|
|
18850
18851
|
url: '',
|
|
18851
18852
|
data: {},
|
|
18852
18853
|
cache: true,
|
|
@@ -18901,13 +18902,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18901
18902
|
data: { action: 'permissions' }
|
|
18902
18903
|
}
|
|
18903
18904
|
};
|
|
18904
|
-
|
|
18905
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18905
18906
|
upload: {
|
|
18906
18907
|
icon: 'plus',
|
|
18907
18908
|
isInput: true,
|
|
18908
18909
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18909
18910
|
getContent: (filebrowser) => {
|
|
18910
|
-
const btn = new
|
|
18911
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18911
18912
|
onlyImages: filebrowser.state.onlyImages
|
|
18912
18913
|
});
|
|
18913
18914
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19055,7 +19056,7 @@ let DataProvider = class DataProvider {
|
|
|
19055
19056
|
this.parent = parent;
|
|
19056
19057
|
this.options = options;
|
|
19057
19058
|
this.__currentPermissions = null;
|
|
19058
|
-
this.
|
|
19059
|
+
this.__ajaxInstances = new Map();
|
|
19059
19060
|
this.progressHandler = (ignore) => { };
|
|
19060
19061
|
}
|
|
19061
19062
|
/**
|
|
@@ -19065,11 +19066,11 @@ let DataProvider = class DataProvider {
|
|
|
19065
19066
|
return this.options;
|
|
19066
19067
|
}
|
|
19067
19068
|
get(name) {
|
|
19068
|
-
const
|
|
19069
|
-
if (
|
|
19070
|
-
const ajax =
|
|
19069
|
+
const instances = this.__ajaxInstances;
|
|
19070
|
+
if (instances.has(name)) {
|
|
19071
|
+
const ajax = instances.get(name);
|
|
19071
19072
|
ajax?.abort();
|
|
19072
|
-
|
|
19073
|
+
instances.delete(name);
|
|
19073
19074
|
}
|
|
19074
19075
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19075
19076
|
? this.options[name]
|
|
@@ -19080,12 +19081,12 @@ let DataProvider = class DataProvider {
|
|
|
19080
19081
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19081
19082
|
}
|
|
19082
19083
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19083
|
-
|
|
19084
|
+
instances.set(name, ajax);
|
|
19084
19085
|
const promise = ajax.send();
|
|
19085
19086
|
promise
|
|
19086
19087
|
.finally(() => {
|
|
19087
19088
|
ajax.destruct();
|
|
19088
|
-
|
|
19089
|
+
instances.delete(name);
|
|
19089
19090
|
this.progressHandler(100);
|
|
19090
19091
|
})
|
|
19091
19092
|
.catch(() => null);
|
|
@@ -19119,6 +19120,7 @@ let DataProvider = class DataProvider {
|
|
|
19119
19120
|
if (process) {
|
|
19120
19121
|
const respData = process.call(self, resp);
|
|
19121
19122
|
if (respData.data.permissions) {
|
|
19123
|
+
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
19122
19124
|
this.__currentPermissions = respData.data.permissions;
|
|
19123
19125
|
}
|
|
19124
19126
|
}
|
|
@@ -19403,8 +19405,8 @@ let DataProvider = class DataProvider {
|
|
|
19403
19405
|
return this.options.isSuccess(resp);
|
|
19404
19406
|
}
|
|
19405
19407
|
destruct() {
|
|
19406
|
-
this.
|
|
19407
|
-
this.
|
|
19408
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19409
|
+
this.__ajaxInstances.clear();
|
|
19408
19410
|
}
|
|
19409
19411
|
};
|
|
19410
19412
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
@@ -19557,25 +19559,26 @@ async function loadTree(fb) {
|
|
|
19557
19559
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19558
19560
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
19559
19561
|
/* harmony export */ });
|
|
19560
|
-
/* harmony import */ var
|
|
19562
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
|
|
19561
19563
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
19562
19564
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
19563
19565
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
19564
|
-
/* harmony import */ var
|
|
19565
|
-
/* harmony import */ var
|
|
19566
|
-
/* harmony import */ var
|
|
19567
|
-
/* harmony import */ var
|
|
19568
|
-
/* harmony import */ var
|
|
19569
|
-
/* harmony import */ var
|
|
19570
|
-
/* harmony import */ var
|
|
19571
|
-
/* harmony import */ var
|
|
19572
|
-
/* harmony import */ var
|
|
19573
|
-
/* harmony import */ var
|
|
19574
|
-
/* harmony import */ var
|
|
19575
|
-
/* harmony import */ var
|
|
19576
|
-
/* harmony import */ var
|
|
19577
|
-
/* harmony import */ var
|
|
19578
|
-
/* harmony import */ var
|
|
19566
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66927);
|
|
19567
|
+
/* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
|
|
19568
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65147);
|
|
19569
|
+
/* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63915);
|
|
19570
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58597);
|
|
19571
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14961);
|
|
19572
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70265);
|
|
19573
|
+
/* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9979);
|
|
19574
|
+
/* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31859);
|
|
19575
|
+
/* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62994);
|
|
19576
|
+
/* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18043);
|
|
19577
|
+
/* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80004);
|
|
19578
|
+
/* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75889);
|
|
19579
|
+
/* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(83797);
|
|
19580
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10274);
|
|
19581
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36115);
|
|
19579
19582
|
/*!
|
|
19580
19583
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19581
19584
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19602,13 +19605,14 @@ async function loadTree(fb) {
|
|
|
19602
19605
|
|
|
19603
19606
|
|
|
19604
19607
|
|
|
19605
|
-
|
|
19608
|
+
|
|
19609
|
+
let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
|
|
19606
19610
|
/** @override */
|
|
19607
19611
|
className() {
|
|
19608
19612
|
return 'FileBrowser';
|
|
19609
19613
|
}
|
|
19610
19614
|
get dataProvider() {
|
|
19611
|
-
return (0,
|
|
19615
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
19612
19616
|
}
|
|
19613
19617
|
// eslint-disable-next-line no-unused-vars
|
|
19614
19618
|
onSelect(callback) {
|
|
@@ -19629,7 +19633,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19629
19633
|
files,
|
|
19630
19634
|
isImages
|
|
19631
19635
|
};
|
|
19632
|
-
if ((0,
|
|
19636
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
19633
19637
|
callback(data);
|
|
19634
19638
|
}
|
|
19635
19639
|
this.close();
|
|
@@ -19651,7 +19655,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19651
19655
|
* Container for set/get value
|
|
19652
19656
|
*/
|
|
19653
19657
|
get storage() {
|
|
19654
|
-
return
|
|
19658
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
19655
19659
|
}
|
|
19656
19660
|
get isOpened() {
|
|
19657
19661
|
return this._dialog.isOpened && this.browser.style.display !== 'none';
|
|
@@ -19659,6 +19663,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19659
19663
|
/**
|
|
19660
19664
|
* It displays a message in the status bar of filebrowser
|
|
19661
19665
|
*
|
|
19666
|
+
* @param message - The message that will be displayed
|
|
19662
19667
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
19663
19668
|
* ßan error will be shown the red
|
|
19664
19669
|
* @example
|
|
@@ -19667,13 +19672,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19667
19672
|
* ```
|
|
19668
19673
|
*/
|
|
19669
19674
|
status(message, success) {
|
|
19670
|
-
if (!message || (0,
|
|
19675
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
19671
19676
|
return;
|
|
19672
19677
|
}
|
|
19673
|
-
if (!(0,
|
|
19678
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
19674
19679
|
message = message.message;
|
|
19675
19680
|
}
|
|
19676
|
-
if (!(0,
|
|
19681
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
|
|
19677
19682
|
return;
|
|
19678
19683
|
}
|
|
19679
19684
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -19700,7 +19705,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19700
19705
|
return this.async
|
|
19701
19706
|
.promise((resolve, reject) => {
|
|
19702
19707
|
if (!this.o.items || !this.o.items.url) {
|
|
19703
|
-
throw (0,
|
|
19708
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
19704
19709
|
}
|
|
19705
19710
|
let localTimeout = 0;
|
|
19706
19711
|
this.e
|
|
@@ -19717,10 +19722,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19717
19722
|
.off('select.filebrowser')
|
|
19718
19723
|
.on('select.filebrowser', this.onSelect(callback));
|
|
19719
19724
|
const header = this.c.div();
|
|
19720
|
-
this.toolbar?.
|
|
19725
|
+
this.toolbar?.appendTo(header);
|
|
19726
|
+
this.__updateToolbarButtons();
|
|
19721
19727
|
this._dialog.open(this.browser, header);
|
|
19722
19728
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
19723
|
-
(0,
|
|
19729
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
|
|
19724
19730
|
})
|
|
19725
19731
|
.catch((e) => {
|
|
19726
19732
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -19731,7 +19737,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19731
19737
|
__getButtons() {
|
|
19732
19738
|
const options = (this.o.buttons ?? []);
|
|
19733
19739
|
return options.filter((btn) => {
|
|
19734
|
-
if (!(0,
|
|
19740
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
19735
19741
|
return true;
|
|
19736
19742
|
}
|
|
19737
19743
|
switch (btn) {
|
|
@@ -19747,8 +19753,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19747
19753
|
});
|
|
19748
19754
|
}
|
|
19749
19755
|
initUploader(editor) {
|
|
19750
|
-
const self = this, options = editor?.options?.uploader, uploaderOptions = (0,
|
|
19751
|
-
const uploadHandler = () => (0,
|
|
19756
|
+
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);
|
|
19757
|
+
const uploadHandler = () => (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
19752
19758
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
19753
19759
|
self.uploader
|
|
19754
19760
|
.setPath(self.state.currentPath)
|
|
@@ -19767,11 +19773,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19767
19773
|
super(options);
|
|
19768
19774
|
this.browser = this.c.div(this.componentName);
|
|
19769
19775
|
this.status_line = this.c.div(this.getFullElName('status'));
|
|
19770
|
-
this.tree = new
|
|
19771
|
-
this.files = new
|
|
19772
|
-
this.state = (0,
|
|
19776
|
+
this.tree = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserTree */ .V(this);
|
|
19777
|
+
this.files = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserFiles */ .Q(this);
|
|
19778
|
+
this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .sH)({
|
|
19773
19779
|
currentPath: '',
|
|
19774
|
-
currentSource:
|
|
19780
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
19775
19781
|
currentBaseUrl: '',
|
|
19776
19782
|
activeElements: [],
|
|
19777
19783
|
elements: [],
|
|
@@ -19782,7 +19788,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19782
19788
|
onlyImages: false
|
|
19783
19789
|
});
|
|
19784
19790
|
this.errorHandler = (resp) => {
|
|
19785
|
-
if ((0,
|
|
19791
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
19786
19792
|
return;
|
|
19787
19793
|
}
|
|
19788
19794
|
if (resp instanceof Error) {
|
|
@@ -19798,9 +19804,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19798
19804
|
this.close = () => {
|
|
19799
19805
|
this._dialog.close();
|
|
19800
19806
|
};
|
|
19807
|
+
this.__prevButtons = [];
|
|
19801
19808
|
this.attachEvents(options);
|
|
19802
19809
|
const self = this;
|
|
19803
|
-
self.options = (0,
|
|
19810
|
+
self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
|
|
19804
19811
|
self.browser.component = this;
|
|
19805
19812
|
self.container = self.browser;
|
|
19806
19813
|
if (self.o.showFoldersPanel) {
|
|
@@ -19808,9 +19815,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19808
19815
|
}
|
|
19809
19816
|
self.browser.appendChild(self.files.container);
|
|
19810
19817
|
self.browser.appendChild(self.status_line);
|
|
19811
|
-
|
|
19812
|
-
|
|
19813
|
-
|
|
19818
|
+
_listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__/* .selfListeners */ .c.call(self);
|
|
19819
|
+
_listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__/* .nativeListeners */ .nW.call(self);
|
|
19820
|
+
_listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__/* .stateListeners */ .r.call(self);
|
|
19814
19821
|
const keys = [
|
|
19815
19822
|
'getLocalFileByUrl',
|
|
19816
19823
|
'crop',
|
|
@@ -19828,7 +19835,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19828
19835
|
];
|
|
19829
19836
|
keys.forEach(key => {
|
|
19830
19837
|
if (this.options[key] != null) {
|
|
19831
|
-
this.options[key] = (0,
|
|
19838
|
+
this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
|
|
19832
19839
|
}
|
|
19833
19840
|
});
|
|
19834
19841
|
const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
|
|
@@ -19872,26 +19879,48 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19872
19879
|
this.events && this.e.off('.filebrowser');
|
|
19873
19880
|
this.uploader && this.uploader.destruct();
|
|
19874
19881
|
}
|
|
19882
|
+
__updateToolbarButtons() {
|
|
19883
|
+
const buttons = this.__getButtons();
|
|
19884
|
+
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
19885
|
+
return;
|
|
19886
|
+
}
|
|
19887
|
+
this.__prevButtons = buttons;
|
|
19888
|
+
this.toolbar?.build(buttons);
|
|
19889
|
+
}
|
|
19875
19890
|
};
|
|
19876
|
-
(0,
|
|
19891
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19877
19892
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19878
19893
|
], FileBrowser.prototype, "dataProvider", null);
|
|
19879
|
-
(0,
|
|
19894
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19880
19895
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19881
19896
|
], FileBrowser.prototype, "_dialog", null);
|
|
19882
|
-
(0,
|
|
19897
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19883
19898
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19884
19899
|
], FileBrowser.prototype, "storage", null);
|
|
19885
|
-
(0,
|
|
19900
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19886
19901
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19887
19902
|
], FileBrowser.prototype, "status", null);
|
|
19888
|
-
(0,
|
|
19903
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19889
19904
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19890
19905
|
], FileBrowser.prototype, "open", null);
|
|
19891
|
-
|
|
19892
|
-
(0,
|
|
19906
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19907
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__/* .watch */ .w)('dataProvider:changePermissions')
|
|
19908
|
+
], FileBrowser.prototype, "__updateToolbarButtons", null);
|
|
19909
|
+
FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19910
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__/* .Dlgs */ .z)
|
|
19893
19911
|
], FileBrowser);
|
|
19894
19912
|
|
|
19913
|
+
function isEqualButtonList(prevButtons, buttons) {
|
|
19914
|
+
if (prevButtons.length !== buttons.length) {
|
|
19915
|
+
return false;
|
|
19916
|
+
}
|
|
19917
|
+
for (let i = 0; i < prevButtons.length; i++) {
|
|
19918
|
+
if (prevButtons[i] !== buttons[i]) {
|
|
19919
|
+
return false;
|
|
19920
|
+
}
|
|
19921
|
+
}
|
|
19922
|
+
return true;
|
|
19923
|
+
}
|
|
19895
19924
|
|
|
19896
19925
|
|
|
19897
19926
|
/***/ }),
|
|
@@ -25143,10 +25172,10 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25143
25172
|
beforeDestruct(_) { }
|
|
25144
25173
|
}
|
|
25145
25174
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25146
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25175
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25147
25176
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25148
25177
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25149
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25178
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':invokeAiAssistant')
|
|
25150
25179
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25151
25180
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25152
25181
|
|
|
@@ -25504,13 +25533,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
|
|
|
25504
25533
|
}
|
|
25505
25534
|
};
|
|
25506
25535
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25507
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25536
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
25508
25537
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
25509
25538
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25510
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25539
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
25511
25540
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
25512
25541
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25513
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25542
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
25514
25543
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
25515
25544
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25516
25545
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -29135,10 +29164,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
|
|
|
29135
29164
|
}
|
|
29136
29165
|
}
|
|
29137
29166
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29138
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29167
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
29139
29168
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
29140
29169
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29141
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29170
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
29142
29171
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
29143
29172
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
|
|
29144
29173
|
|