@dative-gpi/foundation-shared-components 0.0.13 → 0.0.15
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/FSCalendarTwin.vue +2 -0
- package/components/FSClock.vue +7 -15
- package/components/FSCol.vue +2 -2
- package/components/FSSlideGroup.vue +10 -11
- package/components/FSWrapGroup.vue +10 -11
- package/components/fields/FSAutocompleteField.vue +8 -2
- package/components/fields/FSColorField.vue +89 -78
- package/components/fields/FSDateField.vue +1 -1
- package/components/fields/FSDateRangeField.vue +1 -5
- package/components/fields/FSDateTimeField.vue +1 -1
- package/components/fields/FSDateTimeRangeField.vue +23 -15
- package/components/fields/FSIconField.vue +1 -5
- package/components/fields/FSNumberField.vue +17 -3
- package/components/fields/FSRichTextField.vue +10 -8
- package/components/fields/FSTagField.vue +3 -3
- package/components/fields/FSTextArea.vue +2 -2
- package/components/fields/FSTimeField.vue +118 -20
- package/components/fields/FSTimeSlotField.vue +59 -53
- package/components/lists/FSDataTableUI.vue +8 -10
- package/package.json +4 -4
- package/styles/components/fs_autocomplete_field.scss +3 -60
- package/styles/components/fs_color_field.scss +4 -0
- package/styles/components/fs_data_table.scss +7 -2
- package/styles/components/fs_rich_text_field.scss +1 -1
- package/styles/components/fs_select_field.scss +3 -4
- package/styles/components/fs_switch.scss +4 -4
- package/styles/components/fs_text_area.scss +2 -0
- package/styles/components/fs_text_field.scss +1 -0
- package/styles/components/fs_time_field.scss +13 -0
- package/styles/components/fs_timeslot_field.scss +4 -67
- package/styles/globals/overrides.scss +8 -6
- package/styles/main.scss +1 -3
- package/utils/icons.ts +88 -2
- package/aliases/FSButton.ts +0 -116
- package/aliases/index.ts +0 -1
- package/pages/FSExternalIdentityButton.vue +0 -64
- package/pages/FSLanguageSetter.vue +0 -140
- package/pages/FSLoginPage.vue +0 -253
- package/styles/pages/fs_language_setter.scss +0 -55
- package/styles/pages/index.scss +0 -1
package/components/FSClock.vue
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
>
|
|
6
6
|
<FSRow
|
|
7
7
|
align="center-center"
|
|
8
|
-
|
|
8
|
+
:wrap="false"
|
|
9
9
|
>
|
|
10
|
-
<
|
|
10
|
+
<FSText
|
|
11
11
|
v-if="$props.reminder"
|
|
12
12
|
>
|
|
13
13
|
{{ epochToLongDateFormat($props.date) }}
|
|
14
|
-
</
|
|
14
|
+
</FSText>
|
|
15
15
|
<v-spacer v-if="$props.reminder" />
|
|
16
16
|
<FSRow
|
|
17
17
|
align="center-center"
|
|
@@ -43,12 +43,8 @@
|
|
|
43
43
|
<FSCol
|
|
44
44
|
v-if="$props.slider"
|
|
45
45
|
>
|
|
46
|
-
<FSSpan
|
|
47
|
-
font="text-overline"
|
|
48
|
-
>
|
|
49
|
-
{{ $tr("ui.clock.hours", "Hours") }}
|
|
50
|
-
</FSSpan>
|
|
51
46
|
<FSSlider
|
|
47
|
+
:label="$tr('ui.clock.hours', 'Hours')"
|
|
52
48
|
:readonly="!$props.editable"
|
|
53
49
|
:color="$props.color"
|
|
54
50
|
:step="1"
|
|
@@ -60,12 +56,8 @@
|
|
|
60
56
|
<FSCol
|
|
61
57
|
v-if="$props.slider"
|
|
62
58
|
>
|
|
63
|
-
<FSSpan
|
|
64
|
-
font="text-overline"
|
|
65
|
-
>
|
|
66
|
-
{{ $tr("ui.clock.minutes", "Minutes") }}
|
|
67
|
-
</FSSpan>
|
|
68
59
|
<FSSlider
|
|
60
|
+
:label="$tr('ui.clock.minutes', 'Minutes')"
|
|
69
61
|
:readonly="!$props.editable"
|
|
70
62
|
:color="$props.color"
|
|
71
63
|
:step="1"
|
|
@@ -85,7 +77,7 @@ import { useTimeZone } from "@dative-gpi/foundation-shared-services/composables"
|
|
|
85
77
|
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
86
78
|
|
|
87
79
|
import FSSlider from "./FSSlider.vue";
|
|
88
|
-
import
|
|
80
|
+
import FSText from "./FSText.vue";
|
|
89
81
|
import FSCol from "./FSCol.vue";
|
|
90
82
|
import FSRow from "./FSRow.vue";
|
|
91
83
|
|
|
@@ -93,7 +85,7 @@ export default defineComponent({
|
|
|
93
85
|
name: "FSClock",
|
|
94
86
|
components: {
|
|
95
87
|
FSSlider,
|
|
96
|
-
|
|
88
|
+
FSText,
|
|
97
89
|
FSCol,
|
|
98
90
|
FSRow
|
|
99
91
|
},
|
package/components/FSCol.vue
CHANGED
|
@@ -19,6 +19,7 @@ import { computed, defineComponent } from "vue";
|
|
|
19
19
|
|
|
20
20
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
21
21
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
22
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
22
23
|
|
|
23
24
|
export default defineComponent({
|
|
24
25
|
name: "FSSlideGroup",
|
|
@@ -26,12 +27,12 @@ export default defineComponent({
|
|
|
26
27
|
padding: {
|
|
27
28
|
type: [String, Number],
|
|
28
29
|
required: false,
|
|
29
|
-
default: 0
|
|
30
|
+
default: "0"
|
|
30
31
|
},
|
|
31
32
|
gap: {
|
|
32
|
-
type: Number,
|
|
33
|
+
type: [String, Number],
|
|
33
34
|
required: false,
|
|
34
|
-
default:
|
|
35
|
+
default: "8px"
|
|
35
36
|
}
|
|
36
37
|
},
|
|
37
38
|
setup(props) {
|
|
@@ -40,14 +41,12 @@ export default defineComponent({
|
|
|
40
41
|
|
|
41
42
|
const darks = getColors(ColorEnum.Dark);
|
|
42
43
|
|
|
43
|
-
const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
50
|
-
});
|
|
44
|
+
const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => ({
|
|
45
|
+
"--fs-group-padding" : sizeToVar(props.padding),
|
|
46
|
+
"--fs-group-gap" : sizeToVar(props.gap),
|
|
47
|
+
"--fs-group-color" : darks.light,
|
|
48
|
+
"--fs-group-hover-color": darks.dark
|
|
49
|
+
}));
|
|
51
50
|
|
|
52
51
|
return {
|
|
53
52
|
style,
|
|
@@ -18,6 +18,7 @@ import { computed, defineComponent } from "vue";
|
|
|
18
18
|
|
|
19
19
|
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
20
20
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
21
|
+
import { sizeToVar } from "@dative-gpi/foundation-shared-components/utils";
|
|
21
22
|
|
|
22
23
|
export default defineComponent({
|
|
23
24
|
name: "FSWrapGroup",
|
|
@@ -25,12 +26,12 @@ export default defineComponent({
|
|
|
25
26
|
padding: {
|
|
26
27
|
type: [String, Number],
|
|
27
28
|
required: false,
|
|
28
|
-
default: 0
|
|
29
|
+
default: "0"
|
|
29
30
|
},
|
|
30
31
|
gap: {
|
|
31
|
-
type: Number,
|
|
32
|
+
type: [String, Number],
|
|
32
33
|
required: false,
|
|
33
|
-
default:
|
|
34
|
+
default: "8px"
|
|
34
35
|
}
|
|
35
36
|
},
|
|
36
37
|
setup(props) {
|
|
@@ -39,14 +40,12 @@ export default defineComponent({
|
|
|
39
40
|
|
|
40
41
|
const darks = getColors(ColorEnum.Dark);
|
|
41
42
|
|
|
42
|
-
const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
});
|
|
43
|
+
const style = computed((): { [code: string]: string } & Partial<CSSStyleDeclaration> => ({
|
|
44
|
+
"--fs-group-padding" : sizeToVar(props.padding),
|
|
45
|
+
"--fs-group-gap" : sizeToVar(props.gap),
|
|
46
|
+
"--fs-group-color" : darks.light,
|
|
47
|
+
"--fs-group-hover-color": darks.dark
|
|
48
|
+
}));
|
|
50
49
|
|
|
51
50
|
return {
|
|
52
51
|
style,
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
:rules="$props.rules"
|
|
49
49
|
:validateOn="validateOn"
|
|
50
50
|
:modelValue="$props.modelValue"
|
|
51
|
-
@update:modelValue="
|
|
51
|
+
@update:modelValue="onUpdate"
|
|
52
52
|
@blur="blurred = true"
|
|
53
53
|
v-model:search="innerSearch"
|
|
54
54
|
v-bind="$attrs"
|
|
@@ -192,6 +192,11 @@ export default defineComponent({
|
|
|
192
192
|
|
|
193
193
|
const messages = computed((): string[] => props.messages ?? getMessages(props.modelValue, props.rules));
|
|
194
194
|
|
|
195
|
+
const onUpdate = (value: string[] | string) => {
|
|
196
|
+
emit('update:modelValue', value);
|
|
197
|
+
innerSearch.value = "";
|
|
198
|
+
};
|
|
199
|
+
|
|
195
200
|
watch(innerSearch, () => {
|
|
196
201
|
emit("update:search", innerSearch.value);
|
|
197
202
|
});
|
|
@@ -203,7 +208,8 @@ export default defineComponent({
|
|
|
203
208
|
slots,
|
|
204
209
|
style,
|
|
205
210
|
classes,
|
|
206
|
-
innerSearch
|
|
211
|
+
innerSearch,
|
|
212
|
+
onUpdate
|
|
207
213
|
};
|
|
208
214
|
}
|
|
209
215
|
});
|
|
@@ -5,68 +5,80 @@
|
|
|
5
5
|
@update:modelValue="(value) => menu = value"
|
|
6
6
|
>
|
|
7
7
|
<template #activator="{ props }">
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<FSTextField
|
|
13
|
-
class="fs-color-field"
|
|
14
|
-
:hideHeader="$props.hideHeader"
|
|
15
|
-
:required="$props.required"
|
|
16
|
-
:editable="$props.editable"
|
|
17
|
-
:clearable="false"
|
|
18
|
-
:readonly="true"
|
|
19
|
-
:modelValue="innerColor"
|
|
20
|
-
v-bind="$attrs"
|
|
21
|
-
>
|
|
22
|
-
<template #prepend-inner>
|
|
23
|
-
<slot name="prepend-inner">
|
|
24
|
-
<FSIcon
|
|
25
|
-
size="xl"
|
|
26
|
-
:color="innerColor"
|
|
27
|
-
>
|
|
28
|
-
mdi-circle
|
|
29
|
-
</FSIcon>
|
|
30
|
-
</slot>
|
|
31
|
-
</template>
|
|
32
|
-
<template #append>
|
|
33
|
-
<FSButton
|
|
34
|
-
prependIcon="mdi-pencil"
|
|
35
|
-
variant="full"
|
|
36
|
-
:editable="$props.editable"
|
|
37
|
-
/>
|
|
38
|
-
</template>
|
|
39
|
-
</FSTextField>
|
|
40
|
-
<FSTextField
|
|
41
|
-
class="fs-color-field-opacity"
|
|
42
|
-
:label="$tr('ui.color-field.opacity', 'Opacity')"
|
|
43
|
-
:hideHeader="$props.hideHeader"
|
|
44
|
-
:required="$props.required"
|
|
45
|
-
:editable="$props.editable"
|
|
46
|
-
:clearable="false"
|
|
47
|
-
:readonly="true"
|
|
48
|
-
:modelValue="(Math.round(getPercentageFromHex(innerOpacity)*100)) + ' %'"
|
|
8
|
+
<FSCol>
|
|
9
|
+
<FSRow
|
|
10
|
+
height="fill"
|
|
11
|
+
v-bind="props"
|
|
49
12
|
>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
13
|
+
<FSTextField
|
|
14
|
+
class="fs-color-field"
|
|
15
|
+
:hideHeader="$props.hideHeader"
|
|
16
|
+
:required="$props.required"
|
|
17
|
+
:editable="$props.editable"
|
|
18
|
+
:clearable="false"
|
|
19
|
+
:readonly="true"
|
|
20
|
+
:modelValue="innerColor"
|
|
21
|
+
v-bind="$attrs"
|
|
22
|
+
>
|
|
23
|
+
<template #prepend-inner>
|
|
24
|
+
<slot name="prepend-inner">
|
|
25
|
+
<FSIcon
|
|
26
|
+
size="xl"
|
|
27
|
+
:color="innerColor"
|
|
28
|
+
>
|
|
29
|
+
mdi-circle
|
|
30
|
+
</FSIcon>
|
|
31
|
+
</slot>
|
|
32
|
+
</template>
|
|
33
|
+
<template #append>
|
|
34
|
+
<FSButton
|
|
35
|
+
prependIcon="mdi-pencil"
|
|
36
|
+
variant="full"
|
|
37
|
+
:editable="$props.editable"
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
40
|
+
</FSTextField>
|
|
41
|
+
<FSTextField
|
|
42
|
+
class="fs-color-field-opacity"
|
|
43
|
+
:label="$tr('ui.color-field.opacity', 'Opacity')"
|
|
44
|
+
:hideHeader="$props.hideHeader"
|
|
45
|
+
:required="$props.required"
|
|
46
|
+
:editable="$props.editable"
|
|
47
|
+
:clearable="false"
|
|
48
|
+
:readonly="true"
|
|
49
|
+
:modelValue="(Math.round(getPercentageFromHex(innerOpacity)*100)) + ' %'"
|
|
50
|
+
>
|
|
51
|
+
<template #prepend-inner>
|
|
52
|
+
<slot name="prepend-inner">
|
|
53
|
+
<FSIcon
|
|
54
|
+
icon="mdi-circle"
|
|
55
|
+
size="xl"
|
|
56
|
+
:color="ColorEnum.Dark"
|
|
57
|
+
:editable="$props.editable"
|
|
58
|
+
:style="{ opacity: getPercentageFromHex(innerOpacity) }"
|
|
59
|
+
/>
|
|
60
|
+
</slot>
|
|
61
|
+
</template>
|
|
62
|
+
<template #append>
|
|
63
|
+
<FSButton
|
|
64
|
+
prependIcon="mdi-pencil"
|
|
65
|
+
variant="full"
|
|
56
66
|
:editable="$props.editable"
|
|
57
|
-
:style="{ opacity: getPercentageFromHex(innerOpacity) }"
|
|
58
67
|
/>
|
|
59
|
-
</
|
|
60
|
-
</
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
68
|
+
</template>
|
|
69
|
+
</FSTextField>
|
|
70
|
+
</FSRow>
|
|
71
|
+
<slot name="description">
|
|
72
|
+
<FSSpan
|
|
73
|
+
v-if="$props.description"
|
|
74
|
+
class="fs-color-field-description"
|
|
75
|
+
font="text-underline"
|
|
76
|
+
:style="style"
|
|
77
|
+
>
|
|
78
|
+
{{ $props.description }}
|
|
79
|
+
</FSSpan>
|
|
80
|
+
</slot>
|
|
81
|
+
</FSCol>
|
|
70
82
|
</template>
|
|
71
83
|
<FSCard
|
|
72
84
|
:elevation="true"
|
|
@@ -92,7 +104,7 @@
|
|
|
92
104
|
import { computed, defineComponent, ref } from "vue";
|
|
93
105
|
|
|
94
106
|
import { getPercentageFromHex, getHexFromPercentage } from "@dative-gpi/foundation-shared-components/utils";
|
|
95
|
-
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
107
|
+
import { useColors, useSlots } from "@dative-gpi/foundation-shared-components/composables";
|
|
96
108
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
97
109
|
|
|
98
110
|
import FSTextField from "./FSTextField.vue";
|
|
@@ -113,6 +125,11 @@ export default defineComponent({
|
|
|
113
125
|
FSRow
|
|
114
126
|
},
|
|
115
127
|
props: {
|
|
128
|
+
description: {
|
|
129
|
+
type: String,
|
|
130
|
+
required: false,
|
|
131
|
+
default: null
|
|
132
|
+
},
|
|
116
133
|
modelValue: {
|
|
117
134
|
type: String,
|
|
118
135
|
required: false,
|
|
@@ -141,32 +158,26 @@ export default defineComponent({
|
|
|
141
158
|
},
|
|
142
159
|
emits: ["update:modelValue", "update:opacity"],
|
|
143
160
|
setup(props, { emit }) {
|
|
144
|
-
const
|
|
145
|
-
const innerOpacity = ref(getHexFromPercentage(props.opacityValue));
|
|
146
|
-
const fullColor = ref(innerColor.value + innerOpacity.value);
|
|
161
|
+
const { slots } = useSlots();
|
|
147
162
|
|
|
148
|
-
|
|
163
|
+
delete slots.description;
|
|
149
164
|
|
|
150
|
-
const errors = useColors().getColors(ColorEnum.Error);
|
|
151
165
|
const lights = useColors().getColors(ColorEnum.Light);
|
|
152
166
|
const darks = useColors().getColors(ColorEnum.Dark);
|
|
153
167
|
|
|
168
|
+
const menu = ref(false);
|
|
169
|
+
const innerColor = ref(props.modelValue.toString().substring(0, 7));
|
|
170
|
+
const innerOpacity = ref(getHexFromPercentage(props.opacityValue));
|
|
171
|
+
const fullColor = ref(innerColor.value + innerOpacity.value);
|
|
172
|
+
|
|
154
173
|
const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
|
|
155
174
|
if (!props.editable) {
|
|
156
175
|
return {
|
|
157
|
-
"--fs-color-field-
|
|
158
|
-
"--fs-color-field-border-color" : lights.base,
|
|
159
|
-
"--fs-color-field-color" : lights.dark,
|
|
160
|
-
"--fs-color-field-active-border-color": lights.base
|
|
176
|
+
"--fs-color-field-color": lights.dark
|
|
161
177
|
};
|
|
162
178
|
}
|
|
163
179
|
return {
|
|
164
|
-
"--fs-color-field-
|
|
165
|
-
"--fs-color-field-border-color" : lights.dark,
|
|
166
|
-
"--fs-color-field-color" : darks.base,
|
|
167
|
-
"--fs-color-field-active-border-color": darks.dark,
|
|
168
|
-
"--fs-color-field-error-color" : errors.base,
|
|
169
|
-
"--fs-color-field-error-border-color" : errors.base
|
|
180
|
+
"--fs-color-field-color": darks.base
|
|
170
181
|
};
|
|
171
182
|
});
|
|
172
183
|
|
|
@@ -180,12 +191,12 @@ export default defineComponent({
|
|
|
180
191
|
};
|
|
181
192
|
|
|
182
193
|
return {
|
|
183
|
-
ColorEnum,
|
|
184
194
|
getPercentageFromHex,
|
|
185
|
-
onSubmit,
|
|
186
|
-
innerColor,
|
|
187
195
|
innerOpacity,
|
|
196
|
+
innerColor,
|
|
188
197
|
fullColor,
|
|
198
|
+
ColorEnum,
|
|
199
|
+
onSubmit,
|
|
189
200
|
style,
|
|
190
201
|
menu
|
|
191
202
|
};
|
|
@@ -57,8 +57,6 @@ import FSSubmitDialog from "../FSSubmitDialog.vue";
|
|
|
57
57
|
import FSCalendarTwin from "../FSCalendarTwin.vue";
|
|
58
58
|
import FSTextField from "./FSTextField.vue";
|
|
59
59
|
import FSButton from "../FSButton.vue";
|
|
60
|
-
import FSCard from "../FSCard.vue";
|
|
61
|
-
import FSCol from "../FSCol.vue";
|
|
62
60
|
|
|
63
61
|
export default defineComponent({
|
|
64
62
|
name: "FSDateRangeField",
|
|
@@ -66,9 +64,7 @@ export default defineComponent({
|
|
|
66
64
|
FSSubmitDialog,
|
|
67
65
|
FSCalendarTwin,
|
|
68
66
|
FSTextField,
|
|
69
|
-
FSButton
|
|
70
|
-
FSCard,
|
|
71
|
-
FSCol
|
|
67
|
+
FSButton
|
|
72
68
|
},
|
|
73
69
|
props: {
|
|
74
70
|
label: {
|
|
@@ -43,19 +43,29 @@
|
|
|
43
43
|
:color="$props.color"
|
|
44
44
|
v-model="innerDateRange"
|
|
45
45
|
/>
|
|
46
|
-
<FSRow
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
46
|
+
<FSRow
|
|
47
|
+
width="100%"
|
|
48
|
+
>
|
|
49
|
+
<FSCol
|
|
50
|
+
width="calc(50% - 4px)"
|
|
51
|
+
>
|
|
52
|
+
<FSClock
|
|
53
|
+
:reminder="true"
|
|
54
|
+
:color="$props.color"
|
|
55
|
+
:date="innerDateLeft"
|
|
56
|
+
v-model="innerTimeLeft"
|
|
57
|
+
/>
|
|
58
|
+
</FSCol>
|
|
59
|
+
<FSCol
|
|
60
|
+
width="calc(50% - 4px)"
|
|
61
|
+
>
|
|
62
|
+
<FSClock
|
|
63
|
+
:reminder="true"
|
|
64
|
+
:color="$props.color"
|
|
65
|
+
:date="innerDateRight"
|
|
66
|
+
v-model="innerTimeRight"
|
|
67
|
+
/>
|
|
68
|
+
</FSCol>
|
|
59
69
|
</FSRow>
|
|
60
70
|
</FSCol>
|
|
61
71
|
</template>
|
|
@@ -74,7 +84,6 @@ import FSCalendarTwin from "../FSCalendarTwin.vue";
|
|
|
74
84
|
import FSTextField from "./FSTextField.vue";
|
|
75
85
|
import FSButton from "../FSButton.vue";
|
|
76
86
|
import FSClock from "../FSClock.vue";
|
|
77
|
-
import FSCard from "../FSCard.vue";
|
|
78
87
|
import FSCol from "../FSCol.vue";
|
|
79
88
|
import FSRow from "../FSRow.vue";
|
|
80
89
|
|
|
@@ -86,7 +95,6 @@ export default defineComponent({
|
|
|
86
95
|
FSTextField,
|
|
87
96
|
FSButton,
|
|
88
97
|
FSClock,
|
|
89
|
-
FSCard,
|
|
90
98
|
FSCol,
|
|
91
99
|
FSRow
|
|
92
100
|
},
|
|
@@ -170,11 +170,7 @@ export default defineComponent({
|
|
|
170
170
|
}
|
|
171
171
|
if (props.modelValue) {
|
|
172
172
|
const selectedIcon = innerIcons.find((icon) => icon.id === props.modelValue);
|
|
173
|
-
if (selectedIcon) {
|
|
174
|
-
innerIcons.splice(innerIcons.indexOf(selectedIcon), 1);
|
|
175
|
-
innerIcons.unshift(selectedIcon);
|
|
176
|
-
}
|
|
177
|
-
else {
|
|
173
|
+
if (!selectedIcon) {
|
|
178
174
|
innerIcons.unshift({
|
|
179
175
|
id: props.modelValue,
|
|
180
176
|
prependIcon: props.modelValue
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSTextField
|
|
3
|
-
type="number"
|
|
4
3
|
:editable="$props.editable"
|
|
5
4
|
:modelValue="$props.modelValue?.toString()"
|
|
6
|
-
@update:modelValue="
|
|
5
|
+
@update:modelValue="onUpdate"
|
|
7
6
|
v-bind="$attrs"
|
|
8
7
|
>
|
|
9
8
|
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
@@ -34,6 +33,21 @@ export default defineComponent({
|
|
|
34
33
|
default: true
|
|
35
34
|
}
|
|
36
35
|
},
|
|
37
|
-
emits: ["update:modelValue"]
|
|
36
|
+
emits: ["update:modelValue"],
|
|
37
|
+
setup(_, { emit }) {
|
|
38
|
+
const onUpdate = (value: string) => {
|
|
39
|
+
const match = /([0-9 ]*[,\.]?)?[0-9]+/.exec(value);
|
|
40
|
+
if (match && !isNaN(parseFloat(match[0].replace(",", ".").replace(" ", "")))) {
|
|
41
|
+
emit("update:modelValue", parseFloat(match[0].replace(",", ".").replace(" ", "")));
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
emit("update:modelValue", 0);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
return {
|
|
49
|
+
onUpdate
|
|
50
|
+
};
|
|
51
|
+
}
|
|
38
52
|
});
|
|
39
53
|
</script>
|
|
@@ -292,14 +292,16 @@ export default defineComponent({
|
|
|
292
292
|
});
|
|
293
293
|
|
|
294
294
|
const style = computed((): {[code: string]: string} & Partial<CSSStyleDeclaration> => {
|
|
295
|
-
let minHeight: string | undefined =
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
295
|
+
let minHeight: string | undefined = "auto";
|
|
296
|
+
if (!readonly.value) {
|
|
297
|
+
const base = isMobileSized.value ? 30 : 42;
|
|
298
|
+
const row = isMobileSized.value ? 16 : 20;
|
|
299
|
+
if (props.rows > 1) {
|
|
300
|
+
minHeight = `${base + (props.rows - 1) * row}px`;
|
|
301
|
+
}
|
|
302
|
+
else {
|
|
303
|
+
minHeight = `${base}px`;
|
|
304
|
+
}
|
|
303
305
|
}
|
|
304
306
|
|
|
305
307
|
switch (props.variant) {
|
|
@@ -159,14 +159,14 @@ export default defineComponent({
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
return {
|
|
162
|
-
ColorEnum,
|
|
163
162
|
innerValue,
|
|
164
163
|
validateOn,
|
|
164
|
+
ColorEnum,
|
|
165
165
|
messages,
|
|
166
166
|
blurred,
|
|
167
167
|
style,
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
onRemove,
|
|
169
|
+
onAdd
|
|
170
170
|
};
|
|
171
171
|
}
|
|
172
172
|
});
|
|
@@ -109,12 +109,12 @@ export default defineComponent({
|
|
|
109
109
|
resize: {
|
|
110
110
|
type: Boolean,
|
|
111
111
|
required: false,
|
|
112
|
-
default:
|
|
112
|
+
default: false
|
|
113
113
|
},
|
|
114
114
|
autoGrow: {
|
|
115
115
|
type: Boolean,
|
|
116
116
|
required: false,
|
|
117
|
-
default:
|
|
117
|
+
default: true
|
|
118
118
|
},
|
|
119
119
|
hideHeader: {
|
|
120
120
|
type: Boolean,
|