@geops/rvf-mobility-web-component 0.1.15 → 0.1.17

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.
Files changed (51) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/docutils.js +8 -2
  3. package/index.html +14 -2
  4. package/index.js +152 -78
  5. package/package.json +2 -1
  6. package/src/RealtimeLayer/RealtimeLayer.tsx +2 -0
  7. package/src/RvfExportMenu/RvfExportMenu.tsx +12 -1
  8. package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +25 -4
  9. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/FloatingVehiclesDetails.tsx +53 -0
  10. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/FloatingVehiclesDetails/index.tsx +1 -0
  11. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/RvfSharedMobilityDetails.tsx +123 -0
  12. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/StationDetails.tsx +32 -0
  13. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/StationDetails/index.tsx +1 -0
  14. package/src/RvfFeatureDetails/RvfSharedMobilityDetail/index.tsx +1 -0
  15. package/src/RvfLineNetworkPlanLayer/RvfLineNetworkPlanLayer.tsx +2 -0
  16. package/src/RvfMobilityMap/RvfMobilityMap.tsx +123 -34
  17. package/src/RvfOverlayHeader/RvfOverlayHeader.tsx +1 -1
  18. package/src/RvfPoisLayer/RvfPoisLayer.tsx +2 -0
  19. package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +64 -0
  20. package/src/RvfSelectedFeatureHighlightLayer/index.tsx +1 -0
  21. package/src/RvfSellingPointsLayer/RvfSellingPointsLayer.tsx +2 -0
  22. package/src/RvfShare/RvfShare.tsx +1 -1
  23. package/src/RvfSharedMobilityLayerGroup/RvfSharedMobilityLayerGroup.tsx +59 -23
  24. package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +2 -10
  25. package/src/RvfTarifZonenLayer/RvfTarifZonenLayer.tsx +2 -0
  26. package/src/RvfTopics/RvfTopics.tsx +40 -8
  27. package/src/StationsLayer/StationsLayer.tsx +2 -0
  28. package/src/icons/Bike/rvf_shared_bike.svg +2 -2
  29. package/src/icons/Car/rvf_shared_car.svg +3 -3
  30. package/src/icons/CargoBike/rvf_shared_cargo_bike.svg +3 -3
  31. package/src/icons/Scooter/rvf_shared_scooter.svg +2 -2
  32. package/src/index.tsx +4 -0
  33. package/src/logos/callabike_logo.png +0 -0
  34. package/src/logos/flinkster_logo.png +0 -0
  35. package/src/logos/gruene_flotte_logo.png +0 -0
  36. package/src/logos/logo_frelo_web_rgb.png +0 -0
  37. package/src/logos/natur_energie_logo.png +0 -0
  38. package/src/logos/yoio_logo.png +0 -0
  39. package/src/logos/zeus_logo.png +0 -0
  40. package/src/utils/applyInitialLayerVisibility.ts +41 -0
  41. package/src/utils/constants.ts +63 -0
  42. package/src/utils/{createSharedMobilityLayer.ts → createFreeFloatMobilityLayer.ts} +41 -69
  43. package/src/utils/createMobiDataBwWfsLayer.ts +108 -67
  44. package/src/utils/exportPdf.ts +1 -4
  45. package/src/utils/getFeatureInformationTitle.ts +37 -0
  46. package/src/utils/getLayersAsFlatArray.ts +22 -0
  47. package/src/utils/getLinkByDevice.ts +23 -0
  48. package/src/utils/getPermalinkParameters.ts +27 -0
  49. package/src/utils/hooks/useInitialLayersVisiblity.tsx +28 -0
  50. package/src/utils/hooks/useMapContext.tsx +2 -0
  51. package/src/utils/hooks/useUpdatePermalink.tsx +44 -11
