@blokkli/editor 2.0.0-alpha.13 → 2.0.0-alpha.15
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.d.mts +1 -1
- package/dist/module.json +1 -1
- package/dist/module.mjs +4873 -1167
- package/dist/modules/drupal/graphql/base/fragment.ParagraphsBlokkliConfigInput.graphql +31 -0
- package/dist/modules/drupal/graphql/base/fragment.blokkliProps.graphql +1 -0
- package/dist/modules/drupal/graphql/base/fragment.paragraphsBlokkliEditState.graphql +5 -0
- package/dist/modules/drupal/graphql/base/query.pbEntityConfig.graphql +5 -0
- package/dist/modules/drupal/graphql/features/publishNew.graphql +1 -4
- package/dist/modules/drupal/graphql/features/scheduler.graphql +31 -0
- package/dist/modules/drupal/graphql/features/transform.graphql +9 -1
- package/dist/modules/drupal/graphql/features/transform_host.graphql +38 -0
- package/dist/modules/drupal/graphql/mutations/update_host_options.graphql +15 -0
- package/dist/modules/drupal/index.d.mts +1 -1
- package/dist/modules/drupal/index.mjs +37 -7
- package/dist/modules/drupal/runtime/adapter/index.js +140 -5
- package/dist/runtime/adapter/index.d.ts +90 -1
- package/dist/runtime/blokkliPlugins/AddAction/index.vue +27 -3
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue +65 -0
- package/dist/runtime/blokkliPlugins/BlockIndicator/index.vue.d.ts +26 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/Menu/index.vue +3 -0
- package/dist/runtime/blokkliPlugins/ContextMenu/index.vue +3 -2
- package/dist/runtime/blokkliPlugins/DroppableEdit/index.vue +3 -3
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue +49 -11
- package/dist/runtime/blokkliPlugins/ItemDropdown/index.vue.d.ts +29 -15
- package/dist/runtime/blokkliPlugins/MenuButton/index.vue.d.ts +2 -2
- package/dist/runtime/blokkliPlugins/Sidebar/Detached/index.vue +6 -7
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue +2 -9
- package/dist/runtime/blokkliPlugins/Sidebar/index.vue.d.ts +1 -1
- package/dist/runtime/blokkliPlugins/ViewOption/index.vue +6 -3
- package/dist/runtime/blokkliPlugins/index.d.ts +8 -7
- package/dist/runtime/blokkliPlugins/index.js +15 -13
- package/dist/runtime/components/Blocks/Fragment/icon.svg +1 -1
- package/dist/runtime/components/BlokkliProvider.vue +1 -0
- package/dist/runtime/components/BlokkliProvider.vue.d.ts +1 -0
- package/dist/runtime/components/Edit/Actions/index.vue +39 -67
- package/dist/runtime/components/Edit/AddListItem/index.vue +2 -5
- package/dist/runtime/components/Edit/AddListItem/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue +19 -0
- package/dist/runtime/components/Edit/AddListItemIcon/index.vue.d.ts +15 -0
- package/dist/runtime/components/Edit/AppMenu/index.vue +5 -5
- package/dist/runtime/components/Edit/Dialog/index.vue +5 -1
- package/dist/runtime/components/Edit/Dialog/index.vue.d.ts +1 -1
- package/dist/runtime/components/Edit/DiffViewer/State.vue +276 -0
- package/dist/runtime/components/Edit/DiffViewer/State.vue.d.ts +16 -0
- package/dist/runtime/components/Edit/DragInteractions/index.vue +35 -6
- package/dist/runtime/components/Edit/EditProvider.vue +46 -35
- package/dist/runtime/components/Edit/Features/AddList/index.vue +15 -25
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/fragment.glsl +58 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue +168 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/index.vue.d.ts +9 -0
- package/dist/runtime/components/Edit/Features/Analyze/Overlay/vertex.glsl +72 -0
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue +159 -0
- package/dist/runtime/components/Edit/Features/Analyze/Renderer.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue +100 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Results.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue +56 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItem.vue.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue +87 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodes.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue +101 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/ResultsItemNodesTarget.vue.d.ts +8 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue +18 -0
- package/dist/runtime/components/Edit/Features/Analyze/Results/Status.vue.d.ts +8 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue +92 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/Chart.vue.d.ts +17 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue +77 -0
- package/dist/runtime/components/Edit/Features/Analyze/Summary/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.d.ts +12 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/axe.js +75 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.d.ts +4 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/defineAnalyzer.js +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.d.ts +32 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/Context.js +45 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/collectTextElements.js +95 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.d.ts +3 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/helpers/normalizeArray.js +13 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/index.js +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/readability.js +165 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.d.ts +44 -0
- package/dist/runtime/components/Edit/Features/Analyze/analyzers/types.js +0 -0
- package/dist/runtime/components/Edit/Features/Analyze/helper.d.ts +5 -0
- package/dist/runtime/components/Edit/Features/Analyze/helper.js +28 -0
- package/dist/runtime/components/Edit/Features/Analyze/index.vue +44 -0
- package/dist/runtime/components/Edit/Features/Anchors/Renderer.vue +136 -0
- package/dist/runtime/components/Edit/Features/Anchors/index.vue +32 -0
- package/dist/runtime/components/Edit/Features/Anchors/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Artboard/Overview/index.vue +25 -13
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue +296 -0
- package/dist/runtime/components/Edit/Features/Artboard/Renderer.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Features/Artboard/index.vue +10 -245
- package/dist/runtime/components/Edit/Features/Assistant/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/BlockAddList/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/Clipboard/index.vue +161 -28
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue +16 -4
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/Group/index.vue.d.ts +0 -1
- package/dist/runtime/components/Edit/Features/CommandPalette/Palette/index.vue +4 -53
- package/dist/runtime/components/Edit/Features/CommandPalette/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Conversions/index.vue +12 -14
- package/dist/runtime/components/Edit/Features/Debug/Viewport/index.vue +14 -0
- package/dist/runtime/components/Edit/Features/Debug/index.vue +27 -24
- package/dist/runtime/components/Edit/Features/Diff/DiffView/index.vue +13 -190
- package/dist/runtime/components/Edit/Features/Diff/index.vue +2 -2
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DragItems/index.vue +4 -4
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/fragment.glsl +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/index.vue +35 -71
- package/dist/runtime/components/Edit/Features/DraggingOverlay/DropTargets/vertex.glsl +1 -1
- package/dist/runtime/components/Edit/Features/DraggingOverlay/index.vue +62 -48
- package/dist/runtime/components/Edit/Features/EditForm/Frame/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/EditForm/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/EditableField/index.vue +6 -2
- package/dist/runtime/components/Edit/Features/EditableMask/index.vue +3 -20
- package/dist/runtime/components/Edit/Features/EntityTitle/index.vue +33 -1
- package/dist/runtime/components/Edit/Features/Fragments/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/History/index.vue +35 -12
- package/dist/runtime/components/Edit/Features/ImportExisting/Dialog/index.vue +6 -2
- package/dist/runtime/components/Edit/Features/ImportExisting/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Library/index.vue +11 -9
- package/dist/runtime/components/Edit/Features/MediaLibrary/Library/index.vue +5 -8
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/fragment.glsl +1 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/index.vue +9 -4
- package/dist/runtime/components/Edit/Features/MultiSelect/Overlay/vertex.glsl +1 -1
- package/dist/runtime/components/Edit/Features/MultiSelect/index.vue +8 -14
- package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Options/Form/Checkbox/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue +9 -3
- package/dist/runtime/components/Edit/Features/Options/Form/Item.vue.d.ts +0 -1
- package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue +37 -19
- package/dist/runtime/components/Edit/Features/Options/Form/Radios/index.vue.d.ts +8 -2
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue +81 -37
- package/dist/runtime/components/Edit/Features/Options/Form/index.vue.d.ts +5 -5
- package/dist/runtime/components/Edit/Features/Options/index.vue +30 -6
- package/dist/runtime/components/Edit/Features/PreviewGrant/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue +41 -14
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Item.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue +47 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/PublishOption.vue.d.ts +19 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/ScheduleDate.vue +183 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/ScheduleDate.vue.d.ts +13 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue +83 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/Summary.vue.d.ts +9 -0
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue +381 -128
- package/dist/runtime/components/Edit/Features/Publish/Dialog/index.vue.d.ts +3 -14
- package/dist/runtime/components/Edit/Features/Publish/index.vue +37 -22
- package/dist/runtime/components/Edit/Features/Revert/index.vue +3 -3
- package/dist/runtime/components/Edit/Features/Search/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue +54 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/AddButtonsField.vue.d.ts +14 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue +120 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/Overlay/index.vue.d.ts +15 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue +459 -0
- package/dist/runtime/components/Edit/Features/Selection/AddButtons/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Features/Selection/Overlay/fragment.glsl +14 -9
- package/dist/runtime/components/Edit/Features/Selection/Overlay/index.vue +32 -11
- package/dist/runtime/components/Edit/Features/Selection/Overlay/vertex.glsl +1 -1
- package/dist/runtime/components/Edit/Features/Selection/index.vue +76 -7
- package/dist/runtime/components/Edit/Features/Settings/Dialog/FeatureSetting/index.vue +12 -17
- package/dist/runtime/components/Edit/Features/Settings/index.vue +11 -25
- package/dist/runtime/components/Edit/Features/Theme/Color/index.vue +5 -1
- package/dist/runtime/components/Edit/Features/Theme/index.vue +2 -1
- package/dist/runtime/components/Edit/Features/TouchActionBar/index.vue +3 -2
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue +198 -0
- package/dist/runtime/components/Edit/Features/Transform/Dialog/index.vue.d.ts +13 -0
- package/dist/runtime/components/Edit/Features/Transform/index.vue +155 -44
- package/dist/runtime/components/Edit/Form/Datepicker/index.vue +198 -0
- package/dist/runtime/components/Edit/Form/Datepicker/index.vue.d.ts +15 -0
- package/dist/runtime/components/Edit/Form/Radio/index.vue +33 -0
- package/dist/runtime/components/Edit/Form/Radio/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/Form/RadioTabs/index.vue +37 -0
- package/dist/runtime/components/Edit/Form/RadioTabs/index.vue.d.ts +22 -0
- package/dist/runtime/components/Edit/Form/Select/index.vue +29 -0
- package/dist/runtime/components/Edit/Form/Select/index.vue.d.ts +20 -0
- package/dist/runtime/components/Edit/Form/Text/index.vue +33 -0
- package/dist/runtime/components/Edit/Form/Text/index.vue.d.ts +19 -0
- package/dist/runtime/components/Edit/Form/Textarea/index.vue +13 -6
- package/dist/runtime/components/Edit/Form/Textarea/index.vue.d.ts +4 -0
- package/dist/runtime/components/Edit/FormOverlay/index.vue +1 -1
- package/dist/runtime/components/Edit/Indicators/index.vue +123 -0
- package/dist/runtime/components/Edit/Indicators/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/ItemIcon/index.vue +2 -1
- package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue +66 -0
- package/dist/runtime/components/Edit/Konami/Game/PixelGrid.vue.d.ts +7 -0
- package/dist/runtime/components/Edit/Konami/Game/blokkli.png +0 -0
- package/dist/runtime/components/Edit/Konami/Game/charmap.d.ts +2 -0
- package/dist/runtime/components/Edit/Konami/Game/charmap.js +168 -0
- package/dist/runtime/components/Edit/Konami/Game/index.vue +752 -0
- package/dist/runtime/components/Edit/Konami/Game/index.vue.d.ts +6 -0
- package/dist/runtime/components/Edit/Konami/Game/textRendering.d.ts +8 -0
- package/dist/runtime/components/Edit/Konami/Game/textRendering.js +138 -0
- package/dist/runtime/components/Edit/Konami/Game/useIconRendering.d.ts +9 -0
- package/dist/runtime/components/Edit/Konami/Game/useIconRendering.js +130 -0
- package/dist/runtime/components/Edit/Konami/index.vue +44 -0
- package/dist/runtime/components/Edit/Konami/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Loading/index.vue +6 -2
- package/dist/runtime/components/Edit/Loading/index.vue.d.ts +2 -0
- package/dist/runtime/components/Edit/Messages/index.vue +8 -3
- package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue +17 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Checkbox/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue +37 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Options/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue +43 -0
- package/dist/runtime/components/Edit/PluginConfigForm/Text/index.vue.d.ts +11 -0
- package/dist/runtime/components/Edit/PluginConfigForm/index.vue +57 -0
- package/dist/runtime/components/Edit/PluginConfigForm/index.vue.d.ts +16 -0
- package/dist/runtime/components/Edit/PreviewProvider.vue +3 -4
- package/dist/runtime/components/Edit/RelativeTime/index.vue +3 -2
- package/dist/runtime/components/Edit/ShortcutIndicator/index.vue +8 -3
- package/dist/runtime/components/Edit/SystemRequirements/index.vue +3 -3
- package/dist/runtime/components/Edit/Toolbar/index.vue +3 -2
- package/dist/runtime/components/Edit/Transition/index.vue +41 -0
- package/dist/runtime/components/Edit/Transition/index.vue.d.ts +19 -0
- package/dist/runtime/components/Edit/index.d.ts +24 -15
- package/dist/runtime/components/Edit/index.js +46 -28
- package/dist/runtime/composables/defineBlokkli.js +7 -3
- package/dist/runtime/composables/defineBlokkliFeature.d.ts +4 -7
- package/dist/runtime/composables/defineBlokkliProvider.d.ts +11 -0
- package/dist/runtime/composables/defineBlokkliProvider.js +46 -0
- package/dist/runtime/composables/useBlokkliHelper.js +1 -1
- package/dist/runtime/constants/index.d.ts +3 -0
- package/dist/runtime/constants/index.js +3 -0
- package/dist/runtime/css/output.css +1 -1
- package/dist/runtime/helpers/addElementClasses.d.ts +2 -0
- package/dist/runtime/helpers/addElementClasses.js +24 -0
- package/dist/runtime/helpers/animationProvider.d.ts +4 -2
- package/dist/runtime/helpers/animationProvider.js +7 -2
- package/dist/runtime/helpers/bundles/index.d.ts +1 -0
- package/dist/runtime/helpers/bundles/index.js +4 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.d.ts +20 -0
- package/dist/runtime/helpers/composables/useStickyToolbar.js +215 -0
- package/dist/runtime/helpers/definitionProvider.d.ts +2 -1
- package/dist/runtime/helpers/definitionProvider.js +17 -0
- package/dist/runtime/helpers/domProvider.d.ts +2 -1
- package/dist/runtime/helpers/domProvider.js +89 -43
- package/dist/runtime/helpers/dropTargets/index.d.ts +6 -0
- package/dist/runtime/helpers/dropTargets/index.js +49 -0
- package/dist/runtime/helpers/eventBus.d.ts +1 -1
- package/dist/runtime/helpers/eventBus.js +2 -2
- package/dist/runtime/helpers/index.d.ts +10 -1
- package/dist/runtime/helpers/index.js +57 -0
- package/dist/runtime/helpers/indicatorsProvider.d.ts +10 -0
- package/dist/runtime/helpers/indicatorsProvider.js +23 -0
- package/dist/runtime/helpers/keyboardProvider.d.ts +2 -0
- package/dist/runtime/helpers/keyboardProvider.js +17 -1
- package/dist/runtime/helpers/pluginProvider.d.ts +10 -0
- package/dist/runtime/helpers/pluginProvider.js +33 -0
- package/dist/runtime/helpers/renderCycle.d.ts +1 -0
- package/dist/runtime/helpers/renderCycle.js +10 -0
- package/dist/runtime/helpers/runtimeHelpers/index.js +14 -11
- package/dist/runtime/helpers/selectionProvider.d.ts +16 -0
- package/dist/runtime/helpers/selectionProvider.js +47 -35
- package/dist/runtime/helpers/stateProvider.d.ts +7 -2
- package/dist/runtime/helpers/stateProvider.js +89 -14
- package/dist/runtime/helpers/storageProvider.d.ts +4 -3
- package/dist/runtime/helpers/storageProvider.js +56 -3
- package/dist/runtime/helpers/symbols.d.ts +1 -0
- package/dist/runtime/helpers/symbols.js +1 -0
- package/dist/runtime/helpers/textProvider.js +6 -0
- package/dist/runtime/helpers/themeProvider.d.ts +2 -0
- package/dist/runtime/helpers/themeProvider.js +4 -1
- package/dist/runtime/helpers/transform.js +1 -3
- package/dist/runtime/helpers/uiProvider.d.ts +9 -2
- package/dist/runtime/helpers/uiProvider.js +72 -47
- package/dist/runtime/helpers/useTransitionedValue.d.ts +18 -0
- package/dist/runtime/helpers/useTransitionedValue.js +57 -0
- package/dist/runtime/icons/anchor.svg +1 -0
- package/dist/runtime/icons/arrow-left.svg +1 -1
- package/dist/runtime/icons/arrow-right.svg +1 -1
- package/dist/runtime/icons/arrow-top-right.svg +1 -0
- package/dist/runtime/icons/calendar-clock.svg +1 -0
- package/dist/runtime/icons/chart.svg +1 -0
- package/dist/runtime/icons/copy.svg +1 -0
- package/dist/runtime/icons/cursor-move.svg +1 -1
- package/dist/runtime/icons/diff.svg +1 -1
- package/dist/runtime/icons/eye-off.svg +1 -0
- package/dist/runtime/icons/eye.svg +1 -1
- package/dist/runtime/icons/info.svg +1 -1
- package/dist/runtime/icons/link.svg +1 -0
- package/dist/runtime/icons/speedometer.svg +1 -0
- package/dist/runtime/types/blokkOptions.d.ts +8 -0
- package/dist/runtime/types/index.d.ts +172 -6
- package/dist/runtime/types/theme.d.ts +2 -1
- package/dist/shared/{editor.gz_ac6uT.d.mts → editor.CKsrTpc1.d.mts} +1 -1
- package/package.json +20 -5
- package/dist/runtime/components/Edit/Features/FieldAreas/Overlay/index.vue +0 -22
- package/dist/runtime/components/Edit/Features/FieldAreas/index.vue +0 -41
- /package/dist/runtime/components/Edit/Features/{FieldAreas/Overlay → Analyze}/index.vue.d.ts +0 -0
- /package/dist/runtime/components/Edit/Features/{FieldAreas/index.vue.d.ts → Anchors/Renderer.vue.d.ts} +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<Teleport to="#bk-blokkli-item-actions-controls">
|
|
3
3
|
<OptionsForm
|
|
4
|
-
v-if="
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
:
|
|
4
|
+
v-if="
|
|
5
|
+
definition && !selection.isDragging.value && !ui.isAnimating.value && uuids
|
|
6
|
+
"
|
|
7
|
+
:key="key + state.refreshKey.value + ui.isAnimating.value"
|
|
8
|
+
:uuids
|
|
9
|
+
:definition
|
|
8
10
|
/>
|
|
9
11
|
</Teleport>
|
|
10
12
|
</template>
|
|
@@ -20,9 +22,31 @@ defineBlokkliFeature({
|
|
|
20
22
|
description: "Renders the options form for one or more blocks.",
|
|
21
23
|
requiredAdapterMethods: ["updateOptions"]
|
|
22
24
|
});
|
|
23
|
-
const { selection, state, ui, definitions } = useBlokkli();
|
|
24
|
-
const uuids = computed(() =>
|
|
25
|
+
const { selection, state, ui, definitions, context } = useBlokkli();
|
|
26
|
+
const uuids = computed(() => {
|
|
27
|
+
const uuids2 = selection.blocks.value.map((v) => v.uuid);
|
|
28
|
+
if (uuids2.length) {
|
|
29
|
+
return uuids2;
|
|
30
|
+
} else if (selection.hasHostSelected.value) {
|
|
31
|
+
return "provider";
|
|
32
|
+
}
|
|
33
|
+
return null;
|
|
34
|
+
});
|
|
35
|
+
const key = computed(() => {
|
|
36
|
+
if (typeof uuids.value === "string") {
|
|
37
|
+
return uuids.value;
|
|
38
|
+
} else if (uuids.value && typeof uuids.value === "object") {
|
|
39
|
+
return uuids.value.join("-");
|
|
40
|
+
}
|
|
41
|
+
return "none";
|
|
42
|
+
});
|
|
25
43
|
const definition = computed(() => {
|
|
44
|
+
if (uuids.value === "provider") {
|
|
45
|
+
return definitions.getProviderDefinition(
|
|
46
|
+
context.value.entityType,
|
|
47
|
+
context.value.entityBundle
|
|
48
|
+
);
|
|
49
|
+
}
|
|
26
50
|
const bundles = selection.blocks.value.map((v) => v.reusableBundle || v.itemBundle).filter(onlyUnique);
|
|
27
51
|
if (bundles.length !== 1) {
|
|
28
52
|
return;
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
/>
|
|
17
17
|
|
|
18
18
|
<Teleport to="body">
|
|
19
|
-
<
|
|
19
|
+
<BlokkliTransition name="slide-up">
|
|
20
20
|
<DialogModal
|
|
21
21
|
v-if="qrCodeVisible"
|
|
22
22
|
:title="$t('previewDialogTitle', 'Preview with smartphone')"
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
>
|
|
36
36
|
<QrCode v-if="previewGrantUrl" :url="previewGrantUrl" />
|
|
37
37
|
</DialogModal>
|
|
38
|
-
</
|
|
38
|
+
</BlokkliTransition>
|
|
39
39
|
</Teleport>
|
|
40
40
|
</template>
|
|
41
41
|
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
import { ref, watch, useBlokkli, defineBlokkliFeature } from "#imports";
|
|
44
44
|
import { PluginToolbarButton } from "#blokkli/plugins";
|
|
45
45
|
import QrCode from "./QrCode/index.vue";
|
|
46
|
-
import { DialogModal } from "#blokkli/components";
|
|
46
|
+
import { DialogModal, BlokkliTransition } from "#blokkli/components";
|
|
47
47
|
const { adapter } = defineBlokkliFeature({
|
|
48
48
|
id: "preview-grant",
|
|
49
49
|
label: "Preview Grant",
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
<tr
|
|
3
3
|
:class="{
|
|
4
4
|
'bk-is-success': isSuccess,
|
|
5
|
-
'bk-is-error': isError
|
|
5
|
+
'bk-is-error': isError,
|
|
6
|
+
'bk-is-warning': isScheduled && isSelected && !isSuccess
|
|
6
7
|
}"
|
|
7
8
|
>
|
|
8
9
|
<td>
|
|
@@ -24,7 +25,9 @@
|
|
|
24
25
|
{{ bundleLabel }}
|
|
25
26
|
</div>
|
|
26
27
|
</div>
|
|
27
|
-
<div v-if="isCurrent" class="bk-pill">
|
|
28
|
+
<div v-if="isCurrent" class="bk-pill">
|
|
29
|
+
{{ $t("publishCurrentPage", "Current page") }}
|
|
30
|
+
</div>
|
|
28
31
|
</label>
|
|
29
32
|
</td>
|
|
30
33
|
<td>
|
|
@@ -36,7 +39,8 @@
|
|
|
36
39
|
<span
|
|
37
40
|
class="bk-status-indicator"
|
|
38
41
|
:class="{
|
|
39
|
-
'bk-is-success': newStatus.status
|
|
42
|
+
'bk-is-success': newStatus.status === true,
|
|
43
|
+
'bk-is-warning': newStatus.status === 'scheduled'
|
|
40
44
|
}"
|
|
41
45
|
/>
|
|
42
46
|
</div>
|
|
@@ -55,7 +59,8 @@
|
|
|
55
59
|
<span
|
|
56
60
|
class="bk-status-indicator"
|
|
57
61
|
:class="{
|
|
58
|
-
'bk-is-success': newStatus.status
|
|
62
|
+
'bk-is-success': newStatus.status === true,
|
|
63
|
+
'bk-is-warning': newStatus.status === 'scheduled'
|
|
59
64
|
}"
|
|
60
65
|
/>
|
|
61
66
|
</template>
|
|
@@ -65,8 +70,9 @@
|
|
|
65
70
|
</template>
|
|
66
71
|
|
|
67
72
|
<script setup>
|
|
68
|
-
import { computed } from "#imports";
|
|
73
|
+
import { computed, useBlokkli } from "#imports";
|
|
69
74
|
import { Icon } from "#blokkli/components";
|
|
75
|
+
const { $t } = useBlokkli();
|
|
70
76
|
const props = defineProps({
|
|
71
77
|
hostEntityType: { type: String, required: true },
|
|
72
78
|
hostEntityUuid: { type: String, required: true },
|
|
@@ -76,7 +82,9 @@ const props = defineProps({
|
|
|
76
82
|
isCurrent: { type: Boolean, required: true },
|
|
77
83
|
shouldPublish: { type: Boolean, required: true },
|
|
78
84
|
isMutating: { type: Boolean, required: true },
|
|
79
|
-
mutationStatus: { type: Object, required: false }
|
|
85
|
+
mutationStatus: { type: Object, required: false },
|
|
86
|
+
isScheduled: { type: Boolean, required: true },
|
|
87
|
+
scheduleDate: { type: String, required: true }
|
|
80
88
|
});
|
|
81
89
|
const modelValue = defineModel({ type: Array, ...{
|
|
82
90
|
default: () => {
|
|
@@ -92,10 +100,12 @@ const isError = computed(
|
|
|
92
100
|
);
|
|
93
101
|
const mutationStatusLabel = computed(() => {
|
|
94
102
|
if (isSuccess.value) {
|
|
95
|
-
if (props.
|
|
96
|
-
return "
|
|
103
|
+
if (props.isScheduled) {
|
|
104
|
+
return $t("publishPublicationScheduled", "Publication scheduled");
|
|
105
|
+
} else if (props.entity.status && props.shouldPublish) {
|
|
106
|
+
return $t("publishSuccessfullyPublished", "Successfully published");
|
|
97
107
|
} else {
|
|
98
|
-
return "
|
|
108
|
+
return $t("publishSuccessfullySaved", "Successfully saved");
|
|
99
109
|
}
|
|
100
110
|
}
|
|
101
111
|
return null;
|
|
@@ -104,14 +114,31 @@ const isCurrentlyPublished = computed(() => props.entity.status);
|
|
|
104
114
|
const title = computed(() => props.entity.label);
|
|
105
115
|
const bundleLabel = computed(() => props.entity.bundleLabel);
|
|
106
116
|
const newStatus = computed(() => {
|
|
107
|
-
if (isSelected.value &&
|
|
108
|
-
return {
|
|
117
|
+
if (isSelected.value && props.isScheduled) {
|
|
118
|
+
return {
|
|
119
|
+
label: $t("publishWillBeScheduled", "Will be scheduled"),
|
|
120
|
+
status: "scheduled"
|
|
121
|
+
};
|
|
122
|
+
} else if (isSelected.value && isCurrentlyPublished.value && !props.shouldPublish) {
|
|
123
|
+
return {
|
|
124
|
+
label: $t("publishRemainsPublished", "Remains published"),
|
|
125
|
+
status: true
|
|
126
|
+
};
|
|
109
127
|
} else if (isSelected.value && !isCurrentlyPublished.value && props.shouldPublish) {
|
|
110
|
-
return {
|
|
128
|
+
return {
|
|
129
|
+
label: $t("publishWillBePublished", "Will be published"),
|
|
130
|
+
status: true
|
|
131
|
+
};
|
|
111
132
|
} else if (isSelected.value && isCurrentlyPublished.value) {
|
|
112
|
-
return {
|
|
133
|
+
return {
|
|
134
|
+
label: $t("publishRemainsPublished", "Remains published"),
|
|
135
|
+
status: true
|
|
136
|
+
};
|
|
113
137
|
} else if (isSelected.value && !isCurrentlyPublished.value) {
|
|
114
|
-
return {
|
|
138
|
+
return {
|
|
139
|
+
label: $t("publishRemainsUnpublished", "Remains unpublished"),
|
|
140
|
+
status: false
|
|
141
|
+
};
|
|
115
142
|
}
|
|
116
143
|
return { label: "", status: false };
|
|
117
144
|
});
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<label
|
|
3
|
+
class="bk-publish-option"
|
|
4
|
+
:class="[
|
|
5
|
+
'bk-is-' + color,
|
|
6
|
+
{
|
|
7
|
+
'bk-is-disabled': disabled
|
|
8
|
+
}
|
|
9
|
+
]"
|
|
10
|
+
>
|
|
11
|
+
<input
|
|
12
|
+
v-model="value"
|
|
13
|
+
type="radio"
|
|
14
|
+
:value="id"
|
|
15
|
+
required
|
|
16
|
+
name="publish-mode"
|
|
17
|
+
:disabled
|
|
18
|
+
/>
|
|
19
|
+
<div class="bk-publish-option-icon">
|
|
20
|
+
<Icon :name="icon" />
|
|
21
|
+
<div class="bk-publish-option-icon-check">
|
|
22
|
+
<Icon name="check" />
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
<div>
|
|
26
|
+
<div class="bk-publish-option-label">
|
|
27
|
+
{{ label }}
|
|
28
|
+
</div>
|
|
29
|
+
<div class="bk-publish-option-description">
|
|
30
|
+
{{ description }}
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</label>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script setup>
|
|
37
|
+
import { Icon } from "#blokkli/components";
|
|
38
|
+
defineProps({
|
|
39
|
+
id: { type: String, required: true },
|
|
40
|
+
label: { type: String, required: true },
|
|
41
|
+
description: { type: String, required: true },
|
|
42
|
+
icon: { type: null, required: true },
|
|
43
|
+
color: { type: String, required: true },
|
|
44
|
+
disabled: { type: Boolean, required: false }
|
|
45
|
+
});
|
|
46
|
+
const value = defineModel({ type: String });
|
|
47
|
+
</script>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { BlokkliIcon } from '#blokkli-build/icons';
|
|
2
|
+
export type PublishOptionProps = {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
description: string;
|
|
6
|
+
icon: BlokkliIcon;
|
|
7
|
+
color: 'lime' | 'yellow' | 'red';
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_Props = PublishOptionProps;
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
};
|
|
14
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
16
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
17
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
18
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-schedule-date">
|
|
3
|
+
<div class="bk-schedule-date-picker">
|
|
4
|
+
<FormDatepicker
|
|
5
|
+
v-model="selectedDate"
|
|
6
|
+
:min="minDate"
|
|
7
|
+
:disabled="disabled"
|
|
8
|
+
:error="!!error"
|
|
9
|
+
/>
|
|
10
|
+
</div>
|
|
11
|
+
<div v-if="selectedDate" class="bk-schedule-date-time">
|
|
12
|
+
<div v-if="formattedDateTime" class="bk-schedule-date-formatted">
|
|
13
|
+
{{ formattedDateTime }}
|
|
14
|
+
</div>
|
|
15
|
+
<div class="bk-schedule-date-time-input">
|
|
16
|
+
<input
|
|
17
|
+
id="schedule-time"
|
|
18
|
+
v-model="selectedTime"
|
|
19
|
+
type="time"
|
|
20
|
+
class="bk-form-input"
|
|
21
|
+
:disabled="disabled"
|
|
22
|
+
:class="{
|
|
23
|
+
'bk-is-invalid': error
|
|
24
|
+
}"
|
|
25
|
+
/>
|
|
26
|
+
<button
|
|
27
|
+
type="button"
|
|
28
|
+
class="bk-button bk-schedule-date-time-button bk-is-icon-only"
|
|
29
|
+
:disabled="disabled"
|
|
30
|
+
@click="decrementHour"
|
|
31
|
+
>
|
|
32
|
+
<Icon name="minus" />
|
|
33
|
+
</button>
|
|
34
|
+
<button
|
|
35
|
+
type="button"
|
|
36
|
+
class="bk-button bk-schedule-date-time-button bk-is-icon-only"
|
|
37
|
+
:disabled="disabled"
|
|
38
|
+
@click="incrementHour"
|
|
39
|
+
>
|
|
40
|
+
<Icon name="plus" />
|
|
41
|
+
</button>
|
|
42
|
+
</div>
|
|
43
|
+
|
|
44
|
+
<div class="bk-schedule-date-presets">
|
|
45
|
+
<button
|
|
46
|
+
type="button"
|
|
47
|
+
class="bk-button bk-is-small"
|
|
48
|
+
:disabled="disabled"
|
|
49
|
+
@click="setTomorrow"
|
|
50
|
+
>
|
|
51
|
+
{{ $t("publishScheduleTomorrow", "Tomorrow") }}
|
|
52
|
+
</button>
|
|
53
|
+
<button
|
|
54
|
+
type="button"
|
|
55
|
+
class="bk-button bk-is-small"
|
|
56
|
+
:disabled="disabled"
|
|
57
|
+
@click="setInSevenDays"
|
|
58
|
+
>
|
|
59
|
+
{{ $t("publishScheduleInSevenDays", "In 7 days") }}
|
|
60
|
+
</button>
|
|
61
|
+
<button
|
|
62
|
+
type="button"
|
|
63
|
+
class="bk-button bk-is-small"
|
|
64
|
+
:disabled="disabled"
|
|
65
|
+
@click="setNextMonday"
|
|
66
|
+
>
|
|
67
|
+
{{ $t("publishScheduleNextMonday", "Next Monday") }}
|
|
68
|
+
</button>
|
|
69
|
+
</div>
|
|
70
|
+
<div
|
|
71
|
+
class="bk-schedule-date-info"
|
|
72
|
+
v-text="
|
|
73
|
+
$t(
|
|
74
|
+
'publishScheduledInfo',
|
|
75
|
+
'You can still make changes until the scheduled publication date.'
|
|
76
|
+
)
|
|
77
|
+
"
|
|
78
|
+
/>
|
|
79
|
+
<div v-if="error" class="bk-schedule-date-error">
|
|
80
|
+
{{ error }}
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
|
|
86
|
+
<script setup>
|
|
87
|
+
import { ref, computed, watch, useBlokkli } from "#imports";
|
|
88
|
+
import { FormDatepicker, Icon } from "#blokkli/components";
|
|
89
|
+
const { $t, ui } = useBlokkli();
|
|
90
|
+
defineProps({
|
|
91
|
+
disabled: { type: Boolean, required: false },
|
|
92
|
+
error: { type: String, required: false }
|
|
93
|
+
});
|
|
94
|
+
const modelValue = defineModel({ type: String });
|
|
95
|
+
const selectedDate = ref("");
|
|
96
|
+
const selectedTime = ref("12:00");
|
|
97
|
+
const formattedDateTime = computed(() => {
|
|
98
|
+
if (!selectedDate.value || !selectedTime.value) {
|
|
99
|
+
return "";
|
|
100
|
+
}
|
|
101
|
+
const dateTimeString = `${selectedDate.value}T${selectedTime.value}:00`;
|
|
102
|
+
const date = new Date(dateTimeString);
|
|
103
|
+
return ui.formatDate(date, {
|
|
104
|
+
weekday: "long",
|
|
105
|
+
year: "numeric",
|
|
106
|
+
month: "long",
|
|
107
|
+
day: "numeric",
|
|
108
|
+
hour: "2-digit",
|
|
109
|
+
minute: "2-digit"
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
if (modelValue.value) {
|
|
113
|
+
const date = new Date(modelValue.value);
|
|
114
|
+
selectedDate.value = formatDate(date);
|
|
115
|
+
selectedTime.value = formatTime(date);
|
|
116
|
+
}
|
|
117
|
+
const minDate = computed(() => {
|
|
118
|
+
const today = /* @__PURE__ */ new Date();
|
|
119
|
+
return formatDate(today);
|
|
120
|
+
});
|
|
121
|
+
function formatDate(date) {
|
|
122
|
+
const year = date.getFullYear();
|
|
123
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
124
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
125
|
+
return `${year}-${month}-${day}`;
|
|
126
|
+
}
|
|
127
|
+
function formatTime(date) {
|
|
128
|
+
const hours = String(date.getHours()).padStart(2, "0");
|
|
129
|
+
const minutes = String(date.getMinutes()).padStart(2, "0");
|
|
130
|
+
return `${hours}:${minutes}`;
|
|
131
|
+
}
|
|
132
|
+
watch([selectedDate, selectedTime], () => {
|
|
133
|
+
if (!selectedDate.value) {
|
|
134
|
+
modelValue.value = void 0;
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
const dateTimeString = `${selectedDate.value}T${selectedTime.value}:00`;
|
|
138
|
+
const date = new Date(dateTimeString);
|
|
139
|
+
modelValue.value = date.toISOString();
|
|
140
|
+
});
|
|
141
|
+
watch(modelValue, (newValue) => {
|
|
142
|
+
if (!newValue) {
|
|
143
|
+
selectedDate.value = "";
|
|
144
|
+
selectedTime.value = "12:00";
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const date = new Date(newValue);
|
|
148
|
+
const newDate = formatDate(date);
|
|
149
|
+
const newTime = formatTime(date);
|
|
150
|
+
if (newDate !== selectedDate.value || newTime !== selectedTime.value) {
|
|
151
|
+
selectedDate.value = newDate;
|
|
152
|
+
selectedTime.value = newTime;
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
function setTomorrow() {
|
|
156
|
+
const tomorrow = /* @__PURE__ */ new Date();
|
|
157
|
+
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
158
|
+
selectedDate.value = formatDate(tomorrow);
|
|
159
|
+
}
|
|
160
|
+
function setInSevenDays() {
|
|
161
|
+
const date = /* @__PURE__ */ new Date();
|
|
162
|
+
date.setDate(date.getDate() + 7);
|
|
163
|
+
selectedDate.value = formatDate(date);
|
|
164
|
+
}
|
|
165
|
+
function setNextMonday() {
|
|
166
|
+
const today = /* @__PURE__ */ new Date();
|
|
167
|
+
const dayOfWeek = today.getDay();
|
|
168
|
+
const daysUntilMonday = dayOfWeek === 0 ? 1 : 8 - dayOfWeek;
|
|
169
|
+
const nextMonday = /* @__PURE__ */ new Date();
|
|
170
|
+
nextMonday.setDate(today.getDate() + daysUntilMonday);
|
|
171
|
+
selectedDate.value = formatDate(nextMonday);
|
|
172
|
+
}
|
|
173
|
+
function incrementHour() {
|
|
174
|
+
const [hours = 0, minutes = 0] = selectedTime.value.split(":").map(Number);
|
|
175
|
+
const newHours = (hours + 1) % 24;
|
|
176
|
+
selectedTime.value = `${String(newHours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
|
|
177
|
+
}
|
|
178
|
+
function decrementHour() {
|
|
179
|
+
const [hours = 0, minutes = 0] = selectedTime.value.split(":").map(Number);
|
|
180
|
+
const newHours = hours === 0 ? 23 : hours - 1;
|
|
181
|
+
selectedTime.value = `${String(newHours).padStart(2, "0")}:${String(minutes).padStart(2, "0")}`;
|
|
182
|
+
}
|
|
183
|
+
</script>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
disabled?: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_PublicProps = __VLS_Props & {
|
|
6
|
+
modelValue?: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (value: string | undefined) => any;
|
|
10
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
11
|
+
"onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
|
|
12
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
export default _default;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="bk-publish-summary">
|
|
3
|
+
<!-- Current State -->
|
|
4
|
+
<div class="bk-publish-summary-state">
|
|
5
|
+
<div class="bk-publish-summary-state-icon" :class="currentStateClass">
|
|
6
|
+
<Icon :name="currentStateIcon" />
|
|
7
|
+
</div>
|
|
8
|
+
<div class="bk-publish-summary-state-label">
|
|
9
|
+
{{ currentStateLabel }}
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<!-- Arrow -->
|
|
14
|
+
<div class="bk-publish-summary-arrow">
|
|
15
|
+
<Icon name="arrow-right" />
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<!-- Action -->
|
|
19
|
+
<div class="bk-publish-summary-action">
|
|
20
|
+
<div class="bk-publish-summary-action-icon" :class="actionClass">
|
|
21
|
+
<Icon :name="actionIcon" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="bk-publish-summary-action-label">
|
|
24
|
+
{{ actionLabel }}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
<!-- Arrow -->
|
|
29
|
+
<div class="bk-publish-summary-arrow">
|
|
30
|
+
<Icon name="arrow-right" />
|
|
31
|
+
</div>
|
|
32
|
+
|
|
33
|
+
<!-- Result State -->
|
|
34
|
+
<div class="bk-publish-summary-state">
|
|
35
|
+
<div class="bk-publish-summary-state-icon" :class="resultStateClass">
|
|
36
|
+
<Icon :name="resultStateIcon" />
|
|
37
|
+
</div>
|
|
38
|
+
<div class="bk-publish-summary-state-label">
|
|
39
|
+
{{ resultStateLabel }}
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script setup>
|
|
46
|
+
import { computed } from "#imports";
|
|
47
|
+
import { Icon } from "#blokkli/components";
|
|
48
|
+
const props = defineProps({
|
|
49
|
+
isPublished: { type: Boolean, required: true },
|
|
50
|
+
mode: { type: String, required: true },
|
|
51
|
+
currentStateLabel: { type: String, required: true },
|
|
52
|
+
actionLabel: { type: String, required: true },
|
|
53
|
+
resultStateLabel: { type: String, required: true }
|
|
54
|
+
});
|
|
55
|
+
const currentStateIcon = computed(
|
|
56
|
+
() => props.isPublished ? "eye" : "eye-off"
|
|
57
|
+
);
|
|
58
|
+
const currentStateClass = computed(
|
|
59
|
+
() => props.isPublished ? "bk-is-published" : "bk-is-unpublished"
|
|
60
|
+
);
|
|
61
|
+
const resultStateIcon = computed(() => {
|
|
62
|
+
if (props.mode === "save") {
|
|
63
|
+
return "eye-off";
|
|
64
|
+
}
|
|
65
|
+
return "eye";
|
|
66
|
+
});
|
|
67
|
+
const resultStateClass = computed(() => {
|
|
68
|
+
if (props.mode === "save") {
|
|
69
|
+
return "bk-is-unpublished";
|
|
70
|
+
}
|
|
71
|
+
return "bk-is-published";
|
|
72
|
+
});
|
|
73
|
+
const actionIcon = computed(() => {
|
|
74
|
+
if (props.mode === "save") return "save";
|
|
75
|
+
if (props.mode === "scheduled") return "calendar-clock";
|
|
76
|
+
return "publish";
|
|
77
|
+
});
|
|
78
|
+
const actionClass = computed(() => {
|
|
79
|
+
if (props.mode === "save") return "bk-is-save";
|
|
80
|
+
if (props.mode === "scheduled") return "bk-is-scheduled";
|
|
81
|
+
return "bk-is-publish";
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
isPublished: boolean;
|
|
3
|
+
mode: 'immediate' | 'scheduled' | 'save';
|
|
4
|
+
currentStateLabel: string;
|
|
5
|
+
actionLabel: string;
|
|
6
|
+
resultStateLabel: string;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
export default _default;
|