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,3335 @@
|
|
|
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([[524],{
|
|
20
|
+
|
|
21
|
+
/***/ 82942:
|
|
22
|
+
/***/ (function(module) {
|
|
23
|
+
|
|
24
|
+
module.exports = "<svg viewBox=\"0 0 512 512\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M365.4,59.628c60.56,0,109.6,49.03,109.6,109.47c0,109.47-109.6,171.8-219.06,281.271 C146.47,340.898,37,278.568,37,169.099c0-60.44,49.04-109.47,109.47-109.47c54.73,0,82.1,27.37,109.47,82.1 C283.3,86.999,310.67,59.628,365.4,59.628z\"/> </svg>"
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
27
|
+
|
|
28
|
+
/***/ 19327:
|
|
29
|
+
/***/ (function(module) {
|
|
30
|
+
|
|
31
|
+
module.exports = "<svg viewBox=\"0 0 32 32\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M28.7,16.3l-12-13c-0.4-0.4-1.1-0.4-1.5,0l-12,13C3,16.6,2.9,17,3.1,17.4C3.2,17.8,3.6,18,4,18h3v10c0,0.6,0.4,1,1,1h16 c0.6,0,1-0.4,1-1V18h3c0.4,0,0.8-0.2,0.9-0.6C29.1,17,29,16.6,28.7,16.3z\"/> </svg>"
|
|
32
|
+
|
|
33
|
+
/***/ }),
|
|
34
|
+
|
|
35
|
+
/***/ 59239:
|
|
36
|
+
/***/ (function(module) {
|
|
37
|
+
|
|
38
|
+
module.exports = "<svg viewBox=\"0 0 252 252\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M0 16C0 7.16344 7.16344 0 16 0H85.6364C86.5205 0 87.3797 0.29288 88.0796 0.832871L120.92 26.1671C121.62 26.7071 122.48 27 123.364 27H227C235.837 27 243 34.1634 243 43V132.335C243 134.779 240.234 136.198 238.25 134.772L233 131L226.5 127L220 124L212.5 122L202.5 120L189 120.5L179.5 122.5L170.5 125.5L161.5 130.5L157 133.5L153 137L146.5 144L141 152L137 160L134 168L132.5 178L132 183.5V189.5L133 197.5L135 205.5L137.5 211.5L139.524 214.996C141.068 217.663 139.144 221 136.062 221H16C7.16344 221 0 213.837 0 205V16Z\"/> <circle cx=\"197\" cy=\"185\" r=\"56\"/> <path d=\"M188.364 215.955V151.591H204.636V215.955H188.364ZM164.318 191.909V175.636H228.682V191.909H164.318Z\" fill=\"white\"/> </svg>"
|
|
39
|
+
|
|
40
|
+
/***/ }),
|
|
41
|
+
|
|
42
|
+
/***/ 46567:
|
|
43
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
44
|
+
|
|
45
|
+
"use strict";
|
|
46
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47
|
+
/* harmony export */ "lf": function() { return /* reexport safe */ _dlgs__WEBPACK_IMPORTED_MODULE_2__.l; }
|
|
48
|
+
/* harmony export */ });
|
|
49
|
+
/* harmony import */ var _elms__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(71917);
|
|
50
|
+
/* harmony import */ var _mods__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(90043);
|
|
51
|
+
/* harmony import */ var _dlgs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87759);
|
|
52
|
+
/*!
|
|
53
|
+
* Jodit Editor (https://xdsoft.net/jodit/)
|
|
54
|
+
* Released under MIT see LICENSE.txt in the project root for license information.
|
|
55
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* @module traits
|
|
59
|
+
*/
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
/***/ }),
|
|
66
|
+
|
|
67
|
+
/***/ 68813:
|
|
68
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
69
|
+
|
|
70
|
+
"use strict";
|
|
71
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
72
|
+
/* harmony export */ "X": function() { return /* binding */ FileBrowserPro; }
|
|
73
|
+
/* harmony export */ });
|
|
74
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(97582);
|
|
75
|
+
/* harmony import */ var _ui_assets_icons__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(68349);
|
|
76
|
+
/* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(8079);
|
|
77
|
+
/* harmony import */ var jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2932);
|
|
78
|
+
/* harmony import */ var _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(96123);
|
|
79
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
|
|
80
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(50526);
|
|
81
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11612);
|
|
82
|
+
/* harmony import */ var _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(83568);
|
|
83
|
+
/* harmony import */ var _ui_header_header__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65669);
|
|
84
|
+
/* harmony import */ var jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(92803);
|
|
85
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(77628);
|
|
86
|
+
/* harmony import */ var _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(22840);
|
|
87
|
+
/* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(3028);
|
|
88
|
+
/* harmony import */ var jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(46567);
|
|
89
|
+
/* harmony import */ var _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(93469);
|
|
90
|
+
/* harmony import */ var _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(9581);
|
|
91
|
+
/* harmony import */ var _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(63052);
|
|
92
|
+
/* harmony import */ var _helpers_helpers__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(70467);
|
|
93
|
+
/* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(88292);
|
|
94
|
+
/* harmony import */ var _license_license__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(19564);
|
|
95
|
+
/* harmony import */ var _ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(41424);
|
|
96
|
+
/* harmony import */ var _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(48086);
|
|
97
|
+
/*!
|
|
98
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
99
|
+
* See LICENSE.md in the project root for license information.
|
|
100
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
101
|
+
*/
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
var FileBrowserPro = /** @class */ (function (_super) {
|
|
127
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__extends */ .ZT)(FileBrowserPro, _super);
|
|
128
|
+
function FileBrowserPro(options) {
|
|
129
|
+
var _this = _super.call(this, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(Object.assign(options || {}, {
|
|
130
|
+
resizable: true,
|
|
131
|
+
draggable: true,
|
|
132
|
+
toolbarButtons: (options === null || options === void 0 ? void 0 : options.toolbarButtons) ||
|
|
133
|
+
jodit_config__WEBPACK_IMPORTED_MODULE_10__/* .Config.defaultOptions.filebrowser.buttons */ .D.defaultOptions.filebrowser.buttons,
|
|
134
|
+
buttons: _JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.atom */ .y.atom([
|
|
135
|
+
'filebrowser.settings',
|
|
136
|
+
'fullsize',
|
|
137
|
+
'dialog.close'
|
|
138
|
+
])
|
|
139
|
+
}), jodit_config__WEBPACK_IMPORTED_MODULE_10__/* .Config.defaultOptions.filebrowser */ .D.defaultOptions.filebrowser)) || this;
|
|
140
|
+
_this.dataProvider = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_12__/* .makeDataProvider */ .S)(_this, _this.options);
|
|
141
|
+
_this.state = (0,jodit_modules__WEBPACK_IMPORTED_MODULE_1__.observable)({
|
|
142
|
+
onSelectCallBack: null,
|
|
143
|
+
theme: 'default',
|
|
144
|
+
showSideBar: true,
|
|
145
|
+
showFavorites: true,
|
|
146
|
+
showSettings: false,
|
|
147
|
+
showPreview: false,
|
|
148
|
+
withFolders: true,
|
|
149
|
+
foldersPosition: 'bottom',
|
|
150
|
+
info: '',
|
|
151
|
+
metaInfo: null,
|
|
152
|
+
currentPath: '',
|
|
153
|
+
currentSource: '',
|
|
154
|
+
currentBaseUrl: '',
|
|
155
|
+
tree: [],
|
|
156
|
+
activeElements: [],
|
|
157
|
+
favorites: [],
|
|
158
|
+
progress: 0,
|
|
159
|
+
lastSelectedIndex: 0,
|
|
160
|
+
elements: [],
|
|
161
|
+
messages: [],
|
|
162
|
+
sources: [],
|
|
163
|
+
view: 'tiles',
|
|
164
|
+
tileSize: 'default',
|
|
165
|
+
sortBy: 'name-asc',
|
|
166
|
+
filterWord: '',
|
|
167
|
+
onlyImages: false
|
|
168
|
+
});
|
|
169
|
+
_this.persistent = new _helpers_persistent_store__WEBPACK_IMPORTED_MODULE_14__/* .PersistentStore */ .h(_this, _this.state);
|
|
170
|
+
_this.loadingManager = new _helpers_loading_manager__WEBPACK_IMPORTED_MODULE_20__/* .LoadingManager */ .l(_this, _this.state);
|
|
171
|
+
_this.stateManager = new _helpers_state_manager__WEBPACK_IMPORTED_MODULE_7__/* .StateManager */ .O(_this.state);
|
|
172
|
+
_this.historyManager = new _helpers_history_manager__WEBPACK_IMPORTED_MODULE_15__/* .HistoryManager */ .E(_this, _this.state);
|
|
173
|
+
_this.contextMenuManager = new _helpers_context_menu__WEBPACK_IMPORTED_MODULE_16__/* .ContextMenuManager */ .z(_this);
|
|
174
|
+
_this.header = new _ui_header_header__WEBPACK_IMPORTED_MODULE_8__/* .UIBrowserHeader */ .C(_this, _this.options, _this.stateManager);
|
|
175
|
+
_this.panel = new _ui_panel_panel__WEBPACK_IMPORTED_MODULE_3__/* .UIBrowserPanel */ .G(_this, _this.stateManager);
|
|
176
|
+
_this.files = _this.panel;
|
|
177
|
+
_this.tree = _this.panel;
|
|
178
|
+
_license_license__WEBPACK_IMPORTED_MODULE_18__/* .license.make */ .V.make(_this);
|
|
179
|
+
if (!_this.persistent.theme && _this.options.theme) {
|
|
180
|
+
_this.persistent.theme = _this.options.theme;
|
|
181
|
+
}
|
|
182
|
+
_this.panel.append(_this.progressbar);
|
|
183
|
+
_this.toolbar.setMod('mode', 'header');
|
|
184
|
+
_this.setSize(Math.min(_this.options.width, screen.width), Math.min(_this.options.height, screen.height)).setHeader(_this.header);
|
|
185
|
+
_this.onResizeWindow();
|
|
186
|
+
_this.initUploader();
|
|
187
|
+
_this.onChangeTheme();
|
|
188
|
+
_this.fullFillOptions();
|
|
189
|
+
_this.dataProvider.onProgress(function (percentage) {
|
|
190
|
+
if (percentage === 0) {
|
|
191
|
+
percentage = 30;
|
|
192
|
+
}
|
|
193
|
+
_this.state.progress = percentage;
|
|
194
|
+
});
|
|
195
|
+
_this.e.on('beforeClose', _this.removeGlobalListeners);
|
|
196
|
+
_this.e.fire('afterInit');
|
|
197
|
+
_JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.prototype.afterInitHook.call */ .y.prototype.afterInitHook.call(_this);
|
|
198
|
+
return _this;
|
|
199
|
+
}
|
|
200
|
+
/** @override */
|
|
201
|
+
FileBrowserPro.prototype.className = function () {
|
|
202
|
+
return 'FileBrowserPro';
|
|
203
|
+
};
|
|
204
|
+
/** @override */
|
|
205
|
+
FileBrowserPro.prototype.lock = function (name) {
|
|
206
|
+
if (name === void 0) { name = 'any'; }
|
|
207
|
+
this.container.classList.add('jodit_disabled');
|
|
208
|
+
return _super.prototype.lock.call(this, name);
|
|
209
|
+
};
|
|
210
|
+
FileBrowserPro.prototype.unlock = function () {
|
|
211
|
+
this.container.classList.remove('jodit_disabled');
|
|
212
|
+
return _super.prototype.unlock.call(this);
|
|
213
|
+
};
|
|
214
|
+
FileBrowserPro.prototype.status = function (message, success) {
|
|
215
|
+
if (success === void 0) { success = !(message instanceof Error); }
|
|
216
|
+
if ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isAbort)(message)) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
219
|
+
if (!jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.IS_PROD && !(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message)) {
|
|
220
|
+
console.error(message);
|
|
221
|
+
}
|
|
222
|
+
this.message.message((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isString)(message) ? message : message.message, success ? 'success' : 'error', this.options.howLongShowMsg);
|
|
223
|
+
};
|
|
224
|
+
Object.defineProperty(FileBrowserPro.prototype, "progressbar", {
|
|
225
|
+
get: function () {
|
|
226
|
+
return new _ui_progress_progress__WEBPACK_IMPORTED_MODULE_11__/* .UIProgress */ .u(this, this.stateManager.state);
|
|
227
|
+
},
|
|
228
|
+
enumerable: false,
|
|
229
|
+
configurable: true
|
|
230
|
+
});
|
|
231
|
+
/** @override */
|
|
232
|
+
FileBrowserPro.prototype.addDisclaimer = function (elm) {
|
|
233
|
+
this.dialog.appendChild(elm);
|
|
234
|
+
};
|
|
235
|
+
// @ts-ignore
|
|
236
|
+
FileBrowserPro.prototype.open = function (callback, onlyImages) {
|
|
237
|
+
if (callback === void 0) { callback = this.o
|
|
238
|
+
.defaultCallback; }
|
|
239
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
240
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__generator */ .Jh)(this, function (_a) {
|
|
241
|
+
this.state.onlyImages = Boolean(onlyImages);
|
|
242
|
+
this.prepareOpening(callback);
|
|
243
|
+
_super.prototype.open.call(this, this.panel.container);
|
|
244
|
+
return [2 /*return*/, this.e.fire('update.filebrowser')];
|
|
245
|
+
});
|
|
246
|
+
});
|
|
247
|
+
};
|
|
248
|
+
/**
|
|
249
|
+
* Resize handler
|
|
250
|
+
*/
|
|
251
|
+
FileBrowserPro.prototype.onResizeWindow = function () {
|
|
252
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(this.dialog, {
|
|
253
|
+
maxWidth: screen.width,
|
|
254
|
+
minHeight: Math.min(this.options.height, screen.height),
|
|
255
|
+
minWidth: Math.min(this.options.width, screen.width)
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
FileBrowserPro.prototype.onChangePath = function () {
|
|
259
|
+
var _a;
|
|
260
|
+
var currentPath = (_a = this.state, _a.currentPath), currentSource = _a.currentSource;
|
|
261
|
+
this.uploader.setPath(currentPath);
|
|
262
|
+
this.uploader.setSource(currentSource);
|
|
263
|
+
};
|
|
264
|
+
FileBrowserPro.prototype.onChangeTheme = function () {
|
|
265
|
+
this.setMod('theme', this.state.theme);
|
|
266
|
+
this.header.setMod('theme', this.state.theme);
|
|
267
|
+
this.panel.setMod('theme', this.state.theme);
|
|
268
|
+
this.options.theme = this.state.theme;
|
|
269
|
+
};
|
|
270
|
+
FileBrowserPro.prototype.onToggleSettings = function () {
|
|
271
|
+
this.state.showSettings = !this.state.showSettings;
|
|
272
|
+
};
|
|
273
|
+
FileBrowserPro.prototype.prepareOpening = function (callback) {
|
|
274
|
+
var _this = this;
|
|
275
|
+
this.registerGlobalListeners();
|
|
276
|
+
if (callback) {
|
|
277
|
+
this.state.onSelectCallBack = function (data) {
|
|
278
|
+
_this.close();
|
|
279
|
+
callback(data);
|
|
280
|
+
};
|
|
281
|
+
}
|
|
282
|
+
this.persistent.syncWithState();
|
|
283
|
+
};
|
|
284
|
+
FileBrowserPro.prototype.registerGlobalListeners = function () {
|
|
285
|
+
this.e.on(this.ow, 'keydown', this.onKeyPress);
|
|
286
|
+
};
|
|
287
|
+
FileBrowserPro.prototype.onKeyPress = function (e) {
|
|
288
|
+
var activeElement = this.od.activeElement;
|
|
289
|
+
if (!this.state.activeElements.length ||
|
|
290
|
+
!activeElement ||
|
|
291
|
+
!jodit_modules__WEBPACK_IMPORTED_MODULE_1__.Dom.isOrContains(this.panel.items.container, activeElement)) {
|
|
292
|
+
return;
|
|
293
|
+
}
|
|
294
|
+
var elms = this.state.elements;
|
|
295
|
+
switch (e.key) {
|
|
296
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_ENTER: {
|
|
297
|
+
return this.onChooseItems();
|
|
298
|
+
}
|
|
299
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DELETE: {
|
|
300
|
+
return this.onFileRemove();
|
|
301
|
+
}
|
|
302
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT:
|
|
303
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT:
|
|
304
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN:
|
|
305
|
+
case jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_UP: {
|
|
306
|
+
var next = e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_DOWN, index = this.state.lastSelectedIndex;
|
|
307
|
+
var nextIndex = void 0;
|
|
308
|
+
if ([jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_RIGHT, jodit_core_constants__WEBPACK_IMPORTED_MODULE_6__.KEY_LEFT].includes(e.key)) {
|
|
309
|
+
if (next) {
|
|
310
|
+
nextIndex = !elms[index + 1] ? 0 : index + 1;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
nextIndex = !elms[index - 1]
|
|
314
|
+
? elms.length - 1
|
|
315
|
+
: index - 1;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
else {
|
|
319
|
+
var countInRow = this.panel.countInRow;
|
|
320
|
+
nextIndex = Math.round(((index + 1) / countInRow + (next ? 1 : -1)) *
|
|
321
|
+
countInRow -
|
|
322
|
+
1);
|
|
323
|
+
}
|
|
324
|
+
elms[nextIndex] &&
|
|
325
|
+
this.stateManager.addActive(elms[nextIndex], e.shiftKey);
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
};
|
|
330
|
+
FileBrowserPro.prototype.removeGlobalListeners = function () {
|
|
331
|
+
this.e.off(this.ow, 'keydown', this.onKeyPress);
|
|
332
|
+
};
|
|
333
|
+
FileBrowserPro.prototype.onFileRemove = function () {
|
|
334
|
+
var _this = this;
|
|
335
|
+
if (this.state.activeElements.length) {
|
|
336
|
+
this.confirm('Are you sure?', 'Delete', function (yes) {
|
|
337
|
+
yes && void _this.__itemsRemove(_this.state.activeElements);
|
|
338
|
+
}).bindDestruct(this);
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
FileBrowserPro.prototype.__itemsRemove = function (items) {
|
|
342
|
+
var _this = this;
|
|
343
|
+
if (!items.length) {
|
|
344
|
+
return Promise.resolve();
|
|
345
|
+
}
|
|
346
|
+
var promises = [];
|
|
347
|
+
items.forEach(function (item) {
|
|
348
|
+
var _a;
|
|
349
|
+
promises.push(item.type === 'folder'
|
|
350
|
+
? _this.__folderRemove((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(item.path), (_a = item.name) !== null && _a !== void 0 ? _a : '', item.sourceName)
|
|
351
|
+
: _this.__removeFile(item.file || item.name || '', item.sourceName));
|
|
352
|
+
});
|
|
353
|
+
this.state.activeElements.forEach(function (el) {
|
|
354
|
+
_this.stateManager.isFavorite(el) &&
|
|
355
|
+
_this.stateManager.toggleFavorite(el);
|
|
356
|
+
});
|
|
357
|
+
this.state.activeElements = [];
|
|
358
|
+
return Promise.allSettled(promises).then(function () {
|
|
359
|
+
return Promise.allSettled([
|
|
360
|
+
_this.loadingManager.loadItems(),
|
|
361
|
+
_this.loadingManager.loadFolders()
|
|
362
|
+
]);
|
|
363
|
+
});
|
|
364
|
+
};
|
|
365
|
+
FileBrowserPro.prototype.__removeFile = function (name, source) {
|
|
366
|
+
var _this = this;
|
|
367
|
+
return this.dataProvider
|
|
368
|
+
.fileRemove(this.state.currentPath, name, source)
|
|
369
|
+
.then(function (message) {
|
|
370
|
+
_this.status(message || _this.i18n('File "%s" was deleted', name), true);
|
|
371
|
+
})
|
|
372
|
+
.catch(this.status);
|
|
373
|
+
};
|
|
374
|
+
FileBrowserPro.prototype.__folderRemove = function (path, name, sourceName) {
|
|
375
|
+
var _this = this;
|
|
376
|
+
return this.dataProvider
|
|
377
|
+
.folderRemove(path, name, sourceName)
|
|
378
|
+
.then(function (message) {
|
|
379
|
+
_this.status(message || _this.i18n('Folder "%s" was deleted', name), true);
|
|
380
|
+
if (_this.state.currentPath === path) {
|
|
381
|
+
_this.state.currentPath = (0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(path);
|
|
382
|
+
_this.state.currentSource = sourceName;
|
|
383
|
+
}
|
|
384
|
+
})
|
|
385
|
+
.catch(this.status);
|
|
386
|
+
};
|
|
387
|
+
FileBrowserPro.prototype.onFileEdit = function () {
|
|
388
|
+
var _a;
|
|
389
|
+
if (this.state.activeElements.length === 1) {
|
|
390
|
+
var file = (_a = (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__read */ .CR)(this.state.activeElements, 1), _a[0]);
|
|
391
|
+
jodit_modules_image_editor_image_editor__WEBPACK_IMPORTED_MODULE_9__/* .openImageEditor.call */ .r.call(this, file.fileURL, file.file || '', file.path, file.sourceName, undefined, this.status);
|
|
392
|
+
}
|
|
393
|
+
};
|
|
394
|
+
FileBrowserPro.prototype.onFolderRename = function (data) {
|
|
395
|
+
var _this = this;
|
|
396
|
+
this.prompt('Enter new name', 'Rename', function (newName) {
|
|
397
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName) || newName === data.name) {
|
|
398
|
+
_this.status(_this.i18n('Enter new name'));
|
|
399
|
+
return false;
|
|
400
|
+
}
|
|
401
|
+
_this.dataProvider
|
|
402
|
+
.folderRename((0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(data.path), data.name, newName, data.sourceName)
|
|
403
|
+
.then(function (message) {
|
|
404
|
+
_this.state.activeElements = [];
|
|
405
|
+
_this.status(message, true);
|
|
406
|
+
_this.state.currentPath =
|
|
407
|
+
(0,_helpers_helpers__WEBPACK_IMPORTED_MODULE_22__/* .parentPath */ .C)(data.path) + '/' + newName;
|
|
408
|
+
_this.state.currentSource = data.sourceName;
|
|
409
|
+
_this.historyManager.updateCurrent();
|
|
410
|
+
_this.loadingManager.loadFolders();
|
|
411
|
+
})
|
|
412
|
+
.catch(_this.status);
|
|
413
|
+
return;
|
|
414
|
+
}, this.i18n('type name'), data.name).bindDestruct(this);
|
|
415
|
+
};
|
|
416
|
+
FileBrowserPro.prototype.onFolderRemove = function (data) {
|
|
417
|
+
var _this = this;
|
|
418
|
+
this.confirm('Are you sure?', 'Delete', function (yes) {
|
|
419
|
+
yes &&
|
|
420
|
+
void _this.__itemsRemove([
|
|
421
|
+
{
|
|
422
|
+
type: 'folder',
|
|
423
|
+
name: data.name,
|
|
424
|
+
path: data.path,
|
|
425
|
+
sourceName: data.sourceName
|
|
426
|
+
}
|
|
427
|
+
]);
|
|
428
|
+
}).bindDestruct(this);
|
|
429
|
+
};
|
|
430
|
+
FileBrowserPro.prototype.onFolderCreate = function (data) {
|
|
431
|
+
var _this = this;
|
|
432
|
+
this.prompt('Enter Directory name', 'Create directory', function (name) {
|
|
433
|
+
var path = data.path || '/';
|
|
434
|
+
_this.dataProvider
|
|
435
|
+
.createFolder(name, data.path || '/', data.sourceName)
|
|
436
|
+
.then(function () {
|
|
437
|
+
if (_this.state.currentSource === data.sourceName &&
|
|
438
|
+
_this.state.currentPath === path) {
|
|
439
|
+
_this.e.fire('update.filebrowser');
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
_this.state.currentSource = data.sourceName;
|
|
443
|
+
_this.state.currentPath = path;
|
|
444
|
+
}
|
|
445
|
+
_this.historyManager.updateCurrent();
|
|
446
|
+
}, _this.status);
|
|
447
|
+
}, this.i18n('type name')).bindDestruct(this);
|
|
448
|
+
};
|
|
449
|
+
FileBrowserPro.prototype.onFileRename = function (item) {
|
|
450
|
+
var _this = this;
|
|
451
|
+
var name = item.file || item.name || '';
|
|
452
|
+
if (this.state.activeElements.length === 1 && name) {
|
|
453
|
+
this.prompt('Enter new name', 'Rename', function (newName) {
|
|
454
|
+
if (!(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.isValidName)(newName)) {
|
|
455
|
+
_this.status(_this.i18n('Enter new name'));
|
|
456
|
+
return false;
|
|
457
|
+
}
|
|
458
|
+
_this.dataProvider
|
|
459
|
+
.fileRename(_this.state.currentPath, name, newName, _this.state.currentSource)
|
|
460
|
+
.then(function (message) {
|
|
461
|
+
_this.state.activeElements = [];
|
|
462
|
+
_this.status(message, true);
|
|
463
|
+
void _this.loadingManager.loadItems();
|
|
464
|
+
})
|
|
465
|
+
.catch(_this.status);
|
|
466
|
+
return;
|
|
467
|
+
}, this.i18n('type name'), name).bindDestruct(this);
|
|
468
|
+
}
|
|
469
|
+
};
|
|
470
|
+
FileBrowserPro.prototype.onChooseItems = function () {
|
|
471
|
+
var act = this.stateManager.state.activeElements;
|
|
472
|
+
if (act.length) {
|
|
473
|
+
if (act[0].type === 'folder') {
|
|
474
|
+
this.state.currentPath =
|
|
475
|
+
this.state.currentPath + '/' + act[0].name;
|
|
476
|
+
this.state.currentSource = act[0].sourceName;
|
|
477
|
+
this.e.fire('afterOpenFolder.filebrowser');
|
|
478
|
+
return;
|
|
479
|
+
}
|
|
480
|
+
if (this.state.onSelectCallBack) {
|
|
481
|
+
this.stateManager.callSelectHandler();
|
|
482
|
+
}
|
|
483
|
+
else {
|
|
484
|
+
this.onOpenLightBox(act[0]);
|
|
485
|
+
}
|
|
486
|
+
}
|
|
487
|
+
};
|
|
488
|
+
FileBrowserPro.prototype.onOpenLightBox = function (item) {
|
|
489
|
+
_ui_lightboox_lightbox__WEBPACK_IMPORTED_MODULE_19__/* .UILightBox.open */ .m.open(this, item, this.state.elements);
|
|
490
|
+
};
|
|
491
|
+
FileBrowserPro.prototype.initUploader = function () {
|
|
492
|
+
var _this = this;
|
|
493
|
+
var self = this, uploaderOptions = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(self.o.uploader || {}, jodit_config__WEBPACK_IMPORTED_MODULE_10__/* .Config.defaultOptions.uploader */ .D.defaultOptions.uploader);
|
|
494
|
+
var uploadHandler = function () {
|
|
495
|
+
return _this.loadingManager.loadItems();
|
|
496
|
+
};
|
|
497
|
+
self.uploader = self.getInstance('Uploader', uploaderOptions);
|
|
498
|
+
self.uploader.bind(self.panel.container, uploadHandler, self.status);
|
|
499
|
+
self.e.on('bindUploader.filebrowser', function (button) {
|
|
500
|
+
self.uploader.bind(button, uploadHandler, self.status);
|
|
501
|
+
});
|
|
502
|
+
};
|
|
503
|
+
/** @override */
|
|
504
|
+
FileBrowserPro.prototype.destruct = function () {
|
|
505
|
+
this.removeGlobalListeners();
|
|
506
|
+
this.header.destruct();
|
|
507
|
+
this.panel.destruct();
|
|
508
|
+
_super.prototype.destruct.call(this);
|
|
509
|
+
};
|
|
510
|
+
FileBrowserPro.prototype.fullFillOptions = function () {
|
|
511
|
+
var _this = this;
|
|
512
|
+
var keys = [
|
|
513
|
+
'getLocalFileByUrl',
|
|
514
|
+
'crop',
|
|
515
|
+
'resize',
|
|
516
|
+
'create',
|
|
517
|
+
'fileMove',
|
|
518
|
+
'folderMove',
|
|
519
|
+
'fileRename',
|
|
520
|
+
'folderRename',
|
|
521
|
+
'fileRemove',
|
|
522
|
+
'folderRemove',
|
|
523
|
+
'folder',
|
|
524
|
+
'items',
|
|
525
|
+
'permissions'
|
|
526
|
+
];
|
|
527
|
+
keys.forEach(function (key) {
|
|
528
|
+
if (_this.options[key] != null) {
|
|
529
|
+
_this.options[key] = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ConfigProto)(_this.options[key], _this.o.ajax);
|
|
530
|
+
}
|
|
531
|
+
});
|
|
532
|
+
};
|
|
533
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
534
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
|
|
535
|
+
], FileBrowserPro.prototype, "status", null);
|
|
536
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
537
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.cache
|
|
538
|
+
], FileBrowserPro.prototype, "progressbar", null);
|
|
539
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
540
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':resize', { context: window })
|
|
541
|
+
], FileBrowserPro.prototype, "onResizeWindow", null);
|
|
542
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
543
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(['state.currentPath', 'state.currentSource'])
|
|
544
|
+
], FileBrowserPro.prototype, "onChangePath", null);
|
|
545
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
546
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)('state.theme')
|
|
547
|
+
], FileBrowserPro.prototype, "onChangeTheme", null);
|
|
548
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
549
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':toggleSettings.filebrowser')
|
|
550
|
+
], FileBrowserPro.prototype, "onToggleSettings", null);
|
|
551
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
552
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
|
|
553
|
+
], FileBrowserPro.prototype, "onKeyPress", null);
|
|
554
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
555
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.autobind
|
|
556
|
+
], FileBrowserPro.prototype, "removeGlobalListeners", null);
|
|
557
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
558
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRemove.filebrowser')
|
|
559
|
+
], FileBrowserPro.prototype, "onFileRemove", null);
|
|
560
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
561
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':edit.filebrowser')
|
|
562
|
+
], FileBrowserPro.prototype, "onFileEdit", null);
|
|
563
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
564
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRename.filebrowser')
|
|
565
|
+
], FileBrowserPro.prototype, "onFolderRename", null);
|
|
566
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
567
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderRemove.filebrowser')
|
|
568
|
+
], FileBrowserPro.prototype, "onFolderRemove", null);
|
|
569
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
570
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':folderCreate.filebrowser')
|
|
571
|
+
], FileBrowserPro.prototype, "onFolderCreate", null);
|
|
572
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
573
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':fileRename.filebrowser')
|
|
574
|
+
], FileBrowserPro.prototype, "onFileRename", null);
|
|
575
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
576
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':select.filebrowser')
|
|
577
|
+
], FileBrowserPro.prototype, "onChooseItems", null);
|
|
578
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
579
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.watch)(':openLightBox.filebrowser')
|
|
580
|
+
], FileBrowserPro.prototype, "onOpenLightBox", null);
|
|
581
|
+
FileBrowserPro = (0,tslib__WEBPACK_IMPORTED_MODULE_21__/* .__decorate */ .gn)([
|
|
582
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.component,
|
|
583
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_5__.derive)(jodit_core_traits__WEBPACK_IMPORTED_MODULE_13__/* .Dlgs */ .lf)
|
|
584
|
+
], FileBrowserPro);
|
|
585
|
+
return FileBrowserPro;
|
|
586
|
+
}(jodit_modules_dialog__WEBPACK_IMPORTED_MODULE_2__/* .Dialog */ .Vq));
|
|
587
|
+
Object.defineProperty(_JoditPro__WEBPACK_IMPORTED_MODULE_17__/* .JoditPro.modules */ .y.modules, 'FileBrowserPro', {
|
|
588
|
+
value: FileBrowserPro,
|
|
589
|
+
writable: false,
|
|
590
|
+
enumerable: true,
|
|
591
|
+
configurable: true
|
|
592
|
+
});
|
|
593
|
+
|
|
594
|
+
|
|
595
|
+
/***/ }),
|
|
596
|
+
|
|
597
|
+
/***/ 99993:
|
|
598
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
599
|
+
|
|
600
|
+
"use strict";
|
|
601
|
+
/* harmony import */ var jodit_config__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(77628);
|
|
602
|
+
/* harmony import */ var jodit_core_global__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(81160);
|
|
603
|
+
/*!
|
|
604
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
605
|
+
* See LICENSE.md in the project root for license information.
|
|
606
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
607
|
+
*/
|
|
608
|
+
|
|
609
|
+
|
|
610
|
+
(0,jodit_core_global__WEBPACK_IMPORTED_MODULE_1__/* .extendLang */ .xl)(__webpack_require__(57591));
|
|
611
|
+
var fb = jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config.prototype.controls.filebrowser */ .D.prototype.controls.filebrowser;
|
|
612
|
+
fb.settings = {
|
|
613
|
+
icon: 'settings',
|
|
614
|
+
tooltip: 'Settings',
|
|
615
|
+
exec: function (editor) {
|
|
616
|
+
var _a;
|
|
617
|
+
var view = (_a = editor.parent) !== null && _a !== void 0 ? _a : editor;
|
|
618
|
+
view.e.fire('toggleSettings.filebrowser');
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
fb.home = {
|
|
622
|
+
icon: 'home',
|
|
623
|
+
tooltip: 'Home',
|
|
624
|
+
exec: function (editor) {
|
|
625
|
+
editor.e.fire('goHome.filebrowser');
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
fb.preview = {
|
|
629
|
+
icon: 'eye',
|
|
630
|
+
tooltip: 'Preview',
|
|
631
|
+
isDisabled: function (fb) {
|
|
632
|
+
return fb.state.activeElements.length === 0;
|
|
633
|
+
},
|
|
634
|
+
exec: function (editor) {
|
|
635
|
+
editor.e.fire('togglePreview.filebrowser');
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
fb.next = {
|
|
639
|
+
icon: 'angle-right',
|
|
640
|
+
tooltip: 'History next',
|
|
641
|
+
isDisabled: function (browser) { return !browser.historyManager.canNext(); },
|
|
642
|
+
exec: function (editor) {
|
|
643
|
+
editor.historyManager.next();
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
fb.previous = {
|
|
647
|
+
icon: 'angle-left',
|
|
648
|
+
tooltip: 'History previous',
|
|
649
|
+
isDisabled: function (browser) { return !browser.historyManager.canPrevious(); },
|
|
650
|
+
exec: function (editor) {
|
|
651
|
+
editor.historyManager.previous();
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
fb['new-folder'] = {
|
|
655
|
+
icon: 'new-folder',
|
|
656
|
+
exec: function (editor) {
|
|
657
|
+
editor.e.fire('folderCreate.filebrowser', {
|
|
658
|
+
path: editor.state.currentPath,
|
|
659
|
+
sourceName: editor.state.currentSource
|
|
660
|
+
});
|
|
661
|
+
},
|
|
662
|
+
tooltip: 'New folder'
|
|
663
|
+
};
|
|
664
|
+
Object.assign(jodit_config__WEBPACK_IMPORTED_MODULE_0__/* .Config.prototype.filebrowser */ .D.prototype.filebrowser, {
|
|
665
|
+
buttons: [
|
|
666
|
+
'filebrowser.home',
|
|
667
|
+
'filebrowser.previous',
|
|
668
|
+
'filebrowser.next',
|
|
669
|
+
'|',
|
|
670
|
+
'filebrowser.upload',
|
|
671
|
+
'filebrowser.new-folder',
|
|
672
|
+
'filebrowser.remove',
|
|
673
|
+
'filebrowser.update',
|
|
674
|
+
'filebrowser.select',
|
|
675
|
+
'filebrowser.edit',
|
|
676
|
+
'|',
|
|
677
|
+
'filebrowser.preview',
|
|
678
|
+
'about'
|
|
679
|
+
],
|
|
680
|
+
sort: false,
|
|
681
|
+
pixelOffsetLoadNewChunk: 300,
|
|
682
|
+
width: 800,
|
|
683
|
+
height: 400,
|
|
684
|
+
previewOfficeURL: 'https://view.officeapps.live.com/op/view.aspx?src='
|
|
685
|
+
});
|
|
686
|
+
|
|
687
|
+
|
|
688
|
+
/***/ }),
|
|
689
|
+
|
|
690
|
+
/***/ 48531:
|
|
691
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
692
|
+
|
|
693
|
+
"use strict";
|
|
694
|
+
__webpack_require__.r(__webpack_exports__);
|
|
695
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
696
|
+
/* harmony export */ "finder": function() { return /* binding */ finder; }
|
|
697
|
+
/* harmony export */ });
|
|
698
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
|
|
699
|
+
/* harmony import */ var jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7324);
|
|
700
|
+
/* harmony import */ var _browser__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(68813);
|
|
701
|
+
/* harmony import */ var _JoditPro__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(88292);
|
|
702
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(99993);
|
|
703
|
+
/*!
|
|
704
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
705
|
+
* See LICENSE.md in the project root for license information.
|
|
706
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
707
|
+
*/
|
|
708
|
+
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
|
|
712
|
+
|
|
713
|
+
var finder = /** @class */ (function (_super) {
|
|
714
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__extends */ .ZT)(finder, _super);
|
|
715
|
+
function finder() {
|
|
716
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
717
|
+
/** @override */
|
|
718
|
+
_this.hasStyle = !_JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.fatMode */ .y.fatMode;
|
|
719
|
+
return _this;
|
|
720
|
+
}
|
|
721
|
+
/** @override */
|
|
722
|
+
finder.prototype.afterInit = function (jodit) {
|
|
723
|
+
var _this = this;
|
|
724
|
+
jodit.e.on('getInstanceFileBrowser', function (options) {
|
|
725
|
+
if (!_this.__instance) {
|
|
726
|
+
_this.__instance = new _browser__WEBPACK_IMPORTED_MODULE_1__/* .FileBrowserPro */ .X(options);
|
|
727
|
+
}
|
|
728
|
+
return _this.__instance;
|
|
729
|
+
});
|
|
730
|
+
};
|
|
731
|
+
/** @override */
|
|
732
|
+
finder.prototype.beforeDestruct = function (jodit) {
|
|
733
|
+
var _a;
|
|
734
|
+
jodit.e.off('getInstanceFileBrowser');
|
|
735
|
+
(_a = this.__instance) === null || _a === void 0 ? void 0 : _a.destruct();
|
|
736
|
+
};
|
|
737
|
+
/** @override */
|
|
738
|
+
finder.requires = ['license'];
|
|
739
|
+
return finder;
|
|
740
|
+
}(jodit_core_plugin__WEBPACK_IMPORTED_MODULE_0__/* .Plugin */ .S));
|
|
741
|
+
_JoditPro__WEBPACK_IMPORTED_MODULE_2__/* .JoditPro.plugins.add */ .y.plugins.add('finder', finder);
|
|
742
|
+
|
|
743
|
+
|
|
744
|
+
/***/ }),
|
|
745
|
+
|
|
746
|
+
/***/ 63052:
|
|
747
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
748
|
+
|
|
749
|
+
"use strict";
|
|
750
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
751
|
+
/* harmony export */ "z": function() { return /* binding */ ContextMenuManager; }
|
|
752
|
+
/* harmony export */ });
|
|
753
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
754
|
+
/* harmony import */ var jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3028);
|
|
755
|
+
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
|
|
756
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
|
|
757
|
+
/*!
|
|
758
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
759
|
+
* See LICENSE.md in the project root for license information.
|
|
760
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
761
|
+
*/
|
|
762
|
+
|
|
763
|
+
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
var ContextMenuManager = /** @class */ (function (_super) {
|
|
767
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(ContextMenuManager, _super);
|
|
768
|
+
function ContextMenuManager() {
|
|
769
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
770
|
+
}
|
|
771
|
+
/** @override */
|
|
772
|
+
ContextMenuManager.prototype.className = function () {
|
|
773
|
+
return 'ContextMenuManager';
|
|
774
|
+
};
|
|
775
|
+
ContextMenuManager.prototype.onFolderContext = function (item, e) {
|
|
776
|
+
this.buildContextItemMenu(this.getFolderContextActions(item), e);
|
|
777
|
+
return false;
|
|
778
|
+
};
|
|
779
|
+
ContextMenuManager.prototype.onItemContext = function (item, _, e) {
|
|
780
|
+
this.buildContextItemMenu(this.getItemContextActions(item), e);
|
|
781
|
+
return false;
|
|
782
|
+
};
|
|
783
|
+
ContextMenuManager.prototype.onSourceContext = function (item, e) {
|
|
784
|
+
this.buildContextItemMenu(this.getSourceContextActions(item), e);
|
|
785
|
+
return false;
|
|
786
|
+
};
|
|
787
|
+
ContextMenuManager.prototype.buildContextItemMenu = function (actions, e) {
|
|
788
|
+
if (!this.j.o.contextMenu) {
|
|
789
|
+
return;
|
|
790
|
+
}
|
|
791
|
+
var context = (0,jodit_modules_file_browser_factories__WEBPACK_IMPORTED_MODULE_0__/* .makeContextMenu */ .L)(this.j).setMod('theme', this.j.state.theme);
|
|
792
|
+
context.show(e.clientX, e.clientY, actions.filter(function (a) { return a && a.enabled !== false; }));
|
|
793
|
+
this.j.e.on(this.j, 'afterClose', function () {
|
|
794
|
+
if (context.isOpened) {
|
|
795
|
+
context.close();
|
|
796
|
+
}
|
|
797
|
+
});
|
|
798
|
+
};
|
|
799
|
+
ContextMenuManager.prototype.getItemContextActions = function (item) {
|
|
800
|
+
var _this = this;
|
|
801
|
+
if (!this.j.stateManager.isActive(item)) {
|
|
802
|
+
this.j.stateManager.addActive(item, this.j.state.activeElements.length > 1);
|
|
803
|
+
}
|
|
804
|
+
if (item.type === 'folder') {
|
|
805
|
+
return this.getFolderContextActions({
|
|
806
|
+
type: 'directory',
|
|
807
|
+
children: [],
|
|
808
|
+
name: item.name || '',
|
|
809
|
+
path: item.path,
|
|
810
|
+
sourceName: item.sourceName
|
|
811
|
+
});
|
|
812
|
+
}
|
|
813
|
+
var opt = this.j.options, dp = this.j.dataProvider, single = this.j.state.activeElements.length === 1;
|
|
814
|
+
return [
|
|
815
|
+
{
|
|
816
|
+
icon: 'pencil',
|
|
817
|
+
title: 'Edit',
|
|
818
|
+
enabled: Boolean(item.isImage) &&
|
|
819
|
+
opt.editImage &&
|
|
820
|
+
single &&
|
|
821
|
+
(dp.canI('ImageResize') || dp.canI('ImageCrop')),
|
|
822
|
+
exec: function () {
|
|
823
|
+
_this.j.e.fire('edit.filebrowser');
|
|
824
|
+
}
|
|
825
|
+
},
|
|
826
|
+
{
|
|
827
|
+
icon: 'italic',
|
|
828
|
+
title: 'Rename',
|
|
829
|
+
enabled: dp.canI('FileRename') && single,
|
|
830
|
+
exec: function () { return _this.j.e.fire('fileRename.filebrowser', item); }
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
icon: 'bin',
|
|
834
|
+
title: 'Delete',
|
|
835
|
+
enabled: dp.canI('FileRemove'),
|
|
836
|
+
exec: function () { return _this.j.e.fire('fileRemove.filebrowser', item); }
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
icon: 'eye',
|
|
840
|
+
title: 'Preview',
|
|
841
|
+
enabled: Boolean(item.isImage || item.type === 'file') &&
|
|
842
|
+
opt.preview &&
|
|
843
|
+
single,
|
|
844
|
+
exec: function () { return _this.j.e.fire('openLightBox.filebrowser', item); }
|
|
845
|
+
},
|
|
846
|
+
{
|
|
847
|
+
icon: 'upload',
|
|
848
|
+
title: 'Download',
|
|
849
|
+
exec: function () {
|
|
850
|
+
// TODO Replace to download action
|
|
851
|
+
if (item.fileURL) {
|
|
852
|
+
_this.j.ow.open(item.fileURL);
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
];
|
|
857
|
+
};
|
|
858
|
+
ContextMenuManager.prototype.getFolderContextActions = function (item) {
|
|
859
|
+
var _this = this;
|
|
860
|
+
var dp = this.j.dataProvider;
|
|
861
|
+
return [
|
|
862
|
+
{
|
|
863
|
+
icon: 'pencil',
|
|
864
|
+
title: 'Rename',
|
|
865
|
+
exec: function () {
|
|
866
|
+
_this.j.e.fire('folderRename.filebrowser', item);
|
|
867
|
+
},
|
|
868
|
+
enabled: dp.canI('FolderRename')
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
icon: 'bin',
|
|
872
|
+
title: 'Delete',
|
|
873
|
+
exec: function () {
|
|
874
|
+
_this.j.e.fire('folderRemove.filebrowser', item);
|
|
875
|
+
},
|
|
876
|
+
enabled: dp.canI('FolderRemove')
|
|
877
|
+
},
|
|
878
|
+
{
|
|
879
|
+
icon: 'plus',
|
|
880
|
+
title: 'Add folder',
|
|
881
|
+
exec: function () {
|
|
882
|
+
_this.j.e.fire('folderCreate.filebrowser', item);
|
|
883
|
+
},
|
|
884
|
+
enabled: dp.canI('FolderCreate')
|
|
885
|
+
}
|
|
886
|
+
];
|
|
887
|
+
};
|
|
888
|
+
ContextMenuManager.prototype.getSourceContextActions = function (item) {
|
|
889
|
+
var _this = this;
|
|
890
|
+
return [
|
|
891
|
+
{
|
|
892
|
+
icon: 'plus',
|
|
893
|
+
title: 'Create folder',
|
|
894
|
+
exec: function () {
|
|
895
|
+
_this.j.e.fire('folderCreate.filebrowser', item);
|
|
896
|
+
}
|
|
897
|
+
}
|
|
898
|
+
];
|
|
899
|
+
};
|
|
900
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
901
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuFolder.filebrowser')
|
|
902
|
+
], ContextMenuManager.prototype, "onFolderContext", null);
|
|
903
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
904
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuItem.filebrowser')
|
|
905
|
+
], ContextMenuManager.prototype, "onItemContext", null);
|
|
906
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
907
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':contextmenuSource.filebrowser')
|
|
908
|
+
], ContextMenuManager.prototype, "onSourceContext", null);
|
|
909
|
+
ContextMenuManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
910
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
|
|
911
|
+
], ContextMenuManager);
|
|
912
|
+
return ContextMenuManager;
|
|
913
|
+
}(jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr));
|
|
914
|
+
|
|
915
|
+
|
|
916
|
+
/***/ }),
|
|
917
|
+
|
|
918
|
+
/***/ 70467:
|
|
919
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
920
|
+
|
|
921
|
+
"use strict";
|
|
922
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
923
|
+
/* harmony export */ "C": function() { return /* binding */ parentPath; }
|
|
924
|
+
/* harmony export */ });
|
|
925
|
+
/*!
|
|
926
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
927
|
+
* See LICENSE.md in the project root for license information.
|
|
928
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
929
|
+
*/
|
|
930
|
+
var parentPath = function (path) {
|
|
931
|
+
var parts = path.split('/').filter(function (p) { return p.length; });
|
|
932
|
+
parts.pop();
|
|
933
|
+
return parts.join('/') || '/';
|
|
934
|
+
};
|
|
935
|
+
|
|
936
|
+
|
|
937
|
+
/***/ }),
|
|
938
|
+
|
|
939
|
+
/***/ 9581:
|
|
940
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
941
|
+
|
|
942
|
+
"use strict";
|
|
943
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
944
|
+
/* harmony export */ "E": function() { return /* binding */ HistoryManager; }
|
|
945
|
+
/* harmony export */ });
|
|
946
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
947
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(95582);
|
|
948
|
+
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22562);
|
|
949
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
|
|
950
|
+
/*!
|
|
951
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
952
|
+
* See LICENSE.md in the project root for license information.
|
|
953
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
954
|
+
*/
|
|
955
|
+
|
|
956
|
+
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
var HistoryManager = /** @class */ (function (_super) {
|
|
960
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(HistoryManager, _super);
|
|
961
|
+
function HistoryManager(jodit, state) {
|
|
962
|
+
var _this = _super.call(this, jodit) || this;
|
|
963
|
+
_this.state = state;
|
|
964
|
+
_this.history = [];
|
|
965
|
+
_this.historyIndex = 0;
|
|
966
|
+
return _this;
|
|
967
|
+
}
|
|
968
|
+
/** @override */
|
|
969
|
+
HistoryManager.prototype.className = function () {
|
|
970
|
+
return 'HistoryManager';
|
|
971
|
+
};
|
|
972
|
+
HistoryManager.prototype.canNext = function () {
|
|
973
|
+
return this.historyIndex < this.history.length - 1;
|
|
974
|
+
};
|
|
975
|
+
HistoryManager.prototype.canPrevious = function () {
|
|
976
|
+
return this.historyIndex > 0;
|
|
977
|
+
};
|
|
978
|
+
HistoryManager.prototype.push = function (item) {
|
|
979
|
+
var historyIndex = this.historyIndex;
|
|
980
|
+
var current = this.history[historyIndex];
|
|
981
|
+
if (current &&
|
|
982
|
+
current.currentSource === item.currentSource &&
|
|
983
|
+
current.currentPath === item.currentPath) {
|
|
984
|
+
return;
|
|
985
|
+
}
|
|
986
|
+
var history = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .CR)(this.history), false);
|
|
987
|
+
if (history.length - 1 !== historyIndex) {
|
|
988
|
+
history = history.slice(0, historyIndex + 1);
|
|
989
|
+
}
|
|
990
|
+
history.push(item);
|
|
991
|
+
if (current) {
|
|
992
|
+
historyIndex += 1;
|
|
993
|
+
}
|
|
994
|
+
this.history = history;
|
|
995
|
+
this.historyIndex = historyIndex;
|
|
996
|
+
};
|
|
997
|
+
HistoryManager.prototype.next = function () {
|
|
998
|
+
if (this.canNext()) {
|
|
999
|
+
this.historyIndex += 1;
|
|
1000
|
+
this.updateState();
|
|
1001
|
+
}
|
|
1002
|
+
};
|
|
1003
|
+
HistoryManager.prototype.previous = function () {
|
|
1004
|
+
if (this.canPrevious()) {
|
|
1005
|
+
this.historyIndex -= 1;
|
|
1006
|
+
this.updateState();
|
|
1007
|
+
}
|
|
1008
|
+
};
|
|
1009
|
+
HistoryManager.prototype.updateCurrent = function () {
|
|
1010
|
+
this.history[this.historyIndex] = {
|
|
1011
|
+
currentSource: this.state.currentSource,
|
|
1012
|
+
currentPath: this.state.currentPath,
|
|
1013
|
+
tree: (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_0__.fastClone)(this.state.tree),
|
|
1014
|
+
elements: (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .CR)(this.state.elements), false)
|
|
1015
|
+
};
|
|
1016
|
+
};
|
|
1017
|
+
HistoryManager.prototype.onHome = function () {
|
|
1018
|
+
this.state.currentPath = '';
|
|
1019
|
+
this.state.currentSource = '';
|
|
1020
|
+
this.j.e.fire('afterOpenFolder.filebrowser update.filebrowser');
|
|
1021
|
+
};
|
|
1022
|
+
HistoryManager.prototype.onOpenFolder = function () {
|
|
1023
|
+
this.push({
|
|
1024
|
+
tree: [],
|
|
1025
|
+
elements: [],
|
|
1026
|
+
currentPath: this.state.currentPath,
|
|
1027
|
+
currentSource: this.state.currentSource
|
|
1028
|
+
});
|
|
1029
|
+
this.j.e.fire('changeSelection');
|
|
1030
|
+
};
|
|
1031
|
+
HistoryManager.prototype.updateState = function () {
|
|
1032
|
+
var _a;
|
|
1033
|
+
var tree = (_a = this.history[this.historyIndex], _a.tree), elements = _a.elements, currentSource = _a.currentSource, currentPath = _a.currentPath;
|
|
1034
|
+
this.state.activeElements = [];
|
|
1035
|
+
this.state.elements = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .CR)(elements), false);
|
|
1036
|
+
this.state.tree = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__read */ .CR)(tree), false);
|
|
1037
|
+
this.state.currentSource = currentSource;
|
|
1038
|
+
this.state.currentPath = currentPath;
|
|
1039
|
+
this.j.e.fire('changeSelection');
|
|
1040
|
+
};
|
|
1041
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1042
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.elements', 'state.tree'])
|
|
1043
|
+
], HistoryManager.prototype, "updateCurrent", null);
|
|
1044
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1045
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':goHome.filebrowser')
|
|
1046
|
+
], HistoryManager.prototype, "onHome", null);
|
|
1047
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1048
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':afterOpenFolder.filebrowser')
|
|
1049
|
+
], HistoryManager.prototype, "onOpenFolder", null);
|
|
1050
|
+
HistoryManager = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1051
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
|
|
1052
|
+
], HistoryManager);
|
|
1053
|
+
return HistoryManager;
|
|
1054
|
+
}(jodit_core_component__WEBPACK_IMPORTED_MODULE_1__/* .ViewComponent */ .Hr));
|
|
1055
|
+
|
|
1056
|
+
|
|
1057
|
+
/***/ }),
|
|
1058
|
+
|
|
1059
|
+
/***/ 48086:
|
|
1060
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1061
|
+
|
|
1062
|
+
"use strict";
|
|
1063
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1064
|
+
/* harmony export */ "l": function() { return /* binding */ LoadingManager; }
|
|
1065
|
+
/* harmony export */ });
|
|
1066
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
|
|
1067
|
+
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
|
|
1068
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1069
|
+
/*!
|
|
1070
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1071
|
+
* See LICENSE.md in the project root for license information.
|
|
1072
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1073
|
+
*/
|
|
1074
|
+
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
var LoadingManager = /** @class */ (function (_super) {
|
|
1078
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__extends */ .ZT)(LoadingManager, _super);
|
|
1079
|
+
/** @override */
|
|
1080
|
+
function LoadingManager(jodit, state) {
|
|
1081
|
+
var _this = _super.call(this, jodit) || this;
|
|
1082
|
+
_this.state = state;
|
|
1083
|
+
_this.__tick = 0;
|
|
1084
|
+
_this.offset = 0;
|
|
1085
|
+
_this.countInOneChunk = 20;
|
|
1086
|
+
_this.stopLoadingParts = false;
|
|
1087
|
+
_this.__isLoadingPart = false;
|
|
1088
|
+
_this.__callQueueCount = 0;
|
|
1089
|
+
return _this;
|
|
1090
|
+
}
|
|
1091
|
+
/** @override */
|
|
1092
|
+
LoadingManager.prototype.className = function () {
|
|
1093
|
+
return 'LoadingManager';
|
|
1094
|
+
};
|
|
1095
|
+
LoadingManager.prototype.onUpdateFileBrowser = function () {
|
|
1096
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
1097
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .Jh)(this, function (_a) {
|
|
1098
|
+
switch (_a.label) {
|
|
1099
|
+
case 0:
|
|
1100
|
+
this.state.activeElements = [];
|
|
1101
|
+
this.j.panel.setMod('loading', true);
|
|
1102
|
+
return [4 /*yield*/, Promise.all([this.loadFolders(), this.loadItems()])];
|
|
1103
|
+
case 1:
|
|
1104
|
+
_a.sent();
|
|
1105
|
+
this.j.panel.setMod('loading', false);
|
|
1106
|
+
return [2 /*return*/];
|
|
1107
|
+
}
|
|
1108
|
+
});
|
|
1109
|
+
});
|
|
1110
|
+
};
|
|
1111
|
+
LoadingManager.prototype.loadFolders = function () {
|
|
1112
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
1113
|
+
var currentPath, currentSource, sources, e_1;
|
|
1114
|
+
var _a;
|
|
1115
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .Jh)(this, function (_b) {
|
|
1116
|
+
switch (_b.label) {
|
|
1117
|
+
case 0:
|
|
1118
|
+
if (!this.j.isOpened) {
|
|
1119
|
+
return [2 /*return*/];
|
|
1120
|
+
}
|
|
1121
|
+
currentPath = (_a = this.state, _a.currentPath), currentSource = _a.currentSource;
|
|
1122
|
+
_b.label = 1;
|
|
1123
|
+
case 1:
|
|
1124
|
+
_b.trys.push([1, 3, , 4]);
|
|
1125
|
+
return [4 /*yield*/, this.j.dataProvider.tree(currentPath, currentSource)];
|
|
1126
|
+
case 2:
|
|
1127
|
+
sources = _b.sent();
|
|
1128
|
+
this.j.stateManager.fillTreeForPath(sources, currentPath);
|
|
1129
|
+
this.state.sources = sources;
|
|
1130
|
+
return [3 /*break*/, 4];
|
|
1131
|
+
case 3:
|
|
1132
|
+
e_1 = _b.sent();
|
|
1133
|
+
this.j.status(e_1);
|
|
1134
|
+
return [3 /*break*/, 4];
|
|
1135
|
+
case 4: return [2 /*return*/];
|
|
1136
|
+
}
|
|
1137
|
+
});
|
|
1138
|
+
});
|
|
1139
|
+
};
|
|
1140
|
+
LoadingManager.prototype.loadItems = function () {
|
|
1141
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
1142
|
+
var __tick, items, loadedTotal, e_2;
|
|
1143
|
+
var _a;
|
|
1144
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .Jh)(this, function (_b) {
|
|
1145
|
+
switch (_b.label) {
|
|
1146
|
+
case 0:
|
|
1147
|
+
if (!this.j.isOpened) {
|
|
1148
|
+
return [2 /*return*/];
|
|
1149
|
+
}
|
|
1150
|
+
_b.label = 1;
|
|
1151
|
+
case 1:
|
|
1152
|
+
_b.trys.push([1, 8, , 9]);
|
|
1153
|
+
this.__tick += 1;
|
|
1154
|
+
__tick = this.__tick;
|
|
1155
|
+
this.offset = 0;
|
|
1156
|
+
this.stopLoadingParts = false;
|
|
1157
|
+
this.__callQueueCount = 0;
|
|
1158
|
+
return [4 /*yield*/, loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk)];
|
|
1159
|
+
case 2:
|
|
1160
|
+
items = (_a = _b.sent(), _a.items), loadedTotal = _a.loadedTotal;
|
|
1161
|
+
this.state.elements = items;
|
|
1162
|
+
this.stopLoadingParts = loadedTotal < this.countInOneChunk;
|
|
1163
|
+
return [4 /*yield*/, this.loadItemsChunk(__tick)];
|
|
1164
|
+
case 3:
|
|
1165
|
+
_b.sent();
|
|
1166
|
+
return [4 /*yield*/, this.async.requestIdlePromise()];
|
|
1167
|
+
case 4:
|
|
1168
|
+
_b.sent();
|
|
1169
|
+
if (this.__tick !== __tick) {
|
|
1170
|
+
return [2 /*return*/];
|
|
1171
|
+
}
|
|
1172
|
+
_b.label = 5;
|
|
1173
|
+
case 5:
|
|
1174
|
+
if (!(!this.stopLoadingParts &&
|
|
1175
|
+
this.j.panel.countInColumn * this.j.panel.countInRow >=
|
|
1176
|
+
this.state.elements.length)) return [3 /*break*/, 7];
|
|
1177
|
+
return [4 /*yield*/, this.loadItemsChunk(__tick)];
|
|
1178
|
+
case 6:
|
|
1179
|
+
_b.sent();
|
|
1180
|
+
if (this.__tick !== __tick) {
|
|
1181
|
+
return [2 /*return*/];
|
|
1182
|
+
}
|
|
1183
|
+
return [3 /*break*/, 5];
|
|
1184
|
+
case 7: return [3 /*break*/, 9];
|
|
1185
|
+
case 8:
|
|
1186
|
+
e_2 = _b.sent();
|
|
1187
|
+
this.j.status(e_2);
|
|
1188
|
+
return [3 /*break*/, 9];
|
|
1189
|
+
case 9: return [2 /*return*/];
|
|
1190
|
+
}
|
|
1191
|
+
});
|
|
1192
|
+
});
|
|
1193
|
+
};
|
|
1194
|
+
LoadingManager.prototype.__loadItemsChunk = function (tick) {
|
|
1195
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
1196
|
+
var items, loadedTotal, e_3;
|
|
1197
|
+
var _a;
|
|
1198
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__generator */ .Jh)(this, function (_b) {
|
|
1199
|
+
switch (_b.label) {
|
|
1200
|
+
case 0:
|
|
1201
|
+
if (this.__isLoadingPart) {
|
|
1202
|
+
this.__callQueueCount += 1;
|
|
1203
|
+
return [2 /*return*/];
|
|
1204
|
+
}
|
|
1205
|
+
if (this.stopLoadingParts) {
|
|
1206
|
+
this.__callQueueCount = 0;
|
|
1207
|
+
return [2 /*return*/];
|
|
1208
|
+
}
|
|
1209
|
+
this.__isLoadingPart = true;
|
|
1210
|
+
this.j.panel.items.setMod('chunk-loading', true);
|
|
1211
|
+
_b.label = 1;
|
|
1212
|
+
case 1:
|
|
1213
|
+
_b.trys.push([1, 3, , 4]);
|
|
1214
|
+
this.offset += this.countInOneChunk;
|
|
1215
|
+
return [4 /*yield*/, loadPartItems(this.state, this.j.dataProvider, this.offset, this.countInOneChunk)];
|
|
1216
|
+
case 2:
|
|
1217
|
+
items = (_a = _b.sent(), _a.items), loadedTotal = _a.loadedTotal;
|
|
1218
|
+
if (this.__tick !== tick) {
|
|
1219
|
+
return [2 /*return*/];
|
|
1220
|
+
}
|
|
1221
|
+
this.stopLoadingParts = loadedTotal < this.countInOneChunk;
|
|
1222
|
+
if (items.length) {
|
|
1223
|
+
this.state.elements = this.state.elements.concat(items);
|
|
1224
|
+
}
|
|
1225
|
+
return [3 /*break*/, 4];
|
|
1226
|
+
case 3:
|
|
1227
|
+
e_3 = _b.sent();
|
|
1228
|
+
this.j.status(e_3);
|
|
1229
|
+
return [3 /*break*/, 4];
|
|
1230
|
+
case 4:
|
|
1231
|
+
this.j.panel.items.setMod('chunk-loading', false);
|
|
1232
|
+
this.__isLoadingPart = false;
|
|
1233
|
+
if (this.__callQueueCount > 0) {
|
|
1234
|
+
this.__callQueueCount -= 1;
|
|
1235
|
+
return [2 /*return*/, this.__loadItemsChunk(tick)];
|
|
1236
|
+
}
|
|
1237
|
+
return [2 /*return*/];
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
});
|
|
1241
|
+
};
|
|
1242
|
+
LoadingManager.prototype.loadItemsChunk = function (tick) {
|
|
1243
|
+
if (tick === void 0) { tick = this.__tick; }
|
|
1244
|
+
if (tick !== this.__tick) {
|
|
1245
|
+
return Promise.resolve();
|
|
1246
|
+
}
|
|
1247
|
+
return this.__loadItemsChunk(tick);
|
|
1248
|
+
};
|
|
1249
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
1250
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':update.filebrowser')
|
|
1251
|
+
], LoadingManager.prototype, "onUpdateFileBrowser", null);
|
|
1252
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
1253
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['state.currentPath', 'state.currentSource']),
|
|
1254
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)(function (ctx) { return ({
|
|
1255
|
+
timeout: ctx.defaultTimeout,
|
|
1256
|
+
promisify: true
|
|
1257
|
+
}); })
|
|
1258
|
+
], LoadingManager.prototype, "loadFolders", null);
|
|
1259
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
1260
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)([
|
|
1261
|
+
'state.currentPath',
|
|
1262
|
+
'state.currentSource',
|
|
1263
|
+
'state.sortBy',
|
|
1264
|
+
'state.onlyImages',
|
|
1265
|
+
'state.foldersPosition',
|
|
1266
|
+
'state.filterWord'
|
|
1267
|
+
]),
|
|
1268
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)(function (ctx) { return ({
|
|
1269
|
+
timeout: ctx.defaultTimeout,
|
|
1270
|
+
promisify: true
|
|
1271
|
+
}); })
|
|
1272
|
+
], LoadingManager.prototype, "loadItems", null);
|
|
1273
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
1274
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)(function (ctx) { return ({
|
|
1275
|
+
timeout: ctx.defaultTimeout,
|
|
1276
|
+
promisify: true
|
|
1277
|
+
}); })
|
|
1278
|
+
], LoadingManager.prototype, "loadItemsChunk", null);
|
|
1279
|
+
LoadingManager = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
1280
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
1281
|
+
], LoadingManager);
|
|
1282
|
+
return LoadingManager;
|
|
1283
|
+
}(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr));
|
|
1284
|
+
function loadPartItems(state, dataProvider, offset, limit) {
|
|
1285
|
+
var currentPath = state.currentPath, currentSource = state.currentSource, sortBy = state.sortBy, withFolders = state.withFolders, foldersPosition = state.foldersPosition, onlyImages = state.onlyImages, filterWord = state.filterWord;
|
|
1286
|
+
return dataProvider.itemsEx(currentPath, currentSource, {
|
|
1287
|
+
offset: offset,
|
|
1288
|
+
limit: limit,
|
|
1289
|
+
sortBy: sortBy,
|
|
1290
|
+
withFolders: withFolders,
|
|
1291
|
+
foldersPosition: foldersPosition,
|
|
1292
|
+
onlyImages: onlyImages,
|
|
1293
|
+
filterWord: filterWord
|
|
1294
|
+
});
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
|
|
1298
|
+
/***/ }),
|
|
1299
|
+
|
|
1300
|
+
/***/ 93469:
|
|
1301
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1302
|
+
|
|
1303
|
+
"use strict";
|
|
1304
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1305
|
+
/* harmony export */ "h": function() { return /* binding */ PersistentStore; }
|
|
1306
|
+
/* harmony export */ });
|
|
1307
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
1308
|
+
/* harmony import */ var jodit_core_component__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(22562);
|
|
1309
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1310
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
|
|
1311
|
+
|
|
1312
|
+
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
var PersistentStore = /** @class */ (function (_super) {
|
|
1316
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(PersistentStore, _super);
|
|
1317
|
+
function PersistentStore(jodit, state) {
|
|
1318
|
+
var _this = _super.call(this, jodit) || this;
|
|
1319
|
+
_this.state = state;
|
|
1320
|
+
_this.sortBy = 'changed-desc';
|
|
1321
|
+
_this.view = 'tiles';
|
|
1322
|
+
_this.foldersPosition = 'top';
|
|
1323
|
+
_this.tileSize = 'default';
|
|
1324
|
+
_this.favorites = [];
|
|
1325
|
+
_this.showSideBar = true;
|
|
1326
|
+
_this.showPreview = false;
|
|
1327
|
+
_this.showFavorites = true;
|
|
1328
|
+
return _this;
|
|
1329
|
+
}
|
|
1330
|
+
/** @override */
|
|
1331
|
+
PersistentStore.prototype.className = function () {
|
|
1332
|
+
return 'PersistentStore';
|
|
1333
|
+
};
|
|
1334
|
+
PersistentStore.prototype.onChangeThemeSetField = function () {
|
|
1335
|
+
this.theme = this.state.theme;
|
|
1336
|
+
};
|
|
1337
|
+
PersistentStore.prototype.onChangeView = function () {
|
|
1338
|
+
this.view = this.state.view;
|
|
1339
|
+
};
|
|
1340
|
+
PersistentStore.prototype.onChangeSortBy = function () {
|
|
1341
|
+
this.sortBy = this.state.sortBy;
|
|
1342
|
+
};
|
|
1343
|
+
PersistentStore.prototype.onChangeTileSize = function () {
|
|
1344
|
+
this.tileSize = this.state.tileSize;
|
|
1345
|
+
};
|
|
1346
|
+
PersistentStore.prototype.onChangeFavorites = function () {
|
|
1347
|
+
this.favorites = this.state.favorites;
|
|
1348
|
+
};
|
|
1349
|
+
PersistentStore.prototype.onChangeShowSideBar = function () {
|
|
1350
|
+
this.showSideBar = this.state.showSideBar;
|
|
1351
|
+
};
|
|
1352
|
+
PersistentStore.prototype.onChangeShowPreview = function () {
|
|
1353
|
+
this.showPreview = this.state.showPreview;
|
|
1354
|
+
};
|
|
1355
|
+
PersistentStore.prototype.onChangeShowFavorites = function () {
|
|
1356
|
+
this.showFavorites = this.state.showFavorites;
|
|
1357
|
+
};
|
|
1358
|
+
PersistentStore.prototype.onChangeFoldersPosition = function () {
|
|
1359
|
+
this.foldersPosition = this.state.foldersPosition;
|
|
1360
|
+
};
|
|
1361
|
+
PersistentStore.prototype.syncWithState = function () {
|
|
1362
|
+
this.state.tileSize = this.tileSize;
|
|
1363
|
+
this.state.favorites = this.favorites.map(function (item) {
|
|
1364
|
+
if (item instanceof jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem */ .Z) {
|
|
1365
|
+
return item;
|
|
1366
|
+
}
|
|
1367
|
+
return jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
|
|
1368
|
+
});
|
|
1369
|
+
this.state.view = this.view;
|
|
1370
|
+
this.state.theme = this.theme;
|
|
1371
|
+
this.state.showSideBar = this.showSideBar;
|
|
1372
|
+
this.state.showPreview = this.showPreview;
|
|
1373
|
+
this.state.showFavorites = this.showFavorites;
|
|
1374
|
+
this.state.sortBy = this.sortBy;
|
|
1375
|
+
this.state.foldersPosition = this.foldersPosition;
|
|
1376
|
+
};
|
|
1377
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1378
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1379
|
+
], PersistentStore.prototype, "theme", void 0);
|
|
1380
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1381
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1382
|
+
], PersistentStore.prototype, "sortBy", void 0);
|
|
1383
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1384
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1385
|
+
], PersistentStore.prototype, "view", void 0);
|
|
1386
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1387
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1388
|
+
], PersistentStore.prototype, "foldersPosition", void 0);
|
|
1389
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1390
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1391
|
+
], PersistentStore.prototype, "tileSize", void 0);
|
|
1392
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1393
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1394
|
+
], PersistentStore.prototype, "favorites", void 0);
|
|
1395
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1396
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1397
|
+
], PersistentStore.prototype, "showSideBar", void 0);
|
|
1398
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1399
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1400
|
+
], PersistentStore.prototype, "showPreview", void 0);
|
|
1401
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1402
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.persistent
|
|
1403
|
+
], PersistentStore.prototype, "showFavorites", void 0);
|
|
1404
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1405
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.theme')
|
|
1406
|
+
], PersistentStore.prototype, "onChangeThemeSetField", null);
|
|
1407
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1408
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
|
|
1409
|
+
], PersistentStore.prototype, "onChangeView", null);
|
|
1410
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1411
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.sortBy')
|
|
1412
|
+
], PersistentStore.prototype, "onChangeSortBy", null);
|
|
1413
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1414
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.tileSize')
|
|
1415
|
+
], PersistentStore.prototype, "onChangeTileSize", null);
|
|
1416
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1417
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
|
|
1418
|
+
], PersistentStore.prototype, "onChangeFavorites", null);
|
|
1419
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1420
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showSideBar')
|
|
1421
|
+
], PersistentStore.prototype, "onChangeShowSideBar", null);
|
|
1422
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1423
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showPreview')
|
|
1424
|
+
], PersistentStore.prototype, "onChangeShowPreview", null);
|
|
1425
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1426
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.showFavorites')
|
|
1427
|
+
], PersistentStore.prototype, "onChangeShowFavorites", null);
|
|
1428
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1429
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.foldersPosition')
|
|
1430
|
+
], PersistentStore.prototype, "onChangeFoldersPosition", null);
|
|
1431
|
+
PersistentStore = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1432
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
1433
|
+
], PersistentStore);
|
|
1434
|
+
return PersistentStore;
|
|
1435
|
+
}(jodit_core_component__WEBPACK_IMPORTED_MODULE_0__/* .ViewComponent */ .Hr));
|
|
1436
|
+
|
|
1437
|
+
|
|
1438
|
+
/***/ }),
|
|
1439
|
+
|
|
1440
|
+
/***/ 83568:
|
|
1441
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1442
|
+
|
|
1443
|
+
"use strict";
|
|
1444
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1445
|
+
/* harmony export */ "O": function() { return /* binding */ StateManager; }
|
|
1446
|
+
/* harmony export */ });
|
|
1447
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97582);
|
|
1448
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(50526);
|
|
1449
|
+
/*!
|
|
1450
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1451
|
+
* See LICENSE.md in the project root for license information.
|
|
1452
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1453
|
+
*/
|
|
1454
|
+
|
|
1455
|
+
|
|
1456
|
+
var StateManager = /** @class */ (function () {
|
|
1457
|
+
function StateManager(state) {
|
|
1458
|
+
this.state = state;
|
|
1459
|
+
}
|
|
1460
|
+
StateManager.prototype.getIndex = function (elm, elms) {
|
|
1461
|
+
if (elms === void 0) { elms = this.state.elements; }
|
|
1462
|
+
return elms.findIndex(function (item) { return item.uniqueHashKey === elm.uniqueHashKey; });
|
|
1463
|
+
};
|
|
1464
|
+
StateManager.prototype.isActive = function (item) {
|
|
1465
|
+
return Boolean(this.state.activeElements.find(function (data) { return data.uniqueHashKey === item.uniqueHashKey; }));
|
|
1466
|
+
};
|
|
1467
|
+
StateManager.prototype.isFavorite = function (item) {
|
|
1468
|
+
return Boolean(this.state.favorites.find(function (data) { return data.uniqueHashKey === item.uniqueHashKey; }));
|
|
1469
|
+
};
|
|
1470
|
+
StateManager.prototype.addActive = function (item, multi) {
|
|
1471
|
+
var _a;
|
|
1472
|
+
this.state.metaInfo = item;
|
|
1473
|
+
this.state.info = (_a = item.file) !== null && _a !== void 0 ? _a : '';
|
|
1474
|
+
this.state.lastSelectedIndex = this.getIndex(item);
|
|
1475
|
+
this.state.activeElements = multi
|
|
1476
|
+
? (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .ev)((0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__read */ .CR)(this.state.activeElements), false), [item], false) : [item];
|
|
1477
|
+
};
|
|
1478
|
+
StateManager.prototype.callSelectHandler = function () {
|
|
1479
|
+
var _a;
|
|
1480
|
+
var act = this.state.activeElements;
|
|
1481
|
+
(_a = this.state.onSelectCallBack) === null || _a === void 0 ? void 0 : _a.call(this, {
|
|
1482
|
+
baseurl: '',
|
|
1483
|
+
files: act.map(function (data) { return data.fileURL; }),
|
|
1484
|
+
isImages: act.map(function (data) { return Boolean(data.isImage); })
|
|
1485
|
+
});
|
|
1486
|
+
};
|
|
1487
|
+
StateManager.prototype.setFilter = function (value) {
|
|
1488
|
+
this.state.filterWord = value;
|
|
1489
|
+
};
|
|
1490
|
+
StateManager.prototype.toggleFavorite = function (item) {
|
|
1491
|
+
var favoriteIndex = this.getIndex(item, this.state.favorites);
|
|
1492
|
+
var favorites = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__read */ .CR)(this.state.favorites), false);
|
|
1493
|
+
if (favoriteIndex === -1) {
|
|
1494
|
+
favorites.push(item);
|
|
1495
|
+
}
|
|
1496
|
+
else {
|
|
1497
|
+
favorites.splice(favoriteIndex, 1);
|
|
1498
|
+
}
|
|
1499
|
+
this.state.favorites = favorites;
|
|
1500
|
+
};
|
|
1501
|
+
StateManager.prototype.fillTreeForPath = function (sources, path) {
|
|
1502
|
+
var _this = this;
|
|
1503
|
+
if (!this.state.tree.length || !path || path === '/') {
|
|
1504
|
+
this.state.tree = sources.map(sourceToTreeItem);
|
|
1505
|
+
return;
|
|
1506
|
+
}
|
|
1507
|
+
this.removeActive(this.state.tree);
|
|
1508
|
+
sources.forEach(function (source) {
|
|
1509
|
+
var sourceItem = findItem(_this.state.tree, source.name);
|
|
1510
|
+
if (!sourceItem) {
|
|
1511
|
+
sourceItem = sourceToTreeItem(source);
|
|
1512
|
+
_this.state.tree.push(sourceItem);
|
|
1513
|
+
}
|
|
1514
|
+
sourceItem.isActive = true;
|
|
1515
|
+
var childrenItem = findTreeItem(path, sourceItem);
|
|
1516
|
+
if (!childrenItem) {
|
|
1517
|
+
return;
|
|
1518
|
+
}
|
|
1519
|
+
childrenItem.isActive = true;
|
|
1520
|
+
childrenItem.children = filterFolders(source.folders).map(function (folder) {
|
|
1521
|
+
return folderToTreeItem(folder, path + '/' + folder, source.name);
|
|
1522
|
+
});
|
|
1523
|
+
});
|
|
1524
|
+
this.state.tree = (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__spreadArray */ .ev)([], (0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__read */ .CR)(this.state.tree), false);
|
|
1525
|
+
};
|
|
1526
|
+
StateManager.prototype.removeActive = function (tree) {
|
|
1527
|
+
var _this = this;
|
|
1528
|
+
tree.forEach(function (item) {
|
|
1529
|
+
item.isActive = false;
|
|
1530
|
+
_this.removeActive(item.children);
|
|
1531
|
+
});
|
|
1532
|
+
};
|
|
1533
|
+
Object.defineProperty(StateManager.prototype, "isFavoriteItems", {
|
|
1534
|
+
get: function () {
|
|
1535
|
+
return this.state.favorites === this.state.elements;
|
|
1536
|
+
},
|
|
1537
|
+
enumerable: false,
|
|
1538
|
+
configurable: true
|
|
1539
|
+
});
|
|
1540
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
|
|
1541
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
1542
|
+
], StateManager.prototype, "getIndex", null);
|
|
1543
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
|
|
1544
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
1545
|
+
], StateManager.prototype, "isActive", null);
|
|
1546
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_1__/* .__decorate */ .gn)([
|
|
1547
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_0__.autobind
|
|
1548
|
+
], StateManager.prototype, "isFavorite", null);
|
|
1549
|
+
return StateManager;
|
|
1550
|
+
}());
|
|
1551
|
+
function findTreeItem(path, sourceItem) {
|
|
1552
|
+
return path
|
|
1553
|
+
.split('/')
|
|
1554
|
+
.reduce(function (item, part) { return item && findItem(item.children, part); }, sourceItem);
|
|
1555
|
+
}
|
|
1556
|
+
function findItem(children, name) {
|
|
1557
|
+
var _a;
|
|
1558
|
+
return (_a = children.find(function (item) { return item.name === name; })) !== null && _a !== void 0 ? _a : null;
|
|
1559
|
+
}
|
|
1560
|
+
function filterFolders(folders) {
|
|
1561
|
+
return folders.filter(function (folder) { return folder !== '.' && folder !== '..'; });
|
|
1562
|
+
}
|
|
1563
|
+
function sourceToTreeItem(source) {
|
|
1564
|
+
return {
|
|
1565
|
+
type: 'source',
|
|
1566
|
+
name: source.name,
|
|
1567
|
+
title: source.title,
|
|
1568
|
+
sourceName: source.name,
|
|
1569
|
+
path: '/',
|
|
1570
|
+
children: filterFolders(source.folders).map(function (folder) {
|
|
1571
|
+
return folderToTreeItem(folder, folder, source.name);
|
|
1572
|
+
})
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1575
|
+
function folderToTreeItem(name, path, sourceName) {
|
|
1576
|
+
return {
|
|
1577
|
+
type: 'directory',
|
|
1578
|
+
name: name,
|
|
1579
|
+
path: path,
|
|
1580
|
+
sourceName: sourceName,
|
|
1581
|
+
children: []
|
|
1582
|
+
};
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
|
|
1586
|
+
/***/ }),
|
|
1587
|
+
|
|
1588
|
+
/***/ 57591:
|
|
1589
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1590
|
+
|
|
1591
|
+
"use strict";
|
|
1592
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1593
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1594
|
+
/* harmony export */ "ru": function() { return /* binding */ ru; }
|
|
1595
|
+
/* harmony export */ });
|
|
1596
|
+
/*!
|
|
1597
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1598
|
+
* See LICENSE.md in the project root for license information.
|
|
1599
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1600
|
+
*/
|
|
1601
|
+
var ru = __webpack_require__(11937);
|
|
1602
|
+
|
|
1603
|
+
|
|
1604
|
+
|
|
1605
|
+
/***/ }),
|
|
1606
|
+
|
|
1607
|
+
/***/ 11937:
|
|
1608
|
+
/***/ (function(module) {
|
|
1609
|
+
|
|
1610
|
+
"use strict";
|
|
1611
|
+
|
|
1612
|
+
/*!
|
|
1613
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1614
|
+
* See LICENSE.md in the project root for license information.
|
|
1615
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1616
|
+
*/
|
|
1617
|
+
module.exports = {
|
|
1618
|
+
Favorites: 'Избранное',
|
|
1619
|
+
Settings: 'Настройки',
|
|
1620
|
+
Light: 'Светлая',
|
|
1621
|
+
Dark: 'Темная',
|
|
1622
|
+
Theme: 'Тема',
|
|
1623
|
+
Show: 'Показать',
|
|
1624
|
+
Hide: 'Скрыть',
|
|
1625
|
+
'Show favorites': 'Показывать избранное',
|
|
1626
|
+
Tiles: 'Плитка',
|
|
1627
|
+
List: 'Список',
|
|
1628
|
+
Compact: 'Компактный',
|
|
1629
|
+
View: 'Отображение',
|
|
1630
|
+
'Folders position': 'Позиция папок',
|
|
1631
|
+
'Sort by': 'Сортировать по',
|
|
1632
|
+
'Extra small': 'Очень маленькие',
|
|
1633
|
+
Small: 'Маленькие',
|
|
1634
|
+
Large: 'Большие',
|
|
1635
|
+
'Extra large': 'Очень большие',
|
|
1636
|
+
'Tile size': 'Размер плитки'
|
|
1637
|
+
};
|
|
1638
|
+
|
|
1639
|
+
|
|
1640
|
+
/***/ }),
|
|
1641
|
+
|
|
1642
|
+
/***/ 68349:
|
|
1643
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
1644
|
+
|
|
1645
|
+
"use strict";
|
|
1646
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
1647
|
+
/* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82942);
|
|
1648
|
+
/* harmony import */ var _heart_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_heart_svg__WEBPACK_IMPORTED_MODULE_1__);
|
|
1649
|
+
/* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19327);
|
|
1650
|
+
/* harmony import */ var _home_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_home_svg__WEBPACK_IMPORTED_MODULE_2__);
|
|
1651
|
+
/* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(59239);
|
|
1652
|
+
/* harmony import */ var _new_folder_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__);
|
|
1653
|
+
/*!
|
|
1654
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1655
|
+
* See LICENSE.md in the project root for license information.
|
|
1656
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1657
|
+
*/
|
|
1658
|
+
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
|
|
1662
|
+
jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('heart', String(_heart_svg__WEBPACK_IMPORTED_MODULE_1__));
|
|
1663
|
+
jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('home', String(_home_svg__WEBPACK_IMPORTED_MODULE_2__));
|
|
1664
|
+
jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.set */ .JO.set('new-folder', String(_new_folder_svg__WEBPACK_IMPORTED_MODULE_3__));
|
|
1665
|
+
|
|
1666
|
+
|
|
1667
|
+
/***/ }),
|
|
1668
|
+
|
|
1669
|
+
/***/ 9890:
|
|
1670
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1671
|
+
|
|
1672
|
+
"use strict";
|
|
1673
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1674
|
+
/* harmony export */ "D": function() { return /* binding */ UIBrowserFolder; }
|
|
1675
|
+
/* harmony export */ });
|
|
1676
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
1677
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
1678
|
+
/* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1679
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
|
|
1680
|
+
/*!
|
|
1681
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1682
|
+
* See LICENSE.md in the project root for license information.
|
|
1683
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1684
|
+
*/
|
|
1685
|
+
|
|
1686
|
+
|
|
1687
|
+
|
|
1688
|
+
|
|
1689
|
+
|
|
1690
|
+
var UIBrowserFolder = /** @class */ (function (_super) {
|
|
1691
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UIBrowserFolder, _super);
|
|
1692
|
+
function UIBrowserFolder(jodit, item) {
|
|
1693
|
+
var _this = _super.call(this, jodit) || this;
|
|
1694
|
+
_this.item = item;
|
|
1695
|
+
/** @override */
|
|
1696
|
+
_this.syncMod = true;
|
|
1697
|
+
var name = _this.getElm('name');
|
|
1698
|
+
void 0;
|
|
1699
|
+
name.innerText = item.name;
|
|
1700
|
+
jodit.e
|
|
1701
|
+
.on(_this.container, 'click', function () {
|
|
1702
|
+
if (!_this.getMod('active')) {
|
|
1703
|
+
_this.setMod('loading', true);
|
|
1704
|
+
}
|
|
1705
|
+
return jodit.e.fire('openFolder', item);
|
|
1706
|
+
})
|
|
1707
|
+
.on(_this.container, 'contextmenu', function (e) {
|
|
1708
|
+
return jodit.e.fire('contextmenuFolder.filebrowser', item, e);
|
|
1709
|
+
});
|
|
1710
|
+
return _this;
|
|
1711
|
+
}
|
|
1712
|
+
/** @override */
|
|
1713
|
+
UIBrowserFolder.prototype.className = function () {
|
|
1714
|
+
return 'UIBrowserFolder';
|
|
1715
|
+
};
|
|
1716
|
+
/** @override */
|
|
1717
|
+
UIBrowserFolder.prototype.render = function () {
|
|
1718
|
+
return "<div>\n\t\t\t<div class=\"&__icon\">\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class=\"&__icon-wrapper\">\n\t\t\t\t\t*folder*\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"&__name\"></div>\n\t\t\t<div class=\"&__arrow\">*angle-right*</div>\n\t\t</div>";
|
|
1719
|
+
};
|
|
1720
|
+
UIBrowserFolder = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1721
|
+
jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
|
|
1722
|
+
], UIBrowserFolder);
|
|
1723
|
+
return UIBrowserFolder;
|
|
1724
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1));
|
|
1725
|
+
|
|
1726
|
+
|
|
1727
|
+
/***/ }),
|
|
1728
|
+
|
|
1729
|
+
/***/ 65669:
|
|
1730
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1731
|
+
|
|
1732
|
+
"use strict";
|
|
1733
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1734
|
+
/* harmony export */ "C": function() { return /* binding */ UIBrowserHeader; }
|
|
1735
|
+
/* harmony export */ });
|
|
1736
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
1737
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
1738
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1739
|
+
/* harmony import */ var jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45429);
|
|
1740
|
+
/* harmony import */ var jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(4682);
|
|
1741
|
+
/*!
|
|
1742
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1743
|
+
* See LICENSE.md in the project root for license information.
|
|
1744
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1745
|
+
*/
|
|
1746
|
+
|
|
1747
|
+
|
|
1748
|
+
|
|
1749
|
+
|
|
1750
|
+
|
|
1751
|
+
|
|
1752
|
+
var UIBrowserHeader = /** @class */ (function (_super) {
|
|
1753
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UIBrowserHeader, _super);
|
|
1754
|
+
function UIBrowserHeader(jodit, options, stateManager) {
|
|
1755
|
+
var _this = _super.call(this, jodit) || this;
|
|
1756
|
+
_this.options = options;
|
|
1757
|
+
_this.stateManager = stateManager;
|
|
1758
|
+
/** @override */
|
|
1759
|
+
_this.syncMod = true;
|
|
1760
|
+
_this.toolbar = (0,jodit_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_2__/* .makeCollection */ .R)(_this.j);
|
|
1761
|
+
_this.filter = new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIInput */ .u3(_this.j, {
|
|
1762
|
+
icon: 'search',
|
|
1763
|
+
placeholder: 'Filter',
|
|
1764
|
+
clearButton: true,
|
|
1765
|
+
onChange: function (value) {
|
|
1766
|
+
_this.stateManager.setFilter(value);
|
|
1767
|
+
}
|
|
1768
|
+
});
|
|
1769
|
+
_this.append(_this.toolbar).append(_this.filter);
|
|
1770
|
+
_this.filter.container.classList.add(_this.getFullElName('filter'));
|
|
1771
|
+
_this.toolbar.setMod('mode', 'header').build(_this.__getButtons());
|
|
1772
|
+
return _this;
|
|
1773
|
+
}
|
|
1774
|
+
/** @override */
|
|
1775
|
+
UIBrowserHeader.prototype.className = function () {
|
|
1776
|
+
return 'UIBrowserHeader';
|
|
1777
|
+
};
|
|
1778
|
+
UIBrowserHeader.prototype.__getButtons = function () {
|
|
1779
|
+
var _this = this;
|
|
1780
|
+
var _a;
|
|
1781
|
+
var options = ((_a = this.options.toolbarButtons) !== null && _a !== void 0 ? _a : []);
|
|
1782
|
+
return options.filter(function (btn) {
|
|
1783
|
+
if (!(0,jodit_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__/* .isString */ .H)(btn)) {
|
|
1784
|
+
return true;
|
|
1785
|
+
}
|
|
1786
|
+
switch (btn) {
|
|
1787
|
+
case 'filebrowser.edit':
|
|
1788
|
+
return (_this.j.dataProvider.canI('ImageResize') ||
|
|
1789
|
+
_this.j.dataProvider.canI('ImageCrop'));
|
|
1790
|
+
case 'filebrowser.new-folder':
|
|
1791
|
+
return _this.j.dataProvider.canI('FolderCreate');
|
|
1792
|
+
case 'filebrowser.upload':
|
|
1793
|
+
return _this.j.dataProvider.canI('FileUpload');
|
|
1794
|
+
case 'filebrowser.remove':
|
|
1795
|
+
return _this.j.dataProvider.canI('FileRemove');
|
|
1796
|
+
}
|
|
1797
|
+
return true;
|
|
1798
|
+
});
|
|
1799
|
+
};
|
|
1800
|
+
UIBrowserHeader = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
1801
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
1802
|
+
], UIBrowserHeader);
|
|
1803
|
+
return UIBrowserHeader;
|
|
1804
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
1805
|
+
|
|
1806
|
+
|
|
1807
|
+
/***/ }),
|
|
1808
|
+
|
|
1809
|
+
/***/ 87695:
|
|
1810
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1811
|
+
|
|
1812
|
+
"use strict";
|
|
1813
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1814
|
+
/* harmony export */ "u": function() { return /* binding */ UIBrowserItem; }
|
|
1815
|
+
/* harmony export */ });
|
|
1816
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(97582);
|
|
1817
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
1818
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1819
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(45545);
|
|
1820
|
+
/* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(8079);
|
|
1821
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(95582);
|
|
1822
|
+
/*!
|
|
1823
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1824
|
+
* See LICENSE.md in the project root for license information.
|
|
1825
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1826
|
+
*/
|
|
1827
|
+
|
|
1828
|
+
|
|
1829
|
+
|
|
1830
|
+
|
|
1831
|
+
|
|
1832
|
+
|
|
1833
|
+
|
|
1834
|
+
|
|
1835
|
+
var UIBrowserItem = /** @class */ (function (_super) {
|
|
1836
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__extends */ .ZT)(UIBrowserItem, _super);
|
|
1837
|
+
function UIBrowserItem(jodit, item) {
|
|
1838
|
+
var _this = _super.call(this, jodit) || this;
|
|
1839
|
+
_this.item = jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_2__/* .FileBrowserItem.create */ .Z.create(item);
|
|
1840
|
+
jodit.e.on(_this.container, 'click contextmenu dblclick', function (e) {
|
|
1841
|
+
jodit.e.fire(e.type + 'Item.filebrowser', _this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
|
|
1842
|
+
return false;
|
|
1843
|
+
});
|
|
1844
|
+
return _this;
|
|
1845
|
+
}
|
|
1846
|
+
/** @override */
|
|
1847
|
+
UIBrowserItem.prototype.className = function () {
|
|
1848
|
+
return 'UIBrowserItem';
|
|
1849
|
+
};
|
|
1850
|
+
/** @override */
|
|
1851
|
+
UIBrowserItem.prototype.render = function () {
|
|
1852
|
+
return "<div tabindex='-1'>\n\t\t\t<div class='&__image'></div>\n\t\t\t<div class='&__info'></div>\n\t\t\t<div class='&__heart'>*heart*</div>\n\t\t</div>";
|
|
1853
|
+
};
|
|
1854
|
+
UIBrowserItem.prototype.onClickFavorite = function () {
|
|
1855
|
+
var _this = this;
|
|
1856
|
+
this.bubble(function (box) {
|
|
1857
|
+
_this.jodit.e.fire(box, 'toggleFavoriteItem', _this.item);
|
|
1858
|
+
});
|
|
1859
|
+
return false;
|
|
1860
|
+
};
|
|
1861
|
+
UIBrowserItem.prototype.onAction = function (e) {
|
|
1862
|
+
this.jodit.e.fire(e.type + 'Item.filebrowser', this.item, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.ctrlKey)(e) || e.shiftKey, e);
|
|
1863
|
+
return false;
|
|
1864
|
+
};
|
|
1865
|
+
/** @override */
|
|
1866
|
+
UIBrowserItem.prototype.update = function () {
|
|
1867
|
+
var _a;
|
|
1868
|
+
var image = this.getElm('image');
|
|
1869
|
+
void 0;
|
|
1870
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.css)(image, 'backgroundImage', "url(".concat(encodeURI(this.item.imageURL), ")"));
|
|
1871
|
+
var type = (_a = this.item, _a.type), file = _a.file, time = _a.time, size = _a.size;
|
|
1872
|
+
this.setMod('is-file', this.item.isImage === false)
|
|
1873
|
+
.setMod('type', type !== null && type !== void 0 ? type : 'file')
|
|
1874
|
+
.setElementValue('name', file)
|
|
1875
|
+
.setElementValue('time', time)
|
|
1876
|
+
.setElementValue('filesize', size);
|
|
1877
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_4__.attr)(this.container, 'title', type !== 'folder' ? "".concat(file, " ").concat(time, " ").concat(size) : file);
|
|
1878
|
+
_super.prototype.update.call(this);
|
|
1879
|
+
};
|
|
1880
|
+
/**
|
|
1881
|
+
* Create element and set value
|
|
1882
|
+
*/
|
|
1883
|
+
UIBrowserItem.prototype.setElementValue = function (name, value) {
|
|
1884
|
+
var elementClassName = this.getFullElName(name);
|
|
1885
|
+
var element = this.getElm(name);
|
|
1886
|
+
if (!value) {
|
|
1887
|
+
element && jodit_modules__WEBPACK_IMPORTED_MODULE_3__.Dom.safeRemove(element);
|
|
1888
|
+
return this;
|
|
1889
|
+
}
|
|
1890
|
+
if (!element) {
|
|
1891
|
+
var wrapper = this.getElm('info');
|
|
1892
|
+
void 0;
|
|
1893
|
+
element = this.j.create.div(elementClassName);
|
|
1894
|
+
wrapper.appendChild(element);
|
|
1895
|
+
}
|
|
1896
|
+
element.innerText = value;
|
|
1897
|
+
return this;
|
|
1898
|
+
};
|
|
1899
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
1900
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('heart:click')
|
|
1901
|
+
], UIBrowserItem.prototype, "onClickFavorite", null);
|
|
1902
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
1903
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:click', 'container:contextmenu', 'container:dblclick'])
|
|
1904
|
+
], UIBrowserItem.prototype, "onAction", null);
|
|
1905
|
+
UIBrowserItem = (0,tslib__WEBPACK_IMPORTED_MODULE_5__/* .__decorate */ .gn)([
|
|
1906
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
1907
|
+
], UIBrowserItem);
|
|
1908
|
+
return UIBrowserItem;
|
|
1909
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1));
|
|
1910
|
+
|
|
1911
|
+
|
|
1912
|
+
/***/ }),
|
|
1913
|
+
|
|
1914
|
+
/***/ 41424:
|
|
1915
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1916
|
+
|
|
1917
|
+
"use strict";
|
|
1918
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1919
|
+
/* harmony export */ "m": function() { return /* binding */ UILightBox; }
|
|
1920
|
+
/* harmony export */ });
|
|
1921
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
|
|
1922
|
+
/* harmony import */ var jodit_modules__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8079);
|
|
1923
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
1924
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
|
|
1925
|
+
/* harmony import */ var jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(11612);
|
|
1926
|
+
/*!
|
|
1927
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1928
|
+
* See LICENSE.md in the project root for license information.
|
|
1929
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1930
|
+
*/
|
|
1931
|
+
|
|
1932
|
+
|
|
1933
|
+
|
|
1934
|
+
|
|
1935
|
+
|
|
1936
|
+
|
|
1937
|
+
|
|
1938
|
+
var UILightBox = /** @class */ (function (_super) {
|
|
1939
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__extends */ .ZT)(UILightBox, _super);
|
|
1940
|
+
function UILightBox(jodit, current, elements) {
|
|
1941
|
+
var _this = _super.call(this, jodit) || this;
|
|
1942
|
+
_this.current = current;
|
|
1943
|
+
_this.elements = elements;
|
|
1944
|
+
_this.dialog = new jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dialog();
|
|
1945
|
+
var dialog = _this.dialog;
|
|
1946
|
+
dialog
|
|
1947
|
+
.setMod('theme', jodit.state.theme)
|
|
1948
|
+
.toolbar.setMod('mode', 'header');
|
|
1949
|
+
dialog.open(_this);
|
|
1950
|
+
_this.elements = _this.elements.filter(function (e) { return e.isImage; });
|
|
1951
|
+
dialog.e.on(dialog, 'afterClose', function () {
|
|
1952
|
+
_this.destruct();
|
|
1953
|
+
});
|
|
1954
|
+
_this.addGlobalListeners();
|
|
1955
|
+
_this.onChangeCurrent();
|
|
1956
|
+
dialog.toolbar.build([
|
|
1957
|
+
{
|
|
1958
|
+
icon: 'check',
|
|
1959
|
+
exec: function () {
|
|
1960
|
+
jodit.stateManager.addActive(_this.current, false);
|
|
1961
|
+
jodit.e.fire('select.filebrowser');
|
|
1962
|
+
dialog.close();
|
|
1963
|
+
}
|
|
1964
|
+
},
|
|
1965
|
+
'dialog.close'
|
|
1966
|
+
]);
|
|
1967
|
+
return _this;
|
|
1968
|
+
}
|
|
1969
|
+
UILightBox_1 = UILightBox;
|
|
1970
|
+
/** @override */
|
|
1971
|
+
UILightBox.prototype.className = function () {
|
|
1972
|
+
return 'UILightBox';
|
|
1973
|
+
};
|
|
1974
|
+
UILightBox.prototype.render = function () {
|
|
1975
|
+
return "<div>\n\t\t\t<div class='&__previous'>*angle-left*</div>\n\t\t\t<div class='&__preview'></div>\n\t\t\t<div class='&__loader'></div>\n\t\t\t<div class='&__next'>*angle-right*</div>\n\t\t</div>";
|
|
1976
|
+
};
|
|
1977
|
+
UILightBox.prototype.onChangeCurrent = function () {
|
|
1978
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__awaiter */ .mG)(this, void 0, Promise, function () {
|
|
1979
|
+
var current, preview, image, iframe;
|
|
1980
|
+
return (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__generator */ .Jh)(this, function (_a) {
|
|
1981
|
+
switch (_a.label) {
|
|
1982
|
+
case 0:
|
|
1983
|
+
current = this.current;
|
|
1984
|
+
this.setMod('loading', true);
|
|
1985
|
+
preview = this.getElm('preview');
|
|
1986
|
+
void 0;
|
|
1987
|
+
jodit_modules__WEBPACK_IMPORTED_MODULE_0__.Dom.detach(preview);
|
|
1988
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
|
|
1989
|
+
backgroundImage: null
|
|
1990
|
+
});
|
|
1991
|
+
if (!current.isImage) return [3 /*break*/, 2];
|
|
1992
|
+
return [4 /*yield*/, (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.loadImage)(current.fileURL, this.j)];
|
|
1993
|
+
case 1:
|
|
1994
|
+
image = _a.sent();
|
|
1995
|
+
this.dialog.setPosition();
|
|
1996
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__.css)(preview, {
|
|
1997
|
+
width: Math.min(this.jodit.ow.innerWidth, image.naturalWidth),
|
|
1998
|
+
height: Math.min(this.jodit.ow.innerHeight - 100, image.naturalHeight),
|
|
1999
|
+
backgroundImage: "url(".concat(image.src, ")")
|
|
2000
|
+
});
|
|
2001
|
+
return [3 /*break*/, 4];
|
|
2002
|
+
case 2: return [4 /*yield*/, this.makeIframe(current.fileURL)];
|
|
2003
|
+
case 3:
|
|
2004
|
+
iframe = _a.sent();
|
|
2005
|
+
preview.appendChild(iframe);
|
|
2006
|
+
_a.label = 4;
|
|
2007
|
+
case 4:
|
|
2008
|
+
this.dialog.setSize();
|
|
2009
|
+
this.dialog.setPosition();
|
|
2010
|
+
this.setMod('loading', false);
|
|
2011
|
+
return [2 /*return*/];
|
|
2012
|
+
}
|
|
2013
|
+
});
|
|
2014
|
+
});
|
|
2015
|
+
};
|
|
2016
|
+
UILightBox.prototype.makeIframe = function (url) {
|
|
2017
|
+
var iframe = this.j.c.element('iframe');
|
|
2018
|
+
iframe.classList.add(this.getFullElName('office-iframe'));
|
|
2019
|
+
iframe.src = /\.pdf/.test(url)
|
|
2020
|
+
? url
|
|
2021
|
+
: this.j.o.previewOfficeURL + encodeURIComponent(url);
|
|
2022
|
+
return iframe;
|
|
2023
|
+
};
|
|
2024
|
+
UILightBox.prototype.onPreviousClick = function () {
|
|
2025
|
+
var current = this.current;
|
|
2026
|
+
var index = this.j.stateManager.getIndex(current, this.elements);
|
|
2027
|
+
if (index <= 0) {
|
|
2028
|
+
index = this.elements.length - 1;
|
|
2029
|
+
}
|
|
2030
|
+
else {
|
|
2031
|
+
index -= 1;
|
|
2032
|
+
}
|
|
2033
|
+
this.current = this.elements[index];
|
|
2034
|
+
};
|
|
2035
|
+
UILightBox.prototype.onNextClick = function () {
|
|
2036
|
+
var current = this.current;
|
|
2037
|
+
var index = this.j.stateManager.getIndex(current, this.elements);
|
|
2038
|
+
if (index >= this.elements.length - 1) {
|
|
2039
|
+
index = 0;
|
|
2040
|
+
}
|
|
2041
|
+
else {
|
|
2042
|
+
index += 1;
|
|
2043
|
+
}
|
|
2044
|
+
this.current = this.elements[index];
|
|
2045
|
+
};
|
|
2046
|
+
UILightBox.open = function (jodit, current, elements) {
|
|
2047
|
+
return new UILightBox_1(jodit, current, elements);
|
|
2048
|
+
};
|
|
2049
|
+
UILightBox.prototype.addGlobalListeners = function () {
|
|
2050
|
+
this.j.e.on(this.j.od, 'keydown', this.onKeyPress);
|
|
2051
|
+
};
|
|
2052
|
+
UILightBox.prototype.onKeyPress = function (e) {
|
|
2053
|
+
if (e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_RIGHT || e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_SPACE) {
|
|
2054
|
+
e.key === jodit_core_constants__WEBPACK_IMPORTED_MODULE_3__.KEY_LEFT ? this.onPreviousClick() : this.onNextClick();
|
|
2055
|
+
return false;
|
|
2056
|
+
}
|
|
2057
|
+
};
|
|
2058
|
+
UILightBox.prototype.removeGlobalListeners = function () {
|
|
2059
|
+
this.j.e.off(this.j.od, 'keydown', this.onKeyPress);
|
|
2060
|
+
};
|
|
2061
|
+
UILightBox.prototype.destruct = function () {
|
|
2062
|
+
this.removeGlobalListeners();
|
|
2063
|
+
this.dialog.destruct();
|
|
2064
|
+
return _super.prototype.destruct.call(this);
|
|
2065
|
+
};
|
|
2066
|
+
var UILightBox_1;
|
|
2067
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2068
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('current')
|
|
2069
|
+
], UILightBox.prototype, "onChangeCurrent", null);
|
|
2070
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2071
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('previous:click')
|
|
2072
|
+
], UILightBox.prototype, "onPreviousClick", null);
|
|
2073
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2074
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('next:click')
|
|
2075
|
+
], UILightBox.prototype, "onNextClick", null);
|
|
2076
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2077
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.autobind
|
|
2078
|
+
], UILightBox.prototype, "onKeyPress", null);
|
|
2079
|
+
UILightBox = UILightBox_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2080
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2081
|
+
], UILightBox);
|
|
2082
|
+
return UILightBox;
|
|
2083
|
+
}(jodit_modules__WEBPACK_IMPORTED_MODULE_0__.UIElement));
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
/***/ }),
|
|
2087
|
+
|
|
2088
|
+
/***/ 96123:
|
|
2089
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2090
|
+
|
|
2091
|
+
"use strict";
|
|
2092
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2093
|
+
/* harmony export */ "G": function() { return /* binding */ UIBrowserPanel; }
|
|
2094
|
+
/* harmony export */ });
|
|
2095
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(97582);
|
|
2096
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2097
|
+
/* harmony import */ var _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(72618);
|
|
2098
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(50526);
|
|
2099
|
+
/* harmony import */ var _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68787);
|
|
2100
|
+
/* harmony import */ var _settings_settings__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(62983);
|
|
2101
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
|
|
2102
|
+
/* harmony import */ var _sources_sources__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(93582);
|
|
2103
|
+
/* harmony import */ var _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(67775);
|
|
2104
|
+
/* harmony import */ var _preview_preview__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(96945);
|
|
2105
|
+
/*!
|
|
2106
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2107
|
+
* See LICENSE.md in the project root for license information.
|
|
2108
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2109
|
+
*/
|
|
2110
|
+
|
|
2111
|
+
|
|
2112
|
+
|
|
2113
|
+
|
|
2114
|
+
|
|
2115
|
+
|
|
2116
|
+
|
|
2117
|
+
|
|
2118
|
+
|
|
2119
|
+
|
|
2120
|
+
|
|
2121
|
+
var UIBrowserPanel = /** @class */ (function (_super) {
|
|
2122
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__extends */ .ZT)(UIBrowserPanel, _super);
|
|
2123
|
+
function UIBrowserPanel(jodit, stateManager) {
|
|
2124
|
+
var _this = _super.call(this, jodit) || this;
|
|
2125
|
+
_this.stateManager = stateManager;
|
|
2126
|
+
/** @override */
|
|
2127
|
+
_this.syncMod = true;
|
|
2128
|
+
_this.sources = new _sources_sources__WEBPACK_IMPORTED_MODULE_6__/* .UIBrowserSources */ .L(_this.j);
|
|
2129
|
+
_this.sidebar = new _sidebar_sidebar__WEBPACK_IMPORTED_MODULE_3__/* .UISidebar */ .o(_this.jodit, [_this.sources], _this.stateManager.state);
|
|
2130
|
+
_this.preview = new _preview_preview__WEBPACK_IMPORTED_MODULE_8__/* .UIPreview */ .o(_this.jodit, _this.stateManager.state);
|
|
2131
|
+
_this.statusbar = new _statusbar_statusbar__WEBPACK_IMPORTED_MODULE_7__/* .UIBrowserStatusBar */ .s(_this.j);
|
|
2132
|
+
_this.items = new _virtual_scroll_virtual_scroll__WEBPACK_IMPORTED_MODULE_1__/* .UIVirtualScroll */ .d(_this.j, _this.stateManager);
|
|
2133
|
+
_this.settings = new _settings_settings__WEBPACK_IMPORTED_MODULE_4__/* .UIBrowserSettings */ .r(_this.jodit, _this.stateManager.state);
|
|
2134
|
+
_this.state = stateManager.state;
|
|
2135
|
+
_this.append(_this.sidebar, 'content');
|
|
2136
|
+
_this.append(_this.items, 'content');
|
|
2137
|
+
_this.append(_this.settings, 'content');
|
|
2138
|
+
_this.append(_this.preview, 'content');
|
|
2139
|
+
_this.append(_this.statusbar, 'footer');
|
|
2140
|
+
_this.onChangeElements();
|
|
2141
|
+
_this.onChangeSources();
|
|
2142
|
+
_this.onChangeView();
|
|
2143
|
+
_this.onChangeTileSize();
|
|
2144
|
+
_this.onChangeShowFavorites();
|
|
2145
|
+
_this.onChangeActiveElements();
|
|
2146
|
+
_this.onChangeFavorites();
|
|
2147
|
+
_this.onChangeShowSideBar();
|
|
2148
|
+
_this.onChangeShowSettings();
|
|
2149
|
+
_this.onChangeShowPreview();
|
|
2150
|
+
_this.onChangeTheme();
|
|
2151
|
+
return _this;
|
|
2152
|
+
}
|
|
2153
|
+
/** @override */
|
|
2154
|
+
UIBrowserPanel.prototype.className = function () {
|
|
2155
|
+
return 'UIBrowserPanel';
|
|
2156
|
+
};
|
|
2157
|
+
Object.defineProperty(UIBrowserPanel.prototype, "countInRow", {
|
|
2158
|
+
/**
|
|
2159
|
+
* Count elements in one row for calculate navigation
|
|
2160
|
+
*/
|
|
2161
|
+
get: function () {
|
|
2162
|
+
if (this.state.view === 'list') {
|
|
2163
|
+
return 1;
|
|
2164
|
+
}
|
|
2165
|
+
if (!this.items.elements.length) {
|
|
2166
|
+
return 1;
|
|
2167
|
+
}
|
|
2168
|
+
var container = this.items.elements[0].container, margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginLeft');
|
|
2169
|
+
return Math.floor(this.items.container.offsetWidth /
|
|
2170
|
+
(container.offsetWidth + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
|
|
2171
|
+
},
|
|
2172
|
+
enumerable: false,
|
|
2173
|
+
configurable: true
|
|
2174
|
+
});
|
|
2175
|
+
Object.defineProperty(UIBrowserPanel.prototype, "countInColumn", {
|
|
2176
|
+
/**
|
|
2177
|
+
* Count elements in one column for calculate navigation
|
|
2178
|
+
*/
|
|
2179
|
+
get: function () {
|
|
2180
|
+
if (!this.items.elements.length) {
|
|
2181
|
+
return 1;
|
|
2182
|
+
}
|
|
2183
|
+
var container = this.items.elements[0].container, margin = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.css)(container, 'marginTop');
|
|
2184
|
+
return Math.floor(this.items.container.offsetHeight /
|
|
2185
|
+
(container.offsetHeight + ((0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.isNumber)(margin) ? margin : 0)));
|
|
2186
|
+
},
|
|
2187
|
+
enumerable: false,
|
|
2188
|
+
configurable: true
|
|
2189
|
+
});
|
|
2190
|
+
/** @override */
|
|
2191
|
+
UIBrowserPanel.prototype.render = function () {
|
|
2192
|
+
return "<div>\n\t\t\t<div class='&__content'></div>\n\t\t\t<div class='&__footer'></div>\n\t\t</div>";
|
|
2193
|
+
};
|
|
2194
|
+
UIBrowserPanel.prototype.onChangeTheme = function () {
|
|
2195
|
+
this.setMod('theme', this.stateManager.state.theme);
|
|
2196
|
+
};
|
|
2197
|
+
UIBrowserPanel.prototype.onChangeElements = function () {
|
|
2198
|
+
this.items.build(this.stateManager.state.elements);
|
|
2199
|
+
};
|
|
2200
|
+
UIBrowserPanel.prototype.onChangeActiveElements = function () {
|
|
2201
|
+
var _this = this;
|
|
2202
|
+
if (!this.state.activeElements.length) {
|
|
2203
|
+
this.state.info = '';
|
|
2204
|
+
this.state.metaInfo = null;
|
|
2205
|
+
}
|
|
2206
|
+
this.items.elements.forEach(function (elm) {
|
|
2207
|
+
elm.setMod('active', Boolean(_this.stateManager.isActive(elm.item)));
|
|
2208
|
+
});
|
|
2209
|
+
this.j.e.fire('changeSelection');
|
|
2210
|
+
};
|
|
2211
|
+
UIBrowserPanel.prototype.onChangeFavorites = function () {
|
|
2212
|
+
var _this = this;
|
|
2213
|
+
this.items.elements.forEach(function (elm) {
|
|
2214
|
+
elm.setMod('favorite', Boolean(_this.stateManager.isFavorite(elm.item)));
|
|
2215
|
+
});
|
|
2216
|
+
};
|
|
2217
|
+
UIBrowserPanel.prototype.onChangeSources = function () {
|
|
2218
|
+
this.sources.build(this.stateManager.state.tree);
|
|
2219
|
+
};
|
|
2220
|
+
UIBrowserPanel.prototype.onChangeLastSelectedIndex = function () {
|
|
2221
|
+
var _a;
|
|
2222
|
+
var container = (_a = this.items.elements[this.stateManager.state.lastSelectedIndex]) === null || _a === void 0 ? void 0 : _a.container;
|
|
2223
|
+
if (container) {
|
|
2224
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.scrollIntoViewIfNeeded)(container, this.items.container, this.j.od);
|
|
2225
|
+
container.focus();
|
|
2226
|
+
}
|
|
2227
|
+
};
|
|
2228
|
+
UIBrowserPanel.prototype.onChangeInfo = function () {
|
|
2229
|
+
this.statusbar.value(this.state.info, 'center');
|
|
2230
|
+
};
|
|
2231
|
+
UIBrowserPanel.prototype.onChangePathOrSource = function () {
|
|
2232
|
+
this.statusbar.value(this.state.currentPath
|
|
2233
|
+
? "".concat(this.state.currentPath, " (").concat(this.state.currentSource, ")")
|
|
2234
|
+
: this.i18n('Home'), 'left');
|
|
2235
|
+
};
|
|
2236
|
+
UIBrowserPanel.prototype.onChangeShowSettings = function () {
|
|
2237
|
+
this.settings.setMod('hidden', !this.stateManager.state.showSettings);
|
|
2238
|
+
};
|
|
2239
|
+
UIBrowserPanel.prototype.onChangeShowPreview = function () {
|
|
2240
|
+
this.preview.setMod('hidden', !this.stateManager.state.showPreview);
|
|
2241
|
+
};
|
|
2242
|
+
UIBrowserPanel.prototype.onChangeShowSideBar = function () {
|
|
2243
|
+
this.sidebar.setMod('hidden', !this.stateManager.state.showSideBar);
|
|
2244
|
+
};
|
|
2245
|
+
UIBrowserPanel.prototype.onChangeView = function () {
|
|
2246
|
+
this.items.setMod('view', this.stateManager.state.view);
|
|
2247
|
+
};
|
|
2248
|
+
UIBrowserPanel.prototype.onChangeTileSize = function () {
|
|
2249
|
+
this.items.setMod('size', this.stateManager.state.tileSize);
|
|
2250
|
+
};
|
|
2251
|
+
UIBrowserPanel.prototype.onChangeShowFavorites = function () {
|
|
2252
|
+
this.sidebar.setMod('show-favorites', this.stateManager.state.showFavorites);
|
|
2253
|
+
this.items.setMod('show-favorites', this.stateManager.state.showFavorites);
|
|
2254
|
+
};
|
|
2255
|
+
UIBrowserPanel.prototype.onItemDblClick = function () {
|
|
2256
|
+
this.j.e.fire('select.filebrowser');
|
|
2257
|
+
return false;
|
|
2258
|
+
};
|
|
2259
|
+
UIBrowserPanel.prototype.onItemClick = function (data, multi) {
|
|
2260
|
+
this.stateManager.addActive(data, multi);
|
|
2261
|
+
};
|
|
2262
|
+
UIBrowserPanel.prototype.onTogglePreview = function () {
|
|
2263
|
+
this.state.showPreview = !this.state.showPreview;
|
|
2264
|
+
return false;
|
|
2265
|
+
};
|
|
2266
|
+
UIBrowserPanel.prototype.onToggleFavoriteItem = function (data) {
|
|
2267
|
+
this.stateManager.toggleFavorite(data);
|
|
2268
|
+
};
|
|
2269
|
+
UIBrowserPanel.prototype.onFolderClick = function (data) {
|
|
2270
|
+
this.stateManager.state.currentSource = data.sourceName;
|
|
2271
|
+
this.stateManager.state.currentPath = data.path || '/';
|
|
2272
|
+
this.j.e.fire('afterOpenFolder.filebrowser');
|
|
2273
|
+
};
|
|
2274
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2275
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.theme')
|
|
2276
|
+
], UIBrowserPanel.prototype, "onChangeTheme", null);
|
|
2277
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2278
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.elements')
|
|
2279
|
+
], UIBrowserPanel.prototype, "onChangeElements", null);
|
|
2280
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2281
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.activeElements')
|
|
2282
|
+
], UIBrowserPanel.prototype, "onChangeActiveElements", null);
|
|
2283
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2284
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.favorites', 'state.elements'])
|
|
2285
|
+
], UIBrowserPanel.prototype, "onChangeFavorites", null);
|
|
2286
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2287
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.sources')
|
|
2288
|
+
], UIBrowserPanel.prototype, "onChangeSources", null);
|
|
2289
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2290
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.lastSelectedIndex')
|
|
2291
|
+
], UIBrowserPanel.prototype, "onChangeLastSelectedIndex", null);
|
|
2292
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2293
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.info')
|
|
2294
|
+
], UIBrowserPanel.prototype, "onChangeInfo", null);
|
|
2295
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2296
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(['state.currentPath', 'state.currentSource'])
|
|
2297
|
+
], UIBrowserPanel.prototype, "onChangePathOrSource", null);
|
|
2298
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2299
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSettings')
|
|
2300
|
+
], UIBrowserPanel.prototype, "onChangeShowSettings", null);
|
|
2301
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2302
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showPreview')
|
|
2303
|
+
], UIBrowserPanel.prototype, "onChangeShowPreview", null);
|
|
2304
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2305
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showSideBar')
|
|
2306
|
+
], UIBrowserPanel.prototype, "onChangeShowSideBar", null);
|
|
2307
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2308
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.view')
|
|
2309
|
+
], UIBrowserPanel.prototype, "onChangeView", null);
|
|
2310
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2311
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.tileSize')
|
|
2312
|
+
], UIBrowserPanel.prototype, "onChangeTileSize", null);
|
|
2313
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2314
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)('state.showFavorites')
|
|
2315
|
+
], UIBrowserPanel.prototype, "onChangeShowFavorites", null);
|
|
2316
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2317
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':dblclickItem.filebrowser')
|
|
2318
|
+
], UIBrowserPanel.prototype, "onItemDblClick", null);
|
|
2319
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2320
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':clickItem.filebrowser')
|
|
2321
|
+
], UIBrowserPanel.prototype, "onItemClick", null);
|
|
2322
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2323
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':togglePreview.filebrowser')
|
|
2324
|
+
], UIBrowserPanel.prototype, "onTogglePreview", null);
|
|
2325
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2326
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':toggleFavoriteItem')
|
|
2327
|
+
], UIBrowserPanel.prototype, "onToggleFavoriteItem", null);
|
|
2328
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2329
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.watch)(':openFolder')
|
|
2330
|
+
], UIBrowserPanel.prototype, "onFolderClick", null);
|
|
2331
|
+
UIBrowserPanel = (0,tslib__WEBPACK_IMPORTED_MODULE_9__/* .__decorate */ .gn)([
|
|
2332
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_2__.component
|
|
2333
|
+
], UIBrowserPanel);
|
|
2334
|
+
return UIBrowserPanel;
|
|
2335
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
2336
|
+
|
|
2337
|
+
|
|
2338
|
+
/***/ }),
|
|
2339
|
+
|
|
2340
|
+
/***/ 96945:
|
|
2341
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2342
|
+
|
|
2343
|
+
"use strict";
|
|
2344
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2345
|
+
/* harmony export */ "o": function() { return /* binding */ UIPreview; }
|
|
2346
|
+
/* harmony export */ });
|
|
2347
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
|
|
2348
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2349
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2350
|
+
/* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
|
|
2351
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
|
|
2352
|
+
/* harmony import */ var jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(8138);
|
|
2353
|
+
/* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(87695);
|
|
2354
|
+
|
|
2355
|
+
/*!
|
|
2356
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2357
|
+
* See LICENSE.md in the project root for license information.
|
|
2358
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2359
|
+
*/
|
|
2360
|
+
|
|
2361
|
+
|
|
2362
|
+
|
|
2363
|
+
|
|
2364
|
+
|
|
2365
|
+
|
|
2366
|
+
|
|
2367
|
+
|
|
2368
|
+
var UIPreview = /** @class */ (function (_super) {
|
|
2369
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__extends */ .ZT)(UIPreview, _super);
|
|
2370
|
+
function UIPreview(jodit, state) {
|
|
2371
|
+
var _this = _super.call(this, jodit) || this;
|
|
2372
|
+
_this.state = state;
|
|
2373
|
+
_this.lastLoadPromise = null;
|
|
2374
|
+
_this.onChangeMetaInfo();
|
|
2375
|
+
return _this;
|
|
2376
|
+
}
|
|
2377
|
+
/** @override */
|
|
2378
|
+
UIPreview.prototype.className = function () {
|
|
2379
|
+
return 'UIPreview';
|
|
2380
|
+
};
|
|
2381
|
+
/**
|
|
2382
|
+
* Add handle resizer
|
|
2383
|
+
*/
|
|
2384
|
+
UIPreview.prototype.addResize = function () {
|
|
2385
|
+
_traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
|
|
2386
|
+
_traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'left' : 'top');
|
|
2387
|
+
};
|
|
2388
|
+
/** @override */
|
|
2389
|
+
UIPreview.prototype.render = function () {
|
|
2390
|
+
return "<div>\n\t\t\t\t<div class=\"&__image\"></div>\n\t\t\t\t<div class=\"&__info\"></div>\n\t\t\t\t<div class=\"&__loader\"></div>\n\t\t\t\t<div class=\"&__empty-message\">~Select image~</div>\n\t\t\t</div>";
|
|
2391
|
+
};
|
|
2392
|
+
UIPreview.prototype.afterSetMod = function (name, value) {
|
|
2393
|
+
if (name === 'hidden' && value === false) {
|
|
2394
|
+
this.onChangeMetaInfo();
|
|
2395
|
+
}
|
|
2396
|
+
_super.prototype.afterSetMod.call(this, name, value);
|
|
2397
|
+
};
|
|
2398
|
+
UIPreview.prototype.onChangeMetaInfo = function () {
|
|
2399
|
+
var _this = this;
|
|
2400
|
+
var _a, _b;
|
|
2401
|
+
if (this.getMod('hidden')) {
|
|
2402
|
+
return;
|
|
2403
|
+
}
|
|
2404
|
+
var metaInfo = this.state.metaInfo;
|
|
2405
|
+
this.setMod('empty', !metaInfo);
|
|
2406
|
+
var info = this.getElm('info');
|
|
2407
|
+
void 0;
|
|
2408
|
+
jodit_core_dom__WEBPACK_IMPORTED_MODULE_4__/* .Dom.detach */ .i.detach(info);
|
|
2409
|
+
var image = this.getElm('image');
|
|
2410
|
+
void 0;
|
|
2411
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(image, {
|
|
2412
|
+
backgroundImage: null
|
|
2413
|
+
});
|
|
2414
|
+
if (!metaInfo) {
|
|
2415
|
+
return;
|
|
2416
|
+
}
|
|
2417
|
+
this.setMod('is-file', metaInfo.isImage === false).setMod('type', (_a = metaInfo.type) !== null && _a !== void 0 ? _a : 'file');
|
|
2418
|
+
_item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'name', metaInfo.file);
|
|
2419
|
+
_item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'time', metaInfo.time);
|
|
2420
|
+
_item_item__WEBPACK_IMPORTED_MODULE_5__/* .UIBrowserItem.prototype.setElementValue.call */ .u.prototype.setElementValue.call(this, 'filesize', metaInfo.size);
|
|
2421
|
+
this.setMod('loading', true);
|
|
2422
|
+
(_b = this.lastLoadPromise) === null || _b === void 0 ? void 0 : _b.rejectCallback();
|
|
2423
|
+
this.lastLoadPromise = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.loadImage)(metaInfo.isImage ? metaInfo.fileURL : metaInfo.imageURL, this.j);
|
|
2424
|
+
this.lastLoadPromise
|
|
2425
|
+
.then(function (image) {
|
|
2426
|
+
var elm = _this.getElm('image');
|
|
2427
|
+
void 0;
|
|
2428
|
+
image &&
|
|
2429
|
+
(0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__.css)(elm, {
|
|
2430
|
+
backgroundImage: "url(".concat(image.src, ")")
|
|
2431
|
+
});
|
|
2432
|
+
})
|
|
2433
|
+
.finally(function () {
|
|
2434
|
+
_this.setMod('loading', false);
|
|
2435
|
+
})
|
|
2436
|
+
.catch(function () { });
|
|
2437
|
+
};
|
|
2438
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
2439
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
|
|
2440
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
|
|
2441
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
2442
|
+
], UIPreview.prototype, "addResize", null);
|
|
2443
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
2444
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.metaInfo')
|
|
2445
|
+
], UIPreview.prototype, "onChangeMetaInfo", null);
|
|
2446
|
+
UIPreview = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
2447
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2448
|
+
], UIPreview);
|
|
2449
|
+
return UIPreview;
|
|
2450
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
2451
|
+
|
|
2452
|
+
|
|
2453
|
+
/***/ }),
|
|
2454
|
+
|
|
2455
|
+
/***/ 22840:
|
|
2456
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2457
|
+
|
|
2458
|
+
"use strict";
|
|
2459
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2460
|
+
/* harmony export */ "u": function() { return /* binding */ UIProgress; }
|
|
2461
|
+
/* harmony export */ });
|
|
2462
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(97582);
|
|
2463
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2464
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2465
|
+
|
|
2466
|
+
/*!
|
|
2467
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2468
|
+
* See LICENSE.md in the project root for license information.
|
|
2469
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2470
|
+
*/
|
|
2471
|
+
|
|
2472
|
+
|
|
2473
|
+
|
|
2474
|
+
var UIProgress = /** @class */ (function (_super) {
|
|
2475
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__extends */ .ZT)(UIProgress, _super);
|
|
2476
|
+
function UIProgress(jodit, state) {
|
|
2477
|
+
var _this = _super.call(this, jodit) || this;
|
|
2478
|
+
_this.state = state;
|
|
2479
|
+
_this.onProgress();
|
|
2480
|
+
return _this;
|
|
2481
|
+
}
|
|
2482
|
+
/** @override */
|
|
2483
|
+
UIProgress.prototype.className = function () {
|
|
2484
|
+
return 'UIProgress';
|
|
2485
|
+
};
|
|
2486
|
+
UIProgress.prototype.onProgress = function () {
|
|
2487
|
+
if (this.state.progress) {
|
|
2488
|
+
this.show();
|
|
2489
|
+
}
|
|
2490
|
+
else {
|
|
2491
|
+
this.hide();
|
|
2492
|
+
}
|
|
2493
|
+
this.progress(this.state.progress);
|
|
2494
|
+
};
|
|
2495
|
+
UIProgress.prototype.hide = function () {
|
|
2496
|
+
this.setMod('hidden', true);
|
|
2497
|
+
return this;
|
|
2498
|
+
};
|
|
2499
|
+
UIProgress.prototype.progress = function (percentage) {
|
|
2500
|
+
var _this = this;
|
|
2501
|
+
this.container.style.width = percentage.toFixed(2) + '%';
|
|
2502
|
+
if (percentage >= 98) {
|
|
2503
|
+
this.j.async.setTimeout(function () {
|
|
2504
|
+
_this.hide();
|
|
2505
|
+
}, {
|
|
2506
|
+
label: 'progress',
|
|
2507
|
+
timeout: 300
|
|
2508
|
+
});
|
|
2509
|
+
}
|
|
2510
|
+
return this;
|
|
2511
|
+
};
|
|
2512
|
+
UIProgress.prototype.show = function () {
|
|
2513
|
+
this.setMod('hidden', false);
|
|
2514
|
+
return this;
|
|
2515
|
+
};
|
|
2516
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
2517
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.progress')
|
|
2518
|
+
], UIProgress.prototype, "onProgress", null);
|
|
2519
|
+
UIProgress = (0,tslib__WEBPACK_IMPORTED_MODULE_2__/* .__decorate */ .gn)([
|
|
2520
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2521
|
+
], UIProgress);
|
|
2522
|
+
return UIProgress;
|
|
2523
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .ProgressBar */ .ko));
|
|
2524
|
+
|
|
2525
|
+
|
|
2526
|
+
/***/ }),
|
|
2527
|
+
|
|
2528
|
+
/***/ 62983:
|
|
2529
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2530
|
+
|
|
2531
|
+
"use strict";
|
|
2532
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2533
|
+
/* harmony export */ "r": function() { return /* binding */ UIBrowserSettings; }
|
|
2534
|
+
/* harmony export */ });
|
|
2535
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
2536
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2537
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2538
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
|
|
2539
|
+
/*!
|
|
2540
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2541
|
+
* See LICENSE.md in the project root for license information.
|
|
2542
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2543
|
+
*/
|
|
2544
|
+
|
|
2545
|
+
|
|
2546
|
+
|
|
2547
|
+
|
|
2548
|
+
|
|
2549
|
+
var UIBrowserSettings = /** @class */ (function (_super) {
|
|
2550
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UIBrowserSettings, _super);
|
|
2551
|
+
function UIBrowserSettings(jodit, state) {
|
|
2552
|
+
var _this = _super.call(this, jodit) || this;
|
|
2553
|
+
_this.state = state;
|
|
2554
|
+
var close = _this.getElm('close');
|
|
2555
|
+
void 0;
|
|
2556
|
+
jodit.e.on(close, 'click', function () {
|
|
2557
|
+
_this.state.showSettings = false;
|
|
2558
|
+
});
|
|
2559
|
+
return _this;
|
|
2560
|
+
}
|
|
2561
|
+
/** @override */
|
|
2562
|
+
UIBrowserSettings.prototype.className = function () {
|
|
2563
|
+
return 'UIBrowserSettings';
|
|
2564
|
+
};
|
|
2565
|
+
/** @override */
|
|
2566
|
+
UIBrowserSettings.prototype.render = function () {
|
|
2567
|
+
return "<div>\n\t\t\t<div class=\"".concat(this.getFullElName('close'), "\">").concat(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .Icon.get */ .JO.get('cancel'), "</div>\n\t\t\t<div class=\"").concat(this.getFullElName('title'), "\">").concat(this.j.i18n('Settings'), "</div>\n\t\t\t<div class=\"").concat(this.getFullElName('options'), "\"></div>\n\t\t</div>");
|
|
2568
|
+
};
|
|
2569
|
+
/** @override */
|
|
2570
|
+
UIBrowserSettings.prototype.appendChildToContainer = function (childContainer) {
|
|
2571
|
+
var options = this.getElm('options');
|
|
2572
|
+
void 0;
|
|
2573
|
+
options.appendChild(childContainer);
|
|
2574
|
+
};
|
|
2575
|
+
UIBrowserSettings.prototype.afterSetMod = function (name, value) {
|
|
2576
|
+
if (name === 'hidden' && value === false) {
|
|
2577
|
+
this.generateSettings();
|
|
2578
|
+
}
|
|
2579
|
+
_super.prototype.afterSetMod.call(this, name, value);
|
|
2580
|
+
};
|
|
2581
|
+
UIBrowserSettings.prototype.onChangeView = function () {
|
|
2582
|
+
var tileSize = this.getElm('tile-size');
|
|
2583
|
+
if (tileSize) {
|
|
2584
|
+
tileSize.style.display =
|
|
2585
|
+
this.state.view === 'tiles' ? 'block' : 'none';
|
|
2586
|
+
}
|
|
2587
|
+
};
|
|
2588
|
+
/**
|
|
2589
|
+
* Generate options list
|
|
2590
|
+
*/
|
|
2591
|
+
UIBrowserSettings.prototype.generateSettings = function () {
|
|
2592
|
+
var _this = this;
|
|
2593
|
+
this.clear();
|
|
2594
|
+
var j = this.j;
|
|
2595
|
+
this.append([
|
|
2596
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
|
|
2597
|
+
label: 'Theme',
|
|
2598
|
+
name: 'theme',
|
|
2599
|
+
value: this.state.theme,
|
|
2600
|
+
radio: true,
|
|
2601
|
+
options: [
|
|
2602
|
+
{ value: 'default', text: 'Light' },
|
|
2603
|
+
{ value: 'dark', text: 'Dark' }
|
|
2604
|
+
],
|
|
2605
|
+
onChange: function (values) {
|
|
2606
|
+
if (_this.state.theme !== 'default' &&
|
|
2607
|
+
_this.state.theme !== 'dark') {
|
|
2608
|
+
_this.state.theme = 'default';
|
|
2609
|
+
return;
|
|
2610
|
+
}
|
|
2611
|
+
_this.state.theme = values[0].value;
|
|
2612
|
+
}
|
|
2613
|
+
}),
|
|
2614
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
|
|
2615
|
+
label: 'Show favorites',
|
|
2616
|
+
name: 'showFavorites',
|
|
2617
|
+
value: this.state.showFavorites,
|
|
2618
|
+
radio: true,
|
|
2619
|
+
options: [
|
|
2620
|
+
{ value: true, text: 'Show' },
|
|
2621
|
+
{ value: false, text: 'Hide' }
|
|
2622
|
+
],
|
|
2623
|
+
onChange: function (values) {
|
|
2624
|
+
_this.state.showFavorites = values[0].value;
|
|
2625
|
+
}
|
|
2626
|
+
}),
|
|
2627
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
|
|
2628
|
+
label: 'View',
|
|
2629
|
+
name: 'view',
|
|
2630
|
+
value: this.state.view,
|
|
2631
|
+
radio: true,
|
|
2632
|
+
options: [
|
|
2633
|
+
{ value: 'tiles', text: 'Tiles' },
|
|
2634
|
+
{ value: 'list', text: 'List' },
|
|
2635
|
+
{ value: 'compact', text: 'Compact' }
|
|
2636
|
+
],
|
|
2637
|
+
onChange: function (values) {
|
|
2638
|
+
_this.state.view = values[0].value;
|
|
2639
|
+
}
|
|
2640
|
+
}),
|
|
2641
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIButtonGroup */ .BO(j, {
|
|
2642
|
+
label: 'Folders position',
|
|
2643
|
+
name: 'foldersPosition',
|
|
2644
|
+
value: this.state.foldersPosition,
|
|
2645
|
+
radio: true,
|
|
2646
|
+
options: [
|
|
2647
|
+
{ value: 'top', text: 'Top' },
|
|
2648
|
+
{ value: 'bottom', text: 'Bottom' },
|
|
2649
|
+
{ value: 'default', text: 'Default' }
|
|
2650
|
+
],
|
|
2651
|
+
onChange: function (values) {
|
|
2652
|
+
_this.state.foldersPosition = values[0].value;
|
|
2653
|
+
}
|
|
2654
|
+
}),
|
|
2655
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
|
|
2656
|
+
label: 'Sort by',
|
|
2657
|
+
name: 'sort-by',
|
|
2658
|
+
value: this.state.sortBy,
|
|
2659
|
+
options: [
|
|
2660
|
+
{
|
|
2661
|
+
value: 'changed-asc',
|
|
2662
|
+
text: j.i18n('Sort by changed') + '(⬆)'
|
|
2663
|
+
},
|
|
2664
|
+
{
|
|
2665
|
+
value: 'changed-desc',
|
|
2666
|
+
text: j.i18n('Sort by changed') + '(⬇)'
|
|
2667
|
+
},
|
|
2668
|
+
{
|
|
2669
|
+
value: 'name-asc',
|
|
2670
|
+
text: j.i18n('Sort by name') + '(⬆)'
|
|
2671
|
+
},
|
|
2672
|
+
{
|
|
2673
|
+
value: 'name-desc',
|
|
2674
|
+
text: j.i18n('Sort by name') + '(⬇)'
|
|
2675
|
+
},
|
|
2676
|
+
{
|
|
2677
|
+
value: 'size-asc',
|
|
2678
|
+
text: j.i18n('Sort by size') + '(⬆)'
|
|
2679
|
+
},
|
|
2680
|
+
{
|
|
2681
|
+
value: 'size-desc',
|
|
2682
|
+
text: j.i18n('Sort by size') + '(⬇)'
|
|
2683
|
+
}
|
|
2684
|
+
],
|
|
2685
|
+
onChange: function (value) {
|
|
2686
|
+
_this.state.sortBy = value;
|
|
2687
|
+
}
|
|
2688
|
+
}),
|
|
2689
|
+
new jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UISelect */ .Cj(j, {
|
|
2690
|
+
label: 'Tile size',
|
|
2691
|
+
name: 'tile-size',
|
|
2692
|
+
value: this.state.tileSize,
|
|
2693
|
+
options: [
|
|
2694
|
+
{
|
|
2695
|
+
value: 'xsmall',
|
|
2696
|
+
text: 'Extra small'
|
|
2697
|
+
},
|
|
2698
|
+
{
|
|
2699
|
+
value: 'small',
|
|
2700
|
+
text: 'Small'
|
|
2701
|
+
},
|
|
2702
|
+
{
|
|
2703
|
+
value: 'default',
|
|
2704
|
+
text: 'Default'
|
|
2705
|
+
},
|
|
2706
|
+
{
|
|
2707
|
+
value: 'large',
|
|
2708
|
+
text: 'Large'
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
value: 'xlarge',
|
|
2712
|
+
text: 'Extra large'
|
|
2713
|
+
}
|
|
2714
|
+
],
|
|
2715
|
+
onChange: function (value) {
|
|
2716
|
+
_this.state.tileSize =
|
|
2717
|
+
value;
|
|
2718
|
+
}
|
|
2719
|
+
})
|
|
2720
|
+
]);
|
|
2721
|
+
this.onChangeView();
|
|
2722
|
+
};
|
|
2723
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
2724
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.view')
|
|
2725
|
+
], UIBrowserSettings.prototype, "onChangeView", null);
|
|
2726
|
+
UIBrowserSettings = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
2727
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2728
|
+
], UIBrowserSettings);
|
|
2729
|
+
return UIBrowserSettings;
|
|
2730
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
2731
|
+
|
|
2732
|
+
|
|
2733
|
+
/***/ }),
|
|
2734
|
+
|
|
2735
|
+
/***/ 68787:
|
|
2736
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2737
|
+
|
|
2738
|
+
"use strict";
|
|
2739
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2740
|
+
/* harmony export */ "o": function() { return /* binding */ UISidebar; }
|
|
2741
|
+
/* harmony export */ });
|
|
2742
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
|
|
2743
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2744
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2745
|
+
/* harmony import */ var _traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(62499);
|
|
2746
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
|
|
2747
|
+
|
|
2748
|
+
/*!
|
|
2749
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2750
|
+
* See LICENSE.md in the project root for license information.
|
|
2751
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2752
|
+
*/
|
|
2753
|
+
|
|
2754
|
+
|
|
2755
|
+
|
|
2756
|
+
|
|
2757
|
+
|
|
2758
|
+
var UISidebar = /** @class */ (function (_super) {
|
|
2759
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__extends */ .ZT)(UISidebar, _super);
|
|
2760
|
+
function UISidebar(jodit, elements, state) {
|
|
2761
|
+
var _this = _super.call(this, jodit, elements) || this;
|
|
2762
|
+
_this.state = state;
|
|
2763
|
+
_this.onChangeFavorites();
|
|
2764
|
+
return _this;
|
|
2765
|
+
}
|
|
2766
|
+
/** @override */
|
|
2767
|
+
UISidebar.prototype.className = function () {
|
|
2768
|
+
return 'UISidebar';
|
|
2769
|
+
};
|
|
2770
|
+
/** @override */
|
|
2771
|
+
UISidebar.prototype.render = function () {
|
|
2772
|
+
return "<div>\n\t\t\t<div class='&__hide-btn'>*angle-left*</div>\n\t\t\t<div class='&__favorites'>*heart* ~Favorites~</div>\n\t\t\t<div class='&__box'></div>\n\t\t</div>";
|
|
2773
|
+
};
|
|
2774
|
+
/** @override */
|
|
2775
|
+
UISidebar.prototype.appendChildToContainer = function (childContainer) {
|
|
2776
|
+
var box = this.getElm('box');
|
|
2777
|
+
void 0;
|
|
2778
|
+
box.appendChild(childContainer);
|
|
2779
|
+
};
|
|
2780
|
+
/**
|
|
2781
|
+
* Add handle resizer
|
|
2782
|
+
*/
|
|
2783
|
+
UISidebar.prototype.addResize = function () {
|
|
2784
|
+
_traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.remove */ .c.remove(this);
|
|
2785
|
+
_traits_resize_resize__WEBPACK_IMPORTED_MODULE_2__/* .UIResize.install */ .c.install(this, screen.width > 450 ? 'right' : 'bottom');
|
|
2786
|
+
};
|
|
2787
|
+
UISidebar.prototype.onChangeFavorites = function () {
|
|
2788
|
+
this.setMod('has-favorites', Boolean(this.state.favorites.length));
|
|
2789
|
+
};
|
|
2790
|
+
UISidebar.prototype.onClickHideButton = function () {
|
|
2791
|
+
this.state.showSideBar = !this.state.showSideBar;
|
|
2792
|
+
return false;
|
|
2793
|
+
};
|
|
2794
|
+
UISidebar.prototype.onClickFavorites = function () {
|
|
2795
|
+
this.state.elements = this.state.favorites;
|
|
2796
|
+
return false;
|
|
2797
|
+
};
|
|
2798
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2799
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.hook)('ready'),
|
|
2800
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize', { context: window }),
|
|
2801
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.debounce)()
|
|
2802
|
+
], UISidebar.prototype, "addResize", null);
|
|
2803
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2804
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('state.favorites')
|
|
2805
|
+
], UISidebar.prototype, "onChangeFavorites", null);
|
|
2806
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2807
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('hide-btn:click')
|
|
2808
|
+
], UISidebar.prototype, "onClickHideButton", null);
|
|
2809
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2810
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('favorites:click')
|
|
2811
|
+
], UISidebar.prototype, "onClickFavorites", null);
|
|
2812
|
+
UISidebar = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2813
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2814
|
+
], UISidebar);
|
|
2815
|
+
return UISidebar;
|
|
2816
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
2817
|
+
|
|
2818
|
+
|
|
2819
|
+
/***/ }),
|
|
2820
|
+
|
|
2821
|
+
/***/ 21596:
|
|
2822
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2823
|
+
|
|
2824
|
+
"use strict";
|
|
2825
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2826
|
+
/* harmony export */ "f": function() { return /* binding */ UIBrowserSource; }
|
|
2827
|
+
/* harmony export */ });
|
|
2828
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(97582);
|
|
2829
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2830
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2831
|
+
/* harmony import */ var _tree_tree__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(91919);
|
|
2832
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(95582);
|
|
2833
|
+
/*!
|
|
2834
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2835
|
+
* See LICENSE.md in the project root for license information.
|
|
2836
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2837
|
+
*/
|
|
2838
|
+
|
|
2839
|
+
|
|
2840
|
+
|
|
2841
|
+
|
|
2842
|
+
|
|
2843
|
+
|
|
2844
|
+
var UIBrowserSource = /** @class */ (function (_super) {
|
|
2845
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__extends */ .ZT)(UIBrowserSource, _super);
|
|
2846
|
+
function UIBrowserSource(jodit, data) {
|
|
2847
|
+
var _this = _super.call(this, jodit, data) || this;
|
|
2848
|
+
_this.data = data;
|
|
2849
|
+
_this.tree = new _tree_tree__WEBPACK_IMPORTED_MODULE_2__/* .UITree */ .v(_this.j, _this.data.children);
|
|
2850
|
+
/** @override */
|
|
2851
|
+
_this.syncMod = true;
|
|
2852
|
+
var name = _this.getElm('name');
|
|
2853
|
+
void 0;
|
|
2854
|
+
name.innerText = data.title || data.name;
|
|
2855
|
+
var tree = _this.getElm('tree');
|
|
2856
|
+
void 0;
|
|
2857
|
+
tree.appendChild(_this.tree.container);
|
|
2858
|
+
jodit.e.on(_this.container, 'contextmenu', function (e) {
|
|
2859
|
+
return jodit.e.fire('contextmenuSource.filebrowser', data, e);
|
|
2860
|
+
});
|
|
2861
|
+
return _this;
|
|
2862
|
+
}
|
|
2863
|
+
/** @override */
|
|
2864
|
+
UIBrowserSource.prototype.className = function () {
|
|
2865
|
+
return 'UIBrowserSource';
|
|
2866
|
+
};
|
|
2867
|
+
/** @override */
|
|
2868
|
+
UIBrowserSource.prototype.render = function () {
|
|
2869
|
+
return "<div>\n\t\t\t<div class=\"&__name\"></div>\n\t\t\t<div class=\"&__tree\"></div>\n\t\t</div>";
|
|
2870
|
+
};
|
|
2871
|
+
UIBrowserSource = (0,tslib__WEBPACK_IMPORTED_MODULE_4__/* .__decorate */ .gn)([
|
|
2872
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2873
|
+
], UIBrowserSource);
|
|
2874
|
+
return UIBrowserSource;
|
|
2875
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1));
|
|
2876
|
+
|
|
2877
|
+
|
|
2878
|
+
/***/ }),
|
|
2879
|
+
|
|
2880
|
+
/***/ 93582:
|
|
2881
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2882
|
+
|
|
2883
|
+
"use strict";
|
|
2884
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2885
|
+
/* harmony export */ "L": function() { return /* binding */ UIBrowserSources; }
|
|
2886
|
+
/* harmony export */ });
|
|
2887
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
2888
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2889
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2890
|
+
/* harmony import */ var _source_source__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(21596);
|
|
2891
|
+
/*!
|
|
2892
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2893
|
+
* See LICENSE.md in the project root for license information.
|
|
2894
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2895
|
+
*/
|
|
2896
|
+
|
|
2897
|
+
|
|
2898
|
+
|
|
2899
|
+
|
|
2900
|
+
|
|
2901
|
+
var UIBrowserSources = /** @class */ (function (_super) {
|
|
2902
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UIBrowserSources, _super);
|
|
2903
|
+
function UIBrowserSources() {
|
|
2904
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
2905
|
+
/** @override */
|
|
2906
|
+
_this.syncMod = true;
|
|
2907
|
+
return _this;
|
|
2908
|
+
}
|
|
2909
|
+
/** @override */
|
|
2910
|
+
UIBrowserSources.prototype.className = function () {
|
|
2911
|
+
return 'UIBrowserSources';
|
|
2912
|
+
};
|
|
2913
|
+
UIBrowserSources.prototype.build = function (items) {
|
|
2914
|
+
var _this = this;
|
|
2915
|
+
this.clear();
|
|
2916
|
+
items.forEach(function (item) {
|
|
2917
|
+
_this.append(new _source_source__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserSource */ .f(_this.jodit, item));
|
|
2918
|
+
});
|
|
2919
|
+
};
|
|
2920
|
+
UIBrowserSources = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
2921
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2922
|
+
], UIBrowserSources);
|
|
2923
|
+
return UIBrowserSources;
|
|
2924
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
2925
|
+
|
|
2926
|
+
|
|
2927
|
+
/***/ }),
|
|
2928
|
+
|
|
2929
|
+
/***/ 67775:
|
|
2930
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2931
|
+
|
|
2932
|
+
"use strict";
|
|
2933
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2934
|
+
/* harmony export */ "s": function() { return /* binding */ UIBrowserStatusBar; }
|
|
2935
|
+
/* harmony export */ });
|
|
2936
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
2937
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2938
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2939
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(95582);
|
|
2940
|
+
/*!
|
|
2941
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2942
|
+
* See LICENSE.md in the project root for license information.
|
|
2943
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2944
|
+
*/
|
|
2945
|
+
|
|
2946
|
+
|
|
2947
|
+
|
|
2948
|
+
|
|
2949
|
+
|
|
2950
|
+
var UIBrowserStatusBar = /** @class */ (function (_super) {
|
|
2951
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UIBrowserStatusBar, _super);
|
|
2952
|
+
function UIBrowserStatusBar() {
|
|
2953
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
2954
|
+
}
|
|
2955
|
+
/** @override */
|
|
2956
|
+
UIBrowserStatusBar.prototype.className = function () {
|
|
2957
|
+
return 'UIBrowserStatusBar';
|
|
2958
|
+
};
|
|
2959
|
+
/** @override */
|
|
2960
|
+
UIBrowserStatusBar.prototype.render = function () {
|
|
2961
|
+
return "<div>\n\t\t\t<div class='&__slot-left'></div>\n\t\t\t<div class='&__slot-center'></div>\n\t\t\t<div class='&__slot-right'></div>\n\t\t</div>";
|
|
2962
|
+
};
|
|
2963
|
+
UIBrowserStatusBar.prototype.value = function (text, slot) {
|
|
2964
|
+
if (slot === void 0) { slot = 'left'; }
|
|
2965
|
+
var slotElm = this.getElm("slot-".concat(slot));
|
|
2966
|
+
void 0;
|
|
2967
|
+
slotElm.innerText = text;
|
|
2968
|
+
return this;
|
|
2969
|
+
};
|
|
2970
|
+
UIBrowserStatusBar = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
2971
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
2972
|
+
], UIBrowserStatusBar);
|
|
2973
|
+
return UIBrowserStatusBar;
|
|
2974
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIElement */ .u1));
|
|
2975
|
+
|
|
2976
|
+
|
|
2977
|
+
/***/ }),
|
|
2978
|
+
|
|
2979
|
+
/***/ 91919:
|
|
2980
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2981
|
+
|
|
2982
|
+
"use strict";
|
|
2983
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2984
|
+
/* harmony export */ "v": function() { return /* binding */ UITree; }
|
|
2985
|
+
/* harmony export */ });
|
|
2986
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(97582);
|
|
2987
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
2988
|
+
/* harmony import */ var jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
2989
|
+
/* harmony import */ var _folder_folder__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(9890);
|
|
2990
|
+
/*!
|
|
2991
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2992
|
+
* See LICENSE.md in the project root for license information.
|
|
2993
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2994
|
+
*/
|
|
2995
|
+
|
|
2996
|
+
|
|
2997
|
+
|
|
2998
|
+
|
|
2999
|
+
|
|
3000
|
+
var UITree = /** @class */ (function (_super) {
|
|
3001
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__extends */ .ZT)(UITree, _super);
|
|
3002
|
+
function UITree(jodit, items) {
|
|
3003
|
+
var _this = _super.call(this, jodit) || this;
|
|
3004
|
+
/** @override */
|
|
3005
|
+
_this.syncMod = true;
|
|
3006
|
+
_this.build(items);
|
|
3007
|
+
return _this;
|
|
3008
|
+
}
|
|
3009
|
+
UITree_1 = UITree;
|
|
3010
|
+
/** @override */
|
|
3011
|
+
UITree.prototype.className = function () {
|
|
3012
|
+
return 'UITree';
|
|
3013
|
+
};
|
|
3014
|
+
UITree.prototype.build = function (items) {
|
|
3015
|
+
var _this = this;
|
|
3016
|
+
this.clear();
|
|
3017
|
+
items.forEach(function (item) {
|
|
3018
|
+
var folder = new _folder_folder__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserFolder */ .D(_this.jodit, item);
|
|
3019
|
+
_this.append(folder);
|
|
3020
|
+
if (item.isActive) {
|
|
3021
|
+
folder.setMod('active', true);
|
|
3022
|
+
}
|
|
3023
|
+
if (item.children.length) {
|
|
3024
|
+
_this.append(new UITree_1(_this.jodit, item.children));
|
|
3025
|
+
}
|
|
3026
|
+
});
|
|
3027
|
+
};
|
|
3028
|
+
var UITree_1;
|
|
3029
|
+
UITree = UITree_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_3__/* .__decorate */ .gn)([
|
|
3030
|
+
jodit_core_decorators_index__WEBPACK_IMPORTED_MODULE_1__.component
|
|
3031
|
+
], UITree);
|
|
3032
|
+
return UITree;
|
|
3033
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
3034
|
+
|
|
3035
|
+
|
|
3036
|
+
/***/ }),
|
|
3037
|
+
|
|
3038
|
+
/***/ 72618:
|
|
3039
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3040
|
+
|
|
3041
|
+
"use strict";
|
|
3042
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3043
|
+
/* harmony export */ "d": function() { return /* binding */ UIVirtualScroll; }
|
|
3044
|
+
/* harmony export */ });
|
|
3045
|
+
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(97582);
|
|
3046
|
+
/* harmony import */ var jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(75004);
|
|
3047
|
+
/* harmony import */ var jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(50526);
|
|
3048
|
+
/* harmony import */ var _item_item__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(87695);
|
|
3049
|
+
/* harmony import */ var jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(45545);
|
|
3050
|
+
/* harmony import */ var _traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(81766);
|
|
3051
|
+
/* harmony import */ var jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(95582);
|
|
3052
|
+
/*!
|
|
3053
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3054
|
+
* See LICENSE.md in the project root for license information.
|
|
3055
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
3056
|
+
*/
|
|
3057
|
+
|
|
3058
|
+
|
|
3059
|
+
|
|
3060
|
+
|
|
3061
|
+
|
|
3062
|
+
|
|
3063
|
+
|
|
3064
|
+
|
|
3065
|
+
var UIVirtualScroll = /** @class */ (function (_super) {
|
|
3066
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__extends */ .ZT)(UIVirtualScroll, _super);
|
|
3067
|
+
function UIVirtualScroll(jodit, stateManager) {
|
|
3068
|
+
var _this = _super.call(this, jodit) || this;
|
|
3069
|
+
_this.stateManager = stateManager;
|
|
3070
|
+
/** @override */
|
|
3071
|
+
_this.syncMod = true;
|
|
3072
|
+
_this.addItemsSelector();
|
|
3073
|
+
return _this;
|
|
3074
|
+
}
|
|
3075
|
+
UIVirtualScroll_1 = UIVirtualScroll;
|
|
3076
|
+
/** @override */
|
|
3077
|
+
UIVirtualScroll.prototype.className = function () {
|
|
3078
|
+
return 'UIVirtualScroll';
|
|
3079
|
+
};
|
|
3080
|
+
/** @override */
|
|
3081
|
+
UIVirtualScroll.prototype.render = function () {
|
|
3082
|
+
return "<div>\n\t\t\t\t<div class=\"&__empty-message\">~There are no files~</div>\n\t\t\t\t<div class='&__loader'></div>\n\t\t\t\t<div class='&__drag-area'>~Drop image~</div>\n\t\t\t</div>";
|
|
3083
|
+
};
|
|
3084
|
+
UIVirtualScroll.prototype.reconcile = function (items) {
|
|
3085
|
+
var clearIndex = this.elements.findIndex(function (elm, index) {
|
|
3086
|
+
return (!items[index] ||
|
|
3087
|
+
elm.item.uniqueHashKey !==
|
|
3088
|
+
jodit_modules_file_browser_builders_item__WEBPACK_IMPORTED_MODULE_3__/* .FileBrowserItem.create */ .Z.create(items[index]).uniqueHashKey);
|
|
3089
|
+
});
|
|
3090
|
+
if (clearIndex > -1) {
|
|
3091
|
+
for (var i = clearIndex; i < this.elements.length; i += 1) {
|
|
3092
|
+
this.elements[i].destruct();
|
|
3093
|
+
}
|
|
3094
|
+
this.elements.length = clearIndex;
|
|
3095
|
+
}
|
|
3096
|
+
return clearIndex;
|
|
3097
|
+
};
|
|
3098
|
+
UIVirtualScroll.prototype.build = function (items) {
|
|
3099
|
+
var _this = this;
|
|
3100
|
+
var clearIndex = this.reconcile(items);
|
|
3101
|
+
items
|
|
3102
|
+
.slice(clearIndex > -1 ? clearIndex : this.elements.length)
|
|
3103
|
+
.forEach(function (item) {
|
|
3104
|
+
var elm = new _item_item__WEBPACK_IMPORTED_MODULE_2__/* .UIBrowserItem */ .u(_this.jodit, item);
|
|
3105
|
+
Object.keys(_this.mods).forEach(function (mod) {
|
|
3106
|
+
elm.setMod(mod, _this.mods[mod]);
|
|
3107
|
+
});
|
|
3108
|
+
_this.append(elm);
|
|
3109
|
+
});
|
|
3110
|
+
this.setMod('empty', !this.elements.length);
|
|
3111
|
+
};
|
|
3112
|
+
UIVirtualScroll.prototype.onScrollLoadChunk = function () {
|
|
3113
|
+
if (!this.stateManager.isFavoriteItems &&
|
|
3114
|
+
this.container.scrollHeight -
|
|
3115
|
+
(this.container.scrollTop + this.container.offsetHeight) <
|
|
3116
|
+
this.j.o.pixelOffsetLoadNewChunk) {
|
|
3117
|
+
void this.j.loadingManager.loadItemsChunk();
|
|
3118
|
+
}
|
|
3119
|
+
};
|
|
3120
|
+
UIVirtualScroll.prototype.onDragOver = function (e) {
|
|
3121
|
+
e.preventDefault();
|
|
3122
|
+
this.setMod('dragover', true);
|
|
3123
|
+
};
|
|
3124
|
+
UIVirtualScroll.prototype.onDragLeave = function (e) {
|
|
3125
|
+
e.preventDefault();
|
|
3126
|
+
this.setMod('dragover', false);
|
|
3127
|
+
};
|
|
3128
|
+
UIVirtualScroll.prototype.addItemsSelector = function () {
|
|
3129
|
+
_traits_select_items_select_items__WEBPACK_IMPORTED_MODULE_4__/* .UISelectItems.install */ .r.install(this);
|
|
3130
|
+
};
|
|
3131
|
+
UIVirtualScroll.intersectRect = function (r1, r2) {
|
|
3132
|
+
return !(r2.left > r1.left + r1.width ||
|
|
3133
|
+
r2.left + r2.width < r1.left ||
|
|
3134
|
+
r2.top > r1.top + r1.height ||
|
|
3135
|
+
r2.top + r2.height < r1.top);
|
|
3136
|
+
};
|
|
3137
|
+
UIVirtualScroll.prototype.onSelectItems = function (bound) {
|
|
3138
|
+
var selected = [];
|
|
3139
|
+
this.elements.forEach(function (elm) {
|
|
3140
|
+
var pos = (0,jodit_core_helpers__WEBPACK_IMPORTED_MODULE_5__.position)(elm.container);
|
|
3141
|
+
if (UIVirtualScroll_1.intersectRect(pos, bound)) {
|
|
3142
|
+
selected.push(elm.item);
|
|
3143
|
+
}
|
|
3144
|
+
});
|
|
3145
|
+
this.stateManager.state.activeElements = selected;
|
|
3146
|
+
};
|
|
3147
|
+
var UIVirtualScroll_1;
|
|
3148
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
3149
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':afterResize'),
|
|
3150
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(':resize'),
|
|
3151
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:scroll'),
|
|
3152
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.throttle)()
|
|
3153
|
+
], UIVirtualScroll.prototype, "onScrollLoadChunk", null);
|
|
3154
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
3155
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)('container:dragover')
|
|
3156
|
+
], UIVirtualScroll.prototype, "onDragOver", null);
|
|
3157
|
+
(0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
3158
|
+
(0,jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.watch)(['container:dragleave', 'container:drop'])
|
|
3159
|
+
], UIVirtualScroll.prototype, "onDragLeave", null);
|
|
3160
|
+
UIVirtualScroll = UIVirtualScroll_1 = (0,tslib__WEBPACK_IMPORTED_MODULE_6__/* .__decorate */ .gn)([
|
|
3161
|
+
jodit_core_decorators__WEBPACK_IMPORTED_MODULE_1__.component
|
|
3162
|
+
], UIVirtualScroll);
|
|
3163
|
+
return UIVirtualScroll;
|
|
3164
|
+
}(jodit_core_ui__WEBPACK_IMPORTED_MODULE_0__/* .UIGroup */ .qe));
|
|
3165
|
+
|
|
3166
|
+
|
|
3167
|
+
/***/ }),
|
|
3168
|
+
|
|
3169
|
+
/***/ 62499:
|
|
3170
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3171
|
+
|
|
3172
|
+
"use strict";
|
|
3173
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3174
|
+
/* harmony export */ "c": function() { return /* binding */ UIResize; }
|
|
3175
|
+
/* harmony export */ });
|
|
3176
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
|
|
3177
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
|
|
3178
|
+
/*!
|
|
3179
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3180
|
+
* See LICENSE.md in the project root for license information.
|
|
3181
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
3182
|
+
*/
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
|
|
3186
|
+
var UIResize = /** @class */ (function () {
|
|
3187
|
+
function UIResize() {
|
|
3188
|
+
}
|
|
3189
|
+
UIResize.remove = function (element) {
|
|
3190
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, {
|
|
3191
|
+
width: null,
|
|
3192
|
+
height: null
|
|
3193
|
+
});
|
|
3194
|
+
element.container.classList.remove('jodit-ui-resize');
|
|
3195
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-resize__handle'));
|
|
3196
|
+
};
|
|
3197
|
+
UIResize.install = function (element, direction) {
|
|
3198
|
+
element.container.classList.add('jodit-ui-resize');
|
|
3199
|
+
if ((0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position') === 'static') {
|
|
3200
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, 'position', 'relative');
|
|
3201
|
+
}
|
|
3202
|
+
var handle = element.j.c.div('jodit-ui-resize__handle');
|
|
3203
|
+
handle.classList.add('jodit-ui-resize__handle_type_' + direction);
|
|
3204
|
+
element.container.appendChild(handle);
|
|
3205
|
+
element.j.e.on(handle, 'mousedown touchstart', this.onStartResize.bind(this, element, direction));
|
|
3206
|
+
};
|
|
3207
|
+
UIResize.onStartResize = function (element, direction, e) {
|
|
3208
|
+
var start = {
|
|
3209
|
+
x: e.clientX,
|
|
3210
|
+
y: e.clientY,
|
|
3211
|
+
w: element.container.offsetWidth,
|
|
3212
|
+
h: element.container.offsetHeight,
|
|
3213
|
+
direction: direction
|
|
3214
|
+
}, onResize = element.j.async.throttle(this.onResize.bind(this, element, start), element.j.defaultTimeout / 10);
|
|
3215
|
+
element.j.lock();
|
|
3216
|
+
element.j.e
|
|
3217
|
+
.on(element.j.ow, 'mousemove touchmove', onResize)
|
|
3218
|
+
.one(element.j.ow, 'mouseup touchend', this.onEndResize.bind(this, element, onResize));
|
|
3219
|
+
};
|
|
3220
|
+
UIResize.onResize = function (element, start, e) {
|
|
3221
|
+
var byWidth = ['left', 'right'].includes(start.direction), parentElement = element.container.parentElement;
|
|
3222
|
+
if (!parentElement) {
|
|
3223
|
+
return;
|
|
3224
|
+
}
|
|
3225
|
+
var diff;
|
|
3226
|
+
if (byWidth) {
|
|
3227
|
+
diff =
|
|
3228
|
+
(start.w +
|
|
3229
|
+
(e.clientX - start.x) *
|
|
3230
|
+
(start.direction === 'right' ? 1 : -1)) /
|
|
3231
|
+
parentElement.offsetWidth;
|
|
3232
|
+
}
|
|
3233
|
+
else {
|
|
3234
|
+
diff =
|
|
3235
|
+
(start.h +
|
|
3236
|
+
(e.clientY - start.y) *
|
|
3237
|
+
(start.direction === 'top' ? 1 : -1)) /
|
|
3238
|
+
parentElement.offsetHeight;
|
|
3239
|
+
}
|
|
3240
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(element.container, byWidth ? 'width' : 'height', diff * 100 + '%');
|
|
3241
|
+
};
|
|
3242
|
+
UIResize.onEndResize = function (element, onResize, _) {
|
|
3243
|
+
element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
|
|
3244
|
+
element.j.unlock();
|
|
3245
|
+
};
|
|
3246
|
+
return UIResize;
|
|
3247
|
+
}());
|
|
3248
|
+
|
|
3249
|
+
|
|
3250
|
+
|
|
3251
|
+
/***/ }),
|
|
3252
|
+
|
|
3253
|
+
/***/ 81766:
|
|
3254
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
3255
|
+
|
|
3256
|
+
"use strict";
|
|
3257
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
3258
|
+
/* harmony export */ "r": function() { return /* binding */ UISelectItems; }
|
|
3259
|
+
/* harmony export */ });
|
|
3260
|
+
/* harmony import */ var jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(44913);
|
|
3261
|
+
/* harmony import */ var jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(18002);
|
|
3262
|
+
/*!
|
|
3263
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
3264
|
+
* See LICENSE.md in the project root for license information.
|
|
3265
|
+
* Copyright (c) 2013-2023 Valeriy Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
3266
|
+
*/
|
|
3267
|
+
|
|
3268
|
+
|
|
3269
|
+
|
|
3270
|
+
var UISelectItems = /** @class */ (function () {
|
|
3271
|
+
function UISelectItems() {
|
|
3272
|
+
}
|
|
3273
|
+
UISelectItems.remove = function (element) {
|
|
3274
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(element.container.querySelector('.jodit-ui-select-items'));
|
|
3275
|
+
element.j.e.off(element.container, 'mousedown.uiselectitems touchstart.uiselectitems');
|
|
3276
|
+
};
|
|
3277
|
+
UISelectItems.install = function (element) {
|
|
3278
|
+
var bound = element.j.c.div('jodit-ui-select-items');
|
|
3279
|
+
element.j.e.on(element.container, 'mousedown.uiselectitems touchstart.uiselectitems', this.onStartSelect.bind(this, element, bound));
|
|
3280
|
+
};
|
|
3281
|
+
UISelectItems.onStartSelect = function (element, bound, e) {
|
|
3282
|
+
if (e.target !== element.container) {
|
|
3283
|
+
return;
|
|
3284
|
+
}
|
|
3285
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, { width: 0, height: 0 });
|
|
3286
|
+
element.container.appendChild(bound);
|
|
3287
|
+
var start = {
|
|
3288
|
+
x: e.clientX,
|
|
3289
|
+
y: e.clientY,
|
|
3290
|
+
w: element.container.offsetWidth,
|
|
3291
|
+
h: element.container.offsetHeight
|
|
3292
|
+
}, onSelect = element.j.async.throttle(this.onSelect.bind(this, element, bound, start), element.j.defaultTimeout / 10);
|
|
3293
|
+
element.j.lock();
|
|
3294
|
+
element.j.e
|
|
3295
|
+
.on(element.j.ow, 'mousemove touchmove', onSelect)
|
|
3296
|
+
.one(element.j.ow, 'mouseup touchend', this.onEndSelect.bind(this, element, bound, onSelect));
|
|
3297
|
+
element.onSelectItems({
|
|
3298
|
+
left: start.x,
|
|
3299
|
+
top: start.y,
|
|
3300
|
+
width: 0,
|
|
3301
|
+
height: 0
|
|
3302
|
+
});
|
|
3303
|
+
};
|
|
3304
|
+
UISelectItems.onSelect = function (element, bound, start, e) {
|
|
3305
|
+
var left = start.x > e.clientX ? e.clientX : start.x;
|
|
3306
|
+
var top = start.y > e.clientY ? e.clientY : start.y;
|
|
3307
|
+
var selectBound = {
|
|
3308
|
+
left: left,
|
|
3309
|
+
top: top,
|
|
3310
|
+
width: Math.abs(start.x - e.clientX),
|
|
3311
|
+
height: Math.abs(start.y - e.clientY)
|
|
3312
|
+
};
|
|
3313
|
+
(0,jodit_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_1__/* .css */ .i)(bound, selectBound);
|
|
3314
|
+
element.onSelectItems(selectBound);
|
|
3315
|
+
};
|
|
3316
|
+
UISelectItems.onEndSelect = function (element, bound, onResize, _) {
|
|
3317
|
+
jodit_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__/* .Dom.safeRemove */ .i.safeRemove(bound);
|
|
3318
|
+
element.j.e.off(element.j.ow, 'mousemove touchmove', onResize);
|
|
3319
|
+
element.j.unlock();
|
|
3320
|
+
};
|
|
3321
|
+
return UISelectItems;
|
|
3322
|
+
}());
|
|
3323
|
+
|
|
3324
|
+
|
|
3325
|
+
|
|
3326
|
+
/***/ })
|
|
3327
|
+
|
|
3328
|
+
},
|
|
3329
|
+
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
|
3330
|
+
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(__webpack_require__.s = moduleId); }
|
|
3331
|
+
/******/ var __webpack_exports__ = (__webpack_exec__(48531));
|
|
3332
|
+
/******/ return __webpack_exports__;
|
|
3333
|
+
/******/ }
|
|
3334
|
+
]);
|
|
3335
|
+
});
|