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/es2018/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 = "es2018";
|
|
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];
|
|
@@ -15779,7 +15778,7 @@ class ViewWithToolbar extends jodit_core_view_view__WEBPACK_IMPORTED_MODULE_5__/
|
|
|
15779
15778
|
}
|
|
15780
15779
|
}
|
|
15781
15780
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
15782
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .
|
|
15781
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
15783
15782
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
15784
15783
|
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .Cg)([
|
|
15785
15784
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Ay
|
|
@@ -18731,10 +18730,11 @@ class FileBrowserItem {
|
|
|
18731
18730
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
18732
18731
|
|
|
18733
18732
|
"use strict";
|
|
18734
|
-
/* harmony import */ var
|
|
18735
|
-
/* harmony import */ var
|
|
18736
|
-
/* harmony import */ var
|
|
18737
|
-
/* harmony import */ var
|
|
18733
|
+
/* harmony import */ var jodit_core_request_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27337);
|
|
18734
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(9823);
|
|
18735
|
+
/* harmony import */ var jodit_core_helpers_utils_human_size_to_bytes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(99898);
|
|
18736
|
+
/* harmony import */ var jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(47964);
|
|
18737
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(36115);
|
|
18738
18738
|
/*!
|
|
18739
18739
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
18740
18740
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -18744,19 +18744,20 @@ class FileBrowserItem {
|
|
|
18744
18744
|
|
|
18745
18745
|
|
|
18746
18746
|
|
|
18747
|
-
|
|
18747
|
+
|
|
18748
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser = {
|
|
18748
18749
|
namespace: '',
|
|
18749
18750
|
cache: true,
|
|
18750
18751
|
extraButtons: [],
|
|
18751
18752
|
filter(item, search) {
|
|
18752
18753
|
search = search.toLowerCase();
|
|
18753
|
-
if ((0,
|
|
18754
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item)) {
|
|
18754
18755
|
return item.toLowerCase().indexOf(search) !== -1;
|
|
18755
18756
|
}
|
|
18756
|
-
if ((0,
|
|
18757
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.name)) {
|
|
18757
18758
|
return item.name.toLowerCase().indexOf(search) !== -1;
|
|
18758
18759
|
}
|
|
18759
|
-
if ((0,
|
|
18760
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(item.file)) {
|
|
18760
18761
|
return item.file.toLowerCase().indexOf(search) !== -1;
|
|
18761
18762
|
}
|
|
18762
18763
|
return true;
|
|
@@ -18773,14 +18774,14 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18773
18774
|
}
|
|
18774
18775
|
return 0;
|
|
18775
18776
|
};
|
|
18776
|
-
if ((0,
|
|
18777
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a)) {
|
|
18777
18778
|
return compareStr(a.toLowerCase(), b.toLowerCase());
|
|
18778
18779
|
}
|
|
18779
18780
|
if (a[sortAttr] === undefined || sortAttr === 'name') {
|
|
18780
|
-
if ((0,
|
|
18781
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.name)) {
|
|
18781
18782
|
return compareStr(a.name.toLowerCase(), b.name.toLowerCase());
|
|
18782
18783
|
}
|
|
18783
|
-
if ((0,
|
|
18784
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(a.file)) {
|
|
18784
18785
|
return compareStr(a.file.toLowerCase(), b.file.toLowerCase());
|
|
18785
18786
|
}
|
|
18786
18787
|
return 0;
|
|
@@ -18791,7 +18792,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18791
18792
|
return asc ? f - s : s - f;
|
|
18792
18793
|
}
|
|
18793
18794
|
case 'size': {
|
|
18794
|
-
const f = (0,
|
|
18795
|
+
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);
|
|
18795
18796
|
return asc ? f - s : s - f;
|
|
18796
18797
|
}
|
|
18797
18798
|
}
|
|
@@ -18852,7 +18853,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18852
18853
|
return resp.success;
|
|
18853
18854
|
},
|
|
18854
18855
|
getMessage(resp) {
|
|
18855
|
-
return resp.data.messages !== undefined && (0,
|
|
18856
|
+
return resp.data.messages !== undefined && (0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_1__/* .isArray */ .cy)(resp.data.messages)
|
|
18856
18857
|
? resp.data.messages.join(' ')
|
|
18857
18858
|
: '';
|
|
18858
18859
|
},
|
|
@@ -18898,7 +18899,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18898
18899
|
</a>`;
|
|
18899
18900
|
},
|
|
18900
18901
|
ajax: {
|
|
18901
|
-
...
|
|
18902
|
+
...jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.defaultAjaxOptions,
|
|
18902
18903
|
url: '',
|
|
18903
18904
|
data: {},
|
|
18904
18905
|
cache: true,
|
|
@@ -18953,13 +18954,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.filebrowser
|
|
|
18953
18954
|
data: { action: 'permissions' }
|
|
18954
18955
|
}
|
|
18955
18956
|
};
|
|
18956
|
-
|
|
18957
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
18957
18958
|
upload: {
|
|
18958
18959
|
icon: 'plus',
|
|
18959
18960
|
isInput: true,
|
|
18960
18961
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
18961
18962
|
getContent: (filebrowser) => {
|
|
18962
|
-
const btn = new
|
|
18963
|
+
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
18963
18964
|
onlyImages: filebrowser.state.onlyImages
|
|
18964
18965
|
});
|
|
18965
18966
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19107,7 +19108,7 @@ let DataProvider = class DataProvider {
|
|
|
19107
19108
|
this.parent = parent;
|
|
19108
19109
|
this.options = options;
|
|
19109
19110
|
this.__currentPermissions = null;
|
|
19110
|
-
this.
|
|
19111
|
+
this.__ajaxInstances = new Map();
|
|
19111
19112
|
this.progressHandler = (ignore) => { };
|
|
19112
19113
|
}
|
|
19113
19114
|
/**
|
|
@@ -19117,11 +19118,11 @@ let DataProvider = class DataProvider {
|
|
|
19117
19118
|
return this.options;
|
|
19118
19119
|
}
|
|
19119
19120
|
get(name) {
|
|
19120
|
-
const
|
|
19121
|
-
if (
|
|
19122
|
-
const ajax =
|
|
19121
|
+
const instances = this.__ajaxInstances;
|
|
19122
|
+
if (instances.has(name)) {
|
|
19123
|
+
const ajax = instances.get(name);
|
|
19123
19124
|
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
19124
|
-
|
|
19125
|
+
instances.delete(name);
|
|
19125
19126
|
}
|
|
19126
19127
|
const opts = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined
|
|
19127
19128
|
? this.options[name]
|
|
@@ -19132,12 +19133,12 @@ let DataProvider = class DataProvider {
|
|
|
19132
19133
|
opts.data = opts.prepareData.call(this, opts.data);
|
|
19133
19134
|
}
|
|
19134
19135
|
const ajax = new jodit_core_request__WEBPACK_IMPORTED_MODULE_3__/* .Ajax */ .d(opts);
|
|
19135
|
-
|
|
19136
|
+
instances.set(name, ajax);
|
|
19136
19137
|
const promise = ajax.send();
|
|
19137
19138
|
promise
|
|
19138
19139
|
.finally(() => {
|
|
19139
19140
|
ajax.destruct();
|
|
19140
|
-
|
|
19141
|
+
instances.delete(name);
|
|
19141
19142
|
this.progressHandler(100);
|
|
19142
19143
|
})
|
|
19143
19144
|
.catch(() => null);
|
|
@@ -19171,6 +19172,7 @@ let DataProvider = class DataProvider {
|
|
|
19171
19172
|
if (process) {
|
|
19172
19173
|
const respData = process.call(self, resp);
|
|
19173
19174
|
if (respData.data.permissions) {
|
|
19175
|
+
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
19174
19176
|
this.__currentPermissions = respData.data.permissions;
|
|
19175
19177
|
}
|
|
19176
19178
|
}
|
|
@@ -19458,8 +19460,8 @@ let DataProvider = class DataProvider {
|
|
|
19458
19460
|
return this.options.isSuccess(resp);
|
|
19459
19461
|
}
|
|
19460
19462
|
destruct() {
|
|
19461
|
-
this.
|
|
19462
|
-
this.
|
|
19463
|
+
this.__ajaxInstances.forEach(a => a.destruct());
|
|
19464
|
+
this.__ajaxInstances.clear();
|
|
19463
19465
|
}
|
|
19464
19466
|
};
|
|
19465
19467
|
DataProvider = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
@@ -19612,25 +19614,26 @@ async function loadTree(fb) {
|
|
|
19612
19614
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19613
19615
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
19614
19616
|
/* harmony export */ });
|
|
19615
|
-
/* harmony import */ var
|
|
19617
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
|
|
19616
19618
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
19617
19619
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
19618
19620
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
19619
|
-
/* harmony import */ var
|
|
19620
|
-
/* harmony import */ var
|
|
19621
|
-
/* harmony import */ var
|
|
19622
|
-
/* harmony import */ var
|
|
19623
|
-
/* harmony import */ var
|
|
19624
|
-
/* harmony import */ var
|
|
19625
|
-
/* harmony import */ var
|
|
19626
|
-
/* harmony import */ var
|
|
19627
|
-
/* harmony import */ var
|
|
19628
|
-
/* harmony import */ var
|
|
19629
|
-
/* harmony import */ var
|
|
19630
|
-
/* harmony import */ var
|
|
19631
|
-
/* harmony import */ var
|
|
19632
|
-
/* harmony import */ var
|
|
19633
|
-
/* harmony import */ var
|
|
19621
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66927);
|
|
19622
|
+
/* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
|
|
19623
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65147);
|
|
19624
|
+
/* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63915);
|
|
19625
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58597);
|
|
19626
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14961);
|
|
19627
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70265);
|
|
19628
|
+
/* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(9979);
|
|
19629
|
+
/* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31859);
|
|
19630
|
+
/* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62994);
|
|
19631
|
+
/* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18043);
|
|
19632
|
+
/* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80004);
|
|
19633
|
+
/* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75889);
|
|
19634
|
+
/* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(83797);
|
|
19635
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10274);
|
|
19636
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36115);
|
|
19634
19637
|
/*!
|
|
19635
19638
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19636
19639
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19657,13 +19660,14 @@ async function loadTree(fb) {
|
|
|
19657
19660
|
|
|
19658
19661
|
|
|
19659
19662
|
|
|
19660
|
-
|
|
19663
|
+
|
|
19664
|
+
let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
|
|
19661
19665
|
/** @override */
|
|
19662
19666
|
className() {
|
|
19663
19667
|
return 'FileBrowser';
|
|
19664
19668
|
}
|
|
19665
19669
|
get dataProvider() {
|
|
19666
|
-
return (0,
|
|
19670
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
19667
19671
|
}
|
|
19668
19672
|
// eslint-disable-next-line no-unused-vars
|
|
19669
19673
|
onSelect(callback) {
|
|
@@ -19684,7 +19688,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19684
19688
|
files,
|
|
19685
19689
|
isImages
|
|
19686
19690
|
};
|
|
19687
|
-
if ((0,
|
|
19691
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
19688
19692
|
callback(data);
|
|
19689
19693
|
}
|
|
19690
19694
|
this.close();
|
|
@@ -19707,7 +19711,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19707
19711
|
* Container for set/get value
|
|
19708
19712
|
*/
|
|
19709
19713
|
get storage() {
|
|
19710
|
-
return
|
|
19714
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
19711
19715
|
}
|
|
19712
19716
|
get isOpened() {
|
|
19713
19717
|
return this._dialog.isOpened && this.browser.style.display !== 'none';
|
|
@@ -19715,6 +19719,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19715
19719
|
/**
|
|
19716
19720
|
* It displays a message in the status bar of filebrowser
|
|
19717
19721
|
*
|
|
19722
|
+
* @param message - The message that will be displayed
|
|
19718
19723
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
19719
19724
|
* ßan error will be shown the red
|
|
19720
19725
|
* @example
|
|
@@ -19723,13 +19728,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19723
19728
|
* ```
|
|
19724
19729
|
*/
|
|
19725
19730
|
status(message, success) {
|
|
19726
|
-
if (!message || (0,
|
|
19731
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
19727
19732
|
return;
|
|
19728
19733
|
}
|
|
19729
|
-
if (!(0,
|
|
19734
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
19730
19735
|
message = message.message;
|
|
19731
19736
|
}
|
|
19732
|
-
if (!(0,
|
|
19737
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
|
|
19733
19738
|
return;
|
|
19734
19739
|
}
|
|
19735
19740
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -19757,7 +19762,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19757
19762
|
.promise((resolve, reject) => {
|
|
19758
19763
|
var _a;
|
|
19759
19764
|
if (!this.o.items || !this.o.items.url) {
|
|
19760
|
-
throw (0,
|
|
19765
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
19761
19766
|
}
|
|
19762
19767
|
let localTimeout = 0;
|
|
19763
19768
|
this.e
|
|
@@ -19774,10 +19779,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19774
19779
|
.off('select.filebrowser')
|
|
19775
19780
|
.on('select.filebrowser', this.onSelect(callback));
|
|
19776
19781
|
const header = this.c.div();
|
|
19777
|
-
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.
|
|
19782
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
19783
|
+
this.__updateToolbarButtons();
|
|
19778
19784
|
this._dialog.open(this.browser, header);
|
|
19779
19785
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
19780
|
-
(0,
|
|
19786
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
|
|
19781
19787
|
})
|
|
19782
19788
|
.catch((e) => {
|
|
19783
19789
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -19789,7 +19795,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19789
19795
|
var _a;
|
|
19790
19796
|
const options = ((_a = this.o.buttons) !== null && _a !== void 0 ? _a : []);
|
|
19791
19797
|
return options.filter((btn) => {
|
|
19792
|
-
if (!(0,
|
|
19798
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
19793
19799
|
return true;
|
|
19794
19800
|
}
|
|
19795
19801
|
switch (btn) {
|
|
@@ -19806,8 +19812,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19806
19812
|
}
|
|
19807
19813
|
initUploader(editor) {
|
|
19808
19814
|
var _a;
|
|
19809
|
-
const self = this, options = (_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.uploader, uploaderOptions = (0,
|
|
19810
|
-
const uploadHandler = () => (0,
|
|
19815
|
+
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);
|
|
19816
|
+
const uploadHandler = () => (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
19811
19817
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
19812
19818
|
self.uploader
|
|
19813
19819
|
.setPath(self.state.currentPath)
|
|
@@ -19826,11 +19832,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19826
19832
|
super(options);
|
|
19827
19833
|
this.browser = this.c.div(this.componentName);
|
|
19828
19834
|
this.status_line = this.c.div(this.getFullElName('status'));
|
|
19829
|
-
this.tree = new
|
|
19830
|
-
this.files = new
|
|
19831
|
-
this.state = (0,
|
|
19835
|
+
this.tree = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserTree */ .V(this);
|
|
19836
|
+
this.files = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserFiles */ .Q(this);
|
|
19837
|
+
this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .sH)({
|
|
19832
19838
|
currentPath: '',
|
|
19833
|
-
currentSource:
|
|
19839
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
19834
19840
|
currentBaseUrl: '',
|
|
19835
19841
|
activeElements: [],
|
|
19836
19842
|
elements: [],
|
|
@@ -19841,7 +19847,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19841
19847
|
onlyImages: false
|
|
19842
19848
|
});
|
|
19843
19849
|
this.errorHandler = (resp) => {
|
|
19844
|
-
if ((0,
|
|
19850
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
19845
19851
|
return;
|
|
19846
19852
|
}
|
|
19847
19853
|
if (resp instanceof Error) {
|
|
@@ -19857,9 +19863,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19857
19863
|
this.close = () => {
|
|
19858
19864
|
this._dialog.close();
|
|
19859
19865
|
};
|
|
19866
|
+
this.__prevButtons = [];
|
|
19860
19867
|
this.attachEvents(options);
|
|
19861
19868
|
const self = this;
|
|
19862
|
-
self.options = (0,
|
|
19869
|
+
self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
|
|
19863
19870
|
self.browser.component = this;
|
|
19864
19871
|
self.container = self.browser;
|
|
19865
19872
|
if (self.o.showFoldersPanel) {
|
|
@@ -19867,9 +19874,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19867
19874
|
}
|
|
19868
19875
|
self.browser.appendChild(self.files.container);
|
|
19869
19876
|
self.browser.appendChild(self.status_line);
|
|
19870
|
-
|
|
19871
|
-
|
|
19872
|
-
|
|
19877
|
+
_listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__/* .selfListeners */ .c.call(self);
|
|
19878
|
+
_listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__/* .nativeListeners */ .nW.call(self);
|
|
19879
|
+
_listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__/* .stateListeners */ .r.call(self);
|
|
19873
19880
|
const keys = [
|
|
19874
19881
|
'getLocalFileByUrl',
|
|
19875
19882
|
'crop',
|
|
@@ -19887,7 +19894,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19887
19894
|
];
|
|
19888
19895
|
keys.forEach(key => {
|
|
19889
19896
|
if (this.options[key] != null) {
|
|
19890
|
-
this.options[key] = (0,
|
|
19897
|
+
this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
|
|
19891
19898
|
}
|
|
19892
19899
|
});
|
|
19893
19900
|
const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
|
|
@@ -19931,26 +19938,49 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19931
19938
|
this.events && this.e.off('.filebrowser');
|
|
19932
19939
|
this.uploader && this.uploader.destruct();
|
|
19933
19940
|
}
|
|
19941
|
+
__updateToolbarButtons() {
|
|
19942
|
+
var _a;
|
|
19943
|
+
const buttons = this.__getButtons();
|
|
19944
|
+
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
19945
|
+
return;
|
|
19946
|
+
}
|
|
19947
|
+
this.__prevButtons = buttons;
|
|
19948
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
19949
|
+
}
|
|
19934
19950
|
};
|
|
19935
|
-
(0,
|
|
19951
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19936
19952
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19937
19953
|
], FileBrowser.prototype, "dataProvider", null);
|
|
19938
|
-
(0,
|
|
19954
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19939
19955
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19940
19956
|
], FileBrowser.prototype, "_dialog", null);
|
|
19941
|
-
(0,
|
|
19957
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19942
19958
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19943
19959
|
], FileBrowser.prototype, "storage", null);
|
|
19944
|
-
(0,
|
|
19960
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19945
19961
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19946
19962
|
], FileBrowser.prototype, "status", null);
|
|
19947
|
-
(0,
|
|
19963
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19948
19964
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19949
19965
|
], FileBrowser.prototype, "open", null);
|
|
19950
|
-
|
|
19951
|
-
(0,
|
|
19966
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19967
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__/* .watch */ .w)('dataProvider:changePermissions')
|
|
19968
|
+
], FileBrowser.prototype, "__updateToolbarButtons", null);
|
|
19969
|
+
FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19970
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__/* .Dlgs */ .z)
|
|
19952
19971
|
], FileBrowser);
|
|
19953
19972
|
|
|
19973
|
+
function isEqualButtonList(prevButtons, buttons) {
|
|
19974
|
+
if (prevButtons.length !== buttons.length) {
|
|
19975
|
+
return false;
|
|
19976
|
+
}
|
|
19977
|
+
for (let i = 0; i < prevButtons.length; i++) {
|
|
19978
|
+
if (prevButtons[i] !== buttons[i]) {
|
|
19979
|
+
return false;
|
|
19980
|
+
}
|
|
19981
|
+
}
|
|
19982
|
+
return true;
|
|
19983
|
+
}
|
|
19954
19984
|
|
|
19955
19985
|
|
|
19956
19986
|
/***/ }),
|
|
@@ -25220,10 +25250,10 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25220
25250
|
beforeDestruct(_) { }
|
|
25221
25251
|
}
|
|
25222
25252
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25223
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25253
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25224
25254
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25225
25255
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
25226
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25256
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':invokeAiAssistant')
|
|
25227
25257
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25228
25258
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25229
25259
|
|
|
@@ -25581,13 +25611,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
|
|
|
25581
25611
|
}
|
|
25582
25612
|
};
|
|
25583
25613
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25584
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25614
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
25585
25615
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
25586
25616
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25587
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25617
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
25588
25618
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
25589
25619
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25590
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25620
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
25591
25621
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
25592
25622
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25593
25623
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -29220,10 +29250,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
|
|
|
29220
29250
|
}
|
|
29221
29251
|
}
|
|
29222
29252
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29223
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29253
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
29224
29254
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
29225
29255
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29226
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29256
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
29227
29257
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
29228
29258
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
|
|
29229
29259
|
|