@dative-gpi/foundation-shared-components 1.0.33 → 1.0.35
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/FSClickable.vue +9 -0
- package/components/FSDialogFormBody.vue +4 -4
- package/components/FSDialogMultiFormBody.vue +3 -3
- package/components/FSDialogSubmit.vue +3 -3
- package/components/FSFadeOut.vue +10 -3
- package/components/autocompletes/FSAutocompleteLanguage.vue +18 -39
- package/components/autocompletes/FSAutocompleteTimeZone.vue +19 -37
- package/components/fields/FSAutocompleteField.vue +422 -254
- package/components/fields/FSAutocompleteTag.vue +100 -0
- package/components/fields/FSSelectField.vue +3 -3
- package/components/fields/FSTextField.vue +11 -7
- package/components/fields/FSTreeViewField.vue +3 -3
- package/components/fields/periodicField/FSPeriodicDailyField.vue +17 -10
- package/components/fields/periodicField/FSPeriodicMonthlyField.vue +29 -15
- package/components/fields/periodicField/FSPeriodicWeeklyField.vue +13 -7
- package/components/fields/periodicField/FSPeriodicYearlyField.vue +19 -10
- package/components/lists/FSFilterButton.vue +19 -20
- package/components/lists/FSHiddenButton.vue +10 -12
- package/components/map/FSMap.vue +240 -399
- package/components/map/FSMapFeatureGroup.vue +51 -0
- package/components/map/FSMapLayerButton.vue +2 -2
- package/components/map/FSMapMarker.vue +116 -0
- package/components/map/FSMapMarkerClusterGroup.vue +67 -0
- package/components/map/FSMapOverlay.vue +69 -83
- package/components/map/FSMapPolygon.vue +81 -0
- package/components/map/FSMapTileLayer.vue +50 -0
- package/components/map/keys.ts +4 -0
- package/composables/useAddress.ts +2 -2
- package/package.json +4 -4
- package/styles/components/fs_card.scss +0 -1
- package/styles/components/fs_clickable.scss +1 -1
- package/styles/components/fs_fade_out.scss +2 -1
- package/styles/components/fs_map.scss +36 -30
- package/styles/components/fs_tabs.scss +4 -0
- package/styles/components/index.scss +0 -1
- package/utils/leafletMarkers.ts +8 -2
- package/components/autocompletes/FSAutocompleteTag.vue +0 -138
- package/components/map/FSMapEditPointAddressOverlay.vue +0 -164
- package/styles/components/fs_map_overlay.scss +0 -38
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
v-if="$props.href"
|
|
4
4
|
:href="$props.href"
|
|
5
5
|
:style="style"
|
|
6
|
+
:class="$props.class"
|
|
6
7
|
@mouseover="hover = true"
|
|
7
8
|
@mouseleave="hover = false"
|
|
8
9
|
@mousedown="active = true"
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
v-else-if="$props.to"
|
|
45
46
|
:style="style"
|
|
46
47
|
:to="$props.to"
|
|
48
|
+
:class="$props.class"
|
|
47
49
|
@mouseover="hover = true"
|
|
48
50
|
@mouseleave="hover = false"
|
|
49
51
|
@mousedown="active = true"
|
|
@@ -85,6 +87,7 @@
|
|
|
85
87
|
v-else
|
|
86
88
|
:type="$props.type"
|
|
87
89
|
:style="style"
|
|
90
|
+
:class="$props.class"
|
|
88
91
|
@click.stop="onClick"
|
|
89
92
|
@mouseover="hover = true"
|
|
90
93
|
@mouseleave="hover = false"
|
|
@@ -115,6 +118,7 @@
|
|
|
115
118
|
v-if="$props.load"
|
|
116
119
|
>
|
|
117
120
|
<v-progress-circular
|
|
121
|
+
:class="$props.class"
|
|
118
122
|
class="fs-clickable-load"
|
|
119
123
|
width="2"
|
|
120
124
|
size="24"
|
|
@@ -156,6 +160,11 @@ export default defineComponent({
|
|
|
156
160
|
required: false,
|
|
157
161
|
default: "0"
|
|
158
162
|
},
|
|
163
|
+
class: {
|
|
164
|
+
type: [String, Array] as PropType<string | string[] | null>,
|
|
165
|
+
required: false,
|
|
166
|
+
default: null
|
|
167
|
+
},
|
|
159
168
|
to: {
|
|
160
169
|
type: [String, Object] as PropType<string | RouteLocation | null>,
|
|
161
170
|
required: false,
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
gap="24px"
|
|
13
13
|
>
|
|
14
14
|
<FSFadeOut
|
|
15
|
-
:height="height"
|
|
16
15
|
padding="0 8px 0 0"
|
|
16
|
+
:maxHeight="maxHeight"
|
|
17
17
|
>
|
|
18
18
|
<slot
|
|
19
19
|
name="body"
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
gap="24px"
|
|
61
61
|
>
|
|
62
62
|
<FSFadeOut
|
|
63
|
-
:height="height"
|
|
64
63
|
padding="0 8px 0 0"
|
|
64
|
+
:maxHeight="maxHeight"
|
|
65
65
|
>
|
|
66
66
|
<slot
|
|
67
67
|
name="validation"
|
|
@@ -227,7 +227,7 @@ export default defineComponent({
|
|
|
227
227
|
const formRef = ref<HTMLElement | null>(null);
|
|
228
228
|
const valid = ref(false);
|
|
229
229
|
|
|
230
|
-
const
|
|
230
|
+
const maxHeight = computed(() => {
|
|
231
231
|
const other = 24 + 24 // Paddings
|
|
232
232
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
233
233
|
+ (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
|
|
@@ -262,8 +262,8 @@ export default defineComponent({
|
|
|
262
262
|
cancelLabel,
|
|
263
263
|
submitLabel,
|
|
264
264
|
ColorEnum,
|
|
265
|
+
maxHeight,
|
|
265
266
|
formRef,
|
|
266
|
-
height,
|
|
267
267
|
valid,
|
|
268
268
|
onValidate,
|
|
269
269
|
onSubmit
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
gap="24px"
|
|
15
15
|
>
|
|
16
16
|
<FSFadeOut
|
|
17
|
-
:height="height"
|
|
18
17
|
padding="0 8px 0 0"
|
|
18
|
+
:maxHeight="maxHeight"
|
|
19
19
|
>
|
|
20
20
|
<slot
|
|
21
21
|
:name="`step-${step}`"
|
|
@@ -167,7 +167,7 @@ export default defineComponent({
|
|
|
167
167
|
const valid = ref(false);
|
|
168
168
|
const valids = ref(Array.from({ length: props.steps }, () => false));
|
|
169
169
|
|
|
170
|
-
const
|
|
170
|
+
const maxHeight = computed(() => {
|
|
171
171
|
const other = 24 + 24 // Paddings
|
|
172
172
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
173
173
|
+ (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
|
|
@@ -220,7 +220,7 @@ export default defineComponent({
|
|
|
220
220
|
nextButtonLabel,
|
|
221
221
|
currentStep,
|
|
222
222
|
ColorEnum,
|
|
223
|
-
|
|
223
|
+
maxHeight,
|
|
224
224
|
valids,
|
|
225
225
|
valid,
|
|
226
226
|
onPrevious,
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
#body
|
|
12
12
|
>
|
|
13
13
|
<FSFadeOut
|
|
14
|
-
:height="height"
|
|
15
14
|
padding="0 8px 0 0"
|
|
15
|
+
:maxHeight="maxHeight"
|
|
16
16
|
>
|
|
17
17
|
<slot
|
|
18
18
|
name="body"
|
|
@@ -167,7 +167,7 @@ export default defineComponent({
|
|
|
167
167
|
const { isMobileSized } = useBreakpoints();
|
|
168
168
|
const { $tr } = useTranslationsProvider();
|
|
169
169
|
|
|
170
|
-
const
|
|
170
|
+
const maxHeight = computed(() => {
|
|
171
171
|
const other = 24 + 24 // Paddings
|
|
172
172
|
+ (isMobileSized.value ? 24 : 32) + 24 // Title
|
|
173
173
|
+ (props.subtitle ? (isMobileSized.value ? 14 : 16) + 8 : 0) // Subtitle
|
|
@@ -187,7 +187,7 @@ export default defineComponent({
|
|
|
187
187
|
cancelLabel,
|
|
188
188
|
submitLabel,
|
|
189
189
|
ColorEnum,
|
|
190
|
-
|
|
190
|
+
maxHeight
|
|
191
191
|
};
|
|
192
192
|
}
|
|
193
193
|
});
|
package/components/FSFadeOut.vue
CHANGED
|
@@ -22,8 +22,14 @@ export default defineComponent({
|
|
|
22
22
|
name: "FSFadeOut",
|
|
23
23
|
props: {
|
|
24
24
|
height: {
|
|
25
|
-
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
26
|
-
required:
|
|
25
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null | undefined>,
|
|
26
|
+
required: false,
|
|
27
|
+
default: undefined
|
|
28
|
+
},
|
|
29
|
+
maxHeight: {
|
|
30
|
+
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null | undefined>,
|
|
31
|
+
required: false,
|
|
32
|
+
default: undefined
|
|
27
33
|
},
|
|
28
34
|
width: {
|
|
29
35
|
type: [Array, String, Number] as PropType<string[] | number[] | string | number | null>,
|
|
@@ -59,7 +65,8 @@ export default defineComponent({
|
|
|
59
65
|
const elementId = `id${uuidv4()}`;
|
|
60
66
|
|
|
61
67
|
const style = computed((): StyleValue => ({
|
|
62
|
-
"--fs-fade-out-height" : sizeToVar(props.height),
|
|
68
|
+
"--fs-fade-out-height" : props.height ? sizeToVar(props.height) : undefined,
|
|
69
|
+
"--fs-fade-out-max-height" : props.maxHeight ? sizeToVar(props.maxHeight) : undefined,
|
|
63
70
|
"--fs-fade-out-width" : sizeToVar(props.width),
|
|
64
71
|
"--fs-fade-out-padding" : sizeToVar(props.padding),
|
|
65
72
|
"--fs-fade-out-mask-color" : backgrounds.base,
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
<FSAutocompleteField
|
|
3
3
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
4
4
|
:multiple="$props.multiple"
|
|
5
|
+
:placeholder="placeholder"
|
|
5
6
|
:loading="loading"
|
|
6
7
|
:items="languages"
|
|
7
8
|
:modelValue="$props.modelValue"
|
|
@@ -9,64 +10,33 @@
|
|
|
9
10
|
v-bind="$attrs"
|
|
10
11
|
>
|
|
11
12
|
<template
|
|
12
|
-
#
|
|
13
|
+
#item-prepend="{ item }"
|
|
13
14
|
>
|
|
14
|
-
<
|
|
15
|
-
v-if="
|
|
16
|
-
align="center-center"
|
|
17
|
-
:wrap="false"
|
|
15
|
+
<FSIcon
|
|
16
|
+
v-if="item.icon"
|
|
18
17
|
>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
>
|
|
22
|
-
{{ item.raw.icon }}
|
|
23
|
-
</FSIcon>
|
|
24
|
-
<FSSpan>
|
|
25
|
-
{{ item.raw.label }}
|
|
26
|
-
</FSSpan>
|
|
27
|
-
</FSRow>
|
|
28
|
-
</template>
|
|
29
|
-
<template
|
|
30
|
-
#item-label="{ item, font }"
|
|
31
|
-
>
|
|
32
|
-
<FSRow
|
|
33
|
-
align="center-left"
|
|
34
|
-
:wrap="false"
|
|
35
|
-
>
|
|
36
|
-
<FSIcon
|
|
37
|
-
v-if="item.raw.icon"
|
|
38
|
-
>
|
|
39
|
-
{{ item.raw.icon }}
|
|
40
|
-
</FSIcon>
|
|
41
|
-
<FSSpan
|
|
42
|
-
:font="font"
|
|
43
|
-
>
|
|
44
|
-
{{ item.raw.label }}
|
|
45
|
-
</FSSpan>
|
|
46
|
-
</FSRow>
|
|
18
|
+
{{ item.icon }}
|
|
19
|
+
</FSIcon>
|
|
47
20
|
</template>
|
|
48
21
|
</FSAutocompleteField>
|
|
49
22
|
</template>
|
|
50
23
|
|
|
51
24
|
<script lang="ts">
|
|
52
|
-
import { computed, defineComponent, type PropType } from "vue"
|
|
25
|
+
import { computed, defineComponent, type PropType } from "vue";
|
|
53
26
|
|
|
54
27
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
55
28
|
import { type LanguageFilters } from "@dative-gpi/foundation-shared-domain/models";
|
|
29
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui";
|
|
56
30
|
import { useLanguages } from "@dative-gpi/foundation-shared-services/composables";
|
|
57
31
|
|
|
58
32
|
import FSAutocompleteField from "../fields/FSAutocompleteField.vue";
|
|
59
33
|
import FSIcon from "../FSIcon.vue";
|
|
60
|
-
import FSSpan from "../FSSpan.vue";
|
|
61
|
-
import FSRow from "../FSRow.vue";
|
|
62
34
|
|
|
63
35
|
export default defineComponent({
|
|
64
36
|
name: "FSAutocompleteLanguage",
|
|
65
37
|
components: {
|
|
66
38
|
FSAutocompleteField,
|
|
67
|
-
FSIcon
|
|
68
|
-
FSSpan,
|
|
69
|
-
FSRow
|
|
39
|
+
FSIcon
|
|
70
40
|
},
|
|
71
41
|
props: {
|
|
72
42
|
languageFilters: {
|
|
@@ -93,11 +63,19 @@ export default defineComponent({
|
|
|
93
63
|
emits: ["update:modelValue"],
|
|
94
64
|
setup(props, { emit }) {
|
|
95
65
|
const { getMany: getManyLanguages, fetching: fetchingLanguages, entities: languages } = useLanguages();
|
|
66
|
+
const { $tr } = useTranslationsProvider();
|
|
96
67
|
|
|
97
68
|
const loading = computed((): boolean => {
|
|
98
69
|
return init.value && fetchingLanguages.value;
|
|
99
70
|
});
|
|
100
71
|
|
|
72
|
+
const placeholder = computed((): string | null => {
|
|
73
|
+
if (props.multiple && props.modelValue) {
|
|
74
|
+
return $tr("ui.autocomplete-language.placeholder", "{0} language(s) selected", props.modelValue.length);
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
});
|
|
78
|
+
|
|
101
79
|
const fetch = (search: string | null) => {
|
|
102
80
|
return getManyLanguages({ ...props.languageFilters, search: search ?? undefined });
|
|
103
81
|
};
|
|
@@ -110,6 +88,7 @@ export default defineComponent({
|
|
|
110
88
|
);
|
|
111
89
|
|
|
112
90
|
return {
|
|
91
|
+
placeholder,
|
|
113
92
|
languages,
|
|
114
93
|
toggleSet,
|
|
115
94
|
loading,
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
itemTitle="id"
|
|
4
4
|
:toggleSet="!$props.toggleSetDisabled && toggleSet"
|
|
5
5
|
:multiple="$props.multiple"
|
|
6
|
+
:placeholder="placeholder"
|
|
6
7
|
:loading="loading"
|
|
7
8
|
:items="timeZones"
|
|
8
9
|
:modelValue="$props.modelValue"
|
|
@@ -10,37 +11,12 @@
|
|
|
10
11
|
v-bind="$attrs"
|
|
11
12
|
>
|
|
12
13
|
<template
|
|
13
|
-
#
|
|
14
|
+
#item-append="{ item }"
|
|
14
15
|
>
|
|
15
|
-
<
|
|
16
|
-
v-if="
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
>
|
|
20
|
-
<FSChip
|
|
21
|
-
:label="item.raw.offset"
|
|
22
|
-
/>
|
|
23
|
-
<FSSpan>
|
|
24
|
-
{{ item.raw.id }}
|
|
25
|
-
</FSSpan>
|
|
26
|
-
</FSRow>
|
|
27
|
-
</template>
|
|
28
|
-
<template
|
|
29
|
-
#item-label="{ item, font }"
|
|
30
|
-
>
|
|
31
|
-
<FSRow
|
|
32
|
-
align="center-left"
|
|
33
|
-
:wrap="false"
|
|
34
|
-
>
|
|
35
|
-
<FSChip
|
|
36
|
-
:label="item.raw.offset"
|
|
37
|
-
/>
|
|
38
|
-
<FSSpan
|
|
39
|
-
:font="font"
|
|
40
|
-
>
|
|
41
|
-
{{ item.raw.id }}
|
|
42
|
-
</FSSpan>
|
|
43
|
-
</FSRow>
|
|
16
|
+
<FSChip
|
|
17
|
+
v-if="item.offset"
|
|
18
|
+
:label="item.offset.split(':')[0]"
|
|
19
|
+
/>
|
|
44
20
|
</template>
|
|
45
21
|
<template
|
|
46
22
|
#toggle-set-item="props"
|
|
@@ -53,10 +29,10 @@
|
|
|
53
29
|
@click="props.toggle(props.item)"
|
|
54
30
|
>
|
|
55
31
|
<template
|
|
56
|
-
|
|
57
|
-
#prepend
|
|
32
|
+
#append
|
|
58
33
|
>
|
|
59
34
|
<FSChip
|
|
35
|
+
v-if="props.item.offset"
|
|
60
36
|
:label="props.item.offset.split(':')[0]"
|
|
61
37
|
/>
|
|
62
38
|
</template>
|
|
@@ -70,23 +46,20 @@ import { computed, defineComponent, type PropType } from "vue";
|
|
|
70
46
|
|
|
71
47
|
import { type TimeZoneFilters, type TimeZoneInfos } from "@dative-gpi/foundation-shared-domain/models";
|
|
72
48
|
import { useAutocomplete } from "@dative-gpi/foundation-shared-components/composables";
|
|
49
|
+
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui";
|
|
73
50
|
import { useTimeZones } from "@dative-gpi/foundation-shared-services/composables";
|
|
74
51
|
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
75
52
|
|
|
76
53
|
import FSAutocompleteField from "../fields/FSAutocompleteField.vue";
|
|
77
54
|
import FSButton from "../FSButton.vue";
|
|
78
55
|
import FSChip from "../FSChip.vue";
|
|
79
|
-
import FSSpan from "../FSSpan.vue";
|
|
80
|
-
import FSRow from "../FSRow.vue";
|
|
81
56
|
|
|
82
57
|
export default defineComponent({
|
|
83
58
|
name: "FSAutocompleteTimeZone",
|
|
84
59
|
components: {
|
|
85
60
|
FSAutocompleteField,
|
|
86
61
|
FSButton,
|
|
87
|
-
FSChip
|
|
88
|
-
FSSpan,
|
|
89
|
-
FSRow
|
|
62
|
+
FSChip
|
|
90
63
|
},
|
|
91
64
|
props: {
|
|
92
65
|
timeZoneFilters: {
|
|
@@ -113,11 +86,19 @@ export default defineComponent({
|
|
|
113
86
|
emits: ["update:modelValue"],
|
|
114
87
|
setup(props, { emit }) {
|
|
115
88
|
const { getMany: getManyTimeZones, fetching: fetchingTimeZones, entities: timeZones } = useTimeZones();
|
|
89
|
+
const { $tr } = useTranslationsProvider();
|
|
116
90
|
|
|
117
91
|
const loading = computed((): boolean => {
|
|
118
92
|
return init.value && fetchingTimeZones.value;
|
|
119
93
|
});
|
|
120
94
|
|
|
95
|
+
const placeholder = computed((): string | null => {
|
|
96
|
+
if (props.multiple && props.modelValue) {
|
|
97
|
+
return $tr("ui.autocomplete-time-zone.placeholder", "{0} time zone(s) selected", props.modelValue.length);
|
|
98
|
+
}
|
|
99
|
+
return null;
|
|
100
|
+
});
|
|
101
|
+
|
|
121
102
|
const fetch = (search: string | null) => {
|
|
122
103
|
return getManyTimeZones({ ...props.timeZoneFilters, search: search ?? undefined });
|
|
123
104
|
};
|
|
@@ -133,6 +114,7 @@ export default defineComponent({
|
|
|
133
114
|
);
|
|
134
115
|
|
|
135
116
|
return {
|
|
117
|
+
placeholder,
|
|
136
118
|
ColorEnum,
|
|
137
119
|
timeZones,
|
|
138
120
|
toggleSet,
|