@dative-gpi/foundation-core-components 1.0.128 → 1.0.130
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/entities/FSSelectEntitiesList.vue +14 -3
- package/components/explorers/FSBaseFoldersExplorer.vue +1 -0
- package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +1 -0
- package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +1 -0
- package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +1 -0
- package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +1 -0
- package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +0 -1
- package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +0 -1
- package/components/tiles/FSChartTile.vue +70 -0
- package/package.json +7 -7
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
:entity-type="$props.entityType"
|
|
20
20
|
:filters="simpleListFilters"
|
|
21
21
|
:showEdit="false"
|
|
22
|
-
:showRemove="
|
|
22
|
+
:showRemove="showRemove"
|
|
23
|
+
@click:remove="onRemove"
|
|
23
24
|
direction="row"
|
|
24
25
|
/>
|
|
25
26
|
</FSSlideGroup>
|
|
@@ -96,9 +97,14 @@ export default defineComponent({
|
|
|
96
97
|
type: Object,
|
|
97
98
|
required: false,
|
|
98
99
|
default: null
|
|
100
|
+
},
|
|
101
|
+
showRemove: {
|
|
102
|
+
type: Boolean,
|
|
103
|
+
required: false,
|
|
104
|
+
default: false
|
|
99
105
|
}
|
|
100
106
|
},
|
|
101
|
-
setup(props, { attrs }){
|
|
107
|
+
setup(props, { emit, attrs }){
|
|
102
108
|
const simpleListFilters = computed(() => {
|
|
103
109
|
switch(props.entityType) {
|
|
104
110
|
case EntityType.Device:
|
|
@@ -188,10 +194,15 @@ export default defineComponent({
|
|
|
188
194
|
};
|
|
189
195
|
});
|
|
190
196
|
|
|
197
|
+
const onRemove = (id: string) => {
|
|
198
|
+
emit("update:modelValue", props.modelValue.filter((i) => i !== id));
|
|
199
|
+
}
|
|
200
|
+
|
|
191
201
|
return {
|
|
192
202
|
simpleListFilters,
|
|
193
203
|
baseTableAttrs,
|
|
194
|
-
tableCode
|
|
204
|
+
tableCode,
|
|
205
|
+
onRemove
|
|
195
206
|
}
|
|
196
207
|
}
|
|
197
208
|
});
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSChartTileUI
|
|
3
|
+
v-if="chart"
|
|
4
|
+
:label="chart.label"
|
|
5
|
+
:icon="chart.icon"
|
|
6
|
+
:type="chart.chartType"
|
|
7
|
+
:imageId="chart.imageId"
|
|
8
|
+
v-bind="$attrs"
|
|
9
|
+
/>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { computed, defineComponent, type PropType, watch } from "vue";
|
|
14
|
+
|
|
15
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
16
|
+
import { chartIcon } from "@dative-gpi/foundation-shared-components/tools";
|
|
17
|
+
|
|
18
|
+
import { useChartOrganisation, useChartOrganisationType } from "@dative-gpi/foundation-core-services/composables";
|
|
19
|
+
import { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
20
|
+
|
|
21
|
+
import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
|
|
22
|
+
|
|
23
|
+
export default defineComponent({
|
|
24
|
+
name: "FSChartTile",
|
|
25
|
+
components: {
|
|
26
|
+
FSChartTileUI
|
|
27
|
+
},
|
|
28
|
+
props: {
|
|
29
|
+
chartId: {
|
|
30
|
+
type: String,
|
|
31
|
+
required: true
|
|
32
|
+
},
|
|
33
|
+
scope: {
|
|
34
|
+
type: Object as PropType<ApplicationScope | number>,
|
|
35
|
+
required : true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
setup(props) {
|
|
39
|
+
const { get : fetchChartOrganisationType, entity : chartOrganisationType } = useChartOrganisationType();
|
|
40
|
+
const { get : fetchChartOrganisation, entity : chartOrganisation } = useChartOrganisation();
|
|
41
|
+
|
|
42
|
+
const chart = computed(() => {
|
|
43
|
+
if (props.scope == ApplicationScope.Organisation) {
|
|
44
|
+
return chartOrganisation.value;
|
|
45
|
+
}
|
|
46
|
+
else if (props.scope == ApplicationScope.OrganisationType) {
|
|
47
|
+
return chartOrganisationType.value;
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
return null
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
watch(() => [props.chartId, props.scope], () => {
|
|
55
|
+
if (props.scope == ApplicationScope.Organisation) {
|
|
56
|
+
fetchChartOrganisation(props.chartId);
|
|
57
|
+
}
|
|
58
|
+
else if (props.scope == ApplicationScope.OrganisationType) {
|
|
59
|
+
fetchChartOrganisationType(props.chartId)
|
|
60
|
+
}
|
|
61
|
+
}, {immediate : true})
|
|
62
|
+
|
|
63
|
+
return {
|
|
64
|
+
ColorEnum,
|
|
65
|
+
chart,
|
|
66
|
+
chartIcon
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
</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": "1.0.
|
|
4
|
+
"version": "1.0.130",
|
|
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.130",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.130",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.130",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.130",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.130"
|
|
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": "fc680c25f1b54df6a7c9195343556c0c93f1454d"
|
|
30
30
|
}
|