@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
|
@@ -2,19 +2,27 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="el"
|
|
4
4
|
:style="{
|
|
5
|
-
visibility: isVisible ? 'visible' : 'hidden'
|
|
5
|
+
visibility: isVisible ? 'visible' : 'hidden',
|
|
6
|
+
'--bk-actions-max-width': `${paddedViewportWidth}px`
|
|
6
7
|
}"
|
|
7
8
|
class="bk bk-blokkli-item-actions-inner _bk_absolute _bk_left-0 _bk_p-0 _bk_z-actions _bk_w-full _bk_text-mono-50 _bk_select-none _bk_text-sm _bk_pointer-events-auto"
|
|
8
9
|
@mouseleave="onMouseLeave"
|
|
9
10
|
@mouseenter="onMouseEnter"
|
|
10
11
|
>
|
|
12
|
+
<ScrollArrow
|
|
13
|
+
v-show="showLeft"
|
|
14
|
+
side="left"
|
|
15
|
+
@start="startScroll(-1)"
|
|
16
|
+
@end="stopScroll"
|
|
17
|
+
/>
|
|
11
18
|
<div
|
|
12
19
|
id="bk-blokkli-item-actions-controls"
|
|
13
|
-
ref="
|
|
14
|
-
class="bk-blokkli-item-actions-controls _bk_flex _bk_items-stretch _bk_whitespace-nowrap _bk_h-full _bk_flex-wrap _bk_lg:flex-nowrap _bk_bg-mono-950/90 _bk_scheme-dark _bk_relative _bk_z-50 _bk_lg:border _bk_lg:border-mono-400 _bk_lg:bg-mono-900"
|
|
20
|
+
ref="contentEl"
|
|
21
|
+
class="bk-blokkli-item-actions-controls _bk_flex _bk_items-stretch _bk_whitespace-nowrap _bk_h-full _bk_flex-wrap _bk_lg:flex-nowrap _bk_lg:w-max _bk_bg-mono-950/90 _bk_scheme-dark _bk_relative _bk_z-50 _bk_lg:border _bk_lg:border-mono-400 _bk_lg:bg-mono-900"
|
|
15
22
|
:class="{
|
|
16
23
|
'_bk_pointer-events-none': ui.isTransforming.value
|
|
17
24
|
}"
|
|
25
|
+
:style="{ '--bk-actions-scroll-x': `${-scrollX}px` }"
|
|
18
26
|
>
|
|
19
27
|
<Interactions />
|
|
20
28
|
<Title />
|
|
@@ -25,6 +33,12 @@
|
|
|
25
33
|
class="_bk_relative _bk_flex _bk_flex-1 _bk_lg:flex-initial _bk_lg:border-l _bk_lg:border-l-mono-500 _bk_justify-end"
|
|
26
34
|
/>
|
|
27
35
|
</div>
|
|
36
|
+
<ScrollArrow
|
|
37
|
+
v-show="showRight"
|
|
38
|
+
side="right"
|
|
39
|
+
@start="startScroll(1)"
|
|
40
|
+
@end="stopScroll"
|
|
41
|
+
/>
|
|
28
42
|
</div>
|
|
29
43
|
</template>
|
|
30
44
|
|
|
@@ -32,16 +46,32 @@
|
|
|
32
46
|
import { computed, useBlokkli, useTemplateRef, onBeforeUnmount } from "#imports";
|
|
33
47
|
import Interactions from "./Interactions/index.vue";
|
|
34
48
|
import Title from "./Title/index.vue";
|
|
35
|
-
import
|
|
49
|
+
import ScrollArrow from "./ScrollArrow/index.vue";
|
|
50
|
+
import { onBlokkliEvent, useStickyToolbar } from "#blokkli/editor/composables";
|
|
51
|
+
import { useToolbarScroll } from "./useToolbarScroll";
|
|
36
52
|
const { selection, ui } = useBlokkli();
|
|
37
53
|
const ACTIONS_HEIGHT = 52;
|
|
38
54
|
const el = useTemplateRef("el");
|
|
55
|
+
const contentEl = useTemplateRef("contentEl");
|
|
56
|
+
const {
|
|
57
|
+
scrollX,
|
|
58
|
+
showLeft,
|
|
59
|
+
showRight,
|
|
60
|
+
startScroll,
|
|
61
|
+
stopScroll,
|
|
62
|
+
scrollIntoView
|
|
63
|
+
} = useToolbarScroll({
|
|
64
|
+
viewportEl: el,
|
|
65
|
+
contentEl
|
|
66
|
+
});
|
|
67
|
+
onBlokkliEvent("actions:scrollIntoView", (e) => {
|
|
68
|
+
scrollIntoView(e.element);
|
|
69
|
+
});
|
|
39
70
|
useStickyToolbar(el, {
|
|
40
71
|
getPlacementY: () => "top",
|
|
41
72
|
shouldUpdate: () => !ui.actionsToolbarLocked.value && isVisible.value,
|
|
42
73
|
getHeight: () => ACTIONS_HEIGHT,
|
|
43
|
-
getMargin: () => 30
|
|
44
|
-
allowHorizontalOverflow: true
|
|
74
|
+
getMargin: () => 30
|
|
45
75
|
});
|
|
46
76
|
let mouseLeaveTimeout = null;
|
|
47
77
|
function onMouseLeave() {
|
|
@@ -67,6 +97,9 @@ onBeforeUnmount(() => {
|
|
|
67
97
|
const hasAnythingSelected = computed(
|
|
68
98
|
() => selection.hasHostSelected.value || !!selection.items.value.length
|
|
69
99
|
);
|
|
100
|
+
const paddedViewportWidth = computed(
|
|
101
|
+
() => Math.max(120, Math.round(ui.visibleViewportPadded.value.width))
|
|
102
|
+
);
|
|
70
103
|
const isVisible = computed(() => {
|
|
71
104
|
return !selection.isDragging.value && !selection.activeFieldLabel.value && !ui.isAnimating.value && !ui.hasTransformOverlayOpen.value && hasAnythingSelected.value && !ui.hasTooltipOpen.value && !ui.isApproving.value;
|
|
72
105
|
});
|
|
@@ -80,7 +113,6 @@ export default {
|
|
|
80
113
|
|
|
81
114
|
<style>/*! tailwindcss v4.2.4 | MIT License | https://tailwindcss.com */
|
|
82
115
|
.bk.bk-blokkli-item-actions-inner {
|
|
83
|
-
transform: translate3d(0, 0, 0);
|
|
84
116
|
backface-visibility: hidden;
|
|
85
117
|
bottom: var(--bk-root-offset-bottom);
|
|
86
118
|
}
|
|
@@ -89,6 +121,14 @@ export default {
|
|
|
89
121
|
top: 0px !important;
|
|
90
122
|
width: auto !important;
|
|
91
123
|
bottom: initial !important;
|
|
124
|
+
max-width: var(--bk-actions-max-width, calc(100vw - 60px));
|
|
125
|
+
clip-path: inset(-100vh 0 -100vh 0);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
@media (width >= 64rem) {
|
|
129
|
+
.bk .bk-blokkli-item-actions-controls {
|
|
130
|
+
transform: translate3d(var(--bk-actions-scroll-x, 0px), 0, 0);
|
|
131
|
+
will-change: transform;
|
|
92
132
|
}
|
|
93
133
|
}
|
|
94
134
|
.bk-is-locked:is(.bk .bk-blokkli-item-actions-controls) {
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { Ref } from 'vue';
|
|
2
|
+
export type UseToolbarScrollOptions = {
|
|
3
|
+
viewportEl: Readonly<Ref<HTMLElement | null>>;
|
|
4
|
+
contentEl: Readonly<Ref<HTMLElement | null>>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Drives horizontal scroll of the actions toolbar's inner content via a
|
|
8
|
+
* transform translate, exposing arrow visibility flags and press-and-hold
|
|
9
|
+
* scroll controls.
|
|
10
|
+
*
|
|
11
|
+
* The viewport caps at the editor's safe area on desktop; when the content
|
|
12
|
+
* (icons, options, action buttons) is wider, the user scrolls by pressing
|
|
13
|
+
* and holding the arrow buttons rendered on the viewport edges. The
|
|
14
|
+
* underlying transform is applied without a CSS transition so selection
|
|
15
|
+
* changes don't animate back to zero. Mobile is unaffected — the options
|
|
16
|
+
* strip keeps its own native horizontal overflow there.
|
|
17
|
+
*/
|
|
18
|
+
export declare function useToolbarScroll(options: UseToolbarScrollOptions): {
|
|
19
|
+
scrollX: any;
|
|
20
|
+
showLeft: any;
|
|
21
|
+
showRight: any;
|
|
22
|
+
startScroll: (direction: -1 | 1) => void;
|
|
23
|
+
stopScroll: () => void;
|
|
24
|
+
scrollIntoView: (element: HTMLElement) => void;
|
|
25
|
+
};
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { ref, computed, onBeforeUnmount } from "#imports";
|
|
2
|
+
import { onElementResize } from "#blokkli/editor/composables";
|
|
3
|
+
const LG_MEDIA_QUERY = "(min-width: 1024px)";
|
|
4
|
+
const SCROLL_SPEED_PX_PER_SEC = 1400;
|
|
5
|
+
const ARROW_OVERLAP_PX = 60;
|
|
6
|
+
export function useToolbarScroll(options) {
|
|
7
|
+
const scrollX = ref(0);
|
|
8
|
+
const viewportWidth = ref(0);
|
|
9
|
+
const contentWidth = ref(0);
|
|
10
|
+
const isLg = ref(
|
|
11
|
+
typeof window !== "undefined" ? window.matchMedia(LG_MEDIA_QUERY).matches : false
|
|
12
|
+
);
|
|
13
|
+
const maxScroll = computed(() => {
|
|
14
|
+
if (!isLg.value) {
|
|
15
|
+
return 0;
|
|
16
|
+
}
|
|
17
|
+
return Math.max(0, contentWidth.value - viewportWidth.value);
|
|
18
|
+
});
|
|
19
|
+
const showLeft = computed(() => maxScroll.value > 0 && scrollX.value > 0);
|
|
20
|
+
const showRight = computed(
|
|
21
|
+
() => maxScroll.value > 0 && scrollX.value < maxScroll.value
|
|
22
|
+
);
|
|
23
|
+
function clamp() {
|
|
24
|
+
if (scrollX.value > maxScroll.value) {
|
|
25
|
+
scrollX.value = maxScroll.value;
|
|
26
|
+
} else if (scrollX.value < 0) {
|
|
27
|
+
scrollX.value = 0;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
let rafId = null;
|
|
31
|
+
let lastTime = null;
|
|
32
|
+
let currentDirection = 0;
|
|
33
|
+
function tick(now) {
|
|
34
|
+
if (lastTime === null) {
|
|
35
|
+
lastTime = now;
|
|
36
|
+
}
|
|
37
|
+
const dt = (now - lastTime) / 1e3;
|
|
38
|
+
lastTime = now;
|
|
39
|
+
const next = Math.max(
|
|
40
|
+
0,
|
|
41
|
+
Math.min(
|
|
42
|
+
maxScroll.value,
|
|
43
|
+
scrollX.value + currentDirection * SCROLL_SPEED_PX_PER_SEC * dt
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
scrollX.value = next;
|
|
47
|
+
if (currentDirection < 0 && next === 0 || currentDirection > 0 && next >= maxScroll.value) {
|
|
48
|
+
stopScroll();
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
rafId = window.requestAnimationFrame(tick);
|
|
52
|
+
}
|
|
53
|
+
function startScroll(direction) {
|
|
54
|
+
if (rafId !== null) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
currentDirection = direction;
|
|
58
|
+
lastTime = null;
|
|
59
|
+
rafId = window.requestAnimationFrame(tick);
|
|
60
|
+
}
|
|
61
|
+
function stopScroll() {
|
|
62
|
+
if (rafId !== null) {
|
|
63
|
+
window.cancelAnimationFrame(rafId);
|
|
64
|
+
rafId = null;
|
|
65
|
+
}
|
|
66
|
+
lastTime = null;
|
|
67
|
+
currentDirection = 0;
|
|
68
|
+
}
|
|
69
|
+
function scrollIntoView(element) {
|
|
70
|
+
const viewport = options.viewportEl.value;
|
|
71
|
+
if (!viewport || !isLg.value || maxScroll.value <= 0) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
if (!viewport.contains(element)) {
|
|
75
|
+
return;
|
|
76
|
+
}
|
|
77
|
+
const viewportRect = viewport.getBoundingClientRect();
|
|
78
|
+
const elRect = element.getBoundingClientRect();
|
|
79
|
+
const leftOverflow = viewportRect.left + ARROW_OVERLAP_PX - elRect.left;
|
|
80
|
+
const rightOverflow = elRect.right - (viewportRect.right - ARROW_OVERLAP_PX);
|
|
81
|
+
let next = scrollX.value;
|
|
82
|
+
if (leftOverflow > 0) {
|
|
83
|
+
next -= leftOverflow;
|
|
84
|
+
} else if (rightOverflow > 0) {
|
|
85
|
+
next += rightOverflow;
|
|
86
|
+
} else {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
scrollX.value = Math.max(0, Math.min(maxScroll.value, next));
|
|
90
|
+
}
|
|
91
|
+
onElementResize(options.viewportEl, (size) => {
|
|
92
|
+
viewportWidth.value = size.width;
|
|
93
|
+
clamp();
|
|
94
|
+
});
|
|
95
|
+
onElementResize(options.contentEl, (size) => {
|
|
96
|
+
contentWidth.value = size.width;
|
|
97
|
+
clamp();
|
|
98
|
+
});
|
|
99
|
+
let mql = null;
|
|
100
|
+
function onMediaChange(e) {
|
|
101
|
+
isLg.value = e.matches;
|
|
102
|
+
if (!e.matches) {
|
|
103
|
+
scrollX.value = 0;
|
|
104
|
+
stopScroll();
|
|
105
|
+
} else {
|
|
106
|
+
clamp();
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
if (typeof window !== "undefined") {
|
|
110
|
+
mql = window.matchMedia(LG_MEDIA_QUERY);
|
|
111
|
+
mql.addEventListener("change", onMediaChange);
|
|
112
|
+
}
|
|
113
|
+
onBeforeUnmount(() => {
|
|
114
|
+
mql?.removeEventListener("change", onMediaChange);
|
|
115
|
+
stopScroll();
|
|
116
|
+
});
|
|
117
|
+
return {
|
|
118
|
+
scrollX,
|
|
119
|
+
showLeft,
|
|
120
|
+
showRight,
|
|
121
|
+
startScroll,
|
|
122
|
+
stopScroll,
|
|
123
|
+
scrollIntoView
|
|
124
|
+
};
|
|
125
|
+
}
|
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
<button
|
|
3
3
|
:id="'bk-menu-list-button-' + id"
|
|
4
4
|
class="_bk_w-full _bk_text-left _bk_whitespace-nowrap _bk_text-mono-950 _bk_group"
|
|
5
|
-
:data-test="'app-menu-button-' + id"
|
|
6
|
-
:data-test-type="type"
|
|
7
5
|
:disabled
|
|
8
6
|
:class="[
|
|
9
7
|
{
|
|
@@ -26,7 +24,7 @@
|
|
|
26
24
|
}"
|
|
27
25
|
>
|
|
28
26
|
<div
|
|
29
|
-
class="_bk_flex _bk_items-center _bk_justify-center _bk_border _bk_bg-scheme-light _bk_text-scheme-
|
|
27
|
+
class="_bk_flex _bk_items-center _bk_justify-center _bk_border _bk_bg-scheme-light _bk_text-scheme-dark _bk_border-scheme-normal/50 _bk_group-hover:border-scheme-normal _bk_group-hover:text-scheme-dark _bk_rounded"
|
|
30
28
|
:class="{
|
|
31
29
|
'_bk_size-25': small,
|
|
32
30
|
'_bk_size-50': !small
|
|
@@ -16,7 +16,10 @@
|
|
|
16
16
|
<div class="bk-artboard-tooltip-header">
|
|
17
17
|
<div class="_bk_mr-auto" v-html="title" />
|
|
18
18
|
<slot name="header" />
|
|
19
|
-
<button
|
|
19
|
+
<button
|
|
20
|
+
:disabled="closeDisabled"
|
|
21
|
+
@click="$emit('close')"
|
|
22
|
+
>
|
|
20
23
|
<Icon :name="closeIcon" />
|
|
21
24
|
<span v-if="buttonLabel">{{ buttonLabel }}</span>
|
|
22
25
|
</button>
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="deleted"
|
|
4
4
|
class="bk-avatar-deleted _bk_shrink-0 _bk_rounded _bk_flex _bk_items-center _bk_justify-center _bk_size-(--bk-avatar-size) _bk_border _bk_border-mono-300 _bk_bg-mono-100 _bk_text-mono-400 _bk_relative"
|
|
5
|
-
data-test="avatar-deleted"
|
|
6
5
|
:title="name"
|
|
7
6
|
>
|
|
8
7
|
<Icon name="ghost" />
|
|
@@ -4,8 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
maxHeight?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
backgroundClass: string;
|
|
8
7
|
maxHeight: number;
|
|
8
|
+
backgroundClass: string;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -4,8 +4,8 @@ type __VLS_Props = {
|
|
|
4
4
|
maxHeight?: number;
|
|
5
5
|
};
|
|
6
6
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
7
|
-
backgroundClass: string;
|
|
8
7
|
maxHeight: number;
|
|
8
|
+
backgroundClass: string;
|
|
9
9
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
10
|
declare const _default: typeof __VLS_export;
|
|
11
11
|
export default _default;
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
:anchor-el
|
|
6
6
|
:anchor-coordinates
|
|
7
7
|
class="bk-bundle-selector"
|
|
8
|
-
data-test="bundle-selector"
|
|
9
8
|
@close="$emit('close')"
|
|
10
9
|
>
|
|
11
10
|
<div
|
|
@@ -38,19 +37,16 @@
|
|
|
38
37
|
>
|
|
39
38
|
<ItemGroup
|
|
40
39
|
:items="filteredBlocks"
|
|
41
|
-
data-test="bundle-selector-blocks"
|
|
42
40
|
@select="onClick"
|
|
43
41
|
/>
|
|
44
42
|
<ItemGroup
|
|
45
43
|
:label="$t('actions', 'Actions')"
|
|
46
44
|
:items="filteredActions"
|
|
47
|
-
data-test="bundle-selector-actions"
|
|
48
45
|
@select="onClick"
|
|
49
46
|
/>
|
|
50
47
|
<ItemGroup
|
|
51
48
|
:label="$t('bundleSelectorFragmentsLabel', 'Fragments')"
|
|
52
49
|
:items="filteredFragments"
|
|
53
|
-
data-test="bundle-selector-fragments"
|
|
54
50
|
@select="onClick"
|
|
55
51
|
/>
|
|
56
52
|
</div>
|
|
@@ -41,9 +41,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
41
41
|
zIndex: "default" | "high";
|
|
42
42
|
icon: BlokkliIcon;
|
|
43
43
|
width: number | string;
|
|
44
|
-
canSubmit: boolean;
|
|
45
|
-
submitLabel: string;
|
|
46
44
|
lead: string;
|
|
45
|
+
submitLabel: string;
|
|
46
|
+
canSubmit: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
48
|
tabs?: (props: {}) => any;
|
|
49
49
|
} & {
|
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
<div
|
|
3
3
|
ref="rootEl"
|
|
4
4
|
class="bk bk-dialog bk-control"
|
|
5
|
-
:data-test="'dialog-' + id"
|
|
6
5
|
:class="zIndex === 'high' ? '_bk_z-dialog-high' : '_bk_z-dialog'"
|
|
7
6
|
@wheel.passive.stop
|
|
8
7
|
@keydown.stop="handleKeyDown"
|
|
@@ -15,7 +14,7 @@
|
|
|
15
14
|
<div class="bk bk-overlay-header">
|
|
16
15
|
<Icon v-if="icon" :name="icon" />
|
|
17
16
|
<h3>{{ title }}</h3>
|
|
18
|
-
<button
|
|
17
|
+
<button @click="$emit('cancel')">
|
|
19
18
|
<Icon name="bk_mdi_close" />
|
|
20
19
|
</button>
|
|
21
20
|
</div>
|
|
@@ -52,7 +51,6 @@
|
|
|
52
51
|
<slot name="footer">
|
|
53
52
|
<button
|
|
54
53
|
class="bk-button"
|
|
55
|
-
data-test="dialog-submit"
|
|
56
54
|
:disabled="!canSubmit"
|
|
57
55
|
:class="[
|
|
58
56
|
{ 'bk-is-loading': isLoading },
|
|
@@ -41,9 +41,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
|
|
|
41
41
|
zIndex: "default" | "high";
|
|
42
42
|
icon: BlokkliIcon;
|
|
43
43
|
width: number | string;
|
|
44
|
-
canSubmit: boolean;
|
|
45
|
-
submitLabel: string;
|
|
46
44
|
lead: string;
|
|
45
|
+
submitLabel: string;
|
|
46
|
+
canSubmit: boolean;
|
|
47
47
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
|
|
48
48
|
tabs?: (props: {}) => any;
|
|
49
49
|
} & {
|
|
@@ -11,9 +11,17 @@ type __VLS_Props = {
|
|
|
11
11
|
*/
|
|
12
12
|
insertionsOnly?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Restore the original Vue-managed nodes immediately, in preparation for the
|
|
16
|
+
* consumer's mutation. After this runs, Vue's reactive patch can write the
|
|
17
|
+
* new value into the live tracked nodes — and the post-mutation
|
|
18
|
+
* `onBeforeUnmount` restore is skipped so it doesn't clobber that value.
|
|
19
|
+
*/
|
|
20
|
+
declare function commitForApply(): void;
|
|
14
21
|
declare function updateRect(): void;
|
|
15
22
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
23
|
updateRect: typeof updateRect;
|
|
24
|
+
commitForApply: typeof commitForApply;
|
|
17
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
26
|
toggle: () => void;
|
|
19
27
|
activate: () => void;
|
|
@@ -83,7 +83,18 @@ watch(
|
|
|
83
83
|
() => props.selected,
|
|
84
84
|
() => applyOverride()
|
|
85
85
|
);
|
|
86
|
-
|
|
86
|
+
let committed = false;
|
|
87
|
+
function commitForApply() {
|
|
88
|
+
override.restore();
|
|
89
|
+
committed = true;
|
|
90
|
+
}
|
|
91
|
+
onBeforeUnmount(() => {
|
|
92
|
+
if (committed) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
override.restore();
|
|
96
|
+
});
|
|
97
|
+
defineExpose({ updateRect, commitForApply });
|
|
87
98
|
const rect = ref({ width: "0", height: "0", transform: "" });
|
|
88
99
|
function updateRect() {
|
|
89
100
|
const el = override.element;
|
|
@@ -111,5 +122,4 @@ onBlokkliEvent("animationFrame", (ctx) => {
|
|
|
111
122
|
lastFullUpdate = ctx.time;
|
|
112
123
|
updateRect();
|
|
113
124
|
});
|
|
114
|
-
defineExpose({ updateRect });
|
|
115
125
|
</script>
|
|
@@ -11,9 +11,17 @@ type __VLS_Props = {
|
|
|
11
11
|
*/
|
|
12
12
|
insertionsOnly?: boolean;
|
|
13
13
|
};
|
|
14
|
+
/**
|
|
15
|
+
* Restore the original Vue-managed nodes immediately, in preparation for the
|
|
16
|
+
* consumer's mutation. After this runs, Vue's reactive patch can write the
|
|
17
|
+
* new value into the live tracked nodes — and the post-mutation
|
|
18
|
+
* `onBeforeUnmount` restore is skipped so it doesn't clobber that value.
|
|
19
|
+
*/
|
|
20
|
+
declare function commitForApply(): void;
|
|
14
21
|
declare function updateRect(): void;
|
|
15
22
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {
|
|
16
23
|
updateRect: typeof updateRect;
|
|
24
|
+
commitForApply: typeof commitForApply;
|
|
17
25
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
18
26
|
toggle: () => void;
|
|
19
27
|
activate: () => void;
|
|
@@ -5,12 +5,20 @@ type __VLS_Props = {
|
|
|
5
5
|
insertionsOnly?: boolean;
|
|
6
6
|
};
|
|
7
7
|
declare function updateRects(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Reset each accepted item's editable to its original Vue-tracked DOM, then
|
|
10
|
+
* mark them committed so the post-mutation unmount-restore is a no-op. Called
|
|
11
|
+
* by DiffApproval BEFORE emitting `apply`, so the consumer's mutation patches
|
|
12
|
+
* onto the freshly-restored nodes instead of the throwaway diff markup.
|
|
13
|
+
*/
|
|
14
|
+
declare function commitSelected(): void;
|
|
8
15
|
type __VLS_ModelProps = {
|
|
9
16
|
modelValue?: number;
|
|
10
17
|
};
|
|
11
18
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
19
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
20
|
updateRects: typeof updateRects;
|
|
21
|
+
commitSelected: typeof commitSelected;
|
|
14
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
23
|
"update:modelValue": (value: number) => any;
|
|
16
24
|
} & {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
<script setup>
|
|
25
25
|
import { computed, useTemplateRef, useBlokkli } from "#imports";
|
|
26
26
|
import Item from "./Item.vue";
|
|
27
|
-
defineProps({
|
|
27
|
+
const props = defineProps({
|
|
28
28
|
items: { type: Array, required: true },
|
|
29
29
|
selected: { type: Object, required: true },
|
|
30
30
|
insertionsOnly: { type: Boolean, required: false }
|
|
@@ -51,5 +51,17 @@ function updateRects() {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
function commitSelected() {
|
|
55
|
+
if (!itemRefs.value) {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
for (let i = 0; i < itemRefs.value.length; i++) {
|
|
59
|
+
const ref = itemRefs.value[i];
|
|
60
|
+
const item = props.items[i];
|
|
61
|
+
if (ref && item && props.selected[item.id]) {
|
|
62
|
+
ref.commitForApply();
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
defineExpose({ updateRects, commitSelected });
|
|
55
67
|
</script>
|
|
@@ -5,12 +5,20 @@ type __VLS_Props = {
|
|
|
5
5
|
insertionsOnly?: boolean;
|
|
6
6
|
};
|
|
7
7
|
declare function updateRects(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Reset each accepted item's editable to its original Vue-tracked DOM, then
|
|
10
|
+
* mark them committed so the post-mutation unmount-restore is a no-op. Called
|
|
11
|
+
* by DiffApproval BEFORE emitting `apply`, so the consumer's mutation patches
|
|
12
|
+
* onto the freshly-restored nodes instead of the throwaway diff markup.
|
|
13
|
+
*/
|
|
14
|
+
declare function commitSelected(): void;
|
|
8
15
|
type __VLS_ModelProps = {
|
|
9
16
|
modelValue?: number;
|
|
10
17
|
};
|
|
11
18
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
19
|
declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {
|
|
13
20
|
updateRects: typeof updateRects;
|
|
21
|
+
commitSelected: typeof commitSelected;
|
|
14
22
|
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
23
|
"update:modelValue": (value: number) => any;
|
|
16
24
|
} & {
|
|
@@ -24,10 +24,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
25
|
onCancel?: (() => any) | undefined;
|
|
26
26
|
onApply?: (() => any) | undefined;
|
|
27
|
-
onPrev?: (() => any) | undefined;
|
|
28
|
-
onNext?: (() => any) | undefined;
|
|
29
27
|
"onUpdate:selected"?: ((id: number, value: boolean) => any) | undefined;
|
|
30
28
|
"onUpdate:reasons"?: ((id: number, value: string) => any) | undefined;
|
|
29
|
+
onPrev?: (() => any) | undefined;
|
|
30
|
+
onNext?: (() => any) | undefined;
|
|
31
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
}}</span>
|
|
18
18
|
<button
|
|
19
19
|
class="_bk_hover:bg-mono-800 _bk_h-40 _bk_px-8 _bk_flex _bk_items-center _bk_gap-5 _bk_font-semibold"
|
|
20
|
-
data-test="diff-approval-cancel"
|
|
21
20
|
@click="$emit('cancel')"
|
|
22
21
|
>
|
|
23
22
|
<span>{{ $t("cancel", "Cancel") }}</span>
|
|
@@ -119,7 +118,6 @@
|
|
|
119
118
|
|
|
120
119
|
<button
|
|
121
120
|
class="bk-button bk-scheme-lime _bk_rounded-l-none! _bk_rounded-tr-none!"
|
|
122
|
-
data-test="diff-approval-apply"
|
|
123
121
|
@click="$emit('apply')"
|
|
124
122
|
>
|
|
125
123
|
<span>{{ applyLabel }}</span>
|
|
@@ -24,10 +24,10 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
24
24
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
25
25
|
onCancel?: (() => any) | undefined;
|
|
26
26
|
onApply?: (() => any) | undefined;
|
|
27
|
-
onPrev?: (() => any) | undefined;
|
|
28
|
-
onNext?: (() => any) | undefined;
|
|
29
27
|
"onUpdate:selected"?: ((id: number, value: boolean) => any) | undefined;
|
|
30
28
|
"onUpdate:reasons"?: ((id: number, value: string) => any) | undefined;
|
|
29
|
+
onPrev?: (() => any) | undefined;
|
|
30
|
+
onNext?: (() => any) | undefined;
|
|
31
31
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
32
32
|
declare const _default: typeof __VLS_export;
|
|
33
33
|
export default _default;
|
|
@@ -78,7 +78,7 @@ const items = [...props.items].sort((a, b) => {
|
|
|
78
78
|
});
|
|
79
79
|
const currentIndex = ref(0);
|
|
80
80
|
const currentItem = computed(() => {
|
|
81
|
-
return
|
|
81
|
+
return items.at(currentIndex.value) ?? null;
|
|
82
82
|
});
|
|
83
83
|
const selected = reactive(
|
|
84
84
|
Object.fromEntries(items.map((item) => [item.id, true]))
|
|
@@ -103,6 +103,7 @@ function onUpdateReasons(id, value) {
|
|
|
103
103
|
reasons[id] = value;
|
|
104
104
|
}
|
|
105
105
|
function onApply() {
|
|
106
|
+
highlight.value?.commitSelected();
|
|
106
107
|
emit("apply", {
|
|
107
108
|
selected: { ...selected },
|
|
108
109
|
reasons: { ...reasons }
|
|
@@ -143,7 +144,7 @@ onBlokkliEvent("keyPressed", (e) => {
|
|
|
143
144
|
}
|
|
144
145
|
});
|
|
145
146
|
onBlokkliEvent("editable:focus", (e) => {
|
|
146
|
-
const index =
|
|
147
|
+
const index = items.findIndex(
|
|
147
148
|
(item) => item.fieldName === e.fieldName && item.uuid === e.uuid
|
|
148
149
|
);
|
|
149
150
|
if (index !== -1) {
|
|
@@ -151,43 +151,4 @@ defineExpose({ close });
|
|
|
151
151
|
margin-top: 5px;
|
|
152
152
|
transform-origin: 100% 0;
|
|
153
153
|
}
|
|
154
|
-
.bk .bk-dropdown-menu-item {
|
|
155
|
-
display: flex;
|
|
156
|
-
width: 100%;
|
|
157
|
-
align-items: center;
|
|
158
|
-
gap: 8px;
|
|
159
|
-
padding-inline: 10px;
|
|
160
|
-
padding-block: 10px;
|
|
161
|
-
text-align: left;
|
|
162
|
-
font-size: var(--text-sm, 14px);
|
|
163
|
-
line-height: var(--bk-tw-leading, var(--text-sm--line-height, calc(1.25 / 0.875)));
|
|
164
|
-
color: rgb(var(--bk-theme-mono-700) / 1);
|
|
165
|
-
cursor: pointer;
|
|
166
|
-
--bk-tw-border-style: none;
|
|
167
|
-
border-style: none;
|
|
168
|
-
background-color: transparent;
|
|
169
|
-
}
|
|
170
|
-
@media (hover: hover) {
|
|
171
|
-
:is(.bk .bk-dropdown-menu-item):hover {
|
|
172
|
-
background-color: rgb(var(--bk-theme-mono-100) / 1);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
@media (hover: hover) {
|
|
176
|
-
:is(.bk .bk-dropdown-menu-item):hover {
|
|
177
|
-
color: rgb(var(--bk-theme-mono-950) / 1);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
.bk .bk-dropdown-menu-item {
|
|
181
|
-
--bk-tw-leading: 1;
|
|
182
|
-
line-height: 1;
|
|
183
|
-
white-space: nowrap;
|
|
184
|
-
}
|
|
185
|
-
:is(.bk .bk-dropdown-menu-item):hover svg {
|
|
186
|
-
fill: rgb(var(--bk-theme-accent-700) / 1);
|
|
187
|
-
}
|
|
188
|
-
:is(.bk .bk-dropdown-menu-item) svg {
|
|
189
|
-
width: 18px;
|
|
190
|
-
height: 18px;
|
|
191
|
-
fill: currentcolor;
|
|
192
|
-
}
|
|
193
154
|
</style>
|