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/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.1.
|
|
4
|
+
* Version: v4.1.12
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1707,7 +1707,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1707
1707
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1708
1708
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1709
1709
|
*/
|
|
1710
|
-
const APP_VERSION = "4.1.
|
|
1710
|
+
const APP_VERSION = "4.1.12";
|
|
1711
1711
|
// prettier-ignore
|
|
1712
1712
|
const ES = "es2015";
|
|
1713
1713
|
const IS_ES_MODERN = true;
|
|
@@ -2399,14 +2399,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2399
2399
|
/* harmony export */ component: function() { return /* reexport safe */ _component_component__WEBPACK_IMPORTED_MODULE_2__.s; },
|
|
2400
2400
|
/* harmony export */ debounce: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.s; },
|
|
2401
2401
|
/* harmony export */ derive: function() { return /* reexport safe */ _derive_derive__WEBPACK_IMPORTED_MODULE_4__.C; },
|
|
2402
|
-
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.
|
|
2402
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.N; },
|
|
2403
2403
|
/* harmony export */ hook: function() { return /* reexport safe */ _hook_hook__WEBPACK_IMPORTED_MODULE_5__.A; },
|
|
2404
2404
|
/* harmony export */ idle: function() { return /* reexport safe */ _idle_idle__WEBPACK_IMPORTED_MODULE_6__.N; },
|
|
2405
2405
|
/* harmony export */ nonenumerable: function() { return /* reexport safe */ _nonenumerable_nonenumerable__WEBPACK_IMPORTED_MODULE_7__.m; },
|
|
2406
2406
|
/* harmony export */ persistent: function() { return /* reexport safe */ _persistent_persistent__WEBPACK_IMPORTED_MODULE_8__.y; },
|
|
2407
2407
|
/* harmony export */ throttle: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.n; },
|
|
2408
2408
|
/* harmony export */ wait: function() { return /* reexport safe */ _wait_wait__WEBPACK_IMPORTED_MODULE_9__.u; },
|
|
2409
|
-
/* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.
|
|
2409
|
+
/* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.w; }
|
|
2410
2410
|
/* harmony export */ });
|
|
2411
2411
|
/* harmony import */ var _autobind_autobind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11961);
|
|
2412
2412
|
/* harmony import */ var _cache_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87875);
|
|
@@ -2568,8 +2568,8 @@ function wait(condition) {
|
|
|
2568
2568
|
|
|
2569
2569
|
"use strict";
|
|
2570
2570
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2571
|
-
/* harmony export */
|
|
2572
|
-
/* harmony export */
|
|
2571
|
+
/* harmony export */ N: function() { return /* binding */ getPropertyDescriptor; },
|
|
2572
|
+
/* harmony export */ w: function() { return /* binding */ watch; }
|
|
2573
2573
|
/* harmony export */ });
|
|
2574
2574
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
2575
2575
|
/* harmony import */ var jodit_core_event_emitter_observable__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(32332);
|
|
@@ -2685,7 +2685,6 @@ function watch(observeFields, opts) {
|
|
|
2685
2685
|
}
|
|
2686
2686
|
};
|
|
2687
2687
|
}
|
|
2688
|
-
/* harmony default export */ __webpack_exports__.Ay = (watch);
|
|
2689
2688
|
|
|
2690
2689
|
|
|
2691
2690
|
/***/ }),
|
|
@@ -4257,7 +4256,7 @@ function observable(obj) {
|
|
|
4257
4256
|
const key = _key;
|
|
4258
4257
|
const prefix = prefixes.concat(key).filter(a => a.length);
|
|
4259
4258
|
store[key] = dict[key];
|
|
4260
|
-
const descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .
|
|
4259
|
+
const descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .N)(dict, key);
|
|
4261
4260
|
Object.defineProperty(dict, key, {
|
|
4262
4261
|
set: (value) => {
|
|
4263
4262
|
const oldValue = store[key];
|
|
@@ -15722,7 +15721,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15722
15721
|
}
|
|
15723
15722
|
}
|
|
15724
15723
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
15725
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .
|
|
15724
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15726
15725
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15727
15726
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
15728
15727
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Ay
|
|
@@ -18669,10 +18668,11 @@ class FileBrowserItem {
|
|
|
18669
18668
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18670
18669
|
|
|
18671
18670
|
"use strict";
|
|
18672
|
-
/* harmony import */ var
|
|
18673
|
-
/* harmony import */ var
|
|
18674
|
-
/* harmony import */ var
|
|
18675
|
-
/* harmony import */ var
|
|
18671
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18672
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18673
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18674
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18675
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18676
18676
|
/*!
|
|
18677
18677
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18678
18678
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18682,19 +18682,20 @@ class FileBrowserItem {
|
|
|
18682
18682
|
|
|
18683
18683
|
|
|
18684
18684
|
|
|
18685
|
-
|
|
18685
|
+
|
|
18686
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18686
18687
|
namespace: '',
|
|
18687
18688
|
cache: true,
|
|
18688
18689
|
extraButtons: [],
|
|
18689
18690
|
filter(item, search) {
|
|
18690
18691
|
search = search.toLowerCase();
|
|
18691
|
-
if ((0,
|
|
18692
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18692
18693
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18693
18694
|
}
|
|
18694
|
-
if ((0,
|
|
18695
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18695
18696
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18696
18697
|
}
|
|
18697
|
-
if ((0,
|
|
18698
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18698
18699
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18699
18700
|
}
|
|
18700
18701
|
return true;
|
|
@@ -18711,14 +18712,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18711
18712
|
}
|
|
18712
18713
|
return 0;
|
|
18713
18714
|
};
|
|
18714
|
-
if ((0,
|
|
18715
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18715
18716
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18716
18717
|
}
|
|
18717
18718
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18718
|
-
if ((0,
|
|
18719
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18719
18720
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18720
18721
|
}
|
|
18721
|
-
if ((0,
|
|
18722
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18722
18723
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18723
18724
|
}
|
|
18724
18725
|
return 0;
|
|
@@ -18729,7 +18730,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18729
18730
|
return asc ? f - s : s - f;
|
|
18730
18731
|
}
|
|
18731
18732
|
case 'size': {
|
|
18732
|
-
const f = (0,
|
|
18733
|
+
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);
|
|
18733
18734
|
return asc ? f - s : s - f;
|
|
18734
18735
|
}
|
|
18735
18736
|
}
|
|
@@ -18790,7 +18791,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18790
18791
|
return resp.success;
|
|
18791
18792
|
},
|
|
18792
18793
|
getMessage(resp) {
|
|
18793
|
-
return resp.data.messages !== undefined && (0,
|
|
18794
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18794
18795
|
? resp.data.messages.join(' ')
|
|
18795
18796
|
: '';
|
|
18796
18797
|
},
|
|
@@ -18835,7 +18836,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18835
18836
|
${showName || showSize || showTime ? info : ''}
|
|
18836
18837
|
</a>`;
|
|
18837
18838
|
},
|
|
18838
|
-
ajax: Object.assign(Object.assign({},
|
|
18839
|
+
ajax: Object.assign(Object.assign({}, jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions), { url: '', data: {}, cache: true, contentType: 'application/x-www-form-urlencoded; charset=UTF-8', method: 'POST', processData: true, headers: {}, prepareData(data) {
|
|
18839
18840
|
return data;
|
|
18840
18841
|
},
|
|
18841
18842
|
process(resp) {
|
|
@@ -18881,13 +18882,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18881
18882
|
data: { action: 'permissions' }
|
|
18882
18883
|
}
|
|
18883
18884
|
};
|
|
18884
|
-
|
|
18885
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18885
18886
|
upload: {
|
|
18886
18887
|
icon: 'plus',
|
|
18887
18888
|
isInput: true,
|
|
18888
18889
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18889
18890
|
getContent: (filebrowser) => {
|
|
18890
|
-
const btn = new
|
|
18891
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18891
18892
|
onlyImages: filebrowser.state.onlyImages
|
|
18892
18893
|
});
|
|
18893
18894
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19035,7 +19036,7 @@ let DataProvider = class DataProvider {
|
|
|
19035
19036
|
this.parent = parent;
|
|
19036
19037
|
this.options = options;
|
|
19037
19038
|
this.__currentPermissions = null;
|
|
19038
|
-
this.
|
|
19039
|
+
this.__ajaxInstances = new Map();
|
|
19039
19040
|
this.progressHandler = (ignore) => { };
|
|
19040
19041
|
}
|
|
19041
19042
|
/**
|
|
@@ -19045,11 +19046,11 @@ let DataProvider = class DataProvider {
|
|
|
19045
19046
|
return this.options;
|
|
19046
19047
|
}
|
|
19047
19048
|
get(name) {
|
|
19048
|
-
const
|
|
19049
|
-
if (
|
|
19050
|
-
const ajax =
|
|
19049
|
+
const instances = this.__ajaxInstances;
|
|
19050
|
+
if (instances.has(name)) {
|
|
19051
|
+
const ajax = instances.get(name);
|
|
19051
19052
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
19052
|
-
|
|
19053
|
+
instances.delete(name);
|
|
19053
19054
|
}
|
|
19054
19055
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19055
19056
|
? this.options[name]
|
|
@@ -19060,12 +19061,12 @@ let DataProvider = class DataProvider {
|
|
|
19060
19061
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19061
19062
|
}
|
|
19062
19063
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19063
|
-
|
|
19064
|
+
instances.set(name, ajax);
|
|
19064
19065
|
const promise = ajax.send();
|
|
19065
19066
|
promise
|
|
19066
19067
|
.finally(() => {
|
|
19067
19068
|
ajax.destruct();
|
|
19068
|
-
|
|
19069
|
+
instances.delete(name);
|
|
19069
19070
|
this.progressHandler(100);
|
|
19070
19071
|
})
|
|
19071
19072
|
.catch(() => null);
|
|
@@ -19100,6 +19101,7 @@ let DataProvider = class DataProvider {
|
|
|
19100
19101
|
if (process) {
|
|
19101
19102
|
const respData = process.call(self, resp);
|
|
19102
19103
|
if (respData.data.permissions) {
|
|
19104
|
+
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
19103
19105
|
this.__currentPermissions = respData.data.permissions;
|
|
19104
19106
|
}
|
|
19105
19107
|
}
|
|
@@ -19386,8 +19388,8 @@ let DataProvider = class DataProvider {
|
|
|
19386
19388
|
return this.options.isSuccess(resp);
|
|
19387
19389
|
}
|
|
19388
19390
|
destruct() {
|
|
19389
|
-
this.
|
|
19390
|
-
this.
|
|
19391
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19392
|
+
this.__ajaxInstances.clear();
|
|
19391
19393
|
}
|
|
19392
19394
|
};
|
|
19393
19395
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
@@ -19544,25 +19546,26 @@ function loadTree(fb) {
|
|
|
19544
19546
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19545
19547
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
19546
19548
|
/* harmony export */ });
|
|
19547
|
-
/* harmony import */ var
|
|
19549
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
|
|
19548
19550
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
19549
19551
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
19550
19552
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
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
|
|
19561
|
-
/* harmony import */ var
|
|
19562
|
-
/* harmony import */ var
|
|
19563
|
-
/* harmony import */ var
|
|
19564
|
-
/* harmony import */ var
|
|
19565
|
-
/* harmony import */ var
|
|
19553
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66927);
|
|
19554
|
+
/* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
|
|
19555
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65147);
|
|
19556
|
+
/* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63915);
|
|
19557
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58597);
|
|
19558
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14961);
|
|
19559
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70265);
|
|
19560
|
+
/* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9979);
|
|
19561
|
+
/* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31859);
|
|
19562
|
+
/* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62994);
|
|
19563
|
+
/* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18043);
|
|
19564
|
+
/* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80004);
|
|
19565
|
+
/* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75889);
|
|
19566
|
+
/* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(83797);
|
|
19567
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10274);
|
|
19568
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36115);
|
|
19566
19569
|
/*!
|
|
19567
19570
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19568
19571
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19589,13 +19592,14 @@ function loadTree(fb) {
|
|
|
19589
19592
|
|
|
19590
19593
|
|
|
19591
19594
|
|
|
19592
|
-
|
|
19595
|
+
|
|
19596
|
+
let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
|
|
19593
19597
|
/** @override */
|
|
19594
19598
|
className() {
|
|
19595
19599
|
return 'FileBrowser';
|
|
19596
19600
|
}
|
|
19597
19601
|
get dataProvider() {
|
|
19598
|
-
return (0,
|
|
19602
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
19599
19603
|
}
|
|
19600
19604
|
// eslint-disable-next-line no-unused-vars
|
|
19601
19605
|
onSelect(callback) {
|
|
@@ -19616,7 +19620,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19616
19620
|
files,
|
|
19617
19621
|
isImages
|
|
19618
19622
|
};
|
|
19619
|
-
if ((0,
|
|
19623
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
19620
19624
|
callback(data);
|
|
19621
19625
|
}
|
|
19622
19626
|
this.close();
|
|
@@ -19639,7 +19643,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19639
19643
|
* Container for set/get value
|
|
19640
19644
|
*/
|
|
19641
19645
|
get storage() {
|
|
19642
|
-
return
|
|
19646
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
19643
19647
|
}
|
|
19644
19648
|
get isOpened() {
|
|
19645
19649
|
return this._dialog.isOpened && this.browser.style.display !== 'none';
|
|
@@ -19647,6 +19651,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19647
19651
|
/**
|
|
19648
19652
|
* It displays a message in the status bar of filebrowser
|
|
19649
19653
|
*
|
|
19654
|
+
* @param message - The message that will be displayed
|
|
19650
19655
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
19651
19656
|
* ßan error will be shown the red
|
|
19652
19657
|
* @example
|
|
@@ -19655,13 +19660,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19655
19660
|
* ```
|
|
19656
19661
|
*/
|
|
19657
19662
|
status(message, success) {
|
|
19658
|
-
if (!message || (0,
|
|
19663
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
19659
19664
|
return;
|
|
19660
19665
|
}
|
|
19661
|
-
if (!(0,
|
|
19666
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
19662
19667
|
message = message.message;
|
|
19663
19668
|
}
|
|
19664
|
-
if (!(0,
|
|
19669
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
|
|
19665
19670
|
return;
|
|
19666
19671
|
}
|
|
19667
19672
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -19689,7 +19694,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19689
19694
|
.promise((resolve, reject) => {
|
|
19690
19695
|
var _a;
|
|
19691
19696
|
if (!this.o.items || !this.o.items.url) {
|
|
19692
|
-
throw (0,
|
|
19697
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
19693
19698
|
}
|
|
19694
19699
|
let localTimeout = 0;
|
|
19695
19700
|
this.e
|
|
@@ -19706,10 +19711,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19706
19711
|
.off('select.filebrowser')
|
|
19707
19712
|
.on('select.filebrowser', this.onSelect(callback));
|
|
19708
19713
|
const header = this.c.div();
|
|
19709
|
-
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.
|
|
19714
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
19715
|
+
this.__updateToolbarButtons();
|
|
19710
19716
|
this._dialog.open(this.browser, header);
|
|
19711
19717
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
19712
|
-
(0,
|
|
19718
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
|
|
19713
19719
|
})
|
|
19714
19720
|
.catch((e) => {
|
|
19715
19721
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -19721,7 +19727,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19721
19727
|
var _a;
|
|
19722
19728
|
const options = ((_a = this.o.buttons) !== null && _a !== void 0 ? _a : []);
|
|
19723
19729
|
return options.filter((btn) => {
|
|
19724
|
-
if (!(0,
|
|
19730
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
19725
19731
|
return true;
|
|
19726
19732
|
}
|
|
19727
19733
|
switch (btn) {
|
|
@@ -19738,8 +19744,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19738
19744
|
}
|
|
19739
19745
|
initUploader(editor) {
|
|
19740
19746
|
var _a;
|
|
19741
|
-
const self = this, options = (_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.uploader, uploaderOptions = (0,
|
|
19742
|
-
const uploadHandler = () => (0,
|
|
19747
|
+
const self = this, options = (_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.uploader, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.uploader);
|
|
19748
|
+
const uploadHandler = () => (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
19743
19749
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
19744
19750
|
self.uploader
|
|
19745
19751
|
.setPath(self.state.currentPath)
|
|
@@ -19758,11 +19764,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19758
19764
|
super(options);
|
|
19759
19765
|
this.browser = this.c.div(this.componentName);
|
|
19760
19766
|
this.status_line = this.c.div(this.getFullElName('status'));
|
|
19761
|
-
this.tree = new
|
|
19762
|
-
this.files = new
|
|
19763
|
-
this.state = (0,
|
|
19767
|
+
this.tree = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserTree */ .V(this);
|
|
19768
|
+
this.files = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserFiles */ .Q(this);
|
|
19769
|
+
this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .sH)({
|
|
19764
19770
|
currentPath: '',
|
|
19765
|
-
currentSource:
|
|
19771
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
19766
19772
|
currentBaseUrl: '',
|
|
19767
19773
|
activeElements: [],
|
|
19768
19774
|
elements: [],
|
|
@@ -19773,7 +19779,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19773
19779
|
onlyImages: false
|
|
19774
19780
|
});
|
|
19775
19781
|
this.errorHandler = (resp) => {
|
|
19776
|
-
if ((0,
|
|
19782
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
19777
19783
|
return;
|
|
19778
19784
|
}
|
|
19779
19785
|
if (resp instanceof Error) {
|
|
@@ -19789,9 +19795,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19789
19795
|
this.close = () => {
|
|
19790
19796
|
this._dialog.close();
|
|
19791
19797
|
};
|
|
19798
|
+
this.__prevButtons = [];
|
|
19792
19799
|
this.attachEvents(options);
|
|
19793
19800
|
const self = this;
|
|
19794
|
-
self.options = (0,
|
|
19801
|
+
self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
|
|
19795
19802
|
self.browser.component = this;
|
|
19796
19803
|
self.container = self.browser;
|
|
19797
19804
|
if (self.o.showFoldersPanel) {
|
|
@@ -19799,9 +19806,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19799
19806
|
}
|
|
19800
19807
|
self.browser.appendChild(self.files.container);
|
|
19801
19808
|
self.browser.appendChild(self.status_line);
|
|
19802
|
-
|
|
19803
|
-
|
|
19804
|
-
|
|
19809
|
+
_listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__/* .selfListeners */ .c.call(self);
|
|
19810
|
+
_listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__/* .nativeListeners */ .nW.call(self);
|
|
19811
|
+
_listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__/* .stateListeners */ .r.call(self);
|
|
19805
19812
|
const keys = [
|
|
19806
19813
|
'getLocalFileByUrl',
|
|
19807
19814
|
'crop',
|
|
@@ -19819,7 +19826,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19819
19826
|
];
|
|
19820
19827
|
keys.forEach(key => {
|
|
19821
19828
|
if (this.options[key] != null) {
|
|
19822
|
-
this.options[key] = (0,
|
|
19829
|
+
this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
|
|
19823
19830
|
}
|
|
19824
19831
|
});
|
|
19825
19832
|
const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
|
|
@@ -19863,26 +19870,49 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19863
19870
|
this.events && this.e.off('.filebrowser');
|
|
19864
19871
|
this.uploader && this.uploader.destruct();
|
|
19865
19872
|
}
|
|
19873
|
+
__updateToolbarButtons() {
|
|
19874
|
+
var _a;
|
|
19875
|
+
const buttons = this.__getButtons();
|
|
19876
|
+
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
19877
|
+
return;
|
|
19878
|
+
}
|
|
19879
|
+
this.__prevButtons = buttons;
|
|
19880
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
19881
|
+
}
|
|
19866
19882
|
};
|
|
19867
|
-
(0,
|
|
19883
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19868
19884
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19869
19885
|
], FileBrowser.prototype, "dataProvider", null);
|
|
19870
|
-
(0,
|
|
19886
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19871
19887
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19872
19888
|
], FileBrowser.prototype, "_dialog", null);
|
|
19873
|
-
(0,
|
|
19889
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19874
19890
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19875
19891
|
], FileBrowser.prototype, "storage", null);
|
|
19876
|
-
(0,
|
|
19892
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19877
19893
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19878
19894
|
], FileBrowser.prototype, "status", null);
|
|
19879
|
-
(0,
|
|
19895
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19880
19896
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19881
19897
|
], FileBrowser.prototype, "open", null);
|
|
19882
|
-
|
|
19883
|
-
(0,
|
|
19898
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19899
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__/* .watch */ .w)('dataProvider:changePermissions')
|
|
19900
|
+
], FileBrowser.prototype, "__updateToolbarButtons", null);
|
|
19901
|
+
FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19902
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__/* .Dlgs */ .z)
|
|
19884
19903
|
], FileBrowser);
|
|
19885
19904
|
|
|
19905
|
+
function isEqualButtonList(prevButtons, buttons) {
|
|
19906
|
+
if (prevButtons.length !== buttons.length) {
|
|
19907
|
+
return false;
|
|
19908
|
+
}
|
|
19909
|
+
for (let i = 0; i < prevButtons.length; i++) {
|
|
19910
|
+
if (prevButtons[i] !== buttons[i]) {
|
|
19911
|
+
return false;
|
|
19912
|
+
}
|
|
19913
|
+
}
|
|
19914
|
+
return true;
|
|
19915
|
+
}
|
|
19886
19916
|
|
|
19887
19917
|
|
|
19888
19918
|
/***/ }),
|
|
@@ -25137,10 +25167,10 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25137
25167
|
beforeDestruct(_) { }
|
|
25138
25168
|
}
|
|
25139
25169
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
25140
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25170
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25141
25171
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25142
25172
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
25143
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25173
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':invokeAiAssistant')
|
|
25144
25174
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25145
25175
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25146
25176
|
|
|
@@ -25498,13 +25528,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
|
|
|
25498
25528
|
}
|
|
25499
25529
|
};
|
|
25500
25530
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25501
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25531
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
25502
25532
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
25503
25533
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25504
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25534
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
25505
25535
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
25506
25536
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25507
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25537
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
25508
25538
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
25509
25539
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25510
25540
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -29135,10 +29165,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
|
|
|
29135
29165
|
}
|
|
29136
29166
|
}
|
|
29137
29167
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29138
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29168
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
29139
29169
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
29140
29170
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29141
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29171
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
29142
29172
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
29143
29173
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
|
|
29144
29174
|
|