@geops/rvf-mobility-web-component 0.1.15 → 0.1.16
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 +29 -0
- package/docutils.js +8 -2
- package/index.html +14 -2
- package/index.js +162 -75
- package/package.json +2 -1
- package/src/RealtimeLayer/RealtimeLayer.tsx +2 -0
- package/src/RvfExportMenu/RvfExportMenu.tsx +12 -1
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +25 -4
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/FloatingVehiclesDetails.tsx +53 -0
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/index.tsx +1 -0
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +129 -0
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/StationDetails.tsx +24 -0
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/index.tsx +1 -0
- package/src/RvfFeatureDetails/RvfSharedMobilityDetail/index.tsx +1 -0
- package/src/RvfLineNetworkPlanLayer/RvfLineNetworkPlanLayer.tsx +2 -0
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +107 -26
- package/src/RvfOverlayHeader/RvfOverlayHeader.tsx +1 -1
- package/src/RvfPoisLayer/RvfPoisLayer.tsx +2 -0
- package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +64 -0
- package/src/RvfSelectedFeatureHighlightLayer/index.tsx +1 -0
- package/src/RvfSellingPointsLayer/RvfSellingPointsLayer.tsx +2 -0
- package/src/RvfShare/RvfShare.tsx +1 -1
- package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +50 -18
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +2 -10
- package/src/RvfTarifZonenLayer/RvfTarifZonenLayer.tsx +2 -0
- package/src/RvfTopics/RvfTopics.tsx +40 -8
- package/src/StationsLayer/StationsLayer.tsx +2 -0
- package/src/icons/Bike/rvf_shared_bike.svg +2 -2
- package/src/icons/Car/rvf_shared_car.svg +3 -3
- package/src/icons/CargoBike/rvf_shared_cargo_bike.svg +3 -3
- package/src/icons/Scooter/rvf_shared_scooter.svg +2 -2
- package/src/index.tsx +4 -0
- package/src/logos/callabike_logo.png +0 -0
- package/src/logos/flinkster_logo.png +0 -0
- package/src/logos/gruene_flotte_logo.png +0 -0
- package/src/logos/logo_frelo_web_rgb.png +0 -0
- package/src/logos/natur_energie_logo.png +0 -0
- package/src/logos/yoio_logo.png +0 -0
- package/src/logos/zeus_logo.png +0 -0
- package/src/utils/applyInitialLayerVisibility.ts +41 -0
- package/src/utils/constants.ts +30 -0
- package/src/utils/{createSharedMobilityLayer.ts → createFreeFloatMobilityLayer.ts} +41 -69
- package/src/utils/createMobiDataBwWfsLayer.ts +108 -67
- package/src/utils/exportPdf.ts +1 -4
- package/src/utils/getLayersAsFlatArray.ts +22 -0
- package/src/utils/getLinkByDevice.ts +28 -0
- package/src/utils/getPermalinkParameters.ts +27 -0
- package/src/utils/hooks/useInitialLayersVisiblity.tsx +28 -0
- package/src/utils/hooks/useMapContext.tsx +2 -0
- package/src/utils/hooks/useUpdatePermalink.tsx +44 -11
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.1.16](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.15...v0.1.16) (2025-01-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add layers attribute and in permalink ([#19](https://github.com/geops/rvf-mobility-web-component/issues/19)) ([5b714f4](https://github.com/geops/rvf-mobility-web-component/commit/5b714f4a52d2083a688f535964f5fd08313e3072))
|
|
11
|
+
* added feature details ([#20](https://github.com/geops/rvf-mobility-web-component/issues/20)) ([2eb738e](https://github.com/geops/rvf-mobility-web-component/commit/2eb738e4e360564ffd8a8f28c52a4b4494c462e7))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* adapt zindex ([d1d34b9](https://github.com/geops/rvf-mobility-web-component/commit/d1d34b9025ca70cf377a0a708311bdb56ca37774))
|
|
17
|
+
* add highlight style ([22d4387](https://github.com/geops/rvf-mobility-web-component/commit/22d4387a9a7605fcb09bbc019fb7d9a6248fab69))
|
|
18
|
+
* add menu attributes ([12381b0](https://github.com/geops/rvf-mobility-web-component/commit/12381b03594d9149747a5905fa87bba9f5637ece))
|
|
19
|
+
* add provider logos ([0bd27ab](https://github.com/geops/rvf-mobility-web-component/commit/0bd27ab05f4095cf85e5136f478528a943183e64))
|
|
20
|
+
* change file name ([00a3bae](https://github.com/geops/rvf-mobility-web-component/commit/00a3bae81c51cda8595d4b4b357c50d0ba559929))
|
|
21
|
+
* fix export title ([c35b790](https://github.com/geops/rvf-mobility-web-component/commit/c35b790448030c3644aaf71659d0de16cb03333a))
|
|
22
|
+
* fix export title ([2b48849](https://github.com/geops/rvf-mobility-web-component/commit/2b488492fcc3d173b575f870c479f59d5fae16e2))
|
|
23
|
+
* hide relatime layer on export ([3438f5f](https://github.com/geops/rvf-mobility-web-component/commit/3438f5fd7a5ad8d1630c3ba5dd72758758d7feec))
|
|
24
|
+
* import current zoom level ([31e2c51](https://github.com/geops/rvf-mobility-web-component/commit/31e2c51099ce507dd450ea222ce8d0bd31bffe8d))
|
|
25
|
+
* improve style ([25a33ea](https://github.com/geops/rvf-mobility-web-component/commit/25a33ea4e6edec82ae5d032c7552c42f8f8aa75f))
|
|
26
|
+
* improve style on small width ([4878ed5](https://github.com/geops/rvf-mobility-web-component/commit/4878ed5d374c20fc8954b5866f2f46090a0c60f8))
|
|
27
|
+
* improve zindex ([2350483](https://github.com/geops/rvf-mobility-web-component/commit/2350483fe04e986a8a5e8254666519782d1673bb))
|
|
28
|
+
* improve zindex ([b4e5854](https://github.com/geops/rvf-mobility-web-component/commit/b4e58546e3f22ad6d5e67da8c570f91e6d98e67c))
|
|
29
|
+
* make cluister feature selectable ([bfb0926](https://github.com/geops/rvf-mobility-web-component/commit/bfb0926bf7b30edfab3154e90c69f324764a053f))
|
|
30
|
+
* set width as befotre ([6bfcf90](https://github.com/geops/rvf-mobility-web-component/commit/6bfcf901dc93c1e8bdff84c1e900334fe48e54f1))
|
|
31
|
+
* size of amount circle is fixed ([#18](https://github.com/geops/rvf-mobility-web-component/issues/18)) ([45d29fa](https://github.com/geops/rvf-mobility-web-component/commit/45d29fa1786dbd8eccf46a79f73aae041b052209))
|
|
32
|
+
* use same radius to avoid artifacts ([1397514](https://github.com/geops/rvf-mobility-web-component/commit/139751442f9f7ed86ed7cc856cd1f255e0551bb0))
|
|
33
|
+
|
|
5
34
|
### [0.1.15](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.14...v0.1.15) (2025-01-10)
|
|
6
35
|
|
|
7
36
|
|
package/docutils.js
CHANGED
|
@@ -59,7 +59,12 @@ function applyPermalinkParameters(wc) {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
// Generates a HTML table with all attributes of a web component
|
|
62
|
-
function generateAttributesTable(
|
|
62
|
+
function generateAttributesTable(
|
|
63
|
+
wc,
|
|
64
|
+
attrs,
|
|
65
|
+
booleanAttrs = [],
|
|
66
|
+
descriptionByAttr = {},
|
|
67
|
+
) {
|
|
63
68
|
let innerHMTL = `<table class="table-auto w-full" >
|
|
64
69
|
<thead>
|
|
65
70
|
<tr>
|
|
@@ -100,7 +105,8 @@ function generateAttributesTable(wc, attrs, booleanAttrs = []) {
|
|
|
100
105
|
<button class="border p-2 bg-black hover:bg-gray-700 text-white" onclick="document.querySelector('${wc.localName}').setAttribute('${key}', this.previousElementSibling.value);onAttributeUpdate(document.querySelector('${wc.localName}'),this.previousElementSibling.name, this.previousElementSibling.value);">Update</button>`
|
|
101
106
|
}
|
|
102
107
|
</div>
|
|
103
|
-
|
|
108
|
+
${descriptionByAttr[key] ? `<div class="pt-2">${descriptionByAttr[key]}</div>` : ``}
|
|
109
|
+
</td>
|
|
104
110
|
</tr>
|
|
105
111
|
`;
|
|
106
112
|
})
|
package/index.html
CHANGED
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
</head>
|
|
33
33
|
<body class="p-8">
|
|
34
34
|
<!-- tailwind hack to add class used in docutils -->
|
|
35
|
-
<div class="border px-4 py-2 table-auto w-full flex gap-4 p-2 bg-black text-white hover:bg-gray-700" style="display:none;"></div>
|
|
35
|
+
<div class="border px-4 py-2 table-auto w-full flex gap-4 p-2 bg-black text-white hover:bg-gray-700 pt-2" style="display:none;"></div>
|
|
36
|
+
<div class="pt-2" style="display:none;"></div>
|
|
36
37
|
<div id="doc" style="display: none" class="mx-auto max-w-3xl space-y-4">
|
|
37
38
|
<h1 class="flex gap-4"><img src="./Logo.svg">Mobility Web Component</h1>
|
|
38
39
|
<p>This is a demo of the Mobility Web Component.</p>
|
|
@@ -68,6 +69,8 @@
|
|
|
68
69
|
// "baselayer",
|
|
69
70
|
// "center",
|
|
70
71
|
// "geolocation",
|
|
72
|
+
"layers",
|
|
73
|
+
"layertree",
|
|
71
74
|
// "mapsurl",
|
|
72
75
|
// "mots",
|
|
73
76
|
// "notification",
|
|
@@ -75,11 +78,13 @@
|
|
|
75
78
|
// "notificationurl",
|
|
76
79
|
// "notificationbeforelayerid",
|
|
77
80
|
"realtime",
|
|
81
|
+
"share",
|
|
78
82
|
// "realtimeUrl",
|
|
79
83
|
"search",
|
|
80
84
|
// "tenant",
|
|
81
85
|
// "zoom",
|
|
82
86
|
"permalink",
|
|
87
|
+
"print"
|
|
83
88
|
];
|
|
84
89
|
|
|
85
90
|
const booleanAttrs = [
|
|
@@ -88,6 +93,9 @@
|
|
|
88
93
|
"realtime",
|
|
89
94
|
"search",
|
|
90
95
|
"permalink",
|
|
96
|
+
"layertree",
|
|
97
|
+
"share",
|
|
98
|
+
"print"
|
|
91
99
|
];
|
|
92
100
|
|
|
93
101
|
const events = [
|
|
@@ -95,7 +103,11 @@
|
|
|
95
103
|
// "mwc:attribute",
|
|
96
104
|
];
|
|
97
105
|
|
|
98
|
-
|
|
106
|
+
const descriptionByAttr = {
|
|
107
|
+
layers: "A comma separated list of layers: echtzeit,haltestellen,verkaufsstellen,liniennetz,tarifzonen,fahrrad,auto,cargobike,e-roller,mitfahrpunkt,pois"
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
document.querySelector('#attributes').innerHTML = generateAttributesTable(wc, attrs, booleanAttrs, descriptionByAttr);
|
|
99
111
|
document.querySelector('#events').innerHTML = generateEventsTable(wc, events);
|
|
100
112
|
document.querySelector('#code').innerHTML = generateCodeText(wc, attrs, pkgSrc);
|
|
101
113
|
wc.addEventListener('mwc:attribute', (event) => {
|