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/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;
|
|
@@ -27541,14 +27541,15 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
27541
27541
|
|
|
27542
27542
|
"use strict";
|
|
27543
27543
|
/* unused harmony export aiAssistant */
|
|
27544
|
-
/* harmony import */ var
|
|
27545
|
-
/* harmony import */ var
|
|
27546
|
-
/* harmony import */ var
|
|
27547
|
-
/* harmony import */ var
|
|
27548
|
-
/* harmony import */ var
|
|
27549
|
-
/* harmony import */ var
|
|
27550
|
-
/* harmony import */ var
|
|
27551
|
-
/* 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);
|
|
27552
27553
|
/*!
|
|
27553
27554
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
27554
27555
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -27562,11 +27563,12 @@ jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', (_ent
|
|
|
27562
27563
|
|
|
27563
27564
|
|
|
27564
27565
|
|
|
27566
|
+
|
|
27565
27567
|
/**
|
|
27566
27568
|
* The plugin inserts content generated by AI into the editor.
|
|
27567
27569
|
*/
|
|
27568
27570
|
var aiAssistant = /** @class */ (function (_super) {
|
|
27569
|
-
(0,
|
|
27571
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__extends */ .C6)(aiAssistant, _super);
|
|
27570
27572
|
function aiAssistant(jodit) {
|
|
27571
27573
|
var _this = _super.call(this, jodit) || this;
|
|
27572
27574
|
/** @override */
|
|
@@ -27580,39 +27582,48 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27580
27582
|
group: 'insert'
|
|
27581
27583
|
}
|
|
27582
27584
|
];
|
|
27583
|
-
(0,
|
|
27585
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .JW)(_langs__WEBPACK_IMPORTED_MODULE_6__);
|
|
27584
27586
|
return _this;
|
|
27585
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
|
+
});
|
|
27586
27622
|
/** @override */
|
|
27587
27623
|
aiAssistant.prototype.afterInit = function (jodit) { };
|
|
27588
27624
|
aiAssistant.prototype.onGenerateAiAssistantForm = function (prompt) {
|
|
27589
|
-
|
|
27590
|
-
|
|
27591
|
-
buttons: ['fullsize', 'dialog.close'],
|
|
27592
|
-
closeOnClickOverlay: true,
|
|
27593
|
-
closeOnEsc: true,
|
|
27594
|
-
resizable: false,
|
|
27595
|
-
draggable: true
|
|
27596
|
-
// minWidth: 460,
|
|
27597
|
-
// maxWidth: 460
|
|
27598
|
-
});
|
|
27599
|
-
dialog.bindDestruct(jodit);
|
|
27600
|
-
var container = new _ui_ui_ai_assistant__WEBPACK_IMPORTED_MODULE_4__/* .UiAiAssistant */ .b(jodit, {
|
|
27601
|
-
onInsertAfter: function (html) {
|
|
27602
|
-
jodit.s.focus();
|
|
27603
|
-
jodit.s.setCursorAfter(jodit.s.current());
|
|
27604
|
-
jodit.s.insertHTML(html);
|
|
27605
|
-
dialog.close();
|
|
27606
|
-
},
|
|
27607
|
-
onInsert: function (html) {
|
|
27608
|
-
jodit.s.focus();
|
|
27609
|
-
jodit.s.insertHTML(html);
|
|
27610
|
-
dialog.close();
|
|
27611
|
-
}
|
|
27612
|
-
});
|
|
27613
|
-
container.bindDestruct(dialog);
|
|
27614
|
-
dialog.open(container, 'AI Assistant', true, false);
|
|
27615
|
-
container.setPrompt(prompt);
|
|
27625
|
+
this.__dialog.open(this.__container, 'AI Assistant');
|
|
27626
|
+
this.__container.setPrompt(prompt);
|
|
27616
27627
|
};
|
|
27617
27628
|
aiAssistant.prototype.onInvokeAiAssistant = function (prompt) {
|
|
27618
27629
|
var _this = this;
|
|
@@ -27620,9 +27631,9 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27620
27631
|
jodit.s.focus();
|
|
27621
27632
|
var selectedText = jodit.s.html;
|
|
27622
27633
|
jodit.async
|
|
27623
|
-
.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 () {
|
|
27624
27635
|
var result, error_1;
|
|
27625
|
-
return (0,
|
|
27636
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__generator */ .YH)(this, function (_a) {
|
|
27626
27637
|
switch (_a.label) {
|
|
27627
27638
|
case 0:
|
|
27628
27639
|
_a.trys.push([0, 2, , 3]);
|
|
@@ -27644,7 +27655,7 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27644
27655
|
jodit.e.fire('ai-assistant-response', htmlFragment);
|
|
27645
27656
|
})
|
|
27646
27657
|
.catch(function (error) {
|
|
27647
|
-
if ((0,
|
|
27658
|
+
if ((0,jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_8__/* .isAbortError */ .z)(error)) {
|
|
27648
27659
|
return;
|
|
27649
27660
|
}
|
|
27650
27661
|
jodit.message.error(error.message);
|
|
@@ -27652,17 +27663,26 @@ var aiAssistant = /** @class */ (function (_super) {
|
|
|
27652
27663
|
});
|
|
27653
27664
|
};
|
|
27654
27665
|
/** @override */
|
|
27655
|
-
aiAssistant.prototype.beforeDestruct = function (_) {
|
|
27656
|
-
|
|
27657
|
-
|
|
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')
|
|
27658
27678
|
], aiAssistant.prototype, "onGenerateAiAssistantForm", null);
|
|
27659
|
-
(0,
|
|
27660
|
-
(0,
|
|
27679
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .Cg)([
|
|
27680
|
+
(0,jodit_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_1__/* .watch */ .w)(':invokeAiAssistant')
|
|
27661
27681
|
], aiAssistant.prototype, "onInvokeAiAssistant", null);
|
|
27662
27682
|
return aiAssistant;
|
|
27663
|
-
}(
|
|
27683
|
+
}(jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plugin */ .k));
|
|
27664
27684
|
|
|
27665
|
-
|
|
27685
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('ai-assistant', aiAssistant);
|
|
27666
27686
|
|
|
27667
27687
|
|
|
27668
27688
|
/***/ }),
|