@blokkli/editor 2.0.0-alpha.35 → 2.0.0-alpha.37
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/dist/global/types/blockOptions.d.ts +10 -2
- package/dist/global/types/definitions.d.ts +12 -5
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +126 -7
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/index.mjs +273 -25
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +2 -2
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +34 -17
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.d.ts +2 -20
- package/dist/modules/agent/runtime/app/composables/defineBlokkliAgentTool.js +0 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/Assistant/index.vue +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Conversation/Item/User/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DebugGallery/index.vue +1 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.d.vue.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +67 -86
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue.d.ts +1 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/index.vue +10 -12
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/de.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Welcome/en.md +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +1 -5
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.d.vue.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue +138 -0
- package/dist/modules/agent/runtime/app/features/agent/Transcript/index.vue.d.ts +8 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +94 -38
- package/dist/modules/agent/runtime/app/helpers/index.d.ts +16 -19
- package/dist/modules/agent/runtime/app/helpers/index.js +22 -46
- package/dist/modules/agent/runtime/app/helpers/pageStructure.js +1 -1
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraph/index.js +5 -9
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/analyze_content/index.js +120 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/check_readability/index.js +57 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +176 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +1 -1
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +7 -5
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -1
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -3
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +53 -0
- package/dist/modules/agent/runtime/app/tools/helpers.js +187 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +2 -6
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +1 -44
- package/dist/modules/agent/runtime/app/tools/schemas.js +0 -174
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +40 -47
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +2 -5
- package/dist/modules/agent/runtime/app/types/index.d.ts +0 -61
- package/dist/modules/agent/runtime/server/Session.d.ts +29 -8
- package/dist/modules/agent/runtime/server/Session.js +168 -85
- package/dist/modules/agent/runtime/server/SessionManager.d.ts +3 -0
- package/dist/modules/agent/runtime/server/SessionManager.js +4 -1
- package/dist/modules/agent/runtime/server/agent.js +3 -2
- package/dist/modules/agent/runtime/server/agentPrompt.d.ts +9 -1
- package/dist/modules/agent/runtime/server/agentPrompt.js +26 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.d.ts +2 -0
- package/dist/modules/agent/runtime/server/default-skills/fixReadability.js +69 -0
- package/dist/modules/agent/runtime/server/default-system-prompts/page-context.js +28 -0
- package/dist/modules/agent/runtime/server/server-tools/index.d.ts +10 -2
- package/dist/modules/agent/runtime/server/server-tools/index.js +1 -1
- package/dist/modules/agent/runtime/server/server-tools/load_tools/index.js +1 -1
- package/dist/modules/agent/runtime/shared/types.d.ts +81 -12
- package/dist/modules/agent/runtime/shared/types.js +22 -10
- package/dist/modules/charts/index.d.mts +35 -0
- package/dist/modules/charts/index.mjs +57 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/skills/charts.js +42 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.d.ts +86 -0
- package/dist/modules/charts/runtime/blokkli/tools/chart_schemas.js +136 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/create_chart/index.js +93 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_data/index.js +66 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/get_chart_type_options/index.js +40 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.d.ts +2 -0
- package/dist/modules/charts/runtime/blokkli/tools/update_chart/index.js +89 -0
- package/dist/modules/charts/runtime/chartTypes/area.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/area.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/bar.d.ts +8 -0
- package/dist/modules/charts/runtime/chartTypes/bar.js +76 -0
- package/dist/modules/charts/runtime/chartTypes/define.d.ts +2 -0
- package/dist/modules/charts/runtime/chartTypes/define.js +3 -0
- package/dist/modules/charts/runtime/chartTypes/donut.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/donut.js +45 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.d.ts +4 -0
- package/dist/modules/charts/runtime/chartTypes/heatmap.js +54 -0
- package/dist/modules/charts/runtime/chartTypes/index.d.ts +39 -0
- package/dist/modules/charts/runtime/chartTypes/index.js +47 -0
- package/dist/modules/charts/runtime/chartTypes/line.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/line.js +68 -0
- package/dist/modules/charts/runtime/chartTypes/pie.d.ts +5 -0
- package/dist/modules/charts/runtime/chartTypes/pie.js +28 -0
- package/dist/modules/charts/runtime/chartTypes/radar.d.ts +7 -0
- package/dist/modules/charts/runtime/chartTypes/radar.js +52 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.d.ts +6 -0
- package/dist/modules/charts/runtime/chartTypes/radialBar.js +44 -0
- package/dist/modules/charts/runtime/chartTypes/shared.d.ts +67 -0
- package/dist/modules/charts/runtime/chartTypes/shared.js +103 -0
- package/dist/modules/charts/runtime/chartTypes/types.d.ts +29 -0
- package/dist/modules/charts/runtime/chartTypes/types.js +0 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.d.vue.ts +147 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue +120 -0
- package/dist/modules/charts/runtime/components/ChartRenderer/index.vue.d.ts +147 -0
- package/dist/modules/charts/runtime/components/index.d.ts +1 -0
- package/dist/modules/charts/runtime/components/index.js +1 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.d.vue.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue +97 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypeOptions/index.vue.d.ts +16 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +34 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.d.vue.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +49 -0
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue.d.ts +12 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.d.vue.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue +89 -0
- package/dist/modules/charts/runtime/features/charts/Editor/CsvImport/index.vue.d.ts +19 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.d.vue.ts +23 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue +224 -0
- package/dist/modules/charts/runtime/features/charts/Editor/DataTable/index.vue.d.ts +23 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.d.vue.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/FootnoteEditor/index.vue +61 -0
- package/dist/{runtime/editor/features/clipboard/List → modules/charts/runtime/features/charts/Editor/FootnoteEditor}/index.vue.d.ts +4 -5
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.d.vue.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue +45 -0
- package/dist/modules/charts/runtime/features/charts/Editor/Preview/index.vue.d.ts +10 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.d.vue.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue +249 -0
- package/dist/modules/charts/runtime/features/charts/Editor/index.vue.d.ts +11 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.d.ts +17 -0
- package/dist/modules/charts/runtime/features/charts/Editor/useChartEditorState.js +90 -0
- package/dist/modules/charts/runtime/features/charts/index.d.vue.ts +3 -0
- package/dist/modules/charts/runtime/features/charts/index.vue +72 -0
- package/dist/modules/charts/runtime/features/charts/index.vue.d.ts +3 -0
- package/dist/modules/charts/runtime/helpers/index.d.ts +26 -0
- package/dist/modules/charts/runtime/helpers/index.js +80 -0
- package/dist/modules/charts/runtime/types.d.ts +33 -0
- package/dist/modules/charts/runtime/types.js +0 -0
- package/dist/modules/drupal/graphql/features/fragments.graphql +2 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/runtime/adapter/index.d.ts +3 -1
- package/dist/modules/drupal/runtime/adapter/index.js +16 -12
- package/dist/modules/table-of-contents/index.d.mts +11 -0
- package/dist/modules/table-of-contents/index.mjs +24 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.d.vue.ts +44 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue +43 -0
- package/dist/modules/table-of-contents/runtime/components/BlokkliTableOfContents/index.vue.d.ts +44 -0
- package/dist/modules/table-of-contents/runtime/types/index.d.ts +4 -0
- package/dist/modules/table-of-contents/runtime/types/index.js +0 -0
- package/dist/runtime/components/Blocks/Fragment/index.vue +6 -2
- package/dist/runtime/components/BlokkliItem.vue +9 -4
- package/dist/runtime/components/BlokkliProvider.d.vue.ts +7 -0
- package/dist/runtime/components/BlokkliProvider.vue +7 -1
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +7 -0
- package/dist/runtime/composables/defineBlokkli.js +1 -1
- package/dist/runtime/composables/useBlokkliHelper.js +4 -2
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +17 -27
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +13 -2
- package/dist/runtime/editor/components/Banner/index.vue +4 -2
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +13 -2
- package/dist/runtime/editor/components/Dropdown/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +107 -0
- package/dist/runtime/editor/components/Dropdown/index.vue.d.ts +27 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.d.vue.ts +1 -0
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue +3 -2
- package/dist/{modules/agent/runtime/app/features/agent/Panel/Input/Actions → runtime/editor/components}/DropdownItem/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/EditProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/EditProvider.vue +11 -7
- package/dist/runtime/editor/components/EditProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +5 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue +24 -101
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +5 -1
- package/dist/runtime/editor/components/Form/Radio/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Radio/index.vue +3 -2
- package/dist/runtime/editor/components/Form/Radio/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/ItemIcon/index.vue +10 -2
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +13 -3
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +43 -16
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +13 -3
- package/dist/runtime/editor/components/Popup/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Popup/index.vue +82 -0
- package/dist/runtime/editor/components/Popup/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/PreviewProvider.d.vue.ts +2 -0
- package/dist/runtime/editor/components/PreviewProvider.vue +3 -2
- package/dist/runtime/editor/components/PreviewProvider.vue.d.ts +2 -0
- package/dist/runtime/editor/components/Resizable/index.vue +4 -1
- package/dist/runtime/editor/components/ShortcutIndicator/index.vue +1 -1
- package/dist/runtime/editor/components/Toolbar/index.vue +107 -6
- package/dist/runtime/editor/components/index.d.ts +4 -1
- package/dist/runtime/editor/components/index.js +6 -0
- package/dist/runtime/editor/composables/defineDropAreas.js +3 -3
- package/dist/runtime/editor/composables/defineDropHandler.d.ts +3 -0
- package/dist/runtime/editor/composables/defineDropHandler.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/composables/onElementResize.js +0 -1
- package/dist/runtime/editor/composables/useEditableFieldOverride.js +4 -5
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +16 -0
- package/dist/runtime/editor/features/add-list/Help/Item.vue +5 -2
- package/dist/runtime/editor/features/add-list/index.vue +58 -1
- package/dist/runtime/editor/features/analyze/Main.d.vue.ts +3 -2
- package/dist/runtime/editor/features/analyze/Main.vue +28 -44
- package/dist/runtime/editor/features/analyze/Main.vue.d.ts +3 -2
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +65 -0
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +19 -0
- package/dist/runtime/editor/features/analyze/index.vue +18 -15
- package/dist/runtime/editor/features/artboard/Renderer.vue +1 -1
- package/dist/runtime/editor/features/clipboard/DropElement/Video.d.vue.ts +8 -0
- package/dist/runtime/editor/features/clipboard/{List/Item → DropElement}/Video.vue +1 -5
- package/dist/runtime/editor/features/clipboard/DropElement/Video.vue.d.ts +8 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.d.ts +1 -0
- package/dist/runtime/editor/features/clipboard/DropElement/helpers.js +14 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue +97 -0
- package/dist/runtime/editor/features/clipboard/DropElement/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/clipboard/helpers.d.ts +15 -0
- package/dist/runtime/editor/features/clipboard/helpers.js +62 -0
- package/dist/runtime/editor/features/clipboard/index.vue +586 -338
- package/dist/runtime/editor/features/clipboard/types.d.ts +14 -2
- package/dist/runtime/editor/features/debug/index.vue +1 -1
- package/dist/runtime/editor/features/dev-mode/index.vue +86 -2
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +17 -5
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +2 -2
- package/dist/runtime/editor/features/dragging-overlay/index.vue +125 -219
- package/dist/runtime/editor/features/edit/index.vue +20 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +4 -4
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +6 -0
- package/dist/runtime/editor/features/fragments/types.d.ts +1 -0
- package/dist/runtime/editor/features/hover/Renderer/index.vue +30 -3
- package/dist/runtime/editor/features/hover/index.vue +1 -1
- package/dist/runtime/editor/features/library/index.vue +14 -0
- package/dist/runtime/editor/features/media-library/index.vue +32 -1
- package/dist/runtime/editor/features/options/Form/Checkbox/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +3 -3
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +5 -5
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/ComplexType/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +36 -0
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/options/Form/Item.d.vue.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Item.vue +24 -50
- package/dist/runtime/editor/features/options/Form/Item.vue.d.ts +5 -4
- package/dist/runtime/editor/features/options/Form/Number/index.d.vue.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Number/index.vue +7 -17
- package/dist/runtime/editor/features/options/Form/Number/index.vue.d.ts +3 -3
- package/dist/runtime/editor/features/options/Form/Range/index.d.vue.ts +2 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +4 -4
- package/dist/runtime/editor/features/options/Form/Range/index.vue.d.ts +2 -2
- package/dist/runtime/editor/features/options/Form/index.vue +15 -5
- package/dist/runtime/editor/features/search/index.vue +25 -1
- package/dist/runtime/editor/features/selection/index.vue +2 -2
- package/dist/runtime/editor/features/structure/index.vue +25 -1
- package/dist/runtime/editor/features/tour/index.vue +22 -12
- package/dist/runtime/editor/features/transform/index.vue +1 -3
- package/dist/runtime/editor/helpers/clipboardData/index.d.ts +11 -0
- package/dist/runtime/editor/helpers/clipboardData/index.js +157 -0
- package/dist/runtime/editor/helpers/options/index.js +5 -0
- package/dist/runtime/editor/icons/svg/stars.svg +5 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.d.vue.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue.d.ts +1 -1
- package/dist/runtime/editor/plugins/Sidebar/index.d.vue.ts +15 -4
- package/dist/runtime/editor/plugins/Sidebar/index.vue +4 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +15 -4
- package/dist/runtime/editor/providers/analyze.d.ts +43 -0
- package/dist/runtime/editor/providers/analyze.js +78 -0
- package/dist/runtime/editor/providers/animation.d.ts +4 -0
- package/dist/runtime/editor/providers/animation.js +6 -0
- package/dist/runtime/editor/providers/definition.d.ts +2 -2
- package/dist/runtime/editor/providers/definition.js +7 -1
- package/dist/runtime/editor/providers/dom.d.ts +5 -0
- package/dist/runtime/editor/providers/dom.js +11 -2
- package/dist/runtime/editor/providers/dragdrop.d.ts +55 -0
- package/dist/runtime/editor/providers/dragdrop.js +37 -0
- package/dist/runtime/editor/providers/fields.d.ts +19 -1
- package/dist/runtime/editor/providers/fields.js +54 -2
- package/dist/runtime/editor/providers/storage.js +15 -0
- package/dist/runtime/editor/providers/ui.d.ts +6 -0
- package/dist/runtime/editor/providers/ui.js +19 -0
- package/dist/runtime/editor/translations/de.json +338 -58
- package/dist/runtime/editor/translations/fr.json +331 -51
- package/dist/runtime/editor/translations/gsw_CH.json +336 -56
- package/dist/runtime/editor/translations/it.json +331 -51
- package/dist/runtime/editor/types/app.d.ts +4 -2
- package/dist/runtime/editor/types/draggable.d.ts +1 -0
- package/dist/runtime/editor/types/ui.d.ts +1 -1
- package/dist/runtime/helpers/imports/index.d.ts +8 -1
- package/dist/runtime/helpers/imports/index.js +15 -6
- package/dist/runtime/helpers/injections.d.ts +6 -2
- package/dist/runtime/helpers/injections.js +3 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -0
- package/dist/runtime/types/blockOptions.d.ts +2 -1
- package/dist/runtime/types/definitions.d.ts +12 -5
- package/dist/runtime/types/provider.d.ts +2 -0
- package/dist/shared/editor.6D5vApr0.mjs +30 -0
- package/dist/shared/{editor.DMFfaLVE.mjs → editor.BFIzNSQM.mjs} +1 -30
- package/dist/shared/{editor.Iax3GCvt.d.mts → editor.BdBm1Z7C.d.mts} +34 -0
- package/dist/types.d.mts +1 -1
- package/package.json +21 -3
- package/dist/modules/agent/runtime/app/tools/get_available_bundles/index.js +0 -104
- package/dist/runtime/editor/features/clipboard/List/Item/File.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue +0 -60
- package/dist/runtime/editor/features/clipboard/List/Item/File.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.d.vue.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/Item/Video.vue.d.ts +0 -4
- package/dist/runtime/editor/features/clipboard/List/index.vue +0 -72
- package/dist/runtime/editor/features/tour/Popup/index.d.vue.ts +0 -9
- package/dist/runtime/editor/features/tour/Popup/index.vue +0 -34
- package/dist/runtime/editor/features/tour/Popup/index.vue.d.ts +0 -9
- package/dist/runtime/editor/providers/dropArea.d.ts +0 -48
- package/dist/runtime/editor/providers/dropArea.js +0 -22
- /package/dist/modules/agent/runtime/app/tools/{get_available_bundles → analyze_content}/index.d.ts +0 -0
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<({
|
|
2
|
+
title: string;
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: import("../../types.js").ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
footnotes: string[];
|
|
7
|
+
} & {
|
|
8
|
+
type: "bar";
|
|
9
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
10
|
+
}) | ({
|
|
11
|
+
title: string;
|
|
12
|
+
categories: string[];
|
|
13
|
+
series: import("../../types.js").ChartSeries[];
|
|
14
|
+
categoryColors: string[];
|
|
15
|
+
footnotes: string[];
|
|
16
|
+
} & {
|
|
17
|
+
type: "line";
|
|
18
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
19
|
+
}) | ({
|
|
20
|
+
title: string;
|
|
21
|
+
categories: string[];
|
|
22
|
+
series: import("../../types.js").ChartSeries[];
|
|
23
|
+
categoryColors: string[];
|
|
24
|
+
footnotes: string[];
|
|
25
|
+
} & {
|
|
26
|
+
type: "area";
|
|
27
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
28
|
+
}) | ({
|
|
29
|
+
title: string;
|
|
30
|
+
categories: string[];
|
|
31
|
+
series: import("../../types.js").ChartSeries[];
|
|
32
|
+
categoryColors: string[];
|
|
33
|
+
footnotes: string[];
|
|
34
|
+
} & {
|
|
35
|
+
type: "pie";
|
|
36
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
37
|
+
}) | ({
|
|
38
|
+
title: string;
|
|
39
|
+
categories: string[];
|
|
40
|
+
series: import("../../types.js").ChartSeries[];
|
|
41
|
+
categoryColors: string[];
|
|
42
|
+
footnotes: string[];
|
|
43
|
+
} & {
|
|
44
|
+
type: "donut";
|
|
45
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
46
|
+
}) | ({
|
|
47
|
+
title: string;
|
|
48
|
+
categories: string[];
|
|
49
|
+
series: import("../../types.js").ChartSeries[];
|
|
50
|
+
categoryColors: string[];
|
|
51
|
+
footnotes: string[];
|
|
52
|
+
} & {
|
|
53
|
+
type: "heatmap";
|
|
54
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
55
|
+
}) | ({
|
|
56
|
+
title: string;
|
|
57
|
+
categories: string[];
|
|
58
|
+
series: import("../../types.js").ChartSeries[];
|
|
59
|
+
categoryColors: string[];
|
|
60
|
+
footnotes: string[];
|
|
61
|
+
} & {
|
|
62
|
+
type: "radialBar";
|
|
63
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
64
|
+
}) | ({
|
|
65
|
+
title: string;
|
|
66
|
+
categories: string[];
|
|
67
|
+
series: import("../../types.js").ChartSeries[];
|
|
68
|
+
categoryColors: string[];
|
|
69
|
+
footnotes: string[];
|
|
70
|
+
} & {
|
|
71
|
+
type: "radar";
|
|
72
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
73
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<({
|
|
74
|
+
title: string;
|
|
75
|
+
categories: string[];
|
|
76
|
+
series: import("../../types.js").ChartSeries[];
|
|
77
|
+
categoryColors: string[];
|
|
78
|
+
footnotes: string[];
|
|
79
|
+
} & {
|
|
80
|
+
type: "bar";
|
|
81
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
82
|
+
}) | ({
|
|
83
|
+
title: string;
|
|
84
|
+
categories: string[];
|
|
85
|
+
series: import("../../types.js").ChartSeries[];
|
|
86
|
+
categoryColors: string[];
|
|
87
|
+
footnotes: string[];
|
|
88
|
+
} & {
|
|
89
|
+
type: "line";
|
|
90
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
91
|
+
}) | ({
|
|
92
|
+
title: string;
|
|
93
|
+
categories: string[];
|
|
94
|
+
series: import("../../types.js").ChartSeries[];
|
|
95
|
+
categoryColors: string[];
|
|
96
|
+
footnotes: string[];
|
|
97
|
+
} & {
|
|
98
|
+
type: "area";
|
|
99
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
100
|
+
}) | ({
|
|
101
|
+
title: string;
|
|
102
|
+
categories: string[];
|
|
103
|
+
series: import("../../types.js").ChartSeries[];
|
|
104
|
+
categoryColors: string[];
|
|
105
|
+
footnotes: string[];
|
|
106
|
+
} & {
|
|
107
|
+
type: "pie";
|
|
108
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
109
|
+
}) | ({
|
|
110
|
+
title: string;
|
|
111
|
+
categories: string[];
|
|
112
|
+
series: import("../../types.js").ChartSeries[];
|
|
113
|
+
categoryColors: string[];
|
|
114
|
+
footnotes: string[];
|
|
115
|
+
} & {
|
|
116
|
+
type: "donut";
|
|
117
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
118
|
+
}) | ({
|
|
119
|
+
title: string;
|
|
120
|
+
categories: string[];
|
|
121
|
+
series: import("../../types.js").ChartSeries[];
|
|
122
|
+
categoryColors: string[];
|
|
123
|
+
footnotes: string[];
|
|
124
|
+
} & {
|
|
125
|
+
type: "heatmap";
|
|
126
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
127
|
+
}) | ({
|
|
128
|
+
title: string;
|
|
129
|
+
categories: string[];
|
|
130
|
+
series: import("../../types.js").ChartSeries[];
|
|
131
|
+
categoryColors: string[];
|
|
132
|
+
footnotes: string[];
|
|
133
|
+
} & {
|
|
134
|
+
type: "radialBar";
|
|
135
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
136
|
+
}) | ({
|
|
137
|
+
title: string;
|
|
138
|
+
categories: string[];
|
|
139
|
+
series: import("../../types.js").ChartSeries[];
|
|
140
|
+
categoryColors: string[];
|
|
141
|
+
footnotes: string[];
|
|
142
|
+
} & {
|
|
143
|
+
type: "radar";
|
|
144
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
145
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
146
|
+
declare const _default: typeof __VLS_export;
|
|
147
|
+
export default _default;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="rootEl">
|
|
3
|
+
<component
|
|
4
|
+
:is="ApexChart"
|
|
5
|
+
v-if="ApexChart"
|
|
6
|
+
:type="type"
|
|
7
|
+
:options="chartOptions"
|
|
8
|
+
:series="chartSeries"
|
|
9
|
+
height="350"
|
|
10
|
+
/>
|
|
11
|
+
<ol v-if="footnotes?.length" class="bk-chart-footnotes">
|
|
12
|
+
<li v-for="(note, i) in footnotes" :key="i">
|
|
13
|
+
<span class="bk-chart-footnote-marker">{{
|
|
14
|
+
superscriptFor(i + 1)
|
|
15
|
+
}}</span>
|
|
16
|
+
{{ note }}
|
|
17
|
+
</li>
|
|
18
|
+
</ol>
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import { computed, defineAsyncComponent, useTemplateRef } from "#imports";
|
|
24
|
+
import { resolveChartColor, applyFootnotes, SUPERSCRIPTS } from "../../helpers";
|
|
25
|
+
import { getChartTypeRuntime, getDefaultTypeOptions } from "../../chartTypes";
|
|
26
|
+
import { COLORS } from "#blokkli-build/charts-config";
|
|
27
|
+
const ApexChart = defineAsyncComponent(() => import("vue3-apexcharts"));
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
title: { type: String, required: true },
|
|
30
|
+
categories: { type: Array, required: true },
|
|
31
|
+
series: { type: Array, required: true },
|
|
32
|
+
categoryColors: { type: Array, required: true },
|
|
33
|
+
footnotes: { type: Array, required: true },
|
|
34
|
+
type: { type: null, required: true },
|
|
35
|
+
typeOptions: { type: Object, required: false }
|
|
36
|
+
});
|
|
37
|
+
const rootEl = useTemplateRef("rootEl");
|
|
38
|
+
const chartDef = computed(() => getChartTypeRuntime(props.type));
|
|
39
|
+
function superscriptFor(n) {
|
|
40
|
+
return String(n).split("").map((d) => SUPERSCRIPTS[d] || d).join("");
|
|
41
|
+
}
|
|
42
|
+
function deepMerge(target, source) {
|
|
43
|
+
const result = { ...target };
|
|
44
|
+
for (const key of Object.keys(source)) {
|
|
45
|
+
if (result[key] && typeof result[key] === "object" && !Array.isArray(result[key]) && typeof source[key] === "object" && !Array.isArray(source[key])) {
|
|
46
|
+
result[key] = deepMerge(result[key], source[key]);
|
|
47
|
+
} else {
|
|
48
|
+
result[key] = source[key];
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return result;
|
|
52
|
+
}
|
|
53
|
+
const resolvedColors = computed(() => {
|
|
54
|
+
const def = chartDef.value;
|
|
55
|
+
if (!def) return [];
|
|
56
|
+
if (def.hasCategoryColors) {
|
|
57
|
+
return props.categoryColors.map(
|
|
58
|
+
(id) => resolveChartColor(id, COLORS, rootEl.value)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
if (def.hasSeriesColors) {
|
|
62
|
+
return props.series.map(
|
|
63
|
+
(s) => resolveChartColor(s.color, COLORS, rootEl.value)
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
return [];
|
|
67
|
+
});
|
|
68
|
+
const chartOptions = computed(() => {
|
|
69
|
+
const def = chartDef.value;
|
|
70
|
+
if (!def) return {};
|
|
71
|
+
const base = {
|
|
72
|
+
chart: {
|
|
73
|
+
toolbar: { show: false }
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
if (resolvedColors.value.length) {
|
|
77
|
+
base.colors = resolvedColors.value;
|
|
78
|
+
}
|
|
79
|
+
if (props.title) {
|
|
80
|
+
base.title = { text: applyFootnotes(props.title), align: "left" };
|
|
81
|
+
}
|
|
82
|
+
const ctx = {
|
|
83
|
+
title: props.title,
|
|
84
|
+
categories: props.categories.map(applyFootnotes),
|
|
85
|
+
series: props.series.map((s) => ({
|
|
86
|
+
name: applyFootnotes(s.name),
|
|
87
|
+
color: s.color,
|
|
88
|
+
data: s.data
|
|
89
|
+
})),
|
|
90
|
+
seriesColors: resolvedColors.value,
|
|
91
|
+
categoryColors: resolvedColors.value,
|
|
92
|
+
typeOptions: {
|
|
93
|
+
...getDefaultTypeOptions(props.type),
|
|
94
|
+
...props.typeOptions
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const typeOpts = def.buildChartOptions(ctx);
|
|
98
|
+
return deepMerge(base, typeOpts);
|
|
99
|
+
});
|
|
100
|
+
const chartSeries = computed(() => {
|
|
101
|
+
const def = chartDef.value;
|
|
102
|
+
if (!def) return [];
|
|
103
|
+
const ctx = {
|
|
104
|
+
title: props.title,
|
|
105
|
+
categories: props.categories.map(applyFootnotes),
|
|
106
|
+
series: props.series.map((s) => ({
|
|
107
|
+
name: applyFootnotes(s.name),
|
|
108
|
+
color: s.color,
|
|
109
|
+
data: s.data
|
|
110
|
+
})),
|
|
111
|
+
seriesColors: resolvedColors.value,
|
|
112
|
+
categoryColors: resolvedColors.value,
|
|
113
|
+
typeOptions: {
|
|
114
|
+
...getDefaultTypeOptions(props.type),
|
|
115
|
+
...props.typeOptions
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return def.buildSeries(ctx);
|
|
119
|
+
});
|
|
120
|
+
</script>
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
declare const __VLS_export: import("vue").DefineComponent<({
|
|
2
|
+
title: string;
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: import("../../types.js").ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
footnotes: string[];
|
|
7
|
+
} & {
|
|
8
|
+
type: "bar";
|
|
9
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
10
|
+
}) | ({
|
|
11
|
+
title: string;
|
|
12
|
+
categories: string[];
|
|
13
|
+
series: import("../../types.js").ChartSeries[];
|
|
14
|
+
categoryColors: string[];
|
|
15
|
+
footnotes: string[];
|
|
16
|
+
} & {
|
|
17
|
+
type: "line";
|
|
18
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
19
|
+
}) | ({
|
|
20
|
+
title: string;
|
|
21
|
+
categories: string[];
|
|
22
|
+
series: import("../../types.js").ChartSeries[];
|
|
23
|
+
categoryColors: string[];
|
|
24
|
+
footnotes: string[];
|
|
25
|
+
} & {
|
|
26
|
+
type: "area";
|
|
27
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
28
|
+
}) | ({
|
|
29
|
+
title: string;
|
|
30
|
+
categories: string[];
|
|
31
|
+
series: import("../../types.js").ChartSeries[];
|
|
32
|
+
categoryColors: string[];
|
|
33
|
+
footnotes: string[];
|
|
34
|
+
} & {
|
|
35
|
+
type: "pie";
|
|
36
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
37
|
+
}) | ({
|
|
38
|
+
title: string;
|
|
39
|
+
categories: string[];
|
|
40
|
+
series: import("../../types.js").ChartSeries[];
|
|
41
|
+
categoryColors: string[];
|
|
42
|
+
footnotes: string[];
|
|
43
|
+
} & {
|
|
44
|
+
type: "donut";
|
|
45
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
46
|
+
}) | ({
|
|
47
|
+
title: string;
|
|
48
|
+
categories: string[];
|
|
49
|
+
series: import("../../types.js").ChartSeries[];
|
|
50
|
+
categoryColors: string[];
|
|
51
|
+
footnotes: string[];
|
|
52
|
+
} & {
|
|
53
|
+
type: "heatmap";
|
|
54
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
55
|
+
}) | ({
|
|
56
|
+
title: string;
|
|
57
|
+
categories: string[];
|
|
58
|
+
series: import("../../types.js").ChartSeries[];
|
|
59
|
+
categoryColors: string[];
|
|
60
|
+
footnotes: string[];
|
|
61
|
+
} & {
|
|
62
|
+
type: "radialBar";
|
|
63
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
64
|
+
}) | ({
|
|
65
|
+
title: string;
|
|
66
|
+
categories: string[];
|
|
67
|
+
series: import("../../types.js").ChartSeries[];
|
|
68
|
+
categoryColors: string[];
|
|
69
|
+
footnotes: string[];
|
|
70
|
+
} & {
|
|
71
|
+
type: "radar";
|
|
72
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
73
|
+
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<({
|
|
74
|
+
title: string;
|
|
75
|
+
categories: string[];
|
|
76
|
+
series: import("../../types.js").ChartSeries[];
|
|
77
|
+
categoryColors: string[];
|
|
78
|
+
footnotes: string[];
|
|
79
|
+
} & {
|
|
80
|
+
type: "bar";
|
|
81
|
+
typeOptions?: Partial<import("../../chartTypes/bar.js").TypeOptions> | undefined;
|
|
82
|
+
}) | ({
|
|
83
|
+
title: string;
|
|
84
|
+
categories: string[];
|
|
85
|
+
series: import("../../types.js").ChartSeries[];
|
|
86
|
+
categoryColors: string[];
|
|
87
|
+
footnotes: string[];
|
|
88
|
+
} & {
|
|
89
|
+
type: "line";
|
|
90
|
+
typeOptions?: Partial<import("../../chartTypes/line.js").TypeOptions> | undefined;
|
|
91
|
+
}) | ({
|
|
92
|
+
title: string;
|
|
93
|
+
categories: string[];
|
|
94
|
+
series: import("../../types.js").ChartSeries[];
|
|
95
|
+
categoryColors: string[];
|
|
96
|
+
footnotes: string[];
|
|
97
|
+
} & {
|
|
98
|
+
type: "area";
|
|
99
|
+
typeOptions?: Partial<import("../../chartTypes/area.js").TypeOptions> | undefined;
|
|
100
|
+
}) | ({
|
|
101
|
+
title: string;
|
|
102
|
+
categories: string[];
|
|
103
|
+
series: import("../../types.js").ChartSeries[];
|
|
104
|
+
categoryColors: string[];
|
|
105
|
+
footnotes: string[];
|
|
106
|
+
} & {
|
|
107
|
+
type: "pie";
|
|
108
|
+
typeOptions?: Partial<import("../../chartTypes/pie.js").TypeOptions> | undefined;
|
|
109
|
+
}) | ({
|
|
110
|
+
title: string;
|
|
111
|
+
categories: string[];
|
|
112
|
+
series: import("../../types.js").ChartSeries[];
|
|
113
|
+
categoryColors: string[];
|
|
114
|
+
footnotes: string[];
|
|
115
|
+
} & {
|
|
116
|
+
type: "donut";
|
|
117
|
+
typeOptions?: Partial<import("../../chartTypes/donut.js").TypeOptions> | undefined;
|
|
118
|
+
}) | ({
|
|
119
|
+
title: string;
|
|
120
|
+
categories: string[];
|
|
121
|
+
series: import("../../types.js").ChartSeries[];
|
|
122
|
+
categoryColors: string[];
|
|
123
|
+
footnotes: string[];
|
|
124
|
+
} & {
|
|
125
|
+
type: "heatmap";
|
|
126
|
+
typeOptions?: Partial<import("../../chartTypes/heatmap.js").TypeOptions> | undefined;
|
|
127
|
+
}) | ({
|
|
128
|
+
title: string;
|
|
129
|
+
categories: string[];
|
|
130
|
+
series: import("../../types.js").ChartSeries[];
|
|
131
|
+
categoryColors: string[];
|
|
132
|
+
footnotes: string[];
|
|
133
|
+
} & {
|
|
134
|
+
type: "radialBar";
|
|
135
|
+
typeOptions?: Partial<import("../../chartTypes/radialBar.js").TypeOptions> | undefined;
|
|
136
|
+
}) | ({
|
|
137
|
+
title: string;
|
|
138
|
+
categories: string[];
|
|
139
|
+
series: import("../../types.js").ChartSeries[];
|
|
140
|
+
categoryColors: string[];
|
|
141
|
+
footnotes: string[];
|
|
142
|
+
} & {
|
|
143
|
+
type: "radar";
|
|
144
|
+
typeOptions?: Partial<import("../../chartTypes/radar.js").TypeOptions> | undefined;
|
|
145
|
+
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
146
|
+
declare const _default: typeof __VLS_export;
|
|
147
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChartRenderer } from './ChartRenderer/index.vue.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ChartRenderer } from "./ChartRenderer/index.vue";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChartTypeDefinition } from '../../../../chartTypes/types.js';
|
|
2
|
+
type ChartOption = ChartTypeDefinition['editor']['options'][string];
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
title: string;
|
|
5
|
+
options: Record<string, ChartOption>;
|
|
6
|
+
typeOptions: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:title": (value: unknown) => any;
|
|
10
|
+
"update:typeOptions": (value: Record<string, unknown>) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:title"?: ((value: unknown) => any) | undefined;
|
|
13
|
+
"onUpdate:typeOptions"?: ((value: Record<string, unknown>) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-chart-type-options">
|
|
3
|
+
<OptionsFormItem
|
|
4
|
+
:option="titleOption"
|
|
5
|
+
property="title"
|
|
6
|
+
:mutated-value="title"
|
|
7
|
+
@update="$emit('update:title', $event)"
|
|
8
|
+
/>
|
|
9
|
+
|
|
10
|
+
<OptionsFormItem
|
|
11
|
+
v-for="item in ungroupedOptions"
|
|
12
|
+
:key="item.key"
|
|
13
|
+
:option="item.option"
|
|
14
|
+
:property="item.key"
|
|
15
|
+
:mutated-value="typeOptions[item.key] ?? item.option.default"
|
|
16
|
+
@update="updateOption(item.key, $event)"
|
|
17
|
+
/>
|
|
18
|
+
|
|
19
|
+
<OptionsFormGroup
|
|
20
|
+
v-for="group in groups"
|
|
21
|
+
:key="'group_' + group.label"
|
|
22
|
+
:label="group.label"
|
|
23
|
+
:is-active="group.label === activeGroup"
|
|
24
|
+
@toggle="onToggleGroup(group.label)"
|
|
25
|
+
>
|
|
26
|
+
<OptionsFormItem
|
|
27
|
+
v-for="item in group.options"
|
|
28
|
+
:key="item.key"
|
|
29
|
+
:option="item.option"
|
|
30
|
+
:property="item.key"
|
|
31
|
+
:mutated-value="typeOptions[item.key] ?? item.option.default"
|
|
32
|
+
is-grouped
|
|
33
|
+
@update="updateOption(item.key, $event)"
|
|
34
|
+
/>
|
|
35
|
+
</OptionsFormGroup>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
|
|
39
|
+
<script setup>
|
|
40
|
+
import { computed, ref, useBlokkli } from "#imports";
|
|
41
|
+
import OptionsFormItem from "#blokkli/editor/features/options/Form/Item.vue";
|
|
42
|
+
import OptionsFormGroup from "#blokkli/editor/features/options/Form/Group.vue";
|
|
43
|
+
const { $t } = useBlokkli();
|
|
44
|
+
const props = defineProps({
|
|
45
|
+
title: { type: String, required: true },
|
|
46
|
+
options: { type: Object, required: true },
|
|
47
|
+
typeOptions: { type: Object, required: true }
|
|
48
|
+
});
|
|
49
|
+
const emit = defineEmits(["update:title", "update:typeOptions"]);
|
|
50
|
+
const titleOption = {
|
|
51
|
+
type: "text",
|
|
52
|
+
label: $t("chartsTitle", "Title"),
|
|
53
|
+
default: ""
|
|
54
|
+
};
|
|
55
|
+
const activeGroup = ref("");
|
|
56
|
+
function onToggleGroup(label) {
|
|
57
|
+
if (activeGroup.value === label) {
|
|
58
|
+
activeGroup.value = "";
|
|
59
|
+
} else {
|
|
60
|
+
activeGroup.value = label;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const allOptions = computed(
|
|
64
|
+
() => Object.entries(props.options).map(([key, option]) => ({ key, option }))
|
|
65
|
+
);
|
|
66
|
+
const ungroupedOptions = computed(
|
|
67
|
+
() => allOptions.value.filter((v) => !v.option.group)
|
|
68
|
+
);
|
|
69
|
+
function getGroupLabel(group) {
|
|
70
|
+
if (group === "display") {
|
|
71
|
+
return $t("chartsOptionGroupDisplay", "Display");
|
|
72
|
+
} else if (group === "labels") {
|
|
73
|
+
return $t("chartsOptionGroupLabels", "Labels");
|
|
74
|
+
}
|
|
75
|
+
return group;
|
|
76
|
+
}
|
|
77
|
+
const groups = computed(() => {
|
|
78
|
+
return Object.values(
|
|
79
|
+
allOptions.value.reduce((acc, entry) => {
|
|
80
|
+
if (entry.option.group) {
|
|
81
|
+
if (!acc[entry.option.group]) {
|
|
82
|
+
acc[entry.option.group] = {
|
|
83
|
+
label: getGroupLabel(entry.option.group),
|
|
84
|
+
options: [entry]
|
|
85
|
+
};
|
|
86
|
+
} else {
|
|
87
|
+
acc[entry.option.group].options.push(entry);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return acc;
|
|
91
|
+
}, {})
|
|
92
|
+
);
|
|
93
|
+
});
|
|
94
|
+
function updateOption(key, value) {
|
|
95
|
+
emit("update:typeOptions", { ...props.typeOptions, [key]: value });
|
|
96
|
+
}
|
|
97
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ChartTypeDefinition } from '../../../../chartTypes/types.js';
|
|
2
|
+
type ChartOption = ChartTypeDefinition['editor']['options'][string];
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
title: string;
|
|
5
|
+
options: Record<string, ChartOption>;
|
|
6
|
+
typeOptions: Record<string, unknown>;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:title": (value: unknown) => any;
|
|
10
|
+
"update:typeOptions": (value: Record<string, unknown>) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
"onUpdate:title"?: ((value: unknown) => any) | undefined;
|
|
13
|
+
"onUpdate:typeOptions"?: ((value: Record<string, unknown>) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChartType } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: ChartType;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: ChartType) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: ChartType) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-chart-type-picker">
|
|
3
|
+
<button
|
|
4
|
+
v-for="option in chartTypes"
|
|
5
|
+
:key="option.value"
|
|
6
|
+
type="button"
|
|
7
|
+
:class="{ 'is-active': modelValue === option.value }"
|
|
8
|
+
@click="emit('update:modelValue', option.value)"
|
|
9
|
+
>
|
|
10
|
+
<div>
|
|
11
|
+
<Icon :name="option.icon" />
|
|
12
|
+
<span>{{ option.label }}</span>
|
|
13
|
+
</div>
|
|
14
|
+
</button>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { computed, useBlokkli } from "#imports";
|
|
20
|
+
import { getChartTypes } from "../../../../chartTypes";
|
|
21
|
+
import { Icon } from "#blokkli/editor/components";
|
|
22
|
+
defineProps({
|
|
23
|
+
modelValue: { type: String, required: true }
|
|
24
|
+
});
|
|
25
|
+
const emit = defineEmits(["update:modelValue"]);
|
|
26
|
+
const { $t } = useBlokkli();
|
|
27
|
+
const chartTypes = computed(
|
|
28
|
+
() => getChartTypes($t).map((def) => ({
|
|
29
|
+
value: def.id,
|
|
30
|
+
label: def.editor.label,
|
|
31
|
+
icon: def.editor.icon
|
|
32
|
+
}))
|
|
33
|
+
);
|
|
34
|
+
</script>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ChartType } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
modelValue: ChartType;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
"update:modelValue": (value: ChartType) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
"onUpdate:modelValue"?: ((value: ChartType) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChartColor } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
colorId: string;
|
|
4
|
+
colors: Record<string, ChartColor>;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
|
+
select: (colorId: string) => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
9
|
+
onSelect?: ((colorId: string) => any) | undefined;
|
|
10
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Dropdown position="top-left">
|
|
3
|
+
<template #button>
|
|
4
|
+
<span
|
|
5
|
+
class="bk-chart-color-swatch"
|
|
6
|
+
:style="{ backgroundColor: displayColor }"
|
|
7
|
+
/>
|
|
8
|
+
</template>
|
|
9
|
+
<template #default="{ close }">
|
|
10
|
+
<button
|
|
11
|
+
v-for="(entry, id) in colors"
|
|
12
|
+
:key="id"
|
|
13
|
+
type="button"
|
|
14
|
+
class="bk-chart-color-option"
|
|
15
|
+
:class="{ 'is-active': colorId === id }"
|
|
16
|
+
@click="
|
|
17
|
+
() => {
|
|
18
|
+
emit('select', id);
|
|
19
|
+
close();
|
|
20
|
+
}
|
|
21
|
+
"
|
|
22
|
+
>
|
|
23
|
+
<span
|
|
24
|
+
class="bk-chart-color-swatch"
|
|
25
|
+
:style="{ backgroundColor: entry.color }"
|
|
26
|
+
/>
|
|
27
|
+
<span>{{ entry.label }}</span>
|
|
28
|
+
</button>
|
|
29
|
+
</template>
|
|
30
|
+
</Dropdown>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup>
|
|
34
|
+
import { computed } from "#imports";
|
|
35
|
+
import { Dropdown } from "#blokkli/editor/components";
|
|
36
|
+
const props = defineProps({
|
|
37
|
+
colorId: { type: String, required: true },
|
|
38
|
+
colors: { type: Object, required: true }
|
|
39
|
+
});
|
|
40
|
+
const emit = defineEmits(["select"]);
|
|
41
|
+
const displayColor = computed(() => {
|
|
42
|
+
const entry = props.colors[props.colorId];
|
|
43
|
+
if (entry) {
|
|
44
|
+
return entry.color;
|
|
45
|
+
}
|
|
46
|
+
const first = Object.values(props.colors)[0];
|
|
47
|
+
return first?.color || "#888888";
|
|
48
|
+
});
|
|
49
|
+
</script>
|