@dative-gpi/foundation-core-components 1.0.159 → 1.0.160
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="ColorEnum.Light"
|
|
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 { 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,33 @@ 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: 10,
|
|
255
|
+
text: $tr("ui.common.folder", "Folder")
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
methodFilter: (value: number, dashboardType: DashboardType) => {
|
|
259
|
+
if(dashboardType !== DashboardType.None) {
|
|
260
|
+
return value === dashboardType;
|
|
261
|
+
} else {
|
|
262
|
+
return value === 10;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}));
|
|
222
267
|
|
|
223
268
|
const onSelect = (values: string[]) => {
|
|
224
269
|
selecteds.value = values;
|
|
@@ -274,12 +319,15 @@ export default defineComponent({
|
|
|
274
319
|
fetchingFolders,
|
|
275
320
|
mainOrganisationDashboardId,
|
|
276
321
|
mainUserDashboardId,
|
|
322
|
+
headersOptions,
|
|
323
|
+
ColorEnum,
|
|
277
324
|
selecteds,
|
|
278
325
|
items,
|
|
279
326
|
onSelect,
|
|
280
327
|
isSelected,
|
|
281
328
|
FoldersListType,
|
|
282
|
-
DashboardType
|
|
329
|
+
DashboardType,
|
|
330
|
+
dashboardTypeLabel
|
|
283
331
|
};
|
|
284
332
|
}
|
|
285
333
|
});
|
|
@@ -76,6 +76,14 @@
|
|
|
76
76
|
:tags="item.modelsLabels.map((d: any) => d.label)"
|
|
77
77
|
/>
|
|
78
78
|
</template>
|
|
79
|
+
<template
|
|
80
|
+
#item.scope="{ item }"
|
|
81
|
+
>
|
|
82
|
+
<FSChip
|
|
83
|
+
:label="applicationScopeLabel(item.scope)"
|
|
84
|
+
:color="ColorEnum.Light"
|
|
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 {
|
|
110
|
+
import { chartTypeLabel, chartIcon, applicationScopeLabel } from "@dative-gpi/foundation-shared-components/tools";
|
|
111
|
+
import { ChartOrigin, ChartType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
103
112
|
import { getEnumEntries } from "@dative-gpi/foundation-shared-domain/tools";
|
|
104
113
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
105
|
-
import { chartTypeLabel, chartIcon } 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
|
},
|
|
@@ -229,7 +241,15 @@ export default defineComponent({
|
|
|
229
241
|
text: chartTypeLabel(e.value)
|
|
230
242
|
})),
|
|
231
243
|
methodFilter: (value: ChartType, item: ChartType) => value == item
|
|
244
|
+
},
|
|
245
|
+
scope: {
|
|
246
|
+
fixedFilters: getEnumEntries(ChartOrigin).filter(e => e.value != ChartOrigin.None).map(e => ({
|
|
247
|
+
value: e.value,
|
|
248
|
+
text: applicationScopeLabel(e.value)
|
|
249
|
+
})),
|
|
250
|
+
methodFilter: (value: ChartOrigin, item: ChartOrigin) => value == item
|
|
232
251
|
}
|
|
252
|
+
|
|
233
253
|
}));
|
|
234
254
|
|
|
235
255
|
const update = (value : string) => {
|
|
@@ -274,6 +294,7 @@ export default defineComponent({
|
|
|
274
294
|
headersOptions,
|
|
275
295
|
ColorEnum,
|
|
276
296
|
charts,
|
|
297
|
+
applicationScopeLabel,
|
|
277
298
|
chartTypeLabel,
|
|
278
299
|
isSelected,
|
|
279
300
|
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="ColorEnum.Light"
|
|
36
|
+
:label="dashboardTypeLabel(item.dashboardType)"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
30
39
|
<template
|
|
31
40
|
#item.main="{ item }"
|
|
32
41
|
>
|
|
@@ -96,8 +105,10 @@ 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
|
|
108
|
+
import { dashboardTypeLabel, type DashboardsListItem } from "@dative-gpi/foundation-core-components/utils";
|
|
109
|
+
import { ColorEnum } from '@dative-gpi/foundation-shared-components/models';
|
|
100
110
|
import { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
111
|
+
import { getEnumEntries } from '@dative-gpi/foundation-shared-domain';
|
|
101
112
|
|
|
102
113
|
import FSTagGroup from "@dative-gpi/foundation-shared-components/components/FSTagGroup.vue";
|
|
103
114
|
import FSIcon from "@dative-gpi/foundation-shared-components/components/FSIcon.vue";
|
|
@@ -106,12 +117,14 @@ import FSDashboardOrganisationTileUI from "@dative-gpi/foundation-shared-compone
|
|
|
106
117
|
import FSDashboardOrganisationTypeTileUI from "@dative-gpi/foundation-shared-components/components/tiles/FSDashboardOrganisationTypeTileUI.vue";
|
|
107
118
|
|
|
108
119
|
import FSDataTable from "../FSDataTable.vue";
|
|
120
|
+
import FSChip from '@dative-gpi/foundation-shared-components/components/FSChip.vue';
|
|
109
121
|
|
|
110
122
|
export default defineComponent({
|
|
111
123
|
name: "FSBaseDashboardsList",
|
|
112
124
|
components: {
|
|
113
125
|
FSDataTable,
|
|
114
126
|
FSTagGroup,
|
|
127
|
+
FSChip,
|
|
115
128
|
FSIcon,
|
|
116
129
|
FSDashboardOrganisationTileUI,
|
|
117
130
|
FSDashboardOrganisationTypeTileUI,
|
|
@@ -186,6 +199,16 @@ export default defineComponent({
|
|
|
186
199
|
], d => d.label);
|
|
187
200
|
});
|
|
188
201
|
|
|
202
|
+
const headersOptions = computed(() => ({
|
|
203
|
+
dashboardType: {
|
|
204
|
+
fixedFilters: getEnumEntries(DashboardType).filter(e => e.value != DashboardType.None).map(e => ({
|
|
205
|
+
value: e.value,
|
|
206
|
+
text: dashboardTypeLabel(e.value)
|
|
207
|
+
})),
|
|
208
|
+
methodFilter: (value: DashboardType, item: DashboardType) => value == item
|
|
209
|
+
}
|
|
210
|
+
}));
|
|
211
|
+
|
|
189
212
|
const mainUserDashboardId = computed(() => {
|
|
190
213
|
return userOrganisation.value?.mainDashboardId;
|
|
191
214
|
});
|
|
@@ -240,13 +263,16 @@ export default defineComponent({
|
|
|
240
263
|
fetchingDashboardOrganisationTypes,
|
|
241
264
|
fetchingDashboardOrganisations,
|
|
242
265
|
fetchingDashboardShallows,
|
|
266
|
+
headersOptions,
|
|
243
267
|
selecteds,
|
|
268
|
+
ColorEnum,
|
|
244
269
|
items,
|
|
245
270
|
mainUserDashboardId,
|
|
246
271
|
mainOrganisationDashboardId,
|
|
247
272
|
onSelect,
|
|
248
273
|
isSelected,
|
|
249
|
-
DashboardType
|
|
274
|
+
DashboardType,
|
|
275
|
+
dashboardTypeLabel
|
|
250
276
|
};
|
|
251
277
|
}
|
|
252
278
|
});
|
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.160",
|
|
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.160",
|
|
14
|
+
"@dative-gpi/foundation-core-services": "1.0.160",
|
|
15
|
+
"@dative-gpi/foundation-shared-components": "1.0.160",
|
|
16
|
+
"@dative-gpi/foundation-shared-domain": "1.0.160",
|
|
17
|
+
"@dative-gpi/foundation-shared-services": "1.0.160"
|
|
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": "c427a9c163483d60edaadb93a11c58283cab96c2"
|
|
30
30
|
}
|
package/utils/dashboards.ts
CHANGED
|
@@ -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
|
}
|