@dative-gpi/foundation-shared-components 1.0.66 → 1.0.67
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/FSIconCard.vue +2 -2
- package/components/FSSlideGroup.vue +13 -1
- package/components/FSWrapGroup.vue +13 -1
- package/components/map/FSMapLayerButton.vue +1 -0
- package/components/tiles/FSLocationTileUI.vue +80 -68
- package/components/tiles/FSSimpleTileUI.vue +2 -1
- package/components/views/FSSkeletonView.vue +1 -1
- package/package.json +4 -4
- package/styles/components/fs_slide_group.scss +5 -0
- package/styles/components/fs_wrap_group.scss +4 -0
- package/styles/globals/overrides.scss +0 -10
- package/utils/filter.ts +4 -1
|
@@ -58,7 +58,7 @@ export default defineComponent({
|
|
|
58
58
|
iconColor: {
|
|
59
59
|
type: String as PropType<ColorBase>,
|
|
60
60
|
required: false,
|
|
61
|
-
default: ColorEnum.
|
|
61
|
+
default: ColorEnum.Primary
|
|
62
62
|
},
|
|
63
63
|
iconVariant: {
|
|
64
64
|
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
@@ -68,7 +68,7 @@ export default defineComponent({
|
|
|
68
68
|
iconSize: {
|
|
69
69
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
70
70
|
required: false,
|
|
71
|
-
default: "
|
|
71
|
+
default: "42px"
|
|
72
72
|
},
|
|
73
73
|
border: {
|
|
74
74
|
type: Boolean,
|
|
@@ -59,6 +59,16 @@ export default defineComponent({
|
|
|
59
59
|
FSButton
|
|
60
60
|
},
|
|
61
61
|
props: {
|
|
62
|
+
height: {
|
|
63
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
|
+
required: false,
|
|
65
|
+
default: "fit-content"
|
|
66
|
+
},
|
|
67
|
+
width: {
|
|
68
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
69
|
+
required: false,
|
|
70
|
+
default: "fit-content"
|
|
71
|
+
},
|
|
62
72
|
padding: {
|
|
63
73
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
64
74
|
required: false,
|
|
@@ -92,7 +102,9 @@ export default defineComponent({
|
|
|
92
102
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
93
103
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
94
104
|
"--fs-group-color" : darks.soft,
|
|
95
|
-
"--fs-group-hover-color" : darks.dark
|
|
105
|
+
"--fs-group-hover-color" : darks.dark,
|
|
106
|
+
"--fs-group-width" : sizeToVar(props.width),
|
|
107
|
+
"--fs-group-height" : sizeToVar(props.height)
|
|
96
108
|
}));
|
|
97
109
|
|
|
98
110
|
const nextClasses = computed((): string[] => {
|
|
@@ -29,6 +29,16 @@ import { uuidv4 } from "@dative-gpi/bones-ui/tools/uuid";
|
|
|
29
29
|
export default defineComponent({
|
|
30
30
|
name: "FSWrapGroup",
|
|
31
31
|
props: {
|
|
32
|
+
height: {
|
|
33
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
34
|
+
required: false,
|
|
35
|
+
default: "fit-content"
|
|
36
|
+
},
|
|
37
|
+
width: {
|
|
38
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
39
|
+
required: false,
|
|
40
|
+
default: "fit-content"
|
|
41
|
+
},
|
|
32
42
|
padding: {
|
|
33
43
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
34
44
|
required: false,
|
|
@@ -55,7 +65,9 @@ export default defineComponent({
|
|
|
55
65
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
56
66
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
57
67
|
"--fs-group-color" : darks.soft,
|
|
58
|
-
"--fs-group-hover-color": darks.dark
|
|
68
|
+
"--fs-group-hover-color": darks.dark,
|
|
69
|
+
"--fs-group-height" : sizeToVar(props.height),
|
|
70
|
+
"--fs-group-width" : sizeToVar(props.width)
|
|
59
71
|
}));
|
|
60
72
|
|
|
61
73
|
onMounted((): void => {
|
|
@@ -6,81 +6,81 @@
|
|
|
6
6
|
:width="$props.width"
|
|
7
7
|
v-bind="$attrs"
|
|
8
8
|
>
|
|
9
|
-
<
|
|
9
|
+
<FSCol
|
|
10
10
|
align="center-center"
|
|
11
|
-
width="
|
|
12
|
-
gap="24px"
|
|
13
|
-
:wrap="false"
|
|
11
|
+
width="fill"
|
|
14
12
|
>
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
<FSRow
|
|
14
|
+
align="center-left"
|
|
15
|
+
gap="24px"
|
|
16
|
+
:height="imageSize"
|
|
17
|
+
:wrap="false"
|
|
19
18
|
>
|
|
20
|
-
<FSCol
|
|
21
|
-
gap="
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="12px"
|
|
21
|
+
:width="infoWidth"
|
|
22
22
|
>
|
|
23
|
-
<
|
|
24
|
-
|
|
25
|
-
:lineClamp="1"
|
|
23
|
+
<FSCol
|
|
24
|
+
gap="6px"
|
|
26
25
|
>
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
:color="ColorEnum.Light"
|
|
45
|
-
:border="false"
|
|
26
|
+
<FSSpan
|
|
27
|
+
font="text-button"
|
|
28
|
+
:lineClamp="1"
|
|
29
|
+
>
|
|
30
|
+
{{ $props.label }}
|
|
31
|
+
</FSSpan>
|
|
32
|
+
<FSSpan
|
|
33
|
+
v-if="$props.code"
|
|
34
|
+
font="text-overline"
|
|
35
|
+
variant="soft"
|
|
36
|
+
>
|
|
37
|
+
{{ $props.code }}
|
|
38
|
+
</FSSpan>
|
|
39
|
+
</FSCol>
|
|
40
|
+
<FSRow
|
|
41
|
+
:wrap="false"
|
|
42
|
+
align="center-left"
|
|
46
43
|
>
|
|
47
|
-
<
|
|
48
|
-
|
|
44
|
+
<FSColor
|
|
45
|
+
padding="0 8px"
|
|
46
|
+
height="24px"
|
|
47
|
+
:color="ColorEnum.Light"
|
|
48
|
+
:border="false"
|
|
49
49
|
>
|
|
50
|
-
<
|
|
51
|
-
|
|
50
|
+
<FSRow
|
|
51
|
+
align="center-center"
|
|
52
52
|
>
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
53
|
+
<FSSpan
|
|
54
|
+
font="text-overline"
|
|
55
|
+
>
|
|
56
|
+
{{ $props.deviceCount }}
|
|
57
|
+
</FSSpan>
|
|
58
|
+
</FSRow>
|
|
59
|
+
</FSColor>
|
|
60
|
+
<FSSpan
|
|
61
|
+
font="text-overline"
|
|
62
|
+
>
|
|
63
|
+
{{ $tr("entity.location.devices", "Devices") }}
|
|
64
|
+
</FSSpan>
|
|
65
|
+
</FSRow>
|
|
66
|
+
</FSCol>
|
|
67
67
|
<FSIconCard
|
|
68
|
-
|
|
68
|
+
backgroundVariant="standard"
|
|
69
|
+
:backgroundColor="ColorEnum.Background"
|
|
69
70
|
:iconColor="$props.color"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
variant="background"
|
|
73
|
-
:border="true"
|
|
71
|
+
:icon="$props.icon"
|
|
72
|
+
:size="imageSize"
|
|
74
73
|
/>
|
|
75
|
-
</
|
|
76
|
-
</
|
|
74
|
+
</FSRow>
|
|
75
|
+
</FSCol>
|
|
77
76
|
</FSTile>
|
|
78
77
|
</template>
|
|
79
78
|
|
|
80
79
|
<script lang="ts">
|
|
81
|
-
import { defineComponent, type PropType } from "vue";
|
|
80
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
82
81
|
|
|
83
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
82
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
83
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
84
84
|
|
|
85
85
|
import FSIconCard from "../FSIconCard.vue";
|
|
86
86
|
import FSColor from "../FSColor.vue";
|
|
@@ -110,11 +110,6 @@ export default defineComponent({
|
|
|
110
110
|
required: false,
|
|
111
111
|
default: null
|
|
112
112
|
},
|
|
113
|
-
color: {
|
|
114
|
-
type: String,
|
|
115
|
-
required: false,
|
|
116
|
-
default: () => ColorEnum.Primary
|
|
117
|
-
},
|
|
118
113
|
icon: {
|
|
119
114
|
type: String,
|
|
120
115
|
required: false,
|
|
@@ -125,20 +120,37 @@ export default defineComponent({
|
|
|
125
120
|
required: false,
|
|
126
121
|
default: 0
|
|
127
122
|
},
|
|
128
|
-
|
|
129
|
-
type:
|
|
123
|
+
color: {
|
|
124
|
+
type: String as PropType<ColorBase>,
|
|
130
125
|
required: false,
|
|
131
|
-
default:
|
|
126
|
+
default: ColorEnum.Primary
|
|
132
127
|
},
|
|
133
128
|
width: {
|
|
134
129
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
135
130
|
required: false,
|
|
136
131
|
default: () => [352, 336]
|
|
137
132
|
},
|
|
133
|
+
modelValue: {
|
|
134
|
+
type: Boolean,
|
|
135
|
+
required: false,
|
|
136
|
+
default: false
|
|
137
|
+
}
|
|
138
138
|
},
|
|
139
139
|
setup() {
|
|
140
|
+
const { isMobileSized } = useBreakpoints();
|
|
141
|
+
|
|
142
|
+
const imageSize = computed((): number => {
|
|
143
|
+
return isMobileSized.value ? 90 : 100;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const infoWidth = computed((): string => {
|
|
147
|
+
return `calc(100% - ${imageSize.value}px - 24px)`;
|
|
148
|
+
});
|
|
149
|
+
|
|
140
150
|
return {
|
|
141
|
-
ColorEnum
|
|
151
|
+
ColorEnum,
|
|
152
|
+
imageSize,
|
|
153
|
+
infoWidth
|
|
142
154
|
};
|
|
143
155
|
}
|
|
144
156
|
});
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
v-else-if="$props.icon"
|
|
45
45
|
:backgroundVariant="$props.iconBackgroundVariant"
|
|
46
46
|
:backgroundColor="$props.iconBackgroundColor"
|
|
47
|
+
:iconColor="$props.activeColor"
|
|
47
48
|
:border="$props.iconBorder"
|
|
48
49
|
:icon="$props.icon"
|
|
49
50
|
:size="imageSize"
|
|
@@ -99,7 +100,7 @@ export default defineComponent({
|
|
|
99
100
|
iconBackgroundVariant: {
|
|
100
101
|
type: String as PropType<"background" | "standard" | "full" | "gradient">,
|
|
101
102
|
required: false,
|
|
102
|
-
default: "
|
|
103
|
+
default: "standard"
|
|
103
104
|
},
|
|
104
105
|
iconBackgroundColor: {
|
|
105
106
|
type: [Array, String] as PropType<ColorBase | ColorBase[]>,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.67",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.67",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.67"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "ba62d45e0ff1f5df1090b715b4a01abc8ce9c3a4"
|
|
39
39
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
.fs-slide-group {
|
|
2
|
+
height: var(--fs-group-height);
|
|
3
|
+
width: var(--fs-group-width);
|
|
4
|
+
max-width: 100%;
|
|
5
|
+
|
|
2
6
|
& > .v-slide-group__container > .v-slide-group__content {
|
|
7
|
+
margin: 0 2px 1px 0 !important;
|
|
3
8
|
padding: var(--fs-group-padding);
|
|
4
9
|
gap: var(--fs-group-gap);
|
|
5
10
|
}
|
|
@@ -182,16 +182,6 @@ $nthOverlay: 25;
|
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
184
|
|
|
185
|
-
/***** Applies to all slide groups (FSTabs, FSSlideGroup, FSWrapGroup) *****/
|
|
186
|
-
.fs-slide-group {
|
|
187
|
-
max-width: 100%;
|
|
188
|
-
|
|
189
|
-
// To avoid borders clipping
|
|
190
|
-
& > .v-slide-group__container > .v-slide-group__content {
|
|
191
|
-
margin: 0 2px 1px 0 !important;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
185
|
// On touchscreen, hide arrows
|
|
196
186
|
// Otherwise show small ones with base text color
|
|
197
187
|
.v-slide-group__prev,
|
package/utils/filter.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
export const containsSearchTerm = (obj: any, searchTerm: string): boolean => {
|
|
2
|
+
if (obj == null) {
|
|
3
|
+
return false;
|
|
4
|
+
}
|
|
2
5
|
if (typeof obj === 'object') {
|
|
3
6
|
return Object.values(obj).some(value => containsSearchTerm(value, searchTerm));
|
|
4
7
|
}
|
|
@@ -12,4 +15,4 @@ export const filterItems = <T>(items: T[], filter: string): T[] => {
|
|
|
12
15
|
const searchTerm = filter.toLowerCase();
|
|
13
16
|
|
|
14
17
|
return items.filter(item => containsSearchTerm(item, searchTerm));
|
|
15
|
-
};
|
|
18
|
+
};
|