@raclettejs/workbench 0.1.14 → 0.1.16

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 CHANGED
@@ -7,7 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ## [0.1.14] - 02.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.13...v0.1.14" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
10
+ ## [0.1.16] - 05.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.15...v0.1.16" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
11
+
12
+ ### Added
13
+
14
+ - added isDeleted switch to lists
15
+
16
+ ## [0.1.15] - 02.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.13...v0.1.15" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
11
17
 
12
18
  ### Updated
13
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raclettejs/workbench",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
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",
@@ -31,13 +31,13 @@
31
31
  ".": "./index.ts"
32
32
  },
33
33
  "dependencies": {
34
- "@raclettejs/core": "0.1.14",
34
+ "@raclettejs/core": "0.1.16",
35
35
  "three": "0.180.0",
36
36
  "vanta": "0.5.24"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@eslint/js": "9.35.0",
40
- "@raclettejs/types": "0.1.14",
40
+ "@raclettejs/types": "0.1.16",
41
41
  "@sinclair/typebox": "0.34.41",
42
42
  "@types/ramda": "0.31.1",
43
43
  "@vueuse/core": "13.9.0",
@@ -9,6 +9,26 @@
9
9
  :data-article="$t('workbench.compositionList.dataArticle')"
10
10
  @delete="deleteComposition"
11
11
  >
12
+ <template #actions>
13
+ <v-tooltip
14
+ :text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
15
+ >
16
+ <template v-slot:activator="{ props }">
17
+ <v-btn-toggle
18
+ density="compact"
19
+ v-bind="props"
20
+ v-model="showDeleted"
21
+ mandatory
22
+ :color="showDeleted ? 'error' : 'success'"
23
+ >
24
+ <v-btn :value="true">
25
+ <v-icon>mdi-table-eye-off</v-icon>
26
+ </v-btn>
27
+ <v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
28
+ </v-btn-toggle>
29
+ </template>
30
+ </v-tooltip>
31
+ </template>
12
32
  <!-- Custom status column -->
13
33
  <template #item.status="{ item }">
14
34
  <v-icon
@@ -22,11 +42,12 @@
22
42
 
23
43
  <script setup lang="ts">
24
44
  import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
25
- import { computed } from "vue"
45
+ import { computed, watch, ref } from "vue"
26
46
  import type { Composition } from "@raclettejs/core"
27
47
  import { formatDistance } from "date-fns"
28
48
  import BaseDataTable from "@app/components/BaseDataTable.vue"
29
49
  import { useI18n } from "vue-i18n"
50
+ const showDeleted = ref(false)
30
51
 
31
52
  const { t } = useI18n()
32
53
 
@@ -68,9 +89,7 @@ const {
68
89
  data: compositions,
69
90
  execute,
70
91
  isLoading: compositionsLoading,
71
- } = $data.composition.getAll({
72
- options: { immediate: true },
73
- })
92
+ } = $data.composition.getAll()
74
93
 
75
94
  const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
76
95
  options: { immediate: true },
@@ -79,7 +98,7 @@ const { data: users } = $data.user.getAll({
79
98
  options: { immediate: true },
80
99
  })
81
100
  const { execute: executeDelete } = await $data.composition.delete({
82
- options: { cb: () => execute() },
101
+ options: { cb: () => execute({ isDeleted: showDeleted.value }) },
83
102
  })
84
103
 
