@raclettejs/workbench 0.1.34 → 0.1.36-canary.0
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/CHANGELOG.md +18 -2
- package/config/compositions.js +18 -0
- package/config/interactionLinks.js +19 -0
- package/i18n/de-DE.json +15 -1
- package/i18n/en-EU.json +52 -1
- package/i18n/sk-SK.json +15 -1
- package/package.json +3 -4
- package/packages.json +3 -1
- package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionConfiguration.vue +96 -14
- package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionIntegration.vue +29 -1
- package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetRenderer.vue +1 -6
- package/plugins/pacifico__compositions/frontend/composables/prefillInteractionLinkFromComposition.ts +54 -0
- package/plugins/pacifico__compositions/frontend/widgets/CompositionCreateWidget.vue +145 -9
- package/plugins/pacifico__compositions/frontend/widgets/CompositionEditWidget.vue +11 -2
- package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +26 -6
- package/plugins/pacifico__core/frontend/generated-config.ts +22 -0
- package/plugins/pacifico__interactionLinks/frontend/components/InteractionLinkConfiguration.vue +3 -65
- package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +1 -1
- package/plugins/pacifico__plugins/frontend/widgets/PluginListWidget.vue +21 -4
- package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +1 -1
- package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +1 -1
- package/plugins/raclette__cache/backend/helpers/cacheEntryBuilder.ts +94 -0
- package/plugins/raclette__cache/backend/helpers/cacheEntrySanitizer.ts +86 -0
- package/plugins/raclette__cache/backend/helpers/valkeyExplorer.ts +89 -0
- package/plugins/raclette__cache/backend/index.ts +21 -0
- package/plugins/raclette__cache/backend/routes/route.cache.cacheEntries.get.ts +118 -0
- package/plugins/raclette__cache/backend/routes/route.cache.cacheEntry.get.ts +91 -0
- package/plugins/raclette__cache/backend/routes.ts +8 -0
- package/plugins/raclette__cache/frontend/components/TableColumnConfigDialog.vue +95 -0
- package/plugins/raclette__cache/frontend/composables/useTableColumnConfig.ts +66 -0
- package/plugins/raclette__cache/frontend/generated-config.ts +33 -0
- package/plugins/raclette__cache/frontend/utils/cacheValueTableRows.ts +340 -0
- package/plugins/raclette__cache/frontend/widgets/CacheListWidget.vue +742 -0
- package/plugins/raclette__cache/raclette.plugin.ts +8 -0
- package/services/frontend/src/app/components/dynamicForm/DynamicForm.vue +3 -1
- package/services/frontend/src/app/components/interactionLink/InteractionLinkBehaviorForm.vue +99 -0
- package/services/frontend/src/app/components/stepNavigator/StepNavigator.vue +175 -24
- package/services/frontend/src/app/components/stepNavigator/StepNavigatorTypes.ts +18 -0
- package/services/frontend/src/app/composables/useInteractionLinkBehaviorFields.ts +83 -0
- package/services/frontend/src/app/composables/useRacletteUserIsAdmin.ts +25 -0
- package/services/frontend/src/orchestrator/assets/styles/themes/dark.ts +1 -0
- package/services/frontend/src/orchestrator/assets/styles/themes/light.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,14 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
### Fixed
|
|
11
11
|
|
|
12
|
+
- WidgetLayout: removed icon as fallback option after image -> only render image or fallback block, never icon in WidgetRenderer
|
|
13
|
+
|
|
14
|
+
### Added
|
|
15
|
+
|
|
16
|
+
- Compositions Create: Now has creation of InteractionLinks included as third step. Order of layout and meta data had been switched for better UX.
|
|
17
|
+
- Plugins List: Edit-symbol indicator for clickable rows; non-clickable rows have default cursor
|
|
18
|
+
- Cache List: a workbench interface to monitor the valkey entries. Edit and delete possibilities will follow soon
|
|
19
|
+
|
|
20
|
+
## [0.1.35] - 2026-05-14 <a href="https://gitlab.com/raclettejs/core-dev/-/compare/v0.1.34...v0.1.35" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
12
21
|
|
|
13
22
|
### Patch Changes
|
|
14
23
|
|
|
24
|
+
- fix: add missing new dark theme color
|
|
15
25
|
- Updated dependencies
|
|
16
|
-
- @raclettejs/core@0.1.
|
|
26
|
+
- @raclettejs/core@0.1.35
|
|
17
27
|
|
|
28
|
+
## [0.1.34] - 2026-05-13 <a href="https://gitlab.com/raclettejs/core-dev/-/compare/v0.1.32...v0.1.34" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
29
|
+
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
- @raclettejs/core@0.1.34
|
|
18
34
|
|
|
19
35
|
- set eslint version to latest
|
|
20
36
|
|
package/config/compositions.js
CHANGED
|
@@ -283,4 +283,22 @@ export default [
|
|
|
283
283
|
],
|
|
284
284
|
],
|
|
285
285
|
},
|
|
286
|
+
{
|
|
287
|
+
_id: "cacheList",
|
|
288
|
+
pathname: {
|
|
289
|
+
default: "cache-list",
|
|
290
|
+
},
|
|
291
|
+
widgetsLayout: [
|
|
292
|
+
[
|
|
293
|
+
{
|
|
294
|
+
column: 12,
|
|
295
|
+
widget: {
|
|
296
|
+
uuid: "cacheList",
|
|
297
|
+
name: "CacheList",
|
|
298
|
+
pluginKey: "raclette__cache",
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
],
|
|
302
|
+
],
|
|
303
|
+
},
|
|
286
304
|
] //satisfies Composition[]
|
|
@@ -181,4 +181,23 @@ export default [
|
|
|
181
181
|
},
|
|
182
182
|
],
|
|
183
183
|
},
|
|
184
|
+
{
|
|
185
|
+
_id: "cacheListInteractionLink",
|
|
186
|
+
composition: compositions[15]._id,
|
|
187
|
+
slotType: "page",
|
|
188
|
+
triggers: [
|
|
189
|
+
{
|
|
190
|
+
type: "page-navigation",
|
|
191
|
+
settings: {
|
|
192
|
+
icon: "mdi-database",
|
|
193
|
+
title: {
|
|
194
|
+
default: "Cache",
|
|
195
|
+
de: "Cache",
|
|
196
|
+
},
|
|
197
|
+
sortOrder: 5,
|
|
198
|
+
navigationBarType: "navItem",
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
],
|
|
202
|
+
},
|
|
184
203
|
] // satisfies Partial<InteractionLink>[]
|
package/i18n/de-DE.json
CHANGED
|
@@ -65,8 +65,22 @@
|
|
|
65
65
|
"widgetLayout": {
|
|
66
66
|
"title": "Widget Layout",
|
|
67
67
|
"subtitle": "Seiteninhalte konfigurieren"
|
|
68
|
+
},
|
|
69
|
+
"integration": {
|
|
70
|
+
"title": "Interaktionslink",
|
|
71
|
+
"subtitle": "Navigationseintrag hinzufügen (optional)"
|
|
68
72
|
}
|
|
69
73
|
},
|
|
74
|
+
"actions": {
|
|
75
|
+
"saveAndContinue": "Speichern und fortfahren",
|
|
76
|
+
"finishWithoutIL": "Ohne Link abschließen",
|
|
77
|
+
"saveIL": "Link speichern"
|
|
78
|
+
},
|
|
79
|
+
"integration": {
|
|
80
|
+
"intro": "Ihre Komposition wurde gespeichert. Sie funktioniert eigenständig, aber Nutzer benötigen einen Interaktionslink, um sie aus der Seitenleiste, dem Menü oder als Modal zu öffnen. Sie können jetzt einen anlegen oder überspringen und später erstellen. Wir haben eine Basis-Konfiguration vorausgefüllt, die Sie frei anpassen oder direkt speichern können.",
|
|
81
|
+
"formTitle": "Interaktionslink zuweisen",
|
|
82
|
+
"linkedCompositionDescription": "Dieser Link öffnet die soeben erstellte Komposition. Die Zuordnung kann hier nicht geändert werden."
|
|
83
|
+
},
|
|
70
84
|
"divider": {
|
|
71
85
|
"general": "Allgemein",
|
|
72
86
|
"navigation": "Navigation",
|
|
@@ -296,4 +310,4 @@
|
|
|
296
310
|
}
|
|
297
311
|
}
|
|
298
312
|
}
|
|
299
|
-
}
|
|
313
|
+
}
|
package/i18n/en-EU.json
CHANGED
|
@@ -65,8 +65,22 @@
|
|
|
65
65
|
"widgetLayout": {
|
|
66
66
|
"title": "Widget Layout",
|
|
67
67
|
"subtitle": "Configure page content"
|
|
68
|
+
},
|
|
69
|
+
"integration": {
|
|
70
|
+
"title": "Interaction Link",
|
|
71
|
+
"subtitle": "Add navigation entry (optional)"
|
|
68
72
|
}
|
|
69
73
|
},
|
|
74
|
+
"actions": {
|
|
75
|
+
"saveAndContinue": "Save and Continue",
|
|
76
|
+
"finishWithoutIL": "Finish without Link",
|
|
77
|
+
"saveIL": "Save Link"
|
|
78
|
+
},
|
|
79
|
+
"integration": {
|
|
80
|
+
"intro": "Your composition is saved. It works on its own, but users need an Interaction Link to open it from the sidebar, menu, or as a modal. You can add one now or skip and create it later. We prefilled a base configuration you can freely edit or directly save.",
|
|
81
|
+
"formTitle": "Assign an Interaction Link",
|
|
82
|
+
"linkedCompositionDescription": "This link will open the composition you just created. It cannot be changed here."
|
|
83
|
+
},
|
|
70
84
|
"divider": {
|
|
71
85
|
"general": "General",
|
|
72
86
|
"navigation": "Navigation",
|
|
@@ -218,6 +232,43 @@
|
|
|
218
232
|
"tagEdit": {
|
|
219
233
|
"title": "Edit Tag"
|
|
220
234
|
},
|
|
235
|
+
"cacheList": {
|
|
236
|
+
"dataName": "Cache entry",
|
|
237
|
+
"dbLabel": "DB",
|
|
238
|
+
"batchSizeLabel": "Fetch batch",
|
|
239
|
+
"dbActive": "DB {db}",
|
|
240
|
+
"patternLabel": "Key pattern",
|
|
241
|
+
"patternPlaceholder": "empty = all keys, grouped",
|
|
242
|
+
"refresh": "Refresh",
|
|
243
|
+
"loadMore": "Load more",
|
|
244
|
+
"truncated": "Truncated",
|
|
245
|
+
"truncatedDetailHint": "Value was truncated for display. Export may not include the full stored value.",
|
|
246
|
+
"detailTtl": "TTL",
|
|
247
|
+
"showingCount": "{shown} of {total}",
|
|
248
|
+
"keyPickerLabel": "Key",
|
|
249
|
+
"backToList": "Back to list",
|
|
250
|
+
"customizeTable": "Configure table",
|
|
251
|
+
"configureColumns": "Configure columns",
|
|
252
|
+
"deselectAll": "Deselect all",
|
|
253
|
+
"done": "Done",
|
|
254
|
+
"valueTableTitle": "Cache value",
|
|
255
|
+
"tableActions": "Actions",
|
|
256
|
+
"openValueTable": "Open value table",
|
|
257
|
+
"openValueTableFor": "Open value table for {key}",
|
|
258
|
+
"tableHeaders": {
|
|
259
|
+
"keyGroup": "Group",
|
|
260
|
+
"key": "Key",
|
|
261
|
+
"ttl": "TTL",
|
|
262
|
+
"value": "Value"
|
|
263
|
+
},
|
|
264
|
+
"valueTableHeaders": {
|
|
265
|
+
"field": "Field",
|
|
266
|
+
"entryKey": "Entry key",
|
|
267
|
+
"value": "Value",
|
|
268
|
+
"index": "Index",
|
|
269
|
+
"raw": "Raw"
|
|
270
|
+
}
|
|
271
|
+
},
|
|
221
272
|
"tagConfiguration": {
|
|
222
273
|
"dividers": {
|
|
223
274
|
"general": "General"
|
|
@@ -296,4 +347,4 @@
|
|
|
296
347
|
}
|
|
297
348
|
}
|
|
298
349
|
}
|
|
299
|
-
}
|
|
350
|
+
}
|
package/i18n/sk-SK.json
CHANGED
|
@@ -65,8 +65,22 @@
|
|
|
65
65
|
"widgetLayout": {
|
|
66
66
|
"title": "Rozloženie widgetov",
|
|
67
67
|
"subtitle": "Nakonfigurujte obsah stránky"
|
|
68
|
+
},
|
|
69
|
+
"integration": {
|
|
70
|
+
"title": "Interakčný odkaz",
|
|
71
|
+
"subtitle": "Pridať položku navigácie (voliteľné)"
|
|
68
72
|
}
|
|
69
73
|
},
|
|
74
|
+
"actions": {
|
|
75
|
+
"saveAndContinue": "Uložiť a pokračovať",
|
|
76
|
+
"finishWithoutIL": "Dokončiť bez odkazu",
|
|
77
|
+
"saveIL": "Uložiť odkaz"
|
|
78
|
+
},
|
|
79
|
+
"integration": {
|
|
80
|
+
"intro": "Vaša kompozícia je uložená. Funguje samostatne, ale používatelia potrebujú interakčný odkaz na otvorenie z bočného panela, menu alebo ako modálne okno. Môžete ho pridať teraz alebo preskočiť a vytvoriť neskôr. Predvyplnili sme základnú konfiguráciu, ktorú môžete voľne upraviť alebo jednoducho uložiť.",
|
|
81
|
+
"formTitle": "Priradiť interakčný odkaz",
|
|
82
|
+
"linkedCompositionDescription": "Tento odkaz otvorí kompozíciu, ktorú ste práve vytvorili. Tu ju nie je možné zmeniť."
|
|
83
|
+
},
|
|
70
84
|
"divider": {
|
|
71
85
|
"general": "Všeobecné",
|
|
72
86
|
"navigation": "Navigácia"
|
|
@@ -291,4 +305,4 @@
|
|
|
291
305
|
}
|
|
292
306
|
}
|
|
293
307
|
}
|
|
294
|
-
}
|
|
308
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raclettejs/workbench",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36-canary.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "racletteJS Workbench - used to configure your application, for dev and prod",
|
|
6
6
|
"repository": "https://gitlab.com/raclettejs/workbench",
|
|
7
7
|
"author": "Pacifico Digital Explorations GmbH",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"scripts": {
|
|
10
|
-
":install": "yarn install",
|
|
11
10
|
"dev": "raclette dev",
|
|
12
11
|
"down": "raclette down",
|
|
13
12
|
"build": "raclette build",
|
|
@@ -34,7 +33,7 @@
|
|
|
34
33
|
".": "./index.ts"
|
|
35
34
|
},
|
|
36
35
|
"dependencies": {
|
|
37
|
-
"@raclettejs/core": "
|
|
36
|
+
"@raclettejs/core": "workspace:",
|
|
38
37
|
"@vueuse/integrations": "14.2.1",
|
|
39
38
|
"fuse.js": "7.1.0",
|
|
40
39
|
"three": "0.183.2",
|
|
@@ -44,7 +43,7 @@
|
|
|
44
43
|
"@emnapi/core": "1.9.2",
|
|
45
44
|
"@emnapi/runtime": "1.9.2",
|
|
46
45
|
"@eslint/js": "9.35.0",
|
|
47
|
-
"@raclettejs/types": "
|
|
46
|
+
"@raclettejs/types": "workspace:",
|
|
48
47
|
"@sinclair/typebox": "0.34.48",
|
|
49
48
|
"@types/ramda": "0.31.1",
|
|
50
49
|
"@vueuse/core": "14.2.1",
|
package/packages.json
CHANGED
|
@@ -3,12 +3,26 @@
|
|
|
3
3
|
ref="stepNavigatorRef"
|
|
4
4
|
:steps
|
|
5
5
|
:is-saving="disabled"
|
|
6
|
+
:allow-free-navigation="!!isEditing"
|
|
6
7
|
:show-save-button="isEditing"
|
|
8
|
+
:show-next-with-save="isEditing"
|
|
9
|
+
:show-finish-on-last-step="isEditing"
|
|
10
|
+
show-exit-back
|
|
11
|
+
exit-back-interaction-link-id="compositionListInteractionLink"
|
|
7
12
|
@save="$emit('save')"
|
|
8
13
|
@save-and-finish="$emit('save-and-finish')"
|
|
14
|
+
@custom-action="$emit('custom-action', $event)"
|
|
9
15
|
>
|
|
10
16
|
<template #default="{ currentStep }">
|
|
11
|
-
<template v-if="currentStep.id === '
|
|
17
|
+
<template v-if="currentStep.id === 'layout'">
|
|
18
|
+
<v-navigation-drawer permanent class="tw:p-2">
|
|
19
|
+
<WidgetList />
|
|
20
|
+
</v-navigation-drawer>
|
|
21
|
+
|
|
22
|
+
<CompositionWidgetsLayout v-model="composition" />
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<template v-else-if="currentStep.id === 'config'">
|
|
12
26
|
<div>
|
|
13
27
|
<!-- @vue-generic {CompositionCreate | CompositionUpdate} -->
|
|
14
28
|
<DynamicForm
|
|
@@ -22,32 +36,36 @@
|
|
|
22
36
|
? $t('workbench.compositionEdit.title')
|
|
23
37
|
: $t('workbench.compositionCreate.title')
|
|
24
38
|
"
|
|
25
|
-
|
|
39
|
+
:hide-title="!isEditing"
|
|
26
40
|
@submit="onDynamicFormSubmit"
|
|
27
41
|
/>
|
|
28
42
|
</div>
|
|
29
43
|
</template>
|
|
30
44
|
|
|
31
|
-
<template v-else-if="currentStep.id === '
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
45
|
+
<template v-else-if="currentStep.id === 'integration' && interactionLink">
|
|
46
|
+
<CompositionIntegration
|
|
47
|
+
ref="integrationRef"
|
|
48
|
+
v-model="interactionLink"
|
|
49
|
+
:disabled
|
|
50
|
+
:linked-composition-title="composition.title"
|
|
51
|
+
/>
|
|
37
52
|
</template>
|
|
38
|
-
|
|
39
|
-
<template v-else-if="currentStep.id === 'integration'"> </template>
|
|
40
53
|
</template>
|
|
41
54
|
</StepNavigator>
|
|
42
55
|
</template>
|
|
43
56
|
|
|
44
57
|
<script setup lang="ts">
|
|
45
|
-
import type {
|
|
58
|
+
import type {
|
|
59
|
+
CompositionCreate,
|
|
60
|
+
CompositionUpdate,
|
|
61
|
+
InteractionLinkCreate,
|
|
62
|
+
} from "@raclettejs/core"
|
|
46
63
|
import DynamicForm from "@app/components/dynamicForm/DynamicForm.vue"
|
|
47
64
|
import type { DynamicFormItem } from "@app/components/dynamicForm/DynamicFormTypes"
|
|
48
65
|
import { useI18n } from "vue-i18n"
|
|
49
66
|
import { computed, ref, useTemplateRef, watch } from "vue"
|
|
50
67
|
import CompositionWidgetsLayout from "./CompositionWidgetsLayout.vue"
|
|
68
|
+
import CompositionIntegration from "./CompositionIntegration.vue"
|
|
51
69
|
import WidgetList from "./widgetsLayout/WidgetList.vue"
|
|
52
70
|
import StepNavigator from "@app/components/stepNavigator/StepNavigator.vue"
|
|
53
71
|
import { Step } from "@app/components/stepNavigator/StepNavigatorTypes"
|
|
@@ -57,14 +75,18 @@ const props = defineProps<{ disabled?: boolean; isEditing?: boolean }>()
|
|
|
57
75
|
defineEmits<{
|
|
58
76
|
(e: "save"): void
|
|
59
77
|
(e: "save-and-finish"): void
|
|
78
|
+
(e: "custom-action", actionId: string): void
|
|
60
79
|
}>()
|
|
61
80
|
|
|
62
81
|
const composition = defineModel<CompositionCreate | CompositionUpdate>({
|
|
63
82
|
required: true,
|
|
64
83
|
})
|
|
65
84
|
|
|
85
|
+
const interactionLink = defineModel<InteractionLinkCreate>("interactionLink")
|
|
86
|
+
|
|
66
87
|
const stepNavigatorRef = useTemplateRef("stepNavigatorRef")
|
|
67
88
|
const dynamicFormRef = useTemplateRef("dynamicFormRef")
|
|
89
|
+
const integrationRef = useTemplateRef("integrationRef")
|
|
68
90
|
|
|
69
91
|
const { t } = useI18n()
|
|
70
92
|
const isUpdatingPathname = ref(false)
|
|
@@ -103,7 +125,9 @@ const isPathnameEmpty = (pathname: unknown): boolean => {
|
|
|
103
125
|
}
|
|
104
126
|
|
|
105
127
|
const buildPathnameFromSlug = (
|
|
106
|
-
currentPathname:
|
|
128
|
+
currentPathname:
|
|
129
|
+
| CompositionCreate["pathname"]
|
|
130
|
+
| CompositionUpdate["pathname"],
|
|
107
131
|
slug: string,
|
|
108
132
|
) => {
|
|
109
133
|
if (typeof currentPathname === "string") {
|
|
@@ -188,12 +212,19 @@ const validateConfigStep = (): boolean => {
|
|
|
188
212
|
return true
|
|
189
213
|
}
|
|
190
214
|
|
|
215
|
+
const validateIntegrationStep = (): boolean =>
|
|
216
|
+
integrationRef.value?.validate() ?? true
|
|
217
|
+
|
|
191
218
|
const onDynamicFormSubmit = () => stepNavigatorRef.value?.nextStep()
|
|
192
219
|
|
|
193
220
|
watch(
|
|
194
221
|
() => composition.value.pathname,
|
|
195
222
|
(pathname) => {
|
|
196
|
-
if (
|
|
223
|
+
if (
|
|
224
|
+
props.isEditing ||
|
|
225
|
+
isUpdatingPathname.value ||
|
|
226
|
+
!isPathSyncEnabled.value
|
|
227
|
+
) {
|
|
197
228
|
return
|
|
198
229
|
}
|
|
199
230
|
|
|
@@ -233,7 +264,14 @@ watch(
|
|
|
233
264
|
{ immediate: true },
|
|
234
265
|
)
|
|
235
266
|
|
|
236
|
-
const
|
|
267
|
+
const editSteps = computed<Step[]>(() => [
|
|
268
|
+
{
|
|
269
|
+
id: "layout",
|
|
270
|
+
title: t("workbench.compositionConfiguration.steps.widgetLayout.title"),
|
|
271
|
+
subtitle: t(
|
|
272
|
+
"workbench.compositionConfiguration.steps.widgetLayout.subtitle",
|
|
273
|
+
),
|
|
274
|
+
},
|
|
237
275
|
{
|
|
238
276
|
id: "config",
|
|
239
277
|
title: t("workbench.compositionConfiguration.steps.configuration.title"),
|
|
@@ -242,6 +280,9 @@ const steps = computed<Step[]>(() => [
|
|
|
242
280
|
),
|
|
243
281
|
validator: validateConfigStep,
|
|
244
282
|
},
|
|
283
|
+
])
|
|
284
|
+
|
|
285
|
+
const createSteps = computed<Step[]>(() => [
|
|
245
286
|
{
|
|
246
287
|
id: "layout",
|
|
247
288
|
title: t("workbench.compositionConfiguration.steps.widgetLayout.title"),
|
|
@@ -249,5 +290,46 @@ const steps = computed<Step[]>(() => [
|
|
|
249
290
|
"workbench.compositionConfiguration.steps.widgetLayout.subtitle",
|
|
250
291
|
),
|
|
251
292
|
},
|
|
293
|
+
{
|
|
294
|
+
id: "config",
|
|
295
|
+
title: t("workbench.compositionConfiguration.steps.configuration.title"),
|
|
296
|
+
subtitle: t(
|
|
297
|
+
"workbench.compositionConfiguration.steps.configuration.subtitle",
|
|
298
|
+
),
|
|
299
|
+
validator: validateConfigStep,
|
|
300
|
+
primaryAction: "custom",
|
|
301
|
+
primaryActionId: "save-and-continue",
|
|
302
|
+
primaryLabelKey:
|
|
303
|
+
"workbench.compositionConfiguration.actions.saveAndContinue",
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
id: "integration",
|
|
307
|
+
title: t("workbench.compositionConfiguration.steps.integration.title"),
|
|
308
|
+
subtitle: t(
|
|
309
|
+
"workbench.compositionConfiguration.steps.integration.subtitle",
|
|
310
|
+
),
|
|
311
|
+
disableFooterBack: true,
|
|
312
|
+
validator: validateIntegrationStep,
|
|
313
|
+
primaryAction: "custom",
|
|
314
|
+
primaryActionId: "save-il",
|
|
315
|
+
primaryLabelKey: "workbench.compositionConfiguration.actions.saveIL",
|
|
316
|
+
secondaryActions: [
|
|
317
|
+
{
|
|
318
|
+
id: "finish-without-il",
|
|
319
|
+
labelKey: "workbench.compositionConfiguration.actions.finishWithoutIL",
|
|
320
|
+
variant: "outlined",
|
|
321
|
+
skipValidation: true,
|
|
322
|
+
},
|
|
323
|
+
],
|
|
324
|
+
},
|
|
252
325
|
])
|
|
326
|
+
|
|
327
|
+
const steps = computed(() =>
|
|
328
|
+
props.isEditing ? editSteps.value : createSteps.value,
|
|
329
|
+
)
|
|
330
|
+
|
|
331
|
+
defineExpose({
|
|
332
|
+
goToStep: (step: number, options?: { skipValidation?: boolean }) =>
|
|
333
|
+
stepNavigatorRef.value?.goToStep(step, options),
|
|
334
|
+
})
|
|
253
335
|
</script>
|
|
@@ -1,3 +1,31 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<InteractionLinkBehaviorForm
|
|
3
|
+
ref="behaviorFormRef"
|
|
4
|
+
v-model="interactionLink"
|
|
5
|
+
:disabled
|
|
6
|
+
:fluid="true"
|
|
7
|
+
show-linked-composition
|
|
8
|
+
:linked-composition-title="linkedCompositionTitle"
|
|
9
|
+
:intro="$t('workbench.compositionConfiguration.integration.intro')"
|
|
10
|
+
:title="$t('workbench.compositionConfiguration.integration.formTitle')"
|
|
11
|
+
/>
|
|
3
12
|
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import type { InteractionLinkCreate } from "@raclettejs/core"
|
|
16
|
+
import InteractionLinkBehaviorForm from "@app/components/interactionLink/InteractionLinkBehaviorForm.vue"
|
|
17
|
+
import { useTemplateRef } from "vue"
|
|
18
|
+
|
|
19
|
+
defineProps<{
|
|
20
|
+
disabled?: boolean
|
|
21
|
+
linkedCompositionTitle?: string
|
|
22
|
+
}>()
|
|
23
|
+
|
|
24
|
+
const interactionLink = defineModel<InteractionLinkCreate>({ required: true })
|
|
25
|
+
|
|
26
|
+
const behaviorFormRef = useTemplateRef("behaviorFormRef")
|
|
27
|
+
|
|
28
|
+
const validate = (): boolean => behaviorFormRef.value?.validate() ?? true
|
|
29
|
+
|
|
30
|
+
defineExpose({ validate })
|
|
31
|
+
</script>
|
|
@@ -112,12 +112,7 @@ const previewSrc = computed(() => {
|
|
|
112
112
|
const image = activeWidget.value.images?.find(
|
|
113
113
|
(value: string) => typeof value === "string" && value.trim().length > 0,
|
|
114
114
|
)
|
|
115
|
-
|
|
116
|
-
return image
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
const icon = activeWidget.value.icon?.trim()
|
|
120
|
-
return icon || ""
|
|
115
|
+
return image || ""
|
|
121
116
|
})
|
|
122
117
|
|
|
123
118
|
const onResize: OnResizeFunction = ({ cols }) => emit("resize", cols)
|
package/plugins/pacifico__compositions/frontend/composables/prefillInteractionLinkFromComposition.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { CompositionCreate, InteractionLinkCreate } from "@raclettejs/core"
|
|
2
|
+
|
|
3
|
+
const getDefaultPathname = (
|
|
4
|
+
pathname: CompositionCreate["pathname"],
|
|
5
|
+
): string => {
|
|
6
|
+
if (typeof pathname === "string") {
|
|
7
|
+
return pathname
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
if (pathname && typeof pathname === "object") {
|
|
11
|
+
const localized = pathname as Record<string, string>
|
|
12
|
+
return (
|
|
13
|
+
localized.default ||
|
|
14
|
+
localized.en ||
|
|
15
|
+
localized.de ||
|
|
16
|
+
Object.values(localized).find((value) => value?.trim()) ||
|
|
17
|
+
""
|
|
18
|
+
)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return ""
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export const prefillInteractionLinkFromComposition = (
|
|
25
|
+
interactionLink: InteractionLinkCreate,
|
|
26
|
+
composition: CompositionCreate,
|
|
27
|
+
): void => {
|
|
28
|
+
interactionLink.composition = interactionLink.composition || ""
|
|
29
|
+
|
|
30
|
+
if (interactionLink.triggers.length > 0) {
|
|
31
|
+
return
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
const navTitle =
|
|
35
|
+
composition.title?.trim() || getDefaultPathname(composition.pathname)
|
|
36
|
+
|
|
37
|
+
if (!navTitle) {
|
|
38
|
+
return
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interactionLink.triggers = [
|
|
42
|
+
{
|
|
43
|
+
type: "page-navigation",
|
|
44
|
+
settings: {
|
|
45
|
+
icon: "mdi-file-document-outline",
|
|
46
|
+
title: {
|
|
47
|
+
default: navTitle,
|
|
48
|
+
},
|
|
49
|
+
sortOrder: 0,
|
|
50
|
+
navigationBarType: "navItem",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
]
|
|
54
|
+
}
|