@dative-gpi/foundation-shared-components 1.0.157 → 1.0.158-sankey2
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/FSCol.vue +11 -5
- package/components/FSInstantPicker.vue +9 -4
- package/components/FSRangePicker.vue +275 -0
- package/components/FSRangeSlider.vue +112 -0
- package/components/fields/FSAutocompleteField.vue +8 -0
- package/components/fields/FSBaseField.vue +6 -0
- package/components/fields/FSIconField.vue +10 -2
- package/components/fields/FSSearchField.vue +1 -0
- package/components/fields/FSTimeRangeField.vue +6 -0
- package/components/lists/FSDataTableUI.vue +30 -24
- package/components/views/desktop/FSBaseDefaultDesktopView.vue +1 -1
- package/components/views/desktop/FSBaseEntityDesktopView.vue +6 -4
- package/components/views/mobile/FSBaseDefaultMobileView.vue +4 -4
- package/components/views/mobile/FSBaseEntityMobileView.vue +28 -21
- package/package.json +4 -4
- package/styles/components/fs_col.scss +1 -1
- package/styles/components/fs_range_slider.scss +51 -0
- package/styles/components/index.scss +1 -0
package/components/FSCol.vue
CHANGED
|
@@ -26,6 +26,11 @@ export default defineComponent({
|
|
|
26
26
|
required: false,
|
|
27
27
|
default: "fill"
|
|
28
28
|
},
|
|
29
|
+
maxWidth: {
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
31
|
+
required: false,
|
|
32
|
+
default: null
|
|
33
|
+
},
|
|
29
34
|
padding: {
|
|
30
35
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
31
36
|
required: false,
|
|
@@ -49,11 +54,12 @@ export default defineComponent({
|
|
|
49
54
|
},
|
|
50
55
|
setup(props) {
|
|
51
56
|
const style = computed((): StyleValue => ({
|
|
52
|
-
"--fs-col-overflow": props.overflow,
|
|
53
|
-
"--fs-col-padding"
|
|
54
|
-
"--fs-col-gap"
|
|
55
|
-
"--fs-col-width"
|
|
56
|
-
"--fs-col-
|
|
57
|
+
"--fs-col-overflow" : props.overflow,
|
|
58
|
+
"--fs-col-padding" : sizeToVar(props.padding),
|
|
59
|
+
"--fs-col-gap" : sizeToVar(props.gap),
|
|
60
|
+
"--fs-col-width" : sizeToVar(props.width),
|
|
61
|
+
"--fs-col-max-width" : props.maxWidth ? sizeToVar(props.maxWidth) : "100%",
|
|
62
|
+
"--fs-col-height" : sizeToVar(props.height),
|
|
57
63
|
}));
|
|
58
64
|
|
|
59
65
|
const classes = computed((): string[] => {
|
|
@@ -97,9 +97,9 @@ import FSCol from '@dative-gpi/foundation-shared-components/components/FSCol.vue
|
|
|
97
97
|
import FSSpan from '@dative-gpi/foundation-shared-components/components/FSSpan.vue';
|
|
98
98
|
import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
|
|
99
99
|
import FSSlider from '@dative-gpi/foundation-shared-components/components/FSSlider.vue';
|
|
100
|
+
import FSPlayButtons from '@dative-gpi/foundation-shared-components/components/FSPlayButtons.vue';
|
|
100
101
|
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
101
102
|
import FSTermField from '@dative-gpi/foundation-shared-components/components/fields/FSTermField.vue';
|
|
102
|
-
import FSPlayButtons from '@dative-gpi/foundation-shared-components/components/FSPlayButtons.vue';
|
|
103
103
|
|
|
104
104
|
export default defineComponent({
|
|
105
105
|
name: "FSInstantPicker",
|
|
@@ -110,7 +110,7 @@ export default defineComponent({
|
|
|
110
110
|
FSSlider,
|
|
111
111
|
FSTermField,
|
|
112
112
|
FSBaseField,
|
|
113
|
-
FSPlayButtons
|
|
113
|
+
FSPlayButtons,
|
|
114
114
|
},
|
|
115
115
|
props: {
|
|
116
116
|
label: {
|
|
@@ -119,8 +119,7 @@ export default defineComponent({
|
|
|
119
119
|
},
|
|
120
120
|
modelValue: {
|
|
121
121
|
type: Number,
|
|
122
|
-
required: false
|
|
123
|
-
default: 0,
|
|
122
|
+
required: false
|
|
124
123
|
},
|
|
125
124
|
startDate: {
|
|
126
125
|
type: String,
|
|
@@ -231,6 +230,12 @@ export default defineComponent({
|
|
|
231
230
|
}
|
|
232
231
|
}, { immediate: true });
|
|
233
232
|
|
|
233
|
+
watch(() => props.modelValue, (value) => {
|
|
234
|
+
if(!value) {
|
|
235
|
+
emit('update:modelValue', endTimestamp.value);
|
|
236
|
+
}
|
|
237
|
+
}, { immediate: true });
|
|
238
|
+
|
|
234
239
|
watch(playing, (value) => {
|
|
235
240
|
if(!value && playingInterval.value) {
|
|
236
241
|
clearInterval(playingInterval.value);
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSBaseField
|
|
3
|
+
:description="$props.description"
|
|
4
|
+
:hideHeader="$props.hideHeader"
|
|
5
|
+
:required="$props.required"
|
|
6
|
+
:disabled="$props.disabled"
|
|
7
|
+
:label="$props.label"
|
|
8
|
+
>
|
|
9
|
+
<FSRow
|
|
10
|
+
align="bottom-center"
|
|
11
|
+
gap="32px"
|
|
12
|
+
>
|
|
13
|
+
<FSTermField
|
|
14
|
+
width="430px"
|
|
15
|
+
:label="$tr('ui.instant-picker.analyze-period', 'Analyze Period')"
|
|
16
|
+
:startDate="$props.startDate"
|
|
17
|
+
:endDate="$props.endDate"
|
|
18
|
+
:disabled="$props.disabled"
|
|
19
|
+
@update:startDate="$emit('update:startDate', $event)"
|
|
20
|
+
@update:endDate="$emit('update:endDate', $event)"
|
|
21
|
+
/>
|
|
22
|
+
<FSRow
|
|
23
|
+
padding="0 0 2px 0"
|
|
24
|
+
align="center-center"
|
|
25
|
+
>
|
|
26
|
+
<FSCol
|
|
27
|
+
width="fill"
|
|
28
|
+
>
|
|
29
|
+
<FSRangeSlider
|
|
30
|
+
minWidth='min(300px, 90vw)'
|
|
31
|
+
:disabled="$props.disabled"
|
|
32
|
+
:color="ColorEnum.Light"
|
|
33
|
+
:thumbColor="ColorEnum.Primary"
|
|
34
|
+
:trackFillColor="ColorEnum.Primary"
|
|
35
|
+
:trackSize="8"
|
|
36
|
+
thumb-label="always"
|
|
37
|
+
:step="$props.stepTime"
|
|
38
|
+
:min="startTimestamp"
|
|
39
|
+
:max="endTimestamp"
|
|
40
|
+
:ticks="ticks"
|
|
41
|
+
showTicks="always"
|
|
42
|
+
:tick-size="0"
|
|
43
|
+
:modelValue="$props.modelValue"
|
|
44
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
45
|
+
>
|
|
46
|
+
<template
|
|
47
|
+
#thumb-label="{ modelValue }"
|
|
48
|
+
>
|
|
49
|
+
<FSSpan
|
|
50
|
+
font="text-overline"
|
|
51
|
+
>
|
|
52
|
+
{{ epochToMonthShortTimeFormat(modelValue) }}
|
|
53
|
+
</FSSpan>
|
|
54
|
+
</template>
|
|
55
|
+
<template
|
|
56
|
+
#tick-label="{ tick }"
|
|
57
|
+
>
|
|
58
|
+
<FSRow>
|
|
59
|
+
<FSText
|
|
60
|
+
:color="lightColors.dark"
|
|
61
|
+
font="text-overline"
|
|
62
|
+
>
|
|
63
|
+
{{ intervalTime <= 3600000
|
|
64
|
+
?
|
|
65
|
+
epochToShortTimeOnlyFormat(tick.value)
|
|
66
|
+
:
|
|
67
|
+
epochToDayMonthShortOnly(tick.value)
|
|
68
|
+
}}
|
|
69
|
+
</FSText>
|
|
70
|
+
</FSRow>
|
|
71
|
+
</template>
|
|
72
|
+
</FSRangeSlider>
|
|
73
|
+
</FSCol>
|
|
74
|
+
<FSPlayButtons
|
|
75
|
+
v-if="$props.playable"
|
|
76
|
+
:disabled="$props.disabled"
|
|
77
|
+
:modelValue="playing"
|
|
78
|
+
@click:backward="onClickBackward"
|
|
79
|
+
@click:forward="onClickForward"
|
|
80
|
+
@update:modelValue="onPlayingChange"
|
|
81
|
+
/>
|
|
82
|
+
</FSRow>
|
|
83
|
+
</FSRow>
|
|
84
|
+
</FSBaseField>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<script lang="ts">
|
|
88
|
+
import { computed, defineComponent, ref, watch } from "vue";
|
|
89
|
+
|
|
90
|
+
import { useDateFormat, useDateExpression } from "@dative-gpi/foundation-shared-services/composables";
|
|
91
|
+
|
|
92
|
+
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
93
|
+
import { useBreakpoints, useColors } from '@dative-gpi/foundation-shared-components/composables';
|
|
94
|
+
|
|
95
|
+
import FSCol from '@dative-gpi/foundation-shared-components/components/FSCol.vue';
|
|
96
|
+
import FSSpan from '@dative-gpi/foundation-shared-components/components/FSSpan.vue';
|
|
97
|
+
import FSText from '@dative-gpi/foundation-shared-components/components/FSText.vue';
|
|
98
|
+
import FSPlayButtons from '@dative-gpi/foundation-shared-components/components/FSPlayButtons.vue';
|
|
99
|
+
import FSRangeSlider from '@dative-gpi/foundation-shared-components/components/FSRangeSlider.vue';
|
|
100
|
+
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
101
|
+
import FSTermField from '@dative-gpi/foundation-shared-components/components/fields/FSTermField.vue';
|
|
102
|
+
|
|
103
|
+
export default defineComponent({
|
|
104
|
+
name: "FSRangePicker",
|
|
105
|
+
components: {
|
|
106
|
+
FSCol,
|
|
107
|
+
FSSpan,
|
|
108
|
+
FSText,
|
|
109
|
+
FSTermField,
|
|
110
|
+
FSBaseField,
|
|
111
|
+
FSRangeSlider,
|
|
112
|
+
FSPlayButtons,
|
|
113
|
+
},
|
|
114
|
+
props: {
|
|
115
|
+
label: {
|
|
116
|
+
type: String,
|
|
117
|
+
required: false,
|
|
118
|
+
},
|
|
119
|
+
mode: {
|
|
120
|
+
type: String as () => 'single' | 'range',
|
|
121
|
+
required: false,
|
|
122
|
+
default: 'single'
|
|
123
|
+
},
|
|
124
|
+
modelValue: {
|
|
125
|
+
type: Object as () => [number, number],
|
|
126
|
+
required: true
|
|
127
|
+
},
|
|
128
|
+
startDate: {
|
|
129
|
+
type: String,
|
|
130
|
+
required: true
|
|
131
|
+
},
|
|
132
|
+
endDate: {
|
|
133
|
+
type: String,
|
|
134
|
+
required: true
|
|
135
|
+
},
|
|
136
|
+
description: {
|
|
137
|
+
type: String,
|
|
138
|
+
required: false,
|
|
139
|
+
default: null
|
|
140
|
+
},
|
|
141
|
+
hideHeader: {
|
|
142
|
+
type: Boolean,
|
|
143
|
+
required: false,
|
|
144
|
+
default: false
|
|
145
|
+
},
|
|
146
|
+
required: {
|
|
147
|
+
type: Boolean,
|
|
148
|
+
required: false,
|
|
149
|
+
default: false
|
|
150
|
+
},
|
|
151
|
+
disabled: {
|
|
152
|
+
type: Boolean,
|
|
153
|
+
required: false,
|
|
154
|
+
default: false
|
|
155
|
+
},
|
|
156
|
+
playable: {
|
|
157
|
+
type: Boolean,
|
|
158
|
+
required: false,
|
|
159
|
+
default: true
|
|
160
|
+
},
|
|
161
|
+
stepTime: {
|
|
162
|
+
type: Number,
|
|
163
|
+
required: false,
|
|
164
|
+
default: 60000
|
|
165
|
+
},
|
|
166
|
+
playingStepDuration: {
|
|
167
|
+
type: Number,
|
|
168
|
+
required: false,
|
|
169
|
+
default: 50
|
|
170
|
+
}
|
|
171
|
+
},
|
|
172
|
+
emits: ['update:modelValue', 'update:startDate', 'update:endDate'],
|
|
173
|
+
setup(props, { emit }) {
|
|
174
|
+
const { epochToShortTimeOnlyFormat, epochToShortDateFormat, epochToDayMonthShortOnly, epochToISO, epochToMonthShortTimeFormat } = useDateFormat();
|
|
175
|
+
const { convert : convertTermToEpoch } = useDateExpression();
|
|
176
|
+
const { isMobileSized, isExtraSmall } = useBreakpoints();
|
|
177
|
+
const { getColors } = useColors();
|
|
178
|
+
|
|
179
|
+
const lightColors = getColors(ColorEnum.Light);
|
|
180
|
+
const playing = ref(false);
|
|
181
|
+
const playingInterval = ref();
|
|
182
|
+
|
|
183
|
+
const startTimestamp = computed(() => convertTermToEpoch(props.startDate));
|
|
184
|
+
const endTimestamp = computed(() => convertTermToEpoch(props.endDate));
|
|
185
|
+
|
|
186
|
+
const intervalTime = computed(() => {
|
|
187
|
+
const possibleIntervals = [60000, 3600000, 86400000];
|
|
188
|
+
|
|
189
|
+
const interval = possibleIntervals.find(interval => {
|
|
190
|
+
return (endTimestamp.value - startTimestamp.value) / interval < 100;
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
if (interval) {
|
|
194
|
+
return interval;
|
|
195
|
+
}
|
|
196
|
+
return 86400000;
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
const ticks = computed(() => {
|
|
200
|
+
const ticks: number[] = [];
|
|
201
|
+
|
|
202
|
+
const rangeDuration = endTimestamp.value - startTimestamp.value;
|
|
203
|
+
const interval = rangeDuration / maximumTickToShow.value;
|
|
204
|
+
|
|
205
|
+
for (let i = 1; i < maximumTickToShow.value; i++) {
|
|
206
|
+
ticks.push(startTimestamp.value + i * interval);
|
|
207
|
+
}
|
|
208
|
+
return ticks;
|
|
209
|
+
});
|
|
210
|
+
|
|
211
|
+
const maximumTickToShow = computed(() => {
|
|
212
|
+
if (isExtraSmall.value) {
|
|
213
|
+
return 4;
|
|
214
|
+
}
|
|
215
|
+
if (isMobileSized.value) {
|
|
216
|
+
return 5;
|
|
217
|
+
}
|
|
218
|
+
return 6;
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
const onPlayingChange = (value: boolean) => {
|
|
222
|
+
playing.value = value;
|
|
223
|
+
};
|
|
224
|
+
|
|
225
|
+
const onClickBackward = () => {
|
|
226
|
+
const rangeDuration = props.modelValue[1] - props.modelValue[0];
|
|
227
|
+
emit('update:modelValue', [startTimestamp.value, startTimestamp.value + rangeDuration]);
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
const onClickForward = () => {
|
|
231
|
+
const rangeDuration = props.modelValue[1] - props.modelValue[0];
|
|
232
|
+
emit('update:modelValue', [endTimestamp.value - rangeDuration, endTimestamp.value]);
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
watch(() => [props.startDate, props.endDate], () => {
|
|
236
|
+
if((props.modelValue[0] < startTimestamp.value || props.modelValue[1] > endTimestamp.value)) {
|
|
237
|
+
emit('update:modelValue', [startTimestamp.value, endTimestamp.value]);
|
|
238
|
+
}
|
|
239
|
+
}, { immediate: true });
|
|
240
|
+
|
|
241
|
+
watch(playing, (value) => {
|
|
242
|
+
if(!value && playingInterval.value) {
|
|
243
|
+
clearInterval(playingInterval.value);
|
|
244
|
+
} else {
|
|
245
|
+
playingInterval.value = setInterval(() => {
|
|
246
|
+
if(props.modelValue[0] + props.stepTime <= endTimestamp.value && props.modelValue[1] + props.stepTime <= endTimestamp.value) {
|
|
247
|
+
emit('update:modelValue', [props.modelValue[0] + props.stepTime, props.modelValue[1] + props.stepTime]);
|
|
248
|
+
} else {
|
|
249
|
+
playing.value = false;
|
|
250
|
+
}
|
|
251
|
+
}, props.playingStepDuration);
|
|
252
|
+
}
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
return {
|
|
256
|
+
ticks,
|
|
257
|
+
playing,
|
|
258
|
+
ColorEnum,
|
|
259
|
+
lightColors,
|
|
260
|
+
intervalTime,
|
|
261
|
+
endTimestamp,
|
|
262
|
+
startTimestamp,
|
|
263
|
+
maximumTickToShow,
|
|
264
|
+
epochToISO,
|
|
265
|
+
onPlayingChange,
|
|
266
|
+
onClickForward,
|
|
267
|
+
onClickBackward,
|
|
268
|
+
epochToShortDateFormat,
|
|
269
|
+
epochToShortTimeOnlyFormat,
|
|
270
|
+
epochToDayMonthShortOnly,
|
|
271
|
+
epochToMonthShortTimeFormat
|
|
272
|
+
};
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
</script>
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSBaseField
|
|
3
|
+
:label="$props.label"
|
|
4
|
+
:description="$props.description"
|
|
5
|
+
:required="$props.required"
|
|
6
|
+
:disabled="$props.disabled"
|
|
7
|
+
:style="style"
|
|
8
|
+
>
|
|
9
|
+
<v-range-slider
|
|
10
|
+
class="fs-range-slider"
|
|
11
|
+
hide-details
|
|
12
|
+
:disabled="$props.disabled"
|
|
13
|
+
:ripple="false"
|
|
14
|
+
:style="style"
|
|
15
|
+
:elevation="0"
|
|
16
|
+
:tickSize="4"
|
|
17
|
+
:modelValue="$props.modelValue ?? undefined"
|
|
18
|
+
@update:modelValue="$emit('update:modelValue', $event)"
|
|
19
|
+
v-bind="$attrs"
|
|
20
|
+
>
|
|
21
|
+
<template
|
|
22
|
+
v-for="(_, name) in $slots"
|
|
23
|
+
v-slot:[name]="slotData"
|
|
24
|
+
>
|
|
25
|
+
<slot
|
|
26
|
+
:name="name"
|
|
27
|
+
v-bind="slotData"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</v-range-slider>
|
|
31
|
+
</FSBaseField>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script lang="ts">
|
|
35
|
+
import { computed, defineComponent, type PropType, type StyleValue } from "vue";
|
|
36
|
+
|
|
37
|
+
import { type ColorBase, ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
38
|
+
import { useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
39
|
+
|
|
40
|
+
import FSBaseField from '@dative-gpi/foundation-shared-components/components/fields/FSBaseField.vue';
|
|
41
|
+
|
|
42
|
+
export default defineComponent({
|
|
43
|
+
name: "FSRangeSlider",
|
|
44
|
+
components: {
|
|
45
|
+
FSBaseField
|
|
46
|
+
},
|
|
47
|
+
props: {
|
|
48
|
+
label: {
|
|
49
|
+
type: String as PropType<string | null>,
|
|
50
|
+
required: false,
|
|
51
|
+
default: null
|
|
52
|
+
},
|
|
53
|
+
description: {
|
|
54
|
+
type: String as PropType<string | null>,
|
|
55
|
+
required: false,
|
|
56
|
+
default: null
|
|
57
|
+
},
|
|
58
|
+
modelValue: {
|
|
59
|
+
type: Object as PropType<[number, number] | null>,
|
|
60
|
+
required: false,
|
|
61
|
+
default: null
|
|
62
|
+
},
|
|
63
|
+
color: {
|
|
64
|
+
type: String as PropType<ColorBase>,
|
|
65
|
+
required: false,
|
|
66
|
+
default: ColorEnum.Dark
|
|
67
|
+
},
|
|
68
|
+
required: {
|
|
69
|
+
type: Boolean,
|
|
70
|
+
required: false,
|
|
71
|
+
default: false
|
|
72
|
+
},
|
|
73
|
+
disabled: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
required: false,
|
|
76
|
+
default: false
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
emits: ["update:modelValue"],
|
|
80
|
+
setup(props) {
|
|
81
|
+
const { getColors } = useColors();
|
|
82
|
+
|
|
83
|
+
const colors = computed(() => getColors(props.color));
|
|
84
|
+
const lights = getColors(ColorEnum.Light);
|
|
85
|
+
const darks = getColors(ColorEnum.Dark);
|
|
86
|
+
|
|
87
|
+
const style = computed((): StyleValue => {
|
|
88
|
+
if (props.disabled) {
|
|
89
|
+
return {
|
|
90
|
+
"--fs-range-slider-cursor" : "default",
|
|
91
|
+
"--fs-range-slider-track-color": lights.base,
|
|
92
|
+
"--fs-range-slider-thumb-color": lights.dark,
|
|
93
|
+
"--fs-range-slider-fill-color" : lights.dark,
|
|
94
|
+
"--fs-range-slider-color" : lights.dark
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
console.log(colors.value);
|
|
98
|
+
return {
|
|
99
|
+
"--fs-range-slider-cursor" : "pointer",
|
|
100
|
+
"--fs-range-slider-track-color": colors.value.light,
|
|
101
|
+
"--fs-range-slider-fill-color" : colors.value.base,
|
|
102
|
+
"--fs-range-slider-thumb-color": colors.value.base,
|
|
103
|
+
"--fs-range-slider-color" : darks.base
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
style
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
</script>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
3
|
v-if="$props.loading"
|
|
4
|
+
:maxWidth="$props.maxWidth"
|
|
4
5
|
>
|
|
5
6
|
<FSLoader
|
|
6
7
|
v-if="!$props.hideHeader"
|
|
@@ -14,6 +15,7 @@
|
|
|
14
15
|
</FSCol>
|
|
15
16
|
<FSCol
|
|
16
17
|
v-else-if="isExtraSmall"
|
|
18
|
+
:maxWidth="$props.maxWidth"
|
|
17
19
|
>
|
|
18
20
|
<FSTextField
|
|
19
21
|
:validationValue="$props.modelValue"
|
|
@@ -220,6 +222,7 @@
|
|
|
220
222
|
:disabled="$props.disabled"
|
|
221
223
|
:label="$props.label"
|
|
222
224
|
:messages="messages"
|
|
225
|
+
:maxWidth="$props.maxWidth"
|
|
223
226
|
>
|
|
224
227
|
<FSToggleSet
|
|
225
228
|
v-if="$props.toggleSet"
|
|
@@ -588,6 +591,11 @@ export default defineComponent({
|
|
|
588
591
|
type: Boolean,
|
|
589
592
|
required: false,
|
|
590
593
|
default: false
|
|
594
|
+
},
|
|
595
|
+
maxWidth: {
|
|
596
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
597
|
+
required: false,
|
|
598
|
+
default: "600px"
|
|
591
599
|
}
|
|
592
600
|
},
|
|
593
601
|
emits: ["update:modelValue", "update:search", "add:item"],
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<FSCol
|
|
3
|
+
:maxWidth="$props.maxWidth"
|
|
3
4
|
:style="style"
|
|
4
5
|
>
|
|
5
6
|
<slot
|
|
@@ -114,6 +115,11 @@ export default defineComponent({
|
|
|
114
115
|
type: String,
|
|
115
116
|
required: false,
|
|
116
117
|
default: "120px"
|
|
118
|
+
},
|
|
119
|
+
maxWidth: {
|
|
120
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
121
|
+
required: false,
|
|
122
|
+
default: "600px"
|
|
117
123
|
}
|
|
118
124
|
},
|
|
119
125
|
setup(props) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<FSCol
|
|
2
|
+
<FSCol
|
|
3
|
+
:maxWidth="$props.maxWidth"
|
|
4
|
+
>
|
|
3
5
|
<FSTextField
|
|
4
6
|
:label="$props.label"
|
|
5
7
|
:description="$props.description"
|
|
@@ -10,6 +12,7 @@
|
|
|
10
12
|
:messages="messages"
|
|
11
13
|
:validateOn="validateOn"
|
|
12
14
|
:validationValue="$props.modelValue"
|
|
15
|
+
:maxWidth="null"
|
|
13
16
|
v-model="innerValue"
|
|
14
17
|
v-bind="$attrs"
|
|
15
18
|
>
|
|
@@ -123,7 +126,12 @@ export default defineComponent({
|
|
|
123
126
|
type: Boolean,
|
|
124
127
|
required: false,
|
|
125
128
|
default: false
|
|
126
|
-
}
|
|
129
|
+
},
|
|
130
|
+
maxWidth: {
|
|
131
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
132
|
+
required: false,
|
|
133
|
+
default: "600px"
|
|
134
|
+
},
|
|
127
135
|
},
|
|
128
136
|
emits: ["update:modelValue"],
|
|
129
137
|
setup(props) {
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
:disabled="$props.disabled"
|
|
7
7
|
:label="$props.label"
|
|
8
8
|
:messages="messages"
|
|
9
|
+
:maxWidth="$props.maxWidth"
|
|
9
10
|
>
|
|
10
11
|
<FSRow>
|
|
11
12
|
<FSRow
|
|
@@ -132,6 +133,11 @@ export default defineComponent({
|
|
|
132
133
|
type: Boolean,
|
|
133
134
|
required: false,
|
|
134
135
|
default: false
|
|
136
|
+
},
|
|
137
|
+
maxWidth: {
|
|
138
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
139
|
+
required: false,
|
|
140
|
+
default: null
|
|
135
141
|
}
|
|
136
142
|
},
|
|
137
143
|
emits: ["update:modelValue"],
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
>
|
|
6
6
|
<FSRow
|
|
7
7
|
v-if="$props.showSearch || (!isMobileSized && ($slots['prepend-toolbar'] || $slots['toolbar'] || $slots['append-toolbar'])) || (!$props.disableTable && !$props.disableIterator)"
|
|
8
|
-
align="
|
|
8
|
+
align="top-left"
|
|
9
9
|
:wrap="isMobileSized ? false : true"
|
|
10
10
|
width="fill"
|
|
11
11
|
>
|
|
@@ -13,35 +13,41 @@
|
|
|
13
13
|
v-if="!isMobileSized"
|
|
14
14
|
name="prepend-toolbar"
|
|
15
15
|
/>
|
|
16
|
-
<
|
|
17
|
-
|
|
18
|
-
>
|
|
19
|
-
<FSSearchField
|
|
20
|
-
:hideHeader="true"
|
|
21
|
-
v-model="innerSearch"
|
|
22
|
-
/>
|
|
23
|
-
<FSButton
|
|
24
|
-
v-if="filterableHeaders.length > 0"
|
|
25
|
-
prependIcon="mdi-filter-variant"
|
|
26
|
-
:variant="innerShowFilters ? 'full' : 'standard'"
|
|
27
|
-
@click="innerShowFilters = !innerShowFilters"
|
|
28
|
-
/>
|
|
29
|
-
</template>
|
|
30
|
-
<slot
|
|
31
|
-
v-if="!isMobileSized"
|
|
32
|
-
name="toolbar"
|
|
33
|
-
/>
|
|
34
|
-
<template
|
|
35
|
-
v-if="$slots['append-toolbar'] || (!$props.disableTable && !$props.disableIterator)"
|
|
16
|
+
<FSRow
|
|
17
|
+
align="top-left"
|
|
36
18
|
>
|
|
37
19
|
<FSRow
|
|
38
|
-
|
|
39
|
-
|
|
20
|
+
v-if="$props.showSearch || filterableHeaders.length > 0 || $slots['append-toolbar']"
|
|
21
|
+
align="bottom-left"
|
|
40
22
|
>
|
|
23
|
+
<FSSearchField
|
|
24
|
+
:hideHeader="true"
|
|
25
|
+
v-model="innerSearch"
|
|
26
|
+
/>
|
|
27
|
+
<FSButton
|
|
28
|
+
v-if="filterableHeaders.length > 0"
|
|
29
|
+
prependIcon="mdi-filter-variant"
|
|
30
|
+
:variant="innerShowFilters ? 'full' : 'standard'"
|
|
31
|
+
@click="innerShowFilters = !innerShowFilters"
|
|
32
|
+
/>
|
|
41
33
|
<slot
|
|
42
34
|
v-if="!isMobileSized"
|
|
43
|
-
name="
|
|
35
|
+
name="toolbar"
|
|
44
36
|
/>
|
|
37
|
+
</FSRow>
|
|
38
|
+
<slot
|
|
39
|
+
v-if="!isMobileSized"
|
|
40
|
+
name="append-toolbar"
|
|
41
|
+
/>
|
|
42
|
+
</FSRow>
|
|
43
|
+
<template
|
|
44
|
+
v-if="(!$props.disableTable && !$props.disableIterator)"
|
|
45
|
+
>
|
|
46
|
+
<FSRow
|
|
47
|
+
align="top-right"
|
|
48
|
+
width="hug"
|
|
49
|
+
:wrap="false"
|
|
50
|
+
>
|
|
45
51
|
<FSOptionGroup
|
|
46
52
|
v-if="!$props.disableTable && !$props.disableIterator"
|
|
47
53
|
:values="modeOptions"
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
>
|
|
10
10
|
<FSRow
|
|
11
11
|
gap="24px"
|
|
12
|
+
:height="actualImageSize"
|
|
12
13
|
:wrap="false"
|
|
13
14
|
>
|
|
14
15
|
<template
|
|
@@ -54,7 +55,7 @@
|
|
|
54
55
|
>
|
|
55
56
|
<slot
|
|
56
57
|
name="subtitle"
|
|
57
|
-
v-if="topOffset <
|
|
58
|
+
v-if="topOffset < 64"
|
|
58
59
|
>
|
|
59
60
|
<FSText
|
|
60
61
|
v-if="$props.subtitle"
|
|
@@ -65,10 +66,11 @@
|
|
|
65
66
|
</slot>
|
|
66
67
|
<slot
|
|
67
68
|
name="description"
|
|
68
|
-
v-if="topOffset <
|
|
69
|
+
v-if="topOffset < 24"
|
|
69
70
|
>
|
|
70
71
|
<FSText
|
|
71
72
|
v-if="$props.description"
|
|
73
|
+
:lineClamp="2"
|
|
72
74
|
font="text-body"
|
|
73
75
|
>
|
|
74
76
|
{{ $props.description }}
|
|
@@ -146,9 +148,9 @@ export default defineComponent({
|
|
|
146
148
|
default: () => ["124px", "96px", "80px"]
|
|
147
149
|
},
|
|
148
150
|
icon: {
|
|
149
|
-
type: String as PropType<string>,
|
|
151
|
+
type: String as PropType<string | null>,
|
|
150
152
|
required: false,
|
|
151
|
-
default:
|
|
153
|
+
default: null
|
|
152
154
|
},
|
|
153
155
|
iconColor: {
|
|
154
156
|
type: String as PropType<ColorBase>,
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<FSRow
|
|
16
16
|
style="position: sticky; top: 0px; z-index: 3;"
|
|
17
17
|
:style="{ backgroundColor, marginTop: $props.stickyTitleTopOffset }"
|
|
18
|
-
:padding="`
|
|
18
|
+
:padding="`16px ${isTouchScreenEnabled ? '20px' : '12px'} 12px 12px`"
|
|
19
19
|
>
|
|
20
20
|
<slot
|
|
21
21
|
name="title"
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
</FSRow>
|
|
30
30
|
<FSCol
|
|
31
31
|
v-if="$props.breadcrumbs && $props.breadcrumbs.length > 0"
|
|
32
|
-
:padding="$
|
|
32
|
+
:padding="`0px ${isTouchScreenEnabled ? '20px' : '12px'} ${$slots.toolbar ? '12px' : '0px'} 12px`"
|
|
33
33
|
gap="16px"
|
|
34
34
|
>
|
|
35
35
|
<FSCol>
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<FSRow
|
|
46
46
|
v-if="$slots.toolbar"
|
|
47
47
|
:style="stickyToolbar ? `position: sticky; top: ${$props.toolbarTopOffset}; z-index: 3; background-color: ${backgroundColor}` : undefined"
|
|
48
|
-
:padding="`0px ${isTouchScreenEnabled ? '
|
|
48
|
+
:padding="`0px ${isTouchScreenEnabled ? '20px' : '12px'} 12px 12px`"
|
|
49
49
|
>
|
|
50
50
|
<FSSlideGroup>
|
|
51
51
|
<slot
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
<FSCol
|
|
59
59
|
height="fill"
|
|
60
60
|
gap="0px"
|
|
61
|
-
:padding="
|
|
61
|
+
:padding="`0px ${isTouchScreenEnabled ? '20px' : '12px'} 16px 12px`"
|
|
62
62
|
>
|
|
63
63
|
<slot />
|
|
64
64
|
</FSCol>
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
#title
|
|
9
9
|
>
|
|
10
10
|
<FSRow
|
|
11
|
-
gap="
|
|
11
|
+
gap="12px"
|
|
12
|
+
:height="actualImageSize"
|
|
12
13
|
:wrap="false"
|
|
13
14
|
>
|
|
14
15
|
<FSImage
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
style="min-width: 0"
|
|
32
33
|
align="center-left"
|
|
33
34
|
height="fill"
|
|
35
|
+
:gap="$props.subtitle && $props.description ? '6px' : '8px'"
|
|
34
36
|
>
|
|
35
37
|
<slot
|
|
36
38
|
name="title"
|
|
@@ -44,26 +46,31 @@
|
|
|
44
46
|
name="title-extra"
|
|
45
47
|
v-bind="{ topOffset }"
|
|
46
48
|
>
|
|
47
|
-
<
|
|
48
|
-
|
|
49
|
+
<FSCol
|
|
50
|
+
gap="4px"
|
|
49
51
|
>
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
font="text-button"
|
|
52
|
+
<slot
|
|
53
|
+
name="subtitle"
|
|
53
54
|
>
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
55
|
+
<FSText
|
|
56
|
+
v-if="$props.subtitle && topOffset < 48"
|
|
57
|
+
font="text-button"
|
|
58
|
+
>
|
|
59
|
+
{{ $props.subtitle }}
|
|
60
|
+
</FSText>
|
|
61
|
+
</slot>
|
|
62
|
+
<slot
|
|
63
|
+
name="description"
|
|
63
64
|
>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
<FSText
|
|
66
|
+
v-if="$props.description && topOffset < 8"
|
|
67
|
+
:lineClamp="2"
|
|
68
|
+
font="text-body"
|
|
69
|
+
>
|
|
70
|
+
{{ $props.description }}
|
|
71
|
+
</FSText>
|
|
72
|
+
</slot>
|
|
73
|
+
</FSCol>
|
|
67
74
|
</slot>
|
|
68
75
|
</slot>
|
|
69
76
|
</FSCol>
|
|
@@ -136,9 +143,9 @@ export default defineComponent({
|
|
|
136
143
|
default: () => ["124px", "96px", "80px"]
|
|
137
144
|
},
|
|
138
145
|
icon: {
|
|
139
|
-
type: String as PropType<string>,
|
|
146
|
+
type: String as PropType<string | null>,
|
|
140
147
|
required: false,
|
|
141
|
-
default:
|
|
148
|
+
default: null
|
|
142
149
|
},
|
|
143
150
|
iconColor: {
|
|
144
151
|
type: String as PropType<ColorBase>,
|
|
@@ -183,7 +190,7 @@ export default defineComponent({
|
|
|
183
190
|
const minSize = sizeToVar(props.minImageSize);
|
|
184
191
|
const actualMinSize = parseInt(minSize);
|
|
185
192
|
|
|
186
|
-
topOffset.value = Math.max(0, Math.min(actualScrollTop, actualMinSize + 16 +
|
|
193
|
+
topOffset.value = Math.max(0, Math.min(actualScrollTop, actualMinSize + 16 + 12));
|
|
187
194
|
}
|
|
188
195
|
|
|
189
196
|
delete slots.title;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.158-sankey2",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.158-sankey2",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.158-sankey2"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^1.0.0",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "3bdd971b1260dda85c68b5c550521861a513c2f1"
|
|
39
39
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.fs-range-slider {
|
|
2
|
+
padding: 0px !important;
|
|
3
|
+
width: calc(100% - 16px);
|
|
4
|
+
|
|
5
|
+
& .v-slider__container {
|
|
6
|
+
cursor: var(--fs-range-slider-cursor);
|
|
7
|
+
margin-left: 8px;
|
|
8
|
+
margin-right: 8px;
|
|
9
|
+
opacity: 1 !important;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
& .v-slider-track__background {
|
|
13
|
+
background-color: var(--fs-range-slider-track-color);
|
|
14
|
+
height: 6px !important;
|
|
15
|
+
opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
& .v-slider-track__fill {
|
|
19
|
+
background-color: var(--fs-range-slider-fill-color);
|
|
20
|
+
opacity: 0.7 !important;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
& .v-slider-track__tick {
|
|
24
|
+
background-color: var(--fs-range-slider-thumb-color);
|
|
25
|
+
border-radius: 50%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
& .v-slider-thumb {
|
|
29
|
+
color: var(--fs-range-slider-thumb-color);
|
|
30
|
+
|
|
31
|
+
&__surface:before {
|
|
32
|
+
display: none !important;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&__surface:after {
|
|
36
|
+
display: none !important;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__ripple {
|
|
40
|
+
display: none !important;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.fs-range-slider-label {
|
|
46
|
+
color: var(--fs-range-slider-color);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.fs-range-slider-description {
|
|
50
|
+
color: var(--fs-range-slider-color);
|
|
51
|
+
}
|