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/es2018/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
|
|
|
@@ -7689,11 +7686,11 @@ function fastClone(object) {
|
|
|
7689
7686
|
*/
|
|
7690
7687
|
const keepNames = new Map();
|
|
7691
7688
|
const getClassName = (obj)=>{
|
|
7692
|
-
var
|
|
7689
|
+
var _a;
|
|
7693
7690
|
if ((0,_checker_is_function_js__WEBPACK_IMPORTED_MODULE_0__/* .isFunction */ .T)(obj.className)) {
|
|
7694
7691
|
return obj.className();
|
|
7695
7692
|
}
|
|
7696
|
-
const constructor = ((
|
|
7693
|
+
const constructor = ((_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.originalConstructor) || obj.constructor;
|
|
7697
7694
|
if (keepNames.has(constructor)) {
|
|
7698
7695
|
return keepNames.get(constructor);
|
|
7699
7696
|
}
|
|
@@ -7753,7 +7750,7 @@ const getClassName = (obj)=>{
|
|
|
7753
7750
|
}
|
|
7754
7751
|
result = result[part];
|
|
7755
7752
|
}
|
|
7756
|
-
} catch (
|
|
7753
|
+
} catch (_a) {
|
|
7757
7754
|
return null; // permission denied ore another access exception
|
|
7758
7755
|
}
|
|
7759
7756
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_1__/* .isVoid */ .R)(result)) {
|
|
@@ -8017,8 +8014,8 @@ const getClassName = (obj)=>{
|
|
|
8017
8014
|
item.src = a.href;
|
|
8018
8015
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(a);
|
|
8019
8016
|
restoreAttributes.push(()=>{
|
|
8020
|
-
var
|
|
8021
|
-
item.src = (
|
|
8017
|
+
var _a;
|
|
8018
|
+
item.src = (_a = previousAttrs[2]) !== null && _a !== void 0 ? _a : '';
|
|
8022
8019
|
(0,_attr_js__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(item, {
|
|
8023
8020
|
width: previousAttrs[0] || null,
|
|
8024
8021
|
height: previousAttrs[1] || null
|
|
@@ -8123,11 +8120,11 @@ const getClassName = (obj)=>{
|
|
|
8123
8120
|
}
|
|
8124
8121
|
try {
|
|
8125
8122
|
box.appendChild(newNode);
|
|
8126
|
-
} catch (
|
|
8123
|
+
} catch (_a) {}
|
|
8127
8124
|
} else {
|
|
8128
8125
|
try {
|
|
8129
8126
|
box.appendChild(c.cloneNode(true));
|
|
8130
|
-
} catch (
|
|
8127
|
+
} catch (_b) {}
|
|
8131
8128
|
}
|
|
8132
8129
|
}
|
|
8133
8130
|
};
|
|
@@ -8172,6 +8169,7 @@ const map = {};
|
|
|
8172
8169
|
* ```
|
|
8173
8170
|
* You must use the function derived from the method immediately as its iframe is being removed
|
|
8174
8171
|
*/ function reset(key) {
|
|
8172
|
+
var _a, _b;
|
|
8175
8173
|
if (!(key in map)) {
|
|
8176
8174
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
8177
8175
|
try {
|
|
@@ -8189,12 +8187,10 @@ const map = {};
|
|
|
8189
8187
|
throw e;
|
|
8190
8188
|
}
|
|
8191
8189
|
} finally{
|
|
8192
|
-
|
|
8193
|
-
(_iframe_parentNode = iframe.parentNode) === null || _iframe_parentNode === void 0 ? void 0 : _iframe_parentNode.removeChild(iframe);
|
|
8190
|
+
(_a = iframe.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(iframe);
|
|
8194
8191
|
}
|
|
8195
8192
|
}
|
|
8196
|
-
|
|
8197
|
-
return (_map_key = map[key]) !== null && _map_key !== void 0 ? _map_key : null;
|
|
8193
|
+
return (_b = map[key]) !== null && _b !== void 0 ? _b : null;
|
|
8198
8194
|
}
|
|
8199
8195
|
|
|
8200
8196
|
|
|
@@ -8364,7 +8360,7 @@ const $$temp = ()=>{
|
|
|
8364
8360
|
if ((0,_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(element)) {
|
|
8365
8361
|
try {
|
|
8366
8362
|
resolved = od.querySelector(element);
|
|
8367
|
-
} catch (
|
|
8363
|
+
} catch (_a) {
|
|
8368
8364
|
throw (0,_index_js__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3)('String "' + element + '" should be valid HTML selector');
|
|
8369
8365
|
}
|
|
8370
8366
|
}
|
|
@@ -8540,9 +8536,9 @@ const keys = (obj, own = true)=>{
|
|
|
8540
8536
|
/**
|
|
8541
8537
|
* Memorize last user chose
|
|
8542
8538
|
*/ const memorizeExec = (editor, _, { control }, preProcessValue)=>{
|
|
8539
|
+
var _a;
|
|
8543
8540
|
const key = `button${control.command}`;
|
|
8544
|
-
|
|
8545
|
-
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);
|
|
8541
|
+
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);
|
|
8546
8542
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value)) {
|
|
8547
8543
|
return false;
|
|
8548
8544
|
}
|
|
@@ -8560,7 +8556,7 @@ const keys = (obj, own = true)=>{
|
|
|
8560
8556
|
}
|
|
8561
8557
|
try {
|
|
8562
8558
|
return event.dataTransfer || new DataTransfer();
|
|
8563
|
-
} catch (
|
|
8559
|
+
} catch (_a) {
|
|
8564
8560
|
return null;
|
|
8565
8561
|
}
|
|
8566
8562
|
};
|
|
@@ -8978,6 +8974,7 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
8978
8974
|
}
|
|
8979
8975
|
}
|
|
8980
8976
|
__beforeDestruct() {
|
|
8977
|
+
var _a;
|
|
8981
8978
|
if (this.isInDestruct) {
|
|
8982
8979
|
return;
|
|
8983
8980
|
}
|
|
@@ -8988,8 +8985,7 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
8988
8985
|
return super.destruct();
|
|
8989
8986
|
}
|
|
8990
8987
|
if ((0,_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_2__/* .isJoditObject */ .y)(j)) {
|
|
8991
|
-
|
|
8992
|
-
(_this_buttons = this.buttons) === null || _this_buttons === void 0 ? void 0 : _this_buttons.forEach((btn)=>{
|
|
8988
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>{
|
|
8993
8989
|
j === null || j === void 0 ? void 0 : j.unregisterButton(btn);
|
|
8994
8990
|
});
|
|
8995
8991
|
}
|
|
@@ -9078,7 +9074,7 @@ class Ajax {
|
|
|
9078
9074
|
try {
|
|
9079
9075
|
this.__isFulfilled = true;
|
|
9080
9076
|
this.xhr.abort();
|
|
9081
|
-
} catch (
|
|
9077
|
+
} catch (_a) {}
|
|
9082
9078
|
return this;
|
|
9083
9079
|
}
|
|
9084
9080
|
send() {
|
|
@@ -9086,6 +9082,7 @@ class Ajax {
|
|
|
9086
9082
|
const { xhr, o } = this;
|
|
9087
9083
|
const request = this.prepareRequest();
|
|
9088
9084
|
return this.__async.promise(async (resolve, reject)=>{
|
|
9085
|
+
var _a;
|
|
9089
9086
|
const onReject = ()=>{
|
|
9090
9087
|
this.__isFulfilled = true;
|
|
9091
9088
|
reject(_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
|
|
@@ -9105,16 +9102,16 @@ class Ajax {
|
|
|
9105
9102
|
xhr.responseType = o.responseType;
|
|
9106
9103
|
}
|
|
9107
9104
|
xhr.onprogress = (e)=>{
|
|
9108
|
-
var
|
|
9105
|
+
var _a, _b;
|
|
9109
9106
|
let percentComplete = 0;
|
|
9110
9107
|
if (e.lengthComputable) {
|
|
9111
9108
|
percentComplete = e.loaded / e.total * 100;
|
|
9112
9109
|
}
|
|
9113
|
-
(
|
|
9110
|
+
(_b = (_a = this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, percentComplete);
|
|
9114
9111
|
};
|
|
9115
9112
|
xhr.onreadystatechange = ()=>{
|
|
9116
|
-
var
|
|
9117
|
-
(
|
|
9113
|
+
var _a, _b;
|
|
9114
|
+
(_b = (_a = this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, 10);
|
|
9118
9115
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
9119
9116
|
if (o.successStatuses.includes(xhr.status)) {
|
|
9120
9117
|
onResolve();
|
|
@@ -9124,8 +9121,7 @@ class Ajax {
|
|
|
9124
9121
|
}
|
|
9125
9122
|
}
|
|
9126
9123
|
};
|
|
9127
|
-
|
|
9128
|
-
xhr.withCredentials = (_o_withCredentials = o.withCredentials) !== null && _o_withCredentials !== void 0 ? _o_withCredentials : false;
|
|
9124
|
+
xhr.withCredentials = (_a = o.withCredentials) !== null && _a !== void 0 ? _a : false;
|
|
9129
9125
|
const { url, data, method } = request;
|
|
9130
9126
|
xhr.open(method, url, true);
|
|
9131
9127
|
if (o.contentType && xhr.setRequestHeader) {
|
|
@@ -9313,8 +9309,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.defaultAjaxOpt
|
|
|
9313
9309
|
* Check if the cursor is at the edge of the string
|
|
9314
9310
|
* @private
|
|
9315
9311
|
*/ function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
9316
|
-
var
|
|
9317
|
-
const text = ((
|
|
9312
|
+
var _a;
|
|
9313
|
+
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
9318
9314
|
if (end && text.replace((0,_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
9319
9315
|
return true;
|
|
9320
9316
|
}
|
|
@@ -9569,10 +9565,9 @@ class Selection {
|
|
|
9569
9565
|
/**
|
|
9570
9566
|
* Clear all selection
|
|
9571
9567
|
*/ clear() {
|
|
9572
|
-
var
|
|
9573
|
-
if ((
|
|
9574
|
-
|
|
9575
|
-
(_this_sel1 = this.sel) === null || _this_sel1 === void 0 ? void 0 : _this_sel1.removeAllRanges();
|
|
9568
|
+
var _a, _b;
|
|
9569
|
+
if ((_a = this.sel) === null || _a === void 0 ? void 0 : _a.rangeCount) {
|
|
9570
|
+
(_b = this.sel) === null || _b === void 0 ? void 0 : _b.removeAllRanges();
|
|
9576
9571
|
}
|
|
9577
9572
|
}
|
|
9578
9573
|
/**
|
|
@@ -9611,7 +9606,7 @@ class Selection {
|
|
|
9611
9606
|
rng.collapse(true);
|
|
9612
9607
|
this.selectRange(rng);
|
|
9613
9608
|
return true;
|
|
9614
|
-
} catch (
|
|
9609
|
+
} catch (_a) {}
|
|
9615
9610
|
return false;
|
|
9616
9611
|
}
|
|
9617
9612
|
/**
|
|
@@ -9710,7 +9705,7 @@ class Selection {
|
|
|
9710
9705
|
return result;
|
|
9711
9706
|
}
|
|
9712
9707
|
restoreFakes(fakes) {
|
|
9713
|
-
var
|
|
9708
|
+
var _a, _b, _c, _d;
|
|
9714
9709
|
const nodes = fakes.filter((n)=>n.isConnected);
|
|
9715
9710
|
if (!nodes.length) {
|
|
9716
9711
|
return;
|
|
@@ -9722,10 +9717,10 @@ class Selection {
|
|
|
9722
9717
|
range.setEndBefore(fakeRight);
|
|
9723
9718
|
}
|
|
9724
9719
|
this.selectRange(range);
|
|
9725
|
-
if (((
|
|
9720
|
+
if (((_a = fakeLeft.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) !== ((_b = fakeLeft.parentNode) === null || _b === void 0 ? void 0 : _b.lastChild)) {
|
|
9726
9721
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeLeft);
|
|
9727
9722
|
}
|
|
9728
|
-
if ((fakeRight === null || fakeRight === void 0 ? void 0 :
|
|
9723
|
+
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)) {
|
|
9729
9724
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeRight);
|
|
9730
9725
|
}
|
|
9731
9726
|
}
|
|
@@ -9783,7 +9778,7 @@ class Selection {
|
|
|
9783
9778
|
}
|
|
9784
9779
|
try {
|
|
9785
9780
|
sel.addRange(ranges[i].cloneRange());
|
|
9786
|
-
} catch (
|
|
9781
|
+
} catch (_a) {}
|
|
9787
9782
|
}
|
|
9788
9783
|
}
|
|
9789
9784
|
return info;
|
|
@@ -9793,6 +9788,7 @@ class Selection {
|
|
|
9793
9788
|
*/ focus(options = {
|
|
9794
9789
|
preventScroll: true
|
|
9795
9790
|
}) {
|
|
9791
|
+
var _a, _b;
|
|
9796
9792
|
if (!this.isFocused()) {
|
|
9797
9793
|
const scrollParent = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getScrollParent)(this.j.container), scrollTop = scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.scrollTop;
|
|
9798
9794
|
if (this.j.iframe) {
|
|
@@ -9813,8 +9809,7 @@ class Selection {
|
|
|
9813
9809
|
this.selectRange(range, false);
|
|
9814
9810
|
}
|
|
9815
9811
|
if (!this.j.editorIsActive) {
|
|
9816
|
-
|
|
9817
|
-
(_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');
|
|
9812
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.fire('focus');
|
|
9818
9813
|
}
|
|
9819
9814
|
return true;
|
|
9820
9815
|
}
|
|
@@ -10011,7 +10006,7 @@ class Selection {
|
|
|
10011
10006
|
* Call callback for all selection node
|
|
10012
10007
|
*/ // eslint-disable-next-line complexity
|
|
10013
10008
|
eachSelection(callback) {
|
|
10014
|
-
var
|
|
10009
|
+
var _a;
|
|
10015
10010
|
const sel = this.sel;
|
|
10016
10011
|
if (!sel || !sel.rangeCount) {
|
|
10017
10012
|
return;
|
|
@@ -10027,7 +10022,7 @@ class Selection {
|
|
|
10027
10022
|
const elementOffset = startOffset < length ? startOffset : length - 1;
|
|
10028
10023
|
let start = range.startContainer === this.area ? root.childNodes[elementOffset] : range.startContainer;
|
|
10029
10024
|
let end = range.endContainer === this.area ? root.childNodes[range.endOffset - 1] : range.endContainer;
|
|
10030
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) && start === range.startContainer && range.startOffset === ((
|
|
10025
|
+
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) {
|
|
10031
10026
|
start = start.nextSibling;
|
|
10032
10027
|
}
|
|
10033
10028
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) && end === range.endContainer && range.endOffset === 0 && end.previousSibling) {
|
|
@@ -10083,8 +10078,8 @@ class Selection {
|
|
|
10083
10078
|
*
|
|
10084
10079
|
* @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
|
|
10085
10080
|
*/ cursorInTheEdge(start, parentBlock, fake = null) {
|
|
10086
|
-
var
|
|
10087
|
-
const end = !start, range = (
|
|
10081
|
+
var _a;
|
|
10082
|
+
const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
10088
10083
|
fake !== null && fake !== void 0 ? fake : fake = this.current(false);
|
|
10089
10084
|
if (!range || !fake || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
|
|
10090
10085
|
return null;
|
|
@@ -10148,6 +10143,7 @@ class Selection {
|
|
|
10148
10143
|
/**
|
|
10149
10144
|
* Add fake node for new cursor position
|
|
10150
10145
|
*/ setCursorNearWith(node, inStart) {
|
|
10146
|
+
var _a, _b;
|
|
10151
10147
|
this.errorNode(node);
|
|
10152
10148
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.up(node, (elm)=>elm === this.area || elm && elm.parentNode === this.area, this.area)) {
|
|
10153
10149
|
throw (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.error)('Node element must be in editor');
|
|
@@ -10164,9 +10160,7 @@ class Selection {
|
|
|
10164
10160
|
if (inStart) {
|
|
10165
10161
|
range.setStart(node, 0);
|
|
10166
10162
|
} else {
|
|
10167
|
-
|
|
10168
|
-
var _node_nodeValue_length;
|
|
10169
|
-
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);
|
|
10163
|
+
range.setEnd(node, (_b = (_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
10170
10164
|
}
|
|
10171
10165
|
}
|
|
10172
10166
|
range.collapse(inStart);
|
|
@@ -10413,10 +10407,9 @@ class Selection {
|
|
|
10413
10407
|
}
|
|
10414
10408
|
// After splitting some part can be empty
|
|
10415
10409
|
const fillFakeParent = (fake)=>{
|
|
10416
|
-
var
|
|
10417
|
-
if ((fake === null || fake === void 0 ? void 0 :
|
|
10418
|
-
|
|
10419
|
-
fake === null || fake === void 0 ? void 0 : (_fake_parentNode2 = fake.parentNode) === null || _fake_parentNode2 === void 0 ? void 0 : _fake_parentNode2.appendChild(br.cloneNode());
|
|
10410
|
+
var _a, _b, _c;
|
|
10411
|
+
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)) {
|
|
10412
|
+
(_c = fake === null || fake === void 0 ? void 0 : fake.parentNode) === null || _c === void 0 ? void 0 : _c.appendChild(br.cloneNode());
|
|
10420
10413
|
}
|
|
10421
10414
|
};
|
|
10422
10415
|
fillFakeParent(prevFake);
|
|
@@ -10958,7 +10951,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10958
10951
|
* @param strictStyle - strict style mode - true - the element has the same style keys as in the commit, but not their values
|
|
10959
10952
|
* @private
|
|
10960
10953
|
*/ function isSuitElement(commitStyle, elm, strict, strictStyle = true) {
|
|
10961
|
-
var
|
|
10954
|
+
var _a;
|
|
10962
10955
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
10963
10956
|
return false;
|
|
10964
10957
|
}
|
|
@@ -10970,7 +10963,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10970
10963
|
if (elmIsSame && !(elementIsDefault && strict)) {
|
|
10971
10964
|
return true;
|
|
10972
10965
|
}
|
|
10973
|
-
const elmHasSameStyle = Boolean(((
|
|
10966
|
+
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)));
|
|
10974
10967
|
if (elmHasSameStyle && !commitStyle.elementIsList) {
|
|
10975
10968
|
return true;
|
|
10976
10969
|
}
|
|
@@ -10991,13 +10984,13 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10991
10984
|
* Apply `{element:'strong'}`
|
|
10992
10985
|
* @private
|
|
10993
10986
|
*/ function isSameStyleChild(commitStyle, elm) {
|
|
10994
|
-
var
|
|
10987
|
+
var _a, _b;
|
|
10995
10988
|
const { element, options } = commitStyle;
|
|
10996
10989
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
10997
10990
|
return false;
|
|
10998
10991
|
}
|
|
10999
10992
|
const elmIsSame = elm.nodeName.toLowerCase() === element;
|
|
11000
|
-
const elmHasSameStyle = Boolean(((
|
|
10993
|
+
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));
|
|
11001
10994
|
return elmIsSame && elmHasSameStyle;
|
|
11002
10995
|
}
|
|
11003
10996
|
|
|
@@ -11259,7 +11252,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11259
11252
|
/**
|
|
11260
11253
|
* Creates an iframe into which elements will be inserted to test their default styles in the browser
|
|
11261
11254
|
*/ function getShadowRoot(jodit) {
|
|
11262
|
-
var
|
|
11255
|
+
var _a;
|
|
11263
11256
|
if ((0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
|
|
11264
11257
|
return (0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
|
|
11265
11258
|
}
|
|
@@ -11273,7 +11266,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11273
11266
|
});
|
|
11274
11267
|
iframe.src = 'about:blank';
|
|
11275
11268
|
container.appendChild(iframe);
|
|
11276
|
-
const doc = (
|
|
11269
|
+
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
11277
11270
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
11278
11271
|
(0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
|
|
11279
11272
|
return shadowRoot;
|
|
@@ -11315,11 +11308,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11315
11308
|
* Unwrap all suit elements inside
|
|
11316
11309
|
* @private
|
|
11317
11310
|
*/ function unwrapChildren(style, font) {
|
|
11318
|
-
var
|
|
11311
|
+
var _a;
|
|
11319
11312
|
const needUnwrap = [];
|
|
11320
11313
|
const needChangeStyle = [];
|
|
11321
11314
|
let firstElementSuit;
|
|
11322
|
-
const cssStyle = (
|
|
11315
|
+
const cssStyle = (_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style;
|
|
11323
11316
|
if (font.firstChild) {
|
|
11324
11317
|
const gen = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.eachGen(font);
|
|
11325
11318
|
let item = gen.next();
|
|
@@ -11487,10 +11480,10 @@ const WRAP_NODES = new Set([
|
|
|
11487
11480
|
|
|
11488
11481
|
|
|
11489
11482
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
11490
|
-
var
|
|
11491
|
-
_editor_firstChild;
|
|
11483
|
+
var _a;
|
|
11492
11484
|
const { s: sel, editor } = jodit;
|
|
11493
|
-
|
|
11485
|
+
// sel.save();
|
|
11486
|
+
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
11494
11487
|
const fakes = sel.fakes();
|
|
11495
11488
|
const gen = jodit.s.wrapInTagGen(fakes);
|
|
11496
11489
|
let font = gen.next();
|
|
@@ -11550,8 +11543,8 @@ class CommitStyle {
|
|
|
11550
11543
|
return data[key];
|
|
11551
11544
|
}
|
|
11552
11545
|
setApplied(elm, key) {
|
|
11553
|
-
var
|
|
11554
|
-
const data = (
|
|
11546
|
+
var _a;
|
|
11547
|
+
const data = (_a = this.__applyMap.get(elm)) !== null && _a !== void 0 ? _a : {};
|
|
11555
11548
|
data[key] = true;
|
|
11556
11549
|
this.__applyMap.set(elm, data);
|
|
11557
11550
|
}
|
|
@@ -11884,7 +11877,7 @@ const transactions = {
|
|
|
11884
11877
|
const result = localStorage.getItem(tmpKey) === '1';
|
|
11885
11878
|
localStorage.removeItem(tmpKey);
|
|
11886
11879
|
return result;
|
|
11887
|
-
} catch (
|
|
11880
|
+
} catch (_a) {}
|
|
11888
11881
|
return false;
|
|
11889
11882
|
};
|
|
11890
11883
|
let result;
|
|
@@ -11904,13 +11897,13 @@ const transactions = {
|
|
|
11904
11897
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
11905
11898
|
json[key] = value;
|
|
11906
11899
|
localStorage.setItem(this.rootKey, JSON.stringify(json));
|
|
11907
|
-
} catch (
|
|
11900
|
+
} catch (_a) {}
|
|
11908
11901
|
return this;
|
|
11909
11902
|
}
|
|
11910
11903
|
delete(key) {
|
|
11911
11904
|
try {
|
|
11912
11905
|
localStorage.removeItem(this.rootKey);
|
|
11913
|
-
} catch (
|
|
11906
|
+
} catch (_a) {}
|
|
11914
11907
|
return this;
|
|
11915
11908
|
}
|
|
11916
11909
|
get(key) {
|
|
@@ -11918,7 +11911,7 @@ const transactions = {
|
|
|
11918
11911
|
const buffer = localStorage.getItem(this.rootKey);
|
|
11919
11912
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
11920
11913
|
return json[key] !== undefined ? json[key] : null;
|
|
11921
|
-
} catch (
|
|
11914
|
+
} catch (_a) {}
|
|
11922
11915
|
}
|
|
11923
11916
|
exists(key) {
|
|
11924
11917
|
return this.get(key) != null;
|
|
@@ -11926,7 +11919,7 @@ const transactions = {
|
|
|
11926
11919
|
clear() {
|
|
11927
11920
|
try {
|
|
11928
11921
|
localStorage.removeItem(this.rootKey);
|
|
11929
|
-
} catch (
|
|
11922
|
+
} catch (_a) {}
|
|
11930
11923
|
return this;
|
|
11931
11924
|
}
|
|
11932
11925
|
constructor(rootKey){
|
|
@@ -12187,8 +12180,8 @@ class Mods {
|
|
|
12187
12180
|
/**
|
|
12188
12181
|
* Get BEM class modification value
|
|
12189
12182
|
*/ getMod(name) {
|
|
12190
|
-
var
|
|
12191
|
-
return (
|
|
12183
|
+
var _a;
|
|
12184
|
+
return (_a = this.mods[name]) !== null && _a !== void 0 ? _a : null;
|
|
12192
12185
|
}
|
|
12193
12186
|
}
|
|
12194
12187
|
|
|
@@ -12527,7 +12520,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12527
12520
|
options.appendChild(childContainer);
|
|
12528
12521
|
}
|
|
12529
12522
|
select(indexOrValue) {
|
|
12530
|
-
var
|
|
12523
|
+
var _a, _b;
|
|
12531
12524
|
this.elements.forEach((elm, index)=>{
|
|
12532
12525
|
if (index === indexOrValue || elm.state.value === indexOrValue) {
|
|
12533
12526
|
elm.state.activated = true;
|
|
@@ -12540,13 +12533,13 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12540
12533
|
value: elm.state.value
|
|
12541
12534
|
}));
|
|
12542
12535
|
this.jodit.e.fire(this, 'select', result);
|
|
12543
|
-
(
|
|
12536
|
+
(_b = (_a = this.options).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, result);
|
|
12544
12537
|
}
|
|
12545
12538
|
constructor(jodit, options = {
|
|
12546
12539
|
radio: true
|
|
12547
12540
|
}){
|
|
12548
|
-
var
|
|
12549
|
-
super(jodit, (
|
|
12541
|
+
var _a, _b;
|
|
12542
|
+
super(jodit, (_a = options.options) === null || _a === void 0 ? void 0 : _a.map((opt)=>{
|
|
12550
12543
|
const btn = new _button_button_js__WEBPACK_IMPORTED_MODULE_1__/* .UIButton */ .lD(jodit, {
|
|
12551
12544
|
text: opt.text,
|
|
12552
12545
|
value: opt.value,
|
|
@@ -12558,8 +12551,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12558
12551
|
return btn;
|
|
12559
12552
|
}), options);
|
|
12560
12553
|
this.options = options;
|
|
12561
|
-
|
|
12562
|
-
this.select((_options_value = options.value) !== null && _options_value !== void 0 ? _options_value : 0);
|
|
12554
|
+
this.select((_b = options.value) !== null && _b !== void 0 ? _b : 0);
|
|
12563
12555
|
}
|
|
12564
12556
|
};
|
|
12565
12557
|
UIButtonGroup = __decorate([
|
|
@@ -12849,8 +12841,8 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
12849
12841
|
return this;
|
|
12850
12842
|
}
|
|
12851
12843
|
updateParentElement(target) {
|
|
12852
|
-
var
|
|
12853
|
-
(
|
|
12844
|
+
var _a;
|
|
12845
|
+
(_a = this.__parentElement) === null || _a === void 0 ? void 0 : _a.updateParentElement(target);
|
|
12854
12846
|
return this;
|
|
12855
12847
|
}
|
|
12856
12848
|
/** @override */ get(chain, obj) {
|
|
@@ -13064,11 +13056,10 @@ let UIForm = class UIForm extends _group_group_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
13064
13056
|
return form;
|
|
13065
13057
|
}
|
|
13066
13058
|
constructor(...args){
|
|
13067
|
-
var
|
|
13059
|
+
var _a, _b;
|
|
13068
13060
|
super(...args);
|
|
13069
|
-
if ((
|
|
13070
|
-
|
|
13071
|
-
this.container.classList.add((_this_options1 = this.options) === null || _this_options1 === void 0 ? void 0 : _this_options1.className);
|
|
13061
|
+
if ((_a = this.options) === null || _a === void 0 ? void 0 : _a.className) {
|
|
13062
|
+
this.container.classList.add((_b = this.options) === null || _b === void 0 ? void 0 : _b.className);
|
|
13072
13063
|
}
|
|
13073
13064
|
}
|
|
13074
13065
|
};
|
|
@@ -13433,12 +13424,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13433
13424
|
this.updateValidators();
|
|
13434
13425
|
}
|
|
13435
13426
|
updateValidators() {
|
|
13436
|
-
var
|
|
13427
|
+
var _a;
|
|
13437
13428
|
this.validators.clear();
|
|
13438
13429
|
if (this.state.required) {
|
|
13439
13430
|
this.validators.add(_validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators.required */ .O.required);
|
|
13440
13431
|
}
|
|
13441
|
-
(
|
|
13432
|
+
(_a = this.state.validators) === null || _a === void 0 ? void 0 : _a.forEach((name)=>{
|
|
13442
13433
|
const validator = _validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators */ .O[name];
|
|
13443
13434
|
validator && this.validators.add(validator);
|
|
13444
13435
|
});
|
|
@@ -13472,12 +13463,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13472
13463
|
/**
|
|
13473
13464
|
* Call on every native value changed
|
|
13474
13465
|
*/ onChangeValue() {
|
|
13466
|
+
var _a, _b;
|
|
13475
13467
|
const { value } = this;
|
|
13476
13468
|
if (this.state.value !== value) {
|
|
13477
|
-
var _this_state_onChange, _this_state;
|
|
13478
13469
|
this.state.value = value;
|
|
13479
13470
|
this.j.e.fire(this, 'change', value);
|
|
13480
|
-
(
|
|
13471
|
+
(_b = (_a = this.state).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
13481
13472
|
}
|
|
13482
13473
|
}
|
|
13483
13474
|
validate() {
|
|
@@ -13487,14 +13478,13 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13487
13478
|
return validate;
|
|
13488
13479
|
}
|
|
13489
13480
|
__markInputInvalid() {
|
|
13481
|
+
var _a, _b, _c, _d;
|
|
13490
13482
|
if (this.error) {
|
|
13491
|
-
var _this_nativeInput_setCustomValidity, _this_nativeInput;
|
|
13492
13483
|
this.nativeInput.setAttribute('aria-invalid', 'true');
|
|
13493
|
-
(
|
|
13484
|
+
(_b = (_a = this.nativeInput).setCustomValidity) === null || _b === void 0 ? void 0 : _b.call(_a, this.error);
|
|
13494
13485
|
} else {
|
|
13495
|
-
var _this_nativeInput_setCustomValidity1, _this_nativeInput1;
|
|
13496
13486
|
this.nativeInput.removeAttribute('aria-invalid');
|
|
13497
|
-
(
|
|
13487
|
+
(_d = (_c = this.nativeInput).setCustomValidity) === null || _d === void 0 ? void 0 : _d.call(_c, '');
|
|
13498
13488
|
}
|
|
13499
13489
|
}
|
|
13500
13490
|
/** @override **/ createContainer(options) {
|
|
@@ -13635,7 +13625,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
13635
13625
|
return 'UISelect';
|
|
13636
13626
|
}
|
|
13637
13627
|
/** @override **/ createContainer(state) {
|
|
13638
|
-
var
|
|
13628
|
+
var _a;
|
|
13639
13629
|
const container = super.createContainer(state);
|
|
13640
13630
|
const { j } = this, { nativeInput } = this;
|
|
13641
13631
|
const opt = ()=>j.create.element('option');
|
|
@@ -13645,7 +13635,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
13645
13635
|
option.text = j.i18n(state.placeholder);
|
|
13646
13636
|
nativeInput.add(option);
|
|
13647
13637
|
}
|
|
13648
|
-
(
|
|
13638
|
+
(_a = state.options) === null || _a === void 0 ? void 0 : _a.forEach((element)=>{
|
|
13649
13639
|
const option = opt();
|
|
13650
13640
|
option.value = element.value.toString();
|
|
13651
13641
|
option.text = j.i18n(element.text);
|
|
@@ -14058,8 +14048,8 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_3__/* .UIGr
|
|
|
14058
14048
|
}
|
|
14059
14049
|
};
|
|
14060
14050
|
const isNotRemoved = (b)=>{
|
|
14061
|
-
var
|
|
14062
|
-
return !this.removeButtons.includes(b.name) && (!b.isVisible || ((
|
|
14051
|
+
var _a;
|
|
14052
|
+
return !this.removeButtons.includes(b.name) && (!b.isVisible || ((_a = b.isVisible) === null || _a === void 0 ? void 0 : _a.call(b, this.j, b)));
|
|
14063
14053
|
};
|
|
14064
14054
|
items.forEach((item)=>{
|
|
14065
14055
|
if ((0,_helpers_buttons_js__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item)) {
|
|
@@ -14203,11 +14193,11 @@ UISpacer = __decorate([
|
|
|
14203
14193
|
*/ function flatButtonsSet(buttons, jodit) {
|
|
14204
14194
|
const groups = jodit.getRegisteredButtonGroups();
|
|
14205
14195
|
return new Set(buttons.reduce((acc, item)=>{
|
|
14196
|
+
var _a;
|
|
14206
14197
|
if (isButtonGroup(item)) {
|
|
14207
|
-
var _groups_item_group;
|
|
14208
14198
|
acc = acc.concat([
|
|
14209
14199
|
...item.buttons,
|
|
14210
|
-
...(
|
|
14200
|
+
...(_a = groups[item.group]) !== null && _a !== void 0 ? _a : []
|
|
14211
14201
|
]);
|
|
14212
14202
|
} else {
|
|
14213
14203
|
acc.push(item);
|
|
@@ -14364,6 +14354,7 @@ class Icon {
|
|
|
14364
14354
|
/**
|
|
14365
14355
|
* Make icon html element
|
|
14366
14356
|
*/ static makeIcon(jodit, icon) {
|
|
14357
|
+
var _a, _b, _c, _d;
|
|
14367
14358
|
if (!icon) {
|
|
14368
14359
|
return;
|
|
14369
14360
|
}
|
|
@@ -14372,20 +14363,17 @@ class Icon {
|
|
|
14372
14363
|
const clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
14373
14364
|
let iconFromEvent;
|
|
14374
14365
|
if (!/<svg/.test(name)) {
|
|
14375
|
-
|
|
14376
|
-
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);
|
|
14366
|
+
iconFromEvent = (_b = (_a = jodit.o).getIcon) === null || _b === void 0 ? void 0 : _b.call(_a, name, clearName);
|
|
14377
14367
|
}
|
|
14378
14368
|
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ''}`;
|
|
14379
14369
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
14380
|
-
|
|
14381
|
-
return (_this___cache_get = this.__cache.get(cacheKey)) === null || _this___cache_get === void 0 ? void 0 : _this___cache_get.cloneNode(true);
|
|
14370
|
+
return (_c = this.__cache.get(cacheKey)) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
|
|
14382
14371
|
}
|
|
14383
14372
|
if (iconURL) {
|
|
14384
14373
|
iconElement = jodit.c.span();
|
|
14385
14374
|
(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) || '') + ')');
|
|
14386
14375
|
} else {
|
|
14387
|
-
|
|
14388
|
-
const svg = iconFromEvent || Icon.get(name, '') || ((_jodit_o_extraIcons = jodit.o.extraIcons) === null || _jodit_o_extraIcons === void 0 ? void 0 : _jodit_o_extraIcons[name]);
|
|
14376
|
+
const svg = iconFromEvent || Icon.get(name, '') || ((_d = jodit.o.extraIcons) === null || _d === void 0 ? void 0 : _d[name]);
|
|
14389
14377
|
if (svg) {
|
|
14390
14378
|
iconElement = jodit.c.fromHTML(svg.trim());
|
|
14391
14379
|
if (!/^<svg/i.test(name)) {
|
|
@@ -14903,12 +14891,12 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14903
14891
|
/**
|
|
14904
14892
|
* Helper for appended toolbar in its place
|
|
14905
14893
|
*/ buildToolbar() {
|
|
14906
|
-
var
|
|
14894
|
+
var _a;
|
|
14907
14895
|
if (!this.o.toolbar) {
|
|
14908
14896
|
return;
|
|
14909
14897
|
}
|
|
14910
14898
|
const buttons = this.o.buttons ? (0,_helpers_array_index_js__WEBPACK_IMPORTED_MODULE_3__/* .splitArray */ .uM)(this.o.buttons) : [];
|
|
14911
|
-
(
|
|
14899
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.setRemoveButtons(this.o.removeButtons).build(buttons.concat(this.o.extraButtons || [])).appendTo(this.toolbarContainer);
|
|
14912
14900
|
}
|
|
14913
14901
|
getRegisteredButtonGroups() {
|
|
14914
14902
|
return this.groupToButtons;
|
|
@@ -14916,9 +14904,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14916
14904
|
/**
|
|
14917
14905
|
* Register button for a group
|
|
14918
14906
|
*/ registerButton(btn) {
|
|
14907
|
+
var _a;
|
|
14919
14908
|
this.registeredButtons.add(btn);
|
|
14920
|
-
|
|
14921
|
-
const group = (_btn_group = btn.group) !== null && _btn_group !== void 0 ? _btn_group : 'other';
|
|
14909
|
+
const group = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other';
|
|
14922
14910
|
if (!this.groupToButtons[group]) {
|
|
14923
14911
|
this.groupToButtons[group] = [];
|
|
14924
14912
|
}
|
|
@@ -14932,9 +14920,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14932
14920
|
/**
|
|
14933
14921
|
* Remove button from a group
|
|
14934
14922
|
*/ unregisterButton(btn) {
|
|
14923
|
+
var _a;
|
|
14935
14924
|
this.registeredButtons.delete(btn);
|
|
14936
|
-
|
|
14937
|
-
const groupName = (_btn_group = btn.group) !== null && _btn_group !== void 0 ? _btn_group : 'other', group = this.groupToButtons[groupName];
|
|
14925
|
+
const groupName = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other', group = this.groupToButtons[groupName];
|
|
14938
14926
|
if (group) {
|
|
14939
14927
|
const index = group.indexOf(btn.name);
|
|
14940
14928
|
if (index !== -1) {
|
|
@@ -15170,8 +15158,8 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15170
15158
|
/**
|
|
15171
15159
|
* Can change ownerWindow here
|
|
15172
15160
|
*/ initOwners() {
|
|
15173
|
-
var
|
|
15174
|
-
this.ownerWindow = (
|
|
15161
|
+
var _a;
|
|
15162
|
+
this.ownerWindow = (_a = this.o.ownerWindow) !== null && _a !== void 0 ? _a : window;
|
|
15175
15163
|
}
|
|
15176
15164
|
/**
|
|
15177
15165
|
* Add option's event handlers in emitter
|
|
@@ -15214,18 +15202,18 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15214
15202
|
this.components.clear();
|
|
15215
15203
|
}
|
|
15216
15204
|
/** @override */ destruct() {
|
|
15217
|
-
var
|
|
15205
|
+
var _a, _b, _c;
|
|
15218
15206
|
if (this.isDestructed) {
|
|
15219
15207
|
return;
|
|
15220
15208
|
}
|
|
15221
|
-
(
|
|
15222
|
-
(
|
|
15209
|
+
(_a = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'progressbar')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
15210
|
+
(_b = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'message')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
15223
15211
|
if (this.events) {
|
|
15224
15212
|
this.events.destruct();
|
|
15225
15213
|
// @ts-ignore
|
|
15226
15214
|
this.events = undefined;
|
|
15227
15215
|
}
|
|
15228
|
-
(
|
|
15216
|
+
(_c = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'buffer')) === null || _c === void 0 ? void 0 : _c.clear();
|
|
15229
15217
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_7__/* .Dom */ .J.safeRemove(this.container);
|
|
15230
15218
|
super.destruct();
|
|
15231
15219
|
}
|
|
@@ -15343,10 +15331,10 @@ Object.keys(_styles_icons_index_js__WEBPACK_IMPORTED_MODULE_7__).filter(esFilter
|
|
|
15343
15331
|
});
|
|
15344
15332
|
// Modules
|
|
15345
15333
|
Object.keys(_modules_index_js__WEBPACK_IMPORTED_MODULE_4__).filter(esFilter).forEach((key)=>{
|
|
15346
|
-
var
|
|
15334
|
+
var _a;
|
|
15347
15335
|
// @ts-ignore
|
|
15348
15336
|
const module = _modules_index_js__WEBPACK_IMPORTED_MODULE_4__[key];
|
|
15349
|
-
const name = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)((
|
|
15337
|
+
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;
|
|
15350
15338
|
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
|
|
15351
15339
|
console.warn('Module name must be a string', key);
|
|
15352
15340
|
return;
|
|
@@ -16285,7 +16273,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16285
16273
|
// if enter plugin isn't installed
|
|
16286
16274
|
try {
|
|
16287
16275
|
this.ed.execCommand('defaultParagraphSeparator', false, this.o.enter.toLowerCase());
|
|
16288
|
-
} catch (
|
|
16276
|
+
} catch (_a) {}
|
|
16289
16277
|
});
|
|
16290
16278
|
}
|
|
16291
16279
|
/**
|
|
@@ -16371,14 +16359,14 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16371
16359
|
/**
|
|
16372
16360
|
* Jodit's Destructor. Remove editor, and return source input
|
|
16373
16361
|
*/ destruct() {
|
|
16374
|
-
var
|
|
16362
|
+
var _a, _b;
|
|
16375
16363
|
if (this.isInDestruct) {
|
|
16376
16364
|
return;
|
|
16377
16365
|
}
|
|
16378
16366
|
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_7__.STATUSES.beforeDestruct);
|
|
16379
16367
|
this.__elementToPlace.clear();
|
|
16380
|
-
(
|
|
16381
|
-
(
|
|
16368
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')) === null || _a === void 0 ? void 0 : _a.clear();
|
|
16369
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')) === null || _b === void 0 ? void 0 : _b.clear();
|
|
16382
16370
|
this.commands.clear();
|
|
16383
16371
|
this.__selectionLocked = null;
|
|
16384
16372
|
this.e.off(this.ow, 'resize');
|
|
@@ -21440,8 +21428,8 @@ Object.keys(exp).forEach((lang)=>{
|
|
|
21440
21428
|
this.jodit && action.setParentView(this.jodit);
|
|
21441
21429
|
action.setMod('context', 'menu');
|
|
21442
21430
|
action.onAction((e)=>{
|
|
21443
|
-
var
|
|
21444
|
-
(
|
|
21431
|
+
var _a;
|
|
21432
|
+
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
21445
21433
|
self.clear();
|
|
21446
21434
|
self.close();
|
|
21447
21435
|
return false;
|
|
@@ -22377,7 +22365,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
22377
22365
|
const image = self.c.element('img');
|
|
22378
22366
|
image.setAttribute('src', src);
|
|
22379
22367
|
const onload = ()=>{
|
|
22380
|
-
var
|
|
22368
|
+
var _a;
|
|
22381
22369
|
if (self.isInDestruct) {
|
|
22382
22370
|
return;
|
|
22383
22371
|
}
|
|
@@ -22394,7 +22382,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
22394
22382
|
temp_content.appendChild(preview_box);
|
|
22395
22383
|
preview_box.appendChild(image);
|
|
22396
22384
|
preview.setPosition();
|
|
22397
|
-
self === null || self === void 0 ? void 0 :
|
|
22385
|
+
(_a = self === null || self === void 0 ? void 0 : self.events) === null || _a === void 0 ? void 0 : _a.fire('previewOpenedAndLoaded');
|
|
22398
22386
|
};
|
|
22399
22387
|
self.e.on(image, 'load', onload);
|
|
22400
22388
|
if (image.complete) {
|
|
@@ -23056,8 +23044,8 @@ let DataProvider = class DataProvider {
|
|
|
23056
23044
|
const elements = [];
|
|
23057
23045
|
const canBeFile = (item)=>item.type === 'folder' || !mods.onlyImages || item.isImage === undefined || item.isImage;
|
|
23058
23046
|
const inFilter = (item)=>{
|
|
23059
|
-
var
|
|
23060
|
-
return !((
|
|
23047
|
+
var _a;
|
|
23048
|
+
return !((_a = mods.filterWord) === null || _a === void 0 ? void 0 : _a.length) || this.o.filter === undefined || this.o.filter(item, mods.filterWord);
|
|
23061
23049
|
};
|
|
23062
23050
|
sources.forEach((source)=>{
|
|
23063
23051
|
if (source.files && source.files.length) {
|
|
@@ -23486,11 +23474,11 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23486
23474
|
};
|
|
23487
23475
|
}
|
|
23488
23476
|
get _dialog() {
|
|
23489
|
-
var
|
|
23477
|
+
var _a;
|
|
23490
23478
|
const dialog = this.dlg({
|
|
23491
23479
|
minWidth: Math.min(700, screen.width),
|
|
23492
23480
|
minHeight: 300,
|
|
23493
|
-
buttons: (
|
|
23481
|
+
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : [
|
|
23494
23482
|
'fullsize',
|
|
23495
23483
|
'dialog.close'
|
|
23496
23484
|
]
|
|
@@ -23551,7 +23539,7 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23551
23539
|
*/ open(callback = this.o.defaultCallback, onlyImages = false) {
|
|
23552
23540
|
this.state.onlyImages = onlyImages;
|
|
23553
23541
|
return this.async.promise((resolve, reject)=>{
|
|
23554
|
-
var
|
|
23542
|
+
var _a;
|
|
23555
23543
|
if (!this.o.items || !this.o.items.url) {
|
|
23556
23544
|
throw (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
23557
23545
|
}
|
|
@@ -23564,16 +23552,16 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23564
23552
|
localTimeout = now;
|
|
23565
23553
|
}).off('select.filebrowser').on('select.filebrowser', this.onSelect(callback));
|
|
23566
23554
|
const header = this.c.div();
|
|
23567
|
-
(
|
|
23555
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
23568
23556
|
this.__updateToolbarButtons();
|
|
23569
23557
|
this._dialog.open(this.browser, header);
|
|
23570
23558
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
23571
23559
|
(0,_fetch_load_tree_js__WEBPACK_IMPORTED_MODULE_11__/* .loadTree */ .r)(this).then(resolve, reject).finally(()=>{
|
|
23572
|
-
var
|
|
23560
|
+
var _a;
|
|
23573
23561
|
if (this.isInDestruct) {
|
|
23574
23562
|
return;
|
|
23575
23563
|
}
|
|
23576
|
-
(
|
|
23564
|
+
(_a = this === null || this === void 0 ? void 0 : this.e) === null || _a === void 0 ? void 0 : _a.fire('fileBrowserReady.filebrowser');
|
|
23577
23565
|
});
|
|
23578
23566
|
}).catch((e)=>{
|
|
23579
23567
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -23582,8 +23570,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23582
23570
|
});
|
|
23583
23571
|
}
|
|
23584
23572
|
__getButtons() {
|
|
23585
|
-
var
|
|
23586
|
-
const options = (
|
|
23573
|
+
var _a;
|
|
23574
|
+
const options = (_a = this.o.buttons) !== null && _a !== void 0 ? _a : [];
|
|
23587
23575
|
return options.filter((btn)=>{
|
|
23588
23576
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
23589
23577
|
return true;
|
|
@@ -23600,8 +23588,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23600
23588
|
});
|
|
23601
23589
|
}
|
|
23602
23590
|
initUploader(editor) {
|
|
23603
|
-
var
|
|
23604
|
-
const self = this, options = editor === null || editor === void 0 ? void 0 :
|
|
23591
|
+
var _a;
|
|
23592
|
+
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);
|
|
23605
23593
|
const uploadHandler = ()=>(0,_fetch_load_items_js__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
23606
23594
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
23607
23595
|
self.uploader.setPath(self.state.currentPath).setSource(self.state.currentSource).bind(self.browser, uploadHandler, self.errorHandler);
|
|
@@ -23616,23 +23604,23 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23616
23604
|
});
|
|
23617
23605
|
}
|
|
23618
23606
|
destruct() {
|
|
23619
|
-
var
|
|
23607
|
+
var _a;
|
|
23620
23608
|
if (this.isInDestruct) {
|
|
23621
23609
|
return;
|
|
23622
23610
|
}
|
|
23623
|
-
(
|
|
23611
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '_dialog')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
23624
23612
|
super.destruct();
|
|
23625
23613
|
this.events && this.e.off('.filebrowser');
|
|
23626
23614
|
this.uploader && this.uploader.destruct();
|
|
23627
23615
|
}
|
|
23628
23616
|
__updateToolbarButtons() {
|
|
23629
|
-
var
|
|
23617
|
+
var _a;
|
|
23630
23618
|
const buttons = this.__getButtons();
|
|
23631
23619
|
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
23632
23620
|
return;
|
|
23633
23621
|
}
|
|
23634
23622
|
this.__prevButtons = buttons;
|
|
23635
|
-
(
|
|
23623
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
23636
23624
|
}
|
|
23637
23625
|
constructor(options){
|
|
23638
23626
|
super(options);
|
|
@@ -24365,8 +24353,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.history = {
|
|
|
24365
24353
|
}
|
|
24366
24354
|
}
|
|
24367
24355
|
fireChangeStack() {
|
|
24368
|
-
var
|
|
24369
|
-
this.j && !this.j.isInDestruct && ((
|
|
24356
|
+
var _a;
|
|
24357
|
+
this.j && !this.j.isInDestruct && ((_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('changeStack'));
|
|
24370
24358
|
}
|
|
24371
24359
|
destruct() {
|
|
24372
24360
|
if (this.isInDestruct) {
|
|
@@ -25728,9 +25716,8 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
25728
25716
|
/**
|
|
25729
25717
|
* Height of statusbar
|
|
25730
25718
|
*/ getHeight() {
|
|
25731
|
-
var
|
|
25732
|
-
|
|
25733
|
-
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;
|
|
25719
|
+
var _a, _b;
|
|
25720
|
+
return (_b = (_a = this.container) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
25734
25721
|
}
|
|
25735
25722
|
findEmpty(inTheRight = false) {
|
|
25736
25723
|
const items = this.getElms(inTheRight ? 'item-right' : 'item');
|
|
@@ -25744,13 +25731,13 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
25744
25731
|
/**
|
|
25745
25732
|
* Add element in statusbar
|
|
25746
25733
|
*/ append(child, inTheRight = false) {
|
|
25747
|
-
var
|
|
25734
|
+
var _a;
|
|
25748
25735
|
const wrapper = this.findEmpty(inTheRight) || this.j.c.div(this.getFullElName('item'));
|
|
25749
25736
|
if (inTheRight) {
|
|
25750
25737
|
wrapper.classList.add(this.getFullElName('item-right'));
|
|
25751
25738
|
}
|
|
25752
25739
|
wrapper.appendChild(child);
|
|
25753
|
-
(
|
|
25740
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.appendChild(wrapper);
|
|
25754
25741
|
if (this.j.o.statusbar) {
|
|
25755
25742
|
this.show();
|
|
25756
25743
|
}
|
|
@@ -25949,6 +25936,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
25949
25936
|
return Table.__formalCoordinate(table, cell, max);
|
|
25950
25937
|
}
|
|
25951
25938
|
static __appendRow(table, line, after, create) {
|
|
25939
|
+
var _a;
|
|
25952
25940
|
let row;
|
|
25953
25941
|
if (!line) {
|
|
25954
25942
|
const columnsCount = Table.__getColumnsCount(table);
|
|
@@ -25974,8 +25962,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
25974
25962
|
} else if (!after && line) {
|
|
25975
25963
|
line.parentNode && line.parentNode.insertBefore(row, line);
|
|
25976
25964
|
} else {
|
|
25977
|
-
|
|
25978
|
-
(((_table_getElementsByTagName = table.getElementsByTagName('tbody')) === null || _table_getElementsByTagName === void 0 ? void 0 : _table_getElementsByTagName[0]) || table).appendChild(row);
|
|
25965
|
+
(((_a = table.getElementsByTagName('tbody')) === null || _a === void 0 ? void 0 : _a[0]) || table).appendChild(row);
|
|
25979
25966
|
}
|
|
25980
25967
|
}
|
|
25981
25968
|
/**
|
|
@@ -26388,9 +26375,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
26388
26375
|
return Table.__setColumnWidthByDelta(table, column, delta, noUnmark, marked);
|
|
26389
26376
|
}
|
|
26390
26377
|
static __mark(cell, key, value, marked) {
|
|
26378
|
+
var _a;
|
|
26391
26379
|
marked.push(cell);
|
|
26392
|
-
|
|
26393
|
-
const dict = (_markedValue_get = markedValue.get(cell)) !== null && _markedValue_get !== void 0 ? _markedValue_get : {};
|
|
26380
|
+
const dict = (_a = markedValue.get(cell)) !== null && _a !== void 0 ? _a : {};
|
|
26394
26381
|
dict[key] = value === undefined ? 1 : value;
|
|
26395
26382
|
markedValue.set(cell, dict);
|
|
26396
26383
|
}
|
|
@@ -26487,27 +26474,27 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26487
26474
|
return this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
26488
26475
|
}
|
|
26489
26476
|
/** @override **/ update() {
|
|
26490
|
-
var
|
|
26477
|
+
var _a, _b;
|
|
26491
26478
|
const { control, state } = this, tc = this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
26492
26479
|
if (!tc) {
|
|
26493
26480
|
return;
|
|
26494
26481
|
}
|
|
26495
|
-
const value = (
|
|
26482
|
+
const value = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, tc.jodit, this);
|
|
26496
26483
|
if (value !== undefined) {
|
|
26497
26484
|
state.value = value;
|
|
26498
26485
|
}
|
|
26499
26486
|
state.disabled = this.__calculateDisabledStatus(tc);
|
|
26500
26487
|
state.activated = this.__calculateActivatedStatus(tc);
|
|
26501
|
-
(
|
|
26488
|
+
(_b = control.update) === null || _b === void 0 ? void 0 : _b.call(control, tc.jodit, this);
|
|
26502
26489
|
}
|
|
26503
26490
|
/**
|
|
26504
26491
|
* Calculates whether the button is active
|
|
26505
26492
|
*/ __calculateActivatedStatus(tc) {
|
|
26506
|
-
var
|
|
26493
|
+
var _a, _b;
|
|
26507
26494
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isJoditObject)(this.j) && !this.j.editorIsActive) {
|
|
26508
26495
|
return false;
|
|
26509
26496
|
}
|
|
26510
|
-
if ((
|
|
26497
|
+
if ((_b = (_a = this.control).isActive) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
26511
26498
|
return true;
|
|
26512
26499
|
}
|
|
26513
26500
|
return Boolean(tc && tc.shouldBeActive(this));
|
|
@@ -26515,14 +26502,14 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26515
26502
|
/**
|
|
26516
26503
|
* Calculates whether an element is blocked for the user
|
|
26517
26504
|
*/ __calculateDisabledStatus(tc) {
|
|
26518
|
-
var
|
|
26505
|
+
var _a, _b;
|
|
26519
26506
|
if (this.j.o.disabled) {
|
|
26520
26507
|
return true;
|
|
26521
26508
|
}
|
|
26522
26509
|
if (this.j.o.readonly && (!this.j.o.activeButtonsInReadOnly || !this.j.o.activeButtonsInReadOnly.includes(this.control.name))) {
|
|
26523
26510
|
return true;
|
|
26524
26511
|
}
|
|
26525
|
-
if ((
|
|
26512
|
+
if ((_b = (_a = this.control).isDisabled) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
26526
26513
|
return true;
|
|
26527
26514
|
}
|
|
26528
26515
|
return Boolean(tc && tc.shouldBeDisabled(this));
|
|
@@ -26559,8 +26546,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26559
26546
|
return container;
|
|
26560
26547
|
}
|
|
26561
26548
|
/** @override */ focus() {
|
|
26562
|
-
var
|
|
26563
|
-
(
|
|
26549
|
+
var _a;
|
|
26550
|
+
(_a = this.container.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
26564
26551
|
}
|
|
26565
26552
|
onChangeHasTrigger() {
|
|
26566
26553
|
if (this.state.hasTrigger) {
|
|
@@ -26579,6 +26566,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26579
26566
|
/**
|
|
26580
26567
|
* Init constant data from control
|
|
26581
26568
|
*/ __initFromControl() {
|
|
26569
|
+
var _a;
|
|
26582
26570
|
const { control: ctr, state } = this;
|
|
26583
26571
|
this.updateSize();
|
|
26584
26572
|
state.name = ctr.name;
|
|
@@ -26590,9 +26578,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26590
26578
|
if (ctr.iconURL) {
|
|
26591
26579
|
state.icon.iconURL = ctr.iconURL;
|
|
26592
26580
|
} else {
|
|
26593
|
-
var _this_j_o_extraIcons;
|
|
26594
26581
|
const name = ctr.icon || ctr.name;
|
|
26595
|
-
state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_6__/* .Icon */ .I.exists(name) || ((
|
|
26582
|
+
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 : '';
|
|
26596
26583
|
}
|
|
26597
26584
|
if (!ctr.iconURL && !state.icon.name) {
|
|
26598
26585
|
state.text = ctr.text || ctr.name;
|
|
@@ -26606,6 +26593,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26606
26593
|
/**
|
|
26607
26594
|
* Click on trigger button
|
|
26608
26595
|
*/ onTriggerClick(e) {
|
|
26596
|
+
var _a, _b, _c;
|
|
26609
26597
|
if (this.openedPopup) {
|
|
26610
26598
|
this.__closePopup();
|
|
26611
26599
|
return;
|
|
@@ -26622,9 +26610,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26622
26610
|
popup.parentElement = this;
|
|
26623
26611
|
try {
|
|
26624
26612
|
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) {
|
|
26625
|
-
|
|
26626
|
-
var _this_toolbar_getTarget, _ref;
|
|
26627
|
-
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;
|
|
26613
|
+
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;
|
|
26628
26614
|
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
26629
26615
|
if (elm) {
|
|
26630
26616
|
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);
|
|
@@ -26646,8 +26632,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26646
26632
|
/**
|
|
26647
26633
|
* Create an open popup list
|
|
26648
26634
|
*/ __openControlList(control) {
|
|
26649
|
-
var
|
|
26650
|
-
const controls = (
|
|
26635
|
+
var _a;
|
|
26636
|
+
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);
|
|
26651
26637
|
const list = control.list, menu = this.openPopup(), toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_9__/* .makeCollection */ .$K)(this.j);
|
|
26652
26638
|
menu.parentElement = this;
|
|
26653
26639
|
toolbar.parentElement = menu;
|
|
@@ -26676,8 +26662,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26676
26662
|
name: key.toString(),
|
|
26677
26663
|
template: childTemplate && ((j, k, v)=>childTemplate(j, k, v, this)),
|
|
26678
26664
|
exec: control.childExec ? (view, current, options)=>{
|
|
26679
|
-
var
|
|
26680
|
-
return (
|
|
26665
|
+
var _a;
|
|
26666
|
+
return (_a = control.childExec) === null || _a === void 0 ? void 0 : _a.call(control, view, current, {
|
|
26681
26667
|
...options,
|
|
26682
26668
|
parentControl: control
|
|
26683
26669
|
});
|
|
@@ -26729,11 +26715,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26729
26715
|
/**
|
|
26730
26716
|
* Click handler
|
|
26731
26717
|
*/ onClick(originalEvent) {
|
|
26718
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
26732
26719
|
const { control: ctr } = this;
|
|
26733
26720
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.exec)) {
|
|
26734
|
-
|
|
26735
|
-
var _this_toolbar_getTarget, _ref;
|
|
26736
|
-
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;
|
|
26721
|
+
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;
|
|
26737
26722
|
const result = ctr.exec(this.j, target, {
|
|
26738
26723
|
control: ctr,
|
|
26739
26724
|
originalEvent,
|
|
@@ -26741,14 +26726,13 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26741
26726
|
});
|
|
26742
26727
|
// For memorise exec
|
|
26743
26728
|
if (result !== false && result !== true) {
|
|
26744
|
-
|
|
26745
|
-
* Fired after calling `button.exec` function
|
|
26746
|
-
*/ _this_j_e1, _this_j1;
|
|
26747
|
-
(_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');
|
|
26729
|
+
(_e = (_d = this.j) === null || _d === void 0 ? void 0 : _d.e) === null || _e === void 0 ? void 0 : _e.fire('synchro');
|
|
26748
26730
|
if (this.parentElement) {
|
|
26749
26731
|
this.parentElement.update();
|
|
26750
26732
|
}
|
|
26751
|
-
|
|
26733
|
+
/**
|
|
26734
|
+
* Fired after calling `button.exec` function
|
|
26735
|
+
*/ (_g = (_f = this.j) === null || _f === void 0 ? void 0 : _f.e) === null || _g === void 0 ? void 0 : _g.fire('closeAllPopups afterExec');
|
|
26752
26736
|
}
|
|
26753
26737
|
if (result !== false) {
|
|
26754
26738
|
return;
|
|
@@ -26941,19 +26925,18 @@ let ToolbarSelect = class ToolbarSelect extends _button_js__WEBPACK_IMPORTED_MOD
|
|
|
26941
26925
|
return 'ToolbarSelect';
|
|
26942
26926
|
}
|
|
26943
26927
|
update() {
|
|
26928
|
+
var _a, _b, _c;
|
|
26944
26929
|
super.update();
|
|
26945
26930
|
this.state.icon.name = '';
|
|
26946
26931
|
const { list, data } = this.control;
|
|
26947
26932
|
if (list) {
|
|
26948
|
-
var _this_control_textTemplate, _this_control;
|
|
26949
26933
|
let key = this.state.value || (data && (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_2__/* .isString */ .K)(data.currentValue) ? data.currentValue : undefined);
|
|
26950
26934
|
if (!key) {
|
|
26951
26935
|
const keys = Object.keys(list);
|
|
26952
26936
|
key = keys[0];
|
|
26953
26937
|
}
|
|
26954
26938
|
const text = ((0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isPlainObject */ .Q)(list) ? list[key.toString()] || key : key).toString();
|
|
26955
|
-
|
|
26956
|
-
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;
|
|
26939
|
+
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;
|
|
26957
26940
|
}
|
|
26958
26941
|
}
|
|
26959
26942
|
};
|
|
@@ -27898,7 +27881,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .
|
|
|
27898
27881
|
instances.forEach((ajax)=>{
|
|
27899
27882
|
try {
|
|
27900
27883
|
ajax.destruct();
|
|
27901
|
-
} catch (
|
|
27884
|
+
} catch (_a) {}
|
|
27902
27885
|
});
|
|
27903
27886
|
instances.clear();
|
|
27904
27887
|
}
|
|
@@ -28691,9 +28674,9 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', _enter_
|
|
|
28691
28674
|
});
|
|
28692
28675
|
}
|
|
28693
28676
|
/** @override */ beforeDestruct(_) {
|
|
28694
|
-
var
|
|
28695
|
-
(
|
|
28696
|
-
(
|
|
28677
|
+
var _a, _b;
|
|
28678
|
+
(_a = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__container')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
28679
|
+
(_b = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
28697
28680
|
}
|
|
28698
28681
|
constructor(jodit){
|
|
28699
28682
|
super(jodit);
|
|
@@ -29208,13 +29191,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__/* .Pl
|
|
|
29208
29191
|
/**
|
|
29209
29192
|
* Remove node and replace cursor position out of it
|
|
29210
29193
|
*/ safeRemoveEmptyNode(fakeNode) {
|
|
29194
|
+
var _a, _b;
|
|
29211
29195
|
const { range } = this.j.s;
|
|
29212
29196
|
if (range.startContainer === fakeNode) {
|
|
29213
29197
|
if (fakeNode.previousSibling) {
|
|
29214
29198
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(fakeNode.previousSibling)) {
|
|
29215
|
-
|
|
29216
|
-
var _fakeNode_previousSibling_nodeValue_length;
|
|
29217
|
-
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);
|
|
29199
|
+
range.setStart(fakeNode.previousSibling, (_b = (_a = fakeNode.previousSibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
29218
29200
|
} else {
|
|
29219
29201
|
range.setStartAfter(fakeNode.previousSibling);
|
|
29220
29202
|
}
|
|
@@ -29418,6 +29400,7 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
29418
29400
|
* @private
|
|
29419
29401
|
*/ // eslint-disable-next-line complexity
|
|
29420
29402
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
29403
|
+
var _a, _b;
|
|
29421
29404
|
const step = backspace ? -1 : 1;
|
|
29422
29405
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
29423
29406
|
let sibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
@@ -29428,20 +29411,19 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
29428
29411
|
sibling = getNextInlineSibling(fakeNode, backspace, jodit.editor);
|
|
29429
29412
|
}
|
|
29430
29413
|
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))){
|
|
29431
|
-
var _sibling_nodeValue, _sibling_nodeValue1;
|
|
29432
29414
|
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)){
|
|
29433
29415
|
sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
|
|
29434
29416
|
}
|
|
29435
29417
|
if (!sibling) {
|
|
29436
29418
|
break;
|
|
29437
29419
|
}
|
|
29438
|
-
if ((
|
|
29420
|
+
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
29439
29421
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
29440
29422
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling.parentNode)) {
|
|
29441
29423
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
29442
29424
|
}
|
|
29443
29425
|
}
|
|
29444
|
-
if (!((
|
|
29426
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
29445
29427
|
removeNeighbor = sibling;
|
|
29446
29428
|
}
|
|
29447
29429
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
@@ -29525,8 +29507,8 @@ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
|
29525
29507
|
return removed;
|
|
29526
29508
|
}
|
|
29527
29509
|
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
29528
|
-
var
|
|
29529
|
-
if (!anotherSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(anotherSibling) || (!backspace ? / $/ : /^ /).test((
|
|
29510
|
+
var _a;
|
|
29511
|
+
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) {
|
|
29530
29512
|
for(let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1){
|
|
29531
29513
|
if (value[i] === ' ') {
|
|
29532
29514
|
value[i] = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
@@ -29798,10 +29780,10 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
29798
29780
|
*
|
|
29799
29781
|
* @private
|
|
29800
29782
|
*/ function checkUnwrapFirstListItem(jodit, fakeNode, backspace) {
|
|
29801
|
-
var
|
|
29783
|
+
var _a;
|
|
29802
29784
|
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);
|
|
29803
29785
|
const { s } = jodit;
|
|
29804
|
-
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isLeaf(li) && (li === null || li === void 0 ? void 0 :
|
|
29786
|
+
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)) {
|
|
29805
29787
|
const ul = li.parentElement;
|
|
29806
29788
|
const p = jodit.createInside.element(jodit.o.enterBlock);
|
|
29807
29789
|
(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);
|
|
@@ -31015,10 +30997,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
31015
30997
|
* Clipboard plugin - cut and copy functionality
|
|
31016
30998
|
*/ class clipboard {
|
|
31017
30999
|
init(editor) {
|
|
31018
|
-
var
|
|
31019
|
-
(
|
|
31000
|
+
var _a;
|
|
31001
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>editor.registerButton(btn));
|
|
31020
31002
|
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)=>{
|
|
31021
|
-
var
|
|
31003
|
+
var _a;
|
|
31022
31004
|
const selectedText = editor.s.html;
|
|
31023
31005
|
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);
|
|
31024
31006
|
if (clipboardData) {
|
|
@@ -31035,13 +31017,13 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
31035
31017
|
editor.s.focus();
|
|
31036
31018
|
}
|
|
31037
31019
|
event.preventDefault();
|
|
31038
|
-
editor === null || editor === void 0 ? void 0 :
|
|
31020
|
+
(_a = editor === null || editor === void 0 ? void 0 : editor.events) === null || _a === void 0 ? void 0 : _a.fire('afterCopy', selectedText);
|
|
31039
31021
|
});
|
|
31040
31022
|
}
|
|
31041
31023
|
/** @override */ destruct(editor) {
|
|
31042
|
-
var
|
|
31043
|
-
(
|
|
31044
|
-
editor === null || editor === void 0 ? void 0 :
|
|
31024
|
+
var _a, _b;
|
|
31025
|
+
(_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, '');
|
|
31026
|
+
(_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);
|
|
31045
31027
|
}
|
|
31046
31028
|
constructor(){
|
|
31047
31029
|
/** @override */ this.buttons = [
|
|
@@ -32002,9 +31984,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
32002
31984
|
}
|
|
32003
31985
|
}
|
|
32004
31986
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
31987
|
+
var _a;
|
|
32005
31988
|
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(leftSibling)) {
|
|
32006
|
-
|
|
32007
|
-
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;
|
|
31989
|
+
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;
|
|
32008
31990
|
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);
|
|
32009
31991
|
if (leftText) {
|
|
32010
31992
|
range.setStartAfter(leftText);
|
|
@@ -32116,6 +32098,7 @@ var DragState;
|
|
|
32116
32098
|
/**
|
|
32117
32099
|
* Mouse move handler handler
|
|
32118
32100
|
*/ onDrag(event) {
|
|
32101
|
+
var _a, _b;
|
|
32119
32102
|
if (!this.draggable || this.state === DragState.IDLE) {
|
|
32120
32103
|
return;
|
|
32121
32104
|
}
|
|
@@ -32130,7 +32113,6 @@ var DragState;
|
|
|
32130
32113
|
this.j.e.fire('hidePopup hideResizer');
|
|
32131
32114
|
if (!this.draggable.parentNode) {
|
|
32132
32115
|
const target = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(this.draggable, 'target');
|
|
32133
|
-
var _target_offsetWidth, _target_offsetHeight;
|
|
32134
32116
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.css)(this.draggable, {
|
|
32135
32117
|
zIndex: 10000000000000,
|
|
32136
32118
|
pointerEvents: 'none',
|
|
@@ -32140,8 +32122,8 @@ var DragState;
|
|
|
32140
32122
|
display: 'inline-block',
|
|
32141
32123
|
left: event.clientX,
|
|
32142
32124
|
top: event.clientY,
|
|
32143
|
-
width: (
|
|
32144
|
-
height: (
|
|
32125
|
+
width: (_a = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a !== void 0 ? _a : 100,
|
|
32126
|
+
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
32145
32127
|
});
|
|
32146
32128
|
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(this.j, dragAndDropElement).appendChild(this.draggable);
|
|
32147
32129
|
}
|
|
@@ -33336,7 +33318,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
33336
33318
|
},
|
|
33337
33319
|
tooltip: 'Font size',
|
|
33338
33320
|
value: (editor, button)=>{
|
|
33339
|
-
var
|
|
33321
|
+
var _a;
|
|
33340
33322
|
const current = editor.s.current();
|
|
33341
33323
|
if (!current) {
|
|
33342
33324
|
return;
|
|
@@ -33346,25 +33328,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
33346
33328
|
return;
|
|
33347
33329
|
}
|
|
33348
33330
|
const control = button.control;
|
|
33349
|
-
const cssKey = ((
|
|
33331
|
+
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
33350
33332
|
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__/* .css */ .A)(box, cssKey);
|
|
33351
33333
|
return value.toString();
|
|
33352
33334
|
},
|
|
33353
33335
|
isChildActive: (editor, button)=>{
|
|
33354
|
-
var
|
|
33336
|
+
var _a, _b;
|
|
33355
33337
|
const value = button.state.value;
|
|
33356
|
-
|
|
33357
|
-
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;
|
|
33338
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
33358
33339
|
return Boolean(value && button.control.args && normalize(button.control.args[0].toString()) === normalize(value.toString()));
|
|
33359
33340
|
},
|
|
33360
33341
|
isActive: (editor, button)=>{
|
|
33361
|
-
var
|
|
33342
|
+
var _a, _b;
|
|
33362
33343
|
const value = button.state.value;
|
|
33363
33344
|
if (!value) {
|
|
33364
33345
|
return false;
|
|
33365
33346
|
}
|
|
33366
|
-
|
|
33367
|
-
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;
|
|
33347
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
33368
33348
|
let keySet = button.control.data.cacheListSet;
|
|
33369
33349
|
if (!keySet) {
|
|
33370
33350
|
const keys = Object.keys(button.control.list).map(normalize);
|
|
@@ -33398,7 +33378,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.font
|
|
|
33398
33378
|
let isAvailable = false;
|
|
33399
33379
|
try {
|
|
33400
33380
|
isAvailable = key.indexOf('dings') === -1 && document.fonts.check(`16px ${key}`, value);
|
|
33401
|
-
} catch (
|
|
33381
|
+
} catch (_a) {}
|
|
33402
33382
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
33403
33383
|
},
|
|
33404
33384
|
data: {
|
|
@@ -33505,11 +33485,10 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('paragraph', _pa
|
|
|
33505
33485
|
_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.paragraph = {
|
|
33506
33486
|
command: 'formatBlock',
|
|
33507
33487
|
value (editor, button) {
|
|
33508
|
-
var
|
|
33488
|
+
var _a, _b;
|
|
33509
33489
|
const control = button.control, current = editor.s.current();
|
|
33510
33490
|
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);
|
|
33511
|
-
|
|
33512
|
-
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;
|
|
33491
|
+
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;
|
|
33513
33492
|
},
|
|
33514
33493
|
update (editor, button) {
|
|
33515
33494
|
const control = button.control, current = editor.s.current();
|
|
@@ -33537,8 +33516,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.parag
|
|
|
33537
33516
|
pre: 'Code'
|
|
33538
33517
|
},
|
|
33539
33518
|
isChildActive: (editor, button)=>{
|
|
33540
|
-
var
|
|
33541
|
-
return Boolean(button.state.value === ((
|
|
33519
|
+
var _a, _b;
|
|
33520
|
+
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]));
|
|
33542
33521
|
},
|
|
33543
33522
|
isActive: (editor, button)=>{
|
|
33544
33523
|
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]);
|
|
@@ -33676,6 +33655,7 @@ const fullsizeStack = new Set();
|
|
|
33676
33655
|
}, /**
|
|
33677
33656
|
* Change editor's state between FullSize and normal
|
|
33678
33657
|
*/ toggle = (enable)=>{
|
|
33658
|
+
var _a;
|
|
33679
33659
|
const { container, events } = editor;
|
|
33680
33660
|
if (!container) {
|
|
33681
33661
|
return;
|
|
@@ -33688,8 +33668,7 @@ const fullsizeStack = new Set();
|
|
|
33688
33668
|
isEnabled = enable;
|
|
33689
33669
|
container.classList.toggle('jodit_fullsize', enable);
|
|
33690
33670
|
if (editor.toolbar) {
|
|
33691
|
-
|
|
33692
|
-
(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));
|
|
33671
|
+
(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));
|
|
33693
33672
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(editor.toolbar.container, 'width', 'auto');
|
|
33694
33673
|
}
|
|
33695
33674
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -33708,8 +33687,8 @@ const fullsizeStack = new Set();
|
|
|
33708
33687
|
editor.e.on(editor.ow, 'resize', resize);
|
|
33709
33688
|
}
|
|
33710
33689
|
editor.e.on('afterInit afterOpen', ()=>{
|
|
33711
|
-
var
|
|
33712
|
-
editor.toggleFullSize(editor === null || editor === void 0 ? void 0 :
|
|
33690
|
+
var _a;
|
|
33691
|
+
editor.toggleFullSize((_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.fullsize);
|
|
33713
33692
|
}).on('toggleFullSize', toggle).on('beforeDestruct', ()=>{
|
|
33714
33693
|
isEnabled && toggle(false);
|
|
33715
33694
|
}).on('beforeDestruct', ()=>{
|
|
@@ -34155,8 +34134,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox
|
|
|
34155
34134
|
}
|
|
34156
34135
|
}
|
|
34157
34136
|
}).on(editor.ew, 'mousedown touchstart keydown keyup touchend click mouseup mousemove scroll', (e)=>{
|
|
34158
|
-
var
|
|
34159
|
-
(
|
|
34137
|
+
var _a;
|
|
34138
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire(editor.ow, e);
|
|
34160
34139
|
});
|
|
34161
34140
|
}
|
|
34162
34141
|
return false;
|
|
@@ -34260,8 +34239,8 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
34260
34239
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
34261
34240
|
if (!elm.complete) {
|
|
34262
34241
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
34263
|
-
var
|
|
34264
|
-
!editor.isInDestruct && ((
|
|
34242
|
+
var _a;
|
|
34243
|
+
!editor.isInDestruct && ((_a = editor.e) === null || _a === void 0 ? void 0 : _a.fire('resize'));
|
|
34265
34244
|
editor.e.off(elm, 'load', ElementOnLoad);
|
|
34266
34245
|
});
|
|
34267
34246
|
}
|
|
@@ -34557,11 +34536,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
34557
34536
|
}
|
|
34558
34537
|
}
|
|
34559
34538
|
/** @override */ beforeDestruct(editor) {
|
|
34560
|
-
var
|
|
34561
|
-
|
|
34562
|
-
|
|
34563
|
-
(
|
|
34564
|
-
(_cached1 = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _cached1 === void 0 ? void 0 : _cached1.destruct();
|
|
34539
|
+
var _a, _b, _c;
|
|
34540
|
+
Object.values((_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach((b)=>b.destruct());
|
|
34541
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
34542
|
+
(_c = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
|
|
34565
34543
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
34566
34544
|
}
|
|
34567
34545
|
constructor(){
|
|
@@ -36980,7 +36958,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36980
36958
|
afterInit(jodit) {}
|
|
36981
36959
|
beforeDestruct(jodit) {}
|
|
36982
36960
|
onKeyDownArrow(e) {
|
|
36983
|
-
var
|
|
36961
|
+
var _a;
|
|
36984
36962
|
if (e.key !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || !this.j.selection.isCollapsed()) {
|
|
36985
36963
|
return;
|
|
36986
36964
|
}
|
|
@@ -36988,7 +36966,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36988
36966
|
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(endContainer)) {
|
|
36989
36967
|
return;
|
|
36990
36968
|
}
|
|
36991
|
-
if (((
|
|
36969
|
+
if (((_a = endContainer.nodeValue) === null || _a === void 0 ? void 0 : _a.length) === endOffset) {
|
|
36992
36970
|
const { parentNode } = endContainer;
|
|
36993
36971
|
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)) {
|
|
36994
36972
|
_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));
|
|
@@ -37843,17 +37821,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
37843
37821
|
}
|
|
37844
37822
|
}
|
|
37845
37823
|
onProcessPasteLink(ignore, html) {
|
|
37824
|
+
var _a, _b, _c, _d;
|
|
37846
37825
|
const { jodit } = this;
|
|
37847
37826
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
37848
37827
|
return;
|
|
37849
37828
|
}
|
|
37850
37829
|
jodit.e.stopPropagation('processPaste');
|
|
37851
37830
|
if (jodit.o.link.processVideoLink) {
|
|
37852
|
-
|
|
37853
|
-
|
|
37854
|
-
|
|
37855
|
-
width: (_jodit_o_video1 = jodit.o.video) === null || _jodit_o_video1 === void 0 ? void 0 : _jodit_o_video1.defaultWidth,
|
|
37856
|
-
height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
|
|
37831
|
+
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, {
|
|
37832
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
37833
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
37857
37834
|
});
|
|
37858
37835
|
if (embed !== html) {
|
|
37859
37836
|
return jodit.createInside.fromHTML(embed);
|
|
@@ -38031,6 +38008,7 @@ __decorate([
|
|
|
38031
38008
|
], link.prototype, "__generateForm", null);
|
|
38032
38009
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
38033
38010
|
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
38011
|
+
var _a;
|
|
38034
38012
|
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
38035
38013
|
if (modeClassName === 'input') {
|
|
38036
38014
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
@@ -38044,8 +38022,7 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
38044
38022
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
38045
38023
|
}
|
|
38046
38024
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
38047
|
-
|
|
38048
|
-
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;
|
|
38025
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
38049
38026
|
if (className) {
|
|
38050
38027
|
a.classList.add(className);
|
|
38051
38028
|
}
|
|
@@ -38409,12 +38386,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38409
38386
|
store = {
|
|
38410
38387
|
toolbar: (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_4__/* .makeCollection */ .$K)(editor),
|
|
38411
38388
|
rebuild: ()=>{
|
|
38389
|
+
var _a, _b;
|
|
38412
38390
|
if (button) {
|
|
38413
38391
|
const buttons = editor.e.fire('getDiffButtons.mobile', button.closest(_modules_toolbar_collection_collection_js__WEBPACK_IMPORTED_MODULE_3__/* .ToolbarCollection */ .Q));
|
|
38414
38392
|
if (buttons && store) {
|
|
38415
|
-
var _editor_toolbar_firstButton, _editor_toolbar;
|
|
38416
38393
|
store.toolbar.build((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(buttons));
|
|
38417
|
-
const w = ((
|
|
38394
|
+
const w = ((_b = (_a = editor.toolbar) === null || _a === void 0 ? void 0 : _a.firstButton) === null || _b === void 0 ? void 0 : _b.container.offsetWidth) || 36;
|
|
38418
38395
|
store.toolbar.container.style.width = (w + 4) * 3 + 'px';
|
|
38419
38396
|
}
|
|
38420
38397
|
}
|
|
@@ -38478,11 +38455,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38478
38455
|
});
|
|
38479
38456
|
if (editor.o.toolbarAdaptive) {
|
|
38480
38457
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', ()=>{
|
|
38458
|
+
var _a, _b;
|
|
38481
38459
|
if (!editor.o.toolbar) {
|
|
38482
38460
|
return;
|
|
38483
38461
|
}
|
|
38484
|
-
|
|
38485
|
-
const width = ((_editor_container_parentElement = editor.container.parentElement) !== null && _editor_container_parentElement !== void 0 ? _editor_container_parentElement : editor.container).offsetWidth;
|
|
38462
|
+
const width = ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
38486
38463
|
const newStore = (()=>{
|
|
38487
38464
|
if (editor.isFullSize || width >= editor.o.sizeLG) {
|
|
38488
38465
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttons);
|
|
@@ -38496,10 +38473,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38496
38473
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttonsXS);
|
|
38497
38474
|
})();
|
|
38498
38475
|
if (newStore.toString() !== store.toString()) {
|
|
38499
|
-
var _editor_toolbar;
|
|
38500
38476
|
store = newStore;
|
|
38501
38477
|
editor.e.fire('closeAllPopups');
|
|
38502
|
-
(
|
|
38478
|
+
(_b = editor.toolbar) === null || _b === void 0 ? void 0 : _b.setRemoveButtons(editor.o.removeButtons).build(store.concat(editor.o.extraButtons));
|
|
38503
38479
|
}
|
|
38504
38480
|
}).on(editor.ow, 'load resize', ()=>editor.e.fire('recalcAdaptive'));
|
|
38505
38481
|
}
|
|
@@ -38527,9 +38503,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('mobile'
|
|
|
38527
38503
|
|
|
38528
38504
|
|
|
38529
38505
|
const memoExec = (jodit, _, { control })=>{
|
|
38506
|
+
var _a;
|
|
38530
38507
|
const key = `button${control.command}`;
|
|
38531
|
-
|
|
38532
|
-
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);
|
|
38508
|
+
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);
|
|
38533
38509
|
(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key, value);
|
|
38534
38510
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
38535
38511
|
};
|
|
@@ -38731,12 +38707,12 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
38731
38707
|
/**
|
|
38732
38708
|
* Clear extra styles and tags from Word's pasted text
|
|
38733
38709
|
*/ insertFromWordByType(e, html, insertType, texts) {
|
|
38710
|
+
var _a;
|
|
38734
38711
|
switch(insertType){
|
|
38735
38712
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML:
|
|
38736
38713
|
{
|
|
38737
|
-
var _this_j_events;
|
|
38738
38714
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.applyStyles)(html);
|
|
38739
|
-
const value = (
|
|
38715
|
+
const value = (_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('beautifyHTML', html);
|
|
38740
38716
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(value)) {
|
|
38741
38717
|
html = value;
|
|
38742
38718
|
}
|
|
@@ -39303,6 +39279,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
39303
39279
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(html);
|
|
39304
39280
|
break;
|
|
39305
39281
|
default:
|
|
39282
|
+
{
|
|
39283
|
+
const newHTML = this.j.e.fire('onCustomPasteHTMLOption', action, html, e);
|
|
39284
|
+
if (typeof newHTML === 'string') {
|
|
39285
|
+
html = newHTML;
|
|
39286
|
+
}
|
|
39287
|
+
}
|
|
39306
39288
|
}
|
|
39307
39289
|
}
|
|
39308
39290
|
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__/* .pasteInsertHtml */ .sX)(e, this.j, html);
|
|
@@ -39391,12 +39373,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.useInputsPlace
|
|
|
39391
39373
|
* Check if root node is empty
|
|
39392
39374
|
* @private
|
|
39393
39375
|
*/ function isEditorEmpty(root) {
|
|
39394
|
-
var
|
|
39376
|
+
var _a;
|
|
39395
39377
|
if (!root.firstChild) {
|
|
39396
39378
|
return true;
|
|
39397
39379
|
}
|
|
39398
39380
|
const first = root.firstChild;
|
|
39399
|
-
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has((
|
|
39381
|
+
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)) {
|
|
39400
39382
|
return false;
|
|
39401
39383
|
}
|
|
39402
39384
|
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);
|
|
@@ -39591,13 +39573,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
39591
39573
|
const rules = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(css).map((s)=>{
|
|
39592
39574
|
try {
|
|
39593
39575
|
return (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(s.cssRules);
|
|
39594
|
-
} catch (
|
|
39576
|
+
} catch (_a) {}
|
|
39595
39577
|
return [];
|
|
39596
39578
|
}).flat();
|
|
39597
39579
|
return rules.filter((r)=>{
|
|
39598
39580
|
try {
|
|
39599
39581
|
return Boolean(r && el.matches(r.selectorText));
|
|
39600
|
-
} catch (
|
|
39582
|
+
} catch (_a) {}
|
|
39601
39583
|
return false;
|
|
39602
39584
|
});
|
|
39603
39585
|
};
|
|
@@ -39663,7 +39645,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
39663
39645
|
scanFullPage: true
|
|
39664
39646
|
});
|
|
39665
39647
|
return cp.generateCSS();
|
|
39666
|
-
} catch (
|
|
39648
|
+
} catch (_a) {}
|
|
39667
39649
|
return '';
|
|
39668
39650
|
}
|
|
39669
39651
|
|
|
@@ -40976,8 +40958,8 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
40976
40958
|
*/
|
|
40977
40959
|
class SentenceFinder {
|
|
40978
40960
|
add(node) {
|
|
40979
|
-
var
|
|
40980
|
-
const value = ((
|
|
40961
|
+
var _a;
|
|
40962
|
+
const value = ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
40981
40963
|
if (!value.length) {
|
|
40982
40964
|
return;
|
|
40983
40965
|
}
|
|
@@ -41153,13 +41135,13 @@ class SentenceFinder {
|
|
|
41153
41135
|
return false;
|
|
41154
41136
|
}
|
|
41155
41137
|
async findAndSelect(query, next) {
|
|
41138
|
+
var _a;
|
|
41156
41139
|
const bounds = await this.findQueryBounds(query, 'walker');
|
|
41157
41140
|
if (!bounds.length) {
|
|
41158
41141
|
return false;
|
|
41159
41142
|
}
|
|
41160
41143
|
if (this.previousQuery !== query || !(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
41161
|
-
|
|
41162
|
-
(_this_drawPromise = this.drawPromise) === null || _this_drawPromise === void 0 ? void 0 : _this_drawPromise.rejectCallback();
|
|
41144
|
+
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
41163
41145
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
41164
41146
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
41165
41147
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
@@ -41198,9 +41180,8 @@ class SentenceFinder {
|
|
|
41198
41180
|
async isValidCache(promise) {
|
|
41199
41181
|
const res = await promise;
|
|
41200
41182
|
return res.every((r)=>{
|
|
41201
|
-
var
|
|
41202
|
-
|
|
41203
|
-
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);
|
|
41183
|
+
var _a, _b, _c, _d;
|
|
41184
|
+
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);
|
|
41204
41185
|
});
|
|
41205
41186
|
}
|
|
41206
41187
|
async find(walker, query) {
|
|
@@ -41221,8 +41202,8 @@ class SentenceFinder {
|
|
|
41221
41202
|
}
|
|
41222
41203
|
return false;
|
|
41223
41204
|
}).on('end', ()=>{
|
|
41224
|
-
var
|
|
41225
|
-
resolve((
|
|
41205
|
+
var _a;
|
|
41206
|
+
resolve((_a = sentence.ranges(query)) !== null && _a !== void 0 ? _a : []);
|
|
41226
41207
|
}).setWork(this.j.editor);
|
|
41227
41208
|
});
|
|
41228
41209
|
return this.cache[query];
|
|
@@ -41323,8 +41304,8 @@ class SentenceFinder {
|
|
|
41323
41304
|
}
|
|
41324
41305
|
}
|
|
41325
41306
|
/** @override */ beforeDestruct(jodit) {
|
|
41326
|
-
var
|
|
41327
|
-
(
|
|
41307
|
+
var _a;
|
|
41308
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'ui')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
41328
41309
|
jodit.e.off('.search');
|
|
41329
41310
|
}
|
|
41330
41311
|
constructor(){
|
|
@@ -41664,11 +41645,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41664
41645
|
].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
|
|
41665
41646
|
// and mouseup on another cell call `click` only for `TR` element.
|
|
41666
41647
|
.on('clickTr clickTbody', ()=>{
|
|
41648
|
+
var _a;
|
|
41667
41649
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
41668
41650
|
if (cellsCount) {
|
|
41669
41651
|
if (cellsCount > 1) {
|
|
41670
|
-
|
|
41671
|
-
(_this_j_s_sel = this.j.s.sel) === null || _this_j_s_sel === void 0 ? void 0 : _this_j_s_sel.removeAllRanges();
|
|
41652
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
41672
41653
|
}
|
|
41673
41654
|
return false;
|
|
41674
41655
|
}
|
|
@@ -41713,6 +41694,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41713
41694
|
/**
|
|
41714
41695
|
* Mouse move inside the table
|
|
41715
41696
|
*/ __onMove(table, e) {
|
|
41697
|
+
var _a;
|
|
41716
41698
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
41717
41699
|
return;
|
|
41718
41700
|
}
|
|
@@ -41745,8 +41727,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41745
41727
|
}
|
|
41746
41728
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
41747
41729
|
if (cellsCount > 1) {
|
|
41748
|
-
|
|
41749
|
-
(_this_j_s_sel = this.j.s.sel) === null || _this_j_s_sel === void 0 ? void 0 : _this_j_s_sel.removeAllRanges();
|
|
41730
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
41750
41731
|
}
|
|
41751
41732
|
this.j.e.fire('hidePopup');
|
|
41752
41733
|
e.stopPropagation();
|
|
@@ -41755,16 +41736,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41755
41736
|
const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
41756
41737
|
cell.appendChild(n);
|
|
41757
41738
|
this.j.async.setTimeout(()=>{
|
|
41758
|
-
var
|
|
41759
|
-
(
|
|
41739
|
+
var _a;
|
|
41740
|
+
(_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(n);
|
|
41760
41741
|
}, this.j.defaultTimeout / 5);
|
|
41761
41742
|
})();
|
|
41762
41743
|
}
|
|
41763
41744
|
/**
|
|
41764
41745
|
* On click in outside - remove selection
|
|
41765
41746
|
*/ __onRemoveSelection(e) {
|
|
41766
|
-
var
|
|
41767
|
-
if (!(e === null || e === void 0 ? void 0 :
|
|
41747
|
+
var _a;
|
|
41748
|
+
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) {
|
|
41768
41749
|
this.j.unlock();
|
|
41769
41750
|
this.unselectCells();
|
|
41770
41751
|
this.j.e.fire('hidePopup', 'cells');
|
|
@@ -42257,8 +42238,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.maxHeight = 'a
|
|
|
42257
42238
|
/**
|
|
42258
42239
|
* Returns service spaces: toolbar + statusbar
|
|
42259
42240
|
*/ __getNotWorkHeight() {
|
|
42260
|
-
var
|
|
42261
|
-
return (((
|
|
42241
|
+
var _a, _b;
|
|
42242
|
+
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;
|
|
42262
42243
|
}
|
|
42263
42244
|
/**
|
|
42264
42245
|
* Calculate workspace height
|
|
@@ -42512,12 +42493,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_2__/* .SourceE
|
|
|
42512
42493
|
}
|
|
42513
42494
|
}
|
|
42514
42495
|
destruct() {
|
|
42515
|
-
var
|
|
42496
|
+
var _a, _b;
|
|
42516
42497
|
this.instance.off('change', this.toWYSIWYG);
|
|
42517
42498
|
this.instance.off('focus', this.proxyOnFocus);
|
|
42518
42499
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
42519
42500
|
this.instance.destroy();
|
|
42520
|
-
(
|
|
42501
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.off('aceInited.source');
|
|
42521
42502
|
}
|
|
42522
42503
|
setValue(value) {
|
|
42523
42504
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
@@ -42801,9 +42782,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42801
42782
|
this.j.e.fire(this, 'ready');
|
|
42802
42783
|
}
|
|
42803
42784
|
onReadyAlways(onReady) {
|
|
42785
|
+
var _a;
|
|
42804
42786
|
if (!this.isReady) {
|
|
42805
|
-
|
|
42806
|
-
(_this_j_events = this.j.events) === null || _this_j_events === void 0 ? void 0 : _this_j_events.on(this, 'ready', onReady);
|
|
42787
|
+
(_a = this.j.events) === null || _a === void 0 ? void 0 : _a.on(this, 'ready', onReady);
|
|
42807
42788
|
} else {
|
|
42808
42789
|
onReady();
|
|
42809
42790
|
}
|
|
@@ -42856,9 +42837,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42856
42837
|
* Plug-in change simple textarea on CodeMirror editor in Source code mode
|
|
42857
42838
|
*/ class source extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */ .k {
|
|
42858
42839
|
onInsertHTML(html) {
|
|
42840
|
+
var _a;
|
|
42859
42841
|
if (!this.j.o.readonly && !this.j.isEditorMode()) {
|
|
42860
|
-
|
|
42861
|
-
(_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.insertRaw(html);
|
|
42842
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.insertRaw(html);
|
|
42862
42843
|
this.toWYSIWYG();
|
|
42863
42844
|
return false;
|
|
42864
42845
|
}
|
|
@@ -42917,23 +42898,23 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42917
42898
|
return str.replace(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
42918
42899
|
}
|
|
42919
42900
|
onSelectAll(command) {
|
|
42901
|
+
var _a;
|
|
42920
42902
|
if (command.toLowerCase() === 'selectall' && this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
42921
|
-
|
|
42922
|
-
(_this_sourceEditor = this.sourceEditor) === null || _this_sourceEditor === void 0 ? void 0 : _this_sourceEditor.selectAll();
|
|
42903
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.selectAll();
|
|
42923
42904
|
return false;
|
|
42924
42905
|
}
|
|
42925
42906
|
}
|
|
42926
42907
|
getMirrorValue() {
|
|
42927
|
-
var
|
|
42928
|
-
return ((
|
|
42908
|
+
var _a;
|
|
42909
|
+
return ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getValue()) || '';
|
|
42929
42910
|
}
|
|
42930
42911
|
setMirrorValue(value) {
|
|
42931
|
-
var
|
|
42932
|
-
(
|
|
42912
|
+
var _a;
|
|
42913
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
42933
42914
|
}
|
|
42934
42915
|
setFocusToMirror() {
|
|
42935
|
-
var
|
|
42936
|
-
(
|
|
42916
|
+
var _a;
|
|
42917
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42937
42918
|
}
|
|
42938
42919
|
saveSelection() {
|
|
42939
42920
|
if (this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
@@ -42995,12 +42976,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42995
42976
|
this.setFocusToMirror(); // need for setting focus after change mode
|
|
42996
42977
|
}
|
|
42997
42978
|
setMirrorSelectionRange(start, end) {
|
|
42998
|
-
var
|
|
42999
|
-
(
|
|
42979
|
+
var _a;
|
|
42980
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
43000
42981
|
}
|
|
43001
42982
|
onReadonlyReact() {
|
|
43002
|
-
var
|
|
43003
|
-
(
|
|
42983
|
+
var _a;
|
|
42984
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setReadOnly(this.j.o.readonly);
|
|
43004
42985
|
}
|
|
43005
42986
|
/** @override */ afterInit(editor) {
|
|
43006
42987
|
this.mirrorContainer = editor.c.div('jodit-source');
|
|
@@ -43010,25 +42991,25 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
43010
42991
|
});
|
|
43011
42992
|
this.sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)('area', editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
43012
42993
|
editor.e.on(editor.ow, 'keydown', (e)=>{
|
|
43013
|
-
var
|
|
43014
|
-
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((
|
|
42994
|
+
var _a;
|
|
42995
|
+
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.isFocused)) {
|
|
43015
42996
|
this.sourceEditor.blur();
|
|
43016
42997
|
}
|
|
43017
42998
|
});
|
|
43018
42999
|
this.onReadonlyReact();
|
|
43019
43000
|
editor.e.on('placeholder.source', (text)=>{
|
|
43020
|
-
var
|
|
43021
|
-
(
|
|
43001
|
+
var _a;
|
|
43002
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setPlaceHolder(text);
|
|
43022
43003
|
}).on('change.source', this.syncValueFromWYSIWYG).on('beautifyHTML', (html)=>html);
|
|
43023
43004
|
if (editor.o.beautifyHTML) {
|
|
43024
43005
|
const addEventListener = ()=>{
|
|
43006
|
+
var _a;
|
|
43025
43007
|
if (editor.isInDestruct) {
|
|
43026
43008
|
return false;
|
|
43027
43009
|
}
|
|
43028
43010
|
const html_beautify = editor.ow.html_beautify;
|
|
43029
43011
|
if (html_beautify && !editor.isInDestruct) {
|
|
43030
|
-
|
|
43031
|
-
(_editor_events = editor.events) === null || _editor_events === void 0 ? void 0 : _editor_events.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
43012
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
43032
43013
|
return true;
|
|
43033
43014
|
}
|
|
43034
43015
|
return false;
|
|
@@ -43047,21 +43028,21 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
43047
43028
|
}
|
|
43048
43029
|
}
|
|
43049
43030
|
initSourceEditor(editor) {
|
|
43031
|
+
var _a;
|
|
43050
43032
|
if (editor.o.sourceEditor !== 'area') {
|
|
43051
43033
|
const sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
43052
43034
|
sourceEditor.onReadyAlways(()=>{
|
|
43053
|
-
var
|
|
43054
|
-
(
|
|
43035
|
+
var _a, _b;
|
|
43036
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
43055
43037
|
this.sourceEditor = sourceEditor;
|
|
43056
43038
|
this.syncValueFromWYSIWYG(true);
|
|
43057
|
-
(
|
|
43039
|
+
(_b = editor.events) === null || _b === void 0 ? void 0 : _b.fire('sourceEditorReady', editor);
|
|
43058
43040
|
});
|
|
43059
43041
|
} else {
|
|
43060
|
-
|
|
43061
|
-
|
|
43062
|
-
var _editor_events;
|
|
43042
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.onReadyAlways(()=>{
|
|
43043
|
+
var _a;
|
|
43063
43044
|
this.syncValueFromWYSIWYG(true);
|
|
43064
|
-
(
|
|
43045
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire('sourceEditorReady', editor);
|
|
43065
43046
|
});
|
|
43066
43047
|
}
|
|
43067
43048
|
}
|
|
@@ -43088,14 +43069,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
43088
43069
|
this.tempMarkerEndReg = /{end-jodit-selection}/g;
|
|
43089
43070
|
// override it for ace editors
|
|
43090
43071
|
this.getSelectionStart = ()=>{
|
|
43091
|
-
var
|
|
43092
|
-
|
|
43093
|
-
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;
|
|
43072
|
+
var _a, _b;
|
|
43073
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionStart()) !== null && _b !== void 0 ? _b : 0;
|
|
43094
43074
|
};
|
|
43095
43075
|
this.getSelectionEnd = ()=>{
|
|
43096
|
-
var
|
|
43097
|
-
|
|
43098
|
-
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;
|
|
43076
|
+
var _a, _b;
|
|
43077
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionEnd()) !== null && _b !== void 0 ? _b : 0;
|
|
43099
43078
|
};
|
|
43100
43079
|
}
|
|
43101
43080
|
}
|
|
@@ -43199,6 +43178,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43199
43178
|
return !jodit.o.speechRecognize.api;
|
|
43200
43179
|
},
|
|
43201
43180
|
exec (jodit, current, { button, control }) {
|
|
43181
|
+
var _a;
|
|
43202
43182
|
const { api: ApiConstructor, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
|
|
43203
43183
|
if (!ApiConstructor) {
|
|
43204
43184
|
jodit.alert('Speech recognize API unsupported in your browser');
|
|
@@ -43208,8 +43188,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43208
43188
|
if (!api) {
|
|
43209
43189
|
const nativeApi = new ApiConstructor();
|
|
43210
43190
|
api = new _helpers_recognize_manager_js__WEBPACK_IMPORTED_MODULE_5__/* .RecognizeManager */ .g(jodit.async, nativeApi);
|
|
43211
|
-
|
|
43212
|
-
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;
|
|
43191
|
+
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;
|
|
43213
43192
|
api.continuous = continuous;
|
|
43214
43193
|
api.interimResults = interimResults;
|
|
43215
43194
|
api.sound = sound;
|
|
@@ -43249,8 +43228,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43249
43228
|
interimResults: 'Interim Results'
|
|
43250
43229
|
},
|
|
43251
43230
|
childTemplate (jodit, key, value) {
|
|
43252
|
-
var
|
|
43253
|
-
const api = (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(jodit, 'speech'), checked = (
|
|
43231
|
+
var _a;
|
|
43232
|
+
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];
|
|
43254
43233
|
return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'> ${value}</span>`;
|
|
43255
43234
|
},
|
|
43256
43235
|
mods: {
|
|
@@ -46357,11 +46336,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video
|
|
|
46357
46336
|
content: formCode.container
|
|
46358
46337
|
});
|
|
46359
46338
|
formLink.onSubmit((data)=>{
|
|
46360
|
-
var
|
|
46361
|
-
|
|
46362
|
-
|
|
46363
|
-
|
|
46364
|
-
height: (_jodit_o_video2 = jodit.o.video) === null || _jodit_o_video2 === void 0 ? void 0 : _jodit_o_video2.defaultHeight
|
|
46339
|
+
var _a, _b, _c, _d;
|
|
46340
|
+
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, {
|
|
46341
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
46342
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
46365
46343
|
}));
|
|
46366
46344
|
});
|
|
46367
46345
|
formCode.onSubmit((data)=>{
|
|
@@ -46521,8 +46499,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.wrapNodes = {
|
|
|
46521
46499
|
/**
|
|
46522
46500
|
* Found Node which should be wrapped
|
|
46523
46501
|
*/ this.isSuitableStart = (n)=>{
|
|
46524
|
-
var
|
|
46525
|
-
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) || ((
|
|
46502
|
+
var _a;
|
|
46503
|
+
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);
|
|
46526
46504
|
};
|
|
46527
46505
|
/**
|
|
46528
46506
|
* Node should add in a block element
|
|
@@ -46675,7 +46653,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showXPathInSta
|
|
|
46675
46653
|
this.j.s.select(elm);
|
|
46676
46654
|
return false;
|
|
46677
46655
|
}
|
|
46678
|
-
} catch (
|
|
46656
|
+
} catch (_a) {}
|
|
46679
46657
|
this.j.s.select(bindElement);
|
|
46680
46658
|
return false;
|
|
46681
46659
|
};
|