@dative-gpi/foundation-shared-components 0.0.74 → 0.0.75
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/FSCard.vue +1 -1
- package/components/FSCarousel.vue +8 -2
- package/components/FSCheckbox.vue +1 -0
- package/components/FSColor.vue +1 -1
- package/components/FSColorIcon.vue +35 -36
- package/components/FSEditImage.vue +5 -3
- package/components/FSIcon.vue +1 -1
- package/components/FSImage.vue +12 -4
- package/components/deviceOrganisations/FSConnectivity.vue +2 -1
- package/components/deviceOrganisations/FSStatus.vue +2 -1
- package/components/deviceOrganisations/FSStatusesCarousel.vue +6 -4
- package/components/deviceOrganisations/FSWorstAlert.vue +2 -1
- package/package.json +4 -4
- package/styles/components/fs_carousel.scss +5 -0
- package/styles/components/fs_clickable.scss +6 -16
- package/styles/components/fs_color_icon.scss +1 -35
package/components/FSCard.vue
CHANGED
|
@@ -148,7 +148,7 @@ export default defineComponent({
|
|
|
148
148
|
});
|
|
149
149
|
|
|
150
150
|
const classes = computed((): string[] => {
|
|
151
|
-
const classNames = ["fs-card"];
|
|
151
|
+
const classNames = ["fs-card", "fs-background"];
|
|
152
152
|
switch(props.variant) {
|
|
153
153
|
case "gradient":
|
|
154
154
|
classNames.push("fs-card-gradient");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<v-carousel
|
|
3
|
-
class="fs-carousel"
|
|
4
3
|
:hideDelimiters="true"
|
|
4
|
+
:class="classes"
|
|
5
5
|
:style="style"
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
>
|
|
@@ -51,14 +51,20 @@ export default defineComponent({
|
|
|
51
51
|
};
|
|
52
52
|
});
|
|
53
53
|
|
|
54
|
+
const classes = computed((): string[] => {
|
|
55
|
+
const classNames = ["fs-carousel", "fs-background"];
|
|
56
|
+
return classNames;
|
|
57
|
+
});
|
|
58
|
+
|
|
54
59
|
const value = (component: VNode, index: number): any => {
|
|
55
60
|
return component?.props?.value ?? index;
|
|
56
61
|
};
|
|
57
62
|
|
|
58
63
|
return {
|
|
59
|
-
|
|
64
|
+
classes,
|
|
60
65
|
slots,
|
|
61
66
|
style,
|
|
67
|
+
getChildren,
|
|
62
68
|
value
|
|
63
69
|
};
|
|
64
70
|
}
|
package/components/FSColor.vue
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
</template>
|
|
11
11
|
|
|
12
12
|
<script lang="ts">
|
|
13
|
-
import { computed, defineComponent, PropType
|
|
13
|
+
import { computed, defineComponent, PropType } from "vue";
|
|
14
14
|
|
|
15
15
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
16
16
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -1,33 +1,47 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<FSColor
|
|
3
|
+
class="fs-color-icon"
|
|
3
4
|
:color="$props.color"
|
|
4
|
-
:
|
|
5
|
-
:
|
|
6
|
-
|
|
5
|
+
:border="false"
|
|
6
|
+
:height="size"
|
|
7
|
+
:width="size"
|
|
7
8
|
>
|
|
8
|
-
<
|
|
9
|
-
|
|
9
|
+
<FSRow
|
|
10
|
+
align="center-center"
|
|
11
|
+
>
|
|
12
|
+
<FSIcon
|
|
13
|
+
:color="$props.color"
|
|
14
|
+
:size="$props.size"
|
|
15
|
+
>
|
|
16
|
+
<slot />
|
|
17
|
+
</FSIcon>
|
|
18
|
+
</FSRow>
|
|
19
|
+
</FSColor>
|
|
10
20
|
</template>
|
|
11
21
|
|
|
12
22
|
<script lang="ts">
|
|
13
23
|
import { computed, defineComponent, PropType } from "vue";
|
|
14
24
|
|
|
15
25
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
16
|
-
import {
|
|
26
|
+
import { useBreakpoints } from "@dative-gpi/foundation-shared-components/composables";
|
|
27
|
+
|
|
28
|
+
import FSColor from "./FSColor.vue";
|
|
29
|
+
import FSIcon from "./FSIcon.vue";
|
|
30
|
+
import FSRow from "./FSRow.vue";
|
|
17
31
|
|
|
18
32
|
export default defineComponent({
|
|
19
33
|
name: "FSColorIcon",
|
|
34
|
+
components: {
|
|
35
|
+
FSColor,
|
|
36
|
+
FSIcon,
|
|
37
|
+
FSRow
|
|
38
|
+
},
|
|
20
39
|
props: {
|
|
21
40
|
size: {
|
|
22
|
-
type: String as PropType<"s" | "m" | "l">,
|
|
41
|
+
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
23
42
|
required: false,
|
|
24
43
|
default: "m"
|
|
25
44
|
},
|
|
26
|
-
variant: {
|
|
27
|
-
type: String as PropType<"standard" | "full">,
|
|
28
|
-
required: false,
|
|
29
|
-
default: "standard"
|
|
30
|
-
},
|
|
31
45
|
color: {
|
|
32
46
|
type: String as PropType<ColorBase>,
|
|
33
47
|
required: false,
|
|
@@ -35,34 +49,19 @@ export default defineComponent({
|
|
|
35
49
|
}
|
|
36
50
|
},
|
|
37
51
|
setup(props) {
|
|
38
|
-
const {
|
|
39
|
-
|
|
40
|
-
const colors = computed(() => getColors(props.color));
|
|
41
|
-
|
|
42
|
-
const style = computed((): { [key: string] : string | undefined } => {
|
|
43
|
-
switch (props.variant) {
|
|
44
|
-
case "full": return {
|
|
45
|
-
"--fs-icon-background-color": colors.value.light
|
|
46
|
-
};
|
|
47
|
-
default: return {
|
|
48
|
-
"--fs-icon-background-color": "transparent"
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
+
const { isMobileSized } = useBreakpoints();
|
|
52
53
|
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
case "
|
|
57
|
-
|
|
58
|
-
|
|
54
|
+
const size = computed((): string[] | number[] | string | number | null => {
|
|
55
|
+
switch(props.size) {
|
|
56
|
+
case "s": return isMobileSized.value ? "18px" : "20px";
|
|
57
|
+
case "m": return isMobileSized.value ? "20px" : "26px";
|
|
58
|
+
case "l": return isMobileSized.value ? "36px" : "40px";
|
|
59
|
+
default: return props.size;
|
|
59
60
|
}
|
|
60
|
-
return classNames;
|
|
61
61
|
});
|
|
62
62
|
|
|
63
63
|
return {
|
|
64
|
-
|
|
65
|
-
classes
|
|
64
|
+
size
|
|
66
65
|
};
|
|
67
66
|
}
|
|
68
67
|
});
|
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSRow
|
|
3
|
+
width="hug"
|
|
3
4
|
gap="24px"
|
|
4
5
|
>
|
|
5
6
|
<FSImage
|
|
6
7
|
class="fs-edit-image"
|
|
7
8
|
:aspectRatio="$props.aspectRatio"
|
|
8
|
-
:imageId="$props.imageId"
|
|
9
9
|
:height="$props.height"
|
|
10
|
-
:imageB64="realSource"
|
|
11
10
|
:width="$props.width"
|
|
11
|
+
:imageId="$props.imageId"
|
|
12
|
+
:imageB64="realSource"
|
|
12
13
|
:style="style"
|
|
13
14
|
/>
|
|
14
15
|
<FSCol
|
|
15
|
-
height="fill"
|
|
16
16
|
align="bottom-left"
|
|
17
|
+
height="fill"
|
|
18
|
+
width="hug"
|
|
17
19
|
>
|
|
18
20
|
<FSText
|
|
19
21
|
v-if="fileSelected"
|
package/components/FSIcon.vue
CHANGED
|
@@ -14,7 +14,7 @@ import { computed, defineComponent, PropType } from "vue";
|
|
|
14
14
|
|
|
15
15
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
16
16
|
import { ColorBase } from "@dative-gpi/foundation-shared-components/models";
|
|
17
|
-
import { sizeToVar } from "
|
|
17
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
18
18
|
|
|
19
19
|
export default defineComponent({
|
|
20
20
|
name: "FSIcon",
|
package/components/FSImage.vue
CHANGED
|
@@ -37,8 +37,7 @@
|
|
|
37
37
|
import { computed, defineComponent, PropType, ref, watch } from "vue";
|
|
38
38
|
import { decode, isBlurhashValid } from "blurhash";
|
|
39
39
|
|
|
40
|
-
import { useImageBlurHash } from "@dative-gpi/foundation-shared-services/composables";
|
|
41
|
-
import { IMAGE_RAW_URL } from "@dative-gpi/foundation-shared-services/config/urls";
|
|
40
|
+
import { useImageBlurHash, useRawImage } from "@dative-gpi/foundation-shared-services/composables";
|
|
42
41
|
import { sizeToVar, varToSize } from "@dative-gpi/foundation-shared-components/utils";
|
|
43
42
|
|
|
44
43
|
import FSLoader from "./FSLoader.vue";
|
|
@@ -87,6 +86,7 @@ export default defineComponent({
|
|
|
87
86
|
},
|
|
88
87
|
setup(props) {
|
|
89
88
|
const { fetch: fetchBlurHash, entity: blurHash } = useImageBlurHash();
|
|
89
|
+
const { fetch: fetchRawImage, entity: image } = useRawImage();
|
|
90
90
|
|
|
91
91
|
const imageRef = ref<HTMLFormElement | null>(null);
|
|
92
92
|
const canvasRef = ref<HTMLCanvasElement | null>(null);
|
|
@@ -150,8 +150,10 @@ export default defineComponent({
|
|
|
150
150
|
return `${imageType.value},${imageData.value}`;
|
|
151
151
|
}
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
if (props.imageId) {
|
|
154
|
+
if (image.value) {
|
|
155
|
+
return image.value;
|
|
156
|
+
}
|
|
155
157
|
}
|
|
156
158
|
});
|
|
157
159
|
|
|
@@ -182,6 +184,12 @@ export default defineComponent({
|
|
|
182
184
|
}
|
|
183
185
|
};
|
|
184
186
|
|
|
187
|
+
watch(() => props.imageId, () => {
|
|
188
|
+
if (props.imageId) {
|
|
189
|
+
fetchRawImage(props.imageId);
|
|
190
|
+
}
|
|
191
|
+
}, { immediate: true });
|
|
192
|
+
|
|
185
193
|
watch(() => blurHash.value, () => {
|
|
186
194
|
if (canvasRef.value && imageRef.value) {
|
|
187
195
|
if (blurHash.value && isBlurhashValid(blurHash.value.blurHash).result) {
|
|
@@ -5,19 +5,21 @@
|
|
|
5
5
|
<template #prev="{ props }">
|
|
6
6
|
<FSButton
|
|
7
7
|
v-if="$props.modelStatuses.length > 1"
|
|
8
|
-
variant="icon"
|
|
9
8
|
icon="mdi-chevron-left"
|
|
9
|
+
class="fs-stopclick"
|
|
10
|
+
variant="icon"
|
|
10
11
|
:color="ColorEnum.Dark"
|
|
11
|
-
@click="props.onClick"
|
|
12
|
+
@click.prevent.stop="props.onClick"
|
|
12
13
|
/>
|
|
13
14
|
</template>
|
|
14
15
|
<template #next="{ props }">
|
|
15
16
|
<FSButton
|
|
16
17
|
v-if="$props.modelStatuses.length > 1"
|
|
17
|
-
variant="icon"
|
|
18
18
|
icon="mdi-chevron-right"
|
|
19
|
+
class="fs-stopclick"
|
|
20
|
+
variant="icon"
|
|
19
21
|
:color="ColorEnum.Dark"
|
|
20
|
-
@click="props.onClick"
|
|
22
|
+
@click.prevent.stop="props.onClick"
|
|
21
23
|
/>
|
|
22
24
|
</template>
|
|
23
25
|
<FSRow
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.75",
|
|
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": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.75",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.75",
|
|
15
15
|
"@fontsource/montserrat": "^5.0.16",
|
|
16
16
|
"@lexical/clipboard": "^0.12.5",
|
|
17
17
|
"@lexical/history": "^0.12.5",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"sass": "^1.69.5",
|
|
33
33
|
"sass-loader": "^13.3.2"
|
|
34
34
|
},
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "d06115ff4fb375224f9ec1cb5521c66a73509ba2"
|
|
36
36
|
}
|
|
@@ -8,37 +8,27 @@
|
|
|
8
8
|
border-color: var(--fs-clickable-border-color) !important;
|
|
9
9
|
color: var(--fs-clickable-color) !important;
|
|
10
10
|
|
|
11
|
-
& .fs-card {
|
|
12
|
-
background-color: var(--fs-clickable-background-color) !important;
|
|
13
|
-
border-color: var(--fs-clickable-border-color) !important;
|
|
14
|
-
color: var(--fs-clickable-color) !important;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
11
|
&.fs-clickable-disabled {
|
|
18
12
|
cursor: default;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
|
-
&:not(.fs-clickable-disabled):hover {
|
|
15
|
+
&:not(.fs-clickable-disabled):hover:not(:has( .fs-stopclick:hover)) {
|
|
22
16
|
background-color: var(--fs-clickable-hover-background-color) !important;
|
|
23
17
|
border-color: var(--fs-clickable-hover-border-color) !important;
|
|
24
18
|
color: var(--fs-clickable-hover-color) !important;
|
|
25
19
|
|
|
26
|
-
& .fs-
|
|
27
|
-
background-color: var(--fs-clickable-hover-background-color)
|
|
28
|
-
border-color: var(--fs-clickable-hover-border-color) !important;
|
|
29
|
-
color: var(--fs-clickable-hover-color) !important;
|
|
20
|
+
& .fs-background {
|
|
21
|
+
background-color: var(--fs-clickable-hover-background-color);
|
|
30
22
|
}
|
|
31
23
|
}
|
|
32
24
|
|
|
33
|
-
&:not(.fs-clickable-disabled):active {
|
|
25
|
+
&:not(.fs-clickable-disabled):active:not(:has( .fs-stopclick:hover)) {
|
|
34
26
|
background-color: var(--fs-clickable-active-background-color) !important;
|
|
35
27
|
border-color: var(--fs-clickable-active-border-color) !important;
|
|
36
28
|
color: var(--fs-clickable-active-color) !important;
|
|
37
29
|
|
|
38
|
-
& .fs-
|
|
39
|
-
background-color: var(--fs-clickable-active-background-color)
|
|
40
|
-
border-color: var(--fs-clickable-active-border-color) !important;
|
|
41
|
-
color: var(--fs-clickable-active-color) !important;
|
|
30
|
+
& .fs-background {
|
|
31
|
+
background-color: var(--fs-clickable-active-background-color);
|
|
42
32
|
}
|
|
43
33
|
}
|
|
44
34
|
}
|
|
@@ -1,37 +1,3 @@
|
|
|
1
1
|
.fs-color-icon {
|
|
2
|
-
|
|
3
|
-
border-radius: 4px;
|
|
4
|
-
|
|
5
|
-
&.fs-icon-s {
|
|
6
|
-
@include web {
|
|
7
|
-
width: 20px;
|
|
8
|
-
height: 20px;
|
|
9
|
-
}
|
|
10
|
-
@include mobile {
|
|
11
|
-
width: 18px;
|
|
12
|
-
height: 18px;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.fs-icon-m {
|
|
17
|
-
@include web {
|
|
18
|
-
width: 26px;
|
|
19
|
-
height: 26px;
|
|
20
|
-
}
|
|
21
|
-
@include mobile {
|
|
22
|
-
width: 20px;
|
|
23
|
-
height: 20px;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&.fs-icon-l {
|
|
28
|
-
@include web {
|
|
29
|
-
width: 40px;
|
|
30
|
-
height: 40px;
|
|
31
|
-
}
|
|
32
|
-
@include mobile {
|
|
33
|
-
width: 36px;
|
|
34
|
-
height: 36px;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
2
|
+
cursor: pointer;
|
|
37
3
|
}
|