jodit 4.15.18 → 4.16.0
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 +11 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +9 -8
- package/es2015/jodit.js +94 -48
- package/es2015/jodit.min.js +9 -8
- package/es2015/plugins/debug/debug.css +1 -1
- 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.fat.min.js +9 -8
- package/es2018/jodit.min.js +9 -8
- package/es2018/plugins/debug/debug.min.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 +10 -9
- package/es2021/jodit.js +94 -48
- package/es2021/jodit.min.js +10 -9
- package/es2021/plugins/debug/debug.css +1 -1
- 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 +10 -9
- package/es2021.en/jodit.js +94 -48
- package/es2021.en/jodit.min.js +10 -9
- package/es2021.en/plugins/debug/debug.css +1 -1
- 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 +106 -54
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/debug/debug.css +1 -1
- 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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/core/constants.js +1 -1
- package/esm/core/ui/button/button/button.js +10 -4
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/group/group.d.ts +4 -0
- package/esm/core/ui/group/group.js +5 -1
- package/esm/core/ui/group/list.js +2 -2
- package/esm/modules/dialog/dialog.js +7 -0
- package/esm/modules/toolbar/button/content.d.ts +7 -0
- package/esm/modules/toolbar/button/content.js +9 -1
- package/esm/plugins/source/editor/engines/ace.js +13 -6
- package/esm/plugins/source/source.js +20 -1
- package/package.json +1 -1
- package/types/core/ui/group/group.d.ts +4 -0
- package/types/modules/toolbar/button/content.d.ts +7 -0
package/es2015/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.
|
|
4
|
+
* Version: v4.16.0
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -1805,7 +1805,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1805
1805
|
* ```
|
|
1806
1806
|
* @packageDocumentation
|
|
1807
1807
|
* @module constants
|
|
1808
|
-
*/ const APP_VERSION = "4.
|
|
1808
|
+
*/ const APP_VERSION = "4.16.0";
|
|
1809
1809
|
// prettier-ignore
|
|
1810
1810
|
const ES = "es2015";
|
|
1811
1811
|
const IS_ES_MODERN = true;
|
|
@@ -14437,6 +14437,7 @@ class UIButton extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_11__.UIEle
|
|
|
14437
14437
|
this.name = this.state.name;
|
|
14438
14438
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_10__.attr)(this.container, 'data-ref', this.state.name);
|
|
14439
14439
|
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_10__.attr)(this.container, 'ref', this.state.name);
|
|
14440
|
+
this.updateAriaLabel();
|
|
14440
14441
|
}
|
|
14441
14442
|
onChangeTooltip() {
|
|
14442
14443
|
const i8nTooltip = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : null;
|
|
@@ -14448,9 +14449,12 @@ class UIButton extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_11__.UIEle
|
|
|
14448
14449
|
}
|
|
14449
14450
|
updateAriaLabel() {
|
|
14450
14451
|
const hasText = this.state.text.trim().length > 0;
|
|
14451
|
-
|
|
14452
|
-
(
|
|
14453
|
-
|
|
14452
|
+
// An icon-only button without a tooltip would have no accessible
|
|
14453
|
+
// name at all — fall back to its raw name (not translated: control
|
|
14454
|
+
// names are identifiers, not i18n keys).
|
|
14455
|
+
const label = this.state.tooltip ? this.jodit.i18n(this.state.tooltip) : !hasText && this.state.name ? this.state.name : null;
|
|
14456
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_10__.attr)(this.container, 'aria-label', label);
|
|
14457
|
+
(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_10__.attr)(this.button, 'aria-label', !hasText ? label : null);
|
|
14454
14458
|
}
|
|
14455
14459
|
onChangeTabIndex() {
|
|
14456
14460
|
;(0,jodit_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_10__.attr)(this.container, 'tabindex', this.state.tabIndex);
|
|
@@ -15478,6 +15482,7 @@ class UIFileInput extends jodit_core_ui_form_inputs_input_input__WEBPACK_IMPORTE
|
|
|
15478
15482
|
return this.j.create.fromHTML(`<input
|
|
15479
15483
|
type="file"
|
|
15480
15484
|
accept="${options.onlyImages ? 'image/*' : '*'}"
|
|
15485
|
+
aria-label="${this.j.i18n(options.tooltip || 'Upload')}"
|
|
15481
15486
|
tabindex="-1"
|
|
15482
15487
|
dir="auto"
|
|
15483
15488
|
multiple=""
|
|
@@ -15982,9 +15987,12 @@ class UIGroup extends jodit_core_ui_element__WEBPACK_IMPORTED_MODULE_6__.UIEleme
|
|
|
15982
15987
|
className() {
|
|
15983
15988
|
return 'UIGroup';
|
|
15984
15989
|
}
|
|
15985
|
-
|
|
15990
|
+
/**
|
|
15991
|
+
* A generic container: `group` allows any children. Toolbar button groups
|
|
15992
|
+
* are lists of `listitem`s and get `role="list"` explicitly from `UIList`.
|
|
15993
|
+
*/ getRole() {
|
|
15986
15994
|
var _this_options;
|
|
15987
|
-
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || '
|
|
15995
|
+
return ((_this_options = this.options) === null || _this_options === void 0 ? void 0 : _this_options.role) || 'group';
|
|
15988
15996
|
}
|
|
15989
15997
|
/**
|
|
15990
15998
|
* All group children
|
|
@@ -16188,10 +16196,10 @@ class UIList extends jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_8__.UIGr
|
|
|
16188
16196
|
}
|
|
16189
16197
|
/**
|
|
16190
16198
|
* Make new group and append it in list of elements
|
|
16191
|
-
*/ makeGroup(role) {
|
|
16192
|
-
return new jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_8__.UIGroup(this.jodit, [],
|
|
16199
|
+
*/ makeGroup(role = 'list') {
|
|
16200
|
+
return new jodit_core_ui_group_group__WEBPACK_IMPORTED_MODULE_8__.UIGroup(this.jodit, [], {
|
|
16193
16201
|
role
|
|
16194
|
-
}
|
|
16202
|
+
});
|
|
16195
16203
|
}
|
|
16196
16204
|
/**
|
|
16197
16205
|
* All buttons from list
|
|
@@ -19278,13 +19286,14 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__decorat
|
|
|
19278
19286
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(28077);
|
|
19279
19287
|
/* harmony import */ var jodit_core_helpers_array__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(45664);
|
|
19280
19288
|
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(28686);
|
|
19281
|
-
/* harmony import */ var
|
|
19282
|
-
/* harmony import */ var
|
|
19283
|
-
/* harmony import */ var
|
|
19284
|
-
/* harmony import */ var
|
|
19285
|
-
/* harmony import */ var
|
|
19286
|
-
/* harmony import */ var
|
|
19287
|
-
/* harmony import */ var
|
|
19289
|
+
/* harmony import */ var jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22852);
|
|
19290
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(93640);
|
|
19291
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(28712);
|
|
19292
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__);
|
|
19293
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(4099);
|
|
19294
|
+
/* harmony import */ var jodit_core_view_view__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(35099);
|
|
19295
|
+
/* harmony import */ var jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(2222);
|
|
19296
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5266);
|
|
19288
19297
|
/*!
|
|
19289
19298
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
19290
19299
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -19309,7 +19318,8 @@ ContextMenu = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__decorat
|
|
|
19309
19318
|
|
|
19310
19319
|
|
|
19311
19320
|
|
|
19312
|
-
|
|
19321
|
+
|
|
19322
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_17__.Config.prototype.dialog = {
|
|
19313
19323
|
namespace: '',
|
|
19314
19324
|
extraButtons: [],
|
|
19315
19325
|
/**
|
|
@@ -19325,7 +19335,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.dialog = {
|
|
|
19325
19335
|
toolbarButtonSize: 'middle',
|
|
19326
19336
|
zIndex: 'inherit'
|
|
19327
19337
|
};
|
|
19328
|
-
|
|
19338
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_17__.Config.prototype.controls.dialog = {
|
|
19329
19339
|
close: {
|
|
19330
19340
|
icon: 'cancel',
|
|
19331
19341
|
exec: (dialog)=>{
|
|
@@ -19333,7 +19343,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_16__.Config.prototype.controls.dialog = {
|
|
|
19333
19343
|
}
|
|
19334
19344
|
}
|
|
19335
19345
|
};
|
|
19336
|
-
class Dialog extends
|
|
19346
|
+
class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_16__.ViewWithToolbar {
|
|
19337
19347
|
/** @override */ className() {
|
|
19338
19348
|
return 'Dialog';
|
|
19339
19349
|
}
|
|
@@ -19397,8 +19407,8 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19397
19407
|
this.draggable = true;
|
|
19398
19408
|
this.startX = e.clientX;
|
|
19399
19409
|
this.startY = e.clientY;
|
|
19400
|
-
this.startPoint.x = (0,
|
|
19401
|
-
this.startPoint.y = (0,
|
|
19410
|
+
this.startPoint.x = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, 'left');
|
|
19411
|
+
this.startPoint.y = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, 'top');
|
|
19402
19412
|
this.setMaxZIndex();
|
|
19403
19413
|
if (e.cancelable) {
|
|
19404
19414
|
e.preventDefault();
|
|
@@ -19488,7 +19498,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19488
19498
|
if (h == null) {
|
|
19489
19499
|
h = this.dialog.offsetHeight;
|
|
19490
19500
|
}
|
|
19491
|
-
;(0,
|
|
19501
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, {
|
|
19492
19502
|
width: w,
|
|
19493
19503
|
height: h
|
|
19494
19504
|
});
|
|
@@ -19522,7 +19532,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19522
19532
|
this.moved = Math.abs(x - left) > 100 || Math.abs(y - top) > 100;
|
|
19523
19533
|
}
|
|
19524
19534
|
// strings on purpose: `css()` would truncate fractional pixels
|
|
19525
|
-
;(0,
|
|
19535
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.dialog, {
|
|
19526
19536
|
left: (x || left) + 'px',
|
|
19527
19537
|
top: (y || top) + 'px'
|
|
19528
19538
|
});
|
|
@@ -19542,6 +19552,12 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19542
19552
|
* ```
|
|
19543
19553
|
*/ setHeader(content) {
|
|
19544
19554
|
this.setElements(this.dialogbox_header, content);
|
|
19555
|
+
// `role="dialog"` needs an accessible name; a text title is the
|
|
19556
|
+
// natural one (element titles are left to the caller).
|
|
19557
|
+
if ((0,jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_10__.isString)(content)) {
|
|
19558
|
+
const name = (0,jodit_core_helpers_html_strip_tags__WEBPACK_IMPORTED_MODULE_11__.stripTags)(content, this.od).trim();
|
|
19559
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.attr)(this.container, 'aria-label', name || null);
|
|
19560
|
+
}
|
|
19545
19561
|
return this;
|
|
19546
19562
|
}
|
|
19547
19563
|
/**
|
|
@@ -19595,7 +19611,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19595
19611
|
/**
|
|
19596
19612
|
* Get zIndex from dialog
|
|
19597
19613
|
*/ getZIndex() {
|
|
19598
|
-
return parseInt((0,
|
|
19614
|
+
return parseInt((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.container, 'zIndex'), 10) || 0;
|
|
19599
19615
|
}
|
|
19600
19616
|
/**
|
|
19601
19617
|
* Get dialog instance with maximum z-index displaying it on top of all the dialog boxes
|
|
@@ -19618,7 +19634,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19618
19634
|
this.__openedSiblings().forEach((dialog)=>{
|
|
19619
19635
|
maxZIndex = Math.max(dialog.getZIndex(), maxZIndex);
|
|
19620
19636
|
});
|
|
19621
|
-
(0,
|
|
19637
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.container, 'zIndex', (maxZIndex + 1).toString());
|
|
19622
19638
|
}
|
|
19623
19639
|
/**
|
|
19624
19640
|
* Expands the dialog on full browser window
|
|
@@ -19668,7 +19684,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19668
19684
|
this.setPosition(this.offsetX, this.offsetY);
|
|
19669
19685
|
this.setMaxZIndex();
|
|
19670
19686
|
} else {
|
|
19671
|
-
(0,
|
|
19687
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.container, 'zIndex', null);
|
|
19672
19688
|
}
|
|
19673
19689
|
if (this.o.fullsize) {
|
|
19674
19690
|
this.toggleFullSize(true);
|
|
@@ -19782,7 +19798,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19782
19798
|
* True, if dialog was opened
|
|
19783
19799
|
*/ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "isOpened", false);
|
|
19784
19800
|
const self1 = this;
|
|
19785
|
-
self1.options = (0,
|
|
19801
|
+
self1.options = (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.ConfigProto)(options, (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.ConfigProto)(jodit_config__WEBPACK_IMPORTED_MODULE_17__.Config.prototype.dialog, Dialog.defaultOptions));
|
|
19786
19802
|
// Attach event handlers passed via `options.events` to the dialog's own
|
|
19787
19803
|
// emitter (as FileBrowser already does), so a consumer — e.g. a plugin
|
|
19788
19804
|
// forwarding the editor's `events` config — can observe `afterOpen` /
|
|
@@ -19800,40 +19816,40 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19800
19816
|
</div>
|
|
19801
19817
|
<div class="${n('content')}"></div>
|
|
19802
19818
|
<div class="${n('footer')}"></div>
|
|
19803
|
-
<div class="${n('resizer')}">${
|
|
19819
|
+
<div class="${n('resizer')}">${jodit_core_ui__WEBPACK_IMPORTED_MODULE_14__.Icon.get('resize_handler')}</div>
|
|
19804
19820
|
</div>
|
|
19805
19821
|
</div>`);
|
|
19806
19822
|
if (self1.options.direction === 'rtl') {
|
|
19807
|
-
(0,
|
|
19808
|
-
(0,
|
|
19823
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(self1.container, 'direction', 'rtl');
|
|
19824
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.attr)(self1.container, 'dir', 'rtl');
|
|
19809
19825
|
}
|
|
19810
19826
|
if (this.o.zIndex) {
|
|
19811
|
-
(0,
|
|
19827
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(this.container, 'zIndex', this.o.zIndex.toString());
|
|
19812
19828
|
}
|
|
19813
|
-
;(0,
|
|
19829
|
+
;(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.attr)(self1.container, 'role', 'dialog');
|
|
19814
19830
|
Object.defineProperty(self1.container, 'component', {
|
|
19815
19831
|
value: this
|
|
19816
19832
|
});
|
|
19817
19833
|
self1.setMod('theme', self1.o.theme || 'default').setMod('resizable', Boolean(self1.o.resizable));
|
|
19818
19834
|
const dialog = self1.getElm('panel');
|
|
19819
|
-
(0,
|
|
19835
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(dialog != null, 'Panel element does not exist');
|
|
19820
19836
|
const resizer = self1.getElm('resizer');
|
|
19821
|
-
(0,
|
|
19837
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(resizer != null, 'Resizer element does not exist');
|
|
19822
19838
|
const dialogbox_header = self1.getElm('header-title');
|
|
19823
|
-
(0,
|
|
19839
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(dialogbox_header != null, 'header-title element does not exist');
|
|
19824
19840
|
const dialogbox_content = self1.getElm('content');
|
|
19825
|
-
(0,
|
|
19841
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(dialogbox_content != null, 'Content element does not exist');
|
|
19826
19842
|
const dialogbox_footer = self1.getElm('footer');
|
|
19827
|
-
(0,
|
|
19843
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(dialogbox_footer != null, 'Footer element does not exist');
|
|
19828
19844
|
const dialogbox_toolbar = self1.getElm('header-toolbar');
|
|
19829
|
-
(0,
|
|
19845
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(dialogbox_toolbar != null, 'header-toolbar element does not exist');
|
|
19830
19846
|
this.dialog = dialog;
|
|
19831
19847
|
this.resizer = resizer;
|
|
19832
19848
|
this.dialogbox_header = dialogbox_header;
|
|
19833
19849
|
this.dialogbox_content = dialogbox_content;
|
|
19834
19850
|
this.dialogbox_footer = dialogbox_footer;
|
|
19835
19851
|
this.dialogbox_toolbar = dialogbox_toolbar;
|
|
19836
|
-
(0,
|
|
19852
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_12__.css)(self1.dialog, {
|
|
19837
19853
|
maxWidth: self1.options.maxWidth,
|
|
19838
19854
|
minHeight: self1.options.minHeight,
|
|
19839
19855
|
minWidth: self1.options.minWidth
|
|
@@ -19846,7 +19862,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19846
19862
|
this.e.on(self1.container, 'close_dialog', self1.close).on(this.ow, 'keydown', this.__onEsc).on(this.ow, 'resize', this.__onResize);
|
|
19847
19863
|
if (this.o.closeOnClickOverlay) {
|
|
19848
19864
|
const overlay = self1.getElm('overlay');
|
|
19849
|
-
(0,
|
|
19865
|
+
(0,jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(overlay != null, 'Overlay element does not exist');
|
|
19850
19866
|
this.e.on(overlay, 'click', self1.close);
|
|
19851
19867
|
}
|
|
19852
19868
|
}
|
|
@@ -19855,7 +19871,7 @@ class Dialog extends jodit_core_view_view_with_toolbar__WEBPACK_IMPORTED_MODULE_
|
|
|
19855
19871
|
* Registry of the currently opened dialogs. Replaces a DOM scan of the
|
|
19856
19872
|
* whole `destination` (usually `document.body`) for every z-index update.
|
|
19857
19873
|
*/ ;(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(Dialog, "__opened", new Set());
|
|
19858
|
-
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({},
|
|
19874
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(Dialog, "defaultOptions", (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_2__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_1__._)({}, jodit_core_view_view__WEBPACK_IMPORTED_MODULE_15__.View.defaultOptions), {
|
|
19859
19875
|
closeOnClickOverlay: false,
|
|
19860
19876
|
closeOnEsc: true
|
|
19861
19877
|
}));
|
|
@@ -25032,6 +25048,13 @@ class ToolbarContent extends jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__.U
|
|
|
25032
25048
|
/** @override */ className() {
|
|
25033
25049
|
return 'ToolbarContent';
|
|
25034
25050
|
}
|
|
25051
|
+
/** A toolbar item like `ToolbarButton`: the parent group is a `list`. */ getRole() {
|
|
25052
|
+
return 'listitem';
|
|
25053
|
+
}
|
|
25054
|
+
/**
|
|
25055
|
+
* Arbitrary content is not a toggle button — `aria-pressed` is not
|
|
25056
|
+
* allowed on a `listitem`.
|
|
25057
|
+
*/ onChangeActivated() {}
|
|
25035
25058
|
/** @override */ update() {
|
|
25036
25059
|
var _control_isDisabled, _control_isActive, _control_update;
|
|
25037
25060
|
const { control } = this;
|
|
@@ -25072,7 +25095,6 @@ class ToolbarContent extends jodit_core_ui_button__WEBPACK_IMPORTED_MODULE_5__.U
|
|
|
25072
25095
|
constructor(jodit, control, target = null){
|
|
25073
25096
|
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "control", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "target", void 0), this.control = control, this.target = target;
|
|
25074
25097
|
this.container.classList.add(`${this.componentName}_${this.clearName(control.name)}`);
|
|
25075
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'role', 'content');
|
|
25076
25098
|
}
|
|
25077
25099
|
}
|
|
25078
25100
|
ToolbarContent = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
@@ -42356,19 +42378,26 @@ class AceEditor extends jodit_plugins_source_editor_sourceEditor__WEBPACK_IMPORT
|
|
|
42356
42378
|
onResize();
|
|
42357
42379
|
this.onReady();
|
|
42358
42380
|
};
|
|
42381
|
+
let loading = false;
|
|
42359
42382
|
const initAceEditor = ()=>{
|
|
42360
42383
|
if (editor.isInDestruct || editor.getRealMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.MODE_SPLIT) {
|
|
42361
42384
|
return;
|
|
42362
42385
|
}
|
|
42386
|
+
// ACE (~400 KiB from the CDN) is only needed once the source view
|
|
42387
|
+
// is actually shown — a page that stays in WYSIWYG must not
|
|
42388
|
+
// download it.
|
|
42389
|
+
if (!this.aceExists()) {
|
|
42390
|
+
if (!loading) {
|
|
42391
|
+
loading = true;
|
|
42392
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
|
|
42393
|
+
}
|
|
42394
|
+
return;
|
|
42395
|
+
}
|
|
42363
42396
|
this.fromWYSIWYG();
|
|
42364
42397
|
tryInitAceEditor();
|
|
42365
42398
|
};
|
|
42366
42399
|
editor.e.on('afterSetMode', initAceEditor);
|
|
42367
42400
|
initAceEditor();
|
|
42368
|
-
// global add ace editor in browser
|
|
42369
|
-
if (!this.aceExists()) {
|
|
42370
|
-
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.loadNext)(editor, editor.o.sourceEditorCDNUrlsJS).then(initAceEditor).catch(()=>null);
|
|
42371
|
-
}
|
|
42372
42401
|
}
|
|
42373
42402
|
destruct() {
|
|
42374
42403
|
var _this_j_events, _this_j;
|
|
@@ -42918,7 +42947,24 @@ class SourceEditor {
|
|
|
42918
42947
|
return false;
|
|
42919
42948
|
};
|
|
42920
42949
|
if (!addEventListener()) {
|
|
42921
|
-
|
|
42950
|
+
// js-beautify is only needed once the source view is shown —
|
|
42951
|
+
// do not download it for a page that stays in WYSIWYG.
|
|
42952
|
+
let loading = false;
|
|
42953
|
+
const loadBeautify = ()=>{
|
|
42954
|
+
if (loading || editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.MODE_SOURCE && editor.getMode() !== jodit_core_constants__WEBPACK_IMPORTED_MODULE_2__.MODE_SPLIT) {
|
|
42955
|
+
return;
|
|
42956
|
+
}
|
|
42957
|
+
loading = true;
|
|
42958
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_6__.loadNext)(editor, editor.o.beautifyHTMLCDNUrlsJS).then(()=>{
|
|
42959
|
+
// The source view was filled before the
|
|
42960
|
+
// beautifier arrived — format it now.
|
|
42961
|
+
if (addEventListener()) {
|
|
42962
|
+
this.syncValueFromWYSIWYG(true);
|
|
42963
|
+
}
|
|
42964
|
+
}, ()=>null);
|
|
42965
|
+
};
|
|
42966
|
+
editor.e.on('afterSetMode.source', loadBeautify);
|
|
42967
|
+
loadBeautify();
|
|
42922
42968
|
}
|
|
42923
42969
|
}
|
|
42924
42970
|
this.syncValueFromWYSIWYG(true);
|