@dative-gpi/foundation-core-components 1.0.164-kiosk → 1.0.164-notification
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.164-
|
|
4
|
+
"version": "1.0.164-notification",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-core-domain": "1.0.164-
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.164-
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.164-
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.164-
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.164-
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.164-notification",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.164-notification",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.164-notification",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.164-notification",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.164-notification"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "e5b94008c24ba67bc62bfadf7cdcf37c6e12cea5"
|
|
30
30
|
}
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSCol>
|
|
3
|
-
<FSSearchField
|
|
4
|
-
v-model="search"
|
|
5
|
-
/>
|
|
6
|
-
<FSFadeOut
|
|
7
|
-
:maxHeight="$props.maxHeight"
|
|
8
|
-
>
|
|
9
|
-
<FSDataTable
|
|
10
|
-
defaultMode="iterator"
|
|
11
|
-
:loading="fetchingPlaylists"
|
|
12
|
-
:items="playlists"
|
|
13
|
-
:showSearch="false"
|
|
14
|
-
:modelValue="$props.modelValue"
|
|
15
|
-
:disableTable="true"
|
|
16
|
-
:search="search"
|
|
17
|
-
:tableCode="$props.tableCode"
|
|
18
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
19
|
-
v-bind="$attrs"
|
|
20
|
-
>
|
|
21
|
-
<template
|
|
22
|
-
v-for="(_, name) in $slots"
|
|
23
|
-
v-slot:[name]="slotData"
|
|
24
|
-
>
|
|
25
|
-
<slot
|
|
26
|
-
:name="name"
|
|
27
|
-
v-bind="slotData"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
<template
|
|
31
|
-
#item.tile="{ item }"
|
|
32
|
-
>
|
|
33
|
-
<FSClickable
|
|
34
|
-
padding="12px"
|
|
35
|
-
height="60px"
|
|
36
|
-
width="216px"
|
|
37
|
-
:color="isSelected(item.id) ? ColorEnum.Primary : ColorEnum.Dark"
|
|
38
|
-
@click="$emit('update:modelValue', [item.id])"
|
|
39
|
-
v-bind="$attrs"
|
|
40
|
-
>
|
|
41
|
-
<template
|
|
42
|
-
#default
|
|
43
|
-
>
|
|
44
|
-
<FSRow
|
|
45
|
-
align="center-center"
|
|
46
|
-
gap="24px"
|
|
47
|
-
:wrap="false"
|
|
48
|
-
>
|
|
49
|
-
<FSSpan
|
|
50
|
-
font="text-overline"
|
|
51
|
-
:lineClamp="1"
|
|
52
|
-
>
|
|
53
|
-
{{ item.label }}
|
|
54
|
-
</FSSpan>
|
|
55
|
-
<FSButton
|
|
56
|
-
variant="icon"
|
|
57
|
-
icon="mdi-trash-can-outline"
|
|
58
|
-
:color="ColorEnum.Error"
|
|
59
|
-
@click="dialog = true"
|
|
60
|
-
/>
|
|
61
|
-
</FSRow>
|
|
62
|
-
</template>
|
|
63
|
-
</FSClickable>
|
|
64
|
-
<FSDialogRemove
|
|
65
|
-
:removing="removingPlaylist"
|
|
66
|
-
:error="error"
|
|
67
|
-
:removeTotal="1"
|
|
68
|
-
:removeCurrent="0"
|
|
69
|
-
@click:submitButton="onRemove(item.id)"
|
|
70
|
-
v-model="dialog"
|
|
71
|
-
/>
|
|
72
|
-
</template>
|
|
73
|
-
</FSDataTable>
|
|
74
|
-
</FSFadeOut>
|
|
75
|
-
</FSCol>
|
|
76
|
-
</template>
|
|
77
|
-
|
|
78
|
-
<script lang="ts">
|
|
79
|
-
import { defineComponent, type PropType, ref, watch } from "vue";
|
|
80
|
-
|
|
81
|
-
import type { PlaylistFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
82
|
-
|
|
83
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
84
|
-
import { usePlaylists, useRemovePlaylist } from "@dative-gpi/foundation-core-services/composables";
|
|
85
|
-
|
|
86
|
-
import FSSearchField from "@dative-gpi/foundation-shared-components/components/fields/FSSearchField.vue";
|
|
87
|
-
import FSDialogRemove from "@dative-gpi/foundation-shared-components/components/FSDialogRemove.vue";
|
|
88
|
-
import FSClickable from "@dative-gpi/foundation-shared-components/components/FSClickable.vue";
|
|
89
|
-
import FSFadeOut from "@dative-gpi/foundation-shared-components/components/FSFadeOut.vue";
|
|
90
|
-
import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
|
|
91
|
-
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
92
|
-
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
93
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
94
|
-
import FSDataTable from "../FSDataTable.vue";
|
|
95
|
-
|
|
96
|
-
export default defineComponent({
|
|
97
|
-
name: "BasePlaylistsList",
|
|
98
|
-
components:{
|
|
99
|
-
FSDialogRemove,
|
|
100
|
-
FSSearchField,
|
|
101
|
-
FSDataTable,
|
|
102
|
-
FSClickable,
|
|
103
|
-
FSFadeOut,
|
|
104
|
-
FSButton,
|
|
105
|
-
FSSpan,
|
|
106
|
-
FSCol,
|
|
107
|
-
FSRow
|
|
108
|
-
},
|
|
109
|
-
props: {
|
|
110
|
-
playlistFilters: {
|
|
111
|
-
type: Object as PropType<PlaylistFilters>,
|
|
112
|
-
required: false,
|
|
113
|
-
default: null
|
|
114
|
-
},
|
|
115
|
-
modelValue: {
|
|
116
|
-
type: Array as PropType<string[]>,
|
|
117
|
-
default: () => [],
|
|
118
|
-
required: false
|
|
119
|
-
},
|
|
120
|
-
tableCode: {
|
|
121
|
-
type: String,
|
|
122
|
-
required: false
|
|
123
|
-
},
|
|
124
|
-
maxHeight: {
|
|
125
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null | undefined>,
|
|
126
|
-
required: false,
|
|
127
|
-
default: undefined
|
|
128
|
-
}
|
|
129
|
-
},
|
|
130
|
-
emits: ["update:modelValue"],
|
|
131
|
-
setup(props) {
|
|
132
|
-
const { getMany: fetchPlaylists, fetching: fetchingPlaylists, entities: playlists } = usePlaylists();
|
|
133
|
-
const { removing: removingPlaylist, remove: removePlaylist } = useRemovePlaylist();
|
|
134
|
-
const search = ref<string | undefined>();
|
|
135
|
-
const error = ref<string | null>(null);
|
|
136
|
-
const dialog = ref(false);
|
|
137
|
-
|
|
138
|
-
const isSelected = (id: string): boolean => {
|
|
139
|
-
return props.modelValue.includes(id);
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const onRemove = async (playlistId: string) => {
|
|
143
|
-
if(!playlistId){
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
try {
|
|
147
|
-
error.value = null;
|
|
148
|
-
await removePlaylist(playlistId);
|
|
149
|
-
dialog.value = false;
|
|
150
|
-
}
|
|
151
|
-
catch (exception: any) {
|
|
152
|
-
error.value = exception.response.data;
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
watch([() => props.playlistFilters, search] , () => {
|
|
157
|
-
fetchPlaylists({...props.playlistFilters, search: search.value});
|
|
158
|
-
}, { immediate: true, deep: true });
|
|
159
|
-
|
|
160
|
-
return {
|
|
161
|
-
fetchingPlaylists,
|
|
162
|
-
removingPlaylist,
|
|
163
|
-
playlists,
|
|
164
|
-
ColorEnum,
|
|
165
|
-
search,
|
|
166
|
-
dialog,
|
|
167
|
-
error,
|
|
168
|
-
isSelected,
|
|
169
|
-
onRemove
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
});
|
|
173
|
-
</script>
|