jodit-pro 4.18.3 → 4.18.6
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/CHANGELOG.md +11 -0
- package/README.md +2 -0
- package/config.js +1 -0
- package/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.css +1 -1
- package/es2015/jodit.fat.min.js +21 -9
- package/es2015/jodit.js +2 -2
- 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 +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.css +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/chart/chart.css +173 -0
- package/es2015/plugins/chart/chart.js +1479 -0
- package/es2015/plugins/chart/chart.min.css +1 -0
- package/es2015/plugins/chart/chart.min.js +20 -0
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/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 +2 -1
- package/es2015/plugins/tune-block/tune-block.min.js +2 -2
- package/es2018/jodit.fat.min.css +1 -1
- package/es2018/jodit.fat.min.js +75 -63
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/chart/chart.min.css +1 -0
- package/es2018/plugins/chart/chart.min.js +20 -0
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/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 +2 -2
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.css +1 -1
- package/es2021/jodit.fat.min.js +18 -6
- package/es2021/jodit.js +2 -2
- 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 +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/chart/chart.css +173 -0
- package/es2021/plugins/chart/chart.js +1424 -0
- package/es2021/plugins/chart/chart.min.css +1 -0
- package/es2021/plugins/chart/chart.min.js +20 -0
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/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 +2 -1
- package/es2021/plugins/tune-block/tune-block.min.js +2 -2
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.css +1 -1
- package/es2021.en/jodit.fat.min.js +21 -9
- package/es2021.en/jodit.js +2 -2
- 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 +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/chart/chart.css +173 -0
- package/es2021.en/plugins/chart/chart.js +1424 -0
- package/es2021.en/plugins/chart/chart.min.css +1 -0
- package/es2021.en/plugins/chart/chart.min.js +20 -0
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/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 +2 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +2 -2
- 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 +2 -2
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.css +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/chart/chart.css +173 -0
- package/es5/plugins/chart/chart.js +1661 -0
- package/es5/plugins/chart/chart.min.css +1 -0
- package/es5/plugins/chart/chart.min.js +8 -0
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
- package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +1 -1
- package/es5/plugins/translate/translate.min.js +1 -1
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +2 -1
- package/es5/plugins/tune-block/tune-block.min.js +2 -2
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +27 -1
- package/esm/plugins/all.js +1 -1
- package/esm/plugins/chart/assets/chart.svg.js +1 -0
- package/esm/plugins/chart/chart.d.ts +56 -0
- package/esm/plugins/chart/chart.js +1 -0
- package/esm/plugins/chart/config.d.ts +33 -0
- package/esm/plugins/chart/config.js +1 -0
- package/esm/plugins/chart/helpers.d.ts +22 -0
- package/esm/plugins/chart/helpers.js +1 -0
- package/esm/plugins/chart/interface.d.ts +34 -0
- package/esm/plugins/chart/interface.js +0 -0
- package/esm/plugins/chart/render/bar.d.ts +8 -0
- package/esm/plugins/chart/render/bar.js +1 -0
- package/esm/plugins/chart/render/common.d.ts +40 -0
- package/esm/plugins/chart/render/common.js +1 -0
- package/esm/plugins/chart/render/index.d.ts +7 -0
- package/esm/plugins/chart/render/index.js +1 -0
- package/esm/plugins/chart/render/line.d.ts +7 -0
- package/esm/plugins/chart/render/line.js +1 -0
- package/esm/plugins/chart/render/pie.d.ts +7 -0
- package/esm/plugins/chart/render/pie.js +1 -0
- package/esm/plugins/chart/render/radar.d.ts +7 -0
- package/esm/plugins/chart/render/radar.js +1 -0
- package/esm/plugins/chart/ui/editor/editor.d.ts +52 -0
- package/esm/plugins/chart/ui/editor/editor.js +13 -0
- package/esm/plugins/tune-block/config.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +27 -1
- package/types/plugins/chart/chart.d.ts +56 -0
- package/types/plugins/chart/config.d.ts +33 -0
- package/types/plugins/chart/helpers.d.ts +22 -0
- package/types/plugins/chart/interface.d.ts +34 -0
- package/types/plugins/chart/render/bar.d.ts +8 -0
- package/types/plugins/chart/render/common.d.ts +40 -0
- package/types/plugins/chart/render/index.d.ts +7 -0
- package/types/plugins/chart/render/line.d.ts +7 -0
- package/types/plugins/chart/render/pie.d.ts +7 -0
- package/types/plugins/chart/render/radar.d.ts +7 -0
- package/types/plugins/chart/ui/editor/editor.d.ts +52 -0
|
@@ -0,0 +1,1661 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* jodit-pro - PRO Version of Jodit Editor
|
|
3
|
+
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
+
* Version: v4.18.6
|
|
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([[418],{
|
|
20
|
+
|
|
21
|
+
/***/ 97467:
|
|
22
|
+
/***/ (function(module) {
|
|
23
|
+
|
|
24
|
+
module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <path d=\"M5 20v-7M12 20V4M19 20v-5M3 20h18\"/> </g> </svg>"
|
|
25
|
+
|
|
26
|
+
/***/ }),
|
|
27
|
+
|
|
28
|
+
/***/ 57722:
|
|
29
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
30
|
+
|
|
31
|
+
"use strict";
|
|
32
|
+
__webpack_require__.r(__webpack_exports__);
|
|
33
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
34
|
+
/* harmony export */ Chart: function() { return /* binding */ Chart; }
|
|
35
|
+
/* harmony export */ });
|
|
36
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
|
|
37
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
|
|
38
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
|
|
39
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
|
|
40
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766);
|
|
41
|
+
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56075);
|
|
42
|
+
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11886);
|
|
43
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
|
|
44
|
+
/* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23078);
|
|
45
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(88902);
|
|
46
|
+
/* harmony import */ var _ui_editor_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(90142);
|
|
47
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(99131);
|
|
48
|
+
/* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65478);
|
|
49
|
+
/* harmony import */ var jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2748);
|
|
50
|
+
/* harmony import */ var jodit_esm_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(4510);
|
|
51
|
+
/* harmony import */ var jodit_esm_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(5700);
|
|
52
|
+
/* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(50911);
|
|
53
|
+
/* harmony import */ var jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(10830);
|
|
54
|
+
/* harmony import */ var jodit_esm_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(56917);
|
|
55
|
+
/* harmony import */ var jodit_esm_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(78584);
|
|
56
|
+
/* harmony import */ var jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(21491);
|
|
57
|
+
/* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(2692);
|
|
58
|
+
/*!
|
|
59
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
60
|
+
* See LICENSE.md in the project root for license information.
|
|
61
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
62
|
+
*/
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Inserts self-contained SVG charts (bar, horizontal bar, line, pie, donut)
|
|
87
|
+
* and lets the user edit them in a dialog or remove them from a popup.
|
|
88
|
+
*/ var Chart = /*#__PURE__*/ function(Plugin) {
|
|
89
|
+
"use strict";
|
|
90
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(Chart, Plugin);
|
|
91
|
+
function Chart() {
|
|
92
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, Chart);
|
|
93
|
+
var _this;
|
|
94
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, Chart, arguments), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "buttons", [
|
|
95
|
+
{
|
|
96
|
+
name: 'chart',
|
|
97
|
+
group: 'insert'
|
|
98
|
+
}
|
|
99
|
+
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__dialog", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__editor", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__popup", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__toolbar", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__target", null);
|
|
100
|
+
return _this;
|
|
101
|
+
}
|
|
102
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(Chart, [
|
|
103
|
+
{
|
|
104
|
+
key: "afterInit",
|
|
105
|
+
value: function afterInit(jodit) {
|
|
106
|
+
var _this = this;
|
|
107
|
+
jodit.e.on('openChartEditor', this.openEditor).on('removeChart', this.removeChart).on('isChartEditorOpened', function() {
|
|
108
|
+
var _this___dialog;
|
|
109
|
+
return Boolean((_this___dialog = _this.__dialog) === null || _this___dialog === void 0 ? void 0 : _this___dialog.isOpened);
|
|
110
|
+
});
|
|
111
|
+
jodit.registerCommand('insertChart', function() {
|
|
112
|
+
_this.openEditor();
|
|
113
|
+
return false;
|
|
114
|
+
});
|
|
115
|
+
this.__decorateAll();
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
key: "beforeDestruct",
|
|
120
|
+
value: function beforeDestruct() {
|
|
121
|
+
var _this___popup, _this___dialog;
|
|
122
|
+
this.closePopup();
|
|
123
|
+
(_this___popup = this.__popup) === null || _this___popup === void 0 ? void 0 : _this___popup.destruct();
|
|
124
|
+
(_this___dialog = this.__dialog) === null || _this___dialog === void 0 ? void 0 : _this___dialog.destruct();
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
key: "openEditor",
|
|
129
|
+
value: /**
|
|
130
|
+
* Opens the editor dialog for a new chart or for an existing one.
|
|
131
|
+
*/ function openEditor(target) {
|
|
132
|
+
var _this = this;
|
|
133
|
+
var figure = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findChart)(this.j, target !== null && target !== void 0 ? target : null);
|
|
134
|
+
var data = figure && (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readChartData)(this.j, figure) || (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.defaultChartData)(this.j);
|
|
135
|
+
this.closePopup();
|
|
136
|
+
this.j.s.save();
|
|
137
|
+
var dialog = this.__getDialog();
|
|
138
|
+
var editor = this.__editor;
|
|
139
|
+
if (!editor) {
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
editor.setData(data);
|
|
143
|
+
dialog.setHeader(this.j.i18n(figure ? 'Edit chart' : 'Insert chart')).setFooter([
|
|
144
|
+
(0,jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_17__.Button)(dialog, 'cancel', 'Cancel', 'default').onAction(function() {
|
|
145
|
+
dialog.close();
|
|
146
|
+
}),
|
|
147
|
+
(0,jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_17__.Button)(dialog, 'ok', figure ? 'Save' : 'Insert', 'primary').onAction(function() {
|
|
148
|
+
_this.__save(figure, editor.getData());
|
|
149
|
+
dialog.close();
|
|
150
|
+
})
|
|
151
|
+
]).open();
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
key: "removeChart",
|
|
156
|
+
value: /**
|
|
157
|
+
* Removes the chart that owns the given node.
|
|
158
|
+
*/ function removeChart(target) {
|
|
159
|
+
var figure = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findChart)(this.j, target !== null && target !== void 0 ? target : this.__target);
|
|
160
|
+
this.closePopup();
|
|
161
|
+
if (figure) {
|
|
162
|
+
this.j.s.setCursorAfter(figure);
|
|
163
|
+
jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__.Dom.safeRemove(figure);
|
|
164
|
+
this.j.synchronizeValues();
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
key: "__save",
|
|
170
|
+
value: function __save(figure, data) {
|
|
171
|
+
if (figure) {
|
|
172
|
+
(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyChartData)(this.j, figure, data);
|
|
173
|
+
} else {
|
|
174
|
+
figure = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.createChart)(this.j, data);
|
|
175
|
+
this.j.s.restore();
|
|
176
|
+
this.j.s.insertNode(figure, false, false);
|
|
177
|
+
}
|
|
178
|
+
this.j.s.setCursorAfter(figure);
|
|
179
|
+
this.j.synchronizeValues();
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
key: "__getDialog",
|
|
184
|
+
value: function __getDialog() {
|
|
185
|
+
var _this = this;
|
|
186
|
+
if (!this.__dialog) {
|
|
187
|
+
var dialog = this.j.o.chart.dialog;
|
|
188
|
+
this.__dialog = new jodit_esm_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_19__.Dialog({
|
|
189
|
+
language: this.j.o.language,
|
|
190
|
+
theme: this.j.o.theme,
|
|
191
|
+
shadowRoot: this.j.o.shadowRoot,
|
|
192
|
+
events: this.j.o.events
|
|
193
|
+
});
|
|
194
|
+
this.__editor = new _ui_editor_editor__WEBPACK_IMPORTED_MODULE_10__.UIChartEditor(this.j);
|
|
195
|
+
this.__dialog.setContent(this.__editor).setSize(dialog.width, dialog.height);
|
|
196
|
+
this.__dialog.e.on('beforeClose', function() {
|
|
197
|
+
_this.j.s.restore();
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
return this.__dialog;
|
|
201
|
+
}
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
key: "onClick",
|
|
205
|
+
value: /**
|
|
206
|
+
* Handler: clicking a chart opens its popup; clicking elsewhere closes it.
|
|
207
|
+
*/ function onClick(e) {
|
|
208
|
+
var figure = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findChart)(this.j, e.target);
|
|
209
|
+
if (figure) {
|
|
210
|
+
this.openPopup(figure);
|
|
211
|
+
} else {
|
|
212
|
+
this.closePopup();
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
key: "onDblClick",
|
|
218
|
+
value: function onDblClick(e) {
|
|
219
|
+
var figure = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findChart)(this.j, e.target);
|
|
220
|
+
if (figure) {
|
|
221
|
+
this.openEditor(figure);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
key: "onOutsideClick",
|
|
227
|
+
value: function onOutsideClick() {
|
|
228
|
+
this.closePopup();
|
|
229
|
+
}
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
/**
|
|
233
|
+
* Shows the contextual popup (edit / delete) above the chart.
|
|
234
|
+
*/ key: "openPopup",
|
|
235
|
+
value: function openPopup(figure) {
|
|
236
|
+
var _this = this;
|
|
237
|
+
if (this.j.o.readonly || !this.j.o.chart.popup.length) {
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (!this.__popup) {
|
|
241
|
+
this.__popup = new jodit_esm_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_18__.Popup(this.j, false);
|
|
242
|
+
this.__toolbar = (0,jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_20__.makeCollection)(this.j, this.__popup);
|
|
243
|
+
}
|
|
244
|
+
var popup = this.__popup;
|
|
245
|
+
var toolbar = this.__toolbar;
|
|
246
|
+
if (!toolbar) {
|
|
247
|
+
return;
|
|
248
|
+
}
|
|
249
|
+
this.__target = figure;
|
|
250
|
+
toolbar.build(this.j.o.chart.popup, figure);
|
|
251
|
+
popup.setContent(toolbar.container);
|
|
252
|
+
if (popup.isOpened) {
|
|
253
|
+
popup.updatePosition();
|
|
254
|
+
} else {
|
|
255
|
+
popup.open(function() {
|
|
256
|
+
return (0,jodit_esm_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_15__.position)(figure, _this.j);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
{
|
|
262
|
+
key: "closePopup",
|
|
263
|
+
value: function closePopup() {
|
|
264
|
+
var _this___popup;
|
|
265
|
+
this.__target = null;
|
|
266
|
+
(_this___popup = this.__popup) === null || _this___popup === void 0 ? void 0 : _this___popup.close();
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
key: "onChange",
|
|
271
|
+
value: /**
|
|
272
|
+
* Decorates charts that arrived with the value (initial load, paste) and
|
|
273
|
+
* re-renders charts whose box was changed by the resizer.
|
|
274
|
+
*/ function onChange() {
|
|
275
|
+
this.__decorateAll();
|
|
276
|
+
if (this.__target && !this.j.editor.contains(this.__target)) {
|
|
277
|
+
this.closePopup();
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
key: "__decorateAll",
|
|
283
|
+
value: function __decorateAll() {
|
|
284
|
+
var _this = this;
|
|
285
|
+
var changed = false;
|
|
286
|
+
(0,jodit_esm_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_14__.toArray)(this.j.editor.querySelectorAll("figure[".concat(_helpers__WEBPACK_IMPORTED_MODULE_11__.CHART_ATTR, "]"))).forEach(function(figure) {
|
|
287
|
+
if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.isChartElement)(figure, _this.j.o.chart.className)) {
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
;(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.decorateChart)(_this.j, figure);
|
|
291
|
+
changed = _this.__syncResized(figure) || changed;
|
|
292
|
+
changed = _this.__renderMissing(figure) || changed;
|
|
293
|
+
});
|
|
294
|
+
if (changed) {
|
|
295
|
+
this.j.synchronizeValues();
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
key: "__renderMissing",
|
|
301
|
+
value: /**
|
|
302
|
+
* A figure that carries data but no SVG (e.g. content produced by a
|
|
303
|
+
* backend) is rendered on load.
|
|
304
|
+
*/ function __renderMissing(figure) {
|
|
305
|
+
if (figure.querySelector('svg')) {
|
|
306
|
+
return false;
|
|
307
|
+
}
|
|
308
|
+
var data = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readChartData)(this.j, figure);
|
|
309
|
+
if (!data) {
|
|
310
|
+
return false;
|
|
311
|
+
}
|
|
312
|
+
;(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyChartData)(this.j, figure, data);
|
|
313
|
+
return true;
|
|
314
|
+
}
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
key: "__syncResized",
|
|
318
|
+
value: function __syncResized(figure) {
|
|
319
|
+
var data = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readChartData)(this.j, figure);
|
|
320
|
+
if (!data) {
|
|
321
|
+
return false;
|
|
322
|
+
}
|
|
323
|
+
var width = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.pixels)(figure.style.width) || data.width;
|
|
324
|
+
var height = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.pixels)(figure.style.height) || data.height;
|
|
325
|
+
if (width === data.width && height === data.height) {
|
|
326
|
+
return false;
|
|
327
|
+
}
|
|
328
|
+
;(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyChartData)(this.j, figure, (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__._)({}, data), {
|
|
329
|
+
width: width,
|
|
330
|
+
height: height
|
|
331
|
+
}));
|
|
332
|
+
return true;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
]);
|
|
336
|
+
return Chart;
|
|
337
|
+
}((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__._)(jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_16__.Plugin));
|
|
338
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(Chart, "requires", [
|
|
339
|
+
'license'
|
|
340
|
+
]);
|
|
341
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
342
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.autobind
|
|
343
|
+
], Chart.prototype, "openEditor", null);
|
|
344
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
345
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.autobind
|
|
346
|
+
], Chart.prototype, "removeChart", null);
|
|
347
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
348
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.watch)(':click')
|
|
349
|
+
], Chart.prototype, "onClick", null);
|
|
350
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
351
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.watch)(':dblclick')
|
|
352
|
+
], Chart.prototype, "onDblClick", null);
|
|
353
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
354
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.watch)(':outsideClick')
|
|
355
|
+
], Chart.prototype, "onOutsideClick", null);
|
|
356
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
|
|
357
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.watch)([
|
|
358
|
+
':change',
|
|
359
|
+
':afterSetMode'
|
|
360
|
+
]),
|
|
361
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.debounce)()
|
|
362
|
+
], Chart.prototype, "onChange", null);
|
|
363
|
+
jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_21__.JoditPro.plugins.add('chart', Chart);
|
|
364
|
+
|
|
365
|
+
|
|
366
|
+
/***/ }),
|
|
367
|
+
|
|
368
|
+
/***/ 88902:
|
|
369
|
+
/***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
|
|
370
|
+
|
|
371
|
+
"use strict";
|
|
372
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94899);
|
|
373
|
+
/* harmony import */ var _assets_chart_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(97467);
|
|
374
|
+
/* harmony import */ var _assets_chart_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_assets_chart_svg__WEBPACK_IMPORTED_MODULE_1__);
|
|
375
|
+
/* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(6441);
|
|
376
|
+
/* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(12153);
|
|
377
|
+
/*!
|
|
378
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
379
|
+
* See LICENSE.md in the project root for license information.
|
|
380
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.chart = {
|
|
386
|
+
className: 'jodit-chart',
|
|
387
|
+
types: [
|
|
388
|
+
'bar',
|
|
389
|
+
'horizontalBar',
|
|
390
|
+
'line',
|
|
391
|
+
'area',
|
|
392
|
+
'pie',
|
|
393
|
+
'donut',
|
|
394
|
+
'radar'
|
|
395
|
+
],
|
|
396
|
+
defaultType: 'bar',
|
|
397
|
+
defaultTitle: 'Sample chart',
|
|
398
|
+
defaultPoints: [
|
|
399
|
+
{
|
|
400
|
+
label: 'Item 1',
|
|
401
|
+
value: 10
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
label: 'Item 2',
|
|
405
|
+
value: 20
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
label: 'Item 3',
|
|
409
|
+
value: 15
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
label: 'Item 4',
|
|
413
|
+
value: 25
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
label: 'Item 5',
|
|
417
|
+
value: 30
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
colors: [
|
|
421
|
+
'#2a78d6',
|
|
422
|
+
'#eb6834',
|
|
423
|
+
'#1baf7a',
|
|
424
|
+
'#eda100',
|
|
425
|
+
'#e87ba4',
|
|
426
|
+
'#008300',
|
|
427
|
+
'#6250d6',
|
|
428
|
+
'#e34948'
|
|
429
|
+
],
|
|
430
|
+
defaultBackground: '#ffffff',
|
|
431
|
+
defaultTextColor: '#111827',
|
|
432
|
+
defaultBorderColor: '#e5e7eb',
|
|
433
|
+
allowChangeBackground: true,
|
|
434
|
+
allowChangeTextColor: true,
|
|
435
|
+
allowChangeBorderColor: true,
|
|
436
|
+
fontFamily: "-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif",
|
|
437
|
+
width: 600,
|
|
438
|
+
height: 400,
|
|
439
|
+
popup: [
|
|
440
|
+
'chartEdit',
|
|
441
|
+
'chartRemove'
|
|
442
|
+
],
|
|
443
|
+
dialog: {
|
|
444
|
+
width: 620,
|
|
445
|
+
height: 720
|
|
446
|
+
}
|
|
447
|
+
};
|
|
448
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.chart = {
|
|
449
|
+
tooltip: 'Insert chart',
|
|
450
|
+
icon: 'chart',
|
|
451
|
+
isActive: function isActive(editor) {
|
|
452
|
+
return Boolean(editor.e.fire('isChartEditorOpened'));
|
|
453
|
+
},
|
|
454
|
+
exec: function exec(editor) {
|
|
455
|
+
editor.e.fire('openChartEditor');
|
|
456
|
+
}
|
|
457
|
+
};
|
|
458
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.chartEdit = {
|
|
459
|
+
tooltip: 'Edit chart',
|
|
460
|
+
icon: 'pencil',
|
|
461
|
+
exec: function exec(editor, target) {
|
|
462
|
+
editor.e.fire('openChartEditor', target);
|
|
463
|
+
}
|
|
464
|
+
};
|
|
465
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.chartRemove = {
|
|
466
|
+
tooltip: 'Delete chart',
|
|
467
|
+
icon: 'bin',
|
|
468
|
+
exec: function exec(editor, target) {
|
|
469
|
+
editor.e.fire('removeChart', target);
|
|
470
|
+
}
|
|
471
|
+
};
|
|
472
|
+
jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.allowResizeTags = new Set((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.allowResizeTags).concat([
|
|
473
|
+
'figure'
|
|
474
|
+
]));
|
|
475
|
+
jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('chart', (_assets_chart_svg__WEBPACK_IMPORTED_MODULE_1___default()));
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
/***/ }),
|
|
479
|
+
|
|
480
|
+
/***/ 99131:
|
|
481
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
482
|
+
|
|
483
|
+
"use strict";
|
|
484
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
485
|
+
/* harmony export */ CHART_ATTR: function() { return /* binding */ CHART_ATTR; },
|
|
486
|
+
/* harmony export */ CHART_TYPE_TITLES: function() { return /* binding */ CHART_TYPE_TITLES; },
|
|
487
|
+
/* harmony export */ applyChartData: function() { return /* binding */ applyChartData; },
|
|
488
|
+
/* harmony export */ cloneChartData: function() { return /* binding */ cloneChartData; },
|
|
489
|
+
/* harmony export */ createChart: function() { return /* binding */ createChart; },
|
|
490
|
+
/* harmony export */ decorateChart: function() { return /* binding */ decorateChart; },
|
|
491
|
+
/* harmony export */ defaultChartData: function() { return /* binding */ defaultChartData; },
|
|
492
|
+
/* harmony export */ findChart: function() { return /* binding */ findChart; },
|
|
493
|
+
/* harmony export */ isChartElement: function() { return /* binding */ isChartElement; },
|
|
494
|
+
/* harmony export */ normalizePoint: function() { return /* binding */ normalizePoint; },
|
|
495
|
+
/* harmony export */ pixels: function() { return /* binding */ pixels; },
|
|
496
|
+
/* harmony export */ readChartData: function() { return /* binding */ readChartData; }
|
|
497
|
+
/* harmony export */ });
|
|
498
|
+
/* unused harmony exports CHART_TYPES, isChartType, normalizeChartData */
|
|
499
|
+
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56075);
|
|
500
|
+
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11886);
|
|
501
|
+
/* harmony import */ var _render__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(75787);
|
|
502
|
+
/* harmony import */ var jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(2748);
|
|
503
|
+
/* harmony import */ var jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(70799);
|
|
504
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(29960);
|
|
505
|
+
/*!
|
|
506
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
507
|
+
* See LICENSE.md in the project root for license information.
|
|
508
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
509
|
+
*/
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
var CHART_ATTR = 'data-jodit-chart';
|
|
516
|
+
var CHART_TYPES = [
|
|
517
|
+
'bar',
|
|
518
|
+
'horizontalBar',
|
|
519
|
+
'line',
|
|
520
|
+
'area',
|
|
521
|
+
'pie',
|
|
522
|
+
'donut',
|
|
523
|
+
'radar'
|
|
524
|
+
];
|
|
525
|
+
var CHART_TYPE_TITLES = {
|
|
526
|
+
bar: 'Bar chart',
|
|
527
|
+
horizontalBar: 'Horizontal bar',
|
|
528
|
+
line: 'Line chart',
|
|
529
|
+
area: 'Area chart',
|
|
530
|
+
pie: 'Pie chart',
|
|
531
|
+
donut: 'Donut chart',
|
|
532
|
+
radar: 'Radar chart'
|
|
533
|
+
};
|
|
534
|
+
function isChartType(value) {
|
|
535
|
+
return CHART_TYPES.includes(value);
|
|
536
|
+
}
|
|
537
|
+
function normalizePoint(raw) {
|
|
538
|
+
var _raw_label;
|
|
539
|
+
var value = Number(raw.value);
|
|
540
|
+
var point = {
|
|
541
|
+
label: String((_raw_label = raw.label) !== null && _raw_label !== void 0 ? _raw_label : ''),
|
|
542
|
+
value: isFinite(value) ? value : 0
|
|
543
|
+
};
|
|
544
|
+
if (raw.color) {
|
|
545
|
+
point.color = String(raw.color);
|
|
546
|
+
}
|
|
547
|
+
return point;
|
|
548
|
+
}
|
|
549
|
+
function normalizeChartData(raw, defaults) {
|
|
550
|
+
var _raw_title;
|
|
551
|
+
var width = Number(raw.width);
|
|
552
|
+
var height = Number(raw.height);
|
|
553
|
+
return {
|
|
554
|
+
type: isChartType(raw.type) ? raw.type : defaults.type,
|
|
555
|
+
title: String((_raw_title = raw.title) !== null && _raw_title !== void 0 ? _raw_title : defaults.title),
|
|
556
|
+
points: Array.isArray(raw.points) ? raw.points.map(normalizePoint) : defaults.points.map(normalizePoint),
|
|
557
|
+
width: width > 0 ? Math.round(width) : defaults.width,
|
|
558
|
+
height: height > 0 ? Math.round(height) : defaults.height,
|
|
559
|
+
background: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__.isString)(raw.background) ? raw.background : defaults.background,
|
|
560
|
+
textColor: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__.isString)(raw.textColor) ? raw.textColor : defaults.textColor,
|
|
561
|
+
borderColor: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_4__.isString)(raw.borderColor) ? raw.borderColor : defaults.borderColor
|
|
562
|
+
};
|
|
563
|
+
}
|
|
564
|
+
function cloneChartData(data) {
|
|
565
|
+
return (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__._)({}, data), {
|
|
566
|
+
points: data.points.map(function(p) {
|
|
567
|
+
return (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__._)({}, p);
|
|
568
|
+
})
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
function isChartElement(node, className) {
|
|
572
|
+
return jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.isTag(node, 'figure') && (node.hasAttribute(CHART_ATTR) || node.classList.contains(className));
|
|
573
|
+
}
|
|
574
|
+
function findChart(jodit, node) {
|
|
575
|
+
return jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_3__.Dom.closest(node, function(n) {
|
|
576
|
+
return isChartElement(n, jodit.o.chart.className);
|
|
577
|
+
}, jodit.editor);
|
|
578
|
+
}
|
|
579
|
+
function readChartData(jodit, figure) {
|
|
580
|
+
var json = (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(figure, CHART_ATTR);
|
|
581
|
+
if (!json) {
|
|
582
|
+
return null;
|
|
583
|
+
}
|
|
584
|
+
try {
|
|
585
|
+
return normalizeChartData(JSON.parse(json), defaultChartData(jodit));
|
|
586
|
+
} catch (unused) {
|
|
587
|
+
return null;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function defaultChartData(jodit) {
|
|
591
|
+
var chart = jodit.o.chart;
|
|
592
|
+
return {
|
|
593
|
+
type: chart.defaultType,
|
|
594
|
+
title: chart.defaultTitle,
|
|
595
|
+
points: chart.defaultPoints.map(normalizePoint),
|
|
596
|
+
width: chart.width,
|
|
597
|
+
height: chart.height,
|
|
598
|
+
background: chart.defaultBackground,
|
|
599
|
+
textColor: chart.defaultTextColor,
|
|
600
|
+
borderColor: chart.defaultBorderColor
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
function decorateChart(jodit, figure) {
|
|
604
|
+
;(0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(figure, {
|
|
605
|
+
class: jodit.o.chart.className,
|
|
606
|
+
contenteditable: false
|
|
607
|
+
});
|
|
608
|
+
}
|
|
609
|
+
function applyChartData(jodit, figure, data) {
|
|
610
|
+
var chart = jodit.o.chart;
|
|
611
|
+
decorateChart(jodit, figure);
|
|
612
|
+
(0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_5__.attr)(figure, CHART_ATTR, JSON.stringify(data));
|
|
613
|
+
figure.style.width = data.width + 'px';
|
|
614
|
+
figure.style.maxWidth = '100%';
|
|
615
|
+
figure.style.height = '';
|
|
616
|
+
figure.innerHTML = (0,_render__WEBPACK_IMPORTED_MODULE_2__.renderChart)(data, {
|
|
617
|
+
colors: chart.colors,
|
|
618
|
+
fontFamily: chart.fontFamily
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
function createChart(jodit, data) {
|
|
622
|
+
var figure = jodit.createInside.element('figure');
|
|
623
|
+
applyChartData(jodit, figure, data);
|
|
624
|
+
return figure;
|
|
625
|
+
}
|
|
626
|
+
function pixels(value) {
|
|
627
|
+
return /^\d+(\.\d+)?px$/.test(value) ? Math.round(parseFloat(value)) : 0;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
/***/ }),
|
|
632
|
+
|
|
633
|
+
/***/ 93054:
|
|
634
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
635
|
+
|
|
636
|
+
"use strict";
|
|
637
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
638
|
+
/* harmony export */ renderBar: function() { return /* binding */ renderBar; },
|
|
639
|
+
/* harmony export */ renderHorizontalBar: function() { return /* binding */ renderHorizontalBar; }
|
|
640
|
+
/* harmony export */ });
|
|
641
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94899);
|
|
642
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36838);
|
|
643
|
+
/*!
|
|
644
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
645
|
+
* See LICENSE.md in the project root for license information.
|
|
646
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
647
|
+
*/
|
|
648
|
+
|
|
649
|
+
function renderBar(data, options) {
|
|
650
|
+
var _Math;
|
|
651
|
+
var scale = (0,_common__WEBPACK_IMPORTED_MODULE_1__.ticks)(data.points);
|
|
652
|
+
var top = scale[scale.length - 1];
|
|
653
|
+
var yLabelWidth = (_Math = Math).max.apply(_Math, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(scale.map(function(v) {
|
|
654
|
+
return (0,_common__WEBPACK_IMPORTED_MODULE_1__.textWidth)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(v), _common__WEBPACK_IMPORTED_MODULE_1__.TICK_FONT);
|
|
655
|
+
})));
|
|
656
|
+
var box = (0,_common__WEBPACK_IMPORTED_MODULE_1__.plotBox)(data, {
|
|
657
|
+
x: yLabelWidth + 12,
|
|
658
|
+
y: 28,
|
|
659
|
+
width: 0,
|
|
660
|
+
height: 28
|
|
661
|
+
});
|
|
662
|
+
var theme = (0,_common__WEBPACK_IMPORTED_MODULE_1__.chartTheme)(data);
|
|
663
|
+
var parts = [
|
|
664
|
+
(0,_common__WEBPACK_IMPORTED_MODULE_1__.svgOpen)(data, options)
|
|
665
|
+
];
|
|
666
|
+
scale.forEach(function(v) {
|
|
667
|
+
var y = box.y + box.height - v / top * box.height;
|
|
668
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x + box.width), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y), '" stroke="').concat(theme.grid, '" stroke-dasharray="3 3"/>'), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x - 8), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y + 4), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.TICK_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="end">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(v)), "</text>"));
|
|
669
|
+
});
|
|
670
|
+
var count = data.points.length || 1;
|
|
671
|
+
var band = box.width / count;
|
|
672
|
+
var barWidth = Math.max(2, band * 0.6);
|
|
673
|
+
var baseline = box.y + box.height;
|
|
674
|
+
data.points.forEach(function(point, i) {
|
|
675
|
+
var color = (0,_common__WEBPACK_IMPORTED_MODULE_1__.pointColor)(point, i, options);
|
|
676
|
+
var value = point.value > 0 ? point.value : 0;
|
|
677
|
+
var height = value / top * box.height;
|
|
678
|
+
var x = box.x + i * band + (band - barWidth) / 2;
|
|
679
|
+
var cx = x + barWidth / 2;
|
|
680
|
+
parts.push('<path d="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.roundedBarPath)(x, baseline - height, barWidth, height, _common__WEBPACK_IMPORTED_MODULE_1__.BAR_RADIUS, 'top'), '" fill="').concat(color, '"><title>').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)(point.label), ": ").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(point.value)), "</title></path>"), (0,_common__WEBPACK_IMPORTED_MODULE_1__.valuePill)(cx, baseline - height - 18, point.value, color, theme), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(cx), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline + 20), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.LABEL_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="middle">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.truncate)(point.label)), "</text>"));
|
|
681
|
+
});
|
|
682
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x + box.width), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), '" stroke="').concat(theme.border, '"/>'), (0,_common__WEBPACK_IMPORTED_MODULE_1__.svgClose)());
|
|
683
|
+
return parts.join('');
|
|
684
|
+
}
|
|
685
|
+
function renderHorizontalBar(data, options) {
|
|
686
|
+
var _Math;
|
|
687
|
+
var scale = (0,_common__WEBPACK_IMPORTED_MODULE_1__.ticks)(data.points);
|
|
688
|
+
var top = scale[scale.length - 1];
|
|
689
|
+
var labelWidth = Math.min(160, (_Math = Math).max.apply(_Math, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(data.points.map(function(p) {
|
|
690
|
+
return (0,_common__WEBPACK_IMPORTED_MODULE_1__.textWidth)((0,_common__WEBPACK_IMPORTED_MODULE_1__.truncate)(p.label), _common__WEBPACK_IMPORTED_MODULE_1__.LABEL_FONT);
|
|
691
|
+
}))));
|
|
692
|
+
var box = (0,_common__WEBPACK_IMPORTED_MODULE_1__.plotBox)(data, {
|
|
693
|
+
x: labelWidth + 12,
|
|
694
|
+
y: 8,
|
|
695
|
+
width: 56,
|
|
696
|
+
height: 28
|
|
697
|
+
});
|
|
698
|
+
var theme = (0,_common__WEBPACK_IMPORTED_MODULE_1__.chartTheme)(data);
|
|
699
|
+
var parts = [
|
|
700
|
+
(0,_common__WEBPACK_IMPORTED_MODULE_1__.svgOpen)(data, options)
|
|
701
|
+
];
|
|
702
|
+
var bottom = box.y + box.height;
|
|
703
|
+
scale.forEach(function(v) {
|
|
704
|
+
var x = box.x + v / top * box.width;
|
|
705
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.y), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(x), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(bottom), '" stroke="').concat(theme.grid, '" stroke-dasharray="3 3"/>'), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(x), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(bottom + 18), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.TICK_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="middle">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(v)), "</text>"));
|
|
706
|
+
});
|
|
707
|
+
var count = data.points.length || 1;
|
|
708
|
+
var band = box.height / count;
|
|
709
|
+
var barHeight = Math.max(2, band * 0.6);
|
|
710
|
+
data.points.forEach(function(point, i) {
|
|
711
|
+
var color = (0,_common__WEBPACK_IMPORTED_MODULE_1__.pointColor)(point, i, options);
|
|
712
|
+
var value = point.value > 0 ? point.value : 0;
|
|
713
|
+
var width = value / top * box.width;
|
|
714
|
+
var y = box.y + i * band + (band - barHeight) / 2;
|
|
715
|
+
var cy = y + barHeight / 2;
|
|
716
|
+
parts.push('<path d="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.roundedBarPath)(box.x, y, width, barHeight, _common__WEBPACK_IMPORTED_MODULE_1__.BAR_RADIUS, 'right'), '" fill="').concat(color, '"><title>').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)(point.label), ": ").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(point.value)), "</title></path>"), (0,_common__WEBPACK_IMPORTED_MODULE_1__.valuePill)(box.x + width + 12 + (0,_common__WEBPACK_IMPORTED_MODULE_1__.textWidth)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(point.value), _common__WEBPACK_IMPORTED_MODULE_1__.LABEL_FONT) / 2 + 8, cy, point.value, color, theme), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x - 12), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(cy + 4.5), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.LABEL_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="end">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.truncate)(point.label)), "</text>"));
|
|
717
|
+
});
|
|
718
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.y), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(bottom), '" stroke="').concat(theme.border, '"/>'), (0,_common__WEBPACK_IMPORTED_MODULE_1__.svgClose)());
|
|
719
|
+
return parts.join('');
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
/***/ }),
|
|
724
|
+
|
|
725
|
+
/***/ 36838:
|
|
726
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
727
|
+
|
|
728
|
+
"use strict";
|
|
729
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
730
|
+
/* harmony export */ BAR_RADIUS: function() { return /* binding */ BAR_RADIUS; },
|
|
731
|
+
/* harmony export */ DEFAULT_BACKGROUND: function() { return /* binding */ DEFAULT_BACKGROUND; },
|
|
732
|
+
/* harmony export */ DEFAULT_TEXT_COLOR: function() { return /* binding */ DEFAULT_TEXT_COLOR; },
|
|
733
|
+
/* harmony export */ LABEL_FONT: function() { return /* binding */ LABEL_FONT; },
|
|
734
|
+
/* harmony export */ PAD: function() { return /* binding */ PAD; },
|
|
735
|
+
/* harmony export */ TICK_FONT: function() { return /* binding */ TICK_FONT; },
|
|
736
|
+
/* harmony export */ TITLE_HEIGHT: function() { return /* binding */ TITLE_HEIGHT; },
|
|
737
|
+
/* harmony export */ chartTheme: function() { return /* binding */ chartTheme; },
|
|
738
|
+
/* harmony export */ esc: function() { return /* binding */ esc; },
|
|
739
|
+
/* harmony export */ formatValue: function() { return /* binding */ formatValue; },
|
|
740
|
+
/* harmony export */ num: function() { return /* binding */ num; },
|
|
741
|
+
/* harmony export */ plotBox: function() { return /* binding */ plotBox; },
|
|
742
|
+
/* harmony export */ pointColor: function() { return /* binding */ pointColor; },
|
|
743
|
+
/* harmony export */ roundedBarPath: function() { return /* binding */ roundedBarPath; },
|
|
744
|
+
/* harmony export */ svgClose: function() { return /* binding */ svgClose; },
|
|
745
|
+
/* harmony export */ svgOpen: function() { return /* binding */ svgOpen; },
|
|
746
|
+
/* harmony export */ textWidth: function() { return /* binding */ textWidth; },
|
|
747
|
+
/* harmony export */ ticks: function() { return /* binding */ ticks; },
|
|
748
|
+
/* harmony export */ truncate: function() { return /* binding */ truncate; },
|
|
749
|
+
/* harmony export */ valuePill: function() { return /* binding */ valuePill; }
|
|
750
|
+
/* harmony export */ });
|
|
751
|
+
/* unused harmony exports TICK_COUNT, MAX_LABEL, niceStep, renderTitle */
|
|
752
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(43284);
|
|
753
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(94899);
|
|
754
|
+
/*!
|
|
755
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
756
|
+
* See LICENSE.md in the project root for license information.
|
|
757
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
758
|
+
*/
|
|
759
|
+
|
|
760
|
+
var PAD = 24;
|
|
761
|
+
var TITLE_HEIGHT = 40;
|
|
762
|
+
var LABEL_FONT = 13;
|
|
763
|
+
var TICK_FONT = 12;
|
|
764
|
+
var TICK_COUNT = 4;
|
|
765
|
+
var BAR_RADIUS = 4;
|
|
766
|
+
var MAX_LABEL = 14;
|
|
767
|
+
var DEFAULT_BACKGROUND = '#ffffff';
|
|
768
|
+
var DEFAULT_TEXT_COLOR = '#111827';
|
|
769
|
+
function alpha(hex, opacity) {
|
|
770
|
+
var m = /^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(hex);
|
|
771
|
+
if (!m) {
|
|
772
|
+
return hex;
|
|
773
|
+
}
|
|
774
|
+
var _map = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_0__._)([
|
|
775
|
+
m[1],
|
|
776
|
+
m[2],
|
|
777
|
+
m[3]
|
|
778
|
+
].map(function(c) {
|
|
779
|
+
return parseInt(c, 16);
|
|
780
|
+
}), 3), r = _map[0], g = _map[1], b = _map[2];
|
|
781
|
+
return "rgba(".concat(r, ", ").concat(g, ", ").concat(b, ", ").concat(opacity, ")");
|
|
782
|
+
}
|
|
783
|
+
/**
|
|
784
|
+
* Colors derived from the chart background and text color so grids, axes and
|
|
785
|
+
* secondary labels stay readable on light and dark surfaces alike.
|
|
786
|
+
*/ function chartTheme(data) {
|
|
787
|
+
var _data_background;
|
|
788
|
+
var ink = data.textColor || DEFAULT_TEXT_COLOR;
|
|
789
|
+
var background = (_data_background = data.background) !== null && _data_background !== void 0 ? _data_background : DEFAULT_BACKGROUND;
|
|
790
|
+
return {
|
|
791
|
+
surface: background || DEFAULT_BACKGROUND,
|
|
792
|
+
transparent: !background,
|
|
793
|
+
border: data.borderColor || alpha(ink, 0.12),
|
|
794
|
+
grid: alpha(ink, 0.12),
|
|
795
|
+
ink: ink,
|
|
796
|
+
inkSecondary: alpha(ink, 0.8),
|
|
797
|
+
inkMuted: alpha(ink, 0.6)
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
// DOM-free so the renderers can run outside the browser (SSR, tests).
|
|
801
|
+
function esc(value) {
|
|
802
|
+
return String(value).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
|
|
803
|
+
}
|
|
804
|
+
function num(value) {
|
|
805
|
+
return String(Math.round(value * 100) / 100);
|
|
806
|
+
}
|
|
807
|
+
function formatValue(value) {
|
|
808
|
+
return num(value).replace(/\B(?=(\d{3})+(?!\d))/g, ' ');
|
|
809
|
+
}
|
|
810
|
+
function truncate(label) {
|
|
811
|
+
var max = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : MAX_LABEL;
|
|
812
|
+
return label.length > max ? label.slice(0, max - 1) + '…' : label;
|
|
813
|
+
}
|
|
814
|
+
function pointColor(point, index, options) {
|
|
815
|
+
var colors = options.colors;
|
|
816
|
+
return point.color || colors[index % colors.length] || '#2a78d6';
|
|
817
|
+
}
|
|
818
|
+
function niceStep(rawStep) {
|
|
819
|
+
var _candidates_find;
|
|
820
|
+
if (rawStep <= 0) {
|
|
821
|
+
return 1;
|
|
822
|
+
}
|
|
823
|
+
var magnitude = Math.pow(10, Math.floor(Math.log10(rawStep)));
|
|
824
|
+
var normalized = rawStep / magnitude;
|
|
825
|
+
var candidates = [
|
|
826
|
+
1,
|
|
827
|
+
2,
|
|
828
|
+
2.5,
|
|
829
|
+
5,
|
|
830
|
+
10
|
|
831
|
+
];
|
|
832
|
+
var step = (_candidates_find = candidates.find(function(c) {
|
|
833
|
+
return c >= normalized;
|
|
834
|
+
})) !== null && _candidates_find !== void 0 ? _candidates_find : 10;
|
|
835
|
+
return step * magnitude;
|
|
836
|
+
}
|
|
837
|
+
function ticks(points) {
|
|
838
|
+
var _Math;
|
|
839
|
+
var max = (_Math = Math).max.apply(_Math, [
|
|
840
|
+
0
|
|
841
|
+
].concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_1__._)(points.map(function(p) {
|
|
842
|
+
return p.value > 0 ? p.value : 0;
|
|
843
|
+
}))));
|
|
844
|
+
var step = niceStep((max || 1) / TICK_COUNT);
|
|
845
|
+
var top = Math.max(step, Math.ceil(max / step) * step);
|
|
846
|
+
var result = [];
|
|
847
|
+
for(var v = 0; v <= top + step / 2; v += step){
|
|
848
|
+
result.push(Math.round(v * 1000) / 1000);
|
|
849
|
+
}
|
|
850
|
+
return result;
|
|
851
|
+
}
|
|
852
|
+
function textWidth(text, fontSize) {
|
|
853
|
+
return text.length * fontSize * 0.58;
|
|
854
|
+
}
|
|
855
|
+
function plotBox(data, margin) {
|
|
856
|
+
var top = PAD + (data.title ? TITLE_HEIGHT : 0) + margin.y;
|
|
857
|
+
return {
|
|
858
|
+
x: PAD + margin.x,
|
|
859
|
+
y: top,
|
|
860
|
+
width: Math.max(10, data.width - PAD * 2 - margin.x - margin.width),
|
|
861
|
+
height: Math.max(10, data.height - top - PAD - margin.height)
|
|
862
|
+
};
|
|
863
|
+
}
|
|
864
|
+
function svgOpen(data, options) {
|
|
865
|
+
var theme = chartTheme(data);
|
|
866
|
+
var label = data.title ? ' aria-label="'.concat(esc(data.title), '"') : '';
|
|
867
|
+
var card = theme.transparent ? '' : '<rect x="0.5" y="0.5" width="'.concat(data.width - 1, '" height="').concat(data.height - 1, '" rx="12" fill="').concat(theme.surface, '" stroke="').concat(theme.border, '"/>');
|
|
868
|
+
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 '.concat(data.width, " ").concat(data.height, '" width="100%" role="img"').concat(label, ' font-family="').concat(esc(options.fontFamily), '">') + card + renderTitle(data, theme);
|
|
869
|
+
}
|
|
870
|
+
function svgClose() {
|
|
871
|
+
return '</svg>';
|
|
872
|
+
}
|
|
873
|
+
function renderTitle(data, theme) {
|
|
874
|
+
if (!data.title) {
|
|
875
|
+
return '';
|
|
876
|
+
}
|
|
877
|
+
return '<text x="'.concat(PAD, '" y="').concat(PAD + 20, '" font-size="20" font-weight="600" fill="').concat(theme.ink, '">').concat(esc(data.title), "</text>");
|
|
878
|
+
}
|
|
879
|
+
function roundedBarPath(x, y, width, height, radius, side) {
|
|
880
|
+
if (height <= 0 || width <= 0) {
|
|
881
|
+
return '';
|
|
882
|
+
}
|
|
883
|
+
var r = Math.min(radius, width / 2, height / 2);
|
|
884
|
+
if (side === 'top') {
|
|
885
|
+
return [
|
|
886
|
+
"M".concat(num(x), ",").concat(num(y + height)),
|
|
887
|
+
"V".concat(num(y + r)),
|
|
888
|
+
"a".concat(num(r), ",").concat(num(r), " 0 0 1 ").concat(num(r), ",").concat(num(-r)),
|
|
889
|
+
"h".concat(num(width - r * 2)),
|
|
890
|
+
"a".concat(num(r), ",").concat(num(r), " 0 0 1 ").concat(num(r), ",").concat(num(r)),
|
|
891
|
+
"V".concat(num(y + height)),
|
|
892
|
+
'Z'
|
|
893
|
+
].join('');
|
|
894
|
+
}
|
|
895
|
+
return [
|
|
896
|
+
"M".concat(num(x), ",").concat(num(y)),
|
|
897
|
+
"H".concat(num(x + width - r)),
|
|
898
|
+
"a".concat(num(r), ",").concat(num(r), " 0 0 1 ").concat(num(r), ",").concat(num(r)),
|
|
899
|
+
"v".concat(num(height - r * 2)),
|
|
900
|
+
"a".concat(num(r), ",").concat(num(r), " 0 0 1 ").concat(num(-r), ",").concat(num(r)),
|
|
901
|
+
"H".concat(num(x)),
|
|
902
|
+
'Z'
|
|
903
|
+
].join('');
|
|
904
|
+
}
|
|
905
|
+
function valuePill(cx, cy, value, color, theme) {
|
|
906
|
+
var text = formatValue(value);
|
|
907
|
+
var width = textWidth(text, LABEL_FONT) + 16;
|
|
908
|
+
var height = 22;
|
|
909
|
+
return '<rect x="'.concat(num(cx - width / 2), '" y="').concat(num(cy - height / 2), '" width="').concat(num(width), '" height="').concat(height, '" rx="6" fill="').concat(color, '" fill-opacity="0.14"/>') + '<text x="'.concat(num(cx), '" y="').concat(num(cy + 4.5), '" font-size="').concat(LABEL_FONT, '" font-weight="600" fill="').concat(theme.inkSecondary, '" text-anchor="middle">').concat(esc(text), "</text>");
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
|
|
913
|
+
/***/ }),
|
|
914
|
+
|
|
915
|
+
/***/ 75787:
|
|
916
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
917
|
+
|
|
918
|
+
"use strict";
|
|
919
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
920
|
+
/* harmony export */ renderChart: function() { return /* binding */ renderChart; }
|
|
921
|
+
/* harmony export */ });
|
|
922
|
+
/* harmony import */ var _bar__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(93054);
|
|
923
|
+
/* harmony import */ var _line__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(73077);
|
|
924
|
+
/* harmony import */ var _pie__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(83349);
|
|
925
|
+
/* harmony import */ var _radar__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(67407);
|
|
926
|
+
/*!
|
|
927
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
928
|
+
* See LICENSE.md in the project root for license information.
|
|
929
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
930
|
+
*/
|
|
931
|
+
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
function renderChart(data, options) {
|
|
935
|
+
switch(data.type){
|
|
936
|
+
case 'horizontalBar':
|
|
937
|
+
return (0,_bar__WEBPACK_IMPORTED_MODULE_0__.renderHorizontalBar)(data, options);
|
|
938
|
+
case 'line':
|
|
939
|
+
return (0,_line__WEBPACK_IMPORTED_MODULE_1__.renderLine)(data, options, false);
|
|
940
|
+
case 'area':
|
|
941
|
+
return (0,_line__WEBPACK_IMPORTED_MODULE_1__.renderLine)(data, options, true);
|
|
942
|
+
case 'radar':
|
|
943
|
+
return (0,_radar__WEBPACK_IMPORTED_MODULE_3__.renderRadar)(data, options);
|
|
944
|
+
case 'pie':
|
|
945
|
+
return (0,_pie__WEBPACK_IMPORTED_MODULE_2__.renderPie)(data, options, false);
|
|
946
|
+
case 'donut':
|
|
947
|
+
return (0,_pie__WEBPACK_IMPORTED_MODULE_2__.renderPie)(data, options, true);
|
|
948
|
+
default:
|
|
949
|
+
return (0,_bar__WEBPACK_IMPORTED_MODULE_0__.renderBar)(data, options);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
|
|
954
|
+
/***/ }),
|
|
955
|
+
|
|
956
|
+
/***/ 73077:
|
|
957
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
958
|
+
|
|
959
|
+
"use strict";
|
|
960
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
961
|
+
/* harmony export */ renderLine: function() { return /* binding */ renderLine; }
|
|
962
|
+
/* harmony export */ });
|
|
963
|
+
/* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94899);
|
|
964
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(36838);
|
|
965
|
+
/*!
|
|
966
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
967
|
+
* See LICENSE.md in the project root for license information.
|
|
968
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
969
|
+
*/
|
|
970
|
+
|
|
971
|
+
function renderLine(data, options, area) {
|
|
972
|
+
var _Math;
|
|
973
|
+
var scale = (0,_common__WEBPACK_IMPORTED_MODULE_1__.ticks)(data.points);
|
|
974
|
+
var top = scale[scale.length - 1];
|
|
975
|
+
var yLabelWidth = (_Math = Math).max.apply(_Math, (0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(scale.map(function(v) {
|
|
976
|
+
return (0,_common__WEBPACK_IMPORTED_MODULE_1__.textWidth)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(v), _common__WEBPACK_IMPORTED_MODULE_1__.TICK_FONT);
|
|
977
|
+
})));
|
|
978
|
+
var box = (0,_common__WEBPACK_IMPORTED_MODULE_1__.plotBox)(data, {
|
|
979
|
+
x: yLabelWidth + 12,
|
|
980
|
+
y: 28,
|
|
981
|
+
width: 0,
|
|
982
|
+
height: 28
|
|
983
|
+
});
|
|
984
|
+
var theme = (0,_common__WEBPACK_IMPORTED_MODULE_1__.chartTheme)(data);
|
|
985
|
+
var parts = [
|
|
986
|
+
(0,_common__WEBPACK_IMPORTED_MODULE_1__.svgOpen)(data, options)
|
|
987
|
+
];
|
|
988
|
+
var baseline = box.y + box.height;
|
|
989
|
+
scale.forEach(function(v) {
|
|
990
|
+
var y = baseline - v / top * box.height;
|
|
991
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x + box.width), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y), '" stroke="').concat(theme.grid, '" stroke-dasharray="3 3"/>'), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x - 8), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y + 4), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.TICK_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="end">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(v)), "</text>"));
|
|
992
|
+
});
|
|
993
|
+
var count = data.points.length || 1;
|
|
994
|
+
var band = box.width / count;
|
|
995
|
+
// A single series wears a single color: the first point's color (or the
|
|
996
|
+
// first palette slot) is the color of the whole line.
|
|
997
|
+
var color = data.points.length ? (0,_common__WEBPACK_IMPORTED_MODULE_1__.pointColor)(data.points[0], 0, options) : options.colors[0];
|
|
998
|
+
var coords = data.points.map(function(point, i) {
|
|
999
|
+
return {
|
|
1000
|
+
x: box.x + i * band + band / 2,
|
|
1001
|
+
y: baseline - (point.value > 0 ? point.value : 0) / top * box.height
|
|
1002
|
+
};
|
|
1003
|
+
});
|
|
1004
|
+
if (coords.length > 1) {
|
|
1005
|
+
var d = coords.map(function(c, i) {
|
|
1006
|
+
return "".concat(i ? 'L' : 'M').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(c.x), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(c.y));
|
|
1007
|
+
}).join('');
|
|
1008
|
+
if (area) {
|
|
1009
|
+
parts.push('<path d="'.concat(d, "L").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(coords[coords.length - 1].x), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), "L").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(coords[0].x), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), 'Z" fill="').concat(color, '" fill-opacity="0.18"/>'));
|
|
1010
|
+
}
|
|
1011
|
+
parts.push('<path d="'.concat(d, '" fill="none" stroke="').concat(color, '" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"/>'));
|
|
1012
|
+
}
|
|
1013
|
+
data.points.forEach(function(point, i) {
|
|
1014
|
+
var _coords_i = coords[i], x = _coords_i.x, y = _coords_i.y;
|
|
1015
|
+
parts.push('<circle cx="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(x), '" cy="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(y), '" r="5" fill="').concat(color, '" stroke="').concat(theme.surface, '" stroke-width="2"><title>').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)(point.label), ": ").concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.formatValue)(point.value)), "</title></circle>"), (0,_common__WEBPACK_IMPORTED_MODULE_1__.valuePill)(x, y - 20, point.value, color, theme), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(x), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline + 20), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_1__.LABEL_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="middle">').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_1__.truncate)(point.label)), "</text>"));
|
|
1016
|
+
});
|
|
1017
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(box.x + box.width), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_1__.num)(baseline), '" stroke="').concat(theme.border, '"/>'), (0,_common__WEBPACK_IMPORTED_MODULE_1__.svgClose)());
|
|
1018
|
+
return parts.join('');
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
|
|
1022
|
+
/***/ }),
|
|
1023
|
+
|
|
1024
|
+
/***/ 83349:
|
|
1025
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1026
|
+
|
|
1027
|
+
"use strict";
|
|
1028
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1029
|
+
/* harmony export */ renderPie: function() { return /* binding */ renderPie; }
|
|
1030
|
+
/* harmony export */ });
|
|
1031
|
+
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(56075);
|
|
1032
|
+
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(11886);
|
|
1033
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(36838);
|
|
1034
|
+
/*!
|
|
1035
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1036
|
+
* See LICENSE.md in the project root for license information.
|
|
1037
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1038
|
+
*/
|
|
1039
|
+
|
|
1040
|
+
|
|
1041
|
+
var LEGEND_WIDTH = 180;
|
|
1042
|
+
var LEGEND_ROW = 26;
|
|
1043
|
+
var STACK_BELOW = 420;
|
|
1044
|
+
var MIN_PIE = 160;
|
|
1045
|
+
function polar(cx, cy, r, angle) {
|
|
1046
|
+
return "".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cx + r * Math.cos(angle)), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cy + r * Math.sin(angle)));
|
|
1047
|
+
}
|
|
1048
|
+
function slicePath(cx, cy, outer, inner, start, end) {
|
|
1049
|
+
var full = end - start >= Math.PI * 2 - 0.0001;
|
|
1050
|
+
if (full) {
|
|
1051
|
+
var ring = inner ? " M".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cx - inner), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cy), " a").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), " 0 1 0 ").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner * 2), ",0 a").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), " 0 1 0 ").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(-inner * 2), ",0") : '';
|
|
1052
|
+
return "M".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cx - outer), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cy), " a").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), " 0 1 0 ").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer * 2), ",0 a").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), " 0 1 0 ").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(-outer * 2), ",0").concat(ring);
|
|
1053
|
+
}
|
|
1054
|
+
var large = end - start > Math.PI ? 1 : 0;
|
|
1055
|
+
var path = [
|
|
1056
|
+
"M".concat(polar(cx, cy, outer, start)),
|
|
1057
|
+
"A".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(outer), " 0 ").concat(large, " 1 ").concat(polar(cx, cy, outer, end))
|
|
1058
|
+
];
|
|
1059
|
+
if (inner) {
|
|
1060
|
+
path.push("L".concat(polar(cx, cy, inner, end)), "A".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(inner), " 0 ").concat(large, " 0 ").concat(polar(cx, cy, inner, start)));
|
|
1061
|
+
} else {
|
|
1062
|
+
path.push("L".concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cx), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cy)));
|
|
1063
|
+
}
|
|
1064
|
+
return path.join('') + 'Z';
|
|
1065
|
+
}
|
|
1066
|
+
function renderPie(data, options, donut) {
|
|
1067
|
+
var points = data.points.filter(function(p) {
|
|
1068
|
+
return p.value > 0;
|
|
1069
|
+
});
|
|
1070
|
+
var total = points.reduce(function(sum, p) {
|
|
1071
|
+
return sum + p.value;
|
|
1072
|
+
}, 0);
|
|
1073
|
+
// Narrow charts stack the legend under the pie and grow in height so the
|
|
1074
|
+
// pie keeps a readable size; wide ones keep the legend aside.
|
|
1075
|
+
var stacked = data.width < STACK_BELOW;
|
|
1076
|
+
var legendWidth = stacked ? data.width - _common__WEBPACK_IMPORTED_MODULE_2__.PAD * 2 : Math.min(LEGEND_WIDTH, Math.max(120, data.width * 0.3));
|
|
1077
|
+
var legendHeight = points.length * LEGEND_ROW;
|
|
1078
|
+
if (stacked) {
|
|
1079
|
+
var needed = _common__WEBPACK_IMPORTED_MODULE_2__.PAD * 2 + (data.title ? _common__WEBPACK_IMPORTED_MODULE_2__.TITLE_HEIGHT : 0) + MIN_PIE + legendHeight + _common__WEBPACK_IMPORTED_MODULE_2__.PAD / 2;
|
|
1080
|
+
data = (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_1__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_0__._)({}, data), {
|
|
1081
|
+
height: Math.max(data.height, needed)
|
|
1082
|
+
});
|
|
1083
|
+
}
|
|
1084
|
+
var box = (0,_common__WEBPACK_IMPORTED_MODULE_2__.plotBox)(data, {
|
|
1085
|
+
x: 0,
|
|
1086
|
+
y: 0,
|
|
1087
|
+
width: stacked ? 0 : legendWidth + _common__WEBPACK_IMPORTED_MODULE_2__.PAD,
|
|
1088
|
+
height: stacked ? legendHeight + _common__WEBPACK_IMPORTED_MODULE_2__.PAD / 2 : 0
|
|
1089
|
+
});
|
|
1090
|
+
var outer = Math.max(10, Math.min(box.width, box.height) / 2 - 4);
|
|
1091
|
+
var inner = donut ? outer * 0.58 : 0;
|
|
1092
|
+
var cx = box.x + box.width / 2;
|
|
1093
|
+
var cy = box.y + box.height / 2;
|
|
1094
|
+
var theme = (0,_common__WEBPACK_IMPORTED_MODULE_2__.chartTheme)(data);
|
|
1095
|
+
var parts = [
|
|
1096
|
+
(0,_common__WEBPACK_IMPORTED_MODULE_2__.svgOpen)(data, options)
|
|
1097
|
+
];
|
|
1098
|
+
var angle = -Math.PI / 2;
|
|
1099
|
+
points.forEach(function(point, i) {
|
|
1100
|
+
var color = (0,_common__WEBPACK_IMPORTED_MODULE_2__.pointColor)(point, i, options);
|
|
1101
|
+
var sweep = total ? point.value / total * Math.PI * 2 : 0;
|
|
1102
|
+
var percent = total ? Math.round(point.value / total * 1000) / 10 : 0;
|
|
1103
|
+
parts.push('<path d="'.concat(slicePath(cx, cy, outer, inner, angle, angle + sweep), '" fill="').concat(color, '" stroke="').concat(theme.surface, '" stroke-width="2" fill-rule="evenodd"><title>').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.esc)(point.label), ": ").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_2__.formatValue)(point.value)), " (").concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(percent), "%)</title></path>"));
|
|
1104
|
+
angle += sweep;
|
|
1105
|
+
});
|
|
1106
|
+
if (donut && total) {
|
|
1107
|
+
parts.push('<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cx), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(cy + 7), '" font-size="20" font-weight="600" fill="').concat(theme.ink, '" text-anchor="middle">').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_2__.formatValue)(total)), "</text>"));
|
|
1108
|
+
}
|
|
1109
|
+
var legendX = stacked ? _common__WEBPACK_IMPORTED_MODULE_2__.PAD : data.width - _common__WEBPACK_IMPORTED_MODULE_2__.PAD - legendWidth;
|
|
1110
|
+
// Room for the label between the swatch and the right-aligned percent.
|
|
1111
|
+
var labelChars = Math.max(6, Math.floor((legendWidth - 22 - 48) / (_common__WEBPACK_IMPORTED_MODULE_2__.LABEL_FONT * 0.58)));
|
|
1112
|
+
var legendY = stacked ? box.y + box.height + _common__WEBPACK_IMPORTED_MODULE_2__.PAD / 2 + LEGEND_ROW / 2 : cy - legendHeight / 2 + LEGEND_ROW / 2;
|
|
1113
|
+
points.forEach(function(point, i) {
|
|
1114
|
+
var color = (0,_common__WEBPACK_IMPORTED_MODULE_2__.pointColor)(point, i, options);
|
|
1115
|
+
var y = legendY + i * LEGEND_ROW;
|
|
1116
|
+
var percent = total ? Math.round(point.value / total * 1000) / 10 : 0;
|
|
1117
|
+
parts.push('<rect x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(legendX), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(y - 7), '" width="14" height="14" rx="4" fill="').concat(color, '"/>'), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(legendX + 22), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(y + 4.5), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_2__.LABEL_FONT, '" fill="').concat(theme.inkSecondary, '">').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_2__.truncate)(point.label, labelChars)), "</text>"), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(legendX + legendWidth), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(y + 4.5), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_2__.LABEL_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="end">').concat((0,_common__WEBPACK_IMPORTED_MODULE_2__.num)(percent), "%</text>"));
|
|
1118
|
+
});
|
|
1119
|
+
parts.push((0,_common__WEBPACK_IMPORTED_MODULE_2__.svgClose)());
|
|
1120
|
+
return parts.join('');
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
|
|
1124
|
+
/***/ }),
|
|
1125
|
+
|
|
1126
|
+
/***/ 67407:
|
|
1127
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1128
|
+
|
|
1129
|
+
"use strict";
|
|
1130
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1131
|
+
/* harmony export */ renderRadar: function() { return /* binding */ renderRadar; }
|
|
1132
|
+
/* harmony export */ });
|
|
1133
|
+
/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(36838);
|
|
1134
|
+
/*!
|
|
1135
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1136
|
+
* See LICENSE.md in the project root for license information.
|
|
1137
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1138
|
+
*/
|
|
1139
|
+
var LABEL_GAP = 18;
|
|
1140
|
+
function spoke(cx, cy, radius, index, count) {
|
|
1141
|
+
var angle = -Math.PI / 2 + index / count * Math.PI * 2;
|
|
1142
|
+
return {
|
|
1143
|
+
x: cx + radius * Math.cos(angle),
|
|
1144
|
+
y: cy + radius * Math.sin(angle),
|
|
1145
|
+
angle: angle
|
|
1146
|
+
};
|
|
1147
|
+
}
|
|
1148
|
+
function anchor(angle) {
|
|
1149
|
+
var cos = Math.cos(angle);
|
|
1150
|
+
if (Math.abs(cos) < 0.2) {
|
|
1151
|
+
return 'middle';
|
|
1152
|
+
}
|
|
1153
|
+
return cos > 0 ? 'start' : 'end';
|
|
1154
|
+
}
|
|
1155
|
+
function renderRadar(data, options) {
|
|
1156
|
+
var scale = (0,_common__WEBPACK_IMPORTED_MODULE_0__.ticks)(data.points);
|
|
1157
|
+
var top = scale[scale.length - 1];
|
|
1158
|
+
var box = (0,_common__WEBPACK_IMPORTED_MODULE_0__.plotBox)(data, {
|
|
1159
|
+
x: 60,
|
|
1160
|
+
y: 24,
|
|
1161
|
+
width: 60,
|
|
1162
|
+
height: 24
|
|
1163
|
+
});
|
|
1164
|
+
var cx = box.x + box.width / 2;
|
|
1165
|
+
var cy = box.y + box.height / 2;
|
|
1166
|
+
var radius = Math.max(10, Math.min(box.width, box.height) / 2 - 4);
|
|
1167
|
+
var count = Math.max(1, data.points.length);
|
|
1168
|
+
var theme = (0,_common__WEBPACK_IMPORTED_MODULE_0__.chartTheme)(data);
|
|
1169
|
+
var parts = [
|
|
1170
|
+
(0,_common__WEBPACK_IMPORTED_MODULE_0__.svgOpen)(data, options)
|
|
1171
|
+
];
|
|
1172
|
+
var color = data.points.length ? (0,_common__WEBPACK_IMPORTED_MODULE_0__.pointColor)(data.points[0], 0, options) : options.colors[0];
|
|
1173
|
+
// Concentric rings for the tick values, the outer one carries the label.
|
|
1174
|
+
scale.forEach(function(v, i) {
|
|
1175
|
+
if (!v) {
|
|
1176
|
+
return;
|
|
1177
|
+
}
|
|
1178
|
+
var r = v / top * radius;
|
|
1179
|
+
var ring = data.points.map(function(_, index) {
|
|
1180
|
+
return spoke(cx, cy, r, index, count);
|
|
1181
|
+
}).map(function(p, index) {
|
|
1182
|
+
return "".concat(index ? 'L' : 'M').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(p.x), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(p.y));
|
|
1183
|
+
}).join('');
|
|
1184
|
+
parts.push(count > 2 ? '<path d="'.concat(ring, 'Z" fill="none" stroke="').concat(theme.grid, '" stroke-dasharray="3 3"/>') : '<circle cx="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cx), '" cy="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cy), '" r="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(r), '" fill="none" stroke="').concat(theme.grid, '" stroke-dasharray="3 3"/>'), i === scale.length - 1 ? '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cx + 6), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cy - r + 12), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_0__.TICK_FONT, '" fill="').concat(theme.inkMuted, '">').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_0__.formatValue)(v)), "</text>") : '');
|
|
1185
|
+
});
|
|
1186
|
+
data.points.forEach(function(point, i) {
|
|
1187
|
+
var end = spoke(cx, cy, radius, i, count);
|
|
1188
|
+
var label = spoke(cx, cy, radius + LABEL_GAP, i, count);
|
|
1189
|
+
parts.push('<line x1="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cx), '" y1="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(cy), '" x2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(end.x), '" y2="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(end.y), '" stroke="').concat(theme.grid, '"/>'), '<text x="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(label.x), '" y="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(label.y + 4.5), '" font-size="').concat(_common__WEBPACK_IMPORTED_MODULE_0__.LABEL_FONT, '" fill="').concat(theme.inkMuted, '" text-anchor="').concat(anchor(label.angle), '">').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_0__.truncate)(point.label)), "</text>"));
|
|
1190
|
+
});
|
|
1191
|
+
var coords = data.points.map(function(point, i) {
|
|
1192
|
+
return spoke(cx, cy, (point.value > 0 ? point.value : 0) / top * radius, i, count);
|
|
1193
|
+
});
|
|
1194
|
+
if (coords.length > 1) {
|
|
1195
|
+
var d = coords.map(function(c, i) {
|
|
1196
|
+
return "".concat(i ? 'L' : 'M').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(c.x), ",").concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(c.y));
|
|
1197
|
+
}).join('');
|
|
1198
|
+
parts.push('<path d="'.concat(d, 'Z" fill="').concat(color, '" fill-opacity="0.18" stroke="').concat(color, '" stroke-width="2" stroke-linejoin="round"/>'));
|
|
1199
|
+
}
|
|
1200
|
+
data.points.forEach(function(point, i) {
|
|
1201
|
+
var _coords_i = coords[i], x = _coords_i.x, y = _coords_i.y;
|
|
1202
|
+
parts.push('<circle cx="'.concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(x), '" cy="').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.num)(y), '" r="5" fill="').concat(color, '" stroke="').concat(theme.surface, '" stroke-width="2"><title>').concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.esc)(point.label), ": ").concat((0,_common__WEBPACK_IMPORTED_MODULE_0__.esc)((0,_common__WEBPACK_IMPORTED_MODULE_0__.formatValue)(point.value)), "</title></circle>"));
|
|
1203
|
+
});
|
|
1204
|
+
parts.push((0,_common__WEBPACK_IMPORTED_MODULE_0__.svgClose)());
|
|
1205
|
+
return parts.join('');
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
|
|
1209
|
+
/***/ }),
|
|
1210
|
+
|
|
1211
|
+
/***/ 90142:
|
|
1212
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1213
|
+
|
|
1214
|
+
"use strict";
|
|
1215
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1216
|
+
/* harmony export */ UIChartEditor: function() { return /* binding */ UIChartEditor; }
|
|
1217
|
+
/* harmony export */ });
|
|
1218
|
+
/* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
|
|
1219
|
+
/* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
|
|
1220
|
+
/* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
|
|
1221
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
|
|
1222
|
+
/* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766);
|
|
1223
|
+
/* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56075);
|
|
1224
|
+
/* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11886);
|
|
1225
|
+
/* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43284);
|
|
1226
|
+
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(31635);
|
|
1227
|
+
/* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(99131);
|
|
1228
|
+
/* harmony import */ var _render__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(75787);
|
|
1229
|
+
/* harmony import */ var _render_common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(36838);
|
|
1230
|
+
/* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65478);
|
|
1231
|
+
/* harmony import */ var jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(2748);
|
|
1232
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(38837);
|
|
1233
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(29960);
|
|
1234
|
+
/* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(67510);
|
|
1235
|
+
/*!
|
|
1236
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
1237
|
+
* See LICENSE.md in the project root for license information.
|
|
1238
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
1239
|
+
*/
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
|
|
1243
|
+
|
|
1244
|
+
|
|
1245
|
+
|
|
1246
|
+
|
|
1247
|
+
|
|
1248
|
+
|
|
1249
|
+
|
|
1250
|
+
|
|
1251
|
+
|
|
1252
|
+
|
|
1253
|
+
|
|
1254
|
+
|
|
1255
|
+
|
|
1256
|
+
|
|
1257
|
+
var UIChartEditor = /*#__PURE__*/ function(UIElement) {
|
|
1258
|
+
"use strict";
|
|
1259
|
+
(0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(UIChartEditor, UIElement);
|
|
1260
|
+
function UIChartEditor(jodit) {
|
|
1261
|
+
(0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UIChartEditor);
|
|
1262
|
+
var _this;
|
|
1263
|
+
_this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIChartEditor, [
|
|
1264
|
+
jodit
|
|
1265
|
+
]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "typeSelect", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "titleInput", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "addButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "backgroundInput", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "textColorInput", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "borderColorInput", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "transparentButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__dragIndex", -1);
|
|
1266
|
+
_this.typeSelect = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UISelect(jodit, {
|
|
1267
|
+
name: 'type',
|
|
1268
|
+
label: 'Chart type',
|
|
1269
|
+
options: jodit.o.chart.types.map(function(type) {
|
|
1270
|
+
return {
|
|
1271
|
+
value: type,
|
|
1272
|
+
text: jodit.i18n(_helpers__WEBPACK_IMPORTED_MODULE_9__.CHART_TYPE_TITLES[type])
|
|
1273
|
+
};
|
|
1274
|
+
}),
|
|
1275
|
+
onChange: function onChange(value) {
|
|
1276
|
+
_this.state.type = value;
|
|
1277
|
+
_this.refresh();
|
|
1278
|
+
}
|
|
1279
|
+
});
|
|
1280
|
+
_this.titleInput = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIInput(jodit, {
|
|
1281
|
+
name: 'title',
|
|
1282
|
+
label: 'Chart title',
|
|
1283
|
+
placeholder: 'Optional',
|
|
1284
|
+
onChange: function onChange(value) {
|
|
1285
|
+
_this.state.title = value;
|
|
1286
|
+
_this.refresh();
|
|
1287
|
+
}
|
|
1288
|
+
});
|
|
1289
|
+
_this.addButton = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.Button)(jodit, 'plus', 'Add point').onAction(_this.addPoint.bind(_this));
|
|
1290
|
+
var fields = _this.getElm('fields');
|
|
1291
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(fields != null, 'fields element does not exist');
|
|
1292
|
+
fields.appendChild(_this.typeSelect.container);
|
|
1293
|
+
fields.appendChild(_this.titleInput.container);
|
|
1294
|
+
var add = _this.getElm('add');
|
|
1295
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(add != null, 'add element does not exist');
|
|
1296
|
+
add.appendChild(_this.addButton.container);
|
|
1297
|
+
_this.backgroundInput = _this.createColorInput('background', function(value) {
|
|
1298
|
+
_this.state.background = value;
|
|
1299
|
+
_this.syncTransparent();
|
|
1300
|
+
});
|
|
1301
|
+
_this.textColorInput = _this.createColorInput('textColor', function(value) {
|
|
1302
|
+
_this.state.textColor = value;
|
|
1303
|
+
});
|
|
1304
|
+
_this.borderColorInput = _this.createColorInput('borderColor', function(value) {
|
|
1305
|
+
_this.state.borderColor = value;
|
|
1306
|
+
});
|
|
1307
|
+
_this.transparentButton = jodit.c.element('button', {
|
|
1308
|
+
type: 'button',
|
|
1309
|
+
name: 'transparent',
|
|
1310
|
+
class: _this.getFullElName('transparent')
|
|
1311
|
+
});
|
|
1312
|
+
jodit.e.on(_this.transparentButton, 'click', function() {
|
|
1313
|
+
_this.state.background = _this.state.background ? '' : _this.backgroundInput.value;
|
|
1314
|
+
_this.syncTransparent();
|
|
1315
|
+
_this.refresh();
|
|
1316
|
+
});
|
|
1317
|
+
var colors = _this.getElm('colors');
|
|
1318
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(colors != null, 'colors element does not exist');
|
|
1319
|
+
var chart = jodit.o.chart;
|
|
1320
|
+
if (chart.allowChangeBackground) {
|
|
1321
|
+
colors.appendChild(_this.colorField('Background', _this.backgroundInput));
|
|
1322
|
+
}
|
|
1323
|
+
if (chart.allowChangeTextColor) {
|
|
1324
|
+
colors.appendChild(_this.colorField('Text', _this.textColorInput));
|
|
1325
|
+
}
|
|
1326
|
+
if (chart.allowChangeBorderColor) {
|
|
1327
|
+
colors.appendChild(_this.colorField('Border', _this.borderColorInput));
|
|
1328
|
+
}
|
|
1329
|
+
if (chart.allowChangeBackground) {
|
|
1330
|
+
colors.appendChild(_this.colorField('Transparent', _this.transparentButton));
|
|
1331
|
+
}
|
|
1332
|
+
if (!colors.childNodes.length) {
|
|
1333
|
+
jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__.Dom.safeRemove(colors);
|
|
1334
|
+
}
|
|
1335
|
+
return _this;
|
|
1336
|
+
}
|
|
1337
|
+
;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIChartEditor, [
|
|
1338
|
+
{
|
|
1339
|
+
key: "className",
|
|
1340
|
+
value: function className() {
|
|
1341
|
+
return 'UIChartEditor';
|
|
1342
|
+
}
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
key: "render",
|
|
1346
|
+
value: function render() {
|
|
1347
|
+
return '<div>\n <div class="&__preview">\n <div class="&__colors"></div>\n <div class="&__canvas"></div>\n </div>\n <div class="&__fields"></div>\n <div class="&__points-header">\n <span class="&__points-title">~Data points~</span>\n <span class="&__summary"></span>\n <span class="&__add"></span>\n </div>\n <div class="&__points"></div>\n </div>';
|
|
1348
|
+
}
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
key: "syncTransparent",
|
|
1352
|
+
value: function syncTransparent() {
|
|
1353
|
+
var transparent = !this.state.background;
|
|
1354
|
+
this.transparentButton.classList.toggle(this.getFullElName('transparent', 'active'), transparent);
|
|
1355
|
+
(0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_15__.attr)(this.transparentButton, 'aria-pressed', transparent);
|
|
1356
|
+
}
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
key: "createColorInput",
|
|
1360
|
+
value: function createColorInput(name, onInput) {
|
|
1361
|
+
var _this = this;
|
|
1362
|
+
var input = this.j.c.element('input', {
|
|
1363
|
+
type: 'color',
|
|
1364
|
+
name: name,
|
|
1365
|
+
title: this.j.i18n(name === 'background' ? 'Background' : 'Text color'),
|
|
1366
|
+
class: this.getFullElName('color-input')
|
|
1367
|
+
});
|
|
1368
|
+
this.j.e.on(input, 'input', function() {
|
|
1369
|
+
onInput(input.value);
|
|
1370
|
+
_this.refresh();
|
|
1371
|
+
});
|
|
1372
|
+
return input;
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
key: "colorField",
|
|
1377
|
+
value: function colorField(label, input) {
|
|
1378
|
+
return this.j.c.element('label', {
|
|
1379
|
+
class: this.getFullElName('color-field')
|
|
1380
|
+
}, [
|
|
1381
|
+
input,
|
|
1382
|
+
this.j.c.span(this.getFullElName('color-label'), this.j.i18n(label))
|
|
1383
|
+
]);
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
{
|
|
1387
|
+
/**
|
|
1388
|
+
* Loads a copy of the data into the form.
|
|
1389
|
+
*/ key: "setData",
|
|
1390
|
+
value: function setData(data) {
|
|
1391
|
+
this.state = (0,_helpers__WEBPACK_IMPORTED_MODULE_9__.cloneChartData)(data);
|
|
1392
|
+
this.typeSelect.value = this.state.type;
|
|
1393
|
+
this.titleInput.value = this.state.title;
|
|
1394
|
+
this.backgroundInput.value = this.state.background || _render_common__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_BACKGROUND;
|
|
1395
|
+
this.textColorInput.value = this.state.textColor || _render_common__WEBPACK_IMPORTED_MODULE_11__.DEFAULT_TEXT_COLOR;
|
|
1396
|
+
this.borderColorInput.value = this.state.borderColor || this.j.o.chart.defaultBorderColor;
|
|
1397
|
+
this.syncTransparent();
|
|
1398
|
+
this.rebuildPoints();
|
|
1399
|
+
this.__render();
|
|
1400
|
+
}
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
/**
|
|
1404
|
+
* Returns a normalized copy of the edited data.
|
|
1405
|
+
*/ key: "getData",
|
|
1406
|
+
value: function getData() {
|
|
1407
|
+
return (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__._)({}, this.state), {
|
|
1408
|
+
title: this.state.title.trim(),
|
|
1409
|
+
points: this.state.points.map(_helpers__WEBPACK_IMPORTED_MODULE_9__.normalizePoint)
|
|
1410
|
+
});
|
|
1411
|
+
}
|
|
1412
|
+
},
|
|
1413
|
+
{
|
|
1414
|
+
key: "addPoint",
|
|
1415
|
+
value: function addPoint() {
|
|
1416
|
+
var _inputs_;
|
|
1417
|
+
var points = this.state.points;
|
|
1418
|
+
points.push({
|
|
1419
|
+
label: this.j.i18n('Item') + ' ' + (points.length + 1),
|
|
1420
|
+
value: 0
|
|
1421
|
+
});
|
|
1422
|
+
this.rebuildPoints();
|
|
1423
|
+
this.refresh();
|
|
1424
|
+
var inputs = this.getElms('point-label');
|
|
1425
|
+
var last = (_inputs_ = inputs[inputs.length - 1]) === null || _inputs_ === void 0 ? void 0 : _inputs_.querySelector('input');
|
|
1426
|
+
last === null || last === void 0 ? void 0 : last.focus();
|
|
1427
|
+
}
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
key: "removePoint",
|
|
1431
|
+
value: function removePoint(index) {
|
|
1432
|
+
this.state.points.splice(index, 1);
|
|
1433
|
+
this.rebuildPoints();
|
|
1434
|
+
this.refresh();
|
|
1435
|
+
}
|
|
1436
|
+
},
|
|
1437
|
+
{
|
|
1438
|
+
key: "rebuildPoints",
|
|
1439
|
+
value: function rebuildPoints() {
|
|
1440
|
+
var _this = this;
|
|
1441
|
+
var list = this.getElm('points');
|
|
1442
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_14__.assert)(list != null, 'points element does not exist');
|
|
1443
|
+
jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_13__.Dom.detach(list);
|
|
1444
|
+
this.state.points.forEach(function(point, index) {
|
|
1445
|
+
list.appendChild(_this.createPointRow(point, index));
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
key: "createPointRow",
|
|
1451
|
+
value: function createPointRow(point, index) {
|
|
1452
|
+
var _this = this;
|
|
1453
|
+
var j = this.j;
|
|
1454
|
+
var label = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIInput(j, {
|
|
1455
|
+
name: 'label',
|
|
1456
|
+
label: 'Label',
|
|
1457
|
+
value: point.label,
|
|
1458
|
+
className: this.getFullElName('point-label'),
|
|
1459
|
+
onChange: function onChange(value) {
|
|
1460
|
+
point.label = value;
|
|
1461
|
+
_this.refresh();
|
|
1462
|
+
}
|
|
1463
|
+
});
|
|
1464
|
+
var value = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIInput(j, {
|
|
1465
|
+
name: 'value',
|
|
1466
|
+
label: 'Value',
|
|
1467
|
+
type: 'number',
|
|
1468
|
+
value: point.value,
|
|
1469
|
+
className: this.getFullElName('point-value'),
|
|
1470
|
+
onChange: function onChange(raw) {
|
|
1471
|
+
var parsed = Number(raw);
|
|
1472
|
+
point.value = isFinite(parsed) ? parsed : 0;
|
|
1473
|
+
_this.refresh();
|
|
1474
|
+
}
|
|
1475
|
+
});
|
|
1476
|
+
var color = j.c.element('input', {
|
|
1477
|
+
type: 'color',
|
|
1478
|
+
title: j.i18n('Color'),
|
|
1479
|
+
class: this.getFullElName('point-color'),
|
|
1480
|
+
value: (0,_render_common__WEBPACK_IMPORTED_MODULE_11__.pointColor)(point, index, {
|
|
1481
|
+
colors: j.o.chart.colors,
|
|
1482
|
+
fontFamily: ''
|
|
1483
|
+
})
|
|
1484
|
+
});
|
|
1485
|
+
j.e.on(color, 'input', function() {
|
|
1486
|
+
point.color = color.value;
|
|
1487
|
+
_this.refresh();
|
|
1488
|
+
});
|
|
1489
|
+
var remove = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.Button)(j, 'bin', '', 'default').setMod('variant', 'remove').onAction(function() {
|
|
1490
|
+
return _this.removePoint(index);
|
|
1491
|
+
});
|
|
1492
|
+
(0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_15__.attr)(remove.container, 'title', j.i18n('Remove point'));
|
|
1493
|
+
var grip = j.c.element('span', {
|
|
1494
|
+
class: this.getFullElName('point-grip'),
|
|
1495
|
+
title: j.i18n('Drag to reorder')
|
|
1496
|
+
});
|
|
1497
|
+
var row = j.c.div(this.getFullElName('point'), [
|
|
1498
|
+
grip,
|
|
1499
|
+
label.container,
|
|
1500
|
+
value.container,
|
|
1501
|
+
color,
|
|
1502
|
+
remove.container
|
|
1503
|
+
]);
|
|
1504
|
+
this.bindDragAndDrop(row, grip, index);
|
|
1505
|
+
return row;
|
|
1506
|
+
}
|
|
1507
|
+
},
|
|
1508
|
+
{
|
|
1509
|
+
key: "bindDragAndDrop",
|
|
1510
|
+
value: /**
|
|
1511
|
+
* Native drag and drop of a row. The grip is the draggable element so text
|
|
1512
|
+
* selection inside the inputs keeps working.
|
|
1513
|
+
*/ function bindDragAndDrop(row, grip, index) {
|
|
1514
|
+
var _this = this;
|
|
1515
|
+
var j = this.j;
|
|
1516
|
+
var dropMod = function dropMod(value) {
|
|
1517
|
+
row.classList.toggle(_this.getFullElName('point', 'drop', 'before'), value === 'before');
|
|
1518
|
+
row.classList.toggle(_this.getFullElName('point', 'drop', 'after'), value === 'after');
|
|
1519
|
+
};
|
|
1520
|
+
var isAfter = function isAfter(e) {
|
|
1521
|
+
var box = row.getBoundingClientRect();
|
|
1522
|
+
return e.clientY > box.top + box.height / 2;
|
|
1523
|
+
};
|
|
1524
|
+
(0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_15__.attr)(grip, 'draggable', true);
|
|
1525
|
+
j.e.on(grip, 'dragstart', function(e) {
|
|
1526
|
+
_this.__dragIndex = index;
|
|
1527
|
+
row.classList.add(_this.getFullElName('point', 'dragging'));
|
|
1528
|
+
if (e.dataTransfer) {
|
|
1529
|
+
e.dataTransfer.effectAllowed = 'move';
|
|
1530
|
+
e.dataTransfer.setData('text/plain', String(index));
|
|
1531
|
+
e.dataTransfer.setDragImage(row, 10, 10);
|
|
1532
|
+
}
|
|
1533
|
+
}).on(grip, 'dragend', function() {
|
|
1534
|
+
_this.__dragIndex = -1;
|
|
1535
|
+
row.classList.remove(_this.getFullElName('point', 'dragging'));
|
|
1536
|
+
_this.getElms('point').forEach(function(elm) {
|
|
1537
|
+
elm.classList.remove(_this.getFullElName('point', 'drop', 'before'), _this.getFullElName('point', 'drop', 'after'));
|
|
1538
|
+
});
|
|
1539
|
+
});
|
|
1540
|
+
j.e.on(row, 'dragover', function(e) {
|
|
1541
|
+
if (_this.__dragIndex < 0 || _this.__dragIndex === index) {
|
|
1542
|
+
return;
|
|
1543
|
+
}
|
|
1544
|
+
e.preventDefault();
|
|
1545
|
+
if (e.dataTransfer) {
|
|
1546
|
+
e.dataTransfer.dropEffect = 'move';
|
|
1547
|
+
}
|
|
1548
|
+
dropMod(isAfter(e) ? 'after' : 'before');
|
|
1549
|
+
}).on(row, 'dragleave', function() {
|
|
1550
|
+
return dropMod(null);
|
|
1551
|
+
}).on(row, 'drop', function(e) {
|
|
1552
|
+
if (_this.__dragIndex < 0 || _this.__dragIndex === index) {
|
|
1553
|
+
return;
|
|
1554
|
+
}
|
|
1555
|
+
e.preventDefault();
|
|
1556
|
+
_this.movePoint(_this.__dragIndex, index, isAfter(e));
|
|
1557
|
+
_this.__dragIndex = -1;
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
{
|
|
1562
|
+
/**
|
|
1563
|
+
* Moves a point before or after another one and rebuilds the list.
|
|
1564
|
+
*/ key: "movePoint",
|
|
1565
|
+
value: function movePoint(from, to, after) {
|
|
1566
|
+
var points = this.state.points;
|
|
1567
|
+
if (from === to || !points[from] || !points[to]) {
|
|
1568
|
+
return;
|
|
1569
|
+
}
|
|
1570
|
+
var _points_splice = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(points.splice(from, 1), 1), point = _points_splice[0];
|
|
1571
|
+
var target = from < to ? to - 1 : to;
|
|
1572
|
+
if (after) {
|
|
1573
|
+
target++;
|
|
1574
|
+
}
|
|
1575
|
+
points.splice(target, 0, point);
|
|
1576
|
+
this.rebuildPoints();
|
|
1577
|
+
this.refresh();
|
|
1578
|
+
}
|
|
1579
|
+
},
|
|
1580
|
+
{
|
|
1581
|
+
key: "refresh",
|
|
1582
|
+
value: function refresh() {
|
|
1583
|
+
this.__render();
|
|
1584
|
+
}
|
|
1585
|
+
},
|
|
1586
|
+
{
|
|
1587
|
+
key: "__render",
|
|
1588
|
+
value: function __render() {
|
|
1589
|
+
var chart = this.j.o.chart;
|
|
1590
|
+
var preview = this.getElm('canvas');
|
|
1591
|
+
var summary = this.getElm('summary');
|
|
1592
|
+
if (preview) {
|
|
1593
|
+
preview.innerHTML = (0,_render__WEBPACK_IMPORTED_MODULE_10__.renderChart)(this.state, {
|
|
1594
|
+
colors: chart.colors,
|
|
1595
|
+
fontFamily: chart.fontFamily
|
|
1596
|
+
});
|
|
1597
|
+
}
|
|
1598
|
+
if (summary) {
|
|
1599
|
+
var total = this.state.points.reduce(function(sum, p) {
|
|
1600
|
+
return sum + p.value;
|
|
1601
|
+
}, 0);
|
|
1602
|
+
summary.textContent = this.state.points.length + ' ' + this.j.i18n('points') + ' · ' + this.j.i18n('Total') + ': ' + (0,_render_common__WEBPACK_IMPORTED_MODULE_11__.formatValue)(total);
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
]);
|
|
1607
|
+
return UIChartEditor;
|
|
1608
|
+
}(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_16__.UIElement);
|
|
1609
|
+
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1610
|
+
(0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.debounce)(50)
|
|
1611
|
+
], UIChartEditor.prototype, "refresh", null);
|
|
1612
|
+
UIChartEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_8__.__decorate)([
|
|
1613
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.component
|
|
1614
|
+
], UIChartEditor);
|
|
1615
|
+
|
|
1616
|
+
|
|
1617
|
+
/***/ }),
|
|
1618
|
+
|
|
1619
|
+
/***/ 11886:
|
|
1620
|
+
/***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1621
|
+
|
|
1622
|
+
"use strict";
|
|
1623
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1624
|
+
/* harmony export */ _: function() { return /* binding */ _object_spread_props; }
|
|
1625
|
+
/* harmony export */ });
|
|
1626
|
+
function ownKeys(object, enumerableOnly) {
|
|
1627
|
+
var keys = Object.keys(object);
|
|
1628
|
+
if (Object.getOwnPropertySymbols) {
|
|
1629
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1630
|
+
if (enumerableOnly) {
|
|
1631
|
+
symbols = symbols.filter(function(sym) {
|
|
1632
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1633
|
+
});
|
|
1634
|
+
}
|
|
1635
|
+
keys.push.apply(keys, symbols);
|
|
1636
|
+
}
|
|
1637
|
+
return keys;
|
|
1638
|
+
}
|
|
1639
|
+
function _object_spread_props(target, source) {
|
|
1640
|
+
source = source != null ? source : {};
|
|
1641
|
+
if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
1642
|
+
else {
|
|
1643
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
1644
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1645
|
+
});
|
|
1646
|
+
}
|
|
1647
|
+
return target;
|
|
1648
|
+
}
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
|
|
1652
|
+
/***/ })
|
|
1653
|
+
|
|
1654
|
+
},
|
|
1655
|
+
/******/ function(__webpack_require__) { // webpackRuntimeModules
|
|
1656
|
+
/******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(moduleId); }
|
|
1657
|
+
/******/ var __webpack_exports__ = (__webpack_exec__(57722));
|
|
1658
|
+
/******/ return __webpack_exports__;
|
|
1659
|
+
/******/ }
|
|
1660
|
+
]);
|
|
1661
|
+
});
|