jodit-pro 1.3.39 → 2.0.0-beta.10
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/.nvmrc +1 -0
- package/CHANGELOG.md +982 -0
- package/LICENSE.txt +1 -0
- package/README.md +27 -27
- package/SECURITY.md +10 -0
- package/es2015/jodit.css +4945 -0
- package/es2015/jodit.fat.min.css +1 -0
- package/es2015/jodit.fat.min.js +10 -0
- package/es2015/jodit.js +42706 -0
- package/es2015/jodit.min.css +1 -0
- package/es2015/jodit.min.js +10 -0
- package/es2015/plugins/autocomplete/autocomplete.css +26 -0
- package/es2015/plugins/autocomplete/autocomplete.js +473 -0
- package/es2015/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2015/plugins/backup/backup.css +48 -0
- package/es2015/plugins/backup/backup.js +567 -0
- package/{build/plugins/backup/backup.css → es2015/plugins/backup/backup.min.css} +1 -1
- package/es2015/plugins/backup/backup.min.js +10 -0
- package/es2015/plugins/button-generator/button-generator.css +316 -0
- package/es2015/plugins/button-generator/button-generator.js +1363 -0
- package/es2015/plugins/button-generator/button-generator.min.css +1 -0
- package/es2015/plugins/button-generator/button-generator.min.js +10 -0
- package/es2015/plugins/change-case/change-case.js +171 -0
- package/es2015/plugins/change-case/change-case.min.js +10 -0
- package/es2015/plugins/color-picker/color-picker.css +133 -0
- package/es2015/plugins/color-picker/color-picker.js +519 -0
- package/es2015/plugins/color-picker/color-picker.min.css +1 -0
- package/es2015/plugins/color-picker/color-picker.min.js +10 -0
- package/es2015/plugins/emoji/emoji.css +108 -0
- package/es2015/plugins/emoji/emoji.js +421 -0
- package/es2015/plugins/emoji/emoji.min.css +1 -0
- package/es2015/plugins/emoji/emoji.min.js +10 -0
- package/es2015/plugins/export-docs/export-docs.js +153 -0
- package/es2015/plugins/export-docs/export-docs.min.js +10 -0
- package/es2015/plugins/finder/finder.css +1342 -0
- package/es2015/plugins/finder/finder.js +3175 -0
- package/es2015/plugins/finder/finder.min.css +1 -0
- package/es2015/plugins/finder/finder.min.js +10 -0
- package/es2015/plugins/google-maps/google-maps.css +397 -0
- package/es2015/plugins/google-maps/google-maps.js +2492 -0
- package/es2015/plugins/google-maps/google-maps.min.css +1 -0
- package/es2015/plugins/google-maps/google-maps.min.js +10 -0
- package/es2015/plugins/google-search/google-search.js +108 -0
- package/es2015/plugins/google-search/google-search.min.js +10 -0
- package/es2015/plugins/highlight-signature/highlight-signature.js +233 -0
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2015/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2015/plugins/iframe-editor/iframe-editor.js +310 -0
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2015/plugins/keyboard/keyboard.css +48 -0
- package/es2015/plugins/keyboard/keyboard.js +539 -0
- package/es2015/plugins/keyboard/keyboard.min.js +10 -0
- package/es2015/plugins/mobile-view/mobile-view.js +170 -0
- package/es2015/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2015/plugins/page-break/page-break.js +181 -0
- package/es2015/plugins/page-break/page-break.min.js +10 -0
- package/es2015/plugins/paste-code/paste-code.css +21 -0
- package/es2015/plugins/paste-code/paste-code.js +320 -0
- package/es2015/plugins/paste-code/paste-code.min.js +10 -0
- package/es2015/plugins/paste-from-word/paste-from-word.js +1541 -0
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2015/plugins/show-blocks/show-blocks.js +645 -0
- package/es2015/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2015/plugins/todo-list/todo-list.css +77 -0
- package/es2015/plugins/todo-list/todo-list.js +314 -0
- package/es2015/plugins/todo-list/todo-list.min.css +1 -0
- package/es2015/plugins/todo-list/todo-list.min.js +10 -0
- package/es2015/plugins/translate/translate.css +91 -0
- package/es2015/plugins/translate/translate.js +630 -0
- package/es2015/plugins/translate/translate.min.js +10 -0
- package/es2015/plugins/tune-block/tune-block.css +37 -0
- package/es2015/plugins/tune-block/tune-block.js +387 -0
- package/{build/plugins/tune-block/tune-block.css → es2015/plugins/tune-block/tune-block.min.css} +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +10 -0
- package/es2018/jodit.css +4945 -0
- package/es2018/jodit.fat.min.css +1 -0
- package/es2018/jodit.fat.min.js +10 -0
- package/es2018/jodit.js +42762 -0
- package/es2018/jodit.min.css +1 -0
- package/es2018/jodit.min.js +10 -0
- package/es2018/plugins/autocomplete/autocomplete.css +26 -0
- package/es2018/plugins/autocomplete/autocomplete.js +471 -0
- package/es2018/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2018/plugins/backup/backup.css +48 -0
- package/es2018/plugins/backup/backup.js +561 -0
- package/{build/plugins/backup/backup.es5.css → es2018/plugins/backup/backup.min.css} +1 -1
- package/es2018/plugins/backup/backup.min.js +10 -0
- package/es2018/plugins/button-generator/button-generator.css +316 -0
- package/es2018/plugins/button-generator/button-generator.js +1387 -0
- package/es2018/plugins/button-generator/button-generator.min.css +1 -0
- package/es2018/plugins/button-generator/button-generator.min.js +10 -0
- package/es2018/plugins/change-case/change-case.js +171 -0
- package/es2018/plugins/change-case/change-case.min.js +10 -0
- package/es2018/plugins/color-picker/color-picker.css +133 -0
- package/es2018/plugins/color-picker/color-picker.js +519 -0
- package/es2018/plugins/color-picker/color-picker.min.css +1 -0
- package/es2018/plugins/color-picker/color-picker.min.js +10 -0
- package/es2018/plugins/emoji/emoji.css +108 -0
- package/es2018/plugins/emoji/emoji.js +425 -0
- package/es2018/plugins/emoji/emoji.min.css +1 -0
- package/es2018/plugins/emoji/emoji.min.js +10 -0
- package/es2018/plugins/export-docs/export-docs.js +157 -0
- package/es2018/plugins/export-docs/export-docs.min.js +10 -0
- package/es2018/plugins/finder/finder.css +1342 -0
- package/es2018/plugins/finder/finder.js +3160 -0
- package/es2018/plugins/finder/finder.min.css +1 -0
- package/es2018/plugins/finder/finder.min.js +10 -0
- package/es2018/plugins/google-maps/google-maps.css +397 -0
- package/es2018/plugins/google-maps/google-maps.js +2556 -0
- package/es2018/plugins/google-maps/google-maps.min.css +1 -0
- package/es2018/plugins/google-maps/google-maps.min.js +10 -0
- package/es2018/plugins/google-search/google-search.js +108 -0
- package/es2018/plugins/google-search/google-search.min.js +10 -0
- package/es2018/plugins/highlight-signature/highlight-signature.js +233 -0
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2018/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2018/plugins/iframe-editor/iframe-editor.js +310 -0
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2018/plugins/keyboard/keyboard.css +48 -0
- package/es2018/plugins/keyboard/keyboard.js +539 -0
- package/es2018/plugins/keyboard/keyboard.min.js +10 -0
- package/es2018/plugins/mobile-view/mobile-view.js +170 -0
- package/es2018/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2018/plugins/page-break/page-break.js +181 -0
- package/es2018/plugins/page-break/page-break.min.js +10 -0
- package/es2018/plugins/paste-code/paste-code.css +21 -0
- package/es2018/plugins/paste-code/paste-code.js +318 -0
- package/es2018/plugins/paste-code/paste-code.min.js +10 -0
- package/es2018/plugins/paste-from-word/paste-from-word.js +1541 -0
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2018/plugins/show-blocks/show-blocks.js +645 -0
- package/es2018/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2018/plugins/todo-list/todo-list.css +77 -0
- package/es2018/plugins/todo-list/todo-list.js +314 -0
- package/es2018/plugins/todo-list/todo-list.min.css +1 -0
- package/es2018/plugins/todo-list/todo-list.min.js +10 -0
- package/es2018/plugins/translate/translate.css +91 -0
- package/es2018/plugins/translate/translate.js +639 -0
- package/es2018/plugins/translate/translate.min.js +10 -0
- package/es2018/plugins/tune-block/tune-block.css +37 -0
- package/es2018/plugins/tune-block/tune-block.js +387 -0
- package/{build/plugins/tune-block/tune-block.es5.css → es2018/plugins/tune-block/tune-block.min.css} +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +10 -0
- package/es2021/jodit.css +4945 -0
- package/es2021/jodit.fat.min.css +1 -0
- package/es2021/jodit.fat.min.js +10 -0
- package/es2021/jodit.js +42643 -0
- package/es2021/jodit.min.css +1 -0
- package/es2021/jodit.min.js +10 -0
- package/es2021/plugins/autocomplete/autocomplete.css +26 -0
- package/es2021/plugins/autocomplete/autocomplete.js +463 -0
- package/es2021/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2021/plugins/backup/backup.css +48 -0
- package/es2021/plugins/backup/backup.js +554 -0
- package/es2021/plugins/backup/backup.min.css +1 -0
- package/es2021/plugins/backup/backup.min.js +10 -0
- package/es2021/plugins/button-generator/button-generator.css +316 -0
- package/es2021/plugins/button-generator/button-generator.js +1382 -0
- package/es2021/plugins/button-generator/button-generator.min.css +1 -0
- package/es2021/plugins/button-generator/button-generator.min.js +10 -0
- package/es2021/plugins/change-case/change-case.js +171 -0
- package/es2021/plugins/change-case/change-case.min.js +10 -0
- package/es2021/plugins/color-picker/color-picker.css +133 -0
- package/es2021/plugins/color-picker/color-picker.js +517 -0
- package/es2021/plugins/color-picker/color-picker.min.css +1 -0
- package/es2021/plugins/color-picker/color-picker.min.js +10 -0
- package/es2021/plugins/emoji/emoji.css +108 -0
- package/es2021/plugins/emoji/emoji.js +425 -0
- package/es2021/plugins/emoji/emoji.min.css +1 -0
- package/es2021/plugins/emoji/emoji.min.js +10 -0
- package/es2021/plugins/export-docs/export-docs.js +156 -0
- package/es2021/plugins/export-docs/export-docs.min.js +10 -0
- package/es2021/plugins/finder/finder.css +1342 -0
- package/es2021/plugins/finder/finder.js +3152 -0
- package/es2021/plugins/finder/finder.min.css +1 -0
- package/es2021/plugins/finder/finder.min.js +10 -0
- package/es2021/plugins/google-maps/google-maps.css +397 -0
- package/es2021/plugins/google-maps/google-maps.js +2540 -0
- package/es2021/plugins/google-maps/google-maps.min.css +1 -0
- package/es2021/plugins/google-maps/google-maps.min.js +10 -0
- package/es2021/plugins/google-search/google-search.js +107 -0
- package/es2021/plugins/google-search/google-search.min.js +10 -0
- package/es2021/plugins/highlight-signature/highlight-signature.js +231 -0
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2021/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2021/plugins/iframe-editor/iframe-editor.js +308 -0
- package/es2021/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2021/plugins/keyboard/keyboard.css +48 -0
- package/es2021/plugins/keyboard/keyboard.js +537 -0
- package/es2021/plugins/keyboard/keyboard.min.css +1 -0
- package/es2021/plugins/keyboard/keyboard.min.js +10 -0
- package/es2021/plugins/mobile-view/mobile-view.js +168 -0
- package/es2021/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2021/plugins/page-break/page-break.js +181 -0
- package/es2021/plugins/page-break/page-break.min.js +10 -0
- package/es2021/plugins/paste-code/paste-code.css +21 -0
- package/es2021/plugins/paste-code/paste-code.js +318 -0
- package/es2021/plugins/paste-code/paste-code.min.css +1 -0
- package/es2021/plugins/paste-code/paste-code.min.js +10 -0
- package/es2021/plugins/paste-from-word/paste-from-word.js +1528 -0
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2021/plugins/show-blocks/show-blocks.js +645 -0
- package/es2021/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2021/plugins/todo-list/todo-list.css +77 -0
- package/es2021/plugins/todo-list/todo-list.js +313 -0
- package/es2021/plugins/todo-list/todo-list.min.css +1 -0
- package/es2021/plugins/todo-list/todo-list.min.js +10 -0
- package/es2021/plugins/translate/translate.css +91 -0
- package/es2021/plugins/translate/translate.js +636 -0
- package/es2021/plugins/translate/translate.min.css +1 -0
- package/es2021/plugins/translate/translate.min.js +10 -0
- package/es2021/plugins/tune-block/tune-block.css +37 -0
- package/es2021/plugins/tune-block/tune-block.js +385 -0
- package/es2021/plugins/tune-block/tune-block.min.css +1 -0
- package/es2021/plugins/tune-block/tune-block.min.js +10 -0
- package/es2021.en/jodit.css +4945 -0
- package/es2021.en/jodit.fat.min.css +1 -0
- package/es2021.en/jodit.fat.min.js +10 -0
- package/es2021.en/jodit.js +40989 -0
- package/es2021.en/jodit.min.css +1 -0
- package/es2021.en/jodit.min.js +10 -0
- package/es2021.en/plugins/autocomplete/autocomplete.css +26 -0
- package/es2021.en/plugins/autocomplete/autocomplete.js +463 -0
- package/es2021.en/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es2021.en/plugins/backup/backup.css +48 -0
- package/es2021.en/plugins/backup/backup.js +554 -0
- package/es2021.en/plugins/backup/backup.min.css +1 -0
- package/es2021.en/plugins/backup/backup.min.js +10 -0
- package/es2021.en/plugins/button-generator/button-generator.css +316 -0
- package/es2021.en/plugins/button-generator/button-generator.js +1382 -0
- package/es2021.en/plugins/button-generator/button-generator.min.css +1 -0
- package/es2021.en/plugins/button-generator/button-generator.min.js +10 -0
- package/es2021.en/plugins/change-case/change-case.js +171 -0
- package/es2021.en/plugins/change-case/change-case.min.js +10 -0
- package/es2021.en/plugins/color-picker/color-picker.css +133 -0
- package/es2021.en/plugins/color-picker/color-picker.js +517 -0
- package/es2021.en/plugins/color-picker/color-picker.min.css +1 -0
- package/es2021.en/plugins/color-picker/color-picker.min.js +10 -0
- package/es2021.en/plugins/emoji/emoji.css +108 -0
- package/es2021.en/plugins/emoji/emoji.js +425 -0
- package/es2021.en/plugins/emoji/emoji.min.css +1 -0
- package/es2021.en/plugins/emoji/emoji.min.js +10 -0
- package/es2021.en/plugins/export-docs/export-docs.js +156 -0
- package/es2021.en/plugins/export-docs/export-docs.min.js +10 -0
- package/es2021.en/plugins/finder/finder.css +1342 -0
- package/es2021.en/plugins/finder/finder.js +3117 -0
- package/es2021.en/plugins/finder/finder.min.css +1 -0
- package/es2021.en/plugins/finder/finder.min.js +10 -0
- package/es2021.en/plugins/google-maps/google-maps.css +397 -0
- package/es2021.en/plugins/google-maps/google-maps.js +2540 -0
- package/es2021.en/plugins/google-maps/google-maps.min.css +1 -0
- package/es2021.en/plugins/google-maps/google-maps.min.js +10 -0
- package/es2021.en/plugins/google-search/google-search.js +107 -0
- package/es2021.en/plugins/google-search/google-search.min.js +10 -0
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +231 -0
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +308 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es2021.en/plugins/keyboard/keyboard.css +48 -0
- package/es2021.en/plugins/keyboard/keyboard.js +537 -0
- package/es2021.en/plugins/keyboard/keyboard.min.css +1 -0
- package/es2021.en/plugins/keyboard/keyboard.min.js +10 -0
- package/es2021.en/plugins/mobile-view/mobile-view.js +168 -0
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es2021.en/plugins/page-break/page-break.js +181 -0
- package/es2021.en/plugins/page-break/page-break.min.js +10 -0
- package/es2021.en/plugins/paste-code/paste-code.css +21 -0
- package/es2021.en/plugins/paste-code/paste-code.js +318 -0
- package/es2021.en/plugins/paste-code/paste-code.min.css +1 -0
- package/es2021.en/plugins/paste-code/paste-code.min.js +10 -0
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1528 -0
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es2021.en/plugins/show-blocks/show-blocks.js +322 -0
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es2021.en/plugins/todo-list/todo-list.css +77 -0
- package/es2021.en/plugins/todo-list/todo-list.js +313 -0
- package/es2021.en/plugins/todo-list/todo-list.min.css +1 -0
- package/es2021.en/plugins/todo-list/todo-list.min.js +10 -0
- package/es2021.en/plugins/translate/translate.css +91 -0
- package/es2021.en/plugins/translate/translate.js +636 -0
- package/es2021.en/plugins/translate/translate.min.css +1 -0
- package/es2021.en/plugins/translate/translate.min.js +10 -0
- package/es2021.en/plugins/tune-block/tune-block.css +37 -0
- package/es2021.en/plugins/tune-block/tune-block.js +385 -0
- package/es2021.en/plugins/tune-block/tune-block.min.css +1 -0
- package/es2021.en/plugins/tune-block/tune-block.min.js +10 -0
- package/es5/jodit.css +5956 -0
- package/es5/jodit.fat.min.css +1 -0
- package/es5/jodit.fat.min.js +10 -0
- package/es5/jodit.js +49879 -0
- package/es5/jodit.min.css +15 -0
- package/es5/jodit.min.js +10 -0
- package/es5/plugins/autocomplete/autocomplete.css +26 -0
- package/es5/plugins/autocomplete/autocomplete.js +536 -0
- package/es5/plugins/autocomplete/autocomplete.min.css +1 -0
- package/es5/plugins/autocomplete/autocomplete.min.js +10 -0
- package/es5/plugins/backup/backup.css +48 -0
- package/es5/plugins/backup/backup.js +599 -0
- package/es5/plugins/backup/backup.min.css +1 -0
- package/es5/plugins/backup/backup.min.js +10 -0
- package/es5/plugins/button-generator/button-generator.css +316 -0
- package/es5/plugins/button-generator/button-generator.js +1310 -0
- package/es5/plugins/button-generator/button-generator.min.css +1 -0
- package/es5/plugins/button-generator/button-generator.min.js +10 -0
- package/es5/plugins/change-case/change-case.js +179 -0
- package/es5/plugins/change-case/change-case.min.js +10 -0
- package/es5/plugins/color-picker/color-picker.css +133 -0
- package/es5/plugins/color-picker/color-picker.js +525 -0
- package/es5/plugins/color-picker/color-picker.min.css +1 -0
- package/es5/plugins/color-picker/color-picker.min.js +10 -0
- package/es5/plugins/emoji/emoji.css +108 -0
- package/es5/plugins/emoji/emoji.js +459 -0
- package/es5/plugins/emoji/emoji.min.css +1 -0
- package/es5/plugins/emoji/emoji.min.js +10 -0
- package/es5/plugins/export-docs/export-docs.js +174 -0
- package/es5/plugins/export-docs/export-docs.min.js +10 -0
- package/es5/plugins/finder/finder.css +1342 -0
- package/es5/plugins/finder/finder.js +3335 -0
- package/es5/plugins/finder/finder.min.css +1 -0
- package/es5/plugins/finder/finder.min.js +10 -0
- package/es5/plugins/google-maps/google-maps.css +397 -0
- package/es5/plugins/google-maps/google-maps.js +2463 -0
- package/es5/plugins/google-maps/google-maps.min.css +1 -0
- package/es5/plugins/google-maps/google-maps.min.js +10 -0
- package/es5/plugins/google-search/google-search.js +113 -0
- package/es5/plugins/google-search/google-search.min.js +10 -0
- package/es5/plugins/highlight-signature/highlight-signature.js +253 -0
- package/es5/plugins/highlight-signature/highlight-signature.min.js +10 -0
- package/es5/plugins/iframe-editor/iframe-editor.css +16 -0
- package/es5/plugins/iframe-editor/iframe-editor.js +319 -0
- package/es5/plugins/iframe-editor/iframe-editor.min.css +1 -0
- package/es5/plugins/iframe-editor/iframe-editor.min.js +10 -0
- package/es5/plugins/keyboard/keyboard.css +48 -0
- package/es5/plugins/keyboard/keyboard.js +556 -0
- package/es5/plugins/keyboard/keyboard.min.css +1 -0
- package/es5/plugins/keyboard/keyboard.min.js +10 -0
- package/es5/plugins/mobile-view/mobile-view.js +176 -0
- package/es5/plugins/mobile-view/mobile-view.min.js +10 -0
- package/es5/plugins/page-break/page-break.js +169 -0
- package/es5/plugins/page-break/page-break.min.js +10 -0
- package/es5/plugins/paste-code/paste-code.css +21 -0
- package/es5/plugins/paste-code/paste-code.js +348 -0
- package/es5/plugins/paste-code/paste-code.min.css +1 -0
- package/es5/plugins/paste-code/paste-code.min.js +10 -0
- package/es5/plugins/paste-from-word/paste-from-word.js +1670 -0
- package/es5/plugins/paste-from-word/paste-from-word.min.js +10 -0
- package/es5/plugins/show-blocks/show-blocks.js +649 -0
- package/es5/plugins/show-blocks/show-blocks.min.js +10 -0
- package/es5/plugins/todo-list/todo-list.css +77 -0
- package/es5/plugins/todo-list/todo-list.js +324 -0
- package/es5/plugins/todo-list/todo-list.min.css +1 -0
- package/es5/plugins/todo-list/todo-list.min.js +10 -0
- package/es5/plugins/translate/translate.css +91 -0
- package/es5/plugins/translate/translate.js +657 -0
- package/es5/plugins/translate/translate.min.css +1 -0
- package/es5/plugins/translate/translate.min.js +10 -0
- package/es5/plugins/tune-block/tune-block.css +37 -0
- package/es5/plugins/tune-block/tune-block.js +397 -0
- package/es5/plugins/tune-block/tune-block.min.css +1 -0
- package/es5/plugins/tune-block/tune-block.min.js +10 -0
- package/examples/arabic.lang.html +8 -8
- package/examples/color-picker.html +6 -6
- package/examples/custom-icons.html +8 -8
- package/examples/custom-toolbar.html +8 -8
- package/examples/example.default.html +6 -6
- package/examples/fullsize.html +8 -8
- package/examples/index.html +6 -6
- package/examples/inline-mode.html +8 -8
- package/examples/oneinstance.html +8 -8
- package/examples/theme.html +6 -6
- package/package.json +6 -22
- package/LICENSE.md +0 -3
- package/build/jodit.css +0 -1
- package/build/jodit.es5.css +0 -8
- package/build/jodit.es5.js +0 -1
- package/build/jodit.fat.css +0 -1
- package/build/jodit.fat.es5.css +0 -1
- package/build/jodit.fat.es5.js +0 -1
- package/build/jodit.fat.js +0 -1
- package/build/jodit.js +0 -1
- package/build/plugins/autocomplete/autocomplete.es5.js +0 -1
- package/build/plugins/autocomplete/autocomplete.js +0 -1
- package/build/plugins/backup/backup.es5.js +0 -1
- package/build/plugins/backup/backup.js +0 -1
- package/build/plugins/button-generator/button-generator.css +0 -1
- package/build/plugins/button-generator/button-generator.es5.css +0 -1
- package/build/plugins/button-generator/button-generator.es5.js +0 -1
- package/build/plugins/button-generator/button-generator.js +0 -1
- package/build/plugins/change-case/change-case.es5.js +0 -1
- package/build/plugins/change-case/change-case.js +0 -1
- package/build/plugins/color-picker/color-picker.css +0 -1
- package/build/plugins/color-picker/color-picker.es5.css +0 -1
- package/build/plugins/color-picker/color-picker.es5.js +0 -1
- package/build/plugins/color-picker/color-picker.js +0 -1
- package/build/plugins/emoji/emoji.css +0 -1
- package/build/plugins/emoji/emoji.es5.css +0 -1
- package/build/plugins/emoji/emoji.es5.js +0 -1
- package/build/plugins/emoji/emoji.js +0 -1
- package/build/plugins/export-docs/export-docs.es5.js +0 -1
- package/build/plugins/export-docs/export-docs.js +0 -1
- package/build/plugins/finder/finder.css +0 -1
- package/build/plugins/finder/finder.es5.css +0 -1
- package/build/plugins/finder/finder.es5.js +0 -1
- package/build/plugins/finder/finder.js +0 -1
- package/build/plugins/google-maps/google-maps.css +0 -1
- package/build/plugins/google-maps/google-maps.es5.css +0 -1
- package/build/plugins/google-maps/google-maps.es5.js +0 -1
- package/build/plugins/google-maps/google-maps.js +0 -1
- package/build/plugins/google-search/google-search.es5.js +0 -1
- package/build/plugins/google-search/google-search.js +0 -1
- package/build/plugins/highlight-signature/highlight-signature.es5.js +0 -1
- package/build/plugins/highlight-signature/highlight-signature.js +0 -1
- package/build/plugins/iframe-editor/iframe-editor.es5.js +0 -1
- package/build/plugins/iframe-editor/iframe-editor.js +0 -1
- package/build/plugins/keyboard/keyboard.es5.js +0 -1
- package/build/plugins/keyboard/keyboard.js +0 -1
- package/build/plugins/mobile-view/mobile-view.css +0 -0
- package/build/plugins/mobile-view/mobile-view.es5.css +0 -0
- package/build/plugins/mobile-view/mobile-view.es5.js +0 -1
- package/build/plugins/mobile-view/mobile-view.js +0 -1
- package/build/plugins/page-break/page-break.css +0 -1
- package/build/plugins/page-break/page-break.es5.css +0 -1
- package/build/plugins/page-break/page-break.es5.js +0 -1
- package/build/plugins/page-break/page-break.js +0 -1
- package/build/plugins/paste-code/paste-code.es5.js +0 -1
- package/build/plugins/paste-code/paste-code.js +0 -1
- package/build/plugins/paste-from-word/paste-from-word.es5.js +0 -1
- package/build/plugins/paste-from-word/paste-from-word.js +0 -1
- package/build/plugins/show-blocks/show-blocks.es5.js +0 -1
- package/build/plugins/show-blocks/show-blocks.js +0 -1
- package/build/plugins/todo-list/todo-list.css +0 -1
- package/build/plugins/todo-list/todo-list.es5.css +0 -1
- package/build/plugins/todo-list/todo-list.es5.js +0 -1
- package/build/plugins/todo-list/todo-list.js +0 -1
- package/build/plugins/translate/translate.es5.js +0 -1
- package/build/plugins/translate/translate.js +0 -1
- package/build/plugins/tune-block/tune-block.es5.js +0 -1
- package/build/plugins/tune-block/tune-block.js +0 -1
- package/index.html +0 -268
- /package/{build/config.js → config.js} +0 -0
- /package/{build/plugins/autocomplete/autocomplete.css → es2015/plugins/autocomplete/autocomplete.min.css} +0 -0
- /package/{build/plugins/iframe-editor/iframe-editor.css → es2015/plugins/iframe-editor/iframe-editor.min.css} +0 -0
- /package/{build/plugins/keyboard/keyboard.css → es2015/plugins/keyboard/keyboard.min.css} +0 -0
- /package/{build/plugins/paste-code/paste-code.css → es2015/plugins/paste-code/paste-code.min.css} +0 -0
- /package/{build/plugins/translate/translate.css → es2015/plugins/translate/translate.min.css} +0 -0
- /package/{build/plugins/autocomplete/autocomplete.es5.css → es2018/plugins/autocomplete/autocomplete.min.css} +0 -0
- /package/{build/plugins/iframe-editor/iframe-editor.es5.css → es2018/plugins/iframe-editor/iframe-editor.min.css} +0 -0
- /package/{build/plugins/keyboard/keyboard.es5.css → es2018/plugins/keyboard/keyboard.min.css} +0 -0
- /package/{build/plugins/paste-code/paste-code.es5.css → es2018/plugins/paste-code/paste-code.min.css} +0 -0
- /package/{build/plugins/translate/translate.es5.css → es2018/plugins/translate/translate.min.css} +0 -0
|
@@ -0,0 +1,561 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jodit-pro - PRO Version of Jodit Editor
|
|
3
|
+
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
+
* Version: v2.0.0-beta.10
|
|
5
|
+
* Url: https://xdsoft.net/jodit/pro/
|
|
6
|
+
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
|
10
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
|
11
|
+
module.exports = factory();
|
|
12
|
+
else if(typeof define === 'function' && define.amd)
|
|
13
|
+
define([], factory);
|
|
14
|
+
else {
|
|
15
|
+
var a = factory();
|
|
16
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
|
17
|
+
}
|
|
18
|
+
})(self, function() {
|
|
19
|
+
return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[391],{
|
|
20
|
+
|
|
21
|
+
/***/ 50722:
|
|
22
|
+
/***/ (function(module) {
|
|
23
|
+
|
|
24
|
+
module.exports = "<?xml version=\"1.0\" ?><svg viewBox=\"0 0 64 64\" xmlns=\"http://www.w3.org/2000/svg\"><title/><g id=\"Upload\"><path d=\"M16,26h8V50a2,2,0,0,0,2,2H38a2,2,0,0,0,2-2V26h8a2,2,0,0,0,1.4946-3.3291l-16-18a2,2,0,0,0-2.9892,0l-16,18A2,2,0,0,0,16,26ZM32,9.0107,43.5464,22H38a2,2,0,0,0-2,2V48H28V24a2,2,0,0,0-2-2H20.4536Z\"/><path d=\"M53,42a2,2,0,0,0-2,2V54a2.0023,2.0023,0,0,1-2,2H15a2.0023,2.0023,0,0,1-2-2V44a2,2,0,0,0-4,0V54a6.0066,6.0066,0,0,0,6,6H49a6.0066,6.0066,0,0,0,6-6V44A2,2,0,0,0,53,42Z\"/></g></svg>"
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
27
|
+
|
|
28
|
+
/***/ 32100:
|
|
29
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
30
|
+
|
|
31
|
+
"use strict";
|
|
32
|
+
__webpack_require__.r(__webpack_exports__);
|
|
33
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
/* harmony export */ "backup": function() { return /* binding */ backup; }
|
|
35
|
+
/* harmony export */ });
|
|
36
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97582);
|
|
37
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19775);
|
|
38
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7324);
|
|
39
|
+
/* harmony import */ var _modules_store__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(1844);
|
|
40
|
+
/* harmony import */ var _ui_box__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(71298);
|
|
41
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(75004);
|
|
42
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50526);
|
|
43
|
+
/* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(88292);
|
|
44
|
+
/*!
|
|
45
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
46
|
+
* See LICENSE.md in the project root for license information.
|
|
47
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
48
|
+
*/
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class backup extends jodit_core_plugin__WEBPACK_IMPORTED_MODULE_1__/* .Plugin */ .S {
|
|
58
|
+
constructor() {
|
|
59
|
+
var _a;
|
|
60
|
+
super(...arguments);
|
|
61
|
+
/** @override */
|
|
62
|
+
this.hasStyle = !_JoditPro__WEBPACK_IMPORTED_MODULE_5__/* .JoditPro.fatMode */ .y.fatMode;
|
|
63
|
+
/** @override */
|
|
64
|
+
this.buttons = [
|
|
65
|
+
{
|
|
66
|
+
name: 'backup.restore',
|
|
67
|
+
group: 'history'
|
|
68
|
+
}
|
|
69
|
+
];
|
|
70
|
+
this.__box = new _ui_box__WEBPACK_IMPORTED_MODULE_2__/* .UIBackupBox */ .j(this.j);
|
|
71
|
+
this.__dialog = null;
|
|
72
|
+
this.__storage = (_a = this.jodit.o.backup.remoteStore) !== null && _a !== void 0 ? _a : new _modules_store__WEBPACK_IMPORTED_MODULE_6__/* .DefaultStorage */ .W(this.jodit);
|
|
73
|
+
this.timeout = 0;
|
|
74
|
+
}
|
|
75
|
+
/** @override */
|
|
76
|
+
afterInit(jodit) {
|
|
77
|
+
jodit
|
|
78
|
+
.registerCommand('saveBackup', this.onSaveBackup)
|
|
79
|
+
.registerCommand('openBackupDialog', {
|
|
80
|
+
exec: this.onOpenBackupDialog,
|
|
81
|
+
hotkeys: jodit.o.backup.hotkeys
|
|
82
|
+
});
|
|
83
|
+
const startInterval = () => {
|
|
84
|
+
this.timeout = jodit.async.setTimeout(() => {
|
|
85
|
+
this.onSaveBackup();
|
|
86
|
+
startInterval();
|
|
87
|
+
}, jodit.o.backup.interval * 1000);
|
|
88
|
+
};
|
|
89
|
+
startInterval();
|
|
90
|
+
jodit.e
|
|
91
|
+
.on(this.__box, 'choose', this.onSelectItem)
|
|
92
|
+
.on(jodit.ow, 'beforeunload.backup', () => {
|
|
93
|
+
this.onSaveBackup();
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
prepareDialog() {
|
|
97
|
+
if (!this.__dialog) {
|
|
98
|
+
this.__dialog = this.j
|
|
99
|
+
.dlg({
|
|
100
|
+
minWidth: this.j.o.backup.dialogWidth,
|
|
101
|
+
buttons: ['fullsize', 'dialog.close']
|
|
102
|
+
})
|
|
103
|
+
.setContent(this.__box.container);
|
|
104
|
+
}
|
|
105
|
+
this.__dialog.setHeader(this.jodit.i18n('Restore'));
|
|
106
|
+
this.addButtonsToDialog();
|
|
107
|
+
}
|
|
108
|
+
onSaveBackup() {
|
|
109
|
+
this.__storage.add({
|
|
110
|
+
created: new Date(),
|
|
111
|
+
html: this.j.value
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
async onOpenBackupDialog() {
|
|
115
|
+
this.prepareDialog();
|
|
116
|
+
const { __dialog } = this;
|
|
117
|
+
if (!__dialog) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
__dialog.open().setModal(true);
|
|
121
|
+
const items = await this.__storage.items();
|
|
122
|
+
this.__box.build([
|
|
123
|
+
{
|
|
124
|
+
created: new Date(),
|
|
125
|
+
html: this.j.value
|
|
126
|
+
},
|
|
127
|
+
...items
|
|
128
|
+
]);
|
|
129
|
+
__dialog.calcAutoSize();
|
|
130
|
+
__dialog.setPosition();
|
|
131
|
+
}
|
|
132
|
+
onSelectItem(data) {
|
|
133
|
+
var _a;
|
|
134
|
+
(_a = this.__dialog) === null || _a === void 0 ? void 0 : _a.close();
|
|
135
|
+
this.j.value = data.html;
|
|
136
|
+
this.j.s.focus();
|
|
137
|
+
}
|
|
138
|
+
addButtonsToDialog() {
|
|
139
|
+
var _a;
|
|
140
|
+
const { jodit } = this;
|
|
141
|
+
const ok = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .zx)(jodit, {
|
|
142
|
+
name: 'ok',
|
|
143
|
+
tabIndex: 0,
|
|
144
|
+
variant: 'primary',
|
|
145
|
+
text: 'Ok'
|
|
146
|
+
}), cancel = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .zx)(jodit, {
|
|
147
|
+
variant: 'secondary',
|
|
148
|
+
tabIndex: 0,
|
|
149
|
+
text: 'Cancel'
|
|
150
|
+
}), clear = (0,jodit_core_ui__WEBPACK_IMPORTED_MODULE_3__/* .Button */ .zx)(jodit, {
|
|
151
|
+
name: 'clear',
|
|
152
|
+
tabIndex: 0,
|
|
153
|
+
variant: 'secondary',
|
|
154
|
+
text: 'Remove all'
|
|
155
|
+
});
|
|
156
|
+
ok.onAction(() => {
|
|
157
|
+
this.__box.chooseSelected();
|
|
158
|
+
});
|
|
159
|
+
cancel.onAction(() => {
|
|
160
|
+
var _a;
|
|
161
|
+
(_a = this.__dialog) === null || _a === void 0 ? void 0 : _a.close();
|
|
162
|
+
});
|
|
163
|
+
clear.onAction(() => {
|
|
164
|
+
jodit.confirm('Are you sure?', undefined, (confirm) => {
|
|
165
|
+
var _a;
|
|
166
|
+
if (confirm) {
|
|
167
|
+
this.__storage.clear();
|
|
168
|
+
(_a = this.__dialog) === null || _a === void 0 ? void 0 : _a.close();
|
|
169
|
+
}
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
const block = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_3__/* .UIBlock */ .eC(jodit, [clear, cancel, ok]);
|
|
173
|
+
block.container.style.margin = '0';
|
|
174
|
+
block.container.style.justifyContent = 'flex-end';
|
|
175
|
+
block.container.style.width = '100%';
|
|
176
|
+
(_a = this.__dialog) === null || _a === void 0 ? void 0 : _a.setFooter(block);
|
|
177
|
+
}
|
|
178
|
+
/** @override */
|
|
179
|
+
beforeDestruct() {
|
|
180
|
+
var _a;
|
|
181
|
+
const { j } = this;
|
|
182
|
+
j.async.clearTimeout(this.timeout);
|
|
183
|
+
j.e
|
|
184
|
+
.off(this.__box, 'choose', this.onSelectItem)
|
|
185
|
+
.off(j.ow, 'beforeunload.backup');
|
|
186
|
+
this.__box.destruct();
|
|
187
|
+
(_a = this.__dialog) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
/** @override */
|
|
191
|
+
backup.requires = ['license'];
|
|
192
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
193
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
|
|
194
|
+
], backup.prototype, "onSaveBackup", null);
|
|
195
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
196
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
|
|
197
|
+
], backup.prototype, "onOpenBackupDialog", null);
|
|
198
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_7__/* .__decorate */ .gn)([
|
|
199
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_4__.autobind
|
|
200
|
+
], backup.prototype, "onSelectItem", null);
|
|
201
|
+
_JoditPro__WEBPACK_IMPORTED_MODULE_5__/* .JoditPro.plugins.add */ .y.plugins.add('backup', backup);
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
/***/ }),
|
|
205
|
+
|
|
206
|
+
/***/ 19775:
|
|
207
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
208
|
+
|
|
209
|
+
"use strict";
|
|
210
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77628);
|
|
211
|
+
/* harmony import */ var jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10503);
|
|
212
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(81160);
|
|
213
|
+
/*!
|
|
214
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
215
|
+
* See LICENSE.md in the project root for license information.
|
|
216
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.backup = {
|
|
222
|
+
interval: 30,
|
|
223
|
+
limit: 50,
|
|
224
|
+
dialogWidth: 700,
|
|
225
|
+
hotkeys: ['ctrl+shift+b', 'cmd+shift+b']
|
|
226
|
+
};
|
|
227
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_0__.Config.prototype.controls.backup = {
|
|
228
|
+
store: {
|
|
229
|
+
command: 'saveBackup',
|
|
230
|
+
text: 'Save backup now'
|
|
231
|
+
},
|
|
232
|
+
restore: {
|
|
233
|
+
tooltip: 'Restore',
|
|
234
|
+
list: ['backup.store'],
|
|
235
|
+
exec(editor) {
|
|
236
|
+
editor.execCommand('openBackupDialog');
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
jodit_core_ui_icon__WEBPACK_IMPORTED_MODULE_1__/* .Icon.set */ .J.set('restore', __webpack_require__(50722));
|
|
241
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_2__/* .extendLang */ .xl)(__webpack_require__(10188));
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
/***/ }),
|
|
245
|
+
|
|
246
|
+
/***/ 10188:
|
|
247
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
248
|
+
|
|
249
|
+
"use strict";
|
|
250
|
+
__webpack_require__.r(__webpack_exports__);
|
|
251
|
+
/*!
|
|
252
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
253
|
+
* See LICENSE.md in the project root for license information.
|
|
254
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
255
|
+
*/
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
/***/ }),
|
|
260
|
+
|
|
261
|
+
/***/ 1844:
|
|
262
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
263
|
+
|
|
264
|
+
"use strict";
|
|
265
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
266
|
+
/* harmony export */ "W": function() { return /* binding */ DefaultStorage; }
|
|
267
|
+
/* harmony export */ });
|
|
268
|
+
/*!
|
|
269
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
270
|
+
* See LICENSE.md in the project root for license information.
|
|
271
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
272
|
+
*/
|
|
273
|
+
class DefaultStorage {
|
|
274
|
+
constructor(jodit) {
|
|
275
|
+
this.jodit = jodit;
|
|
276
|
+
this.key = 'backup.default.storage';
|
|
277
|
+
}
|
|
278
|
+
async add(item) {
|
|
279
|
+
if (!item.html.trim().length) {
|
|
280
|
+
return false;
|
|
281
|
+
}
|
|
282
|
+
const items = this.jodit.storage.get(this.key) || [];
|
|
283
|
+
if (items.find((elm) => elm.html === item.html)) {
|
|
284
|
+
return false;
|
|
285
|
+
}
|
|
286
|
+
items.unshift(item);
|
|
287
|
+
if (items.length > this.jodit.o.backup.limit) {
|
|
288
|
+
items.length = this.jodit.o.backup.limit;
|
|
289
|
+
}
|
|
290
|
+
this.jodit.storage.set(this.key, items);
|
|
291
|
+
return false;
|
|
292
|
+
}
|
|
293
|
+
items() {
|
|
294
|
+
return Promise.resolve(this.jodit.storage.get(this.key) || []);
|
|
295
|
+
}
|
|
296
|
+
clear() {
|
|
297
|
+
this.jodit.storage.delete(this.key);
|
|
298
|
+
return Promise.resolve(false);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
/***/ }),
|
|
304
|
+
|
|
305
|
+
/***/ 71298:
|
|
306
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
307
|
+
|
|
308
|
+
"use strict";
|
|
309
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
310
|
+
/* harmony export */ "j": function() { return /* binding */ UIBackupBox; }
|
|
311
|
+
/* harmony export */ });
|
|
312
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
313
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50526);
|
|
314
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(75004);
|
|
315
|
+
/* harmony import */ var _list__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75696);
|
|
316
|
+
/*!
|
|
317
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
318
|
+
* See LICENSE.md in the project root for license information.
|
|
319
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
320
|
+
*/
|
|
321
|
+
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
let UIBackupBox = class UIBackupBox extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_1__/* .UIElement */ .u1 {
|
|
327
|
+
/** @override */
|
|
328
|
+
className() {
|
|
329
|
+
return 'UIBackupBox';
|
|
330
|
+
}
|
|
331
|
+
constructor(jodit) {
|
|
332
|
+
super(jodit);
|
|
333
|
+
this.list = new _list__WEBPACK_IMPORTED_MODULE_2__/* .UIBackupList */ .A(this.j);
|
|
334
|
+
this.preview = this.j.c.div(this.getFullElName('preview'));
|
|
335
|
+
this.container.appendChild(this.list.container);
|
|
336
|
+
this.container.appendChild(this.preview);
|
|
337
|
+
this.list.container.classList.add(this.getFullElName('list'));
|
|
338
|
+
jodit.e
|
|
339
|
+
.on(this.list, 'select', this.onSelectItem)
|
|
340
|
+
.on(this.list, 'choose', this.onChooseItem);
|
|
341
|
+
}
|
|
342
|
+
build(items) {
|
|
343
|
+
this.preview.innerHTML = '';
|
|
344
|
+
this.list.build(items);
|
|
345
|
+
}
|
|
346
|
+
/** @override */
|
|
347
|
+
destruct() {
|
|
348
|
+
this.j.e.off(this.list, 'select', this.onSelectItem);
|
|
349
|
+
this.list.destruct();
|
|
350
|
+
return super.destruct();
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* On select item inside list
|
|
354
|
+
*/
|
|
355
|
+
onSelectItem(item) {
|
|
356
|
+
this.latestSelected = item;
|
|
357
|
+
this.preview.innerHTML =
|
|
358
|
+
item.html ||
|
|
359
|
+
`<div class="${this.getFullElName('empty')}">${this.j.i18n('Empty')}</div>`;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* On choose item inside list
|
|
363
|
+
*/
|
|
364
|
+
onChooseItem(item) {
|
|
365
|
+
this.j.e.fire(this, 'choose', item);
|
|
366
|
+
}
|
|
367
|
+
chooseSelected() {
|
|
368
|
+
this.onChooseItem(this.latestSelected);
|
|
369
|
+
}
|
|
370
|
+
};
|
|
371
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
372
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
373
|
+
], UIBackupBox.prototype, "onSelectItem", null);
|
|
374
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
375
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
376
|
+
], UIBackupBox.prototype, "onChooseItem", null);
|
|
377
|
+
UIBackupBox = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
378
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.component
|
|
379
|
+
], UIBackupBox);
|
|
380
|
+
|
|
381
|
+
|
|
382
|
+
/***/ }),
|
|
383
|
+
|
|
384
|
+
/***/ 64741:
|
|
385
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
386
|
+
|
|
387
|
+
"use strict";
|
|
388
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
389
|
+
/* harmony export */ "O": function() { return /* binding */ UIBackupItem; }
|
|
390
|
+
/* harmony export */ });
|
|
391
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
392
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(95582);
|
|
393
|
+
/*!
|
|
394
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
395
|
+
* See LICENSE.md in the project root for license information.
|
|
396
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
397
|
+
*/
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
class UIBackupItem extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1 {
|
|
402
|
+
/** @override */
|
|
403
|
+
className() {
|
|
404
|
+
return 'UIBackupItem';
|
|
405
|
+
}
|
|
406
|
+
constructor(jodit, data) {
|
|
407
|
+
super(jodit);
|
|
408
|
+
this.data = data;
|
|
409
|
+
this.container.innerHTML = this.formatDate(data.created);
|
|
410
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.attr)(this.container, 'tabIndex', 0);
|
|
411
|
+
}
|
|
412
|
+
formatDate(timestamp) {
|
|
413
|
+
const now = new Date();
|
|
414
|
+
const date = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isString)(timestamp) ? new Date(timestamp) : timestamp, diff = (now.getTime() - date.getTime()) / 1000;
|
|
415
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_1__.isFunction)(this.j.o.backup.formatDate)) {
|
|
416
|
+
return this.j.o.backup.formatDate(date);
|
|
417
|
+
}
|
|
418
|
+
if (diff < 0.2) {
|
|
419
|
+
return this.j.i18n('Current');
|
|
420
|
+
}
|
|
421
|
+
if (diff < 60) {
|
|
422
|
+
return this.j.i18n('Less minute');
|
|
423
|
+
}
|
|
424
|
+
if (diff <= 3600) {
|
|
425
|
+
return this.j.i18n('%s minutes ago', Math.floor(diff / 60));
|
|
426
|
+
}
|
|
427
|
+
if (diff <= 3600 * 24) {
|
|
428
|
+
return this.j.i18n('%s hours ago', Math.floor(diff / 3600));
|
|
429
|
+
}
|
|
430
|
+
return `${date.toDateString()} ${date.toLocaleTimeString()}`;
|
|
431
|
+
}
|
|
432
|
+
focus() {
|
|
433
|
+
this.container.focus();
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
/***/ }),
|
|
439
|
+
|
|
440
|
+
/***/ 75696:
|
|
441
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
442
|
+
|
|
443
|
+
"use strict";
|
|
444
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
445
|
+
/* harmony export */ "A": function() { return /* binding */ UIBackupList; }
|
|
446
|
+
/* harmony export */ });
|
|
447
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97582);
|
|
448
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
449
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
450
|
+
/* harmony import */ var _item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(64741);
|
|
451
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11612);
|
|
452
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
|
|
453
|
+
/*!
|
|
454
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
455
|
+
* See LICENSE.md in the project root for license information.
|
|
456
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
457
|
+
*/
|
|
458
|
+
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
|
|
463
|
+
|
|
464
|
+
let UIBackupList = class UIBackupList extends jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe {
|
|
465
|
+
/** @override */
|
|
466
|
+
className() {
|
|
467
|
+
return 'UIBackupList';
|
|
468
|
+
}
|
|
469
|
+
/** @override */
|
|
470
|
+
createContainer(options) {
|
|
471
|
+
const div = super.createContainer(options);
|
|
472
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(div, 'tabIndex', '-1');
|
|
473
|
+
return div;
|
|
474
|
+
}
|
|
475
|
+
constructor(jodit) {
|
|
476
|
+
super(jodit);
|
|
477
|
+
this.elements = [];
|
|
478
|
+
this.currentSelection = -1;
|
|
479
|
+
jodit.e.on(this.container, 'keydown', (e) => {
|
|
480
|
+
switch (e.key) {
|
|
481
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_ENTER:
|
|
482
|
+
e.preventDefault();
|
|
483
|
+
e.stopPropagation();
|
|
484
|
+
this.onChoose(this.currentSelection);
|
|
485
|
+
break;
|
|
486
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_DOWN:
|
|
487
|
+
this.selectNext();
|
|
488
|
+
break;
|
|
489
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_UP:
|
|
490
|
+
this.selectPrevious();
|
|
491
|
+
break;
|
|
492
|
+
}
|
|
493
|
+
});
|
|
494
|
+
}
|
|
495
|
+
build(items) {
|
|
496
|
+
this.clear();
|
|
497
|
+
items.forEach((data, index) => {
|
|
498
|
+
const item = new _item__WEBPACK_IMPORTED_MODULE_2__/* .UIBackupItem */ .O(this.jodit, data);
|
|
499
|
+
this.append(item);
|
|
500
|
+
this.j.e
|
|
501
|
+
.on(item.container, 'focus', () => this.onSelect(index))
|
|
502
|
+
.on(item.container, 'click', () => this.onSelect(index))
|
|
503
|
+
.on(item.container, 'dblclick', () => this.onChoose(index));
|
|
504
|
+
});
|
|
505
|
+
this.currentSelection = 0;
|
|
506
|
+
this.onChangeCurrentSelection(void 0, -1, 0);
|
|
507
|
+
}
|
|
508
|
+
onChangeCurrentSelection(_, old, index) {
|
|
509
|
+
var _a, _b, _c;
|
|
510
|
+
(_a = this.elements[old]) === null || _a === void 0 ? void 0 : _a.setMod('active', false);
|
|
511
|
+
(_b = this.elements[index]) === null || _b === void 0 ? void 0 : _b.setMod('active', true);
|
|
512
|
+
(_c = this.elements[index]) === null || _c === void 0 ? void 0 : _c.focus();
|
|
513
|
+
this.j.e.fire(this, 'select', this.elements[index].data);
|
|
514
|
+
}
|
|
515
|
+
onSelect(index) {
|
|
516
|
+
this.currentSelection = index;
|
|
517
|
+
}
|
|
518
|
+
onChoose(index) {
|
|
519
|
+
this.j.e.fire(this, 'choose', this.elements[index !== null && index !== void 0 ? index : this.currentSelection].data);
|
|
520
|
+
}
|
|
521
|
+
selectNext() {
|
|
522
|
+
if (this.currentSelection + 1 <= this.elements.length - 1) {
|
|
523
|
+
this.currentSelection += 1;
|
|
524
|
+
}
|
|
525
|
+
else {
|
|
526
|
+
this.currentSelection = 0;
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
selectPrevious() {
|
|
530
|
+
if (this.currentSelection - 1 >= 0) {
|
|
531
|
+
this.currentSelection -= 1;
|
|
532
|
+
}
|
|
533
|
+
else {
|
|
534
|
+
this.currentSelection = this.elements.length - 1;
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
};
|
|
538
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
539
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('currentSelection')
|
|
540
|
+
], UIBackupList.prototype, "onChangeCurrentSelection", null);
|
|
541
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
542
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
543
|
+
], UIBackupList.prototype, "onSelect", null);
|
|
544
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
545
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
546
|
+
], UIBackupList.prototype, "onChoose", null);
|
|
547
|
+
UIBackupList = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
548
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
549
|
+
], UIBackupList);
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
/***/ })
|
|
553
|
+
|
|
554
|
+
},
|
|
555
|
+
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
|
556
|
+
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
557
|
+
/******/ var __webpack_exports__ = (__webpack_exec__(32100));
|
|
558
|
+
/******/ return __webpack_exports__;
|
|
559
|
+
/******/ }
|
|
560
|
+
]);
|
|
561
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.jodit-ui-backup-box{border-bottom:1px solid var(--jd-color-border);display:flex;height:100%;justify-content:stretch;max-height:100%}.jodit-ui-backup-box__list{border-right:1px solid var(--jd-color-border);min-width:200px;overflow:auto;padding:var(--jd-padding-default);user-select:none}.jodit-ui-backup-box__preview{flex:1;overflow:auto;padding:var(--jd-padding-default)}.jodit-ui-backup-box__empty{height:30px;margin:auto;opacity:.3;position:relative;top:50%;width:100px}.jodit-ui-backup-item{cursor:pointer;padding:var(--jd-padding-default)}.jodit-ui-backup-item:hover{background-color:var(--jd-color-background-selection)}.jodit-ui-backup-item_active_true{background-color:var(--jd-color-background-
|
|
1
|
+
.jodit-ui-backup-box{border-bottom:1px solid var(--jd-color-border);display:flex;height:100%;justify-content:stretch;max-height:100%}.jodit-ui-backup-box__list{border-right:1px solid var(--jd-color-border);min-width:200px;overflow:auto;padding:var(--jd-padding-default);user-select:none}.jodit-ui-backup-box__preview{flex:1;overflow:auto;padding:var(--jd-padding-default)}.jodit-ui-backup-box__empty{height:30px;margin:auto;opacity:.3;position:relative;top:50%;width:100px}.jodit-ui-backup-item{cursor:pointer;padding:var(--jd-padding-default)}.jodit-ui-backup-item:hover{background-color:var(--jd-color-background-selection)}.jodit-ui-backup-item_active_true{background-color:var(--jd-color-background-selection-opacity50);outline:1px solid var(--jd-color-border-active)}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jodit-pro - PRO Version of Jodit Editor
|
|
3
|
+
* Author: Chupurnov Valeriy <chupurnov@gmail.com>
|
|
4
|
+
* Version: v2.0.0-beta.10
|
|
5
|
+
* Url: https://xdsoft.net/jodit/pro/
|
|
6
|
+
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var o=e();for(var i in o)("object"==typeof exports?exports:t)[i]=o[i]}}(self,(function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[391],{50722:function(t){t.exports='<?xml version="1.0" ?><svg viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg"><title/><g id="Upload"><path d="M16,26h8V50a2,2,0,0,0,2,2H38a2,2,0,0,0,2-2V26h8a2,2,0,0,0,1.4946-3.3291l-16-18a2,2,0,0,0-2.9892,0l-16,18A2,2,0,0,0,16,26ZM32,9.0107,43.5464,22H38a2,2,0,0,0-2,2V48H28V24a2,2,0,0,0-2-2H20.4536Z"/><path d="M53,42a2,2,0,0,0-2,2V54a2.0023,2.0023,0,0,1-2,2H15a2.0023,2.0023,0,0,1-2-2V44a2,2,0,0,0-4,0V54a6.0066,6.0066,0,0,0,6,6H49a6.0066,6.0066,0,0,0,6-6V44A2,2,0,0,0,53,42Z"/></g></svg>'},32100:function(t,e,o){"use strict";o.r(e),o.d(e,{backup:function(){return h}});var i=o(97582),s=(o(19775),o(7324)),n=o(1844),a=o(71298),r=o(75004),c=o(50526),l=o(88292);class h extends s.S{constructor(){var t;super(...arguments),this.hasStyle=!l.y.fatMode,this.buttons=[{name:"backup.restore",group:"history"}],this.__box=new a.j(this.j),this.__dialog=null,this.__storage=null!==(t=this.jodit.o.backup.remoteStore)&&void 0!==t?t:new n.W(this.jodit),this.timeout=0}afterInit(t){t.registerCommand("saveBackup",this.onSaveBackup).registerCommand("openBackupDialog",{exec:this.onOpenBackupDialog,hotkeys:t.o.backup.hotkeys});const e=()=>{this.timeout=t.async.setTimeout((()=>{this.onSaveBackup(),e()}),1e3*t.o.backup.interval)};e(),t.e.on(this.__box,"choose",this.onSelectItem).on(t.ow,"beforeunload.backup",(()=>{this.onSaveBackup()}))}prepareDialog(){this.__dialog||(this.__dialog=this.j.dlg({minWidth:this.j.o.backup.dialogWidth,buttons:["fullsize","dialog.close"]}).setContent(this.__box.container)),this.__dialog.setHeader(this.jodit.i18n("Restore")),this.addButtonsToDialog()}onSaveBackup(){this.__storage.add({created:new Date,html:this.j.value})}async onOpenBackupDialog(){this.prepareDialog();const{__dialog:t}=this;if(!t)return;t.open().setModal(!0);const e=await this.__storage.items();this.__box.build([{created:new Date,html:this.j.value},...e]),t.calcAutoSize(),t.setPosition()}onSelectItem(t){var e;null===(e=this.__dialog)||void 0===e||e.close(),this.j.value=t.html,this.j.s.focus()}addButtonsToDialog(){var t;const{jodit:e}=this,o=(0,r.zx)(e,{name:"ok",tabIndex:0,variant:"primary",text:"Ok"}),i=(0,r.zx)(e,{variant:"secondary",tabIndex:0,text:"Cancel"}),s=(0,r.zx)(e,{name:"clear",tabIndex:0,variant:"secondary",text:"Remove all"});o.onAction((()=>{this.__box.chooseSelected()})),i.onAction((()=>{var t;null===(t=this.__dialog)||void 0===t||t.close()})),s.onAction((()=>{e.confirm("Are you sure?",void 0,(t=>{var e;t&&(this.__storage.clear(),null===(e=this.__dialog)||void 0===e||e.close())}))}));const n=new r.eC(e,[s,i,o]);n.container.style.margin="0",n.container.style.justifyContent="flex-end",n.container.style.width="100%",null===(t=this.__dialog)||void 0===t||t.setFooter(n)}beforeDestruct(){var t;const{j:e}=this;e.async.clearTimeout(this.timeout),e.e.off(this.__box,"choose",this.onSelectItem).off(e.ow,"beforeunload.backup"),this.__box.destruct(),null===(t=this.__dialog)||void 0===t||t.destruct()}}h.requires=["license"],(0,i.gn)([c.autobind],h.prototype,"onSaveBackup",null),(0,i.gn)([c.autobind],h.prototype,"onOpenBackupDialog",null),(0,i.gn)([c.autobind],h.prototype,"onSelectItem",null),l.y.plugins.add("backup",h)},19775:function(t,e,o){"use strict";var i=o(77628),s=o(10503),n=o(81160);i.Config.prototype.backup={interval:30,limit:50,dialogWidth:700,hotkeys:["ctrl+shift+b","cmd+shift+b"]},i.Config.prototype.controls.backup={store:{command:"saveBackup",text:"Save backup now"},restore:{tooltip:"Restore",list:["backup.store"],exec(t){t.execCommand("openBackupDialog")}}},s.J.set("restore",o(50722)),(0,n.xl)(o(10188))},10188:function(t,e,o){"use strict";o.r(e)},1844:function(t,e,o){"use strict";o.d(e,{W:function(){return i}});class i{constructor(t){this.jodit=t,this.key="backup.default.storage"}async add(t){if(!t.html.trim().length)return!1;const e=this.jodit.storage.get(this.key)||[];return e.find((e=>e.html===t.html))||(e.unshift(t),e.length>this.jodit.o.backup.limit&&(e.length=this.jodit.o.backup.limit),this.jodit.storage.set(this.key,e)),!1}items(){return Promise.resolve(this.jodit.storage.get(this.key)||[])}clear(){return this.jodit.storage.delete(this.key),Promise.resolve(!1)}}},71298:function(t,e,o){"use strict";o.d(e,{j:function(){return r}});var i=o(97582),s=o(50526),n=o(75004),a=o(75696);let r=class t extends n.u1{className(){return"UIBackupBox"}constructor(t){super(t),this.list=new a.A(this.j),this.preview=this.j.c.div(this.getFullElName("preview")),this.container.appendChild(this.list.container),this.container.appendChild(this.preview),this.list.container.classList.add(this.getFullElName("list")),t.e.on(this.list,"select",this.onSelectItem).on(this.list,"choose",this.onChooseItem)}build(t){this.preview.innerHTML="",this.list.build(t)}destruct(){return this.j.e.off(this.list,"select",this.onSelectItem),this.list.destruct(),super.destruct()}onSelectItem(t){this.latestSelected=t,this.preview.innerHTML=t.html||`<div class="${this.getFullElName("empty")}">${this.j.i18n("Empty")}</div>`}onChooseItem(t){this.j.e.fire(this,"choose",t)}chooseSelected(){this.onChooseItem(this.latestSelected)}};(0,i.gn)([s.autobind],r.prototype,"onSelectItem",null),(0,i.gn)([s.autobind],r.prototype,"onChooseItem",null),r=(0,i.gn)([s.component],r)},64741:function(t,e,o){"use strict";o.d(e,{O:function(){return n}});var i=o(75004),s=o(95582);class n extends i.u1{className(){return"UIBackupItem"}constructor(t,e){super(t),this.data=e,this.container.innerHTML=this.formatDate(e.created),(0,s.attr)(this.container,"tabIndex",0)}formatDate(t){const e=new Date,o=(0,s.isString)(t)?new Date(t):t,i=(e.getTime()-o.getTime())/1e3;return(0,s.isFunction)(this.j.o.backup.formatDate)?this.j.o.backup.formatDate(o):.2>i?this.j.i18n("Current"):60>i?this.j.i18n("Less minute"):i>3600?i>86400?`${o.toDateString()} ${o.toLocaleTimeString()}`:this.j.i18n("%s hours ago",Math.floor(i/3600)):this.j.i18n("%s minutes ago",Math.floor(i/60))}focus(){this.container.focus()}}},75696:function(t,e,o){"use strict";o.d(e,{A:function(){return l}});var i=o(97582),s=o(75004),n=o(50526),a=o(64741),r=o(11612),c=o(95582);let l=class t extends s.qe{className(){return"UIBackupList"}createContainer(t){const e=super.createContainer(t);return(0,c.attr)(e,"tabIndex","-1"),e}constructor(t){super(t),this.elements=[],this.currentSelection=-1,t.e.on(this.container,"keydown",(t=>{switch(t.key){case r.KEY_ENTER:t.preventDefault(),t.stopPropagation(),this.onChoose(this.currentSelection);break;case r.KEY_DOWN:this.selectNext();break;case r.KEY_UP:this.selectPrevious()}}))}build(t){this.clear(),t.forEach(((t,e)=>{const o=new a.O(this.jodit,t);this.append(o),this.j.e.on(o.container,"focus",(()=>this.onSelect(e))).on(o.container,"click",(()=>this.onSelect(e))).on(o.container,"dblclick",(()=>this.onChoose(e)))})),this.currentSelection=0,this.onChangeCurrentSelection(void 0,-1,0)}onChangeCurrentSelection(t,e,o){var i,s,n;null===(i=this.elements[e])||void 0===i||i.setMod("active",!1),null===(s=this.elements[o])||void 0===s||s.setMod("active",!0),null===(n=this.elements[o])||void 0===n||n.focus(),this.j.e.fire(this,"select",this.elements[o].data)}onSelect(t){this.currentSelection=t}onChoose(t){this.j.e.fire(this,"choose",this.elements[null!=t?t:this.currentSelection].data)}selectNext(){this.currentSelection+1>this.elements.length-1?this.currentSelection=0:this.currentSelection+=1}selectPrevious(){0>this.currentSelection-1?this.currentSelection=this.elements.length-1:this.currentSelection-=1}};(0,i.gn)([(0,n.watch)("currentSelection")],l.prototype,"onChangeCurrentSelection",null),(0,i.gn)([n.autobind],l.prototype,"onSelect",null),(0,i.gn)([n.autobind],l.prototype,"onChoose",null),l=(0,i.gn)([n.component],l)}},function(t){return t(t.s=32100)}])}));
|