@dative-gpi/foundation-shared-components 0.0.213 → 0.0.215
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/fields/FSColorField.vue +3 -3
- package/components/fields/FSGradientField.vue +37 -20
- package/components/map/FSMap.vue +129 -90
- package/components/map/FSMapLayerButton.vue +17 -11
- package/components/map/FSMapOverlay.vue +150 -0
- package/package.json +4 -4
- package/styles/components/fs_map.scss +9 -18
- package/styles/components/fs_map_overlay.scss +38 -0
- package/styles/components/index.scss +1 -0
- package/utils/gradient.ts +1599 -1598
- package/utils/index.ts +1 -0
- package/utils/leafletMarkers.ts +38 -0
- package/assets/images/map/osm.png +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<FSCol
|
|
3
|
+
v-show="isExtraSmall"
|
|
4
|
+
:id="`left-overlay-mobile-${$props.mapId}`"
|
|
5
|
+
:height="$props.mode === 'expand' ? '100%' : ($props.mode === 'half' ? '50%' : 'hug')"
|
|
6
|
+
:style="style"
|
|
7
|
+
class="fs-map-overlay-left-mobile"
|
|
8
|
+
ref="mobileOverlayElement"
|
|
9
|
+
align="bottom-center"
|
|
10
|
+
width="hug"
|
|
11
|
+
gap="2px"
|
|
12
|
+
@click="$event.target === mobileOverlayElement?.$el ? $emit('update:mode', 'collapse') : null"
|
|
13
|
+
>
|
|
14
|
+
<FSCard
|
|
15
|
+
padding="0px"
|
|
16
|
+
:elevation="true"
|
|
17
|
+
:border="false"
|
|
18
|
+
>
|
|
19
|
+
<FSCol
|
|
20
|
+
gap="0px"
|
|
21
|
+
height="fill"
|
|
22
|
+
>
|
|
23
|
+
<FSRow
|
|
24
|
+
align="center-center"
|
|
25
|
+
@touchstart="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
26
|
+
>
|
|
27
|
+
<FSButton
|
|
28
|
+
:icon="$props.mode === 'expand' ? 'mdi-chevron-down' : 'mdi-chevron-up'"
|
|
29
|
+
variant="icon"
|
|
30
|
+
@click="$props.mode === 'expand' ? $emit('update:mode', 'collapse') : $emit('update:mode', 'expand')"
|
|
31
|
+
/>
|
|
32
|
+
</FSRow>
|
|
33
|
+
<FSCol
|
|
34
|
+
class="fs-map-overlay-left-mobile-content"
|
|
35
|
+
height="fill"
|
|
36
|
+
>
|
|
37
|
+
<slot
|
|
38
|
+
name="leftoverlay-header"
|
|
39
|
+
/>
|
|
40
|
+
<FSFadeOut
|
|
41
|
+
:height="$props.mode === 'collapse' ? '0px' : '100%'"
|
|
42
|
+
maskHeight="0px"
|
|
43
|
+
>
|
|
44
|
+
<slot
|
|
45
|
+
name="leftoverlay-body"
|
|
46
|
+
/>
|
|
47
|
+
</FSFadeOut>
|
|
48
|
+
</FSCol>
|
|
49
|
+
</FSCol>
|
|
50
|
+
</FSCard>
|
|
51
|
+
</FSCol>
|
|
52
|
+
<FSCol
|
|
53
|
+
v-show="!isExtraSmall"
|
|
54
|
+
:style="style"
|
|
55
|
+
:id="`left-overlay-${$props.mapId}`"
|
|
56
|
+
class="fs-map-overlay-left"
|
|
57
|
+
width="hug"
|
|
58
|
+
gap="2px"
|
|
59
|
+
>
|
|
60
|
+
<FSCard
|
|
61
|
+
padding="4px"
|
|
62
|
+
:elevation="true"
|
|
63
|
+
:border="false"
|
|
64
|
+
>
|
|
65
|
+
<FSCol
|
|
66
|
+
class="fs-map-overlay-left-content"
|
|
67
|
+
>
|
|
68
|
+
<slot
|
|
69
|
+
name="leftoverlay-header"
|
|
70
|
+
/>
|
|
71
|
+
<FSFadeOut
|
|
72
|
+
maskHeight="0"
|
|
73
|
+
height="100%"
|
|
74
|
+
>
|
|
75
|
+
<slot
|
|
76
|
+
name="leftoverlay-body"
|
|
77
|
+
/>
|
|
78
|
+
</FSFadeOut>
|
|
79
|
+
</FSCol>
|
|
80
|
+
</FSCard>
|
|
81
|
+
</FSCol>
|
|
82
|
+
</template>
|
|
83
|
+
|
|
84
|
+
<script lang="ts">
|
|
85
|
+
import { computed, defineComponent, type PropType, ref } from "vue";
|
|
86
|
+
|
|
87
|
+
import { useBreakpoints } from "../../composables";
|
|
88
|
+
|
|
89
|
+
import FSFadeOut from "../FSFadeOut.vue";
|
|
90
|
+
import FSButton from "../FSButton.vue";
|
|
91
|
+
import FSCard from "../FSCard.vue";
|
|
92
|
+
import FSCol from "../FSCol.vue";
|
|
93
|
+
import FSRow from "../FSRow.vue";
|
|
94
|
+
|
|
95
|
+
export default defineComponent({
|
|
96
|
+
name: "FSMapOverlay",
|
|
97
|
+
props: {
|
|
98
|
+
height: {
|
|
99
|
+
type: [String, Number] as PropType<string | number | null>,
|
|
100
|
+
required: false,
|
|
101
|
+
default: "100%"
|
|
102
|
+
},
|
|
103
|
+
mode: {
|
|
104
|
+
type: String as PropType<"collapse" | "half" | "expand">,
|
|
105
|
+
required: false,
|
|
106
|
+
default: "collapse"
|
|
107
|
+
},
|
|
108
|
+
mapId: {
|
|
109
|
+
type: String,
|
|
110
|
+
required: true
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
components: {
|
|
114
|
+
FSFadeOut,
|
|
115
|
+
FSButton,
|
|
116
|
+
FSCard,
|
|
117
|
+
FSCol,
|
|
118
|
+
FSRow
|
|
119
|
+
},
|
|
120
|
+
emits: ["update:mode"],
|
|
121
|
+
setup(props) {
|
|
122
|
+
const { isExtraSmall } = useBreakpoints();
|
|
123
|
+
|
|
124
|
+
const leftOverlayMenuMobile = ref(false);
|
|
125
|
+
const mobileOverlayElement = ref(null);
|
|
126
|
+
|
|
127
|
+
const style = computed((): { [key: string]: string | null | undefined } => {
|
|
128
|
+
if (props.mode === "expand") {
|
|
129
|
+
return {
|
|
130
|
+
"--fs-map-overlay-max-height": `calc(${props.height} - 40px)`,
|
|
131
|
+
"--fs-map-overlay-card-height": "95%",
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
return {
|
|
136
|
+
"--fs-map-overlay-max-height": `calc(${props.height} - 40px)`,
|
|
137
|
+
"--fs-map-overlay-card-height": "100%",
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
|
|
142
|
+
return {
|
|
143
|
+
leftOverlayMenuMobile,
|
|
144
|
+
mobileOverlayElement,
|
|
145
|
+
isExtraSmall,
|
|
146
|
+
style
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
</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.215",
|
|
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.215",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "0.0.215"
|
|
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": "0d0aafb99e7a818b3606c3ac8bea917213e389ad"
|
|
39
39
|
}
|
|
@@ -9,14 +9,6 @@
|
|
|
9
9
|
filter: grayscale(var(--fs-map-container-grayscale));
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.fs-map-overlay-left {
|
|
13
|
-
position: absolute;
|
|
14
|
-
top: 0;
|
|
15
|
-
left: 0;
|
|
16
|
-
z-index: 950;
|
|
17
|
-
margin: 4px;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
12
|
.fs-map-overlay-edit-button {
|
|
21
13
|
position: absolute;
|
|
22
14
|
top: 0;
|
|
@@ -46,14 +38,14 @@
|
|
|
46
38
|
bottom: 100%;
|
|
47
39
|
right: 0;
|
|
48
40
|
z-index: 1001;
|
|
49
|
-
margin-bottom: 8px;
|
|
41
|
+
margin-bottom: calc(var(--fs-map-leaflet-bottom-overlay-margin) + 8px);
|
|
50
42
|
|
|
51
|
-
button.fs-map-zoom-plus
|
|
43
|
+
button.fs-map-zoom-plus > * {
|
|
52
44
|
border-bottom-left-radius: 0 !important;
|
|
53
45
|
border-bottom-right-radius: 0 !important;
|
|
54
46
|
}
|
|
55
47
|
|
|
56
|
-
button.fs-map-zoom-minus
|
|
48
|
+
button.fs-map-zoom-minus > * {
|
|
57
49
|
margin-top: 1px;
|
|
58
50
|
border-top-left-radius: 0 !important;
|
|
59
51
|
border-top-right-radius: 0 !important;
|
|
@@ -65,10 +57,11 @@
|
|
|
65
57
|
|
|
66
58
|
.fs-map-mylocation {
|
|
67
59
|
border: 3px solid white;
|
|
60
|
+
background-color: var(--fs-map-mylocation-pin-color);
|
|
68
61
|
border-radius: 100%;
|
|
69
|
-
animation: fs-map-shadow 1.4s linear infinite;
|
|
62
|
+
animation: fs-map-shadow-mylocation 1.4s linear infinite;
|
|
70
63
|
|
|
71
|
-
@keyframes fs-map-shadow {
|
|
64
|
+
@keyframes fs-map-shadow-mylocation {
|
|
72
65
|
0% {
|
|
73
66
|
box-shadow: 0 0 0px 0px var(--fs-map-mylocation-pin-color-alpha);
|
|
74
67
|
}
|
|
@@ -96,8 +89,7 @@
|
|
|
96
89
|
&:hover {
|
|
97
90
|
filter: brightness(0.92) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4));
|
|
98
91
|
|
|
99
|
-
|
|
100
|
-
|
|
92
|
+
> * {
|
|
101
93
|
transform: scale(1.15);
|
|
102
94
|
}
|
|
103
95
|
}
|
|
@@ -109,9 +101,9 @@
|
|
|
109
101
|
}
|
|
110
102
|
|
|
111
103
|
.fs-map-location-selected > div {
|
|
112
|
-
animation: fs-map-shadow 1.4s linear infinite;
|
|
104
|
+
animation: fs-map-shadow-location 1.4s linear infinite;
|
|
113
105
|
|
|
114
|
-
@keyframes fs-map-shadow {
|
|
106
|
+
@keyframes fs-map-shadow-location {
|
|
115
107
|
0% {
|
|
116
108
|
box-shadow: 0 0 0px 0px var(--fs-map-mylocation-pin-color-alpha);
|
|
117
109
|
}
|
|
@@ -134,5 +126,4 @@
|
|
|
134
126
|
opacity: 1;
|
|
135
127
|
}
|
|
136
128
|
}
|
|
137
|
-
|
|
138
129
|
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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
|
+
}
|