package/CHANGELOG.md CHANGED
@@ -2,6 +2,44 @@
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.17](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.16...v0.1.17) (2025-01-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * improve css ([89a579e](https://github.com/geops/rvf-mobility-web-component/commit/89a579ec2d06dd361fcb9b2496a1ebbcdfbc7f87))
11
+ * improve deatil informations content ([b79432a](https://github.com/geops/rvf-mobility-web-component/commit/b79432aa11ca6ea504a5b883a23bb5d537497c5b))
12
+ * improve feature informations title ([a20b581](https://github.com/geops/rvf-mobility-web-component/commit/a20b58189129a593502b5ebe42bdd9f61e0c63ee))
13
+
14
+ ### [0.1.16](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.15...v0.1.16) (2025-01-24)
15
+
16
+
17
+ ### Features
18
+
19
+ * 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))
20
+ * 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))
21
+
22
+
23
+ ### Bug Fixes
24
+
25
+ * adapt zindex ([d1d34b9](https://github.com/geops/rvf-mobility-web-component/commit/d1d34b9025ca70cf377a0a708311bdb56ca37774))
26
+ * add highlight style ([22d4387](https://github.com/geops/rvf-mobility-web-component/commit/22d4387a9a7605fcb09bbc019fb7d9a6248fab69))
27
+ * add menu attributes ([12381b0](https://github.com/geops/rvf-mobility-web-component/commit/12381b03594d9149747a5905fa87bba9f5637ece))
28
+ * add provider logos ([0bd27ab](https://github.com/geops/rvf-mobility-web-component/commit/0bd27ab05f4095cf85e5136f478528a943183e64))
29
+ * change file name ([00a3bae](https://github.com/geops/rvf-mobility-web-component/commit/00a3bae81c51cda8595d4b4b357c50d0ba559929))
30
+ * fix export title ([c35b790](https://github.com/geops/rvf-mobility-web-component/commit/c35b790448030c3644aaf71659d0de16cb03333a))
31
+ * fix export title ([2b48849](https://github.com/geops/rvf-mobility-web-component/commit/2b488492fcc3d173b575f870c479f59d5fae16e2))
32
+ * hide relatime layer on export ([3438f5f](https://github.com/geops/rvf-mobility-web-component/commit/3438f5fd7a5ad8d1630c3ba5dd72758758d7feec))
33
+ * import current zoom level ([31e2c51](https://github.com/geops/rvf-mobility-web-component/commit/31e2c51099ce507dd450ea222ce8d0bd31bffe8d))
34
+ * improve style ([25a33ea](https://github.com/geops/rvf-mobility-web-component/commit/25a33ea4e6edec82ae5d032c7552c42f8f8aa75f))
35
+ * improve style on small width ([4878ed5](https://github.com/geops/rvf-mobility-web-component/commit/4878ed5d374c20fc8954b5866f2f46090a0c60f8))
36
+ * improve zindex ([2350483](https://github.com/geops/rvf-mobility-web-component/commit/2350483fe04e986a8a5e8254666519782d1673bb))
37
+ * improve zindex ([b4e5854](https://github.com/geops/rvf-mobility-web-component/commit/b4e58546e3f22ad6d5e67da8c570f91e6d98e67c))
38
+ * make cluister feature selectable ([bfb0926](https://github.com/geops/rvf-mobility-web-component/commit/bfb0926bf7b30edfab3154e90c69f324764a053f))
39
+ * set width as befotre ([6bfcf90](https://github.com/geops/rvf-mobility-web-component/commit/6bfcf901dc93c1e8bdff84c1e900334fe48e54f1))
40
+ * 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))
41
+ * use same radius to avoid artifacts ([1397514](https://github.com/geops/rvf-mobility-web-component/commit/139751442f9f7ed86ed7cc856cd1f255e0551bb0))
42
+
5
43
  ### [0.1.15](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.14...v0.1.15) (2025-01-10)
6
44
 
7
45
 
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(wc, attrs, booleanAttrs = []) {
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
- </td>
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
- document.querySelector('#attributes').innerHTML = generateAttributesTable(wc, attrs, booleanAttrs);
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) => {