jodit-pro 4.13.38 → 4.13.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +28 -28
- package/es2015/jodit.js +83 -190
- package/es2015/jodit.min.css +1 -1
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +306 -168
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +29 -29
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.css +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +241 -72
- package/es2015/plugins/google-maps/google-maps.min.js +4 -4
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +6 -12
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +1 -1
- package/es2015/plugins/translate/translate.min.js +1 -1
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +19 -19
- package/es2018/jodit.min.css +1 -1
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.css +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +7 -7
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +1 -1
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +19 -19
- package/es2021/jodit.js +2 -2
- package/es2021/jodit.min.css +1 -1
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +204 -162
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.css +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +236 -75
- package/es2021/plugins/google-maps/google-maps.min.js +9 -9
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +2 -4
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +1 -1
- package/es2021/plugins/translate/translate.min.js +1 -1
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +19 -19
- package/es2021.en/jodit.js +2 -2
- package/es2021.en/jodit.min.css +1 -1
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +204 -162
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +15 -15
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.css +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +236 -75
- package/es2021.en/plugins/google-maps/google-maps.min.js +9 -9
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +2 -4
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +1 -1
- package/es2021.en/plugins/translate/translate.min.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.css +1 -1
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +1788 -2701
- package/es5/jodit.min.css +3 -3
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +406 -275
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +9 -9
- package/es5/plugins/backup/backup.min.js +2 -2
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +11 -18
- package/es5/plugins/button-generator/button-generator.min.js +2 -2
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +10 -17
- package/es5/plugins/color-picker/color-picker.min.js +2 -2
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +7 -7
- package/es5/plugins/emoji/emoji.min.js +2 -2
- package/es5/plugins/export-docs/export-docs.js +11 -11
- package/es5/plugins/export-docs/export-docs.min.js +2 -2
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +4 -10
- package/es5/plugins/finder/finder.min.css +1 -1
- package/es5/plugins/finder/finder.min.js +2 -2
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +334 -114
- package/es5/plugins/google-maps/google-maps.min.js +2 -2
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +6 -6
- package/es5/plugins/highlight-signature/highlight-signature.min.js +2 -2
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +6 -6
- package/es5/plugins/iframe-editor/iframe-editor.min.js +2 -2
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +29 -42
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +2 -2
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +6 -6
- package/es5/plugins/keyboard/keyboard.min.js +2 -2
- package/es5/plugins/mobile-view/mobile-view.js +6 -6
- package/es5/plugins/mobile-view/mobile-view.min.js +2 -2
- package/es5/plugins/page-break/page-break.js +6 -6
- package/es5/plugins/page-break/page-break.min.js +2 -2
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +13 -13
- package/es5/plugins/paste-code/paste-code.min.js +2 -2
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +8 -8
- package/es5/plugins/show-blocks/show-blocks.min.js +2 -2
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +18 -18
- package/es5/plugins/todo-list/todo-list.min.js +2 -2
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +7 -7
- package/es5/plugins/translate/translate.min.js +2 -2
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +7 -7
- package/es5/plugins/tune-block/tune-block.min.js +2 -2
- package/es5/polyfills.fat.min.js +2 -2
- package/es5/polyfills.js +225 -105
- package/es5/polyfills.min.js +2 -2
- package/esm/plugins/ai-assistant-pro/core/sanitize-utils.d.ts +18 -0
- package/esm/plugins/ai-assistant-pro/core/sanitize-utils.js +1 -0
- package/esm/plugins/ai-assistant-pro/tools/add-html/executor.js +1 -1
- package/esm/plugins/ai-assistant-pro/tools/replace-block/executor.js +1 -1
- package/esm/plugins/ai-assistant-pro/tools/replace-in-document/executor.js +1 -1
- package/esm/plugins/google-maps/config.js +1 -1
- package/esm/plugins/google-maps/ui/map/map.d.ts +3 -2
- package/esm/plugins/google-maps/ui/map/map.js +2 -2
- package/esm/plugins/google-maps/ui/map/modules/drawing-controller.d.ts +42 -0
- package/esm/plugins/google-maps/ui/map/modules/drawing-controller.js +1 -0
- package/package.json +1 -1
- package/types/plugins/ai-assistant-pro/core/sanitize-utils.d.ts +18 -0
- package/types/plugins/google-maps/ui/map/map.d.ts +3 -2
- package/types/plugins/google-maps/ui/map/modules/drawing-controller.d.ts +42 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.13.
|
|
4
|
+
* Version: v4.13.44
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -1642,7 +1642,7 @@ jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_7__.Icon.set('map', (_icon_svg__
|
|
|
1642
1642
|
jodit_esm_config__WEBPACK_IMPORTED_MODULE_1__.Config.prototype.googleMaps = {
|
|
1643
1643
|
saveStateInStorage: true,
|
|
1644
1644
|
useStaticImage: false,
|
|
1645
|
-
apiUrl: 'https://maps.googleapis.com/maps/api/js?key=${j.o.googleMaps.API_KEY}&libraries=geometry,places
|
|
1645
|
+
apiUrl: 'https://maps.googleapis.com/maps/api/js?key=${j.o.googleMaps.API_KEY}&libraries=geometry,places&language=${j.o.language}&callback=JoditGoogleReadyHandler',
|
|
1646
1646
|
API_KEY: 'AIzaSyDjnR03hxN8fo0QJ85Jkkvk2DALTh3eynY',
|
|
1647
1647
|
dialog: {
|
|
1648
1648
|
size: [
|
|
@@ -2557,17 +2557,18 @@ UIPolylineEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__de
|
|
|
2557
2557
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(31635);
|
|
2558
2558
|
/* harmony import */ var jodit_pro_plugins_google_maps_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(55029);
|
|
2559
2559
|
/* harmony import */ var _modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(22125);
|
|
2560
|
-
/* harmony import */ var
|
|
2561
|
-
/* harmony import */ var
|
|
2562
|
-
/* harmony import */ var
|
|
2563
|
-
/* harmony import */ var
|
|
2564
|
-
/* harmony import */ var
|
|
2565
|
-
/* harmony import */ var
|
|
2566
|
-
/* harmony import */ var
|
|
2567
|
-
/* harmony import */ var
|
|
2568
|
-
/* harmony import */ var
|
|
2569
|
-
/* harmony import */ var
|
|
2570
|
-
/* harmony import */ var
|
|
2560
|
+
/* harmony import */ var _modules_drawing_controller__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(76864);
|
|
2561
|
+
/* harmony import */ var _modules_init_or_update_element_from_state__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(1475);
|
|
2562
|
+
/* harmony import */ var jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(81577);
|
|
2563
|
+
/* harmony import */ var jodit_esm_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(97357);
|
|
2564
|
+
/* harmony import */ var jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(13525);
|
|
2565
|
+
/* harmony import */ var jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(37133);
|
|
2566
|
+
/* harmony import */ var jodit_esm_core_global__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(580);
|
|
2567
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(38837);
|
|
2568
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(41180);
|
|
2569
|
+
/* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(67510);
|
|
2570
|
+
/* harmony import */ var jodit_esm_modules_toolbar_collection_collection__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(11676);
|
|
2571
|
+
/* harmony import */ var jodit_pro_plugins_google_maps_helpers_const__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(17298);
|
|
2571
2572
|
/*!
|
|
2572
2573
|
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2573
2574
|
* See LICENSE.md in the project root for license information.
|
|
@@ -2588,7 +2589,8 @@ UIPolylineEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_0__.__de
|
|
|
2588
2589
|
|
|
2589
2590
|
|
|
2590
2591
|
|
|
2591
|
-
|
|
2592
|
+
|
|
2593
|
+
class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_13__.UIGroup {
|
|
2592
2594
|
className() {
|
|
2593
2595
|
return 'UIMap';
|
|
2594
2596
|
}
|
|
@@ -2601,7 +2603,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2601
2603
|
async onReady() {
|
|
2602
2604
|
await this.apiLoaded;
|
|
2603
2605
|
const container = this.getElm('map-root');
|
|
2604
|
-
(0,
|
|
2606
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__.assert)(container != null, 'map-root element does not exists');
|
|
2605
2607
|
this.map = new google.maps.Map(container, {
|
|
2606
2608
|
center: {
|
|
2607
2609
|
lat: this.state.center[0],
|
|
@@ -2625,7 +2627,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2625
2627
|
this.state.type = type;
|
|
2626
2628
|
}
|
|
2627
2629
|
});
|
|
2628
|
-
this.
|
|
2630
|
+
this.initDrawingController();
|
|
2629
2631
|
this.onChangeElementsList();
|
|
2630
2632
|
this.onChangeSize();
|
|
2631
2633
|
this.onChangeControls();
|
|
@@ -2637,47 +2639,18 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2637
2639
|
this.j.e.fire(this, 'GoogleMapsIsReady');
|
|
2638
2640
|
});
|
|
2639
2641
|
}
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
drawingControl: false,
|
|
2646
|
-
polygonOptions: {
|
|
2647
|
-
...this.options.googleMaps.map.defaultStates.polygon,
|
|
2648
|
-
clickable: true,
|
|
2649
|
-
editable: true
|
|
2650
|
-
},
|
|
2651
|
-
polylineOptions: {
|
|
2652
|
-
...this.options.googleMaps.map.defaultStates.polyline,
|
|
2653
|
-
clickable: true,
|
|
2654
|
-
editable: true
|
|
2655
|
-
},
|
|
2656
|
-
markerOptions: {
|
|
2657
|
-
...this.options.googleMaps.map.defaultStates.marker,
|
|
2658
|
-
clickable: true
|
|
2659
|
-
},
|
|
2660
|
-
circleOptions: {
|
|
2661
|
-
...this.options.googleMaps.map.defaultStates.circle,
|
|
2662
|
-
clickable: true,
|
|
2663
|
-
editable: true
|
|
2664
|
-
}
|
|
2665
|
-
});
|
|
2666
|
-
this.drawingManager = drawingManager;
|
|
2667
|
-
google.maps.event.addListener(drawingManager, 'overlaycomplete', (event)=>{
|
|
2668
|
-
if (event.overlay) {
|
|
2669
|
-
_modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_3__.addNewInState.call(this, event.overlay);
|
|
2670
|
-
event.overlay.setMap(null);
|
|
2671
|
-
}
|
|
2672
|
-
});
|
|
2673
|
-
} catch {}
|
|
2642
|
+
initDrawingController() {
|
|
2643
|
+
this.drawing = new _modules_drawing_controller__WEBPACK_IMPORTED_MODULE_4__.DrawingController(this.map, this.options.googleMaps.map.defaultStates, (overlay)=>{
|
|
2644
|
+
_modules_add_new_in_state__WEBPACK_IMPORTED_MODULE_3__.addNewInState.call(this, overlay);
|
|
2645
|
+
overlay.setMap(null);
|
|
2646
|
+
});
|
|
2674
2647
|
}
|
|
2675
2648
|
changeCreateMode(mode) {
|
|
2676
2649
|
this.state.mode = this.state.mode === mode ? 'hand' : mode;
|
|
2677
2650
|
}
|
|
2678
2651
|
onChangeMode() {
|
|
2679
2652
|
this.j.buffer.set('createMode.gm', this.state.mode);
|
|
2680
|
-
this.
|
|
2653
|
+
this.drawing?.setMode(this.state.mode);
|
|
2681
2654
|
this.j.e.fire('updateToolbar');
|
|
2682
2655
|
}
|
|
2683
2656
|
onChangeElementsList() {
|
|
@@ -2688,7 +2661,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2688
2661
|
});
|
|
2689
2662
|
}
|
|
2690
2663
|
mapElements.length = elements.length;
|
|
2691
|
-
elements.forEach((state, index)=>
|
|
2664
|
+
elements.forEach((state, index)=>_modules_init_or_update_element_from_state__WEBPACK_IMPORTED_MODULE_5__.initOrUpdateElementFromState.call(this, state, index));
|
|
2692
2665
|
}
|
|
2693
2666
|
onChangeCenter() {
|
|
2694
2667
|
const center = this.map.getCenter();
|
|
@@ -2709,7 +2682,7 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2709
2682
|
}
|
|
2710
2683
|
}
|
|
2711
2684
|
onChangeBound() {
|
|
2712
|
-
this.options.googleMaps.saveStateInStorage && this.j.storage.set(
|
|
2685
|
+
this.options.googleMaps.saveStateInStorage && this.j.storage.set(jodit_pro_plugins_google_maps_helpers_const__WEBPACK_IMPORTED_MODULE_15__.STORAGE_KEY, {
|
|
2713
2686
|
center: this.state.center,
|
|
2714
2687
|
size: this.state.size,
|
|
2715
2688
|
zoom: this.state.zoom,
|
|
@@ -2720,8 +2693,8 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2720
2693
|
}
|
|
2721
2694
|
onChangeSize() {
|
|
2722
2695
|
const mapSize = this.getElm('map-size');
|
|
2723
|
-
(0,
|
|
2724
|
-
(0,
|
|
2696
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__.assert)(mapSize != null, 'map-size element does not exists');
|
|
2697
|
+
(0,jodit_esm_core_helpers_utils_css__WEBPACK_IMPORTED_MODULE_12__.css)(mapSize, {
|
|
2725
2698
|
width: this.state.size[0],
|
|
2726
2699
|
height: this.state.size[1]
|
|
2727
2700
|
});
|
|
@@ -2745,6 +2718,10 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2745
2718
|
}
|
|
2746
2719
|
this.layers.forEach((layer)=>layer.setMap(this.map));
|
|
2747
2720
|
}
|
|
2721
|
+
destruct() {
|
|
2722
|
+
this.drawing?.destruct();
|
|
2723
|
+
return super.destruct();
|
|
2724
|
+
}
|
|
2748
2725
|
render() {
|
|
2749
2726
|
return `<div>
|
|
2750
2727
|
<div class='&__map-root'></div>
|
|
@@ -2754,8 +2731,8 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2754
2731
|
}
|
|
2755
2732
|
appendChildToContainer() {}
|
|
2756
2733
|
constructor(jodit, state, options){
|
|
2757
|
-
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "
|
|
2758
|
-
uid: 'jd' + (0,
|
|
2734
|
+
super(jodit), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "options", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "drawing", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "toolbar", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mapElements", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "apiLoaded", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mapInitialized", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "map", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "layers", void 0), this.options = options, this.toolbar = new jodit_esm_modules_toolbar_collection_collection__WEBPACK_IMPORTED_MODULE_14__.ToolbarCollection(this.jodit), this.state = {
|
|
2735
|
+
uid: 'jd' + (0,jodit_esm_core_global__WEBPACK_IMPORTED_MODULE_10__.uniqueUid)() + new Date().toString().replace(/[^0-9]/g, ''),
|
|
2759
2736
|
layer: this.options.googleMaps.map.layer,
|
|
2760
2737
|
center: this.options.googleMaps.map.defaultCenter,
|
|
2761
2738
|
zoom: this.options.googleMaps.map.defaultZoom,
|
|
@@ -2781,36 +2758,36 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2781
2758
|
'gm.circle'
|
|
2782
2759
|
]);
|
|
2783
2760
|
const palette = this.getElm('map-palette');
|
|
2784
|
-
(0,
|
|
2761
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__.assert)(palette != null, 'palette element does not exists');
|
|
2785
2762
|
palette.appendChild(this.toolbar.container);
|
|
2786
2763
|
}
|
|
2787
2764
|
}
|
|
2788
2765
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2789
|
-
(0,
|
|
2766
|
+
(0,jodit_esm_core_decorators_hook_hook__WEBPACK_IMPORTED_MODULE_7__.hook)('ready')
|
|
2790
2767
|
], UIMap.prototype, "onReady", null);
|
|
2791
2768
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2792
|
-
(0,
|
|
2769
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('?:changeCreateMode.gm')
|
|
2793
2770
|
], UIMap.prototype, "changeCreateMode", null);
|
|
2794
2771
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2795
|
-
(0,
|
|
2772
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.mode')
|
|
2796
2773
|
], UIMap.prototype, "onChangeMode", null);
|
|
2797
2774
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2798
|
-
(0,
|
|
2775
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.elements')
|
|
2799
2776
|
], UIMap.prototype, "onChangeElementsList", null);
|
|
2800
2777
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2801
|
-
(0,
|
|
2802
|
-
(0,
|
|
2803
|
-
(0,
|
|
2778
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.center'),
|
|
2779
|
+
(0,jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_8__.wait)((ctx)=>ctx.mapInitialized),
|
|
2780
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_6__.debounce)()
|
|
2804
2781
|
], UIMap.prototype, "onChangeCenter", null);
|
|
2805
2782
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2806
|
-
(0,
|
|
2807
|
-
(0,
|
|
2783
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.zoom'),
|
|
2784
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_6__.debounce)()
|
|
2808
2785
|
], UIMap.prototype, "onChangeZoom", null);
|
|
2809
2786
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2810
|
-
(0,
|
|
2787
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.controls')
|
|
2811
2788
|
], UIMap.prototype, "onChangeControls", null);
|
|
2812
2789
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2813
|
-
(0,
|
|
2790
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)([
|
|
2814
2791
|
'state.center',
|
|
2815
2792
|
'state.zoom',
|
|
2816
2793
|
'state.controls',
|
|
@@ -2818,18 +2795,18 @@ class UIMap extends jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_12__.UIGroup {
|
|
|
2818
2795
|
'state.type',
|
|
2819
2796
|
'state.layer'
|
|
2820
2797
|
]),
|
|
2821
|
-
(0,
|
|
2822
|
-
(0,
|
|
2798
|
+
(0,jodit_esm_core_decorators_wait_wait__WEBPACK_IMPORTED_MODULE_8__.wait)((ctx)=>ctx.mapInitialized),
|
|
2799
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_6__.debounce)()
|
|
2823
2800
|
], UIMap.prototype, "onChangeBound", null);
|
|
2824
2801
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2825
|
-
(0,
|
|
2826
|
-
(0,
|
|
2802
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.size'),
|
|
2803
|
+
(0,jodit_esm_core_decorators_debounce_debounce__WEBPACK_IMPORTED_MODULE_6__.debounce)()
|
|
2827
2804
|
], UIMap.prototype, "onChangeSize", null);
|
|
2828
2805
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2829
|
-
(0,
|
|
2806
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.type')
|
|
2830
2807
|
], UIMap.prototype, "onChangeMapType", null);
|
|
2831
2808
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_1__.__decorate)([
|
|
2832
|
-
(0,
|
|
2809
|
+
(0,jodit_esm_core_decorators_watch_watch__WEBPACK_IMPORTED_MODULE_9__.watch)('state.layer')
|
|
2833
2810
|
], UIMap.prototype, "onChangeLayer", null);
|
|
2834
2811
|
|
|
2835
2812
|
|
|
@@ -2901,6 +2878,190 @@ function addNewInState(mvc) {
|
|
|
2901
2878
|
}
|
|
2902
2879
|
|
|
2903
2880
|
|
|
2881
|
+
/***/ }),
|
|
2882
|
+
|
|
2883
|
+
/***/ 76864:
|
|
2884
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2885
|
+
|
|
2886
|
+
"use strict";
|
|
2887
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2888
|
+
/* harmony export */ DrawingController: function() { return /* binding */ DrawingController; }
|
|
2889
|
+
/* harmony export */ });
|
|
2890
|
+
/* unused harmony export isDrawableMode */
|
|
2891
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
|
|
2892
|
+
/*!
|
|
2893
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
2894
|
+
* See LICENSE.md in the project root for license information.
|
|
2895
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
2896
|
+
*/
|
|
2897
|
+
const DRAWABLE_MODES = [
|
|
2898
|
+
'marker',
|
|
2899
|
+
'polyline',
|
|
2900
|
+
'polygon',
|
|
2901
|
+
'circle'
|
|
2902
|
+
];
|
|
2903
|
+
function isDrawableMode(mode) {
|
|
2904
|
+
return DRAWABLE_MODES.includes(mode);
|
|
2905
|
+
}
|
|
2906
|
+
/**
|
|
2907
|
+
* Replacement for the removed `google.maps.drawing.DrawingManager`
|
|
2908
|
+
* (the Drawing Library was discontinued in Maps JS API v3.65):
|
|
2909
|
+
* draws markers, polylines, polygons and circles with plain map events.
|
|
2910
|
+
*
|
|
2911
|
+
* Click places a marker / a vertex / a circle center; for circles the
|
|
2912
|
+
* radius follows the cursor and a second click fixes it; polylines and
|
|
2913
|
+
* polygons are finished with a double click. The completed shape is
|
|
2914
|
+
* passed to `onComplete` and removed from the map — the caller
|
|
2915
|
+
* re-creates it from state, exactly as with DrawingManager overlays.
|
|
2916
|
+
*/ class DrawingController {
|
|
2917
|
+
setMode(mode) {
|
|
2918
|
+
const nextMode = isDrawableMode(mode) ? mode : null;
|
|
2919
|
+
if (nextMode === this.mode) {
|
|
2920
|
+
return;
|
|
2921
|
+
}
|
|
2922
|
+
this.cancel();
|
|
2923
|
+
this.unbind();
|
|
2924
|
+
this.mode = nextMode;
|
|
2925
|
+
if (nextMode) {
|
|
2926
|
+
this.bind();
|
|
2927
|
+
this.map.setOptions({
|
|
2928
|
+
draggableCursor: 'crosshair',
|
|
2929
|
+
disableDoubleClickZoom: true
|
|
2930
|
+
});
|
|
2931
|
+
} else {
|
|
2932
|
+
this.map.setOptions({
|
|
2933
|
+
draggableCursor: null,
|
|
2934
|
+
disableDoubleClickZoom: false
|
|
2935
|
+
});
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
destruct() {
|
|
2939
|
+
this.cancel();
|
|
2940
|
+
this.unbind();
|
|
2941
|
+
this.mode = null;
|
|
2942
|
+
}
|
|
2943
|
+
bind() {
|
|
2944
|
+
this.listeners = [
|
|
2945
|
+
this.map.addListener('click', (e)=>this.onClick(e)),
|
|
2946
|
+
this.map.addListener('mousemove', (e)=>this.onMove(e)),
|
|
2947
|
+
this.map.addListener('dblclick', ()=>this.onDblClick())
|
|
2948
|
+
];
|
|
2949
|
+
}
|
|
2950
|
+
unbind() {
|
|
2951
|
+
this.listeners.forEach((listener)=>listener.remove());
|
|
2952
|
+
this.listeners = [];
|
|
2953
|
+
}
|
|
2954
|
+
onClick(e) {
|
|
2955
|
+
const point = e.latLng;
|
|
2956
|
+
if (!point) {
|
|
2957
|
+
return;
|
|
2958
|
+
}
|
|
2959
|
+
switch(this.mode){
|
|
2960
|
+
case 'marker':
|
|
2961
|
+
this.onComplete(new google.maps.Marker({
|
|
2962
|
+
position: point
|
|
2963
|
+
}));
|
|
2964
|
+
break;
|
|
2965
|
+
case 'circle':
|
|
2966
|
+
if (!this.previewCircle) {
|
|
2967
|
+
this.previewCircle = new google.maps.Circle({
|
|
2968
|
+
...this.defaultStates.circle,
|
|
2969
|
+
center: point,
|
|
2970
|
+
radius: 0,
|
|
2971
|
+
clickable: false,
|
|
2972
|
+
map: this.map
|
|
2973
|
+
});
|
|
2974
|
+
} else {
|
|
2975
|
+
this.finishCircle();
|
|
2976
|
+
}
|
|
2977
|
+
break;
|
|
2978
|
+
case 'polyline':
|
|
2979
|
+
case 'polygon':
|
|
2980
|
+
this.vertices.push(point);
|
|
2981
|
+
this.updatePolyPreview(point);
|
|
2982
|
+
break;
|
|
2983
|
+
}
|
|
2984
|
+
}
|
|
2985
|
+
onMove(e) {
|
|
2986
|
+
const point = e.latLng;
|
|
2987
|
+
if (!point) {
|
|
2988
|
+
return;
|
|
2989
|
+
}
|
|
2990
|
+
if (this.previewCircle) {
|
|
2991
|
+
const center = this.previewCircle.getCenter();
|
|
2992
|
+
center && this.previewCircle.setRadius(google.maps.geometry.spherical.computeDistanceBetween(center, point));
|
|
2993
|
+
return;
|
|
2994
|
+
}
|
|
2995
|
+
if (this.vertices.length) {
|
|
2996
|
+
this.updatePolyPreview(point);
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
onDblClick() {
|
|
3000
|
+
if (this.mode !== 'polyline' && this.mode !== 'polygon') {
|
|
3001
|
+
return;
|
|
3002
|
+
}
|
|
3003
|
+
// The double click is preceded by two single clicks at the same
|
|
3004
|
+
// point — collapse the duplicated trailing vertices
|
|
3005
|
+
const path = this.vertices.filter((point, i, list)=>i === 0 || !point.equals(list[i - 1]));
|
|
3006
|
+
const minPoints = this.mode === 'polygon' ? 3 : 2;
|
|
3007
|
+
if (path.length >= minPoints && this.preview) {
|
|
3008
|
+
const shape = this.preview;
|
|
3009
|
+
shape.setPath(path);
|
|
3010
|
+
this.onComplete(shape);
|
|
3011
|
+
}
|
|
3012
|
+
this.cancel();
|
|
3013
|
+
}
|
|
3014
|
+
finishCircle() {
|
|
3015
|
+
const circle = this.previewCircle;
|
|
3016
|
+
if (circle) {
|
|
3017
|
+
this.previewCircle = null;
|
|
3018
|
+
this.onComplete(circle);
|
|
3019
|
+
circle.setMap(null);
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
updatePolyPreview(cursor) {
|
|
3023
|
+
const path = [
|
|
3024
|
+
...this.vertices,
|
|
3025
|
+
cursor
|
|
3026
|
+
];
|
|
3027
|
+
if (!this.preview) {
|
|
3028
|
+
const options = {
|
|
3029
|
+
...this.defaultStates[this.mode === 'polygon' ? 'polygon' : 'polyline'],
|
|
3030
|
+
clickable: false,
|
|
3031
|
+
map: this.map
|
|
3032
|
+
};
|
|
3033
|
+
this.preview = this.mode === 'polygon' ? new google.maps.Polygon(options) : new google.maps.Polyline(options);
|
|
3034
|
+
}
|
|
3035
|
+
this.preview.setPath(path);
|
|
3036
|
+
}
|
|
3037
|
+
cancel() {
|
|
3038
|
+
this.preview?.setMap(null);
|
|
3039
|
+
this.preview = null;
|
|
3040
|
+
this.previewCircle?.setMap(null);
|
|
3041
|
+
this.previewCircle = null;
|
|
3042
|
+
this.vertices = [];
|
|
3043
|
+
}
|
|
3044
|
+
constructor(map, defaultStates, onComplete){
|
|
3045
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "map", void 0);
|
|
3046
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "defaultStates", void 0);
|
|
3047
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "onComplete", void 0);
|
|
3048
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "mode", void 0);
|
|
3049
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "listeners", void 0);
|
|
3050
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "preview", void 0);
|
|
3051
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "previewCircle", void 0);
|
|
3052
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "vertices", void 0);
|
|
3053
|
+
this.map = map;
|
|
3054
|
+
this.defaultStates = defaultStates;
|
|
3055
|
+
this.onComplete = onComplete;
|
|
3056
|
+
this.mode = null;
|
|
3057
|
+
this.listeners = [];
|
|
3058
|
+
this.preview = null;
|
|
3059
|
+
this.previewCircle = null;
|
|
3060
|
+
this.vertices = [];
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
|
|
3064
|
+
|
|
2904
3065
|
/***/ }),
|
|
2905
3066
|
|
|
2906
3067
|
/***/ 1475:
|