@geops/rvf-mobility-web-component 0.1.61 → 0.1.63
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/CHANGELOG.md +83 -0
- package/README.md +1 -0
- package/docutils.js +103 -4
- package/fonts/source-sans-3/source-sans-3-v15-latin-500.ttf +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-500.woff2 +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-600.ttf +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-600.woff2 +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-700.ttf +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-700.woff2 +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-regular.ttf +0 -0
- package/fonts/source-sans-3/source-sans-3-v15-latin-regular.woff2 +0 -0
- package/index.html +27 -97
- package/index.js +235 -224
- package/notifications.html +144 -0
- package/package.json +2 -2
- package/search.html +24 -65
- package/src/FeatureDetails/FeatureDetails.tsx +20 -6
- package/src/FeaturesInfosListener/FeaturesInfosListener.tsx +2 -0
- package/src/LayerTree/TreeItem/TreeItem.tsx +2 -2
- package/src/LayerTreeMenu/LayerTreeMenu.tsx +19 -3
- package/src/LayoutState/LayoutState.tsx +17 -0
- package/src/LinesNetworkPlanDetails/LinesNetworkPlanDetails.tsx +34 -21
- package/src/LinesNetworkPlanLayer/LinesNetworkPlanLayer.tsx +3 -6
- package/src/LinesNetworkPlanLayerHighlight/LinesNetworkPlanLayerHighlight.tsx +88 -0
- package/src/LinesNetworkPlanLayerHighlight/index.tsx +1 -0
- package/src/MapDispatchEvents/MapDispatchEvents.tsx +6 -4
- package/src/MapLayout/MapLayout.tsx +2 -2
- package/src/MapsetLayer/MapsetLayer.tsx +116 -0
- package/src/MapsetLayer/index.tsx +1 -0
- package/src/MobilityMap/MobilityMap.tsx +27 -5
- package/src/MobilityMap/MobilityMapAttributes.test.ts +38 -0
- package/src/MobilityMap/MobilityMapAttributes.ts +99 -22
- package/src/MobilityMap/MobilityMapEvents.ts +53 -0
- package/src/MobilityNotifications/MobilityNotifications.tsx +93 -0
- package/src/MobilityNotifications/MobilityNotificationsAttributes.test.ts +21 -0
- package/src/MobilityNotifications/MobilityNotificationsAttributes.ts +46 -0
- package/src/MobilityNotifications/index.ts +2 -0
- package/src/MobilitySearch/MobilitySearchEvents.ts +21 -0
- package/src/NotificationDetails/NotificationDetails.tsx +74 -251
- package/src/OverlayContent/OverlayContent.tsx +1 -1
- package/src/OverlayDetails/OverlayDetails.tsx +4 -2
- package/src/OverlayFooter/OverlayFooter.tsx +3 -2
- package/src/RealtimeLayer/RealtimeLayer.tsx +36 -7
- package/src/RouteScheduleFooter/RouteScheduleFooter.tsx +1 -2
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +2 -2
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +2 -0
- package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +12 -453
- package/src/RvfFeatureDetails/RvfSellingPointDetails/RvfSellingPointDetails.tsx +20 -17
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +93 -36
- package/src/RvfLink/RvfLink.tsx +5 -2
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +27 -9
- package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +9 -5
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +3 -1
- package/src/SituationDetails/SituationDetails.tsx +324 -0
- package/src/SituationDetails/index.ts +1 -0
- package/src/index.tsx +16 -0
- package/src/indexDoc.ts +25 -3
- package/src/ui/Checkbox/Checkbox.tsx +2 -2
- package/src/ui/Link/Link.tsx +49 -0
- package/src/ui/Link/index.tsx +1 -0
- package/src/ui/Select/Select.tsx +2 -2
- package/src/utils/constants.ts +37 -0
- package/src/utils/exportPdf.ts +3 -1
- package/src/utils/highlightLinesNetworkPlan.ts +25 -0
- package/src/utils/hooks/useI18n.tsx +6 -4
- package/src/utils/hooks/useMapContext.tsx +9 -0
- package/src/utils/sharingGraphqlUtils.ts +1 -1
- package/src/utils/translations.ts +12 -1
- package/tailwind.config.mjs +3 -1
- package/src/ShareMenu/PermalinkButton/PermalinkButton.tsx +0 -62
- package/src/ShareMenu/PermalinkButton/index.tsx +0 -1
- package/src/icons/Geolocation/airport-14-svgrepo-com.svg +0 -41
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { LAYERS_NAMES } from "./constants";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
export type Locale = "de" | "en" | "fr" | "it";
|
|
4
|
+
export type Translations = Record<Locale, Record<string, string>>;
|
|
5
|
+
|
|
6
|
+
const translations: Translations = {
|
|
4
7
|
de: {
|
|
5
8
|
affected_lines: "Betroffene Linien",
|
|
6
9
|
affected_stops: "Betroffene Haltestellen",
|
|
@@ -13,6 +16,7 @@ const translations = {
|
|
|
13
16
|
export_all_region: "Ganze Region exportieren",
|
|
14
17
|
export_format_title: "Format",
|
|
15
18
|
exporting: "Exportieren ...",
|
|
19
|
+
from: "ab {{from}}",
|
|
16
20
|
from_to: "von {{from}} bis {{to}}",
|
|
17
21
|
geolocation_button_title_off: "Geolokalisierung deaktivieren",
|
|
18
22
|
geolocation_button_title_on: "Geolokalisierung aktivieren",
|
|
@@ -25,6 +29,7 @@ const translations = {
|
|
|
25
29
|
[LAYERS_NAMES.carOthers]: "Auto, andere Anbieter",
|
|
26
30
|
[LAYERS_NAMES.eroller]: "E-Roller",
|
|
27
31
|
[LAYERS_NAMES.linesnetworkplan]: "Liniennetzpläne",
|
|
32
|
+
[LAYERS_NAMES.mapset]: "Mapset-Pläne",
|
|
28
33
|
[LAYERS_NAMES.mitfahrpunkte]: "Mitfahrpunkte",
|
|
29
34
|
[LAYERS_NAMES.notifications]: "Meldungen",
|
|
30
35
|
[LAYERS_NAMES.pois]: "POIs",
|
|
@@ -67,6 +72,7 @@ const translations = {
|
|
|
67
72
|
export_all_region: "Export entire region",
|
|
68
73
|
export_format_title: "Format",
|
|
69
74
|
exporting: "Exporting ...",
|
|
75
|
+
from: "from {{from}}",
|
|
70
76
|
from_to: "from {{from}} to {{to}}",
|
|
71
77
|
geolocation_button_title_off: "Disable geolocation",
|
|
72
78
|
geolocation_button_title_on: "Enable geolocation",
|
|
@@ -79,6 +85,7 @@ const translations = {
|
|
|
79
85
|
[LAYERS_NAMES.carOthers]: "Auto, andere Anbieter",
|
|
80
86
|
[LAYERS_NAMES.eroller]: "E-Roller",
|
|
81
87
|
[LAYERS_NAMES.linesnetworkplan]: "Lines Network Plan",
|
|
88
|
+
[LAYERS_NAMES.mapset]: "Mapset plans",
|
|
82
89
|
[LAYERS_NAMES.mitfahrpunkte]: "Carpooling Points",
|
|
83
90
|
[LAYERS_NAMES.notifications]: "Notifications",
|
|
84
91
|
[LAYERS_NAMES.pois]: "POIs",
|
|
@@ -118,6 +125,7 @@ const translations = {
|
|
|
118
125
|
export_all_region: "Exporter toute la région",
|
|
119
126
|
export_format_title: "Format",
|
|
120
127
|
exporting: "Exportation ...",
|
|
128
|
+
from: "à partir du {{from}}",
|
|
121
129
|
from_to: "de {{from}} à {{to}}",
|
|
122
130
|
geolocation_button_title_off: "Désactiver la géolocalisation",
|
|
123
131
|
geolocation_button_title_on: "Activer la géolocalisation",
|
|
@@ -130,6 +138,7 @@ const translations = {
|
|
|
130
138
|
[LAYERS_NAMES.carOthers]: "Voiture, autres fournisseurs",
|
|
131
139
|
[LAYERS_NAMES.eroller]: "E-Scooter",
|
|
132
140
|
[LAYERS_NAMES.linesnetworkplan]: "Plans du réseau",
|
|
141
|
+
[LAYERS_NAMES.mapset]: "Plans de Mapset",
|
|
133
142
|
[LAYERS_NAMES.mitfahrpunkte]: "Points de covoiturage",
|
|
134
143
|
[LAYERS_NAMES.notifications]: "Notifications",
|
|
135
144
|
[LAYERS_NAMES.pois]: "POIs",
|
|
@@ -169,6 +178,7 @@ const translations = {
|
|
|
169
178
|
export_all_region: "Esporta l'intera regione",
|
|
170
179
|
export_format_title: "Formato",
|
|
171
180
|
exporting: "Esportazione ...",
|
|
181
|
+
from: "da {{from}}",
|
|
172
182
|
from_to: "da {{from}} a {{to}}",
|
|
173
183
|
geolocation_button_title_off: "Disattiva geolocalizzazione",
|
|
174
184
|
geolocation_button_title_on: "Attiva geolocalizzazione",
|
|
@@ -181,6 +191,7 @@ const translations = {
|
|
|
181
191
|
[LAYERS_NAMES.carOthers]: "Auto, altri fornitori",
|
|
182
192
|
[LAYERS_NAMES.eroller]: "E-Scooter",
|
|
183
193
|
[LAYERS_NAMES.linesnetworkplan]: "Piani della rete",
|
|
194
|
+
[LAYERS_NAMES.mapset]: "Piani di Mapset",
|
|
184
195
|
[LAYERS_NAMES.mitfahrpunkte]: "Punti di carpooling",
|
|
185
196
|
[LAYERS_NAMES.notifications]: "Notifiche",
|
|
186
197
|
[LAYERS_NAMES.pois]: "POI",
|
package/tailwind.config.mjs
CHANGED
|
@@ -75,6 +75,7 @@ export default {
|
|
|
75
75
|
sans: [
|
|
76
76
|
"'Source Sans Pro'",
|
|
77
77
|
"'Source Sans 3'",
|
|
78
|
+
"source-sans-3",
|
|
78
79
|
"source-sans-pro",
|
|
79
80
|
"sans-serif",
|
|
80
81
|
],
|
|
@@ -86,8 +87,9 @@ export default {
|
|
|
86
87
|
button: getClamp(14, 18), // button
|
|
87
88
|
lg: getClamp(19, 25), // H4
|
|
88
89
|
sm: getClamp(13, 15), // small
|
|
89
|
-
xl: getClamp(24, 31), // h3
|
|
90
|
+
xl: getClamp(24, 31), // h3 clamp(1.5rem,1.2684rem + 1.0294vw,1.9375rem)
|
|
90
91
|
xs: getClamp(12, 13), // xtra small
|
|
92
|
+
"rvf-h3": "clamp(1.5rem,1.2684rem + 1.0294vw,1.9375rem)",
|
|
91
93
|
},
|
|
92
94
|
},
|
|
93
95
|
};
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { useState } from "preact/hooks";
|
|
2
|
-
|
|
3
|
-
import Cancel from "../../icons/Cancel";
|
|
4
|
-
import ShareMenu from "../../icons/ShareMenu";
|
|
5
|
-
import RvfInputCopy from "../../RvfInputCopy";
|
|
6
|
-
import IconButton from "../../ui/IconButton";
|
|
7
|
-
|
|
8
|
-
import type { ButtonHTMLAttributes, PreactDOMAttributes } from "preact";
|
|
9
|
-
|
|
10
|
-
function PermalinkButton({
|
|
11
|
-
className,
|
|
12
|
-
...props
|
|
13
|
-
}: { className?: string } & ButtonHTMLAttributes<HTMLButtonElement> &
|
|
14
|
-
PreactDOMAttributes) {
|
|
15
|
-
const [showTooltip, setShowTooltip] = useState(null);
|
|
16
|
-
const [positionTooltip, setPositionTooltip] = useState<DOMRect>();
|
|
17
|
-
|
|
18
|
-
const handleIconClick = (event) => {
|
|
19
|
-
setPositionTooltip(event.currentTarget.getBoundingClientRect());
|
|
20
|
-
setShowTooltip(!showTooltip);
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
return (
|
|
24
|
-
<>
|
|
25
|
-
<IconButton
|
|
26
|
-
className={`border-none ${className}`}
|
|
27
|
-
onClick={handleIconClick}
|
|
28
|
-
selected={showTooltip}
|
|
29
|
-
{...props}
|
|
30
|
-
>
|
|
31
|
-
<ShareMenu />
|
|
32
|
-
</IconButton>
|
|
33
|
-
|
|
34
|
-
{showTooltip && positionTooltip && (
|
|
35
|
-
<div
|
|
36
|
-
className="border-grey fixed rounded-lg border bg-white p-2 shadow-lg"
|
|
37
|
-
style={{
|
|
38
|
-
left: positionTooltip.left + 40,
|
|
39
|
-
top: positionTooltip.top - 10,
|
|
40
|
-
}}
|
|
41
|
-
>
|
|
42
|
-
<div className="pr-4">
|
|
43
|
-
<IconButton
|
|
44
|
-
className="absolute top-[-5px] right-[-5px] border-none bg-transparent p-0"
|
|
45
|
-
onClick={handleIconClick}
|
|
46
|
-
>
|
|
47
|
-
<Cancel height="18px" width="18px" />
|
|
48
|
-
</IconButton>
|
|
49
|
-
<RvfInputCopy />
|
|
50
|
-
<p className="py-2">
|
|
51
|
-
Sie können auch den Link aus der Adresszeile des Browsers
|
|
52
|
-
kopieren.
|
|
53
|
-
</p>
|
|
54
|
-
</div>
|
|
55
|
-
<div className="border-grey absolute top-4 -left-1.5 size-2.5 rotate-45 border border-t-0 border-r-0 bg-white"></div>
|
|
56
|
-
</div>
|
|
57
|
-
)}
|
|
58
|
-
</>
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export default PermalinkButton;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { default } from "./PermalinkButton";
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
|
5
|
-
<svg
|
|
6
|
-
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
7
|
-
xmlns:cc="http://creativecommons.org/ns#"
|
|
8
|
-
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
9
|
-
xmlns:svg="http://www.w3.org/2000/svg"
|
|
10
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
-
version="1.1"
|
|
12
|
-
width="100%"
|
|
13
|
-
height="100%"
|
|
14
|
-
viewBox="0 0 14 14"
|
|
15
|
-
id="svg2">
|
|
16
|
-
<metadata
|
|
17
|
-
id="metadata8">
|
|
18
|
-
<rdf:RDF>
|
|
19
|
-
<cc:Work
|
|
20
|
-
rdf:about="">
|
|
21
|
-
<dc:format>image/svg+xml</dc:format>
|
|
22
|
-
<dc:type
|
|
23
|
-
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
24
|
-
<dc:title></dc:title>
|
|
25
|
-
</cc:Work>
|
|
26
|
-
</rdf:RDF>
|
|
27
|
-
</metadata>
|
|
28
|
-
<defs
|
|
29
|
-
id="defs6" />
|
|
30
|
-
<rect
|
|
31
|
-
width="14"
|
|
32
|
-
height="14"
|
|
33
|
-
x="0"
|
|
34
|
-
y="0"
|
|
35
|
-
id="canvas"
|
|
36
|
-
style="fill:none;stroke:none;visibility:hidden" />
|
|
37
|
-
<path
|
|
38
|
-
d="m 14,8 0,1 -6,-1 0,3 2,2 0,1 L 7,13 4,14 4,13 6,11 6,8 0,9 0,8 6,5 6,2 C 6,1 6.22222,0 7,0 7.77777,0 8,1 8,2 l 0,3 z"
|
|
39
|
-
id="airport"
|
|
40
|
-
style="fill:#000000;fill-opacity:1;stroke:none" />
|
|
41
|
-
</svg>
|