@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,116 +1,272 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<DialogModal
|
|
3
3
|
:title="$t('publishDialogTitle', 'Publish changes')"
|
|
4
|
-
:width="
|
|
4
|
+
:width="900"
|
|
5
5
|
:submit-label
|
|
6
6
|
:is-loading="isLoading"
|
|
7
|
-
:can-submit="
|
|
7
|
+
:can-submit="canSubmit"
|
|
8
8
|
class="bk-is-publish-dialog"
|
|
9
9
|
@submit="onSubmit"
|
|
10
10
|
@cancel="$emit('close')"
|
|
11
11
|
>
|
|
12
12
|
<div class="bk bk-form bk-dialog-publish-form">
|
|
13
|
-
<
|
|
14
|
-
<
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
<FormItem>
|
|
14
|
+
<div class="bk-form-label">
|
|
15
|
+
{{ $t("publishMode", "Publish mode")
|
|
16
|
+
}}<span class="bk-required-indicator">*</span>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="bk-publish-options">
|
|
19
|
+
<PublishOption
|
|
20
|
+
v-for="option in publishModeOptions"
|
|
21
|
+
:id="option.id"
|
|
22
|
+
:key="option.id"
|
|
23
|
+
v-model="publishMode"
|
|
24
|
+
:icon="option.icon"
|
|
25
|
+
:color="option.color"
|
|
26
|
+
:label="option.label"
|
|
27
|
+
:description="option.description"
|
|
28
|
+
:disabled="option.disabled"
|
|
20
29
|
/>
|
|
21
|
-
</
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
</div>
|
|
31
|
+
</FormItem>
|
|
32
|
+
|
|
33
|
+
<FormItem v-if="publishMode === 'scheduled'">
|
|
34
|
+
<div>
|
|
35
|
+
<label class="bk-form-label">
|
|
36
|
+
{{ $t("publishScheduleDate", "Publication date") }}
|
|
37
|
+
</label>
|
|
38
|
+
<div class="bk-publish-schedule-date-wrapper">
|
|
39
|
+
<div v-if="isAlreadyScheduled" class="bk-publish-scheduled-display">
|
|
40
|
+
{{
|
|
41
|
+
ui.formatDate(scheduleDate, {
|
|
42
|
+
weekday: "long",
|
|
43
|
+
year: "numeric",
|
|
44
|
+
month: "2-digit",
|
|
45
|
+
day: "2-digit",
|
|
46
|
+
hour: "2-digit",
|
|
47
|
+
minute: "2-digit"
|
|
48
|
+
})
|
|
49
|
+
}}
|
|
50
|
+
</div>
|
|
51
|
+
<ScheduleDate
|
|
52
|
+
v-else
|
|
53
|
+
v-model="scheduleDate"
|
|
54
|
+
:disabled="isLoading"
|
|
55
|
+
:error="scheduleDateError"
|
|
56
|
+
/>
|
|
57
|
+
<button
|
|
58
|
+
v-if="isAlreadyScheduled"
|
|
59
|
+
type="button"
|
|
60
|
+
class="bk-button bk-is-danger"
|
|
61
|
+
@click="removeScheduledDate"
|
|
62
|
+
>
|
|
63
|
+
{{ $t("publishRemoveSchedule", "Remove schedule") }}
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
<div v-if="isAlreadyScheduled" class="bk-form-description">
|
|
67
|
+
{{
|
|
68
|
+
$t(
|
|
69
|
+
"publishAlreadyScheduledDescription",
|
|
70
|
+
"This page is already scheduled for publishing"
|
|
71
|
+
)
|
|
72
|
+
}}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</FormItem>
|
|
76
|
+
|
|
77
|
+
<FormItem v-if="publishOptions?.hasRevisionLogMessage">
|
|
78
|
+
<FormTextarea
|
|
79
|
+
id="revision-message"
|
|
80
|
+
v-model="revisionMessage"
|
|
81
|
+
:label="$t('publishRevisionLogMessage', 'Revision log message')"
|
|
82
|
+
:description="
|
|
83
|
+
$t(
|
|
84
|
+
'publishRevisionLogMessageDescription',
|
|
85
|
+
'Briefly describe the changes made'
|
|
86
|
+
)
|
|
87
|
+
"
|
|
88
|
+
:disabled="isLoading || isAlreadyScheduled"
|
|
89
|
+
rows="2"
|
|
90
|
+
/>
|
|
91
|
+
</FormItem>
|
|
30
92
|
|
|
31
|
-
<
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
93
|
+
<FormItem v-if="successItems.length && showTable">
|
|
94
|
+
<h2 class="bk-heading-2">
|
|
95
|
+
{{ $t("publishSuccessfullyPublished", "Successfully published") }}
|
|
96
|
+
</h2>
|
|
35
97
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
98
|
+
<table class="bk-table bk-publish-dialog-table">
|
|
99
|
+
<thead>
|
|
100
|
+
<tr>
|
|
101
|
+
<th>{{ $t("publishName", "Name") }}</th>
|
|
102
|
+
<th colspan="2">{{ $t("publishStatus", "Status") }}</th>
|
|
103
|
+
</tr>
|
|
104
|
+
</thead>
|
|
43
105
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
</
|
|
106
|
+
<tbody>
|
|
107
|
+
<Item
|
|
108
|
+
v-for="item in successItems"
|
|
109
|
+
:key="'success' + item.id"
|
|
110
|
+
v-bind="item"
|
|
111
|
+
v-model="states"
|
|
112
|
+
:is-current="item.id === currentId"
|
|
113
|
+
:should-publish
|
|
114
|
+
:is-mutating
|
|
115
|
+
:mutation-status="mutationStatusItems[item.id]"
|
|
116
|
+
:is-scheduled="enableScheduling"
|
|
117
|
+
:schedule-date
|
|
118
|
+
/>
|
|
119
|
+
</tbody>
|
|
120
|
+
</table>
|
|
58
121
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
122
|
+
<table class="bk-table bk-publish-dialog-table">
|
|
123
|
+
<thead>
|
|
124
|
+
<tr>
|
|
125
|
+
<th>{{ $t("publishName", "Name") }}</th>
|
|
126
|
+
<th colspan="2">{{ $t("publishStatus", "Status") }}</th>
|
|
127
|
+
</tr>
|
|
128
|
+
</thead>
|
|
66
129
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
130
|
+
<tbody>
|
|
131
|
+
<Item
|
|
132
|
+
v-for="item in toPublishItems"
|
|
133
|
+
:key="'to_publish_' + item.id"
|
|
134
|
+
v-bind="item"
|
|
135
|
+
v-model="states"
|
|
136
|
+
:is-current="item.id === currentId"
|
|
137
|
+
:should-publish
|
|
138
|
+
:is-mutating
|
|
139
|
+
:mutation-status="mutationStatusItems[item.id]"
|
|
140
|
+
:is-scheduled="enableScheduling"
|
|
141
|
+
:schedule-date
|
|
142
|
+
/>
|
|
143
|
+
</tbody>
|
|
144
|
+
</table>
|
|
145
|
+
</FormItem>
|
|
146
|
+
<FormItem class="bk-is-summary">
|
|
147
|
+
<h3 class="bk-form-label">
|
|
148
|
+
{{ $t("publishSummary", "Summary") }}
|
|
149
|
+
</h3>
|
|
150
|
+
<Summary
|
|
151
|
+
:is-published="isCurrentlyPublished"
|
|
152
|
+
:mode="publishMode"
|
|
153
|
+
:current-state-label="currentStateLabel"
|
|
154
|
+
:action-label="actionLabel"
|
|
155
|
+
:result-state-label="resultStateLabel"
|
|
156
|
+
/>
|
|
157
|
+
</FormItem>
|
|
82
158
|
</div>
|
|
83
159
|
</DialogModal>
|
|
84
160
|
</template>
|
|
85
161
|
|
|
86
162
|
<script setup>
|
|
87
|
-
import { ref, computed, useBlokkli, useAsyncData } from "#imports";
|
|
88
163
|
import {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
164
|
+
ref,
|
|
165
|
+
computed,
|
|
166
|
+
watch,
|
|
167
|
+
useBlokkli,
|
|
168
|
+
useAsyncData,
|
|
169
|
+
onMounted,
|
|
170
|
+
onUnmounted
|
|
171
|
+
} from "#imports";
|
|
172
|
+
import { DialogModal, FormTextarea, FormItem } from "#blokkli/components";
|
|
173
|
+
import { emitMessage } from "#blokkli/helpers/eventBus";
|
|
96
174
|
import Item from "./Item.vue";
|
|
97
|
-
|
|
175
|
+
import PublishOption, {} from "./PublishOption.vue";
|
|
176
|
+
import Summary from "./Summary.vue";
|
|
177
|
+
import ScheduleDate from "./ScheduleDate.vue";
|
|
178
|
+
const showTable = false;
|
|
179
|
+
const { adapter, $t, state, context, ui } = useBlokkli();
|
|
98
180
|
const isMutating = ref(false);
|
|
99
181
|
const mutationStatusItems = ref({});
|
|
100
182
|
const publishedIds = ref([]);
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
}
|
|
183
|
+
const states = ref([]);
|
|
184
|
+
const revisionMessage = ref("");
|
|
185
|
+
const currentTimestamp = ref(Date.now());
|
|
186
|
+
let timestampInterval = null;
|
|
187
|
+
onMounted(() => {
|
|
188
|
+
timestampInterval = setInterval(() => {
|
|
189
|
+
currentTimestamp.value = Date.now();
|
|
190
|
+
}, 3e4);
|
|
191
|
+
});
|
|
192
|
+
onUnmounted(() => {
|
|
193
|
+
if (timestampInterval) {
|
|
194
|
+
clearInterval(timestampInterval);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
const publishMode = ref("immediate");
|
|
110
198
|
const emit = defineEmits(["close", "submit"]);
|
|
111
|
-
const {
|
|
199
|
+
const {
|
|
200
|
+
data: publishOptions,
|
|
201
|
+
status,
|
|
202
|
+
refresh
|
|
203
|
+
} = await useAsyncData(() => {
|
|
112
204
|
return adapter.getPublishOptions();
|
|
113
205
|
});
|
|
206
|
+
const canSchedule = computed(() => !!publishOptions.value?.canSchedule);
|
|
207
|
+
const publishOn = computed(
|
|
208
|
+
() => publishOptions.value?.publishOn ?? null
|
|
209
|
+
);
|
|
210
|
+
const isAlreadyScheduled = computed(() => !!publishOn.value);
|
|
211
|
+
const isCurrentlyPublished = computed(() => !!state.entity.value?.status);
|
|
212
|
+
const publishModeOptions = computed(() => {
|
|
213
|
+
const options = [
|
|
214
|
+
{
|
|
215
|
+
id: "save",
|
|
216
|
+
icon: "save",
|
|
217
|
+
color: "red",
|
|
218
|
+
label: $t("publishModeSaveTitle", "Save"),
|
|
219
|
+
description: $t(
|
|
220
|
+
"publishModeSaveDescription",
|
|
221
|
+
"Save changes without publishing"
|
|
222
|
+
),
|
|
223
|
+
disabled: isCurrentlyPublished.value || isAlreadyScheduled.value
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
id: "immediate",
|
|
227
|
+
icon: "publish",
|
|
228
|
+
color: "lime",
|
|
229
|
+
label: $t("publishModeImmediateTitle", "Publish"),
|
|
230
|
+
description: $t(
|
|
231
|
+
"publishModeImmediateDescription",
|
|
232
|
+
"Publish changes immediately"
|
|
233
|
+
),
|
|
234
|
+
disabled: isAlreadyScheduled.value
|
|
235
|
+
}
|
|
236
|
+
];
|
|
237
|
+
if (canSchedule.value) {
|
|
238
|
+
options.push({
|
|
239
|
+
id: "scheduled",
|
|
240
|
+
icon: "calendar-clock",
|
|
241
|
+
color: "yellow",
|
|
242
|
+
label: $t("publishModeScheduledTitle", "Schedule"),
|
|
243
|
+
description: $t(
|
|
244
|
+
"publishModeScheduledDescription",
|
|
245
|
+
"Schedule changes for publishing"
|
|
246
|
+
),
|
|
247
|
+
disabled: false
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
return options;
|
|
251
|
+
});
|
|
252
|
+
const scheduleDate = ref(publishOn.value || "");
|
|
253
|
+
console.log("SET REIVISON LOG MESSAGE");
|
|
254
|
+
if (publishOptions.value?.revisionLogMessage) {
|
|
255
|
+
revisionMessage.value = publishOptions.value.revisionLogMessage;
|
|
256
|
+
}
|
|
257
|
+
if (publishOn.value) {
|
|
258
|
+
publishMode.value = "scheduled";
|
|
259
|
+
}
|
|
260
|
+
watch(publishMode, (newMode) => {
|
|
261
|
+
if (newMode === "scheduled" && !scheduleDate.value) {
|
|
262
|
+
const tomorrow = /* @__PURE__ */ new Date();
|
|
263
|
+
tomorrow.setDate(tomorrow.getDate() + 1);
|
|
264
|
+
tomorrow.setHours(12, 0, 0, 0);
|
|
265
|
+
scheduleDate.value = tomorrow.toISOString();
|
|
266
|
+
}
|
|
267
|
+
});
|
|
268
|
+
const enableScheduling = computed(() => publishMode.value === "scheduled");
|
|
269
|
+
const shouldPublish = computed(() => publishMode.value !== "save");
|
|
114
270
|
const { data: editStates } = await useAsyncData(
|
|
115
271
|
() => {
|
|
116
272
|
if (adapter.getEditStates) {
|
|
@@ -166,39 +322,127 @@ const selectedToPublishItems = computed(
|
|
|
166
322
|
)
|
|
167
323
|
);
|
|
168
324
|
const isLoading = computed(() => status.value === "pending" || isMutating.value);
|
|
169
|
-
const
|
|
170
|
-
if (
|
|
171
|
-
|
|
172
|
-
|
|
325
|
+
const scheduleDateError = computed(() => {
|
|
326
|
+
if (publishMode.value !== "scheduled" || !scheduleDate.value) {
|
|
327
|
+
return "";
|
|
328
|
+
}
|
|
329
|
+
const selectedDateTime = new Date(scheduleDate.value);
|
|
330
|
+
const minDateTime = new Date(currentTimestamp.value + 2 * 60 * 1e3);
|
|
331
|
+
if (selectedDateTime < minDateTime) {
|
|
332
|
+
return $t(
|
|
333
|
+
"publishScheduleDateTooSoon",
|
|
334
|
+
"The scheduled date must be at least 2 minutes in the future"
|
|
335
|
+
);
|
|
336
|
+
}
|
|
337
|
+
return "";
|
|
338
|
+
});
|
|
339
|
+
const canSubmit = computed(() => {
|
|
340
|
+
if (!selectedToPublishItems.value.length) {
|
|
341
|
+
return false;
|
|
342
|
+
}
|
|
343
|
+
if (publishMode.value === "scheduled" && !scheduleDate.value) {
|
|
344
|
+
return false;
|
|
173
345
|
}
|
|
174
|
-
|
|
346
|
+
if (publishMode.value === "scheduled" && isAlreadyScheduled.value) {
|
|
347
|
+
return false;
|
|
348
|
+
}
|
|
349
|
+
if (scheduleDateError.value) {
|
|
350
|
+
return false;
|
|
351
|
+
}
|
|
352
|
+
return true;
|
|
175
353
|
});
|
|
176
|
-
const
|
|
354
|
+
const submitLabel = computed(() => {
|
|
177
355
|
const count = selectedToPublishItems.value.length;
|
|
178
|
-
if (
|
|
179
|
-
if (
|
|
180
|
-
return "
|
|
356
|
+
if (publishMode.value === "scheduled") {
|
|
357
|
+
if (count === 0) {
|
|
358
|
+
return $t("publishSchedulePublication", "Schedule publication");
|
|
181
359
|
}
|
|
182
|
-
return "
|
|
360
|
+
return count === 1 ? $t("publishSchedulePublication", "Schedule publication") : $t(
|
|
361
|
+
"publishSchedulePublications",
|
|
362
|
+
"Schedule @count publications"
|
|
363
|
+
).replace("@count", count.toString());
|
|
183
364
|
}
|
|
184
|
-
if (
|
|
185
|
-
|
|
365
|
+
if (publishMode.value === "save") {
|
|
366
|
+
if (count === 0) {
|
|
367
|
+
return $t("publishSaveContent", "Save content");
|
|
368
|
+
}
|
|
369
|
+
return count === 1 ? $t("publishSaveContent", "Save content") : $t("publishSaveContents", "Save @count contents").replace(
|
|
370
|
+
"@count",
|
|
371
|
+
count.toString()
|
|
372
|
+
);
|
|
373
|
+
}
|
|
374
|
+
if (count === 0) {
|
|
375
|
+
return $t("publishPublishContent", "Publish content");
|
|
186
376
|
}
|
|
187
|
-
return
|
|
377
|
+
return count === 1 ? $t("publishPublishContent", "Publish content") : $t("publishPublishContents", "Publish @count contents").replace(
|
|
378
|
+
"@count",
|
|
379
|
+
count.toString()
|
|
380
|
+
);
|
|
188
381
|
});
|
|
189
|
-
const
|
|
190
|
-
|
|
382
|
+
const currentStateLabel = computed(
|
|
383
|
+
() => isCurrentlyPublished.value ? $t("publishCurrentlyPublished", "Page is published") : $t("publishCurrentlyUnpublished", "Page is unpublished")
|
|
384
|
+
);
|
|
385
|
+
const actionLabel = computed(() => {
|
|
386
|
+
if (publishMode.value === "save") {
|
|
387
|
+
return $t("publishModeSaveTitle", "Save");
|
|
388
|
+
}
|
|
389
|
+
if (publishMode.value === "scheduled") {
|
|
390
|
+
return $t("publishModeScheduledTitle", "Schedule");
|
|
391
|
+
}
|
|
392
|
+
return $t("publishModeImmediateTitle", "Publish");
|
|
191
393
|
});
|
|
192
|
-
const
|
|
193
|
-
if (
|
|
194
|
-
return
|
|
394
|
+
const resultStateLabel = computed(() => {
|
|
395
|
+
if (publishMode.value === "save") {
|
|
396
|
+
return $t(
|
|
397
|
+
"publishResultSaveChanges",
|
|
398
|
+
"Changes are saved, page remains unpublished"
|
|
399
|
+
);
|
|
195
400
|
}
|
|
196
|
-
|
|
401
|
+
if (publishMode.value === "scheduled" && scheduleDate.value) {
|
|
402
|
+
const formattedDate = ui.formatDate(scheduleDate.value);
|
|
403
|
+
return $t(
|
|
404
|
+
"publishResultScheduledChanges",
|
|
405
|
+
"Changes will be published on @date"
|
|
406
|
+
).replace("@date", formattedDate);
|
|
407
|
+
}
|
|
408
|
+
if (isCurrentlyPublished.value) {
|
|
409
|
+
return $t(
|
|
410
|
+
"publishResultPublishChangesRemainPublished",
|
|
411
|
+
"Changes are published, page remains published"
|
|
412
|
+
);
|
|
413
|
+
}
|
|
414
|
+
return $t(
|
|
415
|
+
"publishResultPublishChangesNowPublished",
|
|
416
|
+
"Changes are published, page is now published"
|
|
417
|
+
);
|
|
197
418
|
});
|
|
419
|
+
async function removeScheduledDate() {
|
|
420
|
+
if (!adapter.unscheduleEditState) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
isMutating.value = true;
|
|
424
|
+
const previousScheduleDate = scheduleDate.value;
|
|
425
|
+
const success = await state.mutateWithLoadingState(
|
|
426
|
+
() => adapter.unscheduleEditState({
|
|
427
|
+
hostEntityType: context.value.entityType,
|
|
428
|
+
hostEntityUuid: context.value.entityUuid
|
|
429
|
+
})
|
|
430
|
+
);
|
|
431
|
+
if (success) {
|
|
432
|
+
await refresh();
|
|
433
|
+
scheduleDate.value = previousScheduleDate;
|
|
434
|
+
}
|
|
435
|
+
isMutating.value = false;
|
|
436
|
+
}
|
|
198
437
|
async function onSubmit() {
|
|
438
|
+
currentTimestamp.value = Date.now();
|
|
439
|
+
if (scheduleDateError.value) {
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
199
442
|
isMutating.value = true;
|
|
200
443
|
const items = stateItems.value;
|
|
201
|
-
|
|
444
|
+
const hasAnyError = false;
|
|
445
|
+
let mutationResult = false;
|
|
202
446
|
for (const item of items) {
|
|
203
447
|
const isSelected = states.value.includes(item.id) || item.hostEntityType === context.value.entityType && item.hostEntityUuid === context.value.entityUuid;
|
|
204
448
|
if (!isSelected) {
|
|
@@ -208,30 +452,29 @@ async function onSubmit() {
|
|
|
208
452
|
continue;
|
|
209
453
|
}
|
|
210
454
|
try {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
closeAfterPublish: true,
|
|
215
|
-
revisionLogMessage: revisionMessage.value,
|
|
216
|
-
publishIfUnpublished: shouldPublish.value
|
|
217
|
-
});
|
|
218
|
-
let violations = [];
|
|
219
|
-
if (!result.success && result.state) {
|
|
220
|
-
const mapped = adapter.mapState(result.state);
|
|
221
|
-
if (mapped.mutatedState?.violations) {
|
|
222
|
-
violations = mapped.mutatedState.violations;
|
|
455
|
+
if (publishMode.value === "scheduled") {
|
|
456
|
+
if (!adapter.scheduleEditState) {
|
|
457
|
+
throw new Error("scheduleEditState method not available");
|
|
223
458
|
}
|
|
459
|
+
mutationResult = await state.mutateWithLoadingState(
|
|
460
|
+
() => adapter.scheduleEditState({
|
|
461
|
+
hostEntityType: item.hostEntityType,
|
|
462
|
+
hostEntityUuid: item.hostEntityUuid,
|
|
463
|
+
revisionLogMessage: revisionMessage.value,
|
|
464
|
+
date: scheduleDate.value
|
|
465
|
+
})
|
|
466
|
+
);
|
|
467
|
+
} else {
|
|
468
|
+
mutationResult = await state.mutateWithLoadingState(
|
|
469
|
+
() => adapter.publish({
|
|
470
|
+
hostEntityType: item.hostEntityType,
|
|
471
|
+
hostEntityUuid: item.hostEntityUuid,
|
|
472
|
+
closeAfterPublish: true,
|
|
473
|
+
revisionLogMessage: revisionMessage.value,
|
|
474
|
+
publishIfUnpublished: shouldPublish.value
|
|
475
|
+
})
|
|
476
|
+
);
|
|
224
477
|
}
|
|
225
|
-
mutationStatusItems.value[item.id] = {
|
|
226
|
-
id: item.id,
|
|
227
|
-
success: result.success,
|
|
228
|
-
errors: result.errors,
|
|
229
|
-
violations
|
|
230
|
-
};
|
|
231
|
-
if (result.success) {
|
|
232
|
-
publishedIds.value.push(item.id);
|
|
233
|
-
}
|
|
234
|
-
hasAnyError ||= !result.success;
|
|
235
478
|
} catch {
|
|
236
479
|
mutationStatusItems.value[item.id] = {
|
|
237
480
|
id: item.id,
|
|
@@ -243,9 +486,19 @@ async function onSubmit() {
|
|
|
243
486
|
}
|
|
244
487
|
}
|
|
245
488
|
isMutating.value = false;
|
|
246
|
-
if (hasAnyError) {
|
|
489
|
+
if (hasAnyError || !mutationResult) {
|
|
247
490
|
return;
|
|
248
491
|
}
|
|
249
|
-
|
|
492
|
+
if (publishMode.value === "scheduled") {
|
|
493
|
+
const formattedDate = ui.formatDate(scheduleDate.value);
|
|
494
|
+
const message = $t(
|
|
495
|
+
"publishScheduleSuccess",
|
|
496
|
+
"Publication scheduled for @date"
|
|
497
|
+
).replace("@date", formattedDate);
|
|
498
|
+
emitMessage(message, "success");
|
|
499
|
+
emit("close");
|
|
500
|
+
} else {
|
|
501
|
+
emit("submit");
|
|
502
|
+
}
|
|
250
503
|
}
|
|
251
504
|
</script>
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
'shouldPublish'?: boolean;
|
|
3
|
-
'states'?: string[];
|
|
4
|
-
'revisionMessage'?: string;
|
|
5
|
-
};
|
|
6
|
-
declare const _default: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
7
2
|
close: () => void;
|
|
8
3
|
submit: () => void;
|
|
9
|
-
|
|
10
|
-
"update:states": (value: string[]) => void;
|
|
11
|
-
"update:revisionMessage": (value: string) => void;
|
|
12
|
-
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
4
|
+
}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{
|
|
13
5
|
onClose?: (() => any) | undefined;
|
|
14
6
|
onSubmit?: (() => any) | undefined;
|
|
15
|
-
|
|
16
|
-
"onUpdate:states"?: ((value: string[]) => any) | undefined;
|
|
17
|
-
"onUpdate:revisionMessage"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
19
8
|
export default _default;
|