@dative-gpi/foundation-shared-components 1.0.32 → 1.0.34
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/fields/FSAutocompleteField.vue +3 -3
- package/components/fields/FSSelectField.vue +3 -3
- 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/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/map/FSMapEditPointAddressOverlay.vue +0 -164
- package/styles/components/fs_map_overlay.scss +0 -38
|
@@ -5,53 +5,54 @@
|
|
|
5
5
|
|
|
6
6
|
.fs-leaflet-container {
|
|
7
7
|
width: 100%;
|
|
8
|
-
height:
|
|
8
|
+
height: 100%;
|
|
9
9
|
filter: grayscale(var(--fs-map-container-grayscale));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.fs-map-overlay-
|
|
12
|
+
.fs-map-overlay-mobile {
|
|
13
13
|
position: absolute;
|
|
14
|
-
|
|
14
|
+
bottom: 0;
|
|
15
|
+
left: 0;
|
|
15
16
|
right: 0;
|
|
16
|
-
|
|
17
|
-
margin:
|
|
17
|
+
width: 100%;
|
|
18
|
+
margin: 0;
|
|
19
|
+
transition: height 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
.fs-map-overlay-
|
|
22
|
+
.fs-map-overlay-desktop {
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 0;
|
|
25
|
+
left: 0;
|
|
26
|
+
margin: 12px;
|
|
27
|
+
max-height: calc(100% - 24px);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fs-map-layer-button {
|
|
21
31
|
position: absolute;
|
|
22
32
|
top: 0;
|
|
23
33
|
right: 0;
|
|
24
|
-
margin:
|
|
34
|
+
margin: 12px;
|
|
25
35
|
}
|
|
26
36
|
|
|
27
|
-
.fs-map-
|
|
37
|
+
.fs-map-control-buttons {
|
|
28
38
|
position: absolute;
|
|
29
39
|
bottom: 0;
|
|
30
40
|
right: 0;
|
|
31
|
-
|
|
32
|
-
margin:
|
|
33
|
-
width: calc(100% - 16px);
|
|
34
|
-
|
|
41
|
+
margin: 12px;
|
|
42
|
+
margin-bottom: calc(12px + var(--fs-map-control-buttons-margin-bottom));
|
|
35
43
|
|
|
36
|
-
.fs-map-zoom-
|
|
37
|
-
|
|
38
|
-
bottom:
|
|
39
|
-
right: 0;
|
|
40
|
-
z-index: 1001;
|
|
41
|
-
margin-bottom: calc(var(--fs-map-leaflet-bottom-overlay-margin) + 8px);
|
|
44
|
+
.fs-map-zoom-plus-button > * {
|
|
45
|
+
border-bottom-left-radius: 0 !important;
|
|
46
|
+
border-bottom-right-radius: 0 !important;
|
|
42
47
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
border-bottom-right-radius: 0 !important;
|
|
46
|
-
}
|
|
48
|
+
border-bottom: 0px !important;
|
|
49
|
+
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
border-top-right-radius: 0 !important;
|
|
51
|
+
.fs-map-zoom-minus-button > * {
|
|
52
|
+
border-top-left-radius: 0 !important;
|
|
53
|
+
border-top-right-radius: 0 !important;
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
}
|
|
55
|
+
border-top: 0px !important;
|
|
55
56
|
}
|
|
56
57
|
}
|
|
57
58
|
|
|
@@ -76,6 +77,11 @@
|
|
|
76
77
|
}
|
|
77
78
|
}
|
|
78
79
|
|
|
80
|
+
.fs-map-point-pin {
|
|
81
|
+
background-color: var(--fs-map-point-pin-color);
|
|
82
|
+
border-radius: 100%;
|
|
83
|
+
}
|
|
84
|
+
|
|
79
85
|
.fs-map-location > div {
|
|
80
86
|
display: flex;
|
|
81
87
|
height: 100%;
|
|
@@ -105,11 +111,11 @@
|
|
|
105
111
|
|
|
106
112
|
@keyframes fs-map-shadow-location {
|
|
107
113
|
0% {
|
|
108
|
-
box-shadow: 0 0 0px 0px var(--fs-map-
|
|
114
|
+
box-shadow: 0 0 0px 0px var(--fs-map-location-pin-color-alpha);
|
|
109
115
|
}
|
|
110
116
|
|
|
111
117
|
50% {
|
|
112
|
-
box-shadow: 0 0 0px 7px var(--fs-map-
|
|
118
|
+
box-shadow: 0 0 0px 7px var(--fs-map-location-pin-color-alpha);
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
100% {
|
|
@@ -4,10 +4,12 @@
|
|
|
4
4
|
|
|
5
5
|
@include web {
|
|
6
6
|
height: 48px !important;
|
|
7
|
+
max-height: 48px;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
@include mobile {
|
|
10
11
|
height: 40px !important;
|
|
12
|
+
max-height: 40px;
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
@@ -30,10 +32,12 @@
|
|
|
30
32
|
|
|
31
33
|
@include web {
|
|
32
34
|
height: 48px !important;
|
|
35
|
+
max-height: 48px;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
@include mobile {
|
|
36
39
|
height: 40px !important;
|
|
40
|
+
max-height: 40px;
|
|
37
41
|
}
|
|
38
42
|
}
|
|
39
43
|
|
package/utils/leafletMarkers.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const locationMarkerHtml = (icon: string, color: string) => {
|
|
2
2
|
const iconHtml = `
|
|
3
|
-
<div style="--fs-map-
|
|
3
|
+
<div style="--fs-map-location-pin-color-alpha:${color}50;--fs-map-location-pin-color: ${color}">
|
|
4
4
|
<i class="${icon} mdi notranslate v-theme--DefaultTheme fs-icon" aria-hidden="true" style="--fs-icon-font-size: 22px;" />
|
|
5
5
|
</div>`;
|
|
6
6
|
|
|
@@ -16,8 +16,14 @@ export const clusterMarkerHtml = (label: string) => {
|
|
|
16
16
|
return iconHtml;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const gpsMarkerHtml = () => {
|
|
20
20
|
const iconHtml = `<div class="fs-map-mylocation-pin" />`;
|
|
21
21
|
|
|
22
|
+
return iconHtml;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const pinMarkerHtml = (color: string) => {
|
|
26
|
+
const iconHtml = `<div style="--fs-map-point-pin-color:${color}" class="fs-map-point-pin" />`;
|
|
27
|
+
|
|
22
28
|
return iconHtml;
|
|
23
29
|
}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<FSCard
|
|
3
|
-
padding="16px"
|
|
4
|
-
height="100%"
|
|
5
|
-
width="100%"
|
|
6
|
-
:elevation="true"
|
|
7
|
-
>
|
|
8
|
-
<FSCol
|
|
9
|
-
gap="24px"
|
|
10
|
-
>
|
|
11
|
-
<FSRow>
|
|
12
|
-
<FSText
|
|
13
|
-
font="text-h3"
|
|
14
|
-
>
|
|
15
|
-
{{ $tr('ui.map.modify-location', 'Modify location') }}
|
|
16
|
-
</FSText>
|
|
17
|
-
<v-spacer />
|
|
18
|
-
<FSButton
|
|
19
|
-
v-if="menuLocationCoordinates"
|
|
20
|
-
icon="mdi-arrow-collapse"
|
|
21
|
-
variant="icon"
|
|
22
|
-
@click="menuLocationCoordinates = !menuLocationCoordinates"
|
|
23
|
-
/>
|
|
24
|
-
<FSButton
|
|
25
|
-
v-else
|
|
26
|
-
icon="mdi-arrow-expand"
|
|
27
|
-
variant="icon"
|
|
28
|
-
@click="menuLocationCoordinates = !menuLocationCoordinates"
|
|
29
|
-
/>
|
|
30
|
-
</FSRow>
|
|
31
|
-
<FSCol
|
|
32
|
-
v-if="menuLocationCoordinates"
|
|
33
|
-
>
|
|
34
|
-
<FSAutoCompleteAddress
|
|
35
|
-
:modelValue="$props.modelValue"
|
|
36
|
-
@update:modelValue="onAddressFieldSubmit($event)"
|
|
37
|
-
/>
|
|
38
|
-
<FSForm
|
|
39
|
-
variant="standard"
|
|
40
|
-
@submit="onCoordinatesChange()"
|
|
41
|
-
>
|
|
42
|
-
<FSRow>
|
|
43
|
-
<FSNumberField
|
|
44
|
-
:label="$tr('ui.map.latitude', 'Latitude')"
|
|
45
|
-
v-model="latitude"
|
|
46
|
-
/>
|
|
47
|
-
<FSNumberField
|
|
48
|
-
:label="$tr('ui.map.longitude', 'Longitude')"
|
|
49
|
-
v-model="longitude"
|
|
50
|
-
/>
|
|
51
|
-
</FSRow>
|
|
52
|
-
<FSButton
|
|
53
|
-
prependIcon="mdi-content-save"
|
|
54
|
-
style="display: none;"
|
|
55
|
-
color="primary"
|
|
56
|
-
type="submit"
|
|
57
|
-
:label="$tr('ui.map.save', 'Save')"
|
|
58
|
-
/>
|
|
59
|
-
</FSForm>
|
|
60
|
-
</FSCol>
|
|
61
|
-
<FSRow
|
|
62
|
-
align="center-right"
|
|
63
|
-
>
|
|
64
|
-
<FSButton
|
|
65
|
-
:label="$tr('ui.map.cancel', 'Cancel')"
|
|
66
|
-
@click="onCancel"
|
|
67
|
-
/>
|
|
68
|
-
<FSButton
|
|
69
|
-
prependIcon="mdi-content-save"
|
|
70
|
-
color="primary"
|
|
71
|
-
:label="$tr('ui.map.save', 'Save')"
|
|
72
|
-
@click="onSubmit"
|
|
73
|
-
/>
|
|
74
|
-
</FSRow>
|
|
75
|
-
</FSCol>
|
|
76
|
-
</FSCard>
|
|
77
|
-
</template>
|
|
78
|
-
|
|
79
|
-
<script lang="ts">
|
|
80
|
-
import { defineComponent, type PropType, ref, watch } from "vue";
|
|
81
|
-
|
|
82
|
-
import { Address } from "@dative-gpi/foundation-shared-domain/models";
|
|
83
|
-
|
|
84
|
-
import FSAutoCompleteAddress from "../autocompletes/FSAutoCompleteAddress.vue";
|
|
85
|
-
import FSNumberField from "../fields/FSNumberField.vue";
|
|
86
|
-
import FSButton from "../FSButton.vue";
|
|
87
|
-
import FSCard from "../FSCard.vue";
|
|
88
|
-
import FSForm from "../FSForm.vue";
|
|
89
|
-
import FSText from "../FSText.vue";
|
|
90
|
-
import FSCol from "../FSCol.vue";
|
|
91
|
-
import FSRow from "../FSRow.vue";
|
|
92
|
-
|
|
93
|
-
export default defineComponent({
|
|
94
|
-
name: "FSMapEditPointAddressOverlay.vue",
|
|
95
|
-
components: {
|
|
96
|
-
FSAutoCompleteAddress,
|
|
97
|
-
FSNumberField,
|
|
98
|
-
FSButton,
|
|
99
|
-
FSCard,
|
|
100
|
-
FSForm,
|
|
101
|
-
FSText,
|
|
102
|
-
FSCol,
|
|
103
|
-
FSRow
|
|
104
|
-
},
|
|
105
|
-
props: {
|
|
106
|
-
modelValue: {
|
|
107
|
-
type: Object as PropType<Address | null>,
|
|
108
|
-
default: null
|
|
109
|
-
}
|
|
110
|
-
},
|
|
111
|
-
emits: ["update:modelValue", "update:locationCoordinates", "submit", "cancel"],
|
|
112
|
-
setup(props, { emit }) {
|
|
113
|
-
const menuLocationCoordinates = ref(false);
|
|
114
|
-
|
|
115
|
-
const latitude = ref(0);
|
|
116
|
-
const longitude = ref(0);
|
|
117
|
-
|
|
118
|
-
const onCoordinatesChange = () => {
|
|
119
|
-
const newModelValue = new Address({
|
|
120
|
-
country: "",
|
|
121
|
-
formattedAddress: "",
|
|
122
|
-
locality: "",
|
|
123
|
-
placeId: "",
|
|
124
|
-
placeLabel: "",
|
|
125
|
-
latitude: latitude.value,
|
|
126
|
-
longitude: longitude.value,
|
|
127
|
-
});
|
|
128
|
-
emit("update:locationCoordinates", newModelValue);
|
|
129
|
-
};
|
|
130
|
-
|
|
131
|
-
const onAddressFieldSubmit = (address: Address|null) => {
|
|
132
|
-
if(!address) {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
135
|
-
emit('update:modelValue', address);
|
|
136
|
-
};
|
|
137
|
-
|
|
138
|
-
const onSubmit = () => {
|
|
139
|
-
emit('submit');
|
|
140
|
-
};
|
|
141
|
-
|
|
142
|
-
const onCancel = () => {
|
|
143
|
-
emit('cancel');
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
watch(() => props.modelValue, () => {
|
|
147
|
-
if (props.modelValue) {
|
|
148
|
-
latitude.value = props.modelValue.latitude;
|
|
149
|
-
longitude.value = props.modelValue.longitude;
|
|
150
|
-
}
|
|
151
|
-
}, { immediate: true });
|
|
152
|
-
|
|
153
|
-
return {
|
|
154
|
-
menuLocationCoordinates,
|
|
155
|
-
longitude,
|
|
156
|
-
latitude,
|
|
157
|
-
onAddressFieldSubmit,
|
|
158
|
-
onCoordinatesChange,
|
|
159
|
-
onCancel,
|
|
160
|
-
onSubmit
|
|
161
|
-
};
|
|
162
|
-
}
|
|
163
|
-
});
|
|
164
|
-
</script>
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
.fs-map-overlay-left {
|
|
2
|
-
position: absolute;
|
|
3
|
-
top: 0;
|
|
4
|
-
left: 0;
|
|
5
|
-
z-index: 950;
|
|
6
|
-
margin: 4px;
|
|
7
|
-
|
|
8
|
-
.fs-map-overlay-left-content {
|
|
9
|
-
max-height: var(--fs-map-overlay-max-height);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
.fs-map-overlay-left-mobile {
|
|
14
|
-
position: absolute;
|
|
15
|
-
bottom: 0;
|
|
16
|
-
left: 0;
|
|
17
|
-
width: 100%;
|
|
18
|
-
z-index: 1050;
|
|
19
|
-
margin: 0;
|
|
20
|
-
transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
|
|
21
|
-
background-color: rgba(0, 0, 0, 0.2);
|
|
22
|
-
border-radius: 4px;
|
|
23
|
-
|
|
24
|
-
>* {
|
|
25
|
-
width: 100%;
|
|
26
|
-
height: var(--fs-map-overlay-card-height);
|
|
27
|
-
margin: 0;
|
|
28
|
-
transition: none;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.fs-map-overlay-left-mobile-content {
|
|
32
|
-
max-height: calc(100% - 20px);
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.fs-fade-out {
|
|
36
|
-
transition: none;
|
|
37
|
-
}
|
|
38
|
-
}
|