@blokkli/editor 2.0.0-alpha.59 → 2.0.0-alpha.61
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/module.json +1 -1
- package/dist/module.mjs +28 -11
- package/dist/modules/agent/index.mjs +2 -5
- package/dist/modules/agent/runtime/app/features/agent/Container.vue +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +15 -3
- package/dist/modules/agent/runtime/app/features/agent/index.vue +5 -1
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +2 -1
- package/dist/modules/agent/runtime/app/helpers/mutationResult.d.ts +38 -0
- package/dist/modules/agent/runtime/app/helpers/mutationResult.js +49 -0
- package/dist/modules/agent/runtime/app/prompts/fixReadability.js +3 -3
- package/dist/modules/agent/runtime/app/providers/agentProvider.d.ts +2 -1
- package/dist/modules/agent/runtime/app/providers/agentProvider.js +6 -6
- package/dist/modules/agent/runtime/app/providers/toolsProvider.js +3 -13
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/add_content_search_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_fragment/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.d.ts +24 -0
- package/dist/modules/agent/runtime/app/tools/add_media_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.d.ts +32 -0
- package/dist/modules/agent/runtime/app/tools/add_paragraphs/index.js +6 -4
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/add_template/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/add_template/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.d.ts +3 -3
- package/dist/modules/agent/runtime/app/tools/ask_question/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.d.vue.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue +172 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/Component.vue.d.ts +29 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.d.ts +28 -0
- package/dist/modules/agent/runtime/app/tools/auto_translate_paragraphs/index.js +80 -0
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/check_readability_for_texts/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +16 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +10 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delete_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/detach_reusable_paragraph/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/duplicate_paragraphs/index.js +5 -3
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.d.ts +31 -0
- package/dist/modules/agent/runtime/app/tools/find_paragraphs/index.js +7 -7
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.d.ts +7 -0
- package/dist/modules/agent/runtime/app/tools/get_all_fragments/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.d.ts +10 -0
- package/dist/modules/agent/runtime/app/tools/get_all_page_content/index.js +3 -3
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.d.ts +35 -0
- package/dist/modules/agent/runtime/app/tools/get_bundle_info/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/get_child_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.d.ts +30 -0
- package/dist/modules/agent/runtime/app/tools/get_content_fields/index.js +15 -11
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.d.ts +25 -0
- package/dist/modules/agent/runtime/app/tools/get_mutation_history/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.d.ts +8 -0
- package/dist/modules/agent/runtime/app/tools/get_page_structure/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.d.ts +8 -0
- package/dist/modules/agent/runtime/app/tools/get_page_text/index.js +65 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.d.ts +81 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_context/index.js +20 -12
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.d.ts +14 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraph_options/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.d.ts +38 -0
- package/dist/modules/agent/runtime/app/tools/get_paragraphs_in_viewport/index.js +7 -6
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.d.ts +12 -0
- package/dist/modules/agent/runtime/app/tools/get_readability_issues/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/get_referenced_entities/index.js +62 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.d.ts +9 -0
- package/dist/modules/agent/runtime/app/tools/get_selected_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/go_to_history_index/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/helpers.d.ts +8 -2
- package/dist/modules/agent/runtime/app/tools/helpers.js +9 -9
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.d.ts +22 -0
- package/dist/modules/agent/runtime/app/tools/move_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.d.ts +21 -0
- package/dist/modules/agent/runtime/app/tools/rearrange_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.d.ts +20 -0
- package/dist/modules/agent/runtime/app/tools/replace_content_search_item/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/replace_media_field/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/schemas.d.ts +25 -5
- package/dist/modules/agent/runtime/app/tools/schemas.js +37 -10
- package/dist/modules/agent/runtime/app/tools/search_content/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_content/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/search_media/index.d.ts +5 -1
- package/dist/modules/agent/runtime/app/tools/search_media/index.js +3 -3
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/search_reusable_paragraphs/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_templates/index.d.ts +13 -0
- package/dist/modules/agent/runtime/app/tools/search_templates/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/search_text/index.d.ts +15 -0
- package/dist/modules/agent/runtime/app/tools/search_text/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/Component.vue +1 -1
- package/dist/modules/agent/runtime/app/tools/select_media/index.d.ts +2 -2
- package/dist/modules/agent/runtime/app/tools/select_media/index.js +2 -2
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.d.ts +19 -0
- package/dist/modules/agent/runtime/app/tools/set_paragraph_options/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/swap_paragraphs/index.js +3 -2
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.d.ts +13 -4
- package/dist/modules/agent/runtime/app/tools/update_text_fields/index.js +8 -7
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.d.ts +17 -0
- package/dist/modules/agent/runtime/app/tools/web_fetch/index.js +2 -2
- package/dist/modules/agent/runtime/app/types/index.d.ts +6 -9
- package/dist/modules/agent/runtime/app/types/index.js +4 -3
- package/dist/modules/agent/runtime/server/agent.js +1 -2
- package/dist/modules/agent/runtime/server/classes/Session/index.d.ts +2 -2
- package/dist/modules/agent/runtime/server/classes/Session/index.js +10 -5
- package/dist/modules/agent/runtime/server/default-system-prompts/important-rules.js +2 -1
- package/dist/modules/agent/runtime/shared/toolParams.d.ts +19 -0
- package/dist/modules/agent/runtime/shared/toolParams.js +6 -0
- package/dist/modules/agent/runtime/shared/toolResult.d.ts +4 -0
- package/dist/modules/agent/runtime/shared/toolResult.js +5 -0
- package/dist/modules/agent/runtime/shared/types.d.ts +23 -4
- package/dist/modules/agent/runtime/shared/types.js +6 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +4 -13
- package/dist/modules/drupal/graphql/features/notifications.graphql +39 -0
- package/dist/modules/drupal/index.mjs +6 -1
- package/dist/modules/drupal/runtime/adapter/index.js +38 -0
- package/dist/runtime/editor/components/Actions/ItemDropdown/Item.vue +0 -1
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.d.vue.ts +13 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue +52 -0
- package/dist/runtime/editor/components/Actions/ScrollArrow/index.vue.d.ts +13 -0
- package/dist/runtime/editor/components/Actions/Title/index.vue +9 -8
- package/dist/runtime/editor/components/Actions/index.vue +47 -7
- package/dist/runtime/editor/components/Actions/useToolbarScroll.d.ts +25 -0
- package/dist/runtime/editor/components/Actions/useToolbarScroll.js +125 -0
- package/dist/runtime/editor/components/AddListItem/index.vue +0 -2
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +1 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Avatar/index.vue +0 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/BundleSelector/index.vue +0 -4
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/Dialog/index.vue +1 -3
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue +12 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/Item.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.d.vue.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +14 -2
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue.d.ts +8 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.d.vue.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +0 -2
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/components/DiffApproval/index.vue +3 -2
- package/dist/runtime/editor/components/Dropdown/index.vue +0 -39
- package/dist/runtime/editor/components/DropdownItem/index.d.vue.ts +12 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue +46 -2
- package/dist/runtime/editor/components/DropdownItem/index.vue.d.ts +12 -2
- package/dist/runtime/editor/components/FlexTextarea/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/FlexTextarea/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +0 -1
- package/dist/runtime/editor/components/Form/TextDark/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Textarea/index.vue +0 -1
- package/dist/runtime/editor/components/Form/Toggle/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +9 -2
- package/dist/runtime/editor/components/Form/Toggle/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/FormOverlay/index.vue +0 -1
- package/dist/runtime/editor/components/Icon/index.vue +0 -2
- package/dist/runtime/editor/components/Messages/Item/index.vue +4 -1
- package/dist/runtime/editor/components/Messages/index.vue +3 -0
- package/dist/runtime/editor/components/Panel/Sheet/index.vue +1 -1
- package/dist/runtime/editor/components/Popup/index.vue +0 -2
- package/dist/runtime/editor/components/RichText/Editor/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/RichText/Editor/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/ScheduleDate/index.vue +1 -3
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue +74 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/Button/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue +16 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/List/index.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue +57 -0
- package/dist/runtime/editor/components/Toolbar/ViewOptions/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +3 -56
- package/dist/runtime/editor/components/ToolbarDropdown/index.d.vue.ts +21 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue +36 -0
- package/dist/runtime/editor/components/ToolbarDropdown/index.vue.d.ts +21 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +3 -1
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +1 -1
- package/dist/runtime/editor/components/Tooltip/index.vue +4 -1
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +1 -1
- package/dist/runtime/editor/components/index.d.ts +1 -0
- package/dist/runtime/editor/components/index.js +1 -0
- package/dist/runtime/editor/composables/defineViewOption.d.ts +5 -0
- package/dist/runtime/editor/composables/defineViewOption.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +3 -0
- package/dist/runtime/editor/composables/index.js +2 -0
- package/dist/runtime/editor/composables/useDismiss.d.ts +30 -0
- package/dist/runtime/editor/composables/useDismiss.js +43 -0
- package/dist/runtime/editor/composables/useGlobalBlokkliObject.d.ts +3 -3
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +23 -0
- package/dist/runtime/editor/features/add-list/Actions/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Blocks/index.vue +0 -1
- package/dist/runtime/editor/features/add-list/Help/Item.vue +2 -7
- package/dist/runtime/editor/features/add-list/Help/index.vue +1 -1
- package/dist/runtime/editor/features/add-list/index.vue +0 -2
- package/dist/runtime/editor/features/anchors/index.vue +11 -11
- package/dist/runtime/editor/features/anchors/types.d.ts +1 -0
- package/dist/runtime/editor/features/anchors/types.js +1 -0
- package/dist/runtime/editor/features/artboard/Renderer.vue +30 -28
- package/dist/runtime/editor/features/block-scheduler/Dialog/ScheduleSection.vue +0 -3
- package/dist/runtime/editor/features/block-scheduler/index.vue +0 -1
- package/dist/runtime/editor/features/block-transfer/SummaryDialog/index.vue +0 -4
- package/dist/runtime/editor/features/breadcrumbs/Crumb/index.vue +0 -5
- package/dist/runtime/editor/features/changelog/changelog.json +16 -0
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +0 -3
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +0 -1
- package/dist/runtime/editor/features/comments/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Comment/Actions/index.vue +0 -4
- package/dist/runtime/editor/features/comments/Comment/index.d.vue.ts +14 -0
- package/dist/runtime/editor/features/comments/Comment/index.vue +29 -8
- package/dist/runtime/editor/features/comments/Comment/index.vue.d.ts +14 -0
- package/dist/runtime/editor/features/comments/CommentInput/index.d.vue.ts +1 -1
- package/dist/runtime/editor/features/comments/CommentInput/index.vue +0 -3
- package/dist/runtime/editor/features/comments/CommentInput/index.vue.d.ts +1 -1
- package/dist/runtime/editor/features/comments/Sidebar/AddForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Sidebar/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Sidebar/index.vue +13 -8
- package/dist/runtime/editor/features/comments/Sidebar/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/ReplyForm/index.vue +0 -1
- package/dist/runtime/editor/features/comments/Thread/index.d.vue.ts +16 -0
- package/dist/runtime/editor/features/comments/Thread/index.vue +26 -6
- package/dist/runtime/editor/features/comments/Thread/index.vue.d.ts +16 -0
- package/dist/runtime/editor/features/comments/index.vue +28 -3
- package/dist/runtime/editor/features/delete/types.d.ts +1 -0
- package/dist/runtime/editor/features/delete/types.js +1 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +17 -15
- package/dist/runtime/editor/features/dragging-overlay/DragItems/index.vue +1 -0
- package/dist/runtime/editor/features/duplicate/types.d.ts +1 -0
- package/dist/runtime/editor/features/duplicate/types.js +1 -0
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +0 -2
- package/dist/runtime/editor/features/editable-field/Overlay/Plaintext/index.vue +0 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +0 -5
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +0 -5
- package/dist/runtime/editor/features/editable-mask/index.vue +21 -20
- package/dist/runtime/editor/features/entity-title/index.vue +0 -4
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +0 -4
- package/dist/runtime/editor/features/grid/index.vue +16 -15
- package/dist/runtime/editor/features/grid/types.d.ts +1 -0
- package/dist/runtime/editor/features/grid/types.js +1 -0
- package/dist/runtime/editor/features/help/Dialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue +57 -0
- package/dist/runtime/editor/features/help/Dialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/help/index.vue +52 -47
- package/dist/runtime/editor/features/history/List/index.vue +2 -9
- package/dist/runtime/editor/features/history/types.d.ts +1 -0
- package/dist/runtime/editor/features/history/types.js +1 -0
- package/dist/runtime/editor/features/notifications/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue +96 -0
- package/dist/runtime/editor/features/notifications/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/notifications/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/notifications/List/index.vue +126 -0
- package/dist/runtime/editor/features/notifications/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/notifications/docs.md +12 -0
- package/dist/runtime/editor/features/notifications/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/notifications/index.vue +123 -0
- package/dist/runtime/editor/features/notifications/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/notifications/types.d.ts +132 -0
- package/dist/runtime/editor/features/notifications/types.js +20 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +14 -4
- package/dist/runtime/editor/features/options/Form/Color/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/DateTimeLocal/index.vue +0 -1
- package/dist/runtime/editor/features/options/Form/Group.vue +3 -1
- package/dist/runtime/editor/features/options/Form/Item.vue +1 -2
- package/dist/runtime/editor/features/options/Form/Number/index.vue +9 -3
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +3 -2
- package/dist/runtime/editor/features/options/Form/Range/index.vue +8 -2
- package/dist/runtime/editor/features/options/Form/Text/index.vue +6 -2
- package/dist/runtime/editor/features/options/index.vue +7 -1
- package/dist/runtime/editor/features/ownership/Banner/index.vue +3 -1
- package/dist/runtime/editor/features/ownership/types.d.ts +1 -0
- package/dist/runtime/editor/features/ownership/types.js +1 -0
- package/dist/runtime/editor/features/preview-grant/types.d.ts +1 -0
- package/dist/runtime/editor/features/preview-grant/types.js +1 -0
- package/dist/runtime/editor/features/proxy-view/index.vue +24 -21
- package/dist/runtime/editor/features/publish/Dialog/PublishOption.vue +0 -2
- package/dist/runtime/editor/features/publish/Dialog/index.vue +1 -2
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +0 -1
- package/dist/runtime/editor/features/revert/types.d.ts +1 -0
- package/dist/runtime/editor/features/revert/types.js +1 -0
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +18 -8
- package/dist/runtime/editor/features/swap/types.d.ts +1 -0
- package/dist/runtime/editor/features/swap/types.js +1 -0
- package/dist/runtime/editor/features/translations/Banner/index.vue +4 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +4 -1
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +7 -2
- package/dist/runtime/editor/plugins/BlockIndicator/index.vue +0 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +4 -36
- package/dist/runtime/editor/plugins/ItemAction/index.vue +0 -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 +2 -2
- package/dist/runtime/editor/plugins/Sidebar/index.vue +7 -50
- package/dist/runtime/editor/plugins/Sidebar/index.vue.d.ts +2 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +8 -2
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +122 -28
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +8 -2
- package/dist/runtime/editor/plugins/index.d.ts +1 -2
- package/dist/runtime/editor/plugins/index.js +1 -3
- package/dist/runtime/editor/providers/fieldValue.js +11 -13
- package/dist/runtime/editor/providers/plugin.d.ts +12 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/translations/de.json +53 -19
- package/dist/runtime/editor/translations/fr.json +16 -4
- package/dist/runtime/editor/translations/gsw_CH.json +53 -19
- package/dist/runtime/editor/translations/it.json +16 -4
- package/package.json +6 -6
- package/dist/runtime/editor/plugins/ViewOption/index.d.vue.ts +0 -139
- package/dist/runtime/editor/plugins/ViewOption/index.vue +0 -99
- package/dist/runtime/editor/plugins/ViewOption/index.vue.d.ts +0 -139
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import type { BlokkliUser } from '#blokkli/editor/types/user';
|
|
2
|
+
/**
|
|
3
|
+
* The complete set of notification types the frontend can render. Used as
|
|
4
|
+
* a runtime allow-list at the adapter boundary — backend payloads with a
|
|
5
|
+
* `type` outside this list are coerced to `'generic'` (and a warning is
|
|
6
|
+
* logged) rather than fed through an `as` cast that would silently lie
|
|
7
|
+
* about being a known type.
|
|
8
|
+
*
|
|
9
|
+
* Follows a `<feature>:<event>` convention. Add new entries here as new
|
|
10
|
+
* notification sources are added (e.g. `'edit-state:rejected'`).
|
|
11
|
+
*
|
|
12
|
+
* `'generic'` is the fallback for unknown types: rendered with a neutral
|
|
13
|
+
* icon, deep-linked to its host (no type-specific query parameters).
|
|
14
|
+
*/
|
|
15
|
+
export declare const BLOKKLI_NOTIFICATION_TYPES: readonly ["comment:mention", "comment:resolved", "comment:reply", "comment:thread", "edit-state:approved", "generic"];
|
|
16
|
+
export type BlokkliNotificationType = (typeof BLOKKLI_NOTIFICATION_TYPES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Type guard for raw backend `type` strings.
|
|
19
|
+
*/
|
|
20
|
+
export declare function isBlokkliNotificationType(value: string): value is BlokkliNotificationType;
|
|
21
|
+
/**
|
|
22
|
+
* Coerce a raw backend `type` string into a known `BlokkliNotificationType`.
|
|
23
|
+
* Falls back to `'generic'` (with a warning) for unknown values — use this
|
|
24
|
+
* at the adapter boundary instead of `as`-casting.
|
|
25
|
+
*/
|
|
26
|
+
export declare function toValidNotificationType(value: string): BlokkliNotificationType;
|
|
27
|
+
/**
|
|
28
|
+
* The host entity (page) a notification relates to.
|
|
29
|
+
*/
|
|
30
|
+
export type BlokkliNotificationHost = {
|
|
31
|
+
uuid: string;
|
|
32
|
+
entityType: string;
|
|
33
|
+
entityBundle: string;
|
|
34
|
+
/**
|
|
35
|
+
* Human readable label of the host entity (e.g. the page title).
|
|
36
|
+
*/
|
|
37
|
+
label: string;
|
|
38
|
+
/**
|
|
39
|
+
* URL/path of the host entity (page).
|
|
40
|
+
*/
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
export type BlokkliNotification = {
|
|
44
|
+
uuid: string;
|
|
45
|
+
/**
|
|
46
|
+
* Whether the user has read this notification.
|
|
47
|
+
*/
|
|
48
|
+
read: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* ISO 8601 timestamp (e.g. `2026-05-28T14:32:18Z`).
|
|
51
|
+
*/
|
|
52
|
+
created: string;
|
|
53
|
+
/**
|
|
54
|
+
* What kind of event this notification represents.
|
|
55
|
+
*/
|
|
56
|
+
type: BlokkliNotificationType;
|
|
57
|
+
/**
|
|
58
|
+
* The main, human readable text (plain).
|
|
59
|
+
*/
|
|
60
|
+
title: string;
|
|
61
|
+
/**
|
|
62
|
+
* Optional secondary line (plain).
|
|
63
|
+
*/
|
|
64
|
+
message?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The user that triggered the event (mention author, resolver, ...), or
|
|
67
|
+
* `null` when there is no associated user or the account was deleted.
|
|
68
|
+
*/
|
|
69
|
+
user?: BlokkliUser | null;
|
|
70
|
+
/**
|
|
71
|
+
* UUID of the entity this notification points at. Its meaning depends on
|
|
72
|
+
* `type` (e.g. a comment UUID for `comment:*` notifications). Used by the
|
|
73
|
+
* feature to build the deep link.
|
|
74
|
+
*/
|
|
75
|
+
relatedEntityUuid?: string;
|
|
76
|
+
/**
|
|
77
|
+
* The host entity (page) the notification lives on, or `null` when the host
|
|
78
|
+
* was deleted or the notification has no host at all (e.g. a system-wide
|
|
79
|
+
* event). When present, the feature builds the deep link as
|
|
80
|
+
* `${host.url}?blokkliEditing=${host.uuid}` plus any type-specific query
|
|
81
|
+
* parameters. When `null`, the notification is not deep-linkable.
|
|
82
|
+
*/
|
|
83
|
+
host: BlokkliNotificationHost | null;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* A single page of notifications.
|
|
87
|
+
*/
|
|
88
|
+
export type BlokkliNotificationList = {
|
|
89
|
+
/** The notifications for the requested page (newest first). */
|
|
90
|
+
items: BlokkliNotification[];
|
|
91
|
+
/**
|
|
92
|
+
* Opaque cursor for the next (older) page, or `null` when there are no
|
|
93
|
+
* more. Pass it back as `after` to fetch the next page.
|
|
94
|
+
*/
|
|
95
|
+
nextCursor: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* The total number of unread notifications for the current user after
|
|
98
|
+
* this request was processed (reflects any `markAsRead` side-effect).
|
|
99
|
+
*/
|
|
100
|
+
unreadCount: number;
|
|
101
|
+
};
|
|
102
|
+
declare module '#blokkli/editor/adapter' {
|
|
103
|
+
interface BlokkliAdapter<T> {
|
|
104
|
+
/**
|
|
105
|
+
* Load a single page of notifications for the current user (newest first).
|
|
106
|
+
*/
|
|
107
|
+
loadNotifications?: (options: {
|
|
108
|
+
/**
|
|
109
|
+
* Opaque cursor returned by a previous call, or `undefined` for the
|
|
110
|
+
* first page.
|
|
111
|
+
*/
|
|
112
|
+
after?: string;
|
|
113
|
+
/**
|
|
114
|
+
* When `true`, mark the returned notifications as read as part of the
|
|
115
|
+
* same request. The response `unreadCount` then reflects the count
|
|
116
|
+
* after this side-effect.
|
|
117
|
+
*/
|
|
118
|
+
markAsRead: boolean;
|
|
119
|
+
}) => Promise<BlokkliNotificationList>;
|
|
120
|
+
/**
|
|
121
|
+
* Load the number of unread notifications for the current user, without
|
|
122
|
+
* loading the notifications themselves.
|
|
123
|
+
*/
|
|
124
|
+
loadUnreadNotificationsCount?: () => Promise<number>;
|
|
125
|
+
/**
|
|
126
|
+
* Mark all of the current user's notifications as read (including ones
|
|
127
|
+
* not yet loaded) and return the new total unread count (always `0`).
|
|
128
|
+
* Backs the "Mark all as read" button.
|
|
129
|
+
*/
|
|
130
|
+
markAllNotificationsAsRead?: () => Promise<number>;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export const BLOKKLI_NOTIFICATION_TYPES = [
|
|
2
|
+
"comment:mention",
|
|
3
|
+
"comment:resolved",
|
|
4
|
+
"comment:reply",
|
|
5
|
+
"comment:thread",
|
|
6
|
+
"edit-state:approved",
|
|
7
|
+
"generic"
|
|
8
|
+
];
|
|
9
|
+
export function isBlokkliNotificationType(value) {
|
|
10
|
+
return BLOKKLI_NOTIFICATION_TYPES.includes(value);
|
|
11
|
+
}
|
|
12
|
+
export function toValidNotificationType(value) {
|
|
13
|
+
if (isBlokkliNotificationType(value)) {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
console.warn(
|
|
17
|
+
`[blokkli] Unknown notification type "${value}", rendering as generic`
|
|
18
|
+
);
|
|
19
|
+
return "generic";
|
|
20
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
3
|
class="bk-blokkli-item-options-checkbox"
|
|
4
|
-
data-test="option-type-checkbox"
|
|
5
4
|
>
|
|
6
|
-
<input
|
|
5
|
+
<input
|
|
6
|
+
v-model="checked"
|
|
7
|
+
type="checkbox"
|
|
8
|
+
class="_bk_peer"
|
|
9
|
+
:required
|
|
10
|
+
/>
|
|
7
11
|
<div />
|
|
8
12
|
<span>{{ label }}</span>
|
|
9
13
|
</label>
|
|
@@ -1,13 +1,18 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="bk-blokkli-item-options-checkboxes"
|
|
4
|
-
data-test="option-type-checkboxes"
|
|
5
4
|
:class="{ 'bk-is-active': isOpen, 'bk-is-grouped': isGrouped }"
|
|
6
5
|
>
|
|
7
|
-
<button
|
|
6
|
+
<button
|
|
7
|
+
v-if="!isGrouped"
|
|
8
|
+
@click="isOpen = !isOpen"
|
|
9
|
+
>
|
|
8
10
|
<span>{{ visibleLabel }}</span>
|
|
9
11
|
<div>
|
|
10
|
-
<div
|
|
12
|
+
<div
|
|
13
|
+
v-if="checked.length < 4"
|
|
14
|
+
class="bk-pill-list"
|
|
15
|
+
>
|
|
11
16
|
<Pill
|
|
12
17
|
v-for="item in checked"
|
|
13
18
|
:key="item"
|
|
@@ -16,7 +21,12 @@
|
|
|
16
21
|
variant="normal"
|
|
17
22
|
/>
|
|
18
23
|
</div>
|
|
19
|
-
<Pill
|
|
24
|
+
<Pill
|
|
25
|
+
v-else
|
|
26
|
+
:text="checked.length"
|
|
27
|
+
scheme="mono"
|
|
28
|
+
variant="normal"
|
|
29
|
+
/>
|
|
20
30
|
</div>
|
|
21
31
|
<Icon name="bk_mdi_arrow_drop_down" />
|
|
22
32
|
</button>
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
class="bk-blokkli-item-options-group"
|
|
4
4
|
:class="{ 'bk-is-active': isActive }"
|
|
5
5
|
>
|
|
6
|
-
<button
|
|
6
|
+
<button
|
|
7
|
+
@click.stop.prevent="$emit('toggle')"
|
|
8
|
+
>
|
|
7
9
|
<div>{{ label }}</div>
|
|
8
10
|
<Icon name="bk_mdi_arrow_drop_down" />
|
|
9
11
|
</button>
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="bk-blokkli-item-options-item _bk_group/tooltip"
|
|
4
|
-
:data-test="'option-' + property"
|
|
5
4
|
@keydown.stop
|
|
6
5
|
>
|
|
7
6
|
<Tooltip
|
|
8
7
|
:label
|
|
9
8
|
:description
|
|
10
|
-
:placement="isGrouped ? 'inline' : 'above-
|
|
9
|
+
:placement="isGrouped ? 'inline' : 'above-right'"
|
|
11
10
|
class="_bk_!whitespace-normal"
|
|
12
11
|
:class="{
|
|
13
12
|
'_bk_w-full _bk_px-10 _bk_pt-10': isGrouped,
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bk-blokkli-item-options-number"
|
|
3
|
-
<button
|
|
2
|
+
<div class="bk-blokkli-item-options-number">
|
|
3
|
+
<button
|
|
4
|
+
:disabled="!canDecrement"
|
|
5
|
+
@click.stop.prevent="decrement"
|
|
6
|
+
>
|
|
4
7
|
<Icon name="bk_mdi_remove" />
|
|
5
8
|
</button>
|
|
6
9
|
<input
|
|
@@ -14,7 +17,10 @@
|
|
|
14
17
|
}"
|
|
15
18
|
/>
|
|
16
19
|
|
|
17
|
-
<button
|
|
20
|
+
<button
|
|
21
|
+
:disabled="!canIncrement"
|
|
22
|
+
@click.stop.prevent="increment"
|
|
23
|
+
>
|
|
18
24
|
<Icon name="bk_mdi_add" />
|
|
19
25
|
</button>
|
|
20
26
|
</div>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
3
|
class="bk-blokkli-item-options-radios"
|
|
4
|
-
data-test="option-type-radios"
|
|
5
4
|
:class="{
|
|
6
5
|
'bk-is-color': displayAs === 'colors',
|
|
7
6
|
'bk-is-grid': displayAs === 'grid',
|
|
@@ -14,7 +13,9 @@
|
|
|
14
13
|
:key="option.key"
|
|
15
14
|
@mouseenter="onOptionMouseEnter(option)"
|
|
16
15
|
>
|
|
17
|
-
<div
|
|
16
|
+
<div
|
|
17
|
+
v-bind="getInputWrapperAttributes(option.value)"
|
|
18
|
+
>
|
|
18
19
|
<input
|
|
19
20
|
:id="option.key"
|
|
20
21
|
type="radio"
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bk-blokkli-item-options-range"
|
|
3
|
-
<input
|
|
2
|
+
<div class="bk-blokkli-item-options-range">
|
|
3
|
+
<input
|
|
4
|
+
v-model="text"
|
|
5
|
+
type="range"
|
|
6
|
+
:min="min"
|
|
7
|
+
:max="max"
|
|
8
|
+
:step="step"
|
|
9
|
+
/>
|
|
4
10
|
<div>{{ formatted }}</div>
|
|
5
11
|
</div>
|
|
6
12
|
</template>
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="bk-blokkli-item-options-text"
|
|
3
|
-
<input
|
|
2
|
+
<div class="bk-blokkli-item-options-text">
|
|
3
|
+
<input
|
|
4
|
+
v-model="text"
|
|
5
|
+
:type="type"
|
|
6
|
+
:placeholder="label"
|
|
7
|
+
/>
|
|
4
8
|
<div>{{ text }}</div>
|
|
5
9
|
</div>
|
|
6
10
|
</template>
|
|
@@ -124,7 +124,7 @@ export default {
|
|
|
124
124
|
}
|
|
125
125
|
@media (width >= 64rem) {
|
|
126
126
|
.bk .bk-blokkli-item-options {
|
|
127
|
-
min-width:
|
|
127
|
+
min-width: auto;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
130
|
:is(.bk .bk-blokkli-item-options)::-webkit-scrollbar {
|
|
@@ -671,6 +671,12 @@ export default {
|
|
|
671
671
|
:is(.bk-is-active:is(.bk .bk-blokkli-item-options-group) > button) svg {
|
|
672
672
|
rotate: 180deg;
|
|
673
673
|
}
|
|
674
|
+
@media (width >= 48rem) {
|
|
675
|
+
.bk .bk-blokkli-item-options-group:last-child > .bk-blokkli-item-options-group-content {
|
|
676
|
+
right: 0px;
|
|
677
|
+
left: auto;
|
|
678
|
+
}
|
|
679
|
+
}
|
|
674
680
|
.bk .bk-blokkli-item-options-group-content {
|
|
675
681
|
position: absolute;
|
|
676
682
|
position: fixed;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,25 +1,10 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
3
|
-
id="proxy_view"
|
|
4
|
-
v-model="ui.isProxyMode.value"
|
|
5
|
-
:label="$t('proxyViewToggle', 'Toggle structure view')"
|
|
6
|
-
:title-on="$t('proxyViewShow', 'Show structure view')"
|
|
7
|
-
:title-off="$t('proxyViewHide', 'Show content preview')"
|
|
8
|
-
:tour-text="
|
|
9
|
-
$t(
|
|
10
|
-
'proxyViewTourText',
|
|
11
|
-
'Displays the content blocks as a structured view.'
|
|
12
|
-
)
|
|
13
|
-
"
|
|
14
|
-
key-code="P"
|
|
15
|
-
icon="bk_mdi_account_tree"
|
|
16
|
-
@update:model-value="onToggleProxyMode"
|
|
17
|
-
/>
|
|
2
|
+
<div />
|
|
18
3
|
</template>
|
|
19
4
|
|
|
20
5
|
<script setup>
|
|
21
|
-
import { useBlokkli, defineBlokkliFeature } from "#imports";
|
|
22
|
-
import {
|
|
6
|
+
import { useBlokkli, defineBlokkliFeature, watch } from "#imports";
|
|
7
|
+
import { defineViewOption } from "#blokkli/editor/composables";
|
|
23
8
|
defineBlokkliFeature({
|
|
24
9
|
id: "proxy_view",
|
|
25
10
|
label: "Proxy View",
|
|
@@ -28,9 +13,27 @@ defineBlokkliFeature({
|
|
|
28
13
|
viewports: ["desktop"]
|
|
29
14
|
});
|
|
30
15
|
const { $t, ui, eventBus } = useBlokkli();
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
const { isVisible } = defineViewOption({
|
|
17
|
+
id: "proxy_view",
|
|
18
|
+
label: $t("viewOptionStructureView", "Structure view"),
|
|
19
|
+
description: $t(
|
|
20
|
+
"viewOptionStructureViewDescription",
|
|
21
|
+
"Shows blocks as a structured outline instead of the rendered preview."
|
|
22
|
+
),
|
|
23
|
+
tourText: $t(
|
|
24
|
+
"proxyViewTourText",
|
|
25
|
+
"Displays the content blocks as a structured view."
|
|
26
|
+
),
|
|
27
|
+
icon: "bk_mdi_account_tree"
|
|
28
|
+
});
|
|
29
|
+
watch(
|
|
30
|
+
isVisible,
|
|
31
|
+
(v) => {
|
|
32
|
+
ui.isProxyMode.value = v;
|
|
33
|
+
eventBus.emit("state:reloaded");
|
|
34
|
+
},
|
|
35
|
+
{ immediate: true }
|
|
36
|
+
);
|
|
34
37
|
</script>
|
|
35
38
|
|
|
36
39
|
<script>
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<label
|
|
3
3
|
class="_bk_group _bk_relative _bk_grid _bk_grid-cols-[auto_1fr] _bk_gap-15 _bk_items-center _bk_leading-none _bk_cursor-pointer _bk_hyphens-auto"
|
|
4
|
-
:data-test="'publish-mode-' + id"
|
|
5
|
-
:data-test-checked="isChecked"
|
|
6
4
|
:class="{ '_bk_pointer-events-none': disabled }"
|
|
7
5
|
>
|
|
8
6
|
<input
|
|
@@ -107,11 +107,10 @@
|
|
|
107
107
|
/>
|
|
108
108
|
</FormItem>
|
|
109
109
|
<FormItem v-if="publishMode !== 'save' && scheduledBlocks.length">
|
|
110
|
-
<InfoBox
|
|
110
|
+
<InfoBox>
|
|
111
111
|
<p
|
|
112
112
|
v-for="(text, index) in scheduledBlocks"
|
|
113
113
|
:key="'infobox' + index"
|
|
114
|
-
data-test="publish-scheduled-block"
|
|
115
114
|
v-html="text"
|
|
116
115
|
/>
|
|
117
116
|
</InfoBox>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div>
|
|
3
3
|
<FormToggle
|
|
4
4
|
v-if="setting.type === 'checkbox'"
|
|
5
|
-
:label="
|
|
5
|
+
:label="settingLabel"
|
|
6
6
|
:description="settingDescription"
|
|
7
7
|
:model-value="
|
|
8
8
|
settingsStorage[settingsKey] ?? setting.default
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
/>
|
|
12
12
|
<div v-else-if="setting.type === 'radios'">
|
|
13
13
|
<h3 class="bk-form-label">
|
|
14
|
-
{{
|
|
14
|
+
{{ settingLabel }}
|
|
15
15
|
</h3>
|
|
16
16
|
<ul class="bk-settings-ui">
|
|
17
17
|
<li
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
@change="setRadioValue(value)"
|
|
28
28
|
/>
|
|
29
29
|
<Icon v-if="config.icon" :name="config.icon" />
|
|
30
|
-
<span>{{ config.label }}</span>
|
|
30
|
+
<span>{{ getOptionLabel(value, config.label) }}</span>
|
|
31
31
|
</label>
|
|
32
32
|
</li>
|
|
33
33
|
</ul>
|
|
@@ -37,12 +37,12 @@
|
|
|
37
37
|
class="bk-button bk-scheme-mono bk-is-light"
|
|
38
38
|
@click="setting.method(blokkliApp)"
|
|
39
39
|
>
|
|
40
|
-
{{
|
|
40
|
+
{{ settingLabel }}
|
|
41
41
|
</button>
|
|
42
42
|
</div>
|
|
43
43
|
<div v-else-if="setting.type === 'slider'">
|
|
44
44
|
<label class="bk-input-range">
|
|
45
|
-
<span>{{
|
|
45
|
+
<span>{{ settingLabel }}: {{ settingsStorage[settingsKey] }}</span>
|
|
46
46
|
<input
|
|
47
47
|
:value="settingsStorage[settingsKey]"
|
|
48
48
|
type="range"
|
|
@@ -68,14 +68,24 @@ const props = defineProps({
|
|
|
68
68
|
settingsKey: { type: String, required: true },
|
|
69
69
|
setting: { type: Object, required: true }
|
|
70
70
|
});
|
|
71
|
-
const { storage } = useBlokkli();
|
|
71
|
+
const { storage, $t } = useBlokkli();
|
|
72
72
|
const blokkliApp = useBlokkli();
|
|
73
|
+
const settingKeyPrefix = computed(
|
|
74
|
+
() => "feature_" + props.featureId + "_setting_" + props.settingsKey
|
|
75
|
+
);
|
|
76
|
+
const settingLabel = computed(
|
|
77
|
+
() => $t(settingKeyPrefix.value + "_label", props.setting.label)
|
|
78
|
+
);
|
|
73
79
|
const settingDescription = computed(() => {
|
|
74
|
-
if ("description" in props.setting) {
|
|
75
|
-
return
|
|
80
|
+
if ("description" in props.setting && props.setting.description) {
|
|
81
|
+
return $t(
|
|
82
|
+
settingKeyPrefix.value + "_description",
|
|
83
|
+
props.setting.description
|
|
84
|
+
);
|
|
76
85
|
}
|
|
77
86
|
return void 0;
|
|
78
87
|
});
|
|
88
|
+
const getOptionLabel = (key, defaultLabel) => $t(settingKeyPrefix.value + "_option_" + key, defaultLabel);
|
|
79
89
|
const settingsStorage = storage.use(
|
|
80
90
|
`feature:${props.featureId}:settings`,
|
|
81
91
|
{},
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -26,7 +26,9 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</PanelSection>
|
|
28
28
|
|
|
29
|
-
<PanelSection
|
|
29
|
+
<PanelSection
|
|
30
|
+
:title="sourceValues.length ? fieldsTitle : void 0"
|
|
31
|
+
>
|
|
30
32
|
<div v-if="isLoading" class="_bk_flex _bk_items-center _bk_justify-center _bk_py-60">
|
|
31
33
|
<Loading />
|
|
32
34
|
</div>
|
|
@@ -65,7 +67,10 @@
|
|
|
65
67
|
</th>
|
|
66
68
|
</template>
|
|
67
69
|
<template #body>
|
|
68
|
-
<tr
|
|
70
|
+
<tr
|
|
71
|
+
v-for="item in filteredValues"
|
|
72
|
+
:key="item.key"
|
|
73
|
+
>
|
|
69
74
|
<td>
|
|
70
75
|
<div class="bk-checkbox">
|
|
71
76
|
<input
|