@geops/rvf-mobility-web-component 0.1.74 → 0.1.75
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 +21 -0
- package/README.md +17 -55
- package/docutils.js +1 -1
- package/index.html +9 -1
- package/index.js +112 -108
- package/package.json +1 -1
- package/src/FeatureDetails/FeatureDetails.tsx +9 -18
- package/src/LayerTreeMenu/LayerTreeMenu.tsx +1 -1
- package/src/LayoutState/LayoutState.tsx +14 -1
- package/src/LinesNetworkPlanDetails/LinesNetworkPlanDetails.tsx +37 -68
- package/src/LinesNetworkPlanLayerHighlight/LinesNetworkPlanLayerHighlight.tsx +1 -1
- package/src/MobilityMap/MobilityMap.tsx +1 -5
- package/src/MobilityMap/MobilityMapAttributes.ts +9 -5
- package/src/MobilityNotifications/MobilityNotifications.tsx +1 -6
- package/src/OverlayContent/OverlayContent.tsx +1 -2
- package/src/OverlayDetails/OverlayDetails.tsx +23 -2
- package/src/OverlayDetailsHeader/OverlayDetailsHeader.tsx +3 -0
- package/src/OverlayHeader/OverlayHeader.tsx +1 -1
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +5 -4
- package/src/RvfFeatureDetails/RvfSellingPointDetails/RvfSellingPointDetails.tsx +1 -1
- package/src/utils/constants.ts +2 -1
- package/src/utils/hooks/useLayersConfig.tsx +3 -0
- package/src/utils/hooks/{useLnpLineInfo.tsx → useLnp.tsx} +24 -9
- package/src/utils/hooks/useMapContext.tsx +4 -0
- package/src/RvfSingleClickListener/RvfSingleClickListener.tsx +0 -238
- package/src/RvfSingleClickListener/index.tsx +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,27 @@
|
|
|
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.75](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.74...v0.1.75) (2025-10-28)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add lnpid attribute ([df9532a](https://github.com/geops/rvf-mobility-web-component/commit/df9532ae00cf032f67392baef94844d2e20b4b06))
|
|
11
|
+
* avoid duplication ([b81bc66](https://github.com/geops/rvf-mobility-web-component/commit/b81bc661b2e2ced842edb353b87267720015c020))
|
|
12
|
+
* avoid duplication ([9379c6f](https://github.com/geops/rvf-mobility-web-component/commit/9379c6fdfcbe72a1212817bbaa7639c334f9e47f))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add featurelink in type definition ([690bc21](https://github.com/geops/rvf-mobility-web-component/commit/690bc217759bd7b79cde36ea81d0eb47d57863a4))
|
|
18
|
+
* allow to use graphs via url param ([499b6bf](https://github.com/geops/rvf-mobility-web-component/commit/499b6bf7cf98757346a63bba8828bf7a4ccf2f0f))
|
|
19
|
+
* fix default value for layersconfig ([2a31696](https://github.com/geops/rvf-mobility-web-component/commit/2a31696e6d32ae0ba8bec50af9196152362996a8))
|
|
20
|
+
* hide lnpid attribute ([0caf184](https://github.com/geops/rvf-mobility-web-component/commit/0caf1842bea3fb4ddc0c2cb0573e35ab27fe2d0b))
|
|
21
|
+
* improve layersconfig doc ([a679d38](https://github.com/geops/rvf-mobility-web-component/commit/a679d3803a0dd6a1e528e37d7cfd6af60ed7c653))
|
|
22
|
+
* remove useless component ([89e58a7](https://github.com/geops/rvf-mobility-web-component/commit/89e58a794da5d493abb0d9b97c93e97f5685f0a2))
|
|
23
|
+
* us constant for 4326 extent ([31c457c](https://github.com/geops/rvf-mobility-web-component/commit/31c457cdd25a67f8109d363514b3e9a83afd4c31))
|
|
24
|
+
* use publicNow ([6a1f74e](https://github.com/geops/rvf-mobility-web-component/commit/6a1f74e69343789e7d14c4c74b39ad5a5bdeeeb2))
|
|
25
|
+
|
|
5
26
|
### [0.1.74](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.73...v0.1.74) (2025-10-27)
|
|
6
27
|
|
|
7
28
|
|
package/README.md
CHANGED
|
@@ -1,16 +1,20 @@
|
|
|
1
1
|
# rvf-mobility-web-component
|
|
2
2
|
|
|
3
|
-
This project is a fork of the @geops/mobility-web-component project for RVF.
|
|
3
|
+
This project is a fork of the [@geops/mobility-web-component](https://github.com/geops/mobility-web-component) project for RVF.
|
|
4
4
|
|
|
5
|
-
RVF uses
|
|
5
|
+
RVF uses the `geops-mobility` and the `geops.mobility-notifications` web components, not the `geops-mobility-search` web component.
|
|
6
6
|
|
|
7
7
|
RVF uses the npm package `@geops/rvf-mobility-web-component`, no iframe is used to display the map.
|
|
8
8
|
|
|
9
|
-
Design is done by bemerkt.de company, we received 2 Sketch files link to
|
|
9
|
+
Design is done by bemerkt.de company, we received 2 Sketch files link to implement the design.
|
|
10
10
|
|
|
11
|
-
The [Vercel app](https://rvf-mobility-web-component-geops.vercel.app/) is the
|
|
11
|
+
The [Vercel app](https://rvf-mobility-web-component-geops.vercel.app/) is the official documentation for the customer, make sure it is up to date and exhaustive.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
In production RVF uses the latest NPM package [@geops/rvf-mobility-web-component](https://www.npmjs.com/package/@geops/rvf-mobility-web-component) using the url : <https://www.unpkg.com/@geops/rvf-mobility-web-component> so to push something to production you have to publish a new version using:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn publish
|
|
17
|
+
```
|
|
14
18
|
|
|
15
19
|
## Links
|
|
16
20
|
|
|
@@ -27,22 +31,11 @@ Most components in RVF are mostly very generic and could be migrate to the main
|
|
|
27
31
|
- [Carsharing on client production website](https://www.rvf.de/fahrtinfo/rundum-mobil/carsharing)
|
|
28
32
|
- [Bikesharing on client production website](https://www.rvf.de/fahrtinfo/rundum-mobil/frelo-fahrradverleihsystem)
|
|
29
33
|
|
|
30
|
-
## General
|
|
31
|
-
|
|
32
|
-
This project contains a set of web components allowing to use easily the [geOps APIs](https://developer.geops.io/):
|
|
33
|
-
|
|
34
|
-
- `<geops-mobility>`: a web component used to display a map using different [geOps APIs](https://developer.geops.io/).
|
|
35
|
-
- `<geops-mobility-search>`: a search input to search stops using the [geOps Stops API](https://developer.geops.io/apis/stops).
|
|
36
|
-
|
|
37
|
-
## Demo
|
|
38
|
-
|
|
39
|
-
You can see the web components in action using the [demo app](https://rvf-mobility-web-component.geops.io/).
|
|
40
|
-
|
|
41
|
-
If supported, you can see the web-component in fullscreen mode using the URL parameter `fullscreen=true`:
|
|
42
|
-
|
|
43
34
|
## Development
|
|
44
35
|
|
|
45
|
-
|
|
36
|
+
Follow the guidelines from the forked repository [@geops/mobility-web-component](https://github.com/geops/mobility-web-component).
|
|
37
|
+
|
|
38
|
+
Faster development process.
|
|
46
39
|
|
|
47
40
|
```bash
|
|
48
41
|
corepack enable
|
|
@@ -50,46 +43,15 @@ yarn install
|
|
|
50
43
|
yarn start
|
|
51
44
|
```
|
|
52
45
|
|
|
53
|
-
If you want the NextJS documentation website:
|
|
54
|
-
|
|
55
|
-
```bash
|
|
56
|
-
corepack enable
|
|
57
|
-
yarn install && cd doc && yarn install
|
|
58
|
-
yarn doc
|
|
59
|
-
```
|
|
60
|
-
|
|
61
46
|
## Deployment
|
|
62
47
|
|
|
63
|
-
The
|
|
64
|
-
[https://mobility-web-component.geops.io/](https://mobility-web-component.geops.io/).
|
|
65
|
-
|
|
66
|
-
For forked project, the static index.html file is enough as documentation for the client. No need to provide the NextJS documentation website.
|
|
67
|
-
Just set it up properly in vercel. See [RVF configuration](https://vercel.com/geops/rvf-mobility-web-component) for an example.
|
|
68
|
-
|
|
69
|
-
## Guidelines
|
|
70
|
-
|
|
71
|
-
- every new components must have a new folder `MyComponent` with an `index.tsx` that contains only an export and a `MyNewComponent.tsx` file. The reason is too simplify the override in forked project.
|
|
48
|
+
The [Vercel app](https://rvf-mobility-web-component-geops.vercel.app/) is the official documentation for the customer, make sure it is up to date and exhaustive. The deploy is automatic with every merge on `main` branch.
|
|
72
49
|
|
|
73
|
-
|
|
50
|
+
In production RVF uses the latest NPM package [@geops/rvf-mobility-web-component](https://www.npmjs.com/package/@geops/rvf-mobility-web-component) so to push something to production you have to publish a new version using:
|
|
74
51
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- create a fork from this repository, and call it `trenord-mobility-web-component`.
|
|
79
|
-
- change the package name in `package.json` to `@geops/trenord-mobility-web-component`.
|
|
80
|
-
- change the `README` and `index.html` titles.
|
|
81
|
-
- create a new `MobilityMap` component in `src/` called `TrenordMobilityMap`. In this component you can copy the content of `MobilityMap` or just use the `MobilityMap` component with default values. It depends of your use case.
|
|
82
|
-
- change the `MobilityMap` import to `TrenordMobilityMap` in `src/MobilityMap/index.tsx`.
|
|
83
|
-
- create a new npm package on `npmjs.com` from this repository, and call it `@geops/trenord-mobility-web-component`.
|
|
84
|
-
- publish a beta version to test the publishing with `ỳarn publish:beta`
|
|
85
|
-
|
|
86
|
-
At this point you're ready to create custom code, some rules must be followed to facilitate the merge of upstream `mobility-web-component` repository:
|
|
87
|
-
|
|
88
|
-
- always create new components using the client name as prefix, like `TrenordRouteSchedule`, or put them in a client specific folder `src/trenord/RoutSchedule`.
|
|
89
|
-
- to use the overrided components just change the export in the `index.tsx` of the component to overrided.
|
|
90
|
-
- never modify the original components in the forked repository, do it in the upstream repository then merge it in the forked repository.
|
|
91
|
-
- never update dependencies in the forked repository, do it in the upstream repository then merge it in the forked repository.
|
|
92
|
-
- if you have a doubt, ask.
|
|
52
|
+
```bash
|
|
53
|
+
yarn publish
|
|
54
|
+
```
|
|
93
55
|
|
|
94
56
|
## Merge upstream repository
|
|
95
57
|
|
package/docutils.js
CHANGED
|
@@ -280,7 +280,7 @@ function generateAttributesTable(
|
|
|
280
280
|
class="border px-2"
|
|
281
281
|
name="${key}"
|
|
282
282
|
placeholder="${defaultValueByAttr[key] || ""}"
|
|
283
|
-
value="${wc.getAttribute(key) || defaultValueByAttr[key] || ""}"
|
|
283
|
+
value="${(wc.getAttribute(key) || defaultValueByAttr[key] || "").replace(/"/g, """)}"
|
|
284
284
|
/>
|
|
285
285
|
<button class="border cursor-pointer 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, '${reloadAttrs.join(",")}');">Update</button>
|
|
286
286
|
</div>`
|
package/index.html
CHANGED
|
@@ -114,7 +114,7 @@ document.getElementById('map').addEventListener('mwc:attribute', (event) => {
|
|
|
114
114
|
"Will not apply web component attributes defined as url parameters. Useful to test the permalink functionality of the web component.",
|
|
115
115
|
public: true,
|
|
116
116
|
},
|
|
117
|
-
|
|
117
|
+
|
|
118
118
|
debug: {
|
|
119
119
|
type: "boolean",
|
|
120
120
|
defaultValue: "false",
|
|
@@ -123,6 +123,14 @@ document.getElementById('map').addEventListener('mwc:attribute', (event) => {
|
|
|
123
123
|
public: true,
|
|
124
124
|
},
|
|
125
125
|
|
|
126
|
+
graphs: {
|
|
127
|
+
type: "boolean",
|
|
128
|
+
defaultValue: "false",
|
|
129
|
+
description:
|
|
130
|
+
"Use graphs from the style for realtime data.",
|
|
131
|
+
public: true,
|
|
132
|
+
},
|
|
133
|
+
|
|
126
134
|
private: {
|
|
127
135
|
type: "boolean",
|
|
128
136
|
defaultValue: "false",
|