jodit-pro 4.5.5 → 4.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +356 -378
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +356 -378
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/autocomplete/autocomplete.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.css +1 -1
- package/es2018/plugins/backup/backup.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.css +1 -1
- package/es2018/plugins/button-generator/button-generator.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.css +1 -1
- package/es2018/plugins/color-picker/color-picker.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.css +1 -1
- package/es2018/plugins/emoji/emoji.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.css +1 -1
- package/es2018/plugins/finder/finder.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.css +1 -1
- package/es2018/plugins/google-maps/google-maps.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.css +1 -1
- package/es2018/plugins/keyboard/keyboard.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.css +1 -1
- package/es2018/plugins/paste-code/paste-code.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.css +1 -1
- package/es2018/plugins/todo-list/todo-list.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.css +1 -1
- package/es2018/plugins/translate/translate.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.css +1 -1
- package/es2018/plugins/tune-block/tune-block.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +427 -265
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +427 -265
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +356 -379
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/package.json +1 -1
package/es2015/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.5.
|
|
4
|
+
* Version: v4.5.7
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1245,27 +1245,24 @@ class Async {
|
|
|
1245
1245
|
this.isDestructed = true;
|
|
1246
1246
|
}
|
|
1247
1247
|
constructor(){
|
|
1248
|
-
var
|
|
1248
|
+
var _a, _b, _c, _d, _e;
|
|
1249
1249
|
this.timers = new Map();
|
|
1250
1250
|
this.__callbacks = new Map();
|
|
1251
|
-
|
|
1252
|
-
this.__queueMicrotaskNative = (_queueMicrotask_bind = (_queueMicrotask = queueMicrotask) === null || _queueMicrotask === void 0 ? void 0 : _queueMicrotask.bind(window)) !== null && _queueMicrotask_bind !== void 0 ? _queueMicrotask_bind : Promise.resolve().then.bind(Promise.resolve());
|
|
1251
|
+
this.__queueMicrotaskNative = (_a = queueMicrotask === null || queueMicrotask === void 0 ? void 0 : queueMicrotask.bind(window)) !== null && _a !== void 0 ? _a : Promise.resolve().then.bind(Promise.resolve());
|
|
1253
1252
|
this.promisesRejections = new Set();
|
|
1254
1253
|
this.requestsIdle = new Set();
|
|
1255
1254
|
this.requestsRaf = new Set();
|
|
1256
|
-
|
|
1257
|
-
|
|
1255
|
+
this.requestIdleCallbackNative = (_c = (_b = window['requestIdleCallback']) === null || _b === void 0 ? void 0 : _b.bind(window)) !== null && _c !== void 0 ? _c : (callback, options)=>{
|
|
1256
|
+
var _a;
|
|
1258
1257
|
const start = Date.now();
|
|
1259
|
-
var _options_timeout;
|
|
1260
1258
|
return this.setTimeout(()=>{
|
|
1261
1259
|
callback({
|
|
1262
1260
|
didTimeout: false,
|
|
1263
1261
|
timeRemaining: ()=>Math.max(0, 50 - (Date.now() - start))
|
|
1264
1262
|
});
|
|
1265
|
-
}, (
|
|
1263
|
+
}, (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : 1);
|
|
1266
1264
|
};
|
|
1267
|
-
|
|
1268
|
-
this.__cancelIdleCallbackNative = (_window_cancelIdleCallback_bind = (_window_cancelIdleCallback = window['cancelIdleCallback']) === null || _window_cancelIdleCallback === void 0 ? void 0 : _window_cancelIdleCallback.bind(window)) !== null && _window_cancelIdleCallback_bind !== void 0 ? _window_cancelIdleCallback_bind : (request)=>{
|
|
1265
|
+
this.__cancelIdleCallbackNative = (_e = (_d = window['cancelIdleCallback']) === null || _d === void 0 ? void 0 : _d.bind(window)) !== null && _e !== void 0 ? _e : (request)=>{
|
|
1269
1266
|
this.clearTimeout(request);
|
|
1270
1267
|
};
|
|
1271
1268
|
this.isDestructed = false;
|
|
@@ -1644,7 +1641,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1644
1641
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1645
1642
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1646
1643
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1647
|
-
*/ const APP_VERSION = "4.5.
|
|
1644
|
+
*/ const APP_VERSION = "4.5.5";
|
|
1648
1645
|
// prettier-ignore
|
|
1649
1646
|
const ES = "es2020";
|
|
1650
1647
|
const IS_ES_MODERN = true;
|
|
@@ -1887,12 +1884,12 @@ class Create {
|
|
|
1887
1884
|
return div;
|
|
1888
1885
|
}
|
|
1889
1886
|
sandbox() {
|
|
1890
|
-
var
|
|
1887
|
+
var _a;
|
|
1891
1888
|
const iframe = this.element('iframe', {
|
|
1892
1889
|
sandbox: 'allow-same-origin'
|
|
1893
1890
|
});
|
|
1894
1891
|
this.doc.body.appendChild(iframe);
|
|
1895
|
-
const doc = (
|
|
1892
|
+
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
1896
1893
|
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(doc, 'iframe.contentWindow.document');
|
|
1897
1894
|
if (!doc) {
|
|
1898
1895
|
throw Error('Iframe error');
|
|
@@ -2186,9 +2183,9 @@ function cacheHTML(target, _, descriptor) {
|
|
|
2186
2183
|
let useCache = true;
|
|
2187
2184
|
const cached = new WeakMap();
|
|
2188
2185
|
descriptor.value = function(...attrs) {
|
|
2186
|
+
var _a;
|
|
2189
2187
|
if (useCache && cached.has(this.constructor)) {
|
|
2190
|
-
|
|
2191
|
-
return (_cached_get = cached.get(this.constructor)) === null || _cached_get === void 0 ? void 0 : _cached_get.cloneNode(true);
|
|
2188
|
+
return (_a = cached.get(this.constructor)) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
|
|
2192
2189
|
}
|
|
2193
2190
|
const value = fn.apply(this, attrs);
|
|
2194
2191
|
if (useCache && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isElement(value)) {
|
|
@@ -2504,8 +2501,8 @@ function persistent(target, propertyKey) {
|
|
|
2504
2501
|
const jodit = (0,_helpers_checker_is_view_object_js__WEBPACK_IMPORTED_MODULE_1__/* .isViewObject */ .h)(component) ? component : component.jodit, storageKey = `${jodit.options.namespace}${component.componentName}_prop_${propertyKey}`, initialValue = component[propertyKey];
|
|
2505
2502
|
Object.defineProperty(component, propertyKey, {
|
|
2506
2503
|
get () {
|
|
2507
|
-
var
|
|
2508
|
-
return (
|
|
2504
|
+
var _a;
|
|
2505
|
+
return (_a = jodit.storage.get(storageKey)) !== null && _a !== void 0 ? _a : initialValue;
|
|
2509
2506
|
},
|
|
2510
2507
|
set (value) {
|
|
2511
2508
|
jodit.storage.set(storageKey, value);
|
|
@@ -2598,11 +2595,11 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2598
2595
|
* Watch decorator. Added observer for some change in field value
|
|
2599
2596
|
*/ function watch(observeFields, opts) {
|
|
2600
2597
|
return (target, propertyKey)=>{
|
|
2598
|
+
var _a;
|
|
2601
2599
|
if (!(0,_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(target[propertyKey])) {
|
|
2602
2600
|
throw (0,_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3)('Handler must be a Function');
|
|
2603
2601
|
}
|
|
2604
|
-
|
|
2605
|
-
const immediately = (_opts_immediately = opts === null || opts === void 0 ? void 0 : opts.immediately) !== null && _opts_immediately !== void 0 ? _opts_immediately : true;
|
|
2602
|
+
const immediately = (_a = opts === null || opts === void 0 ? void 0 : opts.immediately) !== null && _a !== void 0 ? _a : true;
|
|
2606
2603
|
const context = opts === null || opts === void 0 ? void 0 : opts.context;
|
|
2607
2604
|
const process = (component)=>{
|
|
2608
2605
|
const view = (0,_helpers_checker_is_view_object_js__WEBPACK_IMPORTED_MODULE_4__/* .isViewObject */ .h)(component) ? component : component.jodit;
|
|
@@ -2924,31 +2921,31 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2924
2921
|
/**
|
|
2925
2922
|
* Check if element is element node
|
|
2926
2923
|
*/ static isElement(node) {
|
|
2927
|
-
var
|
|
2924
|
+
var _a;
|
|
2928
2925
|
if (!Dom.isNode(node)) {
|
|
2929
2926
|
return false;
|
|
2930
2927
|
}
|
|
2931
|
-
const win = (
|
|
2928
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2932
2929
|
return Boolean(win && node.nodeType === Node.ELEMENT_NODE);
|
|
2933
2930
|
}
|
|
2934
2931
|
/**
|
|
2935
2932
|
* Check if element is document fragment
|
|
2936
2933
|
*/ static isFragment(node) {
|
|
2937
|
-
var
|
|
2934
|
+
var _a;
|
|
2938
2935
|
if (!Dom.isNode(node)) {
|
|
2939
2936
|
return false;
|
|
2940
2937
|
}
|
|
2941
|
-
const win = (
|
|
2938
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2942
2939
|
return Boolean(win && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
|
|
2943
2940
|
}
|
|
2944
2941
|
/**
|
|
2945
2942
|
* Check if element is HTMLElement node
|
|
2946
2943
|
*/ static isHTMLElement(node) {
|
|
2947
|
-
var
|
|
2944
|
+
var _a;
|
|
2948
2945
|
if (!Dom.isNode(node)) {
|
|
2949
2946
|
return false;
|
|
2950
2947
|
}
|
|
2951
|
-
const win = (
|
|
2948
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2952
2949
|
return Boolean(win && node instanceof win.HTMLElement);
|
|
2953
2950
|
}
|
|
2954
2951
|
/**
|
|
@@ -3116,8 +3113,8 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
3116
3113
|
* Returns the nearest non-empty sibling
|
|
3117
3114
|
*/ static findNotEmptySibling(node, left) {
|
|
3118
3115
|
return Dom.findSibling(node, left, (n)=>{
|
|
3119
|
-
var
|
|
3120
|
-
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((
|
|
3116
|
+
var _a;
|
|
3117
|
+
return !Dom.isEmptyTextNode(n) && Boolean(!Dom.isText(n) || ((_a = n.nodeValue) === null || _a === void 0 ? void 0 : _a.length) && (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq)(n.nodeValue));
|
|
3121
3118
|
});
|
|
3122
3119
|
}
|
|
3123
3120
|
/**
|
|
@@ -3397,9 +3394,9 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3397
3394
|
return this;
|
|
3398
3395
|
}
|
|
3399
3396
|
startIdleRequest() {
|
|
3400
|
-
var
|
|
3397
|
+
var _a;
|
|
3401
3398
|
this.idleId = this.async.requestIdleCallback(this.workPerform, {
|
|
3402
|
-
timeout: (
|
|
3399
|
+
timeout: (_a = this.options.timeout) !== null && _a !== void 0 ? _a : 10
|
|
3403
3400
|
});
|
|
3404
3401
|
}
|
|
3405
3402
|
break(reason) {
|
|
@@ -3426,11 +3423,11 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3426
3423
|
this.stop();
|
|
3427
3424
|
}
|
|
3428
3425
|
workPerform(deadline) {
|
|
3426
|
+
var _a;
|
|
3429
3427
|
if (this.workNodes) {
|
|
3430
3428
|
this.isWorked = true;
|
|
3431
3429
|
let count = 0;
|
|
3432
|
-
|
|
3433
|
-
const chunkSize = (_this_options_timeoutChunkSize = this.options.timeoutChunkSize) !== null && _this_options_timeoutChunkSize !== void 0 ? _this_options_timeoutChunkSize : 50;
|
|
3430
|
+
const chunkSize = (_a = this.options.timeoutChunkSize) !== null && _a !== void 0 ? _a : 50;
|
|
3434
3431
|
while(!this.isFinished && (deadline.timeRemaining() > 0 || deadline.didTimeout && count <= chunkSize)){
|
|
3435
3432
|
const item = this.workNodes.next();
|
|
3436
3433
|
count += 1;
|
|
@@ -3450,11 +3447,11 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3450
3447
|
}
|
|
3451
3448
|
}
|
|
3452
3449
|
visitNode(nodeElm) {
|
|
3450
|
+
var _a;
|
|
3453
3451
|
if (!nodeElm || this.options.whatToShow !== undefined && nodeElm.nodeType !== this.options.whatToShow) {
|
|
3454
3452
|
return false;
|
|
3455
3453
|
}
|
|
3456
|
-
|
|
3457
|
-
return (_this_emit = this.emit('visit', nodeElm)) !== null && _this_emit !== void 0 ? _this_emit : false;
|
|
3454
|
+
return (_a = this.emit('visit', nodeElm)) !== null && _a !== void 0 ? _a : false;
|
|
3458
3455
|
}
|
|
3459
3456
|
constructor(async, options = {}){
|
|
3460
3457
|
super();
|
|
@@ -3646,6 +3643,7 @@ __decorate([
|
|
|
3646
3643
|
};
|
|
3647
3644
|
}
|
|
3648
3645
|
this.__eachEvent(events, (event, namespace)=>{
|
|
3646
|
+
var _a, _b;
|
|
3649
3647
|
if (event.length === 0) {
|
|
3650
3648
|
throw (0,_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_1__/* .error */ .z3)('Need event name');
|
|
3651
3649
|
}
|
|
@@ -3657,11 +3655,10 @@ __decorate([
|
|
|
3657
3655
|
};
|
|
3658
3656
|
store.set(event, namespace, block, options === null || options === void 0 ? void 0 : options.top);
|
|
3659
3657
|
if (isDOMElement(subject)) {
|
|
3660
|
-
var _options_capture, _options_capture1;
|
|
3661
3658
|
const eOpts = _constants_js__WEBPACK_IMPORTED_MODULE_0__.PASSIVE_EVENTS.has(event) ? {
|
|
3662
3659
|
passive: true,
|
|
3663
|
-
capture: (
|
|
3664
|
-
} : (
|
|
3660
|
+
capture: (_a = options === null || options === void 0 ? void 0 : options.capture) !== null && _a !== void 0 ? _a : false
|
|
3661
|
+
} : (_b = options === null || options === void 0 ? void 0 : options.capture) !== null && _b !== void 0 ? _b : false;
|
|
3665
3662
|
syntheticCallback.options = eOpts;
|
|
3666
3663
|
subject.addEventListener(event, syntheticCallback, eOpts);
|
|
3667
3664
|
this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
|
|
@@ -3737,9 +3734,9 @@ __decorate([
|
|
|
3737
3734
|
return this;
|
|
3738
3735
|
}
|
|
3739
3736
|
const removeEventListener = (block)=>{
|
|
3737
|
+
var _a;
|
|
3740
3738
|
if (isDOMElement(subject)) {
|
|
3741
|
-
|
|
3742
|
-
subject.removeEventListener(block.event, block.syntheticCallback, (_block_syntheticCallback_options = block.syntheticCallback.options) !== null && _block_syntheticCallback_options !== void 0 ? _block_syntheticCallback_options : false);
|
|
3739
|
+
subject.removeEventListener(block.event, block.syntheticCallback, (_a = block.syntheticCallback.options) !== null && _a !== void 0 ? _a : false);
|
|
3743
3740
|
this.__unmemoryDOMSubjectToHandler(subject, block.syntheticCallback);
|
|
3744
3741
|
}
|
|
3745
3742
|
}, removeCallbackFromNameSpace = (event, namespace)=>{
|
|
@@ -3976,17 +3973,17 @@ function isDOMElement(subject) {
|
|
|
3976
3973
|
* ```
|
|
3977
3974
|
*/ class Eventify {
|
|
3978
3975
|
on(name, func) {
|
|
3979
|
-
var
|
|
3976
|
+
var _a;
|
|
3980
3977
|
if (!this.__map.has(name)) {
|
|
3981
3978
|
this.__map.set(name, new Set());
|
|
3982
3979
|
}
|
|
3983
|
-
(
|
|
3980
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.add(func);
|
|
3984
3981
|
return this;
|
|
3985
3982
|
}
|
|
3986
3983
|
off(name, func) {
|
|
3984
|
+
var _a;
|
|
3987
3985
|
if (this.__map.has(name)) {
|
|
3988
|
-
|
|
3989
|
-
(_this___map_get = this.__map.get(name)) === null || _this___map_get === void 0 ? void 0 : _this___map_get.delete(func);
|
|
3986
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.delete(func);
|
|
3990
3987
|
}
|
|
3991
3988
|
return this;
|
|
3992
3989
|
}
|
|
@@ -3994,10 +3991,10 @@ function isDOMElement(subject) {
|
|
|
3994
3991
|
this.__map.clear();
|
|
3995
3992
|
}
|
|
3996
3993
|
emit(name, ...args) {
|
|
3994
|
+
var _a;
|
|
3997
3995
|
let result;
|
|
3998
3996
|
if (this.__map.has(name)) {
|
|
3999
|
-
|
|
4000
|
-
(_this___map_get = this.__map.get(name)) === null || _this___map_get === void 0 ? void 0 : _this___map_get.forEach((cb)=>{
|
|
3997
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.forEach((cb)=>{
|
|
4001
3998
|
result = cb(...args);
|
|
4002
3999
|
});
|
|
4003
4000
|
}
|
|
@@ -4378,11 +4375,11 @@ const boxes = new WeakMap();
|
|
|
4378
4375
|
* Get root element for view
|
|
4379
4376
|
* @internal
|
|
4380
4377
|
*/ function getPopupViewRoot(o, container, defaultRoot) {
|
|
4381
|
-
var
|
|
4382
|
-
return (
|
|
4378
|
+
var _a, _b, _c;
|
|
4379
|
+
return (_c = (_b = (_a = o.popupRoot) !== null && _a !== void 0 ? _a : o.shadowRoot) !== null && _b !== void 0 ? _b : _dom_index_js__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.closest(container, (parentElement)=>_dom_index_js__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.isHTMLElement(parentElement) && (_dom_index_js__WEBPACK_IMPORTED_MODULE_4__/* .Dom */ .J.isTag(parentElement, 'dialog') || [
|
|
4383
4380
|
'fixed',
|
|
4384
4381
|
'absolute'
|
|
4385
|
-
].includes((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.css)(parentElement, 'position'))), defaultRoot)) !== null &&
|
|
4382
|
+
].includes((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.css)(parentElement, 'position'))), defaultRoot)) !== null && _c !== void 0 ? _c : defaultRoot;
|
|
4386
4383
|
}
|
|
4387
4384
|
/**
|
|
4388
4385
|
* Global event emitter
|
|
@@ -4491,8 +4488,8 @@ const boxes = new WeakMap();
|
|
|
4491
4488
|
* Jodit.modules.Helpers.toArray(1) // []
|
|
4492
4489
|
* ```
|
|
4493
4490
|
*/ const toArray = function toArray(...args) {
|
|
4494
|
-
var
|
|
4495
|
-
const func = (0,_checker_is_native_function_js__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from) ? Array.from : (
|
|
4491
|
+
var _a;
|
|
4492
|
+
const func = (0,_checker_is_native_function_js__WEBPACK_IMPORTED_MODULE_1__/* .isNativeFunction */ .a)(Array.from) ? Array.from : (_a = (0,_utils_reset_js__WEBPACK_IMPORTED_MODULE_0__/* .reset */ .c)('Array.from')) !== null && _a !== void 0 ? _a : Array.from;
|
|
4496
4493
|
return func.apply(Array, args);
|
|
4497
4494
|
};
|
|
4498
4495
|
|
|
@@ -5398,7 +5395,7 @@ function normalizeCSS(s) {
|
|
|
5398
5395
|
});
|
|
5399
5396
|
convertedString = iframeDoc.firstChild ? (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq)(iframeDoc.body.innerHTML) : '';
|
|
5400
5397
|
}
|
|
5401
|
-
} catch (
|
|
5398
|
+
} catch (_a) {} finally{
|
|
5402
5399
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
|
|
5403
5400
|
}
|
|
5404
5401
|
if (convertedString) {
|
|
@@ -6400,6 +6397,7 @@ function size(subject) {
|
|
|
6400
6397
|
/**
|
|
6401
6398
|
* Calculate screen element position
|
|
6402
6399
|
*/ function position(elm, jodit, recurse = false) {
|
|
6400
|
+
var _a, _b;
|
|
6403
6401
|
const rect = elm.getBoundingClientRect();
|
|
6404
6402
|
let xPos = rect.left, yPos = rect.top;
|
|
6405
6403
|
if ((0,_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y)(jodit) && jodit.iframe && jodit.ed.body.contains(elm) && !recurse) {
|
|
@@ -6407,12 +6405,11 @@ function size(subject) {
|
|
|
6407
6405
|
xPos += left;
|
|
6408
6406
|
yPos += top;
|
|
6409
6407
|
}
|
|
6410
|
-
var _elm_offsetWidth, _elm_offsetHeight;
|
|
6411
6408
|
return {
|
|
6412
6409
|
left: Math.round(xPos),
|
|
6413
6410
|
top: Math.round(yPos),
|
|
6414
|
-
width: Math.round((
|
|
6415
|
-
height: Math.round((
|
|
6411
|
+
width: Math.round((_a = elm.offsetWidth) !== null && _a !== void 0 ? _a : rect.width),
|
|
6412
|
+
height: Math.round((_b = elm.offsetHeight) !== null && _b !== void 0 ? _b : rect.height)
|
|
6416
6413
|
};
|
|
6417
6414
|
}
|
|
6418
6415
|
|
|
@@ -7723,11 +7720,11 @@ function fastClone(object) {
|
|
|
7723
7720
|
*/
|
|
7724
7721
|
const keepNames = new Map();
|
|
7725
7722
|
const getClassName = (obj)=>{
|
|
7726
|
-
var
|
|
7723
|
+
var _a;
|
|
7727
7724
|
if ((0,_checker_is_function_js__WEBPACK_IMPORTED_MODULE_0__/* .isFunction */ .T)(obj.className)) {
|
|
7728
7725
|
return obj.className();
|
|
7729
7726
|
}
|
|
7730
|
-
const constructor = ((
|
|
7727
|
+
const constructor = ((_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.originalConstructor) || obj.constructor;
|
|
7731
7728
|
if (keepNames.has(constructor)) {
|
|
7732
7729
|
return keepNames.get(constructor);
|
|
7733
7730
|
}
|
|
@@ -7787,7 +7784,7 @@ const getClassName = (obj)=>{
|
|
|
7787
7784
|
}
|
|
7788
7785
|
result = result[part];
|
|
7789
7786
|
}
|
|
7790
|
-
} catch (
|
|
7787
|
+
} catch (_a) {
|
|
7791
7788
|
return null; // permission denied ore another access exception
|
|
7792
7789
|
}
|
|
7793
7790
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_1__/* .isVoid */ .R)(result)) {
|
|
@@ -8051,8 +8048,8 @@ const getClassName = (obj)=>{
|
|
|
8051
8048
|
item.src = a.href;
|
|
8052
8049
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(a);
|
|
8053
8050
|
restoreAttributes.push(()=>{
|
|
8054
|
-
var
|
|
8055
|
-
item.src = (
|
|
8051
|
+
var _a;
|
|
8052
|
+
item.src = (_a = previousAttrs[2]) !== null && _a !== void 0 ? _a : '';
|
|
8056
8053
|
(0,_attr_js__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(item, {
|
|
8057
8054
|
width: previousAttrs[0] || null,
|
|
8058
8055
|
height: previousAttrs[1] || null
|
|
@@ -8157,11 +8154,11 @@ const getClassName = (obj)=>{
|
|
|
8157
8154
|
}
|
|
8158
8155
|
try {
|
|
8159
8156
|
box.appendChild(newNode);
|
|
8160
|
-
} catch (
|
|
8157
|
+
} catch (_a) {}
|
|
8161
8158
|
} else {
|
|
8162
8159
|
try {
|
|
8163
8160
|
box.appendChild(c.cloneNode(true));
|
|
8164
|
-
} catch (
|
|
8161
|
+
} catch (_b) {}
|
|
8165
8162
|
}
|
|
8166
8163
|
}
|
|
8167
8164
|
};
|
|
@@ -8206,6 +8203,7 @@ const map = {};
|
|
|
8206
8203
|
* ```
|
|
8207
8204
|
* You must use the function derived from the method immediately as its iframe is being removed
|
|
8208
8205
|
*/ function reset(key) {
|
|
8206
|
+
var _a, _b;
|
|
8209
8207
|
if (!(key in map)) {
|
|
8210
8208
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
8211
8209
|
try {
|
|
@@ -8223,12 +8221,10 @@ const map = {};
|
|
|
8223
8221
|
throw e;
|
|
8224
8222
|
}
|
|
8225
8223
|
} finally{
|
|
8226
|
-
|
|
8227
|
-
(_iframe_parentNode = iframe.parentNode) === null || _iframe_parentNode === void 0 ? void 0 : _iframe_parentNode.removeChild(iframe);
|
|
8224
|
+
(_a = iframe.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(iframe);
|
|
8228
8225
|
}
|
|
8229
8226
|
}
|
|
8230
|
-
|
|
8231
|
-
return (_map_key = map[key]) !== null && _map_key !== void 0 ? _map_key : null;
|
|
8227
|
+
return (_b = map[key]) !== null && _b !== void 0 ? _b : null;
|
|
8232
8228
|
}
|
|
8233
8229
|
|
|
8234
8230
|
|
|
@@ -8398,7 +8394,7 @@ const $$temp = ()=>{
|
|
|
8398
8394
|
if ((0,_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(element)) {
|
|
8399
8395
|
try {
|
|
8400
8396
|
resolved = od.querySelector(element);
|
|
8401
|
-
} catch (
|
|
8397
|
+
} catch (_a) {
|
|
8402
8398
|
throw (0,_index_js__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3)('String "' + element + '" should be valid HTML selector');
|
|
8403
8399
|
}
|
|
8404
8400
|
}
|
|
@@ -8574,9 +8570,9 @@ const keys = (obj, own = true)=>{
|
|
|
8574
8570
|
/**
|
|
8575
8571
|
* Memorize last user chose
|
|
8576
8572
|
*/ const memorizeExec = (editor, _, { control }, preProcessValue)=>{
|
|
8573
|
+
var _a;
|
|
8577
8574
|
const key = `button${control.command}`;
|
|
8578
|
-
|
|
8579
|
-
let value = (_ref = control.args && control.args[0]) !== null && _ref !== void 0 ? _ref : (0,_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(editor, key);
|
|
8575
|
+
let value = (_a = control.args && control.args[0]) !== null && _a !== void 0 ? _a : (0,_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(editor, key);
|
|
8580
8576
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value)) {
|
|
8581
8577
|
return false;
|
|
8582
8578
|
}
|
|
@@ -8594,7 +8590,7 @@ const keys = (obj, own = true)=>{
|
|
|
8594
8590
|
}
|
|
8595
8591
|
try {
|
|
8596
8592
|
return event.dataTransfer || new DataTransfer();
|
|
8597
|
-
} catch (
|
|
8593
|
+
} catch (_a) {
|
|
8598
8594
|
return null;
|
|
8599
8595
|
}
|
|
8600
8596
|
};
|
|
@@ -9047,6 +9043,7 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
9047
9043
|
}
|
|
9048
9044
|
}
|
|
9049
9045
|
__beforeDestruct() {
|
|
9046
|
+
var _a;
|
|
9050
9047
|
if (this.isInDestruct) {
|
|
9051
9048
|
return;
|
|
9052
9049
|
}
|
|
@@ -9057,8 +9054,7 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
9057
9054
|
return super.destruct();
|
|
9058
9055
|
}
|
|
9059
9056
|
if ((0,_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_2__/* .isJoditObject */ .y)(j)) {
|
|
9060
|
-
|
|
9061
|
-
(_this_buttons = this.buttons) === null || _this_buttons === void 0 ? void 0 : _this_buttons.forEach((btn)=>{
|
|
9057
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>{
|
|
9062
9058
|
j === null || j === void 0 ? void 0 : j.unregisterButton(btn);
|
|
9063
9059
|
});
|
|
9064
9060
|
}
|
|
@@ -9204,7 +9200,7 @@ class Ajax {
|
|
|
9204
9200
|
try {
|
|
9205
9201
|
this.__isFulfilled = true;
|
|
9206
9202
|
this.xhr.abort();
|
|
9207
|
-
} catch (
|
|
9203
|
+
} catch (_a) {}
|
|
9208
9204
|
return this;
|
|
9209
9205
|
}
|
|
9210
9206
|
send() {
|
|
@@ -9214,6 +9210,7 @@ class Ajax {
|
|
|
9214
9210
|
var _this = this;
|
|
9215
9211
|
return this.__async.promise(/*#__PURE__*/ function() {
|
|
9216
9212
|
var _ref = _async_to_generator(function*(resolve, reject) {
|
|
9213
|
+
var _a;
|
|
9217
9214
|
const onReject = ()=>{
|
|
9218
9215
|
_this.__isFulfilled = true;
|
|
9219
9216
|
reject(_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
|
|
@@ -9233,16 +9230,16 @@ class Ajax {
|
|
|
9233
9230
|
xhr.responseType = o.responseType;
|
|
9234
9231
|
}
|
|
9235
9232
|
xhr.onprogress = (e)=>{
|
|
9236
|
-
var
|
|
9233
|
+
var _a, _b;
|
|
9237
9234
|
let percentComplete = 0;
|
|
9238
9235
|
if (e.lengthComputable) {
|
|
9239
9236
|
percentComplete = e.loaded / e.total * 100;
|
|
9240
9237
|
}
|
|
9241
|
-
(
|
|
9238
|
+
(_b = (_a = _this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, percentComplete);
|
|
9242
9239
|
};
|
|
9243
9240
|
xhr.onreadystatechange = ()=>{
|
|
9244
|
-
var
|
|
9245
|
-
(
|
|
9241
|
+
var _a, _b;
|
|
9242
|
+
(_b = (_a = _this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, 10);
|
|
9246
9243
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
9247
9244
|
if (o.successStatuses.includes(xhr.status)) {
|
|
9248
9245
|
onResolve();
|
|
@@ -9252,8 +9249,7 @@ class Ajax {
|
|
|
9252
9249
|
}
|
|
9253
9250
|
}
|
|
9254
9251
|
};
|
|
9255
|
-
|
|
9256
|
-
xhr.withCredentials = (_o_withCredentials = o.withCredentials) !== null && _o_withCredentials !== void 0 ? _o_withCredentials : false;
|
|
9252
|
+
xhr.withCredentials = (_a = o.withCredentials) !== null && _a !== void 0 ? _a : false;
|
|
9257
9253
|
const { url, data, method } = request;
|
|
9258
9254
|
xhr.open(method, url, true);
|
|
9259
9255
|
if (o.contentType && xhr.setRequestHeader) {
|
|
@@ -9477,8 +9473,8 @@ class Response {
|
|
|
9477
9473
|
* Check if the cursor is at the edge of the string
|
|
9478
9474
|
* @private
|
|
9479
9475
|
*/ function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
9480
|
-
var
|
|
9481
|
-
const text = ((
|
|
9476
|
+
var _a;
|
|
9477
|
+
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
9482
9478
|
if (end && text.replace((0,_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
9483
9479
|
return true;
|
|
9484
9480
|
}
|
|
@@ -9733,10 +9729,9 @@ class Selection {
|
|
|
9733
9729
|
/**
|
|
9734
9730
|
* Clear all selection
|
|
9735
9731
|
*/ clear() {
|
|
9736
|
-
var
|
|
9737
|
-
if ((
|
|
9738
|
-
|
|
9739
|
-
(_this_sel1 = this.sel) === null || _this_sel1 === void 0 ? void 0 : _this_sel1.removeAllRanges();
|
|
9732
|
+
var _a, _b;
|
|
9733
|
+
if ((_a = this.sel) === null || _a === void 0 ? void 0 : _a.rangeCount) {
|
|
9734
|
+
(_b = this.sel) === null || _b === void 0 ? void 0 : _b.removeAllRanges();
|
|
9740
9735
|
}
|
|
9741
9736
|
}
|
|
9742
9737
|
/**
|
|
@@ -9775,7 +9770,7 @@ class Selection {
|
|
|
9775
9770
|
rng.collapse(true);
|
|
9776
9771
|
this.selectRange(rng);
|
|
9777
9772
|
return true;
|
|
9778
|
-
} catch (
|
|
9773
|
+
} catch (_a) {}
|
|
9779
9774
|
return false;
|
|
9780
9775
|
}
|
|
9781
9776
|
/**
|
|
@@ -9874,7 +9869,7 @@ class Selection {
|
|
|
9874
9869
|
return result;
|
|
9875
9870
|
}
|
|
9876
9871
|
restoreFakes(fakes) {
|
|
9877
|
-
var
|
|
9872
|
+
var _a, _b, _c, _d;
|
|
9878
9873
|
const nodes = fakes.filter((n)=>n.isConnected);
|
|
9879
9874
|
if (!nodes.length) {
|
|
9880
9875
|
return;
|
|
@@ -9886,10 +9881,10 @@ class Selection {
|
|
|
9886
9881
|
range.setEndBefore(fakeRight);
|
|
9887
9882
|
}
|
|
9888
9883
|
this.selectRange(range);
|
|
9889
|
-
if (((
|
|
9884
|
+
if (((_a = fakeLeft.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) !== ((_b = fakeLeft.parentNode) === null || _b === void 0 ? void 0 : _b.lastChild)) {
|
|
9890
9885
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeLeft);
|
|
9891
9886
|
}
|
|
9892
|
-
if ((fakeRight === null || fakeRight === void 0 ? void 0 :
|
|
9887
|
+
if (((_c = fakeRight === null || fakeRight === void 0 ? void 0 : fakeRight.parentNode) === null || _c === void 0 ? void 0 : _c.firstChild) !== ((_d = fakeRight === null || fakeRight === void 0 ? void 0 : fakeRight.parentNode) === null || _d === void 0 ? void 0 : _d.lastChild)) {
|
|
9893
9888
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeRight);
|
|
9894
9889
|
}
|
|
9895
9890
|
}
|
|
@@ -9947,7 +9942,7 @@ class Selection {
|
|
|
9947
9942
|
}
|
|
9948
9943
|
try {
|
|
9949
9944
|
sel.addRange(ranges[i].cloneRange());
|
|
9950
|
-
} catch (
|
|
9945
|
+
} catch (_a) {}
|
|
9951
9946
|
}
|
|
9952
9947
|
}
|
|
9953
9948
|
return info;
|
|
@@ -9957,6 +9952,7 @@ class Selection {
|
|
|
9957
9952
|
*/ focus(options = {
|
|
9958
9953
|
preventScroll: true
|
|
9959
9954
|
}) {
|
|
9955
|
+
var _a, _b;
|
|
9960
9956
|
if (!this.isFocused()) {
|
|
9961
9957
|
const scrollParent = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getScrollParent)(this.j.container), scrollTop = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.scrollTop;
|
|
9962
9958
|
if (this.j.iframe) {
|
|
@@ -9977,8 +9973,7 @@ class Selection {
|
|
|
9977
9973
|
this.selectRange(range, false);
|
|
9978
9974
|
}
|
|
9979
9975
|
if (!this.j.editorIsActive) {
|
|
9980
|
-
|
|
9981
|
-
(_this_j = this.j) === null || _this_j === void 0 ? void 0 : (_this_j_events = _this_j.events) === null || _this_j_events === void 0 ? void 0 : _this_j_events.fire('focus');
|
|
9976
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.fire('focus');
|
|
9982
9977
|
}
|
|
9983
9978
|
return true;
|
|
9984
9979
|
}
|
|
@@ -10175,7 +10170,7 @@ class Selection {
|
|
|
10175
10170
|
* Call callback for all selection node
|
|
10176
10171
|
*/ // eslint-disable-next-line complexity
|
|
10177
10172
|
eachSelection(callback) {
|
|
10178
|
-
var
|
|
10173
|
+
var _a;
|
|
10179
10174
|
const sel = this.sel;
|
|
10180
10175
|
if (!sel || !sel.rangeCount) {
|
|
10181
10176
|
return;
|
|
@@ -10191,7 +10186,7 @@ class Selection {
|
|
|
10191
10186
|
const elementOffset = startOffset < length ? startOffset : length - 1;
|
|
10192
10187
|
let start = range.startContainer === this.area ? root.childNodes[elementOffset] : range.startContainer;
|
|
10193
10188
|
let end = range.endContainer === this.area ? root.childNodes[range.endOffset - 1] : range.endContainer;
|
|
10194
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) && start === range.startContainer && range.startOffset === ((
|
|
10189
|
+
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) && start === range.startContainer && range.startOffset === ((_a = start.nodeValue) === null || _a === void 0 ? void 0 : _a.length) && start.nextSibling) {
|
|
10195
10190
|
start = start.nextSibling;
|
|
10196
10191
|
}
|
|
10197
10192
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) && end === range.endContainer && range.endOffset === 0 && end.previousSibling) {
|
|
@@ -10247,8 +10242,8 @@ class Selection {
|
|
|
10247
10242
|
*
|
|
10248
10243
|
* @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
|
|
10249
10244
|
*/ cursorInTheEdge(start, parentBlock, fake = null) {
|
|
10250
|
-
var
|
|
10251
|
-
const end = !start, range = (
|
|
10245
|
+
var _a;
|
|
10246
|
+
const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
10252
10247
|
fake !== null && fake !== void 0 ? fake : fake = this.current(false);
|
|
10253
10248
|
if (!range || !fake || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
|
|
10254
10249
|
return null;
|
|
@@ -10312,6 +10307,7 @@ class Selection {
|
|
|
10312
10307
|
/**
|
|
10313
10308
|
* Add fake node for new cursor position
|
|
10314
10309
|
*/ setCursorNearWith(node, inStart) {
|
|
10310
|
+
var _a, _b;
|
|
10315
10311
|
this.errorNode(node);
|
|
10316
10312
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.up(node, (elm)=>elm === this.area || elm && elm.parentNode === this.area, this.area)) {
|
|
10317
10313
|
throw (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.error)('Node element must be in editor');
|
|
@@ -10328,9 +10324,7 @@ class Selection {
|
|
|
10328
10324
|
if (inStart) {
|
|
10329
10325
|
range.setStart(node, 0);
|
|
10330
10326
|
} else {
|
|
10331
|
-
|
|
10332
|
-
var _node_nodeValue_length;
|
|
10333
|
-
range.setEnd(node, (_node_nodeValue_length = (_node_nodeValue = node.nodeValue) === null || _node_nodeValue === void 0 ? void 0 : _node_nodeValue.length) !== null && _node_nodeValue_length !== void 0 ? _node_nodeValue_length : 0);
|
|
10327
|
+
range.setEnd(node, (_b = (_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
10334
10328
|
}
|
|
10335
10329
|
}
|
|
10336
10330
|
range.collapse(inStart);
|
|
@@ -10577,10 +10571,9 @@ class Selection {
|
|
|
10577
10571
|
}
|
|
10578
10572
|
// After splitting some part can be empty
|
|
10579
10573
|
const fillFakeParent = (fake)=>{
|
|
10580
|
-
var
|
|
10581
|
-
if ((fake === null || fake === void 0 ? void 0 :
|
|
10582
|
-
|
|
10583
|
-
fake === null || fake === void 0 ? void 0 : (_fake_parentNode2 = fake.parentNode) === null || _fake_parentNode2 === void 0 ? void 0 : _fake_parentNode2.appendChild(br.cloneNode());
|
|
10574
|
+
var _a, _b, _c;
|
|
10575
|
+
if (((_a = fake === null || fake === void 0 ? void 0 : fake.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === ((_b = fake === null || fake === void 0 ? void 0 : fake.parentNode) === null || _b === void 0 ? void 0 : _b.lastChild)) {
|
|
10576
|
+
(_c = fake === null || fake === void 0 ? void 0 : fake.parentNode) === null || _c === void 0 ? void 0 : _c.appendChild(br.cloneNode());
|
|
10584
10577
|
}
|
|
10585
10578
|
};
|
|
10586
10579
|
fillFakeParent(prevFake);
|
|
@@ -11122,7 +11115,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
11122
11115
|
* @param strictStyle - strict style mode - true - the element has the same style keys as in the commit, but not their values
|
|
11123
11116
|
* @private
|
|
11124
11117
|
*/ function isSuitElement(commitStyle, elm, strict, strictStyle = true) {
|
|
11125
|
-
var
|
|
11118
|
+
var _a;
|
|
11126
11119
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
11127
11120
|
return false;
|
|
11128
11121
|
}
|
|
@@ -11134,7 +11127,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
11134
11127
|
if (elmIsSame && !(elementIsDefault && strict)) {
|
|
11135
11128
|
return true;
|
|
11136
11129
|
}
|
|
11137
|
-
const elmHasSameStyle = Boolean(((
|
|
11130
|
+
const elmHasSameStyle = Boolean(((_a = options.attributes) === null || _a === void 0 ? void 0 : _a.style) && (strictStyle ? (0,_has_same_style_js__WEBPACK_IMPORTED_MODULE_1__/* .hasSameStyle */ .g)(elm, options.attributes.style) : (0,_has_same_style_js__WEBPACK_IMPORTED_MODULE_1__/* .hasSameStyleKeys */ .Y)(elm, options.attributes.style)));
|
|
11138
11131
|
if (elmHasSameStyle && !commitStyle.elementIsList) {
|
|
11139
11132
|
return true;
|
|
11140
11133
|
}
|
|
@@ -11155,13 +11148,13 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
11155
11148
|
* Apply `{element:'strong'}`
|
|
11156
11149
|
* @private
|
|
11157
11150
|
*/ function isSameStyleChild(commitStyle, elm) {
|
|
11158
|
-
var
|
|
11151
|
+
var _a, _b;
|
|
11159
11152
|
const { element, options } = commitStyle;
|
|
11160
11153
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
11161
11154
|
return false;
|
|
11162
11155
|
}
|
|
11163
11156
|
const elmIsSame = elm.nodeName.toLowerCase() === element;
|
|
11164
|
-
const elmHasSameStyle = Boolean(((
|
|
11157
|
+
const elmHasSameStyle = Boolean(((_a = options.attributes) === null || _a === void 0 ? void 0 : _a.style) && (0,_has_same_style_js__WEBPACK_IMPORTED_MODULE_1__/* .hasSameStyleKeys */ .Y)(elm, (_b = options.attributes) === null || _b === void 0 ? void 0 : _b.style));
|
|
11165
11158
|
return elmIsSame && elmHasSameStyle;
|
|
11166
11159
|
}
|
|
11167
11160
|
|
|
@@ -11423,7 +11416,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11423
11416
|
/**
|
|
11424
11417
|
* Creates an iframe into which elements will be inserted to test their default styles in the browser
|
|
11425
11418
|
*/ function getShadowRoot(jodit) {
|
|
11426
|
-
var
|
|
11419
|
+
var _a;
|
|
11427
11420
|
if ((0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
|
|
11428
11421
|
return (0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
|
|
11429
11422
|
}
|
|
@@ -11437,7 +11430,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11437
11430
|
});
|
|
11438
11431
|
iframe.src = 'about:blank';
|
|
11439
11432
|
container.appendChild(iframe);
|
|
11440
|
-
const doc = (
|
|
11433
|
+
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
11441
11434
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
11442
11435
|
(0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
|
|
11443
11436
|
return shadowRoot;
|
|
@@ -11479,11 +11472,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11479
11472
|
* Unwrap all suit elements inside
|
|
11480
11473
|
* @private
|
|
11481
11474
|
*/ function unwrapChildren(style, font) {
|
|
11482
|
-
var
|
|
11475
|
+
var _a;
|
|
11483
11476
|
const needUnwrap = [];
|
|
11484
11477
|
const needChangeStyle = [];
|
|
11485
11478
|
let firstElementSuit;
|
|
11486
|
-
const cssStyle = (
|
|
11479
|
+
const cssStyle = (_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style;
|
|
11487
11480
|
if (font.firstChild) {
|
|
11488
11481
|
const gen = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.eachGen(font);
|
|
11489
11482
|
let item = gen.next();
|
|
@@ -11651,10 +11644,10 @@ const WRAP_NODES = new Set([
|
|
|
11651
11644
|
|
|
11652
11645
|
|
|
11653
11646
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
11654
|
-
var
|
|
11655
|
-
_editor_firstChild;
|
|
11647
|
+
var _a;
|
|
11656
11648
|
const { s: sel, editor } = jodit;
|
|
11657
|
-
|
|
11649
|
+
// sel.save();
|
|
11650
|
+
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
11658
11651
|
const fakes = sel.fakes();
|
|
11659
11652
|
const gen = jodit.s.wrapInTagGen(fakes);
|
|
11660
11653
|
let font = gen.next();
|
|
@@ -11714,8 +11707,8 @@ class CommitStyle {
|
|
|
11714
11707
|
return data[key];
|
|
11715
11708
|
}
|
|
11716
11709
|
setApplied(elm, key) {
|
|
11717
|
-
var
|
|
11718
|
-
const data = (
|
|
11710
|
+
var _a;
|
|
11711
|
+
const data = (_a = this.__applyMap.get(elm)) !== null && _a !== void 0 ? _a : {};
|
|
11719
11712
|
data[key] = true;
|
|
11720
11713
|
this.__applyMap.set(elm, data);
|
|
11721
11714
|
}
|
|
@@ -12078,7 +12071,7 @@ const transactions = {
|
|
|
12078
12071
|
const result = localStorage.getItem(tmpKey) === '1';
|
|
12079
12072
|
localStorage.removeItem(tmpKey);
|
|
12080
12073
|
return result;
|
|
12081
|
-
} catch (
|
|
12074
|
+
} catch (_a) {}
|
|
12082
12075
|
return false;
|
|
12083
12076
|
};
|
|
12084
12077
|
let result;
|
|
@@ -12098,13 +12091,13 @@ const transactions = {
|
|
|
12098
12091
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
12099
12092
|
json[key] = value;
|
|
12100
12093
|
localStorage.setItem(this.rootKey, JSON.stringify(json));
|
|
12101
|
-
} catch (
|
|
12094
|
+
} catch (_a) {}
|
|
12102
12095
|
return this;
|
|
12103
12096
|
}
|
|
12104
12097
|
delete(key) {
|
|
12105
12098
|
try {
|
|
12106
12099
|
localStorage.removeItem(this.rootKey);
|
|
12107
|
-
} catch (
|
|
12100
|
+
} catch (_a) {}
|
|
12108
12101
|
return this;
|
|
12109
12102
|
}
|
|
12110
12103
|
get(key) {
|
|
@@ -12112,7 +12105,7 @@ const transactions = {
|
|
|
12112
12105
|
const buffer = localStorage.getItem(this.rootKey);
|
|
12113
12106
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
12114
12107
|
return json[key] !== undefined ? json[key] : null;
|
|
12115
|
-
} catch (
|
|
12108
|
+
} catch (_a) {}
|
|
12116
12109
|
}
|
|
12117
12110
|
exists(key) {
|
|
12118
12111
|
return this.get(key) != null;
|
|
@@ -12120,7 +12113,7 @@ const transactions = {
|
|
|
12120
12113
|
clear() {
|
|
12121
12114
|
try {
|
|
12122
12115
|
localStorage.removeItem(this.rootKey);
|
|
12123
|
-
} catch (
|
|
12116
|
+
} catch (_a) {}
|
|
12124
12117
|
return this;
|
|
12125
12118
|
}
|
|
12126
12119
|
constructor(rootKey){
|
|
@@ -12408,8 +12401,8 @@ class Mods {
|
|
|
12408
12401
|
/**
|
|
12409
12402
|
* Get BEM class modification value
|
|
12410
12403
|
*/ getMod(name) {
|
|
12411
|
-
var
|
|
12412
|
-
return (
|
|
12404
|
+
var _a;
|
|
12405
|
+
return (_a = this.mods[name]) !== null && _a !== void 0 ? _a : null;
|
|
12413
12406
|
}
|
|
12414
12407
|
}
|
|
12415
12408
|
|
|
@@ -12748,7 +12741,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12748
12741
|
options.appendChild(childContainer);
|
|
12749
12742
|
}
|
|
12750
12743
|
select(indexOrValue) {
|
|
12751
|
-
var
|
|
12744
|
+
var _a, _b;
|
|
12752
12745
|
this.elements.forEach((elm, index)=>{
|
|
12753
12746
|
if (index === indexOrValue || elm.state.value === indexOrValue) {
|
|
12754
12747
|
elm.state.activated = true;
|
|
@@ -12761,13 +12754,13 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12761
12754
|
value: elm.state.value
|
|
12762
12755
|
}));
|
|
12763
12756
|
this.jodit.e.fire(this, 'select', result);
|
|
12764
|
-
(
|
|
12757
|
+
(_b = (_a = this.options).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, result);
|
|
12765
12758
|
}
|
|
12766
12759
|
constructor(jodit, options = {
|
|
12767
12760
|
radio: true
|
|
12768
12761
|
}){
|
|
12769
|
-
var
|
|
12770
|
-
super(jodit, (
|
|
12762
|
+
var _a, _b;
|
|
12763
|
+
super(jodit, (_a = options.options) === null || _a === void 0 ? void 0 : _a.map((opt)=>{
|
|
12771
12764
|
const btn = new _button_button_js__WEBPACK_IMPORTED_MODULE_1__/* .UIButton */ .lD(jodit, {
|
|
12772
12765
|
text: opt.text,
|
|
12773
12766
|
value: opt.value,
|
|
@@ -12779,8 +12772,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12779
12772
|
return btn;
|
|
12780
12773
|
}), options);
|
|
12781
12774
|
this.options = options;
|
|
12782
|
-
|
|
12783
|
-
this.select((_options_value = options.value) !== null && _options_value !== void 0 ? _options_value : 0);
|
|
12775
|
+
this.select((_b = options.value) !== null && _b !== void 0 ? _b : 0);
|
|
12784
12776
|
}
|
|
12785
12777
|
};
|
|
12786
12778
|
UIButtonGroup = __decorate([
|
|
@@ -13070,8 +13062,8 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
13070
13062
|
return this;
|
|
13071
13063
|
}
|
|
13072
13064
|
updateParentElement(target) {
|
|
13073
|
-
var
|
|
13074
|
-
(
|
|
13065
|
+
var _a;
|
|
13066
|
+
(_a = this.__parentElement) === null || _a === void 0 ? void 0 : _a.updateParentElement(target);
|
|
13075
13067
|
return this;
|
|
13076
13068
|
}
|
|
13077
13069
|
/** @override */ get(chain, obj) {
|
|
@@ -13285,11 +13277,10 @@ let UIForm = class UIForm extends _group_group_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
13285
13277
|
return form;
|
|
13286
13278
|
}
|
|
13287
13279
|
constructor(...args){
|
|
13288
|
-
var
|
|
13280
|
+
var _a, _b;
|
|
13289
13281
|
super(...args);
|
|
13290
|
-
if ((
|
|
13291
|
-
|
|
13292
|
-
this.container.classList.add((_this_options1 = this.options) === null || _this_options1 === void 0 ? void 0 : _this_options1.className);
|
|
13282
|
+
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.className) {
|
|
13283
|
+
this.container.classList.add((_b = this.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
13293
13284
|
}
|
|
13294
13285
|
}
|
|
13295
13286
|
};
|
|
@@ -13829,12 +13820,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13829
13820
|
this.updateValidators();
|
|
13830
13821
|
}
|
|
13831
13822
|
updateValidators() {
|
|
13832
|
-
var
|
|
13823
|
+
var _a;
|
|
13833
13824
|
this.validators.clear();
|
|
13834
13825
|
if (this.state.required) {
|
|
13835
13826
|
this.validators.add(_validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators.required */ .O.required);
|
|
13836
13827
|
}
|
|
13837
|
-
(
|
|
13828
|
+
(_a = this.state.validators) === null || _a === void 0 ? void 0 : _a.forEach((name)=>{
|
|
13838
13829
|
const validator = _validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators */ .O[name];
|
|
13839
13830
|
validator && this.validators.add(validator);
|
|
13840
13831
|
});
|
|
@@ -13868,12 +13859,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13868
13859
|
/**
|
|
13869
13860
|
* Call on every native value changed
|
|
13870
13861
|
*/ onChangeValue() {
|
|
13862
|
+
var _a, _b;
|
|
13871
13863
|
const { value } = this;
|
|
13872
13864
|
if (this.state.value !== value) {
|
|
13873
|
-
var _this_state_onChange, _this_state;
|
|
13874
13865
|
this.state.value = value;
|
|
13875
13866
|
this.j.e.fire(this, 'change', value);
|
|
13876
|
-
(
|
|
13867
|
+
(_b = (_a = this.state).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
13877
13868
|
}
|
|
13878
13869
|
}
|
|
13879
13870
|
validate() {
|
|
@@ -13883,14 +13874,13 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13883
13874
|
return validate;
|
|
13884
13875
|
}
|
|
13885
13876
|
__markInputInvalid() {
|
|
13877
|
+
var _a, _b, _c, _d;
|
|
13886
13878
|
if (this.error) {
|
|
13887
|
-
var _this_nativeInput_setCustomValidity, _this_nativeInput;
|
|
13888
13879
|
this.nativeInput.setAttribute('aria-invalid', 'true');
|
|
13889
|
-
(
|
|
13880
|
+
(_b = (_a = this.nativeInput).setCustomValidity) === null || _b === void 0 ? void 0 : _b.call(_a, this.error);
|
|
13890
13881
|
} else {
|
|
13891
|
-
var _this_nativeInput_setCustomValidity1, _this_nativeInput1;
|
|
13892
13882
|
this.nativeInput.removeAttribute('aria-invalid');
|
|
13893
|
-
(
|
|
13883
|
+
(_d = (_c = this.nativeInput).setCustomValidity) === null || _d === void 0 ? void 0 : _d.call(_c, '');
|
|
13894
13884
|
}
|
|
13895
13885
|
}
|
|
13896
13886
|
/** @override **/ createContainer(options) {
|
|
@@ -14081,7 +14071,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
14081
14071
|
return 'UISelect';
|
|
14082
14072
|
}
|
|
14083
14073
|
/** @override **/ createContainer(state) {
|
|
14084
|
-
var
|
|
14074
|
+
var _a;
|
|
14085
14075
|
const container = super.createContainer(state);
|
|
14086
14076
|
const { j } = this, { nativeInput } = this;
|
|
14087
14077
|
const opt = ()=>j.create.element('option');
|
|
@@ -14091,7 +14081,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
14091
14081
|
option.text = j.i18n(state.placeholder);
|
|
14092
14082
|
nativeInput.add(option);
|
|
14093
14083
|
}
|
|
14094
|
-
(
|
|
14084
|
+
(_a = state.options) === null || _a === void 0 ? void 0 : _a.forEach((element)=>{
|
|
14095
14085
|
const option = opt();
|
|
14096
14086
|
option.value = element.value.toString();
|
|
14097
14087
|
option.text = j.i18n(element.text);
|
|
@@ -14501,8 +14491,8 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_3__/* .UIGr
|
|
|
14501
14491
|
}
|
|
14502
14492
|
};
|
|
14503
14493
|
const isNotRemoved = (b)=>{
|
|
14504
|
-
var
|
|
14505
|
-
return !this.removeButtons.includes(b.name) && (!b.isVisible || ((
|
|
14494
|
+
var _a;
|
|
14495
|
+
return !this.removeButtons.includes(b.name) && (!b.isVisible || ((_a = b.isVisible) === null || _a === void 0 ? void 0 : _a.call(b, this.j, b)));
|
|
14506
14496
|
};
|
|
14507
14497
|
items.forEach((item)=>{
|
|
14508
14498
|
if ((0,_helpers_buttons_js__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item)) {
|
|
@@ -14646,11 +14636,11 @@ UISpacer = __decorate([
|
|
|
14646
14636
|
*/ function flatButtonsSet(buttons, jodit) {
|
|
14647
14637
|
const groups = jodit.getRegisteredButtonGroups();
|
|
14648
14638
|
return new Set(buttons.reduce((acc, item)=>{
|
|
14639
|
+
var _a;
|
|
14649
14640
|
if (isButtonGroup(item)) {
|
|
14650
|
-
var _groups_item_group;
|
|
14651
14641
|
acc = acc.concat([
|
|
14652
14642
|
...item.buttons,
|
|
14653
|
-
...(
|
|
14643
|
+
...(_a = groups[item.group]) !== null && _a !== void 0 ? _a : []
|
|
14654
14644
|
]);
|
|
14655
14645
|
} else {
|
|
14656
14646
|
acc.push(item);
|
|
@@ -14830,6 +14820,7 @@ class Icon {
|
|
|
14830
14820
|
/**
|
|
14831
14821
|
* Make icon html element
|
|
14832
14822
|
*/ static makeIcon(jodit, icon) {
|
|
14823
|
+
var _a, _b, _c, _d;
|
|
14833
14824
|
if (!icon) {
|
|
14834
14825
|
return;
|
|
14835
14826
|
}
|
|
@@ -14838,20 +14829,17 @@ class Icon {
|
|
|
14838
14829
|
const clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
14839
14830
|
let iconFromEvent;
|
|
14840
14831
|
if (!/<svg/.test(name)) {
|
|
14841
|
-
|
|
14842
|
-
iconFromEvent = (_jodit_o_getIcon = (_jodit_o = jodit.o).getIcon) === null || _jodit_o_getIcon === void 0 ? void 0 : _jodit_o_getIcon.call(_jodit_o, name, clearName);
|
|
14832
|
+
iconFromEvent = (_b = (_a = jodit.o).getIcon) === null || _b === void 0 ? void 0 : _b.call(_a, name, clearName);
|
|
14843
14833
|
}
|
|
14844
14834
|
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ''}`;
|
|
14845
14835
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
14846
|
-
|
|
14847
|
-
return (_this___cache_get = this.__cache.get(cacheKey)) === null || _this___cache_get === void 0 ? void 0 : _this___cache_get.cloneNode(true);
|
|
14836
|
+
return (_c = this.__cache.get(cacheKey)) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
|
|
14848
14837
|
}
|
|
14849
14838
|
if (iconURL) {
|
|
14850
14839
|
iconElement = jodit.c.span();
|
|
14851
14840
|
(0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(iconElement, 'backgroundImage', 'url(' + iconURL.replace('{basePath}', (jodit === null || jodit === void 0 ? void 0 : jodit.basePath) || '') + ')');
|
|
14852
14841
|
} else {
|
|
14853
|
-
|
|
14854
|
-
const svg = iconFromEvent || Icon.get(name, '') || ((_jodit_o_extraIcons = jodit.o.extraIcons) === null || _jodit_o_extraIcons === void 0 ? void 0 : _jodit_o_extraIcons[name]);
|
|
14842
|
+
const svg = iconFromEvent || Icon.get(name, '') || ((_d = jodit.o.extraIcons) === null || _d === void 0 ? void 0 : _d[name]);
|
|
14855
14843
|
if (svg) {
|
|
14856
14844
|
iconElement = jodit.c.fromHTML(svg.trim());
|
|
14857
14845
|
if (!/^<svg/i.test(name)) {
|
|
@@ -15420,12 +15408,12 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
15420
15408
|
/**
|
|
15421
15409
|
* Helper for appended toolbar in its place
|
|
15422
15410
|
*/ buildToolbar() {
|
|
15423
|
-
var
|
|
15411
|
+
var _a;
|
|
15424
15412
|
if (!this.o.toolbar) {
|
|
15425
15413
|
return;
|
|
15426
15414
|
}
|
|
15427
15415
|
const buttons = this.o.buttons ? (0,_helpers_array_index_js__WEBPACK_IMPORTED_MODULE_3__/* .splitArray */ .uM)(this.o.buttons) : [];
|
|
15428
|
-
(
|
|
15416
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.setRemoveButtons(this.o.removeButtons).build(buttons.concat(this.o.extraButtons || [])).appendTo(this.toolbarContainer);
|
|
15429
15417
|
}
|
|
15430
15418
|
getRegisteredButtonGroups() {
|
|
15431
15419
|
return this.groupToButtons;
|
|
@@ -15433,9 +15421,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
15433
15421
|
/**
|
|
15434
15422
|
* Register button for a group
|
|
15435
15423
|
*/ registerButton(btn) {
|
|
15424
|
+
var _a;
|
|
15436
15425
|
this.registeredButtons.add(btn);
|
|
15437
|
-
|
|
15438
|
-
const group = (_btn_group = btn.group) !== null && _btn_group !== void 0 ? _btn_group : 'other';
|
|
15426
|
+
const group = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other';
|
|
15439
15427
|
if (!this.groupToButtons[group]) {
|
|
15440
15428
|
this.groupToButtons[group] = [];
|
|
15441
15429
|
}
|
|
@@ -15449,9 +15437,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
15449
15437
|
/**
|
|
15450
15438
|
* Remove button from a group
|
|
15451
15439
|
*/ unregisterButton(btn) {
|
|
15440
|
+
var _a;
|
|
15452
15441
|
this.registeredButtons.delete(btn);
|
|
15453
|
-
|
|
15454
|
-
const groupName = (_btn_group = btn.group) !== null && _btn_group !== void 0 ? _btn_group : 'other', group = this.groupToButtons[groupName];
|
|
15442
|
+
const groupName = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other', group = this.groupToButtons[groupName];
|
|
15455
15443
|
if (group) {
|
|
15456
15444
|
const index = group.indexOf(btn.name);
|
|
15457
15445
|
if (index !== -1) {
|
|
@@ -15687,8 +15675,8 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15687
15675
|
/**
|
|
15688
15676
|
* Can change ownerWindow here
|
|
15689
15677
|
*/ initOwners() {
|
|
15690
|
-
var
|
|
15691
|
-
this.ownerWindow = (
|
|
15678
|
+
var _a;
|
|
15679
|
+
this.ownerWindow = (_a = this.o.ownerWindow) !== null && _a !== void 0 ? _a : window;
|
|
15692
15680
|
}
|
|
15693
15681
|
/**
|
|
15694
15682
|
* Add option's event handlers in emitter
|
|
@@ -15731,18 +15719,18 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15731
15719
|
this.components.clear();
|
|
15732
15720
|
}
|
|
15733
15721
|
/** @override */ destruct() {
|
|
15734
|
-
var
|
|
15722
|
+
var _a, _b, _c;
|
|
15735
15723
|
if (this.isDestructed) {
|
|
15736
15724
|
return;
|
|
15737
15725
|
}
|
|
15738
|
-
(
|
|
15739
|
-
(
|
|
15726
|
+
(_a = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'progressbar')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
15727
|
+
(_b = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'message')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
15740
15728
|
if (this.events) {
|
|
15741
15729
|
this.events.destruct();
|
|
15742
15730
|
// @ts-ignore
|
|
15743
15731
|
this.events = undefined;
|
|
15744
15732
|
}
|
|
15745
|
-
(
|
|
15733
|
+
(_c = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'buffer')) === null || _c === void 0 ? void 0 : _c.clear();
|
|
15746
15734
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_7__/* .Dom */ .J.safeRemove(this.container);
|
|
15747
15735
|
super.destruct();
|
|
15748
15736
|
}
|
|
@@ -15860,10 +15848,10 @@ Object.keys(_styles_icons_index_js__WEBPACK_IMPORTED_MODULE_7__).filter(esFilter
|
|
|
15860
15848
|
});
|
|
15861
15849
|
// Modules
|
|
15862
15850
|
Object.keys(_modules_index_js__WEBPACK_IMPORTED_MODULE_4__).filter(esFilter).forEach((key)=>{
|
|
15863
|
-
var
|
|
15851
|
+
var _a;
|
|
15864
15852
|
// @ts-ignore
|
|
15865
15853
|
const module = _modules_index_js__WEBPACK_IMPORTED_MODULE_4__[key];
|
|
15866
|
-
const name = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((
|
|
15854
|
+
const name = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((_a = module.prototype) === null || _a === void 0 ? void 0 : _a.className) ? module.prototype.className() : key;
|
|
15867
15855
|
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
|
|
15868
15856
|
console.warn('Module name must be a string', key);
|
|
15869
15857
|
return;
|
|
@@ -16830,7 +16818,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16830
16818
|
// if enter plugin isn't installed
|
|
16831
16819
|
try {
|
|
16832
16820
|
this.ed.execCommand('defaultParagraphSeparator', false, this.o.enter.toLowerCase());
|
|
16833
|
-
} catch (
|
|
16821
|
+
} catch (_a) {}
|
|
16834
16822
|
});
|
|
16835
16823
|
}
|
|
16836
16824
|
/**
|
|
@@ -16915,14 +16903,14 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16915
16903
|
/**
|
|
16916
16904
|
* Jodit's Destructor. Remove editor, and return source input
|
|
16917
16905
|
*/ destruct() {
|
|
16918
|
-
var
|
|
16906
|
+
var _a, _b;
|
|
16919
16907
|
if (this.isInDestruct) {
|
|
16920
16908
|
return;
|
|
16921
16909
|
}
|
|
16922
16910
|
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_7__.STATUSES.beforeDestruct);
|
|
16923
16911
|
this.__elementToPlace.clear();
|
|
16924
|
-
(
|
|
16925
|
-
(
|
|
16912
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')) === null || _a === void 0 ? void 0 : _a.clear();
|
|
16913
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')) === null || _b === void 0 ? void 0 : _b.clear();
|
|
16926
16914
|
this.commands.clear();
|
|
16927
16915
|
this.__selectionLocked = null;
|
|
16928
16916
|
this.e.off(this.ow, 'resize');
|
|
@@ -21984,8 +21972,8 @@ Object.keys(exp).forEach((lang)=>{
|
|
|
21984
21972
|
this.jodit && action.setParentView(this.jodit);
|
|
21985
21973
|
action.setMod('context', 'menu');
|
|
21986
21974
|
action.onAction((e)=>{
|
|
21987
|
-
var
|
|
21988
|
-
(
|
|
21975
|
+
var _a;
|
|
21976
|
+
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
21989
21977
|
self.clear();
|
|
21990
21978
|
self.close();
|
|
21991
21979
|
return false;
|
|
@@ -23001,7 +22989,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
23001
22989
|
const image = self.c.element('img');
|
|
23002
22990
|
image.setAttribute('src', src);
|
|
23003
22991
|
const onload = ()=>{
|
|
23004
|
-
var
|
|
22992
|
+
var _a;
|
|
23005
22993
|
if (self.isInDestruct) {
|
|
23006
22994
|
return;
|
|
23007
22995
|
}
|
|
@@ -23018,7 +23006,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
23018
23006
|
temp_content.appendChild(preview_box);
|
|
23019
23007
|
preview_box.appendChild(image);
|
|
23020
23008
|
preview.setPosition();
|
|
23021
|
-
self === null || self === void 0 ? void 0 :
|
|
23009
|
+
(_a = self === null || self === void 0 ? void 0 : self.events) === null || _a === void 0 ? void 0 : _a.fire('previewOpenedAndLoaded');
|
|
23022
23010
|
};
|
|
23023
23011
|
self.e.on(image, 'load', onload);
|
|
23024
23012
|
if (image.complete) {
|
|
@@ -23815,8 +23803,8 @@ let DataProvider = class DataProvider {
|
|
|
23815
23803
|
const elements = [];
|
|
23816
23804
|
const canBeFile = (item)=>item.type === 'folder' || !mods.onlyImages || item.isImage === undefined || item.isImage;
|
|
23817
23805
|
const inFilter = (item)=>{
|
|
23818
|
-
var
|
|
23819
|
-
return !((
|
|
23806
|
+
var _a;
|
|
23807
|
+
return !((_a = mods.filterWord) === null || _a === void 0 ? void 0 : _a.length) || this.o.filter === undefined || this.o.filter(item, mods.filterWord);
|
|
23820
23808
|
};
|
|
23821
23809
|
sources.forEach((source)=>{
|
|
23822
23810
|
if (source.files && source.files.length) {
|
|
@@ -24282,11 +24270,11 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24282
24270
|
};
|
|
24283
24271
|
}
|
|
24284
24272
|
get _dialog() {
|
|
24285
|
-
var
|
|
24273
|
+
var _a;
|
|
24286
24274
|
const dialog = this.dlg({
|
|
24287
24275
|
minWidth: Math.min(700, screen.width),
|
|
24288
24276
|
minHeight: 300,
|
|
24289
|
-
buttons: (
|
|
24277
|
+
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : [
|
|
24290
24278
|
'fullsize',
|
|
24291
24279
|
'dialog.close'
|
|
24292
24280
|
]
|
|
@@ -24347,7 +24335,7 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24347
24335
|
*/ open(callback = this.o.defaultCallback, onlyImages = false) {
|
|
24348
24336
|
this.state.onlyImages = onlyImages;
|
|
24349
24337
|
return this.async.promise((resolve, reject)=>{
|
|
24350
|
-
var
|
|
24338
|
+
var _a;
|
|
24351
24339
|
if (!this.o.items || !this.o.items.url) {
|
|
24352
24340
|
throw (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
24353
24341
|
}
|
|
@@ -24360,16 +24348,16 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24360
24348
|
localTimeout = now;
|
|
24361
24349
|
}).off('select.filebrowser').on('select.filebrowser', this.onSelect(callback));
|
|
24362
24350
|
const header = this.c.div();
|
|
24363
|
-
(
|
|
24351
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
24364
24352
|
this.__updateToolbarButtons();
|
|
24365
24353
|
this._dialog.open(this.browser, header);
|
|
24366
24354
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
24367
24355
|
(0,_fetch_load_tree_js__WEBPACK_IMPORTED_MODULE_11__/* .loadTree */ .r)(this).then(resolve, reject).finally(()=>{
|
|
24368
|
-
var
|
|
24356
|
+
var _a;
|
|
24369
24357
|
if (this.isInDestruct) {
|
|
24370
24358
|
return;
|
|
24371
24359
|
}
|
|
24372
|
-
(
|
|
24360
|
+
(_a = this === null || this === void 0 ? void 0 : this.e) === null || _a === void 0 ? void 0 : _a.fire('fileBrowserReady.filebrowser');
|
|
24373
24361
|
});
|
|
24374
24362
|
}).catch((e)=>{
|
|
24375
24363
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -24378,8 +24366,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24378
24366
|
});
|
|
24379
24367
|
}
|
|
24380
24368
|
__getButtons() {
|
|
24381
|
-
var
|
|
24382
|
-
const options = (
|
|
24369
|
+
var _a;
|
|
24370
|
+
const options = (_a = this.o.buttons) !== null && _a !== void 0 ? _a : [];
|
|
24383
24371
|
return options.filter((btn)=>{
|
|
24384
24372
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
24385
24373
|
return true;
|
|
@@ -24396,8 +24384,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24396
24384
|
});
|
|
24397
24385
|
}
|
|
24398
24386
|
initUploader(editor) {
|
|
24399
|
-
var
|
|
24400
|
-
const self = this, options = editor === null || editor === void 0 ? void 0 :
|
|
24387
|
+
var _a;
|
|
24388
|
+
const self = this, options = (_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.uploader, uploaderOptions = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.ConfigProto)(options || {}, _config_js__WEBPACK_IMPORTED_MODULE_9__/* .Config */ .T.defaultOptions.uploader);
|
|
24401
24389
|
const uploadHandler = ()=>(0,_fetch_load_items_js__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
24402
24390
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
24403
24391
|
self.uploader.setPath(self.state.currentPath).setSource(self.state.currentSource).bind(self.browser, uploadHandler, self.errorHandler);
|
|
@@ -24412,23 +24400,23 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
24412
24400
|
});
|
|
24413
24401
|
}
|
|
24414
24402
|
destruct() {
|
|
24415
|
-
var
|
|
24403
|
+
var _a;
|
|
24416
24404
|
if (this.isInDestruct) {
|
|
24417
24405
|
return;
|
|
24418
24406
|
}
|
|
24419
|
-
(
|
|
24407
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '_dialog')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
24420
24408
|
super.destruct();
|
|
24421
24409
|
this.events && this.e.off('.filebrowser');
|
|
24422
24410
|
this.uploader && this.uploader.destruct();
|
|
24423
24411
|
}
|
|
24424
24412
|
__updateToolbarButtons() {
|
|
24425
|
-
var
|
|
24413
|
+
var _a;
|
|
24426
24414
|
const buttons = this.__getButtons();
|
|
24427
24415
|
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
24428
24416
|
return;
|
|
24429
24417
|
}
|
|
24430
24418
|
this.__prevButtons = buttons;
|
|
24431
|
-
(
|
|
24419
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
24432
24420
|
}
|
|
24433
24421
|
constructor(options){
|
|
24434
24422
|
super(options);
|
|
@@ -25161,8 +25149,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.history = {
|
|
|
25161
25149
|
}
|
|
25162
25150
|
}
|
|
25163
25151
|
fireChangeStack() {
|
|
25164
|
-
var
|
|
25165
|
-
this.j && !this.j.isInDestruct && ((
|
|
25152
|
+
var _a;
|
|
25153
|
+
this.j && !this.j.isInDestruct && ((_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('changeStack'));
|
|
25166
25154
|
}
|
|
25167
25155
|
destruct() {
|
|
25168
25156
|
if (this.isInDestruct) {
|
|
@@ -26524,9 +26512,8 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
26524
26512
|
/**
|
|
26525
26513
|
* Height of statusbar
|
|
26526
26514
|
*/ getHeight() {
|
|
26527
|
-
var
|
|
26528
|
-
|
|
26529
|
-
return (_this_container_offsetHeight = (_this_container = this.container) === null || _this_container === void 0 ? void 0 : _this_container.offsetHeight) !== null && _this_container_offsetHeight !== void 0 ? _this_container_offsetHeight : 0;
|
|
26515
|
+
var _a, _b;
|
|
26516
|
+
return (_b = (_a = this.container) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
26530
26517
|
}
|
|
26531
26518
|
findEmpty(inTheRight = false) {
|
|
26532
26519
|
const items = this.getElms(inTheRight ? 'item-right' : 'item');
|
|
@@ -26540,13 +26527,13 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
26540
26527
|
/**
|
|
26541
26528
|
* Add element in statusbar
|
|
26542
26529
|
*/ append(child, inTheRight = false) {
|
|
26543
|
-
var
|
|
26530
|
+
var _a;
|
|
26544
26531
|
const wrapper = this.findEmpty(inTheRight) || this.j.c.div(this.getFullElName('item'));
|
|
26545
26532
|
if (inTheRight) {
|
|
26546
26533
|
wrapper.classList.add(this.getFullElName('item-right'));
|
|
26547
26534
|
}
|
|
26548
26535
|
wrapper.appendChild(child);
|
|
26549
|
-
(
|
|
26536
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.appendChild(wrapper);
|
|
26550
26537
|
if (this.j.o.statusbar) {
|
|
26551
26538
|
this.show();
|
|
26552
26539
|
}
|
|
@@ -26745,6 +26732,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
26745
26732
|
return Table.__formalCoordinate(table, cell, max);
|
|
26746
26733
|
}
|
|
26747
26734
|
static __appendRow(table, line, after, create) {
|
|
26735
|
+
var _a;
|
|
26748
26736
|
let row;
|
|
26749
26737
|
if (!line) {
|
|
26750
26738
|
const columnsCount = Table.__getColumnsCount(table);
|
|
@@ -26770,8 +26758,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
26770
26758
|
} else if (!after && line) {
|
|
26771
26759
|
line.parentNode && line.parentNode.insertBefore(row, line);
|
|
26772
26760
|
} else {
|
|
26773
|
-
|
|
26774
|
-
(((_table_getElementsByTagName = table.getElementsByTagName('tbody')) === null || _table_getElementsByTagName === void 0 ? void 0 : _table_getElementsByTagName[0]) || table).appendChild(row);
|
|
26761
|
+
(((_a = table.getElementsByTagName('tbody')) === null || _a === void 0 ? void 0 : _a[0]) || table).appendChild(row);
|
|
26775
26762
|
}
|
|
26776
26763
|
}
|
|
26777
26764
|
/**
|
|
@@ -27184,9 +27171,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
27184
27171
|
return Table.__setColumnWidthByDelta(table, column, delta, noUnmark, marked);
|
|
27185
27172
|
}
|
|
27186
27173
|
static __mark(cell, key, value, marked) {
|
|
27174
|
+
var _a;
|
|
27187
27175
|
marked.push(cell);
|
|
27188
|
-
|
|
27189
|
-
const dict = (_markedValue_get = markedValue.get(cell)) !== null && _markedValue_get !== void 0 ? _markedValue_get : {};
|
|
27176
|
+
const dict = (_a = markedValue.get(cell)) !== null && _a !== void 0 ? _a : {};
|
|
27190
27177
|
dict[key] = value === undefined ? 1 : value;
|
|
27191
27178
|
markedValue.set(cell, dict);
|
|
27192
27179
|
}
|
|
@@ -27335,27 +27322,27 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27335
27322
|
return this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
27336
27323
|
}
|
|
27337
27324
|
/** @override **/ update() {
|
|
27338
|
-
var
|
|
27325
|
+
var _a, _b;
|
|
27339
27326
|
const { control, state } = this, tc = this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
27340
27327
|
if (!tc) {
|
|
27341
27328
|
return;
|
|
27342
27329
|
}
|
|
27343
|
-
const value = (
|
|
27330
|
+
const value = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, tc.jodit, this);
|
|
27344
27331
|
if (value !== undefined) {
|
|
27345
27332
|
state.value = value;
|
|
27346
27333
|
}
|
|
27347
27334
|
state.disabled = this.__calculateDisabledStatus(tc);
|
|
27348
27335
|
state.activated = this.__calculateActivatedStatus(tc);
|
|
27349
|
-
(
|
|
27336
|
+
(_b = control.update) === null || _b === void 0 ? void 0 : _b.call(control, tc.jodit, this);
|
|
27350
27337
|
}
|
|
27351
27338
|
/**
|
|
27352
27339
|
* Calculates whether the button is active
|
|
27353
27340
|
*/ __calculateActivatedStatus(tc) {
|
|
27354
|
-
var
|
|
27341
|
+
var _a, _b;
|
|
27355
27342
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isJoditObject)(this.j) && !this.j.editorIsActive) {
|
|
27356
27343
|
return false;
|
|
27357
27344
|
}
|
|
27358
|
-
if ((
|
|
27345
|
+
if ((_b = (_a = this.control).isActive) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
27359
27346
|
return true;
|
|
27360
27347
|
}
|
|
27361
27348
|
return Boolean(tc && tc.shouldBeActive(this));
|
|
@@ -27363,14 +27350,14 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27363
27350
|
/**
|
|
27364
27351
|
* Calculates whether an element is blocked for the user
|
|
27365
27352
|
*/ __calculateDisabledStatus(tc) {
|
|
27366
|
-
var
|
|
27353
|
+
var _a, _b;
|
|
27367
27354
|
if (this.j.o.disabled) {
|
|
27368
27355
|
return true;
|
|
27369
27356
|
}
|
|
27370
27357
|
if (this.j.o.readonly && (!this.j.o.activeButtonsInReadOnly || !this.j.o.activeButtonsInReadOnly.includes(this.control.name))) {
|
|
27371
27358
|
return true;
|
|
27372
27359
|
}
|
|
27373
|
-
if ((
|
|
27360
|
+
if ((_b = (_a = this.control).isDisabled) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
27374
27361
|
return true;
|
|
27375
27362
|
}
|
|
27376
27363
|
return Boolean(tc && tc.shouldBeDisabled(this));
|
|
@@ -27407,8 +27394,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27407
27394
|
return container;
|
|
27408
27395
|
}
|
|
27409
27396
|
/** @override */ focus() {
|
|
27410
|
-
var
|
|
27411
|
-
(
|
|
27397
|
+
var _a;
|
|
27398
|
+
(_a = this.container.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
27412
27399
|
}
|
|
27413
27400
|
onChangeHasTrigger() {
|
|
27414
27401
|
if (this.state.hasTrigger) {
|
|
@@ -27427,6 +27414,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27427
27414
|
/**
|
|
27428
27415
|
* Init constant data from control
|
|
27429
27416
|
*/ __initFromControl() {
|
|
27417
|
+
var _a;
|
|
27430
27418
|
const { control: ctr, state } = this;
|
|
27431
27419
|
this.updateSize();
|
|
27432
27420
|
state.name = ctr.name;
|
|
@@ -27438,9 +27426,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27438
27426
|
if (ctr.iconURL) {
|
|
27439
27427
|
state.icon.iconURL = ctr.iconURL;
|
|
27440
27428
|
} else {
|
|
27441
|
-
var _this_j_o_extraIcons;
|
|
27442
27429
|
const name = ctr.icon || ctr.name;
|
|
27443
|
-
state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_6__/* .Icon */ .I.exists(name) || ((
|
|
27430
|
+
state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_6__/* .Icon */ .I.exists(name) || ((_a = this.j.o.extraIcons) === null || _a === void 0 ? void 0 : _a[name]) ? name : '';
|
|
27444
27431
|
}
|
|
27445
27432
|
if (!ctr.iconURL && !state.icon.name) {
|
|
27446
27433
|
state.text = ctr.text || ctr.name;
|
|
@@ -27454,6 +27441,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27454
27441
|
/**
|
|
27455
27442
|
* Click on trigger button
|
|
27456
27443
|
*/ onTriggerClick(e) {
|
|
27444
|
+
var _a, _b, _c;
|
|
27457
27445
|
if (this.openedPopup) {
|
|
27458
27446
|
this.__closePopup();
|
|
27459
27447
|
return;
|
|
@@ -27470,9 +27458,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27470
27458
|
popup.parentElement = this;
|
|
27471
27459
|
try {
|
|
27472
27460
|
if (this.j.e.fire((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.camelCase)(`before-${ctr.name}-open-popup`), this.target, ctr, popup) !== false) {
|
|
27473
|
-
|
|
27474
|
-
var _this_toolbar_getTarget, _ref;
|
|
27475
|
-
const target = (_ref = (_this_toolbar_getTarget = (_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.getTarget(this)) !== null && _this_toolbar_getTarget !== void 0 ? _this_toolbar_getTarget : this.target) !== null && _ref !== void 0 ? _ref : null;
|
|
27461
|
+
const target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
|
|
27476
27462
|
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
27477
27463
|
if (elm) {
|
|
27478
27464
|
popup.setContent((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(elm) ? this.j.c.fromHTML(elm) : elm).open(()=>(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.position)(this.container), false, this.j.o.allowTabNavigation ? this.container : undefined);
|
|
@@ -27494,8 +27480,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27494
27480
|
/**
|
|
27495
27481
|
* Create an open popup list
|
|
27496
27482
|
*/ __openControlList(control) {
|
|
27497
|
-
var
|
|
27498
|
-
const controls = (
|
|
27483
|
+
var _a;
|
|
27484
|
+
const controls = (_a = this.jodit.options.controls) !== null && _a !== void 0 ? _a : {}, getControl = (key)=>(0,_core_ui_helpers_get_control_type_js__WEBPACK_IMPORTED_MODULE_5__/* .findControlType */ .x)(key, controls);
|
|
27499
27485
|
const list = control.list, menu = this.openPopup(), toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_9__/* .makeCollection */ .$K)(this.j);
|
|
27500
27486
|
menu.parentElement = this;
|
|
27501
27487
|
toolbar.parentElement = menu;
|
|
@@ -27521,8 +27507,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27521
27507
|
name: key.toString(),
|
|
27522
27508
|
template: childTemplate && ((j, k, v)=>childTemplate(j, k, v, this)),
|
|
27523
27509
|
exec: control.childExec ? (view, current, options)=>{
|
|
27524
|
-
var
|
|
27525
|
-
return (
|
|
27510
|
+
var _a;
|
|
27511
|
+
return (_a = control.childExec) === null || _a === void 0 ? void 0 : _a.call(control, view, current, _object_spread_props(_object_spread({}, options), {
|
|
27526
27512
|
parentControl: control
|
|
27527
27513
|
}));
|
|
27528
27514
|
} : control.exec,
|
|
@@ -27573,11 +27559,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27573
27559
|
/**
|
|
27574
27560
|
* Click handler
|
|
27575
27561
|
*/ onClick(originalEvent) {
|
|
27562
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
27576
27563
|
const { control: ctr } = this;
|
|
27577
27564
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.exec)) {
|
|
27578
|
-
|
|
27579
|
-
var _this_toolbar_getTarget, _ref;
|
|
27580
|
-
const target = (_ref = (_this_toolbar_getTarget = (_this_toolbar = this.toolbar) === null || _this_toolbar === void 0 ? void 0 : _this_toolbar.getTarget(this)) !== null && _this_toolbar_getTarget !== void 0 ? _this_toolbar_getTarget : this.target) !== null && _ref !== void 0 ? _ref : null;
|
|
27565
|
+
const target = (_c = (_b = (_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.getTarget(this)) !== null && _b !== void 0 ? _b : this.target) !== null && _c !== void 0 ? _c : null;
|
|
27581
27566
|
const result = ctr.exec(this.j, target, {
|
|
27582
27567
|
control: ctr,
|
|
27583
27568
|
originalEvent,
|
|
@@ -27585,14 +27570,13 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
27585
27570
|
});
|
|
27586
27571
|
// For memorise exec
|
|
27587
27572
|
if (result !== false && result !== true) {
|
|
27588
|
-
|
|
27589
|
-
* Fired after calling `button.exec` function
|
|
27590
|
-
*/ _this_j_e1, _this_j1;
|
|
27591
|
-
(_this_j = this.j) === null || _this_j === void 0 ? void 0 : (_this_j_e = _this_j.e) === null || _this_j_e === void 0 ? void 0 : _this_j_e.fire('synchro');
|
|
27573
|
+
(_e = (_d = this.j) === null || _d === void 0 ? void 0 : _d.e) === null || _e === void 0 ? void 0 : _e.fire('synchro');
|
|
27592
27574
|
if (this.parentElement) {
|
|
27593
27575
|
this.parentElement.update();
|
|
27594
27576
|
}
|
|
27595
|
-
|
|
27577
|
+
/**
|
|
27578
|
+
* Fired after calling `button.exec` function
|
|
27579
|
+
*/ (_g = (_f = this.j) === null || _f === void 0 ? void 0 : _f.e) === null || _g === void 0 ? void 0 : _g.fire('closeAllPopups afterExec');
|
|
27596
27580
|
}
|
|
27597
27581
|
if (result !== false) {
|
|
27598
27582
|
return;
|
|
@@ -27784,19 +27768,18 @@ let ToolbarSelect = class ToolbarSelect extends _button_js__WEBPACK_IMPORTED_MOD
|
|
|
27784
27768
|
return 'ToolbarSelect';
|
|
27785
27769
|
}
|
|
27786
27770
|
update() {
|
|
27771
|
+
var _a, _b, _c;
|
|
27787
27772
|
super.update();
|
|
27788
27773
|
this.state.icon.name = '';
|
|
27789
27774
|
const { list, data } = this.control;
|
|
27790
27775
|
if (list) {
|
|
27791
|
-
var _this_control_textTemplate, _this_control;
|
|
27792
27776
|
let key = this.state.value || (data && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .K)(data.currentValue) ? data.currentValue : undefined);
|
|
27793
27777
|
if (!key) {
|
|
27794
27778
|
const keys = Object.keys(list);
|
|
27795
27779
|
key = keys[0];
|
|
27796
27780
|
}
|
|
27797
27781
|
const text = ((0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isPlainObject */ .Q)(list) ? list[key.toString()] || key : key).toString();
|
|
27798
|
-
|
|
27799
|
-
this.state.text = (_this_control_textTemplate1 = (_this_control_textTemplate = (_this_control = this.control).textTemplate) === null || _this_control_textTemplate === void 0 ? void 0 : _this_control_textTemplate.call(_this_control, this.jodit, text)) !== null && _this_control_textTemplate1 !== void 0 ? _this_control_textTemplate1 : text;
|
|
27782
|
+
this.state.text = (_c = (_b = (_a = this.control).textTemplate) === null || _b === void 0 ? void 0 : _b.call(_a, this.jodit, text)) !== null && _c !== void 0 ? _c : text;
|
|
27800
27783
|
}
|
|
27801
27784
|
}
|
|
27802
27785
|
};
|
|
@@ -28741,7 +28724,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .
|
|
|
28741
28724
|
instances.forEach((ajax)=>{
|
|
28742
28725
|
try {
|
|
28743
28726
|
ajax.destruct();
|
|
28744
|
-
} catch (
|
|
28727
|
+
} catch (_a) {}
|
|
28745
28728
|
});
|
|
28746
28729
|
instances.clear();
|
|
28747
28730
|
}
|
|
@@ -29568,9 +29551,9 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
29568
29551
|
});
|
|
29569
29552
|
}
|
|
29570
29553
|
/** @override */ beforeDestruct(_) {
|
|
29571
|
-
var
|
|
29572
|
-
(
|
|
29573
|
-
(
|
|
29554
|
+
var _a, _b;
|
|
29555
|
+
(_a = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__container')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
29556
|
+
(_b = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
29574
29557
|
}
|
|
29575
29558
|
constructor(jodit){
|
|
29576
29559
|
super(jodit);
|
|
@@ -30085,13 +30068,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__/* .Pl
|
|
|
30085
30068
|
/**
|
|
30086
30069
|
* Remove node and replace cursor position out of it
|
|
30087
30070
|
*/ safeRemoveEmptyNode(fakeNode) {
|
|
30071
|
+
var _a, _b;
|
|
30088
30072
|
const { range } = this.j.s;
|
|
30089
30073
|
if (range.startContainer === fakeNode) {
|
|
30090
30074
|
if (fakeNode.previousSibling) {
|
|
30091
30075
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(fakeNode.previousSibling)) {
|
|
30092
|
-
|
|
30093
|
-
var _fakeNode_previousSibling_nodeValue_length;
|
|
30094
|
-
range.setStart(fakeNode.previousSibling, (_fakeNode_previousSibling_nodeValue_length = (_fakeNode_previousSibling_nodeValue = fakeNode.previousSibling.nodeValue) === null || _fakeNode_previousSibling_nodeValue === void 0 ? void 0 : _fakeNode_previousSibling_nodeValue.length) !== null && _fakeNode_previousSibling_nodeValue_length !== void 0 ? _fakeNode_previousSibling_nodeValue_length : 0);
|
|
30076
|
+
range.setStart(fakeNode.previousSibling, (_b = (_a = fakeNode.previousSibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
30095
30077
|
} else {
|
|
30096
30078
|
range.setStartAfter(fakeNode.previousSibling);
|
|
30097
30079
|
}
|
|
@@ -30295,6 +30277,7 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
30295
30277
|
* @private
|
|
30296
30278
|
*/ // eslint-disable-next-line complexity
|
|
30297
30279
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
30280
|
+
var _a, _b;
|
|
30298
30281
|
const step = backspace ? -1 : 1;
|
|
30299
30282
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
30300
30283
|
let sibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
@@ -30305,20 +30288,19 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
30305
30288
|
sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
|
|
30306
30289
|
}
|
|
30307
30290
|
while(sibling && (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(sibling) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling))){
|
|
30308
|
-
var _sibling_nodeValue, _sibling_nodeValue1;
|
|
30309
30291
|
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)){
|
|
30310
30292
|
sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
|
|
30311
30293
|
}
|
|
30312
30294
|
if (!sibling) {
|
|
30313
30295
|
break;
|
|
30314
30296
|
}
|
|
30315
|
-
if ((
|
|
30297
|
+
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
30316
30298
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
30317
30299
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling.parentNode)) {
|
|
30318
30300
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
30319
30301
|
}
|
|
30320
30302
|
}
|
|
30321
|
-
if (!((
|
|
30303
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
30322
30304
|
removeNeighbor = sibling;
|
|
30323
30305
|
}
|
|
30324
30306
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
@@ -30402,8 +30384,8 @@ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
|
30402
30384
|
return removed;
|
|
30403
30385
|
}
|
|
30404
30386
|
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
30405
|
-
var
|
|
30406
|
-
if (!anotherSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) || (!backspace ? / $/ : /^ /).test((
|
|
30387
|
+
var _a;
|
|
30388
|
+
if (!anotherSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) || (!backspace ? / $/ : /^ /).test((_a = anotherSibling.nodeValue) !== null && _a !== void 0 ? _a : '') || !(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.trimInv)(anotherSibling.nodeValue || '').length) {
|
|
30407
30389
|
for(let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1){
|
|
30408
30390
|
if (value[i] === ' ') {
|
|
30409
30391
|
value[i] = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
@@ -30675,10 +30657,10 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
30675
30657
|
*
|
|
30676
30658
|
* @private
|
|
30677
30659
|
*/ function checkUnwrapFirstListItem(jodit, fakeNode, backspace) {
|
|
30678
|
-
var
|
|
30660
|
+
var _a;
|
|
30679
30661
|
const li = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(fakeNode, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isElement, jodit.editor);
|
|
30680
30662
|
const { s } = jodit;
|
|
30681
|
-
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isLeaf(li) && (li === null || li === void 0 ? void 0 :
|
|
30663
|
+
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isLeaf(li) && ((_a = li === null || li === void 0 ? void 0 : li.parentElement) === null || _a === void 0 ? void 0 : _a[backspace ? 'firstElementChild' : 'lastElementChild']) === li && s.cursorInTheEdge(backspace, li)) {
|
|
30682
30664
|
const ul = li.parentElement;
|
|
30683
30665
|
const p = jodit.createInside.element(jodit.o.enterBlock);
|
|
30684
30666
|
(0,_core_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_1__/* .call */ .T1)(backspace ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.before : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.after, ul, p);
|
|
@@ -31918,10 +31900,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
31918
31900
|
* Clipboard plugin - cut and copy functionality
|
|
31919
31901
|
*/ class clipboard {
|
|
31920
31902
|
init(editor) {
|
|
31921
|
-
var
|
|
31922
|
-
(
|
|
31903
|
+
var _a;
|
|
31904
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>editor.registerButton(btn));
|
|
31923
31905
|
editor.e.off(`copy.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID} cut.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID}`).on(`copy.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID} cut.${_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID}`, (event)=>{
|
|
31924
|
-
var
|
|
31906
|
+
var _a;
|
|
31925
31907
|
const selectedText = editor.s.html;
|
|
31926
31908
|
const clipboardData = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(event) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(editor.ew) || (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getDataTransfer)(event.originalEvent);
|
|
31927
31909
|
if (clipboardData) {
|
|
@@ -31938,13 +31920,13 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
31938
31920
|
editor.s.focus();
|
|
31939
31921
|
}
|
|
31940
31922
|
event.preventDefault();
|
|
31941
|
-
editor === null || editor === void 0 ? void 0 :
|
|
31923
|
+
(_a = editor === null || editor === void 0 ? void 0 : editor.events) === null || _a === void 0 ? void 0 : _a.fire('afterCopy', selectedText);
|
|
31942
31924
|
});
|
|
31943
31925
|
}
|
|
31944
31926
|
/** @override */ destruct(editor) {
|
|
31945
|
-
var
|
|
31946
|
-
(
|
|
31947
|
-
editor === null || editor === void 0 ? void 0 :
|
|
31927
|
+
var _a, _b;
|
|
31928
|
+
(_a = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_1__/* .cached */ .PO)(editor, 'buffer')) === null || _a === void 0 ? void 0 : _a.set(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID, '');
|
|
31929
|
+
(_b = editor === null || editor === void 0 ? void 0 : editor.events) === null || _b === void 0 ? void 0 : _b.off('.' + _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.CLIPBOARD_ID);
|
|
31948
31930
|
}
|
|
31949
31931
|
constructor(){
|
|
31950
31932
|
/** @override */ this.buttons = [
|
|
@@ -32905,9 +32887,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
32905
32887
|
}
|
|
32906
32888
|
}
|
|
32907
32889
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
32890
|
+
var _a;
|
|
32908
32891
|
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(leftSibling)) {
|
|
32909
|
-
|
|
32910
|
-
const root = (_Dom_closest = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, jodit.editor)) !== null && _Dom_closest !== void 0 ? _Dom_closest : jodit.editor;
|
|
32892
|
+
const root = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
|
|
32911
32893
|
const leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText, root);
|
|
32912
32894
|
if (leftText) {
|
|
32913
32895
|
range.setStartAfter(leftText);
|
|
@@ -33019,6 +33001,7 @@ var DragState;
|
|
|
33019
33001
|
/**
|
|
33020
33002
|
* Mouse move handler handler
|
|
33021
33003
|
*/ onDrag(event) {
|
|
33004
|
+
var _a, _b;
|
|
33022
33005
|
if (!this.draggable || this.state === DragState.IDLE) {
|
|
33023
33006
|
return;
|
|
33024
33007
|
}
|
|
@@ -33033,7 +33016,6 @@ var DragState;
|
|
|
33033
33016
|
this.j.e.fire('hidePopup hideResizer');
|
|
33034
33017
|
if (!this.draggable.parentNode) {
|
|
33035
33018
|
const target = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(this.draggable, 'target');
|
|
33036
|
-
var _target_offsetWidth, _target_offsetHeight;
|
|
33037
33019
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(this.draggable, {
|
|
33038
33020
|
zIndex: 10000000000000,
|
|
33039
33021
|
pointerEvents: 'none',
|
|
@@ -33043,8 +33025,8 @@ var DragState;
|
|
|
33043
33025
|
display: 'inline-block',
|
|
33044
33026
|
left: event.clientX,
|
|
33045
33027
|
top: event.clientY,
|
|
33046
|
-
width: (
|
|
33047
|
-
height: (
|
|
33028
|
+
width: (_a = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a !== void 0 ? _a : 100,
|
|
33029
|
+
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
33048
33030
|
});
|
|
33049
33031
|
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(this.j, dragAndDropElement).appendChild(this.draggable);
|
|
33050
33032
|
}
|
|
@@ -34291,7 +34273,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
34291
34273
|
},
|
|
34292
34274
|
tooltip: 'Font size',
|
|
34293
34275
|
value: (editor, button)=>{
|
|
34294
|
-
var
|
|
34276
|
+
var _a;
|
|
34295
34277
|
const current = editor.s.current();
|
|
34296
34278
|
if (!current) {
|
|
34297
34279
|
return;
|
|
@@ -34301,25 +34283,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
34301
34283
|
return;
|
|
34302
34284
|
}
|
|
34303
34285
|
const control = button.control;
|
|
34304
|
-
const cssKey = ((
|
|
34286
|
+
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
34305
34287
|
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__/* .css */ .A)(box, cssKey);
|
|
34306
34288
|
return value.toString();
|
|
34307
34289
|
},
|
|
34308
34290
|
isChildActive: (editor, button)=>{
|
|
34309
|
-
var
|
|
34291
|
+
var _a, _b;
|
|
34310
34292
|
const value = button.state.value;
|
|
34311
|
-
|
|
34312
|
-
const normalize = (_button_control_data_normalize = (_button_control_data = button.control.data) === null || _button_control_data === void 0 ? void 0 : _button_control_data.normalize) !== null && _button_control_data_normalize !== void 0 ? _button_control_data_normalize : (v)=>v;
|
|
34293
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
34313
34294
|
return Boolean(value && button.control.args && normalize(button.control.args[0].toString()) === normalize(value.toString()));
|
|
34314
34295
|
},
|
|
34315
34296
|
isActive: (editor, button)=>{
|
|
34316
|
-
var
|
|
34297
|
+
var _a, _b;
|
|
34317
34298
|
const value = button.state.value;
|
|
34318
34299
|
if (!value) {
|
|
34319
34300
|
return false;
|
|
34320
34301
|
}
|
|
34321
|
-
|
|
34322
|
-
const normalize = (_button_control_data_normalize = (_button_control_data = button.control.data) === null || _button_control_data === void 0 ? void 0 : _button_control_data.normalize) !== null && _button_control_data_normalize !== void 0 ? _button_control_data_normalize : (v)=>v;
|
|
34302
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
34323
34303
|
let keySet = button.control.data.cacheListSet;
|
|
34324
34304
|
if (!keySet) {
|
|
34325
34305
|
const keys = Object.keys(button.control.list).map(normalize);
|
|
@@ -34352,7 +34332,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.font
|
|
|
34352
34332
|
let isAvailable = false;
|
|
34353
34333
|
try {
|
|
34354
34334
|
isAvailable = key.indexOf('dings') === -1 && document.fonts.check(`16px ${key}`, value);
|
|
34355
|
-
} catch (
|
|
34335
|
+
} catch (_a) {}
|
|
34356
34336
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
34357
34337
|
},
|
|
34358
34338
|
data: {
|
|
@@ -34459,11 +34439,10 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('paragraph', _pa
|
|
|
34459
34439
|
_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.paragraph = {
|
|
34460
34440
|
command: 'formatBlock',
|
|
34461
34441
|
value (editor, button) {
|
|
34462
|
-
var
|
|
34442
|
+
var _a, _b;
|
|
34463
34443
|
const control = button.control, current = editor.s.current();
|
|
34464
34444
|
const currentBox = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.closest(current, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isBlock, editor.editor);
|
|
34465
|
-
|
|
34466
|
-
return (_currentBox_nodeName_toLowerCase = currentBox === null || currentBox === void 0 ? void 0 : currentBox.nodeName.toLowerCase()) !== null && _currentBox_nodeName_toLowerCase !== void 0 ? _currentBox_nodeName_toLowerCase : (_control_data = control.data) === null || _control_data === void 0 ? void 0 : _control_data.currentValue;
|
|
34445
|
+
return (_a = currentBox === null || currentBox === void 0 ? void 0 : currentBox.nodeName.toLowerCase()) !== null && _a !== void 0 ? _a : (_b = control.data) === null || _b === void 0 ? void 0 : _b.currentValue;
|
|
34467
34446
|
},
|
|
34468
34447
|
update (editor, button) {
|
|
34469
34448
|
const control = button.control, current = editor.s.current();
|
|
@@ -34491,8 +34470,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.parag
|
|
|
34491
34470
|
pre: 'Code'
|
|
34492
34471
|
},
|
|
34493
34472
|
isChildActive: (editor, button)=>{
|
|
34494
|
-
var
|
|
34495
|
-
return Boolean(button.state.value === ((
|
|
34473
|
+
var _a, _b;
|
|
34474
|
+
return Boolean(button.state.value === ((_b = (_a = button.control) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b[0]));
|
|
34496
34475
|
},
|
|
34497
34476
|
isActive: (editor, button)=>{
|
|
34498
34477
|
return button.state.value !== editor.o.enter && (0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_4__/* .isPlainObject */ .Q)(button.control.list) && Boolean(button.control.list[button.state.value]);
|
|
@@ -34630,6 +34609,7 @@ const fullsizeStack = new Set();
|
|
|
34630
34609
|
}, /**
|
|
34631
34610
|
* Change editor's state between FullSize and normal
|
|
34632
34611
|
*/ toggle = (enable)=>{
|
|
34612
|
+
var _a;
|
|
34633
34613
|
const { container, events } = editor;
|
|
34634
34614
|
if (!container) {
|
|
34635
34615
|
return;
|
|
@@ -34642,8 +34622,7 @@ const fullsizeStack = new Set();
|
|
|
34642
34622
|
isEnabled = enable;
|
|
34643
34623
|
container.classList.toggle('jodit_fullsize', enable);
|
|
34644
34624
|
if (editor.toolbar) {
|
|
34645
|
-
|
|
34646
|
-
(0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isJoditObject */ .y)(editor) && ((_editor_toolbarContainer = editor.toolbarContainer) === null || _editor_toolbarContainer === void 0 ? void 0 : _editor_toolbarContainer.appendChild(editor.toolbar.container));
|
|
34625
|
+
(0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isJoditObject */ .y)(editor) && ((_a = editor.toolbarContainer) === null || _a === void 0 ? void 0 : _a.appendChild(editor.toolbar.container));
|
|
34647
34626
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(editor.toolbar.container, 'width', 'auto');
|
|
34648
34627
|
}
|
|
34649
34628
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -34662,8 +34641,8 @@ const fullsizeStack = new Set();
|
|
|
34662
34641
|
editor.e.on(editor.ow, 'resize', resize);
|
|
34663
34642
|
}
|
|
34664
34643
|
editor.e.on('afterInit afterOpen', ()=>{
|
|
34665
|
-
var
|
|
34666
|
-
editor.toggleFullSize(editor === null || editor === void 0 ? void 0 :
|
|
34644
|
+
var _a;
|
|
34645
|
+
editor.toggleFullSize((_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.fullsize);
|
|
34667
34646
|
}).on('toggleFullSize', toggle).on('beforeDestruct', ()=>{
|
|
34668
34647
|
isEnabled && toggle(false);
|
|
34669
34648
|
}).on('beforeDestruct', ()=>{
|
|
@@ -35109,8 +35088,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox
|
|
|
35109
35088
|
}
|
|
35110
35089
|
}
|
|
35111
35090
|
}).on(editor.ew, 'mousedown touchstart keydown keyup touchend click mouseup mousemove scroll', (e)=>{
|
|
35112
|
-
var
|
|
35113
|
-
(
|
|
35091
|
+
var _a;
|
|
35092
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire(editor.ow, e);
|
|
35114
35093
|
});
|
|
35115
35094
|
}
|
|
35116
35095
|
return false;
|
|
@@ -35245,8 +35224,8 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
35245
35224
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
35246
35225
|
if (!elm.complete) {
|
|
35247
35226
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
35248
|
-
var
|
|
35249
|
-
!editor.isInDestruct && ((
|
|
35227
|
+
var _a;
|
|
35228
|
+
!editor.isInDestruct && ((_a = editor.e) === null || _a === void 0 ? void 0 : _a.fire('resize'));
|
|
35250
35229
|
editor.e.off(elm, 'load', ElementOnLoad);
|
|
35251
35230
|
});
|
|
35252
35231
|
}
|
|
@@ -35575,11 +35554,10 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
35575
35554
|
})();
|
|
35576
35555
|
}
|
|
35577
35556
|
/** @override */ beforeDestruct(editor) {
|
|
35578
|
-
var
|
|
35579
|
-
|
|
35580
|
-
|
|
35581
|
-
(
|
|
35582
|
-
(_cached1 = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _cached1 === void 0 ? void 0 : _cached1.destruct();
|
|
35557
|
+
var _a, _b, _c;
|
|
35558
|
+
Object.values((_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach((b)=>b.destruct());
|
|
35559
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
35560
|
+
(_c = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
|
|
35583
35561
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
35584
35562
|
}
|
|
35585
35563
|
constructor(){
|
|
@@ -38168,7 +38146,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
38168
38146
|
afterInit(jodit) {}
|
|
38169
38147
|
beforeDestruct(jodit) {}
|
|
38170
38148
|
onKeyDownArrow(e) {
|
|
38171
|
-
var
|
|
38149
|
+
var _a;
|
|
38172
38150
|
if (e.key !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || !this.j.selection.isCollapsed()) {
|
|
38173
38151
|
return;
|
|
38174
38152
|
}
|
|
@@ -38176,7 +38154,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
38176
38154
|
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(endContainer)) {
|
|
38177
38155
|
return;
|
|
38178
38156
|
}
|
|
38179
|
-
if (((
|
|
38157
|
+
if (((_a = endContainer.nodeValue) === null || _a === void 0 ? void 0 : _a.length) === endOffset) {
|
|
38180
38158
|
const { parentNode } = endContainer;
|
|
38181
38159
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isInlineBlock(parentNode) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.findNotEmptyNeighbor(parentNode, false, this.j.editor)) {
|
|
38182
38160
|
_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.after(parentNode, this.j.createInside.text(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE));
|
|
@@ -39031,17 +39009,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
39031
39009
|
}
|
|
39032
39010
|
}
|
|
39033
39011
|
onProcessPasteLink(ignore, html) {
|
|
39012
|
+
var _a, _b, _c, _d;
|
|
39034
39013
|
const { jodit } = this;
|
|
39035
39014
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
39036
39015
|
return;
|
|
39037
39016
|
}
|
|
39038
39017
|
jodit.e.stopPropagation('processPaste');
|
|
39039
39018
|
if (jodit.o.link.processVideoLink) {
|
|
39040
|
-
|
|
39041
|
-
|
|
39042
|
-
|
|
39043
|
-
width: (_jodit_o_video1 = jodit.o.video) === null || _jodit_o_video1 === void 0 ? void 0 : _jodit_o_video1.defaultWidth,
|
|
39044
|
-
height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
|
|
39019
|
+
const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.convertMediaUrlToVideoEmbed, html, {
|
|
39020
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
39021
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
39045
39022
|
});
|
|
39046
39023
|
if (embed !== html) {
|
|
39047
39024
|
return jodit.createInside.fromHTML(embed);
|
|
@@ -39219,6 +39196,7 @@ __decorate([
|
|
|
39219
39196
|
], link.prototype, "__generateForm", null);
|
|
39220
39197
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
39221
39198
|
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
39199
|
+
var _a;
|
|
39222
39200
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
39223
39201
|
if (modeClassName === 'input') {
|
|
39224
39202
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
@@ -39232,8 +39210,7 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
39232
39210
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
39233
39211
|
}
|
|
39234
39212
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
39235
|
-
|
|
39236
|
-
const className = (_className_select_selectedOptions_item = className_select.selectedOptions.item(i)) === null || _className_select_selectedOptions_item === void 0 ? void 0 : _className_select_selectedOptions_item.value;
|
|
39213
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
39237
39214
|
if (className) {
|
|
39238
39215
|
a.classList.add(className);
|
|
39239
39216
|
}
|
|
@@ -39597,12 +39574,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
39597
39574
|
store = {
|
|
39598
39575
|
toolbar: (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_4__/* .makeCollection */ .$K)(editor),
|
|
39599
39576
|
rebuild: ()=>{
|
|
39577
|
+
var _a, _b;
|
|
39600
39578
|
if (button) {
|
|
39601
39579
|
const buttons = editor.e.fire('getDiffButtons.mobile', button.closest(_modules_toolbar_collection_collection_js__WEBPACK_IMPORTED_MODULE_3__/* .ToolbarCollection */ .Q));
|
|
39602
39580
|
if (buttons && store) {
|
|
39603
|
-
var _editor_toolbar_firstButton, _editor_toolbar;
|
|
39604
39581
|
store.toolbar.build((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(buttons));
|
|
39605
|
-
const w = ((
|
|
39582
|
+
const w = ((_b = (_a = editor.toolbar) === null || _a === void 0 ? void 0 : _a.firstButton) === null || _b === void 0 ? void 0 : _b.container.offsetWidth) || 36;
|
|
39606
39583
|
store.toolbar.container.style.width = (w + 4) * 3 + 'px';
|
|
39607
39584
|
}
|
|
39608
39585
|
}
|
|
@@ -39666,11 +39643,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
39666
39643
|
});
|
|
39667
39644
|
if (editor.o.toolbarAdaptive) {
|
|
39668
39645
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', ()=>{
|
|
39646
|
+
var _a, _b;
|
|
39669
39647
|
if (!editor.o.toolbar) {
|
|
39670
39648
|
return;
|
|
39671
39649
|
}
|
|
39672
|
-
|
|
39673
|
-
const width = ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
39650
|
+
const width = ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
39674
39651
|
const newStore = (()=>{
|
|
39675
39652
|
if (editor.isFullSize || width >= editor.o.sizeLG) {
|
|
39676
39653
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttons);
|
|
@@ -39684,10 +39661,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
39684
39661
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttonsXS);
|
|
39685
39662
|
})();
|
|
39686
39663
|
if (newStore.toString() !== store.toString()) {
|
|
39687
|
-
var _editor_toolbar;
|
|
39688
39664
|
store = newStore;
|
|
39689
39665
|
editor.e.fire('closeAllPopups');
|
|
39690
|
-
(
|
|
39666
|
+
(_b = editor.toolbar) === null || _b === void 0 ? void 0 : _b.setRemoveButtons(editor.o.removeButtons).build(store.concat(editor.o.extraButtons));
|
|
39691
39667
|
}
|
|
39692
39668
|
}).on(editor.ow, 'load resize', ()=>editor.e.fire('recalcAdaptive'));
|
|
39693
39669
|
}
|
|
@@ -39715,9 +39691,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('mobile'
|
|
|
39715
39691
|
|
|
39716
39692
|
|
|
39717
39693
|
const memoExec = (jodit, _, { control })=>{
|
|
39694
|
+
var _a;
|
|
39718
39695
|
const key = `button${control.command}`;
|
|
39719
|
-
|
|
39720
|
-
const value = (_ref = control.args && control.args[0]) !== null && _ref !== void 0 ? _ref : (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key);
|
|
39696
|
+
const value = (_a = control.args && control.args[0]) !== null && _a !== void 0 ? _a : (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key);
|
|
39721
39697
|
(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key, value);
|
|
39722
39698
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
39723
39699
|
};
|
|
@@ -39919,12 +39895,12 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
39919
39895
|
/**
|
|
39920
39896
|
* Clear extra styles and tags from Word's pasted text
|
|
39921
39897
|
*/ insertFromWordByType(e, html, insertType, texts) {
|
|
39898
|
+
var _a;
|
|
39922
39899
|
switch(insertType){
|
|
39923
39900
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML:
|
|
39924
39901
|
{
|
|
39925
|
-
var _this_j_events;
|
|
39926
39902
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.applyStyles)(html);
|
|
39927
|
-
const value = (
|
|
39903
|
+
const value = (_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('beautifyHTML', html);
|
|
39928
39904
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(value)) {
|
|
39929
39905
|
html = value;
|
|
39930
39906
|
}
|
|
@@ -40522,6 +40498,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
40522
40498
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(html);
|
|
40523
40499
|
break;
|
|
40524
40500
|
default:
|
|
40501
|
+
{
|
|
40502
|
+
const newHTML = this.j.e.fire('onCustomPasteHTMLOption', action, html, e);
|
|
40503
|
+
if (typeof newHTML === 'string') {
|
|
40504
|
+
html = newHTML;
|
|
40505
|
+
}
|
|
40506
|
+
}
|
|
40525
40507
|
}
|
|
40526
40508
|
}
|
|
40527
40509
|
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__/* .pasteInsertHtml */ .sX)(e, this.j, html);
|
|
@@ -40610,12 +40592,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.useInputsPlace
|
|
|
40610
40592
|
* Check if root node is empty
|
|
40611
40593
|
* @private
|
|
40612
40594
|
*/ function isEditorEmpty(root) {
|
|
40613
|
-
var
|
|
40595
|
+
var _a;
|
|
40614
40596
|
if (!root.firstChild) {
|
|
40615
40597
|
return true;
|
|
40616
40598
|
}
|
|
40617
40599
|
const first = root.firstChild;
|
|
40618
|
-
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has((
|
|
40600
|
+
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has((_a = first.nodeName) === null || _a === void 0 ? void 0 : _a.toLowerCase()) || /^(TABLE)$/i.test(first.nodeName)) {
|
|
40619
40601
|
return false;
|
|
40620
40602
|
}
|
|
40621
40603
|
const next = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.next(first, (node)=>node && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isEmptyTextNode(node), root);
|
|
@@ -40810,13 +40792,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
40810
40792
|
const rules = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(css).map((s)=>{
|
|
40811
40793
|
try {
|
|
40812
40794
|
return (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(s.cssRules);
|
|
40813
|
-
} catch (
|
|
40795
|
+
} catch (_a) {}
|
|
40814
40796
|
return [];
|
|
40815
40797
|
}).flat();
|
|
40816
40798
|
return rules.filter((r)=>{
|
|
40817
40799
|
try {
|
|
40818
40800
|
return Boolean(r && el.matches(r.selectorText));
|
|
40819
|
-
} catch (
|
|
40801
|
+
} catch (_a) {}
|
|
40820
40802
|
return false;
|
|
40821
40803
|
});
|
|
40822
40804
|
};
|
|
@@ -40882,7 +40864,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
40882
40864
|
scanFullPage: true
|
|
40883
40865
|
});
|
|
40884
40866
|
return cp.generateCSS();
|
|
40885
|
-
} catch (
|
|
40867
|
+
} catch (_a) {}
|
|
40886
40868
|
return '';
|
|
40887
40869
|
}
|
|
40888
40870
|
|
|
@@ -42195,8 +42177,8 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
42195
42177
|
*/
|
|
42196
42178
|
class SentenceFinder {
|
|
42197
42179
|
add(node) {
|
|
42198
|
-
var
|
|
42199
|
-
const value = ((
|
|
42180
|
+
var _a;
|
|
42181
|
+
const value = ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
42200
42182
|
if (!value.length) {
|
|
42201
42183
|
return;
|
|
42202
42184
|
}
|
|
@@ -42415,13 +42397,13 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
42415
42397
|
findAndSelect(query, next) {
|
|
42416
42398
|
var _this = this;
|
|
42417
42399
|
return _async_to_generator(function*() {
|
|
42400
|
+
var _a;
|
|
42418
42401
|
const bounds = yield _this.findQueryBounds(query, 'walker');
|
|
42419
42402
|
if (!bounds.length) {
|
|
42420
42403
|
return false;
|
|
42421
42404
|
}
|
|
42422
42405
|
if (_this.previousQuery !== query || !(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(_this.j.editor).length) {
|
|
42423
|
-
|
|
42424
|
-
(_this_drawPromise = _this.drawPromise) === null || _this_drawPromise === void 0 ? void 0 : _this_drawPromise.rejectCallback();
|
|
42406
|
+
(_a = _this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
42425
42407
|
_this.j.async.cancelAnimationFrame(_this.wrapFrameRequest);
|
|
42426
42408
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(_this.j);
|
|
42427
42409
|
_this.drawPromise = _this.__drawSelectionRanges(bounds);
|
|
@@ -42462,9 +42444,8 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
42462
42444
|
return _async_to_generator(function*() {
|
|
42463
42445
|
const res = yield promise;
|
|
42464
42446
|
return res.every((r)=>{
|
|
42465
|
-
var
|
|
42466
|
-
|
|
42467
|
-
return r.startContainer.isConnected && r.startOffset <= ((_r_startContainer_nodeValue_length = (_r_startContainer_nodeValue = r.startContainer.nodeValue) === null || _r_startContainer_nodeValue === void 0 ? void 0 : _r_startContainer_nodeValue.length) !== null && _r_startContainer_nodeValue_length !== void 0 ? _r_startContainer_nodeValue_length : 0) && r.endContainer.isConnected && r.endOffset <= ((_r_endContainer_nodeValue_length = (_r_endContainer_nodeValue = r.endContainer.nodeValue) === null || _r_endContainer_nodeValue === void 0 ? void 0 : _r_endContainer_nodeValue.length) !== null && _r_endContainer_nodeValue_length !== void 0 ? _r_endContainer_nodeValue_length : 0);
|
|
42447
|
+
var _a, _b, _c, _d;
|
|
42448
|
+
return r.startContainer.isConnected && r.startOffset <= ((_b = (_a = r.startContainer.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0) && r.endContainer.isConnected && r.endOffset <= ((_d = (_c = r.endContainer.nodeValue) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0);
|
|
42468
42449
|
});
|
|
42469
42450
|
})();
|
|
42470
42451
|
}
|
|
@@ -42488,8 +42469,8 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
42488
42469
|
}
|
|
42489
42470
|
return false;
|
|
42490
42471
|
}).on('end', ()=>{
|
|
42491
|
-
var
|
|
42492
|
-
resolve((
|
|
42472
|
+
var _a;
|
|
42473
|
+
resolve((_a = sentence.ranges(query)) !== null && _a !== void 0 ? _a : []);
|
|
42493
42474
|
}).setWork(_this.j.editor);
|
|
42494
42475
|
});
|
|
42495
42476
|
return _this.cache[query];
|
|
@@ -42591,8 +42572,8 @@ var __decorate = undefined && undefined.__decorate || function(decorators, targe
|
|
|
42591
42572
|
}
|
|
42592
42573
|
}
|
|
42593
42574
|
/** @override */ beforeDestruct(jodit) {
|
|
42594
|
-
var
|
|
42595
|
-
(
|
|
42575
|
+
var _a;
|
|
42576
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'ui')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
42596
42577
|
jodit.e.off('.search');
|
|
42597
42578
|
}
|
|
42598
42579
|
constructor(){
|
|
@@ -42967,11 +42948,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
42967
42948
|
].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
|
|
42968
42949
|
// and mouseup on another cell call `click` only for `TR` element.
|
|
42969
42950
|
.on('clickTr clickTbody', ()=>{
|
|
42951
|
+
var _a;
|
|
42970
42952
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
42971
42953
|
if (cellsCount) {
|
|
42972
42954
|
if (cellsCount > 1) {
|
|
42973
|
-
|
|
42974
|
-
(_this_j_s_sel = this.j.s.sel) === null || _this_j_s_sel === void 0 ? void 0 : _this_j_s_sel.removeAllRanges();
|
|
42955
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
42975
42956
|
}
|
|
42976
42957
|
return false;
|
|
42977
42958
|
}
|
|
@@ -43016,6 +42997,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
43016
42997
|
/**
|
|
43017
42998
|
* Mouse move inside the table
|
|
43018
42999
|
*/ __onMove(table, e) {
|
|
43000
|
+
var _a;
|
|
43019
43001
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
43020
43002
|
return;
|
|
43021
43003
|
}
|
|
@@ -43048,8 +43030,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
43048
43030
|
}
|
|
43049
43031
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
43050
43032
|
if (cellsCount > 1) {
|
|
43051
|
-
|
|
43052
|
-
(_this_j_s_sel = this.j.s.sel) === null || _this_j_s_sel === void 0 ? void 0 : _this_j_s_sel.removeAllRanges();
|
|
43033
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
43053
43034
|
}
|
|
43054
43035
|
this.j.e.fire('hidePopup');
|
|
43055
43036
|
e.stopPropagation();
|
|
@@ -43058,16 +43039,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
43058
43039
|
const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
43059
43040
|
cell.appendChild(n);
|
|
43060
43041
|
this.j.async.setTimeout(()=>{
|
|
43061
|
-
var
|
|
43062
|
-
(
|
|
43042
|
+
var _a;
|
|
43043
|
+
(_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(n);
|
|
43063
43044
|
}, this.j.defaultTimeout / 5);
|
|
43064
43045
|
})();
|
|
43065
43046
|
}
|
|
43066
43047
|
/**
|
|
43067
43048
|
* On click in outside - remove selection
|
|
43068
43049
|
*/ __onRemoveSelection(e) {
|
|
43069
|
-
var
|
|
43070
|
-
if (!(e === null || e === void 0 ? void 0 :
|
|
43050
|
+
var _a;
|
|
43051
|
+
if (!((_a = e === null || e === void 0 ? void 0 : e.buffer) === null || _a === void 0 ? void 0 : _a.actionTrigger) && !this.__selectedCell && this.__tableModule.getAllSelectedCells().length) {
|
|
43071
43052
|
this.j.unlock();
|
|
43072
43053
|
this.unselectCells();
|
|
43073
43054
|
this.j.e.fire('hidePopup', 'cells');
|
|
@@ -43560,8 +43541,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.maxHeight = 'a
|
|
|
43560
43541
|
/**
|
|
43561
43542
|
* Returns service spaces: toolbar + statusbar
|
|
43562
43543
|
*/ __getNotWorkHeight() {
|
|
43563
|
-
var
|
|
43564
|
-
return (((
|
|
43544
|
+
var _a, _b;
|
|
43545
|
+
return (((_a = this.j.toolbarContainer) === null || _a === void 0 ? void 0 : _a.offsetHeight) || 0) + (((_b = this.j.statusbar) === null || _b === void 0 ? void 0 : _b.getHeight()) || 0) + 2;
|
|
43565
43546
|
}
|
|
43566
43547
|
/**
|
|
43567
43548
|
* Calculate workspace height
|
|
@@ -43815,12 +43796,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_2__/* .SourceE
|
|
|
43815
43796
|
}
|
|
43816
43797
|
}
|
|
43817
43798
|
destruct() {
|
|
43818
|
-
var
|
|
43799
|
+
var _a, _b;
|
|
43819
43800
|
this.instance.off('change', this.toWYSIWYG);
|
|
43820
43801
|
this.instance.off('focus', this.proxyOnFocus);
|
|
43821
43802
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
43822
43803
|
this.instance.destroy();
|
|
43823
|
-
(
|
|
43804
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.off('aceInited.source');
|
|
43824
43805
|
}
|
|
43825
43806
|
setValue(value) {
|
|
43826
43807
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
@@ -44104,9 +44085,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44104
44085
|
this.j.e.fire(this, 'ready');
|
|
44105
44086
|
}
|
|
44106
44087
|
onReadyAlways(onReady) {
|
|
44088
|
+
var _a;
|
|
44107
44089
|
if (!this.isReady) {
|
|
44108
|
-
|
|
44109
|
-
(_this_j_events = this.j.events) === null || _this_j_events === void 0 ? void 0 : _this_j_events.on(this, 'ready', onReady);
|
|
44090
|
+
(_a = this.j.events) === null || _a === void 0 ? void 0 : _a.on(this, 'ready', onReady);
|
|
44110
44091
|
} else {
|
|
44111
44092
|
onReady();
|
|
44112
44093
|
}
|
|
@@ -44159,9 +44140,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44159
44140
|
* Plug-in change simple textarea on CodeMirror editor in Source code mode
|
|
44160
44141
|
*/ class source extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */ .k {
|
|
44161
44142
|
onInsertHTML(html) {
|
|
44143
|
+
var _a;
|
|
44162
44144
|
if (!this.j.o.readonly && !this.j.isEditorMode()) {
|
|
44163
|
-
|
|
44164
|
-
(_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.insertRaw(html);
|
|
44145
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.insertRaw(html);
|
|
44165
44146
|
this.toWYSIWYG();
|
|
44166
44147
|
return false;
|
|
44167
44148
|
}
|
|
@@ -44220,23 +44201,23 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44220
44201
|
return str.replace(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
44221
44202
|
}
|
|
44222
44203
|
onSelectAll(command) {
|
|
44204
|
+
var _a;
|
|
44223
44205
|
if (command.toLowerCase() === 'selectall' && this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
44224
|
-
|
|
44225
|
-
(_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.selectAll();
|
|
44206
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.selectAll();
|
|
44226
44207
|
return false;
|
|
44227
44208
|
}
|
|
44228
44209
|
}
|
|
44229
44210
|
getMirrorValue() {
|
|
44230
|
-
var
|
|
44231
|
-
return ((
|
|
44211
|
+
var _a;
|
|
44212
|
+
return ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getValue()) || '';
|
|
44232
44213
|
}
|
|
44233
44214
|
setMirrorValue(value) {
|
|
44234
|
-
var
|
|
44235
|
-
(
|
|
44215
|
+
var _a;
|
|
44216
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
44236
44217
|
}
|
|
44237
44218
|
setFocusToMirror() {
|
|
44238
|
-
var
|
|
44239
|
-
(
|
|
44219
|
+
var _a;
|
|
44220
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.focus();
|
|
44240
44221
|
}
|
|
44241
44222
|
saveSelection() {
|
|
44242
44223
|
if (this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
@@ -44298,12 +44279,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44298
44279
|
this.setFocusToMirror(); // need for setting focus after change mode
|
|
44299
44280
|
}
|
|
44300
44281
|
setMirrorSelectionRange(start, end) {
|
|
44301
|
-
var
|
|
44302
|
-
(
|
|
44282
|
+
var _a;
|
|
44283
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
44303
44284
|
}
|
|
44304
44285
|
onReadonlyReact() {
|
|
44305
|
-
var
|
|
44306
|
-
(
|
|
44286
|
+
var _a;
|
|
44287
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setReadOnly(this.j.o.readonly);
|
|
44307
44288
|
}
|
|
44308
44289
|
/** @override */ afterInit(editor) {
|
|
44309
44290
|
this.mirrorContainer = editor.c.div('jodit-source');
|
|
@@ -44313,25 +44294,25 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44313
44294
|
});
|
|
44314
44295
|
this.sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)('area', editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
44315
44296
|
editor.e.on(editor.ow, 'keydown', (e)=>{
|
|
44316
|
-
var
|
|
44317
|
-
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((
|
|
44297
|
+
var _a;
|
|
44298
|
+
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.isFocused)) {
|
|
44318
44299
|
this.sourceEditor.blur();
|
|
44319
44300
|
}
|
|
44320
44301
|
});
|
|
44321
44302
|
this.onReadonlyReact();
|
|
44322
44303
|
editor.e.on('placeholder.source', (text)=>{
|
|
44323
|
-
var
|
|
44324
|
-
(
|
|
44304
|
+
var _a;
|
|
44305
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setPlaceHolder(text);
|
|
44325
44306
|
}).on('change.source', this.syncValueFromWYSIWYG).on('beautifyHTML', (html)=>html);
|
|
44326
44307
|
if (editor.o.beautifyHTML) {
|
|
44327
44308
|
const addEventListener = ()=>{
|
|
44309
|
+
var _a;
|
|
44328
44310
|
if (editor.isInDestruct) {
|
|
44329
44311
|
return false;
|
|
44330
44312
|
}
|
|
44331
44313
|
const html_beautify = editor.ow.html_beautify;
|
|
44332
44314
|
if (html_beautify && !editor.isInDestruct) {
|
|
44333
|
-
|
|
44334
|
-
(_editor_events = editor.events) === null || _editor_events === void 0 ? void 0 : _editor_events.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
44315
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
44335
44316
|
return true;
|
|
44336
44317
|
}
|
|
44337
44318
|
return false;
|
|
@@ -44350,21 +44331,21 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44350
44331
|
}
|
|
44351
44332
|
}
|
|
44352
44333
|
initSourceEditor(editor) {
|
|
44334
|
+
var _a;
|
|
44353
44335
|
if (editor.o.sourceEditor !== 'area') {
|
|
44354
44336
|
const sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
44355
44337
|
sourceEditor.onReadyAlways(()=>{
|
|
44356
|
-
var
|
|
44357
|
-
(
|
|
44338
|
+
var _a, _b;
|
|
44339
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
44358
44340
|
this.sourceEditor = sourceEditor;
|
|
44359
44341
|
this.syncValueFromWYSIWYG(true);
|
|
44360
|
-
(
|
|
44342
|
+
(_b = editor.events) === null || _b === void 0 ? void 0 : _b.fire('sourceEditorReady', editor);
|
|
44361
44343
|
});
|
|
44362
44344
|
} else {
|
|
44363
|
-
|
|
44364
|
-
|
|
44365
|
-
var _editor_events;
|
|
44345
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.onReadyAlways(()=>{
|
|
44346
|
+
var _a;
|
|
44366
44347
|
this.syncValueFromWYSIWYG(true);
|
|
44367
|
-
(
|
|
44348
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire('sourceEditorReady', editor);
|
|
44368
44349
|
});
|
|
44369
44350
|
}
|
|
44370
44351
|
}
|
|
@@ -44391,14 +44372,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
44391
44372
|
this.tempMarkerEndReg = /{end-jodit-selection}/g;
|
|
44392
44373
|
// override it for ace editors
|
|
44393
44374
|
this.getSelectionStart = ()=>{
|
|
44394
|
-
var
|
|
44395
|
-
|
|
44396
|
-
return (_this_sourceEditor_getSelectionStart = (_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.getSelectionStart()) !== null && _this_sourceEditor_getSelectionStart !== void 0 ? _this_sourceEditor_getSelectionStart : 0;
|
|
44375
|
+
var _a, _b;
|
|
44376
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionStart()) !== null && _b !== void 0 ? _b : 0;
|
|
44397
44377
|
};
|
|
44398
44378
|
this.getSelectionEnd = ()=>{
|
|
44399
|
-
var
|
|
44400
|
-
|
|
44401
|
-
return (_this_sourceEditor_getSelectionEnd = (_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.getSelectionEnd()) !== null && _this_sourceEditor_getSelectionEnd !== void 0 ? _this_sourceEditor_getSelectionEnd : 0;
|
|
44379
|
+
var _a, _b;
|
|
44380
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionEnd()) !== null && _b !== void 0 ? _b : 0;
|
|
44402
44381
|
};
|
|
44403
44382
|
}
|
|
44404
44383
|
}
|
|
@@ -44502,6 +44481,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
44502
44481
|
return !jodit.o.speechRecognize.api;
|
|
44503
44482
|
},
|
|
44504
44483
|
exec (jodit, current, { button, control }) {
|
|
44484
|
+
var _a;
|
|
44505
44485
|
const { api: ApiConstructor, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
|
|
44506
44486
|
if (!ApiConstructor) {
|
|
44507
44487
|
jodit.alert('Speech recognize API unsupported in your browser');
|
|
@@ -44511,8 +44491,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
44511
44491
|
if (!api) {
|
|
44512
44492
|
const nativeApi = new ApiConstructor();
|
|
44513
44493
|
api = new _helpers_recognize_manager_js__WEBPACK_IMPORTED_MODULE_5__/* .RecognizeManager */ .g(jodit.async, nativeApi);
|
|
44514
|
-
|
|
44515
|
-
api.lang = (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .K)(lang) ? lang : (_attr = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(jodit.od.documentElement, 'lang')) !== null && _attr !== void 0 ? _attr : undefined;
|
|
44494
|
+
api.lang = (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .K)(lang) ? lang : (_a = (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(jodit.od.documentElement, 'lang')) !== null && _a !== void 0 ? _a : undefined;
|
|
44516
44495
|
api.continuous = continuous;
|
|
44517
44496
|
api.interimResults = interimResults;
|
|
44518
44497
|
api.sound = sound;
|
|
@@ -44552,8 +44531,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
44552
44531
|
interimResults: 'Interim Results'
|
|
44553
44532
|
},
|
|
44554
44533
|
childTemplate (jodit, key, value) {
|
|
44555
|
-
var
|
|
44556
|
-
const api = (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(jodit, 'speech'), checked = (
|
|
44534
|
+
var _a;
|
|
44535
|
+
const api = (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(jodit, 'speech'), checked = (_a = api === null || api === void 0 ? void 0 : api[key]) !== null && _a !== void 0 ? _a : jodit.o.speechRecognize[key];
|
|
44557
44536
|
return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'> ${value}</span>`;
|
|
44558
44537
|
},
|
|
44559
44538
|
mods: {
|
|
@@ -47660,11 +47639,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video
|
|
|
47660
47639
|
content: formCode.container
|
|
47661
47640
|
});
|
|
47662
47641
|
formLink.onSubmit((data)=>{
|
|
47663
|
-
var
|
|
47664
|
-
|
|
47665
|
-
|
|
47666
|
-
|
|
47667
|
-
height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
|
|
47642
|
+
var _a, _b, _c, _d;
|
|
47643
|
+
insertCode((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.call)((_b = (_a = jodit.o.video) === null || _a === void 0 ? void 0 : _a.parseUrlToVideoEmbed) !== null && _b !== void 0 ? _b : _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.convertMediaUrlToVideoEmbed, data.url, {
|
|
47644
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
47645
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
47668
47646
|
}));
|
|
47669
47647
|
});
|
|
47670
47648
|
formCode.onSubmit((data)=>{
|
|
@@ -47824,8 +47802,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.wrapNodes = {
|
|
|
47824
47802
|
/**
|
|
47825
47803
|
* Found Node which should be wrapped
|
|
47826
47804
|
*/ this.isSuitableStart = (n)=>{
|
|
47827
|
-
var
|
|
47828
|
-
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(n) && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(n.nodeValue) && (/[^\s]/.test(n.nodeValue) || ((
|
|
47805
|
+
var _a;
|
|
47806
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(n) && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_5__/* .isString */ .K)(n.nodeValue) && (/[^\s]/.test(n.nodeValue) || ((_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) === n && this.isSuitable(n.nextSibling)) || this.isNotWrapped(n) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTemporary(n);
|
|
47829
47807
|
};
|
|
47830
47808
|
/**
|
|
47831
47809
|
* Node should add in a block element
|
|
@@ -48006,7 +47984,7 @@ function _object_spread(target) {
|
|
|
48006
47984
|
this.j.s.select(elm);
|
|
48007
47985
|
return false;
|
|
48008
47986
|
}
|
|
48009
|
-
} catch (
|
|
47987
|
+
} catch (_a) {}
|
|
48010
47988
|
this.j.s.select(bindElement);
|
|
48011
47989
|
return false;
|
|
48012
47990
|
};
|