@dative-gpi/foundation-core-components 0.1.120 → 1.0.0

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.
Files changed (45) hide show
  1. package/components/autocompletes/FSAutocompleteChart.vue +208 -0
  2. package/components/autocompletes/FSAutocompleteDashboard.vue +33 -37
  3. package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +115 -0
  4. package/components/autocompletes/FSAutocompleteDataCategory.vue +16 -25
  5. package/components/autocompletes/FSAutocompleteDataDefinition.vue +17 -26
  6. package/components/autocompletes/FSAutocompleteGroup.vue +18 -27
  7. package/components/autocompletes/FSAutocompleteLocation.vue +22 -31
  8. package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -8
  9. package/components/autocompletes/FSAutocompleteModel.vue +4 -4
  10. package/components/autocompletes/FSAutocompleteOrganisationType.vue +4 -4
  11. package/components/autocompletes/FSAutocompleteRole.vue +30 -34
  12. package/components/autocompletes/FSAutocompleteUserOrganisation.vue +20 -34
  13. package/components/customProperties/FSMetaField.vue +139 -107
  14. package/components/customProperties/FSMetaFormContent.vue +3 -2
  15. package/components/customProperties/FSMetaGrid.vue +4 -3
  16. package/components/customProperties/FSMetaHistory.vue +3 -2
  17. package/components/customProperties/FSMetaValue.vue +4 -2
  18. package/components/customProperties/helpers.ts +2 -1
  19. package/components/lists/FSDataTable.vue +48 -133
  20. package/components/selects/FSAggregationSelector.vue +51 -0
  21. package/components/selects/FSAxisTypeSelector.vue +48 -0
  22. package/components/selects/FSDataCategorySelector.vue +62 -0
  23. package/components/selects/FSDataDefinitionSelector.vue +66 -0
  24. package/components/selects/FSDisplayAsSelector.vue +52 -0
  25. package/components/selects/FSFilterTypeSelector.vue +53 -0
  26. package/components/selects/FSHeatmapRuleSelector.vue +52 -0
  27. package/components/selects/FSModelSelector.vue +56 -0
  28. package/components/selects/FSOperationOnSelector.vue +51 -0
  29. package/components/selects/FSPlanningTypeSelector.vue +50 -0
  30. package/components/selects/FSPlotPerSelector.vue +51 -0
  31. package/components/selects/FSSelectSelectedEntities.vue +59 -0
  32. package/components/selects/FSSerieTypeSelector.vue +51 -0
  33. package/components/tiles/FSDashboardOrganisationTile.vue +3 -2
  34. package/components/tiles/FSDashboardOrganisationTypeTile.vue +3 -2
  35. package/components/tiles/FSDashboardShallowTile.vue +4 -3
  36. package/components/tiles/FSFolderTile.vue +2 -1
  37. package/components/tiles/FSUserOrganisationTile.vue +21 -21
  38. package/components/treeviews/FSTreeViewFolder.vue +77 -0
  39. package/components/treeviews/FSTreeViewGroup.vue +77 -0
  40. package/package.json +14 -12
  41. package/utils/charts.ts +136 -0
  42. package/utils/dashboards.ts +6 -5
  43. package/utils/index.ts +1 -0
  44. package/utils/roles.ts +2 -1
  45. package/utils/users.ts +11 -2
