@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,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,19 @@
|
|
|
1
|
+
import type { ChartSeries, ChartColor } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
colors: Record<string, ChartColor>;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
import: (payload: {
|
|
7
|
+
categories: string[];
|
|
8
|
+
series: ChartSeries[];
|
|
9
|
+
categoryColors: string[];
|
|
10
|
+
}) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onImport?: ((payload: {
|
|
13
|
+
categories: string[];
|
|
14
|
+
series: ChartSeries[];
|
|
15
|
+
categoryColors: string[];
|
|
16
|
+
}) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<button
|
|
3
|
+
type="button"
|
|
4
|
+
class="bk-button bk-is-small"
|
|
5
|
+
@click="fileInputEl?.click()"
|
|
6
|
+
>
|
|
7
|
+
{{ $t("chartsImportCsv", "Import CSV") }}
|
|
8
|
+
</button>
|
|
9
|
+
<input
|
|
10
|
+
ref="fileInputEl"
|
|
11
|
+
type="file"
|
|
12
|
+
accept=".csv,text/csv"
|
|
13
|
+
class="bk-chart-data-table-file-input"
|
|
14
|
+
@change="onFileChange"
|
|
15
|
+
/>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup>
|
|
19
|
+
import { useTemplateRef, useBlokkli } from "#imports";
|
|
20
|
+
import { getColorIdAtIndex, parseNumericInput } from "../../../../helpers";
|
|
21
|
+
const props = defineProps({
|
|
22
|
+
colors: { type: Object, required: true }
|
|
23
|
+
});
|
|
24
|
+
const emit = defineEmits(["import"]);
|
|
25
|
+
const { $t } = useBlokkli();
|
|
26
|
+
const fileInputEl = useTemplateRef("fileInputEl");
|
|
27
|
+
function parseCsvLine(line) {
|
|
28
|
+
const cells = [];
|
|
29
|
+
let current = "";
|
|
30
|
+
let inQuotes = false;
|
|
31
|
+
for (let i = 0; i < line.length; i++) {
|
|
32
|
+
const char = line[i];
|
|
33
|
+
if (inQuotes) {
|
|
34
|
+
if (char === '"' && line[i + 1] === '"') {
|
|
35
|
+
current += '"';
|
|
36
|
+
i++;
|
|
37
|
+
} else if (char === '"') {
|
|
38
|
+
inQuotes = false;
|
|
39
|
+
} else {
|
|
40
|
+
current += char;
|
|
41
|
+
}
|
|
42
|
+
} else if (char === '"') {
|
|
43
|
+
inQuotes = true;
|
|
44
|
+
} else if (char === "," || char === ";" || char === " ") {
|
|
45
|
+
cells.push(current.trim());
|
|
46
|
+
current = "";
|
|
47
|
+
} else {
|
|
48
|
+
current += char;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
cells.push(current.trim());
|
|
52
|
+
return cells;
|
|
53
|
+
}
|
|
54
|
+
function onFileChange(event) {
|
|
55
|
+
const input = event.target;
|
|
56
|
+
const file = input.files?.[0];
|
|
57
|
+
if (!file) return;
|
|
58
|
+
const reader = new FileReader();
|
|
59
|
+
reader.onload = (e) => {
|
|
60
|
+
const text = e.target?.result;
|
|
61
|
+
if (typeof text !== "string") return;
|
|
62
|
+
const lines = text.split(/\r?\n/).map((l) => l.trim()).filter((l) => l.length > 0);
|
|
63
|
+
if (lines.length < 2) return;
|
|
64
|
+
const header = parseCsvLine(lines[0]);
|
|
65
|
+
const seriesNames = header.slice(1);
|
|
66
|
+
if (seriesNames.length === 0) return;
|
|
67
|
+
const categories = [];
|
|
68
|
+
const seriesData = seriesNames.map(() => []);
|
|
69
|
+
for (let i = 1; i < lines.length; i++) {
|
|
70
|
+
const cells = parseCsvLine(lines[i]);
|
|
71
|
+
categories.push(cells[0] || `Category ${i}`);
|
|
72
|
+
for (let si = 0; si < seriesNames.length; si++) {
|
|
73
|
+
seriesData[si].push(parseNumericInput(cells[si + 1] || ""));
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const series = seriesNames.map((name, i) => ({
|
|
77
|
+
name: name || `Series ${i + 1}`,
|
|
78
|
+
color: getColorIdAtIndex(i, props.colors),
|
|
79
|
+
data: seriesData[i]
|
|
80
|
+
}));
|
|
81
|
+
const categoryColors = categories.map(
|
|
82
|
+
(_, i) => getColorIdAtIndex(i, props.colors)
|
|
83
|
+
);
|
|
84
|
+
emit("import", { categories, series, categoryColors });
|
|
85
|
+
};
|
|
86
|
+
reader.readAsText(file);
|
|
87
|
+
input.value = "";
|
|
88
|
+
}
|
|
89
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ChartSeries, ChartColor } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
colors: Record<string, ChartColor>;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
import: (payload: {
|
|
7
|
+
categories: string[];
|
|
8
|
+
series: ChartSeries[];
|
|
9
|
+
categoryColors: string[];
|
|
10
|
+
}) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
12
|
+
onImport?: ((payload: {
|
|
13
|
+
categories: string[];
|
|
14
|
+
series: ChartSeries[];
|
|
15
|
+
categoryColors: string[];
|
|
16
|
+
}) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ChartSeries, ChartColor } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
hasMultipleSeries: boolean;
|
|
7
|
+
hasSeriesColors: boolean;
|
|
8
|
+
hasCategoryColors: boolean;
|
|
9
|
+
colors: Record<string, ChartColor>;
|
|
10
|
+
removeRow: (index: number) => void;
|
|
11
|
+
removeSeries: (index: number) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:categories": (value: string[]) => any;
|
|
15
|
+
"update:series": (value: ChartSeries[]) => any;
|
|
16
|
+
"update:categoryColors": (value: string[]) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:categories"?: ((value: string[]) => any) | undefined;
|
|
19
|
+
"onUpdate:series"?: ((value: ChartSeries[]) => any) | undefined;
|
|
20
|
+
"onUpdate:categoryColors"?: ((value: string[]) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<table
|
|
3
|
+
class="bk-chart-data-table"
|
|
4
|
+
@keydown="onTableKeydown"
|
|
5
|
+
@input="onTableInput"
|
|
6
|
+
@click="onTableClick"
|
|
7
|
+
>
|
|
8
|
+
<thead v-if="hasMultipleSeries">
|
|
9
|
+
<tr>
|
|
10
|
+
<th />
|
|
11
|
+
<th v-for="(s, si) in visibleSeries" :key="si">
|
|
12
|
+
<div class="bk-chart-data-table-series-header">
|
|
13
|
+
<ColorDropdown
|
|
14
|
+
v-if="hasSeriesColors"
|
|
15
|
+
:color-id="s.color"
|
|
16
|
+
:colors="colors"
|
|
17
|
+
@select="updateSeriesColor(si, $event)"
|
|
18
|
+
/>
|
|
19
|
+
<input
|
|
20
|
+
type="text"
|
|
21
|
+
:value="s.name"
|
|
22
|
+
class="bk-chart-data-table-series-name"
|
|
23
|
+
@change="
|
|
24
|
+
updateSeriesName(si, $event.target.value)
|
|
25
|
+
"
|
|
26
|
+
/>
|
|
27
|
+
<button
|
|
28
|
+
v-if="series.length > 1"
|
|
29
|
+
type="button"
|
|
30
|
+
class="bk-chart-data-table-remove"
|
|
31
|
+
@click="props.removeSeries(si)"
|
|
32
|
+
>
|
|
33
|
+
<Icon name="bk_mdi_delete" />
|
|
34
|
+
</button>
|
|
35
|
+
</div>
|
|
36
|
+
</th>
|
|
37
|
+
<th v-if="canDeleteRows" />
|
|
38
|
+
</tr>
|
|
39
|
+
</thead>
|
|
40
|
+
<tbody>
|
|
41
|
+
<tr v-for="(cat, ci) in categories" :key="ci">
|
|
42
|
+
<td>
|
|
43
|
+
<div class="bk-chart-data-table-category-cell">
|
|
44
|
+
<ColorDropdown
|
|
45
|
+
v-if="hasCategoryColors"
|
|
46
|
+
:color-id="categoryColors[ci] || ''"
|
|
47
|
+
:colors="colors"
|
|
48
|
+
@select="updateCategoryColor(ci, $event)"
|
|
49
|
+
/>
|
|
50
|
+
<input
|
|
51
|
+
type="text"
|
|
52
|
+
:value="cat"
|
|
53
|
+
@change="
|
|
54
|
+
updateCategory(ci, $event.target.value)
|
|
55
|
+
"
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
</td>
|
|
59
|
+
<td v-for="(s, si) in visibleSeries" :key="si">
|
|
60
|
+
<input
|
|
61
|
+
type="text"
|
|
62
|
+
inputmode="decimal"
|
|
63
|
+
:value="s.data[ci]"
|
|
64
|
+
@blur="
|
|
65
|
+
updateValue(si, ci, $event.target.value)
|
|
66
|
+
"
|
|
67
|
+
/>
|
|
68
|
+
</td>
|
|
69
|
+
<td v-if="canDeleteRows">
|
|
70
|
+
<button
|
|
71
|
+
type="button"
|
|
72
|
+
class="bk-chart-data-table-remove"
|
|
73
|
+
@click="props.removeRow(ci)"
|
|
74
|
+
>
|
|
75
|
+
<Icon name="bk_mdi_delete" />
|
|
76
|
+
</button>
|
|
77
|
+
</td>
|
|
78
|
+
</tr>
|
|
79
|
+
</tbody>
|
|
80
|
+
</table>
|
|
81
|
+
</template>
|
|
82
|
+
|
|
83
|
+
<script setup>
|
|
84
|
+
import { computed, ref } from "#imports";
|
|
85
|
+
import { parseNumericInput } from "../../../../helpers";
|
|
86
|
+
import { Icon } from "#blokkli/editor/components";
|
|
87
|
+
import ColorDropdown from "../ColorDropdown/index.vue";
|
|
88
|
+
const props = defineProps({
|
|
89
|
+
categories: { type: Array, required: true },
|
|
90
|
+
series: { type: Array, required: true },
|
|
91
|
+
categoryColors: { type: Array, required: true },
|
|
92
|
+
hasMultipleSeries: { type: Boolean, required: true },
|
|
93
|
+
hasSeriesColors: { type: Boolean, required: true },
|
|
94
|
+
hasCategoryColors: { type: Boolean, required: true },
|
|
95
|
+
colors: { type: Object, required: true },
|
|
96
|
+
removeRow: { type: Function, required: true },
|
|
97
|
+
removeSeries: { type: Function, required: true }
|
|
98
|
+
});
|
|
99
|
+
const emit = defineEmits(["update:categories", "update:series", "update:categoryColors"]);
|
|
100
|
+
const visibleSeries = computed(
|
|
101
|
+
() => props.hasMultipleSeries ? props.series : props.series.slice(0, 1)
|
|
102
|
+
);
|
|
103
|
+
const canDeleteRows = computed(() => props.categories.length > 1);
|
|
104
|
+
function updateCategory(index, value) {
|
|
105
|
+
if (props.categories[index] === value) return;
|
|
106
|
+
const updated = [...props.categories];
|
|
107
|
+
updated[index] = value;
|
|
108
|
+
emit("update:categories", updated);
|
|
109
|
+
}
|
|
110
|
+
function updateValue(seriesIndex, categoryIndex, raw) {
|
|
111
|
+
const value = parseNumericInput(raw);
|
|
112
|
+
if (props.series[seriesIndex]?.data[categoryIndex] === value) return;
|
|
113
|
+
const updated = props.series.map((s, si) => {
|
|
114
|
+
if (si !== seriesIndex) return s;
|
|
115
|
+
const data = [...s.data];
|
|
116
|
+
data[categoryIndex] = value;
|
|
117
|
+
return { ...s, data };
|
|
118
|
+
});
|
|
119
|
+
emit("update:series", updated);
|
|
120
|
+
}
|
|
121
|
+
function updateSeriesName(index, name) {
|
|
122
|
+
emit(
|
|
123
|
+
"update:series",
|
|
124
|
+
props.series.map((s, i) => i === index ? { ...s, name } : s)
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
function updateSeriesColor(index, colorId) {
|
|
128
|
+
emit(
|
|
129
|
+
"update:series",
|
|
130
|
+
props.series.map((s, i) => i === index ? { ...s, color: colorId } : s)
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
function updateCategoryColor(index, colorId) {
|
|
134
|
+
const updated = [...props.categoryColors];
|
|
135
|
+
updated[index] = colorId;
|
|
136
|
+
emit("update:categoryColors", updated);
|
|
137
|
+
}
|
|
138
|
+
const editing = ref(false);
|
|
139
|
+
function onTableInput(e) {
|
|
140
|
+
if (e.target instanceof HTMLInputElement) {
|
|
141
|
+
editing.value = true;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function onTableClick(e) {
|
|
145
|
+
if (e.target instanceof HTMLInputElement) {
|
|
146
|
+
editing.value = true;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
function onTableKeydown(e) {
|
|
150
|
+
const { key } = e;
|
|
151
|
+
if (key !== "ArrowUp" && key !== "ArrowDown" && key !== "ArrowLeft" && key !== "ArrowRight" && key !== "Enter" && key !== "F2" && key !== "Escape") {
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
const active = document.activeElement;
|
|
155
|
+
if (!(active instanceof HTMLElement)) return;
|
|
156
|
+
if (key === "F2" && active instanceof HTMLInputElement) {
|
|
157
|
+
editing.value = true;
|
|
158
|
+
const len = active.value.length;
|
|
159
|
+
active.setSelectionRange(len, len);
|
|
160
|
+
e.preventDefault();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
if (key === "Escape" && active instanceof HTMLInputElement) {
|
|
164
|
+
editing.value = false;
|
|
165
|
+
active.select();
|
|
166
|
+
e.preventDefault();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
if (key === "Enter" && !(active instanceof HTMLInputElement)) return;
|
|
170
|
+
if (key === "Enter" && !editing.value && !e.shiftKey) {
|
|
171
|
+
editing.value = true;
|
|
172
|
+
const input = active;
|
|
173
|
+
const len = input.value.length;
|
|
174
|
+
input.setSelectionRange(len, len);
|
|
175
|
+
e.preventDefault();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
const table = active.closest("table");
|
|
179
|
+
if (!table) return;
|
|
180
|
+
if (editing.value && active instanceof HTMLInputElement) {
|
|
181
|
+
const atStart = active.selectionStart === 0 && active.selectionEnd === 0;
|
|
182
|
+
const atEnd = active.selectionEnd === active.value.length && active.selectionStart === active.selectionEnd;
|
|
183
|
+
if (key === "ArrowLeft" && !atStart) return;
|
|
184
|
+
if (key === "ArrowRight" && !atEnd) return;
|
|
185
|
+
if (key === "ArrowUp" || key === "ArrowDown") return;
|
|
186
|
+
}
|
|
187
|
+
const cellSelector = "input, button";
|
|
188
|
+
const rows = Array.from(
|
|
189
|
+
table.querySelectorAll("thead > tr, tbody > tr")
|
|
190
|
+
);
|
|
191
|
+
let currentRow = -1;
|
|
192
|
+
let currentCol = -1;
|
|
193
|
+
for (let r = 0; r < rows.length; r++) {
|
|
194
|
+
const cells = Array.from(
|
|
195
|
+
rows[r].querySelectorAll(cellSelector)
|
|
196
|
+
);
|
|
197
|
+
const col = cells.indexOf(active);
|
|
198
|
+
if (col !== -1) {
|
|
199
|
+
currentRow = r;
|
|
200
|
+
currentCol = col;
|
|
201
|
+
break;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
if (currentRow === -1) return;
|
|
205
|
+
let targetRow = currentRow;
|
|
206
|
+
let targetCol = currentCol;
|
|
207
|
+
if (key === "ArrowUp" || key === "Enter" && e.shiftKey) targetRow--;
|
|
208
|
+
else if (key === "ArrowDown" || key === "Enter" && !e.shiftKey) targetRow++;
|
|
209
|
+
else if (key === "ArrowLeft") targetCol--;
|
|
210
|
+
else if (key === "ArrowRight") targetCol++;
|
|
211
|
+
if (targetRow < 0 || targetRow >= rows.length) return;
|
|
212
|
+
const targetCells = Array.from(
|
|
213
|
+
rows[targetRow].querySelectorAll(cellSelector)
|
|
214
|
+
);
|
|
215
|
+
if (targetCol < 0 || targetCol >= targetCells.length) return;
|
|
216
|
+
e.preventDefault();
|
|
217
|
+
editing.value = false;
|
|
218
|
+
const target = targetCells[targetCol];
|
|
219
|
+
target.focus();
|
|
220
|
+
if (target instanceof HTMLInputElement) {
|
|
221
|
+
target.select();
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
</script>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ChartSeries, ChartColor } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
categories: string[];
|
|
4
|
+
series: ChartSeries[];
|
|
5
|
+
categoryColors: string[];
|
|
6
|
+
hasMultipleSeries: boolean;
|
|
7
|
+
hasSeriesColors: boolean;
|
|
8
|
+
hasCategoryColors: boolean;
|
|
9
|
+
colors: Record<string, ChartColor>;
|
|
10
|
+
removeRow: (index: number) => void;
|
|
11
|
+
removeSeries: (index: number) => void;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
14
|
+
"update:categories": (value: string[]) => any;
|
|
15
|
+
"update:series": (value: ChartSeries[]) => any;
|
|
16
|
+
"update:categoryColors": (value: string[]) => any;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
18
|
+
"onUpdate:categories"?: ((value: string[]) => any) | undefined;
|
|
19
|
+
"onUpdate:series"?: ((value: ChartSeries[]) => any) | undefined;
|
|
20
|
+
"onUpdate:categoryColors"?: ((value: string[]) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const _default: typeof __VLS_export;
|
|
23
|
+
export default _default;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { BlokkliClipboardItem } from '../types.js';
|
|
2
1
|
type __VLS_Props = {
|
|
3
|
-
|
|
2
|
+
footnotes: string[];
|
|
4
3
|
};
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:footnotes": (value: string[]) => any;
|
|
7
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
|
|
7
|
+
"onUpdate:footnotes"?: ((value: string[]) => any) | undefined;
|
|
9
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
9
|
declare const _default: typeof __VLS_export;
|
|
11
10
|
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-chart-data-table-footnotes">
|
|
3
|
+
<label class="bk-form-label">{{
|
|
4
|
+
$t("chartsFootnotes", "Footnotes")
|
|
5
|
+
}}</label>
|
|
6
|
+
<div
|
|
7
|
+
v-for="(note, i) in footnotes"
|
|
8
|
+
:key="i"
|
|
9
|
+
class="bk-chart-data-table-footnote-row"
|
|
10
|
+
>
|
|
11
|
+
<span class="bk-chart-data-table-footnote-marker">{{
|
|
12
|
+
superscriptFor(i + 1)
|
|
13
|
+
}}</span>
|
|
14
|
+
<input
|
|
15
|
+
type="text"
|
|
16
|
+
:value="note"
|
|
17
|
+
class="bk-form-input"
|
|
18
|
+
@change="updateFootnote(i, $event.target.value)"
|
|
19
|
+
/>
|
|
20
|
+
<button
|
|
21
|
+
type="button"
|
|
22
|
+
class="bk-chart-data-table-remove"
|
|
23
|
+
@click="removeFootnote(i)"
|
|
24
|
+
>
|
|
25
|
+
<Icon name="bk_mdi_delete" />
|
|
26
|
+
</button>
|
|
27
|
+
</div>
|
|
28
|
+
<button type="button" class="bk-button bk-is-small" @click="addFootnote">
|
|
29
|
+
<Icon name="bk_mdi_add" />
|
|
30
|
+
{{ $t("chartsAddFootnote", "Add footnote") }}
|
|
31
|
+
</button>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script setup>
|
|
36
|
+
import { useBlokkli } from "#imports";
|
|
37
|
+
import { SUPERSCRIPTS } from "../../../../helpers";
|
|
38
|
+
import { Icon } from "#blokkli/editor/components";
|
|
39
|
+
const { $t } = useBlokkli();
|
|
40
|
+
const props = defineProps({
|
|
41
|
+
footnotes: { type: Array, required: true }
|
|
42
|
+
});
|
|
43
|
+
const emit = defineEmits(["update:footnotes"]);
|
|
44
|
+
function superscriptFor(n) {
|
|
45
|
+
return String(n).split("").map((d) => SUPERSCRIPTS[d] || d).join("");
|
|
46
|
+
}
|
|
47
|
+
function updateFootnote(index, value) {
|
|
48
|
+
const updated = [...props.footnotes];
|
|
49
|
+
updated[index] = value;
|
|
50
|
+
emit("update:footnotes", updated);
|
|
51
|
+
}
|
|
52
|
+
function addFootnote() {
|
|
53
|
+
emit("update:footnotes", [...props.footnotes, ""]);
|
|
54
|
+
}
|
|
55
|
+
function removeFootnote(index) {
|
|
56
|
+
emit(
|
|
57
|
+
"update:footnotes",
|
|
58
|
+
props.footnotes.filter((_, i) => i !== index)
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import type { BlokkliClipboardItem } from '../types.js';
|
|
2
1
|
type __VLS_Props = {
|
|
3
|
-
|
|
2
|
+
footnotes: string[];
|
|
4
3
|
};
|
|
5
|
-
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
-
|
|
4
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
5
|
+
"update:footnotes": (value: string[]) => any;
|
|
7
6
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
-
|
|
7
|
+
"onUpdate:footnotes"?: ((value: string[]) => any) | undefined;
|
|
9
8
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
9
|
declare const _default: typeof __VLS_export;
|
|
11
10
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BlokkliChartData } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uuid: string;
|
|
4
|
+
optionKey: string;
|
|
5
|
+
data: BlokkliChartData | null;
|
|
6
|
+
stale: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="{ 'bk-is-stale': stale }">
|
|
3
|
+
<BlokkliItem
|
|
4
|
+
v-if="item"
|
|
5
|
+
v-bind="item"
|
|
6
|
+
:options="mergedOptions"
|
|
7
|
+
:is-editing="false"
|
|
8
|
+
/>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup>
|
|
13
|
+
import { computed, provide, useBlokkli } from "#imports";
|
|
14
|
+
import {
|
|
15
|
+
INJECT_EDIT_CONTEXT,
|
|
16
|
+
INJECT_FIELD_LIST_BLOCKS,
|
|
17
|
+
INJECT_FIELD_LIST_TYPE,
|
|
18
|
+
INJECT_IS_EDITING,
|
|
19
|
+
INJECT_IS_IN_REUSABLE,
|
|
20
|
+
INJECT_PROVIDER_BLOCKS
|
|
21
|
+
} from "#blokkli/helpers/injections";
|
|
22
|
+
const { state } = useBlokkli();
|
|
23
|
+
const props = defineProps({
|
|
24
|
+
uuid: { type: String, required: true },
|
|
25
|
+
optionKey: { type: String, required: true },
|
|
26
|
+
data: { type: [Object, null], required: true },
|
|
27
|
+
stale: { type: Boolean, required: true }
|
|
28
|
+
});
|
|
29
|
+
const item = computed(() => state.getFieldListItem(props.uuid));
|
|
30
|
+
const mergedOptions = computed(() => {
|
|
31
|
+
const base = item.value?.options || {};
|
|
32
|
+
return {
|
|
33
|
+
...base,
|
|
34
|
+
[props.optionKey]: JSON.stringify(props.data)
|
|
35
|
+
};
|
|
36
|
+
});
|
|
37
|
+
const blocks = computed(() => []);
|
|
38
|
+
const fieldListType = computed(() => "default");
|
|
39
|
+
provide(INJECT_IS_IN_REUSABLE, true);
|
|
40
|
+
provide(INJECT_IS_EDITING, false);
|
|
41
|
+
provide(INJECT_FIELD_LIST_BLOCKS, blocks);
|
|
42
|
+
provide(INJECT_PROVIDER_BLOCKS, blocks);
|
|
43
|
+
provide(INJECT_FIELD_LIST_TYPE, fieldListType);
|
|
44
|
+
provide(INJECT_EDIT_CONTEXT, null);
|
|
45
|
+
</script>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { BlokkliChartData } from '../../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uuid: string;
|
|
4
|
+
optionKey: string;
|
|
5
|
+
data: BlokkliChartData | null;
|
|
6
|
+
stale: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BlokkliChartData } from '../../../types.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
uuid: string;
|
|
4
|
+
optionKey: string;
|
|
5
|
+
};
|
|
6
|
+
declare function getData(): BlokkliChartData;
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
8
|
+
getData: typeof getData;
|
|
9
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|