jodit 4.1.12 → 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/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 +59 -47
- 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 +1 -1
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +1 -1
- 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 +58 -46
- 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 +1 -1
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +1 -1
- 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 +58 -46
- 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 +1 -1
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +1 -1
- 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 +58 -46
- 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 +1 -1
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +1 -1
- 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 +69 -49
- 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 +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/plugins/ai-assistant/ai-assistant.d.ts +2 -0
- package/esm/plugins/ai-assistant/ai-assistant.js +39 -28
- package/package.json +1 -1
- package/types/plugins/ai-assistant/ai-assistant.d.ts +2 -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.14
|
|
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.14";
|
|
1711
1711
|
// prettier-ignore
|
|
1712
1712
|
const ES = "es2018";
|
|
1713
1713
|
const IS_ES_MODERN = true;
|
|
@@ -25149,14 +25149,15 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
25149
25149
|
|
|
25150
25150
|
"use strict";
|
|
25151
25151
|
/* unused harmony export aiAssistant */
|
|
25152
|
-
/* harmony import */ var
|
|
25153
|
-
/* harmony import */ var
|
|
25154
|
-
/* harmony import */ var
|
|
25155
|
-
/* harmony import */ var
|
|
25156
|
-
/* harmony import */ var
|
|
25157
|
-
/* harmony import */ var
|
|
25158
|
-
/* harmony import */ var
|
|
25159
|
-
/* harmony import */ var
|
|
25152
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
25153
|
+
/* harmony import */ var jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(87875);
|
|
25154
|
+
/* harmony import */ var jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(66927);
|
|
25155
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
25156
|
+
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(99951);
|
|
25157
|
+
/* harmony import */ var jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(29866);
|
|
25158
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(66888);
|
|
25159
|
+
/* harmony import */ var _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(20785);
|
|
25160
|
+
/* harmony import */ var _langs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81026);
|
|
25160
25161
|
/*!
|
|
25161
25162
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
25162
25163
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -25170,10 +25171,37 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
25170
25171
|
|
|
25171
25172
|
|
|
25172
25173
|
|
|
25174
|
+
|
|
25173
25175
|
/**
|
|
25174
25176
|
* The plugin inserts content generated by AI into the editor.
|
|
25175
25177
|
*/
|
|
25176
|
-
class aiAssistant extends
|
|
25178
|
+
class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */ .k {
|
|
25179
|
+
get __dialog() {
|
|
25180
|
+
return this.jodit.dlg({
|
|
25181
|
+
buttons: ['fullsize', 'dialog.close'],
|
|
25182
|
+
closeOnClickOverlay: true,
|
|
25183
|
+
closeOnEsc: true,
|
|
25184
|
+
resizable: false,
|
|
25185
|
+
draggable: true,
|
|
25186
|
+
minHeight: 160
|
|
25187
|
+
});
|
|
25188
|
+
}
|
|
25189
|
+
get __container() {
|
|
25190
|
+
const { jodit, __dialog } = this;
|
|
25191
|
+
return new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_5__/* .UiAiAssistant */ .b(jodit, {
|
|
25192
|
+
onInsertAfter(html) {
|
|
25193
|
+
jodit.s.focus();
|
|
25194
|
+
jodit.s.setCursorAfter(jodit.s.current());
|
|
25195
|
+
jodit.s.insertHTML(html);
|
|
25196
|
+
__dialog.close();
|
|
25197
|
+
},
|
|
25198
|
+
onInsert(html) {
|
|
25199
|
+
jodit.s.focus();
|
|
25200
|
+
jodit.s.insertHTML(html);
|
|
25201
|
+
__dialog.close();
|
|
25202
|
+
}
|
|
25203
|
+
});
|
|
25204
|
+
}
|
|
25177
25205
|
constructor(jodit) {
|
|
25178
25206
|
super(jodit);
|
|
25179
25207
|
/** @override */
|
|
@@ -25187,38 +25215,13 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25187
25215
|
group: 'insert'
|
|
25188
25216
|
}
|
|
25189
25217
|
];
|
|
25190
|
-
(0,
|
|
25218
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
25191
25219
|
}
|
|
25192
25220
|
/** @override */
|
|
25193
25221
|
afterInit(jodit) { }
|
|
25194
25222
|
onGenerateAiAssistantForm(prompt) {
|
|
25195
|
-
|
|
25196
|
-
|
|
25197
|
-
buttons: ['fullsize', 'dialog.close'],
|
|
25198
|
-
closeOnClickOverlay: true,
|
|
25199
|
-
closeOnEsc: true,
|
|
25200
|
-
resizable: false,
|
|
25201
|
-
draggable: true
|
|
25202
|
-
// minWidth: 460,
|
|
25203
|
-
// maxWidth: 460
|
|
25204
|
-
});
|
|
25205
|
-
dialog.bindDestruct(jodit);
|
|
25206
|
-
const container = new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_4__/* .UiAiAssistant */ .b(jodit, {
|
|
25207
|
-
onInsertAfter(html) {
|
|
25208
|
-
jodit.s.focus();
|
|
25209
|
-
jodit.s.setCursorAfter(jodit.s.current());
|
|
25210
|
-
jodit.s.insertHTML(html);
|
|
25211
|
-
dialog.close();
|
|
25212
|
-
},
|
|
25213
|
-
onInsert(html) {
|
|
25214
|
-
jodit.s.focus();
|
|
25215
|
-
jodit.s.insertHTML(html);
|
|
25216
|
-
dialog.close();
|
|
25217
|
-
}
|
|
25218
|
-
});
|
|
25219
|
-
container.bindDestruct(dialog);
|
|
25220
|
-
dialog.open(container, 'AI Assistant', true, false);
|
|
25221
|
-
container.setPrompt(prompt);
|
|
25223
|
+
this.__dialog.open(this.__container, 'AI Assistant');
|
|
25224
|
+
this.__container.setPrompt(prompt);
|
|
25222
25225
|
}
|
|
25223
25226
|
onInvokeAiAssistant(prompt) {
|
|
25224
25227
|
const { jodit } = this;
|
|
@@ -25239,7 +25242,7 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25239
25242
|
jodit.e.fire('ai-assistant-response', htmlFragment);
|
|
25240
25243
|
})
|
|
25241
25244
|
.catch(error => {
|
|
25242
|
-
if ((0,
|
|
25245
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_7__/* .isAbortError */ .z)(error)) {
|
|
25243
25246
|
return;
|
|
25244
25247
|
}
|
|
25245
25248
|
jodit.message.error(error.message);
|
|
@@ -25247,15 +25250,24 @@ class aiAssistant extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_2__/
|
|
|
25247
25250
|
});
|
|
25248
25251
|
}
|
|
25249
25252
|
/** @override */
|
|
25250
|
-
beforeDestruct(_) {
|
|
25253
|
+
beforeDestruct(_) {
|
|
25254
|
+
this.__container.destruct();
|
|
25255
|
+
this.__dialog.destruct();
|
|
25256
|
+
}
|
|
25251
25257
|
}
|
|
25252
|
-
(0,
|
|
25253
|
-
|
|
25258
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25259
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
25260
|
+
], aiAssistant.prototype, "__dialog", null);
|
|
25261
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25262
|
+
jodit_core_decorators_cache_cache__WEBPACK_IMPORTED_MODULE_0__/* .cache */ .P
|
|
25263
|
+
], aiAssistant.prototype, "__container", null);
|
|
25264
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25265
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':generateAiAssistantForm.ai-assistant')
|
|
25254
25266
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
25255
|
-
(0,
|
|
25256
|
-
(0,
|
|
25267
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_8__/* .__decorate */ .Cg)([
|
|
25268
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':invokeAiAssistant')
|
|
25257
25269
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
25258
|
-
|
|
25270
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
25259
25271
|
|
|
25260
25272
|
|
|
25261
25273
|
/***/ }),
|