@raclettejs/workbench 0.1.16 → 0.1.17
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 +2 -1
- package/package.json +3 -3
- package/plugins/pacifico__compositions/frontend/widgets/CompositionListWidget.vue +11 -3
- package/plugins/pacifico__interactionLinks/frontend/widgets/InteractionLinkListWidget.vue +11 -3
- package/plugins/pacifico__tags/frontend/widgets/TagListWidget.vue +11 -2
- package/plugins/pacifico__users/frontend/widgets/UserListWidget.vue +11 -3
- package/services/frontend/src/app/components/BaseDataTable.vue +8 -2
- package/yarn.lock +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [0.1.
|
|
10
|
+
## [0.1.17] - 06.11.2025 <a href="https://gitlab.com/raclettejs/workbench/-/compare/v0.1.15...v0.1.17" target="_blank" rel="noopener"><b>Overview of all changes</b></a>
|
|
11
11
|
|
|
12
12
|
### Added
|
|
13
13
|
|
|
14
14
|
- added isDeleted switch to lists
|
|
15
|
+
- added hard deletion to all core types
|
|
15
16
|
|
|
16
17
|
## [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>
|
|
17
18
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@raclettejs/workbench",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.17",
|
|
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.
|
|
34
|
+
"@raclettejs/core": "0.1.17",
|
|
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.
|
|
40
|
+
"@raclettejs/types": "0.1.17",
|
|
41
41
|
"@sinclair/typebox": "0.34.41",
|
|
42
42
|
"@types/ramda": "0.31.1",
|
|
43
43
|
"@vueuse/core": "13.9.0",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:data-name="$t('workbench.compositionList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.compositionList.dataArticle')"
|
|
10
10
|
@delete="deleteComposition"
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
11
12
|
>
|
|
12
13
|
<template #actions>
|
|
13
14
|
<v-tooltip
|
|
@@ -100,7 +101,9 @@ const { data: users } = $data.user.getAll({
|
|
|
100
101
|
const { execute: executeDelete } = await $data.composition.delete({
|
|
101
102
|
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
102
103
|
})
|
|
103
|
-
|
|
104
|
+
const { execute: executeHardDelete } = await $data.composition.deleteHard({
|
|
105
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
106
|
+
})
|
|
104
107
|
const parsedCompositions = computed(() => {
|
|
105
108
|
if (compositions.value && tags.value) {
|
|
106
109
|
return Object.values(
|
|
@@ -144,8 +147,13 @@ const getStatusColor = (status: string) => {
|
|
|
144
147
|
}
|
|
145
148
|
}
|
|
146
149
|
|
|
147
|
-
const deleteComposition = async (composition: Composition) =>
|
|
148
|
-
|
|
150
|
+
const deleteComposition = async (composition: Composition) => {
|
|
151
|
+
if (showDeleted.value) {
|
|
152
|
+
await executeHardDelete({ _id: composition._id })
|
|
153
|
+
} else {
|
|
154
|
+
await executeDelete({ _id: composition._id })
|
|
155
|
+
}
|
|
156
|
+
}
|
|
149
157
|
|
|
150
158
|
$socket.on("compositionCreated", () =>
|
|
151
159
|
execute({ isDeleted: showDeleted.value }),
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:data-name="$t('workbench.interactionLinkList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.interactionLinkList.dataArticle')"
|
|
10
10
|
@delete="deleteInteractionLink"
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
11
12
|
>
|
|
12
13
|
<template #actions>
|
|
13
14
|
<v-tooltip
|
|
@@ -110,7 +111,9 @@ const { data: compositions } = $data.composition.getAll({
|
|
|
110
111
|
const { execute: executeDelete } = $data.interactionLink.delete({
|
|
111
112
|
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
112
113
|
})
|
|
113
|
-
|
|
114
|
+
const { execute: executeHardDelete } = await $data.interactionLink.deleteHard({
|
|
115
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
116
|
+
})
|
|
114
117
|
const parsedInteractionLinks = computed(() => {
|
|
115
118
|
if (interactionLinks.value && tags.value) {
|
|
116
119
|
return Object.values(
|
|
@@ -138,8 +141,13 @@ const parsedInteractionLinks = computed(() => {
|
|
|
138
141
|
return []
|
|
139
142
|
})
|
|
140
143
|
|
|
141
|
-
const deleteInteractionLink = async (interactionLink: InteractionLink) =>
|
|
142
|
-
|
|
144
|
+
const deleteInteractionLink = async (interactionLink: InteractionLink) => {
|
|
145
|
+
if (showDeleted.value) {
|
|
146
|
+
await executeHardDelete({ _id: interactionLink._id })
|
|
147
|
+
} else {
|
|
148
|
+
await executeDelete({ _id: interactionLink._id })
|
|
149
|
+
}
|
|
150
|
+
}
|
|
143
151
|
|
|
144
152
|
$socket.on("interactionLinkCreated", () =>
|
|
145
153
|
execute({ isDeleted: showDeleted.value }),
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
:data-name="$t('workbench.tagList.dataName')"
|
|
9
9
|
:data-article="$t('workbench.tagList.dataArticle')"
|
|
10
10
|
@delete="deleteTag"
|
|
11
|
+
:itemsDeleted="showDeleted"
|
|
11
12
|
>
|
|
12
13
|
<template #actions>
|
|
13
14
|
<v-tooltip
|
|
@@ -79,7 +80,9 @@ const {
|
|
|
79
80
|
const { execute: executeDelete } = $data.tag.delete({
|
|
80
81
|
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
81
82
|
})
|
|
82
|
-
|
|
83
|
+
const { execute: executeHardDelete } = await $data.tag.deleteHard({
|
|
84
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
85
|
+
})
|
|
83
86
|
const parsedTags = computed(() => {
|
|
84
87
|
if (tags.value) {
|
|
85
88
|
return Object.values(tags.value as { [key: string]: Tag }).map((tag) => ({
|
|
@@ -91,7 +94,13 @@ const parsedTags = computed(() => {
|
|
|
91
94
|
return []
|
|
92
95
|
})
|
|
93
96
|
|
|
94
|
-
const deleteTag = async (tag: Tag) =>
|
|
97
|
+
const deleteTag = async (tag: Tag) => {
|
|
98
|
+
if (showDeleted.value) {
|
|
99
|
+
await executeHardDelete({ _id: tag._id })
|
|
100
|
+
} else {
|
|
101
|
+
await executeDelete({ _id: tag._id })
|
|
102
|
+
}
|
|
103
|
+
}
|
|
95
104
|
|
|
96
105
|
$socket.on("tagCreated", () => execute({ isDeleted: showDeleted.value }))
|
|
97
106
|
watch(
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
:data-article="$t('workbench.userList.dataArticle')"
|
|
10
10
|
:delete-validator="(user) => user._id !== $user?._id"
|
|
11
11
|
@delete="deleteUser"
|
|
12
|
+
:itemsDeleted="showDeleted"
|
|
12
13
|
>
|
|
13
14
|
<template #actions>
|
|
14
15
|
<v-tooltip
|
|
@@ -82,7 +83,9 @@ const { data: tags, isLoading: tagsLoading } = $data.tag.getAll({
|
|
|
82
83
|
const { execute: executeDelete } = $data.user.delete({
|
|
83
84
|
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
84
85
|
})
|
|
85
|
-
|
|
86
|
+
const { execute: executeHardDelete } = await $data.user.deleteHard({
|
|
87
|
+
options: { cb: () => execute({ isDeleted: showDeleted.value }) },
|
|
88
|
+
})
|
|
86
89
|
const parsedUsers = computed(() => {
|
|
87
90
|
if (users.value && tags.value) {
|
|
88
91
|
return Object.values(users.value as { [key: string]: User }).map(
|
|
@@ -95,8 +98,13 @@ const parsedUsers = computed(() => {
|
|
|
95
98
|
}
|
|
96
99
|
return []
|
|
97
100
|
})
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
const deleteUser = async (user: User) => {
|
|
102
|
+
if (showDeleted.value) {
|
|
103
|
+
await executeHardDelete({ _id: user._id })
|
|
104
|
+
} else {
|
|
105
|
+
await executeDelete({ _id: user._id })
|
|
106
|
+
}
|
|
107
|
+
}
|
|
100
108
|
|
|
101
109
|
$socket.on("userCreated", () => execute({ isDeleted: showDeleted.value }))
|
|
102
110
|
watch(
|
|
@@ -35,7 +35,6 @@
|
|
|
35
35
|
<!-- Additional action buttons slot -->
|
|
36
36
|
<slot name="actions" />
|
|
37
37
|
</div>
|
|
38
|
-
|
|
39
38
|
<!-- Data Table -->
|
|
40
39
|
<v-data-table
|
|
41
40
|
v-model:search="search"
|
|
@@ -47,6 +46,7 @@
|
|
|
47
46
|
:items="items"
|
|
48
47
|
:loading="loading"
|
|
49
48
|
@click:row="handleRowClick"
|
|
49
|
+
:class="{ itemsDeleted }"
|
|
50
50
|
>
|
|
51
51
|
<template
|
|
52
52
|
#item.color="{ item }"
|
|
@@ -168,7 +168,7 @@ export interface BaseDataTableProps<T> {
|
|
|
168
168
|
// Data props
|
|
169
169
|
items?: T[]
|
|
170
170
|
loading?: boolean
|
|
171
|
-
|
|
171
|
+
itemsDeleted?: boolean
|
|
172
172
|
// Table configuration
|
|
173
173
|
headers: Array<{
|
|
174
174
|
title: string
|
|
@@ -201,6 +201,7 @@ export interface BaseDataTableProps<T> {
|
|
|
201
201
|
const props = withDefaults(defineProps<BaseDataTableProps<T>>(), {
|
|
202
202
|
uuid: undefined,
|
|
203
203
|
items: () => [],
|
|
204
|
+
itemsDeleted: false,
|
|
204
205
|
itemsPerPage: 50,
|
|
205
206
|
showCreateButton: true,
|
|
206
207
|
showActionsColumn: true,
|
|
@@ -292,3 +293,8 @@ const isDeleteDisabled = (item: T): boolean => {
|
|
|
292
293
|
return props.deleteValidator ? !props.deleteValidator(item) : false
|
|
293
294
|
}
|
|
294
295
|
</script>
|
|
296
|
+
<style lang="css">
|
|
297
|
+
.itemsDeleted .v-data-table__tr {
|
|
298
|
+
background-color: rgb(233, 190, 190);
|
|
299
|
+
}
|
|
300
|
+
</style>
|
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
|
|
480
|
-
version "0.1.
|
|
481
|
-
resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.
|
|
482
|
-
integrity sha512-
|
|
479
|
+
"@raclettejs/core@0.1.17":
|
|
480
|
+
version "0.1.17"
|
|
481
|
+
resolved "https://registry.yarnpkg.com/@raclettejs/core/-/core-0.1.17.tgz#36712a73791a5115b09c50fcbe8856793dd9ed9c"
|
|
482
|
+
integrity sha512-dMUW+/TikBRbZ4gOEvmSlwKJyRtvvGyJ9VFvhTbvYPMTjmnT/OzOIN9WMj6wG8b2tYFSNWtq+RNSQuc/G/nLxw==
|
|
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
|
|
496
|
-
version "0.1.
|
|
497
|
-
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.
|
|
498
|
-
integrity sha512-
|
|
495
|
+
"@raclettejs/types@0.1.17":
|
|
496
|
+
version "0.1.17"
|
|
497
|
+
resolved "https://registry.yarnpkg.com/@raclettejs/types/-/types-0.1.17.tgz#ced377e5fa8879a5790b1c0c838f621917032690"
|
|
498
|
+
integrity sha512-WBhi6Nf/XJPlisF1stEB0KGo5TWw+EMaTuYt39fJKc+Vtyf/SFmZqP2D3BKlssE5N/8bo2DFgf2qUeKowo0onA==
|
|
499
499
|
dependencies:
|
|
500
500
|
"@types/node" "24.5.2"
|
|
501
501
|
fastify "5.6.0"
|