@blokkli/editor 2.0.0-alpha.51 → 2.0.0-alpha.53
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/chunks/tailwindConfig.mjs +3 -3
- package/dist/global/types/blockOptions.d.ts +18 -2
- package/dist/module.d.mts +2 -2
- package/dist/module.json +1 -1
- package/dist/module.mjs +281 -18
- package/dist/modules/agent/index.d.mts +1 -1
- package/dist/modules/agent/runtime/app/composables/agentProvider.d.ts +1 -0
- package/dist/modules/agent/runtime/app/composables/agentProvider.js +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.d.vue.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue +14 -49
- package/dist/modules/agent/runtime/app/features/agent/Panel/DropHandler/index.vue.d.ts +2 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.d.vue.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue +102 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Feedback/index.vue.d.ts +10 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/Input/Actions/index.vue +8 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.d.vue.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue +9 -5
- package/dist/modules/agent/runtime/app/features/agent/Panel/ToolCard/index.vue.d.ts +3 -3
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.d.vue.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue +16 -2
- package/dist/modules/agent/runtime/app/features/agent/Panel/index.vue.d.ts +7 -0
- package/dist/modules/agent/runtime/app/features/agent/index.vue +29 -0
- package/dist/modules/agent/runtime/app/features/agent/types.d.ts +16 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/Component.vue +3 -1
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.d.ts +2 -0
- package/dist/modules/agent/runtime/app/tools/delegate_text_rewrite/index.js +8 -1
- package/dist/modules/charts/index.d.mts +1 -1
- package/dist/modules/charts/index.mjs +2 -3
- package/dist/modules/charts/runtime/features/charts/Editor/ChartTypePicker/index.vue +1 -1
- package/dist/modules/charts/runtime/features/charts/Editor/ColorDropdown/index.vue +1 -1
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +16 -0
- package/dist/modules/drupal/graphql/base/query.pbConfig.graphql +9 -0
- package/dist/modules/drupal/graphql/features/agent.graphql +20 -0
- package/dist/modules/drupal/graphql/features/publishNew.graphql +14 -0
- package/dist/modules/drupal/graphql/features/referenced-entities.graphql +21 -0
- package/dist/modules/drupal/graphql/features/textFieldValues.graphql +20 -0
- package/dist/modules/drupal/graphql/features/workspace.graphql +23 -0
- package/dist/modules/drupal/graphql/mutations/bulk_translate_field_values.graphql +19 -0
- package/dist/modules/drupal/graphql/mutations/clear_outdated_translation.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/ignore_analyze.graphql +15 -0
- package/dist/modules/drupal/graphql/mutations/request_translation.graphql +10 -0
- package/dist/modules/drupal/graphql/mutations/unignore_analyze.graphql +15 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +16 -0
- package/dist/modules/drupal/runtime/adapter/index.js +180 -11
- package/dist/modules/iframes/index.d.mts +31 -0
- package/dist/modules/iframes/index.mjs +52 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.d.vue.ts +18 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue +61 -0
- package/dist/modules/iframes/runtime/components/BlokkliIframe/index.vue.d.ts +18 -0
- package/dist/modules/iframes/runtime/components/index.d.ts +1 -0
- package/dist/modules/iframes/runtime/components/index.js +1 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.d.vue.ts +12 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue +220 -0
- package/dist/modules/iframes/runtime/features/iframes/Editor/index.vue.d.ts +12 -0
- package/dist/modules/iframes/runtime/types.d.ts +10 -0
- package/dist/modules/index.d.mts +1 -1
- package/dist/modules/table-of-contents/index.d.mts +1 -1
- package/dist/runtime/components/Blocks/NotImplemented/index.vue +57 -0
- package/dist/runtime/components/BlokkliEditable.d.vue.ts +2 -1
- package/dist/runtime/components/BlokkliEditable.vue +58 -42
- package/dist/runtime/components/BlokkliEditable.vue.d.ts +2 -1
- package/dist/runtime/components/BlokkliItem.d.vue.ts +1 -1
- package/dist/runtime/components/BlokkliItem.vue.d.ts +1 -1
- package/dist/runtime/editor/adapter/index.d.ts +8 -1
- package/dist/runtime/editor/components/Actions/Interactions/index.vue +77 -17
- package/dist/runtime/editor/components/Actions/{ItemDropdown.vue → ItemDropdown/index.vue} +9 -10
- package/dist/runtime/editor/components/Actions/index.vue +586 -23
- package/dist/runtime/editor/components/AnimationCanvas/index.vue +1 -0
- package/dist/runtime/editor/components/AppMenu/MenuButton.vue +185 -1
- package/dist/runtime/editor/components/AppMenu/index.vue +24 -10
- package/dist/runtime/editor/components/ArtboardTooltip/index.d.vue.ts +6 -2
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue +223 -3
- package/dist/runtime/editor/components/ArtboardTooltip/index.vue.d.ts +6 -2
- package/dist/runtime/editor/components/AutoHeight/index.vue +23 -0
- package/dist/runtime/editor/components/Banner/Inner.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Banner/Inner.vue +32 -0
- package/dist/runtime/editor/components/Banner/Inner.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Banner/index.d.vue.ts +3 -13
- package/dist/runtime/editor/components/Banner/index.vue +2 -14
- package/dist/runtime/editor/components/Banner/index.vue.d.ts +3 -13
- package/dist/runtime/editor/components/BetaIndicator/index.d.vue.ts +6 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/BetaIndicator/index.vue.d.ts +6 -0
- package/dist/runtime/editor/components/BlockPreviewItem/index.vue +51 -1
- package/dist/runtime/editor/components/BlockPreviewRenderer/index.vue +27 -1
- package/dist/runtime/editor/components/BlockProxy/index.vue +148 -1
- package/dist/runtime/editor/components/BlokkliRootErrorBoundary.vue +59 -0
- package/dist/runtime/editor/components/BundleSelector/index.vue +170 -20
- package/dist/runtime/editor/components/Dialog/index.d.vue.ts +2 -0
- package/dist/runtime/editor/components/Dialog/index.vue +341 -0
- package/dist/runtime/editor/components/Dialog/index.vue.d.ts +2 -0
- package/dist/runtime/editor/components/DiffApproval/Highlight/index.vue +117 -0
- package/dist/runtime/editor/components/DiffApproval/Toolbar/index.vue +224 -28
- package/dist/runtime/editor/components/DiffViewer/DiffValue.d.vue.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue +5 -1
- package/dist/runtime/editor/components/DiffViewer/DiffValue.vue.d.ts +1 -0
- package/dist/runtime/editor/components/DiffViewer/State.vue +319 -0
- package/dist/runtime/editor/components/DraggableList.vue +103 -0
- package/dist/runtime/editor/components/Dropdown/index.vue +84 -0
- package/dist/runtime/editor/components/EditProvider.vue +72 -15
- package/dist/runtime/editor/components/FileDropHandler/index.d.vue.ts +23 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue +108 -0
- package/dist/runtime/editor/components/FileDropHandler/index.vue.d.ts +23 -0
- package/dist/runtime/editor/components/FlexTextarea/index.vue +4 -2
- package/dist/runtime/editor/components/Form/Datepicker/index.vue +149 -0
- package/dist/runtime/editor/components/Form/Toggle/index.vue +205 -1
- package/dist/runtime/editor/components/FormOverlay/index.vue +90 -0
- package/dist/runtime/editor/components/Icon/index.vue +6 -0
- package/dist/runtime/editor/components/Indicators/index.vue +161 -0
- package/dist/runtime/editor/components/InfoBox/index.vue +65 -0
- package/dist/runtime/editor/components/Konami/index.vue +119 -0
- package/dist/runtime/editor/components/Loading/index.d.vue.ts +6 -3
- package/dist/runtime/editor/components/Loading/index.vue +10 -5
- package/dist/runtime/editor/components/Loading/index.vue.d.ts +6 -3
- package/dist/runtime/editor/components/Messages/index.vue +131 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.d.vue.ts +1 -0
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue +246 -12
- package/dist/runtime/editor/components/NestedEditorOverlay/index.vue.d.ts +1 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.d.vue.ts +3 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue +19 -0
- package/dist/runtime/editor/components/NotEditStateInfo/index.vue.d.ts +3 -0
- package/dist/runtime/editor/components/Overlay/index.vue +84 -0
- package/dist/runtime/editor/components/Pagination/index.vue +41 -0
- package/dist/runtime/editor/components/PluginConfigForm/index.vue +23 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/FilterSelect/index.vue +429 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.d.vue.ts +22 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue +150 -0
- package/dist/runtime/editor/components/PluginConfigFormInline/index.vue.d.ts +22 -0
- package/dist/runtime/editor/components/Popup/index.vue +77 -2
- package/dist/runtime/editor/components/PreviewProvider.vue +7 -0
- package/dist/runtime/editor/components/Resizable/index.vue +90 -1
- package/dist/runtime/editor/components/ScaleToFit/index.vue +30 -1
- package/dist/runtime/editor/components/SearchOverlay/index.d.vue.ts +43 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue +264 -0
- package/dist/runtime/editor/components/SearchOverlay/index.vue.d.ts +43 -0
- package/dist/runtime/editor/components/StatusIcon/index.vue +104 -0
- package/dist/runtime/editor/components/StatusIndicator/index.d.vue.ts +9 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue +16 -0
- package/dist/runtime/editor/components/StatusIndicator/index.vue.d.ts +9 -0
- package/dist/runtime/editor/components/SystemRequirements/index.vue +57 -0
- package/dist/runtime/editor/components/Tabs/index.d.vue.ts +30 -0
- package/dist/runtime/editor/components/Tabs/index.vue +32 -0
- package/dist/runtime/editor/components/Tabs/index.vue.d.ts +30 -0
- package/dist/runtime/editor/components/Toolbar/index.vue +214 -3
- package/dist/runtime/editor/components/Tooltip/Context.d.vue.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue +13 -0
- package/dist/runtime/editor/components/Tooltip/Context.vue.d.ts +7 -0
- package/dist/runtime/editor/components/Tooltip/Status.d.vue.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue +27 -0
- package/dist/runtime/editor/components/Tooltip/Status.vue.d.ts +8 -0
- package/dist/runtime/editor/components/Tooltip/index.d.vue.ts +27 -0
- package/dist/runtime/editor/components/Tooltip/index.vue +40 -0
- package/dist/runtime/editor/components/Tooltip/index.vue.d.ts +27 -0
- package/dist/runtime/editor/components/index.d.ts +59 -49
- package/dist/runtime/editor/components/index.js +59 -98
- package/dist/runtime/editor/composables/defineHighlight.d.ts +2 -0
- package/dist/runtime/editor/composables/defineHighlight.js +10 -0
- package/dist/runtime/editor/composables/index.d.ts +1 -0
- package/dist/runtime/editor/composables/index.js +1 -0
- package/dist/runtime/editor/composables/useBlockRegistration.js +8 -0
- package/dist/runtime/editor/composables/useStickyToolbar.d.ts +1 -0
- package/dist/runtime/editor/composables/useStickyToolbar.js +16 -0
- package/dist/runtime/editor/css/output.css +1 -1
- package/dist/runtime/editor/events/index.d.ts +10 -0
- package/dist/runtime/editor/features/add-list/Help/index.vue +193 -0
- package/dist/runtime/editor/features/add-list/index.vue +441 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue +35 -0
- package/dist/runtime/editor/features/analyze/Ignored/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/Main.vue +148 -24
- package/dist/runtime/editor/features/analyze/Results/Results.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/Results.vue +0 -2
- package/dist/runtime/editor/features/analyze/Results/Results.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue +1 -2
- package/dist/runtime/editor/features/analyze/Results/ResultsItem.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.d.vue.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue +11 -8
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodes.vue.d.ts +1 -9
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.d.vue.ts +3 -10
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue +63 -25
- package/dist/runtime/editor/features/analyze/Results/ResultsItemNodesTarget.vue.d.ts +3 -10
- package/dist/runtime/editor/features/analyze/analyzers/altText.js +2 -0
- package/dist/runtime/editor/features/analyze/analyzers/headingStructure.js +3 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.d.ts +7 -0
- package/dist/runtime/editor/features/analyze/analyzers/helpers/hashString.js +8 -0
- package/dist/runtime/editor/features/analyze/analyzers/readability.js +6 -12
- package/dist/runtime/editor/features/analyze/analyzers/types.d.ts +20 -0
- package/dist/runtime/editor/features/analyze/index.vue +458 -0
- package/dist/runtime/editor/features/analyze/types.d.ts +12 -0
- package/dist/runtime/editor/features/artboard/Overview/index.vue +37 -4
- package/dist/runtime/editor/features/artboard/Renderer.vue +79 -9
- package/dist/runtime/editor/features/artboard/Scrollbar/index.vue +84 -0
- package/dist/runtime/editor/features/block-scheduler/Dialog/index.vue +1 -1
- package/dist/runtime/editor/features/block-scheduler/index.vue +114 -0
- package/dist/runtime/editor/features/breadcrumbs/index.vue +150 -0
- package/dist/runtime/editor/features/changelog/Dialog/index.vue +62 -7
- package/dist/runtime/editor/features/changelog/changelog.json +9 -1
- package/dist/runtime/editor/features/clipboard/index.vue +153 -1
- package/dist/runtime/editor/features/command-palette/Palette/Item/index.vue +39 -16
- package/dist/runtime/editor/features/command-palette/Palette/index.vue +24 -130
- package/dist/runtime/editor/features/comments/index.vue +235 -0
- package/dist/runtime/editor/features/complex-options/index.vue +4 -1
- package/dist/runtime/editor/features/debug/Main.vue +1 -1
- package/dist/runtime/editor/features/debug/Section/Features.vue +2 -4
- package/dist/runtime/editor/features/debug/index.vue +168 -0
- package/dist/runtime/editor/features/dev-mode/index.vue +92 -27
- package/dist/runtime/editor/features/dragging-overlay/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/dragging-overlay/index.vue +330 -0
- package/dist/runtime/editor/features/edit/index.vue +15 -17
- package/dist/runtime/editor/features/edit-form/Frame/index.vue +21 -4
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.d.vue.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue +32 -3
- package/dist/runtime/editor/features/editable-field/Overlay/Frame/index.vue.d.ts +9 -1
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/ChunkOverlay.vue +77 -0
- package/dist/runtime/editor/features/editable-field/Overlay/ReadabilityIndicator/index.vue +55 -56
- package/dist/runtime/editor/features/editable-field/Overlay/index.vue +416 -8
- package/dist/runtime/editor/features/editable-mask/index.vue +9 -0
- package/dist/runtime/editor/features/entity-title/index.vue +40 -56
- package/dist/runtime/editor/features/fragments/Dialog/index.vue +90 -0
- package/dist/runtime/editor/features/help/Shortcuts/index.vue +71 -0
- package/dist/runtime/editor/features/help/index.vue +17 -0
- package/dist/runtime/editor/features/highlights/Renderer/fragment.glsl +89 -0
- package/dist/runtime/editor/features/highlights/Renderer/index.vue +408 -0
- package/dist/runtime/editor/features/highlights/Renderer/vertex.glsl +87 -0
- package/dist/runtime/editor/features/highlights/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/highlights/index.vue +20 -0
- package/dist/runtime/editor/features/highlights/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/history/List/index.vue +209 -0
- package/dist/runtime/editor/features/history/index.vue +0 -1
- package/dist/runtime/editor/features/hover/Renderer/index.vue +1 -1
- package/dist/runtime/editor/features/hover/Renderer/vertex.glsl +1 -1
- package/dist/runtime/editor/features/import-existing/Dialog/index.vue +18 -0
- package/dist/runtime/editor/features/media-library/Library/index.vue +10 -30
- package/dist/runtime/editor/features/media-library/index.vue +331 -0
- package/dist/runtime/editor/features/options/Form/Checkbox/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/Checkboxes/index.vue +1 -1
- package/dist/runtime/editor/features/options/Form/ComplexType/index.vue +6 -2
- package/dist/runtime/editor/features/options/Form/Item.vue +21 -18
- package/dist/runtime/editor/features/options/Form/Radios/index.d.vue.ts +6 -0
- package/dist/runtime/editor/features/options/Form/Radios/index.vue +25 -6
- package/dist/runtime/editor/features/options/Form/Radios/index.vue.d.ts +6 -0
- package/dist/runtime/editor/features/options/Form/index.vue +1 -4
- package/dist/runtime/editor/features/options/index.vue +729 -0
- package/dist/runtime/editor/features/ownership/Banner/index.vue +9 -8
- package/dist/runtime/editor/features/ownership/index.vue +1 -1
- package/dist/runtime/editor/features/preview-grant/QrCode/index.vue +8 -3
- package/dist/runtime/editor/features/publish/Dialog/Item.vue +18 -20
- package/dist/runtime/editor/features/publish/Dialog/index.vue +5 -1
- package/dist/runtime/editor/features/publish/index.vue +835 -0
- package/dist/runtime/editor/features/publish/types.d.ts +5 -1
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.d.vue.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue +81 -0
- package/dist/runtime/editor/features/referenced-entities/List/Item/index.vue.d.ts +4 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.d.vue.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue +78 -0
- package/dist/runtime/editor/features/referenced-entities/List/index.vue.d.ts +11 -0
- package/dist/runtime/editor/features/referenced-entities/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue +36 -0
- package/dist/runtime/editor/features/referenced-entities/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/referenced-entities/types.d.ts +13 -0
- package/dist/runtime/editor/features/responsive-preview/Frame/index.vue +188 -0
- package/dist/runtime/editor/features/search/Overlay/Results/Page/index.vue +1 -1
- package/dist/runtime/editor/features/search/index.vue +511 -0
- package/dist/runtime/editor/features/selection/AddButtons/Renderer/index.vue +58 -0
- package/dist/runtime/editor/features/selection/index.vue +47 -15
- package/dist/runtime/editor/features/settings/Dialog/FeatureSetting/index.vue +23 -0
- package/dist/runtime/editor/features/settings/Dialog/index.vue +5 -2
- package/dist/runtime/editor/features/settings/index.vue +152 -0
- package/dist/runtime/editor/features/structure/List/Item/index.vue +7 -0
- package/dist/runtime/editor/features/structure/index.vue +178 -0
- package/dist/runtime/editor/features/templates/ManageDialog/Item.vue +3 -3
- package/dist/runtime/editor/features/templates/ManageDialog/index.vue +24 -3
- package/dist/runtime/editor/features/theme/index.vue +94 -0
- package/dist/runtime/editor/features/touch-action-bar/Bar/index.vue +34 -0
- package/dist/runtime/editor/features/tour/Overlay/index.vue +243 -13
- package/dist/runtime/editor/features/transform/Dialog/index.vue +132 -1
- package/dist/runtime/editor/features/translations/Banner/index.d.vue.ts +14 -1
- package/dist/runtime/editor/features/translations/Banner/index.vue +139 -12
- package/dist/runtime/editor/features/translations/Banner/index.vue.d.ts +14 -1
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue +272 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Export/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue +382 -0
- package/dist/runtime/editor/features/translations/CsvDialog/Import/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.d.ts +22 -0
- package/dist/runtime/editor/features/translations/CsvDialog/csv.js +50 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.d.vue.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue +37 -0
- package/dist/runtime/editor/features/translations/CsvDialog/index.vue.d.ts +10 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.d.ts +7 -0
- package/dist/runtime/editor/features/translations/CsvDialog/po.js +36 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.d.vue.ts +37 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue +102 -0
- package/dist/runtime/editor/features/translations/SelectionTable/index.vue.d.ts +37 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.d.vue.ts +7 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue +294 -0
- package/dist/runtime/editor/features/translations/TranslateDialog/index.vue.d.ts +7 -0
- package/dist/runtime/editor/features/translations/index.vue +276 -6
- package/dist/runtime/editor/features/translations/types.d.ts +47 -0
- package/dist/runtime/editor/features/validations/Overlay/index.vue +130 -0
- package/dist/runtime/editor/features/validations/index.vue +41 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.d.vue.ts +2 -4
- package/dist/runtime/editor/features/workspace/Overlay/index.vue +177 -0
- package/dist/runtime/editor/features/{assistant → workspace}/Overlay/index.vue.d.ts +2 -4
- package/dist/runtime/editor/features/workspace/index.d.vue.ts +3 -0
- package/dist/runtime/editor/features/workspace/index.vue +46 -0
- package/dist/runtime/editor/features/workspace/index.vue.d.ts +3 -0
- package/dist/runtime/editor/features/workspace/types.d.ts +59 -0
- package/dist/runtime/editor/features/workspace/types.js +0 -0
- package/dist/runtime/editor/icons/svg/spinner.svg +2 -2
- package/dist/runtime/editor/plugins/ContextMenu/Menu/index.vue +21 -7
- package/dist/runtime/editor/plugins/ContextMenu/index.vue +4 -0
- package/dist/runtime/editor/plugins/ItemAction/index.d.vue.ts +9 -2
- package/dist/runtime/editor/plugins/ItemAction/index.vue +26 -16
- package/dist/runtime/editor/plugins/ItemAction/index.vue.d.ts +9 -2
- package/dist/runtime/editor/plugins/Sidebar/Detached/index.vue +24 -26
- package/dist/runtime/editor/plugins/Sidebar/index.vue +612 -27
- package/dist/runtime/editor/plugins/ToolbarButton/index.d.vue.ts +13 -84
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue +36 -22
- package/dist/runtime/editor/plugins/ToolbarButton/index.vue.d.ts +13 -84
- package/dist/runtime/editor/plugins/ViewOption/index.vue +13 -14
- package/dist/runtime/editor/providers/blocks.js +1 -0
- package/dist/runtime/editor/providers/cache.d.ts +23 -0
- package/dist/runtime/editor/providers/cache.js +29 -0
- package/dist/runtime/editor/providers/directive.d.ts +25 -0
- package/dist/runtime/editor/providers/directive.js +20 -0
- package/dist/runtime/editor/providers/fieldValue.d.ts +5 -5
- package/dist/runtime/editor/providers/fieldValue.js +8 -7
- package/dist/runtime/editor/providers/plugin.d.ts +14 -0
- package/dist/runtime/editor/providers/plugin.js +9 -0
- package/dist/runtime/editor/providers/readability.js +1 -1
- package/dist/runtime/editor/providers/selection.js +1 -1
- package/dist/runtime/editor/providers/state.d.ts +1 -0
- package/dist/runtime/editor/providers/state.js +1 -0
- package/dist/runtime/editor/providers/texts.js +11 -1
- package/dist/runtime/editor/providers/ui.d.ts +11 -0
- package/dist/runtime/editor/providers/ui.js +5 -1
- package/dist/runtime/editor/translations/de.json +316 -56
- package/dist/runtime/editor/translations/fr.json +310 -50
- package/dist/runtime/editor/translations/gsw_CH.json +311 -51
- package/dist/runtime/editor/translations/it.json +310 -50
- package/dist/runtime/editor/types/app.d.ts +2 -0
- package/dist/runtime/editor/types/definitions.d.ts +8 -0
- package/dist/runtime/editor/types/field.d.ts +1 -0
- package/dist/runtime/editor/types/state.d.ts +10 -0
- package/dist/runtime/editor/types/ui.d.ts +3 -1
- package/dist/runtime/helpers/tw.d.ts +15 -0
- package/dist/runtime/helpers/tw.js +3 -0
- package/dist/runtime/types/field.d.ts +1 -0
- package/dist/shared/{editor.DsGJIlGn.d.mts → editor.BTOBvmaz.d.mts} +20 -3
- package/dist/types.d.mts +1 -1
- package/package.json +16 -3
- package/dist/runtime/editor/features/analyze/Renderer/fragment.glsl +0 -74
- package/dist/runtime/editor/features/analyze/Renderer/index.d.vue.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/index.vue +0 -330
- package/dist/runtime/editor/features/analyze/Renderer/index.vue.d.ts +0 -24
- package/dist/runtime/editor/features/analyze/Renderer/vertex.glsl +0 -94
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.d.vue.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue +0 -17
- package/dist/runtime/editor/features/assistant/Overlay/ResultMarkup/index.vue.d.ts +0 -7
- package/dist/runtime/editor/features/assistant/Overlay/index.vue +0 -108
- package/dist/runtime/editor/features/assistant/docs.md +0 -7
- package/dist/runtime/editor/features/assistant/index.vue +0 -66
- package/dist/runtime/editor/features/assistant/types.d.ts +0 -37
- package/dist/runtime/editor/features/media-library/Library/FilterSelect/index.vue +0 -168
- package/dist/runtime/editor/providers/fieldValueAdapterTypes.d.ts +0 -13
- /package/dist/{runtime/editor/features/assistant → modules/iframes/runtime}/types.js +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.d.vue.ts → ItemDropdown/index.d.vue.ts} +0 -0
- /package/dist/runtime/editor/components/Actions/{ItemDropdown.vue.d.ts → ItemDropdown/index.vue.d.ts} +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/{features/media-library/Library → components/PluginConfigFormInline}/FilterSelect/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.d.vue.ts +0 -0
- /package/dist/runtime/editor/features/{assistant → highlights/Renderer}/index.vue.d.ts +0 -0
- /package/dist/runtime/editor/{providers/fieldValueAdapterTypes.js → features/referenced-entities/types.js} +0 -0
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
<label
|
|
30
30
|
v-for="item in items"
|
|
31
31
|
:key="item.id"
|
|
32
|
+
class="_bk_group/tooltip"
|
|
32
33
|
:class="{ 'bk-is-muted': !item.translation?.exists }"
|
|
33
34
|
>
|
|
34
35
|
<div>
|
|
@@ -40,7 +41,7 @@
|
|
|
40
41
|
@click.stop.prevent="onClick(item, $event)"
|
|
41
42
|
/>
|
|
42
43
|
<span>{{ item.code }}</span>
|
|
43
|
-
<
|
|
44
|
+
<Tooltip v-show="!isOpen" :label="item.label" class="_bk_w-full" />
|
|
44
45
|
</div>
|
|
45
46
|
</label>
|
|
46
47
|
</div>
|
|
@@ -49,7 +50,49 @@
|
|
|
49
50
|
</Teleport>
|
|
50
51
|
|
|
51
52
|
<Teleport to="#bk-banner-list">
|
|
52
|
-
<Banner
|
|
53
|
+
<Banner
|
|
54
|
+
v-if="isTranslating"
|
|
55
|
+
:active-language
|
|
56
|
+
:show-csv="
|
|
57
|
+
!!adapter.loadTextFieldValuesForLanguage && !!adapter.importTranslationsBatched
|
|
58
|
+
"
|
|
59
|
+
:show-translate="
|
|
60
|
+
!!adapter.requestTranslation && !!adapter.loadTextFieldValuesForLanguage && !!adapter.importTranslationsBatched
|
|
61
|
+
"
|
|
62
|
+
:dialog-open="showCsvDialog"
|
|
63
|
+
@mark-all-up-to-date="onMarkUpToDate"
|
|
64
|
+
@open-csv="showCsvDialog = true"
|
|
65
|
+
@open-translate="showTranslateDialog = true"
|
|
66
|
+
@import-file="onImportFile"
|
|
67
|
+
/>
|
|
68
|
+
</Teleport>
|
|
69
|
+
|
|
70
|
+
<PluginItemAction
|
|
71
|
+
v-if="isTranslating && adapter.markTranslationUpToDate"
|
|
72
|
+
id="mark-translation-up-to-date"
|
|
73
|
+
:disabled="markUpToDateDisabledReason"
|
|
74
|
+
disabled-reason-success
|
|
75
|
+
multiple
|
|
76
|
+
:title="$t('translationsMarkUpToDate', 'Mark translation as up-to-date')"
|
|
77
|
+
icon="bk_mdi_check_circle"
|
|
78
|
+
:weight="-100"
|
|
79
|
+
@click="onMarkUpToDate"
|
|
80
|
+
/>
|
|
81
|
+
|
|
82
|
+
<Teleport :to="ui.mainLayoutElement.value">
|
|
83
|
+
<BlokkliTransition name="slide-up">
|
|
84
|
+
<CsvDialog
|
|
85
|
+
v-if="showCsvDialog"
|
|
86
|
+
:initial-files="pendingImportFiles"
|
|
87
|
+
@close="onCsvDialogClose"
|
|
88
|
+
/>
|
|
89
|
+
</BlokkliTransition>
|
|
90
|
+
<BlokkliTransition name="slide-up">
|
|
91
|
+
<TranslateDialog
|
|
92
|
+
v-if="showTranslateDialog"
|
|
93
|
+
@close="showTranslateDialog = false"
|
|
94
|
+
/>
|
|
95
|
+
</BlokkliTransition>
|
|
53
96
|
</Teleport>
|
|
54
97
|
|
|
55
98
|
<PluginItemAction
|
|
@@ -58,7 +101,7 @@
|
|
|
58
101
|
:disabled="translateDisabledReason"
|
|
59
102
|
:title="$t('translationsItemAction', 'Translate')"
|
|
60
103
|
icon="bk_mdi_translate"
|
|
61
|
-
:weight="-
|
|
104
|
+
:weight="-90"
|
|
62
105
|
@click="onTranslate"
|
|
63
106
|
/>
|
|
64
107
|
</template>
|
|
@@ -74,7 +117,16 @@ import {
|
|
|
74
117
|
import { falsy } from "#blokkli/helpers";
|
|
75
118
|
import { PluginItemAction, PluginTourItem } from "#blokkli/editor/plugins";
|
|
76
119
|
import Banner from "./Banner/index.vue";
|
|
77
|
-
import
|
|
120
|
+
import CsvDialog from "./CsvDialog/index.vue";
|
|
121
|
+
import TranslateDialog from "./TranslateDialog/index.vue";
|
|
122
|
+
import {
|
|
123
|
+
defineMenuButton,
|
|
124
|
+
defineHighlight,
|
|
125
|
+
defineItemDropdownAction,
|
|
126
|
+
onBlokkliEvent,
|
|
127
|
+
useDialog
|
|
128
|
+
} from "#blokkli/editor/composables";
|
|
129
|
+
import { BlokkliTransition, Tooltip } from "#blokkli/editor/components";
|
|
78
130
|
const { adapter } = defineBlokkliFeature({
|
|
79
131
|
id: "translations",
|
|
80
132
|
label: "Translations",
|
|
@@ -82,8 +134,95 @@ const { adapter } = defineBlokkliFeature({
|
|
|
82
134
|
requiredAdapterMethods: ["changeLanguage"],
|
|
83
135
|
description: "Adds support for block translations."
|
|
84
136
|
});
|
|
85
|
-
const {
|
|
137
|
+
const {
|
|
138
|
+
eventBus,
|
|
139
|
+
state,
|
|
140
|
+
context,
|
|
141
|
+
$t,
|
|
142
|
+
ui,
|
|
143
|
+
selection,
|
|
144
|
+
types,
|
|
145
|
+
definitions,
|
|
146
|
+
blocks
|
|
147
|
+
} = useBlokkli();
|
|
148
|
+
const showCsvDialog = useDialog("translations-csv", "center");
|
|
149
|
+
const showTranslateDialog = useDialog("translations-translate", "center");
|
|
150
|
+
const pendingImportFiles = ref(null);
|
|
86
151
|
const isTranslating = computed(() => state.editMode.value === "translating");
|
|
152
|
+
function onImportFile(files) {
|
|
153
|
+
pendingImportFiles.value = files;
|
|
154
|
+
showCsvDialog.value = true;
|
|
155
|
+
}
|
|
156
|
+
function onCsvDialogClose() {
|
|
157
|
+
showCsvDialog.value = false;
|
|
158
|
+
pendingImportFiles.value = null;
|
|
159
|
+
}
|
|
160
|
+
defineHighlight(() => {
|
|
161
|
+
if (!isTranslating.value) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
const lang = context.value.language;
|
|
165
|
+
return blocks.getAllBlocks().filter((block) => block.outdatedTranslations.includes(lang)).map((block) => ({
|
|
166
|
+
uuid: block.uuid,
|
|
167
|
+
color: "yellow",
|
|
168
|
+
icon: "bk_mdi_translate",
|
|
169
|
+
label: $t("outdatedTranslation", "Outdated translation"),
|
|
170
|
+
description: $t(
|
|
171
|
+
"outdatedTranslationDescription",
|
|
172
|
+
"Mark translation as up-to-date"
|
|
173
|
+
),
|
|
174
|
+
onClick: () => onMarkUpToDate([block])
|
|
175
|
+
}));
|
|
176
|
+
});
|
|
177
|
+
const autoTranslateLabel = computed(() => {
|
|
178
|
+
return $t("translationsAutoTranslate", "Auto-translate");
|
|
179
|
+
});
|
|
180
|
+
defineItemDropdownAction(() => {
|
|
181
|
+
if (!isTranslating.value || !adapter.requestTranslation || !adapter.loadTextFieldValuesForLanguage || !adapter.importTranslationsBatched) {
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
const selectedUuids = selection.uuids.value;
|
|
185
|
+
if (!selectedUuids.length) return;
|
|
186
|
+
return {
|
|
187
|
+
id: "auto-translate",
|
|
188
|
+
label: autoTranslateLabel.value,
|
|
189
|
+
icon: "bk_mdi_translate",
|
|
190
|
+
group: "translate",
|
|
191
|
+
weight: -80,
|
|
192
|
+
callback: () => autoTranslateSelected()
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
async function autoTranslateSelected() {
|
|
196
|
+
ui.setTransform(autoTranslateLabel.value);
|
|
197
|
+
const sourceLanguage = state.translation.value.sourceLanguage || "en";
|
|
198
|
+
const targetLanguage = context.value.language;
|
|
199
|
+
const selectedUuids = new Set(selection.uuids.value);
|
|
200
|
+
const sourceValues = await adapter.loadTextFieldValuesForLanguage(sourceLanguage);
|
|
201
|
+
const items2 = sourceValues.filter((v) => selectedUuids.has(v.uuid)).map((v) => ({
|
|
202
|
+
key: `${v.uuid}:${v.fieldName}`,
|
|
203
|
+
text: v.value,
|
|
204
|
+
isHtml: v.fieldType === "markup",
|
|
205
|
+
sourceLanguage,
|
|
206
|
+
targetLanguage
|
|
207
|
+
}));
|
|
208
|
+
if (items2.length) {
|
|
209
|
+
const response = await adapter.requestTranslation(items2);
|
|
210
|
+
if (!response.success || !response.data.length) return;
|
|
211
|
+
const importItems = response.data.map((result) => {
|
|
212
|
+
const separatorIndex = result.key.indexOf(":");
|
|
213
|
+
return {
|
|
214
|
+
langcode: targetLanguage,
|
|
215
|
+
uuid: result.key.substring(0, separatorIndex),
|
|
216
|
+
fieldName: result.key.substring(separatorIndex + 1),
|
|
217
|
+
fieldValue: result.translatedText
|
|
218
|
+
};
|
|
219
|
+
});
|
|
220
|
+
await state.mutateWithLoadingState(
|
|
221
|
+
() => adapter.importTranslationsBatched({ items: importItems })
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
ui.setTransform(null);
|
|
225
|
+
}
|
|
87
226
|
const isOpen = ref(false);
|
|
88
227
|
const isDropdown = computed(() => {
|
|
89
228
|
if (ui.isMobile.value) {
|
|
@@ -157,6 +296,18 @@ function onClick(item, event) {
|
|
|
157
296
|
eventBus.emit("translateEntity", item.translation);
|
|
158
297
|
}
|
|
159
298
|
}
|
|
299
|
+
const markUpToDateDisabledReason = computed(() => {
|
|
300
|
+
const lang = context.value.language;
|
|
301
|
+
if (selection.items.value.some(
|
|
302
|
+
(item) => item.outdatedTranslations.includes(lang)
|
|
303
|
+
)) {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
return $t(
|
|
307
|
+
"translationsMarkUpToDateDisabled",
|
|
308
|
+
"No selected blocks have an outdated translation."
|
|
309
|
+
);
|
|
310
|
+
});
|
|
160
311
|
function onTranslate(items2) {
|
|
161
312
|
const item = items2[0];
|
|
162
313
|
if (item) {
|
|
@@ -166,6 +317,25 @@ function onTranslate(items2) {
|
|
|
166
317
|
});
|
|
167
318
|
}
|
|
168
319
|
}
|
|
320
|
+
function onMarkUpToDate(items2) {
|
|
321
|
+
if (!adapter.markTranslationUpToDate) return;
|
|
322
|
+
const lang = context.value.language;
|
|
323
|
+
const uuids = items2.map((item) => {
|
|
324
|
+
if (typeof item === "string") {
|
|
325
|
+
return item;
|
|
326
|
+
}
|
|
327
|
+
if (item.outdatedTranslations.includes(lang)) {
|
|
328
|
+
return item.uuid;
|
|
329
|
+
}
|
|
330
|
+
return null;
|
|
331
|
+
}).filter(falsy);
|
|
332
|
+
if (!uuids.length) {
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
state.mutateWithLoadingState(
|
|
336
|
+
() => adapter.markTranslationUpToDate(uuids, context.value.language)
|
|
337
|
+
);
|
|
338
|
+
}
|
|
169
339
|
onBlokkliEvent("item:doubleClick", function(block) {
|
|
170
340
|
if (isTranslating.value && !translateDisabledReason.value) {
|
|
171
341
|
onTranslate([block]);
|
|
@@ -204,7 +374,11 @@ defineMenuButton(() => {
|
|
|
204
374
|
disabled: !isTranslating.value,
|
|
205
375
|
weight: 60,
|
|
206
376
|
callback: () => {
|
|
207
|
-
|
|
377
|
+
if (adapter.requestTranslation && adapter.loadTextFieldValuesForLanguage && adapter.importTranslationsBatched) {
|
|
378
|
+
showTranslateDialog.value = true;
|
|
379
|
+
} else {
|
|
380
|
+
eventBus.emit("batchTranslate");
|
|
381
|
+
}
|
|
208
382
|
}
|
|
209
383
|
};
|
|
210
384
|
});
|
|
@@ -215,3 +389,99 @@ export default {
|
|
|
215
389
|
name: "Translations"
|
|
216
390
|
};
|
|
217
391
|
</script>
|
|
392
|
+
|
|
393
|
+
<style>
|
|
394
|
+
.bk .bk-translations {
|
|
395
|
+
position: relative;
|
|
396
|
+
font-size: 12px;
|
|
397
|
+
line-height: 16px
|
|
398
|
+
}
|
|
399
|
+
@media (min-width: 1024px) {
|
|
400
|
+
.bk .bk-translations {
|
|
401
|
+
font-size: 14px;
|
|
402
|
+
line-height: 20px
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
@media (min-width: 1280px) {
|
|
406
|
+
.bk .bk-translations {
|
|
407
|
+
font-size: 16px;
|
|
408
|
+
line-height: 24px
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
.bk .bk-translations .bk-toolbar-button {
|
|
412
|
+
height: 100%;
|
|
413
|
+
font-weight: 600;
|
|
414
|
+
text-transform: uppercase
|
|
415
|
+
}
|
|
416
|
+
.bk .bk-translations .bk-toolbar-button.bk-is-active {
|
|
417
|
+
--bk-tw-bg-opacity: 1 !important;
|
|
418
|
+
background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1)) !important;
|
|
419
|
+
--bk-tw-text-opacity: 1;
|
|
420
|
+
color: rgb(var(--bk-theme-mono-900) / var(--bk-tw-text-opacity, 1))
|
|
421
|
+
}
|
|
422
|
+
.bk .bk-translations .bk-translations-dropdown {
|
|
423
|
+
position: absolute;
|
|
424
|
+
top: 100%;
|
|
425
|
+
right: 0px;
|
|
426
|
+
z-index: calc(var(--bk-z-index-base) + 230000) /* "toolbar-dropdown" */;
|
|
427
|
+
max-width: 300px;
|
|
428
|
+
--bk-tw-bg-opacity: 1;
|
|
429
|
+
background-color: rgb(255 255 255 / var(--bk-tw-bg-opacity, 1));
|
|
430
|
+
--bk-tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
|
|
431
|
+
--bk-tw-shadow-colored: 0 10px 15px -3px var(--bk-tw-shadow-color), 0 4px 6px -4px var(--bk-tw-shadow-color);
|
|
432
|
+
box-shadow: var(--bk-tw-ring-offset-shadow, 0 0 #0000), var(--bk-tw-ring-shadow, 0 0 #0000), var(--bk-tw-shadow)
|
|
433
|
+
}
|
|
434
|
+
@media (min-width: 1024px) {
|
|
435
|
+
.bk .bk-translations .bk-translations-dropdown {
|
|
436
|
+
right: auto;
|
|
437
|
+
left: 0px
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
.bk .bk-translations .bk-translations-dropdown label {
|
|
441
|
+
position: relative;
|
|
442
|
+
display: block;
|
|
443
|
+
cursor: pointer;
|
|
444
|
+
white-space: nowrap;
|
|
445
|
+
padding-left: 15px;
|
|
446
|
+
padding-right: 15px;
|
|
447
|
+
padding-top: 10px;
|
|
448
|
+
padding-bottom: 10px;
|
|
449
|
+
font-size: 14px;
|
|
450
|
+
line-height: 20px
|
|
451
|
+
}
|
|
452
|
+
@media (min-width: 1024px) {
|
|
453
|
+
.bk .bk-translations .bk-translations-dropdown label:hover {
|
|
454
|
+
--bk-tw-bg-opacity: 1;
|
|
455
|
+
background-color: rgb(var(--bk-theme-mono-100) / var(--bk-tw-bg-opacity, 1))
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
.bk .bk-translations .bk-translations-dropdown label.bk-is-muted {
|
|
459
|
+
--bk-tw-text-opacity: 1;
|
|
460
|
+
color: rgb(var(--bk-theme-mono-400) / var(--bk-tw-text-opacity, 1))
|
|
461
|
+
}
|
|
462
|
+
.bk .bk-translations .bk-translations-dropdown label > div {
|
|
463
|
+
display: flex;
|
|
464
|
+
align-items: center;
|
|
465
|
+
justify-content: space-between;
|
|
466
|
+
gap: 10px
|
|
467
|
+
}
|
|
468
|
+
@media (min-width: 768px) {
|
|
469
|
+
.bk .bk-translations .bk-translations-dropdown label > div {
|
|
470
|
+
gap: 20px
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
.bk .bk-translations .bk-translations-dropdown label > div span {
|
|
474
|
+
order: 9999;
|
|
475
|
+
font-weight: 600
|
|
476
|
+
}
|
|
477
|
+
.bk .bk-translations .bk-translations-dropdown input {
|
|
478
|
+
position: absolute;
|
|
479
|
+
top: 0px;
|
|
480
|
+
left: 0px;
|
|
481
|
+
height: 100%;
|
|
482
|
+
width: 100%;
|
|
483
|
+
cursor: pointer;
|
|
484
|
+
appearance: none;
|
|
485
|
+
opacity: 0
|
|
486
|
+
}
|
|
487
|
+
</style>
|
|
@@ -1,10 +1,57 @@
|
|
|
1
1
|
import type { EntityTranslation } from '#blokkli/editor/types/state';
|
|
2
|
+
import type { TextFieldValue } from '#blokkli/editor/providers/fieldValue';
|
|
2
3
|
declare module '#blokkli/editor/adapter' {
|
|
3
4
|
interface BlokkliAdapter<T> {
|
|
4
5
|
/**
|
|
5
6
|
* Change the language.
|
|
6
7
|
*/
|
|
7
8
|
changeLanguage?: (translation: EntityTranslation) => Promise<any>;
|
|
9
|
+
/**
|
|
10
|
+
* Mark the translation of a block as up-to-date, removing the langcode
|
|
11
|
+
* from the block's outdatedTranslations list.
|
|
12
|
+
*/
|
|
13
|
+
markTranslationUpToDate?: (uuids: string[], langcode: string) => Promise<MutationResponseLike<T>>;
|
|
14
|
+
/**
|
|
15
|
+
* Load all text field values for a given language.
|
|
16
|
+
*
|
|
17
|
+
* Used by the CSV export to fetch source language values when the editor
|
|
18
|
+
* is viewing a translation.
|
|
19
|
+
*/
|
|
20
|
+
loadTextFieldValuesForLanguage?: (langcode: string) => Promise<TextFieldValue[]>;
|
|
21
|
+
/**
|
|
22
|
+
* Import translations for multiple languages at once.
|
|
23
|
+
*
|
|
24
|
+
* Each item includes the target language, block UUID, field name, and
|
|
25
|
+
* the new field value. Applied as a single mutation so it can be undone
|
|
26
|
+
* in one step.
|
|
27
|
+
*/
|
|
28
|
+
importTranslationsBatched?: (arg: {
|
|
29
|
+
items: {
|
|
30
|
+
langcode: string;
|
|
31
|
+
uuid: string;
|
|
32
|
+
fieldName: string;
|
|
33
|
+
fieldValue: string;
|
|
34
|
+
}[];
|
|
35
|
+
markUpToDate?: boolean;
|
|
36
|
+
}) => Promise<MutationResponseLike<T>>;
|
|
37
|
+
/**
|
|
38
|
+
* Request automatic translations for a batch of text fields.
|
|
39
|
+
*
|
|
40
|
+
* Each item includes a key (uuid:fieldName), the source text, and the
|
|
41
|
+
* source/target language codes. Returns the translated texts keyed by
|
|
42
|
+
* the same key. This is a pure query with no side effects - applying
|
|
43
|
+
* the results uses importTranslationsBatched.
|
|
44
|
+
*/
|
|
45
|
+
requestTranslation?: (items: {
|
|
46
|
+
key: string;
|
|
47
|
+
text: string;
|
|
48
|
+
isHtml: boolean;
|
|
49
|
+
sourceLanguage: string;
|
|
50
|
+
targetLanguage: string;
|
|
51
|
+
}[]) => Promise<GenericAdapterResponse<{
|
|
52
|
+
key: string;
|
|
53
|
+
translatedText: string;
|
|
54
|
+
}[]>>;
|
|
8
55
|
}
|
|
9
56
|
}
|
|
10
57
|
declare module '#blokkli/editor/events' {
|
|
@@ -40,3 +40,133 @@ const items = computed(
|
|
|
40
40
|
})
|
|
41
41
|
);
|
|
42
42
|
</script>
|
|
43
|
+
|
|
44
|
+
<style>
|
|
45
|
+
.bk.bk-validations-overlay {
|
|
46
|
+
|
|
47
|
+
pointer-events: none;
|
|
48
|
+
|
|
49
|
+
position: absolute;
|
|
50
|
+
|
|
51
|
+
top: 0px;
|
|
52
|
+
|
|
53
|
+
left: 0px;
|
|
54
|
+
|
|
55
|
+
height: 100%;
|
|
56
|
+
|
|
57
|
+
width: 100%
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.bk.bk-validations-overlay > div {
|
|
61
|
+
|
|
62
|
+
position: absolute;
|
|
63
|
+
|
|
64
|
+
top: 0px;
|
|
65
|
+
|
|
66
|
+
left: 0px;
|
|
67
|
+
|
|
68
|
+
box-sizing: border-box;
|
|
69
|
+
|
|
70
|
+
border-width: 3px;
|
|
71
|
+
|
|
72
|
+
--bk-tw-border-opacity: 1;
|
|
73
|
+
|
|
74
|
+
border-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-border-opacity, 1));
|
|
75
|
+
|
|
76
|
+
background-color: rgb(var(--bk-theme-red-normal) / 0.1)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.bk.bk-validations-overlay > div > div {
|
|
80
|
+
|
|
81
|
+
--bk-tw-bg-opacity: 1;
|
|
82
|
+
|
|
83
|
+
background-color: rgb(var(--bk-theme-red-normal) / var(--bk-tw-bg-opacity, 1));
|
|
84
|
+
|
|
85
|
+
padding-left: 10px;
|
|
86
|
+
|
|
87
|
+
padding-right: 10px;
|
|
88
|
+
|
|
89
|
+
padding-top: 5px;
|
|
90
|
+
|
|
91
|
+
padding-bottom: 5px;
|
|
92
|
+
|
|
93
|
+
--bk-tw-text-opacity: 1;
|
|
94
|
+
|
|
95
|
+
color: rgb(255 255 255 / var(--bk-tw-text-opacity, 1));
|
|
96
|
+
|
|
97
|
+
position: absolute;
|
|
98
|
+
|
|
99
|
+
left: -2px;
|
|
100
|
+
|
|
101
|
+
right: -2px;
|
|
102
|
+
|
|
103
|
+
font-weight: 700;
|
|
104
|
+
|
|
105
|
+
bottom: 100%
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.bk .bk-validation-item {
|
|
109
|
+
|
|
110
|
+
width: 100%;
|
|
111
|
+
|
|
112
|
+
padding: 15px;
|
|
113
|
+
|
|
114
|
+
font-size: 16px;
|
|
115
|
+
|
|
116
|
+
line-height: 24px;
|
|
117
|
+
|
|
118
|
+
--bk-tw-text-opacity: 1;
|
|
119
|
+
|
|
120
|
+
color: rgb(var(--bk-theme-mono-800) / var(--bk-tw-text-opacity, 1))
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.bk .bk-validation-item:hover {
|
|
124
|
+
|
|
125
|
+
--bk-tw-bg-opacity: 1;
|
|
126
|
+
|
|
127
|
+
background-color: rgb(var(--bk-theme-mono-50) / var(--bk-tw-bg-opacity, 1))
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.bk .bk-validation-item {
|
|
131
|
+
|
|
132
|
+
border-bottom-width: 1px;
|
|
133
|
+
|
|
134
|
+
--bk-tw-border-opacity: 1;
|
|
135
|
+
|
|
136
|
+
border-bottom-color: rgb(var(--bk-theme-mono-300) / var(--bk-tw-border-opacity, 1))
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.bk .bk-validation-item .bk-blokkli-item-icon {
|
|
140
|
+
|
|
141
|
+
width: 25px;
|
|
142
|
+
|
|
143
|
+
height: 25px;
|
|
144
|
+
|
|
145
|
+
border-radius: 4px;
|
|
146
|
+
|
|
147
|
+
border-width: 1px;
|
|
148
|
+
|
|
149
|
+
--bk-tw-border-opacity: 1;
|
|
150
|
+
|
|
151
|
+
border-color: rgb(var(--bk-theme-mono-400) / var(--bk-tw-border-opacity, 1));
|
|
152
|
+
|
|
153
|
+
--bk-tw-bg-opacity: 1;
|
|
154
|
+
|
|
155
|
+
background-color: rgb(var(--bk-theme-mono-200) / var(--bk-tw-bg-opacity, 1));
|
|
156
|
+
|
|
157
|
+
padding: 3px
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.bk .bk-validation-item .bk-validation-item-header {
|
|
161
|
+
|
|
162
|
+
margin-bottom: 10px;
|
|
163
|
+
|
|
164
|
+
display: flex;
|
|
165
|
+
|
|
166
|
+
align-items: center;
|
|
167
|
+
|
|
168
|
+
gap: 5px;
|
|
169
|
+
|
|
170
|
+
font-weight: 500
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -67,3 +67,44 @@ export default {
|
|
|
67
67
|
name: "Validations"
|
|
68
68
|
};
|
|
69
69
|
</script>
|
|
70
|
+
|
|
71
|
+
<style>
|
|
72
|
+
.bk.bk-errors .bk-errors-success {
|
|
73
|
+
|
|
74
|
+
display: flex;
|
|
75
|
+
|
|
76
|
+
flex-direction: column;
|
|
77
|
+
|
|
78
|
+
align-items: center;
|
|
79
|
+
|
|
80
|
+
padding-top: 30px;
|
|
81
|
+
|
|
82
|
+
text-align: center
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.bk.bk-errors .bk-errors-success figure {
|
|
86
|
+
|
|
87
|
+
margin-bottom: 20px;
|
|
88
|
+
|
|
89
|
+
height: 100px;
|
|
90
|
+
|
|
91
|
+
width: 100px;
|
|
92
|
+
|
|
93
|
+
border-radius: 9999px;
|
|
94
|
+
|
|
95
|
+
--bk-tw-bg-opacity: 1;
|
|
96
|
+
|
|
97
|
+
background-color: rgb(var(--bk-theme-lime-light) / var(--bk-tw-bg-opacity, 1));
|
|
98
|
+
|
|
99
|
+
padding: 20px;
|
|
100
|
+
|
|
101
|
+
--bk-tw-text-opacity: 1;
|
|
102
|
+
|
|
103
|
+
color: rgb(var(--bk-theme-lime-dark) / var(--bk-tw-text-opacity, 1))
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.bk.bk-errors .bk-errors-success figure svg {
|
|
107
|
+
|
|
108
|
+
fill: currentColor
|
|
109
|
+
}
|
|
110
|
+
</style>
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
declare const _default: typeof __VLS_export;
|
|
2
|
-
export default _default;
|
|
3
1
|
declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
4
2
|
close: () => any;
|
|
5
|
-
submit: (result: import("../types.js").AssistantResultMarkup) => any;
|
|
6
3
|
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
7
4
|
onClose?: (() => any) | undefined;
|
|
8
|
-
onSubmit?: ((result: import("../types.js").AssistantResultMarkup) => any) | undefined;
|
|
9
5
|
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
declare const _default: typeof __VLS_export;
|
|
7
|
+
export default _default;
|