jodit-pro 4.19.4 → 4.19.5
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 +6 -6
- package/es2015/jodit.js +500 -102
- package/es2015/jodit.min.js +41 -41
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2015/plugins/chart/chart.js +1 -1
- package/es2015/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2015/plugins/math/math.js +1 -1
- package/es2015/plugins/math/math.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/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.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.fat.min.js +6 -6
- package/es2018/jodit.min.js +7 -7
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/math/math.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.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 +7 -7
- package/es2021/jodit.js +500 -102
- package/es2021/jodit.min.js +19 -19
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2021/plugins/chart/chart.js +1 -1
- package/es2021/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021/plugins/math/math.js +1 -1
- package/es2021/plugins/math/math.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/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.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 +7 -7
- package/es2021.en/jodit.js +500 -102
- package/es2021.en/jodit.min.js +7 -7
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es2021.en/plugins/chart/chart.js +1 -1
- package/es2021.en/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es2021.en/plugins/math/math.js +1 -1
- package/es2021.en/plugins/math/math.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/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.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 +584 -107
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- 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/chart/chart.css +1 -1
- package/es5/plugins/chart/chart.js +1 -1
- package/es5/plugins/chart/chart.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/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.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/math/math.css +1 -1
- package/es5/plugins/math/math.js +1 -1
- package/es5/plugins/math/math.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/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.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/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/package.json +1 -1
package/es5/jodit.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.19.
|
|
4
|
+
* Version: v4.19.5
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -2333,7 +2333,7 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
2333
2333
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
2334
2334
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
2335
2335
|
}
|
|
2336
|
-
var APP_VERSION = "4.19.
|
|
2336
|
+
var APP_VERSION = "4.19.5";
|
|
2337
2337
|
// prettier-ignore
|
|
2338
2338
|
var ES = "es5";
|
|
2339
2339
|
var IS_ES_MODERN = false;
|
|
@@ -17730,9 +17730,11 @@ var WRAP_NODES = new Set([
|
|
|
17730
17730
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
17731
17731
|
/* harmony export */ ApplyStyle: function() { return /* binding */ ApplyStyle; }
|
|
17732
17732
|
/* harmony export */ });
|
|
17733
|
-
/* harmony import */ var
|
|
17734
|
-
/* harmony import */ var
|
|
17735
|
-
/* harmony import */ var
|
|
17733
|
+
/* harmony import */ var _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
|
|
17734
|
+
/* harmony import */ var _helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(76078);
|
|
17735
|
+
/* harmony import */ var _api_index_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(63687);
|
|
17736
|
+
/* harmony import */ var _constants_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(77361);
|
|
17737
|
+
/* harmony import */ var _transactions_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(55307);
|
|
17736
17738
|
/*!
|
|
17737
17739
|
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
17738
17740
|
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
@@ -17740,13 +17742,40 @@ var WRAP_NODES = new Set([
|
|
|
17740
17742
|
*/
|
|
17741
17743
|
|
|
17742
17744
|
|
|
17745
|
+
|
|
17746
|
+
|
|
17747
|
+
/**
|
|
17748
|
+
* Take a selected fragment out of the elements its style takes the place
|
|
17749
|
+
* of: one around it is split, so the fragment leaves it, and one in it is
|
|
17750
|
+
* unwrapped
|
|
17751
|
+
*/ function takeOutOf(jodit, font, tags) {
|
|
17752
|
+
var range = jodit.s.createRange();
|
|
17753
|
+
var outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
17754
|
+
while(outer){
|
|
17755
|
+
range.selectNodeContents(outer);
|
|
17756
|
+
range.setEndBefore(font);
|
|
17757
|
+
var before = range.cloneContents();
|
|
17758
|
+
range.selectNodeContents(outer);
|
|
17759
|
+
range.setStartAfter(font);
|
|
17760
|
+
// Split only when there's more in it, as a split leaves empty copies
|
|
17761
|
+
// of the elements between
|
|
17762
|
+
if (!_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(before) || !_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.isEmpty(range.cloneContents())) {
|
|
17763
|
+
(0,_api_index_js__WEBPACK_IMPORTED_MODULE_2__.extractSelectedPart)(outer, font, jodit);
|
|
17764
|
+
}
|
|
17765
|
+
_dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(outer);
|
|
17766
|
+
outer = _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(font.parentNode, tags, jodit.editor);
|
|
17767
|
+
}
|
|
17768
|
+
;(0,_helpers_utils_selector_js__WEBPACK_IMPORTED_MODULE_1__.$$)(tags.join(','), font).forEach(function(inner) {
|
|
17769
|
+
return _dom_dom_js__WEBPACK_IMPORTED_MODULE_0__.Dom.unwrap(inner);
|
|
17770
|
+
});
|
|
17771
|
+
}
|
|
17743
17772
|
/** @internal */ function ApplyStyle(jodit, cs) {
|
|
17744
|
-
var _a;
|
|
17773
|
+
var _a, _b;
|
|
17745
17774
|
var sel = jodit.s, editor = jodit.editor;
|
|
17746
17775
|
(_a = editor.firstChild) === null || _a === void 0 ? void 0 : _a.normalize(); // FF fix for test "commandsTest - Exec command "bold"
|
|
17747
17776
|
var fakes = sel.fakes();
|
|
17748
17777
|
var collapsed = sel.isCollapsed();
|
|
17749
|
-
var mode =
|
|
17778
|
+
var mode = _constants_js__WEBPACK_IMPORTED_MODULE_3__.INITIAL;
|
|
17750
17779
|
try {
|
|
17751
17780
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
17752
17781
|
try {
|
|
@@ -17754,16 +17783,19 @@ var WRAP_NODES = new Set([
|
|
|
17754
17783
|
// temporary wrapper before the selection is restored in finally.
|
|
17755
17784
|
for(var _iterator = sel.wrapInTagGen(fakes)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
17756
17785
|
var font = _step.value;
|
|
17786
|
+
if ((_b = cs.options.exclude) === null || _b === void 0 ? void 0 : _b.length) {
|
|
17787
|
+
takeOutOf(jodit, font, cs.options.exclude);
|
|
17788
|
+
}
|
|
17757
17789
|
var state = {
|
|
17758
17790
|
collapsed: collapsed,
|
|
17759
17791
|
mode: mode,
|
|
17760
17792
|
element: font,
|
|
17761
|
-
next:
|
|
17793
|
+
next: _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START,
|
|
17762
17794
|
jodit: jodit,
|
|
17763
17795
|
style: cs
|
|
17764
17796
|
};
|
|
17765
|
-
var machine = new
|
|
17766
|
-
while(!jodit.isInDestruct && machine.getState() !==
|
|
17797
|
+
var machine = new _api_index_js__WEBPACK_IMPORTED_MODULE_2__.FiniteStateMachine(_transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.START, _transactions_js__WEBPACK_IMPORTED_MODULE_4__.transactions);
|
|
17798
|
+
while(!jodit.isInDestruct && machine.getState() !== _transactions_js__WEBPACK_IMPORTED_MODULE_4__.states.END){
|
|
17767
17799
|
state = machine.dispatch('exec', state);
|
|
17768
17800
|
}
|
|
17769
17801
|
// The first selected fragment determines how later fragments toggle.
|
|
@@ -26499,6 +26531,20 @@ var FOCUS_EVENTS = new Set([
|
|
|
26499
26531
|
'focusin',
|
|
26500
26532
|
'focusout'
|
|
26501
26533
|
]);
|
|
26534
|
+
var EDITING_KEYS = new Set([
|
|
26535
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_ENTER,
|
|
26536
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_BACKSPACE,
|
|
26537
|
+
_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_DELETE
|
|
26538
|
+
]);
|
|
26539
|
+
/**
|
|
26540
|
+
* Whether the input method (IME) is using the key. Safari fires the keydown
|
|
26541
|
+
* that ends a composition, as the Enter that confirms Japanese text, after
|
|
26542
|
+
* `compositionend`, and types Korean without one, so `isComposing` is false and
|
|
26543
|
+
* only keyCode 229 tells. Only the keys the editor turns into edits are held
|
|
26544
|
+
* back: the handlers that follow typing still see the rest.
|
|
26545
|
+
*/ function isInputMethodKey(event) {
|
|
26546
|
+
return event.isComposing || event.keyCode === 229 && EDITING_KEYS.has(event.key);
|
|
26547
|
+
}
|
|
26502
26548
|
var __defaultStyleDisplayKey = 'data-jodit-default-style-display';
|
|
26503
26549
|
var __defaultClassesKey = 'data-jodit-default-classes';
|
|
26504
26550
|
var NOEDIT = {
|
|
@@ -27789,7 +27835,7 @@ var Jodit = Jodit_1 = /*#__PURE__*/ function(ViewWithToolbar) {
|
|
|
27789
27835
|
}
|
|
27790
27836
|
}
|
|
27791
27837
|
var w = _this.ew;
|
|
27792
|
-
if (_instanceof(event, w.KeyboardEvent) && event
|
|
27838
|
+
if (_instanceof(event, w.KeyboardEvent) && isInputMethodKey(event)) {
|
|
27793
27839
|
return;
|
|
27794
27840
|
}
|
|
27795
27841
|
if (_this.e && _this.e.fire) {
|
|
@@ -47892,6 +47938,13 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
47892
47938
|
if (checkJoinBareText(jodit, fakeNode, backspace)) {
|
|
47893
47939
|
return true;
|
|
47894
47940
|
}
|
|
47941
|
+
// Old content can have an inline element round blocks beside the text:
|
|
47942
|
+
// moved inside them, the line joins the block as it would bare text
|
|
47943
|
+
// (#1781)
|
|
47944
|
+
var inline = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
47945
|
+
if (joinsBareText(jodit, edgeBlock(inline, backspace)) && moveInlineInside(inline, jodit.editor)) {
|
|
47946
|
+
return joinNeighbors(jodit, fakeNode, backspace, moved);
|
|
47947
|
+
}
|
|
47895
47948
|
var nextBox = fakeNode, mainClosestBox = nextBox;
|
|
47896
47949
|
// Find the main big closest element
|
|
47897
47950
|
while(nextBox && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(nextBox, backspace) && nextBox.parentElement !== jodit.editor){
|
|
@@ -48199,9 +48252,7 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
48199
48252
|
* in `<div>a|<p>b</p>c</div>` gives `<div>a|b<br>c</div>`
|
|
48200
48253
|
*/ function checkJoinBareText(jodit, fakeNode, backspace) {
|
|
48201
48254
|
var block = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptySibling(fakeNode, backspace);
|
|
48202
|
-
if (!
|
|
48203
|
-
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
|
|
48204
|
-
})) {
|
|
48255
|
+
if (!joinsBareText(jodit, block)) {
|
|
48205
48256
|
return false;
|
|
48206
48257
|
}
|
|
48207
48258
|
var filter = (0,_helpers_js__WEBPACK_IMPORTED_MODULE_2__.getMoveFilter)(jodit);
|
|
@@ -48228,6 +48279,28 @@ _core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('backspace', backs
|
|
|
48228
48279
|
jodit.s.setCursorBefore(fakeNode);
|
|
48229
48280
|
return true;
|
|
48230
48281
|
}
|
|
48282
|
+
/**
|
|
48283
|
+
* Whether a block joins the bare text beside it: not a list, a table or a
|
|
48284
|
+
* cell, and holding no block of its own
|
|
48285
|
+
*/ function joinsBareText(jodit, block) {
|
|
48286
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(block) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(block, 'table') && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(block) && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isContentEditable(block, jodit.editor) && !Array.from(block.childNodes).some(function(node) {
|
|
48287
|
+
return _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(node);
|
|
48288
|
+
});
|
|
48289
|
+
}
|
|
48290
|
+
/**
|
|
48291
|
+
* The block an inline element holds on its side facing the caret, through
|
|
48292
|
+
* the inline elements in it: the `<p>` of `<span><strong><p>…</p></strong></span>`
|
|
48293
|
+
*/ function edgeBlock(node, backspace) {
|
|
48294
|
+
var _a;
|
|
48295
|
+
var edge = node;
|
|
48296
|
+
while(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isElement(edge) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(edge)){
|
|
48297
|
+
var children = Array.from(edge.childNodes).filter(function(child) {
|
|
48298
|
+
return !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmptyTextNode(child);
|
|
48299
|
+
});
|
|
48300
|
+
edge = (_a = backspace ? children[children.length - 1] : children[0]) !== null && _a !== void 0 ? _a : null;
|
|
48301
|
+
}
|
|
48302
|
+
return edge === node ? null : edge;
|
|
48303
|
+
}
|
|
48231
48304
|
function checkMoveListContent(jodit, mainClosestBox, sibling, backspace) {
|
|
48232
48305
|
// Process UL/LI/OL cases
|
|
48233
48306
|
var siblingIsList = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(sibling, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.LIST_TAGS);
|
|
@@ -48664,7 +48737,6 @@ function isNotEditable(jodit, node) {
|
|
|
48664
48737
|
if (!prn || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn)) {
|
|
48665
48738
|
return false;
|
|
48666
48739
|
}
|
|
48667
|
-
var neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
48668
48740
|
do {
|
|
48669
48741
|
if (prn && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(prn) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell(prn)) {
|
|
48670
48742
|
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(prn, fakeNode);
|
|
@@ -48681,6 +48753,9 @@ function isNotEditable(jodit, node) {
|
|
|
48681
48753
|
if (found && (0,_check_join_two_lists_js__WEBPACK_IMPORTED_MODULE_2__.checkJoinTwoLists)(jodit, fakeNode, backspace)) {
|
|
48682
48754
|
return true;
|
|
48683
48755
|
}
|
|
48756
|
+
// Looked for once the empty elements have gone, as the one beside the
|
|
48757
|
+
// caret can be in them: the `<br>` that Delete in `<p>|<br></p>` leaves
|
|
48758
|
+
var neighbor = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findNotEmptyNeighbor(fakeNode, backspace, jodit.editor);
|
|
48684
48759
|
if (neighbor && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.INSEPARABLE_TAGS)) {
|
|
48685
48760
|
setCursorIn(neighbor, !backspace);
|
|
48686
48761
|
} else {
|
|
@@ -49196,8 +49271,15 @@ function _object_spread(target) {
|
|
|
49196
49271
|
}
|
|
49197
49272
|
cssRules[key] = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_1__.isArray)(cssOptions[key]) ? cssOptions[key][0] : cssOptions[key];
|
|
49198
49273
|
});
|
|
49274
|
+
var element = control.tags ? control.tags[0] : undefined;
|
|
49199
49275
|
editor.s.commitStyle({
|
|
49200
|
-
element:
|
|
49276
|
+
element: element,
|
|
49277
|
+
// As in the browsers and Word, each takes the other's place
|
|
49278
|
+
exclude: element === 'sub' ? [
|
|
49279
|
+
'sup'
|
|
49280
|
+
] : element === 'sup' ? [
|
|
49281
|
+
'sub'
|
|
49282
|
+
] : []
|
|
49201
49283
|
});
|
|
49202
49284
|
editor.synchronizeValues();
|
|
49203
49285
|
return false;
|
|
@@ -52319,11 +52401,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
52319
52401
|
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
52320
52402
|
|
|
52321
52403
|
/* unused harmony export deleteCommand */
|
|
52322
|
-
/* harmony import */ var
|
|
52323
|
-
/* harmony import */ var
|
|
52324
|
-
/* harmony import */ var
|
|
52325
|
-
/* harmony import */ var
|
|
52326
|
-
/* harmony import */ var
|
|
52404
|
+
/* harmony import */ var _core_constants_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82758);
|
|
52405
|
+
/* harmony import */ var _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22732);
|
|
52406
|
+
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(580);
|
|
52407
|
+
/* harmony import */ var _core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21537);
|
|
52408
|
+
/* harmony import */ var _core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(49055);
|
|
52409
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50911);
|
|
52327
52410
|
function _array_like_to_array(arr, len) {
|
|
52328
52411
|
if (len == null || len > arr.length) len = arr.length;
|
|
52329
52412
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -52490,6 +52573,7 @@ function _wrap_native_super(Class) {
|
|
|
52490
52573
|
|
|
52491
52574
|
|
|
52492
52575
|
|
|
52576
|
+
|
|
52493
52577
|
var NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
52494
52578
|
'img',
|
|
52495
52579
|
'table',
|
|
@@ -52497,6 +52581,18 @@ var NOT_EMPTY_CONTENT_TAGS = new Set([
|
|
|
52497
52581
|
'iframe',
|
|
52498
52582
|
'hr'
|
|
52499
52583
|
]);
|
|
52584
|
+
var KEEPS_SPACES = new Set([
|
|
52585
|
+
'pre',
|
|
52586
|
+
'pre-wrap',
|
|
52587
|
+
'break-spaces'
|
|
52588
|
+
]);
|
|
52589
|
+
/**
|
|
52590
|
+
* A plain space beside this neighbor isn't shown: there is none, or it's a
|
|
52591
|
+
* line break, a block or text starting (or ending) with a plain space
|
|
52592
|
+
*/ function hidesSpace(neighbor, edge) {
|
|
52593
|
+
var _a;
|
|
52594
|
+
return !neighbor || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(neighbor, 'br') || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(neighbor) || _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(neighbor) && edge.test((_a = neighbor.nodeValue) !== null && _a !== void 0 ? _a : '');
|
|
52595
|
+
}
|
|
52500
52596
|
var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
52501
52597
|
"use strict";
|
|
52502
52598
|
_inherits(deleteCommand, Plugin);
|
|
@@ -52534,13 +52630,13 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52534
52630
|
value: function __afterDeleteCommand() {
|
|
52535
52631
|
var jodit = this.j;
|
|
52536
52632
|
var current = jodit.s.current();
|
|
52537
|
-
if (current &&
|
|
52633
|
+
if (current && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(current.firstChild, 'br')) {
|
|
52538
52634
|
jodit.s.removeNode(current.firstChild);
|
|
52539
52635
|
}
|
|
52540
|
-
if (!(0,
|
|
52541
|
-
return
|
|
52542
|
-
}) && (!current || !
|
|
52543
|
-
|
|
52636
|
+
if (!(0,_core_helpers_string_trim_js__WEBPACK_IMPORTED_MODULE_4__.trim)(jodit.editor.textContent || '') && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.first(jodit.editor, function(node) {
|
|
52637
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(node, NOT_EMPTY_CONTENT_TAGS);
|
|
52638
|
+
}) && (!current || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(current, 'table', jodit.editor))) {
|
|
52639
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(jodit.editor);
|
|
52544
52640
|
var node = jodit.s.setCursorIn(jodit.editor);
|
|
52545
52641
|
jodit.s.removeNode(node);
|
|
52546
52642
|
}
|
|
@@ -52563,14 +52659,15 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52563
52659
|
range.deleteContents();
|
|
52564
52660
|
var fake = jodit.createInside.fake();
|
|
52565
52661
|
range.insertNode(fake);
|
|
52566
|
-
var leftSibling =
|
|
52567
|
-
var rightSibling =
|
|
52662
|
+
var leftSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, true);
|
|
52663
|
+
var rightSibling = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.findSibling(fake, false);
|
|
52568
52664
|
this.__moveContentInLeftSibling(fake, leftSibling, rightSibling);
|
|
52665
|
+
this.__keepSpacesVisible(fake);
|
|
52569
52666
|
range.setStartBefore(fake);
|
|
52570
52667
|
range.collapse(true);
|
|
52571
52668
|
this.__moveCursorInEditableSibling(jodit, leftSibling, fake, range);
|
|
52572
52669
|
this.__addBrInEmptyBlock(fake, range);
|
|
52573
|
-
|
|
52670
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
52574
52671
|
jodit.s.selectRange(caret !== null && caret !== void 0 ? caret : range);
|
|
52575
52672
|
return false;
|
|
52576
52673
|
}
|
|
@@ -52587,27 +52684,27 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52587
52684
|
*/ key: "__clearSelectedCells",
|
|
52588
52685
|
value: function __clearSelectedCells(range) {
|
|
52589
52686
|
var _this_j = this.j, editor = _this_j.editor, createInside = _this_j.createInside;
|
|
52590
|
-
var startCell =
|
|
52591
|
-
var endCell =
|
|
52687
|
+
var startCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.startContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
52688
|
+
var endCell = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(range.endContainer, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isCell, editor);
|
|
52592
52689
|
if (startCell === endCell) {
|
|
52593
52690
|
return null;
|
|
52594
52691
|
}
|
|
52595
|
-
var startTable =
|
|
52596
|
-
var endTable =
|
|
52692
|
+
var startTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(startCell, 'table', editor);
|
|
52693
|
+
var endTable = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(endCell, 'table', editor);
|
|
52597
52694
|
var caret = range.cloneRange();
|
|
52598
52695
|
caret.collapse(true);
|
|
52599
52696
|
var parts = [];
|
|
52600
52697
|
var addParts = function addParts(table) {
|
|
52601
|
-
(0,
|
|
52602
|
-
return (0,
|
|
52698
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(table.rows).flatMap(function(row) {
|
|
52699
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.toArray)(row.cells);
|
|
52603
52700
|
}).filter(function(cell) {
|
|
52604
52701
|
return range.intersectsNode(cell);
|
|
52605
52702
|
}).forEach(function(cell) {
|
|
52606
52703
|
var part = range.cloneRange();
|
|
52607
|
-
if (!
|
|
52704
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.startContainer)) {
|
|
52608
52705
|
part.setStart(cell, 0);
|
|
52609
52706
|
}
|
|
52610
|
-
if (!
|
|
52707
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(cell, range.endContainer)) {
|
|
52611
52708
|
part.setEnd(cell, cell.childNodes.length);
|
|
52612
52709
|
}
|
|
52613
52710
|
parts.push([
|
|
@@ -52631,9 +52728,9 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52631
52728
|
parts.forEach(function(param) {
|
|
52632
52729
|
var _param = _sliced_to_array(param, 2), cell = _param[0], part = _param[1];
|
|
52633
52730
|
part.deleteContents();
|
|
52634
|
-
if (
|
|
52635
|
-
|
|
52636
|
-
|
|
52731
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(cell)) {
|
|
52732
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.detach(cell);
|
|
52733
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(cell, createInside.element('br'));
|
|
52637
52734
|
}
|
|
52638
52735
|
});
|
|
52639
52736
|
return startTable ? caret : null;
|
|
@@ -52644,49 +52741,89 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52644
52741
|
value: function __moveContentInLeftSibling(fake, leftSibling, rightSibling) {
|
|
52645
52742
|
leftSibling = this.__defineRightLeftBox(leftSibling);
|
|
52646
52743
|
// Nothing is moved into a table, and a block left empty after it goes
|
|
52647
|
-
if (
|
|
52648
|
-
if (
|
|
52649
|
-
|
|
52744
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(leftSibling, 'table')) {
|
|
52745
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
52746
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52650
52747
|
}
|
|
52651
52748
|
return;
|
|
52652
52749
|
}
|
|
52653
|
-
if (!
|
|
52654
|
-
|
|
52655
|
-
|
|
52656
|
-
|
|
52750
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isTag(rightSibling, 'table') && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
|
|
52751
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
52752
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.moveContent(rightSibling, leftSibling);
|
|
52753
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52657
52754
|
}
|
|
52658
|
-
if (
|
|
52755
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(rightSibling) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(rightSibling.firstElementChild)) {
|
|
52659
52756
|
var item = rightSibling.firstElementChild;
|
|
52660
52757
|
// What's left of the right list's first item joins the left block,
|
|
52661
52758
|
// up to a list nested in the item
|
|
52662
|
-
if (!
|
|
52663
|
-
|
|
52664
|
-
while(item.firstChild && !
|
|
52665
|
-
|
|
52759
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item) && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(leftSibling)) {
|
|
52760
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, fake);
|
|
52761
|
+
while(item.firstChild && !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(item.firstChild)){
|
|
52762
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, item.firstChild);
|
|
52666
52763
|
}
|
|
52667
52764
|
}
|
|
52668
52765
|
// Remove empty right LI
|
|
52669
|
-
if (
|
|
52670
|
-
|
|
52766
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(item)) {
|
|
52767
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(item);
|
|
52671
52768
|
}
|
|
52672
|
-
if (
|
|
52673
|
-
|
|
52769
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isEmpty(rightSibling)) {
|
|
52770
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(rightSibling);
|
|
52674
52771
|
}
|
|
52675
52772
|
}
|
|
52676
52773
|
}
|
|
52677
52774
|
},
|
|
52678
52775
|
{
|
|
52679
52776
|
/**
|
|
52777
|
+
* A plain space the deletion leaves at an edge of the block, before a line
|
|
52778
|
+
* break or next to another space isn't shown, and the browser drops it when
|
|
52779
|
+
* the next char is typed. It becomes non-breaking, as in the browsers' own
|
|
52780
|
+
* delete and in Backspace without a selection (#1522)
|
|
52781
|
+
*/ key: "__keepSpacesVisible",
|
|
52782
|
+
value: function __keepSpacesVisible(fake) {
|
|
52783
|
+
var _a;
|
|
52784
|
+
var jodit = this.jodit;
|
|
52785
|
+
var block = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
|
|
52786
|
+
if (KEEPS_SPACES.has(jodit.ew.getComputedStyle(block).whiteSpace)) {
|
|
52787
|
+
return;
|
|
52788
|
+
}
|
|
52789
|
+
var before = this.__findNeighbor(fake, true, block);
|
|
52790
|
+
var after = this.__findNeighbor(fake, false, block);
|
|
52791
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(before) && hidesSpace(after, /^ /)) {
|
|
52792
|
+
before.nodeValue = before.nodeValue.replace(/ +$/, function(spaces) {
|
|
52793
|
+
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length);
|
|
52794
|
+
});
|
|
52795
|
+
}
|
|
52796
|
+
if (_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(after) && hidesSpace(before, / $/)) {
|
|
52797
|
+
after.nodeValue = after.nodeValue.replace(/^ +/, function(spaces) {
|
|
52798
|
+
return _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NBSP_SPACE.repeat(spaces.length);
|
|
52799
|
+
});
|
|
52800
|
+
}
|
|
52801
|
+
}
|
|
52802
|
+
},
|
|
52803
|
+
{
|
|
52804
|
+
/**
|
|
52805
|
+
* The text, line break or other element next to the caret in its block,
|
|
52806
|
+
* looking inside inline elements
|
|
52807
|
+
*/ key: "__findNeighbor",
|
|
52808
|
+
value: function __findNeighbor(fake, left, block) {
|
|
52809
|
+
return (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.call)(left ? _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev : _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.next, fake, function(node) {
|
|
52810
|
+
var _a;
|
|
52811
|
+
return _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(node) ? (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_3__.trimInv)((_a = node.nodeValue) !== null && _a !== void 0 ? _a : '').length > 0 : !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isComment(node) && !(_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isInlineBlock(node) && node.firstChild);
|
|
52812
|
+
}, block);
|
|
52813
|
+
}
|
|
52814
|
+
},
|
|
52815
|
+
{
|
|
52816
|
+
/**
|
|
52680
52817
|
* If left sibling is list - return last leaf
|
|
52681
52818
|
*/ key: "__defineRightLeftBox",
|
|
52682
52819
|
value: function __defineRightLeftBox(leftSibling) {
|
|
52683
|
-
if (!
|
|
52820
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isList(leftSibling)) {
|
|
52684
52821
|
return leftSibling;
|
|
52685
52822
|
}
|
|
52686
52823
|
var lastLeaf = leftSibling.lastElementChild;
|
|
52687
|
-
if (!
|
|
52824
|
+
if (!_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isLeaf(lastLeaf)) {
|
|
52688
52825
|
lastLeaf = this.j.createInside.element('li');
|
|
52689
|
-
|
|
52826
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.append(leftSibling, lastLeaf);
|
|
52690
52827
|
}
|
|
52691
52828
|
return lastLeaf;
|
|
52692
52829
|
}
|
|
@@ -52697,9 +52834,9 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52697
52834
|
*/ key: "__addBrInEmptyBlock",
|
|
52698
52835
|
value: function __addBrInEmptyBlock(fake, range) {
|
|
52699
52836
|
var jodit = this.j;
|
|
52700
|
-
if (fake.isConnected &&
|
|
52837
|
+
if (fake.isConnected && _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock(fake.parentNode) && !fake.nextSibling && !fake.previousSibling) {
|
|
52701
52838
|
var br = jodit.createInside.element('br');
|
|
52702
|
-
|
|
52839
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.after(fake, br);
|
|
52703
52840
|
range.setStartBefore(br);
|
|
52704
52841
|
range.collapse(true);
|
|
52705
52842
|
}
|
|
@@ -52709,24 +52846,24 @@ var deleteCommand = /*#__PURE__*/ function(Plugin) {
|
|
|
52709
52846
|
key: "__moveCursorInEditableSibling",
|
|
52710
52847
|
value: function __moveCursorInEditableSibling(jodit, leftSibling, fake, range) {
|
|
52711
52848
|
var _a;
|
|
52712
|
-
if (!leftSibling || !
|
|
52713
|
-
var root = (_a =
|
|
52714
|
-
var leftText =
|
|
52849
|
+
if (!leftSibling || !_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText(leftSibling)) {
|
|
52850
|
+
var root = (_a = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.closest(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isBlock, jodit.editor)) !== null && _a !== void 0 ? _a : jodit.editor;
|
|
52851
|
+
var leftText = _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.prev(fake, _core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.isText, root);
|
|
52715
52852
|
if (leftText) {
|
|
52716
52853
|
range.setStartAfter(leftText);
|
|
52717
52854
|
range.collapse(true);
|
|
52718
|
-
|
|
52855
|
+
_core_dom_index_js__WEBPACK_IMPORTED_MODULE_1__.Dom.safeRemove(fake);
|
|
52719
52856
|
}
|
|
52720
52857
|
}
|
|
52721
52858
|
}
|
|
52722
52859
|
}
|
|
52723
52860
|
]);
|
|
52724
52861
|
return deleteCommand;
|
|
52725
|
-
}(_wrap_native_super(
|
|
52862
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_5__.Plugin));
|
|
52726
52863
|
deleteCommand.requires = [
|
|
52727
52864
|
'backspace'
|
|
52728
52865
|
];
|
|
52729
|
-
|
|
52866
|
+
_core_global_js__WEBPACK_IMPORTED_MODULE_2__.pluginSystem.add('deleteCommand', deleteCommand);
|
|
52730
52867
|
|
|
52731
52868
|
|
|
52732
52869
|
/***/ }),
|
|
@@ -69551,10 +69688,21 @@ var key = 'table_processor_observer-resize';
|
|
|
69551
69688
|
_this.startX = 0;
|
|
69552
69689
|
/**
|
|
69553
69690
|
* The table's and its cells' styles as a column drag started, put back
|
|
69554
|
-
* before
|
|
69691
|
+
* as it ends, before the final widths
|
|
69555
69692
|
*/ _this.startStyles = [];
|
|
69556
69693
|
_this.startLeft = 0;
|
|
69557
69694
|
_this.startEdge = 0;
|
|
69695
|
+
/**
|
|
69696
|
+
* For each of the two columns a drag resizes, the cell whose width
|
|
69697
|
+
* `setColumnWidthByDelta` sets, with its width as the drag started, and
|
|
69698
|
+
* the cells below it, whose widths it clears
|
|
69699
|
+
*/ _this.startWidths = [];
|
|
69700
|
+
/**
|
|
69701
|
+
* The table's width as the drag started, and for a drag of its edge, the
|
|
69702
|
+
* width inside what holds it and its margin on that side
|
|
69703
|
+
*/ _this.startTableWidth = 0;
|
|
69704
|
+
_this.startParentWidth = 0;
|
|
69705
|
+
_this.startMargin = 0;
|
|
69558
69706
|
/**
|
|
69559
69707
|
* The row whose height the handle sets, or null while it sets a width
|
|
69560
69708
|
*/ _this.workRow = null;
|
|
@@ -69616,7 +69764,7 @@ var key = 'table_processor_observer-resize';
|
|
|
69616
69764
|
*/ key: "onHandleMouseDown",
|
|
69617
69765
|
value: function onHandleMouseDown(event) {
|
|
69618
69766
|
var _this = this;
|
|
69619
|
-
if (this.j.isLocked) {
|
|
69767
|
+
if (this.j.isLocked || this.j.o.readonly) {
|
|
69620
69768
|
return;
|
|
69621
69769
|
}
|
|
69622
69770
|
this.drag = true;
|
|
@@ -69652,10 +69800,15 @@ var key = 'table_processor_observer-resize';
|
|
|
69652
69800
|
var box;
|
|
69653
69801
|
this.minX = 0;
|
|
69654
69802
|
this.maxX = 1000000;
|
|
69803
|
+
this.startTableWidth = this.workTable.offsetWidth;
|
|
69655
69804
|
if (this.wholeTable != null) {
|
|
69656
|
-
var
|
|
69805
|
+
var parent = this.workTable.parentNode;
|
|
69806
|
+
var tableBox = parent.getBoundingClientRect();
|
|
69657
69807
|
this.minX = tableBox.left;
|
|
69658
69808
|
this.maxX = this.minX + tableBox.width;
|
|
69809
|
+
var side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
69810
|
+
this.startParentWidth = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.getContentWidth)(parent, this.j.ew);
|
|
69811
|
+
this.startMargin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
69659
69812
|
} else {
|
|
69660
69813
|
// find maximum columns
|
|
69661
69814
|
var coordinate = this.module.formalCoordinate(this.workTable, this.workCell, true);
|
|
@@ -69669,6 +69822,21 @@ var key = 'table_processor_observer-resize';
|
|
|
69669
69822
|
_this.maxX = Math.min(box.left + box.width - _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.NEARBY / 2, _this.maxX);
|
|
69670
69823
|
}
|
|
69671
69824
|
});
|
|
69825
|
+
var matrix = this.module.formalMatrix(this.workTable);
|
|
69826
|
+
this.startWidths = this.resizedColumns().map(function(column) {
|
|
69827
|
+
var cells = matrix.map(function(row) {
|
|
69828
|
+
return row[column];
|
|
69829
|
+
});
|
|
69830
|
+
var index = cells.findIndex(function(td) {
|
|
69831
|
+
return td.colSpan === 1 || cells.length === 1;
|
|
69832
|
+
});
|
|
69833
|
+
var cell = cells[index];
|
|
69834
|
+
return [
|
|
69835
|
+
cell,
|
|
69836
|
+
cell ? cell.offsetWidth : 0,
|
|
69837
|
+
cells.slice(Math.max(index, 0) + 1)
|
|
69838
|
+
];
|
|
69839
|
+
});
|
|
69672
69840
|
}
|
|
69673
69841
|
return false;
|
|
69674
69842
|
}
|
|
@@ -69700,8 +69868,11 @@ var key = 'table_processor_observer-resize';
|
|
|
69700
69868
|
x = this.maxX;
|
|
69701
69869
|
}
|
|
69702
69870
|
this.resizeDelta = x - this.startX + (!this.j.o.iframe ? 0 : workplacePosition.left);
|
|
69703
|
-
this.
|
|
69704
|
-
|
|
69871
|
+
if (this.wholeTable == null) {
|
|
69872
|
+
this.setColumnWidths();
|
|
69873
|
+
} else {
|
|
69874
|
+
this.resizeTable();
|
|
69875
|
+
}
|
|
69705
69876
|
var tableBox = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.offset)(this.workTable, this.j, this.j.ed);
|
|
69706
69877
|
Object.assign(this.resizeHandler.style, {
|
|
69707
69878
|
left: this.startLeft + this.columnEdge() - this.startEdge + 'px',
|
|
@@ -69842,15 +70013,51 @@ var key = 'table_processor_observer-resize';
|
|
|
69842
70013
|
},
|
|
69843
70014
|
{
|
|
69844
70015
|
/**
|
|
70016
|
+
* The two columns a column drag resizes: the work cell's last, and the
|
|
70017
|
+
* next cell's first
|
|
70018
|
+
*/ key: "resizedColumns",
|
|
70019
|
+
value: function resizedColumns() {
|
|
70020
|
+
var nextTD = (0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.call)(this.isRTL ? _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.prev : _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.next, this.workCell, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, this.workCell.parentNode);
|
|
70021
|
+
return [
|
|
70022
|
+
this.module.formalCoordinate(this.workTable, this.workCell, true)[1],
|
|
70023
|
+
this.module.formalCoordinate(this.workTable, nextTD)[1]
|
|
70024
|
+
];
|
|
70025
|
+
}
|
|
70026
|
+
},
|
|
70027
|
+
{
|
|
70028
|
+
/**
|
|
69845
70029
|
* Resize only one column
|
|
69846
70030
|
*/ key: "resizeColumns",
|
|
69847
70031
|
value: function resizeColumns() {
|
|
69848
70032
|
var delta = this.resizeDelta;
|
|
69849
70033
|
var marked = [];
|
|
69850
70034
|
var tableModule = this.module;
|
|
69851
|
-
|
|
69852
|
-
|
|
69853
|
-
tableModule.setColumnWidthByDelta(this.workTable,
|
|
70035
|
+
var _this_resizedColumns = _sliced_to_array(this.resizedColumns(), 2), column = _this_resizedColumns[0], nextColumn = _this_resizedColumns[1];
|
|
70036
|
+
tableModule.setColumnWidthByDelta(this.workTable, column, delta, true, marked);
|
|
70037
|
+
tableModule.setColumnWidthByDelta(this.workTable, nextColumn, -delta, false, marked);
|
|
70038
|
+
}
|
|
70039
|
+
},
|
|
70040
|
+
{
|
|
70041
|
+
/**
|
|
70042
|
+
* Sets the widths `resizeColumns` would while the handle is dragged, from
|
|
70043
|
+
* the widths the drag started with, so that a move doesn't put back every
|
|
70044
|
+
* cell's style and lay the table out again to measure them
|
|
70045
|
+
*/ key: "setColumnWidths",
|
|
70046
|
+
value: function setColumnWidths() {
|
|
70047
|
+
var _this = this;
|
|
70048
|
+
this.startWidths.forEach(function(param, index) {
|
|
70049
|
+
var _param = _sliced_to_array(param, 3), cell = _param[0], width = _param[1], below = _param[2];
|
|
70050
|
+
var delta = index ? -_this.resizeDelta : _this.resizeDelta;
|
|
70051
|
+
if (cell) {
|
|
70052
|
+
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(cell, 'width', ((width + delta) / _this.startTableWidth * 100).toFixed(_core_constants_js__WEBPACK_IMPORTED_MODULE_0__.ACCURACY) + '%');
|
|
70053
|
+
}
|
|
70054
|
+
below.forEach(function(td) {
|
|
70055
|
+
td.style.removeProperty('width');
|
|
70056
|
+
if (!(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style')) {
|
|
70057
|
+
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.attr)(td, 'style', null);
|
|
70058
|
+
}
|
|
70059
|
+
});
|
|
70060
|
+
});
|
|
69854
70061
|
}
|
|
69855
70062
|
},
|
|
69856
70063
|
{
|
|
@@ -69859,7 +70066,7 @@ var key = 'table_processor_observer-resize';
|
|
|
69859
70066
|
*/ key: "resizeTable",
|
|
69860
70067
|
value: function resizeTable() {
|
|
69861
70068
|
var delta = this.resizeDelta * (this.isRTL ? -1 : 1);
|
|
69862
|
-
var width = this.
|
|
70069
|
+
var width = this.startTableWidth, parentWidth = this.startParentWidth;
|
|
69863
70070
|
// for RTL use mirror logic
|
|
69864
70071
|
var rightSide = !this.wholeTable;
|
|
69865
70072
|
var needChangeWidth = this.isRTL ? !rightSide : rightSide;
|
|
@@ -69868,10 +70075,9 @@ var key = 'table_processor_observer-resize';
|
|
|
69868
70075
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, 'width', (width + delta) / parentWidth * 100 + '%');
|
|
69869
70076
|
} else {
|
|
69870
70077
|
var side = this.isRTL ? 'marginRight' : 'marginLeft';
|
|
69871
|
-
var margin = parseInt(this.j.ew.getComputedStyle(this.workTable)[side] || '0', 10);
|
|
69872
70078
|
(0,_core_helpers_utils_css_js__WEBPACK_IMPORTED_MODULE_5__.css)(this.workTable, _define_property({
|
|
69873
70079
|
width: (width - delta) / parentWidth * 100 + '%'
|
|
69874
|
-
}, side, (
|
|
70080
|
+
}, side, (this.startMargin + delta) / parentWidth * 100 + '%'));
|
|
69875
70081
|
}
|
|
69876
70082
|
}
|
|
69877
70083
|
},
|
|
@@ -69968,9 +70174,10 @@ var key = 'table_processor_observer-resize';
|
|
|
69968
70174
|
if (!editor.o.tableAllowCellResize) {
|
|
69969
70175
|
return;
|
|
69970
70176
|
}
|
|
69971
|
-
|
|
70177
|
+
var observeTables = function observeTables() {
|
|
69972
70178
|
;(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', editor.editor).forEach(_this.observe);
|
|
69973
|
-
}
|
|
70179
|
+
};
|
|
70180
|
+
editor.e.off(this.j.ow, '.resize-cells').off('.resize-cells').on('change.resize-cells afterCommand.resize-cells afterSetMode.resize-cells', observeTables).on(this.j.ow, 'scroll.resize-cells', function() {
|
|
69974
70181
|
if (!_this.drag || _this.workRow) {
|
|
69975
70182
|
return;
|
|
69976
70183
|
}
|
|
@@ -69988,6 +70195,8 @@ var key = 'table_processor_observer-resize';
|
|
|
69988
70195
|
tableModule.normalizeTable(_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(td, 'table', editor.editor));
|
|
69989
70196
|
});
|
|
69990
70197
|
});
|
|
70198
|
+
// None of those events comes with the editor's starting value
|
|
70199
|
+
observeTables();
|
|
69991
70200
|
}
|
|
69992
70201
|
},
|
|
69993
70202
|
{
|
|
@@ -70005,7 +70214,9 @@ var key = 'table_processor_observer-resize';
|
|
|
70005
70214
|
_this.hideResizeHandle();
|
|
70006
70215
|
}
|
|
70007
70216
|
}).on(table, 'mousemove.resize-cells touchmove.resize-cells', this.j.async.throttle(function(event) {
|
|
70008
|
-
|
|
70217
|
+
// A drag from a cell isn't a resize, and the handle on
|
|
70218
|
+
// a border it passes would take its moves (#1778)
|
|
70219
|
+
if (_this.j.isLocked || _this.j.o.readonly || event.buttons) {
|
|
70009
70220
|
return;
|
|
70010
70221
|
}
|
|
70011
70222
|
var cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.up(event.target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, table);
|
|
@@ -73183,7 +73394,6 @@ function _wrap_native_super(Class) {
|
|
|
73183
73394
|
|
|
73184
73395
|
|
|
73185
73396
|
var key = 'table_processor_observer';
|
|
73186
|
-
var MOUSE_MOVE_LABEL = 'onMoveTableSelectCell';
|
|
73187
73397
|
var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
73188
73398
|
"use strict";
|
|
73189
73399
|
_inherits(selectCells, Plugin);
|
|
@@ -73204,6 +73414,13 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73204
73414
|
/**
|
|
73205
73415
|
* User is selecting cells now
|
|
73206
73416
|
*/ _this.__isSelectionMode = false;
|
|
73417
|
+
/**
|
|
73418
|
+
* The cell the marks were last drawn to
|
|
73419
|
+
*/ _this.__movedTo = null;
|
|
73420
|
+
/**
|
|
73421
|
+
* A drag let go outside the table ends in a click on the editor, which
|
|
73422
|
+
* would unmark its cells
|
|
73423
|
+
*/ _this.__keepMarks = false;
|
|
73207
73424
|
return _this;
|
|
73208
73425
|
}
|
|
73209
73426
|
_create_class(selectCells, [
|
|
@@ -73226,6 +73443,8 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73226
73443
|
// move the caret, as table-keyboard-navigation's do
|
|
73227
73444
|
.on('keydown', this.__onKeyDown, {
|
|
73228
73445
|
top: true
|
|
73446
|
+
}).on('clickEditor', this.__onClickAfterDrag, {
|
|
73447
|
+
top: true
|
|
73229
73448
|
}).on('keydown.select-cells', function(event) {
|
|
73230
73449
|
if (event.key === _core_constants_js__WEBPACK_IMPORTED_MODULE_0__.KEY_TAB) {
|
|
73231
73450
|
_this.unselectCells();
|
|
@@ -73371,12 +73590,15 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73371
73590
|
}
|
|
73372
73591
|
this.__isSelectionMode = true;
|
|
73373
73592
|
this.__selectedCell = cell;
|
|
73593
|
+
this.__movedTo = cell;
|
|
73374
73594
|
this.__tableModule.addSelection(cell);
|
|
73375
|
-
this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells',
|
|
73376
|
-
|
|
73377
|
-
|
|
73378
|
-
|
|
73379
|
-
|
|
73595
|
+
this.j.e.on(table, 'mousemove.select-cells touchmove.select-cells', this.__onMove.bind(this, table)).on(table, 'mouseup.select-cells touchend.select-cells', this.__onStopSelection.bind(this, table));
|
|
73596
|
+
new Set([
|
|
73597
|
+
this.j.ew,
|
|
73598
|
+
this.j.ow
|
|
73599
|
+
]).forEach(function(win) {
|
|
73600
|
+
return _this.j.e.on(win, 'mouseup.select-cells touchend.select-cells', _this.__onRelease.bind(_this, table));
|
|
73601
|
+
});
|
|
73380
73602
|
return false;
|
|
73381
73603
|
}
|
|
73382
73604
|
},
|
|
@@ -73387,6 +73609,29 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73387
73609
|
this.__onRemoveSelection();
|
|
73388
73610
|
}
|
|
73389
73611
|
},
|
|
73612
|
+
{
|
|
73613
|
+
key: "onMouseDown",
|
|
73614
|
+
value: function onMouseDown() {
|
|
73615
|
+
this.__keepMarks = false;
|
|
73616
|
+
}
|
|
73617
|
+
},
|
|
73618
|
+
{
|
|
73619
|
+
/**
|
|
73620
|
+
* The click that ends a drag let go outside the table, and inside the
|
|
73621
|
+
* editor, lands on the editor. Taken on, it would unmark the cells and
|
|
73622
|
+
* close their popup. As for the click on a row after a drag over the
|
|
73623
|
+
* cells, the browser's own selection from the drag goes
|
|
73624
|
+
*/ key: "__onClickAfterDrag",
|
|
73625
|
+
value: function __onClickAfterDrag() {
|
|
73626
|
+
var _a;
|
|
73627
|
+
if (this.__keepMarks) {
|
|
73628
|
+
this.__keepMarks = false;
|
|
73629
|
+
(_a = this.j.s.sel) === null || _a === void 0 ? void 0 : _a.removeAllRanges();
|
|
73630
|
+
this.j.e.stopPropagation('clickEditor');
|
|
73631
|
+
return false;
|
|
73632
|
+
}
|
|
73633
|
+
}
|
|
73634
|
+
},
|
|
73390
73635
|
{
|
|
73391
73636
|
key: "onChange",
|
|
73392
73637
|
value: function onChange() {
|
|
@@ -73410,16 +73655,20 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73410
73655
|
// Inside Shadow DOM `document.elementFromPoint` returns the shadow
|
|
73411
73656
|
// host, so the lookup must start from the shadow root
|
|
73412
73657
|
var node = ((_a = this.j.o.shadowRoot) !== null && _a !== void 0 ? _a : this.j.ed).elementFromPoint(e.clientX, e.clientY);
|
|
73413
|
-
|
|
73414
|
-
return;
|
|
73415
|
-
}
|
|
73416
|
-
var cell = _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
73658
|
+
var cell = node && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(node, [
|
|
73417
73659
|
'td',
|
|
73418
73660
|
'th'
|
|
73419
73661
|
], table);
|
|
73420
73662
|
if (!cell || !this.__selectedCell) {
|
|
73421
73663
|
return;
|
|
73422
73664
|
}
|
|
73665
|
+
// The marks change only when the mouse goes into another cell, and then
|
|
73666
|
+
// at once rather than throttled, as the browser's own selection from
|
|
73667
|
+
// the drag shows in the cells between until they do (#1778)
|
|
73668
|
+
if (cell === this.__movedTo) {
|
|
73669
|
+
return;
|
|
73670
|
+
}
|
|
73671
|
+
this.__movedTo = cell;
|
|
73423
73672
|
if (cell !== this.__selectedCell) {
|
|
73424
73673
|
this.j.lock(key);
|
|
73425
73674
|
}
|
|
@@ -73462,8 +73711,7 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73462
73711
|
* Stop a selection process
|
|
73463
73712
|
*/ key: "__onStopSelection",
|
|
73464
73713
|
value: function __onStopSelection(table, e) {
|
|
73465
|
-
var
|
|
73466
|
-
var _a, _b, _c;
|
|
73714
|
+
var _a;
|
|
73467
73715
|
if (!this.__selectedCell) {
|
|
73468
73716
|
return;
|
|
73469
73717
|
}
|
|
@@ -73486,11 +73734,41 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73486
73734
|
if (ownTable && ownTable !== table) {
|
|
73487
73735
|
return; // Nested tables
|
|
73488
73736
|
}
|
|
73489
|
-
|
|
73737
|
+
this.__showCellsPopup(table, [
|
|
73490
73738
|
cell,
|
|
73491
73739
|
this.__selectedCell
|
|
73492
|
-
])
|
|
73493
|
-
|
|
73740
|
+
]);
|
|
73741
|
+
this.__stopListening();
|
|
73742
|
+
}
|
|
73743
|
+
},
|
|
73744
|
+
{
|
|
73745
|
+
/**
|
|
73746
|
+
* A drag let go outside the table doesn't reach the table's `mouseup`, so
|
|
73747
|
+
* the window's ends it, leaving the cells marked as they were (#1774)
|
|
73748
|
+
*/ key: "__onRelease",
|
|
73749
|
+
value: function __onRelease(table, e) {
|
|
73750
|
+
if (this.__isSelectionMode) {
|
|
73751
|
+
this.__isSelectionMode = false;
|
|
73752
|
+
if (!this.j.isLockedNotBy(key)) {
|
|
73753
|
+
this.j.unlock();
|
|
73754
|
+
}
|
|
73755
|
+
var cells = this.__tableModule.getAllSelectedCells();
|
|
73756
|
+
// One let go outside the editor clicks outside it, which unmarks them
|
|
73757
|
+
if (cells.length > 1 && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isOrContains(this.j.editor, e.target)) {
|
|
73758
|
+
this.__keepMarks = true;
|
|
73759
|
+
this.__showCellsPopup(table, cells);
|
|
73760
|
+
}
|
|
73761
|
+
}
|
|
73762
|
+
this.__stopListening();
|
|
73763
|
+
}
|
|
73764
|
+
},
|
|
73765
|
+
{
|
|
73766
|
+
key: "__showCellsPopup",
|
|
73767
|
+
value: function __showCellsPopup(table, cells) {
|
|
73768
|
+
var _this = this;
|
|
73769
|
+
var _a, _b;
|
|
73770
|
+
var bound = this.__tableModule.getSelectedBound(table, cells), box = this.__tableModule.formalMatrix(table);
|
|
73771
|
+
var max = (_a = box[bound[1][0]]) === null || _a === void 0 ? void 0 : _a[bound[1][1]], min = (_b = box[bound[0][0]]) === null || _b === void 0 ? void 0 : _b[bound[0][1]];
|
|
73494
73772
|
// `getSelectedBound` keeps its `Infinity` sentinel when none of the
|
|
73495
73773
|
// selected cells belong to this table's matrix — e.g. after a
|
|
73496
73774
|
// drag-and-drop that moved/removed the cells, leaving a stale anchor and
|
|
@@ -73509,10 +73787,22 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73509
73787
|
height: maxOffset.top - minOffset.top + maxOffset.height
|
|
73510
73788
|
};
|
|
73511
73789
|
}, 'cells');
|
|
73790
|
+
}
|
|
73791
|
+
},
|
|
73792
|
+
{
|
|
73793
|
+
key: "__stopListening",
|
|
73794
|
+
value: function __stopListening() {
|
|
73795
|
+
var _this = this;
|
|
73512
73796
|
(0,_core_helpers_index_js__WEBPACK_IMPORTED_MODULE_4__.$$)('table', this.j.editor).forEach(function(table) {
|
|
73513
73797
|
_this.j.e.off(table, 'mousemove.select-cells touchmove.select-cells mouseup.select-cells touchend.select-cells');
|
|
73514
73798
|
});
|
|
73515
|
-
|
|
73799
|
+
new Set([
|
|
73800
|
+
this.j.ew,
|
|
73801
|
+
this.j.ow
|
|
73802
|
+
]).forEach(function(win) {
|
|
73803
|
+
return _this.j.e.off(win, 'mouseup.select-cells touchend.select-cells');
|
|
73804
|
+
});
|
|
73805
|
+
this.__movedTo = null;
|
|
73516
73806
|
}
|
|
73517
73807
|
},
|
|
73518
73808
|
{
|
|
@@ -73715,7 +74005,8 @@ var selectCells = /*#__PURE__*/ function(Plugin) {
|
|
|
73715
74005
|
/** @override */ key: "beforeDestruct",
|
|
73716
74006
|
value: function beforeDestruct(jodit) {
|
|
73717
74007
|
this.__onRemoveSelection();
|
|
73718
|
-
|
|
74008
|
+
this.__stopListening();
|
|
74009
|
+
jodit.e.off('.select-cells').off('keydown', this.__onKeyDown).off('clickEditor', this.__onClickAfterDrag);
|
|
73719
74010
|
}
|
|
73720
74011
|
}
|
|
73721
74012
|
]);
|
|
@@ -73736,6 +74027,15 @@ __decorate([
|
|
|
73736
74027
|
__decorate([
|
|
73737
74028
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':outsideClick')
|
|
73738
74029
|
], selectCells.prototype, "onOutsideClick", null);
|
|
74030
|
+
__decorate([
|
|
74031
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
74032
|
+
':mousedown',
|
|
74033
|
+
':touchstart'
|
|
74034
|
+
])
|
|
74035
|
+
], selectCells.prototype, "onMouseDown", null);
|
|
74036
|
+
__decorate([
|
|
74037
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74038
|
+
], selectCells.prototype, "__onClickAfterDrag", null);
|
|
73739
74039
|
__decorate([
|
|
73740
74040
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':change')
|
|
73741
74041
|
], selectCells.prototype, "onChange", null);
|
|
@@ -73783,10 +74083,11 @@ _config_js__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.select = {
|
|
|
73783
74083
|
/* harmony import */ var _core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(65478);
|
|
73784
74084
|
/* harmony import */ var _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2748);
|
|
73785
74085
|
/* harmony import */ var _core_global_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(580);
|
|
73786
|
-
/* harmony import */ var
|
|
73787
|
-
/* harmony import */ var
|
|
73788
|
-
/* harmony import */ var
|
|
73789
|
-
/* harmony import */ var
|
|
74086
|
+
/* harmony import */ var _core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4510);
|
|
74087
|
+
/* harmony import */ var _core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87058);
|
|
74088
|
+
/* harmony import */ var _core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(50911);
|
|
74089
|
+
/* harmony import */ var _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67510);
|
|
74090
|
+
/* harmony import */ var _config_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(67215);
|
|
73790
74091
|
function _assert_this_initialized(self) {
|
|
73791
74092
|
if (self === void 0) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
73792
74093
|
return self;
|
|
@@ -73915,6 +74216,7 @@ function _wrap_native_super(Class) {
|
|
|
73915
74216
|
|
|
73916
74217
|
|
|
73917
74218
|
|
|
74219
|
+
|
|
73918
74220
|
/**
|
|
73919
74221
|
* A utility plugin that allows you to subscribe to a click/mousedown/touchstart/mouseup on an element in DOM order
|
|
73920
74222
|
*
|
|
@@ -73944,6 +74246,10 @@ function _wrap_native_super(Class) {
|
|
|
73944
74246
|
* element and ends in another as a `click` on their common ancestor, so a
|
|
73945
74247
|
* press inside a popup is remembered to tell such a drag from a real click.
|
|
73946
74248
|
*/ _this.__pressTarget = null;
|
|
74249
|
+
/**
|
|
74250
|
+
* The row a press to its right was beside, and the caret it put there,
|
|
74251
|
+
* while the button is down
|
|
74252
|
+
*/ _this.__pressBesideRow = null;
|
|
73947
74253
|
return _this;
|
|
73948
74254
|
}
|
|
73949
74255
|
_create_class(select, [
|
|
@@ -73954,6 +74260,9 @@ function _wrap_native_super(Class) {
|
|
|
73954
74260
|
this.proxyEventsList.forEach(function(eventName) {
|
|
73955
74261
|
jodit.e.on(eventName + '.select', _this.onStartSelection);
|
|
73956
74262
|
});
|
|
74263
|
+
jodit.e.on('dblclick', this.__onDblClickBesideRow, {
|
|
74264
|
+
top: true
|
|
74265
|
+
});
|
|
73957
74266
|
}
|
|
73958
74267
|
},
|
|
73959
74268
|
{
|
|
@@ -73961,8 +74270,10 @@ function _wrap_native_super(Class) {
|
|
|
73961
74270
|
value: function beforeDestruct(jodit) {
|
|
73962
74271
|
var _this = this;
|
|
73963
74272
|
this.proxyEventsList.forEach(function(eventName) {
|
|
73964
|
-
jodit.e.
|
|
74273
|
+
jodit.e.off(eventName + '.select', _this.onStartSelection);
|
|
73965
74274
|
});
|
|
74275
|
+
this.__endPressBesideRow();
|
|
74276
|
+
jodit.e.off('dblclick', this.__onDblClickBesideRow);
|
|
73966
74277
|
}
|
|
73967
74278
|
},
|
|
73968
74279
|
{
|
|
@@ -73971,7 +74282,7 @@ function _wrap_native_super(Class) {
|
|
|
73971
74282
|
var j = this.j;
|
|
73972
74283
|
var result, target = e.target;
|
|
73973
74284
|
while(result === undefined && target && target !== j.editor){
|
|
73974
|
-
result = j.e.fire((0,
|
|
74285
|
+
result = j.e.fire((0,_core_helpers_string_camel_case_js__WEBPACK_IMPORTED_MODULE_5__.camelCase)(e.type + '_' + target.nodeName.toLowerCase()), target, e);
|
|
73975
74286
|
target = target.parentElement;
|
|
73976
74287
|
}
|
|
73977
74288
|
if (e.type === 'click' && result === undefined && target === j.editor) {
|
|
@@ -74000,10 +74311,10 @@ function _wrap_native_super(Class) {
|
|
|
74000
74311
|
}
|
|
74001
74312
|
// Selecting the text of a popup input with the mouse and releasing
|
|
74002
74313
|
// the button past the popup's edge is not a click outside of it.
|
|
74003
|
-
if (pressed &&
|
|
74314
|
+
if (pressed && _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(pressed, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup)) {
|
|
74004
74315
|
return;
|
|
74005
74316
|
}
|
|
74006
|
-
var box =
|
|
74317
|
+
var box = _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.UIElement.closestElement(node, _core_ui_index_js__WEBPACK_IMPORTED_MODULE_7__.Popup);
|
|
74007
74318
|
if (!box) {
|
|
74008
74319
|
this.j.e.fire('outsideClick', e);
|
|
74009
74320
|
}
|
|
@@ -74063,6 +74374,160 @@ function _wrap_native_super(Class) {
|
|
|
74063
74374
|
},
|
|
74064
74375
|
{
|
|
74065
74376
|
/**
|
|
74377
|
+
* The table row the mouse is to the right of
|
|
74378
|
+
*/ key: "__rowBeside",
|
|
74379
|
+
value: function __rowBeside(e) {
|
|
74380
|
+
var _a;
|
|
74381
|
+
var j = this.j;
|
|
74382
|
+
var target = e.target;
|
|
74383
|
+
if (j.o.readonly || e.button !== 0 || e.detail > 2 || !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isHTMLElement(target) || _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.closest(target, _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isCell, j.editor)) {
|
|
74384
|
+
return null;
|
|
74385
|
+
}
|
|
74386
|
+
var table = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(target.children).find(function(elm) {
|
|
74387
|
+
if (!_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(elm, 'table')) {
|
|
74388
|
+
return false;
|
|
74389
|
+
}
|
|
74390
|
+
var box = elm.getBoundingClientRect();
|
|
74391
|
+
return e.clientX >= box.right && e.clientY >= box.top && e.clientY < box.bottom;
|
|
74392
|
+
});
|
|
74393
|
+
var rows = table ? (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows).filter(function(row) {
|
|
74394
|
+
return row.cells.length;
|
|
74395
|
+
}) : [];
|
|
74396
|
+
if (!table || !rows.length) {
|
|
74397
|
+
return null;
|
|
74398
|
+
}
|
|
74399
|
+
var row = (_a = rows.find(function(row) {
|
|
74400
|
+
return e.clientY < row.getBoundingClientRect().bottom;
|
|
74401
|
+
})) !== null && _a !== void 0 ? _a : rows[rows.length - 1];
|
|
74402
|
+
return {
|
|
74403
|
+
table: table,
|
|
74404
|
+
row: row
|
|
74405
|
+
};
|
|
74406
|
+
}
|
|
74407
|
+
},
|
|
74408
|
+
{
|
|
74409
|
+
/**
|
|
74410
|
+
* A press to the right of a table row puts the caret where Word's typing
|
|
74411
|
+
* goes from there: the start of the next row's first cell, or of the block
|
|
74412
|
+
* after the table for the last row (#1770). The browsers put it after the
|
|
74413
|
+
* table, whichever row it's beside, so typing starts a new line below it.
|
|
74414
|
+
* Their own press is stopped, as its drag would start after the table and
|
|
74415
|
+
* take in the rows below first
|
|
74416
|
+
*/ key: "onMouseDownBesideTableRow",
|
|
74417
|
+
value: function onMouseDownBesideTableRow(e) {
|
|
74418
|
+
var _this = this;
|
|
74419
|
+
var j = this.j;
|
|
74420
|
+
var beside = this.__rowBeside(e);
|
|
74421
|
+
if (!beside) {
|
|
74422
|
+
return;
|
|
74423
|
+
}
|
|
74424
|
+
// A press before the last one was let go must not stack its listeners
|
|
74425
|
+
this.__endPressBesideRow();
|
|
74426
|
+
e.preventDefault();
|
|
74427
|
+
this.__putCaretBesideRow(beside.table, beside.row);
|
|
74428
|
+
this.__pressBesideRow = {
|
|
74429
|
+
row: beside.row,
|
|
74430
|
+
caret: j.s.range.cloneRange()
|
|
74431
|
+
};
|
|
74432
|
+
j.e.on(j.ew, 'mousemove', this.__onDragFromRow);
|
|
74433
|
+
new Set([
|
|
74434
|
+
j.ew,
|
|
74435
|
+
j.ow
|
|
74436
|
+
]).forEach(function(win) {
|
|
74437
|
+
return j.e.on(win, 'mouseup', _this.__onReleaseFromRow);
|
|
74438
|
+
});
|
|
74439
|
+
}
|
|
74440
|
+
},
|
|
74441
|
+
{
|
|
74442
|
+
/**
|
|
74443
|
+
* A drag from beside a row selects from the end of the row to the mouse,
|
|
74444
|
+
* and back beside the row it's the caret again
|
|
74445
|
+
*/ key: "__onDragFromRow",
|
|
74446
|
+
value: function __onDragFromRow(e) {
|
|
74447
|
+
var _a, _b;
|
|
74448
|
+
var s = this.j.s;
|
|
74449
|
+
var press = this.__pressBesideRow;
|
|
74450
|
+
if (!press || !(e.buttons & 1)) {
|
|
74451
|
+
this.__endPressBesideRow();
|
|
74452
|
+
return;
|
|
74453
|
+
}
|
|
74454
|
+
if (((_a = this.__rowBeside(e)) === null || _a === void 0 ? void 0 : _a.row) === press.row) {
|
|
74455
|
+
if (!s.isCollapsed()) {
|
|
74456
|
+
s.selectRange(press.caret.cloneRange());
|
|
74457
|
+
}
|
|
74458
|
+
return;
|
|
74459
|
+
}
|
|
74460
|
+
var cells = press.row.cells;
|
|
74461
|
+
var last = cells[cells.length - 1];
|
|
74462
|
+
if (s.insertCursorAtPoint(e.clientX, e.clientY)) {
|
|
74463
|
+
var _s_range = s.range, startContainer = _s_range.startContainer, startOffset = _s_range.startOffset;
|
|
74464
|
+
(_b = s.sel) === null || _b === void 0 ? void 0 : _b.setBaseAndExtent(last, last.childNodes.length, startContainer, startOffset);
|
|
74465
|
+
}
|
|
74466
|
+
}
|
|
74467
|
+
},
|
|
74468
|
+
{
|
|
74469
|
+
/**
|
|
74470
|
+
* In iframe mode, a press in an editor without the focus puts the caret at
|
|
74471
|
+
* its end, so a release that selected nothing puts it back
|
|
74472
|
+
*/ key: "__onReleaseFromRow",
|
|
74473
|
+
value: function __onReleaseFromRow() {
|
|
74474
|
+
var press = this.__pressBesideRow;
|
|
74475
|
+
this.__endPressBesideRow();
|
|
74476
|
+
if (press && this.j.s.isCollapsed()) {
|
|
74477
|
+
this.j.s.selectRange(press.caret);
|
|
74478
|
+
}
|
|
74479
|
+
}
|
|
74480
|
+
},
|
|
74481
|
+
{
|
|
74482
|
+
key: "__endPressBesideRow",
|
|
74483
|
+
value: function __endPressBesideRow() {
|
|
74484
|
+
var _this = this;
|
|
74485
|
+
var j = this.j;
|
|
74486
|
+
this.__pressBesideRow = null;
|
|
74487
|
+
j.e.off(j.ew, 'mousemove', this.__onDragFromRow);
|
|
74488
|
+
new Set([
|
|
74489
|
+
j.ew,
|
|
74490
|
+
j.ow
|
|
74491
|
+
]).forEach(function(win) {
|
|
74492
|
+
return j.e.off(win, 'mouseup', _this.__onReleaseFromRow);
|
|
74493
|
+
});
|
|
74494
|
+
}
|
|
74495
|
+
},
|
|
74496
|
+
{
|
|
74497
|
+
/**
|
|
74498
|
+
* A double click beside a row is two clicks there, so add-new-line,
|
|
74499
|
+
* which adds a line on a double click with a caret, doesn't see it
|
|
74500
|
+
*/ key: "__onDblClickBesideRow",
|
|
74501
|
+
value: function __onDblClickBesideRow(e) {
|
|
74502
|
+
if (this.__rowBeside(e)) {
|
|
74503
|
+
this.j.e.stopPropagation('dblclick');
|
|
74504
|
+
return false;
|
|
74505
|
+
}
|
|
74506
|
+
}
|
|
74507
|
+
},
|
|
74508
|
+
{
|
|
74509
|
+
key: "__putCaretBesideRow",
|
|
74510
|
+
value: function __putCaretBesideRow(table, row) {
|
|
74511
|
+
var j = this.j;
|
|
74512
|
+
var rows = (0,_core_helpers_array_to_array_js__WEBPACK_IMPORTED_MODULE_4__.toArray)(table.rows);
|
|
74513
|
+
var next = rows.slice(rows.indexOf(row) + 1).find(function(row) {
|
|
74514
|
+
return row.cells.length;
|
|
74515
|
+
});
|
|
74516
|
+
var after = table.nextSibling;
|
|
74517
|
+
while(after && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isEmptyTextNode(after)){
|
|
74518
|
+
after = after.nextSibling;
|
|
74519
|
+
}
|
|
74520
|
+
if (next) {
|
|
74521
|
+
j.s.setCursorIn(next.cells[0], true);
|
|
74522
|
+
} else if (_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isBlock(after) && !_core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isTag(after, 'table') && _core_dom_dom_js__WEBPACK_IMPORTED_MODULE_2__.Dom.isContentEditable(after, j.editor)) {
|
|
74523
|
+
j.s.setCursorIn(after, true);
|
|
74524
|
+
} else {
|
|
74525
|
+
j.s.setCursorAfter(table);
|
|
74526
|
+
}
|
|
74527
|
+
}
|
|
74528
|
+
},
|
|
74529
|
+
{
|
|
74530
|
+
/**
|
|
74066
74531
|
* Keep pending inline formatting after a click. Toggling Bold/Italic/etc. on
|
|
74067
74532
|
* a collapsed cursor leaves empty marker elements with the caret inside; a
|
|
74068
74533
|
* click puts the caret right before them (outside), so they get cleaned up
|
|
@@ -74123,7 +74588,7 @@ function _wrap_native_super(Class) {
|
|
|
74123
74588
|
}
|
|
74124
74589
|
]);
|
|
74125
74590
|
return select;
|
|
74126
|
-
}(_wrap_native_super(
|
|
74591
|
+
}(_wrap_native_super(_core_plugin_index_js__WEBPACK_IMPORTED_MODULE_6__.Plugin));
|
|
74127
74592
|
__decorate([
|
|
74128
74593
|
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74129
74594
|
], select.prototype, "onStartSelection", null);
|
|
@@ -74151,6 +74616,18 @@ __decorate([
|
|
|
74151
74616
|
':click'
|
|
74152
74617
|
])
|
|
74153
74618
|
], select.prototype, "onClickRightOfNestedListItem", null);
|
|
74619
|
+
__decorate([
|
|
74620
|
+
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)(':mousedown')
|
|
74621
|
+
], select.prototype, "onMouseDownBesideTableRow", null);
|
|
74622
|
+
__decorate([
|
|
74623
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74624
|
+
], select.prototype, "__onDragFromRow", null);
|
|
74625
|
+
__decorate([
|
|
74626
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74627
|
+
], select.prototype, "__onReleaseFromRow", null);
|
|
74628
|
+
__decorate([
|
|
74629
|
+
_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
74630
|
+
], select.prototype, "__onDblClickBesideRow", null);
|
|
74154
74631
|
__decorate([
|
|
74155
74632
|
(0,_core_decorators_index_js__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
74156
74633
|
':click'
|