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/es5/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
|
*/
|
|
@@ -3098,7 +3098,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3098
3098
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
3099
3099
|
*/
|
|
3100
3100
|
|
|
3101
|
-
var APP_VERSION = "4.1.
|
|
3101
|
+
var APP_VERSION = "4.1.14";
|
|
3102
3102
|
// prettier-ignore
|
|
3103
3103
|
var ES = "es5";
|
|
3104
3104
|
var IS_ES_MODERN = false;
|
|
@@ -3836,14 +3836,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
3836
3836
|
/* harmony export */ component: function() { return /* reexport safe */ _component_component__WEBPACK_IMPORTED_MODULE_2__.s; },
|
|
3837
3837
|
/* harmony export */ debounce: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.s; },
|
|
3838
3838
|
/* harmony export */ derive: function() { return /* reexport safe */ _derive_derive__WEBPACK_IMPORTED_MODULE_4__.C; },
|
|
3839
|
-
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.
|
|
3839
|
+
/* harmony export */ getPropertyDescriptor: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.N; },
|
|
3840
3840
|
/* harmony export */ hook: function() { return /* reexport safe */ _hook_hook__WEBPACK_IMPORTED_MODULE_5__.A; },
|
|
3841
3841
|
/* harmony export */ idle: function() { return /* reexport safe */ _idle_idle__WEBPACK_IMPORTED_MODULE_6__.N; },
|
|
3842
3842
|
/* harmony export */ nonenumerable: function() { return /* reexport safe */ _nonenumerable_nonenumerable__WEBPACK_IMPORTED_MODULE_7__.m; },
|
|
3843
3843
|
/* harmony export */ persistent: function() { return /* reexport safe */ _persistent_persistent__WEBPACK_IMPORTED_MODULE_8__.y; },
|
|
3844
3844
|
/* harmony export */ throttle: function() { return /* reexport safe */ _debounce_debounce__WEBPACK_IMPORTED_MODULE_3__.n; },
|
|
3845
3845
|
/* harmony export */ wait: function() { return /* reexport safe */ _wait_wait__WEBPACK_IMPORTED_MODULE_9__.u; },
|
|
3846
|
-
/* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.
|
|
3846
|
+
/* harmony export */ watch: function() { return /* reexport safe */ _watch_watch__WEBPACK_IMPORTED_MODULE_10__.w; }
|
|
3847
3847
|
/* harmony export */ });
|
|
3848
3848
|
/* harmony import */ var _autobind_autobind__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11961);
|
|
3849
3849
|
/* harmony import */ var _cache_cache__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(87875);
|
|
@@ -4011,8 +4011,8 @@ function wait(condition) {
|
|
|
4011
4011
|
|
|
4012
4012
|
"use strict";
|
|
4013
4013
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4014
|
-
/* harmony export */
|
|
4015
|
-
/* harmony export */
|
|
4014
|
+
/* harmony export */ N: function() { return /* binding */ getPropertyDescriptor; },
|
|
4015
|
+
/* harmony export */ w: function() { return /* binding */ watch; }
|
|
4016
4016
|
/* harmony export */ });
|
|
4017
4017
|
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(31635);
|
|
4018
4018
|
/* harmony import */ var jodit_core_component_statuses__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64567);
|
|
@@ -4135,7 +4135,6 @@ function watch(observeFields, opts) {
|
|
|
4135
4135
|
}
|
|
4136
4136
|
};
|
|
4137
4137
|
}
|
|
4138
|
-
/* harmony default export */ __webpack_exports__.Ay = (watch);
|
|
4139
4138
|
|
|
4140
4139
|
|
|
4141
4140
|
/***/ }),
|
|
@@ -5824,7 +5823,7 @@ function observable(obj) {
|
|
|
5824
5823
|
var key = _key;
|
|
5825
5824
|
var prefix = prefixes.concat(key).filter(function (a) { return a.length; });
|
|
5826
5825
|
store[key] = dict[key];
|
|
5827
|
-
var descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .
|
|
5826
|
+
var descriptor = (0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .getPropertyDescriptor */ .N)(dict, key);
|
|
5828
5827
|
Object.defineProperty(dict, key, {
|
|
5829
5828
|
set: function (value) {
|
|
5830
5829
|
var oldValue = store[key];
|
|
@@ -17784,7 +17783,7 @@ var ViewWithToolbar = /** @class */ (function (_super) {
|
|
|
17784
17783
|
_super.prototype.destruct.call(this);
|
|
17785
17784
|
};
|
|
17786
17785
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
17787
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .
|
|
17786
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':rebuildToolbar')
|
|
17788
17787
|
], ViewWithToolbar.prototype, "buildToolbar", null);
|
|
17789
17788
|
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
17790
17789
|
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_10__/* ["default"] */ .Ay
|
|
@@ -21407,6 +21406,7 @@ var DataProvider = /** @class */ (function () {
|
|
|
21407
21406
|
if (process) {
|
|
21408
21407
|
var respData = process.call(self, resp);
|
|
21409
21408
|
if (respData.data.permissions) {
|
|
21409
|
+
_this.parent.events.fire(_this, 'changePermissions', _this.__currentPermissions, respData.data.permissions);
|
|
21410
21410
|
_this.__currentPermissions = respData.data.permissions;
|
|
21411
21411
|
}
|
|
21412
21412
|
}
|
|
@@ -21882,25 +21882,26 @@ function loadTree(fb) {
|
|
|
21882
21882
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21883
21883
|
/* harmony export */ V: function() { return /* binding */ FileBrowser; }
|
|
21884
21884
|
/* harmony export */ });
|
|
21885
|
-
/* harmony import */ var
|
|
21885
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(31635);
|
|
21886
21886
|
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77753);
|
|
21887
21887
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
21888
21888
|
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22664);
|
|
21889
|
-
/* harmony import */ var
|
|
21890
|
-
/* harmony import */ var
|
|
21891
|
-
/* harmony import */ var
|
|
21892
|
-
/* harmony import */ var
|
|
21893
|
-
/* harmony import */ var
|
|
21894
|
-
/* harmony import */ var
|
|
21895
|
-
/* harmony import */ var
|
|
21896
|
-
/* harmony import */ var
|
|
21897
|
-
/* harmony import */ var
|
|
21898
|
-
/* harmony import */ var
|
|
21899
|
-
/* harmony import */ var
|
|
21900
|
-
/* harmony import */ var
|
|
21901
|
-
/* harmony import */ var
|
|
21902
|
-
/* harmony import */ var
|
|
21903
|
-
/* harmony import */ var
|
|
21889
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(66927);
|
|
21890
|
+
/* harmony import */ var jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50025);
|
|
21891
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(65147);
|
|
21892
|
+
/* harmony import */ var jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(63915);
|
|
21893
|
+
/* harmony import */ var jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(58597);
|
|
21894
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(14961);
|
|
21895
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70265);
|
|
21896
|
+
/* harmony import */ var _fetch_load_items__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(9979);
|
|
21897
|
+
/* harmony import */ var _fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(31859);
|
|
21898
|
+
/* harmony import */ var _listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(62994);
|
|
21899
|
+
/* harmony import */ var _listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(18043);
|
|
21900
|
+
/* harmony import */ var _listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(80004);
|
|
21901
|
+
/* harmony import */ var _data_provider__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(75889);
|
|
21902
|
+
/* harmony import */ var _factories__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(83797);
|
|
21903
|
+
/* harmony import */ var _ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(10274);
|
|
21904
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(36115);
|
|
21904
21905
|
/*!
|
|
21905
21906
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
21906
21907
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -21925,19 +21926,20 @@ function loadTree(fb) {
|
|
|
21925
21926
|
|
|
21926
21927
|
|
|
21927
21928
|
|
|
21929
|
+
|
|
21928
21930
|
|
|
21929
21931
|
|
|
21930
21932
|
var FileBrowser = /** @class */ (function (_super) {
|
|
21931
|
-
(0,
|
|
21933
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__extends */ .C6)(FileBrowser, _super);
|
|
21932
21934
|
function FileBrowser(options) {
|
|
21933
21935
|
var _this = _super.call(this, options) || this;
|
|
21934
21936
|
_this.browser = _this.c.div(_this.componentName);
|
|
21935
21937
|
_this.status_line = _this.c.div(_this.getFullElName('status'));
|
|
21936
|
-
_this.tree = new
|
|
21937
|
-
_this.files = new
|
|
21938
|
-
_this.state = (0,
|
|
21938
|
+
_this.tree = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserTree */ .V(_this);
|
|
21939
|
+
_this.files = new _ui__WEBPACK_IMPORTED_MODULE_16__/* .FileBrowserFiles */ .Q(_this);
|
|
21940
|
+
_this.state = (0,jodit_core_event_emitter__WEBPACK_IMPORTED_MODULE_4__/* .observable */ .sH)({
|
|
21939
21941
|
currentPath: '',
|
|
21940
|
-
currentSource:
|
|
21942
|
+
currentSource: _data_provider__WEBPACK_IMPORTED_MODULE_14__/* .DEFAULT_SOURCE_NAME */ .o,
|
|
21941
21943
|
currentBaseUrl: '',
|
|
21942
21944
|
activeElements: [],
|
|
21943
21945
|
elements: [],
|
|
@@ -21948,7 +21950,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
21948
21950
|
onlyImages: false
|
|
21949
21951
|
});
|
|
21950
21952
|
_this.errorHandler = function (resp) {
|
|
21951
|
-
if ((0,
|
|
21953
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(resp)) {
|
|
21952
21954
|
return;
|
|
21953
21955
|
}
|
|
21954
21956
|
if (resp instanceof Error) {
|
|
@@ -21964,9 +21966,10 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
21964
21966
|
_this.close = function () {
|
|
21965
21967
|
_this._dialog.close();
|
|
21966
21968
|
};
|
|
21969
|
+
_this.__prevButtons = [];
|
|
21967
21970
|
_this.attachEvents(options);
|
|
21968
21971
|
var self = _this;
|
|
21969
|
-
self.options = (0,
|
|
21972
|
+
self.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, jodit_config__WEBPACK_IMPORTED_MODULE_17__/* .Config */ .T.defaultOptions.filebrowser);
|
|
21970
21973
|
self.browser.component = _this;
|
|
21971
21974
|
self.container = self.browser;
|
|
21972
21975
|
if (self.o.showFoldersPanel) {
|
|
@@ -21974,9 +21977,9 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
21974
21977
|
}
|
|
21975
21978
|
self.browser.appendChild(self.files.container);
|
|
21976
21979
|
self.browser.appendChild(self.status_line);
|
|
21977
|
-
|
|
21978
|
-
|
|
21979
|
-
|
|
21980
|
+
_listeners_self_listeners__WEBPACK_IMPORTED_MODULE_12__/* .selfListeners */ .c.call(self);
|
|
21981
|
+
_listeners_native_listeners__WEBPACK_IMPORTED_MODULE_11__/* .nativeListeners */ .nW.call(self);
|
|
21982
|
+
_listeners_state_listeners__WEBPACK_IMPORTED_MODULE_13__/* .stateListeners */ .r.call(self);
|
|
21980
21983
|
var keys = [
|
|
21981
21984
|
'getLocalFileByUrl',
|
|
21982
21985
|
'crop',
|
|
@@ -21994,7 +21997,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
21994
21997
|
];
|
|
21995
21998
|
keys.forEach(function (key) {
|
|
21996
21999
|
if (_this.options[key] != null) {
|
|
21997
|
-
_this.options[key] = (0,
|
|
22000
|
+
_this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(_this.options[key], _this.o.ajax);
|
|
21998
22001
|
}
|
|
21999
22002
|
});
|
|
22000
22003
|
var _a = _this.o
|
|
@@ -22036,7 +22039,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22036
22039
|
};
|
|
22037
22040
|
Object.defineProperty(FileBrowser.prototype, "dataProvider", {
|
|
22038
22041
|
get: function () {
|
|
22039
|
-
return (0,
|
|
22042
|
+
return (0,_factories__WEBPACK_IMPORTED_MODULE_15__/* .makeDataProvider */ .S)(this, this.options);
|
|
22040
22043
|
},
|
|
22041
22044
|
enumerable: false,
|
|
22042
22045
|
configurable: true
|
|
@@ -22061,7 +22064,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22061
22064
|
files: files_1,
|
|
22062
22065
|
isImages: isImages_1
|
|
22063
22066
|
};
|
|
22064
|
-
if ((0,
|
|
22067
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isFunction)(callback)) {
|
|
22065
22068
|
callback(data);
|
|
22066
22069
|
}
|
|
22067
22070
|
_this.close();
|
|
@@ -22092,7 +22095,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22092
22095
|
* Container for set/get value
|
|
22093
22096
|
*/
|
|
22094
22097
|
get: function () {
|
|
22095
|
-
return
|
|
22098
|
+
return jodit_core_storage__WEBPACK_IMPORTED_MODULE_6__/* .Storage */ .wc.makeStorage(Boolean(this.o.saveStateInStorage), this.componentName);
|
|
22096
22099
|
},
|
|
22097
22100
|
enumerable: false,
|
|
22098
22101
|
configurable: true
|
|
@@ -22107,6 +22110,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22107
22110
|
/**
|
|
22108
22111
|
* It displays a message in the status bar of filebrowser
|
|
22109
22112
|
*
|
|
22113
|
+
* @param message - The message that will be displayed
|
|
22110
22114
|
* @param success - true It will be shown a message light . If no option is specified ,
|
|
22111
22115
|
* ßan error will be shown the red
|
|
22112
22116
|
* @example
|
|
@@ -22115,13 +22119,13 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22115
22119
|
* ```
|
|
22116
22120
|
*/
|
|
22117
22121
|
FileBrowser.prototype.status = function (message, success) {
|
|
22118
|
-
if (!message || (0,
|
|
22122
|
+
if (!message || (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(message)) {
|
|
22119
22123
|
return;
|
|
22120
22124
|
}
|
|
22121
|
-
if (!(0,
|
|
22125
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message)) {
|
|
22122
22126
|
message = message.message;
|
|
22123
22127
|
}
|
|
22124
|
-
if (!(0,
|
|
22128
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(message) || !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.trim)(message).length) {
|
|
22125
22129
|
return;
|
|
22126
22130
|
}
|
|
22127
22131
|
this.message.message(message, success ? 'success' : 'error', this.o.howLongShowMsg);
|
|
@@ -22152,7 +22156,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22152
22156
|
.promise(function (resolve, reject) {
|
|
22153
22157
|
var _a;
|
|
22154
22158
|
if (!_this.o.items || !_this.o.items.url) {
|
|
22155
|
-
throw (0,
|
|
22159
|
+
throw (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
22156
22160
|
}
|
|
22157
22161
|
var localTimeout = 0;
|
|
22158
22162
|
_this.e
|
|
@@ -22169,10 +22173,11 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22169
22173
|
.off('select.filebrowser')
|
|
22170
22174
|
.on('select.filebrowser', _this.onSelect(callback));
|
|
22171
22175
|
var header = _this.c.div();
|
|
22172
|
-
(_a = _this.toolbar) === null || _a === void 0 ? void 0 : _a.
|
|
22176
|
+
(_a = _this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
22177
|
+
_this.__updateToolbarButtons();
|
|
22173
22178
|
_this._dialog.open(_this.browser, header);
|
|
22174
22179
|
_this.e.fire('sort.filebrowser', _this.state.sortBy);
|
|
22175
|
-
(0,
|
|
22180
|
+
(0,_fetch_load_tree__WEBPACK_IMPORTED_MODULE_10__/* .loadTree */ .r)(_this).then(resolve, reject);
|
|
22176
22181
|
})
|
|
22177
22182
|
.catch(function (e) {
|
|
22178
22183
|
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -22185,7 +22190,7 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22185
22190
|
var _a;
|
|
22186
22191
|
var options = ((_a = this.o.buttons) !== null && _a !== void 0 ? _a : []);
|
|
22187
22192
|
return options.filter(function (btn) {
|
|
22188
|
-
if (!(0,
|
|
22193
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
22189
22194
|
return true;
|
|
22190
22195
|
}
|
|
22191
22196
|
switch (btn) {
|
|
@@ -22203,8 +22208,8 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22203
22208
|
FileBrowser.prototype.initUploader = function (editor) {
|
|
22204
22209
|
var _this = this;
|
|
22205
22210
|
var _a;
|
|
22206
|
-
var self = this, options = (_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.uploader, uploaderOptions = (0,
|
|
22207
|
-
var uploadHandler = function () { return (0,
|
|
22211
|
+
var 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);
|
|
22212
|
+
var uploadHandler = function () { return (0,_fetch_load_items__WEBPACK_IMPORTED_MODULE_19__/* .loadItems */ .f)(_this); };
|
|
22208
22213
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
22209
22214
|
self.uploader
|
|
22210
22215
|
.setPath(self.state.currentPath)
|
|
@@ -22228,27 +22233,50 @@ var FileBrowser = /** @class */ (function (_super) {
|
|
|
22228
22233
|
this.events && this.e.off('.filebrowser');
|
|
22229
22234
|
this.uploader && this.uploader.destruct();
|
|
22230
22235
|
};
|
|
22231
|
-
|
|
22236
|
+
FileBrowser.prototype.__updateToolbarButtons = function () {
|
|
22237
|
+
var _a;
|
|
22238
|
+
var buttons = this.__getButtons();
|
|
22239
|
+
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
22240
|
+
return;
|
|
22241
|
+
}
|
|
22242
|
+
this.__prevButtons = buttons;
|
|
22243
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
22244
|
+
};
|
|
22245
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22232
22246
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
22233
22247
|
], FileBrowser.prototype, "dataProvider", null);
|
|
22234
|
-
(0,
|
|
22248
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22235
22249
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
22236
22250
|
], FileBrowser.prototype, "_dialog", null);
|
|
22237
|
-
(0,
|
|
22251
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22238
22252
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.cache
|
|
22239
22253
|
], FileBrowser.prototype, "storage", null);
|
|
22240
|
-
(0,
|
|
22254
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22241
22255
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
22242
22256
|
], FileBrowser.prototype, "status", null);
|
|
22243
|
-
(0,
|
|
22257
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22244
22258
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.autobind
|
|
22245
22259
|
], FileBrowser.prototype, "open", null);
|
|
22246
|
-
|
|
22247
|
-
(0,
|
|
22260
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22261
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_3__/* .watch */ .w)('dataProvider:changePermissions')
|
|
22262
|
+
], FileBrowser.prototype, "__updateToolbarButtons", null);
|
|
22263
|
+
FileBrowser = (0,tslib__WEBPACK_IMPORTED_MODULE_18__/* .__decorate */ .Cg)([
|
|
22264
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.derive)(jodit_core_traits_dlgs__WEBPACK_IMPORTED_MODULE_7__/* .Dlgs */ .z)
|
|
22248
22265
|
], FileBrowser);
|
|
22249
22266
|
return FileBrowser;
|
|
22250
|
-
}(
|
|
22267
|
+
}(jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_8__/* .ViewWithToolbar */ .T));
|
|
22251
22268
|
|
|
22269
|
+
function isEqualButtonList(prevButtons, buttons) {
|
|
22270
|
+
if (prevButtons.length !== buttons.length) {
|
|
22271
|
+
return false;
|
|
22272
|
+
}
|
|
22273
|
+
for (var i = 0; i < prevButtons.length; i++) {
|
|
22274
|
+
if (prevButtons[i] !== buttons[i]) {
|
|
22275
|
+
return false;
|
|
22276
|
+
}
|
|
22277
|
+
}
|
|
22278
|
+
return true;
|
|
22279
|
+
}
|
|
22252
22280
|
|
|
22253
22281
|
|
|
22254
22282
|
/***/ }),
|
|
@@ -27513,14 +27541,15 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
27513
27541
|
|
|
27514
27542
|
"use strict";
|
|
27515
27543
|
/* unused harmony export aiAssistant */
|
|
27516
|
-
/* harmony import */ var
|
|
27517
|
-
/* harmony import */ var
|
|
27518
|
-
/* harmony import */ var
|
|
27519
|
-
/* harmony import */ var
|
|
27520
|
-
/* harmony import */ var
|
|
27521
|
-
/* harmony import */ var
|
|
27522
|
-
/* harmony import */ var
|
|
27523
|
-
/* harmony import */ var
|
|
27544
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
27545
|
+
/* harmony import */ var jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87875);
|
|
27546
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
27547
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
27548
|
+
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(99951);
|
|
27549
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29866);
|
|
27550
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66888);
|
|
27551
|
+
/* harmony import */ var _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20785);
|
|
27552
|
+
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81026);
|
|
27524
27553
|
/*!
|
|
27525
27554
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27526
27555
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -27534,11 +27563,12 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
27534
27563
|
|
|
27535
27564
|
|
|
27536
27565
|
|
|
27566
|
+
|
|
27537
27567
|
/**
|
|
27538
27568
|
* The plugin inserts content generated by AI into the editor.
|
|
27539
27569
|
*/
|
|
27540
27570
|
var aiAssistant = /** @class */ (function (_super) {
|
|
27541
|
-
(0,
|
|
27571
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(aiAssistant, _super);
|
|
27542
27572
|
function aiAssistant(jodit) {
|
|
27543
27573
|
var _this = _super.call(this, jodit) || this;
|
|
27544
27574
|
/** @override */
|
|
@@ -27552,39 +27582,48 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27552
27582
|
group: 'insert'
|
|
27553
27583
|
}
|
|
27554
27584
|
];
|
|
27555
|
-
(0,
|
|
27585
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
27556
27586
|
return _this;
|
|
27557
27587
|
}
|
|
27588
|
+
Object.defineProperty(aiAssistant.prototype, "__dialog", {
|
|
27589
|
+
get: function () {
|
|
27590
|
+
return this.jodit.dlg({
|
|
27591
|
+
buttons: ['fullsize', 'dialog.close'],
|
|
27592
|
+
closeOnClickOverlay: true,
|
|
27593
|
+
closeOnEsc: true,
|
|
27594
|
+
resizable: false,
|
|
27595
|
+
draggable: true,
|
|
27596
|
+
minHeight: 160
|
|
27597
|
+
});
|
|
27598
|
+
},
|
|
27599
|
+
enumerable: false,
|
|
27600
|
+
configurable: true
|
|
27601
|
+
});
|
|
27602
|
+
Object.defineProperty(aiAssistant.prototype, "__container", {
|
|
27603
|
+
get: function () {
|
|
27604
|
+
var _a = this, jodit = _a.jodit, __dialog = _a.__dialog;
|
|
27605
|
+
return new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__/* .UiAiAssistant */ .b(jodit, {
|
|
27606
|
+
onInsertAfter: function (html) {
|
|
27607
|
+
jodit.s.focus();
|
|
27608
|
+
jodit.s.setCursorAfter(jodit.s.current());
|
|
27609
|
+
jodit.s.insertHTML(html);
|
|
27610
|
+
__dialog.close();
|
|
27611
|
+
},
|
|
27612
|
+
onInsert: function (html) {
|
|
27613
|
+
jodit.s.focus();
|
|
27614
|
+
jodit.s.insertHTML(html);
|
|
27615
|
+
__dialog.close();
|
|
27616
|
+
}
|
|
27617
|
+
});
|
|
27618
|
+
},
|
|
27619
|
+
enumerable: false,
|
|
27620
|
+
configurable: true
|
|
27621
|
+
});
|
|
27558
27622
|
/** @override */
|
|
27559
27623
|
aiAssistant.prototype.afterInit = function (jodit) { };
|
|
27560
27624
|
aiAssistant.prototype.onGenerateAiAssistantForm = function (prompt) {
|
|
27561
|
-
|
|
27562
|
-
|
|
27563
|
-
buttons: ['fullsize', 'dialog.close'],
|
|
27564
|
-
closeOnClickOverlay: true,
|
|
27565
|
-
closeOnEsc: true,
|
|
27566
|
-
resizable: false,
|
|
27567
|
-
draggable: true
|
|
27568
|
-
// minWidth: 460,
|
|
27569
|
-
// maxWidth: 460
|
|
27570
|
-
});
|
|
27571
|
-
dialog.bindDestruct(jodit);
|
|
27572
|
-
var container = new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_4__/* .UiAiAssistant */ .b(jodit, {
|
|
27573
|
-
onInsertAfter: function (html) {
|
|
27574
|
-
jodit.s.focus();
|
|
27575
|
-
jodit.s.setCursorAfter(jodit.s.current());
|
|
27576
|
-
jodit.s.insertHTML(html);
|
|
27577
|
-
dialog.close();
|
|
27578
|
-
},
|
|
27579
|
-
onInsert: function (html) {
|
|
27580
|
-
jodit.s.focus();
|
|
27581
|
-
jodit.s.insertHTML(html);
|
|
27582
|
-
dialog.close();
|
|
27583
|
-
}
|
|
27584
|
-
});
|
|
27585
|
-
container.bindDestruct(dialog);
|
|
27586
|
-
dialog.open(container, 'AI Assistant', true, false);
|
|
27587
|
-
container.setPrompt(prompt);
|
|
27625
|
+
this.__dialog.open(this.__container, 'AI Assistant');
|
|
27626
|
+
this.__container.setPrompt(prompt);
|
|
27588
27627
|
};
|
|
27589
27628
|
aiAssistant.prototype.onInvokeAiAssistant = function (prompt) {
|
|
27590
27629
|
var _this = this;
|
|
@@ -27592,9 +27631,9 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27592
27631
|
jodit.s.focus();
|
|
27593
27632
|
var selectedText = jodit.s.html;
|
|
27594
27633
|
jodit.async
|
|
27595
|
-
.promise(function (resolve, reject) { return (0,
|
|
27634
|
+
.promise(function (resolve, reject) { return (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__awaiter */ .sH)(_this, void 0, void 0, function () {
|
|
27596
27635
|
var result, error_1;
|
|
27597
|
-
return (0,
|
|
27636
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__generator */ .YH)(this, function (_a) {
|
|
27598
27637
|
switch (_a.label) {
|
|
27599
27638
|
case 0:
|
|
27600
27639
|
_a.trys.push([0, 2, , 3]);
|
|
@@ -27616,7 +27655,7 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27616
27655
|
jodit.e.fire('ai-assistant-response', htmlFragment);
|
|
27617
27656
|
})
|
|
27618
27657
|
.catch(function (error) {
|
|
27619
|
-
if ((0,
|
|
27658
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_8__/* .isAbortError */ .z)(error)) {
|
|
27620
27659
|
return;
|
|
27621
27660
|
}
|
|
27622
27661
|
jodit.message.error(error.message);
|
|
@@ -27624,17 +27663,26 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27624
27663
|
});
|
|
27625
27664
|
};
|
|
27626
27665
|
/** @override */
|
|
27627
|
-
aiAssistant.prototype.beforeDestruct = function (_) {
|
|
27628
|
-
|
|
27629
|
-
|
|
27666
|
+
aiAssistant.prototype.beforeDestruct = function (_) {
|
|
27667
|
+
this.__container.destruct();
|
|
27668
|
+
this.__dialog.destruct();
|
|
27669
|
+
};
|
|
27670
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
27671
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
27672
|
+
], aiAssistant.prototype, "__dialog", null);
|
|
27673
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
27674
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
27675
|
+
], aiAssistant.prototype, "__container", null);
|
|
27676
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
27677
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
27630
27678
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
27631
|
-
(0,
|
|
27632
|
-
(0,
|
|
27679
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
27680
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':invokeAiAssistant')
|
|
27633
27681
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
27634
27682
|
return aiAssistant;
|
|
27635
|
-
}(
|
|
27683
|
+
}(jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */ .k));
|
|
27636
27684
|
|
|
27637
|
-
|
|
27685
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
27638
27686
|
|
|
27639
27687
|
|
|
27640
27688
|
/***/ }),
|
|
@@ -27984,13 +28032,13 @@ var UiAiAssistant = /** @class */ (function (_super) {
|
|
|
27984
28032
|
this.__insertAfterButton.state.disabled = value;
|
|
27985
28033
|
};
|
|
27986
28034
|
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
27987
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
28035
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-response')
|
|
27988
28036
|
], UiAiAssistant.prototype, "onAiAssistentResponse", null);
|
|
27989
28037
|
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
27990
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
28038
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':ai-assistant-error')
|
|
27991
28039
|
], UiAiAssistant.prototype, "onAiAssistentError", null);
|
|
27992
28040
|
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
27993
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/*
|
|
28041
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)('promptInput:change')
|
|
27994
28042
|
], UiAiAssistant.prototype, "onChangePromptValue", null);
|
|
27995
28043
|
UiAiAssistant = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .Cg)([
|
|
27996
28044
|
jodit_core_decorators_component_component__WEBPACK_IMPORTED_MODULE_6__/* .component */ .s
|
|
@@ -31704,10 +31752,10 @@ var dtd = /** @class */ (function (_super) {
|
|
|
31704
31752
|
});
|
|
31705
31753
|
};
|
|
31706
31754
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
31707
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
31755
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':beforeInsertNode')
|
|
31708
31756
|
], dtd.prototype, "__onBeforeInsertNode", null);
|
|
31709
31757
|
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
31710
|
-
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .
|
|
31758
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_0__/* .watch */ .w)(':afterInsertNode')
|
|
31711
31759
|
], dtd.prototype, "__onAfterInsertNode", null);
|
|
31712
31760
|
return dtd;
|
|
31713
31761
|
}(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_2__/* .Plugin */ .k));
|