@dative-gpi/foundation-core-components 1.1.0 → 1.1.2
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/components/entities/FSSelectEntitiesList.vue +8 -0
- package/components/entities/FSSimpleEntitiesList.vue +2 -1
- package/components/lists/dashboards/FSSimpleDashboardsList.vue +2 -2
- package/components/lists/locations/FSBaseLocationsList.vue +3 -3
- package/components/lists/playlists/FSTilePlaylistsList.vue +93 -0
- package/components/tiles/FSLocationTile.vue +2 -1
- package/components/tiles/FSPlaylistTile.vue +78 -0
- package/package.json +7 -7
|
@@ -156,6 +156,14 @@ export default defineComponent({
|
|
|
156
156
|
switch(props.entityType) {
|
|
157
157
|
case EntityType.Device:
|
|
158
158
|
return T.DEVICES_SELECT;
|
|
159
|
+
case EntityType.Dashboard:
|
|
160
|
+
return T.DASHBOARDS_SELECT;
|
|
161
|
+
case EntityType.Group:
|
|
162
|
+
return T.GROUPS_SELECT;
|
|
163
|
+
case EntityType.Location:
|
|
164
|
+
return T.LOCATIONS_SELECT;
|
|
165
|
+
case EntityType.Model:
|
|
166
|
+
return T.MODELS_SELECT;
|
|
159
167
|
default:
|
|
160
168
|
return null;
|
|
161
169
|
};
|
|
@@ -59,7 +59,8 @@ export default defineComponent({
|
|
|
59
59
|
return {
|
|
60
60
|
...attrs,
|
|
61
61
|
dashboardOrganisationFilters : props.filters,
|
|
62
|
-
dashboardOrganisationTypeFilters : props.filters
|
|
62
|
+
dashboardOrganisationTypeFilters : props.filters,
|
|
63
|
+
dashboardShallowFilters : props.filters
|
|
63
64
|
};
|
|
64
65
|
case EntityType.Folder:
|
|
65
66
|
return {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import { defineComponent, type PropType, watch, computed } from "vue";
|
|
11
11
|
import _ from "lodash";
|
|
12
12
|
|
|
13
|
-
import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
13
|
+
import type { DashboardOrganisationFilters, DashboardOrganisationTypeFilters, DashboardShallowFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
14
14
|
import { useDashboardOrganisations, useDashboardOrganisationTypes, useDashboardShallows } from "@dative-gpi/foundation-core-services/composables";
|
|
15
15
|
|
|
16
16
|
import { DashboardType } from '@dative-gpi/foundation-shared-domain/enums';
|
|
@@ -78,7 +78,7 @@ export default defineComponent({
|
|
|
78
78
|
getManyDashboardShallows(props.dashboardShallowFilters);
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
watch(() => [props.dashboardOrganisationFilters, props.dashboardOrganisationTypeFilters], fetch, { immediate: true });
|
|
81
|
+
watch(() => [props.dashboardOrganisationFilters, props.dashboardOrganisationTypeFilters, props.dashboardShallowFilters], fetch, { immediate: true });
|
|
82
82
|
|
|
83
83
|
return {
|
|
84
84
|
dashboards,
|
|
@@ -31,14 +31,14 @@
|
|
|
31
31
|
>
|
|
32
32
|
<FSLocationTileUI
|
|
33
33
|
:key="index"
|
|
34
|
+
v-bind="item"
|
|
34
35
|
:bottomColor="item.colors"
|
|
35
|
-
:address="item.address.placeLabel"
|
|
36
36
|
:selectable="$props.selectable"
|
|
37
|
-
:singleSelect="singleSelect"
|
|
37
|
+
:singleSelect="$props.singleSelect"
|
|
38
38
|
:modelValue="isSelected(item.id)"
|
|
39
39
|
:to="$props.itemTo && $props.itemTo(item)"
|
|
40
40
|
@update:modelValue="toggleSelect(item)"
|
|
41
|
-
|
|
41
|
+
:address="item.address.formattedAddress"
|
|
42
42
|
/>
|
|
43
43
|
</template>
|
|
44
44
|
</FSDataTable>
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSTileList
|
|
3
|
+
:items="playlists"
|
|
4
|
+
:loading="fetching"
|
|
5
|
+
:selectable="$props.selectable"
|
|
6
|
+
:singleSelect="$props.singleSelect"
|
|
7
|
+
:modelValue="$props.modelValue"
|
|
8
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
9
|
+
v-bind="$attrs"
|
|
10
|
+
>
|
|
11
|
+
<template
|
|
12
|
+
v-for="(_, name) in $slots"
|
|
13
|
+
v-slot:[name]="slotData"
|
|
14
|
+
>
|
|
15
|
+
<slot
|
|
16
|
+
:name="name"
|
|
17
|
+
v-bind="slotData"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
20
|
+
<template
|
|
21
|
+
#item.tile="{ item, toggleSelect, direction }"
|
|
22
|
+
>
|
|
23
|
+
<FSPlaylistTileUI
|
|
24
|
+
:dashboardsCount="item.dashboards.length"
|
|
25
|
+
:selectable="$props.selectable"
|
|
26
|
+
:singleSelect="$props.singleSelect"
|
|
27
|
+
:modelValue="($props.modelValue ?? []).includes(item.id)"
|
|
28
|
+
:width="direction === ListDirections.Column ? 'fill' : undefined"
|
|
29
|
+
@update:modelValue="toggleSelect(item)"
|
|
30
|
+
v-bind="item"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
</FSTileList>
|
|
34
|
+
</template>
|
|
35
|
+
|
|
36
|
+
<script lang="ts">
|
|
37
|
+
import type { PropType} from "vue";
|
|
38
|
+
import { defineComponent, watch } from "vue";
|
|
39
|
+
|
|
40
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
41
|
+
import { ListDirections } from "@dative-gpi/foundation-shared-domain/enums";
|
|
42
|
+
|
|
43
|
+
import type { PlaylistFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
44
|
+
import { usePlaylists } from "@dative-gpi/foundation-core-services/composables";
|
|
45
|
+
|
|
46
|
+
import FSPlaylistTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSPlaylistTileUI.vue";
|
|
47
|
+
import FSTileList from "@dative-gpi/foundation-shared-components/components/lists/FSTileList.vue";
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
export default defineComponent({
|
|
51
|
+
title: "FSTilePlaylistsList",
|
|
52
|
+
components: {
|
|
53
|
+
FSPlaylistTileUI,
|
|
54
|
+
FSTileList
|
|
55
|
+
},
|
|
56
|
+
props: {
|
|
57
|
+
playlistFilters: {
|
|
58
|
+
type: Object as PropType<PlaylistFilters>,
|
|
59
|
+
required: true
|
|
60
|
+
},
|
|
61
|
+
modelValue: {
|
|
62
|
+
type: Array as PropType<string[]>,
|
|
63
|
+
required: false,
|
|
64
|
+
default: () => []
|
|
65
|
+
},
|
|
66
|
+
selectable: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
required: false,
|
|
69
|
+
default: false
|
|
70
|
+
},
|
|
71
|
+
singleSelect: {
|
|
72
|
+
type: Boolean,
|
|
73
|
+
required: false,
|
|
74
|
+
default: false
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
setup(props) {
|
|
78
|
+
const { entities: playlists, getMany, fetching } = usePlaylists();
|
|
79
|
+
|
|
80
|
+
const fetch = () => {
|
|
81
|
+
getMany(props.playlistFilters);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
watch(() => props.playlistFilters, fetch, { immediate: true });
|
|
85
|
+
return {
|
|
86
|
+
ListDirections,
|
|
87
|
+
playlists,
|
|
88
|
+
ColorEnum,
|
|
89
|
+
fetching
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
</script>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:label="entity.label"
|
|
12
12
|
:code="entity.code"
|
|
13
13
|
:color="entity.color"
|
|
14
|
-
:address="entity.address.
|
|
14
|
+
:address="entity.address.formattedAddress"
|
|
15
15
|
:deviceCount="entity.deviceOrganisationsCount"
|
|
16
16
|
:selectable="$props.selectable"
|
|
17
17
|
:modelValue="modelValue"
|
|
@@ -51,6 +51,7 @@ export default defineComponent({
|
|
|
51
51
|
}
|
|
52
52
|
},
|
|
53
53
|
emits: ['update:modelValue'],
|
|
54
|
+
inheritAttrs: false,
|
|
54
55
|
setup(props) {
|
|
55
56
|
const { get, getting, entity } = useLocation();
|
|
56
57
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSLoadTile
|
|
3
|
+
v-if="getting"
|
|
4
|
+
:selectable="$props.selectable"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
/>
|
|
8
|
+
<PlaylistTileUI
|
|
9
|
+
v-else-if="entity"
|
|
10
|
+
:dashboardsCount="entity.dashboards?.length ?? 0"
|
|
11
|
+
:looped="entity.looped"
|
|
12
|
+
:delay="entity.delay"
|
|
13
|
+
:label="entity.label"
|
|
14
|
+
:code="entity.code"
|
|
15
|
+
:selectable="$props.selectable"
|
|
16
|
+
:modelValue="$props.modelValue"
|
|
17
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
18
|
+
v-bind="$attrs"
|
|
19
|
+
>
|
|
20
|
+
<template
|
|
21
|
+
v-for="(_, name) in $slots"
|
|
22
|
+
v-slot:[name]="slotData"
|
|
23
|
+
>
|
|
24
|
+
<slot
|
|
25
|
+
:name="name"
|
|
26
|
+
v-bind="slotData"
|
|
27
|
+
/>
|
|
28
|
+
</template>
|
|
29
|
+
</PlaylistTileUI>
|
|
30
|
+
</template>
|
|
31
|
+
|
|
32
|
+
<script lang="ts">
|
|
33
|
+
import { defineComponent, watch } from "vue";
|
|
34
|
+
|
|
35
|
+
import { usePlaylist } from "@dative-gpi/foundation-core-services/composables";
|
|
36
|
+
|
|
37
|
+
import FSLoadTile from "@dative-gpi/foundation-shared-components/components/tiles/FSLoadTile.vue";
|
|
38
|
+
|
|
39
|
+
import PlaylistTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSPlaylistTileUI.vue";
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: "FSPlaylistTile",
|
|
44
|
+
components: {
|
|
45
|
+
PlaylistTileUI,
|
|
46
|
+
FSLoadTile
|
|
47
|
+
},
|
|
48
|
+
props: {
|
|
49
|
+
playlistId: {
|
|
50
|
+
type: String,
|
|
51
|
+
required: true
|
|
52
|
+
},
|
|
53
|
+
modelValue: {
|
|
54
|
+
type: Boolean,
|
|
55
|
+
required: false,
|
|
56
|
+
default: false
|
|
57
|
+
},
|
|
58
|
+
selectable: {
|
|
59
|
+
type: Boolean,
|
|
60
|
+
required: false,
|
|
61
|
+
default: false
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
emits: ["update:modelValue"],
|
|
65
|
+
setup(props) {
|
|
66
|
+
const { get, getting, entity } = usePlaylist();
|
|
67
|
+
|
|
68
|
+
watch(() => props.playlistId, () => {
|
|
69
|
+
get(props.playlistId);
|
|
70
|
+
}, { immediate: true });
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
getting,
|
|
74
|
+
entity
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
</script>
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"url": "https://github.com/Dative-GPI/foundation-shared-ui.git"
|
|
5
5
|
},
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"version": "1.1.
|
|
7
|
+
"version": "1.1.2",
|
|
8
8
|
"description": "",
|
|
9
9
|
"publishConfig": {
|
|
10
10
|
"access": "public"
|
|
@@ -13,11 +13,11 @@
|
|
|
13
13
|
"author": "",
|
|
14
14
|
"license": "ISC",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@dative-gpi/foundation-core-domain": "1.1.
|
|
17
|
-
"@dative-gpi/foundation-core-services": "1.1.
|
|
18
|
-
"@dative-gpi/foundation-shared-components": "1.1.
|
|
19
|
-
"@dative-gpi/foundation-shared-domain": "1.1.
|
|
20
|
-
"@dative-gpi/foundation-shared-services": "1.1.
|
|
16
|
+
"@dative-gpi/foundation-core-domain": "1.1.2",
|
|
17
|
+
"@dative-gpi/foundation-core-services": "1.1.2",
|
|
18
|
+
"@dative-gpi/foundation-shared-components": "1.1.2",
|
|
19
|
+
"@dative-gpi/foundation-shared-domain": "1.1.2",
|
|
20
|
+
"@dative-gpi/foundation-shared-services": "1.1.2"
|
|
21
21
|
},
|
|
22
22
|
"peerDependencies": {
|
|
23
23
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"sass": "1.71.1",
|
|
30
30
|
"sass-loader": "13.3.2"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "de9d8959468d94abe835e551090afbc46ecb4f86"
|
|
33
33
|
}
|