@dative-gpi/foundation-shared-components 0.0.49 → 0.0.51
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/FSAccordion.vue +3 -3
- package/components/FSAccordionPanel.vue +5 -5
- package/components/FSBadge.vue +1 -1
- package/components/FSBreadcrumbs.vue +1 -1
- package/components/FSButton.vue +5 -5
- package/components/FSCalendar.vue +22 -12
- package/components/FSCalendarTwin.vue +16 -12
- package/components/FSCard.vue +11 -2
- package/components/FSCarousel.vue +1 -1
- package/components/FSCheckbox.vue +4 -4
- package/components/FSChip.vue +4 -4
- package/components/FSClickable.vue +1 -1
- package/components/FSClock.vue +40 -48
- package/components/FSCol.vue +1 -1
- package/components/FSColor.vue +9 -7
- package/components/FSColorIcon.vue +1 -1
- package/components/FSDivider.vue +2 -2
- package/components/FSEditImage.vue +131 -0
- package/components/FSErrorToast.vue +1 -1
- package/components/FSFadeOut.vue +1 -1
- package/components/FSForm.vue +4 -4
- package/components/FSGrid.vue +1 -1
- package/components/FSImage.vue +50 -12
- package/components/FSLabel.vue +1 -1
- package/components/FSLink.vue +1 -1
- package/components/FSLoader.vue +1 -1
- package/components/FSOptionGroup.vue +3 -3
- package/components/FSOptionItem.vue +4 -4
- package/components/FSPagination.vue +1 -1
- package/components/FSRadio.vue +4 -4
- package/components/FSRadioGroup.vue +3 -3
- package/components/FSRow.vue +1 -1
- package/components/FSSlideGroup.vue +11 -11
- package/components/FSSlider.vue +4 -4
- package/components/FSSpan.vue +1 -1
- package/components/FSSubmitDialog.vue +8 -8
- package/components/FSSwitch.vue +4 -4
- package/components/FSTab.vue +4 -4
- package/components/FSTabs.vue +2 -2
- package/components/FSTag.vue +2 -2
- package/components/FSText.vue +1 -1
- package/components/FSToggleSet.vue +4 -4
- package/components/FSWindow.vue +1 -1
- package/components/FSWrapGroup.vue +2 -2
- package/components/buttons/FSButtonFile.vue +17 -10
- package/components/buttons/FSButtonFileIcon.vue +17 -10
- package/components/buttons/FSButtonFileLabel.vue +17 -10
- package/components/buttons/FSButtonFileMini.vue +17 -10
- package/components/deviceOrganisations/FSConnectivityCard.vue +2 -2
- package/components/deviceOrganisations/FSStatusCard.vue +2 -2
- package/components/deviceOrganisations/FSStatusesCarousel.vue +2 -3
- package/components/deviceOrganisations/FSStatusesRow.vue +2 -3
- package/components/deviceOrganisations/FSWorstAlertCard.vue +2 -2
- package/components/fields/FSAutocompleteField.vue +5 -5
- package/components/fields/FSColorField.vue +3 -3
- package/components/fields/FSDateField.vue +10 -9
- package/components/fields/FSDateRangeField.vue +8 -8
- package/components/fields/FSDateTimeField.vue +16 -14
- package/components/fields/FSDateTimeRangeField.vue +12 -14
- package/components/fields/FSIconField.vue +10 -10
- package/components/fields/FSNumberField.vue +2 -2
- package/components/fields/FSPasswordField.vue +4 -4
- package/components/fields/FSRichTextField.vue +82 -92
- package/components/fields/FSSearchField.vue +8 -8
- package/components/fields/FSSelectField.vue +6 -6
- package/components/fields/FSTagField.vue +4 -4
- package/components/fields/FSTextArea.vue +5 -5
- package/components/fields/FSTextField.vue +5 -5
- package/components/fields/FSTimeField.vue +15 -9
- package/components/fields/FSTimeSlotField.vue +49 -21
- package/components/lists/FSDataTableUI.vue +24 -12
- package/components/lists/FSDraggable.vue +12 -6
- package/components/lists/FSFilterButton.vue +11 -8
- package/components/lists/FSLoadDataTable.vue +1 -1
- package/components/selects/FSSelectTimeZone.vue +7 -11
- package/components/tiles/FSDeviceOrganisationTileUI.vue +3 -3
- package/components/tiles/FSGroupTileUI.vue +3 -3
- package/components/tiles/FSLoadTile.vue +1 -1
- package/components/tiles/FSTile.vue +1 -1
- package/composables/index.ts +1 -0
- package/composables/useFiles.ts +13 -0
- package/composables/useRules.ts +1 -1
- package/models/colors.ts +1 -1
- package/models/deviceStatuses.ts +1 -1
- package/models/images.ts +4 -0
- package/models/index.ts +1 -0
- package/models/rules.ts +2 -2
- package/package.json +4 -4
- package/styles/components/fs_clock.scss +3 -2
- package/styles/components/fs_edit_image.scss +3 -0
- package/styles/components/index.scss +1 -0
- package/styles/globals/overrides.scss +1 -1
package/components/FSTab.vue
CHANGED
|
@@ -50,22 +50,22 @@ export default defineComponent({
|
|
|
50
50
|
},
|
|
51
51
|
props: {
|
|
52
52
|
prependIcon: {
|
|
53
|
-
type: String
|
|
53
|
+
type: String as PropType<string | null>,
|
|
54
54
|
required: false,
|
|
55
55
|
default: null
|
|
56
56
|
},
|
|
57
57
|
label: {
|
|
58
|
-
type: String
|
|
58
|
+
type: String as PropType<string | null>,
|
|
59
59
|
required: false,
|
|
60
60
|
default: null
|
|
61
61
|
},
|
|
62
62
|
tag: {
|
|
63
|
-
type: String
|
|
63
|
+
type: String as PropType<string | null>,
|
|
64
64
|
required: false,
|
|
65
65
|
default: null
|
|
66
66
|
},
|
|
67
67
|
appendIcon: {
|
|
68
|
-
type: String
|
|
68
|
+
type: String as PropType<string | null>,
|
|
69
69
|
required: false,
|
|
70
70
|
default: null
|
|
71
71
|
},
|
package/components/FSTabs.vue
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
v-bind="$attrs"
|
|
12
12
|
>
|
|
13
13
|
<template
|
|
14
|
-
v-for="(component, index) in getChildren()"
|
|
14
|
+
v-for="(component, index) in getChildren(undefined)"
|
|
15
15
|
:key="index"
|
|
16
16
|
>
|
|
17
17
|
<component :is="component" />
|
|
@@ -46,7 +46,7 @@ export default defineComponent({
|
|
|
46
46
|
const colors = computed(() => getColors(props.color));
|
|
47
47
|
const darks = getColors(ColorEnum.Dark);
|
|
48
48
|
|
|
49
|
-
const style = computed((): { [
|
|
49
|
+
const style = computed((): { [key: string] : string | undefined } => ({
|
|
50
50
|
"--fs-group-color" : darks.base,
|
|
51
51
|
"--fs-group-disabled-color" : darks.light,
|
|
52
52
|
"--fs-group-hover-background-color": colors.value.light,
|
package/components/FSTag.vue
CHANGED
|
@@ -51,7 +51,7 @@ export default defineComponent({
|
|
|
51
51
|
},
|
|
52
52
|
props: {
|
|
53
53
|
label: {
|
|
54
|
-
type: String
|
|
54
|
+
type: String as PropType<string | null>,
|
|
55
55
|
required: false,
|
|
56
56
|
default: null
|
|
57
57
|
},
|
|
@@ -77,7 +77,7 @@ export default defineComponent({
|
|
|
77
77
|
|
|
78
78
|
const colors = computed(() => getColors(props.color));
|
|
79
79
|
|
|
80
|
-
const style = computed((): { [
|
|
80
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
81
81
|
switch (props.variant) {
|
|
82
82
|
case "standard": return {
|
|
83
83
|
"--fs-tag-background-color" : colors.value.light,
|
package/components/FSText.vue
CHANGED
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
return classNames;
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
-
const style = computed((): { [
|
|
73
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
74
74
|
switch (props.variant) {
|
|
75
75
|
case "base": return {
|
|
76
76
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
|
@@ -133,9 +133,9 @@ export default defineComponent({
|
|
|
133
133
|
default: null
|
|
134
134
|
},
|
|
135
135
|
modelValue: {
|
|
136
|
-
type: [Array, String, Number] as PropType<(string | number)[] | string | number>,
|
|
136
|
+
type: [Array, String, Number] as PropType<(string | number)[] | string | number | null>,
|
|
137
137
|
required: false,
|
|
138
|
-
default:
|
|
138
|
+
default: null
|
|
139
139
|
},
|
|
140
140
|
buttonColor: {
|
|
141
141
|
type: String as PropType<ColorBase>,
|
|
@@ -277,13 +277,13 @@ export default defineComponent({
|
|
|
277
277
|
|
|
278
278
|
const goToStart = () => {
|
|
279
279
|
if (toggleSetRef.value) {
|
|
280
|
-
toggleSetRef.value.goToStart();
|
|
280
|
+
(toggleSetRef.value as any).goToStart();
|
|
281
281
|
}
|
|
282
282
|
};
|
|
283
283
|
|
|
284
284
|
const goToEnd = () => {
|
|
285
285
|
if (toggleSetRef.value) {
|
|
286
|
-
toggleSetRef.value.goToEnd();
|
|
286
|
+
(toggleSetRef.value as any).goToEnd();
|
|
287
287
|
}
|
|
288
288
|
};
|
|
289
289
|
|
package/components/FSWindow.vue
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
v-bind="$attrs"
|
|
7
7
|
>
|
|
8
8
|
<v-slide-group-item
|
|
9
|
-
v-for="(component, index) in getChildren()"
|
|
9
|
+
v-for="(component, index) in getChildren(undefined)"
|
|
10
10
|
:key="index"
|
|
11
11
|
>
|
|
12
12
|
<component :is="component" />
|
|
@@ -43,7 +43,7 @@ export default defineComponent({
|
|
|
43
43
|
|
|
44
44
|
const wrapGroupRef = ref(null);
|
|
45
45
|
|
|
46
|
-
const style = computed((): { [
|
|
46
|
+
const style = computed((): { [key: string] : string | undefined } => ({
|
|
47
47
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
48
48
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
49
49
|
"--fs-group-color" : darks.light,
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import { defineComponent, ref } from "vue";
|
|
24
24
|
|
|
25
|
+
import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
|
|
25
26
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
27
|
|
|
27
28
|
import FSButton from "../FSButton.vue";
|
|
@@ -44,19 +45,28 @@ export default defineComponent({
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
emits: ["update:modelValue"],
|
|
47
|
-
setup(props, { emit }) {
|
|
48
|
-
const
|
|
48
|
+
setup(props, { emit }) {
|
|
49
|
+
const { read } = useFiles();
|
|
50
|
+
|
|
51
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
49
52
|
|
|
50
53
|
const clear = () => {
|
|
51
|
-
|
|
54
|
+
if (input.value) {
|
|
55
|
+
input.value.form && input.value.form.reset();
|
|
56
|
+
}
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
const onClick = () => {
|
|
55
|
-
input.value
|
|
60
|
+
if (input.value) {
|
|
61
|
+
input.value.click();
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
const onInput = () => {
|
|
59
|
-
|
|
66
|
+
if (!input.value) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const file = input.value.files && input.value.files[0];
|
|
60
70
|
if (!file) {
|
|
61
71
|
return;
|
|
62
72
|
}
|
|
@@ -65,12 +75,9 @@ export default defineComponent({
|
|
|
65
75
|
clear();
|
|
66
76
|
}
|
|
67
77
|
else {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
71
|
-
clear();
|
|
78
|
+
read(file, (content: string) => {
|
|
79
|
+
emit("update:modelValue", content);
|
|
72
80
|
});
|
|
73
|
-
reader.readAsDataURL(file);
|
|
74
81
|
}
|
|
75
82
|
};
|
|
76
83
|
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import { defineComponent, ref } from "vue";
|
|
24
24
|
|
|
25
|
+
import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
|
|
25
26
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
26
27
|
|
|
27
28
|
import FSButton from "../FSButton.vue";
|
|
@@ -44,19 +45,28 @@ export default defineComponent({
|
|
|
44
45
|
}
|
|
45
46
|
},
|
|
46
47
|
emits: ["update:modelValue"],
|
|
47
|
-
setup(props, { emit }) {
|
|
48
|
-
const
|
|
48
|
+
setup(props, { emit }) {
|
|
49
|
+
const { read } = useFiles();
|
|
50
|
+
|
|
51
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
49
52
|
|
|
50
53
|
const clear = () => {
|
|
51
|
-
|
|
54
|
+
if (input.value) {
|
|
55
|
+
input.value.form && input.value.form.reset();
|
|
56
|
+
}
|
|
52
57
|
};
|
|
53
58
|
|
|
54
59
|
const onClick = () => {
|
|
55
|
-
input.value
|
|
60
|
+
if (input.value) {
|
|
61
|
+
input.value.click();
|
|
62
|
+
}
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
const onInput = () => {
|
|
59
|
-
|
|
66
|
+
if (!input.value) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const file = input.value.files && input.value.files[0];
|
|
60
70
|
if (!file) {
|
|
61
71
|
return;
|
|
62
72
|
}
|
|
@@ -65,12 +75,9 @@ export default defineComponent({
|
|
|
65
75
|
clear();
|
|
66
76
|
}
|
|
67
77
|
else {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
71
|
-
clear();
|
|
78
|
+
read(file, (content: string) => {
|
|
79
|
+
emit("update:modelValue", content);
|
|
72
80
|
});
|
|
73
|
-
reader.readAsDataURL(file);
|
|
74
81
|
}
|
|
75
82
|
};
|
|
76
83
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { defineComponent, ref } from "vue";
|
|
23
23
|
|
|
24
|
+
import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
|
|
24
25
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
25
26
|
|
|
26
27
|
import FSButton from "../FSButton.vue";
|
|
@@ -43,19 +44,28 @@ export default defineComponent({
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(props, { emit }) {
|
|
47
|
-
const
|
|
47
|
+
setup(props, { emit }) {
|
|
48
|
+
const { read } = useFiles();
|
|
49
|
+
|
|
50
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
48
51
|
|
|
49
52
|
const clear = () => {
|
|
50
|
-
|
|
53
|
+
if (input.value) {
|
|
54
|
+
input.value.form && input.value.form.reset();
|
|
55
|
+
}
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
const onClick = () => {
|
|
54
|
-
input.value
|
|
59
|
+
if (input.value) {
|
|
60
|
+
input.value.click();
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
const onInput = () => {
|
|
58
|
-
|
|
65
|
+
if (!input.value) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const file = input.value.files && input.value.files[0];
|
|
59
69
|
if (!file) {
|
|
60
70
|
return;
|
|
61
71
|
}
|
|
@@ -64,12 +74,9 @@ export default defineComponent({
|
|
|
64
74
|
clear();
|
|
65
75
|
}
|
|
66
76
|
else {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
70
|
-
clear();
|
|
77
|
+
read(file, (content: string) => {
|
|
78
|
+
emit("update:modelValue", content);
|
|
71
79
|
});
|
|
72
|
-
reader.readAsDataURL(file);
|
|
73
80
|
}
|
|
74
81
|
};
|
|
75
82
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import { defineComponent, ref } from "vue";
|
|
23
23
|
|
|
24
|
+
import { useFiles } from "@dative-gpi/foundation-shared-components/composables";
|
|
24
25
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
25
26
|
|
|
26
27
|
import FSButton from "../FSButton.vue";
|
|
@@ -43,19 +44,28 @@ export default defineComponent({
|
|
|
43
44
|
}
|
|
44
45
|
},
|
|
45
46
|
emits: ["update:modelValue"],
|
|
46
|
-
setup(props, { emit }) {
|
|
47
|
-
const
|
|
47
|
+
setup(props, { emit }) {
|
|
48
|
+
const { read } = useFiles();
|
|
49
|
+
|
|
50
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
48
51
|
|
|
49
52
|
const clear = () => {
|
|
50
|
-
|
|
53
|
+
if (input.value) {
|
|
54
|
+
input.value.form && input.value.form.reset();
|
|
55
|
+
}
|
|
51
56
|
};
|
|
52
57
|
|
|
53
58
|
const onClick = () => {
|
|
54
|
-
input.value
|
|
59
|
+
if (input.value) {
|
|
60
|
+
input.value.click();
|
|
61
|
+
}
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
const onInput = () => {
|
|
58
|
-
|
|
65
|
+
if (!input.value) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
const file = input.value.files && input.value.files[0];
|
|
59
69
|
if (!file) {
|
|
60
70
|
return;
|
|
61
71
|
}
|
|
@@ -64,12 +74,9 @@ export default defineComponent({
|
|
|
64
74
|
clear();
|
|
65
75
|
}
|
|
66
76
|
else {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
emit("update:modelValue", fileEv.target && fileEv.target.result);
|
|
70
|
-
clear();
|
|
77
|
+
read(file, (content: string) => {
|
|
78
|
+
emit("update:modelValue", content);
|
|
71
79
|
});
|
|
72
|
-
reader.readAsDataURL(file);
|
|
73
80
|
}
|
|
74
81
|
};
|
|
75
82
|
|
|
@@ -44,7 +44,7 @@ import { computed, defineComponent, PropType } from "vue";
|
|
|
44
44
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
45
45
|
import { FSDeviceConnectivity } from "@dative-gpi/foundation-shared-components/models";
|
|
46
46
|
import { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
47
|
-
import {
|
|
47
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
48
48
|
|
|
49
49
|
import FSCard from "../FSCard.vue";
|
|
50
50
|
import FSChip from "../FSChip.vue";
|
|
@@ -70,7 +70,7 @@ export default defineComponent({
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
setup(props) {
|
|
73
|
-
const { epochToLongTimeFormat } =
|
|
73
|
+
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
74
74
|
const { $tr } = useTranslationsProvider();
|
|
75
75
|
|
|
76
76
|
const connectivityLabel = computed((): string => {
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
import { computed, defineComponent, PropType } from "vue";
|
|
55
55
|
|
|
56
56
|
import { FSDeviceStatusGroup, FSModelStatus } from "@dative-gpi/foundation-shared-components/models";
|
|
57
|
-
import {
|
|
57
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
58
58
|
|
|
59
59
|
import FSCard from "../FSCard.vue";
|
|
60
60
|
import FSChip from "../FSChip.vue";
|
|
@@ -84,7 +84,7 @@ export default defineComponent({
|
|
|
84
84
|
}
|
|
85
85
|
},
|
|
86
86
|
setup(props) {
|
|
87
|
-
const { epochToLongTimeFormat } =
|
|
87
|
+
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
88
88
|
|
|
89
89
|
const deviceTimestamp = computed((): string => {
|
|
90
90
|
if (props.statusGroup.sourceTimestamp) {
|
|
@@ -79,9 +79,8 @@ export default defineComponent({
|
|
|
79
79
|
if (modelStatus.showDefault) {
|
|
80
80
|
return [{
|
|
81
81
|
label: modelStatus.label,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
color: modelStatus.colorDefault
|
|
82
|
+
icon: modelStatus.iconDefault!,
|
|
83
|
+
color: modelStatus.colorDefault!
|
|
85
84
|
}];
|
|
86
85
|
}
|
|
87
86
|
return [];
|
|
@@ -50,9 +50,8 @@ export default defineComponent({
|
|
|
50
50
|
if (modelStatus.showDefault) {
|
|
51
51
|
return [{
|
|
52
52
|
label: modelStatus.label,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
color: modelStatus.colorDefault
|
|
53
|
+
icon: modelStatus.iconDefault!,
|
|
54
|
+
color: modelStatus.colorDefault!
|
|
56
55
|
}];
|
|
57
56
|
}
|
|
58
57
|
return [];
|
|
@@ -43,7 +43,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
|
|
|
43
43
|
|
|
44
44
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
45
45
|
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
46
|
-
import {
|
|
46
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
47
47
|
import { FSDeviceAlert } from "@dative-gpi/foundation-shared-components/models";
|
|
48
48
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
49
49
|
|
|
@@ -71,7 +71,7 @@ export default defineComponent({
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
setup(props) {
|
|
74
|
-
const { epochToLongTimeFormat } =
|
|
74
|
+
const { epochToLongTimeFormat } = useAppTimeZone();
|
|
75
75
|
const { $tr } = useTranslationsProvider();
|
|
76
76
|
|
|
77
77
|
const criticityColor = computed(() => {
|
|
@@ -90,12 +90,12 @@ export default defineComponent({
|
|
|
90
90
|
},
|
|
91
91
|
props: {
|
|
92
92
|
label: {
|
|
93
|
-
type: String
|
|
93
|
+
type: String as PropType<string | null>,
|
|
94
94
|
required: false,
|
|
95
95
|
default: null
|
|
96
96
|
},
|
|
97
97
|
description: {
|
|
98
|
-
type: String
|
|
98
|
+
type: String as PropType<string | null>,
|
|
99
99
|
required: false,
|
|
100
100
|
default: null
|
|
101
101
|
},
|
|
@@ -114,7 +114,7 @@ export default defineComponent({
|
|
|
114
114
|
default: "label"
|
|
115
115
|
},
|
|
116
116
|
modelValue: {
|
|
117
|
-
type: [Array, String] as PropType<string[] | string>,
|
|
117
|
+
type: [Array, String] as PropType<string[] | string | null>,
|
|
118
118
|
required: false,
|
|
119
119
|
default: null
|
|
120
120
|
},
|
|
@@ -139,7 +139,7 @@ export default defineComponent({
|
|
|
139
139
|
default: false
|
|
140
140
|
},
|
|
141
141
|
rules: {
|
|
142
|
-
type: Array as PropType<
|
|
142
|
+
type: Array as PropType<any[]>,
|
|
143
143
|
required: false,
|
|
144
144
|
default: () => []
|
|
145
145
|
},
|
|
@@ -169,7 +169,7 @@ export default defineComponent({
|
|
|
169
169
|
|
|
170
170
|
const innerSearch = ref("");
|
|
171
171
|
|
|
172
|
-
const style = computed((): {[
|
|
172
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
173
173
|
if (!props.editable) {
|
|
174
174
|
return {
|
|
175
175
|
"--fs-autocomplete-field-cursor" : "default",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
</template>
|
|
102
102
|
|
|
103
103
|
<script lang="ts">
|
|
104
|
-
import { computed, defineComponent, ref } from "vue";
|
|
104
|
+
import { computed, defineComponent, PropType, ref } from "vue";
|
|
105
105
|
|
|
106
106
|
import { getPercentageFromHex, getHexFromPercentage } from "@dative-gpi/foundation-shared-components/utils";
|
|
107
107
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
@@ -126,7 +126,7 @@ export default defineComponent({
|
|
|
126
126
|
},
|
|
127
127
|
props: {
|
|
128
128
|
description: {
|
|
129
|
-
type: String
|
|
129
|
+
type: String as PropType<string | null>,
|
|
130
130
|
required: false,
|
|
131
131
|
default: null
|
|
132
132
|
},
|
|
@@ -176,7 +176,7 @@ export default defineComponent({
|
|
|
176
176
|
const innerOpacity = ref(getHexFromPercentage(props.opacityValue));
|
|
177
177
|
const fullColor = ref(innerColor.value + innerOpacity.value);
|
|
178
178
|
|
|
179
|
-
const style = computed((): {[
|
|
179
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
180
180
|
if (!props.editable) {
|
|
181
181
|
return {
|
|
182
182
|
"--fs-color-field-color": lights.dark
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
</FSTextField>
|
|
40
40
|
</template>
|
|
41
41
|
<FSCard
|
|
42
|
+
padding="8px"
|
|
42
43
|
width="346px"
|
|
43
44
|
:elevation="true"
|
|
44
45
|
:border="false"
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
v-model="innerDate"
|
|
50
51
|
/>
|
|
51
52
|
<FSButton
|
|
52
|
-
|
|
53
|
+
width="100%"
|
|
53
54
|
:color="$props.color"
|
|
54
55
|
:label="$tr('ui.date-menu.validate', 'Validate')"
|
|
55
56
|
@click="onSubmit"
|
|
@@ -64,7 +65,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
|
|
|
64
65
|
|
|
65
66
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
66
67
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
67
|
-
import {
|
|
68
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
68
69
|
|
|
69
70
|
import FSTextField from "./FSTextField.vue";
|
|
70
71
|
import FSCalendar from "../FSCalendar.vue";
|
|
@@ -83,17 +84,17 @@ export default defineComponent({
|
|
|
83
84
|
},
|
|
84
85
|
props: {
|
|
85
86
|
label: {
|
|
86
|
-
type: String
|
|
87
|
+
type: String as PropType<string | null>,
|
|
87
88
|
required: false,
|
|
88
89
|
default: null
|
|
89
90
|
},
|
|
90
91
|
description: {
|
|
91
|
-
type: String
|
|
92
|
+
type: String as PropType<string | null>,
|
|
92
93
|
required: false,
|
|
93
94
|
default: null
|
|
94
95
|
},
|
|
95
96
|
modelValue: {
|
|
96
|
-
type: Number
|
|
97
|
+
type: Number as PropType<number | null>,
|
|
97
98
|
required: false,
|
|
98
99
|
default: null
|
|
99
100
|
},
|
|
@@ -113,7 +114,7 @@ export default defineComponent({
|
|
|
113
114
|
default: false
|
|
114
115
|
},
|
|
115
116
|
rules: {
|
|
116
|
-
type: Array as PropType<
|
|
117
|
+
type: Array as PropType<any[]>,
|
|
117
118
|
required: false,
|
|
118
119
|
default: () => []
|
|
119
120
|
},
|
|
@@ -126,7 +127,7 @@ export default defineComponent({
|
|
|
126
127
|
emits: ["update:modelValue"],
|
|
127
128
|
setup(props, { emit }) {
|
|
128
129
|
const {validateOn, blurred, getMessages} = useRules();
|
|
129
|
-
const { epochToLongDateFormat } =
|
|
130
|
+
const { epochToLongDateFormat } = useAppTimeZone();
|
|
130
131
|
const { getColors } = useColors();
|
|
131
132
|
|
|
132
133
|
const errors = getColors(ColorEnum.Error);
|
|
@@ -134,9 +135,9 @@ export default defineComponent({
|
|
|
134
135
|
const darks = getColors(ColorEnum.Dark);
|
|
135
136
|
|
|
136
137
|
const menu = ref(false);
|
|
137
|
-
const innerDate = ref(props.modelValue);
|
|
138
|
+
const innerDate = ref<number | null>(props.modelValue);
|
|
138
139
|
|
|
139
|
-
const style = computed((): {[
|
|
140
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
140
141
|
if (!props.editable) {
|
|
141
142
|
return {
|
|
142
143
|
"--fs-date-field-color": lights.dark
|
|
@@ -51,7 +51,7 @@ import { computed, defineComponent, PropType, ref } from "vue";
|
|
|
51
51
|
|
|
52
52
|
import { useColors, useRules } from "@dative-gpi/foundation-shared-components/composables";
|
|
53
53
|
import { ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
54
|
-
import {
|
|
54
|
+
import { useAppTimeZone } from "@dative-gpi/foundation-shared-services/composables";
|
|
55
55
|
|
|
56
56
|
import FSSubmitDialog from "../FSSubmitDialog.vue";
|
|
57
57
|
import FSCalendarTwin from "../FSCalendarTwin.vue";
|
|
@@ -68,17 +68,17 @@ export default defineComponent({
|
|
|
68
68
|
},
|
|
69
69
|
props: {
|
|
70
70
|
label: {
|
|
71
|
-
type: String
|
|
71
|
+
type: String as PropType<string | null>,
|
|
72
72
|
required: false,
|
|
73
73
|
default: null
|
|
74
74
|
},
|
|
75
75
|
description: {
|
|
76
|
-
type: String
|
|
76
|
+
type: String as PropType<string | null>,
|
|
77
77
|
required: false,
|
|
78
78
|
default: null
|
|
79
79
|
},
|
|
80
80
|
modelValue: {
|
|
81
|
-
type: Array as PropType<number[]>,
|
|
81
|
+
type: Array as PropType<number[] | null>,
|
|
82
82
|
required: false,
|
|
83
83
|
default: null
|
|
84
84
|
},
|
|
@@ -98,7 +98,7 @@ export default defineComponent({
|
|
|
98
98
|
default: false
|
|
99
99
|
},
|
|
100
100
|
rules: {
|
|
101
|
-
type: Array as PropType<
|
|
101
|
+
type: Array as PropType<any[]>,
|
|
102
102
|
required: false,
|
|
103
103
|
default: () => []
|
|
104
104
|
},
|
|
@@ -111,7 +111,7 @@ export default defineComponent({
|
|
|
111
111
|
emits: ["update:modelValue"],
|
|
112
112
|
setup(props, { emit }) {
|
|
113
113
|
const { validateOn, blurred, getMessages } = useRules();
|
|
114
|
-
const { epochToShortDateFormat } =
|
|
114
|
+
const { epochToShortDateFormat } = useAppTimeZone();
|
|
115
115
|
const { getColors } = useColors();
|
|
116
116
|
|
|
117
117
|
const errors = getColors(ColorEnum.Error);
|
|
@@ -119,9 +119,9 @@ export default defineComponent({
|
|
|
119
119
|
const darks = getColors(ColorEnum.Dark);
|
|
120
120
|
|
|
121
121
|
const dialog = ref(false);
|
|
122
|
-
const innerDateRange = ref(props.modelValue);
|
|
122
|
+
const innerDateRange = ref<number[] | null>(props.modelValue);
|
|
123
123
|
|
|
124
|
-
const style = computed((): {[
|
|
124
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
125
125
|
if (!props.editable) {
|
|
126
126
|
return {
|
|
127
127
|
"--fs-date-field-color": lights.dark
|