@geops/rvf-mobility-web-component 0.1.9 → 0.1.11
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/.github/CODEOWNERS +37 -0
- package/.github/workflows/conventional-pr-title.yml +36 -0
- package/CHANGELOG.md +55 -0
- package/README.md +3 -1
- package/doc/package.json +5 -5
- package/doc/src/app/components/GeopsMobilityDoc.tsx +19 -0
- package/docutils.js +198 -0
- package/index.html +48 -217
- package/index.js +683 -91
- package/input.css +15 -1
- package/jest-setup.js +3 -2
- package/package.json +9 -8
- package/scripts/dev.mjs +1 -1
- package/search.html +38 -69
- package/src/GeolocationButton/GeolocationButton.tsx +6 -17
- package/src/LayerTree/LayerTree.tsx +44 -0
- package/src/LayerTree/TreeItem/TreeItem.tsx +145 -0
- package/src/LayerTree/TreeItem/index.tsx +1 -0
- package/src/LayerTree/TreeItemContainer/TreeItemContainer.tsx +16 -0
- package/src/LayerTree/TreeItemContainer/index.tsx +1 -0
- package/src/LayerTree/index.tsx +1 -0
- package/src/LayerTree/layersTreeContext.ts +4 -0
- package/src/LayerTree/layersTreeReducer.ts +156 -0
- package/src/Map/Map.tsx +57 -12
- package/src/MobilityMap/MobilityMap.tsx +22 -9
- package/src/MobilityMap/index.css +0 -13
- package/src/RealtimeLayer/RealtimeLayer.tsx +1 -1
- package/src/RvfButton/RvfButton.tsx +45 -0
- package/src/RvfButton/index.tsx +1 -0
- package/src/RvfExportMenu/RvfExportMenu.tsx +95 -0
- package/src/RvfExportMenu/index.tsx +1 -0
- package/src/RvfExportMenuButton/RvfExportMenuButton.tsx +27 -0
- package/src/RvfExportMenuButton/index.tsx +1 -0
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +29 -0
- package/src/RvfFeatureDetails/index.tsx +1 -0
- package/src/RvfIconButton/RvfIconButton.tsx +35 -0
- package/src/RvfIconButton/index.tsx +1 -0
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +132 -52
- package/src/RvfMobilityMap/index.css +0 -13
- package/src/RvfModal/RvfModal.tsx +52 -0
- package/src/RvfModal/index.tsx +1 -0
- package/src/RvfPoisLayer/RvfPoisLayer.tsx +39 -0
- package/src/RvfPoisLayer/index.tsx +1 -0
- package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +88 -0
- package/src/RvfSharedMobilityLayerGroup/index.tsx +1 -0
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +137 -0
- package/src/RvfSingleClickListener/index.tsx +1 -0
- package/src/RvfZoomButtons/RvfZoomButtons.tsx +73 -0
- package/src/RvfZoomButtons/index.tsx +1 -0
- package/src/Search/Search.tsx +11 -9
- package/src/SingleClickListener/index.tsx +1 -1
- package/src/StationsLayer/StationsLayer.tsx +0 -1
- package/src/StopsSearch/StopsSearch.tsx +38 -6
- package/src/TopicMenu/TopicMenu.tsx +143 -0
- package/src/TopicMenu/index.tsx +1 -0
- package/src/icons/Cancel/Cancel.tsx +21 -0
- package/src/icons/Cancel/cancel.svg +7 -0
- package/src/icons/Cancel/index.tsx +1 -0
- package/src/icons/Download/Download.tsx +20 -0
- package/src/icons/Download/download.svg +15 -0
- package/src/icons/Download/index.tsx +1 -0
- package/src/icons/Elevator/Elevator.tsx +1 -1
- package/src/icons/Geolocation/Geolocation.tsx +21 -0
- package/src/icons/Geolocation/index.tsx +1 -0
- package/src/icons/Menu/Menu.tsx +32 -0
- package/src/icons/Menu/index.tsx +1 -0
- package/src/icons/Menu/menu.svg +9 -0
- package/src/icons/Minus/Minus.tsx +19 -0
- package/src/icons/Minus/index.tsx +1 -0
- package/src/icons/Minus/minus.svg +7 -0
- package/src/icons/Plus/Plus.tsx +19 -0
- package/src/icons/Plus/index.tsx +1 -0
- package/src/icons/Plus/plus.svg +7 -0
- package/src/index.tsx +2 -0
- package/src/utils/constants.ts +9 -0
- package/src/utils/createMobiDataBwWfsLayer.ts +120 -0
- package/src/utils/exportPdf.ts +677 -0
- package/src/utils/hooks/useRvfContext.tsx +37 -0
- package/src/utils/hooks/useUpdatePermalink.tsx +2 -9
- package/tailwind.config.mjs +60 -8
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
import { Map } from "ol";
|
|
2
2
|
import { unByKey } from "ol/Observable";
|
|
3
|
-
import { useEffect
|
|
3
|
+
import { useEffect } from "preact/hooks";
|
|
4
4
|
|
|
5
5
|
const useUpdatePermalink = (map: Map, permalink: boolean) => {
|
|
6
|
-
const [x, setX] = useState<string>(null);
|
|
7
|
-
const [y, setY] = useState<string>(null);
|
|
8
|
-
const [z, setZ] = useState<string>(null);
|
|
9
|
-
|
|
10
6
|
useEffect(() => {
|
|
11
7
|
let listener;
|
|
12
8
|
if (map && permalink) {
|
|
@@ -15,11 +11,8 @@ const useUpdatePermalink = (map: Map, permalink: boolean) => {
|
|
|
15
11
|
const newX = map.getView().getCenter()[0].toFixed(2);
|
|
16
12
|
const newY = map.getView().getCenter()[1].toFixed(2);
|
|
17
13
|
const newZ = map.getView().getZoom().toFixed(1);
|
|
18
|
-
setX(newX);
|
|
19
14
|
urlParams.set("x", newX);
|
|
20
|
-
setY(newY);
|
|
21
15
|
urlParams.set("y", newY);
|
|
22
|
-
setZ(newZ);
|
|
23
16
|
urlParams.set("z", newZ);
|
|
24
17
|
window.history.replaceState(null, null, `?${urlParams.toString()}`);
|
|
25
18
|
});
|
|
@@ -28,6 +21,6 @@ const useUpdatePermalink = (map: Map, permalink: boolean) => {
|
|
|
28
21
|
unByKey(listener);
|
|
29
22
|
};
|
|
30
23
|
}, [map, permalink]);
|
|
31
|
-
return
|
|
24
|
+
return null;
|
|
32
25
|
};
|
|
33
26
|
export default useUpdatePermalink;
|
package/tailwind.config.mjs
CHANGED
|
@@ -26,16 +26,29 @@ const getClamp = (min, max) => {
|
|
|
26
26
|
};
|
|
27
27
|
|
|
28
28
|
export default {
|
|
29
|
-
colors: {
|
|
30
|
-
darkgray: "#464646", // dark grey
|
|
31
|
-
grey: "#7C7C7C", // grey
|
|
32
|
-
lightgrey: "#D0D0D0", // light grey
|
|
33
|
-
red: "#E3000B", // rvf rot
|
|
34
|
-
ultradarkgray: "#2D2D2C", // another grey with no name
|
|
35
|
-
ultralightgrey: "#F5F5F5", // ultralight grey
|
|
36
|
-
},
|
|
37
29
|
plugins: [containerQueries],
|
|
38
30
|
theme: {
|
|
31
|
+
extend: {
|
|
32
|
+
colors: {
|
|
33
|
+
darkgray: "#464646", // dark grey
|
|
34
|
+
darkred: "#AF050D", // rvf drk red (ex: button primary hover)
|
|
35
|
+
grey: "#7C7C7C", // grey
|
|
36
|
+
lightgrey: "#D0D0D0", // light grey
|
|
37
|
+
lightred: "#FF5961", //rvf light red (ex:active button)
|
|
38
|
+
red: "#E3000B", // rvf rot
|
|
39
|
+
ultradarkgray: "#2D2D2C", // another grey with no name
|
|
40
|
+
ultralightgrey: "#F5F5F5", // ultralight grey
|
|
41
|
+
},
|
|
42
|
+
maxHeight: {
|
|
43
|
+
button: "40px",
|
|
44
|
+
},
|
|
45
|
+
maxWidth: {
|
|
46
|
+
button: "40px",
|
|
47
|
+
},
|
|
48
|
+
padding: {
|
|
49
|
+
1.75: "7px",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
39
52
|
fontFamily: {
|
|
40
53
|
sans: [
|
|
41
54
|
"'Source Sans Pro'",
|
|
@@ -48,9 +61,48 @@ export default {
|
|
|
48
61
|
"2xl": getClamp(29, 39), // h2
|
|
49
62
|
"3xl": getClamp(35, 48), // h1
|
|
50
63
|
base: getClamp(16, 20), // p
|
|
64
|
+
button: getClamp(14, 18), // button
|
|
51
65
|
lg: getClamp(19, 25), // H4
|
|
52
66
|
sm: getClamp(13, 15), // small
|
|
53
67
|
xl: getClamp(24, 31), // h3
|
|
54
68
|
},
|
|
69
|
+
extend: {
|
|
70
|
+
colors: {
|
|
71
|
+
darkgray: "#464646", // dark grey
|
|
72
|
+
grey: "#7C7C7C", // grey
|
|
73
|
+
lightgrey: "#D0D0D0", // light grey
|
|
74
|
+
red: "#E3000B", // rvf rot
|
|
75
|
+
ultradarkgray: "#2D2D2C", // another grey with no name
|
|
76
|
+
ultralightgrey: "#F5F5F5", // ultralight grey
|
|
77
|
+
},
|
|
78
|
+
width: {
|
|
79
|
+
'largeMenu': '350px',
|
|
80
|
+
'mediumMenu': '300px',
|
|
81
|
+
'inputControl': '20px',
|
|
82
|
+
'check': '6px',
|
|
83
|
+
'innerControl': '12px',
|
|
84
|
+
},
|
|
85
|
+
height: {
|
|
86
|
+
'inputControl': '20px',
|
|
87
|
+
'innerControl': '12px',
|
|
88
|
+
},
|
|
89
|
+
maxWidth: {
|
|
90
|
+
'button': '40px'
|
|
91
|
+
},
|
|
92
|
+
maxHeight: {
|
|
93
|
+
'button': '40px'
|
|
94
|
+
},
|
|
95
|
+
padding: {
|
|
96
|
+
'1.75': '7px'
|
|
97
|
+
},
|
|
98
|
+
margin: {
|
|
99
|
+
'4px': '4px',
|
|
100
|
+
'7px': '7px'
|
|
101
|
+
},
|
|
102
|
+
screens: {
|
|
103
|
+
'medium': '577px',
|
|
104
|
+
'large': '993px'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
55
107
|
},
|
|
56
108
|
};
|