@dative-gpi/foundation-shared-components 1.0.157 → 1.0.158-devices-latency-2
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/FSCol.vue +11 -5
- package/components/FSTagGroup.vue +3 -1
- package/components/fields/FSAutocompleteField.vue +8 -0
- package/components/fields/FSBaseField.vue +6 -0
- package/components/fields/FSIconField.vue +10 -2
- package/components/fields/FSSearchField.vue +1 -0
- package/components/fields/FSTimeRangeField.vue +6 -0
- package/components/lists/FSDataTableUI.vue +30 -24
- package/components/map/FSMap.vue +1 -3
- package/components/map/FSMapMarker.vue +52 -13
- package/components/tiles/FSEntityCountBadge.vue +83 -0
- package/components/tiles/FSFolderTileUI.vue +38 -4
- package/components/tiles/FSGroupTileUI.vue +15 -67
- package/components/tiles/FSGroupingTileUI.vue +52 -0
- package/components/tiles/FSLocationTileUI.vue +9 -28
- package/components/tiles/FSSimpleTileUI.vue +2 -2
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +1 -1
- package/components/views/desktop/FSBaseEntityDesktopView.vue +6 -4
- package/components/views/mobile/FSBaseDefaultMobileView.vue +5 -5
- package/components/views/mobile/FSBaseEntityMobileView.vue +28 -21
- package/composables/index.ts +0 -1
- package/composables/useMapLayers.ts +60 -53
- package/models/index.ts +0 -1
- package/package.json +4 -4
- package/styles/components/fs_col.scss +1 -1
- package/tools/alertsTools.ts +2 -1
- package/tools/chartsTools.ts +14 -1
- package/components/fields/FSMagicConfigField.vue +0 -171
- package/components/fields/FSMagicField.vue +0 -198
- package/components/selects/chartSelectors/FSPlotPerSelector.vue +0 -52
- package/composables/useMagicFieldProvider.ts +0 -24
- package/models/magicFields.ts +0 -11
package/components/FSCol.vue
CHANGED
|
@@ -26,6 +26,11 @@ export default defineComponent({
|
|
|
26
26
|
required: false,
|
|
27
27
|
default: "fill"
|
|
28
28
|
},
|
|
29
|
+
maxWidth: {
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
31
|
+
required: false,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
29
34
|
padding: {
|
|
30
35
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
31
36
|
required: false,
|
|
@@ -49,11 +54,12 @@ export default defineComponent({
|
|
|
49
54
|
},
|
|
50
55
|
setup(props) {
|
|
51
56
|
const style = computed((): StyleValue => ({
|
|
52
|
-
"--fs-col-overflow": props.overflow,
|
|
53
|
-
"--fs-col-padding"
|
|
54
|
-
"--fs-col-gap"
|
|
55
|
-
"--fs-col-width"
|
|
56
|
-
"--fs-col-
|
|
57
|
+
"--fs-col-overflow" : props.overflow,
|
|
58
|
+
"--fs-col-padding" : sizeToVar(props.padding),
|
|
59
|
+
"--fs-col-gap" : sizeToVar(props.gap),
|
|
60
|
+
"--fs-col-width" : sizeToVar(props.width),
|
|
61
|
+
"--fs-col-max-width" : props.maxWidth ? sizeToVar(props.maxWidth) : "100%",
|
|
62
|
+
"--fs-col-height" : sizeToVar(props.height),
|
|
57
63
|
}));
|
|
58
64
|
|
|
59
65
|
const classes = computed((): string[] => {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<slot />
|
|
16
16
|
</FSWrapGroup>
|
|
17
17
|
<FSSlideGroup
|
|
18
|
-
v-if="$props.variant === 'slide'"
|
|
18
|
+
v-else-if="$props.variant === 'slide'"
|
|
19
19
|
v-bind="$attrs"
|
|
20
20
|
>
|
|
21
21
|
<FSTag
|
|
@@ -36,12 +36,14 @@ import { defineComponent, type PropType } from "vue";
|
|
|
36
36
|
|
|
37
37
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
38
38
|
|
|
39
|
+
import FSSlideGroup from '@dative-gpi/foundation-shared-components/components/FSSlideGroup.vue';
|
|
39
40
|
import FSWrapGroup from "./FSWrapGroup.vue";
|
|
40
41
|
import FSTag from "./FSTag.vue";
|
|
41
42
|
|
|
42
43
|
export default defineComponent({
|
|
43
44
|
name: "FSTagGroup",
|
|
44
45
|
components: {
|
|
46
|
+
FSSlideGroup,
|
|
45
47
|
FSWrapGroup,
|
|
46
48
|
FSTag
|
|
47
49
|
},
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
3
|
v-if="$props.loading"
|
|
4
|
+
:maxWidth="$props.maxWidth"
|
|
4
5
|
>
|
|
5
6
|
<FSLoader
|
|
6
7
|
v-if="!$props.hideHeader"
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
</FSCol>
|
|
15
16
|
<FSCol
|
|
16
17
|
v-else-if="isExtraSmall"
|
|
18
|
+
:maxWidth="$props.maxWidth"
|
|
17
19
|
>
|
|
18
20
|
<FSTextField
|
|
19
21
|
:validationValue="$props.modelValue"
|
|
@@ -220,6 +222,7 @@
|
|
|
220
222
|
:disabled="$props.disabled"
|
|
221
223
|
:label="$props.label"
|
|
222
224
|
:messages="messages"
|
|
225
|
+
:maxWidth="$props.maxWidth"
|
|
223
226
|
>
|
|
224
227
|
<FSToggleSet
|
|
225
228
|
v-if="$props.toggleSet"
|
|
@@ -588,6 +591,11 @@ export default defineComponent({
|
|
|
588
591
|
type: Boolean,
|
|
589
592
|
required: false,
|
|
590
593
|
default: false
|
|
594
|
+
},
|
|
595
|
+
maxWidth: {
|
|
596
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
597
|
+
required: false,
|
|
598
|
+
default: "600px"
|
|
591
599
|
}
|
|
592
600
|
},
|
|
593
601
|
emits: ["update:modelValue", "update:search", "add:item"],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
+
:maxWidth="$props.maxWidth"
|
|
3
4
|
:style="style"
|
|
4
5
|
>
|
|
5
6
|
<slot
|
|
@@ -114,6 +115,11 @@ export default defineComponent({
|
|
|
114
115
|
type: String,
|
|
115
116
|
required: false,
|
|
116
117
|
default: "120px"
|
|
118
|
+
},
|
|
119
|
+
maxWidth: {
|
|
120
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
121
|
+
required: false,
|
|
122
|
+
default: "600px"
|
|
117
123
|
}
|
|
118
124
|
},
|
|
119
125
|
setup(props) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FSCol
|
|
2
|
+
<FSCol
|
|
3
|
+
:maxWidth="$props.maxWidth"
|
|
4
|
+
>
|
|
3
5
|
<FSTextField
|
|
4
6
|
:label="$props.label"
|
|
5
7
|
:description="$props.description"
|
|
@@ -10,6 +12,7 @@
|
|
|
10
12
|
:messages="messages"
|
|
11
13
|
:validateOn="validateOn"
|
|
12
14
|
:validationValue="$props.modelValue"
|
|
15
|
+
:maxWidth="null"
|
|
13
16
|
v-model="innerValue"
|
|
14
17
|
v-bind="$attrs"
|
|
15
18
|
>
|
|
@@ -123,7 +126,12 @@ export default defineComponent({
|
|
|
123
126
|
type: Boolean,
|
|
124
127
|
required: false,
|
|
125
128
|
default: false
|
|
126
|
-
}
|
|
129
|
+
},
|
|
130
|
+
maxWidth: {
|
|
131
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
132
|
+
required: false,
|
|
133
|
+
default: "600px"
|
|
134
|
+
},
|
|
127
135
|
},
|
|
128
136
|
emits: ["update:modelValue"],
|
|
129
137
|
setup(props) {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:disabled="$props.disabled"
|
|
7
7
|
:label="$props.label"
|
|
8
8
|
:messages="messages"
|
|
9
|
+
:maxWidth="$props.maxWidth"
|
|
9
10
|
>
|
|
10
11
|
<FSRow>
|
|
11
12
|
<FSRow
|
|
@@ -132,6 +133,11 @@ export default defineComponent({
|
|
|
132
133
|
type: Boolean,
|
|
133
134
|
required: false,
|
|
134
135
|
default: false
|
|
136
|
+
},
|
|
137
|
+
maxWidth: {
|
|
138
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
139
|
+
required: false,
|
|
140
|
+
default: null
|
|
135
141
|
}
|
|
136
142
|
},
|
|
137
143
|
emits: ["update:modelValue"],
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<FSRow
|
|
7
7
|
v-if="$props.showSearch || (!isMobileSized && ($slots['prepend-toolbar'] || $slots['toolbar'] || $slots['append-toolbar'])) || (!$props.disableTable && !$props.disableIterator)"
|
|
8
|
-
align="
|
|
8
|
+
align="top-left"
|
|
9
9
|
:wrap="isMobileSized ? false : true"
|
|
10
10
|
width="fill"
|
|
11
11
|
>
|
|
@@ -13,35 +13,41 @@
|
|
|
13
13
|
v-if="!isMobileSized"
|
|
14
14
|
name="prepend-toolbar"
|
|
15
15
|
/>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
>
|
|
19
|
-
<FSSearchField
|
|
20
|
-
:hideHeader="true"
|
|
21
|
-
v-model="innerSearch"
|
|
22
|
-
/>
|
|
23
|
-
<FSButton
|
|
24
|
-
v-if="filterableHeaders.length > 0"
|
|
25
|
-
prependIcon="mdi-filter-variant"
|
|
26
|
-
:variant="innerShowFilters ? 'full' : 'standard'"
|
|
27
|
-
@click="innerShowFilters = !innerShowFilters"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
<slot
|
|
31
|
-
v-if="!isMobileSized"
|
|
32
|
-
name="toolbar"
|
|
33
|
-
/>
|
|
34
|
-
<template
|
|
35
|
-
v-if="$slots['append-toolbar'] || (!$props.disableTable && !$props.disableIterator)"
|
|
16
|
+
<FSRow
|
|
17
|
+
align="top-left"
|
|
36
18
|
>
|
|
37
19
|
<FSRow
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
v-if="$props.showSearch || filterableHeaders.length > 0 || $slots['append-toolbar']"
|
|
21
|
+
align="bottom-left"
|
|
40
22
|
>
|
|
23
|
+
<FSSearchField
|
|
24
|
+
:hideHeader="true"
|
|
25
|
+
v-model="innerSearch"
|
|
26
|
+
/>
|
|
27
|
+
<FSButton
|
|
28
|
+
v-if="filterableHeaders.length > 0"
|
|
29
|
+
prependIcon="mdi-filter-variant"
|
|
30
|
+
:variant="innerShowFilters ? 'full' : 'standard'"
|
|
31
|
+
@click="innerShowFilters = !innerShowFilters"
|
|
32
|
+
/>
|
|
41
33
|
<slot
|
|
42
34
|
v-if="!isMobileSized"
|
|
43
|
-
name="
|
|
35
|
+
name="toolbar"
|
|
44
36
|
/>
|
|
37
|
+
</FSRow>
|
|
38
|
+
<slot
|
|
39
|
+
v-if="!isMobileSized"
|
|
40
|
+
name="append-toolbar"
|
|
41
|
+
/>
|
|
42
|
+
</FSRow>
|
|
43
|
+
<template
|
|
44
|
+
v-if="(!$props.disableTable && !$props.disableIterator)"
|
|
45
|
+
>
|
|
46
|
+
<FSRow
|
|
47
|
+
align="top-right"
|
|
48
|
+
width="hug"
|
|
49
|
+
:wrap="false"
|
|
50
|
+
>
|
|
45
51
|
<FSOptionGroup
|
|
46
52
|
v-if="!$props.disableTable && !$props.disableIterator"
|
|
47
53
|
:values="modeOptions"
|
package/components/map/FSMap.vue
CHANGED
|
@@ -233,7 +233,7 @@ export default defineComponent({
|
|
|
233
233
|
}));
|
|
234
234
|
|
|
235
235
|
const actualLayer = computed(() => {
|
|
236
|
-
return layers.find((mapLayer) => mapLayer.name === props.currentLayer)?.layers
|
|
236
|
+
return layers.value.find((mapLayer) => mapLayer.name === props.currentLayer)?.layers;
|
|
237
237
|
});
|
|
238
238
|
|
|
239
239
|
const overlaySlots = computed(() => {
|
|
@@ -389,8 +389,6 @@ export default defineComponent({
|
|
|
389
389
|
if(!map.value || !props.bounds) {
|
|
390
390
|
return;
|
|
391
391
|
}
|
|
392
|
-
|
|
393
|
-
//console.log("Bounds changed", props.bounds);
|
|
394
392
|
fitBounds(props.bounds, { maxZoom: 14 });
|
|
395
393
|
});
|
|
396
394
|
|
|
@@ -3,11 +3,13 @@
|
|
|
3
3
|
</template>
|
|
4
4
|
|
|
5
5
|
<script lang="ts">
|
|
6
|
-
import { inject, type PropType, type Ref, watch, ref, onUnmounted,
|
|
6
|
+
import { inject, type PropType, type Ref, watch, ref, onUnmounted, computed } from 'vue';
|
|
7
|
+
import { type RouteLocation } from "vue-router";
|
|
7
8
|
|
|
8
|
-
import { type Map, divIcon, type LatLng, marker, type Marker, type MarkerClusterGroup
|
|
9
|
+
import { type Map, divIcon, type LatLng, marker, type Marker, type MarkerClusterGroup } from 'leaflet';
|
|
9
10
|
|
|
10
11
|
import { useColors } from "../../composables";
|
|
12
|
+
import { useRouting } from '@dative-gpi/foundation-shared-services/composables';
|
|
11
13
|
|
|
12
14
|
import { gpsMarkerHtml, locationMarkerHtml, pinMarkerHtml } from '../../utils/leafletMarkers';
|
|
13
15
|
import { MAP, MARKERCLUSTERGROUP } from './keys';
|
|
@@ -41,14 +43,28 @@ export default {
|
|
|
41
43
|
label: {
|
|
42
44
|
type: String,
|
|
43
45
|
required: false
|
|
46
|
+
},
|
|
47
|
+
to: {
|
|
48
|
+
type: Object as PropType<RouteLocation | null>,
|
|
49
|
+
required: false
|
|
44
50
|
}
|
|
45
51
|
},
|
|
46
|
-
emits: ['click'],
|
|
52
|
+
emits: ['click', 'auxclick'],
|
|
47
53
|
setup(props, { emit }) {
|
|
48
54
|
const map = inject<Ref<Map | null>>(MAP);
|
|
49
55
|
const markerClusterGroup = inject<Ref<MarkerClusterGroup | null>>(MARKERCLUSTERGROUP, ref(null));
|
|
50
|
-
|
|
56
|
+
|
|
51
57
|
const { getColors } = useColors();
|
|
58
|
+
const { handleRoutingEvent } = useRouting();
|
|
59
|
+
|
|
60
|
+
if(!map) {
|
|
61
|
+
throw new Error('FSMapTileLayer must be used inside a FSMap component');
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
if(!map.value) {
|
|
65
|
+
throw new Error('FSMapTileLayer must be used inside a FSMap component with a map');
|
|
66
|
+
}
|
|
67
|
+
|
|
52
68
|
const getMarkerIcon = () => {
|
|
53
69
|
if(props.variant === 'gps') {
|
|
54
70
|
const size = 16;
|
|
@@ -81,12 +97,32 @@ export default {
|
|
|
81
97
|
|
|
82
98
|
const actualMarker = ref(marker(props.latlng ?? [0, 0], { icon: getMarkerIcon() }));
|
|
83
99
|
|
|
84
|
-
|
|
85
|
-
|
|
100
|
+
const markerElement = computed(() => {
|
|
101
|
+
return actualMarker.value.getElement();
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
const onClick = (event: MouseEvent) => {
|
|
105
|
+
if(props.to) {
|
|
106
|
+
handleRoutingEvent(event, props.to, true);
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
emit('click', {
|
|
111
|
+
...event,
|
|
112
|
+
latlng: props.latlng
|
|
113
|
+
});
|
|
86
114
|
}
|
|
87
115
|
|
|
88
|
-
|
|
89
|
-
|
|
116
|
+
const onAuxClick = (event: MouseEvent) => {
|
|
117
|
+
if(props.to) {
|
|
118
|
+
handleRoutingEvent(event, props.to);
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
emit('auxclick', {
|
|
123
|
+
...event,
|
|
124
|
+
latlng: props.latlng
|
|
125
|
+
});
|
|
90
126
|
}
|
|
91
127
|
|
|
92
128
|
watch(map, () => {
|
|
@@ -118,11 +154,14 @@ export default {
|
|
|
118
154
|
actualMarker.value.setLatLng(props.latlng);
|
|
119
155
|
});
|
|
120
156
|
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
157
|
+
watch(markerElement, (newMarkerElement) => {
|
|
158
|
+
if(!newMarkerElement) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
newMarkerElement.addEventListener('click', onClick);
|
|
163
|
+
newMarkerElement.addEventListener('auxclick', onAuxClick);
|
|
164
|
+
}, { immediate: true });
|
|
126
165
|
|
|
127
166
|
onUnmounted(() => {
|
|
128
167
|
if(actualMarker.value && map.value) {
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSRow
|
|
3
|
+
align="center-left"
|
|
4
|
+
>
|
|
5
|
+
<FSColor
|
|
6
|
+
height="24px"
|
|
7
|
+
:color="$props.color"
|
|
8
|
+
:border="$props.border"
|
|
9
|
+
:variant="$props.variant"
|
|
10
|
+
>
|
|
11
|
+
<FSRow
|
|
12
|
+
align="center-center"
|
|
13
|
+
width="24px"
|
|
14
|
+
>
|
|
15
|
+
<FSSpan
|
|
16
|
+
font="text-overline"
|
|
17
|
+
>
|
|
18
|
+
{{ badgeContent }}
|
|
19
|
+
</FSSpan>
|
|
20
|
+
</FSRow>
|
|
21
|
+
</FSColor>
|
|
22
|
+
<FSSpan
|
|
23
|
+
font="text-overline"
|
|
24
|
+
>
|
|
25
|
+
{{ $props.label }}
|
|
26
|
+
</FSSpan>
|
|
27
|
+
</FSRow>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script lang="ts">
|
|
31
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
32
|
+
|
|
33
|
+
import { capNumberToString } from '@dative-gpi/foundation-shared-components/utils';
|
|
34
|
+
|
|
35
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
36
|
+
|
|
37
|
+
import FSColor from "../FSColor.vue";
|
|
38
|
+
import FSSpan from "../FSSpan.vue";
|
|
39
|
+
import FSRow from "../FSRow.vue";
|
|
40
|
+
|
|
41
|
+
export default defineComponent({
|
|
42
|
+
name: "FSEntityCountBadge",
|
|
43
|
+
props: {
|
|
44
|
+
label: {
|
|
45
|
+
type: String,
|
|
46
|
+
required: true
|
|
47
|
+
},
|
|
48
|
+
count: {
|
|
49
|
+
type: Number,
|
|
50
|
+
required: true
|
|
51
|
+
},
|
|
52
|
+
color: {
|
|
53
|
+
type: String as PropType<ColorBase>,
|
|
54
|
+
required: false,
|
|
55
|
+
default: () => ColorEnum.Primary
|
|
56
|
+
},
|
|
57
|
+
border: {
|
|
58
|
+
type: Boolean,
|
|
59
|
+
required: false,
|
|
60
|
+
default: false
|
|
61
|
+
},
|
|
62
|
+
variant: {
|
|
63
|
+
type: String as PropType<"standard" | "full">,
|
|
64
|
+
required: false,
|
|
65
|
+
default: "standard"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
components: {
|
|
69
|
+
FSColor,
|
|
70
|
+
FSSpan,
|
|
71
|
+
FSRow
|
|
72
|
+
},
|
|
73
|
+
setup(props){
|
|
74
|
+
|
|
75
|
+
const badgeContent = computed(() => capNumberToString(props.count));
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
ColorEnum,
|
|
79
|
+
badgeContent
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
</script>
|
|
@@ -6,7 +6,26 @@
|
|
|
6
6
|
:iconBorder="false"
|
|
7
7
|
:icon="$props.icon"
|
|
8
8
|
v-bind="$attrs"
|
|
9
|
-
|
|
9
|
+
>
|
|
10
|
+
<template
|
|
11
|
+
#append-info
|
|
12
|
+
>
|
|
13
|
+
<FSCol
|
|
14
|
+
gap="6px"
|
|
15
|
+
>
|
|
16
|
+
<FSEntityCountBadge
|
|
17
|
+
:label="$tr('ui.common.folders', 'Folder(s)')"
|
|
18
|
+
:count="recursiveFoldersIds.length"
|
|
19
|
+
:color="ColorEnum.Primary"
|
|
20
|
+
/>
|
|
21
|
+
<FSEntityCountBadge
|
|
22
|
+
:label="$tr('ui.common.dashboards', 'Dashboard(s)')"
|
|
23
|
+
:count="recursiveDashboardsIds.length"
|
|
24
|
+
:color="ColorEnum.Success"
|
|
25
|
+
/>
|
|
26
|
+
</FSCol>
|
|
27
|
+
</template>
|
|
28
|
+
</FSSimpleTileUI>
|
|
10
29
|
</template>
|
|
11
30
|
|
|
12
31
|
<script lang="ts">
|
|
@@ -14,7 +33,9 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
14
33
|
|
|
15
34
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
16
35
|
|
|
36
|
+
import FSEntityCountBadge from './FSEntityCountBadge.vue';
|
|
17
37
|
import FSSimpleTileUI from "./FSSimpleTileUI.vue";
|
|
38
|
+
import FSCol from "../FSCol.vue";
|
|
18
39
|
|
|
19
40
|
export default defineComponent({
|
|
20
41
|
name: "FSFolderTileUI",
|
|
@@ -28,10 +49,22 @@ export default defineComponent({
|
|
|
28
49
|
type: String,
|
|
29
50
|
required: false,
|
|
30
51
|
default: "mdi-folder-outline"
|
|
31
|
-
}
|
|
52
|
+
},
|
|
53
|
+
recursiveFoldersIds: {
|
|
54
|
+
type: Array as PropType<string[]>,
|
|
55
|
+
required: false,
|
|
56
|
+
default: () => []
|
|
57
|
+
},
|
|
58
|
+
recursiveDashboardsIds: {
|
|
59
|
+
type: Array as PropType<string[]>,
|
|
60
|
+
required: false,
|
|
61
|
+
default: () => []
|
|
62
|
+
},
|
|
32
63
|
},
|
|
33
64
|
components: {
|
|
34
|
-
|
|
65
|
+
FSEntityCountBadge,
|
|
66
|
+
FSSimpleTileUI,
|
|
67
|
+
FSCol
|
|
35
68
|
},
|
|
36
69
|
setup(props){
|
|
37
70
|
const color = computed(() => {
|
|
@@ -42,7 +75,8 @@ export default defineComponent({
|
|
|
42
75
|
});
|
|
43
76
|
|
|
44
77
|
return {
|
|
45
|
-
color
|
|
78
|
+
color,
|
|
79
|
+
ColorEnum
|
|
46
80
|
};
|
|
47
81
|
}
|
|
48
82
|
});
|
|
@@ -16,82 +16,36 @@
|
|
|
16
16
|
<FSCol
|
|
17
17
|
gap="6px"
|
|
18
18
|
>
|
|
19
|
-
<
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
align="center-center"
|
|
30
|
-
>
|
|
31
|
-
<FSSpan
|
|
32
|
-
font="text-overline"
|
|
33
|
-
>
|
|
34
|
-
{{ groupsBadgeContent }}
|
|
35
|
-
</FSSpan>
|
|
36
|
-
</FSRow>
|
|
37
|
-
</FSColor>
|
|
38
|
-
<FSSpan
|
|
39
|
-
font="text-overline"
|
|
40
|
-
>
|
|
41
|
-
{{ $tr("ui.common.groups", "Group(s)") }}
|
|
42
|
-
</FSSpan>
|
|
43
|
-
</FSRow>
|
|
44
|
-
<FSRow
|
|
45
|
-
align="center-left"
|
|
46
|
-
>
|
|
47
|
-
<FSColor
|
|
48
|
-
height="24px"
|
|
49
|
-
width="24px"
|
|
50
|
-
:color="ColorEnum.Success"
|
|
51
|
-
:border="false"
|
|
52
|
-
>
|
|
53
|
-
<FSRow
|
|
54
|
-
align="center-center"
|
|
55
|
-
>
|
|
56
|
-
<FSSpan
|
|
57
|
-
font="text-overline"
|
|
58
|
-
>
|
|
59
|
-
{{ deviceOrganisationsBadgeContent }}
|
|
60
|
-
</FSSpan>
|
|
61
|
-
</FSRow>
|
|
62
|
-
</FSColor>
|
|
63
|
-
<FSSpan
|
|
64
|
-
font="text-overline"
|
|
65
|
-
>
|
|
66
|
-
{{ $tr("ui.common.devices", "Device(s)") }}
|
|
67
|
-
</FSSpan>
|
|
68
|
-
</FSRow>
|
|
19
|
+
<FSEntityCountBadge
|
|
20
|
+
:label="$tr('ui.common.groups', 'Group(s)')"
|
|
21
|
+
:count="recursiveGroupsIds.length"
|
|
22
|
+
:color="ColorEnum.Primary"
|
|
23
|
+
/>
|
|
24
|
+
<FSEntityCountBadge
|
|
25
|
+
:label="$tr('ui.common.devices', 'Device(s)')"
|
|
26
|
+
:count="recursiveDeviceOrganisationsIds.length"
|
|
27
|
+
:color="ColorEnum.Success"
|
|
28
|
+
/>
|
|
69
29
|
</FSCol>
|
|
70
30
|
</template>
|
|
71
31
|
</FSSimpleTileUI>
|
|
72
32
|
</template>
|
|
73
33
|
|
|
74
34
|
<script lang="ts">
|
|
75
|
-
import {
|
|
76
|
-
|
|
77
|
-
import { capNumberToString } from '@dative-gpi/foundation-shared-components/utils';
|
|
35
|
+
import { defineComponent, type PropType } from "vue";
|
|
78
36
|
|
|
79
37
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
80
38
|
|
|
39
|
+
import FSEntityCountBadge from './FSEntityCountBadge.vue';
|
|
81
40
|
import FSSimpleTileUI from './FSSimpleTileUI.vue';
|
|
82
|
-
import FSColor from "../FSColor.vue";
|
|
83
|
-
import FSSpan from "../FSSpan.vue";
|
|
84
41
|
import FSCol from "../FSCol.vue";
|
|
85
|
-
import FSRow from "../FSRow.vue";
|
|
86
42
|
|
|
87
43
|
export default defineComponent({
|
|
88
44
|
name: "FSGroupTileUI",
|
|
89
45
|
components: {
|
|
46
|
+
FSEntityCountBadge,
|
|
90
47
|
FSSimpleTileUI,
|
|
91
|
-
|
|
92
|
-
FSSpan,
|
|
93
|
-
FSCol,
|
|
94
|
-
FSRow
|
|
48
|
+
FSCol
|
|
95
49
|
},
|
|
96
50
|
props: {
|
|
97
51
|
imageId: {
|
|
@@ -134,14 +88,8 @@ export default defineComponent({
|
|
|
134
88
|
default: () => [352, 336]
|
|
135
89
|
},
|
|
136
90
|
},
|
|
137
|
-
setup(
|
|
138
|
-
const groupsBadgeContent = computed(() => capNumberToString(props.recursiveGroupsIds.length));
|
|
139
|
-
|
|
140
|
-
const deviceOrganisationsBadgeContent = computed(() => capNumberToString(props.recursiveDeviceOrganisationsIds.length));
|
|
141
|
-
|
|
91
|
+
setup() {
|
|
142
92
|
return {
|
|
143
|
-
deviceOrganisationsBadgeContent,
|
|
144
|
-
groupsBadgeContent,
|
|
145
93
|
ColorEnum,
|
|
146
94
|
};
|
|
147
95
|
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSSimpleTileUI
|
|
3
|
+
:bottomColor="$props.bottomColor"
|
|
4
|
+
v-bind="$attrs"
|
|
5
|
+
>
|
|
6
|
+
<template
|
|
7
|
+
#append-info
|
|
8
|
+
>
|
|
9
|
+
<FSEntityCountBadge
|
|
10
|
+
:label="$tr('ui.common.subgroupings', 'Categories')"
|
|
11
|
+
:count="$props.subgroupingCount ?? 0"
|
|
12
|
+
:color="ColorEnum.Primary"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
15
|
+
</FSSimpleTileUI>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script lang="ts">
|
|
19
|
+
import { defineComponent, type PropType } from "vue";
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
import { ColorEnum, type ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
23
|
+
|
|
24
|
+
import FSEntityCountBadge from "./FSEntityCountBadge.vue";
|
|
25
|
+
import FSSimpleTileUI from './FSSimpleTileUI.vue';
|
|
26
|
+
|
|
27
|
+
export default defineComponent({
|
|
28
|
+
name: "FSGroupingTileUI",
|
|
29
|
+
components: {
|
|
30
|
+
FSSimpleTileUI,
|
|
31
|
+
FSEntityCountBadge
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
subgroupingCount: {
|
|
35
|
+
type: Number,
|
|
36
|
+
required: false,
|
|
37
|
+
default: null
|
|
38
|
+
},
|
|
39
|
+
bottomColor: {
|
|
40
|
+
type: [Array, String] as PropType<ColorBase | ColorBase[] | null>,
|
|
41
|
+
required: false,
|
|
42
|
+
default: null
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
},
|
|
46
|
+
setup() {
|
|
47
|
+
return {
|
|
48
|
+
ColorEnum,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
</script>
|