@dative-gpi/foundation-shared-components 0.0.50 → 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 +19 -9
- package/components/FSCalendarTwin.vue +13 -9
- 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 +38 -46
- 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 +6 -3
- 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 +13 -14
- 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 +11 -4
- package/components/buttons/FSButtonFileIcon.vue +11 -4
- package/components/buttons/FSButtonFileLabel.vue +12 -5
- package/components/buttons/FSButtonFileMini.vue +12 -5
- package/components/deviceOrganisations/FSStatusesCarousel.vue +2 -3
- package/components/deviceOrganisations/FSStatusesRow.vue +2 -3
- package/components/fields/FSAutocompleteField.vue +5 -5
- package/components/fields/FSColorField.vue +3 -3
- package/components/fields/FSDateField.vue +8 -7
- package/components/fields/FSDateRangeField.vue +6 -6
- package/components/fields/FSDateTimeField.vue +14 -12
- package/components/fields/FSDateTimeRangeField.vue +10 -12
- 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 +1 -1
- 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 +2 -2
- 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/useRules.ts +1 -1
- package/models/colors.ts +1 -1
- package/models/deviceStatuses.ts +1 -1
- package/package.json +4 -4
- package/styles/components/fs_clock.scss +3 -2
- package/styles/globals/overrides.scss +1 -1
package/components/FSImage.vue
CHANGED
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
|
|
36
36
|
<script lang="ts">
|
|
37
|
-
import { computed, defineComponent, ref, watch } from "vue";
|
|
37
|
+
import { computed, defineComponent, PropType, ref, watch } from "vue";
|
|
38
38
|
import { decode, isBlurhashValid } from "blurhash";
|
|
39
39
|
|
|
40
40
|
import { useImageBlurHash } from "@dative-gpi/foundation-shared-services/composables";
|
|
@@ -50,12 +50,12 @@ export default defineComponent({
|
|
|
50
50
|
},
|
|
51
51
|
props: {
|
|
52
52
|
imageId: {
|
|
53
|
-
type:
|
|
53
|
+
type: String as PropType<string | null>,
|
|
54
54
|
required: false,
|
|
55
55
|
default: null
|
|
56
56
|
},
|
|
57
57
|
imageB64: {
|
|
58
|
-
type: String
|
|
58
|
+
type: String as PropType<string | null>,
|
|
59
59
|
required: false,
|
|
60
60
|
default: null
|
|
61
61
|
},
|
|
@@ -75,7 +75,7 @@ export default defineComponent({
|
|
|
75
75
|
default: null
|
|
76
76
|
},
|
|
77
77
|
aspectRatio: {
|
|
78
|
-
type: String
|
|
78
|
+
type: String as PropType<string | null>,
|
|
79
79
|
required: false,
|
|
80
80
|
default: null
|
|
81
81
|
},
|
|
@@ -88,8 +88,8 @@ export default defineComponent({
|
|
|
88
88
|
setup(props) {
|
|
89
89
|
const { get: fetchBlurHash, entity: blurHash } = useImageBlurHash();
|
|
90
90
|
|
|
91
|
-
const imageRef = ref(null);
|
|
92
|
-
const canvasRef = ref(null);
|
|
91
|
+
const imageRef = ref<HTMLFormElement | null>(null);
|
|
92
|
+
const canvasRef = ref<HTMLCanvasElement | null>(null);
|
|
93
93
|
|
|
94
94
|
const signatures = ref<{ [key: string]: string }>({
|
|
95
95
|
JVBERi0 : "application/pdf",
|
|
@@ -99,7 +99,7 @@ export default defineComponent({
|
|
|
99
99
|
"/9j/" : "image/jpg",
|
|
100
100
|
});
|
|
101
101
|
|
|
102
|
-
const style = computed((): { [
|
|
102
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
103
103
|
return {
|
|
104
104
|
"--fs-image-border-radius" : sizeToVar(props.borderRadius),
|
|
105
105
|
"--fs-image-blurhash-opacity": blurHash.value ? "1" : "0"
|
|
@@ -144,7 +144,7 @@ export default defineComponent({
|
|
|
144
144
|
return undefined;
|
|
145
145
|
});
|
|
146
146
|
|
|
147
|
-
const source = computed((): string |
|
|
147
|
+
const source = computed((): string | undefined => {
|
|
148
148
|
if (props.imageId) {
|
|
149
149
|
return IMAGE_RAW_URL(props.imageId);
|
|
150
150
|
}
|
|
@@ -153,17 +153,16 @@ export default defineComponent({
|
|
|
153
153
|
return `${imageType.value},${imageData.value}`;
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
return null;
|
|
157
156
|
});
|
|
158
157
|
|
|
159
|
-
const imageData = computed((): string => {
|
|
158
|
+
const imageData = computed((): string | null => {
|
|
160
159
|
if (props.imageB64 && props.imageB64.includes(",")) {
|
|
161
160
|
return props.imageB64.split(",")[1];
|
|
162
161
|
}
|
|
163
162
|
return props.imageB64;
|
|
164
163
|
});
|
|
165
164
|
|
|
166
|
-
const imageType = computed((): string => {
|
|
165
|
+
const imageType = computed((): string | null => {
|
|
167
166
|
if (props.imageB64 && props.imageB64.includes(",")) {
|
|
168
167
|
return props.imageB64.split(",")[0];
|
|
169
168
|
}
|
|
@@ -174,7 +173,7 @@ export default defineComponent({
|
|
|
174
173
|
}
|
|
175
174
|
}
|
|
176
175
|
}
|
|
177
|
-
return
|
|
176
|
+
return null;
|
|
178
177
|
});
|
|
179
178
|
|
|
180
179
|
const onError = (): void => {
|
|
@@ -188,8 +187,8 @@ export default defineComponent({
|
|
|
188
187
|
if (blurHash.value && isBlurhashValid(blurHash.value.blurHash).result) {
|
|
189
188
|
const ctx = canvasRef.value.getContext("2d");
|
|
190
189
|
if (ctx) {
|
|
191
|
-
const pixels = decode(blurHash.value.blurHash, imageRef.value.$el.clientWidth, imageRef.value.$el.clientHeight);
|
|
192
|
-
const imageData = ctx.createImageData(imageRef.value.$el.clientWidth, imageRef.value.$el.clientHeight);
|
|
190
|
+
const pixels = decode(blurHash.value.blurHash, (imageRef.value as any).$el.clientWidth, (imageRef.value as any).$el.clientHeight);
|
|
191
|
+
const imageData = ctx.createImageData((imageRef.value as any).$el.clientWidth, (imageRef.value as any).$el.clientHeight);
|
|
193
192
|
imageData.data.set(pixels);
|
|
194
193
|
ctx.putImageData(imageData, 0, 0);
|
|
195
194
|
}
|
package/components/FSLabel.vue
CHANGED
|
@@ -80,7 +80,7 @@ export default defineComponent({
|
|
|
80
80
|
return classNames;
|
|
81
81
|
});
|
|
82
82
|
|
|
83
|
-
const style = computed((): { [
|
|
83
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
84
84
|
switch (props.variant) {
|
|
85
85
|
case "base": return {
|
|
86
86
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
package/components/FSLink.vue
CHANGED
|
@@ -79,7 +79,7 @@ export default defineComponent({
|
|
|
79
79
|
return classNames;
|
|
80
80
|
});
|
|
81
81
|
|
|
82
|
-
const style = computed((): { [
|
|
82
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
83
83
|
switch (props.variant) {
|
|
84
84
|
case "base": return {
|
|
85
85
|
"--fs-span-line-clamp": props.lineClamp.toString(),
|
package/components/FSLoader.vue
CHANGED
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
48
48
|
|
|
49
49
|
const backgrounds = getColors(ColorEnum.Background);
|
|
50
50
|
|
|
51
|
-
const style = computed((): {[
|
|
51
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
52
52
|
return {
|
|
53
53
|
"--fs-loader-background-color": backgrounds.base,
|
|
54
54
|
"--fs-loader-border-radius" : ["chip"].includes(props.variant) ? "50px" : sizeToVar(props.borderRadius),
|
|
@@ -146,9 +146,9 @@ export default defineComponent({
|
|
|
146
146
|
default: null
|
|
147
147
|
},
|
|
148
148
|
modelValue: {
|
|
149
|
-
type: [Array, String, Number] as PropType<(string | number)[] | string | number>,
|
|
149
|
+
type: [Array, String, Number] as PropType<(string | number)[] | string | number | null>,
|
|
150
150
|
required: false,
|
|
151
|
-
default:
|
|
151
|
+
default: null
|
|
152
152
|
},
|
|
153
153
|
optionColor: {
|
|
154
154
|
type: String as PropType<ColorBase>,
|
|
@@ -195,7 +195,7 @@ export default defineComponent({
|
|
|
195
195
|
|
|
196
196
|
const firstChild = getFirstChild("item");
|
|
197
197
|
|
|
198
|
-
const style = computed((): { [
|
|
198
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
199
199
|
return {
|
|
200
200
|
"--fs-option-group-border-size" : props.border ? "1px" : "0",
|
|
201
201
|
"--fs-option-group-border-radius": sizeToVar(props.borderRadius),
|
|
@@ -63,22 +63,22 @@ export default defineComponent({
|
|
|
63
63
|
},
|
|
64
64
|
props: {
|
|
65
65
|
prependIcon: {
|
|
66
|
-
type: String
|
|
66
|
+
type: String as PropType<string | null>,
|
|
67
67
|
required: false,
|
|
68
68
|
default: null
|
|
69
69
|
},
|
|
70
70
|
label: {
|
|
71
|
-
type:
|
|
71
|
+
type: String as PropType<string | null>,
|
|
72
72
|
required: false,
|
|
73
73
|
default: null
|
|
74
74
|
},
|
|
75
75
|
appendIcon: {
|
|
76
|
-
type: String
|
|
76
|
+
type: String as PropType<string | null>,
|
|
77
77
|
required: false,
|
|
78
78
|
default: null
|
|
79
79
|
},
|
|
80
80
|
icon: {
|
|
81
|
-
type: String
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
82
|
required: false,
|
|
83
83
|
default: null
|
|
84
84
|
},
|
|
@@ -63,7 +63,7 @@ export default defineComponent({
|
|
|
63
63
|
const lights = getColors(ColorEnum.Light);
|
|
64
64
|
const darks = getColors(ColorEnum.Dark);
|
|
65
65
|
|
|
66
|
-
const style = computed((): {[
|
|
66
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
67
67
|
switch (props.color) {
|
|
68
68
|
case ColorEnum.Light:
|
|
69
69
|
case ColorEnum.Dark: return {
|
package/components/FSRadio.vue
CHANGED
|
@@ -73,12 +73,12 @@ export default defineComponent({
|
|
|
73
73
|
},
|
|
74
74
|
props: {
|
|
75
75
|
label: {
|
|
76
|
-
type: String
|
|
76
|
+
type: String as PropType<string | null>,
|
|
77
77
|
required: false,
|
|
78
78
|
default: null
|
|
79
79
|
},
|
|
80
80
|
description: {
|
|
81
|
-
type: String
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
82
|
required: false,
|
|
83
83
|
default: null
|
|
84
84
|
},
|
|
@@ -97,7 +97,7 @@ export default defineComponent({
|
|
|
97
97
|
default: ColorEnum.Primary
|
|
98
98
|
},
|
|
99
99
|
rules: {
|
|
100
|
-
type: Array as PropType<
|
|
100
|
+
type: Array as PropType<any[]>,
|
|
101
101
|
required: false,
|
|
102
102
|
default: () => []
|
|
103
103
|
},
|
|
@@ -122,7 +122,7 @@ export default defineComponent({
|
|
|
122
122
|
const lights = getColors(ColorEnum.Light);
|
|
123
123
|
const darks = getColors(ColorEnum.Dark);
|
|
124
124
|
|
|
125
|
-
const style = computed((): {[
|
|
125
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
126
126
|
if (!props.editable) {
|
|
127
127
|
return {
|
|
128
128
|
"--fs-radio-cursor" : "default",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol width="hug">
|
|
3
3
|
<FSRadio
|
|
4
|
-
v-for="item in $props.values"
|
|
5
|
-
:key="
|
|
4
|
+
v-for="(item, index) in $props.values"
|
|
5
|
+
:key="index"
|
|
6
6
|
:label="item.label"
|
|
7
7
|
:description="item.description"
|
|
8
8
|
:selected="isSelected(item.value)"
|
|
@@ -30,7 +30,7 @@ export default defineComponent({
|
|
|
30
30
|
},
|
|
31
31
|
props: {
|
|
32
32
|
values: {
|
|
33
|
-
type: Array as PropType<{ value:
|
|
33
|
+
type: Array as PropType<{ value: string | boolean | number, label?: string, description?: string }[]>,
|
|
34
34
|
required: true,
|
|
35
35
|
default: false
|
|
36
36
|
},
|
package/components/FSRow.vue
CHANGED
|
@@ -48,7 +48,7 @@ export default defineComponent({
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
setup(props) {
|
|
51
|
-
const style = computed((): {[
|
|
51
|
+
const style = computed((): { [key: string] : string | undefined } => ({
|
|
52
52
|
"--fs-row-flex-wrap": props.wrap ? "wrap" : "nowrap",
|
|
53
53
|
"--fs-row-padding" : sizeToVar(props.padding),
|
|
54
54
|
"--fs-row-gap" : sizeToVar(props.gap),
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
</template>
|
|
21
21
|
<template #default>
|
|
22
22
|
<v-slide-group-item
|
|
23
|
-
v-for="(component, index) in getChildren()"
|
|
23
|
+
v-for="(component, index) in getChildren(undefined)"
|
|
24
24
|
:key="index"
|
|
25
25
|
>
|
|
26
26
|
<component :is="component" />
|
|
@@ -87,9 +87,9 @@ export default defineComponent({
|
|
|
87
87
|
|
|
88
88
|
const darks = getColors(ColorEnum.Dark);
|
|
89
89
|
|
|
90
|
-
const slideGroupRef = ref(null);
|
|
90
|
+
const slideGroupRef = ref<HTMLElement | null>(null);
|
|
91
91
|
|
|
92
|
-
const style = computed((): { [
|
|
92
|
+
const style = computed((): { [key: string] : string | undefined } => ({
|
|
93
93
|
"--fs-group-arrows-width": props.dash ? "52px" : "32px",
|
|
94
94
|
"--fs-group-padding" : sizeToVar(props.padding),
|
|
95
95
|
"--fs-group-gap" : sizeToVar(props.gap),
|
|
@@ -99,31 +99,31 @@ export default defineComponent({
|
|
|
99
99
|
|
|
100
100
|
const goToStart = () => {
|
|
101
101
|
if (slideGroupRef.value) {
|
|
102
|
-
slideGroupRef.value.scrollOffset = 0;
|
|
102
|
+
(slideGroupRef.value as any).scrollOffset = 0;
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
const goToPrev = () => {
|
|
107
107
|
if (slideGroupRef.value) {
|
|
108
|
-
slideGroupRef.value.scrollOffset = Math.max(0, slideGroupRef.value.scrollOffset - props.speed);
|
|
108
|
+
(slideGroupRef.value as any).scrollOffset = Math.max(0, (slideGroupRef.value as any).scrollOffset - props.speed);
|
|
109
109
|
}
|
|
110
110
|
};
|
|
111
111
|
|
|
112
112
|
const goToEnd = () => {
|
|
113
113
|
if (slideGroupRef.value) {
|
|
114
|
-
const contentSize = slideGroupRef.value.$el.children[1].children[0].clientWidth;
|
|
115
|
-
const containerSize = slideGroupRef.value.$el.clientWidth;
|
|
114
|
+
const contentSize = (slideGroupRef.value as any).$el.children[1].children[0].clientWidth;
|
|
115
|
+
const containerSize = (slideGroupRef.value as any).$el.clientWidth;
|
|
116
116
|
const arrowsOffset = props.dash ? 104 : 64;
|
|
117
|
-
slideGroupRef.value.scrollOffset = (contentSize - containerSize + arrowsOffset);
|
|
117
|
+
(slideGroupRef.value as any).scrollOffset = (contentSize - containerSize + arrowsOffset);
|
|
118
118
|
}
|
|
119
119
|
};
|
|
120
120
|
|
|
121
121
|
const goToNext = () => {
|
|
122
122
|
if (slideGroupRef.value) {
|
|
123
|
-
const contentSize = slideGroupRef.value.$el.children[1].children[0].clientWidth;
|
|
124
|
-
const containerSize = slideGroupRef.value.$el.clientWidth;
|
|
123
|
+
const contentSize = (slideGroupRef.value as any).$el.children[1].children[0].clientWidth;
|
|
124
|
+
const containerSize = (slideGroupRef.value as any).$el.clientWidth;
|
|
125
125
|
const arrowsOffset = props.dash ? 104 : 64;
|
|
126
|
-
slideGroupRef.value.scrollOffset = Math.min(contentSize - containerSize + arrowsOffset, slideGroupRef.value.scrollOffset + props.speed);
|
|
126
|
+
(slideGroupRef.value as any).scrollOffset = Math.min(contentSize - containerSize + arrowsOffset, (slideGroupRef.value as any).scrollOffset + props.speed);
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
129
|
|
package/components/FSSlider.vue
CHANGED
|
@@ -70,17 +70,17 @@ export default defineComponent({
|
|
|
70
70
|
},
|
|
71
71
|
props: {
|
|
72
72
|
label: {
|
|
73
|
-
type: String
|
|
73
|
+
type: String as PropType<string | null>,
|
|
74
74
|
required: false,
|
|
75
75
|
default: null
|
|
76
76
|
},
|
|
77
77
|
description: {
|
|
78
|
-
type: String
|
|
78
|
+
type: String as PropType<string | null>,
|
|
79
79
|
required: false,
|
|
80
80
|
default: null
|
|
81
81
|
},
|
|
82
82
|
modelValue: {
|
|
83
|
-
type: [String, Number]
|
|
83
|
+
type: [String, Number] as PropType<string | number | null>,
|
|
84
84
|
required: false,
|
|
85
85
|
default: null
|
|
86
86
|
},
|
|
@@ -107,7 +107,7 @@ export default defineComponent({
|
|
|
107
107
|
const lights = getColors(ColorEnum.Light);
|
|
108
108
|
const darks = getColors(ColorEnum.Dark);
|
|
109
109
|
|
|
110
|
-
const style = computed((): {[
|
|
110
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
111
111
|
if (!props.editable) {
|
|
112
112
|
return {
|
|
113
113
|
"--fs-slider-cursor" : "default",
|
package/components/FSSpan.vue
CHANGED
|
@@ -56,7 +56,7 @@ export default defineComponent({
|
|
|
56
56
|
return classNames;
|
|
57
57
|
});
|
|
58
58
|
|
|
59
|
-
const style = computed((): {[
|
|
59
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
60
60
|
return {
|
|
61
61
|
"--fs-span-line-clamp": props.lineClamp.toString()
|
|
62
62
|
};
|
|
@@ -78,27 +78,27 @@ export default defineComponent({
|
|
|
78
78
|
default: "auto"
|
|
79
79
|
},
|
|
80
80
|
title: {
|
|
81
|
-
type: String
|
|
81
|
+
type: String as PropType<string | null>,
|
|
82
82
|
required: false,
|
|
83
83
|
default: null
|
|
84
84
|
},
|
|
85
85
|
subtitle: {
|
|
86
|
-
type: String
|
|
86
|
+
type: String as PropType<string | null>,
|
|
87
87
|
required: false,
|
|
88
88
|
default: null
|
|
89
89
|
},
|
|
90
90
|
leftButtonPrependIcon: {
|
|
91
|
-
type: String
|
|
91
|
+
type: String as PropType<string | null>,
|
|
92
92
|
required: false,
|
|
93
93
|
default: null
|
|
94
94
|
},
|
|
95
95
|
leftButtonLabel: {
|
|
96
|
-
type: String
|
|
96
|
+
type: String as PropType<string | null>,
|
|
97
97
|
required: false,
|
|
98
98
|
default: null
|
|
99
99
|
},
|
|
100
100
|
leftButtonAppendIcon: {
|
|
101
|
-
type: String
|
|
101
|
+
type: String as PropType<string | null>,
|
|
102
102
|
required: false,
|
|
103
103
|
default: null
|
|
104
104
|
},
|
|
@@ -108,17 +108,17 @@ export default defineComponent({
|
|
|
108
108
|
default: "standard"
|
|
109
109
|
},
|
|
110
110
|
rightButtonPrependIcon: {
|
|
111
|
-
type: String
|
|
111
|
+
type: String as PropType<string | null>,
|
|
112
112
|
required: false,
|
|
113
113
|
default: null
|
|
114
114
|
},
|
|
115
115
|
rightButtonLabel: {
|
|
116
|
-
type: String
|
|
116
|
+
type: String as PropType<string | null>,
|
|
117
117
|
required: false,
|
|
118
118
|
default: null
|
|
119
119
|
},
|
|
120
120
|
rightButtonAppendIcon: {
|
|
121
|
-
type: String
|
|
121
|
+
type: String as PropType<string | null>,
|
|
122
122
|
required: false,
|
|
123
123
|
default: null
|
|
124
124
|
},
|
package/components/FSSwitch.vue
CHANGED
|
@@ -62,12 +62,12 @@ export default defineComponent({
|
|
|
62
62
|
},
|
|
63
63
|
props: {
|
|
64
64
|
label: {
|
|
65
|
-
type: String
|
|
65
|
+
type: String as PropType<string | null>,
|
|
66
66
|
required: false,
|
|
67
67
|
default: null
|
|
68
68
|
},
|
|
69
69
|
description: {
|
|
70
|
-
type: String
|
|
70
|
+
type: String as PropType<string | null>,
|
|
71
71
|
required: false,
|
|
72
72
|
default: null
|
|
73
73
|
},
|
|
@@ -82,7 +82,7 @@ export default defineComponent({
|
|
|
82
82
|
default: ColorEnum.Primary
|
|
83
83
|
},
|
|
84
84
|
rules: {
|
|
85
|
-
type: Array as PropType<
|
|
85
|
+
type: Array as PropType<any[]>,
|
|
86
86
|
required: false,
|
|
87
87
|
default: () => []
|
|
88
88
|
},
|
|
@@ -108,7 +108,7 @@ export default defineComponent({
|
|
|
108
108
|
const lights = getColors(ColorEnum.Light);
|
|
109
109
|
const darks = getColors(ColorEnum.Dark);
|
|
110
110
|
|
|
111
|
-
const style = computed((): { [
|
|
111
|
+
const style = computed((): { [key: string] : string | undefined } => {
|
|
112
112
|
if (!props.editable) {
|
|
113
113
|
return {
|
|
114
114
|
"--fs-switch-translate-x": props.modelValue ? "8px" : "-8px",
|
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,
|
|
@@ -48,18 +48,25 @@ export default defineComponent({
|
|
|
48
48
|
setup(props, { emit }) {
|
|
49
49
|
const { read } = useFiles();
|
|
50
50
|
|
|
51
|
-
const input = ref(null);
|
|
51
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
52
52
|
|
|
53
53
|
const clear = () => {
|
|
54
|
-
|
|
54
|
+
if (input.value) {
|
|
55
|
+
input.value.form && input.value.form.reset();
|
|
56
|
+
}
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
const onClick = () => {
|
|
58
|
-
input.value
|
|
60
|
+
if (input.value) {
|
|
61
|
+
input.value.click();
|
|
62
|
+
}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
const onInput = () => {
|
|
62
|
-
|
|
66
|
+
if (!input.value) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const file = input.value.files && input.value.files[0];
|
|
63
70
|
if (!file) {
|
|
64
71
|
return;
|
|
65
72
|
}
|
|
@@ -48,18 +48,25 @@ export default defineComponent({
|
|
|
48
48
|
setup(props, { emit }) {
|
|
49
49
|
const { read } = useFiles();
|
|
50
50
|
|
|
51
|
-
const input = ref(null);
|
|
51
|
+
const input = ref<HTMLFormElement | null>(null);
|
|
52
52
|
|
|
53
53
|
const clear = () => {
|
|
54
|
-
|
|
54
|
+
if (input.value) {
|
|
55
|
+
input.value.form && input.value.form.reset();
|
|
56
|
+
}
|
|
55
57
|
};
|
|
56
58
|
|
|
57
59
|
const onClick = () => {
|
|
58
|
-
input.value
|
|
60
|
+
if (input.value) {
|
|
61
|
+
input.value.click();
|
|
62
|
+
}
|
|
59
63
|
}
|
|
60
64
|
|
|
61
65
|
const onInput = () => {
|
|
62
|
-
|
|
66
|
+
if (!input.value) {
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
const file = input.value.files && input.value.files[0];
|
|
63
70
|
if (!file) {
|
|
64
71
|
return;
|
|
65
72
|
}
|