jodit 4.2.27 → 4.2.33
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/.nvmrc +1 -1
- package/CHANGELOG.md +110 -5
- package/es2015/jodit.css +11 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +354 -243
- 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 +25 -18
- package/es2015/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2018/jodit.css +11 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +347 -236
- 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 +25 -18
- package/es2018/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021/jodit.css +11 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +347 -236
- 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 +25 -18
- package/es2021/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es2021.en/jodit.css +11 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +322 -230
- 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 +25 -18
- package/es2021.en/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/es5/164.fat.min.js +10 -0
- package/es5/164.js +4939 -0
- package/es5/164.min.js +10 -0
- package/es5/5.fat.min.js +10 -0
- package/es5/5.js +76 -0
- package/es5/5.min.js +10 -0
- package/es5/jodit.css +12 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +777 -5685
- 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 +26 -19
- package/es5/plugins/speech-recognize/speech-recognize.min.js +2 -2
- package/esm/config.js +3 -7
- package/esm/core/async/async.js +2 -1
- package/esm/core/constants.d.ts +2 -0
- package/esm/core/constants.js +10 -6
- package/esm/core/decorators/watch/watch.js +0 -1
- package/esm/core/dom/dom.js +2 -2
- package/esm/core/event-emitter/event-emitter.js +3 -3
- package/esm/core/global.js +13 -3
- package/esm/core/helpers/array/to-array.d.ts +1 -6
- package/esm/core/helpers/array/to-array.js +1 -1
- package/esm/core/helpers/async/set-timeout.d.ts +0 -3
- package/esm/core/helpers/async/set-timeout.js +3 -2
- package/esm/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/esm/core/helpers/checker/has-browser-color-picker.js +2 -1
- package/esm/core/helpers/checker/is-url.d.ts +0 -3
- package/esm/core/helpers/checker/is-url.js +2 -1
- package/esm/core/helpers/html/apply-styles.js +3 -3
- package/esm/core/helpers/html/clean-from-word.js +2 -1
- package/esm/core/helpers/html/htmlspecialchars.d.ts +0 -3
- package/esm/core/helpers/html/htmlspecialchars.js +2 -1
- package/esm/core/helpers/normalize/normalize-size.d.ts +1 -1
- package/esm/core/helpers/size/get-scroll-parent.js +3 -2
- package/esm/core/helpers/utils/complete-url.js +2 -1
- package/esm/core/helpers/utils/convert-media-url-to-video-embed.js +2 -1
- package/esm/core/helpers/utils/default-language.js +3 -2
- package/esm/core/helpers/utils/reset.js +3 -3
- package/esm/core/request/ajax.js +2 -1
- package/esm/core/selection/selection.js +1 -0
- package/esm/core/selection/style/api/has-same-style.js +15 -10
- package/esm/core/selection/style/api/toggle-attributes.js +2 -1
- package/esm/core/selection/style/commit-style.d.ts +1 -1
- package/esm/core/ui/form/inputs/file/file.d.ts +1 -0
- package/esm/core/ui/form/inputs/file/file.js +1 -0
- package/esm/core/ui/form/validators/input.d.ts +3 -3
- package/esm/core/ui/form/validators/select.d.ts +1 -1
- package/esm/jodit.js +3 -0
- package/esm/modules/file-browser/config.js +9 -1
- package/esm/modules/file-browser/data-provider.js +0 -1
- package/esm/modules/file-browser/file-browser.js +0 -1
- package/esm/modules/table/table.js +0 -1
- package/esm/modules/toolbar/button/button.d.ts +1 -1
- package/esm/plugins/backspace/cases/check-remove-char.js +1 -0
- package/esm/plugins/clean-html/config.d.ts +3 -3
- package/esm/plugins/iframe/config.d.ts +15 -3
- package/esm/plugins/iframe/config.js +1 -0
- package/esm/plugins/iframe/iframe.js +3 -0
- package/esm/plugins/indent/helpers.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/a.d.ts +2 -2
- package/esm/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/esm/plugins/inline-popup/config/items/img.d.ts +1 -1
- package/esm/plugins/search/config.js +2 -2
- package/esm/plugins/search/helpers/highlight-text-ranges.d.ts +2 -1
- package/esm/plugins/search/helpers/highlight-text-ranges.js +15 -4
- package/esm/plugins/search/search.d.ts +2 -2
- package/esm/plugins/search/search.js +8 -7
- package/esm/plugins/search/ui/search.js +3 -3
- package/esm/plugins/source/editor/engines/ace.d.ts +0 -1
- package/esm/plugins/speech-recognize/config.js +1 -1
- package/esm/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/esm/plugins/speech-recognize/helpers/api.js +5 -2
- package/esm/plugins/speech-recognize/helpers/sound.js +6 -4
- package/esm/plugins/stat/config.d.ts +1 -0
- package/esm/plugins/stat/config.js +1 -0
- package/esm/plugins/stat/stat.js +14 -3
- package/esm/plugins/symbols/langs/index.d.ts +2 -1
- package/esm/plugins/symbols/langs/index.js +2 -1
- package/esm/plugins/symbols/langs/ua.d.ts +1 -0
- package/esm/plugins/symbols/langs/ua.js +9 -0
- package/esm/polyfills.d.ts +10 -0
- package/esm/polyfills.js +54 -0
- package/esm/tsconfig.json +1 -1
- package/package.json +1 -1
- package/types/core/constants.d.ts +2 -0
- package/types/core/helpers/array/to-array.d.ts +1 -6
- package/types/core/helpers/async/set-timeout.d.ts +0 -3
- package/types/core/helpers/checker/has-browser-color-picker.d.ts +0 -3
- package/types/core/helpers/checker/is-url.d.ts +0 -3
- package/types/core/helpers/html/htmlspecialchars.d.ts +0 -3
- package/types/core/helpers/normalize/normalize-size.d.ts +1 -1
- package/types/core/selection/style/commit-style.d.ts +1 -1
- package/types/core/ui/form/inputs/file/file.d.ts +1 -0
- package/types/core/ui/form/validators/input.d.ts +3 -3
- package/types/core/ui/form/validators/select.d.ts +1 -1
- package/types/modules/toolbar/button/button.d.ts +1 -1
- package/types/plugins/clean-html/config.d.ts +3 -3
- package/types/plugins/iframe/config.d.ts +15 -3
- package/types/plugins/indent/helpers.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/a.d.ts +2 -2
- package/types/plugins/inline-popup/config/items/cells.d.ts +1 -1
- package/types/plugins/inline-popup/config/items/img.d.ts +1 -1
- package/types/plugins/search/helpers/highlight-text-ranges.d.ts +2 -1
- package/types/plugins/search/search.d.ts +2 -2
- package/types/plugins/source/editor/engines/ace.d.ts +0 -1
- package/types/plugins/speech-recognize/helpers/api.d.ts +1 -1
- package/types/plugins/stat/config.d.ts +1 -0
- package/types/plugins/symbols/langs/index.d.ts +2 -1
- package/types/plugins/symbols/langs/ua.d.ts +1 -0
- package/types/polyfills.d.ts +10 -0
- package/types/tsconfig.json +1 -1
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.2.
|
|
4
|
+
* Version: v4.2.33
|
|
5
5
|
* Url: https://xdsoft.net/jodit/
|
|
6
6
|
* License(s): MIT
|
|
7
7
|
*/
|
|
@@ -247,16 +247,12 @@ class Config {
|
|
|
247
247
|
showPlaceholder: false
|
|
248
248
|
}
|
|
249
249
|
};
|
|
250
|
-
this.ownerDocument =
|
|
251
|
-
? document
|
|
252
|
-
: null);
|
|
250
|
+
this.ownerDocument = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
|
|
253
251
|
/**
|
|
254
252
|
* Allows you to specify the window in which the editor will be created. Default - window
|
|
255
253
|
* This is necessary if you are creating the editor inside an iframe but the code is running in the parent window
|
|
256
254
|
*/
|
|
257
|
-
this.ownerWindow =
|
|
258
|
-
? window
|
|
259
|
-
: null);
|
|
255
|
+
this.ownerWindow = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow;
|
|
260
256
|
/**
|
|
261
257
|
* Shadow root if Jodit was created in it
|
|
262
258
|
*
|
|
@@ -1030,16 +1026,16 @@ Config.prototype.controls = {};
|
|
|
1030
1026
|
/* harmony export */ j: function() { return /* binding */ Async; }
|
|
1031
1027
|
/* harmony export */ });
|
|
1032
1028
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
1033
|
-
/* harmony import */ var
|
|
1029
|
+
/* harmony import */ var jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(89044);
|
|
1034
1030
|
/* harmony import */ var jodit_core_helpers_checker_is_abort_error__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99951);
|
|
1035
1031
|
/* harmony import */ var jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(69052);
|
|
1036
|
-
/* harmony import */ var
|
|
1032
|
+
/* harmony import */ var jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(2461);
|
|
1037
1033
|
/* harmony import */ var jodit_core_helpers_checker_is_plain_object__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(25376);
|
|
1038
1034
|
/* harmony import */ var jodit_core_helpers_checker_is_promise__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(92039);
|
|
1039
1035
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(98253);
|
|
1040
|
-
/* harmony import */ var
|
|
1041
|
-
/* harmony import */ var
|
|
1042
|
-
/* harmony import */ var
|
|
1036
|
+
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(35642);
|
|
1037
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
1038
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
1043
1039
|
/* harmony import */ var jodit_core_helpers_utils_error_errors_abort_error__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(21567);
|
|
1044
1040
|
/*!
|
|
1045
1041
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
@@ -1089,17 +1085,18 @@ class Async {
|
|
|
1089
1085
|
return 0;
|
|
1090
1086
|
}
|
|
1091
1087
|
let options = {};
|
|
1092
|
-
if ((0,
|
|
1088
|
+
if ((0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(timeout)) {
|
|
1093
1089
|
timeout = 0;
|
|
1094
1090
|
}
|
|
1095
|
-
if (!(0,
|
|
1091
|
+
if (!(0,jodit_core_helpers_checker_is_number__WEBPACK_IMPORTED_MODULE_4__/* .isNumber */ .E)(timeout)) {
|
|
1096
1092
|
options = timeout;
|
|
1097
1093
|
timeout = options.timeout || 0;
|
|
1098
1094
|
}
|
|
1099
1095
|
if (options.label) {
|
|
1100
1096
|
this.clearLabel(options.label);
|
|
1101
1097
|
}
|
|
1102
|
-
const timer = (0,
|
|
1098
|
+
const timer = (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .setTimeout */ .w)(callback, timeout, ...args);
|
|
1099
|
+
const key = options.label || timer;
|
|
1103
1100
|
this.timers.set(key, timer);
|
|
1104
1101
|
this.__callbacks.set(key, callback);
|
|
1105
1102
|
return timer;
|
|
@@ -1115,7 +1112,7 @@ class Async {
|
|
|
1115
1112
|
}
|
|
1116
1113
|
clearLabel(label) {
|
|
1117
1114
|
if (label && this.timers.has(label)) {
|
|
1118
|
-
(0,
|
|
1115
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(label));
|
|
1119
1116
|
this.timers.delete(label);
|
|
1120
1117
|
this.__callbacks.delete(label);
|
|
1121
1118
|
}
|
|
@@ -1124,7 +1121,7 @@ class Async {
|
|
|
1124
1121
|
if ((0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(timerOrLabel)) {
|
|
1125
1122
|
return this.clearLabel(timerOrLabel);
|
|
1126
1123
|
}
|
|
1127
|
-
(0,
|
|
1124
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timerOrLabel);
|
|
1128
1125
|
this.timers.delete(timerOrLabel);
|
|
1129
1126
|
this.__callbacks.delete(timerOrLabel);
|
|
1130
1127
|
}
|
|
@@ -1166,7 +1163,7 @@ class Async {
|
|
|
1166
1163
|
if (!timer && firstCallImmediately) {
|
|
1167
1164
|
callFn(...args);
|
|
1168
1165
|
}
|
|
1169
|
-
(0,
|
|
1166
|
+
(0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(timer);
|
|
1170
1167
|
timer = this.setTimeout(() => callFn(...args), (0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_7__/* .isFunction */ .T)(timeout) ? timeout() : timeout);
|
|
1171
1168
|
this.timers.set(fn, timer);
|
|
1172
1169
|
}
|
|
@@ -1320,7 +1317,7 @@ class Async {
|
|
|
1320
1317
|
clear() {
|
|
1321
1318
|
this.requestsIdle.forEach(key => this.cancelIdleCallback(key));
|
|
1322
1319
|
this.requestsRaf.forEach(key => this.cancelAnimationFrame(key));
|
|
1323
|
-
this.timers.forEach(key => (0,
|
|
1320
|
+
this.timers.forEach(key => (0,jodit_core_helpers_async__WEBPACK_IMPORTED_MODULE_1__/* .clearTimeout */ .D)(this.timers.get(key)));
|
|
1324
1321
|
this.timers.clear();
|
|
1325
1322
|
this.promisesRejections.forEach(reject => reject());
|
|
1326
1323
|
this.promisesRejections.clear();
|
|
@@ -1729,6 +1726,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1729
1726
|
/* harmony export */ TEXT_PLAIN: function() { return /* binding */ TEXT_PLAIN; },
|
|
1730
1727
|
/* harmony export */ TEXT_RTF: function() { return /* binding */ TEXT_RTF; },
|
|
1731
1728
|
/* harmony export */ TOKENS: function() { return /* binding */ TOKENS; },
|
|
1729
|
+
/* harmony export */ globalDocument: function() { return /* binding */ globalDocument; },
|
|
1730
|
+
/* harmony export */ globalWindow: function() { return /* binding */ globalWindow; },
|
|
1732
1731
|
/* harmony export */ lang: function() { return /* binding */ lang; }
|
|
1733
1732
|
/* harmony export */ });
|
|
1734
1733
|
/*!
|
|
@@ -1736,7 +1735,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1736
1735
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1737
1736
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1738
1737
|
*/
|
|
1739
|
-
const APP_VERSION = "4.2.
|
|
1738
|
+
const APP_VERSION = "4.2.33";
|
|
1740
1739
|
// prettier-ignore
|
|
1741
1740
|
const ES = "es2015";
|
|
1742
1741
|
const IS_ES_MODERN = true;
|
|
@@ -1755,6 +1754,10 @@ const INVISIBLE_SPACE_REG_EXP_START = () => /^[\uFEFF]+/g;
|
|
|
1755
1754
|
const SPACE_REG_EXP = () => /[\s\n\t\r\uFEFF\u200b]+/g;
|
|
1756
1755
|
const SPACE_REG_EXP_START = () => /^[\s\n\t\r\uFEFF\u200b]+/g;
|
|
1757
1756
|
const SPACE_REG_EXP_END = () => /[\s\n\t\r\uFEFF\u200b]+$/g;
|
|
1757
|
+
const globalWindow = typeof window !== 'undefined' ? window : undefined;
|
|
1758
|
+
const globalDocument = typeof document !== 'undefined'
|
|
1759
|
+
? document
|
|
1760
|
+
: undefined;
|
|
1758
1761
|
const IS_BLOCK = /^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i;
|
|
1759
1762
|
const IS_INLINE = /^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i;
|
|
1760
1763
|
const LIST_TAGS = new Set(['ul', 'ol']);
|
|
@@ -1879,8 +1882,8 @@ const INSERT_AS_TEXT = 'insert_as_text';
|
|
|
1879
1882
|
*/
|
|
1880
1883
|
const INSERT_ONLY_TEXT = 'insert_only_text';
|
|
1881
1884
|
const SAFE_COUNT_CHANGE_CALL = 10;
|
|
1882
|
-
const IS_MAC = typeof
|
|
1883
|
-
/Mac|iPod|iPhone|iPad/.test(
|
|
1885
|
+
const IS_MAC = typeof globalWindow !== 'undefined' &&
|
|
1886
|
+
/Mac|iPod|iPhone|iPad/.test(globalWindow.navigator.platform);
|
|
1884
1887
|
const KEY_ALIASES = {
|
|
1885
1888
|
add: '+',
|
|
1886
1889
|
break: 'pause',
|
|
@@ -1908,7 +1911,7 @@ const BASE_PATH = (() => {
|
|
|
1908
1911
|
if (typeof document === 'undefined') {
|
|
1909
1912
|
return '';
|
|
1910
1913
|
}
|
|
1911
|
-
const script =
|
|
1914
|
+
const script = globalDocument.currentScript, removeScriptName = (s) => {
|
|
1912
1915
|
const parts = s.split('/');
|
|
1913
1916
|
if (/\.js/.test(parts[parts.length - 1])) {
|
|
1914
1917
|
return parts.slice(0, parts.length - 1).join('/') + '/';
|
|
@@ -1918,11 +1921,11 @@ const BASE_PATH = (() => {
|
|
|
1918
1921
|
if (script) {
|
|
1919
1922
|
return removeScriptName(script.src);
|
|
1920
1923
|
}
|
|
1921
|
-
const scripts =
|
|
1924
|
+
const scripts = globalDocument.querySelectorAll('script[src]');
|
|
1922
1925
|
if (scripts && scripts.length) {
|
|
1923
1926
|
return removeScriptName(scripts[scripts.length - 1].src);
|
|
1924
1927
|
}
|
|
1925
|
-
return
|
|
1928
|
+
return globalWindow.location.href;
|
|
1926
1929
|
})();
|
|
1927
1930
|
const TEMP_ATTR = 'data-jodit-temp';
|
|
1928
1931
|
const lang = {};
|
|
@@ -2670,7 +2673,6 @@ function watch(observeFields, opts) {
|
|
|
2670
2673
|
const [objectPath, eventName] = field.split(':');
|
|
2671
2674
|
let ctx = context;
|
|
2672
2675
|
if (objectPath.length) {
|
|
2673
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
2674
2676
|
ctx = component.get(objectPath);
|
|
2675
2677
|
}
|
|
2676
2678
|
if ((0,jodit_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(ctx)) {
|
|
@@ -3335,7 +3337,7 @@ class Dom {
|
|
|
3335
3337
|
* Move all content to another element
|
|
3336
3338
|
*/
|
|
3337
3339
|
static moveContent(from, to, inStart = false, filter = () => true) {
|
|
3338
|
-
const fragment = (from.ownerDocument ||
|
|
3340
|
+
const fragment = (from.ownerDocument || jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument).createDocumentFragment();
|
|
3339
3341
|
(0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_1__/* .toArray */ .$)(from.childNodes)
|
|
3340
3342
|
.filter(elm => {
|
|
3341
3343
|
if (filter(elm)) {
|
|
@@ -3796,7 +3798,7 @@ class EventEmitter {
|
|
|
3796
3798
|
passive: true,
|
|
3797
3799
|
capture: (_a = options === null || options === void 0 ? void 0 : options.capture) !== null && _a !== void 0 ? _a : false
|
|
3798
3800
|
}
|
|
3799
|
-
: (_b = options === null || options === void 0 ? void 0 : options.capture) !== null && _b !== void 0 ? _b : false;
|
|
3801
|
+
: ((_b = options === null || options === void 0 ? void 0 : options.capture) !== null && _b !== void 0 ? _b : false);
|
|
3800
3802
|
syntheticCallback.options = eOpts;
|
|
3801
3803
|
subject.addEventListener(event, syntheticCallback, eOpts);
|
|
3802
3804
|
this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
|
|
@@ -4028,7 +4030,7 @@ class EventEmitter {
|
|
|
4028
4030
|
this.__domEventsMap = new Map();
|
|
4029
4031
|
this.__mutedEvents = new Set();
|
|
4030
4032
|
this.__key = '__JoditEventEmitterNamespaces';
|
|
4031
|
-
this.__doc =
|
|
4033
|
+
this.__doc = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument;
|
|
4032
4034
|
this.__prepareEvent = (e) => {
|
|
4033
4035
|
if (e.cancelBubble) {
|
|
4034
4036
|
return;
|
|
@@ -4525,9 +4527,19 @@ function getContainer(jodit, classFunc, tag = 'div', createInsideEditor = false)
|
|
|
4525
4527
|
const view = (0,jodit_core_helpers_checker_is_view_object__WEBPACK_IMPORTED_MODULE_6__/* .isViewObject */ .h)(jodit) ? jodit : jodit.j;
|
|
4526
4528
|
if (!data[key]) {
|
|
4527
4529
|
let c = view.c;
|
|
4528
|
-
let body
|
|
4529
|
-
|
|
4530
|
-
|
|
4530
|
+
let body;
|
|
4531
|
+
if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) && jodit.o.shadowRoot) {
|
|
4532
|
+
body = jodit.o.shadowRoot;
|
|
4533
|
+
}
|
|
4534
|
+
else {
|
|
4535
|
+
body = jodit.od.body;
|
|
4536
|
+
if ((0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit)) {
|
|
4537
|
+
const dialog = _dom__WEBPACK_IMPORTED_MODULE_3__/* .Dom */ .J.closest(jodit.container, 'dialog', jodit.od.body);
|
|
4538
|
+
if (dialog) {
|
|
4539
|
+
body = dialog;
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
}
|
|
4531
4543
|
if (createInsideEditor &&
|
|
4532
4544
|
(0,jodit_core_helpers_checker_is_jodit_object__WEBPACK_IMPORTED_MODULE_7__/* .isJoditObject */ .y)(jodit) &&
|
|
4533
4545
|
jodit.od !== jodit.ed) {
|
|
@@ -4682,7 +4694,7 @@ const toArray = function toArray(...args) {
|
|
|
4682
4694
|
var _a;
|
|
4683
4695
|
const func = (0,jodit_core_helpers_checker_is_native_function__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from)
|
|
4684
4696
|
? Array.from
|
|
4685
|
-
: (_a = (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from')) !== null && _a !== void 0 ? _a : Array.from;
|
|
4697
|
+
: ((_a = (0,jodit_core_helpers_utils_reset__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from')) !== null && _a !== void 0 ? _a : Array.from);
|
|
4686
4698
|
return func.apply(Array, args);
|
|
4687
4699
|
};
|
|
4688
4700
|
|
|
@@ -4719,6 +4731,7 @@ const toArray = function toArray(...args) {
|
|
|
4719
4731
|
/* harmony export */ D: function() { return /* binding */ clearTimeout; },
|
|
4720
4732
|
/* harmony export */ w: function() { return /* binding */ setTimeout; }
|
|
4721
4733
|
/* harmony export */ });
|
|
4734
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
4722
4735
|
/*!
|
|
4723
4736
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
4724
4737
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -4727,6 +4740,7 @@ const toArray = function toArray(...args) {
|
|
|
4727
4740
|
/**
|
|
4728
4741
|
* @module helpers/async
|
|
4729
4742
|
*/
|
|
4743
|
+
|
|
4730
4744
|
/**
|
|
4731
4745
|
* Create async callback if set timeout value - else call function immediately
|
|
4732
4746
|
*/
|
|
@@ -4735,7 +4749,7 @@ function setTimeout(callback, timeout, ...args) {
|
|
|
4735
4749
|
callback.call(null, ...args);
|
|
4736
4750
|
}
|
|
4737
4751
|
else {
|
|
4738
|
-
return
|
|
4752
|
+
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.setTimeout(callback, timeout, ...args);
|
|
4739
4753
|
}
|
|
4740
4754
|
return 0;
|
|
4741
4755
|
}
|
|
@@ -4743,7 +4757,7 @@ function setTimeout(callback, timeout, ...args) {
|
|
|
4743
4757
|
* Clear timeout
|
|
4744
4758
|
*/
|
|
4745
4759
|
function clearTimeout(timer) {
|
|
4746
|
-
|
|
4760
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.clearTimeout(timer);
|
|
4747
4761
|
}
|
|
4748
4762
|
|
|
4749
4763
|
|
|
@@ -4756,6 +4770,7 @@ function clearTimeout(timer) {
|
|
|
4756
4770
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
4757
4771
|
/* harmony export */ k: function() { return /* binding */ hasBrowserColorPicker; }
|
|
4758
4772
|
/* harmony export */ });
|
|
4773
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
4759
4774
|
/*!
|
|
4760
4775
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
4761
4776
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -4764,13 +4779,14 @@ function clearTimeout(timer) {
|
|
|
4764
4779
|
/**
|
|
4765
4780
|
* @module helpers/checker
|
|
4766
4781
|
*/
|
|
4782
|
+
|
|
4767
4783
|
/**
|
|
4768
4784
|
* Check if browser has a color picker (a new HTML5 attribute for input tag)
|
|
4769
4785
|
*/
|
|
4770
4786
|
function hasBrowserColorPicker() {
|
|
4771
4787
|
let supportsColor = true;
|
|
4772
4788
|
try {
|
|
4773
|
-
const a =
|
|
4789
|
+
const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('input');
|
|
4774
4790
|
a.type = 'color';
|
|
4775
4791
|
a.value = '!';
|
|
4776
4792
|
supportsColor = a.type === 'color' && a.value !== '!';
|
|
@@ -5420,6 +5436,7 @@ function isStringArray(value) {
|
|
|
5420
5436
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5421
5437
|
/* harmony export */ m: function() { return /* binding */ isURL; }
|
|
5422
5438
|
/* harmony export */ });
|
|
5439
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5423
5440
|
/*!
|
|
5424
5441
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5425
5442
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5428,6 +5445,7 @@ function isStringArray(value) {
|
|
|
5428
5445
|
/**
|
|
5429
5446
|
* @module helpers/checker
|
|
5430
5447
|
*/
|
|
5448
|
+
|
|
5431
5449
|
/**
|
|
5432
5450
|
* Check if a string is an url
|
|
5433
5451
|
*/
|
|
@@ -5444,7 +5462,7 @@ function isURL(str) {
|
|
|
5444
5462
|
return false;
|
|
5445
5463
|
}
|
|
5446
5464
|
}
|
|
5447
|
-
const a =
|
|
5465
|
+
const a = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a');
|
|
5448
5466
|
a.href = str;
|
|
5449
5467
|
return Boolean(a.hostname);
|
|
5450
5468
|
}
|
|
@@ -5679,9 +5697,9 @@ function applyStyles(html) {
|
|
|
5679
5697
|
}
|
|
5680
5698
|
html = html.substring(html.indexOf('<html '), html.length);
|
|
5681
5699
|
html = html.substring(0, html.lastIndexOf('</html>') + '</html>'.length);
|
|
5682
|
-
const iframe =
|
|
5700
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
5683
5701
|
iframe.style.display = 'none';
|
|
5684
|
-
|
|
5702
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
|
|
5685
5703
|
let convertedString = '', collection = [];
|
|
5686
5704
|
try {
|
|
5687
5705
|
const iframeDoc = iframe.contentDocument ||
|
|
@@ -5752,9 +5770,10 @@ function applyStyles(html) {
|
|
|
5752
5770
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5753
5771
|
/* harmony export */ w: function() { return /* binding */ cleanFromWord; }
|
|
5754
5772
|
/* harmony export */ });
|
|
5755
|
-
/* harmony import */ var
|
|
5756
|
-
/* harmony import */ var
|
|
5757
|
-
/* harmony import */ var
|
|
5773
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5774
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
5775
|
+
/* harmony import */ var jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(42448);
|
|
5776
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59101);
|
|
5758
5777
|
/*!
|
|
5759
5778
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5760
5779
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5766,6 +5785,7 @@ function applyStyles(html) {
|
|
|
5766
5785
|
|
|
5767
5786
|
|
|
5768
5787
|
|
|
5788
|
+
|
|
5769
5789
|
/**
|
|
5770
5790
|
* The method automatically cleans up content from Microsoft Word and other HTML sources to ensure clean, compliant
|
|
5771
5791
|
* content that matches the look and feel of the site.
|
|
@@ -5777,11 +5797,11 @@ function cleanFromWord(html) {
|
|
|
5777
5797
|
}
|
|
5778
5798
|
let convertedString = '';
|
|
5779
5799
|
try {
|
|
5780
|
-
const div =
|
|
5800
|
+
const div = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5781
5801
|
div.innerHTML = html;
|
|
5782
5802
|
const marks = [];
|
|
5783
5803
|
if (div.firstChild) {
|
|
5784
|
-
|
|
5804
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.each(div, node => {
|
|
5785
5805
|
if (!node) {
|
|
5786
5806
|
return;
|
|
5787
5807
|
}
|
|
@@ -5796,10 +5816,10 @@ function cleanFromWord(html) {
|
|
|
5796
5816
|
case 'W:SDT':
|
|
5797
5817
|
case 'W:SDTPR':
|
|
5798
5818
|
case 'FONT':
|
|
5799
|
-
|
|
5819
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(node);
|
|
5800
5820
|
break;
|
|
5801
5821
|
default:
|
|
5802
|
-
(0,
|
|
5822
|
+
(0,jodit_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_2__/* .toArray */ .$)(node.attributes).forEach((attr) => {
|
|
5803
5823
|
if ([
|
|
5804
5824
|
'src',
|
|
5805
5825
|
'href',
|
|
@@ -5818,14 +5838,14 @@ function cleanFromWord(html) {
|
|
|
5818
5838
|
}
|
|
5819
5839
|
});
|
|
5820
5840
|
}
|
|
5821
|
-
|
|
5841
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove.apply(null, marks);
|
|
5822
5842
|
convertedString = div.innerHTML;
|
|
5823
5843
|
}
|
|
5824
5844
|
catch (e) { }
|
|
5825
5845
|
if (convertedString) {
|
|
5826
5846
|
html = convertedString;
|
|
5827
5847
|
}
|
|
5828
|
-
html = html.split(/(\n)/).filter(
|
|
5848
|
+
html = html.split(/(\n)/).filter(jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq).join('\n');
|
|
5829
5849
|
return html
|
|
5830
5850
|
.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g, '')
|
|
5831
5851
|
.replace(/<!--[^>]*>/g, '');
|
|
@@ -5841,6 +5861,7 @@ function cleanFromWord(html) {
|
|
|
5841
5861
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
5842
5862
|
/* harmony export */ G: function() { return /* binding */ htmlspecialchars; }
|
|
5843
5863
|
/* harmony export */ });
|
|
5864
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
5844
5865
|
/*!
|
|
5845
5866
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
5846
5867
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -5849,11 +5870,12 @@ function cleanFromWord(html) {
|
|
|
5849
5870
|
/**
|
|
5850
5871
|
* @module helpers/html
|
|
5851
5872
|
*/
|
|
5873
|
+
|
|
5852
5874
|
/**
|
|
5853
5875
|
* Convert special characters to HTML entities
|
|
5854
5876
|
*/
|
|
5855
5877
|
function htmlspecialchars(html) {
|
|
5856
|
-
const tmp =
|
|
5878
|
+
const tmp = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
5857
5879
|
tmp.textContent = html;
|
|
5858
5880
|
return tmp.innerHTML;
|
|
5859
5881
|
}
|
|
@@ -6574,8 +6596,9 @@ const getContentWidth = (element, win) => {
|
|
|
6574
6596
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
6575
6597
|
/* harmony export */ m: function() { return /* binding */ getScrollParent; }
|
|
6576
6598
|
/* harmony export */ });
|
|
6577
|
-
/* harmony import */ var
|
|
6578
|
-
/* harmony import */ var
|
|
6599
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
6600
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
6601
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97369);
|
|
6579
6602
|
/*!
|
|
6580
6603
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
6581
6604
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -6583,19 +6606,20 @@ const getContentWidth = (element, win) => {
|
|
|
6583
6606
|
*/
|
|
6584
6607
|
|
|
6585
6608
|
|
|
6609
|
+
|
|
6586
6610
|
function getScrollParent(node) {
|
|
6587
6611
|
if (!node) {
|
|
6588
6612
|
return null;
|
|
6589
6613
|
}
|
|
6590
|
-
const isElement =
|
|
6591
|
-
const overflowY = isElement && (0,
|
|
6614
|
+
const isElement = jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(node);
|
|
6615
|
+
const overflowY = isElement && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_2__.css)(node, 'overflowY');
|
|
6592
6616
|
const isScrollable = isElement && overflowY !== 'visible' && overflowY !== 'hidden';
|
|
6593
6617
|
if (isScrollable && node.scrollHeight >= node.clientHeight) {
|
|
6594
6618
|
return node;
|
|
6595
6619
|
}
|
|
6596
6620
|
return (getScrollParent(node.parentNode) ||
|
|
6597
|
-
|
|
6598
|
-
|
|
6621
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.scrollingElement ||
|
|
6622
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body);
|
|
6599
6623
|
}
|
|
6600
6624
|
|
|
6601
6625
|
|
|
@@ -7278,9 +7302,9 @@ function alignElement(command, box) {
|
|
|
7278
7302
|
/* harmony export */ w4: function() { return /* binding */ appendScriptAsync; },
|
|
7279
7303
|
/* harmony export */ x_: function() { return /* binding */ loadNextStyle; }
|
|
7280
7304
|
/* harmony export */ });
|
|
7281
|
-
/* harmony import */ var
|
|
7305
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
7282
7306
|
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(98253);
|
|
7283
|
-
/* harmony import */ var
|
|
7307
|
+
/* harmony import */ var _complete_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(60346);
|
|
7284
7308
|
/*!
|
|
7285
7309
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7286
7310
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7291,7 +7315,7 @@ function alignElement(command, box) {
|
|
|
7291
7315
|
|
|
7292
7316
|
const alreadyLoadedList = new Map();
|
|
7293
7317
|
const cacheLoaders = (loader) => {
|
|
7294
|
-
return (jodit, url) => (0,
|
|
7318
|
+
return (jodit, url) => (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__awaiter */ .sH)(void 0, void 0, void 0, function* () {
|
|
7295
7319
|
if (alreadyLoadedList.has(url)) {
|
|
7296
7320
|
return alreadyLoadedList.get(url);
|
|
7297
7321
|
}
|
|
@@ -7313,7 +7337,7 @@ const appendScriptAsync = cacheLoaders((jodit, url) => {
|
|
|
7313
7337
|
crossorigin: 'anonymous',
|
|
7314
7338
|
referrerpolicy: 'no-referrer',
|
|
7315
7339
|
async: true,
|
|
7316
|
-
src: (0,
|
|
7340
|
+
src: (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url)
|
|
7317
7341
|
});
|
|
7318
7342
|
jodit.od.body.appendChild(script);
|
|
7319
7343
|
jodit.e.on(script, 'error', reject).on(script, 'load', resolve);
|
|
@@ -7334,7 +7358,7 @@ const appendStyleAsync = cacheLoaders((jodit, url) => {
|
|
|
7334
7358
|
const callback = () => resolve(link);
|
|
7335
7359
|
!jodit.isInDestruct &&
|
|
7336
7360
|
jodit.e.on(link, 'load', callback).on(link, 'error', reject);
|
|
7337
|
-
link.href = (0,
|
|
7361
|
+
link.href = (0,_complete_url__WEBPACK_IMPORTED_MODULE_0__/* .completeUrl */ .X)(url);
|
|
7338
7362
|
if (jodit.o.shadowRoot) {
|
|
7339
7363
|
jodit.o.shadowRoot.appendChild(link);
|
|
7340
7364
|
}
|
|
@@ -7522,16 +7546,18 @@ const buildQuery = (data, prefix) => {
|
|
|
7522
7546
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7523
7547
|
/* harmony export */ X: function() { return /* binding */ completeUrl; }
|
|
7524
7548
|
/* harmony export */ });
|
|
7549
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7525
7550
|
/*!
|
|
7526
7551
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7527
7552
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
7528
7553
|
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
7529
7554
|
*/
|
|
7555
|
+
|
|
7530
7556
|
/**
|
|
7531
7557
|
* @module helpers/utils
|
|
7532
7558
|
*/
|
|
7533
7559
|
const completeUrl = (url) => {
|
|
7534
|
-
if (
|
|
7560
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.location.protocol === 'file:' && /^\/\//.test(url)) {
|
|
7535
7561
|
url = 'https:' + url;
|
|
7536
7562
|
}
|
|
7537
7563
|
return url;
|
|
@@ -7648,8 +7674,9 @@ function ConfigFlatten(obj) {
|
|
|
7648
7674
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7649
7675
|
/* harmony export */ m: function() { return /* binding */ convertMediaUrlToVideoEmbed; }
|
|
7650
7676
|
/* harmony export */ });
|
|
7651
|
-
/* harmony import */ var
|
|
7652
|
-
/* harmony import */ var
|
|
7677
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7678
|
+
/* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6939);
|
|
7679
|
+
/* harmony import */ var _parse_query__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(70807);
|
|
7653
7680
|
/*!
|
|
7654
7681
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7655
7682
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7660,14 +7687,15 @@ function ConfigFlatten(obj) {
|
|
|
7660
7687
|
*/
|
|
7661
7688
|
|
|
7662
7689
|
|
|
7690
|
+
|
|
7663
7691
|
/**
|
|
7664
7692
|
* Javascript url pattern converter replace youtube/vimeo url in embed code.
|
|
7665
7693
|
*/
|
|
7666
7694
|
const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
7667
|
-
if (!(0,
|
|
7695
|
+
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_1__/* .isURL */ .m)(url)) {
|
|
7668
7696
|
return url;
|
|
7669
7697
|
}
|
|
7670
|
-
const parser =
|
|
7698
|
+
const parser = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('a'), pattern1 = /(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;
|
|
7671
7699
|
parser.href = url;
|
|
7672
7700
|
if (!width) {
|
|
7673
7701
|
width = 400;
|
|
@@ -7693,7 +7721,7 @@ const convertMediaUrlToVideoEmbed = (url, width = 400, height = 345) => {
|
|
|
7693
7721
|
case 'youtu.be':
|
|
7694
7722
|
case 'www.youtu.be': {
|
|
7695
7723
|
const query = parser.search
|
|
7696
|
-
? (0,
|
|
7724
|
+
? (0,_parse_query__WEBPACK_IMPORTED_MODULE_2__/* .parseQuery */ .m)(parser.search)
|
|
7697
7725
|
: { v: parser.pathname.substr(1) };
|
|
7698
7726
|
return query.v
|
|
7699
7727
|
? '<iframe width="' +
|
|
@@ -7887,7 +7915,8 @@ const dataBind = (elm, key, value) => {
|
|
|
7887
7915
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
7888
7916
|
/* harmony export */ e: function() { return /* binding */ defaultLanguage; }
|
|
7889
7917
|
/* harmony export */ });
|
|
7890
|
-
/* harmony import */ var
|
|
7918
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
7919
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(98253);
|
|
7891
7920
|
/*!
|
|
7892
7921
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
7893
7922
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -7897,15 +7926,16 @@ const dataBind = (elm, key, value) => {
|
|
|
7897
7926
|
* @module helpers/utils
|
|
7898
7927
|
*/
|
|
7899
7928
|
|
|
7929
|
+
|
|
7900
7930
|
/**
|
|
7901
7931
|
* Try define user language
|
|
7902
7932
|
*/
|
|
7903
7933
|
const defaultLanguage = (language, defaultLanguage = 'en') => {
|
|
7904
|
-
if (language !== 'auto' && (0,
|
|
7934
|
+
if (language !== 'auto' && (0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .K)(language)) {
|
|
7905
7935
|
return language;
|
|
7906
7936
|
}
|
|
7907
|
-
if (
|
|
7908
|
-
return
|
|
7937
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement && jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang) {
|
|
7938
|
+
return jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.documentElement.lang;
|
|
7909
7939
|
}
|
|
7910
7940
|
if (navigator.language) {
|
|
7911
7941
|
return navigator.language.substring(0, 2);
|
|
@@ -8659,10 +8689,10 @@ const map = {};
|
|
|
8659
8689
|
function reset(key) {
|
|
8660
8690
|
var _a, _b;
|
|
8661
8691
|
if (!(key in map)) {
|
|
8662
|
-
const iframe =
|
|
8692
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
8663
8693
|
try {
|
|
8664
8694
|
iframe.src = 'about:blank';
|
|
8665
|
-
|
|
8695
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.body.appendChild(iframe);
|
|
8666
8696
|
if (!iframe.contentWindow) {
|
|
8667
8697
|
return null;
|
|
8668
8698
|
}
|
|
@@ -9595,14 +9625,15 @@ Plugin.requires = [];
|
|
|
9595
9625
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
9596
9626
|
/* harmony export */ d: function() { return /* binding */ Ajax; }
|
|
9597
9627
|
/* harmony export */ });
|
|
9598
|
-
/* harmony import */ var
|
|
9628
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(31635);
|
|
9599
9629
|
/* harmony import */ var jodit_core_async__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(64890);
|
|
9600
|
-
/* harmony import */ var
|
|
9601
|
-
/* harmony import */ var
|
|
9602
|
-
/* harmony import */ var
|
|
9603
|
-
/* harmony import */ var
|
|
9604
|
-
/* harmony import */ var
|
|
9605
|
-
/* harmony import */ var
|
|
9630
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17352);
|
|
9631
|
+
/* harmony import */ var jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(26318);
|
|
9632
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(65147);
|
|
9633
|
+
/* harmony import */ var jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(50156);
|
|
9634
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(36115);
|
|
9635
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27337);
|
|
9636
|
+
/* harmony import */ var _response__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(91672);
|
|
9606
9637
|
/*!
|
|
9607
9638
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
9608
9639
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -9616,33 +9647,34 @@ Plugin.requires = [];
|
|
|
9616
9647
|
|
|
9617
9648
|
|
|
9618
9649
|
|
|
9650
|
+
|
|
9619
9651
|
class Ajax {
|
|
9620
9652
|
className() {
|
|
9621
9653
|
return 'Ajax';
|
|
9622
9654
|
}
|
|
9623
|
-
constructor(options, defaultAjaxOptions =
|
|
9655
|
+
constructor(options, defaultAjaxOptions = jodit_config__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.defaultAjaxOptions) {
|
|
9624
9656
|
this.__async = new jodit_core_async__WEBPACK_IMPORTED_MODULE_0__/* .Async */ .j();
|
|
9625
9657
|
this.__isFulfilled = false;
|
|
9626
9658
|
this.__activated = false;
|
|
9627
9659
|
this.__isDestructed = false;
|
|
9628
|
-
this.options = (0,
|
|
9660
|
+
this.options = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(options || {}, defaultAjaxOptions);
|
|
9629
9661
|
this.xhr = this.o.xhr ? this.o.xhr() : new XMLHttpRequest();
|
|
9630
9662
|
}
|
|
9631
9663
|
__buildParams(obj, prefix) {
|
|
9632
|
-
if ((0,
|
|
9664
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(obj) &&
|
|
9633
9665
|
this.options.contentType &&
|
|
9634
9666
|
this.options.contentType.includes('application/json')) {
|
|
9635
9667
|
return JSON.stringify(obj);
|
|
9636
9668
|
}
|
|
9637
|
-
if ((0,
|
|
9669
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(this.o.queryBuild)) {
|
|
9638
9670
|
return this.o.queryBuild.call(this, obj, prefix);
|
|
9639
9671
|
}
|
|
9640
|
-
if ((0,
|
|
9641
|
-
obj instanceof
|
|
9642
|
-
(typeof obj === 'object' && obj != null && (0,
|
|
9672
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isString)(obj) ||
|
|
9673
|
+
obj instanceof jodit_core_constants__WEBPACK_IMPORTED_MODULE_1__.globalWindow.FormData ||
|
|
9674
|
+
(typeof obj === 'object' && obj != null && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(obj.append))) {
|
|
9643
9675
|
return obj;
|
|
9644
9676
|
}
|
|
9645
|
-
return (0,
|
|
9677
|
+
return (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(obj);
|
|
9646
9678
|
}
|
|
9647
9679
|
get o() {
|
|
9648
9680
|
return this.options;
|
|
@@ -9662,20 +9694,20 @@ class Ajax {
|
|
|
9662
9694
|
this.__activated = true;
|
|
9663
9695
|
const { xhr, o } = this;
|
|
9664
9696
|
const request = this.prepareRequest();
|
|
9665
|
-
return this.__async.promise((resolve, reject) => (0,
|
|
9697
|
+
return this.__async.promise((resolve, reject) => (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__awaiter */ .sH)(this, void 0, void 0, function* () {
|
|
9666
9698
|
var _a;
|
|
9667
9699
|
const onReject = () => {
|
|
9668
9700
|
this.__isFulfilled = true;
|
|
9669
|
-
reject(
|
|
9701
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
|
|
9670
9702
|
};
|
|
9671
9703
|
const onResolve = () => {
|
|
9672
9704
|
this.__isFulfilled = true;
|
|
9673
|
-
resolve(new
|
|
9705
|
+
resolve(new _response__WEBPACK_IMPORTED_MODULE_7__/* .Response */ .Y(request, xhr.status, xhr.statusText, !xhr.responseType ? xhr.responseText : xhr.response));
|
|
9674
9706
|
};
|
|
9675
9707
|
xhr.onload = onResolve;
|
|
9676
9708
|
xhr.onabort = () => {
|
|
9677
9709
|
this.__isFulfilled = true;
|
|
9678
|
-
reject(
|
|
9710
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .abort */ .h2('Abort connection'));
|
|
9679
9711
|
};
|
|
9680
9712
|
xhr.onerror = onReject;
|
|
9681
9713
|
xhr.ontimeout = onReject;
|
|
@@ -9699,7 +9731,7 @@ class Ajax {
|
|
|
9699
9731
|
}
|
|
9700
9732
|
else if (xhr.statusText) {
|
|
9701
9733
|
this.__isFulfilled = true;
|
|
9702
|
-
reject(
|
|
9734
|
+
reject(jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI(xhr.statusText));
|
|
9703
9735
|
}
|
|
9704
9736
|
}
|
|
9705
9737
|
};
|
|
@@ -9710,7 +9742,7 @@ class Ajax {
|
|
|
9710
9742
|
xhr.setRequestHeader('Content-type', o.contentType);
|
|
9711
9743
|
}
|
|
9712
9744
|
let { headers } = o;
|
|
9713
|
-
if ((0,
|
|
9745
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isFunction)(headers)) {
|
|
9714
9746
|
headers = yield headers.call(this);
|
|
9715
9747
|
}
|
|
9716
9748
|
if (headers && xhr.setRequestHeader) {
|
|
@@ -9726,22 +9758,22 @@ class Ajax {
|
|
|
9726
9758
|
}
|
|
9727
9759
|
prepareRequest() {
|
|
9728
9760
|
if (!this.o.url) {
|
|
9729
|
-
throw
|
|
9761
|
+
throw jodit_core_helpers_utils_error__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3('Need URL for AJAX request');
|
|
9730
9762
|
}
|
|
9731
9763
|
let url = this.o.url;
|
|
9732
9764
|
const data = this.o.data;
|
|
9733
9765
|
const method = (this.o.method || 'get').toLowerCase();
|
|
9734
|
-
if (method === 'get' && data && (0,
|
|
9766
|
+
if (method === 'get' && data && (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.isPlainObject)(data)) {
|
|
9735
9767
|
const qIndex = url.indexOf('?');
|
|
9736
9768
|
if (qIndex !== -1) {
|
|
9737
|
-
const urlData = (0,
|
|
9769
|
+
const urlData = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.parseQuery)(url);
|
|
9738
9770
|
url =
|
|
9739
9771
|
url.substring(0, qIndex) +
|
|
9740
9772
|
'?' +
|
|
9741
|
-
(0,
|
|
9773
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(Object.assign(Object.assign({}, urlData), data));
|
|
9742
9774
|
}
|
|
9743
9775
|
else {
|
|
9744
|
-
url += '?' + (0,
|
|
9776
|
+
url += '?' + (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.buildQuery)(this.o.data);
|
|
9745
9777
|
}
|
|
9746
9778
|
}
|
|
9747
9779
|
const request = {
|
|
@@ -9765,8 +9797,8 @@ class Ajax {
|
|
|
9765
9797
|
}
|
|
9766
9798
|
}
|
|
9767
9799
|
Ajax.log = [];
|
|
9768
|
-
(0,
|
|
9769
|
-
|
|
9800
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .Cg)([
|
|
9801
|
+
jodit_core_decorators_autobind_autobind__WEBPACK_IMPORTED_MODULE_8__/* ["default"] */ .Ay
|
|
9770
9802
|
], Ajax.prototype, "destruct", null);
|
|
9771
9803
|
|
|
9772
9804
|
|
|
@@ -10661,6 +10693,7 @@ class Selection {
|
|
|
10661
10693
|
/**
|
|
10662
10694
|
* Call callback for all selection node
|
|
10663
10695
|
*/
|
|
10696
|
+
// eslint-disable-next-line complexity
|
|
10664
10697
|
eachSelection(callback) {
|
|
10665
10698
|
var _a;
|
|
10666
10699
|
const sel = this.sel;
|
|
@@ -11445,12 +11478,13 @@ function getSuitParent(style, node, root) {
|
|
|
11445
11478
|
/* harmony export */ Y: function() { return /* binding */ hasSameStyleKeys; },
|
|
11446
11479
|
/* harmony export */ g: function() { return /* binding */ hasSameStyle; }
|
|
11447
11480
|
/* harmony export */ });
|
|
11448
|
-
/* harmony import */ var
|
|
11449
|
-
/* harmony import */ var
|
|
11450
|
-
/* harmony import */ var
|
|
11451
|
-
/* harmony import */ var
|
|
11452
|
-
/* harmony import */ var
|
|
11453
|
-
/* harmony import */ var
|
|
11481
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
11482
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
11483
|
+
/* harmony import */ var jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(35642);
|
|
11484
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(59678);
|
|
11485
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(28712);
|
|
11486
|
+
/* harmony import */ var jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(jodit_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__);
|
|
11487
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(38322);
|
|
11454
11488
|
/*!
|
|
11455
11489
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
11456
11490
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -11461,48 +11495,53 @@ function getSuitParent(style, node, root) {
|
|
|
11461
11495
|
|
|
11462
11496
|
|
|
11463
11497
|
|
|
11498
|
+
|
|
11464
11499
|
/**
|
|
11465
11500
|
* Element has the same styles as in the commit
|
|
11466
11501
|
* @private
|
|
11467
11502
|
*/
|
|
11468
11503
|
function hasSameStyle(elm, rules) {
|
|
11469
|
-
return Boolean(!
|
|
11470
|
-
|
|
11504
|
+
return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
|
|
11505
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
|
|
11471
11506
|
Object.keys(rules).every(property => {
|
|
11472
|
-
const value = (0,
|
|
11507
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
|
|
11473
11508
|
if (value === '' &&
|
|
11474
11509
|
(rules[property] === '' || rules[property] == null)) {
|
|
11475
11510
|
return true;
|
|
11476
11511
|
}
|
|
11477
|
-
return (!(0,
|
|
11512
|
+
return (!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(value) &&
|
|
11478
11513
|
value !== '' &&
|
|
11479
|
-
!(0,
|
|
11480
|
-
(0,
|
|
11514
|
+
!(0,jodit_core_helpers_checker_is_void__WEBPACK_IMPORTED_MODULE_4__/* .isVoid */ .R)(rules[property]) &&
|
|
11515
|
+
(0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_5__/* .normalizeCssValue */ .iy)(property, rules[property])
|
|
11481
11516
|
.toString()
|
|
11482
11517
|
.toLowerCase() === value.toString().toLowerCase());
|
|
11483
11518
|
}));
|
|
11484
11519
|
}
|
|
11485
|
-
|
|
11486
|
-
elm
|
|
11487
|
-
|
|
11488
|
-
void 0;
|
|
11489
|
-
void 0;
|
|
11520
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
|
|
11521
|
+
const elm = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
11522
|
+
elm.style.color = 'red';
|
|
11523
|
+
void 0;
|
|
11524
|
+
void 0;
|
|
11525
|
+
void 0;
|
|
11526
|
+
}
|
|
11490
11527
|
/**
|
|
11491
11528
|
* Element has the similar styles keys
|
|
11492
11529
|
*/
|
|
11493
11530
|
function hasSameStyleKeys(elm, rules) {
|
|
11494
|
-
return Boolean(!
|
|
11495
|
-
|
|
11531
|
+
return Boolean(!jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(elm, 'font') &&
|
|
11532
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isHTMLElement(elm) &&
|
|
11496
11533
|
Object.keys(rules).every(property => {
|
|
11497
|
-
const value = (0,
|
|
11534
|
+
const value = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_3__/* .css */ .A)(elm, property, true);
|
|
11498
11535
|
return value !== '';
|
|
11499
11536
|
}));
|
|
11500
11537
|
}
|
|
11501
|
-
|
|
11502
|
-
elm2
|
|
11503
|
-
|
|
11504
|
-
void 0;
|
|
11505
|
-
void 0;
|
|
11538
|
+
if (jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument) {
|
|
11539
|
+
const elm2 = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('div');
|
|
11540
|
+
elm2.style.color = 'red';
|
|
11541
|
+
void 0;
|
|
11542
|
+
void 0;
|
|
11543
|
+
void 0;
|
|
11544
|
+
}
|
|
11506
11545
|
|
|
11507
11546
|
|
|
11508
11547
|
/***/ }),
|
|
@@ -11885,16 +11924,17 @@ function wrapList(commitStyle, wrapper, jodit) {
|
|
|
11885
11924
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
11886
11925
|
/* harmony export */ Y: function() { return /* binding */ toggleAttributes; }
|
|
11887
11926
|
/* harmony export */ });
|
|
11888
|
-
/* harmony import */ var
|
|
11889
|
-
/* harmony import */ var
|
|
11890
|
-
/* harmony import */ var
|
|
11891
|
-
/* harmony import */ var
|
|
11892
|
-
/* harmony import */ var
|
|
11893
|
-
/* harmony import */ var
|
|
11894
|
-
/* harmony import */ var
|
|
11895
|
-
/* harmony import */ var
|
|
11896
|
-
/* harmony import */ var
|
|
11897
|
-
/* harmony import */ var
|
|
11927
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
11928
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
11929
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
11930
|
+
/* harmony import */ var jodit_core_helpers_checker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(9823);
|
|
11931
|
+
/* harmony import */ var jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59678);
|
|
11932
|
+
/* harmony import */ var jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95350);
|
|
11933
|
+
/* harmony import */ var jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(449);
|
|
11934
|
+
/* harmony import */ var jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97369);
|
|
11935
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(38322);
|
|
11936
|
+
/* harmony import */ var jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(72197);
|
|
11937
|
+
/* harmony import */ var jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(12043);
|
|
11898
11938
|
/*!
|
|
11899
11939
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
11900
11940
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -11910,6 +11950,7 @@ function wrapList(commitStyle, wrapper, jodit) {
|
|
|
11910
11950
|
|
|
11911
11951
|
|
|
11912
11952
|
|
|
11953
|
+
|
|
11913
11954
|
const tak = 'toggleAttributes';
|
|
11914
11955
|
/**
|
|
11915
11956
|
* Toggles attributes
|
|
@@ -11921,7 +11962,7 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
11921
11962
|
}
|
|
11922
11963
|
!dry && commitStyle.setApplied(elm, tak);
|
|
11923
11964
|
const { attributes } = commitStyle.options;
|
|
11924
|
-
if (attributes && (0,
|
|
11965
|
+
if (attributes && (0,jodit_core_helpers_size_object_size__WEBPACK_IMPORTED_MODULE_4__/* .size */ .E)(attributes) > 0) {
|
|
11925
11966
|
Object.keys(attributes).forEach((key) => {
|
|
11926
11967
|
const value = attributes[key];
|
|
11927
11968
|
switch (key) {
|
|
@@ -11943,24 +11984,24 @@ function toggleAttributes(commitStyle, elm, jodit, mode, dry = false) {
|
|
|
11943
11984
|
function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
11944
11985
|
void 0;
|
|
11945
11986
|
Object.keys(style).forEach((rule) => {
|
|
11946
|
-
const inlineValue = elm.style.getPropertyValue((0,
|
|
11987
|
+
const inlineValue = elm.style.getPropertyValue((0,jodit_core_helpers_string_kebab_case__WEBPACK_IMPORTED_MODULE_7__/* .kebabCase */ .k)(rule));
|
|
11947
11988
|
const newValue = style[rule];
|
|
11948
11989
|
if (inlineValue === '' && newValue == null) {
|
|
11949
11990
|
return;
|
|
11950
11991
|
}
|
|
11951
11992
|
if (getNativeCSSValue(jodit, elm, rule) ===
|
|
11952
|
-
(0,
|
|
11993
|
+
(0,jodit_core_helpers_normalize_normalize_css_value__WEBPACK_IMPORTED_MODULE_8__/* .normalizeCssValue */ .iy)(rule, newValue)) {
|
|
11953
11994
|
if (!inlineValue) {
|
|
11954
11995
|
return;
|
|
11955
11996
|
}
|
|
11956
|
-
!dry && (0,
|
|
11957
|
-
mode =
|
|
11997
|
+
!dry && (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, null);
|
|
11998
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11958
11999
|
mode = removeExtraStyleAttribute(commitStyle, elm, mode);
|
|
11959
12000
|
return;
|
|
11960
12001
|
}
|
|
11961
|
-
mode =
|
|
12002
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
11962
12003
|
if (!dry) {
|
|
11963
|
-
(0,
|
|
12004
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(elm, rule, newValue);
|
|
11964
12005
|
mode = removeExtraStyleAttribute(commitStyle, elm, mode);
|
|
11965
12006
|
}
|
|
11966
12007
|
});
|
|
@@ -11968,19 +12009,19 @@ function toggleStyle(commitStyle, jodit, style, elm, dry, mode) {
|
|
|
11968
12009
|
}
|
|
11969
12010
|
function toggleClass(jodit, value, elm, mode, dry) {
|
|
11970
12011
|
void 0;
|
|
11971
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
12012
|
+
const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
|
|
11972
12013
|
if (elm.classList.contains(value.toString())) {
|
|
11973
|
-
mode =
|
|
12014
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11974
12015
|
if (!dry) {
|
|
11975
12016
|
elm.classList.remove(value);
|
|
11976
12017
|
if (elm.classList.length === 0) {
|
|
11977
|
-
(0,
|
|
12018
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'class', null);
|
|
11978
12019
|
hook(mode, elm, 'class', null);
|
|
11979
12020
|
}
|
|
11980
12021
|
}
|
|
11981
12022
|
}
|
|
11982
12023
|
else {
|
|
11983
|
-
mode =
|
|
12024
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
11984
12025
|
if (!dry) {
|
|
11985
12026
|
elm.classList.add(value);
|
|
11986
12027
|
hook(mode, elm, 'class', value);
|
|
@@ -11990,16 +12031,16 @@ function toggleClass(jodit, value, elm, mode, dry) {
|
|
|
11990
12031
|
}
|
|
11991
12032
|
function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
11992
12033
|
void 0;
|
|
11993
|
-
const hook = jodit.e.fire.bind(jodit.e, `${
|
|
11994
|
-
if ((0,
|
|
11995
|
-
!dry && (0,
|
|
11996
|
-
mode =
|
|
12034
|
+
const hook = jodit.e.fire.bind(jodit.e, `${jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* ._PREFIX */ .ar}AfterToggleAttribute`);
|
|
12035
|
+
if ((0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key) === value) {
|
|
12036
|
+
!dry && (0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, null);
|
|
12037
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNSET */ .Ag;
|
|
11997
12038
|
!dry && hook(mode, elm, key, value);
|
|
11998
12039
|
return mode;
|
|
11999
12040
|
}
|
|
12000
|
-
mode =
|
|
12041
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .CHANGE */ .PL;
|
|
12001
12042
|
if (!dry) {
|
|
12002
|
-
(0,
|
|
12043
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, key, value);
|
|
12003
12044
|
hook(mode, elm, key, value);
|
|
12004
12045
|
}
|
|
12005
12046
|
return mode;
|
|
@@ -12009,11 +12050,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
12009
12050
|
* and if it is default, it removes the element itself
|
|
12010
12051
|
*/
|
|
12011
12052
|
function removeExtraStyleAttribute(commitStyle, elm, mode) {
|
|
12012
|
-
if (!(0,
|
|
12013
|
-
(0,
|
|
12053
|
+
if (!(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style')) {
|
|
12054
|
+
(0,jodit_core_helpers_utils__WEBPACK_IMPORTED_MODULE_5__.attr)(elm, 'style', null);
|
|
12014
12055
|
if (elm.tagName.toLowerCase() === commitStyle.defaultTag) {
|
|
12015
|
-
|
|
12016
|
-
mode =
|
|
12056
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(elm);
|
|
12057
|
+
mode = jodit_core_selection_style_constants__WEBPACK_IMPORTED_MODULE_10__/* .UNWRAP */ .OJ;
|
|
12017
12058
|
}
|
|
12018
12059
|
}
|
|
12019
12060
|
return mode;
|
|
@@ -12023,12 +12064,12 @@ function removeExtraStyleAttribute(commitStyle, elm, mode) {
|
|
|
12023
12064
|
*/
|
|
12024
12065
|
function getShadowRoot(jodit) {
|
|
12025
12066
|
var _a;
|
|
12026
|
-
if ((0,
|
|
12027
|
-
return (0,
|
|
12067
|
+
if ((0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
|
|
12068
|
+
return (0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
|
|
12028
12069
|
}
|
|
12029
|
-
const container = (0,
|
|
12030
|
-
const iframe =
|
|
12031
|
-
(0,
|
|
12070
|
+
const container = (0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(jodit);
|
|
12071
|
+
const iframe = jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
12072
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(iframe, {
|
|
12032
12073
|
width: 0,
|
|
12033
12074
|
height: 0,
|
|
12034
12075
|
position: 'absolute',
|
|
@@ -12038,7 +12079,7 @@ function getShadowRoot(jodit) {
|
|
|
12038
12079
|
container.appendChild(iframe);
|
|
12039
12080
|
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
12040
12081
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
12041
|
-
(0,
|
|
12082
|
+
(0,jodit_core_helpers_utils_data_bind__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
|
|
12042
12083
|
return shadowRoot;
|
|
12043
12084
|
}
|
|
12044
12085
|
/**
|
|
@@ -12049,8 +12090,8 @@ function getNativeCSSValue(jodit, elm, key) {
|
|
|
12049
12090
|
newElm.style.cssText = elm.style.cssText;
|
|
12050
12091
|
const root = getShadowRoot(jodit);
|
|
12051
12092
|
root.appendChild(newElm);
|
|
12052
|
-
const result = (0,
|
|
12053
|
-
|
|
12093
|
+
const result = (0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_9__/* .css */ .A)(newElm, key);
|
|
12094
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(newElm);
|
|
12054
12095
|
return result;
|
|
12055
12096
|
}
|
|
12056
12097
|
|
|
@@ -14041,6 +14082,7 @@ let UIFileInput = class UIFileInput extends jodit_core_ui_form_inputs_input_inpu
|
|
|
14041
14082
|
}
|
|
14042
14083
|
createContainer(options) {
|
|
14043
14084
|
this.button = new jodit_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_0__/* .UIButton */ .lD(this.j, {
|
|
14085
|
+
tooltip: options.tooltip,
|
|
14044
14086
|
icon: {
|
|
14045
14087
|
name: 'plus'
|
|
14046
14088
|
}
|
|
@@ -14468,8 +14510,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14468
14510
|
/* harmony export */ required: function() { return /* binding */ required; },
|
|
14469
14511
|
/* harmony export */ url: function() { return /* binding */ url; }
|
|
14470
14512
|
/* harmony export */ });
|
|
14471
|
-
/* harmony import */ var
|
|
14472
|
-
/* harmony import */ var
|
|
14513
|
+
/* harmony import */ var jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6939);
|
|
14514
|
+
/* harmony import */ var jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(59101);
|
|
14473
14515
|
/*!
|
|
14474
14516
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
14475
14517
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -14481,7 +14523,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
14481
14523
|
* Input is required
|
|
14482
14524
|
*/
|
|
14483
14525
|
const required = function (input) {
|
|
14484
|
-
if (!(0,
|
|
14526
|
+
if (!(0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value).length) {
|
|
14485
14527
|
input.error = 'Please fill out this field';
|
|
14486
14528
|
return false;
|
|
14487
14529
|
}
|
|
@@ -14491,7 +14533,7 @@ const required = function (input) {
|
|
|
14491
14533
|
* Input value should be valid URL
|
|
14492
14534
|
*/
|
|
14493
14535
|
const url = function (input) {
|
|
14494
|
-
if (!(0,
|
|
14536
|
+
if (!(0,jodit_core_helpers_checker_is_url__WEBPACK_IMPORTED_MODULE_0__/* .isURL */ .m)((0,jodit_core_helpers_string_trim__WEBPACK_IMPORTED_MODULE_1__/* .trim */ .Bq)(input.value))) {
|
|
14495
14537
|
input.error = 'Please enter a web address';
|
|
14496
14538
|
return false;
|
|
14497
14539
|
}
|
|
@@ -17041,6 +17083,9 @@ let Jodit = Jodit_1 = class Jodit extends jodit_modules__WEBPACK_IMPORTED_MODULE
|
|
|
17041
17083
|
}
|
|
17042
17084
|
}
|
|
17043
17085
|
catch (e) {
|
|
17086
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.IS_PROD) {
|
|
17087
|
+
throw e;
|
|
17088
|
+
}
|
|
17044
17089
|
this.destruct();
|
|
17045
17090
|
throw e;
|
|
17046
17091
|
}
|
|
@@ -19019,10 +19064,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.filebrowser
|
|
|
19019
19064
|
jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.filebrowser = {
|
|
19020
19065
|
upload: {
|
|
19021
19066
|
icon: 'plus',
|
|
19067
|
+
tooltip: 'Upload file',
|
|
19022
19068
|
isInput: true,
|
|
19023
19069
|
isDisabled: (browser) => !browser.dataProvider.canI('FileUpload'),
|
|
19024
|
-
getContent: (filebrowser) => {
|
|
19070
|
+
getContent: (filebrowser, btnInt) => {
|
|
19025
19071
|
const btn = new jodit_core_ui_form_inputs_file_file__WEBPACK_IMPORTED_MODULE_2__/* .UIFileInput */ .n(filebrowser, {
|
|
19072
|
+
tooltip: btnInt.control.tooltip,
|
|
19026
19073
|
onlyImages: filebrowser.state.onlyImages
|
|
19027
19074
|
});
|
|
19028
19075
|
filebrowser.e.fire('bindUploader.filebrowser', btn.container);
|
|
@@ -19031,6 +19078,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19031
19078
|
},
|
|
19032
19079
|
remove: {
|
|
19033
19080
|
icon: 'bin',
|
|
19081
|
+
tooltip: 'Remove file',
|
|
19034
19082
|
isDisabled: (browser) => {
|
|
19035
19083
|
return (!browser.state.activeElements.length ||
|
|
19036
19084
|
!browser.dataProvider.canI('FileRemove'));
|
|
@@ -19040,11 +19088,13 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19040
19088
|
}
|
|
19041
19089
|
},
|
|
19042
19090
|
update: {
|
|
19091
|
+
tooltip: 'Update file list',
|
|
19043
19092
|
exec: (editor) => {
|
|
19044
19093
|
editor.e.fire('update.filebrowser');
|
|
19045
19094
|
}
|
|
19046
19095
|
},
|
|
19047
19096
|
select: {
|
|
19097
|
+
tooltip: 'Select file',
|
|
19048
19098
|
icon: 'check',
|
|
19049
19099
|
isDisabled: (browser) => !browser.state.activeElements.length,
|
|
19050
19100
|
exec: (editor) => {
|
|
@@ -19052,6 +19102,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19052
19102
|
}
|
|
19053
19103
|
},
|
|
19054
19104
|
edit: {
|
|
19105
|
+
tooltip: 'Edit image',
|
|
19055
19106
|
icon: 'pencil',
|
|
19056
19107
|
isDisabled: (browser) => {
|
|
19057
19108
|
const selected = browser.state.activeElements;
|
|
@@ -19065,6 +19116,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19065
19116
|
}
|
|
19066
19117
|
},
|
|
19067
19118
|
tiles: {
|
|
19119
|
+
tooltip: 'Tiles view',
|
|
19068
19120
|
icon: 'th',
|
|
19069
19121
|
isActive: (filebrowser) => filebrowser.state.view === 'tiles',
|
|
19070
19122
|
exec: (filebrowser) => {
|
|
@@ -19072,6 +19124,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fil
|
|
|
19072
19124
|
}
|
|
19073
19125
|
},
|
|
19074
19126
|
list: {
|
|
19127
|
+
tooltip: 'List view',
|
|
19075
19128
|
icon: 'th-list',
|
|
19076
19129
|
isActive: (filebrowser) => filebrowser.state.view === 'list',
|
|
19077
19130
|
exec: (filebrowser) => {
|
|
@@ -19488,7 +19541,6 @@ let DataProvider = class DataProvider {
|
|
|
19488
19541
|
data: {}
|
|
19489
19542
|
};
|
|
19490
19543
|
}
|
|
19491
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
19492
19544
|
const query = this.o[type];
|
|
19493
19545
|
if (query.data === undefined) {
|
|
19494
19546
|
query.data = {
|
|
@@ -19738,7 +19790,6 @@ let FileBrowser = class FileBrowser extends jodit_core_view_view_with_toolbar__W
|
|
|
19738
19790
|
get dataProvider() {
|
|
19739
19791
|
return (0,_factories__WEBPACK_IMPORTED_MODULE_16__/* .makeDataProvider */ .S)(this, this.options);
|
|
19740
19792
|
}
|
|
19741
|
-
// eslint-disable-next-line no-unused-vars
|
|
19742
19793
|
onSelect(callback) {
|
|
19743
19794
|
return () => {
|
|
19744
19795
|
if (this.state.activeElements.length) {
|
|
@@ -22260,7 +22311,6 @@ class Table extends jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
22260
22311
|
const selector = (0,jodit_core_helpers___WEBPACK_IMPORTED_MODULE_5__.cssPath)(td);
|
|
22261
22312
|
selector && selectors.push(selector);
|
|
22262
22313
|
});
|
|
22263
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
22264
22314
|
style.innerHTML = selectors.length
|
|
22265
22315
|
? selectors.join(',') +
|
|
22266
22316
|
`{${this.jodit.options.table.selectionCellStyle}}`
|
|
@@ -26061,6 +26111,7 @@ function checkNotCollapsed(jodit) {
|
|
|
26061
26111
|
* ```
|
|
26062
26112
|
* @private
|
|
26063
26113
|
*/
|
|
26114
|
+
// eslint-disable-next-line complexity
|
|
26064
26115
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
26065
26116
|
var _a, _b;
|
|
26066
26117
|
const step = backspace ? -1 : 1;
|
|
@@ -30862,6 +30913,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeStyle
|
|
|
30862
30913
|
'-ms-user-select: none' +
|
|
30863
30914
|
'}';
|
|
30864
30915
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeCSSLinks = [];
|
|
30916
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox = null;
|
|
30865
30917
|
|
|
30866
30918
|
|
|
30867
30919
|
/***/ }),
|
|
@@ -30938,6 +30990,9 @@ function iframe(editor) {
|
|
|
30938
30990
|
iframe.setAttribute('allowtransparency', 'true');
|
|
30939
30991
|
iframe.setAttribute('tabindex', opt.tabIndex.toString());
|
|
30940
30992
|
iframe.setAttribute('frameborder', '0');
|
|
30993
|
+
if (opt.iframeSandbox != null) {
|
|
30994
|
+
iframe.setAttribute('sandbox', opt.iframeSandbox);
|
|
30995
|
+
}
|
|
30941
30996
|
editor.workplace.appendChild(iframe);
|
|
30942
30997
|
editor.iframe = iframe;
|
|
30943
30998
|
const result = editor.e.fire('generateDocumentStructure.iframe', null, editor);
|
|
@@ -36738,13 +36793,13 @@ function generateCriticalCSS(jodit) {
|
|
|
36738
36793
|
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
36739
36794
|
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(71842);
|
|
36740
36795
|
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(56298);
|
|
36741
|
-
/* harmony import */ var
|
|
36742
|
-
/* harmony import */ var
|
|
36743
|
-
/* harmony import */ var
|
|
36744
|
-
/* harmony import */ var
|
|
36745
|
-
/* harmony import */ var
|
|
36746
|
-
/* harmony import */ var
|
|
36747
|
-
/* harmony import */ var
|
|
36796
|
+
/* harmony import */ var jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(17527);
|
|
36797
|
+
/* harmony import */ var jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(98434);
|
|
36798
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(931);
|
|
36799
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(36115);
|
|
36800
|
+
/* harmony import */ var _lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(11131);
|
|
36801
|
+
/* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(59827);
|
|
36802
|
+
/* harmony import */ var _print_svg__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_print_svg__WEBPACK_IMPORTED_MODULE_8__);
|
|
36748
36803
|
/*!
|
|
36749
36804
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
36750
36805
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -36759,8 +36814,8 @@ function generateCriticalCSS(jodit) {
|
|
|
36759
36814
|
|
|
36760
36815
|
|
|
36761
36816
|
|
|
36762
|
-
|
|
36763
|
-
|
|
36817
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__/* .Icon */ .I.set('print', (_print_svg__WEBPACK_IMPORTED_MODULE_8___default()));
|
|
36818
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T.prototype.controls.print = {
|
|
36764
36819
|
exec: (editor) => {
|
|
36765
36820
|
const iframe = editor.create.element('iframe');
|
|
36766
36821
|
Object.assign(iframe.style, {
|
|
@@ -36771,7 +36826,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
|
|
|
36771
36826
|
height: 0,
|
|
36772
36827
|
border: 0
|
|
36773
36828
|
});
|
|
36774
|
-
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor,
|
|
36829
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(editor, jodit_config__WEBPACK_IMPORTED_MODULE_6__/* .Config */ .T).appendChild(iframe);
|
|
36775
36830
|
const afterFinishPrint = () => {
|
|
36776
36831
|
editor.e.off(editor.ow, 'mousemove', afterFinishPrint);
|
|
36777
36832
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
|
|
@@ -36787,12 +36842,12 @@ jodit_config__WEBPACK_IMPORTED_MODULE_5__/* .Config */ .T.prototype.controls.pri
|
|
|
36787
36842
|
}
|
|
36788
36843
|
else {
|
|
36789
36844
|
myWindow.document.write('<!doctype html><html lang="' +
|
|
36790
|
-
(0,
|
|
36845
|
+
(0,jodit_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_3__/* .defaultLanguage */ .e)(editor.o.language) +
|
|
36791
36846
|
'"><head><title></title></head><style>' +
|
|
36792
|
-
(0,
|
|
36847
|
+
(0,_lib_generate_critical_css__WEBPACK_IMPORTED_MODULE_7__/* .generateCriticalCSS */ .Y)(editor) +
|
|
36793
36848
|
'</style><body></body></html>');
|
|
36794
36849
|
myWindow.document.close();
|
|
36795
|
-
(0,
|
|
36850
|
+
(0,jodit_core_helpers_utils_print__WEBPACK_IMPORTED_MODULE_4__/* .previewBox */ .u)(editor, undefined, 'px', myWindow.document.body);
|
|
36796
36851
|
}
|
|
36797
36852
|
const style = myWindow.document.createElement('style');
|
|
36798
36853
|
style.innerHTML = `@media print {
|
|
@@ -37868,10 +37923,11 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
|
|
|
37868
37923
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
37869
37924
|
|
|
37870
37925
|
"use strict";
|
|
37871
|
-
/* harmony import */ var
|
|
37872
|
-
/* harmony import */ var
|
|
37873
|
-
/* harmony import */ var
|
|
37874
|
-
/* harmony import */ var
|
|
37926
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37927
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(931);
|
|
37928
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36115);
|
|
37929
|
+
/* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21917);
|
|
37930
|
+
/* harmony import */ var _search_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_search_svg__WEBPACK_IMPORTED_MODULE_3__);
|
|
37875
37931
|
/*!
|
|
37876
37932
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37877
37933
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37881,14 +37937,14 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_3__/* .pluginSystem */ .fg.add('resiz
|
|
|
37881
37937
|
|
|
37882
37938
|
|
|
37883
37939
|
|
|
37884
|
-
|
|
37885
|
-
|
|
37940
|
+
|
|
37941
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.useSearch = true;
|
|
37942
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.search = {
|
|
37886
37943
|
lazyIdleTimeout: 0,
|
|
37887
|
-
|
|
37888
|
-
useCustomHighlightAPI: typeof window.Highlight !== 'undefined'
|
|
37944
|
+
useCustomHighlightAPI: jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow && typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined'
|
|
37889
37945
|
};
|
|
37890
|
-
|
|
37891
|
-
|
|
37946
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('search', (_search_svg__WEBPACK_IMPORTED_MODULE_3___default()));
|
|
37947
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find = {
|
|
37892
37948
|
tooltip: 'Find',
|
|
37893
37949
|
icon: 'search',
|
|
37894
37950
|
exec(jodit, _, { control }) {
|
|
@@ -37929,8 +37985,10 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
|
|
|
37929
37985
|
/* harmony export */ _B: function() { return /* binding */ highlightTextRanges; },
|
|
37930
37986
|
/* harmony export */ zy: function() { return /* binding */ getSelectionWrappers; }
|
|
37931
37987
|
/* harmony export */ });
|
|
37932
|
-
/* harmony
|
|
37933
|
-
/* harmony import */ var
|
|
37988
|
+
/* unused harmony export clearNativeSelection */
|
|
37989
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17352);
|
|
37990
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(55186);
|
|
37991
|
+
/* harmony import */ var jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(58720);
|
|
37934
37992
|
/*!
|
|
37935
37993
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
37936
37994
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -37938,6 +37996,7 @@ jodit_config__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.fin
|
|
|
37938
37996
|
*/
|
|
37939
37997
|
|
|
37940
37998
|
|
|
37999
|
+
|
|
37941
38000
|
/**
|
|
37942
38001
|
* @private
|
|
37943
38002
|
*/
|
|
@@ -37956,15 +38015,15 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37956
38015
|
const span = ci.element('span', {
|
|
37957
38016
|
[TMP_ATTR]: true
|
|
37958
38017
|
});
|
|
37959
|
-
|
|
38018
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.markTemporary(span);
|
|
37960
38019
|
normalizeRanges(rng, restRanges, ci);
|
|
37961
38020
|
let next = rng.startContainer;
|
|
37962
38021
|
do {
|
|
37963
38022
|
if (!next) {
|
|
37964
38023
|
break;
|
|
37965
38024
|
}
|
|
37966
|
-
if (
|
|
37967
|
-
|
|
38025
|
+
if (jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(next) && !isSelectionWrapper(next.parentNode)) {
|
|
38026
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.wrap(next, span.cloneNode(), ci);
|
|
37968
38027
|
}
|
|
37969
38028
|
if (next === rng.endContainer) {
|
|
37970
38029
|
break;
|
|
@@ -37983,13 +38042,14 @@ function highlightTextRanges(jodit, rng, restRanges, ci, root) {
|
|
|
37983
38042
|
* @private
|
|
37984
38043
|
*/
|
|
37985
38044
|
function getSelectionWrappers(root) {
|
|
37986
|
-
return (0,
|
|
38045
|
+
return (0,jodit_core_helpers_utils_selector__WEBPACK_IMPORTED_MODULE_2__.$$)(`[${TMP_ATTR}]`, root);
|
|
37987
38046
|
}
|
|
37988
38047
|
/**
|
|
37989
38048
|
* @private
|
|
37990
38049
|
*/
|
|
37991
|
-
function clearSelectionWrappers(
|
|
37992
|
-
getSelectionWrappers(
|
|
38050
|
+
function clearSelectionWrappers(jodit) {
|
|
38051
|
+
getSelectionWrappers(jodit.editor).forEach(span => jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.unwrap(span));
|
|
38052
|
+
clearNativeSelection(jodit);
|
|
37993
38053
|
}
|
|
37994
38054
|
/**
|
|
37995
38055
|
* @private
|
|
@@ -38001,19 +38061,19 @@ function clearSelectionWrappersFromHTML(root) {
|
|
|
38001
38061
|
* @private
|
|
38002
38062
|
*/
|
|
38003
38063
|
function isSelectionWrapper(node) {
|
|
38004
|
-
return
|
|
38064
|
+
return jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isElement(node) && node.hasAttribute(TMP_ATTR);
|
|
38005
38065
|
}
|
|
38006
38066
|
function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
38007
38067
|
if (jodit.o.search.useCustomHighlightAPI &&
|
|
38008
38068
|
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38009
|
-
|
|
38069
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
38070
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
38010
38071
|
const ranges = [rng, ...restRanges].map(rng => {
|
|
38011
38072
|
const range = jodit.selection.createRange();
|
|
38012
38073
|
range.setStart(rng.startContainer, rng.startOffset);
|
|
38013
38074
|
range.setEnd(rng.endContainer, rng.endOffset);
|
|
38014
38075
|
return range;
|
|
38015
38076
|
});
|
|
38016
|
-
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38017
38077
|
const searchHighlight = new Highlight(...ranges);
|
|
38018
38078
|
// @ts-ignore
|
|
38019
38079
|
CSS.highlights.clear();
|
|
@@ -38024,13 +38084,22 @@ function checkNativeSelectionMethod(jodit, rng, restRanges) {
|
|
|
38024
38084
|
}
|
|
38025
38085
|
return false;
|
|
38026
38086
|
}
|
|
38087
|
+
function clearNativeSelection(jodit) {
|
|
38088
|
+
if (jodit.o.search.useCustomHighlightAPI &&
|
|
38089
|
+
// @ts-ignore Because Highlight is not defined in the types TS 5.3.3
|
|
38090
|
+
jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow &&
|
|
38091
|
+
typeof jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.globalWindow.Highlight !== 'undefined') {
|
|
38092
|
+
// @ts-ignore
|
|
38093
|
+
CSS.highlights.clear();
|
|
38094
|
+
}
|
|
38095
|
+
}
|
|
38027
38096
|
function normalizeRanges(rng, restRanges, ci) {
|
|
38028
38097
|
const startText = rng.startContainer.nodeValue;
|
|
38029
38098
|
let diff = 0;
|
|
38030
38099
|
if (rng.startOffset !== 0) {
|
|
38031
38100
|
const text = ci.text(startText.substring(0, rng.startOffset));
|
|
38032
38101
|
rng.startContainer.nodeValue = startText.substring(rng.startOffset);
|
|
38033
|
-
|
|
38102
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.before(rng.startContainer, text);
|
|
38034
38103
|
if (rng.startContainer === rng.endContainer) {
|
|
38035
38104
|
diff = rng.startOffset;
|
|
38036
38105
|
rng.endOffset -= diff;
|
|
@@ -38041,7 +38110,7 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
38041
38110
|
if (rng.endOffset !== endText.length) {
|
|
38042
38111
|
const text = ci.text(endText.substring(rng.endOffset));
|
|
38043
38112
|
rng.endContainer.nodeValue = endText.substring(0, rng.endOffset);
|
|
38044
|
-
|
|
38113
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.after(rng.endContainer, text);
|
|
38045
38114
|
for (const range of restRanges) {
|
|
38046
38115
|
if (range.startContainer === rng.endContainer) {
|
|
38047
38116
|
range.startContainer = text;
|
|
@@ -38198,11 +38267,11 @@ class SentenceFinder {
|
|
|
38198
38267
|
*
|
|
38199
38268
|
* @example
|
|
38200
38269
|
* ```typescript
|
|
38201
|
-
*
|
|
38270
|
+
* const jodit = Jodit.make('#editor', {
|
|
38202
38271
|
* useSearch: false
|
|
38203
38272
|
* });
|
|
38204
38273
|
* // or
|
|
38205
|
-
*
|
|
38274
|
+
* const jodit = Jodit.make('#editor', {
|
|
38206
38275
|
* disablePlugins: 'search'
|
|
38207
38276
|
* });
|
|
38208
38277
|
* ```
|
|
@@ -38288,7 +38357,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38288
38357
|
rng.deleteContents();
|
|
38289
38358
|
const textNode = this.j.createInside.text(this.ui.replace);
|
|
38290
38359
|
jodit_core_dom__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeInsertNode(rng, textNode);
|
|
38291
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
38360
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
38292
38361
|
this.j.s.setCursorAfter(textNode);
|
|
38293
38362
|
this.tryScrollToElement(textNode);
|
|
38294
38363
|
this.cache = {};
|
|
@@ -38318,7 +38387,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38318
38387
|
!(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
38319
38388
|
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
38320
38389
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
38321
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j
|
|
38390
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
38322
38391
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
38323
38392
|
}
|
|
38324
38393
|
this.previousQuery = query;
|
|
@@ -38440,14 +38509,15 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38440
38509
|
this.ui.close();
|
|
38441
38510
|
})
|
|
38442
38511
|
.on(this.ui, 'afterClose', () => {
|
|
38443
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
38512
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
38444
38513
|
this.ui.currentIndex = 0;
|
|
38445
38514
|
this.ui.count = 0;
|
|
38446
38515
|
this.cache = {};
|
|
38516
|
+
editor.focus();
|
|
38447
38517
|
})
|
|
38448
38518
|
.on('click', () => {
|
|
38449
38519
|
this.ui.currentIndex = 0;
|
|
38450
|
-
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor
|
|
38520
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(editor);
|
|
38451
38521
|
})
|
|
38452
38522
|
.on('change.search', () => {
|
|
38453
38523
|
this.cache = {};
|
|
@@ -38458,7 +38528,7 @@ class search extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */
|
|
|
38458
38528
|
this.ui.selInfo = null;
|
|
38459
38529
|
}
|
|
38460
38530
|
if (this.ui.isOpened) {
|
|
38461
|
-
this.updateCounters();
|
|
38531
|
+
void this.updateCounters();
|
|
38462
38532
|
}
|
|
38463
38533
|
}, editor.defaultTimeout))
|
|
38464
38534
|
.on('searchNext.search searchPrevious.search', () => {
|
|
@@ -38638,7 +38708,7 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
38638
38708
|
return false;
|
|
38639
38709
|
})
|
|
38640
38710
|
.on(next, 'pointerdown', () => {
|
|
38641
|
-
jodit.e.fire('searchNext');
|
|
38711
|
+
void jodit.e.fire('searchNext');
|
|
38642
38712
|
return false;
|
|
38643
38713
|
})
|
|
38644
38714
|
.on(prev, 'pointerdown', () => {
|
|
@@ -38648,12 +38718,12 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
38648
38718
|
.on(this.queryInput, 'input', () => {
|
|
38649
38719
|
this.setMod('empty-query', !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.trim)(this.queryInput.value).length);
|
|
38650
38720
|
})
|
|
38651
|
-
.on(this.queryInput, 'keydown', this.j.async.debounce((e) => {
|
|
38721
|
+
.on(this.queryInput, 'keydown', this.j.async.debounce((e) => (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__awaiter */ .sH)(this, void 0, void 0, function* () {
|
|
38652
38722
|
switch (e.key) {
|
|
38653
38723
|
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER:
|
|
38654
38724
|
e.preventDefault();
|
|
38655
38725
|
e.stopImmediatePropagation();
|
|
38656
|
-
if (jodit.e.fire('searchNext')) {
|
|
38726
|
+
if (yield jodit.e.fire('searchNext')) {
|
|
38657
38727
|
this.close();
|
|
38658
38728
|
}
|
|
38659
38729
|
break;
|
|
@@ -38661,7 +38731,7 @@ let UISearch = class UISearch extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_4__
|
|
|
38661
38731
|
jodit.e.fire(this, 'needUpdateCounters');
|
|
38662
38732
|
break;
|
|
38663
38733
|
}
|
|
38664
|
-
}, this.j.defaultTimeout));
|
|
38734
|
+
}), this.j.defaultTimeout));
|
|
38665
38735
|
}
|
|
38666
38736
|
onEditorKeyDown(e) {
|
|
38667
38737
|
if (!this.isOpened) {
|
|
@@ -40952,6 +41022,7 @@ jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('spell
|
|
|
40952
41022
|
|
|
40953
41023
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showCharsCounter = true;
|
|
40954
41024
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countHTMLChars = false;
|
|
41025
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.countTextSpaces = false;
|
|
40955
41026
|
jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showWordsCounter = true;
|
|
40956
41027
|
|
|
40957
41028
|
|
|
@@ -40998,9 +41069,20 @@ class stat extends jodit_core_plugin_plugin__WEBPACK_IMPORTED_MODULE_3__/* .Plug
|
|
|
40998
41069
|
this.calc = this.j.async.throttle(() => {
|
|
40999
41070
|
const text = this.j.text;
|
|
41000
41071
|
if (this.j.o.showCharsCounter && this.charCounter) {
|
|
41001
|
-
|
|
41002
|
-
|
|
41003
|
-
|
|
41072
|
+
let chars;
|
|
41073
|
+
if (this.j.o.countHTMLChars) {
|
|
41074
|
+
chars = this.j.value;
|
|
41075
|
+
}
|
|
41076
|
+
else {
|
|
41077
|
+
if (this.j.o.countTextSpaces) {
|
|
41078
|
+
chars = text
|
|
41079
|
+
.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP)(), '')
|
|
41080
|
+
.replace(/[\r\n]/g, '');
|
|
41081
|
+
}
|
|
41082
|
+
else {
|
|
41083
|
+
chars = text.replace((0,jodit_core_constants__WEBPACK_IMPORTED_MODULE_0__.SPACE_REG_EXP)(), '');
|
|
41084
|
+
}
|
|
41085
|
+
}
|
|
41004
41086
|
this.charCounter.textContent = this.j.i18n('Chars: %d', chars.length);
|
|
41005
41087
|
}
|
|
41006
41088
|
if (this.j.o.showWordsCounter && this.wordCounter) {
|
|
@@ -41634,8 +41716,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41634
41716
|
/* harmony export */ pt_br: function() { return /* reexport module object */ _pt_br_js__WEBPACK_IMPORTED_MODULE_16__; },
|
|
41635
41717
|
/* harmony export */ ru: function() { return /* reexport module object */ _ru_js__WEBPACK_IMPORTED_MODULE_17__; },
|
|
41636
41718
|
/* harmony export */ tr: function() { return /* reexport module object */ _tr_js__WEBPACK_IMPORTED_MODULE_18__; },
|
|
41637
|
-
/* harmony export */
|
|
41638
|
-
/* harmony export */
|
|
41719
|
+
/* harmony export */ ua: function() { return /* reexport module object */ _ua_js__WEBPACK_IMPORTED_MODULE_19__; },
|
|
41720
|
+
/* harmony export */ zh_cn: function() { return /* reexport module object */ _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__; },
|
|
41721
|
+
/* harmony export */ zh_tw: function() { return /* reexport module object */ _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__; }
|
|
41639
41722
|
/* harmony export */ });
|
|
41640
41723
|
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(37605);
|
|
41641
41724
|
/* harmony import */ var _ar_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_ar_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
@@ -41675,10 +41758,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41675
41758
|
/* harmony import */ var _ru_js__WEBPACK_IMPORTED_MODULE_17___default = /*#__PURE__*/__webpack_require__.n(_ru_js__WEBPACK_IMPORTED_MODULE_17__);
|
|
41676
41759
|
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(98376);
|
|
41677
41760
|
/* harmony import */ var _tr_js__WEBPACK_IMPORTED_MODULE_18___default = /*#__PURE__*/__webpack_require__.n(_tr_js__WEBPACK_IMPORTED_MODULE_18__);
|
|
41678
|
-
/* harmony import */ var
|
|
41679
|
-
/* harmony import */ var
|
|
41680
|
-
/* harmony import */ var
|
|
41681
|
-
/* harmony import */ var
|
|
41761
|
+
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(28776);
|
|
41762
|
+
/* harmony import */ var _ua_js__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_ua_js__WEBPACK_IMPORTED_MODULE_19__);
|
|
41763
|
+
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(47238);
|
|
41764
|
+
/* harmony import */ var _zh_cn_js__WEBPACK_IMPORTED_MODULE_20___default = /*#__PURE__*/__webpack_require__.n(_zh_cn_js__WEBPACK_IMPORTED_MODULE_20__);
|
|
41765
|
+
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(72386);
|
|
41766
|
+
/* harmony import */ var _zh_tw_js__WEBPACK_IMPORTED_MODULE_21___default = /*#__PURE__*/__webpack_require__.n(_zh_tw_js__WEBPACK_IMPORTED_MODULE_21__);
|
|
41682
41767
|
/*!
|
|
41683
41768
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41684
41769
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -41706,6 +41791,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
41706
41791
|
|
|
41707
41792
|
|
|
41708
41793
|
|
|
41794
|
+
|
|
41709
41795
|
|
|
41710
41796
|
|
|
41711
41797
|
/***/ }),
|
|
@@ -41861,6 +41947,23 @@ module.exports = {
|
|
|
41861
41947
|
};
|
|
41862
41948
|
|
|
41863
41949
|
|
|
41950
|
+
/***/ }),
|
|
41951
|
+
|
|
41952
|
+
/***/ 28776:
|
|
41953
|
+
/***/ (function(module) {
|
|
41954
|
+
|
|
41955
|
+
"use strict";
|
|
41956
|
+
|
|
41957
|
+
/*!
|
|
41958
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
41959
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
41960
|
+
* Copyright (c) 2013-2024 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
41961
|
+
*/
|
|
41962
|
+
module.exports = {
|
|
41963
|
+
symbols: 'символ'
|
|
41964
|
+
};
|
|
41965
|
+
|
|
41966
|
+
|
|
41864
41967
|
/***/ }),
|
|
41865
41968
|
|
|
41866
41969
|
/***/ 47238:
|
|
@@ -43933,7 +44036,7 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
|
43933
44036
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
43934
44037
|
PERFORMANCE OF THIS SOFTWARE.
|
|
43935
44038
|
***************************************************************************** */
|
|
43936
|
-
/* global Reflect, Promise, SuppressedError, Symbol */
|
|
44039
|
+
/* global Reflect, Promise, SuppressedError, Symbol, Iterator */
|
|
43937
44040
|
|
|
43938
44041
|
var extendStatics = function(d, b) {
|
|
43939
44042
|
extendStatics = Object.setPrototypeOf ||
|
|
@@ -44044,8 +44147,8 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
44044
44147
|
}
|
|
44045
44148
|
|
|
44046
44149
|
function __generator(thisArg, body) {
|
|
44047
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
44048
|
-
return g =
|
|
44150
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
|
|
44151
|
+
return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
44049
44152
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
44050
44153
|
function step(op) {
|
|
44051
44154
|
if (f) throw new TypeError("Generator is already executing.");
|
|
@@ -44149,8 +44252,9 @@ function __await(v) {
|
|
|
44149
44252
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
44150
44253
|
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
44151
44254
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
44152
|
-
return i =
|
|
44153
|
-
function
|
|
44255
|
+
return i = Object.create((typeof AsyncIterator === "function" ? AsyncIterator : Object).prototype), verb("next"), verb("throw"), verb("return", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
44256
|
+
function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }
|
|
44257
|
+
function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }
|
|
44154
44258
|
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
|
44155
44259
|
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
44156
44260
|
function fulfill(value) { resume("next", value); }
|
|
@@ -44216,16 +44320,18 @@ function __classPrivateFieldIn(state, receiver) {
|
|
|
44216
44320
|
function __addDisposableResource(env, value, async) {
|
|
44217
44321
|
if (value !== null && value !== void 0) {
|
|
44218
44322
|
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
44219
|
-
var dispose;
|
|
44323
|
+
var dispose, inner;
|
|
44220
44324
|
if (async) {
|
|
44221
|
-
|
|
44222
|
-
|
|
44325
|
+
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
44326
|
+
dispose = value[Symbol.asyncDispose];
|
|
44223
44327
|
}
|
|
44224
44328
|
if (dispose === void 0) {
|
|
44225
|
-
|
|
44226
|
-
|
|
44329
|
+
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
44330
|
+
dispose = value[Symbol.dispose];
|
|
44331
|
+
if (async) inner = dispose;
|
|
44227
44332
|
}
|
|
44228
44333
|
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
44334
|
+
if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };
|
|
44229
44335
|
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
44230
44336
|
}
|
|
44231
44337
|
else if (async) {
|
|
@@ -44244,17 +44350,22 @@ function __disposeResources(env) {
|
|
|
44244
44350
|
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
44245
44351
|
env.hasError = true;
|
|
44246
44352
|
}
|
|
44353
|
+
var r, s = 0;
|
|
44247
44354
|
function next() {
|
|
44248
|
-
while (env.stack.
|
|
44249
|
-
var rec = env.stack.pop();
|
|
44355
|
+
while (r = env.stack.pop()) {
|
|
44250
44356
|
try {
|
|
44251
|
-
|
|
44252
|
-
if (
|
|
44357
|
+
if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);
|
|
44358
|
+
if (r.dispose) {
|
|
44359
|
+
var result = r.dispose.call(r.value);
|
|
44360
|
+
if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
44361
|
+
}
|
|
44362
|
+
else s |= 1;
|
|
44253
44363
|
}
|
|
44254
44364
|
catch (e) {
|
|
44255
|
-
|
|
44365
|
+
fail(e);
|
|
44256
44366
|
}
|
|
44257
44367
|
}
|
|
44368
|
+
if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();
|
|
44258
44369
|
if (env.hasError) throw env.error;
|
|
44259
44370
|
}
|
|
44260
44371
|
return next();
|