jodit-pro 4.5.5 → 4.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +2 -2
- package/es2015/jodit.js +356 -378
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.css +1 -1
- package/es2018/jodit.fat.min.js +2 -2
- package/es2018/jodit.js +356 -378
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/autocomplete/autocomplete.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.css +1 -1
- package/es2018/plugins/backup/backup.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.css +1 -1
- package/es2018/plugins/button-generator/button-generator.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.css +1 -1
- package/es2018/plugins/color-picker/color-picker.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.css +1 -1
- package/es2018/plugins/emoji/emoji.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.css +1 -1
- package/es2018/plugins/finder/finder.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.css +1 -1
- package/es2018/plugins/google-maps/google-maps.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.css +1 -1
- package/es2018/plugins/keyboard/keyboard.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.css +1 -1
- package/es2018/plugins/paste-code/paste-code.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.css +1 -1
- package/es2018/plugins/todo-list/todo-list.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.css +1 -1
- package/es2018/plugins/translate/translate.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.css +1 -1
- package/es2018/plugins/tune-block/tune-block.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +2 -2
- package/es2021/jodit.js +427 -265
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +2 -2
- package/es2021.en/jodit.js +427 -265
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +356 -379
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/package.json +1 -1
package/es2021/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.5.
|
|
4
|
+
* Version: v4.5.7
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1245,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.5";
|
|
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);
|
|
@@ -29095,11 +29189,12 @@ class backspace extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_3__/* .Pl
|
|
|
29095
29189
|
/**
|
|
29096
29190
|
* Remove node and replace cursor position out of it
|
|
29097
29191
|
*/ safeRemoveEmptyNode(fakeNode) {
|
|
29192
|
+
var _a, _b;
|
|
29098
29193
|
const { range } = this.j.s;
|
|
29099
29194
|
if (range.startContainer === fakeNode) {
|
|
29100
29195
|
if (fakeNode.previousSibling) {
|
|
29101
29196
|
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(fakeNode.previousSibling)) {
|
|
29102
|
-
range.setStart(fakeNode.previousSibling, fakeNode.previousSibling.nodeValue
|
|
29197
|
+
range.setStart(fakeNode.previousSibling, (_b = (_a = fakeNode.previousSibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0);
|
|
29103
29198
|
} else {
|
|
29104
29199
|
range.setStartAfter(fakeNode.previousSibling);
|
|
29105
29200
|
}
|
|
@@ -29303,6 +29398,7 @@ function moveContentAndRemoveEmpty(jodit, mainClosestBox, sibling, backspace) {
|
|
|
29303
29398
|
* @private
|
|
29304
29399
|
*/ // eslint-disable-next-line complexity
|
|
29305
29400
|
function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
29401
|
+
var _a, _b;
|
|
29306
29402
|
const step = backspace ? -1 : 1;
|
|
29307
29403
|
const anotherSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, !backspace);
|
|
29308
29404
|
let sibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.sibling(fakeNode, backspace);
|
|
@@ -29314,18 +29410,18 @@ function checkRemoveChar(jodit, fakeNode, backspace, mode) {
|
|
|
29314
29410
|
}
|
|
29315
29411
|
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))){
|
|
29316
29412
|
while(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling)){
|
|
29317
|
-
sibling = backspace ? sibling
|
|
29413
|
+
sibling = backspace ? sibling === null || sibling === void 0 ? void 0 : sibling.lastChild : sibling === null || sibling === void 0 ? void 0 : sibling.firstChild;
|
|
29318
29414
|
}
|
|
29319
29415
|
if (!sibling) {
|
|
29320
29416
|
break;
|
|
29321
29417
|
}
|
|
29322
|
-
if (sibling.nodeValue
|
|
29418
|
+
if ((_a = sibling.nodeValue) === null || _a === void 0 ? void 0 : _a.length) {
|
|
29323
29419
|
removed = tryRemoveChar(sibling, backspace, step, anotherSibling);
|
|
29324
29420
|
if (!sibling.nodeValue.length && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isInlineBlock(sibling.parentNode)) {
|
|
29325
29421
|
sibling.nodeValue = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE;
|
|
29326
29422
|
}
|
|
29327
29423
|
}
|
|
29328
|
-
if (!sibling.nodeValue
|
|
29424
|
+
if (!((_b = sibling.nodeValue) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
29329
29425
|
removeNeighbor = sibling;
|
|
29330
29426
|
}
|
|
29331
29427
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_2__.isVoid)(removed) && removed !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE) {
|
|
@@ -29409,7 +29505,8 @@ function tryRemoveChar(sibling, backspace, step, anotherSibling) {
|
|
|
29409
29505
|
return removed;
|
|
29410
29506
|
}
|
|
29411
29507
|
function replaceSpaceOnNBSP(anotherSibling, backspace, value) {
|
|
29412
|
-
|
|
29508
|
+
var _a;
|
|
29509
|
+
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) {
|
|
29413
29510
|
for(let i = backspace ? value.length - 1 : 0; backspace ? i >= 0 : i < value.length; i += backspace ? -1 : 1){
|
|
29414
29511
|
if (value[i] === ' ') {
|
|
29415
29512
|
value[i] = _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE;
|
|
@@ -29681,9 +29778,10 @@ function checkRepeatRemoveCharAction(backspace, sibling, fakeNode, mode, removed
|
|
|
29681
29778
|
*
|
|
29682
29779
|
* @private
|
|
29683
29780
|
*/ function checkUnwrapFirstListItem(jodit, fakeNode, backspace) {
|
|
29781
|
+
var _a;
|
|
29684
29782
|
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);
|
|
29685
29783
|
const { s } = jodit;
|
|
29686
|
-
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isLeaf(li) && li
|
|
29784
|
+
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)) {
|
|
29687
29785
|
const ul = li.parentElement;
|
|
29688
29786
|
const p = jodit.createInside.element(jodit.o.enterBlock);
|
|
29689
29787
|
(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);
|
|
@@ -30897,8 +30995,10 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
30897
30995
|
* Clipboard plugin - cut and copy functionality
|
|
30898
30996
|
*/ class clipboard {
|
|
30899
30997
|
init(editor) {
|
|
30900
|
-
|
|
30998
|
+
var _a;
|
|
30999
|
+
(_a = this.buttons) === null || _a === void 0 ? void 0 : _a.forEach((btn)=>editor.registerButton(btn));
|
|
30901
31000
|
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)=>{
|
|
31001
|
+
var _a;
|
|
30902
31002
|
const selectedText = editor.s.html;
|
|
30903
31003
|
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);
|
|
30904
31004
|
if (clipboardData) {
|
|
@@ -30915,12 +31015,13 @@ const keys = Object.keys(_filters_index_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
|
30915
31015
|
editor.s.focus();
|
|
30916
31016
|
}
|
|
30917
31017
|
event.preventDefault();
|
|
30918
|
-
editor
|
|
31018
|
+
(_a = editor === null || editor === void 0 ? void 0 : editor.events) === null || _a === void 0 ? void 0 : _a.fire('afterCopy', selectedText);
|
|
30919
31019
|
});
|
|
30920
31020
|
}
|
|
30921
31021
|
/** @override */ destruct(editor) {
|
|
30922
|
-
|
|
30923
|
-
|
|
31022
|
+
var _a, _b;
|
|
31023
|
+
(_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, '');
|
|
31024
|
+
(_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);
|
|
30924
31025
|
}
|
|
30925
31026
|
constructor(){
|
|
30926
31027
|
/** @override */ this.buttons = [
|
|
@@ -31881,8 +31982,9 @@ class deleteCommand extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
31881
31982
|
}
|
|
31882
31983
|
}
|
|
31883
31984
|
__moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
31985
|
+
var _a;
|
|
31884
31986
|
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_0__/* .Dom */ .J.isText(leftSibling)) {
|
|
31885
|
-
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)
|
|
31987
|
+
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;
|
|
31886
31988
|
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);
|
|
31887
31989
|
if (leftText) {
|
|
31888
31990
|
range.setStartAfter(leftText);
|
|
@@ -31994,6 +32096,7 @@ var DragState;
|
|
|
31994
32096
|
/**
|
|
31995
32097
|
* Mouse move handler handler
|
|
31996
32098
|
*/ onDrag(event) {
|
|
32099
|
+
var _a, _b;
|
|
31997
32100
|
if (!this.draggable || this.state === DragState.IDLE) {
|
|
31998
32101
|
return;
|
|
31999
32102
|
}
|
|
@@ -32017,8 +32120,8 @@ var DragState;
|
|
|
32017
32120
|
display: 'inline-block',
|
|
32018
32121
|
left: event.clientX,
|
|
32019
32122
|
top: event.clientY,
|
|
32020
|
-
width: target
|
|
32021
|
-
height: target
|
|
32123
|
+
width: (_a = target === null || target === void 0 ? void 0 : target.offsetWidth) !== null && _a !== void 0 ? _a : 100,
|
|
32124
|
+
height: (_b = target === null || target === void 0 ? void 0 : target.offsetHeight) !== null && _b !== void 0 ? _b : 100
|
|
32022
32125
|
});
|
|
32023
32126
|
(0,_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .getContainer */ .My)(this.j, dragAndDropElement).appendChild(this.draggable);
|
|
32024
32127
|
}
|
|
@@ -32588,7 +32691,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('dtd', d
|
|
|
32588
32691
|
let block = (0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_5__/* .getBlockWrapper */ .Dk)(fake, jodit);
|
|
32589
32692
|
const isLi = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isLeaf(block);
|
|
32590
32693
|
// if use <br> defaultTag for break line or when was entered SHIFt key or in <td> or <th> or <blockquote>
|
|
32591
|
-
if ((!isLi || event
|
|
32694
|
+
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)) {
|
|
32592
32695
|
return false;
|
|
32593
32696
|
}
|
|
32594
32697
|
// wrap no wrapped element
|
|
@@ -33213,6 +33316,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
33213
33316
|
},
|
|
33214
33317
|
tooltip: 'Font size',
|
|
33215
33318
|
value: (editor, button)=>{
|
|
33319
|
+
var _a;
|
|
33216
33320
|
const current = editor.s.current();
|
|
33217
33321
|
if (!current) {
|
|
33218
33322
|
return;
|
|
@@ -33222,21 +33326,23 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.fonts
|
|
|
33222
33326
|
return;
|
|
33223
33327
|
}
|
|
33224
33328
|
const control = button.control;
|
|
33225
|
-
const cssKey = control.data
|
|
33329
|
+
const cssKey = ((_a = control.data) === null || _a === void 0 ? void 0 : _a.cssRule) || 'font-size';
|
|
33226
33330
|
const value = (0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_6__/* .css */ .A)(box, cssKey);
|
|
33227
33331
|
return value.toString();
|
|
33228
33332
|
},
|
|
33229
33333
|
isChildActive: (editor, button)=>{
|
|
33334
|
+
var _a, _b;
|
|
33230
33335
|
const value = button.state.value;
|
|
33231
|
-
const normalize = button.control.data
|
|
33336
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
33232
33337
|
return Boolean(value && button.control.args && normalize(button.control.args[0].toString()) === normalize(value.toString()));
|
|
33233
33338
|
},
|
|
33234
33339
|
isActive: (editor, button)=>{
|
|
33340
|
+
var _a, _b;
|
|
33235
33341
|
const value = button.state.value;
|
|
33236
33342
|
if (!value) {
|
|
33237
33343
|
return false;
|
|
33238
33344
|
}
|
|
33239
|
-
const normalize = button.control.data
|
|
33345
|
+
const normalize = (_b = (_a = button.control.data) === null || _a === void 0 ? void 0 : _a.normalize) !== null && _b !== void 0 ? _b : (v)=>v;
|
|
33240
33346
|
let keySet = button.control.data.cacheListSet;
|
|
33241
33347
|
if (!keySet) {
|
|
33242
33348
|
const keys = Object.keys(button.control.list).map(normalize);
|
|
@@ -33270,7 +33376,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.font
|
|
|
33270
33376
|
let isAvailable = false;
|
|
33271
33377
|
try {
|
|
33272
33378
|
isAvailable = key.indexOf('dings') === -1 && document.fonts.check(`16px ${key}`, value);
|
|
33273
|
-
} catch
|
|
33379
|
+
} catch (_a) {}
|
|
33274
33380
|
return `<span data-style="${key}" style="${isAvailable ? `font-family: ${key}!important;` : ''}">${value}</span>`;
|
|
33275
33381
|
},
|
|
33276
33382
|
data: {
|
|
@@ -33377,9 +33483,10 @@ _core_ui_icon_js__WEBPACK_IMPORTED_MODULE_1__/* .Icon */ .I.set('paragraph', _pa
|
|
|
33377
33483
|
_config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.paragraph = {
|
|
33378
33484
|
command: 'formatBlock',
|
|
33379
33485
|
value (editor, button) {
|
|
33486
|
+
var _a, _b;
|
|
33380
33487
|
const control = button.control, current = editor.s.current();
|
|
33381
33488
|
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);
|
|
33382
|
-
return currentBox
|
|
33489
|
+
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;
|
|
33383
33490
|
},
|
|
33384
33491
|
update (editor, button) {
|
|
33385
33492
|
const control = button.control, current = editor.s.current();
|
|
@@ -33407,7 +33514,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.parag
|
|
|
33407
33514
|
pre: 'Code'
|
|
33408
33515
|
},
|
|
33409
33516
|
isChildActive: (editor, button)=>{
|
|
33410
|
-
|
|
33517
|
+
var _a, _b;
|
|
33518
|
+
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]));
|
|
33411
33519
|
},
|
|
33412
33520
|
isActive: (editor, button)=>{
|
|
33413
33521
|
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]);
|
|
@@ -33545,6 +33653,7 @@ const fullsizeStack = new Set();
|
|
|
33545
33653
|
}, /**
|
|
33546
33654
|
* Change editor's state between FullSize and normal
|
|
33547
33655
|
*/ toggle = (enable)=>{
|
|
33656
|
+
var _a;
|
|
33548
33657
|
const { container, events } = editor;
|
|
33549
33658
|
if (!container) {
|
|
33550
33659
|
return;
|
|
@@ -33557,7 +33666,7 @@ const fullsizeStack = new Set();
|
|
|
33557
33666
|
isEnabled = enable;
|
|
33558
33667
|
container.classList.toggle('jodit_fullsize', enable);
|
|
33559
33668
|
if (editor.toolbar) {
|
|
33560
|
-
(0,_core_helpers_checker_is_jodit_object_js__WEBPACK_IMPORTED_MODULE_3__/* .isJoditObject */ .y)(editor) && editor.toolbarContainer
|
|
33669
|
+
(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));
|
|
33561
33670
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_2__/* .css */ .A)(editor.toolbar.container, 'width', 'auto');
|
|
33562
33671
|
}
|
|
33563
33672
|
enable ? fullsizeStack.add(container) : fullsizeStack.delete(container);
|
|
@@ -33576,7 +33685,8 @@ const fullsizeStack = new Set();
|
|
|
33576
33685
|
editor.e.on(editor.ow, 'resize', resize);
|
|
33577
33686
|
}
|
|
33578
33687
|
editor.e.on('afterInit afterOpen', ()=>{
|
|
33579
|
-
|
|
33688
|
+
var _a;
|
|
33689
|
+
editor.toggleFullSize((_a = editor === null || editor === void 0 ? void 0 : editor.options) === null || _a === void 0 ? void 0 : _a.fullsize);
|
|
33580
33690
|
}).on('toggleFullSize', toggle).on('beforeDestruct', ()=>{
|
|
33581
33691
|
isEnabled && toggle(false);
|
|
33582
33692
|
}).on('beforeDestruct', ()=>{
|
|
@@ -34022,7 +34132,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.iframeSandbox
|
|
|
34022
34132
|
}
|
|
34023
34133
|
}
|
|
34024
34134
|
}).on(editor.ew, 'mousedown touchstart keydown keyup touchend click mouseup mousemove scroll', (e)=>{
|
|
34025
|
-
|
|
34135
|
+
var _a;
|
|
34136
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire(editor.ow, e);
|
|
34026
34137
|
});
|
|
34027
34138
|
}
|
|
34028
34139
|
return false;
|
|
@@ -34087,7 +34198,7 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
34087
34198
|
afterInit(jodit) {}
|
|
34088
34199
|
beforeDestruct(jodit) {
|
|
34089
34200
|
const buffer = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(jodit, 'buffer');
|
|
34090
|
-
const list = buffer
|
|
34201
|
+
const list = buffer === null || buffer === void 0 ? void 0 : buffer.get(JODIT_IMAGE_BLOB_ID);
|
|
34091
34202
|
if (buffer && list) {
|
|
34092
34203
|
const keys = Object.keys(list);
|
|
34093
34204
|
for (const uri of keys){
|
|
@@ -34126,7 +34237,8 @@ const JODIT_IMAGE_BLOB_ID = JODIT_IMAGE_PROCESSOR_BINDED + 'blob-id';
|
|
|
34126
34237
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.dataBind)(elm, JODIT_IMAGE_PROCESSOR_BINDED, true);
|
|
34127
34238
|
if (!elm.complete) {
|
|
34128
34239
|
editor.e.on(elm, 'load', function ElementOnLoad() {
|
|
34129
|
-
|
|
34240
|
+
var _a;
|
|
34241
|
+
!editor.isInDestruct && ((_a = editor.e) === null || _a === void 0 ? void 0 : _a.fire('resize'));
|
|
34130
34242
|
editor.e.off(elm, 'load', ElementOnLoad);
|
|
34131
34243
|
});
|
|
34132
34244
|
}
|
|
@@ -34422,9 +34534,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.image = {
|
|
|
34422
34534
|
}
|
|
34423
34535
|
}
|
|
34424
34536
|
/** @override */ beforeDestruct(editor) {
|
|
34425
|
-
|
|
34426
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '
|
|
34427
|
-
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '
|
|
34537
|
+
var _a, _b, _c;
|
|
34538
|
+
Object.values((_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, '__buttons')) !== null && _a !== void 0 ? _a : {}).forEach((b)=>b.destruct());
|
|
34539
|
+
(_b = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'dialog')) === null || _b === void 0 ? void 0 : _b.destruct();
|
|
34540
|
+
(_c = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_0__.cached)(this, 'form')) === null || _c === void 0 ? void 0 : _c.destruct();
|
|
34428
34541
|
editor.e.off(editor.editor, '.imageproperties').off('.imageproperties');
|
|
34429
34542
|
}
|
|
34430
34543
|
constructor(){
|
|
@@ -36575,7 +36688,7 @@ const align = {
|
|
|
36575
36688
|
const type = 'selection';
|
|
36576
36689
|
const sel = this.j.s.sel;
|
|
36577
36690
|
const range = this.j.s.range;
|
|
36578
|
-
if (sel
|
|
36691
|
+
if ((sel === null || sel === void 0 ? void 0 : sel.isCollapsed) || this.isSelectedTarget(range)) {
|
|
36579
36692
|
if (this.type === type && this.popup.isOpened) {
|
|
36580
36693
|
this.hidePopup();
|
|
36581
36694
|
}
|
|
@@ -36843,6 +36956,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36843
36956
|
afterInit(jodit) {}
|
|
36844
36957
|
beforeDestruct(jodit) {}
|
|
36845
36958
|
onKeyDownArrow(e) {
|
|
36959
|
+
var _a;
|
|
36846
36960
|
if (e.key !== _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_RIGHT || !this.j.selection.isCollapsed()) {
|
|
36847
36961
|
return;
|
|
36848
36962
|
}
|
|
@@ -36850,7 +36964,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('justify
|
|
|
36850
36964
|
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__/* .Dom */ .J.isText(endContainer)) {
|
|
36851
36965
|
return;
|
|
36852
36966
|
}
|
|
36853
|
-
if (endContainer.nodeValue
|
|
36967
|
+
if (((_a = endContainer.nodeValue) === null || _a === void 0 ? void 0 : _a.length) === endOffset) {
|
|
36854
36968
|
const { parentNode } = endContainer;
|
|
36855
36969
|
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)) {
|
|
36856
36970
|
_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));
|
|
@@ -37688,7 +37802,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
37688
37802
|
dialog.open();
|
|
37689
37803
|
jodit.async.requestIdleCallback(()=>{
|
|
37690
37804
|
const { url_input } = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.refs)(htmlForm.container);
|
|
37691
|
-
url_input
|
|
37805
|
+
url_input === null || url_input === void 0 ? void 0 : url_input.focus();
|
|
37692
37806
|
});
|
|
37693
37807
|
},
|
|
37694
37808
|
hotkeys: jodit.o.link.hotkeys
|
|
@@ -37705,15 +37819,16 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.link
|
|
|
37705
37819
|
}
|
|
37706
37820
|
}
|
|
37707
37821
|
onProcessPasteLink(ignore, html) {
|
|
37822
|
+
var _a, _b, _c, _d;
|
|
37708
37823
|
const { jodit } = this;
|
|
37709
37824
|
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isURL)(html) || !jodit.o.link.processPastedLink) {
|
|
37710
37825
|
return;
|
|
37711
37826
|
}
|
|
37712
37827
|
jodit.e.stopPropagation('processPaste');
|
|
37713
37828
|
if (jodit.o.link.processVideoLink) {
|
|
37714
|
-
const embed = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(jodit.o.video
|
|
37715
|
-
width: jodit.o.video
|
|
37716
|
-
height: jodit.o.video
|
|
37829
|
+
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, {
|
|
37830
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
37831
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
37717
37832
|
});
|
|
37718
37833
|
if (embed !== html) {
|
|
37719
37834
|
return jodit.createInside.fromHTML(embed);
|
|
@@ -37891,7 +38006,8 @@ __decorate([
|
|
|
37891
38006
|
], link.prototype, "__generateForm", null);
|
|
37892
38007
|
_core_global_js__WEBPACK_IMPORTED_MODULE_2__/* .pluginSystem */ .fg.add('link', link);
|
|
37893
38008
|
function writeClasses(modeClassName, className_input, className_select, a) {
|
|
37894
|
-
|
|
38009
|
+
var _a;
|
|
38010
|
+
if (modeClassName && (className_input !== null && className_input !== void 0 ? className_input : className_select)) {
|
|
37895
38011
|
if (modeClassName === 'input') {
|
|
37896
38012
|
if (className_input.value === '' && a.hasAttribute('class')) {
|
|
37897
38013
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
@@ -37904,7 +38020,7 @@ function writeClasses(modeClassName, className_input, className_select, a) {
|
|
|
37904
38020
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.attr)(a, 'class', null);
|
|
37905
38021
|
}
|
|
37906
38022
|
for(let i = 0; i < className_select.selectedOptions.length; i++){
|
|
37907
|
-
const className = className_select.selectedOptions.item(i)
|
|
38023
|
+
const className = (_a = className_select.selectedOptions.item(i)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37908
38024
|
if (className) {
|
|
37909
38025
|
a.classList.add(className);
|
|
37910
38026
|
}
|
|
@@ -37932,7 +38048,7 @@ function readClassnames(modeClassName, className_input, link, className_select)
|
|
|
37932
38048
|
if (className) {
|
|
37933
38049
|
for(let i = 0; i < className_select.options.length; i++){
|
|
37934
38050
|
const option = className_select.options.item(i);
|
|
37935
|
-
if (option
|
|
38051
|
+
if ((option === null || option === void 0 ? void 0 : option.value) && option.value === className) {
|
|
37936
38052
|
option.selected = true;
|
|
37937
38053
|
}
|
|
37938
38054
|
}
|
|
@@ -38268,11 +38384,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38268
38384
|
store = {
|
|
38269
38385
|
toolbar: (0,_modules_toolbar_factory_js__WEBPACK_IMPORTED_MODULE_4__/* .makeCollection */ .$K)(editor),
|
|
38270
38386
|
rebuild: ()=>{
|
|
38387
|
+
var _a, _b;
|
|
38271
38388
|
if (button) {
|
|
38272
38389
|
const buttons = editor.e.fire('getDiffButtons.mobile', button.closest(_modules_toolbar_collection_collection_js__WEBPACK_IMPORTED_MODULE_3__/* .ToolbarCollection */ .Q));
|
|
38273
38390
|
if (buttons && store) {
|
|
38274
38391
|
store.toolbar.build((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(buttons));
|
|
38275
|
-
const w = editor.toolbar
|
|
38392
|
+
const w = ((_b = (_a = editor.toolbar) === null || _a === void 0 ? void 0 : _a.firstButton) === null || _b === void 0 ? void 0 : _b.container.offsetWidth) || 36;
|
|
38276
38393
|
store.toolbar.container.style.width = (w + 4) * 3 + 'px';
|
|
38277
38394
|
}
|
|
38278
38395
|
}
|
|
@@ -38336,10 +38453,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38336
38453
|
});
|
|
38337
38454
|
if (editor.o.toolbarAdaptive) {
|
|
38338
38455
|
editor.e.on('resize afterInit recalcAdaptive changePlace afterAddPlace', ()=>{
|
|
38456
|
+
var _a, _b;
|
|
38339
38457
|
if (!editor.o.toolbar) {
|
|
38340
38458
|
return;
|
|
38341
38459
|
}
|
|
38342
|
-
const width = (editor.container.parentElement
|
|
38460
|
+
const width = ((_a = editor.container.parentElement) !== null && _a !== void 0 ? _a : editor.container).offsetWidth;
|
|
38343
38461
|
const newStore = (()=>{
|
|
38344
38462
|
if (editor.isFullSize || width >= editor.o.sizeLG) {
|
|
38345
38463
|
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.splitArray)(editor.o.buttons);
|
|
@@ -38355,7 +38473,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.dots
|
|
|
38355
38473
|
if (newStore.toString() !== store.toString()) {
|
|
38356
38474
|
store = newStore;
|
|
38357
38475
|
editor.e.fire('closeAllPopups');
|
|
38358
|
-
editor.toolbar
|
|
38476
|
+
(_b = editor.toolbar) === null || _b === void 0 ? void 0 : _b.setRemoveButtons(editor.o.removeButtons).build(store.concat(editor.o.extraButtons));
|
|
38359
38477
|
}
|
|
38360
38478
|
}).on(editor.ow, 'load resize', ()=>editor.e.fire('recalcAdaptive'));
|
|
38361
38479
|
}
|
|
@@ -38383,8 +38501,9 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_0__/* .pluginSystem */ .fg.add('mobile'
|
|
|
38383
38501
|
|
|
38384
38502
|
|
|
38385
38503
|
const memoExec = (jodit, _, { control })=>{
|
|
38504
|
+
var _a;
|
|
38386
38505
|
const key = `button${control.command}`;
|
|
38387
|
-
const value = (control.args && control.args[0])
|
|
38506
|
+
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);
|
|
38388
38507
|
(0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_0__/* .dataBind */ .m)(jodit, key, value);
|
|
38389
38508
|
jodit.execCommand(control.command, false, value === 'default' ? null : value);
|
|
38390
38509
|
};
|
|
@@ -38472,7 +38591,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.ol =
|
|
|
38472
38591
|
element: command === 'insertunorderedlist' ? 'ul' : 'ol',
|
|
38473
38592
|
attributes: {
|
|
38474
38593
|
style: {
|
|
38475
|
-
listStyleType: type
|
|
38594
|
+
listStyleType: type !== null && type !== void 0 ? type : null
|
|
38476
38595
|
}
|
|
38477
38596
|
}
|
|
38478
38597
|
});
|
|
@@ -38586,11 +38705,12 @@ class pasteFromWord extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_4__/*
|
|
|
38586
38705
|
/**
|
|
38587
38706
|
* Clear extra styles and tags from Word's pasted text
|
|
38588
38707
|
*/ insertFromWordByType(e, html, insertType, texts) {
|
|
38708
|
+
var _a;
|
|
38589
38709
|
switch(insertType){
|
|
38590
38710
|
case _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSERT_AS_HTML:
|
|
38591
38711
|
{
|
|
38592
38712
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.applyStyles)(html);
|
|
38593
|
-
const value = this.j.events
|
|
38713
|
+
const value = (_a = this.j.events) === null || _a === void 0 ? void 0 : _a.fire('beautifyHTML', html);
|
|
38594
38714
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.isString)(value)) {
|
|
38595
38715
|
html = value;
|
|
38596
38716
|
}
|
|
@@ -39078,9 +39198,9 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
39078
39198
|
return;
|
|
39079
39199
|
}
|
|
39080
39200
|
const dt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(e), texts = [
|
|
39081
|
-
dt
|
|
39082
|
-
dt
|
|
39083
|
-
dt
|
|
39201
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_PLAIN),
|
|
39202
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_HTML),
|
|
39203
|
+
dt === null || dt === void 0 ? void 0 : dt.getData(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.TEXT_RTF)
|
|
39084
39204
|
];
|
|
39085
39205
|
for (const value of texts){
|
|
39086
39206
|
if ((0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.isHTML)(value) && (this.j.e.fire('processHTML', e, value, {
|
|
@@ -39096,7 +39216,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
39096
39216
|
* Default paster process
|
|
39097
39217
|
*/ defaultPasteProcess(e) {
|
|
39098
39218
|
const dt = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getDataTransfer)(e);
|
|
39099
|
-
let text = dt
|
|
39219
|
+
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));
|
|
39100
39220
|
if (dt && text && (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.trim)(text) !== '') {
|
|
39101
39221
|
const result = this.j.e.fire('processPaste', e, text, (0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__/* .getAllTypes */ .DI)(dt));
|
|
39102
39222
|
if (result !== undefined) {
|
|
@@ -39157,6 +39277,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_1__/* .Config */ .T.prototype.controls.paste
|
|
|
39157
39277
|
html = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.htmlspecialchars)(html);
|
|
39158
39278
|
break;
|
|
39159
39279
|
default:
|
|
39280
|
+
{
|
|
39281
|
+
const newHTML = this.j.e.fire('onCustomPasteHTMLOption', action, html, e);
|
|
39282
|
+
if (typeof newHTML === 'string') {
|
|
39283
|
+
html = newHTML;
|
|
39284
|
+
}
|
|
39285
|
+
}
|
|
39160
39286
|
}
|
|
39161
39287
|
}
|
|
39162
39288
|
(0,_helpers_js__WEBPACK_IMPORTED_MODULE_7__/* .pasteInsertHtml */ .sX)(e, this.j, html);
|
|
@@ -39245,11 +39371,12 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.useInputsPlace
|
|
|
39245
39371
|
* Check if root node is empty
|
|
39246
39372
|
* @private
|
|
39247
39373
|
*/ function isEditorEmpty(root) {
|
|
39374
|
+
var _a;
|
|
39248
39375
|
if (!root.firstChild) {
|
|
39249
39376
|
return true;
|
|
39250
39377
|
}
|
|
39251
39378
|
const first = root.firstChild;
|
|
39252
|
-
if (_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS.has(first.nodeName
|
|
39379
|
+
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)) {
|
|
39253
39380
|
return false;
|
|
39254
39381
|
}
|
|
39255
39382
|
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);
|
|
@@ -39444,13 +39571,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
39444
39571
|
const rules = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(css).map((s)=>{
|
|
39445
39572
|
try {
|
|
39446
39573
|
return (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_0__/* .toArray */ .$)(s.cssRules);
|
|
39447
|
-
} catch
|
|
39574
|
+
} catch (_a) {}
|
|
39448
39575
|
return [];
|
|
39449
39576
|
}).flat();
|
|
39450
39577
|
return rules.filter((r)=>{
|
|
39451
39578
|
try {
|
|
39452
39579
|
return Boolean(r && el.matches(r.selectorText));
|
|
39453
|
-
} catch
|
|
39580
|
+
} catch (_a) {}
|
|
39454
39581
|
return false;
|
|
39455
39582
|
});
|
|
39456
39583
|
};
|
|
@@ -39516,7 +39643,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_1__/* .pluginSystem */ .fg.add('preview
|
|
|
39516
39643
|
scanFullPage: true
|
|
39517
39644
|
});
|
|
39518
39645
|
return cp.generateCSS();
|
|
39519
|
-
} catch
|
|
39646
|
+
} catch (_a) {}
|
|
39520
39647
|
return '';
|
|
39521
39648
|
}
|
|
39522
39649
|
|
|
@@ -40699,7 +40826,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_2__/* .Config */ .T.prototype.controls.find
|
|
|
40699
40826
|
while(next && !next.nextSibling && next !== root){
|
|
40700
40827
|
next = next.parentNode;
|
|
40701
40828
|
}
|
|
40702
|
-
step = next
|
|
40829
|
+
step = next === null || next === void 0 ? void 0 : next.nextSibling;
|
|
40703
40830
|
}
|
|
40704
40831
|
next = step;
|
|
40705
40832
|
}while (next && next !== root)
|
|
@@ -40829,7 +40956,8 @@ function normalizeRanges(rng, restRanges, ci) {
|
|
|
40829
40956
|
*/
|
|
40830
40957
|
class SentenceFinder {
|
|
40831
40958
|
add(node) {
|
|
40832
|
-
|
|
40959
|
+
var _a;
|
|
40960
|
+
const value = ((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').toLowerCase();
|
|
40833
40961
|
if (!value.length) {
|
|
40834
40962
|
return;
|
|
40835
40963
|
}
|
|
@@ -41005,12 +41133,13 @@ class SentenceFinder {
|
|
|
41005
41133
|
return false;
|
|
41006
41134
|
}
|
|
41007
41135
|
async findAndSelect(query, next) {
|
|
41136
|
+
var _a;
|
|
41008
41137
|
const bounds = await this.findQueryBounds(query, 'walker');
|
|
41009
41138
|
if (!bounds.length) {
|
|
41010
41139
|
return false;
|
|
41011
41140
|
}
|
|
41012
41141
|
if (this.previousQuery !== query || !(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .getSelectionWrappers */ .zy)(this.j.editor).length) {
|
|
41013
|
-
this.drawPromise
|
|
41142
|
+
(_a = this.drawPromise) === null || _a === void 0 ? void 0 : _a.rejectCallback();
|
|
41014
41143
|
this.j.async.cancelAnimationFrame(this.wrapFrameRequest);
|
|
41015
41144
|
(0,_helpers_index_js__WEBPACK_IMPORTED_MODULE_7__/* .clearSelectionWrappers */ .IJ)(this.j);
|
|
41016
41145
|
this.drawPromise = this.__drawSelectionRanges(bounds);
|
|
@@ -41048,7 +41177,10 @@ class SentenceFinder {
|
|
|
41048
41177
|
}
|
|
41049
41178
|
async isValidCache(promise) {
|
|
41050
41179
|
const res = await promise;
|
|
41051
|
-
return res.every((r)=>
|
|
41180
|
+
return res.every((r)=>{
|
|
41181
|
+
var _a, _b, _c, _d;
|
|
41182
|
+
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);
|
|
41183
|
+
});
|
|
41052
41184
|
}
|
|
41053
41185
|
async find(walker, query) {
|
|
41054
41186
|
if (!query.length) {
|
|
@@ -41068,7 +41200,8 @@ class SentenceFinder {
|
|
|
41068
41200
|
}
|
|
41069
41201
|
return false;
|
|
41070
41202
|
}).on('end', ()=>{
|
|
41071
|
-
|
|
41203
|
+
var _a;
|
|
41204
|
+
resolve((_a = sentence.ranges(query)) !== null && _a !== void 0 ? _a : []);
|
|
41072
41205
|
}).setWork(this.j.editor);
|
|
41073
41206
|
});
|
|
41074
41207
|
return this.cache[query];
|
|
@@ -41169,7 +41302,8 @@ class SentenceFinder {
|
|
|
41169
41302
|
}
|
|
41170
41303
|
}
|
|
41171
41304
|
/** @override */ beforeDestruct(jodit) {
|
|
41172
|
-
|
|
41305
|
+
var _a;
|
|
41306
|
+
(_a = (0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.cached)(this, 'ui')) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
41173
41307
|
jodit.e.off('.search');
|
|
41174
41308
|
}
|
|
41175
41309
|
constructor(){
|
|
@@ -41322,7 +41456,7 @@ let UISearch = class UISearch extends _core_ui_index_js__WEBPACK_IMPORTED_MODULE
|
|
|
41322
41456
|
this.j.e.fire('hidePopup');
|
|
41323
41457
|
this.setMod('replace', searchAndReplace);
|
|
41324
41458
|
// this.current = this.j.s.current();
|
|
41325
|
-
const selStr = query
|
|
41459
|
+
const selStr = query !== null && query !== void 0 ? query : (this.j.s.sel || '').toString();
|
|
41326
41460
|
if (selStr) {
|
|
41327
41461
|
this.queryInput.value = selStr;
|
|
41328
41462
|
}
|
|
@@ -41509,10 +41643,11 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41509
41643
|
].map((e)=>e + '.select-cells').join(' '), this.onStartSelection)// For `clickEditor` correct working. Because `mousedown` on first cell
|
|
41510
41644
|
// and mouseup on another cell call `click` only for `TR` element.
|
|
41511
41645
|
.on('clickTr clickTbody', ()=>{
|
|
41646
|
+
var _a;
|
|
41512
41647
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
41513
41648
|
if (cellsCount) {
|
|
41514
41649
|
if (cellsCount > 1) {
|
|
41515
|
-
this.j.s.sel
|
|
41650
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
41516
41651
|
}
|
|
41517
41652
|
return false;
|
|
41518
41653
|
}
|
|
@@ -41557,6 +41692,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41557
41692
|
/**
|
|
41558
41693
|
* Mouse move inside the table
|
|
41559
41694
|
*/ __onMove(table, e) {
|
|
41695
|
+
var _a;
|
|
41560
41696
|
if (this.j.o.readonly && !this.j.isLocked) {
|
|
41561
41697
|
return;
|
|
41562
41698
|
}
|
|
@@ -41589,7 +41725,7 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41589
41725
|
}
|
|
41590
41726
|
const cellsCount = this.__tableModule.getAllSelectedCells().length;
|
|
41591
41727
|
if (cellsCount > 1) {
|
|
41592
|
-
this.j.s.sel
|
|
41728
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
41593
41729
|
}
|
|
41594
41730
|
this.j.e.fire('hidePopup');
|
|
41595
41731
|
e.stopPropagation();
|
|
@@ -41598,14 +41734,16 @@ class selectCells extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .
|
|
|
41598
41734
|
const n = this.j.createInside.fromHTML('<div style="color:rgba(0,0,0,0.01);width:0;height:0"> </div>');
|
|
41599
41735
|
cell.appendChild(n);
|
|
41600
41736
|
this.j.async.setTimeout(()=>{
|
|
41601
|
-
|
|
41737
|
+
var _a;
|
|
41738
|
+
(_a = n.parentNode) === null || _a === void 0 ? void 0 : _a.removeChild(n);
|
|
41602
41739
|
}, this.j.defaultTimeout / 5);
|
|
41603
41740
|
})();
|
|
41604
41741
|
}
|
|
41605
41742
|
/**
|
|
41606
41743
|
* On click in outside - remove selection
|
|
41607
41744
|
*/ __onRemoveSelection(e) {
|
|
41608
|
-
|
|
41745
|
+
var _a;
|
|
41746
|
+
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) {
|
|
41609
41747
|
this.j.unlock();
|
|
41610
41748
|
this.unselectCells();
|
|
41611
41749
|
this.j.e.fire('hidePopup', 'cells');
|
|
@@ -42098,7 +42236,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.maxHeight = 'a
|
|
|
42098
42236
|
/**
|
|
42099
42237
|
* Returns service spaces: toolbar + statusbar
|
|
42100
42238
|
*/ __getNotWorkHeight() {
|
|
42101
|
-
|
|
42239
|
+
var _a, _b;
|
|
42240
|
+
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;
|
|
42102
42241
|
}
|
|
42103
42242
|
/**
|
|
42104
42243
|
* Calculate workspace height
|
|
@@ -42352,11 +42491,12 @@ class AceEditor extends _sourceEditor_js__WEBPACK_IMPORTED_MODULE_2__/* .SourceE
|
|
|
42352
42491
|
}
|
|
42353
42492
|
}
|
|
42354
42493
|
destruct() {
|
|
42494
|
+
var _a, _b;
|
|
42355
42495
|
this.instance.off('change', this.toWYSIWYG);
|
|
42356
42496
|
this.instance.off('focus', this.proxyOnFocus);
|
|
42357
42497
|
this.instance.off('mousedown', this.proxyOnMouseDown);
|
|
42358
42498
|
this.instance.destroy();
|
|
42359
|
-
this.j
|
|
42499
|
+
(_b = (_a = this.j) === null || _a === void 0 ? void 0 : _a.events) === null || _b === void 0 ? void 0 : _b.off('aceInited.source');
|
|
42360
42500
|
}
|
|
42361
42501
|
setValue(value) {
|
|
42362
42502
|
if (!this.j.o.editHTMLDocumentMode && this.j.o.beautifyHTML) {
|
|
@@ -42640,8 +42780,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42640
42780
|
this.j.e.fire(this, 'ready');
|
|
42641
42781
|
}
|
|
42642
42782
|
onReadyAlways(onReady) {
|
|
42783
|
+
var _a;
|
|
42643
42784
|
if (!this.isReady) {
|
|
42644
|
-
this.j.events
|
|
42785
|
+
(_a = this.j.events) === null || _a === void 0 ? void 0 : _a.on(this, 'ready', onReady);
|
|
42645
42786
|
} else {
|
|
42646
42787
|
onReady();
|
|
42647
42788
|
}
|
|
@@ -42694,8 +42835,9 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42694
42835
|
* Plug-in change simple textarea on CodeMirror editor in Source code mode
|
|
42695
42836
|
*/ class source extends _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__/* .Plugin */ .k {
|
|
42696
42837
|
onInsertHTML(html) {
|
|
42838
|
+
var _a;
|
|
42697
42839
|
if (!this.j.o.readonly && !this.j.isEditorMode()) {
|
|
42698
|
-
this.sourceEditor
|
|
42840
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.insertRaw(html);
|
|
42699
42841
|
this.toWYSIWYG();
|
|
42700
42842
|
return false;
|
|
42701
42843
|
}
|
|
@@ -42754,19 +42896,23 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42754
42896
|
return str.replace(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INVISIBLE_SPACE_REG_EXP(), '');
|
|
42755
42897
|
}
|
|
42756
42898
|
onSelectAll(command) {
|
|
42899
|
+
var _a;
|
|
42757
42900
|
if (command.toLowerCase() === 'selectall' && this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_SOURCE) {
|
|
42758
|
-
this.sourceEditor
|
|
42901
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.selectAll();
|
|
42759
42902
|
return false;
|
|
42760
42903
|
}
|
|
42761
42904
|
}
|
|
42762
42905
|
getMirrorValue() {
|
|
42763
|
-
|
|
42906
|
+
var _a;
|
|
42907
|
+
return ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getValue()) || '';
|
|
42764
42908
|
}
|
|
42765
42909
|
setMirrorValue(value) {
|
|
42766
|
-
|
|
42910
|
+
var _a;
|
|
42911
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setValue(value);
|
|
42767
42912
|
}
|
|
42768
42913
|
setFocusToMirror() {
|
|
42769
|
-
|
|
42914
|
+
var _a;
|
|
42915
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.focus();
|
|
42770
42916
|
}
|
|
42771
42917
|
saveSelection() {
|
|
42772
42918
|
if (this.j.getRealMode() === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.MODE_WYSIWYG) {
|
|
@@ -42828,10 +42974,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42828
42974
|
this.setFocusToMirror(); // need for setting focus after change mode
|
|
42829
42975
|
}
|
|
42830
42976
|
setMirrorSelectionRange(start, end) {
|
|
42831
|
-
|
|
42977
|
+
var _a;
|
|
42978
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setSelectionRange(start, end);
|
|
42832
42979
|
}
|
|
42833
42980
|
onReadonlyReact() {
|
|
42834
|
-
|
|
42981
|
+
var _a;
|
|
42982
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setReadOnly(this.j.o.readonly);
|
|
42835
42983
|
}
|
|
42836
42984
|
/** @override */ afterInit(editor) {
|
|
42837
42985
|
this.mirrorContainer = editor.c.div('jodit-source');
|
|
@@ -42841,22 +42989,25 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42841
42989
|
});
|
|
42842
42990
|
this.sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)('area', editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
42843
42991
|
editor.e.on(editor.ow, 'keydown', (e)=>{
|
|
42844
|
-
|
|
42992
|
+
var _a;
|
|
42993
|
+
if (e.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ESC && ((_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.isFocused)) {
|
|
42845
42994
|
this.sourceEditor.blur();
|
|
42846
42995
|
}
|
|
42847
42996
|
});
|
|
42848
42997
|
this.onReadonlyReact();
|
|
42849
42998
|
editor.e.on('placeholder.source', (text)=>{
|
|
42850
|
-
|
|
42999
|
+
var _a;
|
|
43000
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.setPlaceHolder(text);
|
|
42851
43001
|
}).on('change.source', this.syncValueFromWYSIWYG).on('beautifyHTML', (html)=>html);
|
|
42852
43002
|
if (editor.o.beautifyHTML) {
|
|
42853
43003
|
const addEventListener = ()=>{
|
|
43004
|
+
var _a;
|
|
42854
43005
|
if (editor.isInDestruct) {
|
|
42855
43006
|
return false;
|
|
42856
43007
|
}
|
|
42857
43008
|
const html_beautify = editor.ow.html_beautify;
|
|
42858
43009
|
if (html_beautify && !editor.isInDestruct) {
|
|
42859
|
-
editor.events
|
|
43010
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.off('beautifyHTML').on('beautifyHTML', (html)=>html_beautify(html));
|
|
42860
43011
|
return true;
|
|
42861
43012
|
}
|
|
42862
43013
|
return false;
|
|
@@ -42875,18 +43026,21 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42875
43026
|
}
|
|
42876
43027
|
}
|
|
42877
43028
|
initSourceEditor(editor) {
|
|
43029
|
+
var _a;
|
|
42878
43030
|
if (editor.o.sourceEditor !== 'area') {
|
|
42879
43031
|
const sourceEditor = (0,_editor_factory_js__WEBPACK_IMPORTED_MODULE_7__/* .createSourceEditor */ .b)(editor.o.sourceEditor, editor, this.mirrorContainer, this.toWYSIWYG, this.fromWYSIWYG);
|
|
42880
43032
|
sourceEditor.onReadyAlways(()=>{
|
|
42881
|
-
|
|
43033
|
+
var _a, _b;
|
|
43034
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
42882
43035
|
this.sourceEditor = sourceEditor;
|
|
42883
43036
|
this.syncValueFromWYSIWYG(true);
|
|
42884
|
-
editor.events
|
|
43037
|
+
(_b = editor.events) === null || _b === void 0 ? void 0 : _b.fire('sourceEditorReady', editor);
|
|
42885
43038
|
});
|
|
42886
43039
|
} else {
|
|
42887
|
-
this.sourceEditor
|
|
43040
|
+
(_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.onReadyAlways(()=>{
|
|
43041
|
+
var _a;
|
|
42888
43042
|
this.syncValueFromWYSIWYG(true);
|
|
42889
|
-
editor.events
|
|
43043
|
+
(_a = editor.events) === null || _a === void 0 ? void 0 : _a.fire('sourceEditorReady', editor);
|
|
42890
43044
|
});
|
|
42891
43045
|
}
|
|
42892
43046
|
}
|
|
@@ -42913,10 +43067,12 @@ function createSourceEditor(type, editor, container, toWYSIWYG, fromWYSIWYG) {
|
|
|
42913
43067
|
this.tempMarkerEndReg = /{end-jodit-selection}/g;
|
|
42914
43068
|
// override it for ace editors
|
|
42915
43069
|
this.getSelectionStart = ()=>{
|
|
42916
|
-
|
|
43070
|
+
var _a, _b;
|
|
43071
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionStart()) !== null && _b !== void 0 ? _b : 0;
|
|
42917
43072
|
};
|
|
42918
43073
|
this.getSelectionEnd = ()=>{
|
|
42919
|
-
|
|
43074
|
+
var _a, _b;
|
|
43075
|
+
return (_b = (_a = this.sourceEditor) === null || _a === void 0 ? void 0 : _a.getSelectionEnd()) !== null && _b !== void 0 ? _b : 0;
|
|
42920
43076
|
};
|
|
42921
43077
|
}
|
|
42922
43078
|
}
|
|
@@ -43014,12 +43170,13 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43014
43170
|
},
|
|
43015
43171
|
isActive (jodit, _) {
|
|
43016
43172
|
const api = (0,_core_helpers_utils_data_bind_js__WEBPACK_IMPORTED_MODULE_1__/* .dataBind */ .m)(jodit, 'speech');
|
|
43017
|
-
return Boolean(api
|
|
43173
|
+
return Boolean(api === null || api === void 0 ? void 0 : api.isEnabled);
|
|
43018
43174
|
},
|
|
43019
43175
|
isDisabled (jodit) {
|
|
43020
43176
|
return !jodit.o.speechRecognize.api;
|
|
43021
43177
|
},
|
|
43022
43178
|
exec (jodit, current, { button, control }) {
|
|
43179
|
+
var _a;
|
|
43023
43180
|
const { api: ApiConstructor, lang, continuous, interimResults, sound } = jodit.o.speechRecognize;
|
|
43024
43181
|
if (!ApiConstructor) {
|
|
43025
43182
|
jodit.alert('Speech recognize API unsupported in your browser');
|
|
@@ -43029,7 +43186,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43029
43186
|
if (!api) {
|
|
43030
43187
|
const nativeApi = new ApiConstructor();
|
|
43031
43188
|
api = new _helpers_recognize_manager_js__WEBPACK_IMPORTED_MODULE_5__/* .RecognizeManager */ .g(jodit.async, nativeApi);
|
|
43032
|
-
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')
|
|
43189
|
+
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;
|
|
43033
43190
|
api.continuous = continuous;
|
|
43034
43191
|
api.interimResults = interimResults;
|
|
43035
43192
|
api.sound = sound;
|
|
@@ -43069,7 +43226,8 @@ _config_js__WEBPACK_IMPORTED_MODULE_3__/* .Config */ .T.prototype.controls.speec
|
|
|
43069
43226
|
interimResults: 'Interim Results'
|
|
43070
43227
|
},
|
|
43071
43228
|
childTemplate (jodit, key, value) {
|
|
43072
|
-
|
|
43229
|
+
var _a;
|
|
43230
|
+
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];
|
|
43073
43231
|
return `<span class='jodit-speech-recognize__list-item'><input ${checked ? 'checked' : ''} class='jodit-checkbox' type='checkbox'> ${value}</span>`;
|
|
43074
43232
|
},
|
|
43075
43233
|
mods: {
|
|
@@ -45524,7 +45682,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45524
45682
|
if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isTag(this, 'a')) {
|
|
45525
45683
|
jodit.s.focus();
|
|
45526
45684
|
jodit.s.insertHTML(this.innerHTML);
|
|
45527
|
-
if (!e
|
|
45685
|
+
if (!(e === null || e === void 0 ? void 0 : e.shiftKey)) {
|
|
45528
45686
|
jodit.e.fire(this, 'close_dialog');
|
|
45529
45687
|
}
|
|
45530
45688
|
e && e.preventDefault();
|
|
@@ -46176,9 +46334,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_4__/* .Config */ .T.prototype.controls.video
|
|
|
46176
46334
|
content: formCode.container
|
|
46177
46335
|
});
|
|
46178
46336
|
formLink.onSubmit((data)=>{
|
|
46179
|
-
|
|
46180
|
-
|
|
46181
|
-
|
|
46337
|
+
var _a, _b, _c, _d;
|
|
46338
|
+
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, {
|
|
46339
|
+
width: (_c = jodit.o.video) === null || _c === void 0 ? void 0 : _c.defaultWidth,
|
|
46340
|
+
height: (_d = jodit.o.video) === null || _d === void 0 ? void 0 : _d.defaultHeight
|
|
46182
46341
|
}));
|
|
46183
46342
|
});
|
|
46184
46343
|
formCode.onSubmit((data)=>{
|
|
@@ -46337,7 +46496,10 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.wrapNodes = {
|
|
|
46337
46496
|
super(...arguments);
|
|
46338
46497
|
/**
|
|
46339
46498
|
* Found Node which should be wrapped
|
|
46340
|
-
*/ this.isSuitableStart = (n)=>
|
|
46499
|
+
*/ this.isSuitableStart = (n)=>{
|
|
46500
|
+
var _a;
|
|
46501
|
+
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);
|
|
46502
|
+
};
|
|
46341
46503
|
/**
|
|
46342
46504
|
* Node should add in a block element
|
|
46343
46505
|
*/ this.isSuitable = (n)=>_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__/* .Dom */ .J.isText(n) || this.isNotWrapped(n);
|
|
@@ -46489,7 +46651,7 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__/* .Config */ .T.prototype.showXPathInSta
|
|
|
46489
46651
|
this.j.s.select(elm);
|
|
46490
46652
|
return false;
|
|
46491
46653
|
}
|
|
46492
|
-
} catch
|
|
46654
|
+
} catch (_a) {}
|
|
46493
46655
|
this.j.s.select(bindElement);
|
|
46494
46656
|
return false;
|
|
46495
46657
|
};
|