@dative-gpi/foundation-core-components 1.0.159-sankey → 1.0.159-tes

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.
@@ -5,6 +5,7 @@
5
5
  :item-to="$props.itemTo"
6
6
  :loading="fetchingFolders || fetchingDashboardOrganisations || fetchingDashboardShallows"
7
7
  :tableCode="$props.tableCode"
8
+ :headersOptions="headersOptions"
8
9
  :modelValue="selecteds"
9
10
  :selectable="$props.selectable"
10
11
  @update:modelValue="onSelect"
@@ -74,6 +75,20 @@
74
75
  :tags="item.tags"
75
76
  />
76
77
  </template>
78
+ <template
79
+ #item.dashboardType="{ item }"
80
+ >
81
+ <FSChip
82
+ v-if="item.type === FoldersListType.Dashboard"
83
+ :color="dashboardTypeColor(item.dashboardType)"
84
+ :label="dashboardTypeLabel(item.dashboardType)"
85
+ />
86
+ <FSChip
87
+ v-else-if="item.type === FoldersListType.Folder"
88
+ :color="ColorEnum.Light"
89
+ :label="$tr('ui.common.folder', 'Folder')"
90
+ />
91
+ </template>
77
92
  <template
78
93
  #item.tile="{ item, toggleSelect }"
79
94
  >
@@ -117,10 +132,11 @@ import { useOrganisation } from "@dative-gpi/foundation-shared-services/composab
117
132
  import { useDashboardOrganisations, useFolders, useDashboardShallows, useAppOrganisationId, useCurrentUserOrganisation } from "@dative-gpi/foundation-core-services/composables";
118
133
 
119
134
  import { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
120
- import { FoldersListType, type FoldersListItem } from "@dative-gpi/foundation-core-components/utils";
135
+ import { dashboardTypeColor, dashboardTypeLabel, FoldersListType, type FoldersListItem } from "@dative-gpi/foundation-core-components/utils";
121
136
  import type { FolderFilters, DashboardOrganisationFilters, DashboardShallowFilters, DashboardInfos } from "@dative-gpi/foundation-core-domain/models";
122
137
 
123
138
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
139
+ import FSChip from '@dative-gpi/foundation-shared-components/components/FSChip.vue';
124
140
  import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
125
141
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
126
142
  import FSIconCheck from "@dative-gpi/foundation-shared-components/components/FSIconCheck.vue";
@@ -129,6 +145,8 @@ import FSDashboardShallowTileUI from "@dative-gpi/foundation-shared-components/c
129
145
  import FSDashboardOrganisationTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTileUI.vue";
130
146
 
131
147
  import FSDataTable from "../lists/FSDataTable.vue";
148
+ import { ColorEnum } from '@dative-gpi/foundation-shared-components/models';
149
+ import { useTranslations } from '@dative-gpi/bones-ui';
132
150
 
133
151
  export default defineComponent({
134
152
  name: "FSBaseFoldersExplorer",
@@ -140,6 +158,7 @@ export default defineComponent({
140
158
  FSIconCheck,
141
159
  FSTagGroup,
142
160
  FSImage,
161
+ FSChip,
143
162
  FSIcon
144
163
  },
145
164
  props: {
@@ -179,7 +198,7 @@ export default defineComponent({
179
198
  },
180
199
  emits: ["update", "update:modelValue", "update:type", "update:dashboard-type"],
181
200
  setup(props, { emit }) {
182
-
201
+ const { $tr } = useTranslations();
183
202
  const { fetch: fetchUserOrganisation, entity: userOrganisation } = useCurrentUserOrganisation();
184
203
  const { entity: organisation, get: getOrganisation } = useOrganisation();
185
204
  const { organisationId } = useAppOrganisationId();
@@ -218,7 +237,37 @@ export default defineComponent({
218
237
  })) as FoldersListItem[]
219
238
  ], d => d.label)
220
239
  ]
221
- })
240
+ });
241
+
242
+ const headersOptions = computed(() => ({
243
+ dashboardType: {
244
+ fixedFilters: [
245
+ {
246
+ value: DashboardType.Organisation,
247
+ text: dashboardTypeLabel(DashboardType.Organisation)
248
+ },
249
+ {
250
+ value: DashboardType.Shallow,
251
+ text: dashboardTypeLabel(DashboardType.Shallow)
252
+ },
253
+ {
254
+ value: DashboardType.OrganisationType,
255
+ text: dashboardTypeLabel(DashboardType.OrganisationType)
256
+ },
257
+ {
258
+ value: 10,
259
+ text: $tr("ui.common.folder", "Folder")
260
+ },
261
+ ],
262
+ methodFilter: (value: number, dashboardType: DashboardType) => {
263
+ if(dashboardType !== DashboardType.None) {
264
+ return value === dashboardType;
265
+ } else {
266
+ return value === 10;
267
+ }
268
+ }
269
+ }
270
+ }));
222
271
 