@@ -0,0 +1,208 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :toggleSet="!$props.toggleSetDisabled && toggleSet"
4
+ :multiple="$props.multiple"
5
+ :loading="loading"
6
+ :items="charts"
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
+ <FSChip
28
+ :color="chartOriginColor(item.raw.type)"
29
+ :label="chartOriginLabel(item.raw.type)"
30
+ :editable="false"
31
+ />
32
+ </FSRow>
33
+ </template>
34
+ <template
35
+ #item-label="{ item, font }"
36
+ >
37
+ <FSRow
38
+ align="center-left"
39
+ :wrap="false"
40
+ >
41
+ <FSIcon
42
+ v-if="item.raw.icon"
43
+ >
44
+ {{ item.raw.icon }}
45
+ </FSIcon>
46
+ <FSSpan
47
+ :font="font"
48
+ >
49
+ {{ item.raw.label }}
50
+ </FSSpan>
51
+ <FSChip
52
+ :color="chartOriginColor(item.raw.type)"
53
+ :label="chartOriginLabel(item.raw.type)"
54
+ :editable="false"
55
+ />
56
+ </FSRow>
57
+ </template>
58
+ <template
59
+ #toggle-set-item="props"
60
+ >
61
+ <FSButton
62
+ :prependIcon="props.item.icon"
63
+ :variant="props.getVariant(props.item)"
64
+ :color="props.getColor(props.item)"
65
+ :class="props.getClass(props.item)"
66
+ :label="props.item.label"
67
+ @click="props.toggle(props.item)"
68
+ >
69
+ <template
70
+ #append
71
+ >
72
+ <FSChip
73
+ :color="chartOriginColor(props.item.type)"
74
+ :label="chartOriginLabel(props.item.type)"
75
+ :editable="false"
76
+ />
77
+ </template>
78
+ </FSButton>
79
+ </template>
80
+ </FSAutocompleteField>
81
+ </template>
82
+
83
+ <script lang="ts">
84
+ import { computed, defineComponent, type PropType } from "vue";
85
+
86
+ import { type ChartOrganisationFilters, ChartOrigin, type ChartOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
87
+ import { useChartOrganisations, useChartOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
88
+ import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
89
+
90
+ import { chartOriginColor, chartOriginLabel } from "../../utils";
91
+
92
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
93
+ import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
94
+ import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
95
+ import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
96
+ import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
97
+ import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
98
+
99
+ export default defineComponent({
100
+ name: "FSAutocompleteChart",
101
+ components: {
102
+ FSAutocompleteField,
103
+ FSButton,
104
+ FSChip,
105
+ FSIcon,
106
+ FSSpan,
107
+ FSRow
108
+ },
109
+ props: {
110
+ chartOrganisationTypeFilters: {
111
+ type: Object as PropType<ChartOrganisationTypeFilters>,
112
+ required: false,
113
+ default: null
114
+ },
115
+ chartOrganisationFilters: {
116
+ type: Object as PropType<ChartOrganisationFilters>,
117
+ required: false,
118
+ default: null
119
+ },
120
+ modelValue: {
121
+ type: [Array, String] as PropType<string[] | string | null>,
122
+ required: false,
123
+ default: null
124
+ },
125
+ type: {
126
+ type: Number as PropType<ChartOrigin>,
127
+ required: false,
128
+ default: ChartOrigin.None
129
+ },
130
+ multiple: {
131
+ type: Boolean,
132
+ required: false,
133
+ default: false
134
+ },
135
+ toggleSetDisabled: {
136
+ type: Boolean,
137
+ required: false,
138
+ default: false
139
+ }
140
+ },
141
+ emits: ["update:modelValue", "update:type"],
142
+ setup(props, { emit }) {
143
+ const { getMany: getManyChartOrganisationTypes, fetching: fetchingChartOrganisationTypes, entities: chartOrganisationTypes } = useChartOrganisationTypes();
144
+ const { getMany: getManyChartOrganisations, fetching: fetchingChartOrganisations, entities: chartOrganisations } = useChartOrganisations();
145
+
146
+ const charts = computed(() => {
147
+ return chartOrganisationTypes.value.map(rot => ({
148
+ id: rot.id,
149
+ icon: rot.icon,
150
+ label: rot.label,
151
+ type: ChartOrigin.OrganisationType
152
+ })).concat(chartOrganisations.value.map(ro => ({
153
+ id: ro.id,
154
+ icon: ro.icon,
155
+ label: ro.label,
156
+ type: ChartOrigin.Organisation
157
+ })));
158
+ });
159
+
160
+ const loading = computed((): boolean => {
161
+ return init.value && (fetchingChartOrganisationTypes.value || fetchingChartOrganisations.value);
162
+ });
163
+
164
+ const update = (value: Chart[] | Chart | null) => {
165
+ if (Array.isArray(value)) {
166
+ emit("update:modelValue", value.map(v => v.id));
167
+ emit("update:type", value.map(v => v.type));
168
+ }
169
+ else {
170
+ emit("update:modelValue", value?.id);
171
+ emit("update:type", value?.type);
172
+ }
173
+ };
174
+
175
+ const fetch = (search: string | null) => {
176
+ return Promise.all([
177
+ getManyChartOrganisationTypes({ ...props.chartOrganisationTypeFilters, search: search ?? undefined }),
178
+ getManyChartOrganisations({ ...props.chartOrganisationFilters, search: search ?? undefined })
179
+ ]);
180
+ };
181
+
182
+ const { toggleSet, search, init, onUpdate } = useAutocomplete(
183
+ charts,
184
+ [() => props.chartOrganisationTypeFilters, () => props.chartOrganisationFilters],
185
+ emit,
186
+ fetch,
187
+ update
188
+ );
189
+
190
+ return {
191
+ toggleSet,
192
+ loading,
193
+ search,
194
+ charts,
195
+ chartOriginColor,
196
+ chartOriginLabel,
197
+ onUpdate
198
+ };
199
+ }
200
+ });
201
+
202
+ interface Chart {
203
+ id: string;
204
+ icon: string;
205
+ label: string;
206
+ type: ChartOrigin;
207
+ }
208
+ </script>
@@ -32,35 +32,28 @@
32
32
  </FSRow>
33
33
  </template>
34
34
  <template
35
- #autocomplete-item="{ props, item }"
35
+ #item-label="{ item, font }"
36
36
  >
37
- <v-list-item
38
- v-bind="{ ...props, title: '' }"
37
+ <FSRow
38
+ align="center-left"
39
+ :wrap="false"
39
40
  >
40
- <FSRow
41
- align="center-left"
42
- :wrap="false"
41
+ <FSIcon
42
+ v-if="item.raw.icon"
43
43
  >
44
- <FSCheckbox
45
- v-if="$props.multiple"
46
- :modelValue="$props.modelValue?.includes(item.value)"
47
- @click="props.onClick"
48
- />
49
- <FSIcon
50
- v-if="item.raw.icon"
51
- >
52
- {{ item.raw.icon }}
53
- </FSIcon>
54
- <FSSpan>
55
- {{ item.raw.label }}
56
- </FSSpan>
57
- <FSChip
58
- :color="dashboardTypeColor(item.raw.type)"
59
- :label="dashboardTypeLabel(item.raw.type)"
60
- :editable="false"
61
- />
62
- </FSRow>
63
- </v-list-item>
44
+ {{ item.raw.icon }}
45
+ </FSIcon>
46
+ <FSSpan
47
+ :font="font"
48
+ >
49
+ {{ item.raw.label }}
50
+ </FSSpan>
51
+ <FSChip
52
+ :color="dashboardTypeColor(item.raw.type)"
53
+ :label="dashboardTypeLabel(item.raw.type)"
54
+ :editable="false"
55
+ />
56
+ </FSRow>
64
57
  </template>
65
58
  <template
66
59
  #toggle-set-item="props"
@@ -88,16 +81,16 @@
88
81
  </template>
89
82
 
90
83
  <script lang="ts">
91
- import { computed, defineComponent, PropType } from "vue";
84
+ import { computed, defineComponent, type PropType } from "vue";
92
85
 
93
- import { DashboardOrganisationFilters, DashboardOrganisationTypeFilters, DashboardShallowFilters, DashboardType } from "@dative-gpi/foundation-core-domain/models";
86
+ import { type DashboardOrganisationFilters, type DashboardOrganisationTypeFilters, type DashboardShallowFilters } from "@dative-gpi/foundation-core-domain/models";
94
87
  import { useDashboardOrganisations, useDashboardOrganisationTypes, useDashboardShallows } from "@dative-gpi/foundation-core-services/composables";
95
88
  import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
89
+ import { DashboardType } from "@dative-gpi/foundation-shared-domain/models";
96
90
 
97
91
  import { dashboardTypeColor, dashboardTypeLabel } from "../../utils";
98
92
 
99
93
  import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
100
- import FSCheckbox from "@dative-gpi/foundation-shared-components/components/FSCheckbox.vue";
101
94
  import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
102
95
  import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
103
96
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
@@ -109,7 +102,6 @@ export default defineComponent({
109
102
  name: "FSAutocompleteDashboard",
110
103
  components: {
111
104
  FSAutocompleteField,
112
- FSCheckbox,
113
105
  FSButton,
114
106
  FSChip,
115
107
  FSIcon,
@@ -137,6 +129,11 @@ export default defineComponent({
137
129
  required: false,
138
130
  default: null
139
131
  },
132
+ type: {
133
+ type: Number as PropType<DashboardType>,
134
+ required: false,
135
+ default: DashboardType.None
136
+ },
140
137
  multiple: {
141
138
  type: Boolean,
142
139
  required: false,
@@ -177,7 +174,7 @@ export default defineComponent({
177
174
  return init.value && (fetchingDashboardOrganisationTypes.value || fetchingDashboardOrganisations.value || fetchingDashboardShallows.value);
178
175
  });
179
176
 
180
- const innerUpdate = (value: Dashboard[] | Dashboard | null) => {
177
+ const update = (value: Dashboard[] | Dashboard | null) => {
181
178
  if (Array.isArray(value)) {
182
179
  emit("update:modelValue", value.map(v => v.id));
183
180
  emit("update:type", value.map(v => v.type));
@@ -188,7 +185,7 @@ export default defineComponent({
188
185
  }
189
186
  };
190
187
 
191
- const innerFetch = (search: string | null) => {
188
+ const fetch = (search: string | null) => {
192
189
  return Promise.all([
193
190
  getManyDashboardOrganisationTypes({ ...props.dashboardOrganisationTypeFilters, search: search ?? undefined }),
194
191
  getManyDashboardOrganisations({ ...props.dashboardOrganisationFilters, search: search ?? undefined }),
@@ -196,19 +193,18 @@ export default defineComponent({
196
193
  ]);
197
194
  };
198
195
 
199
- const { toggleSet, search, init, onUpdate } = useAutocomplete(
196
+ const { toggleSet, init, onUpdate } = useAutocomplete(
200
197
  dashboards,
201
198
  [() => props.dashboardOrganisationTypeFilters, () => props.dashboardOrganisationFilters, () => props.dashboardShallowFilters],
202
199
  emit,
203
- innerFetch,
204
- innerUpdate
200
+ fetch,
201
+ update
205
202
  );
206
203
 
207
204
  return {
205
+ dashboards,
208
206
  toggleSet,
209
207
  loading,
210
- search,
211
- dashboards,
212
208
  dashboardTypeColor,
213
209
  dashboardTypeLabel,
214
210
  onUpdate
@@ -0,0 +1,115 @@
1
+ <template>
2
+ <FSAutocompleteField
3
+ :toggleSet="!$props.toggleSetDisabled && toggleSet"
4
+ :loading="loading"
5
+ :items="dashboardOrganisations"
6
+ :modelValue="$props.modelValue"
7
+ @update:modelValue="onUpdate"
8
+ v-bind="$attrs"
9
+ >
10
+ <template
11
+ #autocomplete-selection="{ item }"
12
+ >
13
+ <FSRow
14
+ v-if="$props.modelValue"
15
+ align="center-center"
16
+ :wrap="false"
17
+ >
18
+ <FSIcon
19
+ v-if="item.raw.icon"
20
+ >
21
+ {{ item.raw.icon }}
22
+ </FSIcon>
23
+ <FSSpan>
24
+ {{ item.raw.label }}
25
+ </FSSpan>
26
+ </FSRow>
27
+ </template>
28
+ <template
29
+ #item-label="{ item, font }"
30
+ >
31
+ <FSRow
32
+ align="center-left"
33
+ :wrap="false"
34
+ >
35
+ <FSIcon
36
+ v-if="item.raw.icon"
37
+ >
38
+ {{ item.raw.icon }}
39
+ </FSIcon>
40
+ <FSSpan
41
+ :font="font"
42
+ >
43
+ {{ item.raw.label }}
44
+ </FSSpan>
45
+ </FSRow>
46
+ </template>
47
+ </FSAutocompleteField>
48
+ </template>
49
+
50
+ <script lang="ts">
51
+ import { computed, defineComponent, type PropType } from "vue";
52
+
53
+ import { type DashboardOrganisationFilters } from "@dative-gpi/foundation-core-domain/models";
54
+ import { useDashboardOrganisations } from "@dative-gpi/foundation-core-services/composables";
55
+ import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
56
+
57
+ import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
58
+ import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
59
+ import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
60
+ import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
61
+
62
+
63
+ export default defineComponent({
64
+ name: "FSAutocompleteDashboard",
65
+ components: {
66
+ FSAutocompleteField,
67
+ FSIcon,
68
+ FSSpan,
69
+ FSRow
70
+ },
71
+ props: {
72
+ dashboardOrganisationFilters: {
73
+ type: Object as PropType<DashboardOrganisationFilters>,
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
+ toggleSetDisabled: {
83
+ type: Boolean,
84
+ required: false,
85
+ default: false
86
+ }
87
+ },
88
+ emits: ["update:modelValue"],
89
+ setup(props, { emit }) {
90
+ const { getMany: getManyDashboardOrganisations, fetching: fetchingDashboardOrganisations, entities: dashboardOrganisations } = useDashboardOrganisations();
91
+
92
+ const loading = computed((): boolean => {
93
+ return init.value && fetchingDashboardOrganisations.value;
94
+ });
95
+
96
+ const fetch = (search: string | null) => {
97
+ return getManyDashboardOrganisations({ ...props.dashboardOrganisationFilters, search: search ?? undefined });
98
+ };
99
+
100
+ const { toggleSet, init, onUpdate } = useAutocomplete(
101
+ dashboardOrganisations,
102
+ [() => props.dashboardOrganisationFilters],
103
+ emit,
104
+ fetch
105
+ );
106
+
107
+ return {
108
+ dashboardOrganisations,
109
+ toggleSet,
110
+ loading,
111
+ onUpdate
112
+ };
113
+ }
114
+ });
115
+ </script>
@@ -25,28 +25,21 @@
25
25
  </FSRow>
26
26
  </template>
27
27
  <template
28
- #autocomplete-item="{ props, item }"
28
+ #item-label="{ item, font }"
29
29
  >
30
- <v-list-item
31
- v-bind="{ ...props, title: '' }"
30
+ <FSRow
31
+ align="center-left"
32
+ :wrap="false"
32
33
  >
33
- <FSRow
34
- align="center-left"
35
- :wrap="false"
34
+ <FSIcon>
35
+ {{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
36
+ </FSIcon>
37
+ <FSSpan
38
+ :font="font"
36
39
  >
37
- <FSCheckbox
38
- v-if="$props.multiple"
39
- :modelValue="$props.modelValue?.includes(item.value)"
40
- @click="props.onClick"
41
- />
42
- <FSIcon>
43
- {{ item.raw.correlated ? 'mdi-link' : 'mdi-link-off' }}
44
- </FSIcon>
45
- <FSSpan>
46
- {{ item.raw.label }}
47
- </FSSpan>
48
- </FSRow>
49
- </v-list-item>
40
+ {{ item.raw.label }}
41
+ </FSSpan>
42
+ </FSRow>
50
43
  </template>
51
44
  <template
52
45
  #toggle-set-item="props"
@@ -64,14 +57,13 @@
64
57
  </template>
65
58
 
66
59
  <script lang="ts">
67
- import { computed, defineComponent, PropType } from "vue";
60
+ import { computed, defineComponent, type PropType } from "vue";
68
61
 
69
62
  import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
63
+ import { type DataCategoryFilters } from "@dative-gpi/foundation-core-domain/models";
70
64
  import { useDataCategories } from "@dative-gpi/foundation-core-services/composables";
71
- import { DataCategoryFilters } from "@dative-gpi/foundation-core-domain/models";
72
65
 
73
66
  import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
74
- import FSCheckbox from "@dative-gpi/foundation-shared-components/components/FSCheckbox.vue";
75
67
  import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
76
68
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
77
69
  import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
@@ -81,7 +73,6 @@ export default defineComponent({
81
73
  name: "FSAutocompleteDataCategory",
82
74
  components: {
83
75
  FSAutocompleteField,
84
- FSCheckbox,
85
76
  FSButton,
86
77
  FSIcon,
87
78
  FSSpan,
@@ -117,7 +108,7 @@ export default defineComponent({
117
108
  return init.value && fetchingDataCategories.value;
118
109
  });
119
110
 
120
- const innerFetch = (search: string | null) => {
111
+ const fetch = (search: string | null) => {
121
112
  return getManyDataCategories({ ...props.dataCategoriesFilters, search: search ?? undefined });
122
113
  };
123
114
 
@@ -125,7 +116,7 @@ export default defineComponent({
125
116
  dataCategories,
126
117
  [() => props.dataCategoriesFilters],
127
118
  emit,
128
- innerFetch
119
+ fetch
129
120
  );
130
121
 
131
122
  return {
@@ -26,29 +26,22 @@
26
26
  </FSRow>
27
27
  </template>
28
28
  <template
29
- #autocomplete-item="{ props, item }"
29
+ #item-label="{ item, font }"
30
30
  >
31
- <v-list-item
32
- v-bind="{ ...props, title: '' }"
31
+ <FSRow
32
+ align="center-left"
33
+ :wrap="false"
33
34
  >
34
- <FSRow
35
- align="center-left"
36
- :wrap="false"
35
+ <FSChip
36
+ v-if="item.raw.unit"
37
+ :label="item.raw.unit"
38
+ />
39
+ <FSSpan
40
+ :font="font"
37
41
  >
38
- <FSCheckbox
39
- v-if="$props.multiple"
40
- :modelValue="$props.modelValue?.includes(item.value)"
41
- @click="props.onClick"
42
- />
43
- <FSChip
44
- v-if="item.raw.unit"
45
- :label="item.raw.unit"
46
- />
47
- <FSSpan>
48
- {{ item.raw.label }}
49
- </FSSpan>
50
- </FSRow>
51
- </v-list-item>
42
+ {{ item.raw.label }}
43
+ </FSSpan>
44
+ </FSRow>
52
45
  </template>
53
46
  <template
54
47
  #toggle-set-item="props"
@@ -74,14 +67,13 @@
74
67
  </template>
75
68
 
76
69
  <script lang="ts">
77
- import { computed, defineComponent, PropType } from "vue";
70
+ import { computed, defineComponent, type PropType } from "vue";
78
71
 
72
+ import { type DataDefinitionFilters } from "@dative-gpi/foundation-core-domain/models";
79
73
  import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
80
74
  import { useDataDefinitions } from "@dative-gpi/foundation-core-services/composables";
81
- import { DataDefinitionFilters } from "@dative-gpi/foundation-core-domain/models";
82
75
 
83
76
  import FSAutocompleteField from "@dative-gpi/foundation-shared-components/components/fields/FSAutocompleteField.vue";
84
- import FSCheckbox from "@dative-gpi/foundation-shared-components/components/FSCheckbox.vue";
85
77
  import FSButton from "@dative-gpi/foundation-shared-components/components/FSButton.vue";
86
78
  import FSChip from "@dative-gpi/foundation-shared-components/components/FSChip.vue";
87
79
  import FSSpan from "@dative-gpi/foundation-shared-components/components/FSSpan.vue";
@@ -91,7 +83,6 @@ export default defineComponent({
91
83
  name: "FSAutocompleteDataDefinition",
92
84
  components: {
93
85
  FSAutocompleteField,
94
- FSCheckbox,
95
86
  FSButton,
96
87
  FSChip,
97
88
  FSSpan,
@@ -127,7 +118,7 @@ export default defineComponent({
127
118
  return init.value && fetchingDataDefinitions.value;
128
119
  });
129
120
 
130
- const innerFetch = (search: string | null) => {
121
+ const fetch = (search: string | null) => {
131
122
  return getManyDataDefinitions({ ...props.dataDefinitionFilters, search: search ?? undefined });
132
123
  };
133
124
 
@@ -135,7 +126,7 @@ export default defineComponent({
135
126
  dataDefinitions,
136
127
  [() => props.dataDefinitionFilters],
137
128
  emit,
138
- innerFetch
129
+ fetch
139
130
  );
140
131
 
141
132
  return {