85
104
  const parsedCompositions = computed(() => {
@@ -128,5 +147,14 @@ const getStatusColor = (status: string) => {
128
147
  const deleteComposition = async (composition: Composition) =>
129
148
  await executeDelete({ _id: composition._id })
130
149
 
131
- $socket.on("compositionCreated", () => execute())
150
+ $socket.on("compositionCreated", () =>
151
+ execute({ isDeleted: showDeleted.value }),
152
+ )
153
+ watch(
154
+ showDeleted,
155
+ () => {
156
+ execute({ isDeleted: showDeleted.value })
157
+ },
158
+ { immediate: true },
159
+ )
132
160
  </script>
@@ -9,6 +9,26 @@
9
9
  :data-article="$t('workbench.interactionLinkList.dataArticle')"
10
10
  @delete="deleteInteractionLink"
11
11
  >
12
+ <template #actions>
13
+ <v-tooltip
14
+ :text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
15
+ >
16
+ <template v-slot:activator="{ props }">
17
+ <v-btn-toggle
18
+ density="compact"
19
+ v-bind="props"
20
+ v-model="showDeleted"
21
+ mandatory
22
+ :color="showDeleted ? 'error' : 'success'"
23
+ >
24
+ <v-btn :value="true">
25
+ <v-icon>mdi-table-eye-off</v-icon>
26
+ </v-btn>
27
+ <v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
28
+ </v-btn-toggle>
29
+ </template>
30
+ </v-tooltip>
31
+ </template>
12
32
  <!-- Custom triggers column -->
13
33
  <template #item.triggers="{ item }">
14
34
  <span class="tw:flex tw:gap-2">
@@ -24,8 +44,9 @@ import BaseDataTable from "@app/components/BaseDataTable.vue"
24
44
  import { InteractionLink } from "@raclettejs/core"
25
45
  import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
26
46
  import { formatDistance } from "date-fns"
27
- import { computed } from "vue"
47
+ import { computed, ref, watch } from "vue"
28
48
  import { useI18n } from "vue-i18n"
49
+ const showDeleted = ref(false)
29
50
 
30
51
  const { t } = useI18n()
31
52
 
@@ -72,9 +93,7 @@ const {
72
93
  data: interactionLinks,
73
94
  execute,
74
95
  isLoading: interactionLinksLoading,
75
- } = $data.interactionLink.getAll({
76
- options: { immediate: true },
77
- })
96
+ } = $data.interactionLink.getAll()
78
97
 
79
98
  const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
80
99
  options: { immediate: true },
@@ -89,7 +108,7 @@ const { data: compositions } = $data.composition.getAll({
89
108
  })
90
109
 
91
110
  const { execute: executeDelete } = $data.interactionLink.delete({
92
- options: { cb: () => execute() },
111
+ options: { cb: () => execute({ isDeleted: showDeleted.value }) },
93
112
  })
94
113
 
95
114
  const parsedInteractionLinks = computed(() => {
@@ -122,5 +141,14 @@ const parsedInteractionLinks = computed(() => {
122
141
  const deleteInteractionLink = async (interactionLink: InteractionLink) =>
123
142
  await executeDelete({ _id: interactionLink._id })
124
143
 
125
- $socket.on("interactionLinkCreated", () => execute())
144
+ $socket.on("interactionLinkCreated", () =>
145
+ execute({ isDeleted: showDeleted.value }),
146
+ )
147
+ watch(
148
+ showDeleted,
149
+ () => {
150
+ execute({ isDeleted: showDeleted.value })
151
+ },
152
+ { immediate: true },
153
+ )
126
154
  </script>
@@ -8,17 +8,38 @@
8
8
  :data-name="$t('workbench.tagList.dataName')"
9
9
  :data-article="$t('workbench.tagList.dataArticle')"
10
10
  @delete="deleteTag"
11
- />
11
+ >
12
+ <template #actions>
13
+ <v-tooltip
14
+ :text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
15
+ >
16
+ <template v-slot:activator="{ props }">
17
+ <v-btn-toggle
18
+ density="compact"
19
+ v-bind="props"
20
+ v-model="showDeleted"
21
+ mandatory
22
+ :color="showDeleted ? 'error' : 'success'"
23
+ >
24
+ <v-btn :value="true">
25
+ <v-icon>mdi-table-eye-off</v-icon>
26
+ </v-btn>
27
+ <v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
28
+ </v-btn-toggle>
29
+ </template>
30
+ </v-tooltip>
31
+ </template>
32
+ </BaseDataTable>
12
33
  </template>
13
34
 
14
35
  <script setup lang="ts">
15
36
  import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
16
- import { computed } from "vue"
37
+ import { computed, ref, watch } from "vue"
17
38
  import type { Tag } from "@raclettejs/core"
18
39
  import { useI18n } from "vue-i18n"
19
40
  import BaseDataTable from "@app/components/BaseDataTable.vue"
20
41
  import { formatDistance } from "date-fns"
21
-
42
+ const showDeleted = ref(false)
22
43
  const { t } = useI18n()
23
44
 
24
45
  const headers = computed<{ title: string; key: keyof Tag }[]>(() => [
@@ -51,11 +72,12 @@ const {
51
72
  execute,
52
73
  isLoading: tagsLoading,
53
74
  } = $data.tag.getAll({
75
+ params: { isDeleted: false },
54
76
  options: { immediate: true },
55
77
  })
56
78
 
57
79
  const { execute: executeDelete } = $data.tag.delete({
58
- options: { cb: () => execute() },
80
+ options: { cb: () => execute({ isDeleted: showDeleted.value }) },
59
81
  })
60
82
 
61
83
  const parsedTags = computed(() => {
@@ -71,5 +93,12 @@ const parsedTags = computed(() => {
71
93
 
72
94
  const deleteTag = async (tag: Tag) => await executeDelete({ _id: tag._id })
73
95
 
74
- $socket.on("tagCreated", () => execute())
96
+ $socket.on("tagCreated", () => execute({ isDeleted: showDeleted.value }))
97
+ watch(
98
+ showDeleted,
99
+ () => {
100
+ execute({ isDeleted: showDeleted.value })
101
+ },
102
+ { immediate: true },
103
+ )
75
104
  </script>
@@ -9,16 +9,38 @@
9
9
  :data-article="$t('workbench.userList.dataArticle')"
10
10
  :delete-validator="(user) => user._id !== $user?._id"
11
11
  @delete="deleteUser"
12
- />
12
+ >
13
+ <template #actions>
14
+ <v-tooltip
15
+ :text="showDeleted ? $t('core.hideDeleted') : $t('core.showDeleted')"
16
+ >
17
+ <template v-slot:activator="{ props }">
18
+ <v-btn-toggle
19
+ density="compact"
20
+ v-bind="props"
21
+ v-model="showDeleted"
22
+ mandatory
23
+ :color="showDeleted ? 'error' : 'success'"
24
+ >
25
+ <v-btn :value="true">
26
+ <v-icon>mdi-table-eye-off</v-icon>
27
+ </v-btn>
28
+ <v-btn :value="false"><v-icon>mdi-table-eye</v-icon></v-btn>
29
+ </v-btn-toggle>
30
+ </template>
31
+ </v-tooltip>
32
+ </template>
33
+ </BaseDataTable>
13
34
  </template>
14
35
 
15
36
  <script setup lang="ts">
16
37
  import { usePluginApi } from "@raclettejs/core/orchestrator/composables"
17
- import { computed } from "vue"
38
+ import { computed, watch, ref } from "vue"
18
39
  import type { User } from "@raclettejs/core"
19
40
  import { formatDistance } from "date-fns"
20
41
  import { useI18n } from "vue-i18n"
21
42
  import BaseDataTable from "@app/components/BaseDataTable.vue"
43
+ const showDeleted = ref(false)
22
44
 
23
45
  const props = defineProps<{
24
46
  uuid: string
@@ -51,20 +73,14 @@ const headers = computed<{ title: string; key: keyof User }[]>(() => [
51
73
 
52
74
  const { $data, $socket, $user } = usePluginApi("raclette__core")
53
75
 
54
- const {
55
- data: users,
56
- execute,
57
- isLoading: usersLoading,
58
- } = $data.user.getAll({
59
- options: { immediate: true },
60
- })
76
+ const { data: users, execute, isLoading: usersLoading } = $data.user.getAll()
61
77
 
62
78
  const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
63
79
  options: { immediate: true },
64
80
  })
65
81
 
66
82
  const { execute: executeDelete } = $data.user.delete({
67
- options: { cb: () => execute() },
83
+ options: { cb: () => execute({ isDeleted: showDeleted.value }) },
68
84
  })
69
85
 
70
86
  const parsedUsers = computed(() => {
@@ -82,5 +98,12 @@ const parsedUsers = computed(() => {
82
98
 
83
99
  const deleteUser = async (user: User) => await executeDelete({ _id: user._id })
84
100
 
85
- $socket.on("userCreated", () => execute())
101
+ $socket.on("userCreated", () => execute({ isDeleted: showDeleted.value }))
102
+ watch(
103
+ showDeleted,
104
+ () => {
105
+ execute({ isDeleted: showDeleted.value })
106
+ },
107
+ { immediate: true },
108
+ )
86
109
  </script>
@@ -112,50 +112,50 @@
112
112
  <!-- Additional table slots (this caused the table to be empty) -->
113
113
  <!-- <slot name="table-slots" /> -->
114
114
  </v-data-table>
115
- </div>
116
115
 
117
- <!-- Delete Confirmation Dialog -->
118
- <v-dialog
119
- v-model="deleteDialog"
120
- max-width="400"
121
- v-if="showDeleteAction && itemToDelete"
122
- >
123
- <v-card>
124
- <v-card-title class="text-h6">
125
- {{
126
- $t("workbench.baseDataTable.deleteDataTitle", {
127
- dataName,
128
- })
129
- }}
130
- </v-card-title>
131
-
132
- <v-card-text
133
- v-html="
134
- $t('workbench.baseDataTable.deleteDataConfirmMessage', {
135
- article: dataArticle,
136
- dataName,
137
- value:
138
- itemToDelete.email ||
139
- itemToDelete.title ||
140
- itemToDelete.name ||
141
- itemToDelete._id,
142
- })
143
- "
144
- />
145
- <v-card-actions>
146
- <v-spacer />
147
- <v-btn variant="text" @click="deleteDialog = false">
148
- {{ $t("workbench.baseDataTable.deleteDataConfirmCancel") }}
149
- </v-btn>
150
- <v-btn color="red" variant="flat" @click="confirmDelete">
151
- {{ $t("workbench.baseDataTable.deleteDataConfirmButton") }}
152
- </v-btn>
153
- </v-card-actions>
154
- </v-card>
155
- </v-dialog>
156
-
157
- <!-- Additional dialogs slot -->
158
- <slot name="dialogs" />
116
+ <!-- Delete Confirmation Dialog -->
117
+ <v-dialog
118
+ v-model="deleteDialog"
119
+ max-width="400"
120
+ v-if="showDeleteAction && itemToDelete"
121
+ >
122
+ <v-card>
123
+ <v-card-title class="text-h6">
124
+ {{
125
+ $t("workbench.baseDataTable.deleteDataTitle", {
126
+ dataName,
127
+ })
128
+ }}
129
+ </v-card-title>
130
+
131
+ <v-card-text
132
+ v-html="
133
+ $t('workbench.baseDataTable.deleteDataConfirmMessage', {
134
+ article: dataArticle,
135
+ dataName,
136
+ value:
137
+ itemToDelete.email ||
138
+ itemToDelete.title ||
139
+ itemToDelete.name ||
140
+ itemToDelete._id,
141
+ })
142
+ "
143
+ />
144
+ <v-card-actions>
145
+ <v-spacer />
146
+ <v-btn variant="text" @click="deleteDialog = false">
147
+ {{ $t("workbench.baseDataTable.deleteDataConfirmCancel") }}
148
+ </v-btn>
149
+ <v-btn color="red" variant="flat" @click="confirmDelete">
150
+ {{ $t("workbench.baseDataTable.deleteDataConfirmButton") }}
151
+ </v-btn>
152
+ </v-card-actions>
153
+ </v-card>
154
+ </v-dialog>
155
+
156
+ <!-- Additional dialogs slot -->
157
+ <slot name="dialogs" />
158
+ </div>
159
159
  </template>
160
160
 
161
161
  <script setup lang="ts" generic="T extends Record<string, any>">
package/yarn.lock CHANGED
@@ -476,10 +476,10 @@
476
476
  resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.2.9.tgz#d229a7b7f9dac167a156992ef23c7f023653f53b"
477
477
  integrity sha512-QNqXyfVS2wm9hweSYD2O7F0G06uurj9kZ96TRQE5Y9hU7+tgdZwIkbAKc5Ocy1HxEY2kuDQa6cQ1WRs/O5LFKA==
478
478
 
479
- "@raclettejs/core@^0.1.14":
480
- version "0.1.14"
481
- resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.14.tgz#c49e0d23b21f3918501fed66f29c3b1f8b6b5af1"
482
- integrity sha512-8uiqUZXZIFxqeW9hpzuuIONOpyb3v02Q+LZ0aV9ogLRijWGFJlDkGFYRPg9jC2NsDxo1znoOdinZLFvhPOhPhA==
479
+ "@raclettejs/core@^0.1.16":
480
+ version "0.1.16"
481
+ resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.16.tgz#609ea04e6d398208080e4c19203a98300dacd872"
482
+ integrity sha512-pxKhWC5L1w7HLvXR045Qrfk71m3gpQTn8mkbXxUDgNjYQcjVOQyKrOWkq3LRGwsZ0VzfMgnSagxB5uAhZVA7sQ==
483
483
  dependencies:
484
484
  chalk "5.6.2"
485
485
  chokidar "3.6.0"
@@ -492,10 +492,10 @@
492
492
  ramda "0.31.3"
493
493
  tsc-alias "1.8.16"
494
494
 
495
- "@raclettejs/types@^0.1.14":
496
- version "0.1.14"
497
- resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.14.tgz#585958921aaecab98dc301be4e1ce7207e90aeae"
498
- integrity sha512-Uh3006SOIUDQw5LFvPj2ewLKglBnORNY+9IE9cqsDFHXZo++/9eBwaEGPvQKTJ6XbjpJPxUezKvbtaaE8MMIFg==
495
+ "@raclettejs/types@^0.1.16":
496
+ version "0.1.16"
497
+ resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.16.tgz#9b8e6122c831b98822ec35bf90430dfb9a482aa6"
498
+ integrity sha512-HUkh4CP5yny3IwgYIHSh3zbpzakJgzmuRO3obtutVADO8tmRi9SAnQQMXK5X+3A51ZicdB9VPuhmw1r/Iv1SZA==
499
499
  dependencies:
500
500
  "@types/node" "24.5.2"
501
501
  fastify "5.6.0"