@dative-gpi/foundation-core-components 1.0.28 → 1.0.30
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/FSAutocompleteDataDefinition.vue +1 -1
- 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 -62
- package/components/selects/FSDataDefinitionSelector.vue +0 -66
- 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,
|
|
@@ -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.30",
|
|
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.30",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.30",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.30",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.30",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.30"
|
|
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": "33f1a6d59ab513176b3710729a39ec701462fdfb"
|
|
30
30
|
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.data-category', 'Data category')"
|
|
4
|
-
:items="toggleDataCategories"
|
|
5
|
-
:modelValue="modelValue"
|
|
6
|
-
:toggleSet="toggleDataCategories.length < 5"
|
|
7
|
-
@update:modelValue="$emit('update:modelValue', $event)"
|
|
8
|
-
v-bind="$attrs"
|
|
9
|
-
/>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script lang="ts">
|
|
13
|
-
import { computed, defineComponent, watch } from "vue";
|
|
14
|
-
|
|
15
|
-
import {useDataCategories} 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
|
-
modelId: {
|
|
29
|
-
type: String,
|
|
30
|
-
required: false,
|
|
31
|
-
},
|
|
32
|
-
label: {
|
|
33
|
-
type: String,
|
|
34
|
-
required: false
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
emits: ['update:modelValue'],
|
|
38
|
-
setup(props) {
|
|
39
|
-
const {getMany : fetchdataCategories, entities : dataCategories} = useDataCategories()
|
|
40
|
-
|
|
41
|
-
const toggleDataCategories = computed(()=>{
|
|
42
|
-
return dataCategories.value.map((d) => {
|
|
43
|
-
return {
|
|
44
|
-
id: d.id,
|
|
45
|
-
label: d.label
|
|
46
|
-
}
|
|
47
|
-
})
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
watch(() => props.modelId, () => {
|
|
51
|
-
fetchdataCategories({modelId: props.modelId})
|
|
52
|
-
}, {immediate: true})
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
toggleDataCategories,
|
|
57
|
-
dataCategories
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
</script>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSAutocompleteField
|
|
3
|
-
:label="label ?? $tr('ui.common.data-definition', 'Data')"
|
|
4
|
-
:items="toggleDataDefinitions"
|
|
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, watch } from "vue";
|
|
13
|
-
|
|
14
|
-
import {useDataDefinitions} from "@dative-gpi/foundation-core-services/composables";
|
|
15
|
-
|
|
16
|
-
import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
|
|
17
|
-
|
|
18
|
-
export default defineComponent({
|
|
19
|
-
components: {
|
|
20
|
-
FSAutocompleteField
|
|
21
|
-
},
|
|
22
|
-
props:{
|
|
23
|
-
modelValue: {
|
|
24
|
-
type: String,
|
|
25
|
-
required: false
|
|
26
|
-
},
|
|
27
|
-
modelId: {
|
|
28
|
-
type: String,
|
|
29
|
-
required: false,
|
|
30
|
-
},
|
|
31
|
-
dataCategoryId: {
|
|
32
|
-
type: String,
|
|
33
|
-
required: false,
|
|
34
|
-
},
|
|
35
|
-
label: {
|
|
36
|
-
type: String,
|
|
37
|
-
required: false
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
emits: ['update:modelValue'],
|
|
42
|
-
setup(props) {
|
|
43
|
-
|
|
44
|
-
const {getMany : fetchDataDefinitions, entities : dataDefinitions} = useDataDefinitions()
|
|
45
|
-
|
|
46
|
-
const toggleDataDefinitions = computed(()=>{
|
|
47
|
-
return dataDefinitions.value.map((d) => {
|
|
48
|
-
return {
|
|
49
|
-
id: d.id,
|
|
50
|
-
label: d.label
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
watch(() => [props.modelId, props.dataCategoryId], async () => {
|
|
56
|
-
await fetchDataDefinitions({modelsIds: props.modelId ? [props.modelId] : undefined, dataCategoryId: props.dataCategoryId})
|
|
57
|
-
}, {immediate: true})
|
|
58
|
-
|
|
59
|
-
return {
|
|
60
|
-
toggleDataDefinitions,
|
|
61
|
-
dataDefinitions
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
})
|
|
65
|
-
|
|
66
|
-
</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>
|