@raclettejs/workbench 0.0.1

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.
Files changed (89) hide show
  1. package/README.md +1 -0
  2. package/config/compositions.js +282 -0
  3. package/config/interactionLinks.js +164 -0
  4. package/i18n/de-DE.json +245 -0
  5. package/i18n/en-EU.json +245 -0
  6. package/i18n/sk-SK.json +245 -0
  7. package/package.json +63 -0
  8. package/packages.json +33 -0
  9. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionConfiguration.vue +140 -0
  10. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionIntegration.vue +3 -0
  11. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/CompositionWidgetsLayout.vue +129 -0
  12. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetContextMenu.vue +53 -0
  13. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetIcon.vue +99 -0
  14. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetList.vue +122 -0
  15. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetRenderer.vue +65 -0
  16. package/plugins/pacifico__compositions/frontend/components/compositionConfiguration/widgetsLayout/WidgetSettings.vue +96 -0
  17. package/plugins/pacifico__compositions/frontend/widgets/CompositionCreateWidget.vue +51 -0
  18. package/plugins/pacifico__compositions/frontend/widgets/CompositionEditWidget.vue +66 -0
  19. package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +132 -0
  20. package/plugins/pacifico__compositions/raclette.plugin.ts +8 -0
  21. package/plugins/pacifico__core/backend/index.ts +25 -0
  22. package/plugins/pacifico__core/backend/routes.ts +220 -0
  23. package/plugins/pacifico__core/raclette.plugin.ts +9 -0
  24. package/plugins/pacifico__interactionLinks/frontend/components/InteractionLinkConfiguration.vue +145 -0
  25. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkCreateWidget.vue +48 -0
  26. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkEditWidget.vue +66 -0
  27. package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +126 -0
  28. package/plugins/pacifico__interactionLinks/raclette.plugin.ts +8 -0
  29. package/plugins/pacifico__plugins/frontend/index.ts +42 -0
  30. package/plugins/pacifico__plugins/frontend/widgets/PluginDetailWidget.vue +26 -0
  31. package/plugins/pacifico__plugins/frontend/widgets/PluginListWidget.vue +59 -0
  32. package/plugins/pacifico__plugins/raclette.plugin.ts +8 -0
  33. package/plugins/pacifico__tags/frontend/components/TagConfiguration.vue +99 -0
  34. package/plugins/pacifico__tags/frontend/widgets/TagCreateWidget.vue +43 -0
  35. package/plugins/pacifico__tags/frontend/widgets/TagEditWidget.vue +64 -0
  36. package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +71 -0
  37. package/plugins/pacifico__tags/raclette.plugin.ts +8 -0
  38. package/plugins/pacifico__users/frontend/components/UserConfiguration.vue +110 -0
  39. package/plugins/pacifico__users/frontend/widgets/UserCreateWidget.vue +48 -0
  40. package/plugins/pacifico__users/frontend/widgets/UserEditWidget.vue +64 -0
  41. package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +86 -0
  42. package/plugins/pacifico__users/raclette.plugin.ts +8 -0
  43. package/raclette.config.js +150 -0
  44. package/services/frontend/.DS_Store +0 -0
  45. package/services/frontend/public/favicon.png +0 -0
  46. package/services/frontend/public/home-icon.png +0 -0
  47. package/services/frontend/public/logo.png +0 -0
  48. package/services/frontend/src/app/.DS_Store +0 -0
  49. package/services/frontend/src/app/components/BaseDataTable.vue +284 -0
  50. package/services/frontend/src/app/components/dynamicForm/DynamicForm.vue +207 -0
  51. package/services/frontend/src/app/components/dynamicForm/DynamicFormTypes.ts +63 -0
  52. package/services/frontend/src/app/components/dynamicForm/DynamicInput.vue +344 -0
  53. package/services/frontend/src/app/components/dynamicForm/TextDivider.vue +13 -0
  54. package/services/frontend/src/app/components/dynamicForm/testing/DynamicFormInputTesting.vue +477 -0
  55. package/services/frontend/src/app/components/dynamicForm/typedInputs/CheckboxInput.vue +16 -0
  56. package/services/frontend/src/app/components/dynamicForm/typedInputs/ColorInput.vue +52 -0
  57. package/services/frontend/src/app/components/dynamicForm/typedInputs/CompositionInput.vue +32 -0
  58. package/services/frontend/src/app/components/dynamicForm/typedInputs/IconInput.vue +40 -0
  59. package/services/frontend/src/app/components/dynamicForm/typedInputs/ListInput.vue +51 -0
  60. package/services/frontend/src/app/components/dynamicForm/typedInputs/LocalizedInput.vue +51 -0
  61. package/services/frontend/src/app/components/dynamicForm/typedInputs/PasswordInput.vue +23 -0
  62. package/services/frontend/src/app/components/dynamicForm/typedInputs/RecordInput.vue +91 -0
  63. package/services/frontend/src/app/components/dynamicForm/typedInputs/SwitchInput.vue +17 -0
  64. package/services/frontend/src/app/components/dynamicForm/typedInputs/TagsInput.vue +58 -0
  65. package/services/frontend/src/app/components/dynamicForm/typedInputs/TriggerInput.vue +159 -0
  66. package/services/frontend/src/app/components/dynamicForm/typedInputs/UserInput.vue +63 -0
  67. package/services/frontend/src/app/components/dynamicForm/typedInputs/mdi-icons.ts +7002 -0
  68. package/services/frontend/src/app/components/dynamicForm/validators.ts +19 -0
  69. package/services/frontend/src/app/components/stepNavigator/StepNavigator.vue +331 -0
  70. package/services/frontend/src/app/components/stepNavigator/StepNavigatorTypes.ts +12 -0
  71. package/services/frontend/src/app/composables/useUserHelper.ts +254 -0
  72. package/services/frontend/src/app/composables/useVantaFog.ts +37 -0
  73. package/services/frontend/src/app/composables/useWorkbenchPlugins.ts +44 -0
  74. package/services/frontend/src/orchestrator/.DS_Store +0 -0
  75. package/services/frontend/src/orchestrator/LoginApp.vue +62 -0
  76. package/services/frontend/src/orchestrator/WelcomeScreen.vue +39 -0
  77. package/services/frontend/src/orchestrator/assets/styles/themes/dark.ts +39 -0
  78. package/services/frontend/src/orchestrator/assets/styles/themes/highContrast.ts +39 -0
  79. package/services/frontend/src/orchestrator/assets/styles/themes/light.ts +39 -0
  80. package/services/frontend/src/orchestrator/components/InitProjectScreen.vue +298 -0
  81. package/services/frontend/src/orchestrator/components/LoginScreen.vue +73 -0
  82. package/services/frontend/src/orchestrator/components/RacletteAdCorner.vue +313 -0
  83. package/services/frontend/src/orchestrator/components/layout/AppButton.vue +109 -0
  84. package/services/frontend/src/orchestrator/components/layout/AppHeadline.vue +46 -0
  85. package/services/frontend/src/orchestrator/components/layout/AppLabelledInput.vue +94 -0
  86. package/services/frontend/src/orchestrator/components/layout/AppModal.vue +28 -0
  87. package/services/frontend/src/orchestrator/components/layout/SvgButtonArrow.vue +14 -0
  88. package/services/frontend/src/orchestrator/composables/useWelcomeScreen.ts +19 -0
  89. package/yarn.lock +3435 -0
