jodit 4.13.8 → 4.13.9
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 +6 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +69 -5
- package/es2015/jodit.min.js +3 -3
- 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 +3 -3
- package/es2018/jodit.min.js +3 -3
- 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 +4 -3
- package/es2021/jodit.js +68 -5
- package/es2021/jodit.min.js +4 -3
- 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 +4 -3
- package/es2021.en/jodit.js +68 -5
- package/es2021.en/jodit.min.js +4 -3
- 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 +118 -14
- 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/config.d.ts +10 -0
- package/esm/core/constants.js +1 -1
- package/esm/plugins/mobile/config.d.ts +10 -0
- package/esm/plugins/mobile/mobile.js +72 -4
- package/package.json +1 -1
- package/types/config.d.ts +10 -0
- package/types/plugins/mobile/config.d.ts +10 -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.13.
|
|
4
|
+
* Version: v4.13.9
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -2107,7 +2107,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2107
2107
|
* @packageDocumentation
|
|
2108
2108
|
* @module constants
|
|
2109
2109
|
*/
|
|
2110
|
-
var APP_VERSION = "4.13.
|
|
2110
|
+
var APP_VERSION = "4.13.9";
|
|
2111
2111
|
// prettier-ignore
|
|
2112
2112
|
var ES = "es5";
|
|
2113
2113
|
var IS_ES_MODERN = false;
|
|
@@ -43417,10 +43417,11 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.dots = {
|
|
|
43417
43417
|
|
|
43418
43418
|
"use strict";
|
|
43419
43419
|
/* unused harmony export mobile */
|
|
43420
|
-
/* harmony import */ var
|
|
43421
|
-
/* harmony import */ var
|
|
43422
|
-
/* harmony import */ var
|
|
43423
|
-
/* harmony import */ var
|
|
43420
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(42395);
|
|
43421
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28077);
|
|
43422
|
+
/* harmony import */ var jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65946);
|
|
43423
|
+
/* harmony import */ var jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2496);
|
|
43424
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(3244);
|
|
43424
43425
|
/*!
|
|
43425
43426
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
43426
43427
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -43433,10 +43434,113 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.dots = {
|
|
|
43433
43434
|
|
|
43434
43435
|
|
|
43435
43436
|
|
|
43437
|
+
|
|
43438
|
+
var isButtonSeparator = function isButtonSeparator(item) {
|
|
43439
|
+
return item === '|' || item === '---' || item === '\n';
|
|
43440
|
+
};
|
|
43441
|
+
/**
|
|
43442
|
+
* Constrain a responsive breakpoint set (`buttonsMD/SM/XS`) to the buttons the
|
|
43443
|
+
* user actually asked for via `buttons`. Those breakpoint defaults are
|
|
43444
|
+
* group-based supersets, so a custom (smaller) `buttons` list would otherwise
|
|
43445
|
+
* see *extra* buttons appear on resize when the toolbar switched to a breakpoint
|
|
43446
|
+
* set — resizing must only ever drop buttons, never add ones outside `buttons`.
|
|
43447
|
+
*
|
|
43448
|
+
* When the breakpoint set introduces nothing outside `buttons` (the default
|
|
43449
|
+
* case, where `buttons` is the full superset), the list is returned untouched so
|
|
43450
|
+
* the standard grouped mobile layout — groups, separators and `dots` — is
|
|
43451
|
+
* preserved. See #1389.
|
|
43452
|
+
*/ function fitToButtons(list, editor) {
|
|
43453
|
+
var allowed = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons), editor);
|
|
43454
|
+
var groups = editor.getRegisteredButtonGroups();
|
|
43455
|
+
var changed = false;
|
|
43456
|
+
var hadDots = false;
|
|
43457
|
+
var flat = [];
|
|
43458
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
43459
|
+
try {
|
|
43460
|
+
for(var _iterator = list[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
43461
|
+
var item = _step.value;
|
|
43462
|
+
if ((0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__.isButtonGroup)(item)) {
|
|
43463
|
+
var _flat;
|
|
43464
|
+
var _groups_item_group;
|
|
43465
|
+
var members = (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(item.buttons).concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)((_groups_item_group = groups[item.group]) !== null && _groups_item_group !== void 0 ? _groups_item_group : []));
|
|
43466
|
+
var kept = members.filter(function(button) {
|
|
43467
|
+
return allowed.has(button);
|
|
43468
|
+
});
|
|
43469
|
+
if (kept.length !== members.length) {
|
|
43470
|
+
changed = true;
|
|
43471
|
+
}
|
|
43472
|
+
(_flat = flat).push.apply(_flat, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(kept));
|
|
43473
|
+
} else if (isButtonSeparator(item)) {
|
|
43474
|
+
flat.push(item);
|
|
43475
|
+
} else if (item === 'dots') {
|
|
43476
|
+
hadDots = true;
|
|
43477
|
+
} else if (allowed.has(item)) {
|
|
43478
|
+
flat.push(item);
|
|
43479
|
+
} else {
|
|
43480
|
+
changed = true;
|
|
43481
|
+
}
|
|
43482
|
+
}
|
|
43483
|
+
} catch (err) {
|
|
43484
|
+
_didIteratorError = true;
|
|
43485
|
+
_iteratorError = err;
|
|
43486
|
+
} finally{
|
|
43487
|
+
try {
|
|
43488
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
43489
|
+
_iterator.return();
|
|
43490
|
+
}
|
|
43491
|
+
} finally{
|
|
43492
|
+
if (_didIteratorError) {
|
|
43493
|
+
throw _iteratorError;
|
|
43494
|
+
}
|
|
43495
|
+
}
|
|
43496
|
+
}
|
|
43497
|
+
if (!changed) {
|
|
43498
|
+
return list;
|
|
43499
|
+
}
|
|
43500
|
+
// Drop separators left dangling once the buttons around them were removed.
|
|
43501
|
+
var cleaned = [];
|
|
43502
|
+
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = undefined;
|
|
43503
|
+
try {
|
|
43504
|
+
for(var _iterator1 = flat[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true){
|
|
43505
|
+
var item1 = _step1.value;
|
|
43506
|
+
if (isButtonSeparator(item1) && (cleaned.length === 0 || isButtonSeparator(cleaned[cleaned.length - 1]))) {
|
|
43507
|
+
continue;
|
|
43508
|
+
}
|
|
43509
|
+
cleaned.push(item1);
|
|
43510
|
+
}
|
|
43511
|
+
} catch (err) {
|
|
43512
|
+
_didIteratorError1 = true;
|
|
43513
|
+
_iteratorError1 = err;
|
|
43514
|
+
} finally{
|
|
43515
|
+
try {
|
|
43516
|
+
if (!_iteratorNormalCompletion1 && _iterator1.return != null) {
|
|
43517
|
+
_iterator1.return();
|
|
43518
|
+
}
|
|
43519
|
+
} finally{
|
|
43520
|
+
if (_didIteratorError1) {
|
|
43521
|
+
throw _iteratorError1;
|
|
43522
|
+
}
|
|
43523
|
+
}
|
|
43524
|
+
}
|
|
43525
|
+
while(cleaned.length && isButtonSeparator(cleaned[cleaned.length - 1])){
|
|
43526
|
+
cleaned.pop();
|
|
43527
|
+
}
|
|
43528
|
+
// Keep the "show all" overflow button only if some requested button is still
|
|
43529
|
+
// hidden at this breakpoint.
|
|
43530
|
+
if (hadDots) {
|
|
43531
|
+
var shown = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__.flatButtonsSet)(cleaned, editor);
|
|
43532
|
+
if ((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.toArray)(allowed).some(function(button) {
|
|
43533
|
+
return !shown.has(button);
|
|
43534
|
+
})) {
|
|
43535
|
+
cleaned.push('dots');
|
|
43536
|
+
}
|
|
43537
|
+
}
|
|
43538
|
+
return cleaned;
|
|
43539
|
+
}
|
|
43436
43540
|
/**
|
|
43437
43541
|
* Rebuild toolbar in depends on editor's width
|
|
43438
43542
|
*/ function mobile(editor) {
|
|
43439
|
-
var timeout = 0, store = (0,
|
|
43543
|
+
var timeout = 0, store = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons);
|
|
43440
43544
|
if (editor.o.mobileTapTimeout) {
|
|
43441
43545
|
// Emulate double tap
|
|
43442
43546
|
editor.e.on('touchend', function(e) {
|
|
@@ -43453,8 +43557,8 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.dots = {
|
|
|
43453
43557
|
}
|
|
43454
43558
|
editor.e.on('getDiffButtons.mobile', function(toolbar) {
|
|
43455
43559
|
if (toolbar === editor.toolbar) {
|
|
43456
|
-
var buttons = (0,
|
|
43457
|
-
return (0,
|
|
43560
|
+
var buttons = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__.flatButtonsSet)((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons), editor), flatStore = (0,jodit_core_ui_helpers_buttons__WEBPACK_IMPORTED_MODULE_3__.flatButtonsSet)(store, editor);
|
|
43561
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.toArray)(buttons).reduce(function(acc, item) {
|
|
43458
43562
|
if (!flatStore.has(item)) {
|
|
43459
43563
|
acc.push(item);
|
|
43460
43564
|
}
|
|
@@ -43471,15 +43575,15 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.dots = {
|
|
|
43471
43575
|
var width = ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
43472
43576
|
var newStore = function() {
|
|
43473
43577
|
if (editor.isFullSize || width >= editor.o.sizeLG) {
|
|
43474
|
-
return (0,
|
|
43578
|
+
return (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttons);
|
|
43475
43579
|
}
|
|
43476
43580
|
if (width >= editor.o.sizeMD) {
|
|
43477
|
-
return (0,
|
|
43581
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsMD), editor);
|
|
43478
43582
|
}
|
|
43479
43583
|
if (width >= editor.o.sizeSM) {
|
|
43480
|
-
return (0,
|
|
43584
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsSM), editor);
|
|
43481
43585
|
}
|
|
43482
|
-
return (0,
|
|
43586
|
+
return fitToButtons((0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_2__.splitArray)(editor.o.buttonsXS), editor);
|
|
43483
43587
|
}();
|
|
43484
43588
|
if (newStore.toString() !== store.toString()) {
|
|
43485
43589
|
var _editor_toolbar;
|
|
@@ -43492,7 +43596,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.dots = {
|
|
|
43492
43596
|
});
|
|
43493
43597
|
}
|
|
43494
43598
|
}
|
|
43495
|
-
|
|
43599
|
+
jodit_core_global__WEBPACK_IMPORTED_MODULE_1__.pluginSystem.add('mobile', mobile);
|
|
43496
43600
|
|
|
43497
43601
|
|
|
43498
43602
|
/***/ }),
|
package/es5/jodit.min.css
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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.13.
|
|
4
|
+
* Version: v4.13.9
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
8
8
|
/*!
|
|
9
9
|
* jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser
|
|
10
10
|
* Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/)
|
|
11
|
-
* Version: v4.13.
|
|
11
|
+
* Version: v4.13.9
|
|
12
12
|
* Url: https://xdsoft.net/jodit/
|
|
13
13
|
* License(s): MIT
|
|
14
14
|
*/
|