jodit 4.0.0-beta.88 → 4.0.0-beta.91
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 +28 -5
- package/README.md +4 -4
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +29 -12
- 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 +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +33 -12
- 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 +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +33 -12
- 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 +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +33 -12
- 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 +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +29 -11
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.js +1 -1
- package/es5/plugins/debug/debug.min.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.css +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.js +1 -1
- package/es5/plugins/speech-recognize/speech-recognize.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/traits/dlgs.js +3 -3
- package/esm/modules/dialog/alert.js +3 -1
- package/esm/modules/dialog/confirm.js +3 -1
- package/esm/modules/dialog/dialog.d.ts +1 -0
- package/esm/modules/dialog/dialog.js +17 -3
- package/esm/modules/dialog/prompt.d.ts +1 -0
- package/esm/modules/dialog/prompt.js +4 -1
- package/esm/plugins/about/about.js +1 -1
- package/esm/types/dialog.d.ts +2 -0
- package/package.json +1 -1
- package/types/modules/dialog/dialog.d.ts +1 -0
- package/types/modules/dialog/prompt.d.ts +1 -0
- package/types/types/dialog.d.ts +2 -0
package/es2021/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit - Jodit is awesome and usefully wysiwyg editor with filebrowser
|
|
3
3
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
4
|
-
* Version: v4.0.0-beta.
|
|
4
|
+
* Version: v4.0.0-beta.91
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1716,7 +1716,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1716
1716
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1717
1717
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1718
1718
|
*/
|
|
1719
|
-
const APP_VERSION = "4.0.0-beta.
|
|
1719
|
+
const APP_VERSION = "4.0.0-beta.91";
|
|
1720
1720
|
// prettier-ignore
|
|
1721
1721
|
const ES = "es2021";
|
|
1722
1722
|
const IS_ES_MODERN = true;
|
|
@@ -12667,18 +12667,18 @@ class Dlgs {
|
|
|
12667
12667
|
confirm(msg, title, callback) {
|
|
12668
12668
|
msg = processTitle(msg, this);
|
|
12669
12669
|
title = processTitle(title, this);
|
|
12670
|
-
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Confirm */ .I4.call(this.dlg(), msg, title, callback);
|
|
12670
|
+
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Confirm */ .I4.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback);
|
|
12671
12671
|
}
|
|
12672
12672
|
prompt(msg, title, callback, placeholder, defaultValue) {
|
|
12673
12673
|
msg = processTitle(msg, this);
|
|
12674
12674
|
title = processTitle(title, this);
|
|
12675
12675
|
placeholder = processTitle(placeholder, this);
|
|
12676
|
-
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Prompt */ .NL.call(this.dlg(), msg, title, callback, placeholder, defaultValue);
|
|
12676
|
+
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Prompt */ .NL.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, placeholder, defaultValue);
|
|
12677
12677
|
}
|
|
12678
12678
|
alert(msg, title, callback, className) {
|
|
12679
12679
|
msg = processTitle(msg, this);
|
|
12680
12680
|
title = processTitle(title, this);
|
|
12681
|
-
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Alert */ .bZ.call(this.dlg(), msg, title, callback, className);
|
|
12681
|
+
return jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Alert */ .bZ.call(this.dlg({ closeOnClickOverlay: true }), msg, title, callback, className);
|
|
12682
12682
|
}
|
|
12683
12683
|
}
|
|
12684
12684
|
function processTitle(title, self) {
|
|
@@ -17493,7 +17493,9 @@ function Alert(msg, title, callback, className = 'jodit-dialog_alert') {
|
|
|
17493
17493
|
callback = title;
|
|
17494
17494
|
title = undefined;
|
|
17495
17495
|
}
|
|
17496
|
-
const dialog = this instanceof _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V
|
|
17496
|
+
const dialog = this instanceof _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V
|
|
17497
|
+
? this
|
|
17498
|
+
: new _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V({ closeOnClickOverlay: true }), container = dialog.c.div(className), okButton = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_1__/* .Button */ .zx)(dialog, 'ok', 'Ok');
|
|
17497
17499
|
(0,jodit_core_helpers_array_as_array__WEBPACK_IMPORTED_MODULE_4__/* .asArray */ ._)(msg).forEach(oneMessage => {
|
|
17498
17500
|
container.appendChild(jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .i.isNode(oneMessage) ? oneMessage : dialog.c.fromHTML(oneMessage));
|
|
17499
17501
|
});
|
|
@@ -17544,7 +17546,9 @@ function Alert(msg, title, callback, className = 'jodit-dialog_alert') {
|
|
|
17544
17546
|
* ```
|
|
17545
17547
|
*/
|
|
17546
17548
|
function Confirm(msg, title, callback) {
|
|
17547
|
-
const dialog = this instanceof jodit_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Dialog */ .V
|
|
17549
|
+
const dialog = this instanceof jodit_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Dialog */ .V
|
|
17550
|
+
? this
|
|
17551
|
+
: new jodit_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_0__/* .Dialog */ .V({ closeOnClickOverlay: true }), $div = dialog.c.fromHTML('<form class="jodit-dialog_prompt"></form>'), $label = dialog.c.element('label');
|
|
17548
17552
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_2__/* .isFunction */ .m)(title)) {
|
|
17549
17553
|
callback = title;
|
|
17550
17554
|
title = undefined;
|
|
@@ -17600,6 +17604,7 @@ function Confirm(msg, title, callback) {
|
|
|
17600
17604
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
17601
17605
|
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
17602
17606
|
*/
|
|
17607
|
+
var Dialog_1;
|
|
17603
17608
|
|
|
17604
17609
|
/**
|
|
17605
17610
|
* @module modules/dialog
|
|
@@ -17645,7 +17650,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.controls.dia
|
|
|
17645
17650
|
/**
|
|
17646
17651
|
* Module to generate dialog windows
|
|
17647
17652
|
*/
|
|
17648
|
-
let Dialog = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_6__/* .ViewWithToolbar */ .C {
|
|
17653
|
+
let Dialog = Dialog_1 = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_6__/* .ViewWithToolbar */ .C {
|
|
17649
17654
|
/** @override */
|
|
17650
17655
|
className() {
|
|
17651
17656
|
return 'Dialog';
|
|
@@ -17744,6 +17749,9 @@ let Dialog = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMP
|
|
|
17744
17749
|
}
|
|
17745
17750
|
}
|
|
17746
17751
|
onEsc(e) {
|
|
17752
|
+
if (!this.o.closeOnEsc) {
|
|
17753
|
+
return;
|
|
17754
|
+
}
|
|
17747
17755
|
if (this.isOpened &&
|
|
17748
17756
|
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.KEY_ESC &&
|
|
17749
17757
|
this.getMod('static') !== true) {
|
|
@@ -18078,7 +18086,7 @@ let Dialog = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMP
|
|
|
18078
18086
|
*/
|
|
18079
18087
|
this.isOpened = false;
|
|
18080
18088
|
const self = this;
|
|
18081
|
-
self.options = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(options, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.dialog,
|
|
18089
|
+
self.options = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(options, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.dialog, Dialog_1.defaultOptions));
|
|
18082
18090
|
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_7__/* .Dom */ .i.safeRemove(self.container);
|
|
18083
18091
|
const n = this.getFullElName.bind(this);
|
|
18084
18092
|
self.container = this.c.fromHTML(`<div class="jodit jodit-dialog ${this.componentName}">
|
|
@@ -18134,6 +18142,11 @@ let Dialog = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMP
|
|
|
18134
18142
|
.on(self.container, 'close_dialog', self.close)
|
|
18135
18143
|
.on(this.ow, 'keydown', this.onEsc)
|
|
18136
18144
|
.on(this.ow, 'resize', this.onResize);
|
|
18145
|
+
if (this.o.closeOnClickOverlay) {
|
|
18146
|
+
const overlay = self.getElm('overlay');
|
|
18147
|
+
void 0;
|
|
18148
|
+
this.e.on(overlay, 'click', self.close);
|
|
18149
|
+
}
|
|
18137
18150
|
}
|
|
18138
18151
|
/**
|
|
18139
18152
|
* Build toolbar after ready
|
|
@@ -18187,10 +18200,15 @@ let Dialog = class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMP
|
|
|
18187
18200
|
(0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .gn)([
|
|
18188
18201
|
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.hook)('ready')
|
|
18189
18202
|
], Dialog.prototype, "buildToolbar", null);
|
|
18190
|
-
Dialog = (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .gn)([
|
|
18203
|
+
Dialog = Dialog_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .gn)([
|
|
18191
18204
|
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_10__.component
|
|
18192
18205
|
], Dialog);
|
|
18193
18206
|
|
|
18207
|
+
Dialog.defaultOptions = {
|
|
18208
|
+
...jodit_core_view_view__WEBPACK_IMPORTED_MODULE_11__/* .View */ .G.defaultOptions,
|
|
18209
|
+
closeOnClickOverlay: false,
|
|
18210
|
+
closeOnEsc: true
|
|
18211
|
+
};
|
|
18194
18212
|
|
|
18195
18213
|
|
|
18196
18214
|
/***/ }),
|
|
@@ -18250,6 +18268,7 @@ Dialog = (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .gn)([
|
|
|
18250
18268
|
/**
|
|
18251
18269
|
* Show `Prompt` dialog. Work without Jodit object
|
|
18252
18270
|
*
|
|
18271
|
+
* @param msg - Dialog content
|
|
18253
18272
|
* @param title - Title or callback
|
|
18254
18273
|
* @param callback - callback. The first argument is the value entered
|
|
18255
18274
|
* @param placeholder - Placeholder for input
|
|
@@ -18265,7 +18284,9 @@ Dialog = (0,tslib__WEBPACK_IMPORTED_MODULE_13__/* .__decorate */ .gn)([
|
|
|
18265
18284
|
* ```
|
|
18266
18285
|
*/
|
|
18267
18286
|
function Prompt(msg, title, callback, placeholder, defaultValue) {
|
|
18268
|
-
const dialog = this instanceof _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V
|
|
18287
|
+
const dialog = this instanceof _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V
|
|
18288
|
+
? this
|
|
18289
|
+
: new _dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .V({ closeOnClickOverlay: true }), cancelButton = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .Button */ .zx)(dialog, 'cancel', 'Cancel'), okButton = (0,jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .Button */ .zx)(dialog, 'ok', 'Ok'), form = dialog.c.element('form', {
|
|
18269
18290
|
class: 'jodit-dialog_prompt'
|
|
18270
18291
|
}), inputElement = dialog.c.element('input', {
|
|
18271
18292
|
autofocus: true,
|
|
@@ -24622,7 +24643,7 @@ const TabsWidget = (jodit, tabs, state) => {
|
|
|
24622
24643
|
|
|
24623
24644
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .D.prototype.controls.about = {
|
|
24624
24645
|
exec: (editor) => {
|
|
24625
|
-
const dialog = editor.dlg(), i = editor.i18n.bind(editor);
|
|
24646
|
+
const dialog = editor.dlg({ closeOnClickOverlay: true }), i = editor.i18n.bind(editor);
|
|
24626
24647
|
dialog
|
|
24627
24648
|
.setMod('theme', editor.o.theme)
|
|
24628
24649
|
.setHeader(i('About Jodit'))
|