@dative-gpi/foundation-core-components 1.0.65 → 1.0.67-map-edit

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 (80) hide show
  1. package/components/autocompletes/FSAutocompleteChart.vue +15 -8
  2. package/components/autocompletes/FSAutocompleteDashboard.vue +14 -6
  3. package/components/autocompletes/FSAutocompleteDashboardOrganisation.vue +7 -1
  4. package/components/autocompletes/FSAutocompleteDataCategory.vue +11 -5
  5. package/components/autocompletes/FSAutocompleteDataDefinition.vue +7 -1
  6. package/components/autocompletes/FSAutocompleteGroup.vue +7 -1
  7. package/components/autocompletes/FSAutocompleteLocation.vue +6 -0
  8. package/components/autocompletes/FSAutocompleteManufacturer.vue +8 -0
  9. package/components/autocompletes/FSAutocompleteModel.vue +9 -1
  10. package/components/autocompletes/FSAutocompleteOrganisationType.vue +7 -1
  11. package/components/autocompletes/FSAutocompleteRole.vue +14 -6
  12. package/components/autocompletes/FSAutocompleteServiceAccountRoleOrganisation.vue +7 -1
  13. package/components/autocompletes/FSAutocompleteUserOrganisation.vue +9 -1
  14. package/components/customProperties/FSMetaField.vue +35 -40
  15. package/components/customProperties/FSMetaFormContent.vue +4 -3
  16. package/components/customProperties/FSMetaHistory.vue +2 -2
  17. package/components/customProperties/helpers.ts +57 -165
  18. package/components/entities/FSBaseEntitiesList.vue +12 -2
  19. package/components/entities/FSDialogSelectEntities.vue +19 -2
  20. package/components/entities/FSEntityField.vue +75 -14
  21. package/components/entities/FSSelectEntitiesList.vue +40 -7
  22. package/components/explorers/FSBaseDevicesExplorer.vue +322 -0
  23. package/components/explorers/FSBaseFoldersExplorer.vue +126 -24
  24. package/components/lists/FSDataTable.vue +22 -16
  25. package/components/lists/alerts/FSBaseAlertsList.vue +96 -106
  26. package/components/lists/alerts/FSButtonAcknowledgeAlert.vue +4 -4
  27. package/components/lists/authTokens/FSBaseAuthTokensList.vue +6 -4
  28. package/components/lists/chartOrganisationTypes/FSBaseChartOrganisationTypesList.vue +97 -34
  29. package/components/lists/chartOrganisations/FSBaseChartOrganisationsList.vue +98 -34
  30. package/components/lists/charts/FSBaseChartsList.vue +153 -64
  31. package/components/lists/comments/FSBaseCommentsList.vue +39 -23
  32. package/components/lists/connectivityScenarios/FSBaseConnectivityScenariosList.vue +128 -0
  33. package/components/lists/dashboardOrganisationTypes/FSBaseDashboardOrganisationTypesList.vue +41 -8
  34. package/components/lists/dashboards/FSBaseDashboardsList.vue +76 -16
  35. package/components/lists/dashboards/FSSimpleDashboardsList.vue +33 -7
  36. package/components/lists/dataCategories/FSBaseDataCategoriesList.vue +8 -6
  37. package/components/lists/dataDefinitions/FSBaseDataDefinitionsList.vue +8 -5
  38. package/components/lists/deviceOrganisations/FSBaseDeviceOrganisationsList.vue +70 -44
  39. package/components/lists/folders/FSBaseFoldersList.vue +27 -15
  40. package/components/lists/groups/FSBaseGroupsList.vue +13 -9
  41. package/components/lists/locations/FSBaseLocationsList.vue +17 -13
  42. package/components/lists/models/FSBaseModelsList.vue +31 -13
  43. package/components/lists/playlists/FSSimplePlaylistsList.vue +44 -0
  44. package/components/lists/roleOrganisationTypes/FSBaseRoleOrganisationTypesList.vue +6 -5
  45. package/components/lists/roleOrganisations/FSBaseRoleOrganisationsList.vue +17 -16
  46. package/components/lists/scenarioOrganisationTypes/FSBaseScenarioOrganisationTypesList.vue +45 -8
  47. package/components/lists/scenarioOrganisations/FSBaseScenarioOrganisationsList.vue +45 -7
  48. package/components/lists/scenarios/FSBaseScenariosList.vue +121 -86
  49. package/components/lists/serviceAccountOrganisations/FSBaseServiceAccountOrganisationsList.vue +10 -7
  50. package/components/lists/serviceAccountRoleOrganisations/FSBaseServiceAccountRoleOrganisationsList.vue +128 -0
  51. package/components/lists/userOrganisations/FSBaseUserOrganisationsList.vue +10 -7
  52. package/components/lists/userOrganisations/FSChipUserOrganisationsList.vue +61 -0
  53. package/components/tiles/FSChartTile.vue +71 -0
  54. package/components/tiles/FSDashboardOrganisationTile.vue +3 -3
  55. package/components/tiles/FSDashboardOrganisationTypeTile.vue +3 -3
  56. package/components/tiles/FSDashboardShallowTile.vue +3 -3
  57. package/components/tiles/FSDeviceOrganisationTile.vue +3 -3
  58. package/components/tiles/FSFolderTile.vue +7 -5
  59. package/components/tiles/FSGroupTile.vue +3 -3
  60. package/components/tiles/FSLocationTile.vue +5 -3
  61. package/components/tiles/FSModelTile.vue +64 -0
  62. package/components/tiles/FSServiceAccountOrganisationTile.vue +3 -3
  63. package/components/tiles/FSUserOrganisationTile.vue +3 -3
  64. package/components/treeviews/FSTreeViewGroup.vue +7 -1
  65. package/package.json +9 -9
  66. package/utils/dashboards.ts +4 -4
  67. package/utils/index.ts +0 -1
  68. package/utils/roles.ts +3 -3
  69. package/utils/users.ts +3 -3
  70. package/components/selects/FSAggregationSelector.vue +0 -51
  71. package/components/selects/FSAxisTypeSelector.vue +0 -48
  72. package/components/selects/FSDisplayAsSelector.vue +0 -52
  73. package/components/selects/FSFilterTypeSelector.vue +0 -53
  74. package/components/selects/FSHeatmapRuleSelector.vue +0 -52
  75. package/components/selects/FSOperationOnSelector.vue +0 -51
  76. package/components/selects/FSPlanningTypeSelector.vue +0 -51
  77. package/components/selects/FSPlotPerSelector.vue +0 -51
  78. package/components/selects/FSSelectEntityType.vue +0 -59
  79. package/components/selects/FSSerieTypeSelector.vue +0 -51
  80. package/utils/charts.ts +0 -137
