jodit 4.1.11 → 4.1.14
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 +27 -5
- package/es2015/jodit.css +2 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +145 -105
- package/es2015/jodit.min.css +1 -1
- 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 +2 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +144 -104
- package/es2018/jodit.min.css +1 -1
- 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 +2 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +143 -104
- package/es2021/jodit.min.css +1 -1
- 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 +2 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +143 -104
- package/es2021.en/jodit.min.css +1 -1
- 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 +3 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +156 -108
- package/es5/jodit.min.css +3 -3
- 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/data-provider.js +1 -0
- 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.d.ts +2 -0
- package/esm/plugins/ai-assistant/ai-assistant.js +40 -29
- 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/file-browser.d.ts +3 -0
- package/types/plugins/ai-assistant/ai-assistant.d.ts +2 -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.14
|
|
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.14";
|
|
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
|
|
@@ -19121,6 +19120,7 @@ let DataProvider = class DataProvider {
|
|
|
19121
19120
|
if (process) {
|
|
19122
19121
|
const respData = process.call(self, resp);
|
|
19123
19122
|
if (respData.data.permissions) {
|
|
19123
|
+
this.parent.events.fire(this, 'changePermissions', this.__currentPermissions, respData.data.permissions);
|
|
19124
19124
|
this.__currentPermissions = respData.data.permissions;
|
|
19125
19125
|
}
|
|
19126
19126
|
}
|
|
@@ -19559,25 +19559,26 @@ async function loadTree(fb) {
|
|
|
19559
19559
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
19560
19560
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
19561
19561
|
/* harmony export */ });
|
|
19562
|
-
/* harmony import */ var
|
|
19562
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(31635);
|
|
19563
19563
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
19564
19564
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
19565
19565
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
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
|
|
19579
|
-
/* harmony import */ var
|
|
19580
|
-
/* 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);
|
|
19581
19582
|
/*!
|
|
19582
19583
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19583
19584
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19604,13 +19605,14 @@ async function loadTree(fb) {
|
|
|
19604
19605
|
|
|
19605
19606
|
|
|
19606
19607
|
|
|
19607
|
-
|
|
19608
|
+
|
|
19609
|
+
let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T {
|
|
19608
19610
|
/** @override */
|
|
19609
19611
|
className() {
|
|
19610
19612
|
return 'FileBrowser';
|
|
19611
19613
|
}
|
|
19612
19614
|
get dataProvider() {
|
|
19613
|
-
return (0,
|
|
19615
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
19614
19616
|
}
|
|
19615
19617
|
// eslint-disable-next-line no-unused-vars
|
|
19616
19618
|
onSelect(callback) {
|
|
@@ -19631,7 +19633,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19631
19633
|
files,
|
|
19632
19634
|
isImages
|
|
19633
19635
|
};
|
|
19634
|
-
if ((0,
|
|
19636
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
19635
19637
|
callback(data);
|
|
19636
19638
|
}
|
|
19637
19639
|
this.close();
|
|
@@ -19653,7 +19655,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19653
19655
|
* Container for set/get value
|
|
19654
19656
|
*/
|
|
19655
19657
|
get storage() {
|
|
19656
|
-
return
|
|
19658
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
19657
19659
|
}
|
|
19658
19660
|
get isOpened() {
|
|
19659
19661
|
return this._dialog.isOpened && this.browser.style.display !== 'none';
|
|
@@ -19661,6 +19663,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19661
19663
|
/**
|
|
19662
19664
|
* It displays a message in the status bar of filebrowser
|
|
19663
19665
|
*
|
|
19666
|
+
* @param message - The message that will be displayed
|
|
19664
19667
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
19665
19668
|
* ßan error will be shown the red
|
|
19666
19669
|
* @example
|
|
@@ -19669,13 +19672,13 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19669
19672
|
* ```
|
|
19670
19673
|
*/
|
|
19671
19674
|
status(message, success) {
|
|
19672
|
-
if (!message || (0,
|
|
19675
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
19673
19676
|
return;
|
|
19674
19677
|
}
|
|
19675
|
-
if (!(0,
|
|
19678
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
19676
19679
|
message = message.message;
|
|
19677
19680
|
}
|
|
19678
|
-
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) {
|
|
19679
19682
|
return;
|
|
19680
19683
|
}
|
|
19681
19684
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -19702,7 +19705,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19702
19705
|
return this.async
|
|
19703
19706
|
.promise((resolve, reject) => {
|
|
19704
19707
|
if (!this.o.items || !this.o.items.url) {
|
|
19705
|
-
throw (0,
|
|
19708
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
19706
19709
|
}
|
|
19707
19710
|
let localTimeout = 0;
|
|
19708
19711
|
this.e
|
|
@@ -19719,10 +19722,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19719
19722
|
.off('select.filebrowser')
|
|
19720
19723
|
.on('select.filebrowser', this.onSelect(callback));
|
|
19721
19724
|
const header = this.c.div();
|
|
19722
|
-
this.toolbar?.
|
|
19725
|
+
this.toolbar?.appendTo(header);
|
|
19726
|
+
this.__updateToolbarButtons();
|
|
19723
19727
|
this._dialog.open(this.browser, header);
|
|
19724
19728
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
19725
|
-
(0,
|
|
19729
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(this).then(resolve, reject);
|
|
19726
19730
|
})
|
|
19727
19731
|
.catch((e) => {
|
|
19728
19732
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -19733,7 +19737,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19733
19737
|
__getButtons() {
|
|
19734
19738
|
const options = (this.o.buttons ?? []);
|
|
19735
19739
|
return options.filter((btn) => {
|
|
19736
|
-
if (!(0,
|
|
19740
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
19737
19741
|
return true;
|
|
19738
19742
|
}
|
|
19739
19743
|
switch (btn) {
|
|
@@ -19749,8 +19753,8 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19749
19753
|
});
|
|
19750
19754
|
}
|
|
19751
19755
|
initUploader(editor) {
|
|
19752
|
-
const self = this, options = editor?.options?.uploader, uploaderOptions = (0,
|
|
19753
|
-
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);
|
|
19754
19758
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
19755
19759
|
self.uploader
|
|
19756
19760
|
.setPath(self.state.currentPath)
|
|
@@ -19769,11 +19773,11 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19769
19773
|
super(options);
|
|
19770
19774
|
this.browser = this.c.div(this.componentName);
|
|
19771
19775
|
this.status_line = this.c.div(this.getFullElName('status'));
|
|
19772
|
-
this.tree = new
|
|
19773
|
-
this.files = new
|
|
19774
|
-
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)({
|
|
19775
19779
|
currentPath: '',
|
|
19776
|
-
currentSource:
|
|
19780
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
19777
19781
|
currentBaseUrl: '',
|
|
19778
19782
|
activeElements: [],
|
|
19779
19783
|
elements: [],
|
|
@@ -19784,7 +19788,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19784
19788
|
onlyImages: false
|
|
19785
19789
|
});
|
|
19786
19790
|
this.errorHandler = (resp) => {
|
|
19787
|
-
if ((0,
|
|
19791
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
19788
19792
|
return;
|
|
19789
19793
|
}
|
|
19790
19794
|
if (resp instanceof Error) {
|
|
@@ -19800,9 +19804,10 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19800
19804
|
this.close = () => {
|
|
19801
19805
|
this._dialog.close();
|
|
19802
19806
|
};
|
|
19807
|
+
this.__prevButtons = [];
|
|
19803
19808
|
this.attachEvents(options);
|
|
19804
19809
|
const self = this;
|
|
19805
|
-
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);
|
|
19806
19811
|
self.browser.component = this;
|
|
19807
19812
|
self.container = self.browser;
|
|
19808
19813
|
if (self.o.showFoldersPanel) {
|
|
@@ -19810,9 +19815,9 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19810
19815
|
}
|
|
19811
19816
|
self.browser.appendChild(self.files.container);
|
|
19812
19817
|
self.browser.appendChild(self.status_line);
|
|
19813
|
-
|
|
19814
|
-
|
|
19815
|
-
|
|
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);
|
|
19816
19821
|
const keys = [
|
|
19817
19822
|
'getLocalFileByUrl',
|
|
19818
19823
|
'crop',
|
|
@@ -19830,7 +19835,7 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19830
19835
|
];
|
|
19831
19836
|
keys.forEach(key => {
|
|
19832
19837
|
if (this.options[key] != null) {
|
|
19833
|
-
this.options[key] = (0,
|
|
19838
|
+
this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(this.options[key], this.o.ajax);
|
|
19834
19839
|
}
|
|
19835
19840
|
});
|
|
19836
19841
|
const { storeView, storeSortBy, storeLastOpenedFolder } = this.o
|
|
@@ -19874,26 +19879,48 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19874
19879
|
this.events && this.e.off('.filebrowser');
|
|
19875
19880
|
this.uploader && this.uploader.destruct();
|
|
19876
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
|
+
}
|
|
19877
19890
|
};
|
|
19878
|
-
(0,
|
|
19891
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19879
19892
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19880
19893
|
], FileBrowser.prototype, "dataProvider", null);
|
|
19881
|
-
(0,
|
|
19894
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19882
19895
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19883
19896
|
], FileBrowser.prototype, "_dialog", null);
|
|
19884
|
-
(0,
|
|
19897
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19885
19898
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
19886
19899
|
], FileBrowser.prototype, "storage", null);
|
|
19887
|
-
(0,
|
|
19900
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19888
19901
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19889
19902
|
], FileBrowser.prototype, "status", null);
|
|
19890
|
-
(0,
|
|
19903
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_19__/* .__decorate */ .Cg)([
|
|
19891
19904
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
19892
19905
|
], FileBrowser.prototype, "open", null);
|
|
19893
|
-
|
|
19894
|
-
(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)
|
|
19895
19911
|
], FileBrowser);
|
|
19896
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
|
+
}
|
|
19897
19924
|
|
|
19898
19925
|
|
|
19899
19926
|
/***/ }),
|
|
@@ -25044,14 +25071,15 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
25044
25071
|
|
|
25045
25072
|
"use strict";
|
|
25046
25073
|
/* unused harmony export aiAssistant */
|
|
25047
|
-
/* harmony import */ var
|
|
25048
|
-
/* harmony import */ var
|
|
25049
|
-
/* harmony import */ var
|
|
25050
|
-
/* harmony import */ var
|
|
25051
|
-
/* harmony import */ var
|
|
25052
|
-
/* harmony import */ var
|
|
25053
|
-
/* harmony import */ var
|
|
25054
|
-
/* harmony import */ var
|
|
25074
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
25075
|
+
/* harmony import */ var jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87875);
|
|
25076
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
25077
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
25078
|
+
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(99951);
|
|
25079
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29866);
|
|
25080
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66888);
|
|
25081
|
+
/* harmony import */ var _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20785);
|
|
25082
|
+
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81026);
|
|
25055
25083
|
/*!
|
|
25056
25084
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
25057
25085
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -25065,10 +25093,37 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
25065
25093
|
|
|
25066
25094
|
|
|
25067
25095
|
|
|
25096
|
+
|
|
25068
25097
|
/**
|
|
25069
25098
|
* The plugin inserts content generated by AI into the editor.
|
|
25070
25099
|
*/
|
|
25071
|
-
class aiAssistant extends
|
|
25100
|
+
class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */ .k {
|
|
25101
|
+
get __dialog() {
|
|
25102
|
+
return this.jodit.dlg({
|
|
25103
|
+
buttons: ['fullsize', 'dialog.close'],
|
|
25104
|
+
closeOnClickOverlay: true,
|
|
25105
|
+
closeOnEsc: true,
|
|
25106
|
+
resizable: false,
|
|
25107
|
+
draggable: true,
|
|
25108
|
+
minHeight: 160
|
|
25109
|
+
});
|
|
25110
|
+
}
|
|
25111
|
+
get __container() {
|
|
25112
|
+
const { jodit, __dialog } = this;
|
|
25113
|
+
return new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__/* .UiAiAssistant */ .b(jodit, {
|
|
25114
|
+
onInsertAfter(html) {
|
|
25115
|
+
jodit.s.focus();
|
|
25116
|
+
jodit.s.setCursorAfter(jodit.s.current());
|
|
25117
|
+
jodit.s.insertHTML(html);
|
|
25118
|
+
__dialog.close();
|
|
25119
|
+
},
|
|
25120
|
+
onInsert(html) {
|
|
25121
|
+
jodit.s.focus();
|
|
25122
|
+
jodit.s.insertHTML(html);
|
|
25123
|
+
__dialog.close();
|
|
25124
|
+
}
|
|
25125
|
+
});
|
|
25126
|
+
}
|
|
25072
25127
|
constructor(jodit) {
|
|
25073
25128
|
super(jodit);
|
|
25074
25129
|
/** @override */
|
|
@@ -25082,38 +25137,13 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25082
25137
|
group: 'insert'
|
|
25083
25138
|
}
|
|
25084
25139
|
];
|
|
25085
|
-
(0,
|
|
25140
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
25086
25141
|
}
|
|
25087
25142
|
/** @override */
|
|
25088
25143
|
afterInit(jodit) { }
|
|
25089
25144
|
onGenerateAiAssistantForm(prompt) {
|
|
25090
|
-
|
|
25091
|
-
|
|
25092
|
-
buttons: ['fullsize', 'dialog.close'],
|
|
25093
|
-
closeOnClickOverlay: true,
|
|
25094
|
-
closeOnEsc: true,
|
|
25095
|
-
resizable: false,
|
|
25096
|
-
draggable: true
|
|
25097
|
-
// minWidth: 460,
|
|
25098
|
-
// maxWidth: 460
|
|
25099
|
-
});
|
|
25100
|
-
dialog.bindDestruct(jodit);
|
|
25101
|
-
const container = new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_4__/* .UiAiAssistant */ .b(jodit, {
|
|
25102
|
-
onInsertAfter(html) {
|
|
25103
|
-
jodit.s.focus();
|
|
25104
|
-
jodit.s.setCursorAfter(jodit.s.current());
|
|
25105
|
-
jodit.s.insertHTML(html);
|
|
25106
|
-
dialog.close();
|
|
25107
|
-
},
|
|
25108
|
-
onInsert(html) {
|
|
25109
|
-
jodit.s.focus();
|
|
25110
|
-
jodit.s.insertHTML(html);
|
|
25111
|
-
dialog.close();
|
|
25112
|
-
}
|
|
25113
|
-
});
|
|
25114
|
-
container.bindDestruct(dialog);
|
|
25115
|
-
dialog.open(container, 'AI Assistant', true, false);
|
|
25116
|
-
container.setPrompt(prompt);
|
|
25145
|
+
this.__dialog.open(this.__container, 'AI Assistant');
|
|
25146
|
+
this.__container.setPrompt(prompt);
|
|
25117
25147
|
}
|
|
25118
25148
|
onInvokeAiAssistant(prompt) {
|
|
25119
25149
|
const { jodit } = this;
|
|
@@ -25134,7 +25164,7 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25134
25164
|
jodit.e.fire('ai-assistant-response', htmlFragment);
|
|
25135
25165
|
})
|
|
25136
25166
|
.catch(error => {
|
|
25137
|
-
if ((0,
|
|
25167
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_7__/* .isAbortError */ .z)(error)) {
|
|
25138
25168
|
return;
|
|
25139
25169
|
}
|
|
25140
25170
|
jodit.message.error(error.message);
|
|
@@ -25142,15 +25172,24 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25142
25172
|
});
|
|
25143
25173
|
}
|
|
25144
25174
|
/** @override */
|
|
25145
|
-
beforeDestruct(_) {
|
|
25175
|
+
beforeDestruct(_) {
|
|
25176
|
+
this.__container.destruct();
|
|
25177
|
+
this.__dialog.destruct();
|
|
25178
|
+
}
|
|
25146
25179
|
}
|
|
25147
|
-
(0,
|
|
25148
|
-
|
|
25180
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25181
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
25182
|
+
], aiAssistant.prototype, "__dialog", null);
|
|
25183
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25184
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
25185
|
+
], aiAssistant.prototype, "__container", null);
|
|
25186
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25187
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25149
25188
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25150
|
-
(0,
|
|
25151
|
-
(0,
|
|
25189
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25190
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':invokeAiAssistant')
|
|
25152
25191
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25153
|
-
|
|
25192
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25154
25193
|
|
|
25155
25194
|
|
|
25156
25195
|
/***/ }),
|
|
@@ -25506,13 +25545,13 @@ let UiAiAssistant = class UiAiAssistant extends jodit_core_ui_element__WEBPACK_I
|
|
|
25506
25545
|
}
|
|
25507
25546
|
};
|
|
25508
25547
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25509
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25548
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
25510
25549
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
25511
25550
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25512
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25551
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
25513
25552
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
25514
25553
|
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25515
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
25554
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
25516
25555
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
25517
25556
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .Cg)([
|
|
25518
25557
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -29137,10 +29176,10 @@ class dtd extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k
|
|
|
29137
29176
|
}
|
|
29138
29177
|
}
|
|
29139
29178
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29140
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29179
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
29141
29180
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
29142
29181
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
29143
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
29182
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
29144
29183
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
29145
29184
|
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', dtd);
|
|
29146
29185
|
|