@@ -0,0 +1,344 @@
1
+ <template>
2
+ <div class="tw:grid tw:grid-cols-12 tw:gap-6">
3
+ <label class="tw:col-span-5" :for="inputId" v-if="hasTitleOrDescription">
4
+ <div class="tw:text-sm tw:font-bold">
5
+ {{ value.title }}
6
+ <span v-if="value.validation?.required" class="tw:text-red-500">*</span>
7
+ </div>
8
+ <div class="tw:text-xs">
9
+ {{ value.description }}
10
+ </div>
11
+ </label>
12
+
13
+ <div
14
+ :class="{
15
+ 'tw:col-span-7': hasTitleOrDescription,
16
+ 'tw:col-span-12': !hasTitleOrDescription,
17
+ }"
18
+ >
19
+ <!-- custom inputs -->
20
+ <template v-if="inputType === 'tags'">
21
+ <TagsInput
22
+ v-model="stringArrayModel"
23
+ :input-id="inputId"
24
+ :hide-details="!showDetails"
25
+ :error-messages="errorMessage"
26
+ v-bind="additionalInputBindings"
27
+ @blur="$emit('validate')"
28
+ />
29
+ </template>
30
+
31
+ <template v-else-if="inputType === 'localized'">
32
+ <LocalizedInput
33
+ v-model="recordModel"
34
+ :input-id="inputId"
35
+ :hide-details="!showDetails"
36
+ :error-messages="errorMessage"
37
+ v-bind="additionalInputBindings"
38
+ @blur="$emit('validate')"
39
+ />
40
+ </template>
41
+
42
+ <template v-else-if="inputType === 'composition'">
43
+ <CompositionInput
44
+ v-model="stringModel"
45
+ :input-id="inputId"
46
+ :hide-details="!showDetails"
47
+ :error-messages="errorMessage"
48
+ v-bind="additionalInputBindings"
49
+ @update:model-value="$emit('validate')"
50
+ @blur="$emit('validate')"
51
+ />
52
+ </template>
53
+
54
+ <template v-else-if="inputType === 'password'">
55
+ <PasswordInput
56
+ v-model="stringModel"
57
+ :input-id="inputId"
58
+ :hide-details="!showDetails"
59
+ :error-messages="errorMessage"
60
+ v-bind="additionalInputBindings"
61
+ @blur="$emit('validate')"
62
+ />
63
+ </template>
64
+
65
+ <template v-else-if="inputType === 'record'">
66
+ <RecordInput
67
+ v-model="recordModel"
68
+ :input-id="inputId"
69
+ @blur="$emit('validate')"
70
+ />
71
+ </template>
72
+
73
+ <template v-else-if="inputType === 'list'">
74
+ <ListInput
75
+ v-model="stringArrayModel"
76
+ :input-id="inputId"
77
+ :hide-details="!showDetails"
78
+ :error-messages="errorMessage"
79
+ v-bind="additionalInputBindings"
80
+ @update:model-value="$emit('validate')"
81
+ @blur="$emit('validate')"
82
+ />
83
+ </template>
84
+
85
+ <template v-else-if="inputType === 'triggers'">
86
+ <TriggerInput
87
+ v-model="triggerModel"
88
+ v-bind="additionalInputBindings"
89
+ @blur="$emit('validate')"
90
+ />
91
+ </template>
92
+
93
+ <template v-else-if="inputType === 'color'">
94
+ <ColorInput
95
+ v-model="stringModel"
96
+ :input-id="inputId"
97
+ :hide-details="!showDetails"
98
+ :error-messages="errorMessage"
99
+ v-bind="additionalInputBindings"
100
+ @blur="$emit('validate')"
101
+ />
102
+ </template>
103
+
104
+ <template v-else-if="inputType === 'user'">
105
+ <UserInput
106
+ v-model="stringModel"
107
+ :input-id="inputId"
108
+ :hide-details="!showDetails"
109
+ :error-messages="errorMessage"
110
+ v-bind="additionalInputBindings"
111
+ @update:model-value="$emit('validate')"
112
+ @blur="$emit('validate')"
113
+ />
114
+ </template>
115
+
116
+ <!-- vuetify inputs -->
117
+ <template v-else-if="inputType === 'switch'">
118
+ <SwitchInput
119
+ v-model="booleanModel"
120
+ :input-id="inputId"
121
+ :hide-details="!showDetails"
122
+ :error-messages="errorMessage"
123
+ v-bind="additionalInputBindings"
124
+ @update:model-value="$emit('validate')"
125
+ @blur="$emit('validate')"
126
+ />
127
+ </template>
128
+ <template v-else-if="inputType === 'checkbox'">
129
+ <CheckboxInput
130
+ v-model="booleanModel"
131
+ :input-id="inputId"
132
+ :hide-details="!showDetails"
133
+ :error-messages="errorMessage"
134
+ v-bind="additionalInputBindings"
135
+ @update:model-value="$emit('validate')"
136
+ />
137
+ </template>
138
+
139
+ <template v-else-if="inputType === 'text'">
140
+ <v-text-field
141
+ :id="inputId"
142
+ v-model="stringModel"
143
+ variant="outlined"
144
+ :hide-details="!showDetails"
145
+ :error-messages="errorMessage"
146
+ v-bind="additionalInputBindings"
147
+ @blur="$emit('validate')"
148
+ />
149
+ </template>
150
+
151
+ <template v-else-if="inputType === 'textarea'">
152
+ <v-textarea
153
+ :id="inputId"
154
+ v-model="stringModel"
155
+ variant="outlined"
156
+ :hide-details="!showDetails"
157
+ :error-messages="errorMessage"
158
+ v-bind="additionalInputBindings"
159
+ @blur="$emit('validate')"
160
+ />
161
+ </template>
162
+
163
+ <template v-else-if="inputType === 'number'">
164
+ <v-number-input
165
+ v-model="numberModel"
166
+ :id="inputId"
167
+ variant="outlined"
168
+ :hide-details="!showDetails"
169
+ :error-messages="errorMessage"
170
+ v-bind="additionalInputBindings"
171
+ @update:model-value="$emit('validate')"
172
+ @blur="$emit('validate')"
173
+ />
174
+ </template>
175
+
176
+ <template v-else-if="inputType === 'select'">
177
+ <v-select
178
+ :id="inputId"
179
+ v-model="stringModel"
180
+ :items="value.selectItems"
181
+ variant="outlined"
182
+ :hide-details="!showDetails"
183
+ :error-messages="errorMessage"
184
+ v-bind="additionalInputBindings"
185
+ @blur="$emit('validate')"
186
+ />
187
+ </template>
188
+
189
+ <template v-else-if="inputType === 'multiselect'">
190
+ <v-autocomplete
191
+ :id="inputId"
192
+ v-model="stringArrayModel"
193
+ :items="value.selectItems"
194
+ variant="outlined"
195
+ :hide-details="!showDetails"
196
+ :error-messages="errorMessage"
197
+ multiple
198
+ v-bind="additionalInputBindings"
199
+ @blur="$emit('validate')"
200
+ />
201
+ </template>
202
+
203
+ <template v-else>
204
+ <div>I am not implemented yet 🙁 ({{ inputType }})</div>
205
+ </template>
206
+ </div>
207
+ </div>
208
+ </template>
209
+
210
+ <script setup lang="ts">
211
+ import { computed, useAttrs, useId, WritableComputedRef } from "vue"
212
+ import LocalizedInput from "./typedInputs/LocalizedInput.vue"
213
+ import CompositionInput from "./typedInputs/CompositionInput.vue"
214
+ import ListInput from "./typedInputs/ListInput.vue"
215
+ import PasswordInput from "./typedInputs/PasswordInput.vue"
216
+ import RecordInput from "./typedInputs/RecordInput.vue"
217
+ import TagsInput from "./typedInputs/TagsInput.vue"
218
+ import TriggerInput from "./typedInputs/TriggerInput.vue"
219
+ import CheckboxInput from "./typedInputs/CheckboxInput.vue"
220
+ import SwitchInput from "./typedInputs/SwitchInput.vue"
221
+ import type { Trigger } from "@raclettejs/core"
222
+ import ColorInput from "./typedInputs/ColorInput.vue"
223
+ import UserInput from "./typedInputs/UserInput.vue"
224
+ import type { DynamicFormField, DynamicInputType } from "./DynamicFormTypes"
225
+
226
+ const props = defineProps<{
227
+ inputType: DynamicInputType
228
+ value: DynamicFormField<any>
229
+ disabled?: boolean
230
+ errorMessage?: string
231
+ hideDetails?: boolean
232
+ }>()
233
+
234
+ defineEmits<{
235
+ validate: []
236
+ }>()
237
+
238
+ type DynamicModelType =
239
+ | string
240
+ | string[]
241
+ | number
242
+ | Record<string, string>
243
+ | Trigger[]
244
+ | boolean
245
+
246
+ const model = defineModel<DynamicModelType | null>({
247
+ required: true,
248
+ })
249
+
250
+ const id = useId()
251
+ const attrs = useAttrs()
252
+
253
+ const inputId = computed(() => `dynamic-input-${id}`)
254
+
255
+ // make dynamic typed model to true type
256
+ const createTypedModel = <T extends DynamicModelType>(
257
+ types: DynamicInputType[],
258
+ ): WritableComputedRef<T> =>
259
+ computed<T>({
260
+ get: () =>
261
+ types.includes(props.inputType) ? (model.value as T) : ({} as T),
262
+ set: (value: T) => {
263
+ if (types.includes(props.inputType)) {
264
+ model.value = value
265
+ }
266
+ },
267
+ })
268
+
269
+ const stringModel = createTypedModel<string>([
270
+ "text",
271
+ "textarea",
272
+ "number",
273
+ "composition",
274
+ "select",
275
+ "password",
276
+ "color",
277
+ "user",
278
+ ])
279
+
280
+ const numberModel = createTypedModel<number>(["number"])
281
+
282
+ const stringArrayModel = createTypedModel<string[]>([
283
+ "tags",
284
+ "permissions",
285
+ "multiselect",
286
+ "list",
287
+ ])
288
+
289
+ const recordModel = createTypedModel<Record<string, string>>([
290
+ "record",
291
+ "localized",
292
+ ])
293
+
294
+ const booleanModel = createTypedModel<boolean>(["switch", "checkbox"])
295
+ const triggerModel = createTypedModel<Trigger[]>(["triggers"])
296
+
297
+ const hasTitleOrDescription = computed(
298
+ () => props.value.title?.length || props.value.description?.length,
299
+ )
300
+
301
+ const showDetails = () => {
302
+ if (props.errorMessage) {
303
+ return true
304
+ }
305
+
306
+ return !props.hideDetails
307
+ }
308
+
309
+ const additionalInputBindings = computed(() => {
310
+ const {
311
+ prefix,
312
+ suffix,
313
+ prependIcon,
314
+ prependInnerIcon,
315
+ appendIcon,
316
+ appendInnerIcon,
317
+ onClickPrepend,
318
+ onClickPrependInner,
319
+ onClickAppend,
320
+ onClickAppendInner,
321
+ } = props.value
322
+
323
+ const result: Record<string, unknown> = {
324
+ prefix,
325
+ suffix,
326
+ prependIcon: prependIcon ? `mdi-${prependIcon}` : undefined,
327
+ prependInnerIcon: prependInnerIcon ? `mdi-${prependInnerIcon}` : undefined,
328
+ appendIcon: appendIcon ? `mdi-${appendIcon}` : undefined,
329
+ appendInnerIcon: appendInnerIcon ? `mdi-${appendInnerIcon}` : undefined,
330
+ }
331
+
332
+ // add click handlers if they exist
333
+ if (onClickPrepend) result["onClick:prepend"] = onClickPrepend
334
+ if (onClickPrependInner) result["onClick:prependInner"] = onClickPrependInner
335
+ if (onClickAppend) result["onClick:append"] = onClickAppend
336
+ if (onClickAppendInner) result["onClick:appendInner"] = onClickAppendInner
337
+
338
+ const filteredResult = Object.fromEntries(
339
+ Object.entries(result).filter(([_, value]) => value !== undefined),
340
+ )
341
+
342
+ return { ...filteredResult, ...attrs, disabled: props.disabled }
343
+ })
344
+ </script>
@@ -0,0 +1,13 @@
1
+ <template>
2
+ <div class="tw:flex tw:w-full tw:items-center tw:gap-2">
3
+ <v-divider />
4
+ <div class="tw:text-nowrap">{{ label }}</div>
5
+ <v-divider />
6
+ </div>
7
+ </template>
8
+
9
+ <script setup lang="ts">
10
+ defineProps({
11
+ label: { type: String, required: true },
12
+ })
13
+ </script>