@@ -1,11 +1,11 @@
1
1
  <template>
2
2
  <FSButton
3
3
  prependIcon="mdi-checkbox-blank-outline"
4
- :label="$tr('page.alert.acknowledge', 'Acknowledge')"
4
+ :label="$tr('ui.alert.acknowledge', 'Acknowledge')"
5
5
  @click="dialog = true"
6
6
  />
7
7
  <FSDialogSubmit
8
- :title="$tr('page.alert.acknowledge', 'Acknowledge')"
8
+ :title="$tr('ui.alert.acknowledge', 'Acknowledge')"
9
9
  :load="acknowledgingAlert"
10
10
  @click:submitButton="onAcknowledge"
11
11
  v-model="dialog"
@@ -26,12 +26,12 @@
26
26
  gap="2px"
27
27
  >
28
28
  <FSSpan>
29
- {{ $tr("page.alert.acknowledge-warning", "Do you want to acknowledge this alert?") }}
29
+ {{ $tr("ui.alert.acknowledge-warning", "Do you want to acknowledge this alert?") }}
30
30
  </FSSpan>
31
31
  </FSRow>
32
32
  </FSRow>
33
33
  <FSSpan>
34
- {{ $tr("page.alert.acknowledge-final-warning", "This action is definitive") }}
34
+ {{ $tr("ui.alert.acknowledge-final-warning", "This action is definitive") }}
35
35
  </FSSpan>
36
36
  <FSErrorToast
37
37
  v-if="error"
@@ -3,6 +3,7 @@
3
3
  :items="authTokens"
4
4
  :loading="fetchingAuthTokens"
5
5
  :tableCode="$props.tableCode"
