jodit-pro 4.5.4 → 4.5.6
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 +350 -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 +350 -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 +421 -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 +421 -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 +350 -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/es2021.en/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.6
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1245,24 +1245,26 @@ class Async {
|
|
|
1245
1245
|
this.isDestructed = true;
|
|
1246
1246
|
}
|
|
1247
1247
|
constructor(){
|
|
1248
|
+
var _a, _b, _c, _d, _e;
|
|
1248
1249
|
this.timers = new Map();
|
|
1249
1250
|
this.__callbacks = new Map();
|
|
1250
|
-
this.__queueMicrotaskNative = queueMicrotask
|
|
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());
|
|
1251
1252
|
this.promisesRejections = new Set();
|
|
1252
1253
|
this.requestsIdle = new Set();
|
|
1253
1254
|
this.requestsRaf = new Set();
|
|
1254
|
-
this.requestIdleCallbackNative = window['requestIdleCallback']
|
|
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;
|
|
1255
1257
|
const start = Date.now();
|
|
1256
1258
|
return this.setTimeout(()=>{
|
|
1257
1259
|
callback({
|
|
1258
1260
|
didTimeout: false,
|
|
1259
1261
|
timeRemaining: ()=>Math.max(0, 50 - (Date.now() - start))
|
|
1260
1262
|
});
|
|
1261
|
-
}, options
|
|
1262
|
-
}
|
|
1263
|
-
this.__cancelIdleCallbackNative = window['cancelIdleCallback']
|
|
1263
|
+
}, (_a = options === null || options === void 0 ? void 0 : options.timeout) !== null && _a !== void 0 ? _a : 1);
|
|
1264
|
+
};
|
|
1265
|
+
this.__cancelIdleCallbackNative = (_e = (_d = window['cancelIdleCallback']) === null || _d === void 0 ? void 0 : _d.bind(window)) !== null && _e !== void 0 ? _e : (request)=>{
|
|
1264
1266
|
this.clearTimeout(request);
|
|
1265
|
-
}
|
|
1267
|
+
};
|
|
1266
1268
|
this.isDestructed = false;
|
|
1267
1269
|
}
|
|
1268
1270
|
}
|
|
@@ -1436,7 +1438,7 @@ const StatusListHandlers = new Map();
|
|
|
1436
1438
|
if (proto && (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(proto.setStatusComponent)) {
|
|
1437
1439
|
proto.setStatusComponent(componentStatus, component);
|
|
1438
1440
|
}
|
|
1439
|
-
const statuses = StatusListHandlers.get(this), list = statuses
|
|
1441
|
+
const statuses = StatusListHandlers.get(this), list = statuses === null || statuses === void 0 ? void 0 : statuses[componentStatus];
|
|
1440
1442
|
if (list && list.length) {
|
|
1441
1443
|
list.forEach((cb)=>cb(component));
|
|
1442
1444
|
}
|
|
@@ -1639,7 +1641,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1639
1641
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
1640
1642
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
1641
1643
|
* Copyright (c) 2013-2025 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
1642
|
-
*/ const APP_VERSION = "4.5.
|
|
1644
|
+
*/ const APP_VERSION = "4.5.4";
|
|
1643
1645
|
// prettier-ignore
|
|
1644
1646
|
const ES = "es2020";
|
|
1645
1647
|
const IS_ES_MODERN = true;
|
|
@@ -1882,11 +1884,12 @@ class Create {
|
|
|
1882
1884
|
return div;
|
|
1883
1885
|
}
|
|
1884
1886
|
sandbox() {
|
|
1887
|
+
var _a;
|
|
1885
1888
|
const iframe = this.element('iframe', {
|
|
1886
1889
|
sandbox: 'allow-same-origin'
|
|
1887
1890
|
});
|
|
1888
1891
|
this.doc.body.appendChild(iframe);
|
|
1889
|
-
const doc = iframe.contentWindow
|
|
1892
|
+
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
1890
1893
|
(0,_helpers_utils_assert_js__WEBPACK_IMPORTED_MODULE_3__/* .assert */ .v)(doc, 'iframe.contentWindow.document');
|
|
1891
1894
|
if (!doc) {
|
|
1892
1895
|
throw Error('Iframe error');
|
|
@@ -2180,8 +2183,9 @@ function cacheHTML(target, _, descriptor) {
|
|
|
2180
2183
|
let useCache = true;
|
|
2181
2184
|
const cached = new WeakMap();
|
|
2182
2185
|
descriptor.value = function(...attrs) {
|
|
2186
|
+
var _a;
|
|
2183
2187
|
if (useCache && cached.has(this.constructor)) {
|
|
2184
|
-
return cached.get(this.constructor)
|
|
2188
|
+
return (_a = cached.get(this.constructor)) === null || _a === void 0 ? void 0 : _a.cloneNode(true);
|
|
2185
2189
|
}
|
|
2186
2190
|
const value = fn.apply(this, attrs);
|
|
2187
2191
|
if (useCache && _dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isElement(value)) {
|
|
@@ -2497,7 +2501,8 @@ function persistent(target, propertyKey) {
|
|
|
2497
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];
|
|
2498
2502
|
Object.defineProperty(component, propertyKey, {
|
|
2499
2503
|
get () {
|
|
2500
|
-
|
|
2504
|
+
var _a;
|
|
2505
|
+
return (_a = jodit.storage.get(storageKey)) !== null && _a !== void 0 ? _a : initialValue;
|
|
2501
2506
|
},
|
|
2502
2507
|
set (value) {
|
|
2503
2508
|
jodit.storage.set(storageKey, value);
|
|
@@ -2590,11 +2595,12 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2590
2595
|
* Watch decorator. Added observer for some change in field value
|
|
2591
2596
|
*/ function watch(observeFields, opts) {
|
|
2592
2597
|
return (target, propertyKey)=>{
|
|
2598
|
+
var _a;
|
|
2593
2599
|
if (!(0,_helpers_checker_is_function_js__WEBPACK_IMPORTED_MODULE_3__/* .isFunction */ .T)(target[propertyKey])) {
|
|
2594
2600
|
throw (0,_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_2__/* .error */ .z3)('Handler must be a Function');
|
|
2595
2601
|
}
|
|
2596
|
-
const immediately = opts
|
|
2597
|
-
const context = opts
|
|
2602
|
+
const immediately = (_a = opts === null || opts === void 0 ? void 0 : opts.immediately) !== null && _a !== void 0 ? _a : true;
|
|
2603
|
+
const context = opts === null || opts === void 0 ? void 0 : opts.context;
|
|
2598
2604
|
const process = (component)=>{
|
|
2599
2605
|
const view = (0,_helpers_checker_is_view_object_js__WEBPACK_IMPORTED_MODULE_4__/* .isViewObject */ .h)(component) ? component : component.jodit;
|
|
2600
2606
|
let callback = (key, ...args)=>{
|
|
@@ -2802,7 +2808,7 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2802
2808
|
while(next && !next.nextSibling){
|
|
2803
2809
|
next = next.parentNode;
|
|
2804
2810
|
}
|
|
2805
|
-
step = next
|
|
2811
|
+
step = next === null || next === void 0 ? void 0 : next.nextSibling;
|
|
2806
2812
|
}
|
|
2807
2813
|
next = step;
|
|
2808
2814
|
}
|
|
@@ -2915,28 +2921,31 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2915
2921
|
/**
|
|
2916
2922
|
* Check if element is element node
|
|
2917
2923
|
*/ static isElement(node) {
|
|
2924
|
+
var _a;
|
|
2918
2925
|
if (!Dom.isNode(node)) {
|
|
2919
2926
|
return false;
|
|
2920
2927
|
}
|
|
2921
|
-
const win = node.ownerDocument
|
|
2928
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2922
2929
|
return Boolean(win && node.nodeType === Node.ELEMENT_NODE);
|
|
2923
2930
|
}
|
|
2924
2931
|
/**
|
|
2925
2932
|
* Check if element is document fragment
|
|
2926
2933
|
*/ static isFragment(node) {
|
|
2934
|
+
var _a;
|
|
2927
2935
|
if (!Dom.isNode(node)) {
|
|
2928
2936
|
return false;
|
|
2929
2937
|
}
|
|
2930
|
-
const win = node.ownerDocument
|
|
2938
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2931
2939
|
return Boolean(win && node.nodeType === Node.DOCUMENT_FRAGMENT_NODE);
|
|
2932
2940
|
}
|
|
2933
2941
|
/**
|
|
2934
2942
|
* Check if element is HTMLElement node
|
|
2935
2943
|
*/ static isHTMLElement(node) {
|
|
2944
|
+
var _a;
|
|
2936
2945
|
if (!Dom.isNode(node)) {
|
|
2937
2946
|
return false;
|
|
2938
2947
|
}
|
|
2939
|
-
const win = node.ownerDocument
|
|
2948
|
+
const win = (_a = node.ownerDocument) === null || _a === void 0 ? void 0 : _a.defaultView;
|
|
2940
2949
|
return Boolean(win && node instanceof win.HTMLElement);
|
|
2941
2950
|
}
|
|
2942
2951
|
/**
|
|
@@ -2955,7 +2964,7 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2955
2964
|
/**
|
|
2956
2965
|
* Get last matched node inside root
|
|
2957
2966
|
*/ static last(root, condition) {
|
|
2958
|
-
let last = root
|
|
2967
|
+
let last = root === null || root === void 0 ? void 0 : root.lastChild;
|
|
2959
2968
|
if (!last) {
|
|
2960
2969
|
return null;
|
|
2961
2970
|
}
|
|
@@ -2970,8 +2979,8 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
2970
2979
|
if (!next && last.parentNode !== root) {
|
|
2971
2980
|
do {
|
|
2972
2981
|
last = last.parentNode;
|
|
2973
|
-
}while (last && !last
|
|
2974
|
-
next = last
|
|
2982
|
+
}while (last && !(last === null || last === void 0 ? void 0 : last.previousSibling) && last.parentNode !== root)
|
|
2983
|
+
next = last === null || last === void 0 ? void 0 : last.previousSibling;
|
|
2975
2984
|
}
|
|
2976
2985
|
last = next;
|
|
2977
2986
|
}while (last)
|
|
@@ -3104,13 +3113,14 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
3104
3113
|
* Returns the nearest non-empty sibling
|
|
3105
3114
|
*/ static findNotEmptySibling(node, left) {
|
|
3106
3115
|
return Dom.findSibling(node, left, (n)=>{
|
|
3107
|
-
|
|
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));
|
|
3108
3118
|
});
|
|
3109
3119
|
}
|
|
3110
3120
|
/**
|
|
3111
3121
|
* Returns the nearest non-empty neighbor
|
|
3112
3122
|
*/ static findNotEmptyNeighbor(node, left, root) {
|
|
3113
|
-
return (0,_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__/* .call */ .T1)(left ? Dom.prev : Dom.next, node, (n)=>Boolean(n && (!(Dom.isText(n) || Dom.isComment(n)) || (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq)(n
|
|
3123
|
+
return (0,_helpers_utils_index_js__WEBPACK_IMPORTED_MODULE_4__/* .call */ .T1)(left ? Dom.prev : Dom.next, node, (n)=>Boolean(n && (!(Dom.isText(n) || Dom.isComment(n)) || (0,_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_3__/* .trim */ .Bq)((n === null || n === void 0 ? void 0 : n.nodeValue) || '').length)), root);
|
|
3114
3124
|
}
|
|
3115
3125
|
static sibling(node, left) {
|
|
3116
3126
|
return left ? node.previousSibling : node.nextSibling;
|
|
@@ -3152,12 +3162,12 @@ function getPropertyDescriptor(obj, prop) {
|
|
|
3152
3162
|
/**
|
|
3153
3163
|
* Furthest parent node matching condition
|
|
3154
3164
|
*/ static furthest(node, condition, root) {
|
|
3155
|
-
let matchedParent = null, current = node
|
|
3165
|
+
let matchedParent = null, current = node === null || node === void 0 ? void 0 : node.parentElement;
|
|
3156
3166
|
while(current && current !== root){
|
|
3157
3167
|
if (condition(current)) {
|
|
3158
3168
|
matchedParent = current;
|
|
3159
3169
|
}
|
|
3160
|
-
current = current
|
|
3170
|
+
current = current === null || current === void 0 ? void 0 : current.parentElement;
|
|
3161
3171
|
}
|
|
3162
3172
|
return matchedParent;
|
|
3163
3173
|
}
|
|
@@ -3384,8 +3394,9 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3384
3394
|
return this;
|
|
3385
3395
|
}
|
|
3386
3396
|
startIdleRequest() {
|
|
3397
|
+
var _a;
|
|
3387
3398
|
this.idleId = this.async.requestIdleCallback(this.workPerform, {
|
|
3388
|
-
timeout: this.options.timeout
|
|
3399
|
+
timeout: (_a = this.options.timeout) !== null && _a !== void 0 ? _a : 10
|
|
3389
3400
|
});
|
|
3390
3401
|
}
|
|
3391
3402
|
break(reason) {
|
|
@@ -3412,10 +3423,11 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3412
3423
|
this.stop();
|
|
3413
3424
|
}
|
|
3414
3425
|
workPerform(deadline) {
|
|
3426
|
+
var _a;
|
|
3415
3427
|
if (this.workNodes) {
|
|
3416
3428
|
this.isWorked = true;
|
|
3417
3429
|
let count = 0;
|
|
3418
|
-
const chunkSize = this.options.timeoutChunkSize
|
|
3430
|
+
const chunkSize = (_a = this.options.timeoutChunkSize) !== null && _a !== void 0 ? _a : 50;
|
|
3419
3431
|
while(!this.isFinished && (deadline.timeRemaining() > 0 || deadline.didTimeout && count <= chunkSize)){
|
|
3420
3432
|
const item = this.workNodes.next();
|
|
3421
3433
|
count += 1;
|
|
@@ -3435,10 +3447,11 @@ class LazyWalker extends _event_emitter_eventify_js__WEBPACK_IMPORTED_MODULE_2__
|
|
|
3435
3447
|
}
|
|
3436
3448
|
}
|
|
3437
3449
|
visitNode(nodeElm) {
|
|
3450
|
+
var _a;
|
|
3438
3451
|
if (!nodeElm || this.options.whatToShow !== undefined && nodeElm.nodeType !== this.options.whatToShow) {
|
|
3439
3452
|
return false;
|
|
3440
3453
|
}
|
|
3441
|
-
return this.emit('visit', nodeElm)
|
|
3454
|
+
return (_a = this.emit('visit', nodeElm)) !== null && _a !== void 0 ? _a : false;
|
|
3442
3455
|
}
|
|
3443
3456
|
constructor(async, options = {}){
|
|
3444
3457
|
super();
|
|
@@ -3486,7 +3499,7 @@ __decorate([
|
|
|
3486
3499
|
* The module editor's event manager
|
|
3487
3500
|
*/ class EventEmitter {
|
|
3488
3501
|
mute(event) {
|
|
3489
|
-
this.__mutedEvents.add(event
|
|
3502
|
+
this.__mutedEvents.add(event !== null && event !== void 0 ? event : '*');
|
|
3490
3503
|
return this;
|
|
3491
3504
|
}
|
|
3492
3505
|
isMuted(event) {
|
|
@@ -3496,7 +3509,7 @@ __decorate([
|
|
|
3496
3509
|
return this.__mutedEvents.has('*');
|
|
3497
3510
|
}
|
|
3498
3511
|
unmute(event) {
|
|
3499
|
-
this.__mutedEvents.delete(event
|
|
3512
|
+
this.__mutedEvents.delete(event !== null && event !== void 0 ? event : '*');
|
|
3500
3513
|
return this;
|
|
3501
3514
|
}
|
|
3502
3515
|
__eachEvent(events, callback) {
|
|
@@ -3630,6 +3643,7 @@ __decorate([
|
|
|
3630
3643
|
};
|
|
3631
3644
|
}
|
|
3632
3645
|
this.__eachEvent(events, (event, namespace)=>{
|
|
3646
|
+
var _a, _b;
|
|
3633
3647
|
if (event.length === 0) {
|
|
3634
3648
|
throw (0,_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_1__/* .error */ .z3)('Need event name');
|
|
3635
3649
|
}
|
|
@@ -3639,12 +3653,12 @@ __decorate([
|
|
|
3639
3653
|
originalCallback: callback,
|
|
3640
3654
|
syntheticCallback
|
|
3641
3655
|
};
|
|
3642
|
-
store.set(event, namespace, block, options
|
|
3656
|
+
store.set(event, namespace, block, options === null || options === void 0 ? void 0 : options.top);
|
|
3643
3657
|
if (isDOMElement(subject)) {
|
|
3644
3658
|
const eOpts = _constants_js__WEBPACK_IMPORTED_MODULE_0__.PASSIVE_EVENTS.has(event) ? {
|
|
3645
3659
|
passive: true,
|
|
3646
|
-
capture: options
|
|
3647
|
-
} : options
|
|
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;
|
|
3648
3662
|
syntheticCallback.options = eOpts;
|
|
3649
3663
|
subject.addEventListener(event, syntheticCallback, eOpts);
|
|
3650
3664
|
this.__memoryDOMSubjectToHandler(subject, syntheticCallback);
|
|
@@ -3720,8 +3734,9 @@ __decorate([
|
|
|
3720
3734
|
return this;
|
|
3721
3735
|
}
|
|
3722
3736
|
const removeEventListener = (block)=>{
|
|
3737
|
+
var _a;
|
|
3723
3738
|
if (isDOMElement(subject)) {
|
|
3724
|
-
subject.removeEventListener(block.event, block.syntheticCallback, block.syntheticCallback.options
|
|
3739
|
+
subject.removeEventListener(block.event, block.syntheticCallback, (_a = block.syntheticCallback.options) !== null && _a !== void 0 ? _a : false);
|
|
3725
3740
|
this.__unmemoryDOMSubjectToHandler(subject, block.syntheticCallback);
|
|
3726
3741
|
}
|
|
3727
3742
|
}, removeCallbackFromNameSpace = (event, namespace)=>{
|
|
@@ -3958,15 +3973,17 @@ function isDOMElement(subject) {
|
|
|
3958
3973
|
* ```
|
|
3959
3974
|
*/ class Eventify {
|
|
3960
3975
|
on(name, func) {
|
|
3976
|
+
var _a;
|
|
3961
3977
|
if (!this.__map.has(name)) {
|
|
3962
3978
|
this.__map.set(name, new Set());
|
|
3963
3979
|
}
|
|
3964
|
-
this.__map.get(name)
|
|
3980
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.add(func);
|
|
3965
3981
|
return this;
|
|
3966
3982
|
}
|
|
3967
3983
|
off(name, func) {
|
|
3984
|
+
var _a;
|
|
3968
3985
|
if (this.__map.has(name)) {
|
|
3969
|
-
this.__map.get(name)
|
|
3986
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.delete(func);
|
|
3970
3987
|
}
|
|
3971
3988
|
return this;
|
|
3972
3989
|
}
|
|
@@ -3974,9 +3991,10 @@ function isDOMElement(subject) {
|
|
|
3974
3991
|
this.__map.clear();
|
|
3975
3992
|
}
|
|
3976
3993
|
emit(name, ...args) {
|
|
3994
|
+
var _a;
|
|
3977
3995
|
let result;
|
|
3978
3996
|
if (this.__map.has(name)) {
|
|
3979
|
-
this.__map.get(name)
|
|
3997
|
+
(_a = this.__map.get(name)) === null || _a === void 0 ? void 0 : _a.forEach((cb)=>{
|
|
3980
3998
|
result = cb(...args);
|
|
3981
3999
|
});
|
|
3982
4000
|
}
|
|
@@ -4143,7 +4161,7 @@ function isObservableObject(obj) {
|
|
|
4143
4161
|
rs.push(`change.${sum.join('.')}`);
|
|
4144
4162
|
return rs;
|
|
4145
4163
|
}, [])
|
|
4146
|
-
], prefix.join('.'), oldValue, value
|
|
4164
|
+
], prefix.join('.'), oldValue, (value === null || value === void 0 ? void 0 : value.valueOf) ? value.valueOf() : value);
|
|
4147
4165
|
}
|
|
4148
4166
|
},
|
|
4149
4167
|
get: ()=>{
|
|
@@ -4357,10 +4375,11 @@ const boxes = new WeakMap();
|
|
|
4357
4375
|
* Get root element for view
|
|
4358
4376
|
* @internal
|
|
4359
4377
|
*/ function getPopupViewRoot(o, container, defaultRoot) {
|
|
4360
|
-
|
|
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') || [
|
|
4361
4380
|
'fixed',
|
|
4362
4381
|
'absolute'
|
|
4363
|
-
].includes((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.css)(parentElement, 'position'))), defaultRoot)
|
|
4382
|
+
].includes((0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.css)(parentElement, 'position'))), defaultRoot)) !== null && _c !== void 0 ? _c : defaultRoot;
|
|
4364
4383
|
}
|
|
4365
4384
|
/**
|
|
4366
4385
|
* Global event emitter
|
|
@@ -4469,7 +4488,8 @@ const boxes = new WeakMap();
|
|
|
4469
4488
|
* Jodit.modules.Helpers.toArray(1) // []
|
|
4470
4489
|
* ```
|
|
4471
4490
|
*/ const toArray = function toArray(...args) {
|
|
4472
|
-
|
|
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;
|
|
4473
4493
|
return func.apply(Array, args);
|
|
4474
4494
|
};
|
|
4475
4495
|
|
|
@@ -5375,7 +5395,7 @@ function normalizeCSS(s) {
|
|
|
5375
5395
|
});
|
|
5376
5396
|
convertedString = iframeDoc.firstChild ? (0,_string_trim_js__WEBPACK_IMPORTED_MODULE_2__/* .trim */ .Bq)(iframeDoc.body.innerHTML) : '';
|
|
5377
5397
|
}
|
|
5378
|
-
} catch
|
|
5398
|
+
} catch (_a) {} finally{
|
|
5379
5399
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.safeRemove(iframe);
|
|
5380
5400
|
}
|
|
5381
5401
|
if (convertedString) {
|
|
@@ -6377,6 +6397,7 @@ function size(subject) {
|
|
|
6377
6397
|
/**
|
|
6378
6398
|
* Calculate screen element position
|
|
6379
6399
|
*/ function position(elm, jodit, recurse = false) {
|
|
6400
|
+
var _a, _b;
|
|
6380
6401
|
const rect = elm.getBoundingClientRect();
|
|
6381
6402
|
let xPos = rect.left, yPos = rect.top;
|
|
6382
6403
|
if ((0,_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_0__/* .isJoditObject */ .y)(jodit) && jodit.iframe && jodit.ed.body.contains(elm) && !recurse) {
|
|
@@ -6387,8 +6408,8 @@ function size(subject) {
|
|
|
6387
6408
|
return {
|
|
6388
6409
|
left: Math.round(xPos),
|
|
6389
6410
|
top: Math.round(yPos),
|
|
6390
|
-
width: Math.round(elm.offsetWidth
|
|
6391
|
-
height: Math.round(elm.offsetHeight
|
|
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)
|
|
6392
6413
|
};
|
|
6393
6414
|
}
|
|
6394
6415
|
|
|
@@ -6539,9 +6560,9 @@ function size(subject) {
|
|
|
6539
6560
|
if (!key.length) {
|
|
6540
6561
|
return key;
|
|
6541
6562
|
}
|
|
6542
|
-
const debug = Boolean(options
|
|
6563
|
+
const debug = Boolean(options === null || options === void 0 ? void 0 : options.debugLanguage);
|
|
6543
6564
|
let store = {};
|
|
6544
|
-
const parse = (value)=>params && params.length ? sprintf(value, params) : value, defaultLanguage = (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__/* .defaultLanguage */ .eG)(_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.defaultOptions.language, _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.defaultOptions.language), language = (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__/* .defaultLanguage */ .eG)(options
|
|
6565
|
+
const parse = (value)=>params && params.length ? sprintf(value, params) : value, defaultLanguage = (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__/* .defaultLanguage */ .eG)(_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.defaultOptions.language, _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.defaultOptions.language), language = (0,_utils_index_js__WEBPACK_IMPORTED_MODULE_1__/* .defaultLanguage */ .eG)(options === null || options === void 0 ? void 0 : options.language, defaultLanguage), tryGet = (store)=>{
|
|
6545
6566
|
if (!store) {
|
|
6546
6567
|
return;
|
|
6547
6568
|
}
|
|
@@ -6567,7 +6588,7 @@ function size(subject) {
|
|
|
6567
6588
|
store = _constants_js__WEBPACK_IMPORTED_MODULE_0__.lang.en;
|
|
6568
6589
|
}
|
|
6569
6590
|
}
|
|
6570
|
-
const i18nOvr = options
|
|
6591
|
+
const i18nOvr = options === null || options === void 0 ? void 0 : options.i18n;
|
|
6571
6592
|
if (i18nOvr && i18nOvr[language]) {
|
|
6572
6593
|
const result = tryGet(i18nOvr[language]);
|
|
6573
6594
|
if (result) {
|
|
@@ -7665,10 +7686,11 @@ function fastClone(object) {
|
|
|
7665
7686
|
*/
|
|
7666
7687
|
const keepNames = new Map();
|
|
7667
7688
|
const getClassName = (obj)=>{
|
|
7689
|
+
var _a;
|
|
7668
7690
|
if ((0,_checker_is_function_js__WEBPACK_IMPORTED_MODULE_0__/* .isFunction */ .T)(obj.className)) {
|
|
7669
7691
|
return obj.className();
|
|
7670
7692
|
}
|
|
7671
|
-
const constructor = obj.constructor
|
|
7693
|
+
const constructor = ((_a = obj.constructor) === null || _a === void 0 ? void 0 : _a.originalConstructor) || obj.constructor;
|
|
7672
7694
|
if (keepNames.has(constructor)) {
|
|
7673
7695
|
return keepNames.get(constructor);
|
|
7674
7696
|
}
|
|
@@ -7728,7 +7750,7 @@ const getClassName = (obj)=>{
|
|
|
7728
7750
|
}
|
|
7729
7751
|
result = result[part];
|
|
7730
7752
|
}
|
|
7731
|
-
} catch
|
|
7753
|
+
} catch (_a) {
|
|
7732
7754
|
return null; // permission denied ore another access exception
|
|
7733
7755
|
}
|
|
7734
7756
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_1__/* .isVoid */ .R)(result)) {
|
|
@@ -7992,7 +8014,8 @@ const getClassName = (obj)=>{
|
|
|
7992
8014
|
item.src = a.href;
|
|
7993
8015
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.safeRemove(a);
|
|
7994
8016
|
restoreAttributes.push(()=>{
|
|
7995
|
-
|
|
8017
|
+
var _a;
|
|
8018
|
+
item.src = (_a = previousAttrs[2]) !== null && _a !== void 0 ? _a : '';
|
|
7996
8019
|
(0,_attr_js__WEBPACK_IMPORTED_MODULE_1__/* .attr */ .C)(item, {
|
|
7997
8020
|
width: previousAttrs[0] || null,
|
|
7998
8021
|
height: previousAttrs[1] || null
|
|
@@ -8097,11 +8120,11 @@ const getClassName = (obj)=>{
|
|
|
8097
8120
|
}
|
|
8098
8121
|
try {
|
|
8099
8122
|
box.appendChild(newNode);
|
|
8100
|
-
} catch
|
|
8123
|
+
} catch (_a) {}
|
|
8101
8124
|
} else {
|
|
8102
8125
|
try {
|
|
8103
8126
|
box.appendChild(c.cloneNode(true));
|
|
8104
|
-
} catch
|
|
8127
|
+
} catch (_b) {}
|
|
8105
8128
|
}
|
|
8106
8129
|
}
|
|
8107
8130
|
};
|
|
@@ -8146,6 +8169,7 @@ const map = {};
|
|
|
8146
8169
|
* ```
|
|
8147
8170
|
* You must use the function derived from the method immediately as its iframe is being removed
|
|
8148
8171
|
*/ function reset(key) {
|
|
8172
|
+
var _a, _b;
|
|
8149
8173
|
if (!(key in map)) {
|
|
8150
8174
|
const iframe = _constants_js__WEBPACK_IMPORTED_MODULE_0__.globalDocument.createElement('iframe');
|
|
8151
8175
|
try {
|
|
@@ -8163,10 +8187,10 @@ const map = {};
|
|
|
8163
8187
|
throw e;
|
|
8164
8188
|
}
|
|
8165
8189
|
} finally{
|
|
8166
|
-
iframe.parentNode
|
|
8190
|
+
(_a = iframe.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(iframe);
|
|
8167
8191
|
}
|
|
8168
8192
|
}
|
|
8169
|
-
return map[key]
|
|
8193
|
+
return (_b = map[key]) !== null && _b !== void 0 ? _b : null;
|
|
8170
8194
|
}
|
|
8171
8195
|
|
|
8172
8196
|
|
|
@@ -8336,7 +8360,7 @@ const $$temp = ()=>{
|
|
|
8336
8360
|
if ((0,_checker_is_string_js__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .K)(element)) {
|
|
8337
8361
|
try {
|
|
8338
8362
|
resolved = od.querySelector(element);
|
|
8339
|
-
} catch
|
|
8363
|
+
} catch (_a) {
|
|
8340
8364
|
throw (0,_index_js__WEBPACK_IMPORTED_MODULE_3__/* .error */ .z3)('String "' + element + '" should be valid HTML selector');
|
|
8341
8365
|
}
|
|
8342
8366
|
}
|
|
@@ -8481,14 +8505,14 @@ function callPromise(condition, callback) {
|
|
|
8481
8505
|
if ((0,_checker_is_promise_js__WEBPACK_IMPORTED_MODULE_2__/* .isPromise */ .y)(condition)) {
|
|
8482
8506
|
return condition.then((resp)=>resp, ()=>null).finally(callback);
|
|
8483
8507
|
}
|
|
8484
|
-
return callback
|
|
8508
|
+
return callback === null || callback === void 0 ? void 0 : callback();
|
|
8485
8509
|
}
|
|
8486
8510
|
/**
|
|
8487
8511
|
* Allow load image in promise
|
|
8488
8512
|
*/ const loadImage = (src, jodit)=>jodit.async.promise((res, rej)=>{
|
|
8489
8513
|
const image = new Image(), onError = ()=>{
|
|
8490
8514
|
jodit.e.off(image);
|
|
8491
|
-
rej
|
|
8515
|
+
rej === null || rej === void 0 ? void 0 : rej();
|
|
8492
8516
|
}, onSuccess = ()=>{
|
|
8493
8517
|
jodit.e.off(image);
|
|
8494
8518
|
res(image);
|
|
@@ -8512,8 +8536,9 @@ const keys = (obj, own = true)=>{
|
|
|
8512
8536
|
/**
|
|
8513
8537
|
* Memorize last user chose
|
|
8514
8538
|
*/ const memorizeExec = (editor, _, { control }, preProcessValue)=>{
|
|
8539
|
+
var _a;
|
|
8515
8540
|
const key = `button${control.command}`;
|
|
8516
|
-
let value = (control.args && control.args[0])
|
|
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);
|
|
8517
8542
|
if ((0,_checker_is_void_js__WEBPACK_IMPORTED_MODULE_3__/* .isVoid */ .R)(value)) {
|
|
8518
8543
|
return false;
|
|
8519
8544
|
}
|
|
@@ -8521,7 +8546,7 @@ const keys = (obj, own = true)=>{
|
|
|
8521
8546
|
if (preProcessValue) {
|
|
8522
8547
|
value = preProcessValue(value);
|
|
8523
8548
|
}
|
|
8524
|
-
editor.execCommand(control.command, false, value
|
|
8549
|
+
editor.execCommand(control.command, false, value !== null && value !== void 0 ? value : undefined);
|
|
8525
8550
|
};
|
|
8526
8551
|
/**
|
|
8527
8552
|
* Get DataTransfer from different event types
|
|
@@ -8531,7 +8556,7 @@ const keys = (obj, own = true)=>{
|
|
|
8531
8556
|
}
|
|
8532
8557
|
try {
|
|
8533
8558
|
return event.dataTransfer || new DataTransfer();
|
|
8534
|
-
} catch
|
|
8559
|
+
} catch (_a) {
|
|
8535
8560
|
return null;
|
|
8536
8561
|
}
|
|
8537
8562
|
};
|
|
@@ -8820,7 +8845,7 @@ const styles = new Set();
|
|
|
8820
8845
|
if (disableList.has(name) || doneList.has(name)) {
|
|
8821
8846
|
return;
|
|
8822
8847
|
}
|
|
8823
|
-
const requires = plugin
|
|
8848
|
+
const requires = plugin === null || plugin === void 0 ? void 0 : plugin.requires;
|
|
8824
8849
|
if (requires && (0,_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_3__/* .isArray */ .cy)(requires) && requires.length) {
|
|
8825
8850
|
if (requires.some((req)=>disableList.has(req))) {
|
|
8826
8851
|
return;
|
|
@@ -8949,6 +8974,7 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
8949
8974
|
}
|
|
8950
8975
|
}
|
|
8951
8976
|
__beforeDestruct() {
|
|
8977
|
+
var _a;
|
|
8952
8978
|
if (this.isInDestruct) {
|
|
8953
8979
|
return;
|
|
8954
8980
|
}
|
|
@@ -8959,8 +8985,8 @@ class Plugin extends _component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .ViewCom
|
|
|
8959
8985
|
return super.destruct();
|
|
8960
8986
|
}
|
|
8961
8987
|
if ((0,_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_2__/* .isJoditObject */ .y)(j)) {
|
|
8962
|
-
this.buttons
|
|
8963
|
-
j
|
|
8988
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>{
|
|
8989
|
+
j === null || j === void 0 ? void 0 : j.unregisterButton(btn);
|
|
8964
8990
|
});
|
|
8965
8991
|
}
|
|
8966
8992
|
this.beforeDestruct(this.j);
|
|
@@ -9048,7 +9074,7 @@ class Ajax {
|
|
|
9048
9074
|
try {
|
|
9049
9075
|
this.__isFulfilled = true;
|
|
9050
9076
|
this.xhr.abort();
|
|
9051
|
-
} catch
|
|
9077
|
+
} catch (_a) {}
|
|
9052
9078
|
return this;
|
|
9053
9079
|
}
|
|
9054
9080
|
send() {
|
|
@@ -9056,6 +9082,7 @@ class Ajax {
|
|
|
9056
9082
|
const { xhr, o } = this;
|
|
9057
9083
|
const request = this.prepareRequest();
|
|
9058
9084
|
return this.__async.promise(async (resolve, reject)=>{
|
|
9085
|
+
var _a;
|
|
9059
9086
|
const onReject = ()=>{
|
|
9060
9087
|
this.__isFulfilled = true;
|
|
9061
9088
|
reject(_helpers_utils_error_index_js__WEBPACK_IMPORTED_MODULE_3__/* .connection */ .FI('Connection error'));
|
|
@@ -9075,14 +9102,16 @@ class Ajax {
|
|
|
9075
9102
|
xhr.responseType = o.responseType;
|
|
9076
9103
|
}
|
|
9077
9104
|
xhr.onprogress = (e)=>{
|
|
9105
|
+
var _a, _b;
|
|
9078
9106
|
let percentComplete = 0;
|
|
9079
9107
|
if (e.lengthComputable) {
|
|
9080
9108
|
percentComplete = e.loaded / e.total * 100;
|
|
9081
9109
|
}
|
|
9082
|
-
this.options.onProgress
|
|
9110
|
+
(_b = (_a = this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, percentComplete);
|
|
9083
9111
|
};
|
|
9084
9112
|
xhr.onreadystatechange = ()=>{
|
|
9085
|
-
|
|
9113
|
+
var _a, _b;
|
|
9114
|
+
(_b = (_a = this.options).onProgress) === null || _b === void 0 ? void 0 : _b.call(_a, 10);
|
|
9086
9115
|
if (xhr.readyState === XMLHttpRequest.DONE) {
|
|
9087
9116
|
if (o.successStatuses.includes(xhr.status)) {
|
|
9088
9117
|
onResolve();
|
|
@@ -9092,7 +9121,7 @@ class Ajax {
|
|
|
9092
9121
|
}
|
|
9093
9122
|
}
|
|
9094
9123
|
};
|
|
9095
|
-
xhr.withCredentials = o.withCredentials
|
|
9124
|
+
xhr.withCredentials = (_a = o.withCredentials) !== null && _a !== void 0 ? _a : false;
|
|
9096
9125
|
const { url, data, method } = request;
|
|
9097
9126
|
xhr.open(method, url, true);
|
|
9098
9127
|
if (o.contentType && xhr.setRequestHeader) {
|
|
@@ -9280,7 +9309,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.defaultAjaxOpt
|
|
|
9280
9309
|
* Check if the cursor is at the edge of the string
|
|
9281
9310
|
* @private
|
|
9282
9311
|
*/ function cursorInTheEdgeOfString(container, offset, start, end) {
|
|
9283
|
-
|
|
9312
|
+
var _a;
|
|
9313
|
+
const text = ((_a = container.nodeValue) === null || _a === void 0 ? void 0 : _a.length) ? container.nodeValue : '';
|
|
9284
9314
|
if (end && text.replace((0,_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP_END)(), '').length > offset) {
|
|
9285
9315
|
return true;
|
|
9286
9316
|
}
|
|
@@ -9508,7 +9538,7 @@ class Selection {
|
|
|
9508
9538
|
* Checks if the selected text is currently inside the editor
|
|
9509
9539
|
*/ get isInsideArea() {
|
|
9510
9540
|
const { sel } = this;
|
|
9511
|
-
const range = sel
|
|
9541
|
+
const range = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel.getRangeAt(0) : null;
|
|
9512
9542
|
return !(!range || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, range.startContainer));
|
|
9513
9543
|
}
|
|
9514
9544
|
/**
|
|
@@ -9535,8 +9565,9 @@ class Selection {
|
|
|
9535
9565
|
/**
|
|
9536
9566
|
* Clear all selection
|
|
9537
9567
|
*/ clear() {
|
|
9538
|
-
|
|
9539
|
-
|
|
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();
|
|
9540
9571
|
}
|
|
9541
9572
|
}
|
|
9542
9573
|
/**
|
|
@@ -9575,7 +9606,7 @@ class Selection {
|
|
|
9575
9606
|
rng.collapse(true);
|
|
9576
9607
|
this.selectRange(rng);
|
|
9577
9608
|
return true;
|
|
9578
|
-
} catch
|
|
9609
|
+
} catch (_a) {}
|
|
9579
9610
|
return false;
|
|
9580
9611
|
}
|
|
9581
9612
|
/**
|
|
@@ -9674,6 +9705,7 @@ class Selection {
|
|
|
9674
9705
|
return result;
|
|
9675
9706
|
}
|
|
9676
9707
|
restoreFakes(fakes) {
|
|
9708
|
+
var _a, _b, _c, _d;
|
|
9677
9709
|
const nodes = fakes.filter((n)=>n.isConnected);
|
|
9678
9710
|
if (!nodes.length) {
|
|
9679
9711
|
return;
|
|
@@ -9685,10 +9717,10 @@ class Selection {
|
|
|
9685
9717
|
range.setEndBefore(fakeRight);
|
|
9686
9718
|
}
|
|
9687
9719
|
this.selectRange(range);
|
|
9688
|
-
if (fakeLeft.parentNode
|
|
9720
|
+
if (((_a = fakeLeft.parentNode) === null || _a === void 0 ? void 0 : _a.firstChild) !== ((_b = fakeLeft.parentNode) === null || _b === void 0 ? void 0 : _b.lastChild)) {
|
|
9689
9721
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeLeft);
|
|
9690
9722
|
}
|
|
9691
|
-
if (fakeRight
|
|
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)) {
|
|
9692
9724
|
_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.safeRemove(fakeRight);
|
|
9693
9725
|
}
|
|
9694
9726
|
}
|
|
@@ -9746,7 +9778,7 @@ class Selection {
|
|
|
9746
9778
|
}
|
|
9747
9779
|
try {
|
|
9748
9780
|
sel.addRange(ranges[i].cloneRange());
|
|
9749
|
-
} catch
|
|
9781
|
+
} catch (_a) {}
|
|
9750
9782
|
}
|
|
9751
9783
|
}
|
|
9752
9784
|
return info;
|
|
@@ -9756,8 +9788,9 @@ class Selection {
|
|
|
9756
9788
|
*/ focus(options = {
|
|
9757
9789
|
preventScroll: true
|
|
9758
9790
|
}) {
|
|
9791
|
+
var _a, _b;
|
|
9759
9792
|
if (!this.isFocused()) {
|
|
9760
|
-
const scrollParent = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.getScrollParent)(this.j.container), scrollTop = scrollParent
|
|
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;
|
|
9761
9794
|
if (this.j.iframe) {
|
|
9762
9795
|
if (this.doc.readyState === 'complete') {
|
|
9763
9796
|
this.j.iframe.focus(options);
|
|
@@ -9765,10 +9798,10 @@ class Selection {
|
|
|
9765
9798
|
}
|
|
9766
9799
|
this.win.focus();
|
|
9767
9800
|
this.area.focus(options);
|
|
9768
|
-
if (scrollTop && scrollParent
|
|
9801
|
+
if (scrollTop && (scrollParent === null || scrollParent === void 0 ? void 0 : scrollParent.scrollTo)) {
|
|
9769
9802
|
scrollParent.scrollTo(0, scrollTop);
|
|
9770
9803
|
}
|
|
9771
|
-
const sel = this.sel, range = sel
|
|
9804
|
+
const sel = this.sel, range = (sel === null || sel === void 0 ? void 0 : sel.rangeCount) ? sel === null || sel === void 0 ? void 0 : sel.getRangeAt(0) : null;
|
|
9772
9805
|
if (!range || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(this.area, range.startContainer)) {
|
|
9773
9806
|
const range = this.createRange();
|
|
9774
9807
|
range.setStart(this.area, 0);
|
|
@@ -9776,7 +9809,7 @@ class Selection {
|
|
|
9776
9809
|
this.selectRange(range, false);
|
|
9777
9810
|
}
|
|
9778
9811
|
if (!this.j.editorIsActive) {
|
|
9779
|
-
this.j
|
|
9812
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.fire('focus');
|
|
9780
9813
|
}
|
|
9781
9814
|
return true;
|
|
9782
9815
|
}
|
|
@@ -9874,7 +9907,7 @@ class Selection {
|
|
|
9874
9907
|
}
|
|
9875
9908
|
}
|
|
9876
9909
|
if (this.j.o.scrollToPastedContent) {
|
|
9877
|
-
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(child
|
|
9910
|
+
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.scrollIntoViewIfNeeded)(child !== null && child !== void 0 ? child : node, this.j.editor, this.doc);
|
|
9878
9911
|
}
|
|
9879
9912
|
});
|
|
9880
9913
|
if (fireChange && this.j.events) {
|
|
@@ -9973,6 +10006,7 @@ class Selection {
|
|
|
9973
10006
|
* Call callback for all selection node
|
|
9974
10007
|
*/ // eslint-disable-next-line complexity
|
|
9975
10008
|
eachSelection(callback) {
|
|
10009
|
+
var _a;
|
|
9976
10010
|
const sel = this.sel;
|
|
9977
10011
|
if (!sel || !sel.rangeCount) {
|
|
9978
10012
|
return;
|
|
@@ -9988,7 +10022,7 @@ class Selection {
|
|
|
9988
10022
|
const elementOffset = startOffset < length ? startOffset : length - 1;
|
|
9989
10023
|
let start = range.startContainer === this.area ? root.childNodes[elementOffset] : range.startContainer;
|
|
9990
10024
|
let end = range.endContainer === this.area ? root.childNodes[range.endOffset - 1] : range.endContainer;
|
|
9991
|
-
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(start) && start === range.startContainer && range.startOffset === start.nodeValue
|
|
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) {
|
|
9992
10026
|
start = start.nextSibling;
|
|
9993
10027
|
}
|
|
9994
10028
|
if (_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(end) && end === range.endContainer && range.endOffset === 0 && end.previousSibling) {
|
|
@@ -10044,8 +10078,9 @@ class Selection {
|
|
|
10044
10078
|
*
|
|
10045
10079
|
* @returns true - the cursor is at the end(start) block, null - cursor somewhere outside
|
|
10046
10080
|
*/ cursorInTheEdge(start, parentBlock, fake = null) {
|
|
10047
|
-
|
|
10048
|
-
|
|
10081
|
+
var _a;
|
|
10082
|
+
const end = !start, range = (_a = this.sel) === null || _a === void 0 ? void 0 : _a.getRangeAt(0);
|
|
10083
|
+
fake !== null && fake !== void 0 ? fake : fake = this.current(false);
|
|
10049
10084
|
if (!range || !fake || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isOrContains(parentBlock, fake, true)) {
|
|
10050
10085
|
return null;
|
|
10051
10086
|
}
|
|
@@ -10108,6 +10143,7 @@ class Selection {
|
|
|
10108
10143
|
/**
|
|
10109
10144
|
* Add fake node for new cursor position
|
|
10110
10145
|
*/ setCursorNearWith(node, inStart) {
|
|
10146
|
+
var _a, _b;
|
|
10111
10147
|
this.errorNode(node);
|
|
10112
10148
|
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.up(node, (elm)=>elm === this.area || elm && elm.parentNode === this.area, this.area)) {
|
|
10113
10149
|
throw (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.error)('Node element must be in editor');
|
|
@@ -10124,7 +10160,7 @@ class Selection {
|
|
|
10124
10160
|
if (inStart) {
|
|
10125
10161
|
range.setStart(node, 0);
|
|
10126
10162
|
} else {
|
|
10127
|
-
range.setEnd(node, node.nodeValue
|
|
10163
|
+
range.setEnd(node, (_b = (_a = node.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
10128
10164
|
}
|
|
10129
10165
|
}
|
|
10130
10166
|
range.collapse(inStart);
|
|
@@ -10359,7 +10395,7 @@ class Selection {
|
|
|
10359
10395
|
clearEmpties(fragment);
|
|
10360
10396
|
clearEmpties(currentBox);
|
|
10361
10397
|
currentBox.parentNode.insertBefore(fragment, currentBox);
|
|
10362
|
-
if (!edge && cursorOnTheRight && br
|
|
10398
|
+
if (!edge && cursorOnTheRight && (br === null || br === void 0 ? void 0 : br.parentNode)) {
|
|
10363
10399
|
const range = this.createRange();
|
|
10364
10400
|
range.setStartBefore(br);
|
|
10365
10401
|
this.selectRange(range);
|
|
@@ -10371,8 +10407,9 @@ class Selection {
|
|
|
10371
10407
|
}
|
|
10372
10408
|
// After splitting some part can be empty
|
|
10373
10409
|
const fillFakeParent = (fake)=>{
|
|
10374
|
-
|
|
10375
|
-
|
|
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());
|
|
10376
10413
|
}
|
|
10377
10414
|
};
|
|
10378
10415
|
fillFakeParent(prevFake);
|
|
@@ -10914,6 +10951,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10914
10951
|
* @param strictStyle - strict style mode - true - the element has the same style keys as in the commit, but not their values
|
|
10915
10952
|
* @private
|
|
10916
10953
|
*/ function isSuitElement(commitStyle, elm, strict, strictStyle = true) {
|
|
10954
|
+
var _a;
|
|
10917
10955
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
10918
10956
|
return false;
|
|
10919
10957
|
}
|
|
@@ -10925,7 +10963,7 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10925
10963
|
if (elmIsSame && !(elementIsDefault && strict)) {
|
|
10926
10964
|
return true;
|
|
10927
10965
|
}
|
|
10928
|
-
const elmHasSameStyle = Boolean(options.attributes
|
|
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)));
|
|
10929
10967
|
if (elmHasSameStyle && !commitStyle.elementIsList) {
|
|
10930
10968
|
return true;
|
|
10931
10969
|
}
|
|
@@ -10946,12 +10984,13 @@ function elementsEqualAttributes(elm1, elm2) {
|
|
|
10946
10984
|
* Apply `{element:'strong'}`
|
|
10947
10985
|
* @private
|
|
10948
10986
|
*/ function isSameStyleChild(commitStyle, elm) {
|
|
10987
|
+
var _a, _b;
|
|
10949
10988
|
const { element, options } = commitStyle;
|
|
10950
10989
|
if (!elm || !(0,_is_normal_node_js__WEBPACK_IMPORTED_MODULE_2__/* .isNormalNode */ ._)(elm)) {
|
|
10951
10990
|
return false;
|
|
10952
10991
|
}
|
|
10953
10992
|
const elmIsSame = elm.nodeName.toLowerCase() === element;
|
|
10954
|
-
const elmHasSameStyle = Boolean(options.attributes
|
|
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));
|
|
10955
10994
|
return elmIsSame && elmHasSameStyle;
|
|
10956
10995
|
}
|
|
10957
10996
|
|
|
@@ -11047,11 +11086,11 @@ function unwrapList(mode, list, li, jodit, cs) {
|
|
|
11047
11086
|
* @private
|
|
11048
11087
|
*/ function wrapList(commitStyle, wrapper, jodit) {
|
|
11049
11088
|
const result = jodit.e.fire(`${_constants_js__WEBPACK_IMPORTED_MODULE_2__/* ._PREFIX */ .ar}BeforeWrapList`, _constants_js__WEBPACK_IMPORTED_MODULE_2__/* .REPLACE */ .dj, wrapper, commitStyle);
|
|
11050
|
-
const newWrapper = result
|
|
11089
|
+
const newWrapper = result !== null && result !== void 0 ? result : _dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.replace(wrapper, 'li', jodit.createInside);
|
|
11051
11090
|
const prev = newWrapper.previousElementSibling;
|
|
11052
11091
|
const next = newWrapper.nextElementSibling;
|
|
11053
11092
|
let list = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(prev, commitStyle.element) ? prev : null;
|
|
11054
|
-
list
|
|
11093
|
+
list !== null && list !== void 0 ? list : list = _dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isTag(next, commitStyle.element) ? next : null;
|
|
11055
11094
|
if (!_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isList(list) || !(0,_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isSameAttributes */ .M6)(list, commitStyle.options.attributes)) {
|
|
11056
11095
|
list = jodit.createInside.element(commitStyle.element);
|
|
11057
11096
|
(0,_index_js__WEBPACK_IMPORTED_MODULE_1__/* .toggleAttributes */ .Yx)(commitStyle, list, jodit, _constants_js__WEBPACK_IMPORTED_MODULE_2__/* .INITIAL */ .DI);
|
|
@@ -11213,6 +11252,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11213
11252
|
/**
|
|
11214
11253
|
* Creates an iframe into which elements will be inserted to test their default styles in the browser
|
|
11215
11254
|
*/ function getShadowRoot(jodit) {
|
|
11255
|
+
var _a;
|
|
11216
11256
|
if ((0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot') !== undefined) {
|
|
11217
11257
|
return (0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot');
|
|
11218
11258
|
}
|
|
@@ -11226,7 +11266,7 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11226
11266
|
});
|
|
11227
11267
|
iframe.src = 'about:blank';
|
|
11228
11268
|
container.appendChild(iframe);
|
|
11229
|
-
const doc = iframe.contentWindow
|
|
11269
|
+
const doc = (_a = iframe.contentWindow) === null || _a === void 0 ? void 0 : _a.document;
|
|
11230
11270
|
const shadowRoot = !doc ? jodit.od.body : doc.body;
|
|
11231
11271
|
(0,_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_6__/* .dataBind */ .m)(jodit, 'shadowRoot', shadowRoot);
|
|
11232
11272
|
return shadowRoot;
|
|
@@ -11268,10 +11308,11 @@ function toggleAttribute(jodit, value, elm, key, dry, mode) {
|
|
|
11268
11308
|
* Unwrap all suit elements inside
|
|
11269
11309
|
* @private
|
|
11270
11310
|
*/ function unwrapChildren(style, font) {
|
|
11311
|
+
var _a;
|
|
11271
11312
|
const needUnwrap = [];
|
|
11272
11313
|
const needChangeStyle = [];
|
|
11273
11314
|
let firstElementSuit;
|
|
11274
|
-
const cssStyle = style.options.attributes
|
|
11315
|
+
const cssStyle = (_a = style.options.attributes) === null || _a === void 0 ? void 0 : _a.style;
|
|
11275
11316
|
if (font.firstChild) {
|
|
11276
11317
|
const gen = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.eachGen(font);
|
|
11277
11318
|
let item = gen.next();
|
|
@@ -11439,9 +11480,10 @@ const WRAP_NODES = new Set([
|
|
|
11439
11480
|
|
|
11440
11481
|
|
|
11441
11482
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
11483
|
+
var _a;
|
|
11442
11484
|
const { s: sel, editor } = jodit;
|
|
11443
11485
|
// sel.save();
|
|
11444
|
-
editor.firstChild
|
|
11486
|
+
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
11445
11487
|
const fakes = sel.fakes();
|
|
11446
11488
|
const gen = jodit.s.wrapInTagGen(fakes);
|
|
11447
11489
|
let font = gen.next();
|
|
@@ -11501,7 +11543,8 @@ class CommitStyle {
|
|
|
11501
11543
|
return data[key];
|
|
11502
11544
|
}
|
|
11503
11545
|
setApplied(elm, key) {
|
|
11504
|
-
|
|
11546
|
+
var _a;
|
|
11547
|
+
const data = (_a = this.__applyMap.get(elm)) !== null && _a !== void 0 ? _a : {};
|
|
11505
11548
|
data[key] = true;
|
|
11506
11549
|
this.__applyMap.set(elm, data);
|
|
11507
11550
|
}
|
|
@@ -11834,7 +11877,7 @@ const transactions = {
|
|
|
11834
11877
|
const result = localStorage.getItem(tmpKey) === '1';
|
|
11835
11878
|
localStorage.removeItem(tmpKey);
|
|
11836
11879
|
return result;
|
|
11837
|
-
} catch
|
|
11880
|
+
} catch (_a) {}
|
|
11838
11881
|
return false;
|
|
11839
11882
|
};
|
|
11840
11883
|
let result;
|
|
@@ -11854,13 +11897,13 @@ const transactions = {
|
|
|
11854
11897
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
11855
11898
|
json[key] = value;
|
|
11856
11899
|
localStorage.setItem(this.rootKey, JSON.stringify(json));
|
|
11857
|
-
} catch
|
|
11900
|
+
} catch (_a) {}
|
|
11858
11901
|
return this;
|
|
11859
11902
|
}
|
|
11860
11903
|
delete(key) {
|
|
11861
11904
|
try {
|
|
11862
11905
|
localStorage.removeItem(this.rootKey);
|
|
11863
|
-
} catch
|
|
11906
|
+
} catch (_a) {}
|
|
11864
11907
|
return this;
|
|
11865
11908
|
}
|
|
11866
11909
|
get(key) {
|
|
@@ -11868,7 +11911,7 @@ const transactions = {
|
|
|
11868
11911
|
const buffer = localStorage.getItem(this.rootKey);
|
|
11869
11912
|
const json = buffer ? JSON.parse(buffer) : {};
|
|
11870
11913
|
return json[key] !== undefined ? json[key] : null;
|
|
11871
|
-
} catch
|
|
11914
|
+
} catch (_a) {}
|
|
11872
11915
|
}
|
|
11873
11916
|
exists(key) {
|
|
11874
11917
|
return this.get(key) != null;
|
|
@@ -11876,7 +11919,7 @@ const transactions = {
|
|
|
11876
11919
|
clear() {
|
|
11877
11920
|
try {
|
|
11878
11921
|
localStorage.removeItem(this.rootKey);
|
|
11879
|
-
} catch
|
|
11922
|
+
} catch (_a) {}
|
|
11880
11923
|
return this;
|
|
11881
11924
|
}
|
|
11882
11925
|
constructor(rootKey){
|
|
@@ -12137,7 +12180,8 @@ class Mods {
|
|
|
12137
12180
|
/**
|
|
12138
12181
|
* Get BEM class modification value
|
|
12139
12182
|
*/ getMod(name) {
|
|
12140
|
-
|
|
12183
|
+
var _a;
|
|
12184
|
+
return (_a = this.mods[name]) !== null && _a !== void 0 ? _a : null;
|
|
12141
12185
|
}
|
|
12142
12186
|
}
|
|
12143
12187
|
|
|
@@ -12476,6 +12520,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12476
12520
|
options.appendChild(childContainer);
|
|
12477
12521
|
}
|
|
12478
12522
|
select(indexOrValue) {
|
|
12523
|
+
var _a, _b;
|
|
12479
12524
|
this.elements.forEach((elm, index)=>{
|
|
12480
12525
|
if (index === indexOrValue || elm.state.value === indexOrValue) {
|
|
12481
12526
|
elm.state.activated = true;
|
|
@@ -12488,12 +12533,13 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12488
12533
|
value: elm.state.value
|
|
12489
12534
|
}));
|
|
12490
12535
|
this.jodit.e.fire(this, 'select', result);
|
|
12491
|
-
this.options.onChange
|
|
12536
|
+
(_b = (_a = this.options).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, result);
|
|
12492
12537
|
}
|
|
12493
12538
|
constructor(jodit, options = {
|
|
12494
12539
|
radio: true
|
|
12495
12540
|
}){
|
|
12496
|
-
|
|
12541
|
+
var _a, _b;
|
|
12542
|
+
super(jodit, (_a = options.options) === null || _a === void 0 ? void 0 : _a.map((opt)=>{
|
|
12497
12543
|
const btn = new _button_button_js__WEBPACK_IMPORTED_MODULE_1__/* .UIButton */ .lD(jodit, {
|
|
12498
12544
|
text: opt.text,
|
|
12499
12545
|
value: opt.value,
|
|
@@ -12505,7 +12551,7 @@ let UIButtonGroup = class UIButtonGroup extends _group_group_js__WEBPACK_IMPORTE
|
|
|
12505
12551
|
return btn;
|
|
12506
12552
|
}), options);
|
|
12507
12553
|
this.options = options;
|
|
12508
|
-
this.select(options.value
|
|
12554
|
+
this.select((_b = options.value) !== null && _b !== void 0 ? _b : 0);
|
|
12509
12555
|
}
|
|
12510
12556
|
};
|
|
12511
12557
|
UIButtonGroup = __decorate([
|
|
@@ -12795,7 +12841,8 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
12795
12841
|
return this;
|
|
12796
12842
|
}
|
|
12797
12843
|
updateParentElement(target) {
|
|
12798
|
-
|
|
12844
|
+
var _a;
|
|
12845
|
+
(_a = this.__parentElement) === null || _a === void 0 ? void 0 : _a.updateParentElement(target);
|
|
12799
12846
|
return this;
|
|
12800
12847
|
}
|
|
12801
12848
|
/** @override */ get(chain, obj) {
|
|
@@ -12828,7 +12875,7 @@ let UIElement = UIElement_1 = class UIElement extends _component_index_js__WEBPA
|
|
|
12828
12875
|
}
|
|
12829
12876
|
return false;
|
|
12830
12877
|
});
|
|
12831
|
-
return elm ? elm
|
|
12878
|
+
return elm ? elm === null || elm === void 0 ? void 0 : elm.component : null;
|
|
12832
12879
|
}
|
|
12833
12880
|
/**
|
|
12834
12881
|
* Update UI from state
|
|
@@ -13009,9 +13056,10 @@ let UIForm = class UIForm extends _group_group_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
13009
13056
|
return form;
|
|
13010
13057
|
}
|
|
13011
13058
|
constructor(...args){
|
|
13059
|
+
var _a, _b;
|
|
13012
13060
|
super(...args);
|
|
13013
|
-
if (this.options
|
|
13014
|
-
this.container.classList.add(this.options
|
|
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);
|
|
13015
13063
|
}
|
|
13016
13064
|
}
|
|
13017
13065
|
};
|
|
@@ -13084,7 +13132,7 @@ let UITextArea = UITextArea_1 = class UITextArea extends _input_input_js__WEBPAC
|
|
|
13084
13132
|
onChangeStateSize() {
|
|
13085
13133
|
const { size, resizable } = this.state;
|
|
13086
13134
|
this.nativeInput.style.resize = resizable ? 'auto' : 'none';
|
|
13087
|
-
this.nativeInput.rows = size
|
|
13135
|
+
this.nativeInput.rows = size !== null && size !== void 0 ? size : 5;
|
|
13088
13136
|
}
|
|
13089
13137
|
constructor(jodit, state){
|
|
13090
13138
|
super(jodit, state);
|
|
@@ -13376,11 +13424,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13376
13424
|
this.updateValidators();
|
|
13377
13425
|
}
|
|
13378
13426
|
updateValidators() {
|
|
13427
|
+
var _a;
|
|
13379
13428
|
this.validators.clear();
|
|
13380
13429
|
if (this.state.required) {
|
|
13381
13430
|
this.validators.add(_validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators.required */ .O.required);
|
|
13382
13431
|
}
|
|
13383
|
-
this.state.validators
|
|
13432
|
+
(_a = this.state.validators) === null || _a === void 0 ? void 0 : _a.forEach((name)=>{
|
|
13384
13433
|
const validator = _validators_index_js__WEBPACK_IMPORTED_MODULE_5__/* .inputValidators */ .O[name];
|
|
13385
13434
|
validator && this.validators.add(validator);
|
|
13386
13435
|
});
|
|
@@ -13414,11 +13463,12 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13414
13463
|
/**
|
|
13415
13464
|
* Call on every native value changed
|
|
13416
13465
|
*/ onChangeValue() {
|
|
13466
|
+
var _a, _b;
|
|
13417
13467
|
const { value } = this;
|
|
13418
13468
|
if (this.state.value !== value) {
|
|
13419
13469
|
this.state.value = value;
|
|
13420
13470
|
this.j.e.fire(this, 'change', value);
|
|
13421
|
-
this.state.onChange
|
|
13471
|
+
(_b = (_a = this.state).onChange) === null || _b === void 0 ? void 0 : _b.call(_a, value);
|
|
13422
13472
|
}
|
|
13423
13473
|
}
|
|
13424
13474
|
validate() {
|
|
@@ -13428,12 +13478,13 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13428
13478
|
return validate;
|
|
13429
13479
|
}
|
|
13430
13480
|
__markInputInvalid() {
|
|
13481
|
+
var _a, _b, _c, _d;
|
|
13431
13482
|
if (this.error) {
|
|
13432
13483
|
this.nativeInput.setAttribute('aria-invalid', 'true');
|
|
13433
|
-
this.nativeInput.setCustomValidity
|
|
13484
|
+
(_b = (_a = this.nativeInput).setCustomValidity) === null || _b === void 0 ? void 0 : _b.call(_a, this.error);
|
|
13434
13485
|
} else {
|
|
13435
13486
|
this.nativeInput.removeAttribute('aria-invalid');
|
|
13436
|
-
this.nativeInput.setCustomValidity
|
|
13487
|
+
(_d = (_c = this.nativeInput).setCustomValidity) === null || _d === void 0 ? void 0 : _d.call(_c, '');
|
|
13437
13488
|
}
|
|
13438
13489
|
}
|
|
13439
13490
|
/** @override **/ createContainer(options) {
|
|
@@ -13475,7 +13526,7 @@ let UIInput = UIInput_1 = class UIInput extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13475
13526
|
};
|
|
13476
13527
|
this.__errorBox = this.j.c.span(this.getFullElName('error'));
|
|
13477
13528
|
this.validators = new Set([]);
|
|
13478
|
-
if (options
|
|
13529
|
+
if ((options === null || options === void 0 ? void 0 : options.value) !== undefined) {
|
|
13479
13530
|
options.value = options.value.toString();
|
|
13480
13531
|
}
|
|
13481
13532
|
Object.assign(this.state, options);
|
|
@@ -13574,6 +13625,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
13574
13625
|
return 'UISelect';
|
|
13575
13626
|
}
|
|
13576
13627
|
/** @override **/ createContainer(state) {
|
|
13628
|
+
var _a;
|
|
13577
13629
|
const container = super.createContainer(state);
|
|
13578
13630
|
const { j } = this, { nativeInput } = this;
|
|
13579
13631
|
const opt = ()=>j.create.element('option');
|
|
@@ -13583,7 +13635,7 @@ let UISelect = UISelect_1 = class UISelect extends _input_input_js__WEBPACK_IMPO
|
|
|
13583
13635
|
option.text = j.i18n(state.placeholder);
|
|
13584
13636
|
nativeInput.add(option);
|
|
13585
13637
|
}
|
|
13586
|
-
state.options
|
|
13638
|
+
(_a = state.options) === null || _a === void 0 ? void 0 : _a.forEach((element)=>{
|
|
13587
13639
|
const option = opt();
|
|
13588
13640
|
option.value = element.value.toString();
|
|
13589
13641
|
option.text = j.i18n(element.text);
|
|
@@ -13834,8 +13886,8 @@ let UIGroup = UIGroup_1 = class UIGroup extends _element_js__WEBPACK_IMPORTED_MO
|
|
|
13834
13886
|
*/ this.syncMod = false;
|
|
13835
13887
|
this.elements = [];
|
|
13836
13888
|
this.buttonSize = 'middle';
|
|
13837
|
-
elements
|
|
13838
|
-
if (options
|
|
13889
|
+
elements === null || elements === void 0 ? void 0 : elements.forEach((elm)=>elm && this.append(elm));
|
|
13890
|
+
if (options === null || options === void 0 ? void 0 : options.name) {
|
|
13839
13891
|
this.name = options.name;
|
|
13840
13892
|
}
|
|
13841
13893
|
}
|
|
@@ -13993,7 +14045,10 @@ let UIList = class UIList extends _group_js__WEBPACK_IMPORTED_MODULE_3__/* .UIGr
|
|
|
13993
14045
|
group.append(elm);
|
|
13994
14046
|
}
|
|
13995
14047
|
};
|
|
13996
|
-
const isNotRemoved = (b)
|
|
14048
|
+
const isNotRemoved = (b)=>{
|
|
14049
|
+
var _a;
|
|
14050
|
+
return !this.removeButtons.includes(b.name) && (!b.isVisible || ((_a = b.isVisible) === null || _a === void 0 ? void 0 : _a.call(b, this.j, b)));
|
|
14051
|
+
};
|
|
13997
14052
|
items.forEach((item)=>{
|
|
13998
14053
|
if ((0,_helpers_buttons_js__WEBPACK_IMPORTED_MODULE_9__/* .isButtonGroup */ .i)(item)) {
|
|
13999
14054
|
const buttons = item.buttons.filter((b)=>b);
|
|
@@ -14136,10 +14191,11 @@ UISpacer = __decorate([
|
|
|
14136
14191
|
*/ function flatButtonsSet(buttons, jodit) {
|
|
14137
14192
|
const groups = jodit.getRegisteredButtonGroups();
|
|
14138
14193
|
return new Set(buttons.reduce((acc, item)=>{
|
|
14194
|
+
var _a;
|
|
14139
14195
|
if (isButtonGroup(item)) {
|
|
14140
14196
|
acc = acc.concat([
|
|
14141
14197
|
...item.buttons,
|
|
14142
|
-
...groups[item.group]
|
|
14198
|
+
...(_a = groups[item.group]) !== null && _a !== void 0 ? _a : []
|
|
14143
14199
|
]);
|
|
14144
14200
|
} else {
|
|
14145
14201
|
acc.push(item);
|
|
@@ -14296,6 +14352,7 @@ class Icon {
|
|
|
14296
14352
|
/**
|
|
14297
14353
|
* Make icon html element
|
|
14298
14354
|
*/ static makeIcon(jodit, icon) {
|
|
14355
|
+
var _a, _b, _c, _d;
|
|
14299
14356
|
if (!icon) {
|
|
14300
14357
|
return;
|
|
14301
14358
|
}
|
|
@@ -14304,17 +14361,17 @@ class Icon {
|
|
|
14304
14361
|
const clearName = name.replace(/[^a-zA-Z0-9]/g, '_');
|
|
14305
14362
|
let iconFromEvent;
|
|
14306
14363
|
if (!/<svg/.test(name)) {
|
|
14307
|
-
iconFromEvent = jodit.o.getIcon
|
|
14364
|
+
iconFromEvent = (_b = (_a = jodit.o).getIcon) === null || _b === void 0 ? void 0 : _b.call(_a, name, clearName);
|
|
14308
14365
|
}
|
|
14309
|
-
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent
|
|
14366
|
+
const cacheKey = `${name}${iconURL}${fill}${iconFromEvent !== null && iconFromEvent !== void 0 ? iconFromEvent : ''}`;
|
|
14310
14367
|
if (jodit.o.cache && this.__cache.has(cacheKey)) {
|
|
14311
|
-
return this.__cache.get(cacheKey)
|
|
14368
|
+
return (_c = this.__cache.get(cacheKey)) === null || _c === void 0 ? void 0 : _c.cloneNode(true);
|
|
14312
14369
|
}
|
|
14313
14370
|
if (iconURL) {
|
|
14314
14371
|
iconElement = jodit.c.span();
|
|
14315
|
-
(0,_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(iconElement, 'backgroundImage', 'url(' + iconURL.replace('{basePath}', jodit
|
|
14372
|
+
(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) || '') + ')');
|
|
14316
14373
|
} else {
|
|
14317
|
-
const svg = iconFromEvent || Icon.get(name, '') || jodit.o.extraIcons
|
|
14374
|
+
const svg = iconFromEvent || Icon.get(name, '') || ((_d = jodit.o.extraIcons) === null || _d === void 0 ? void 0 : _d[name]);
|
|
14318
14375
|
if (svg) {
|
|
14319
14376
|
iconElement = jodit.c.fromHTML(svg.trim());
|
|
14320
14377
|
if (!/^<svg/i.test(name)) {
|
|
@@ -14832,11 +14889,12 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14832
14889
|
/**
|
|
14833
14890
|
* Helper for appended toolbar in its place
|
|
14834
14891
|
*/ buildToolbar() {
|
|
14892
|
+
var _a;
|
|
14835
14893
|
if (!this.o.toolbar) {
|
|
14836
14894
|
return;
|
|
14837
14895
|
}
|
|
14838
14896
|
const buttons = this.o.buttons ? (0,_helpers_array_index_js__WEBPACK_IMPORTED_MODULE_3__/* .splitArray */ .uM)(this.o.buttons) : [];
|
|
14839
|
-
this.toolbar
|
|
14897
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.setRemoveButtons(this.o.removeButtons).build(buttons.concat(this.o.extraButtons || [])).appendTo(this.toolbarContainer);
|
|
14840
14898
|
}
|
|
14841
14899
|
getRegisteredButtonGroups() {
|
|
14842
14900
|
return this.groupToButtons;
|
|
@@ -14844,8 +14902,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14844
14902
|
/**
|
|
14845
14903
|
* Register button for a group
|
|
14846
14904
|
*/ registerButton(btn) {
|
|
14905
|
+
var _a;
|
|
14847
14906
|
this.registeredButtons.add(btn);
|
|
14848
|
-
const group = btn.group
|
|
14907
|
+
const group = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other';
|
|
14849
14908
|
if (!this.groupToButtons[group]) {
|
|
14850
14909
|
this.groupToButtons[group] = [];
|
|
14851
14910
|
}
|
|
@@ -14859,8 +14918,9 @@ class ViewWithToolbar extends _view_js__WEBPACK_IMPORTED_MODULE_6__/* .View */ .
|
|
|
14859
14918
|
/**
|
|
14860
14919
|
* Remove button from a group
|
|
14861
14920
|
*/ unregisterButton(btn) {
|
|
14921
|
+
var _a;
|
|
14862
14922
|
this.registeredButtons.delete(btn);
|
|
14863
|
-
const groupName = btn.group
|
|
14923
|
+
const groupName = (_a = btn.group) !== null && _a !== void 0 ? _a : 'other', group = this.groupToButtons[groupName];
|
|
14864
14924
|
if (group) {
|
|
14865
14925
|
const index = group.indexOf(btn.name);
|
|
14866
14926
|
if (index !== -1) {
|
|
@@ -15096,7 +15156,8 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15096
15156
|
/**
|
|
15097
15157
|
* Can change ownerWindow here
|
|
15098
15158
|
*/ initOwners() {
|
|
15099
|
-
|
|
15159
|
+
var _a;
|
|
15160
|
+
this.ownerWindow = (_a = this.o.ownerWindow) !== null && _a !== void 0 ? _a : window;
|
|
15100
15161
|
}
|
|
15101
15162
|
/**
|
|
15102
15163
|
* Add option's event handlers in emitter
|
|
@@ -15104,7 +15165,7 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15104
15165
|
if (!options) {
|
|
15105
15166
|
return;
|
|
15106
15167
|
}
|
|
15107
|
-
const e = options
|
|
15168
|
+
const e = options === null || options === void 0 ? void 0 : options.events;
|
|
15108
15169
|
e && Object.keys(e).forEach((key)=>this.e.on(key, e[key]));
|
|
15109
15170
|
}
|
|
15110
15171
|
getInstance(moduleNameOrConstructor, options) {
|
|
@@ -15139,17 +15200,18 @@ let View = View_1 = class View extends _component_component_js__WEBPACK_IMPORTED
|
|
|
15139
15200
|
this.components.clear();
|
|
15140
15201
|
}
|
|
15141
15202
|
/** @override */ destruct() {
|
|
15203
|
+
var _a, _b, _c;
|
|
15142
15204
|
if (this.isDestructed) {
|
|
15143
15205
|
return;
|
|
15144
15206
|
}
|
|
15145
|
-
(0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'progressbar')
|
|
15146
|
-
(0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'message')
|
|
15207
|
+
(_a = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'progressbar')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
15208
|
+
(_b = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'message')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
15147
15209
|
if (this.events) {
|
|
15148
15210
|
this.events.destruct();
|
|
15149
15211
|
// @ts-ignore
|
|
15150
15212
|
this.events = undefined;
|
|
15151
15213
|
}
|
|
15152
|
-
(0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'buffer')
|
|
15214
|
+
(_c = (0,_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_5__/* .cached */ .PO)(this, 'buffer')) === null || _c === void 0 ? void 0 : _c.clear();
|
|
15153
15215
|
_dom_index_js__WEBPACK_IMPORTED_MODULE_7__/* .Dom */ .J.safeRemove(this.container);
|
|
15154
15216
|
super.destruct();
|
|
15155
15217
|
}
|
|
@@ -15267,9 +15329,10 @@ Object.keys(_styles_icons_index_js__WEBPACK_IMPORTED_MODULE_7__).filter(esFilter
|
|
|
15267
15329
|
});
|
|
15268
15330
|
// Modules
|
|
15269
15331
|
Object.keys(_modules_index_js__WEBPACK_IMPORTED_MODULE_4__).filter(esFilter).forEach((key)=>{
|
|
15332
|
+
var _a;
|
|
15270
15333
|
// @ts-ignore
|
|
15271
15334
|
const module = _modules_index_js__WEBPACK_IMPORTED_MODULE_4__[key];
|
|
15272
|
-
const name = (0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isFunction */ .Tn)(module.prototype
|
|
15335
|
+
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;
|
|
15273
15336
|
if (!(0,_core_helpers_checker_index_js__WEBPACK_IMPORTED_MODULE_1__/* .isString */ .Kg)(name)) {
|
|
15274
15337
|
console.warn('Module name must be a string', key);
|
|
15275
15338
|
return;
|
|
@@ -15749,7 +15812,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
15749
15812
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(command)) {
|
|
15750
15813
|
const hotkeys = this.o.commandToHotkeys[commandName] || this.o.commandToHotkeys[commandNameOriginal] || command.hotkeys;
|
|
15751
15814
|
if (hotkeys) {
|
|
15752
|
-
this.registerHotkeyToCommand(hotkeys, commandName, options
|
|
15815
|
+
this.registerHotkeyToCommand(hotkeys, commandName, options === null || options === void 0 ? void 0 : options.stopPropagation);
|
|
15753
15816
|
}
|
|
15754
15817
|
}
|
|
15755
15818
|
return this;
|
|
@@ -15760,7 +15823,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
15760
15823
|
const shortcuts = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.asArray)(hotkeys).map(_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.normalizeKeyAliases).map((hotkey)=>hotkey + '.hotkey').join(' ');
|
|
15761
15824
|
this.e.off(shortcuts).on(shortcuts, (type, stop)=>{
|
|
15762
15825
|
if (stop) {
|
|
15763
|
-
stop.shouldStop = shouldStop
|
|
15826
|
+
stop.shouldStop = shouldStop !== null && shouldStop !== void 0 ? shouldStop : true;
|
|
15764
15827
|
}
|
|
15765
15828
|
return this.execCommand(commandName); // because need `beforeCommand`
|
|
15766
15829
|
});
|
|
@@ -16208,7 +16271,7 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16208
16271
|
// if enter plugin isn't installed
|
|
16209
16272
|
try {
|
|
16210
16273
|
this.ed.execCommand('defaultParagraphSeparator', false, this.o.enter.toLowerCase());
|
|
16211
|
-
} catch
|
|
16274
|
+
} catch (_a) {}
|
|
16212
16275
|
});
|
|
16213
16276
|
}
|
|
16214
16277
|
/**
|
|
@@ -16294,13 +16357,14 @@ let Jodit = Jodit_1 = class Jodit extends _modules_index_js__WEBPACK_IMPORTED_MO
|
|
|
16294
16357
|
/**
|
|
16295
16358
|
* Jodit's Destructor. Remove editor, and return source input
|
|
16296
16359
|
*/ destruct() {
|
|
16360
|
+
var _a, _b;
|
|
16297
16361
|
if (this.isInDestruct) {
|
|
16298
16362
|
return;
|
|
16299
16363
|
}
|
|
16300
16364
|
this.setStatus(_modules_index_js__WEBPACK_IMPORTED_MODULE_7__.STATUSES.beforeDestruct);
|
|
16301
16365
|
this.__elementToPlace.clear();
|
|
16302
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')
|
|
16303
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')
|
|
16366
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'storage')) === null || _a === void 0 ? void 0 : _a.clear();
|
|
16367
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'buffer')) === null || _b === void 0 ? void 0 : _b.clear();
|
|
16304
16368
|
this.commands.clear();
|
|
16305
16369
|
this.__selectionLocked = null;
|
|
16306
16370
|
this.e.off(this.ow, 'resize');
|
|
@@ -21362,7 +21426,8 @@ Object.keys(exp).forEach((lang)=>{
|
|
|
21362
21426
|
this.jodit && action.setParentView(this.jodit);
|
|
21363
21427
|
action.setMod('context', 'menu');
|
|
21364
21428
|
action.onAction((e)=>{
|
|
21365
|
-
|
|
21429
|
+
var _a;
|
|
21430
|
+
(_a = item.exec) === null || _a === void 0 ? void 0 : _a.call(self, e);
|
|
21366
21431
|
self.clear();
|
|
21367
21432
|
self.close();
|
|
21368
21433
|
return false;
|
|
@@ -22298,6 +22363,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
22298
22363
|
const image = self.c.element('img');
|
|
22299
22364
|
image.setAttribute('src', src);
|
|
22300
22365
|
const onload = ()=>{
|
|
22366
|
+
var _a;
|
|
22301
22367
|
if (self.isInDestruct) {
|
|
22302
22368
|
return;
|
|
22303
22369
|
}
|
|
@@ -22314,7 +22380,7 @@ const CLASS_PREVIEW = 'jodit-file-browser-preview', preview_tpl_next = (next = '
|
|
|
22314
22380
|
temp_content.appendChild(preview_box);
|
|
22315
22381
|
preview_box.appendChild(image);
|
|
22316
22382
|
preview.setPosition();
|
|
22317
|
-
self
|
|
22383
|
+
(_a = self === null || self === void 0 ? void 0 : self.events) === null || _a === void 0 ? void 0 : _a.fire('previewOpenedAndLoaded');
|
|
22318
22384
|
};
|
|
22319
22385
|
self.e.on(image, 'load', onload);
|
|
22320
22386
|
if (image.complete) {
|
|
@@ -22870,7 +22936,7 @@ let DataProvider = class DataProvider {
|
|
|
22870
22936
|
const instances = this.__ajaxInstances;
|
|
22871
22937
|
if (instances.has(name)) {
|
|
22872
22938
|
const ajax = instances.get(name);
|
|
22873
|
-
ajax
|
|
22939
|
+
ajax === null || ajax === void 0 ? void 0 : ajax.abort();
|
|
22874
22940
|
instances.delete(name);
|
|
22875
22941
|
}
|
|
22876
22942
|
const opts = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)(this.options[name] !== undefined ? this.options[name] : {}, (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.ConfigProto)({
|
|
@@ -22975,7 +23041,10 @@ let DataProvider = class DataProvider {
|
|
|
22975
23041
|
generateItemsList(sources, mods = {}) {
|
|
22976
23042
|
const elements = [];
|
|
22977
23043
|
const canBeFile = (item)=>item.type === 'folder' || !mods.onlyImages || item.isImage === undefined || item.isImage;
|
|
22978
|
-
const inFilter = (item)
|
|
23044
|
+
const inFilter = (item)=>{
|
|
23045
|
+
var _a;
|
|
23046
|
+
return !((_a = mods.filterWord) === null || _a === void 0 ? void 0 : _a.length) || this.o.filter === undefined || this.o.filter(item, mods.filterWord);
|
|
23047
|
+
};
|
|
22979
23048
|
sources.forEach((source)=>{
|
|
22980
23049
|
if (source.files && source.files.length) {
|
|
22981
23050
|
const { sort } = this.o;
|
|
@@ -23403,10 +23472,11 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23403
23472
|
};
|
|
23404
23473
|
}
|
|
23405
23474
|
get _dialog() {
|
|
23475
|
+
var _a;
|
|
23406
23476
|
const dialog = this.dlg({
|
|
23407
23477
|
minWidth: Math.min(700, screen.width),
|
|
23408
23478
|
minHeight: 300,
|
|
23409
|
-
buttons: this.o.headerButtons
|
|
23479
|
+
buttons: (_a = this.o.headerButtons) !== null && _a !== void 0 ? _a : [
|
|
23410
23480
|
'fullsize',
|
|
23411
23481
|
'dialog.close'
|
|
23412
23482
|
]
|
|
@@ -23467,6 +23537,7 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23467
23537
|
*/ open(callback = this.o.defaultCallback, onlyImages = false) {
|
|
23468
23538
|
this.state.onlyImages = onlyImages;
|
|
23469
23539
|
return this.async.promise((resolve, reject)=>{
|
|
23540
|
+
var _a;
|
|
23470
23541
|
if (!this.o.items || !this.o.items.url) {
|
|
23471
23542
|
throw (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.error)('Need set options.filebrowser.ajax.url');
|
|
23472
23543
|
}
|
|
@@ -23479,15 +23550,16 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23479
23550
|
localTimeout = now;
|
|
23480
23551
|
}).off('select.filebrowser').on('select.filebrowser', this.onSelect(callback));
|
|
23481
23552
|
const header = this.c.div();
|
|
23482
|
-
this.toolbar
|
|
23553
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.appendTo(header);
|
|
23483
23554
|
this.__updateToolbarButtons();
|
|
23484
23555
|
this._dialog.open(this.browser, header);
|
|
23485
23556
|
this.e.fire('sort.filebrowser', this.state.sortBy);
|
|
23486
23557
|
(0,_fetch_load_tree_js__WEBPACK_IMPORTED_MODULE_11__/* .loadTree */ .r)(this).then(resolve, reject).finally(()=>{
|
|
23558
|
+
var _a;
|
|
23487
23559
|
if (this.isInDestruct) {
|
|
23488
23560
|
return;
|
|
23489
23561
|
}
|
|
23490
|
-
this
|
|
23562
|
+
(_a = this === null || this === void 0 ? void 0 : this.e) === null || _a === void 0 ? void 0 : _a.fire('fileBrowserReady.filebrowser');
|
|
23491
23563
|
});
|
|
23492
23564
|
}).catch((e)=>{
|
|
23493
23565
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isAbortError)(e) && !_core_constants_js__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
@@ -23496,7 +23568,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23496
23568
|
});
|
|
23497
23569
|
}
|
|
23498
23570
|
__getButtons() {
|
|
23499
|
-
|
|
23571
|
+
var _a;
|
|
23572
|
+
const options = (_a = this.o.buttons) !== null && _a !== void 0 ? _a : [];
|
|
23500
23573
|
return options.filter((btn)=>{
|
|
23501
23574
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__.isString)(btn)) {
|
|
23502
23575
|
return true;
|
|
@@ -23513,7 +23586,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23513
23586
|
});
|
|
23514
23587
|
}
|
|
23515
23588
|
initUploader(editor) {
|
|
23516
|
-
|
|
23589
|
+
var _a;
|
|
23590
|
+
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);
|
|
23517
23591
|
const uploadHandler = ()=>(0,_fetch_load_items_js__WEBPACK_IMPORTED_MODULE_18__/* .loadItems */ .f)(this);
|
|
23518
23592
|
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
23519
23593
|
self.uploader.setPath(self.state.currentPath).setSource(self.state.currentSource).bind(self.browser, uploadHandler, self.errorHandler);
|
|
@@ -23528,21 +23602,23 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23528
23602
|
});
|
|
23529
23603
|
}
|
|
23530
23604
|
destruct() {
|
|
23605
|
+
var _a;
|
|
23531
23606
|
if (this.isInDestruct) {
|
|
23532
23607
|
return;
|
|
23533
23608
|
}
|
|
23534
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '_dialog')
|
|
23609
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_2__.cached)(this, '_dialog')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
23535
23610
|
super.destruct();
|
|
23536
23611
|
this.events && this.e.off('.filebrowser');
|
|
23537
23612
|
this.uploader && this.uploader.destruct();
|
|
23538
23613
|
}
|
|
23539
23614
|
__updateToolbarButtons() {
|
|
23615
|
+
var _a;
|
|
23540
23616
|
const buttons = this.__getButtons();
|
|
23541
23617
|
if (isEqualButtonList(this.__prevButtons, buttons)) {
|
|
23542
23618
|
return;
|
|
23543
23619
|
}
|
|
23544
23620
|
this.__prevButtons = buttons;
|
|
23545
|
-
this.toolbar
|
|
23621
|
+
(_a = this.toolbar) === null || _a === void 0 ? void 0 : _a.build(buttons);
|
|
23546
23622
|
}
|
|
23547
23623
|
constructor(options){
|
|
23548
23624
|
super(options);
|
|
@@ -23636,8 +23712,8 @@ let FileBrowser = class FileBrowser extends _core_view_view_with_toolbar_js__WEB
|
|
|
23636
23712
|
}
|
|
23637
23713
|
if (storeLastOpenedFolder) {
|
|
23638
23714
|
const currentPath = self.storage.get('currentPath'), currentSource = self.storage.get('currentSource');
|
|
23639
|
-
self.state.currentPath = currentPath
|
|
23640
|
-
self.state.currentSource = currentSource
|
|
23715
|
+
self.state.currentPath = currentPath !== null && currentPath !== void 0 ? currentPath : '';
|
|
23716
|
+
self.state.currentSource = currentSource !== null && currentSource !== void 0 ? currentSource : '';
|
|
23641
23717
|
}
|
|
23642
23718
|
self.initUploader(self);
|
|
23643
23719
|
self.setStatus(_core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .STATUSES */ .f.ready);
|
|
@@ -24275,7 +24351,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.history = {
|
|
|
24275
24351
|
}
|
|
24276
24352
|
}
|
|
24277
24353
|
fireChangeStack() {
|
|
24278
|
-
|
|
24354
|
+
var _a;
|
|
24355
|
+
this.j && !this.j.isInDestruct && ((_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('changeStack'));
|
|
24279
24356
|
}
|
|
24280
24357
|
destruct() {
|
|
24281
24358
|
if (this.isInDestruct) {
|
|
@@ -24789,7 +24866,7 @@ const TABS = {
|
|
|
24789
24866
|
}
|
|
24790
24867
|
onTitleModeClick(e) {
|
|
24791
24868
|
const self = this, title = e.target;
|
|
24792
|
-
const slide = title
|
|
24869
|
+
const slide = title === null || title === void 0 ? void 0 : title.parentElement;
|
|
24793
24870
|
if (!slide) {
|
|
24794
24871
|
return;
|
|
24795
24872
|
}
|
|
@@ -25637,7 +25714,8 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
25637
25714
|
/**
|
|
25638
25715
|
* Height of statusbar
|
|
25639
25716
|
*/ getHeight() {
|
|
25640
|
-
|
|
25717
|
+
var _a, _b;
|
|
25718
|
+
return (_b = (_a = this.container) === null || _a === void 0 ? void 0 : _a.offsetHeight) !== null && _b !== void 0 ? _b : 0;
|
|
25641
25719
|
}
|
|
25642
25720
|
findEmpty(inTheRight = false) {
|
|
25643
25721
|
const items = this.getElms(inTheRight ? 'item-right' : 'item');
|
|
@@ -25651,12 +25729,13 @@ let StatusBar = class StatusBar extends _core_component_index_js__WEBPACK_IMPORT
|
|
|
25651
25729
|
/**
|
|
25652
25730
|
* Add element in statusbar
|
|
25653
25731
|
*/ append(child, inTheRight = false) {
|
|
25732
|
+
var _a;
|
|
25654
25733
|
const wrapper = this.findEmpty(inTheRight) || this.j.c.div(this.getFullElName('item'));
|
|
25655
25734
|
if (inTheRight) {
|
|
25656
25735
|
wrapper.classList.add(this.getFullElName('item-right'));
|
|
25657
25736
|
}
|
|
25658
25737
|
wrapper.appendChild(child);
|
|
25659
|
-
this.container
|
|
25738
|
+
(_a = this.container) === null || _a === void 0 ? void 0 : _a.appendChild(wrapper);
|
|
25660
25739
|
if (this.j.o.statusbar) {
|
|
25661
25740
|
this.show();
|
|
25662
25741
|
}
|
|
@@ -25855,6 +25934,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
25855
25934
|
return Table.__formalCoordinate(table, cell, max);
|
|
25856
25935
|
}
|
|
25857
25936
|
static __appendRow(table, line, after, create) {
|
|
25937
|
+
var _a;
|
|
25858
25938
|
let row;
|
|
25859
25939
|
if (!line) {
|
|
25860
25940
|
const columnsCount = Table.__getColumnsCount(table);
|
|
@@ -25880,7 +25960,7 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
25880
25960
|
} else if (!after && line) {
|
|
25881
25961
|
line.parentNode && line.parentNode.insertBefore(row, line);
|
|
25882
25962
|
} else {
|
|
25883
|
-
(table.getElementsByTagName('tbody')
|
|
25963
|
+
(((_a = table.getElementsByTagName('tbody')) === null || _a === void 0 ? void 0 : _a[0]) || table).appendChild(row);
|
|
25884
25964
|
}
|
|
25885
25965
|
}
|
|
25886
25966
|
/**
|
|
@@ -26293,8 +26373,9 @@ class Table extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Vie
|
|
|
26293
26373
|
return Table.__setColumnWidthByDelta(table, column, delta, noUnmark, marked);
|
|
26294
26374
|
}
|
|
26295
26375
|
static __mark(cell, key, value, marked) {
|
|
26376
|
+
var _a;
|
|
26296
26377
|
marked.push(cell);
|
|
26297
|
-
const dict = markedValue.get(cell)
|
|
26378
|
+
const dict = (_a = markedValue.get(cell)) !== null && _a !== void 0 ? _a : {};
|
|
26298
26379
|
dict[key] = value === undefined ? 1 : value;
|
|
26299
26380
|
markedValue.set(cell, dict);
|
|
26300
26381
|
}
|
|
@@ -26391,25 +26472,27 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26391
26472
|
return this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
26392
26473
|
}
|
|
26393
26474
|
/** @override **/ update() {
|
|
26475
|
+
var _a, _b;
|
|
26394
26476
|
const { control, state } = this, tc = this.closest(_collection_collection_js__WEBPACK_IMPORTED_MODULE_8__/* .ToolbarCollection */ .Q);
|
|
26395
26477
|
if (!tc) {
|
|
26396
26478
|
return;
|
|
26397
26479
|
}
|
|
26398
|
-
const value = control.value
|
|
26480
|
+
const value = (_a = control.value) === null || _a === void 0 ? void 0 : _a.call(control, tc.jodit, this);
|
|
26399
26481
|
if (value !== undefined) {
|
|
26400
26482
|
state.value = value;
|
|
26401
26483
|
}
|
|
26402
26484
|
state.disabled = this.__calculateDisabledStatus(tc);
|
|
26403
26485
|
state.activated = this.__calculateActivatedStatus(tc);
|
|
26404
|
-
control.update
|
|
26486
|
+
(_b = control.update) === null || _b === void 0 ? void 0 : _b.call(control, tc.jodit, this);
|
|
26405
26487
|
}
|
|
26406
26488
|
/**
|
|
26407
26489
|
* Calculates whether the button is active
|
|
26408
26490
|
*/ __calculateActivatedStatus(tc) {
|
|
26491
|
+
var _a, _b;
|
|
26409
26492
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isJoditObject)(this.j) && !this.j.editorIsActive) {
|
|
26410
26493
|
return false;
|
|
26411
26494
|
}
|
|
26412
|
-
if (this.control.isActive
|
|
26495
|
+
if ((_b = (_a = this.control).isActive) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
26413
26496
|
return true;
|
|
26414
26497
|
}
|
|
26415
26498
|
return Boolean(tc && tc.shouldBeActive(this));
|
|
@@ -26417,13 +26500,14 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26417
26500
|
/**
|
|
26418
26501
|
* Calculates whether an element is blocked for the user
|
|
26419
26502
|
*/ __calculateDisabledStatus(tc) {
|
|
26503
|
+
var _a, _b;
|
|
26420
26504
|
if (this.j.o.disabled) {
|
|
26421
26505
|
return true;
|
|
26422
26506
|
}
|
|
26423
26507
|
if (this.j.o.readonly && (!this.j.o.activeButtonsInReadOnly || !this.j.o.activeButtonsInReadOnly.includes(this.control.name))) {
|
|
26424
26508
|
return true;
|
|
26425
26509
|
}
|
|
26426
|
-
if (this.control.isDisabled
|
|
26510
|
+
if ((_b = (_a = this.control).isDisabled) === null || _b === void 0 ? void 0 : _b.call(_a, this.j, this)) {
|
|
26427
26511
|
return true;
|
|
26428
26512
|
}
|
|
26429
26513
|
return Boolean(tc && tc.shouldBeDisabled(this));
|
|
@@ -26460,7 +26544,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26460
26544
|
return container;
|
|
26461
26545
|
}
|
|
26462
26546
|
/** @override */ focus() {
|
|
26463
|
-
|
|
26547
|
+
var _a;
|
|
26548
|
+
(_a = this.container.querySelector('button')) === null || _a === void 0 ? void 0 : _a.focus();
|
|
26464
26549
|
}
|
|
26465
26550
|
onChangeHasTrigger() {
|
|
26466
26551
|
if (this.state.hasTrigger) {
|
|
@@ -26479,6 +26564,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26479
26564
|
/**
|
|
26480
26565
|
* Init constant data from control
|
|
26481
26566
|
*/ __initFromControl() {
|
|
26567
|
+
var _a;
|
|
26482
26568
|
const { control: ctr, state } = this;
|
|
26483
26569
|
this.updateSize();
|
|
26484
26570
|
state.name = ctr.name;
|
|
@@ -26491,7 +26577,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26491
26577
|
state.icon.iconURL = ctr.iconURL;
|
|
26492
26578
|
} else {
|
|
26493
26579
|
const name = ctr.icon || ctr.name;
|
|
26494
|
-
state.icon.name = _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_6__/* .Icon */ .I.exists(name) || this.j.o.extraIcons
|
|
26580
|
+
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 : '';
|
|
26495
26581
|
}
|
|
26496
26582
|
if (!ctr.iconURL && !state.icon.name) {
|
|
26497
26583
|
state.text = ctr.text || ctr.name;
|
|
@@ -26505,6 +26591,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26505
26591
|
/**
|
|
26506
26592
|
* Click on trigger button
|
|
26507
26593
|
*/ onTriggerClick(e) {
|
|
26594
|
+
var _a, _b, _c;
|
|
26508
26595
|
if (this.openedPopup) {
|
|
26509
26596
|
this.__closePopup();
|
|
26510
26597
|
return;
|
|
@@ -26521,7 +26608,7 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26521
26608
|
popup.parentElement = this;
|
|
26522
26609
|
try {
|
|
26523
26610
|
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) {
|
|
26524
|
-
const target = this.toolbar
|
|
26611
|
+
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;
|
|
26525
26612
|
const elm = ctr.popup(this.j, target, this.__closePopup, this);
|
|
26526
26613
|
if (elm) {
|
|
26527
26614
|
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);
|
|
@@ -26543,7 +26630,8 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26543
26630
|
/**
|
|
26544
26631
|
* Create an open popup list
|
|
26545
26632
|
*/ __openControlList(control) {
|
|
26546
|
-
|
|
26633
|
+
var _a;
|
|
26634
|
+
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);
|
|
26547
26635
|
const list = control.list, menu = this.openPopup(), toolbar = (0,_factory_js__WEBPACK_IMPORTED_MODULE_9__/* .makeCollection */ .$K)(this.j);
|
|
26548
26636
|
menu.parentElement = this;
|
|
26549
26637
|
toolbar.parentElement = menu;
|
|
@@ -26571,10 +26659,13 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26571
26659
|
const childControl = {
|
|
26572
26660
|
name: key.toString(),
|
|
26573
26661
|
template: childTemplate && ((j, k, v)=>childTemplate(j, k, v, this)),
|
|
26574
|
-
exec: control.childExec ? (view, current, options)=>
|
|
26662
|
+
exec: control.childExec ? (view, current, options)=>{
|
|
26663
|
+
var _a;
|
|
26664
|
+
return (_a = control.childExec) === null || _a === void 0 ? void 0 : _a.call(control, view, current, {
|
|
26575
26665
|
...options,
|
|
26576
26666
|
parentControl: control
|
|
26577
|
-
})
|
|
26667
|
+
});
|
|
26668
|
+
} : control.exec,
|
|
26578
26669
|
data: control.data,
|
|
26579
26670
|
command: control.command,
|
|
26580
26671
|
isActive: control.isChildActive,
|
|
@@ -26622,9 +26713,10 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26622
26713
|
/**
|
|
26623
26714
|
* Click handler
|
|
26624
26715
|
*/ onClick(originalEvent) {
|
|
26716
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
26625
26717
|
const { control: ctr } = this;
|
|
26626
26718
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isFunction)(ctr.exec)) {
|
|
26627
|
-
const target = this.toolbar
|
|
26719
|
+
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
26720
|
const result = ctr.exec(this.j, target, {
|
|
26629
26721
|
control: ctr,
|
|
26630
26722
|
originalEvent,
|
|
@@ -26632,13 +26724,13 @@ let ToolbarButton = class ToolbarButton extends _core_ui_button_index_js__WEBPAC
|
|
|
26632
26724
|
});
|
|
26633
26725
|
// For memorise exec
|
|
26634
26726
|
if (result !== false && result !== true) {
|
|
26635
|
-
this.j
|
|
26727
|
+
(_e = (_d = this.j) === null || _d === void 0 ? void 0 : _d.e) === null || _e === void 0 ? void 0 : _e.fire('synchro');
|
|
26636
26728
|
if (this.parentElement) {
|
|
26637
26729
|
this.parentElement.update();
|
|
26638
26730
|
}
|
|
26639
26731
|
/**
|
|
26640
26732
|
* Fired after calling `button.exec` function
|
|
26641
|
-
*/ this.j
|
|
26733
|
+
*/ (_g = (_f = this.j) === null || _f === void 0 ? void 0 : _f.e) === null || _g === void 0 ? void 0 : _g.fire('closeAllPopups afterExec');
|
|
26642
26734
|
}
|
|
26643
26735
|
if (result !== false) {
|
|
26644
26736
|
return;
|
|
@@ -26831,6 +26923,7 @@ let ToolbarSelect = class ToolbarSelect extends _button_js__WEBPACK_IMPORTED_MOD
|
|
|
26831
26923
|
return 'ToolbarSelect';
|
|
26832
26924
|
}
|
|
26833
26925
|
update() {
|
|
26926
|
+
var _a, _b, _c;
|
|
26834
26927
|
super.update();
|
|
26835
26928
|
this.state.icon.name = '';
|
|
26836
26929
|
const { list, data } = this.control;
|
|
@@ -26841,7 +26934,7 @@ let ToolbarSelect = class ToolbarSelect extends _button_js__WEBPACK_IMPORTED_MOD
|
|
|
26841
26934
|
key = keys[0];
|
|
26842
26935
|
}
|
|
26843
26936
|
const text = ((0,_core_helpers_checker_is_plain_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isPlainObject */ .Q)(list) ? list[key.toString()] || key : key).toString();
|
|
26844
|
-
this.state.text = this.control.textTemplate
|
|
26937
|
+
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;
|
|
26845
26938
|
}
|
|
26846
26939
|
}
|
|
26847
26940
|
};
|
|
@@ -27604,7 +27697,7 @@ function send(uploader, data) {
|
|
|
27604
27697
|
};
|
|
27605
27698
|
}).finally(()=>{
|
|
27606
27699
|
ajax.destruct();
|
|
27607
|
-
instances
|
|
27700
|
+
instances === null || instances === void 0 ? void 0 : instances.delete(ajax);
|
|
27608
27701
|
});
|
|
27609
27702
|
};
|
|
27610
27703
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_0__.isPromise)(requestData)) {
|
|
@@ -27786,7 +27879,7 @@ class Uploader extends _core_component_index_js__WEBPACK_IMPORTED_MODULE_0__/* .
|
|
|
27786
27879
|
instances.forEach((ajax)=>{
|
|
27787
27880
|
try {
|
|
27788
27881
|
ajax.destruct();
|
|
27789
|
-
} catch
|
|
27882
|
+
} catch (_a) {}
|
|
27790
27883
|
});
|
|
27791
27884
|
instances.clear();
|
|
27792
27885
|
}
|
|
@@ -28579,8 +28672,9 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_0__/* .Icon */ .I.set('enter', _enter_
|
|
|
28579
28672
|
});
|
|
28580
28673
|
}
|
|
28581
28674
|
/** @override */ beforeDestruct(_) {
|
|
28582
|
-
|
|
28583
|
-
(0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '
|
|
28675
|
+
var _a, _b;
|
|
28676
|
+
(_a = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__container')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
28677
|
+
(_b = (0,_core_decorators_cache_cache_js__WEBPACK_IMPORTED_MODULE_0__/* .cached */ .PO)(this, '__dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
28584
28678
|
}
|
|
28585
28679
|
constructor(jodit){
|
|
28586
28680
|
super(jodit);
|
|
@@ -29044,11 +29138,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__/* .Pl
|
|
|
29044
29138
|
/**
|
|
29045
29139
|
* Remove node and replace cursor position out of it
|
|
29046
29140
|
*/ safeRemoveEmptyNode(fakeNode) {
|
|
29141
|
+
var _a, _b;
|
|
29047
29142
|
const { range } = this.j.s;
|
|
29048
29143
|
if (range.startContainer === fakeNode) {
|
|
29049
29144
|
if (fakeNode.previousSibling) {
|
|
29050
29145
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(fakeNode.previousSibling)) {
|
|
29051
|
-
range.setStart(fakeNode.previousSibling, fakeNode.previousSibling.nodeValue
|
|
29146
|
+
range.setStart(fakeNode.previousSibling, (_b = (_a = fakeNode.previousSibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
29052
29147
|
} else {
|
|
29053
29148
|
range.setStartAfter(fakeNode.previousSibling);
|
|
29054
29149
|
}
|
|
@@ -29252,6 +29347,7 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
29252
29347
|
* @private
|
|
29253
29348
|
*/ // eslint-disable-next-line complexity
|
|
29254
29349
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
29350
|
+
var _a, _b;
|
|
29255
29351
|
const step = backspace ? -1 : 1;
|
|
29256
29352
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
29257
29353
|
let sibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
@@ -29263,18 +29359,18 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
29263
29359
|
}
|
|
29264
29360
|
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))){
|
|
29265
29361
|
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)){
|
|
29266
|
-
sibling = backspace ? sibling
|
|
29362
|
+
sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
|
|
29267
29363
|
}
|
|
29268
29364
|
if (!sibling) {
|
|
29269
29365
|
break;
|
|
29270
29366
|
}
|
|
29271
|
-
if (sibling.nodeValue
|
|
29367
|
+
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
29272
29368
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
29273
29369
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling.parentNode)) {
|
|
29274
29370
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
29275
29371
|
}
|
|
29276
29372
|
}
|
|
29277
|
-
if (!sibling.nodeValue
|
|
29373
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
29278
29374
|
removeNeighbor = sibling;
|
|
29279
29375
|
}
|
|
29280
29376
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
@@ -29358,7 +29454,8 @@ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
|
29358
29454
|
return removed;
|
|
29359
29455
|
}
|
|
29360
29456
|
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
29361
|
-
|
|
29457
|
+
var _a;
|
|
29458
|
+
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) {
|
|
29362
29459
|
for(let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1){
|
|
29363
29460
|
if (value[i] === ' ') {
|
|
29364
29461
|
value[i] = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
@@ -29630,9 +29727,10 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
29630
29727
|
*
|
|
29631
29728
|
* @private
|
|
29632
29729
|
*/ function checkUnwrapFirstListItem(jodit, fakeNode, backspace) {
|
|
29730
|
+
var _a;
|
|
29633
29731
|
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);
|
|
29634
29732
|
const { s } = jodit;
|
|
29635
|
-
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isLeaf(li) && li
|
|
29733
|
+
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)) {
|
|
29636
29734
|
const ul = li.parentElement;
|
|
29637
29735
|
const p = jodit.createInside.element(jodit.o.enterBlock);
|
|
29638
29736
|
(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);
|
|
@@ -30846,8 +30944,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
30846
30944
|
* Clipboard plugin - cut and copy functionality
|
|
30847
30945
|
*/ class clipboard {
|
|
30848
30946
|
init(editor) {
|
|
30849
|
-
|
|
30947
|
+
var _a;
|
|
30948
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>editor.registerButton(btn));
|
|
30850
30949
|
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)=>{
|
|
30950
|
+
var _a;
|
|
30851
30951
|
const selectedText = editor.s.html;
|
|
30852
30952
|
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);
|
|
30853
30953
|
if (clipboardData) {
|
|
@@ -30864,12 +30964,13 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
30864
30964
|
editor.s.focus();
|
|
30865
30965
|
}
|
|
30866
30966
|
event.preventDefault();
|
|
30867
|
-
editor
|
|
30967
|
+
(_a = editor === null || editor === void 0 ? void 0 : editor.events) === null || _a === void 0 ? void 0 : _a.fire('afterCopy', selectedText);
|
|
30868
30968
|
});
|
|
30869
30969
|
}
|
|
30870
30970
|
/** @override */ destruct(editor) {
|
|
30871
|
-
|
|
30872
|
-
|
|
30971
|
+
var _a, _b;
|
|
30972
|
+
(_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, '');
|
|
30973
|
+
(_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);
|
|
30873
30974
|
}
|
|
30874
30975
|
constructor(){
|
|
30875
30976
|
/** @override */ this.buttons = [
|
|
@@ -31496,8 +31597,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
31496
31597
|
}
|
|
31497
31598
|
}
|
|
31498
31599
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
31600
|
+
var _a;
|
|
31499
31601
|
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(leftSibling)) {
|
|
31500
|
-
const root = _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)
|
|
31602
|
+
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;
|
|
31501
31603
|
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);
|
|
31502
31604
|
if (leftText) {
|
|
31503
31605
|
range.setStartAfter(leftText);
|
|
@@ -31609,6 +31711,7 @@ var DragState;
|
|
|
31609
31711
|
/**
|
|
31610
31712
|
* Mouse move handler handler
|
|
31611
31713
|
*/ onDrag(event) {
|
|
31714
|
+
var _a, _b;
|
|
31612
31715
|
if (!this.draggable || this.state === DragState.IDLE) {
|
|
31613
31716
|
return;
|
|
31614
31717
|
}
|
|
@@ -31632,8 +31735,8 @@ var DragState;
|
|
|
31632
31735
|
display: 'inline-block',
|
|
31633
31736
|
left: event.clientX,
|
|
31634
31737
|
top: event.clientY,
|
|
31635
|
-
width: target
|
|
31636
|
-
height: target
|
|
31738
|
+
width: (_a = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a !== void 0 ? _a : 100,
|
|
31739
|
+
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
31637
31740
|
});
|
|
31638
31741
|
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(this.j, dragAndDropElement).appendChild(this.draggable);
|
|
31639
31742
|
}
|
|
@@ -32203,7 +32306,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', d
|
|
|
32203
32306
|
let block = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__/* .getBlockWrapper */ .Dk)(fake, jodit);
|
|
32204
32307
|
const isLi = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isLeaf(block);
|
|
32205
32308
|
// if use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
32206
|
-
if ((!isLi || event
|
|
32309
|
+
if ((!isLi || (event === null || event === void 0 ? void 0 : event.shiftKey)) && (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__/* .checkBR */ .lN)(fake, jodit, event === null || event === void 0 ? void 0 : event.shiftKey)) {
|
|
32207
32310
|
return false;
|
|
32208
32311
|
}
|
|
32209
32312
|
// wrap no wrapped element
|
|
@@ -32828,6 +32931,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
32828
32931
|
},
|
|
32829
32932
|
tooltip: 'Font size',
|
|
32830
32933
|
value: (editor, button)=>{
|
|
32934
|
+
var _a;
|
|
32831
32935
|
const current = editor.s.current();
|
|
32832
32936
|
if (!current) {
|
|
32833
32937
|
return;
|
|
@@ -32837,21 +32941,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
32837
32941
|
return;
|
|
32838
32942
|
}
|
|
32839
32943
|
const control = button.control;
|
|
32840
|
-
const cssKey = control.data
|
|
32944
|
+
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
32841
32945
|
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__/* .css */ .A)(box, cssKey);
|
|
32842
32946
|
return value.toString();
|
|
32843
32947
|
},
|
|
32844
32948
|
isChildActive: (editor, button)=>{
|
|
32949
|
+
var _a, _b;
|
|
32845
32950
|
const value = button.state.value;
|
|
32846
|
-
const normalize = button.control.data
|
|
32951
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
32847
32952
|
return Boolean(value && button.control.args && normalize(button.control.args[0].toString()) === normalize(value.toString()));
|
|
32848
32953
|
},
|
|
32849
32954
|
isActive: (editor, button)=>{
|
|
32955
|
+
var _a, _b;
|
|
32850
32956
|
const value = button.state.value;
|
|
32851
32957
|
if (!value) {
|
|
32852
32958
|
return false;
|
|
32853
32959
|
}
|
|
32854
|
-
const normalize = button.control.data
|
|
32960
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
32855
32961
|
let keySet = button.control.data.cacheListSet;
|
|
32856
32962
|
if (!keySet) {
|
|
32857
32963
|
const keys = Object.keys(button.control.list).map(normalize);
|
|
@@ -32885,7 +32991,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.font
|
|
|
32885
32991
|
let isAvailable = false;
|
|
32886
32992
|
try {
|
|
32887
32993
|
isAvailable = key.indexOf('dings') === -1 && document.fonts.check(`16px ${key}`, value);
|
|
32888
|
-
} catch
|
|
32994
|
+
} catch (_a) {}
|
|
32889
32995
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
32890
32996
|
},
|
|
32891
32997
|
data: {
|
|
@@ -32992,9 +33098,10 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('paragraph', _pa
|
|
|
32992
33098
|
_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.paragraph = {
|
|
32993
33099
|
command: 'formatBlock',
|
|
32994
33100
|
value (editor, button) {
|
|
33101
|
+
var _a, _b;
|
|
32995
33102
|
const control = button.control, current = editor.s.current();
|
|
32996
33103
|
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);
|
|
32997
|
-
return currentBox
|
|
33104
|
+
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;
|
|
32998
33105
|
},
|
|
32999
33106
|
update (editor, button) {
|
|
33000
33107
|
const control = button.control, current = editor.s.current();
|
|
@@ -33022,7 +33129,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.parag
|
|
|
33022
33129
|
pre: 'Code'
|
|
33023
33130
|
},
|
|
33024
33131
|
isChildActive: (editor, button)=>{
|
|
33025
|
-
|
|
33132
|
+
var _a, _b;
|
|
33133
|
+
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]));
|
|
33026
33134
|
},
|
|
33027
33135
|
isActive: (editor, button)=>{
|
|
33028
33136
|
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]);
|
|
@@ -33160,6 +33268,7 @@ const fullsizeStack = new Set();
|
|
|
33160
33268
|
}, /**
|
|
33161
33269
|
* Change editor's state between FullSize and normal
|
|
33162
33270
|
*/ toggle = (enable)=>{
|
|
33271
|
+
var _a;
|
|
33163
33272
|
const { container, events } = editor;
|
|
33164
33273
|
if (!container) {
|
|
33165
33274
|
return;
|
|
@@ -33172,7 +33281,7 @@ const fullsizeStack = new Set();
|
|
|
33172
33281
|
isEnabled = enable;
|
|
33173
33282
|
container.classList.toggle('jodit_fullsize', enable);
|
|
33174
33283
|
if (editor.toolbar) {
|
|
33175
|
-
(0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isJoditObject */ .y)(editor) && editor.toolbarContainer
|
|
33284
|
+
(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));
|
|
33176
33285
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(editor.toolbar.container, 'width', 'auto');
|
|
33177
33286
|
}
|
|
33178
33287
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -33191,7 +33300,8 @@ const fullsizeStack = new Set();
|
|
|
33191
33300
|
editor.e.on(editor.ow, 'resize', resize);
|
|
33192
33301
|
}
|
|
33193
33302
|
editor.e.on('afterInit afterOpen', ()=>{
|
|
33194
|
-
|
|
33303
|
+
var _a;
|
|
33304
|
+
editor.toggleFullSize((_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.fullsize);
|
|
33195
33305
|
}).on('toggleFullSize', toggle).on('beforeDestruct', ()=>{
|
|
33196
33306
|
isEnabled && toggle(false);
|
|
33197
33307
|
}).on('beforeDestruct', ()=>{
|
|
@@ -33637,7 +33747,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox
|
|
|
33637
33747
|
}
|
|
33638
33748
|
}
|
|
33639
33749
|
}).on(editor.ew, 'mousedown touchstart keydown keyup touchend click mouseup mousemove scroll', (e)=>{
|
|
33640
|
-
|
|
33750
|
+
var _a;
|
|
33751
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire(editor.ow, e);
|
|
33641
33752
|
});
|
|
33642
33753
|
}
|
|
33643
33754
|
return false;
|
|
@@ -33702,7 +33813,7 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
33702
33813
|
afterInit(jodit) {}
|
|
33703
33814
|
beforeDestruct(jodit) {
|
|
33704
33815
|
const buffer = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
|
|
33705
|
-
const list = buffer
|
|
33816
|
+
const list = buffer === null || buffer === void 0 ? void 0 : buffer.get(JODIT_IMAGE_BLOB_ID);
|
|
33706
33817
|
if (buffer && list) {
|
|
33707
33818
|
const keys = Object.keys(list);
|
|
33708
33819
|
for (const uri of keys){
|
|
@@ -33741,7 +33852,8 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
33741
33852
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
33742
33853
|
if (!elm.complete) {
|
|
33743
33854
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
33744
|
-
|
|
33855
|
+
var _a;
|
|
33856
|
+
!editor.isInDestruct && ((_a = editor.e) === null || _a === void 0 ? void 0 : _a.fire('resize'));
|
|
33745
33857
|
editor.e.off(elm, 'load', ElementOnLoad);
|
|
33746
33858
|
});
|
|
33747
33859
|
}
|
|
@@ -34037,9 +34149,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
34037
34149
|
}
|
|
34038
34150
|
}
|
|
34039
34151
|
/** @override */ beforeDestruct(editor) {
|
|
34040
|
-
|
|
34041
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '
|
|
34042
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '
|
|
34152
|
+
var _a, _b, _c;
|
|
34153
|
+
Object.values((_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach((b)=>b.destruct());
|
|
34154
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
34155
|
+
(_c = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
|
|
34043
34156
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
34044
34157
|
}
|
|
34045
34158
|
constructor(){
|
|
@@ -36190,7 +36303,7 @@ const align = {
|
|
|
36190
36303
|
const type = 'selection';
|
|
36191
36304
|
const sel = this.j.s.sel;
|
|
36192
36305
|
const range = this.j.s.range;
|
|
36193
|
-
if (sel
|
|
36306
|
+
if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) || this.isSelectedTarget(range)) {
|
|
36194
36307
|
if (this.type === type && this.popup.isOpened) {
|
|
36195
36308
|
this.hidePopup();
|
|
36196
36309
|
}
|
|
@@ -36458,6 +36571,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36458
36571
|
afterInit(jodit) {}
|
|
36459
36572
|
beforeDestruct(jodit) {}
|
|
36460
36573
|
onKeyDownArrow(e) {
|
|
36574
|
+
var _a;
|
|
36461
36575
|
if (e.key !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || !this.j.selection.isCollapsed()) {
|
|
36462
36576
|
return;
|
|
36463
36577
|
}
|
|
@@ -36465,7 +36579,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36465
36579
|
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(endContainer)) {
|
|
36466
36580
|
return;
|
|
36467
36581
|
}
|
|
36468
|
-
if (endContainer.nodeValue
|
|
36582
|
+
if (((_a = endContainer.nodeValue) === null || _a === void 0 ? void 0 : _a.length) === endOffset) {
|
|
36469
36583
|
const { parentNode } = endContainer;
|
|
36470
36584
|
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)) {
|
|
36471
36585
|
_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));
|
|
@@ -36931,7 +37045,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
36931
37045
|
dialog.open();
|
|
36932
37046
|
jodit.async.requestIdleCallback(()=>{
|
|
36933
37047
|
const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.refs)(htmlForm.container);
|
|
36934
|
-
url_input
|
|
37048
|
+
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
36935
37049
|
});
|
|
36936
37050
|
},
|
|
36937
37051
|
hotkeys: jodit.o.link.hotkeys
|
|
@@ -36948,15 +37062,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
36948
37062
|
}
|
|
36949
37063
|
}
|
|
36950
37064
|
onProcessPasteLink(ignore, html) {
|
|
37065
|
+
var _a, _b, _c, _d;
|
|
36951
37066
|
const { jodit } = this;
|
|
36952
37067
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
36953
37068
|
return;
|
|
36954
37069
|
}
|
|
36955
37070
|
jodit.e.stopPropagation('processPaste');
|
|
36956
37071
|
if (jodit.o.link.processVideoLink) {
|
|
36957
|
-
const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(jodit.o.video
|
|
36958
|
-
width: jodit.o.video
|
|
36959
|
-
height: jodit.o.video
|
|
37072
|
+
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, {
|
|
37073
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
37074
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
36960
37075
|
});
|
|
36961
37076
|
if (embed !== html) {
|
|
36962
37077
|
return jodit.createInside.fromHTML(embed);
|
|
@@ -37134,7 +37249,8 @@ __decorate([
|
|
|
37134
37249
|
], link.prototype, "__generateForm", null);
|
|
37135
37250
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
37136
37251
|
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
37137
|
-
|
|
37252
|
+
var _a;
|
|
37253
|
+
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
37138
37254
|
if (modeClassName === 'input') {
|
|
37139
37255
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
37140
37256
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
@@ -37147,7 +37263,7 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
37147
37263
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
37148
37264
|
}
|
|
37149
37265
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
37150
|
-
const className = className_select.selectedOptions.item(i)
|
|
37266
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37151
37267
|
if (className) {
|
|
37152
37268
|
a.classList.add(className);
|
|
37153
37269
|
}
|
|
@@ -37175,7 +37291,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
37175
37291
|
if (className) {
|
|
37176
37292
|
for(let i = 0; i < className_select.options.length; i++){
|
|
37177
37293
|
const option = className_select.options.item(i);
|
|
37178
|
-
if (option
|
|
37294
|
+
if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
|
|
37179
37295
|
option.selected = true;
|
|
37180
37296
|
}
|
|
37181
37297
|
}
|
|
@@ -37511,11 +37627,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
37511
37627
|
store = {
|
|
37512
37628
|
toolbar: (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_4__/* .makeCollection */ .$K)(editor),
|
|
37513
37629
|
rebuild: ()=>{
|
|
37630
|
+
var _a, _b;
|
|
37514
37631
|
if (button) {
|
|
37515
37632
|
const buttons = editor.e.fire('getDiffButtons.mobile', button.closest(_modules_toolbar_collection_collection_js__WEBPACK_IMPORTED_MODULE_3__/* .ToolbarCollection */ .Q));
|
|
37516
37633
|
if (buttons && store) {
|
|
37517
37634
|
store.toolbar.build((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(buttons));
|
|
37518
|
-
const w = editor.toolbar
|
|
37635
|
+
const w = ((_b = (_a = editor.toolbar) === null || _a === void 0 ? void 0 : _a.firstButton) === null || _b === void 0 ? void 0 : _b.container.offsetWidth) || 36;
|
|
37519
37636
|
store.toolbar.container.style.width = (w + 4) * 3 + 'px';
|
|
37520
37637
|
}
|
|
37521
37638
|
}
|
|
@@ -37579,10 +37696,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
37579
37696
|
});
|
|
37580
37697
|
if (editor.o.toolbarAdaptive) {
|
|
37581
37698
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', ()=>{
|
|
37699
|
+
var _a, _b;
|
|
37582
37700
|
if (!editor.o.toolbar) {
|
|
37583
37701
|
return;
|
|
37584
37702
|
}
|
|
37585
|
-
const width = (editor.container.parentElement
|
|
37703
|
+
const width = ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
37586
37704
|
const newStore = (()=>{
|
|
37587
37705
|
if (editor.isFullSize || width >= editor.o.sizeLG) {
|
|
37588
37706
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttons);
|
|
@@ -37598,7 +37716,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
37598
37716
|
if (newStore.toString() !== store.toString()) {
|
|
37599
37717
|
store = newStore;
|
|
37600
37718
|
editor.e.fire('closeAllPopups');
|
|
37601
|
-
editor.toolbar
|
|
37719
|
+
(_b = editor.toolbar) === null || _b === void 0 ? void 0 : _b.setRemoveButtons(editor.o.removeButtons).build(store.concat(editor.o.extraButtons));
|
|
37602
37720
|
}
|
|
37603
37721
|
}).on(editor.ow, 'load resize', ()=>editor.e.fire('recalcAdaptive'));
|
|
37604
37722
|
}
|
|
@@ -37626,8 +37744,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('mobile'
|
|
|
37626
37744
|
|
|
37627
37745
|
|
|
37628
37746
|
const memoExec = (jodit, _, { control })=>{
|
|
37747
|
+
var _a;
|
|
37629
37748
|
const key = `button${control.command}`;
|
|
37630
|
-
const value = (control.args && control.args[0])
|
|
37749
|
+
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);
|
|
37631
37750
|
(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key, value);
|
|
37632
37751
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
37633
37752
|
};
|
|
@@ -37715,7 +37834,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.ol =
|
|
|
37715
37834
|
element: command === 'insertunorderedlist' ? 'ul' : 'ol',
|
|
37716
37835
|
attributes: {
|
|
37717
37836
|
style: {
|
|
37718
|
-
listStyleType: type
|
|
37837
|
+
listStyleType: type !== null && type !== void 0 ? type : null
|
|
37719
37838
|
}
|
|
37720
37839
|
}
|
|
37721
37840
|
});
|
|
@@ -37829,11 +37948,12 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
37829
37948
|
/**
|
|
37830
37949
|
* Clear extra styles and tags from Word's pasted text
|
|
37831
37950
|
*/ insertFromWordByType(e, html, insertType, texts) {
|
|
37951
|
+
var _a;
|
|
37832
37952
|
switch(insertType){
|
|
37833
37953
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML:
|
|
37834
37954
|
{
|
|
37835
37955
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.applyStyles)(html);
|
|
37836
|
-
const value = this.j.events
|
|
37956
|
+
const value = (_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('beautifyHTML', html);
|
|
37837
37957
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(value)) {
|
|
37838
37958
|
html = value;
|
|
37839
37959
|
}
|
|
@@ -38321,9 +38441,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
38321
38441
|
return;
|
|
38322
38442
|
}
|
|
38323
38443
|
const dt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(e), texts = [
|
|
38324
|
-
dt
|
|
38325
|
-
dt
|
|
38326
|
-
dt
|
|
38444
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN),
|
|
38445
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML),
|
|
38446
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_RTF)
|
|
38327
38447
|
];
|
|
38328
38448
|
for (const value of texts){
|
|
38329
38449
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isHTML)(value) && (this.j.e.fire('processHTML', e, value, {
|
|
@@ -38339,7 +38459,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
38339
38459
|
* Default paster process
|
|
38340
38460
|
*/ defaultPasteProcess(e) {
|
|
38341
38461
|
const dt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(e);
|
|
38342
|
-
let text = dt
|
|
38462
|
+
let text = (dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML)) || (dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN));
|
|
38343
38463
|
if (dt && text && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.trim)(text) !== '') {
|
|
38344
38464
|
const result = this.j.e.fire('processPaste', e, text, (0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__/* .getAllTypes */ .DI)(dt));
|
|
38345
38465
|
if (result !== undefined) {
|
|
@@ -38488,11 +38608,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.useInputsPlace
|
|
|
38488
38608
|
* Check if root node is empty
|
|
38489
38609
|
* @private
|
|
38490
38610
|
*/ function isEditorEmpty(root) {
|
|
38611
|
+
var _a;
|
|
38491
38612
|
if (!root.firstChild) {
|
|
38492
38613
|
return true;
|
|
38493
38614
|
}
|
|
38494
38615
|
const first = root.firstChild;
|
|
38495
|
-
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has(first.nodeName
|
|
38616
|
+
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)) {
|
|
38496
38617
|
return false;
|
|
38497
38618
|
}
|
|
38498
38619
|
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);
|
|
@@ -38687,13 +38808,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
38687
38808
|
const rules = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(css).map((s)=>{
|
|
38688
38809
|
try {
|
|
38689
38810
|
return (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(s.cssRules);
|
|
38690
|
-
} catch
|
|
38811
|
+
} catch (_a) {}
|
|
38691
38812
|
return [];
|
|
38692
38813
|
}).flat();
|
|
38693
38814
|
return rules.filter((r)=>{
|
|
38694
38815
|
try {
|
|
38695
38816
|
return Boolean(r && el.matches(r.selectorText));
|
|
38696
|
-
} catch
|
|
38817
|
+
} catch (_a) {}
|
|
38697
38818
|
return false;
|
|
38698
38819
|
});
|
|
38699
38820
|
};
|
|
@@ -38759,7 +38880,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
38759
38880
|
scanFullPage: true
|
|
38760
38881
|
});
|
|
38761
38882
|
return cp.generateCSS();
|
|
38762
|
-
} catch
|
|
38883
|
+
} catch (_a) {}
|
|
38763
38884
|
return '';
|
|
38764
38885
|
}
|
|
38765
38886
|
|
|
@@ -39942,7 +40063,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find
|
|
|
39942
40063
|
while(next && !next.nextSibling && next !== root){
|
|
39943
40064
|
next = next.parentNode;
|
|
39944
40065
|
}
|
|
39945
|
-
step = next
|
|
40066
|
+
step = next === null || next === void 0 ? void 0 : next.nextSibling;
|
|
39946
40067
|
}
|
|
39947
40068
|
next = step;
|
|
39948
40069
|
}while (next && next !== root)
|
|
@@ -40072,7 +40193,8 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
40072
40193
|
*/
|
|
40073
40194
|
class SentenceFinder {
|
|
40074
40195
|
add(node) {
|
|
40075
|
-
|
|
40196
|
+
var _a;
|
|
40197
|
+
const value = ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
40076
40198
|
if (!value.length) {
|
|
40077
40199
|
return;
|
|
40078
40200
|
}
|
|
@@ -40248,12 +40370,13 @@ class SentenceFinder {
|
|
|
40248
40370
|
return false;
|
|
40249
40371
|
}
|
|
40250
40372
|
async findAndSelect(query, next) {
|
|
40373
|
+
var _a;
|
|
40251
40374
|
const bounds = await this.findQueryBounds(query, 'walker');
|
|
40252
40375
|
if (!bounds.length) {
|
|
40253
40376
|
return false;
|
|
40254
40377
|
}
|
|
40255
40378
|
if (this.previousQuery !== query || !(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
40256
|
-
this.drawPromise
|
|
40379
|
+
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
40257
40380
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
40258
40381
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
40259
40382
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
@@ -40291,7 +40414,10 @@ class SentenceFinder {
|
|
|
40291
40414
|
}
|
|
40292
40415
|
async isValidCache(promise) {
|
|
40293
40416
|
const res = await promise;
|
|
40294
|
-
return res.every((r)=>
|
|
40417
|
+
return res.every((r)=>{
|
|
40418
|
+
var _a, _b, _c, _d;
|
|
40419
|
+
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);
|
|
40420
|
+
});
|
|
40295
40421
|
}
|
|
40296
40422
|
async find(walker, query) {
|
|
40297
40423
|
if (!query.length) {
|
|
@@ -40311,7 +40437,8 @@ class SentenceFinder {
|
|
|
40311
40437
|
}
|
|
40312
40438
|
return false;
|
|
40313
40439
|
}).on('end', ()=>{
|
|
40314
|
-
|
|
40440
|
+
var _a;
|
|
40441
|
+
resolve((_a = sentence.ranges(query)) !== null && _a !== void 0 ? _a : []);
|
|
40315
40442
|
}).setWork(this.j.editor);
|
|
40316
40443
|
});
|
|
40317
40444
|
return this.cache[query];
|
|
@@ -40412,7 +40539,8 @@ class SentenceFinder {
|
|
|
40412
40539
|
}
|
|
40413
40540
|
}
|
|
40414
40541
|
/** @override */ beforeDestruct(jodit) {
|
|
40415
|
-
|
|
40542
|
+
var _a;
|
|
40543
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'ui')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
40416
40544
|
jodit.e.off('.search');
|
|
40417
40545
|
}
|
|
40418
40546
|
constructor(){
|
|
@@ -40565,7 +40693,7 @@ let UISearch = class UISearch extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE
|
|
|
40565
40693
|
this.j.e.fire('hidePopup');
|
|
40566
40694
|
this.setMod('replace', searchAndReplace);
|
|
40567
40695
|
// this.current = this.j.s.current();
|
|
40568
|
-
const selStr = query
|
|
40696
|
+
const selStr = query !== null && query !== void 0 ? query : (this.j.s.sel || '').toString();
|
|
40569
40697
|
if (selStr) {
|
|
40570
40698
|
this.queryInput.value = selStr;
|
|
40571
40699
|
}
|
|
@@ -40752,10 +40880,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
40752
40880
|
].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
|
|
40753
40881
|
// and mouseup on another cell call `click` only for `TR` element.
|
|
40754
40882
|
.on('clickTr clickTbody', ()=>{
|
|
40883
|
+
var _a;
|
|
40755
40884
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
40756
40885
|
if (cellsCount) {
|
|
40757
40886
|
if (cellsCount > 1) {
|
|
40758
|
-
this.j.s.sel
|
|
40887
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
40759
40888
|
}
|
|
40760
40889
|
return false;
|
|
40761
40890
|
}
|
|
@@ -40800,6 +40929,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
40800
40929
|
/**
|
|
40801
40930
|
* Mouse move inside the table
|
|
40802
40931
|
*/ __onMove(table, e) {
|
|
40932
|
+
var _a;
|
|
40803
40933
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
40804
40934
|
return;
|
|
40805
40935
|
}
|
|
@@ -40832,7 +40962,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
40832
40962
|
}
|
|
40833
40963
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
40834
40964
|
if (cellsCount > 1) {
|
|
40835
|
-
this.j.s.sel
|
|
40965
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
40836
40966
|
}
|
|
40837
40967
|
this.j.e.fire('hidePopup');
|
|
40838
40968
|
e.stopPropagation();
|
|
@@ -40841,14 +40971,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
40841
40971
|
const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
40842
40972
|
cell.appendChild(n);
|
|
40843
40973
|
this.j.async.setTimeout(()=>{
|
|
40844
|
-
|
|
40974
|
+
var _a;
|
|
40975
|
+
(_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(n);
|
|
40845
40976
|
}, this.j.defaultTimeout / 5);
|
|
40846
40977
|
})();
|
|
40847
40978
|
}
|
|
40848
40979
|
/**
|
|
40849
40980
|
* On click in outside - remove selection
|
|
40850
40981
|
*/ __onRemoveSelection(e) {
|
|
40851
|
-
|
|
40982
|
+
var _a;
|
|
40983
|
+
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) {
|
|
40852
40984
|
this.j.unlock();
|
|
40853
40985
|
this.unselectCells();
|
|
40854
40986
|
this.j.e.fire('hidePopup', 'cells');
|
|
@@ -41341,7 +41473,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.maxHeight = 'a
|
|
|
41341
41473
|
/**
|
|
41342
41474
|
* Returns service spaces: toolbar + statusbar
|
|
41343
41475
|
*/ __getNotWorkHeight() {
|
|
41344
|
-
|
|
41476
|
+
var _a, _b;
|
|
41477
|
+
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;
|
|
41345
41478
|
}
|
|
41346
41479
|
/**
|
|
41347
41480
|
* Calculate workspace height
|
|
@@ -41595,11 +41728,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_2__/* .SourceE
|
|
|
41595
41728
|
}
|
|
41596
41729
|
}
|
|
41597
41730
|
destruct() {
|
|
41731
|
+
var _a, _b;
|
|
41598
41732
|
this.instance.off('change', this.toWYSIWYG);
|
|
41599
41733
|
this.instance.off('focus', this.proxyOnFocus);
|
|
41600
41734
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
41601
41735
|
this.instance.destroy();
|
|
41602
|
-
this.j
|
|
41736
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.off('aceInited.source');
|
|
41603
41737
|
}
|
|
41604
41738
|
setValue(value) {
|
|
41605
41739
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
@@ -41883,8 +42017,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
41883
42017
|
this.j.e.fire(this, 'ready');
|
|
41884
42018
|
}
|
|
41885
42019
|
onReadyAlways(onReady) {
|
|
42020
|
+
var _a;
|
|
41886
42021
|
if (!this.isReady) {
|
|
41887
|
-
this.j.events
|
|
42022
|
+
(_a = this.j.events) === null || _a === void 0 ? void 0 : _a.on(this, 'ready', onReady);
|
|
41888
42023
|
} else {
|
|
41889
42024
|
onReady();
|
|
41890
42025
|
}
|
|
@@ -41937,8 +42072,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
41937
42072
|
* Plug-in change simple textarea on CodeMirror editor in Source code mode
|
|
41938
42073
|
*/ class source extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */ .k {
|
|
41939
42074
|
onInsertHTML(html) {
|
|
42075
|
+
var _a;
|
|
41940
42076
|
if (!this.j.o.readonly && !this.j.isEditorMode()) {
|
|
41941
|
-
this.sourceEditor
|
|
42077
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.insertRaw(html);
|
|
41942
42078
|
this.toWYSIWYG();
|
|
41943
42079
|
return false;
|
|
41944
42080
|
}
|
|
@@ -41997,19 +42133,23 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
41997
42133
|
return str.replace(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
41998
42134
|
}
|
|
41999
42135
|
onSelectAll(command) {
|
|
42136
|
+
var _a;
|
|
42000
42137
|
if (command.toLowerCase() === 'selectall' && this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
42001
|
-
this.sourceEditor
|
|
42138
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.selectAll();
|
|
42002
42139
|
return false;
|
|
42003
42140
|
}
|
|
42004
42141
|
}
|
|
42005
42142
|
getMirrorValue() {
|
|
42006
|
-
|
|
42143
|
+
var _a;
|
|
42144
|
+
return ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getValue()) || '';
|
|
42007
42145
|
}
|
|
42008
42146
|
setMirrorValue(value) {
|
|
42009
|
-
|
|
42147
|
+
var _a;
|
|
42148
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
42010
42149
|
}
|
|
42011
42150
|
setFocusToMirror() {
|
|
42012
|
-
|
|
42151
|
+
var _a;
|
|
42152
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42013
42153
|
}
|
|
42014
42154
|
saveSelection() {
|
|
42015
42155
|
if (this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
@@ -42071,10 +42211,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42071
42211
|
this.setFocusToMirror(); // need for setting focus after change mode
|
|
42072
42212
|
}
|
|
42073
42213
|
setMirrorSelectionRange(start, end) {
|
|
42074
|
-
|
|
42214
|
+
var _a;
|
|
42215
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
42075
42216
|
}
|
|
42076
42217
|
onReadonlyReact() {
|
|
42077
|
-
|
|
42218
|
+
var _a;
|
|
42219
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setReadOnly(this.j.o.readonly);
|
|
42078
42220
|
}
|
|
42079
42221
|
/** @override */ afterInit(editor) {
|
|
42080
42222
|
this.mirrorContainer = editor.c.div('jodit-source');
|
|
@@ -42084,22 +42226,25 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42084
42226
|
});
|
|
42085
42227
|
this.sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)('area', editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
42086
42228
|
editor.e.on(editor.ow, 'keydown', (e)=>{
|
|
42087
|
-
|
|
42229
|
+
var _a;
|
|
42230
|
+
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.isFocused)) {
|
|
42088
42231
|
this.sourceEditor.blur();
|
|
42089
42232
|
}
|
|
42090
42233
|
});
|
|
42091
42234
|
this.onReadonlyReact();
|
|
42092
42235
|
editor.e.on('placeholder.source', (text)=>{
|
|
42093
|
-
|
|
42236
|
+
var _a;
|
|
42237
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setPlaceHolder(text);
|
|
42094
42238
|
}).on('change.source', this.syncValueFromWYSIWYG).on('beautifyHTML', (html)=>html);
|
|
42095
42239
|
if (editor.o.beautifyHTML) {
|
|
42096
42240
|
const addEventListener = ()=>{
|
|
42241
|
+
var _a;
|
|
42097
42242
|
if (editor.isInDestruct) {
|
|
42098
42243
|
return false;
|
|
42099
42244
|
}
|
|
42100
42245
|
const html_beautify = editor.ow.html_beautify;
|
|
42101
42246
|
if (html_beautify && !editor.isInDestruct) {
|
|
42102
|
-
editor.events
|
|
42247
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
42103
42248
|
return true;
|
|
42104
42249
|
}
|
|
42105
42250
|
return false;
|
|
@@ -42118,18 +42263,21 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42118
42263
|
}
|
|
42119
42264
|
}
|
|
42120
42265
|
initSourceEditor(editor) {
|
|
42266
|
+
var _a;
|
|
42121
42267
|
if (editor.o.sourceEditor !== 'area') {
|
|
42122
42268
|
const sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
42123
42269
|
sourceEditor.onReadyAlways(()=>{
|
|
42124
|
-
|
|
42270
|
+
var _a, _b;
|
|
42271
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
42125
42272
|
this.sourceEditor = sourceEditor;
|
|
42126
42273
|
this.syncValueFromWYSIWYG(true);
|
|
42127
|
-
editor.events
|
|
42274
|
+
(_b = editor.events) === null || _b === void 0 ? void 0 : _b.fire('sourceEditorReady', editor);
|
|
42128
42275
|
});
|
|
42129
42276
|
} else {
|
|
42130
|
-
this.sourceEditor
|
|
42277
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.onReadyAlways(()=>{
|
|
42278
|
+
var _a;
|
|
42131
42279
|
this.syncValueFromWYSIWYG(true);
|
|
42132
|
-
editor.events
|
|
42280
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire('sourceEditorReady', editor);
|
|
42133
42281
|
});
|
|
42134
42282
|
}
|
|
42135
42283
|
}
|
|
@@ -42156,10 +42304,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42156
42304
|
this.tempMarkerEndReg = /{end-jodit-selection}/g;
|
|
42157
42305
|
// override it for ace editors
|
|
42158
42306
|
this.getSelectionStart = ()=>{
|
|
42159
|
-
|
|
42307
|
+
var _a, _b;
|
|
42308
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionStart()) !== null && _b !== void 0 ? _b : 0;
|
|
42160
42309
|
};
|
|
42161
42310
|
this.getSelectionEnd = ()=>{
|
|
42162
|
-
|
|
42311
|
+
var _a, _b;
|
|
42312
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionEnd()) !== null && _b !== void 0 ? _b : 0;
|
|
42163
42313
|
};
|
|
42164
42314
|
}
|
|
42165
42315
|
}
|
|
@@ -42257,12 +42407,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
42257
42407
|
},
|
|
42258
42408
|
isActive (jodit, _) {
|
|
42259
42409
|
const api = (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(jodit, 'speech');
|
|
42260
|
-
return Boolean(api
|
|
42410
|
+
return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
|
|
42261
42411
|
},
|
|
42262
42412
|
isDisabled (jodit) {
|
|
42263
42413
|
return !jodit.o.speechRecognize.api;
|
|
42264
42414
|
},
|
|
42265
42415
|
exec (jodit, current, { button, control }) {
|
|
42416
|
+
var _a;
|
|
42266
42417
|
const { api: ApiConstructor, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
|
|
42267
42418
|
if (!ApiConstructor) {
|
|
42268
42419
|
jodit.alert('Speech recognize API unsupported in your browser');
|
|
@@ -42272,7 +42423,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
42272
42423
|
if (!api) {
|
|
42273
42424
|
const nativeApi = new ApiConstructor();
|
|
42274
42425
|
api = new _helpers_recognize_manager_js__WEBPACK_IMPORTED_MODULE_5__/* .RecognizeManager */ .g(jodit.async, nativeApi);
|
|
42275
|
-
api.lang = (0,_core_helpers_checker_is_string_js__WEBPACK_IMPORTED_MODULE_7__/* .isString */ .K)(lang) ? lang : (0,_core_helpers_utils_attr_js__WEBPACK_IMPORTED_MODULE_0__/* .attr */ .C)(jodit.od.documentElement, 'lang')
|
|
42426
|
+
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;
|
|
42276
42427
|
api.continuous = continuous;
|
|
42277
42428
|
api.interimResults = interimResults;
|
|
42278
42429
|
api.sound = sound;
|
|
@@ -42312,7 +42463,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
42312
42463
|
interimResults: 'Interim Results'
|
|
42313
42464
|
},
|
|
42314
42465
|
childTemplate (jodit, key, value) {
|
|
42315
|
-
|
|
42466
|
+
var _a;
|
|
42467
|
+
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];
|
|
42316
42468
|
return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'> ${value}</span>`;
|
|
42317
42469
|
},
|
|
42318
42470
|
mods: {
|
|
@@ -43541,7 +43693,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
43541
43693
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
43542
43694
|
jodit.s.focus();
|
|
43543
43695
|
jodit.s.insertHTML(this.innerHTML);
|
|
43544
|
-
if (!e
|
|
43696
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
43545
43697
|
jodit.e.fire(this, 'close_dialog');
|
|
43546
43698
|
}
|
|
43547
43699
|
e && e.preventDefault();
|
|
@@ -44193,9 +44345,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video
|
|
|
44193
44345
|
content: formCode.container
|
|
44194
44346
|
});
|
|
44195
44347
|
formLink.onSubmit((data)=>{
|
|
44196
|
-
|
|
44197
|
-
|
|
44198
|
-
|
|
44348
|
+
var _a, _b, _c, _d;
|
|
44349
|
+
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, {
|
|
44350
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
44351
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
44199
44352
|
}));
|
|
44200
44353
|
});
|
|
44201
44354
|
formCode.onSubmit((data)=>{
|
|
@@ -44354,7 +44507,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.wrapNodes = {
|
|
|
44354
44507
|
super(...arguments);
|
|
44355
44508
|
/**
|
|
44356
44509
|
* Found Node which should be wrapped
|
|
44357
|
-
*/ this.isSuitableStart = (n)=>
|
|
44510
|
+
*/ this.isSuitableStart = (n)=>{
|
|
44511
|
+
var _a;
|
|
44512
|
+
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);
|
|
44513
|
+
};
|
|
44358
44514
|
/**
|
|
44359
44515
|
* Node should add in a block element
|
|
44360
44516
|
*/ this.isSuitable = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(n) || this.isNotWrapped(n);
|
|
@@ -44506,7 +44662,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showXPathInSta
|
|
|
44506
44662
|
this.j.s.select(elm);
|
|
44507
44663
|
return false;
|
|
44508
44664
|
}
|
|
44509
|
-
} catch
|
|
44665
|
+
} catch (_a) {}
|
|
44510
44666
|
this.j.s.select(bindElement);
|
|
44511
44667
|
return false;
|
|
44512
44668
|
};
|