@dative-gpi/foundation-core-components 0.0.148 → 0.0.149
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.
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSelectField
|
|
3
|
+
:items="selectedEntities"
|
|
4
|
+
:clearable="false"
|
|
5
|
+
:modelValue="$props.modelValue"
|
|
6
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
+
v-bind="$attrs"
|
|
8
|
+
/>
|
|
9
|
+
</template>
|
|
10
|
+
|
|
11
|
+
<script lang="ts">
|
|
12
|
+
import { computed, PropType, defineComponent } from "vue";
|
|
13
|
+
|
|
14
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
15
|
+
import { SelectedEntities } from "@dative-gpi/foundation-core-domain/models";
|
|
16
|
+
|
|
17
|
+
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
18
|
+
|
|
19
|
+
export default defineComponent({
|
|
20
|
+
name: "FSSelectSelectedEntities",
|
|
21
|
+
components: {
|
|
22
|
+
FSSelectField
|
|
23
|
+
},
|
|
24
|
+
props: {
|
|
25
|
+
modelValue: {
|
|
26
|
+
type: Number as PropType<SelectedEntities>,
|
|
27
|
+
required: false,
|
|
28
|
+
default: SelectedEntities.Devices
|
|
29
|
+
},
|
|
30
|
+
useNone: {
|
|
31
|
+
type: Boolean,
|
|
32
|
+
required: false,
|
|
33
|
+
default: false
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
emits: ["update:modelValue"],
|
|
37
|
+
setup(props) {
|
|
38
|
+
const { $tr } = useTranslationsProvider();
|
|
39
|
+
|
|
40
|
+
const selectedEntities = computed((): { id: SelectedEntities; label: string }[] => {
|
|
41
|
+
const items = [
|
|
42
|
+
{ id: SelectedEntities.Models, label: $tr("ui.selected-entities.models", "Models") },
|
|
43
|
+
{ id: SelectedEntities.Devices, label: $tr("ui.selected-entities.devices", "Devices") },
|
|
44
|
+
{ id: SelectedEntities.Groups, label: $tr("ui.selected-entities.groups", "Groups") },
|
|
45
|
+
{ id: SelectedEntities.Locations, label: $tr("ui.selected-entities.locations", "Locations") }
|
|
46
|
+
];
|
|
47
|
+
if (props.useNone) {
|
|
48
|
+
items.unshift({ id: SelectedEntities.None, label: $tr("ui.selected-entities.none", "None") });
|
|
49
|
+
}
|
|
50
|
+
return items;
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
selectedEntities
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.149",
|
|
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": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "0.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "0.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "0.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "0.0.149",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "0.0.149",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "0.0.149",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "0.0.149",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "0.0.149",
|
|
18
18
|
"color": "^4.2.3",
|
|
19
19
|
"vue": "^3.4.23",
|
|
20
20
|
"vuedraggable": "^4.1.0"
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"sass": "^1.69.5",
|
|
25
25
|
"sass-loader": "^13.3.2"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "530e113f98626a38763ac4afcc4d828d69bcfc2d"
|
|
28
28
|
}
|