@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.
@@ -19,7 +19,8 @@
19
19
  :entity-type="$props.entityType"
20
20
  :filters="simpleListFilters"
21
21
  :showEdit="false"
22
- :showRemove="false"
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
  });
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :items="items"
4
5
  :item-to="$props.itemTo"
5
6
  :loading="fetchingFolders || fetchingDashboardOrganisations || fetchingDashboardShallows"
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :items="chartOrganisationTypes"
4
5
  :itemTo="$props.itemTo"
5
6
  :loading="fetchingChartOrganisationTypes"
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :items="chartOrganisations"
4
5
  :itemTo="$props.itemTo"
5
6
  :loading="fetchingChartOrganisations"
@@ -19,6 +19,7 @@
19
19
  maskHeight="0px"
20
20
  >
21
21
  <FSDataTable
22
+ defaultMode="iterator"
22
23
  :loading="fetchingDataCategories"
23
24
  :items="dataCategories"
24
25
  :modelValue="$props.modelValue"
@@ -1,5 +1,6 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :loading="fetchingDataDefinitions"
4
5
  :items="dataDefinitions"
5
6
  :tableCode="$props.tableCode"
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <FSDataTable
3
- defaultMode="iterator"
4
3
  :items="serviceAccountOrganisations"
5
4
  :itemTo="$props.itemTo"
6
5
  :loading="fetchingServiceAccountOrganisations"
@@ -1,6 +1,5 @@
1
1
  <template>
2
2
  <FSDataTable
3
- defaultMode="iterator"
4
3
  :items="userOrganisations"
5
4
  :itemTo="$props.itemTo"
6
5
  :loading="fetchingUserOrganisations"
@@ -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.128",
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.128",
14
- "@dative-gpi/foundation-core-services": "1.0.128",
15
- "@dative-gpi/foundation-shared-components": "1.0.128",
16
- "@dative-gpi/foundation-shared-domain": "1.0.128",
17
- "@dative-gpi/foundation-shared-services": "1.0.128"
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": "ca2de0b5abd0fb4f1fdfaafbc4267182ab609336"
29
+ "gitHead": "fc680c25f1b54df6a7c9195343556c0c93f1454d"
30
30
  }