@dative-gpi/foundation-shared-components 1.0.71 → 1.0.74
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/FSBreadcrumbs.vue +1 -0
- package/components/FSCard.vue +22 -5
- package/components/FSDialogContent.vue +2 -4
- package/components/FSDialogFormBody.vue +2 -8
- package/components/FSDialogMultiFormBody.vue +1 -4
- package/components/FSDialogRemove.vue +0 -1
- package/components/FSDialogSubmit.vue +1 -4
- package/components/FSFadeOut.vue +29 -12
- package/components/FSIconCard.vue +1 -1
- package/components/autocompletes/FSAutoCompleteAddress.vue +16 -20
- package/components/deviceOrganisations/FSWorstAlert.vue +15 -29
- package/components/deviceOrganisations/FSWorstAlertCard.vue +7 -46
- package/components/fields/FSAutocompleteField.vue +1 -0
- package/components/lists/FSFilterButton.vue +3 -6
- package/components/lists/FSHiddenButton.vue +1 -3
- package/components/lists/FSSimpleList.vue +0 -2
- package/components/map/FSMapLayerButton.vue +0 -1
- package/components/tiles/FSSimpleTileUI.vue +6 -1
- package/components/views/FSBaseView.vue +64 -0
- package/components/views/FSEntityView.vue +12 -146
- package/components/views/FSSimpleView.vue +29 -0
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +132 -0
- package/components/views/desktop/FSBaseDesktopView.vue +53 -0
- package/components/views/desktop/FSBaseEntityDesktopView.vue +199 -0
- package/components/views/mobile/FSBaseDefaultMobileView.vue +132 -0
- package/components/views/mobile/FSBaseEntityMobileView.vue +199 -0
- package/components/views/mobile/FSBaseMobileView.vue +53 -0
- package/package.json +4 -4
- package/styles/components/fs_breadcrumbs.scss +6 -12
- package/styles/components/fs_clickable.scss +1 -0
- package/styles/components/fs_fade_out.scss +5 -1
- package/styles/components/fs_slide_group.scss +1 -1
- package/components/views/FSListView.vue +0 -83
- package/components/views/FSSkeletonView.vue +0 -100
package/components/FSCard.vue
CHANGED
|
@@ -105,7 +105,7 @@ export default defineComponent({
|
|
|
105
105
|
const { getColors, getGradients } = useColors();
|
|
106
106
|
|
|
107
107
|
const colors = computed(() => {
|
|
108
|
-
if(Array.isArray(props.color)) {
|
|
108
|
+
if (Array.isArray(props.color)) {
|
|
109
109
|
return getColors(props.color[0]);
|
|
110
110
|
}
|
|
111
111
|
return getColors(props.color);
|
|
@@ -115,6 +115,23 @@ export default defineComponent({
|
|
|
115
115
|
const lights = getColors(ColorEnum.Light);
|
|
116
116
|
const darks = getColors(ColorEnum.Dark);
|
|
117
117
|
|
|
118
|
+
const borderColor = computed((): ColorBase => {
|
|
119
|
+
switch (props.variant) {
|
|
120
|
+
case "background":
|
|
121
|
+
return lights.dark;
|
|
122
|
+
case "standard" :
|
|
123
|
+
if (Array.isArray(props.color)) {
|
|
124
|
+
return colors.value.lightContrast!;
|
|
125
|
+
}
|
|
126
|
+
if (([ColorEnum.Background, ColorEnum.Light, ColorEnum.Dark] as ColorBase[]).includes(props.color)) {
|
|
127
|
+
return lights.dark;
|
|
128
|
+
}
|
|
129
|
+
return colors.value.lightContrast!;
|
|
130
|
+
case "full" : return colors.value.base;
|
|
131
|
+
case "gradient" : return colors.value.lightContrast!;
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
|
|
118
135
|
const style = computed((): StyleValue => {
|
|
119
136
|
switch (props.variant) {
|
|
120
137
|
case "background": return {
|
|
@@ -125,7 +142,7 @@ export default defineComponent({
|
|
|
125
142
|
"--fs-card-height" : sizeToVar(props.height),
|
|
126
143
|
"--fs-card-width" : sizeToVar(props.width),
|
|
127
144
|
"--fs-card-background-color": backgrounds.base,
|
|
128
|
-
"--fs-card-border-color" :
|
|
145
|
+
"--fs-card-border-color" : borderColor.value,
|
|
129
146
|
"--fs-card-color" : darks.base
|
|
130
147
|
}
|
|
131
148
|
case "standard": return {
|
|
@@ -136,7 +153,7 @@ export default defineComponent({
|
|
|
136
153
|
"--fs-card-height" : sizeToVar(props.height),
|
|
137
154
|
"--fs-card-width" : sizeToVar(props.width),
|
|
138
155
|
"--fs-card-background-color": colors.value.light,
|
|
139
|
-
"--fs-card-border-color" :
|
|
156
|
+
"--fs-card-border-color" : borderColor.value,
|
|
140
157
|
"--fs-card-color" : colors.value.lightContrast!
|
|
141
158
|
}
|
|
142
159
|
case "full": return {
|
|
@@ -147,7 +164,7 @@ export default defineComponent({
|
|
|
147
164
|
"--fs-card-height" : sizeToVar(props.height),
|
|
148
165
|
"--fs-card-width" : sizeToVar(props.width),
|
|
149
166
|
"--fs-card-background-color": colors.value.base,
|
|
150
|
-
"--fs-card-border-color" :
|
|
167
|
+
"--fs-card-border-color" : borderColor.value,
|
|
151
168
|
"--fs-card-color" : colors.value.baseContrast!
|
|
152
169
|
}
|
|
153
170
|
case "gradient": return {
|
|
@@ -158,7 +175,7 @@ export default defineComponent({
|
|
|
158
175
|
"--fs-card-height" : sizeToVar(props.height),
|
|
159
176
|
"--fs-card-width" : sizeToVar(props.width),
|
|
160
177
|
"--fs-card-background-color": gradients.value.base,
|
|
161
|
-
"--fs-card-border-color" :
|
|
178
|
+
"--fs-card-border-color" : borderColor.value,
|
|
162
179
|
"--fs-card-color" : colors.value.lightContrast!
|
|
163
180
|
}
|
|
164
181
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCard
|
|
3
|
-
padding="24px
|
|
3
|
+
padding="24px"
|
|
4
4
|
gap="24px"
|
|
5
5
|
:class="$props.cardClasses"
|
|
6
6
|
:color="$props.color"
|
|
@@ -9,9 +9,7 @@
|
|
|
9
9
|
<template
|
|
10
10
|
#header
|
|
11
11
|
>
|
|
12
|
-
<FSCol
|
|
13
|
-
padding="0 16px 0 0"
|
|
14
|
-
>
|
|
12
|
+
<FSCol>
|
|
15
13
|
<FSRow
|
|
16
14
|
align="center-left"
|
|
17
15
|
:wrap="false"
|
|
@@ -12,16 +12,13 @@
|
|
|
12
12
|
gap="24px"
|
|
13
13
|
>
|
|
14
14
|
<FSFadeOut
|
|
15
|
-
padding="0 8px 0 0"
|
|
16
15
|
:maxHeight="maxHeight"
|
|
17
16
|
>
|
|
18
17
|
<slot
|
|
19
18
|
name="body"
|
|
20
19
|
/>
|
|
21
20
|
</FSFadeOut>
|
|
22
|
-
<FSRow
|
|
23
|
-
padding="0 16px 0 0"
|
|
24
|
-
>
|
|
21
|
+
<FSRow>
|
|
25
22
|
<slot
|
|
26
23
|
name="left-footer"
|
|
27
24
|
/>
|
|
@@ -60,16 +57,13 @@
|
|
|
60
57
|
gap="24px"
|
|
61
58
|
>
|
|
62
59
|
<FSFadeOut
|
|
63
|
-
padding="0 8px 0 0"
|
|
64
60
|
:maxHeight="maxHeight"
|
|
65
61
|
>
|
|
66
62
|
<slot
|
|
67
63
|
name="validation"
|
|
68
64
|
/>
|
|
69
65
|
</FSFadeOut>
|
|
70
|
-
<FSRow
|
|
71
|
-
padding="0 16px 0 0"
|
|
72
|
-
>
|
|
66
|
+
<FSRow>
|
|
73
67
|
<slot
|
|
74
68
|
name="left-footer"
|
|
75
69
|
/>
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
ref="fadeOutRef"
|
|
5
5
|
:id="elementId"
|
|
6
6
|
:style="style"
|
|
7
|
-
@scroll="debounceMasks"
|
|
7
|
+
@scroll="$emit('scroll', $event); debounceMasks()"
|
|
8
8
|
>
|
|
9
9
|
<slot />
|
|
10
10
|
</div>
|
|
@@ -45,10 +45,25 @@ export default defineComponent({
|
|
|
45
45
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
46
46
|
required: false,
|
|
47
47
|
default: "64px"
|
|
48
|
+
},
|
|
49
|
+
scrollOutside: {
|
|
50
|
+
type: Boolean,
|
|
51
|
+
required: false,
|
|
52
|
+
default: true
|
|
53
|
+
},
|
|
54
|
+
disableTopMask: {
|
|
55
|
+
type: Boolean,
|
|
56
|
+
required: false,
|
|
57
|
+
default: false
|
|
58
|
+
},
|
|
59
|
+
disableBottomMask: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
required: false,
|
|
62
|
+
default: false
|
|
48
63
|
}
|
|
49
64
|
},
|
|
50
65
|
emits: ["scroll"],
|
|
51
|
-
setup(props
|
|
66
|
+
setup(props) {
|
|
52
67
|
const { windowHeight, windowWidth } = useBreakpoints();
|
|
53
68
|
const { debounce } = useDebounce();
|
|
54
69
|
const { getColors } = useColors();
|
|
@@ -69,9 +84,11 @@ export default defineComponent({
|
|
|
69
84
|
"--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : undefined,
|
|
70
85
|
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
71
86
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
87
|
+
"--fs-fade-out-with-offset" : props.scrollOutside ? '12px' : '0px',
|
|
88
|
+
"--fs-fade-out-padding-offset" : props.scrollOutside ? '4px' : '0px',
|
|
72
89
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
73
|
-
"--fs-fade-out-top-mask-height" : topMaskHeight.value,
|
|
74
|
-
"--fs-fade-out-bottom-mask-height": bottomMaskHeight.value
|
|
90
|
+
"--fs-fade-out-top-mask-height" : props.disableTopMask ? '0px' : topMaskHeight.value,
|
|
91
|
+
"--fs-fade-out-bottom-mask-height": props.disableBottomMask ? '0px' : bottomMaskHeight.value
|
|
75
92
|
}));
|
|
76
93
|
|
|
77
94
|
const handleMasks = () => {
|
|
@@ -94,19 +111,19 @@ export default defineComponent({
|
|
|
94
111
|
topMaskHeight.value = sizeToVar(props.maskHeight);
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
const event = {
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
};
|
|
114
|
+
// const event = {
|
|
115
|
+
// target: fadeOutRef.value,
|
|
116
|
+
// onTop: topMaskHeight.value === "0px",
|
|
117
|
+
// onBottom: bottomMaskHeight.value === "0px",
|
|
118
|
+
// goingUp: (fadeOutRef.value as any).scrollTop < lastScroll.value,
|
|
119
|
+
// };
|
|
103
120
|
|
|
104
|
-
emit("scroll", event);
|
|
121
|
+
// emit("scroll", event);
|
|
105
122
|
lastScroll.value = (fadeOutRef.value as any).scrollTop;
|
|
106
123
|
}
|
|
107
124
|
};
|
|
108
125
|
|
|
109
|
-
const debounceMasks = (): void => debounce(handleMasks,
|
|
126
|
+
const debounceMasks = (): void => debounce(handleMasks, 1);
|
|
110
127
|
|
|
111
128
|
onMounted((): void => {
|
|
112
129
|
debounceMasks();
|
|
@@ -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.Dark
|
|
62
62
|
},
|
|
63
63
|
iconVariant: {
|
|
64
64
|
type: String as PropType<"base" | "baseContrast" | "soft" | "softContrast" | "light" | "lightContrast" | "dark" | "darkContrast">,
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
:clearable="false"
|
|
4
4
|
:toggleSet="false"
|
|
5
5
|
:multiple="false"
|
|
6
|
-
:items="
|
|
7
|
-
:modelValue="
|
|
6
|
+
:items="items"
|
|
7
|
+
:modelValue="$props.modelValue?.placeId"
|
|
8
8
|
@update:modelValue="onUpdate"
|
|
9
9
|
v-model:search="search"
|
|
10
10
|
v-bind="$attrs"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
</template>
|
|
13
13
|
|
|
14
14
|
<script lang="ts">
|
|
15
|
-
import {
|
|
15
|
+
import { computed, defineComponent, ref } from "vue";
|
|
16
16
|
|
|
17
17
|
import { type Address, type Place } from "@dative-gpi/foundation-shared-domain/models";
|
|
18
18
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -38,7 +38,15 @@ export default defineComponent({
|
|
|
38
38
|
const { search: searchAddress, get: getAddress } = useAddress();
|
|
39
39
|
|
|
40
40
|
const places = ref<Place[]>([]);
|
|
41
|
-
|
|
41
|
+
|
|
42
|
+
const items = computed(() => {
|
|
43
|
+
if(props.modelValue) {
|
|
44
|
+
const currentPlace = addressToPlace(props.modelValue);
|
|
45
|
+
const searchedPlaces = places.value.filter((place) => place.id !== currentPlace.id);
|
|
46
|
+
return [currentPlace, ...searchedPlaces];
|
|
47
|
+
}
|
|
48
|
+
return places.value;
|
|
49
|
+
});
|
|
42
50
|
|
|
43
51
|
const fetch = async (search: string | null) => {
|
|
44
52
|
if (search === null) {
|
|
@@ -69,7 +77,9 @@ export default defineComponent({
|
|
|
69
77
|
(item) => (item).id,
|
|
70
78
|
(item) => (item).label,
|
|
71
79
|
true,
|
|
72
|
-
false
|
|
80
|
+
false,
|
|
81
|
+
0,
|
|
82
|
+
500
|
|
73
83
|
);
|
|
74
84
|
|
|
75
85
|
const addressToPlace = (address: Address): Place => {
|
|
@@ -79,23 +89,9 @@ export default defineComponent({
|
|
|
79
89
|
};
|
|
80
90
|
};
|
|
81
91
|
|
|
82
|
-
onMounted(() => {
|
|
83
|
-
if(!props.modelValue) {
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
modelValuePlace.value = addressToPlace(props.modelValue);
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
watch(() => props.modelValue, (newValue) => {
|
|
90
|
-
if(!newValue) {
|
|
91
|
-
return;
|
|
92
|
-
}
|
|
93
|
-
modelValuePlace.value = addressToPlace(newValue);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
92
|
return {
|
|
97
|
-
modelValuePlace,
|
|
98
93
|
places,
|
|
94
|
+
items,
|
|
99
95
|
search,
|
|
100
96
|
onUpdate
|
|
101
97
|
};
|
|
@@ -9,16 +9,17 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSBadge
|
|
11
11
|
:content="badgeLabel"
|
|
12
|
-
:color="criticityColor"
|
|
12
|
+
:color="AlertTools.criticityColor($props.deviceWorstAlert?.criticity)"
|
|
13
13
|
>
|
|
14
14
|
<FSColorIcon
|
|
15
15
|
class="fs-stopclick"
|
|
16
|
-
|
|
17
|
-
:color="criticityColor"
|
|
16
|
+
:padding="$props.padding"
|
|
17
|
+
:color="AlertTools.criticityColor($props.deviceWorstAlert?.criticity)"
|
|
18
|
+
:size="$props.size"
|
|
18
19
|
@click.prevent.stop
|
|
19
20
|
v-bind="props"
|
|
20
21
|
>
|
|
21
|
-
{{ statusIcon }}
|
|
22
|
+
{{ AlertTools.statusIcon($props.deviceWorstAlert?.status) }}
|
|
22
23
|
</FSColorIcon>
|
|
23
24
|
</FSBadge>
|
|
24
25
|
</template>
|
|
@@ -34,8 +35,7 @@
|
|
|
34
35
|
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
35
36
|
|
|
36
37
|
import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
37
|
-
import {
|
|
38
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
38
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
39
39
|
|
|
40
40
|
import FSWorstAlertCard from "./FSWorstAlertCard.vue";
|
|
41
41
|
import FSColorIcon from "../FSColorIcon.vue";
|
|
@@ -62,32 +62,19 @@ export default defineComponent({
|
|
|
62
62
|
type: Function,
|
|
63
63
|
required: false,
|
|
64
64
|
default: null
|
|
65
|
+
},
|
|
66
|
+
size: {
|
|
67
|
+
type: [Array, String, Number] as PropType<"s" | "m" | "l" | string[] | number[] | string | number | null>,
|
|
68
|
+
default: "m"
|
|
69
|
+
},
|
|
70
|
+
padding: {
|
|
71
|
+
type: [String, Number] as PropType<string | number>,
|
|
72
|
+
default: "8px"
|
|
65
73
|
}
|
|
66
74
|
},
|
|
67
75
|
setup(props) {
|
|
68
76
|
const menu = ref(false);
|
|
69
77
|
|
|
70
|
-
const criticityColor = computed(() => {
|
|
71
|
-
switch (props.deviceWorstAlert?.criticity) {
|
|
72
|
-
case Criticity.Error: return ColorEnum.Error;
|
|
73
|
-
case Criticity.Warning: return ColorEnum.Warning;
|
|
74
|
-
default: return ColorEnum.Primary;
|
|
75
|
-
}
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const statusIcon = computed(() => {
|
|
79
|
-
switch (props.deviceWorstAlert?.status) {
|
|
80
|
-
case AlertStatus.Pending: return "mdi-timer-outline";
|
|
81
|
-
case AlertStatus.Untriggered: return "mdi-timer-off-outline";
|
|
82
|
-
case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
|
|
83
|
-
case AlertStatus.Resolved: return "mdi-check-circle-outline";
|
|
84
|
-
case AlertStatus.Expired: return "mdi-clock-outline";
|
|
85
|
-
case AlertStatus.Triggered: return "mdi-alert-circle-outline";
|
|
86
|
-
case AlertStatus.Abandoned: return "mdi-cancel"
|
|
87
|
-
default: return "";
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
|
|
91
78
|
const badgeLabel = computed((): string | null => {
|
|
92
79
|
if (!props.deviceAlerts || props.deviceAlerts.length < 1) {
|
|
93
80
|
return null;
|
|
@@ -99,8 +86,7 @@ export default defineComponent({
|
|
|
99
86
|
});
|
|
100
87
|
|
|
101
88
|
return {
|
|
102
|
-
|
|
103
|
-
statusIcon,
|
|
89
|
+
AlertTools,
|
|
104
90
|
badgeLabel,
|
|
105
91
|
menu
|
|
106
92
|
};
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSChip
|
|
11
11
|
:label="$tr('ui.common.alert', 'Alert')"
|
|
12
|
-
:prependIcon="statusIcon"
|
|
13
|
-
:color="criticityColor"
|
|
12
|
+
:prependIcon="AlertTools.statusIcon($props.deviceAlert?.status)"
|
|
13
|
+
:color="AlertTools.criticityColor($props.deviceAlert?.criticity)"
|
|
14
14
|
/>
|
|
15
15
|
<FSCol
|
|
16
16
|
align="center-center"
|
|
17
17
|
gap="0px"
|
|
18
18
|
>
|
|
19
19
|
<FSText>
|
|
20
|
-
{{ $tr('ui.alert.status', 'Status') }} : {{ statusLabel }}
|
|
20
|
+
{{ $tr('ui.alert.status', 'Status') }} : {{ AlertTools.statusLabel($props.deviceAlert?.status) }}
|
|
21
21
|
</FSText>
|
|
22
22
|
<FSText
|
|
23
23
|
font="text-button"
|
|
24
|
-
:color="criticityColor"
|
|
24
|
+
:color="AlertTools.criticityColor($props.deviceAlert?.criticity)"
|
|
25
25
|
>
|
|
26
26
|
{{ $props.deviceAlert.label }}
|
|
27
27
|
</FSText>
|
|
@@ -46,11 +46,9 @@
|
|
|
46
46
|
<script lang="ts">
|
|
47
47
|
import { computed, defineComponent, type PropType } from "vue";
|
|
48
48
|
|
|
49
|
-
import {
|
|
50
|
-
import { type FSDeviceAlert} from "@dative-gpi/foundation-shared-components/models";
|
|
51
|
-
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
49
|
+
import { type FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
52
50
|
import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
|
|
53
|
-
import {
|
|
51
|
+
import { AlertTools } from "@dative-gpi/foundation-shared-components/tools";
|
|
54
52
|
|
|
55
53
|
import FSButton from "../FSButton.vue";
|
|
56
54
|
import FSCard from "../FSCard.vue";
|
|
@@ -81,41 +79,6 @@ export default defineComponent({
|
|
|
81
79
|
emits: ["close"],
|
|
82
80
|
setup(props) {
|
|
83
81
|
const { epochToLongTimeFormat } = useDateFormat();
|
|
84
|
-
const { $tr } = useTranslationsProvider();
|
|
85
|
-
|
|
86
|
-
const criticityColor = computed(() => {
|
|
87
|
-
switch (props.deviceAlert?.criticity) {
|
|
88
|
-
case Criticity.Error: return ColorEnum.Error;
|
|
89
|
-
case Criticity.Warning: return ColorEnum.Warning;
|
|
90
|
-
default: return ColorEnum.Primary;
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
|
|
94
|
-
const statusIcon = computed(() => {
|
|
95
|
-
switch (props.deviceAlert?.status) {
|
|
96
|
-
case AlertStatus.Pending: return "mdi-timer-outline";
|
|
97
|
-
case AlertStatus.Untriggered: return "mdi-timer-off-outline";
|
|
98
|
-
case AlertStatus.Unresolved: return "mdi-alert-circle-outline";
|
|
99
|
-
case AlertStatus.Resolved: return "mdi-check-circle-outline";
|
|
100
|
-
case AlertStatus.Expired: return "mdi-clock-outline";
|
|
101
|
-
case AlertStatus.Triggered: return "mdi-alert-circle-outline";
|
|
102
|
-
case AlertStatus.Abandoned: return "mdi-cancel"
|
|
103
|
-
default: return "";
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
const statusLabel = computed(() => {
|
|
108
|
-
switch (props.deviceAlert?.status) {
|
|
109
|
-
case AlertStatus.Pending: return $tr("ui.alert-status.pending", "Pending");
|
|
110
|
-
case AlertStatus.Untriggered: return $tr("ui.alert-status.untriggered", "Untriggered");
|
|
111
|
-
case AlertStatus.Unresolved: return $tr("ui.alert-status.unresolved", "Unresolved");
|
|
112
|
-
case AlertStatus.Resolved: return $tr("ui.alert-status.resolved", "Resolved");
|
|
113
|
-
case AlertStatus.Expired: return $tr("ui.alert-status.expired", "Expired");
|
|
114
|
-
case AlertStatus.Triggered: return $tr("ui.alert-status.triggered", "Triggered");
|
|
115
|
-
case AlertStatus.Abandoned: return $tr("ui.alert-status.abandoned", "Abandoned");
|
|
116
|
-
default: return "";
|
|
117
|
-
}
|
|
118
|
-
});
|
|
119
82
|
|
|
120
83
|
const deviceTimestamp = computed((): string => {
|
|
121
84
|
if (props.deviceAlert.sourceTimestamp) {
|
|
@@ -126,9 +89,7 @@ export default defineComponent({
|
|
|
126
89
|
|
|
127
90
|
return {
|
|
128
91
|
deviceTimestamp,
|
|
129
|
-
|
|
130
|
-
statusLabel,
|
|
131
|
-
statusIcon
|
|
92
|
+
AlertTools
|
|
132
93
|
};
|
|
133
94
|
}
|
|
134
95
|
});
|
|
@@ -23,11 +23,10 @@
|
|
|
23
23
|
:border="false"
|
|
24
24
|
>
|
|
25
25
|
<FSCol
|
|
26
|
-
padding="
|
|
26
|
+
padding="20px"
|
|
27
27
|
gap="12px"
|
|
28
28
|
>
|
|
29
29
|
<FSCol
|
|
30
|
-
padding="0 16px 0 0"
|
|
31
30
|
gap="12px"
|
|
32
31
|
>
|
|
33
32
|
<FSSpan
|
|
@@ -44,17 +43,15 @@
|
|
|
44
43
|
:editable="true"
|
|
45
44
|
@click="onToggleAll"
|
|
46
45
|
/>
|
|
47
|
-
<FSDivider
|
|
48
|
-
padding="0 8px 0 0"
|
|
49
|
-
/>
|
|
46
|
+
<FSDivider />
|
|
50
47
|
<FSSearchField
|
|
48
|
+
:hideHeader="true"
|
|
51
49
|
class="fs-filter-button-search"
|
|
52
50
|
prependInnerIcon="mdi-magnify"
|
|
53
51
|
v-model="search"
|
|
54
52
|
/>
|
|
55
53
|
</FSCol>
|
|
56
54
|
<FSFadeOut
|
|
57
|
-
padding="0 8px 0 0"
|
|
58
55
|
maxHeight="360px"
|
|
59
56
|
>
|
|
60
57
|
<FSCol
|
|
@@ -21,11 +21,10 @@
|
|
|
21
21
|
:border="false"
|
|
22
22
|
>
|
|
23
23
|
<FSCol
|
|
24
|
-
padding="
|
|
24
|
+
padding="24px"
|
|
25
25
|
gap="12px"
|
|
26
26
|
>
|
|
27
27
|
<FSCol
|
|
28
|
-
padding="0 16px 0 0"
|
|
29
28
|
gap="12px"
|
|
30
29
|
>
|
|
31
30
|
<FSSpan
|
|
@@ -35,7 +34,6 @@
|
|
|
35
34
|
</FSSpan>
|
|
36
35
|
</FSCol>
|
|
37
36
|
<FSFadeOut
|
|
38
|
-
padding="0 8px 0 0"
|
|
39
37
|
maxHeight="360px"
|
|
40
38
|
>
|
|
41
39
|
<FSCol
|
|
@@ -5,14 +5,12 @@
|
|
|
5
5
|
>
|
|
6
6
|
<FSSearchField
|
|
7
7
|
v-if="$props.searchable"
|
|
8
|
-
padding="0 12px 0 0"
|
|
9
8
|
:hideHeader="true"
|
|
10
9
|
:modelValue="actualSearch"
|
|
11
10
|
placeholder="Search"
|
|
12
11
|
@update:modelValue="onSearch"
|
|
13
12
|
/>
|
|
14
13
|
<FSFadeOut
|
|
15
|
-
padding="0 4px 0 0"
|
|
16
14
|
:maxHeight="$props.maxHeight"
|
|
17
15
|
:maskHeight="0"
|
|
18
16
|
>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
v-else-if="$props.icon"
|
|
45
45
|
:backgroundVariant="$props.iconBackgroundVariant"
|
|
46
46
|
:backgroundColor="$props.iconBackgroundColor"
|
|
47
|
-
:iconColor="$props.
|
|
47
|
+
:iconColor="$props.iconColor"
|
|
48
48
|
:border="$props.iconBorder"
|
|
49
49
|
:icon="$props.icon"
|
|
50
50
|
:size="imageSize"
|
|
@@ -112,6 +112,11 @@ export default defineComponent({
|
|
|
112
112
|
required: false,
|
|
113
113
|
default: true
|
|
114
114
|
},
|
|
115
|
+
iconColor: {
|
|
116
|
+
type: String as PropType<ColorBase>,
|
|
117
|
+
required: false,
|
|
118
|
+
default: ColorEnum.Dark
|
|
119
|
+
},
|
|
115
120
|
activeColor: {
|
|
116
121
|
type: String as PropType<ColorBase>,
|
|
117
122
|
required: false,
|