223
272
  const onSelect = (values: string[]) => {
224
273
  selecteds.value = values;
@@ -274,12 +323,16 @@ export default defineComponent({
274
323
  fetchingFolders,
275
324
  mainOrganisationDashboardId,
276
325
  mainUserDashboardId,
326
+ headersOptions,
327
+ ColorEnum,
277
328
  selecteds,
278
329
  items,
279
330
  onSelect,
280
331
  isSelected,
281
332
  FoldersListType,
282
- DashboardType
333
+ DashboardType,
334
+ dashboardTypeColor,
335
+ dashboardTypeLabel
283
336
  };
284
337
  }
285
338
  });
@@ -76,6 +76,14 @@
76
76
  :tags="item.modelsLabels.map((d: any) => d.label)"
77
77
  />
78
78
  </template>
79
+ <template
80
+ #item.origin="{ item }"
81
+ >
82
+ <FSChip
83
+ :label="chartOriginLabel(item.origin)"
84
+ :color="chartOriginColor(item.origin)"
85
+ />
86
+ </template>
79
87
  <template
80
88
  #item.tile="{ item }"
81
89
  >
@@ -99,10 +107,10 @@
99
107
  import { defineComponent, type PropType, watch, computed } from "vue";
100
108
  import _ from "lodash";
101
109
 
102
- import { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
110
+ import { ChartOrigin, ChartType } from "@dative-gpi/foundation-shared-domain/enums";
103
111
  import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
104
112
  import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
105
- import { chartTypeLabel, chartIcon } from "@dative-gpi/foundation-shared-components/tools";
113
+ import { chartTypeLabel, chartIcon, chartOriginLabel, chartOriginColor } from "@dative-gpi/foundation-shared-components/tools";
106
114
 
107
115
  import type { ChartModelLabel, ChartOrganisationFilters, ChartOrganisationTypeFilters } from "@dative-gpi/foundation-core-domain/models";
108
116
  import { useChartOrganisations, useChartOrganisationTypes } from "@dative-gpi/foundation-core-services/composables";
@@ -111,6 +119,8 @@ import FSChartTileUI from "@dative-gpi/foundation-shared-components/components/t
111
119
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
112
120
  import FSImage from "@dative-gpi/foundation-shared-components/components/FSImage.vue";
113
121
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
122
+ import FSChip from '@dative-gpi/foundation-shared-components/components/FSChip.vue';
123
+ import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
114
124
  import FSRow from "@dative-gpi/foundation-shared-components/components/FSRow.vue";
115
125
 
116
126
  import FSDataTable from "../FSDataTable.vue";
@@ -122,6 +132,8 @@ export default defineComponent({
122
132
  FSDataTable,
123
133
  FSTagGroup,
124
134
  FSImage,
135
+ FSText,
136
+ FSChip,
125
137
  FSIcon,
126
138
  FSRow
127
139
  },
@@ -186,7 +198,8 @@ export default defineComponent({
186
198
  tags: c.tags,
187
199
  multiple: c.multiple,
188
200
  chartType: c.chartType,
189
- modelsLabels: c.modelsLabels
201
+ modelsLabels: c.modelsLabels,
202
+ origin: ChartOrigin.Organisation
190
203
  })).concat(chartOrganisationTypes.value.map(c => ({
191
204
  id: c.id,
192
205
  imageId: c.imageId,
@@ -201,7 +214,8 @@ export default defineComponent({
201
214
  tags: c.tags,
202
215
  multiple: c.multiple,
203
216
  chartType: c.chartType,
204
- modelsLabels: c.modelsLabels
217
+ modelsLabels: c.modelsLabels,
218
+ origin: ChartOrigin.OrganisationType
205
219
  })));
206
220
  });
207
221
 
@@ -229,7 +243,15 @@ export default defineComponent({
229
243
  text: chartTypeLabel(e.value)
230
244
  })),
231
245
  methodFilter: (value: ChartType, item: ChartType) => value == item
246
+ },
247
+ origin: {
248
+ fixedFilters: getEnumEntries(ChartOrigin).filter(e => e.value != ChartOrigin.None).map(e => ({
249
+ value: e.value,
250
+ text: chartOriginLabel(e.value)
251
+ })),
252
+ methodFilter: (value: ChartOrigin, item: ChartOrigin) => value == item
232
253
  }
254
+
233
255
  }));
234
256
 
