@dative-gpi/foundation-core-components 1.0.108 → 1.0.110
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 +7 -7
- package/components/selects/FSAggregationSelector.vue +0 -52
- package/components/selects/FSAxisTypeSelector.vue +0 -49
- package/components/selects/FSDisplayAsSelector.vue +0 -53
- package/components/selects/FSFilterTypeSelector.vue +0 -54
- package/components/selects/FSHeatmapRuleSelector.vue +0 -54
- package/components/selects/FSOperationOnSelector.vue +0 -53
- package/components/selects/FSPlanningTypeSelector.vue +0 -53
- package/components/selects/FSPlotPerSelector.vue +0 -52
- package/components/selects/FSSelectEntityType.vue +0 -59
- package/components/selects/FSSerieTypeSelector.vue +0 -53
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.
|
|
4
|
+
"version": "1.0.110",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-core-services": "1.0.
|
|
15
|
-
"@dative-gpi/foundation-shared-components": "1.0.
|
|
16
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
17
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-core-domain": "1.0.110",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.110",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.110",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.110",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.110"
|
|
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": "ce27d3542d6a82946127e9004d82ff2f401d7242"
|
|
30
30
|
}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.aggregation-type','Aggregation')"
|
|
4
|
-
:items="aggregationTypeItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import { AggregationType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { aggregationTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
export default defineComponent({
|
|
22
|
-
components: {
|
|
23
|
-
FSAutocompleteField
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
modelValue : {
|
|
27
|
-
type: Number as PropType<AggregationType>,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
label : {
|
|
31
|
-
type: String,
|
|
32
|
-
required: false
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
emits: ['update:modelValue'],
|
|
36
|
-
setup() {
|
|
37
|
-
|
|
38
|
-
const aggregationTypeItems = computed(()=>{
|
|
39
|
-
return getEnumEntries(AggregationType).filter(f=>f.value != AggregationType.None).map((f)=>{
|
|
40
|
-
return {
|
|
41
|
-
id: f.value,
|
|
42
|
-
label: aggregationTypeLabel(f.value)
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
aggregationTypeItems
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSToggleSet
|
|
3
|
-
:hideHeader="true"
|
|
4
|
-
:values="axisTypeItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {AxisType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { axisTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSToggleSet from "@dative-gpi/foundation-shared-components/components/FSToggleSet.vue";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSToggleSet
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<AxisType>,
|
|
29
|
-
required: false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
emits: ['update:modelValue'],
|
|
33
|
-
setup() {
|
|
34
|
-
|
|
35
|
-
const axisTypeItems = computed(()=>{
|
|
36
|
-
return getEnumEntries(AxisType).map((f)=>{
|
|
37
|
-
return {
|
|
38
|
-
id: f.value,
|
|
39
|
-
label: axisTypeLabel(f.value)
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
return {
|
|
45
|
-
axisTypeItems
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
})
|
|
49
|
-
</script>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.display-as','Display as')"
|
|
4
|
-
:items="displayAsItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {DisplayAs} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { displayAsLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
export default defineComponent({
|
|
22
|
-
components: {
|
|
23
|
-
FSAutocompleteField
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: Number as PropType<DisplayAs>,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
label: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: false
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
emits: ['update:modelValue'],
|
|
37
|
-
setup() {
|
|
38
|
-
|
|
39
|
-
const displayAsItems = computed(()=>{
|
|
40
|
-
return getEnumEntries(DisplayAs).filter(f=>f.value != DisplayAs.None).map((f)=>{
|
|
41
|
-
return {
|
|
42
|
-
id: f.value,
|
|
43
|
-
label: displayAsLabel(f.value)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
displayAsItems,
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.filter-type','Filter type')"
|
|
4
|
-
:toggleSet="true"
|
|
5
|
-
:items="filterTypeItems"
|
|
6
|
-
:modelValue="modelValue"
|
|
7
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
/>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
14
|
-
|
|
15
|
-
import {FilterType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
16
|
-
|
|
17
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
18
|
-
import { filterTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
19
|
-
|
|
20
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSAutocompleteField
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<FilterType>,
|
|
29
|
-
required: false,
|
|
30
|
-
default : FilterType.None
|
|
31
|
-
},
|
|
32
|
-
label: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: false
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
emits: ['update:modelValue'],
|
|
38
|
-
setup() {
|
|
39
|
-
|
|
40
|
-
const filterTypeItems = computed(()=>{
|
|
41
|
-
return getEnumEntries(FilterType).filter(f=>f.value != FilterType.None).map((f)=>{
|
|
42
|
-
return {
|
|
43
|
-
id: f.value,
|
|
44
|
-
label: filterTypeLabel(f.value)
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
filterTypeItems
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
</script>
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.heat-rule','Heat rule')"
|
|
4
|
-
:items="heatmapRuleItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {HeatmapRule} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { heatmapRuleLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSAutocompleteField
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<HeatmapRule>,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
emits: ['update:modelValue'],
|
|
38
|
-
setup() {
|
|
39
|
-
|
|
40
|
-
const heatmapRuleItems = computed(()=>{
|
|
41
|
-
return getEnumEntries(HeatmapRule).filter(f=>f.value != HeatmapRule.None).map((f)=>{
|
|
42
|
-
return {
|
|
43
|
-
id: f.value,
|
|
44
|
-
label: heatmapRuleLabel(f.value)
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
return {
|
|
50
|
-
heatmapRuleItems
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
</script>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.operation-on','Operation on')"
|
|
4
|
-
:items="operationOnItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {OperationOn} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { operationOnLabel} from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSAutocompleteField
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<OperationOn>,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
label : {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ['update:modelValue'],
|
|
37
|
-
setup() {
|
|
38
|
-
|
|
39
|
-
const operationOnItems = computed(()=>{
|
|
40
|
-
return getEnumEntries(OperationOn).filter(f=>f.value != OperationOn.None).map((f)=>{
|
|
41
|
-
return {
|
|
42
|
-
id: f.value,
|
|
43
|
-
label: operationOnLabel(f.value)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
operationOnItems
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.planning-type','Planning type')"
|
|
4
|
-
:items="planningTypeItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {PlanningType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { planningTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSAutocompleteField
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<PlanningType>,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ['update:modelValue'],
|
|
37
|
-
setup() {
|
|
38
|
-
|
|
39
|
-
const planningTypeItems = computed(()=>{
|
|
40
|
-
return getEnumEntries(PlanningType).filter(f=>f.value != PlanningType.None).map((f)=>{
|
|
41
|
-
return {
|
|
42
|
-
id: f.value,
|
|
43
|
-
label: planningTypeLabel(f.value)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
planningTypeItems
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
</script>
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.plot-per','Plot per')"
|
|
4
|
-
:items="plotPerItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {PlotPer} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { plotPerLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
export default defineComponent({
|
|
22
|
-
components: {
|
|
23
|
-
FSAutocompleteField
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: Number as PropType<PlotPer>,
|
|
28
|
-
required: false
|
|
29
|
-
},
|
|
30
|
-
label: {
|
|
31
|
-
type: String,
|
|
32
|
-
required: false
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
emits: ['update:modelValue'],
|
|
36
|
-
setup() {
|
|
37
|
-
|
|
38
|
-
const plotPerItems = computed(()=>{
|
|
39
|
-
return getEnumEntries(PlotPer).filter(f=>f.value != PlotPer.None).map((f)=>{
|
|
40
|
-
return {
|
|
41
|
-
id: f.value,
|
|
42
|
-
label: plotPerLabel(f.value)
|
|
43
|
-
}
|
|
44
|
-
})
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
return {
|
|
48
|
-
plotPerItems
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
</script>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSSelectField
|
|
3
|
-
:items="entityTypes"
|
|
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 type { PropType} from "vue";
|
|
13
|
-
import { computed, defineComponent } from "vue";
|
|
14
|
-
|
|
15
|
-
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
16
|
-
import { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
17
|
-
|
|
18
|
-
import FSSelectField from "@dative-gpi/foundation-shared-components/components/fields/FSSelectField.vue";
|
|
19
|
-
|
|
20
|
-
export default defineComponent({
|
|
21
|
-
name: "FSSelectEntityType",
|
|
22
|
-
components: {
|
|
23
|
-
FSSelectField
|
|
24
|
-
},
|
|
25
|
-
props: {
|
|
26
|
-
modelValue: {
|
|
27
|
-
type: Number as PropType<EntityType>,
|
|
28
|
-
required: false,
|
|
29
|
-
default: EntityType.Device
|
|
30
|
-
},
|
|
31
|
-
useNone: {
|
|
32
|
-
type: Boolean,
|
|
33
|
-
required: false,
|
|
34
|
-
default: false
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
emits: ["update:modelValue"],
|
|
38
|
-
setup(props) {
|
|
39
|
-
const { $tr } = useTranslationsProvider();
|
|
40
|
-
|
|
41
|
-
const entityTypes = computed((): { id: EntityType; label: string }[] => {
|
|
42
|
-
const items = [
|
|
43
|
-
{ id: EntityType.Model, label: $tr("ui.entity-type.models", "Models") },
|
|
44
|
-
{ id: EntityType.Device, label: $tr("ui.entity-type.devices", "Devices") },
|
|
45
|
-
{ id: EntityType.Group, label: $tr("ui.entity-type.groups", "Groups") },
|
|
46
|
-
{ id: EntityType.Location, label: $tr("ui.entity-type.locations", "Locations") }
|
|
47
|
-
];
|
|
48
|
-
if (props.useNone) {
|
|
49
|
-
items.unshift({ id: EntityType.None, label: $tr("ui.entity-type.none", "None") });
|
|
50
|
-
}
|
|
51
|
-
return items;
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
return {
|
|
55
|
-
entityTypes
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
</script>
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.serie-type','Serie type')"
|
|
4
|
-
:items="serieTypeItems"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
7
|
-
v-bind="$attrs"
|
|
8
|
-
/>
|
|
9
|
-
</template>
|
|
10
|
-
|
|
11
|
-
<script lang="ts">
|
|
12
|
-
import { computed, defineComponent, type PropType } from "vue";
|
|
13
|
-
|
|
14
|
-
import {SerieType} from "@dative-gpi/foundation-shared-domain/enums";
|
|
15
|
-
|
|
16
|
-
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
17
|
-
import { serieTypeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
18
|
-
|
|
19
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
export default defineComponent({
|
|
23
|
-
components: {
|
|
24
|
-
FSAutocompleteField
|
|
25
|
-
},
|
|
26
|
-
props: {
|
|
27
|
-
modelValue: {
|
|
28
|
-
type: Number as PropType<SerieType>,
|
|
29
|
-
required: false
|
|
30
|
-
},
|
|
31
|
-
label: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
emits: ['update:modelValue'],
|
|
37
|
-
setup() {
|
|
38
|
-
|
|
39
|
-
const serieTypeItems = computed(()=>{
|
|
40
|
-
return getEnumEntries(SerieType).filter(f=>f.value != SerieType.None).map((f)=>{
|
|
41
|
-
return {
|
|
42
|
-
id: f.value,
|
|
43
|
-
label: serieTypeLabel(f.value)
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
});
|
|
47
|
-
|
|
48
|
-
return {
|
|
49
|
-
serieTypeItems
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
</script>
|