6
+ :selectable="false"
6
7
  v-bind="$attrs"
7
8
  >
8
9
  <template
@@ -48,14 +49,15 @@ export default defineComponent({
48
49
  FSText
49
50
  },
50
51
  props: {
52
+ tableCode: {
53
+ type: String as PropType<string | null>,
54
+ required: false,
55
+ default: null
56
+ },
51
57
  authTokensFilters: {
52
58
  type: Object as PropType<AuthTokenFilters | null>,
53
59
  required: false,
54
60
  default: null
55
- },
56
- tableCode: {
57
- type: String,
58
- required: true
59
61
  }
60
62
  },
61
63
  setup(props) {
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :items="chartOrganisationTypes"
4
5
  :itemTo="$props.itemTo"
5
6
  :loading="fetchingChartOrganisationTypes"
7
+ :headersOptions="headersOptions"
6
8
  :tableCode="$props.tableCode"
7
9
  :modelValue="$props.modelValue"
10
+ :selectable="$props.selectable"
11
+ :singleSelect="$props.singleSelect"
8
12
  @update:modelValue="$emit('update:modelValue', $event)"
9
13
  v-bind="$attrs"
10
14
  >
@@ -39,6 +43,7 @@
39
43
  height="32px"
40
44
  width="32px"
41
45
  :imageId="item.imageId"
46
+ :thumbnail="true"
42
47
  />
43
48
  </template>
44
49
  <template
@@ -46,27 +51,48 @@
46
51
  >
47
52
  <FSTagGroup
48
53
  variant="slide"
49
- :editable="false"
50
54
  :tags="item.tags"
55
+ :showRemove="false"
51
56
  />
52
57
  </template>
58
+ <template
59
+ #item.chartType="{ item }"
60
+ >
61
+ <FSRow
62
+ :wrap="false"
63
+ >
64
+ <FSIcon
65
+ :icon="chartIcon(item.chartType)"
66
+ />
67
+ <FSText>
68
+ {{ chartTypeLabel(item.chartType) }}
69
+ </FSText>
70
+ </FSRow>
71
+ </template>
53
72
  <template
54
73
  #item.modelsLabels="{ item }"
55
74
  >
56
75
  <FSTagGroup
57
- :editable="false"
76
+ variant="slide"
58
77
  :tags="item.modelsLabels.map((d: any) => d.label)"
78
+ :showRemove="false"
59
79
  />
60
80
  </template>
61
81
  <template
62
- #item.tile="{item}"
82
+ #item.tile="{ index, item, toggleSelect}"
63
83
  >
64
84
  <FSChartTileUI
85
+ :key="index"
65
86
  :label="item.label"
66
87
  :category-label="item.chartCategoryLabel"
88
+ :singleSelect="$props.singleSelect"
89
+ :selectable="$props.selectable"
67
90
  :icon="item.icon"
91
+ :scope="item.scope"
68
92
  :imageId="item.imageId"
69
93
  :type="item.chartType"
94
+ :modelValue="isSelected(item.id)"
95
+ @update:modelValue="toggleSelect(item)"
70
96
  :to="$props.itemTo && $props.itemTo(item)"
71
97
  />
72
98
  </template>
@@ -74,22 +100,26 @@
74
100
  </template>
75
101
 
76
102
  <script lang="ts">
77
- import _ from "lodash";
78
- import { defineComponent, type PropType, watch } from "vue";
103
+ import { computed, defineComponent, type PropType, watch } from "vue";
79
104
  import type { RouteLocation } from "vue-router";
105
+ import _ from "lodash";
80
106
 
81
- import {ColorEnum} from "@dative-gpi/foundation-shared-components/models";
82
-
83
- import type { ChartOrganisationFilters, ChartOrganisationTypeInfos } from "@dative-gpi/foundation-core-domain/models";
84
- import { PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
107
+ import { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
108
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
109
+ import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
110
+ import { chartTypeLabel, chartIcon } from "@dative-gpi/foundation-shared-components/tools";
85
111
 
112
+ import type { ChartModelLabel, ChartOrganisationTypeFilters, ChartOrganisationTypeInfos } from "@dative-gpi/foundation-core-domain/models";
86
113
  import { useChartOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
87
114
 
88
115
  import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
89
- import FSDataTable from "../FSDataTable.vue";
90
116
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
91
117
  import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
118
+ import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
92
119
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
120
+ import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
121
+
122
+ import FSDataTable from "../FSDataTable.vue";
93
123
 
94
124
  export default defineComponent({
95
125
  name: "FSBaseChartOrganisationTypesList",
@@ -98,61 +128,94 @@ export default defineComponent({
98
128
  FSDataTable,
99
129
  FSTagGroup,
100
130
  FSImage,
101
- FSIcon
131
+ FSIcon,
132
+ FSText,
133
+ FSRow
102
134
  },
103
135
  props: {
104
- modelValue: {
105
- type: Array as PropType<string[]>,
106
- default: () => [],
107
- required: false
108
- },
109
- chartOrganisationFilters: {
110
- type: Object as PropType<ChartOrganisationFilters>,
136
+ tableCode: {
137
+ type: String as PropType<string | null>,
111
138
  required: false,
112
139
  default: null
113
140
  },
114
- plotPer: {
115
- type: Number as PropType<PlotPer>,
141
+ chartOrganisationTypeFilters: {
142
+ type: Object as PropType<ChartOrganisationTypeFilters>,
116
143
  required: false,
117
- default: PlotPer.None
118
- },
119
- tableCode: {
120
- type: String,
121
- required: true
144
+ default: null
122
145
  },
123
146
  itemTo: {
124
147
  type: Function as PropType<(item: ChartOrganisationTypeInfos) => Partial<RouteLocation>>,
125
148
  required: false
149
+ },
150
+ modelValue: {
151
+ type: Array as PropType<string[]>,
152
+ default: () => [],
153
+ required: false
154
+ },
155
+ selectable: {
156
+ type: Boolean,
157
+ required: false,
158
+ default: true
159
+ },
160
+ singleSelect: {
161
+ type: Boolean,
162
+ required: false,
163
+ default: false
126
164
  }
127
165
  },
128
166
  emits: ["update:modelValue"],
129
167
  setup(props) {
130
-
131
168
  const { entities: chartOrganisationTypes, fetching: fetchingChartOrganisationTypes, getMany: getManyChartOrganisationTypes } = useChartOrganisationTypes();
132
169
 
170
+ const headersOptions = computed(() => ({
171
+ modelsLabels: {
172
+ fixedFilters: chartOrganisationTypes.value.map(c => c.modelsLabels).reduce((acc, models) => {
173
+ for (const m of models) {
174
+ if (!acc.map((m) => m.id).includes(m.id)) {
175
+ acc.push(m);
176
+ }
177
+ }
178
+ return acc;
179
+ }, []).map((m) => ({
180
+ value: m.id,
181
+ text: m.label
182
+ })).concat({
183
+ value: '',
184
+ text: '--'
185
+ }),
186
+ methodFilter: (value: string, items: ChartModelLabel[]) => (items.length == 0 && value == '') || (items.length > 0 && items.some(ml => ml.id == value))
187
+ },
188
+ chartType: {
189
+ fixedFilters: getEnumEntries(ChartType).map(e => ({
190
+ value: e.value,
191
+ text: chartTypeLabel(e.value)
192
+ })),
193
+ methodFilter: (value: ChartType, item: ChartType) => value == item
194
+ }
195
+ }));
196
+
133
197
  const isSelected = (id: string): boolean => {
134
198
  return props.modelValue.includes(id);
135
199
  };
136
200
 
137
201
  const fetch = () =>{
138
- if(props.plotPer === PlotPer.None) {
139
- getManyChartOrganisationTypes(props.chartOrganisationFilters);
140
- } else {
141
- getManyChartOrganisationTypes({ ...props.chartOrganisationFilters, plotPer: props.plotPer });
142
- }
202
+ getManyChartOrganisationTypes(props.chartOrganisationTypeFilters);
143
203
  };
144
204
 
145
- watch(() => [props.chartOrganisationFilters, props.plotPer], (next, previous) => {
205
+ watch(() => [props.chartOrganisationTypeFilters], (next, previous) => {
146
206
  if ((!next && !previous) || !_.isEqual(next, previous)) {
147
207
  fetch();
148
208
  }
149
209
  }, { immediate: true });
150
210
 
151
211
  return {
152
- ColorEnum,
153
212
  fetchingChartOrganisationTypes,
154
213
  chartOrganisationTypes,
155
- isSelected
214
+ headersOptions,
215
+ ColorEnum,
216
+ chartTypeLabel,
217
+ isSelected,
218
+ chartIcon
156
219
  };
157
220
  }
158
221
  });
@@ -1,10 +1,14 @@
1
1
  <template>
2
2
  <FSDataTable
3
+ defaultMode="iterator"
3
4
  :items="chartOrganisations"
4
5
  :itemTo="$props.itemTo"
5
6
  :loading="fetchingChartOrganisations"
7
+ :headersOptions="headersOptions"
6
8
  :tableCode="$props.tableCode"
7
9
  :modelValue="$props.modelValue"
10
+ :singleSelect="$props.singleSelect"
11
+ :selectable="$props.selectable"
8
12
  @update:modelValue="$emit('update:modelValue', $event)"
9
13
  v-bind="$attrs"
10
14
  >
@@ -39,6 +43,7 @@
39
43
  height="32px"
40
44
  width="32px"
41
45
  :imageId="item.imageId"
46
+ :thumbnail="true"
42
47
  />
43
48
  </template>
44
49
  <template
@@ -46,27 +51,48 @@
46
51
  >
47
52
  <FSTagGroup
48
53
  variant="slide"
49
- :editable="false"
50
54
  :tags="item.tags"
55
+ :showRemove="false"
51
56
  />
52
57
  </template>
53
58
  <template
54
59
  #item.modelsLabels="{ item }"
55
60
  >
56
61
  <FSTagGroup
57
- :editable="false"
62
+ variant="slide"
58
63
  :tags="item.modelsLabels.map((d: any) => d.label)"
64
+ :showRemove="false"
59
65
  />
60
66
  </template>
61
67
  <template
62
- #item.tile="{ item }"
68
+ #item.chartType="{ item }"
69
+ >
70
+ <FSRow
71
+ :wrap="false"
72
+ >
73
+ <FSIcon
74
+ :icon="chartIcon(item.chartType)"
75
+ />
76
+ <FSText>
77
+ {{ chartTypeLabel(item.chartType) }}
78
+ </FSText>
79
+ </FSRow>
80
+ </template>
81
+ <template
82
+ #item.tile="{ index, item, toggleSelect }"
63
83
  >
64
84
  <FSChartTileUI
85
+ :key="index"
65
86
  :label="item.label"
87
+ :singleSelect="$props.singleSelect"
88
+ :selectable="$props.selectable"
66
89
  :categoryLabel="item.chartCategoryLabel"
67
90
  :icon="item.icon"
68
91
  :imageId="item.imageId"
69
92
  :type="item.chartType"
93
+ :scope="item.scope"
94
+ :modelValue="isSelected(item.id)"
95
+ @update:modelValue="toggleSelect(item)"
70
96
  :to="$props.itemTo && $props.itemTo(item)"
71
97
  />
72
98
  </template>
@@ -74,85 +100,123 @@
74
100
  </template>
75
101
 
76
102
  <script lang="ts">
77
- import { defineComponent, type PropType, watch } from "vue";
103
+ import { computed, defineComponent, type PropType, watch } from "vue";
78
104
  import type { RouteLocation } from "vue-router";
79
105
  import _ from "lodash";
80
106
 
107
+ import { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
108
+ import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
81
109
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
82
- import { PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
110
+ import { chartTypeLabel, chartIcon } from "@dative-gpi/foundation-shared-components/tools";
83
111
 
84
- import { type ChartOrganisationFilters, type ChartOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
112
+ import type { ChartModelLabel, ChartOrganisationFilters, ChartOrganisationInfos } from "@dative-gpi/foundation-core-domain/models";
85
113
  import { useChartOrganisations } from "@dative-gpi/foundation-core-services/composables";
86
114
 
87
- import FSDataTable from "../FSDataTable.vue";
115
+ import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
116
+ import FSText from "@dative-gpi/foundation-shared-components/components/FSText.vue";
88
117
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
89
118
  import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
90
119
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
91
120
  import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSChartTileUI.vue";
92
121
 
122
+ import FSDataTable from "../FSDataTable.vue";
123
+
93
124
  export default defineComponent({
94
125
  name: "FSBaseChartOrganisationsList",
95
126
  components: {
127
+ FSChartTileUI,
96
128
  FSDataTable,
97
- FSIcon,
98
- FSImage,
99
129
  FSTagGroup,
100
- FSChartTileUI
130
+ FSImage,
131
+ FSIcon,
132
+ FSText,
133
+ FSRow,
101
134
  },
102
135
  props: {
103
- modelValue: {
104
- type: Array as PropType<string[]>,
105
- default: () => [],
106
- required: false
136
+ tableCode: {
137
+ type: String as PropType<string | null>,
138
+ required: false,
139
+ default: null
107
140
  },
108
141
  chartOrganisationFilters: {
109
142
  type: Object as PropType<ChartOrganisationFilters>,
110
143
  required: false,
111
144
  default: null
112
145
  },
113
- plotPer: {
114
- type: Number as PropType<PlotPer>,
115
- required: false,
116
- default: PlotPer.None
117
- },
118
- tableCode: {
119
- type: String,
120
- required: true
121
- },
122
146
  itemTo: {
123
147
  type: Function as PropType<(item: ChartOrganisationInfos) => Partial<RouteLocation>>,
124
148
  required: false
125
- }
149
+ },
150
+ modelValue: {
151
+ type: Array as PropType<string[]>,
152
+ default: () => [],
153
+ required: false
154
+ },
155
+ selectable: {
156
+ type: Boolean,
157
+ required: false,
158
+ default: true
159
+ },
160
+ singleSelect: {
161
+ type: Boolean,
162
+ required: false,
163
+ default: false
164
+ },
126
165
  },
127
166
  emits: ["update:modelValue"],
128
167
  setup(props) {
129
-
130
168
  const { entities: chartOrganisations, fetching: fetchingChartOrganisations, getMany: getManyChartOrganisations } = useChartOrganisations();
131
169
 
170
+ const headersOptions = computed(() => ({
171
+ modelsLabels: {
172
+ fixedFilters: chartOrganisations.value.map(c => c.modelsLabels).reduce((acc, models) => {
173
+ for (const m of models) {
174
+ if (!acc.map((m) => m.id).includes(m.id)) {
175
+ acc.push(m);
176
+ }
177
+ }
178
+ return acc;
179
+ }, []).map((m) => ({
180
+ value: m.id,
181
+ text: m.label
182
+ })).concat({
183
+ value: '',
184
+ text: '--'
185
+ }),
186
+ methodFilter: (value: string, items: ChartModelLabel[]) => (items.length == 0 && value == '') || (items.length > 0 && items.some(ml => ml.id == value))
187
+ },
188
+ chartType: {
189
+ fixedFilters: getEnumEntries(ChartType).map(e => ({
190
+ value: e.value,
191
+ text: chartTypeLabel(e.value)
192
+ })),
193
+ methodFilter: (value: ChartType, item: ChartType) => value == item
194
+ }
195
+ }));
196
+
197
+
132
198
  const isSelected = (id: string): boolean => {
133
199
  return props.modelValue.includes(id);
134
200
  };
135
201
 
136
202
  const fetch = () =>{
137
- if(props.plotPer === PlotPer.None) {
138
- getManyChartOrganisations(props.chartOrganisationFilters);
139
- } else {
140
- getManyChartOrganisations({...props.chartOrganisationFilters, plotPer: props.plotPer});
141
- }
203
+ getManyChartOrganisations(props.chartOrganisationFilters);
142
204
  }
143
205
 
144
- watch(() => [props.chartOrganisationFilters, props.plotPer], (next, previous) => {
206
+ watch(() => [props.chartOrganisationFilters], (next, previous) => {
145
207
  if ((!next && !previous) || !_.isEqual(next, previous)) {
146
208
  fetch();
147
209
  }
148
210
  }, { immediate: true });
149
-
150
211
 
151
212
  return {
152
- ColorEnum,
153
213
  fetchingChartOrganisations,
154
214
  chartOrganisations,
155
- isSelected
215
+ headersOptions,
216
+ ColorEnum,
217
+ chartTypeLabel,
218
+ isSelected,
219
+ chartIcon
156
220
  };
157
221
  }
158
222
  });