@dative-gpi/foundation-shared-components 0.0.212 → 0.0.214
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/assets/images/map/imagery.png +0 -0
- package/assets/images/map/map.png +0 -0
- package/components/FSEditImage.vue +9 -11
- package/components/fields/FSColorField.vue +3 -3
- package/components/fields/FSGradientField.vue +37 -20
- package/components/map/FSMap.vue +54 -66
- package/components/map/FSMapOverlay.vue +141 -0
- package/package.json +4 -4
- package/styles/components/fs_map.scss +3 -5
- package/styles/components/fs_map_overlay.scss +26 -0
- package/styles/components/index.scss +1 -0
- package/utils/gradient.ts +1599 -1598
- package/utils/index.ts +1 -0
- package/utils/leafletMarkers.ts +42 -0
- package/assets/images/map/osm.png +0 -0
|
Binary file
|
|
Binary file
|
|
@@ -65,13 +65,13 @@
|
|
|
65
65
|
>
|
|
66
66
|
<FSText
|
|
67
67
|
v-if="fileSelected && fileSelected.fileName"
|
|
68
|
-
lineClamp="2"
|
|
69
68
|
font="text-body"
|
|
69
|
+
:lineClamp="2"
|
|
70
70
|
>
|
|
71
71
|
{{ fileSelected.fileName }}
|
|
72
72
|
</FSText>
|
|
73
73
|
<FSCol
|
|
74
|
-
gap="
|
|
74
|
+
gap="0px"
|
|
75
75
|
>
|
|
76
76
|
<FSText
|
|
77
77
|
class="fs-edit-image-overline"
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
<FSButtonFileMini
|
|
98
98
|
accept="image/*"
|
|
99
99
|
:readFile="false"
|
|
100
|
-
@update:
|
|
100
|
+
@update:metadata="onUpload"
|
|
101
101
|
/>
|
|
102
102
|
<FSButtonRemoveMini
|
|
103
103
|
@click="onRemove"
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
<FSButtonFileMini
|
|
125
125
|
accept="image/*"
|
|
126
126
|
:readFile="false"
|
|
127
|
-
@update:
|
|
127
|
+
@update:metadata="onUpload"
|
|
128
128
|
/>
|
|
129
129
|
<FSButtonRemoveMini
|
|
130
130
|
@click="onRemove"
|
|
@@ -147,17 +147,17 @@
|
|
|
147
147
|
mdi-plus-box-outline
|
|
148
148
|
</FSIcon>
|
|
149
149
|
<FSText
|
|
150
|
-
lineClamp="2"
|
|
151
150
|
font="text-body"
|
|
151
|
+
:lineClamp="2"
|
|
152
152
|
>
|
|
153
153
|
{{ $tr('ui.edit-image.add-image', 'Add an image.') }}
|
|
154
154
|
</FSText>
|
|
155
155
|
<FSButtonFileMini
|
|
156
|
-
ref="invisibleButtonRef"
|
|
157
156
|
class="fs-edit-image-hidden-button"
|
|
157
|
+
ref="invisibleButtonRef"
|
|
158
158
|
accept="image/*"
|
|
159
159
|
:readFile="false"
|
|
160
|
-
@update:
|
|
160
|
+
@update:metadata="onUpload"
|
|
161
161
|
/>
|
|
162
162
|
</FSRow>
|
|
163
163
|
</FSClickable>
|
|
@@ -165,13 +165,11 @@
|
|
|
165
165
|
</template>
|
|
166
166
|
|
|
167
167
|
<script lang="ts">
|
|
168
|
-
import type
|
|
169
|
-
import { computed, defineComponent, ref, watch } from "vue";
|
|
168
|
+
import { computed, defineComponent, type PropType, ref, watch } from "vue";
|
|
170
169
|
|
|
171
170
|
import { useBreakpoints, useColors } from "@dative-gpi/foundation-shared-components/composables";
|
|
171
|
+
import { ColorEnum, type FileImage } from "@dative-gpi/foundation-shared-components/models";
|
|
172
172
|
import { useFiles } from "@dative-gpi/foundation-shared-services/composables";
|
|
173
|
-
import type { FileImage } from "@dative-gpi/foundation-shared-components/models";
|
|
174
|
-
import { ColorEnum } from "@dative-gpi/foundation-shared-components/models";
|
|
175
173
|
|
|
176
174
|
import FSButtonRemoveMini from "./buttons/FSButtonRemoveMini.vue";
|
|
177
175
|
import FSButtonFileMini from "./buttons/FSButtonFileMini.vue";
|
|
@@ -164,7 +164,7 @@ export default defineComponent({
|
|
|
164
164
|
|
|
165
165
|
const menu = ref(false);
|
|
166
166
|
|
|
167
|
-
const innerColor = ref(props.modelValue
|
|
167
|
+
const innerColor = ref(getColors(props.modelValue).base);
|
|
168
168
|
const innerOpacity = ref(getHexFromPercentage(props.opacityValue));
|
|
169
169
|
const fullColor = ref(innerColor.value + innerOpacity.value);
|
|
170
170
|
|
|
@@ -174,14 +174,14 @@ export default defineComponent({
|
|
|
174
174
|
"--fs-color-field-cursor" : "default",
|
|
175
175
|
"--fs-color-field-border-color" : lights.base,
|
|
176
176
|
"--fs-color-field-color" : lights.dark,
|
|
177
|
-
"--fs-color-field-colorvalue": fullColor.value,
|
|
177
|
+
"--fs-color-field-colorvalue" : fullColor.value,
|
|
178
178
|
};
|
|
179
179
|
}
|
|
180
180
|
return {
|
|
181
181
|
"--fs-color-field-cursor" : "pointer",
|
|
182
182
|
"--fs-color-field-border-color" : lights.dark,
|
|
183
183
|
"--fs-color-field-color" : darks.base,
|
|
184
|
-
"--fs-color-field-colorvalue": fullColor.value,
|
|
184
|
+
"--fs-color-field-colorvalue" : fullColor.value,
|
|
185
185
|
};
|
|
186
186
|
});
|
|
187
187
|
|
|
@@ -12,29 +12,30 @@
|
|
|
12
12
|
<FSRow>
|
|
13
13
|
<FSColorField
|
|
14
14
|
v-for="colorIndex in $props.colorCount"
|
|
15
|
-
:
|
|
16
|
-
:modelValue="$props.modelValue[colorIndex-1]"
|
|
15
|
+
:allowOpacity="$props.allowOpacity"
|
|
16
|
+
:modelValue="$props.modelValue[colorIndex - 1]"
|
|
17
17
|
:required="$props.required"
|
|
18
18
|
:editable="$props.editable"
|
|
19
|
-
|
|
19
|
+
:key="colorIndex"
|
|
20
|
+
@update:modelValue="$emit('update:modelValue', $props.modelValue.map((color, i) => colorIndex === i + 1 ? $event : color))"
|
|
20
21
|
/>
|
|
21
22
|
</FSRow>
|
|
22
23
|
<FSSelectField
|
|
23
24
|
class="fs-gradient-select-field"
|
|
24
|
-
:items="items"
|
|
25
|
-
@update:modelValue="$emit('update:modelValue', JSON.parse($event))"
|
|
26
25
|
:clearable="false"
|
|
27
26
|
:editable="$props.editable"
|
|
27
|
+
:items="items"
|
|
28
28
|
:modelValue="JSON.stringify($props.modelValue)"
|
|
29
|
+
@update:modelValue="$emit('update:modelValue', presetGradients[$event])"
|
|
29
30
|
>
|
|
30
31
|
<template
|
|
31
32
|
v-slot:selection="{ item }"
|
|
32
33
|
>
|
|
33
34
|
<FSRow
|
|
35
|
+
class="fs-gradient-field-preview"
|
|
34
36
|
height="fill"
|
|
35
37
|
width="100%"
|
|
36
|
-
|
|
37
|
-
:style="{ '--fs-gradient-field-background': `linear-gradient(to right, ${JSON.parse(item.value).join(', ')})` }"
|
|
38
|
+
:style="{ '--fs-gradient-field-background': `linear-gradient(to right, ${encodeGradientCssColors(JSON.parse(item.value))})` }"
|
|
38
39
|
>
|
|
39
40
|
<span />
|
|
40
41
|
</FSRow>
|
|
@@ -49,10 +50,10 @@
|
|
|
49
50
|
#title
|
|
50
51
|
>
|
|
51
52
|
<FSRow
|
|
53
|
+
class="fs-gradient-field-preview"
|
|
52
54
|
height="fill"
|
|
53
55
|
width="100%"
|
|
54
|
-
|
|
55
|
-
:style="{ '--fs-gradient-field-background': `linear-gradient(to right, ${JSON.parse(item.value).join(', ')})` }"
|
|
56
|
+
:style="{ '--fs-gradient-field-background': `linear-gradient(to right, ${encodeGradientCssColors(presetGradients[item.value])})` }"
|
|
56
57
|
>
|
|
57
58
|
<span />
|
|
58
59
|
</FSRow>
|
|
@@ -67,21 +68,23 @@
|
|
|
67
68
|
<script lang="ts">
|
|
68
69
|
import { type PropType, defineComponent } from "vue";
|
|
69
70
|
|
|
71
|
+
import { groupedGradients } from "../../utils";
|
|
72
|
+
import { useColors } from "../../composables";
|
|
73
|
+
|
|
74
|
+
import FSSelectField from "./FSSelectField.vue";
|
|
70
75
|
import FSColorField from "./FSColorField.vue";
|
|
76
|
+
import FSBaseField from "./FSBaseField.vue";
|
|
71
77
|
import FSCol from "../FSCol.vue";
|
|
72
78
|
import FSRow from "../FSRow.vue";
|
|
73
|
-
import FSBaseField from "./FSBaseField.vue";
|
|
74
|
-
import FSSelectField from "./FSSelectField.vue";
|
|
75
|
-
import { groupedGradients } from "../../utils";
|
|
76
79
|
|
|
77
80
|
export default defineComponent({
|
|
78
81
|
name: "FSGradientField",
|
|
79
82
|
components: {
|
|
80
|
-
|
|
83
|
+
FSSelectField,
|
|
81
84
|
FSColorField,
|
|
85
|
+
FSBaseField,
|
|
82
86
|
FSCol,
|
|
83
|
-
FSRow
|
|
84
|
-
FSSelectField
|
|
87
|
+
FSRow
|
|
85
88
|
},
|
|
86
89
|
props: {
|
|
87
90
|
label: {
|
|
@@ -94,6 +97,11 @@ export default defineComponent({
|
|
|
94
97
|
required: false,
|
|
95
98
|
default: null
|
|
96
99
|
},
|
|
100
|
+
colorCount: {
|
|
101
|
+
type: Number,
|
|
102
|
+
required: false,
|
|
103
|
+
default: 2
|
|
104
|
+
},
|
|
97
105
|
modelValue: {
|
|
98
106
|
type: Array as PropType<string[]>,
|
|
99
107
|
required: true
|
|
@@ -108,18 +116,27 @@ export default defineComponent({
|
|
|
108
116
|
required: false,
|
|
109
117
|
default: true
|
|
110
118
|
},
|
|
111
|
-
|
|
112
|
-
type:
|
|
119
|
+
allowOpacity: {
|
|
120
|
+
type: Boolean,
|
|
113
121
|
required: false,
|
|
114
|
-
default:
|
|
122
|
+
default: false
|
|
115
123
|
}
|
|
116
124
|
},
|
|
117
125
|
emits: ["update:modelValue"],
|
|
118
126
|
setup(props) {
|
|
119
|
-
const
|
|
127
|
+
const { getColors } = useColors();
|
|
128
|
+
|
|
129
|
+
const presetGradients = groupedGradients[props.colorCount];
|
|
130
|
+
const items = Object.keys(presetGradients)
|
|
131
|
+
|
|
132
|
+
const encodeGradientCssColors = (colors: string[]) => {
|
|
133
|
+
return colors.map((color) => getColors(color).base).join(", ");
|
|
134
|
+
};
|
|
120
135
|
|
|
121
136
|
return {
|
|
122
|
-
|
|
137
|
+
presetGradients,
|
|
138
|
+
items,
|
|
139
|
+
encodeGradientCssColors
|
|
123
140
|
};
|
|
124
141
|
}
|
|
125
142
|
});
|
package/components/map/FSMap.vue
CHANGED
|
@@ -8,27 +8,27 @@
|
|
|
8
8
|
width="fill"
|
|
9
9
|
:class="['fs-map', { 'fs-map-fullscreen': fullScreen }]"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
v-if="$slots
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
<FSMapOverlay
|
|
12
|
+
v-if="$slots['leftoverlay-header'] || $slots['leftoverlay-body']"
|
|
13
|
+
:mode="$props.overlayMode"
|
|
14
|
+
:height="$props.height"
|
|
15
|
+
@update:mode="$emit('update:overlayMode', $event)"
|
|
16
16
|
>
|
|
17
|
-
<
|
|
18
|
-
|
|
19
|
-
:elevation="true"
|
|
20
|
-
:border="false"
|
|
17
|
+
<template
|
|
18
|
+
v-slot:leftoverlay-header
|
|
21
19
|
>
|
|
22
|
-
<
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
20
|
+
<slot
|
|
21
|
+
name="leftoverlay-header"
|
|
22
|
+
/>
|
|
23
|
+
</template>
|
|
24
|
+
<template
|
|
25
|
+
v-slot:leftoverlay-body
|
|
26
|
+
>
|
|
27
|
+
<slot
|
|
28
|
+
name="leftoverlay-body"
|
|
29
|
+
/>
|
|
30
|
+
</template>
|
|
31
|
+
</FSMapOverlay>
|
|
32
32
|
<FSRow
|
|
33
33
|
v-if="$props.editable && !editingLocation && $props.selectedLocationId !== null"
|
|
34
34
|
class="fs-map-overlay-edit-button"
|
|
@@ -135,15 +135,15 @@ import * as L from "leaflet";
|
|
|
135
135
|
import "leaflet.markercluster";
|
|
136
136
|
|
|
137
137
|
import { useTranslations as useTranslationsProvider } from "@dative-gpi/bones-ui/composables";
|
|
138
|
-
|
|
139
138
|
import { type Address, type FSArea } from '@dative-gpi/foundation-shared-domain/models';
|
|
140
139
|
|
|
140
|
+
import { clusterMarker, locationMarker, myLocationMarker } from "../../utils";
|
|
141
141
|
import { ColorEnum, type FSLocation, type MapLayer } from "../../models";
|
|
142
142
|
import { useColors, useAddress } from "../../composables";
|
|
143
143
|
|
|
144
144
|
import FSMapEditPointAddressOverlay from "./FSMapEditPointAddressOverlay.vue";
|
|
145
145
|
import FSMapLayerButton from "./FSMapLayerButton.vue";
|
|
146
|
-
import
|
|
146
|
+
import FSMapOverlay from "./FSMapOverlay.vue";
|
|
147
147
|
import FSButton from "../FSButton.vue";
|
|
148
148
|
import FSCard from "../FSCard.vue";
|
|
149
149
|
import FSCol from "../FSCol.vue";
|
|
@@ -154,7 +154,7 @@ export default defineComponent({
|
|
|
154
154
|
components: {
|
|
155
155
|
FSMapEditPointAddressOverlay,
|
|
156
156
|
FSMapLayerButton,
|
|
157
|
-
|
|
157
|
+
FSMapOverlay,
|
|
158
158
|
FSButton,
|
|
159
159
|
FSCard,
|
|
160
160
|
FSCol,
|
|
@@ -181,6 +181,11 @@ export default defineComponent({
|
|
|
181
181
|
required: false,
|
|
182
182
|
default: false
|
|
183
183
|
},
|
|
184
|
+
overlayMode: {
|
|
185
|
+
type: String as PropType<'collapse' | 'half' | 'expand'>,
|
|
186
|
+
required: false,
|
|
187
|
+
default: 'collapse'
|
|
188
|
+
},
|
|
184
189
|
showMyLocation: {
|
|
185
190
|
type: Boolean,
|
|
186
191
|
required: false,
|
|
@@ -196,6 +201,11 @@ export default defineComponent({
|
|
|
196
201
|
required: false,
|
|
197
202
|
default: false
|
|
198
203
|
},
|
|
204
|
+
enableScrollWheelZoom: {
|
|
205
|
+
type: Boolean,
|
|
206
|
+
required: false,
|
|
207
|
+
default: false
|
|
208
|
+
},
|
|
199
209
|
center: {
|
|
200
210
|
type: Array as PropType<number[]>,
|
|
201
211
|
required: false,
|
|
@@ -212,14 +222,14 @@ export default defineComponent({
|
|
|
212
222
|
default: () => [],
|
|
213
223
|
},
|
|
214
224
|
selectedLayer: {
|
|
215
|
-
type: String as PropType<"
|
|
225
|
+
type: String as PropType<"map" | "imagery">,
|
|
216
226
|
required: false,
|
|
217
|
-
default: "
|
|
227
|
+
default: "map"
|
|
218
228
|
},
|
|
219
229
|
selectableLayers: {
|
|
220
230
|
type: Array as PropType<string[]>,
|
|
221
231
|
required: false,
|
|
222
|
-
default: () => ["
|
|
232
|
+
default: () => ["map", "imagery"]
|
|
223
233
|
},
|
|
224
234
|
selectedLocationId: {
|
|
225
235
|
type: String as PropType<string | null>,
|
|
@@ -232,11 +242,11 @@ export default defineComponent({
|
|
|
232
242
|
default: null
|
|
233
243
|
}
|
|
234
244
|
},
|
|
235
|
-
emits: ["update:modelValue", "update:selectedLocationId", "update:selectedAreaId"],
|
|
245
|
+
emits: ["update:modelValue", "update:selectedLocationId", "update:selectedAreaId", 'update:overlayMode'],
|
|
236
246
|
setup(props, { emit }) {
|
|
247
|
+
const { $tr } = useTranslationsProvider();
|
|
237
248
|
const { reverseSearch } = useAddress();
|
|
238
249
|
const { getColors } = useColors();
|
|
239
|
-
const { $tr } = useTranslationsProvider();
|
|
240
250
|
|
|
241
251
|
const LL = window.L;
|
|
242
252
|
|
|
@@ -265,34 +275,29 @@ export default defineComponent({
|
|
|
265
275
|
showCoverageOnHover: false,
|
|
266
276
|
disableClusteringAtZoom: 17,
|
|
267
277
|
iconCreateFunction: function (cluster: any) {
|
|
268
|
-
return
|
|
269
|
-
html: `<div>
|
|
270
|
-
<span>${cluster.getChildCount()}</span>
|
|
271
|
-
</div>`,
|
|
272
|
-
className: 'fs-map-location fs-map-location-full',
|
|
273
|
-
iconSize: [36, 36],
|
|
274
|
-
iconAnchor: [18, 18],
|
|
275
|
-
});
|
|
278
|
+
return clusterMarker(cluster.getChildCount());
|
|
276
279
|
}
|
|
277
280
|
});
|
|
278
281
|
}
|
|
279
282
|
const mapLayers: MapLayer[] = [
|
|
280
283
|
{
|
|
281
|
-
name: "
|
|
282
|
-
label: $tr("ui.map.layer.
|
|
283
|
-
image: new URL("../../assets/images/map/
|
|
284
|
-
layer: LL.tileLayer(
|
|
285
|
-
maxZoom:
|
|
286
|
-
|
|
284
|
+
name: "map",
|
|
285
|
+
label: $tr("ui.map.layer.map", "Map"),
|
|
286
|
+
image: new URL("../../assets/images/map/map.png", import.meta.url).href,
|
|
287
|
+
layer: LL.tileLayer(`http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}&key=${import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? ""}`, {
|
|
288
|
+
maxZoom: 22,
|
|
289
|
+
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
|
|
290
|
+
attribution: '© Google Map Data'
|
|
287
291
|
})
|
|
288
292
|
},
|
|
289
293
|
{
|
|
290
294
|
name: "imagery",
|
|
291
295
|
label: $tr("ui.map.layer.imagery", "Imagery"),
|
|
292
296
|
image: new URL("../../assets/images/map/imagery.png", import.meta.url).href,
|
|
293
|
-
layer: LL.tileLayer(
|
|
294
|
-
|
|
295
|
-
|
|
297
|
+
layer: LL.tileLayer(`http://{s}.google.com/vt/lyrs=s,h&x={x}&y={y}&z={z}&key=${import.meta.env.VITE_GOOGLE_MAPS_API_KEY ?? ""}`, {
|
|
298
|
+
maxZoom: 22,
|
|
299
|
+
subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
|
|
300
|
+
attribution: '© Google Map Data'
|
|
296
301
|
})
|
|
297
302
|
}
|
|
298
303
|
];
|
|
@@ -309,18 +314,7 @@ export default defineComponent({
|
|
|
309
314
|
const displayLocations = () => {
|
|
310
315
|
markerLayerGroup.clearLayers();
|
|
311
316
|
innerModelValue.value.forEach((location) => {
|
|
312
|
-
const
|
|
313
|
-
<div style="--fs-map-mylocation-pin-color-alpha:${getColors(location.color).base}50;--fs-map-location-pin-color: ${getColors(location.color).base}">
|
|
314
|
-
<div class="fs-map-location-pin">
|
|
315
|
-
<i class="${location.icon} mdi v-icon notranslate v-theme--DefaultTheme fs-icon" aria-hidden="true" style="--fs-icon-font-size: 22px;" ></i>
|
|
316
|
-
</div>
|
|
317
|
-
</div>`;
|
|
318
|
-
const icon = LL.divIcon({
|
|
319
|
-
html: iconHtml,
|
|
320
|
-
iconSize: [36, 36],
|
|
321
|
-
className: 'fs-map-location',
|
|
322
|
-
iconAnchor: [18, 18],
|
|
323
|
-
});
|
|
317
|
+
const icon = locationMarker(location.icon, getColors(location.color).base);
|
|
324
318
|
const marker = LL.marker([location.address.latitude, location.address.longitude], { icon }).addTo(markerLayerGroup);
|
|
325
319
|
markers[location.id] = marker;
|
|
326
320
|
marker.on('click', () => emit('update:selectedLocationId', location.id));
|
|
@@ -359,7 +353,7 @@ export default defineComponent({
|
|
|
359
353
|
const initMap = () => {
|
|
360
354
|
const mapOptions = {
|
|
361
355
|
zoomControl: false,
|
|
362
|
-
scrollWheelZoom:
|
|
356
|
+
scrollWheelZoom: props.enableScrollWheelZoom,
|
|
363
357
|
minZoom: 2,
|
|
364
358
|
maxBounds: LL.latLngBounds(LL.latLng(-90, -180), LL.latLng(90, 180)),
|
|
365
359
|
maxBoundsViscosity: 1.0
|
|
@@ -387,7 +381,7 @@ export default defineComponent({
|
|
|
387
381
|
});
|
|
388
382
|
};
|
|
389
383
|
|
|
390
|
-
const setMapBaseLayer = (layerName: '
|
|
384
|
+
const setMapBaseLayer = (layerName: 'map' | 'imagery') => {
|
|
391
385
|
const layer = mapLayers.find((mapLayer) => mapLayer.name === layerName) ?? mapLayers[0];
|
|
392
386
|
baseLayerGroup.clearLayers();
|
|
393
387
|
layer.layer.addTo(baseLayerGroup);
|
|
@@ -432,13 +426,7 @@ export default defineComponent({
|
|
|
432
426
|
map.locate();
|
|
433
427
|
map.on('locationfound', (e: L.LocationEvent) => {
|
|
434
428
|
map.panTo(e.latlng);
|
|
435
|
-
const
|
|
436
|
-
const icon = LL.divIcon({
|
|
437
|
-
html: iconHtml,
|
|
438
|
-
className: 'fs-map-mylocation',
|
|
439
|
-
iconSize: [16, 16],
|
|
440
|
-
iconAnchor: [8, 8],
|
|
441
|
-
});
|
|
429
|
+
const icon = myLocationMarker();
|
|
442
430
|
myLocationLayerGroup.clearLayers();
|
|
443
431
|
LL.marker(e.latlng, { icon }).addTo(myLocationLayerGroup);
|
|
444
432
|
});
|
|
@@ -536,6 +524,6 @@ export default defineComponent({
|
|
|
536
524
|
locate,
|
|
537
525
|
zoomIn
|
|
538
526
|
};
|
|
539
|
-
}
|
|
527
|
+
}
|
|
540
528
|
});
|
|
541
529
|
</script>
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCol
|
|
3
|
+
v-if="isExtraSmall"
|
|
4
|
+
:height="$props.mode === 'expand' ? '100%' : ($props.mode === 'half' ? '50%' : 'hug')"
|
|
5
|
+
:style="style"
|
|
6
|
+
class="fs-map-overlay-left-mobile"
|
|
7
|
+
ref="mobileOverlayElement"
|
|
8
|
+
align="bottom-center"
|
|
9
|
+
width="hug"
|
|
10
|
+
gap="2px"
|
|
11
|
+
@click="$event.target === mobileOverlayElement?.$el ? $emit('update:mode', 'collapse') : null"
|
|
12
|
+
>
|
|
13
|
+
<FSCard
|
|
14
|
+
padding="0px"
|
|
15
|
+
:elevation="true"
|
|
16
|
+
:border="false"
|
|
17
|
+
>
|
|
18
|
+
<FSCol
|
|
19
|
+
gap="0px"
|
|
20
|
+
height="fill"
|
|
21
|
+
>
|
|
22
|
+
<FSRow
|
|
23
|
+
align="center-center"
|
|
24
|
+
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
25
|
+
>
|
|
26
|
+
<FSButton
|
|
27
|
+
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
28
|
+
variant="icon"
|
|
29
|
+
@click="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
30
|
+
/>
|
|
31
|
+
</FSRow>
|
|
32
|
+
<FSCol
|
|
33
|
+
class="fs-map-overlay-left-mobile-content"
|
|
34
|
+
height="fill"
|
|
35
|
+
>
|
|
36
|
+
<slot
|
|
37
|
+
name="leftoverlay-header"
|
|
38
|
+
/>
|
|
39
|
+
<FSFadeOut
|
|
40
|
+
:height="$props.mode === 'collapse' ? '0px' : '100%'"
|
|
41
|
+
maskHeight="0px"
|
|
42
|
+
>
|
|
43
|
+
<slot
|
|
44
|
+
name="leftoverlay-body"
|
|
45
|
+
/>
|
|
46
|
+
</FSFadeOut>
|
|
47
|
+
</FSCol>
|
|
48
|
+
</FSCol>
|
|
49
|
+
</FSCard>
|
|
50
|
+
</FSCol>
|
|
51
|
+
<FSCol
|
|
52
|
+
v-else
|
|
53
|
+
class="fs-map-overlay-left"
|
|
54
|
+
width="hug"
|
|
55
|
+
gap="2px"
|
|
56
|
+
>
|
|
57
|
+
<FSCard
|
|
58
|
+
padding="4px"
|
|
59
|
+
:elevation="true"
|
|
60
|
+
:border="false"
|
|
61
|
+
>
|
|
62
|
+
<FSCol
|
|
63
|
+
:height="`calc(${$props.height} - 40px)`"
|
|
64
|
+
>
|
|
65
|
+
<slot
|
|
66
|
+
name="leftoverlay-header"
|
|
67
|
+
/>
|
|
68
|
+
<FSFadeOut
|
|
69
|
+
maskHeight="0"
|
|
70
|
+
height="100%"
|
|
71
|
+
>
|
|
72
|
+
<slot
|
|
73
|
+
name="leftoverlay-body"
|
|
74
|
+
/>
|
|
75
|
+
</FSFadeOut>
|
|
76
|
+
</FSCol>
|
|
77
|
+
</FSCard>
|
|
78
|
+
</FSCol>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<script lang="ts">
|
|
82
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
83
|
+
|
|
84
|
+
import { useBreakpoints } from "../../composables";
|
|
85
|
+
|
|
86
|
+
import FSFadeOut from "../FSFadeOut.vue";
|
|
87
|
+
import FSButton from "../FSButton.vue";
|
|
88
|
+
import FSCard from "../FSCard.vue";
|
|
89
|
+
import FSCol from "../FSCol.vue";
|
|
90
|
+
import FSRow from "../FSRow.vue";
|
|
91
|
+
|
|
92
|
+
export default defineComponent({
|
|
93
|
+
name: "FSMapOverlay",
|
|
94
|
+
props: {
|
|
95
|
+
height: {
|
|
96
|
+
type: [String, Number] as PropType<string | number | null>,
|
|
97
|
+
required: false,
|
|
98
|
+
default: "100%"
|
|
99
|
+
},
|
|
100
|
+
mode: {
|
|
101
|
+
type: String as PropType<"collapse" | "half" | "expand">,
|
|
102
|
+
required: false,
|
|
103
|
+
default: "collapse"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
components: {
|
|
107
|
+
FSFadeOut,
|
|
108
|
+
FSButton,
|
|
109
|
+
FSCard,
|
|
110
|
+
FSCol,
|
|
111
|
+
FSRow
|
|
112
|
+
},
|
|
113
|
+
emits: ["update:mode"],
|
|
114
|
+
setup(props) {
|
|
115
|
+
const { isExtraSmall } = useBreakpoints();
|
|
116
|
+
|
|
117
|
+
const leftOverlayMenuMobile = ref(false);
|
|
118
|
+
const mobileOverlayElement = ref(null);
|
|
119
|
+
|
|
120
|
+
const style = computed((): { [key: string]: string | null | undefined } => {
|
|
121
|
+
if (props.mode === "expand") {
|
|
122
|
+
return {
|
|
123
|
+
"--fs-map-overlay-card-height": "95%",
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
return {
|
|
128
|
+
"--fs-map-overlay-card-height": "100%",
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
return {
|
|
134
|
+
leftOverlayMenuMobile,
|
|
135
|
+
mobileOverlayElement,
|
|
136
|
+
isExtraSmall,
|
|
137
|
+
style
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
</script>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-shared-components",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.214",
|
|
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": "0.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "0.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "0.0.214",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.214"
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"@dative-gpi/bones-ui": "^0.0.75",
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"sass": "1.71.1",
|
|
36
36
|
"sass-loader": "13.3.2"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "d13e07184215ee5604d7d0ee124c889edd741b0b"
|
|
39
39
|
}
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
z-index: 1001;
|
|
49
49
|
margin-bottom: 8px;
|
|
50
50
|
|
|
51
|
-
button.fs-map-zoom-plus
|
|
51
|
+
button.fs-map-zoom-plus > * {
|
|
52
52
|
border-bottom-left-radius: 0 !important;
|
|
53
53
|
border-bottom-right-radius: 0 !important;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
button.fs-map-zoom-minus
|
|
56
|
+
button.fs-map-zoom-minus > * {
|
|
57
57
|
margin-top: 1px;
|
|
58
58
|
border-top-left-radius: 0 !important;
|
|
59
59
|
border-top-right-radius: 0 !important;
|
|
@@ -96,8 +96,7 @@
|
|
|
96
96
|
&:hover {
|
|
97
97
|
filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
|
|
98
98
|
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
> * {
|
|
101
100
|
transform: scale(1.15);
|
|
102
101
|
}
|
|
103
102
|
}
|
|
@@ -134,5 +133,4 @@
|
|
|
134
133
|
opacity: 1;
|
|
135
134
|
}
|
|
136
135
|
}
|
|
137
|
-
|
|
138
136
|
}
|