@dative-gpi/foundation-shared-components 1.0.62 → 1.0.64
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/FSColorIcon.vue +16 -1
- package/components/FSOptionGroup.vue +51 -3
- package/components/FSSwitch.vue +57 -27
- package/components/deviceOrganisations/FSConnectivity.vue +10 -1
- package/components/deviceOrganisations/FSStatus.vue +5 -0
- package/components/lists/FSDataTableUI.vue +4 -3
- package/components/lists/FSSimpleList.vue +5 -1
- package/components/map/FSMap.vue +2 -2
- package/models/map.ts +2 -2
- package/package.json +4 -4
- package/styles/components/fs_filter_button.scss +1 -6
- package/styles/components/fs_option_group.scss +15 -5
- package/styles/components/fs_switch.scss +1 -0
- package/styles/components/fs_tabs.scss +4 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
>
|
|
12
12
|
<FSIcon
|
|
13
13
|
:color="$props.color"
|
|
14
|
-
:size="
|
|
14
|
+
:size="iconSize"
|
|
15
15
|
>
|
|
16
16
|
<slot />
|
|
17
17
|
</FSIcon>
|
|
@@ -25,6 +25,8 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
25
25
|
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
26
|
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
27
27
|
|
|
28
|
+
import { sizeToVar } from "../utils";
|
|
29
|
+
|
|
28
30
|
import FSColor from "./FSColor.vue";
|
|
29
31
|
import FSIcon from "./FSIcon.vue";
|
|
30
32
|
import FSRow from "./FSRow.vue";
|
|
@@ -46,6 +48,11 @@ export default defineComponent({
|
|
|
46
48
|
type: String as PropType<ColorBase>,
|
|
47
49
|
required: false,
|
|
48
50
|
default: ColorEnum.Dark
|
|
51
|
+
},
|
|
52
|
+
padding: {
|
|
53
|
+
type: [String, Number] as PropType<string | number>,
|
|
54
|
+
required: false,
|
|
55
|
+
default: "0px"
|
|
49
56
|
}
|
|
50
57
|
},
|
|
51
58
|
setup(props) {
|
|
@@ -60,7 +67,15 @@ export default defineComponent({
|
|
|
60
67
|
}
|
|
61
68
|
});
|
|
62
69
|
|
|
70
|
+
const iconSize = computed(() => {
|
|
71
|
+
if (!props.padding) {
|
|
72
|
+
return size.value;
|
|
73
|
+
}
|
|
74
|
+
return `calc(${sizeToVar(size.value)} - ${sizeToVar(props.padding)})`;
|
|
75
|
+
});
|
|
76
|
+
|
|
63
77
|
return {
|
|
78
|
+
iconSize,
|
|
64
79
|
size
|
|
65
80
|
};
|
|
66
81
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSWrapGroup
|
|
3
|
-
v-if="
|
|
3
|
+
v-if="props.variant === 'wrap'"
|
|
4
4
|
class="fs-option-group"
|
|
5
5
|
:padding="props.padding"
|
|
6
6
|
:gap="props.gap"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
/>
|
|
47
47
|
</FSWrapGroup>
|
|
48
48
|
<FSSlideGroup
|
|
49
|
-
v-else
|
|
49
|
+
v-else-if="props.variant === 'slide'"
|
|
50
50
|
class="fs-option-group"
|
|
51
51
|
:padding="props.padding"
|
|
52
52
|
:gap="props.gap"
|
|
@@ -91,6 +91,54 @@
|
|
|
91
91
|
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
92
92
|
/>
|
|
93
93
|
</FSSlideGroup>
|
|
94
|
+
<FSRow
|
|
95
|
+
v-else
|
|
96
|
+
class="fs-option-group-full-width"
|
|
97
|
+
width="100%"
|
|
98
|
+
:padding="props.padding"
|
|
99
|
+
:gap="props.gap"
|
|
100
|
+
:style="style"
|
|
101
|
+
:wrap="false"
|
|
102
|
+
>
|
|
103
|
+
<template
|
|
104
|
+
v-if="props.values.length"
|
|
105
|
+
>
|
|
106
|
+
<template
|
|
107
|
+
v-if="!$slots.item"
|
|
108
|
+
>
|
|
109
|
+
<FSOptionItem
|
|
110
|
+
v-for="(item, index) in props.values"
|
|
111
|
+
:padding="props.optionPadding"
|
|
112
|
+
:editable="props.editable"
|
|
113
|
+
:prependIcon="item.prependIcon"
|
|
114
|
+
:appendIcon="item.appendIcon"
|
|
115
|
+
:variant="getVariant(item)"
|
|
116
|
+
:color="getColor(item)"
|
|
117
|
+
:class="getClass(item)"
|
|
118
|
+
:label="item.label"
|
|
119
|
+
:icon="item.icon"
|
|
120
|
+
:key="index"
|
|
121
|
+
@click="toggle(item)"
|
|
122
|
+
/>
|
|
123
|
+
</template>
|
|
124
|
+
<template
|
|
125
|
+
v-else
|
|
126
|
+
>
|
|
127
|
+
<template
|
|
128
|
+
v-for="item in props.values"
|
|
129
|
+
>
|
|
130
|
+
<slot
|
|
131
|
+
name="item"
|
|
132
|
+
v-bind="{ item, toggle, getVariant, getColor, getClass }"
|
|
133
|
+
/>
|
|
134
|
+
</template>
|
|
135
|
+
</template>
|
|
136
|
+
</template>
|
|
137
|
+
<slot
|
|
138
|
+
v-else
|
|
139
|
+
v-bind="{ toggle, getVariant, getColor, getClass }"
|
|
140
|
+
/>
|
|
141
|
+
</FSRow>
|
|
94
142
|
</template>
|
|
95
143
|
|
|
96
144
|
<script lang="ts">
|
|
@@ -128,7 +176,7 @@ export default defineComponent({
|
|
|
128
176
|
default: "4px"
|
|
129
177
|
},
|
|
130
178
|
variant: {
|
|
131
|
-
type: String as PropType<"wrap" | "slide">,
|
|
179
|
+
type: String as PropType<"wrap" | "slide" | "fullwidth">,
|
|
132
180
|
required: false,
|
|
133
181
|
default: "wrap"
|
|
134
182
|
},
|
package/components/FSSwitch.vue
CHANGED
|
@@ -1,10 +1,58 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSRow
|
|
3
3
|
width="hug"
|
|
4
|
+
align="top-left"
|
|
5
|
+
gap="16px"
|
|
6
|
+
padding="8px 0px"
|
|
7
|
+
:wrap="false"
|
|
4
8
|
>
|
|
9
|
+
<v-switch
|
|
10
|
+
v-if="variant == 'left'"
|
|
11
|
+
class="fs-switch"
|
|
12
|
+
hide-details
|
|
13
|
+
inset
|
|
14
|
+
:validateOn="validateOn"
|
|
15
|
+
:rules="$props.rules"
|
|
16
|
+
:ripple="false"
|
|
17
|
+
:style="style"
|
|
18
|
+
:modelValue="$props.modelValue"
|
|
19
|
+
@update:modelValue="onToggle"
|
|
20
|
+
v-bind="$attrs"
|
|
21
|
+
/>
|
|
22
|
+
<slot>
|
|
23
|
+
<FSCol
|
|
24
|
+
width="hug"
|
|
25
|
+
v-if="$props.label || $props.description || $slots.description"
|
|
26
|
+
>
|
|
27
|
+
<FSSpan
|
|
28
|
+
v-if="$props.label"
|
|
29
|
+
class="fs-switch-label"
|
|
30
|
+
:style="style"
|
|
31
|
+
:font="font"
|
|
32
|
+
@click.stop="onToggle"
|
|
33
|
+
>
|
|
34
|
+
{{ $props.label }}
|
|
35
|
+
</FSSpan>
|
|
36
|
+
<slot
|
|
37
|
+
name="description"
|
|
38
|
+
>
|
|
39
|
+
<FSSpan
|
|
40
|
+
v-if="$props.description"
|
|
41
|
+
class="fs-switch-description"
|
|
42
|
+
font="text-overline"
|
|
43
|
+
:style="style"
|
|
44
|
+
>
|
|
45
|
+
{{ $props.description }}
|
|
46
|
+
</FSSpan>
|
|
47
|
+
</slot>
|
|
48
|
+
<slot
|
|
49
|
+
name="footer"
|
|
50
|
+
/>
|
|
51
|
+
</FSCol>
|
|
52
|
+
</slot>
|
|
5
53
|
<FSRow
|
|
6
|
-
|
|
7
|
-
align="center-
|
|
54
|
+
v-if="variant == 'right'"
|
|
55
|
+
align="center-right"
|
|
8
56
|
>
|
|
9
57
|
<v-switch
|
|
10
58
|
class="fs-switch"
|
|
@@ -18,31 +66,8 @@
|
|
|
18
66
|
@update:modelValue="onToggle"
|
|
19
67
|
v-bind="$attrs"
|
|
20
68
|
/>
|
|
21
|
-
<slot>
|
|
22
|
-
<FSSpan
|
|
23
|
-
v-if="$props.label"
|
|
24
|
-
class="fs-switch-label"
|
|
25
|
-
:style="style"
|
|
26
|
-
:font="font"
|
|
27
|
-
@click.stop="onToggle"
|
|
28
|
-
>
|
|
29
|
-
{{ $props.label }}
|
|
30
|
-
</FSSpan>
|
|
31
|
-
</slot>
|
|
32
69
|
</FSRow>
|
|
33
|
-
|
|
34
|
-
name="description"
|
|
35
|
-
>
|
|
36
|
-
<FSSpan
|
|
37
|
-
v-if="$props.description"
|
|
38
|
-
class="fs-switch-description"
|
|
39
|
-
font="text-overline"
|
|
40
|
-
:style="style"
|
|
41
|
-
>
|
|
42
|
-
{{ $props.description }}
|
|
43
|
-
</FSSpan>
|
|
44
|
-
</slot>
|
|
45
|
-
</FSCol>
|
|
70
|
+
</FSRow>
|
|
46
71
|
</template>
|
|
47
72
|
|
|
48
73
|
<script lang="ts">
|
|
@@ -78,6 +103,11 @@ export default defineComponent({
|
|
|
78
103
|
required: false,
|
|
79
104
|
default: false
|
|
80
105
|
},
|
|
106
|
+
variant: {
|
|
107
|
+
type: String as PropType<"left" | "right">,
|
|
108
|
+
required: false,
|
|
109
|
+
default: "left"
|
|
110
|
+
},
|
|
81
111
|
color: {
|
|
82
112
|
type: String as PropType<ColorBase>,
|
|
83
113
|
required: false,
|
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSColorIcon
|
|
11
11
|
class="fs-stopclick"
|
|
12
|
-
size="
|
|
12
|
+
:size="$props.size"
|
|
13
|
+
:padding="$props.padding"
|
|
13
14
|
:color="$props.deviceConnectivity.color"
|
|
14
15
|
@click.prevent.stop
|
|
15
16
|
v-bind="props"
|
|
@@ -43,6 +44,14 @@ export default defineComponent({
|
|
|
43
44
|
deviceConnectivity: {
|
|
44
45
|
type: Object as PropType<FSDeviceConnectivity>,
|
|
45
46
|
required: true
|
|
47
|
+
},
|
|
48
|
+
size: {
|
|
49
|
+
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
50
|
+
default: "m"
|
|
51
|
+
},
|
|
52
|
+
padding: {
|
|
53
|
+
type: [String, Number] as PropType<string | number>,
|
|
54
|
+
default: "8px"
|
|
46
55
|
}
|
|
47
56
|
},
|
|
48
57
|
setup() {
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
class="fs-stopclick"
|
|
12
12
|
:size="$props.size"
|
|
13
13
|
:color="$props.statusGroup.color"
|
|
14
|
+
:padding="$props.padding"
|
|
14
15
|
@click.prevent.stop
|
|
15
16
|
v-bind="props"
|
|
16
17
|
>
|
|
@@ -52,6 +53,10 @@ export default defineComponent({
|
|
|
52
53
|
size: {
|
|
53
54
|
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
54
55
|
default: "m"
|
|
56
|
+
},
|
|
57
|
+
padding: {
|
|
58
|
+
type: [String, Number] as PropType<string | number>,
|
|
59
|
+
default: "8px"
|
|
55
60
|
}
|
|
56
61
|
},
|
|
57
62
|
setup() {
|
|
@@ -1224,6 +1224,7 @@ export default defineComponent({
|
|
|
1224
1224
|
return Array.isArray(property) ? property.includes(value) || (!value && property.length == 0) : (!value && !property) || value == property;
|
|
1225
1225
|
})
|
|
1226
1226
|
}));
|
|
1227
|
+
filterDictionary[key] = value;
|
|
1227
1228
|
}
|
|
1228
1229
|
else {
|
|
1229
1230
|
if (props.items && props.items.length) {
|
|
@@ -1241,10 +1242,10 @@ export default defineComponent({
|
|
|
1241
1242
|
})
|
|
1242
1243
|
}));
|
|
1243
1244
|
}
|
|
1245
|
+
filterDictionary[key] = value.sort((v1, v2) => {
|
|
1246
|
+
return v1.text.localeCompare(v2.text, undefined, { numeric: true });
|
|
1247
|
+
});
|
|
1244
1248
|
}
|
|
1245
|
-
filterDictionary[key] = value.sort((v1, v2) => {
|
|
1246
|
-
return v1.text.localeCompare(v2.text, undefined, { numeric: true });
|
|
1247
|
-
});
|
|
1248
1249
|
}
|
|
1249
1250
|
for (const [key, filters] of Object.entries(props.filters)) {
|
|
1250
1251
|
for (const filter of filters) {
|
package/components/map/FSMap.vue
CHANGED
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
v-for="location in $props.locations"
|
|
48
48
|
:selected="location.id === $props.selectedLocationId"
|
|
49
49
|
:key="location.id"
|
|
50
|
-
:color="location.color"
|
|
51
|
-
:icon="location.icon"
|
|
50
|
+
:color="location.color ?? ColorEnum.Primary"
|
|
51
|
+
:icon="location.icon ?? 'mdi-map-marker'"
|
|
52
52
|
:latlng="{lat: location.address.latitude, lng: location.address.longitude}"
|
|
53
53
|
@click="$emit('update:selectedLocationId', location.id)"
|
|
54
54
|
/>
|
package/models/map.ts
CHANGED
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.64",
|
|
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.64",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.64"
|
|
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": "2774a6e01e85f2b27b543f3fdd91a9370b95fbee"
|
|
39
39
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
.fs-option-group {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
border-radius: var(--fs-option-group-border-radius) !important;
|
|
3
|
+
border: var(--fs-option-group-border-size) solid !important;
|
|
4
|
+
background-color: var(--fs-option-group-background-color) !important;
|
|
5
|
+
border-color: var(--fs-option-group-border-color) !important;
|
|
6
|
+
width: fit-content;
|
|
7
|
+
}
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
.fs-option-group-full-width {
|
|
10
|
+
border-radius: var(--fs-option-group-border-radius) !important;
|
|
11
|
+
border: var(--fs-option-group-border-size) solid !important;
|
|
12
|
+
background-color: var(--fs-option-group-background-color) !important;
|
|
13
|
+
border-color: var(--fs-option-group-border-color) !important;
|
|
14
|
+
|
|
15
|
+
& > * {
|
|
16
|
+
width: 100% !important;
|
|
17
|
+
}
|
|
8
18
|
}
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
.fs-tabs {
|
|
2
2
|
display: flex !important;
|
|
3
3
|
width: 100% !important;
|
|
4
|
-
flex-shrink: 0;
|
|
5
4
|
|
|
6
5
|
@include web {
|
|
7
6
|
height: 48px !important;
|
|
8
7
|
max-height: 48px;
|
|
8
|
+
min-height: 48px;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
@include mobile {
|
|
12
12
|
height: 40px !important;
|
|
13
13
|
max-height: 40px;
|
|
14
|
+
min-height: 40px;
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
@@ -34,11 +35,13 @@
|
|
|
34
35
|
@include web {
|
|
35
36
|
height: 48px !important;
|
|
36
37
|
max-height: 48px;
|
|
38
|
+
min-height: 48px;
|
|
37
39
|
}
|
|
38
40
|
|
|
39
41
|
@include mobile {
|
|
40
42
|
height: 40px !important;
|
|
41
43
|
max-height: 40px;
|
|
44
|
+
min-height: 40px;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
|