235
257
  const update = (value : string) => {
@@ -274,6 +296,8 @@ export default defineComponent({
274
296
  headersOptions,
275
297
  ColorEnum,
276
298
  charts,
299
+ chartOriginLabel,
300
+ chartOriginColor,
277
301
  chartTypeLabel,
278
302
  isSelected,
279
303
  chartIcon,
@@ -3,6 +3,7 @@
3
3
  defaultMode="iterator"
4
4
  :items="items"
5
5
  :itemTo="$props.itemTo"
6
+ :headersOptions="headersOptions"
6
7
  :loading="fetchingDashboardOrganisationTypes || fetchingDashboardOrganisations || fetchingDashboardShallows"
7
8
  :tableCode="$props.tableCode"
8
9
  :selectable="$props.selectable"
@@ -27,6 +28,14 @@
27
28
  {{ item.icon }}
28
29
  </FSIcon>
29
30
  </template>
31
+ <template
32
+ #item.dashboardType="{ item }"
33
+ >
34
+ <FSChip
35
+ :color="dashboardTypeColor(item.dashboardType)"
36
+ :label="dashboardTypeLabel(item.dashboardType)"
37
+ />
38
+ </template>
30
39
  <template
31
40
  #item.main="{ item }"
32
41
  >
@@ -96,8 +105,9 @@ import { useAppOrganisationId, useCurrentUserOrganisation, useDashboardOrganisat
96
105
  import type { DashboardOrganisationTypeFilters, DashboardOrganisationFilters, DashboardShallowFilters, DashboardInfos } from "@dative-gpi/foundation-core-domain/models";
97
106
  import { useOrganisation } from "@dative-gpi/foundation-shared-services/composables";
98
107
 
99
- import type { DashboardsListItem } from "@/core/foundation-core-components/utils";
108
+ import { dashboardTypeColor, dashboardTypeLabel, type DashboardsListItem } from "@dative-gpi/foundation-core-components/utils";
100
109
  import { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
110
+ import { getEnumEntries } from '@dative-gpi/foundation-shared-domain';
101
111
 
102
112
  import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
103
113
  import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
@@ -106,12 +116,14 @@ import FSDashboardOrganisationTileUI from "@dative-gpi/foundation-shared-compone
106
116
  import FSDashboardOrganisationTypeTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTypeTileUI.vue";
107
117
 
108
118
  import FSDataTable from "../FSDataTable.vue";
119
+ import FSChip from '@dative-gpi/foundation-shared-components/components/FSChip.vue';
109
120
 
110
121
  export default defineComponent({
111
122
  name: "FSBaseDashboardsList",
112
123
  components: {
113
124
  FSDataTable,
114
125
  FSTagGroup,
126
+ FSChip,
115
127
  FSIcon,
116
128
  FSDashboardOrganisationTileUI,
117
129
  FSDashboardOrganisationTypeTileUI,
@@ -186,6 +198,16 @@ export default defineComponent({
186
198
  ], d => d.label);
187
199
  });
188
200
 
201
+ const headersOptions = computed(() => ({
202
+ dashboardType: {
203
+ fixedFilters: getEnumEntries(DashboardType).filter(e => e.value != DashboardType.None).map(e => ({
204
+ value: e.value,
205
+ text: dashboardTypeLabel(e.value)
206
+ })),
207
+ methodFilter: (value: DashboardType, item: DashboardType) => value == item
208
+ }
209
+ }));
210
+
189
211
  const mainUserDashboardId = computed(() => {
190
212
  return userOrganisation.value?.mainDashboardId;
191
213
  });
@@ -240,13 +262,16 @@ export default defineComponent({
240
262
  fetchingDashboardOrganisationTypes,
241
263
  fetchingDashboardOrganisations,
242
264
  fetchingDashboardShallows,
265
+ headersOptions,
243
266
  selecteds,
244
267
  items,
245
268
  mainUserDashboardId,
246
269
  mainOrganisationDashboardId,
247
270
  onSelect,
248
271
  isSelected,
249
- DashboardType
272
+ DashboardType,
273
+ dashboardTypeColor,
274
+ dashboardTypeLabel
250
275
  };
251
276
  }
252
277
  });
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.159-sankey",
4
+ "version": "1.0.159-tes",
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.159-sankey",
14
- "@dative-gpi/foundation-core-services": "1.0.159-sankey",
15
- "@dative-gpi/foundation-shared-components": "1.0.159-sankey",
16
- "@dative-gpi/foundation-shared-domain": "1.0.159-sankey",
17
- "@dative-gpi/foundation-shared-services": "1.0.159-sankey"
13
+ "@dative-gpi/foundation-core-domain": "1.0.159-tes",
14
+ "@dative-gpi/foundation-core-services": "1.0.159-tes",
15
+ "@dative-gpi/foundation-shared-components": "1.0.159-tes",
16
+ "@dative-gpi/foundation-shared-domain": "1.0.159-tes",
17
+ "@dative-gpi/foundation-shared-services": "1.0.159-tes"
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": "2e082499c169cb28d4480d2fb76993f1240d9c87"
29
+ "gitHead": "57055768c17ce0eac0db91d72cef3992d542e189"
30
30
  }
@@ -8,7 +8,7 @@ const { $tr } = useTranslationsProvider();
8
8
  export const dashboardTypeLabel = (type: DashboardType): string => {
9
9
  switch (type) {
10
10
  case DashboardType.None: return $tr("ui.common.none", "None");
11
- case DashboardType.Organisation:
11
+ case DashboardType.Organisation: return $tr('ui.dashboard-type.shallow', 'Shallow copy');
12
12
  case DashboardType.Shallow: return $tr("ui.common.custom", "Custom");
13
13
  case DashboardType.OrganisationType: return $tr("ui.common.shared", "Shared");
14
14
  }