@geops/rvf-mobility-web-component 0.1.30 → 0.1.31
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 +19 -0
- package/docutils.js +10 -1
- package/index.html +23 -10
- package/index.js +96446 -1064
- package/package.json +2 -1
- package/src/NotificationLayer/NotificationLayer.tsx +32 -2
- package/src/NotificationLayer/notificationUtils.ts +4 -0
- package/src/RvfFeatureDetails/RvfFeatureDetails.tsx +19 -4
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/RvfLineNetworkDetails.tsx +98 -0
- package/src/RvfFeatureDetails/RvfLineNetworkDetails/index.js +1 -0
- package/src/RvfFeatureDetails/RvfNotificationDetails/RvfNotificationDetails.tsx +77 -0
- package/src/RvfFeatureDetails/RvfNotificationDetails/index.ts +1 -0
- package/src/RvfFeatureDetails/{RVFSellingPointDetails/RVFSellingPointDetails.tsx → RvfSellingPointDetails/RvfSellingPointDetails.tsx} +2 -2
- package/src/RvfFeatureDetails/RvfSellingPointDetails/index.js +1 -0
- package/src/RvfLineNetworkPlanLayer/RvfLineNetworkPlanLayer.tsx +3 -2
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +3 -5
- package/src/RvfSelectedFeatureHighlightLayer/RvfSelectedFeatureHighlightLayer.tsx +9 -1
- package/src/utils/getFeatureInformationTitle.ts +4 -0
- package/tailwind.config.mjs +1 -1
- package/src/RvfFeatureDetails/RVFSellingPointDetails/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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.31](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.30...v0.1.31) (2025-02-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* add line network details view ([038082f](https://github.com/geops/rvf-mobility-web-component/commit/038082fec96a2b5b0a705556c742252d5c239d28))
|
|
11
|
+
* add notifications details ([b37e9e2](https://github.com/geops/rvf-mobility-web-component/commit/b37e9e29194664445558864bd36c0280855f8de9))
|
|
12
|
+
* add notifications details ([dfa3c10](https://github.com/geops/rvf-mobility-web-component/commit/dfa3c10c8493d195a909b42537fb1eef456b62aa))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* add border radius ([19b0293](https://github.com/geops/rvf-mobility-web-component/commit/19b0293af213c7ccce043c5685323578e844d8ab))
|
|
18
|
+
* add border radius ([042d2b9](https://github.com/geops/rvf-mobility-web-component/commit/042d2b97f8f10d2ebcdd4244459b174aaa31a916))
|
|
19
|
+
* add border radius ([b5ca9d2](https://github.com/geops/rvf-mobility-web-component/commit/b5ca9d2ba77e78d74e38376d885c163944c62043))
|
|
20
|
+
* improve documentation ([7b1f39b](https://github.com/geops/rvf-mobility-web-component/commit/7b1f39b2dc33e6d3ee7b20379b7da2a323874e51))
|
|
21
|
+
* improve documentation ([d06619d](https://github.com/geops/rvf-mobility-web-component/commit/d06619d9a060fbdba3b6f1c874f5e95ae4ee3119))
|
|
22
|
+
* re add preview ([b994540](https://github.com/geops/rvf-mobility-web-component/commit/b994540bb51a9e593242e3c9cefaf90ffa628246))
|
|
23
|
+
|
|
5
24
|
### [0.1.30](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.29...v0.1.30) (2025-02-18)
|
|
6
25
|
|
|
7
26
|
|
package/docutils.js
CHANGED
|
@@ -63,6 +63,7 @@ function generateAttributesTable(
|
|
|
63
63
|
wc,
|
|
64
64
|
attrs,
|
|
65
65
|
booleanAttrs = [],
|
|
66
|
+
booleanTrueByDefault = [],
|
|
66
67
|
descriptionByAttr = {},
|
|
67
68
|
) {
|
|
68
69
|
let innerHMTL = `<table class="table-auto w-full" >
|
|
@@ -79,6 +80,14 @@ function generateAttributesTable(
|
|
|
79
80
|
.sort()
|
|
80
81
|
.map((key) => {
|
|
81
82
|
const isBoolean = booleanAttrs.includes(key);
|
|
83
|
+
const defaultChecked = booleanTrueByDefault.includes(key)
|
|
84
|
+
? "checked"
|
|
85
|
+
: "";
|
|
86
|
+
const currValue = wc.getAttribute(key);
|
|
87
|
+
let checked = currValue === "true" ? "checked" : "";
|
|
88
|
+
if (currValue !== "true" && currValue !== "false") {
|
|
89
|
+
checked = defaultChecked;
|
|
90
|
+
}
|
|
82
91
|
return `
|
|
83
92
|
<tr>
|
|
84
93
|
<td class="border px-4 py-2">${key}</td>
|
|
@@ -92,7 +101,7 @@ function generateAttributesTable(
|
|
|
92
101
|
type="checkbox"
|
|
93
102
|
class="border"
|
|
94
103
|
name="${key}"
|
|
95
|
-
${
|
|
104
|
+
${checked ? "checked" : ""}
|
|
96
105
|
onchange="document.querySelector('${wc.localName}').setAttribute('${key}', this.checked);onAttributeUpdate(document.querySelector('${wc.localName}'),this.name, this.checked);"
|
|
97
106
|
/>`
|
|
98
107
|
: `
|
package/index.html
CHANGED
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
<h1 class="flex gap-4"><img src="./Logo.svg">Mobility Web Component</h1>
|
|
39
39
|
<p>This is a demo of the Mobility Web Component.</p>
|
|
40
40
|
<h2>Usage example</h2>
|
|
41
|
-
<pre id="code" class="bg-slate-800 text-slate-200 p-4 rounded"></pre>
|
|
41
|
+
<pre id="code" class="bg-slate-800 text-slate-200 p-4 rounded overflow-auto"></pre>
|
|
42
42
|
|
|
43
43
|
<geops-mobility
|
|
44
|
-
class="h-96 block resize overflow-
|
|
44
|
+
class="h-96 block resize overflow-hidden w-full"
|
|
45
45
|
></geops-mobility>
|
|
46
46
|
|
|
47
47
|
<br />
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
const attrs = [
|
|
68
68
|
// "apikey",
|
|
69
69
|
// "baselayer",
|
|
70
|
-
|
|
70
|
+
"center",
|
|
71
71
|
"details",
|
|
72
|
-
|
|
72
|
+
"geolocation",
|
|
73
73
|
"layers",
|
|
74
74
|
"layertree",
|
|
75
75
|
// "mapsurl",
|
|
@@ -81,11 +81,12 @@
|
|
|
81
81
|
"realtime",
|
|
82
82
|
"share",
|
|
83
83
|
// "realtimeUrl",
|
|
84
|
-
"search",
|
|
84
|
+
// "search",
|
|
85
85
|
// "tenant",
|
|
86
|
-
|
|
86
|
+
"zoom",
|
|
87
87
|
"permalink",
|
|
88
|
-
"print"
|
|
88
|
+
"print",
|
|
89
|
+
"toolbar",
|
|
89
90
|
];
|
|
90
91
|
|
|
91
92
|
const booleanAttrs = [
|
|
@@ -93,12 +94,14 @@
|
|
|
93
94
|
"geolocation",
|
|
94
95
|
"notification",
|
|
95
96
|
"realtime",
|
|
96
|
-
"search",
|
|
97
|
+
// "search",
|
|
97
98
|
"permalink",
|
|
98
99
|
"layertree",
|
|
99
100
|
"share",
|
|
100
|
-
"print"
|
|
101
|
+
"print",
|
|
102
|
+
"toolbar",
|
|
101
103
|
];
|
|
104
|
+
const booleanTrueByDefault = [ "details", "print", "share", "layertree", "geolocation", "toolbar", "realtime"];
|
|
102
105
|
|
|
103
106
|
const events = [
|
|
104
107
|
"singleclick",
|
|
@@ -107,11 +110,21 @@
|
|
|
107
110
|
];
|
|
108
111
|
|
|
109
112
|
const descriptionByAttr = {
|
|
113
|
+
serach: "Show/hide the search bar on the map. Default to false.",
|
|
114
|
+
permalink: "Add/remove url paremeters to the current window location. These parameters are used to store the current state of the map. They will be used on page load to configure the web-compnent. Default to false.",
|
|
115
|
+
center: "The center of the map in EPSG:3857 coordinates, ex: 831634,5933959. The center must be inside the RVF extent: [834896.1809495519, 6057089.852937808, 940649.6972031617, 6173660.451962929].",
|
|
116
|
+
zoom: "The zoom level of the map (between 10 and 20).",
|
|
117
|
+
print: "Show/hide the print button in the toolbar. Default to true.",
|
|
118
|
+
share: "Show/hide the share button in the toolbar. Default to true.",
|
|
119
|
+
layertree: "Show/hide the layer tree button in the toolbar. Default to true.",
|
|
120
|
+
geolocation: "Show/hide geolocation button on the map. Default to true.",
|
|
121
|
+
toolbar: "Show/hide the toolbar on the left. Default to true.",
|
|
110
122
|
layers: "A comma separated list of layers: echtzeit,haltestellen,verkaufsstellen,liniennetz,tarifzonen,fahrrad,auto,cargobike,e-roller,mitfahrpunkt,pois",
|
|
111
123
|
details: "Show shared mobility details in the sidebar when we click on an shared mobility feature.",
|
|
124
|
+
realtime: "Show/hide the realtime data in the map. Default to true."
|
|
112
125
|
};
|
|
113
126
|
|
|
114
|
-
document.querySelector('#attributes').innerHTML = generateAttributesTable(wc, attrs, booleanAttrs, descriptionByAttr);
|
|
127
|
+
document.querySelector('#attributes').innerHTML = generateAttributesTable(wc, attrs, booleanAttrs, booleanTrueByDefault, descriptionByAttr);
|
|
115
128
|
document.querySelector('#events').innerHTML = generateEventsTable(wc, events);
|
|
116
129
|
document.querySelector('#code').innerHTML = generateCodeText(wc, attrs, pkgSrc);
|
|
117
130
|
wc.addEventListener('mwc:attribute', (event) => {
|