@dative-gpi/foundation-core-components 1.0.29 → 1.0.31
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/autocompletes/FSAutocompleteChart.vue +2 -2
- package/components/autocompletes/FSAutocompleteDashboard.vue +1 -0
- package/components/autocompletes/FSAutocompleteDataCategory.vue +37 -7
- package/components/autocompletes/FSAutocompleteDataDefinition.vue +30 -12
- package/components/autocompletes/FSAutocompleteModel.vue +1 -1
- package/components/autocompletes/FSAutocompleteRole.vue +2 -2
- package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +120 -0
- package/components/autocompletes/FSAutocompleteUserOrganisation.vue +7 -18
- package/package.json +7 -7
- package/components/selects/FSDataCategorySelector.vue +0 -139
- package/components/selects/FSDataDefinitionSelector.vue +0 -105
- package/components/selects/FSModelSelector.vue +0 -56
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
@click="props.toggle(props.item)"
|
|
68
68
|
>
|
|
69
69
|
<template
|
|
70
|
+
v-if="props.item.type"
|
|
70
71
|
#append
|
|
71
72
|
>
|
|
72
73
|
<FSChip
|
|
@@ -179,7 +180,7 @@ export default defineComponent({
|
|
|
179
180
|
]);
|
|
180
181
|
};
|
|
181
182
|
|
|
182
|
-
const { toggleSet,
|
|
183
|
+
const { toggleSet, init, onUpdate } = useAutocomplete(
|
|
183
184
|
charts,
|
|
184
185
|
[() => props.chartOrganisationTypeFilters, () => props.chartOrganisationFilters],
|
|
185
186
|
emit,
|
|
@@ -190,7 +191,6 @@ export default defineComponent({
|
|
|
190
191
|
return {
|
|
191
192
|
toggleSet,
|
|
192
193
|
loading,
|
|
193
|
-
search,
|
|
194
194
|
charts,
|
|
195
195
|
chartOriginColor,
|
|
196
196
|
chartOriginLabel,
|
|
@@ -14,16 +14,31 @@
|
|
|
14
14
|
<FSRow
|
|
15
15
|
v-if="$props.modelValue"
|
|
16
16
|
align="center-center"
|
|
17
|
+
padding="0 8px 0 0"
|
|
18
|
+
gap="4px"
|
|
17
19
|
:wrap="false"
|
|
18
20
|
>
|
|
19
|
-
<FSIcon>
|
|
20
|
-
{{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
|
|
21
|
-
</FSIcon>
|
|
22
21
|
<FSSpan>
|
|
23
22
|
{{ item.raw.label }}
|
|
24
23
|
</FSSpan>
|
|
24
|
+
<FSIcon
|
|
25
|
+
v-if="$props.multiple"
|
|
26
|
+
:color="item.raw.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
27
|
+
>
|
|
28
|
+
{{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
|
|
29
|
+
</FSIcon>
|
|
25
30
|
</FSRow>
|
|
26
31
|
</template>
|
|
32
|
+
<template
|
|
33
|
+
v-if="selected"
|
|
34
|
+
#autocomplete-suffix
|
|
35
|
+
>
|
|
36
|
+
<FSChip
|
|
37
|
+
:label="selected.correlated ? $tr('ui.common.linked','Linked') : $tr('ui.common.not-linked','Not linked')"
|
|
38
|
+
:color="selected.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
39
|
+
:prependIcon="selected.correlated ? 'mdi-link' : 'mdi-link-off'"
|
|
40
|
+
/>
|
|
41
|
+
</template>
|
|
27
42
|
<template
|
|
28
43
|
#item-label="{ item, font }"
|
|
29
44
|
>
|
|
@@ -31,20 +46,23 @@
|
|
|
31
46
|
align="center-left"
|
|
32
47
|
:wrap="false"
|
|
33
48
|
>
|
|
34
|
-
<FSIcon>
|
|
35
|
-
{{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
|
|
36
|
-
</FSIcon>
|
|
37
49
|
<FSSpan
|
|
38
50
|
:font="font"
|
|
39
51
|
>
|
|
40
52
|
{{ item.raw.label }}
|
|
41
53
|
</FSSpan>
|
|
54
|
+
<FSIcon
|
|
55
|
+
:color="item.raw.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
56
|
+
>
|
|
57
|
+
{{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
|
|
58
|
+
</FSIcon>
|
|
42
59
|
</FSRow>
|
|
43
60
|
</template>
|
|
44
61
|
<template
|
|
45
62
|
#toggle-set-item="props"
|
|
46
63
|
>
|
|
47
64
|
<FSButton
|
|
65
|
+
:iconColor="props.item.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
48
66
|
:prependIcon="props.item.correlated ? 'mdi-link' : 'mdi-link-off'"
|
|
49
67
|
:variant="props.getVariant(props.item)"
|
|
50
68
|
:color="props.getColor(props.item)"
|
|
@@ -59,14 +77,16 @@
|
|
|
59
77
|
<script lang="ts">
|
|
60
78
|
import { computed, defineComponent, type PropType } from "vue";
|
|
61
79
|
|
|
80
|
+
import { type DataCategoryInfos, type DataCategoryFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
62
81
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
63
|
-
import { type DataCategoryFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
64
82
|
import { useDataCategories } from "@dative-gpi/foundation-core-services/composables";
|
|
83
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
65
84
|
|
|
66
85
|
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
67
86
|
import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
|
|
68
87
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
69
88
|
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
89
|
+
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
70
90
|
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
71
91
|
|
|
72
92
|
export default defineComponent({
|
|
@@ -76,6 +96,7 @@ export default defineComponent({
|
|
|
76
96
|
FSButton,
|
|
77
97
|
FSIcon,
|
|
78
98
|
FSSpan,
|
|
99
|
+
FSChip,
|
|
79
100
|
FSRow
|
|
80
101
|
},
|
|
81
102
|
props: {
|
|
@@ -108,6 +129,13 @@ export default defineComponent({
|
|
|
108
129
|
return init.value && fetchingDataCategories.value;
|
|
109
130
|
});
|
|
110
131
|
|
|
132
|
+
const selected = computed((): DataCategoryInfos | undefined => {
|
|
133
|
+
if (props.multiple) {
|
|
134
|
+
return undefined;
|
|
135
|
+
}
|
|
136
|
+
return dataCategories.value.find((dataCategory: DataCategoryInfos) => dataCategory.id === props.modelValue);
|
|
137
|
+
});
|
|
138
|
+
|
|
111
139
|
const fetch = (search: string | null) => {
|
|
112
140
|
return getManyDataCategories({ ...props.dataCategoriesFilters, search: search ?? undefined });
|
|
113
141
|
};
|
|
@@ -121,7 +149,9 @@ export default defineComponent({
|
|
|
121
149
|
|
|
122
150
|
return {
|
|
123
151
|
dataCategories,
|
|
152
|
+
ColorEnum,
|
|
124
153
|
toggleSet,
|
|
154
|
+
selected,
|
|
125
155
|
loading,
|
|
126
156
|
onUpdate
|
|
127
157
|
};
|
|
@@ -14,16 +14,26 @@
|
|
|
14
14
|
<FSRow
|
|
15
15
|
v-if="$props.modelValue"
|
|
16
16
|
align="center-center"
|
|
17
|
+
padding="0 8px 0 0"
|
|
18
|
+
gap="4px"
|
|
17
19
|
:wrap="false"
|
|
18
20
|
>
|
|
19
|
-
<FSChip
|
|
20
|
-
v-if="item.raw.unit"
|
|
21
|
-
:label="item.raw.unit"
|
|
22
|
-
/>
|
|
23
21
|
<FSSpan>
|
|
24
22
|
{{ item.raw.label }}
|
|
25
23
|
</FSSpan>
|
|
26
|
-
|
|
24
|
+
<FSChip
|
|
25
|
+
v-if="$props.multiple && item.raw.unit"
|
|
26
|
+
:label="item.raw.unit"
|
|
27
|
+
/>
|
|
28
|
+
</FSRow>
|
|
29
|
+
</template>
|
|
30
|
+
<template
|
|
31
|
+
v-if="selected && selected.unit"
|
|
32
|
+
#autocomplete-suffix
|
|
33
|
+
>
|
|
34
|
+
<FSChip
|
|
35
|
+
:label="selected.unit"
|
|
36
|
+
/>
|
|
27
37
|
</template>
|
|
28
38
|
<template
|
|
29
39
|
#item-label="{ item, font }"
|
|
@@ -32,15 +42,15 @@
|
|
|
32
42
|
align="center-left"
|
|
33
43
|
:wrap="false"
|
|
34
44
|
>
|
|
35
|
-
<FSChip
|
|
36
|
-
v-if="item.raw.unit"
|
|
37
|
-
:label="item.raw.unit"
|
|
38
|
-
/>
|
|
39
45
|
<FSSpan
|
|
40
46
|
:font="font"
|
|
41
47
|
>
|
|
42
48
|
{{ item.raw.label }}
|
|
43
49
|
</FSSpan>
|
|
50
|
+
<FSChip
|
|
51
|
+
v-if="item.raw.unit"
|
|
52
|
+
:label="item.raw.unit"
|
|
53
|
+
/>
|
|
44
54
|
</FSRow>
|
|
45
55
|
</template>
|
|
46
56
|
<template
|
|
@@ -54,10 +64,10 @@
|
|
|
54
64
|
@click="props.toggle(props.item)"
|
|
55
65
|
>
|
|
56
66
|
<template
|
|
57
|
-
|
|
67
|
+
v-if="props.item.unit"
|
|
68
|
+
#append
|
|
58
69
|
>
|
|
59
70
|
<FSChip
|
|
60
|
-
v-if="props.item.unit"
|
|
61
71
|
:label="props.item.unit"
|
|
62
72
|
/>
|
|
63
73
|
</template>
|
|
@@ -69,7 +79,7 @@
|
|
|
69
79
|
<script lang="ts">
|
|
70
80
|
import { computed, defineComponent, type PropType } from "vue";
|
|
71
81
|
|
|
72
|
-
import { type DataDefinitionFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
82
|
+
import { type DataDefinitionInfos, type DataDefinitionFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
73
83
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
74
84
|
import { useDataDefinitions } from "@dative-gpi/foundation-core-services/composables";
|
|
75
85
|
|
|
@@ -118,6 +128,13 @@ export default defineComponent({
|
|
|
118
128
|
return init.value && fetchingDataDefinitions.value;
|
|
119
129
|
});
|
|
120
130
|
|
|
131
|
+
const selected = computed((): DataDefinitionInfos | undefined => {
|
|
132
|
+
if (props.multiple) {
|
|
133
|
+
return undefined;
|
|
134
|
+
}
|
|
135
|
+
return dataDefinitions.value.find((dataDefinition: DataDefinitionInfos) => dataDefinition.id === props.modelValue);
|
|
136
|
+
});
|
|
137
|
+
|
|
121
138
|
const fetch = (search: string | null) => {
|
|
122
139
|
return getManyDataDefinitions({ ...props.dataDefinitionFilters, search: search ?? undefined });
|
|
123
140
|
};
|
|
@@ -132,6 +149,7 @@ export default defineComponent({
|
|
|
132
149
|
return {
|
|
133
150
|
dataDefinitions,
|
|
134
151
|
toggleSet,
|
|
152
|
+
selected,
|
|
135
153
|
loading,
|
|
136
154
|
onUpdate
|
|
137
155
|
};
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
@click="props.toggle(props.item)"
|
|
68
68
|
>
|
|
69
69
|
<template
|
|
70
|
+
v-if="props.item.type"
|
|
70
71
|
#append
|
|
71
72
|
>
|
|
72
73
|
<FSChip
|
|
@@ -179,7 +180,7 @@ export default defineComponent({
|
|
|
179
180
|
]);
|
|
180
181
|
};
|
|
181
182
|
|
|
182
|
-
const { toggleSet,
|
|
183
|
+
const { toggleSet, init, onUpdate } = useAutocomplete(
|
|
183
184
|
roles,
|
|
184
185
|
[() => props.roleOrganisationTypeFilters, () => props.roleOrganisationFilters],
|
|
185
186
|
emit,
|
|
@@ -191,7 +192,6 @@ export default defineComponent({
|
|
|
191
192
|
toggleSet,
|
|
192
193
|
RoleType,
|
|
193
194
|
loading,
|
|
194
|
-
search,
|
|
195
195
|
roles,
|
|
196
196
|
roleTypeColor,
|
|
197
197
|
roleTypeLabel,
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSAutocompleteField
|
|
3
|
+
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
|
+
:items="serviceAccountRoleOrganisations"
|
|
5
|
+
:multiple="$props.multiple"
|
|
6
|
+
:loading="loading"
|
|
7
|
+
:modelValue="$props.modelValue"
|
|
8
|
+
@update:modelValue="onUpdate"
|
|
9
|
+
v-bind="$attrs"
|
|
10
|
+
>
|
|
11
|
+
<template
|
|
12
|
+
#autocomplete-selection="{ item }"
|
|
13
|
+
>
|
|
14
|
+
<FSRow
|
|
15
|
+
v-if="$props.modelValue"
|
|
16
|
+
align="center-center"
|
|
17
|
+
:wrap="false"
|
|
18
|
+
>
|
|
19
|
+
<FSIcon
|
|
20
|
+
v-if="item.raw.icon"
|
|
21
|
+
>
|
|
22
|
+
{{ item.raw.icon }}
|
|
23
|
+
</FSIcon>
|
|
24
|
+
<FSSpan>
|
|
25
|
+
{{ item.raw.label }}
|
|
26
|
+
</FSSpan>
|
|
27
|
+
</FSRow>
|
|
28
|
+
</template>
|
|
29
|
+
<template
|
|
30
|
+
#item-label="{ item, font }"
|
|
31
|
+
>
|
|
32
|
+
<FSRow
|
|
33
|
+
align="center-left"
|
|
34
|
+
:wrap="false"
|
|
35
|
+
>
|
|
36
|
+
<FSIcon
|
|
37
|
+
v-if="item.raw.icon"
|
|
38
|
+
>
|
|
39
|
+
{{ item.raw.icon }}
|
|
40
|
+
</FSIcon>
|
|
41
|
+
<FSSpan
|
|
42
|
+
:font="font"
|
|
43
|
+
>
|
|
44
|
+
{{ item.raw.label }}
|
|
45
|
+
</FSSpan>
|
|
46
|
+
</FSRow>
|
|
47
|
+
</template>
|
|
48
|
+
</FSAutocompleteField>
|
|
49
|
+
</template>
|
|
50
|
+
|
|
51
|
+
<script lang="ts">
|
|
52
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
53
|
+
|
|
54
|
+
import { type ServiceAccountRoleOrganisationsFilters } from "@dative-gpi/foundation-core-domain/models";
|
|
55
|
+
import { useServiceAccountRoleOrganisations } from "@dative-gpi/foundation-core-services/composables";
|
|
56
|
+
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
57
|
+
|
|
58
|
+
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
59
|
+
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
60
|
+
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
61
|
+
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
62
|
+
|
|
63
|
+
export default defineComponent({
|
|
64
|
+
name: "FSAutocompleteServiceAccountRoleOrganisation",
|
|
65
|
+
components: {
|
|
66
|
+
FSAutocompleteField,
|
|
67
|
+
FSIcon,
|
|
68
|
+
FSSpan,
|
|
69
|
+
FSRow
|
|
70
|
+
},
|
|
71
|
+
props: {
|
|
72
|
+
serviceAccountRoleOrganisationsFilters: {
|
|
73
|
+
type: Object as PropType<ServiceAccountRoleOrganisationsFilters>,
|
|
74
|
+
required: false,
|
|
75
|
+
default: null
|
|
76
|
+
},
|
|
77
|
+
modelValue: {
|
|
78
|
+
type: [Array, String] as PropType<string[] | string | null>,
|
|
79
|
+
required: false,
|
|
80
|
+
default: null
|
|
81
|
+
},
|
|
82
|
+
multiple: {
|
|
83
|
+
type: Boolean,
|
|
84
|
+
required: false,
|
|
85
|
+
default: false
|
|
86
|
+
},
|
|
87
|
+
toggleSetDisabled: {
|
|
88
|
+
type: Boolean,
|
|
89
|
+
required: false,
|
|
90
|
+
default: false
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
emits: ["update:modelValue"],
|
|
94
|
+
setup(props, { emit }) {
|
|
95
|
+
const { getMany: getManyServiceAccountRoleOrganisations, fetching: fetchingServiceAccountRoleOrganisations, entities: serviceAccountRoleOrganisations } = useServiceAccountRoleOrganisations();
|
|
96
|
+
|
|
97
|
+
const loading = computed((): boolean => {
|
|
98
|
+
return init.value && fetchingServiceAccountRoleOrganisations.value;
|
|
99
|
+
});
|
|
100
|
+
|
|
101
|
+
const fetch = (search: string | null) => {
|
|
102
|
+
return getManyServiceAccountRoleOrganisations({ ...props.serviceAccountRoleOrganisationsFilters, search: search ?? undefined })
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
const { toggleSet, init, onUpdate } = useAutocomplete(
|
|
106
|
+
serviceAccountRoleOrganisations,
|
|
107
|
+
[() => props.serviceAccountRoleOrganisationsFilters],
|
|
108
|
+
emit,
|
|
109
|
+
fetch
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
serviceAccountRoleOrganisations,
|
|
114
|
+
toggleSet,
|
|
115
|
+
loading,
|
|
116
|
+
onUpdate
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
</script>
|
|
@@ -53,24 +53,22 @@
|
|
|
53
53
|
>
|
|
54
54
|
<FSButton
|
|
55
55
|
:variant="props.getVariant(props.item)"
|
|
56
|
+
:padding="['6px 16px', '4px 12px']"
|
|
56
57
|
:color="props.getColor(props.item)"
|
|
57
58
|
:class="props.getClass(props.item)"
|
|
59
|
+
:label="props.item.name"
|
|
58
60
|
@click="props.toggle(props.item)"
|
|
59
61
|
>
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
62
|
+
<template
|
|
63
|
+
v-if="props.item.imageId"
|
|
64
|
+
#prepend
|
|
63
65
|
>
|
|
64
66
|
<FSImage
|
|
65
|
-
v-if="props.item.imageId"
|
|
66
67
|
height="26px"
|
|
67
68
|
width="26px"
|
|
68
69
|
:imageId="props.item.imageId"
|
|
69
70
|
/>
|
|
70
|
-
|
|
71
|
-
{{ props.item.name }}
|
|
72
|
-
</FSSpan>
|
|
73
|
-
</FSRow>
|
|
71
|
+
</template>
|
|
74
72
|
</FSButton>
|
|
75
73
|
</template>
|
|
76
74
|
</FSAutocompleteField>
|
|
@@ -127,19 +125,12 @@ export default defineComponent({
|
|
|
127
125
|
const loading = computed((): boolean => {
|
|
128
126
|
return init.value && fetchingUserOrganisations.value;
|
|
129
127
|
});
|
|
130
|
-
|
|
131
|
-
const toggleSetItems = computed((): any[] => {
|
|
132
|
-
return userOrganisations.value.map((userOrganisation: UserOrganisationInfos) => ({
|
|
133
|
-
id: userOrganisation.id,
|
|
134
|
-
label: userOrganisation.name
|
|
135
|
-
}));
|
|
136
|
-
});
|
|
137
128
|
|
|
138
129
|
const fetch = (search: string | null) => {
|
|
139
130
|
return getManyUserOrganisations({ ...props.userOrganisationFilters, search: search ?? undefined });
|
|
140
131
|
};
|
|
141
132
|
|
|
142
|
-
const { toggleSet,
|
|
133
|
+
const { toggleSet, init, onUpdate } = useAutocomplete(
|
|
143
134
|
userOrganisations,
|
|
144
135
|
[() => props.userOrganisationFilters],
|
|
145
136
|
emit,
|
|
@@ -151,10 +142,8 @@ export default defineComponent({
|
|
|
151
142
|
|
|
152
143
|
return {
|
|
153
144
|
userOrganisations,
|
|
154
|
-
toggleSetItems,
|
|
155
145
|
toggleSet,
|
|
156
146
|
loading,
|
|
157
|
-
search,
|
|
158
147
|
onUpdate
|
|
159
148
|
};
|
|
160
149
|
}
|
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.31",
|
|
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.31",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.31",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.31",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.31",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.31"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"sass": "1.71.1",
|
|
27
27
|
"sass-loader": "13.3.2"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "ea23a4b514a19e238373a52d9dd99b24c17adf1c"
|
|
30
30
|
}
|
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:width="$props.width ? $props.width : '100%'"
|
|
4
|
-
:label="label ?? $tr('ui.common.data-category', 'Data category')"
|
|
5
|
-
:items="toggleDataCategories"
|
|
6
|
-
:modelValue="modelValue"
|
|
7
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
>
|
|
10
|
-
<template
|
|
11
|
-
#autocomplete-selection="{item}"
|
|
12
|
-
>
|
|
13
|
-
<FSRow
|
|
14
|
-
:wrap="false"
|
|
15
|
-
align="center-center"
|
|
16
|
-
:width="$props.width ? $props.width : '100vh'"
|
|
17
|
-
>
|
|
18
|
-
<FSCol>
|
|
19
|
-
<FSText>
|
|
20
|
-
{{ item.raw.label }}
|
|
21
|
-
</FSText>
|
|
22
|
-
</FSCol>
|
|
23
|
-
<FSRow>
|
|
24
|
-
<FSRow
|
|
25
|
-
align="center-right"
|
|
26
|
-
>
|
|
27
|
-
<FSChip
|
|
28
|
-
:label="item.raw.unit"
|
|
29
|
-
:color="item.raw.correlated ? ColorEnum.Success : ColorEnum.Warning"
|
|
30
|
-
>
|
|
31
|
-
<FSRow
|
|
32
|
-
v-if="item.raw.correlated"
|
|
33
|
-
align="center-center"
|
|
34
|
-
:wrap="false"
|
|
35
|
-
>
|
|
36
|
-
<FSIcon
|
|
37
|
-
icon="mdi-link"
|
|
38
|
-
size="16px"
|
|
39
|
-
/>
|
|
40
|
-
<FSText
|
|
41
|
-
font="text-overline"
|
|
42
|
-
>
|
|
43
|
-
{{ $tr('ui.common.linked', 'Linked') }}
|
|
44
|
-
</FSText>
|
|
45
|
-
</FSRow>
|
|
46
|
-
<FSRow
|
|
47
|
-
v-else
|
|
48
|
-
align="center-center"
|
|
49
|
-
:wrap="false"
|
|
50
|
-
>
|
|
51
|
-
<FSIcon
|
|
52
|
-
icon="mdi-link-off"
|
|
53
|
-
size="16px"
|
|
54
|
-
/>
|
|
55
|
-
<FSSpan
|
|
56
|
-
font="text-overline"
|
|
57
|
-
>
|
|
58
|
-
{{ $tr('ui.common.not-linked', 'Not linked') }}
|
|
59
|
-
</FSSpan>
|
|
60
|
-
</FSRow>
|
|
61
|
-
</FSChip>
|
|
62
|
-
</FSRow>
|
|
63
|
-
</FSRow>
|
|
64
|
-
</FSRow>
|
|
65
|
-
</template></FSAutocompleteField>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
68
|
-
<script lang="ts">
|
|
69
|
-
import { computed, defineComponent, watch } from "vue";
|
|
70
|
-
|
|
71
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
72
|
-
|
|
73
|
-
import {useDataCategories} from "@dative-gpi/foundation-core-services/composables";
|
|
74
|
-
|
|
75
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
76
|
-
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
77
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
78
|
-
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
79
|
-
import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
|
|
80
|
-
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
81
|
-
import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
export default defineComponent({
|
|
85
|
-
components: {
|
|
86
|
-
FSAutocompleteField,
|
|
87
|
-
FSChip,
|
|
88
|
-
FSRow,
|
|
89
|
-
FSCol,
|
|
90
|
-
FSText,
|
|
91
|
-
FSIcon,
|
|
92
|
-
FSSpan
|
|
93
|
-
},
|
|
94
|
-
props:{
|
|
95
|
-
modelValue: {
|
|
96
|
-
type: String,
|
|
97
|
-
required: false
|
|
98
|
-
},
|
|
99
|
-
modelId: {
|
|
100
|
-
type: String,
|
|
101
|
-
required: false,
|
|
102
|
-
},
|
|
103
|
-
label: {
|
|
104
|
-
type: String,
|
|
105
|
-
required: false
|
|
106
|
-
},
|
|
107
|
-
width: {
|
|
108
|
-
type: String,
|
|
109
|
-
required: false
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
emits: ['update:modelValue'],
|
|
113
|
-
setup(props) {
|
|
114
|
-
const {getMany : fetchdataCategories, entities : dataCategories} = useDataCategories()
|
|
115
|
-
|
|
116
|
-
const toggleDataCategories = computed(()=>{
|
|
117
|
-
return dataCategories.value.map((d) => {
|
|
118
|
-
return {
|
|
119
|
-
id: d.id,
|
|
120
|
-
label: d.label,
|
|
121
|
-
correlated: d.correlated
|
|
122
|
-
}
|
|
123
|
-
})
|
|
124
|
-
})
|
|
125
|
-
|
|
126
|
-
watch(() => props.modelId, () => {
|
|
127
|
-
fetchdataCategories({modelId: props.modelId})
|
|
128
|
-
}, {immediate: true})
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return {
|
|
132
|
-
ColorEnum,
|
|
133
|
-
toggleDataCategories,
|
|
134
|
-
dataCategories
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
})
|
|
138
|
-
|
|
139
|
-
</script>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:width="$props.width ? $props.width : '100%'"
|
|
4
|
-
:label="label ?? $tr('ui.common.data-definition', 'Data')"
|
|
5
|
-
:items="toggleDataDefinitions"
|
|
6
|
-
:modelValue="modelValue"
|
|
7
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
>
|
|
10
|
-
<template
|
|
11
|
-
#autocomplete-selection="{item}"
|
|
12
|
-
>
|
|
13
|
-
<FSRow
|
|
14
|
-
:wrap="false"
|
|
15
|
-
align="center-center"
|
|
16
|
-
:width="$props.width ? $props.width : '100vh'"
|
|
17
|
-
>
|
|
18
|
-
<FSCol>
|
|
19
|
-
<FSText>
|
|
20
|
-
{{ item.raw.label }}
|
|
21
|
-
</FSText>
|
|
22
|
-
</FSCol>
|
|
23
|
-
<FSRow
|
|
24
|
-
v-if="item.raw.showUnit"
|
|
25
|
-
>
|
|
26
|
-
<FSRow
|
|
27
|
-
align="center-right"
|
|
28
|
-
>
|
|
29
|
-
<FSChip
|
|
30
|
-
:label="item.raw.unit"
|
|
31
|
-
/>
|
|
32
|
-
</FSRow>
|
|
33
|
-
</FSRow>
|
|
34
|
-
</FSRow>
|
|
35
|
-
</template>
|
|
36
|
-
</FSAutocompleteField>
|
|
37
|
-
</template>
|
|
38
|
-
|
|
39
|
-
<script lang="ts">
|
|
40
|
-
import { computed, defineComponent, watch } from "vue";
|
|
41
|
-
|
|
42
|
-
import {useDataDefinitions} from "@dative-gpi/foundation-core-services/composables";
|
|
43
|
-
|
|
44
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
45
|
-
import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
|
|
46
|
-
import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
|
|
47
|
-
import FSCol from "@dative-gpi/foundation-shared-components/components/FSCol.vue";
|
|
48
|
-
|
|
49
|
-
export default defineComponent({
|
|
50
|
-
components: {
|
|
51
|
-
FSAutocompleteField,
|
|
52
|
-
FSChip,
|
|
53
|
-
FSRow,
|
|
54
|
-
FSCol,
|
|
55
|
-
},
|
|
56
|
-
props:{
|
|
57
|
-
modelValue: {
|
|
58
|
-
type: String,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
modelId: {
|
|
62
|
-
type: String,
|
|
63
|
-
required: false,
|
|
64
|
-
},
|
|
65
|
-
dataCategoryId: {
|
|
66
|
-
type: String,
|
|
67
|
-
required: false,
|
|
68
|
-
},
|
|
69
|
-
label: {
|
|
70
|
-
type: String,
|
|
71
|
-
required: false
|
|
72
|
-
},
|
|
73
|
-
width : {
|
|
74
|
-
type: String,
|
|
75
|
-
required: false
|
|
76
|
-
}
|
|
77
|
-
},
|
|
78
|
-
emits: ['update:modelValue'],
|
|
79
|
-
setup(props) {
|
|
80
|
-
|
|
81
|
-
const {getMany : fetchDataDefinitions, entities : dataDefinitions} = useDataDefinitions()
|
|
82
|
-
|
|
83
|
-
const toggleDataDefinitions = computed(()=>{
|
|
84
|
-
return dataDefinitions.value.map((d) => {
|
|
85
|
-
return {
|
|
86
|
-
id: d.id,
|
|
87
|
-
label: d.label,
|
|
88
|
-
showUnit : d.unit && d.unit.trim().length > 0,
|
|
89
|
-
unit : d.unit,
|
|
90
|
-
}
|
|
91
|
-
})
|
|
92
|
-
})
|
|
93
|
-
|
|
94
|
-
watch(() => [props.modelId, props.dataCategoryId], async () => {
|
|
95
|
-
await fetchDataDefinitions({modelsIds: props.modelId ? [props.modelId] : undefined, dataCategoryId: props.dataCategoryId})
|
|
96
|
-
}, {immediate: true})
|
|
97
|
-
|
|
98
|
-
return {
|
|
99
|
-
toggleDataDefinitions,
|
|
100
|
-
dataDefinitions
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
</script>
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.model', 'Model')"
|
|
4
|
-
:items="modelItems"
|
|
5
|
-
:toggleSet="modelItems.length < 5"
|
|
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, onMounted } from "vue";
|
|
14
|
-
|
|
15
|
-
import {useModels} from "@dative-gpi/foundation-core-services/composables";
|
|
16
|
-
|
|
17
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
18
|
-
|
|
19
|
-
export default defineComponent({
|
|
20
|
-
components: {
|
|
21
|
-
FSAutocompleteField
|
|
22
|
-
},
|
|
23
|
-
props:{
|
|
24
|
-
modelValue: {
|
|
25
|
-
type: String,
|
|
26
|
-
required: false
|
|
27
|
-
},
|
|
28
|
-
label: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: false
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
emits: ['update:modelValue'],
|
|
34
|
-
setup(){
|
|
35
|
-
const {getMany : fetchModels, entities : models} = useModels()
|
|
36
|
-
|
|
37
|
-
const modelItems = computed(()=>{
|
|
38
|
-
return models.value.map((d) => {
|
|
39
|
-
return {
|
|
40
|
-
id: d.id,
|
|
41
|
-
label: d.label
|
|
42
|
-
}
|
|
43
|
-
})
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
onMounted(() => {
|
|
47
|
-
fetchModels()
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
return {
|
|
51
|
-
modelItems,
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
})
|
|
55
|
-
|
|
56
|
-
</script>
|