@geops/rvf-mobility-web-component 0.1.31 → 0.1.33
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/docutils.js +1 -1
- package/index.html +13 -5
- package/index.js +1328 -96560
- package/package.json +1 -1
- package/src/Map/Map.tsx +4 -0
- package/src/NotificationLayer/NotificationLayer.tsx +84 -57
- package/src/NotificationLayer/notificationUtils.ts +191 -23
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +2 -2
- package/src/icons/warning-banner.png +0 -0
- package/src/icons/warning.png +0 -0
- package/src/utils/addSourceAndLayers.ts +24 -2
- package/src/utils/hooks/useUpdatePermalink.tsx +18 -7
- package/src/utils/hooks/useZoom.tsx +14 -2
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.33](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.32...v0.1.33) (2025-02-20)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* send the change of permalink to the parent ([368990d](https://github.com/geops/rvf-mobility-web-component/commit/368990d02522286e4e397a5088e3b4cbe93b52a7))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* add icon on icon ref point ([6944936](https://github.com/geops/rvf-mobility-web-component/commit/6944936b0d29a70c1a475033e9f448a2f049b692))
|
|
16
|
+
* add icon on icon ref point ([2a4459f](https://github.com/geops/rvf-mobility-web-component/commit/2a4459f1f69c43dbf8d0ef87fee68b39cd6192b0))
|
|
17
|
+
* display also deviation notifications ([8d4360d](https://github.com/geops/rvf-mobility-web-component/commit/8d4360d7950ba2b506bbdf468f7917bb647657b0))
|
|
18
|
+
|
|
19
|
+
### [0.1.32](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.31...v0.1.32) (2025-02-20)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* remove default border and add documentation ([8291492](https://github.com/geops/rvf-mobility-web-component/commit/82914928dd2cbe2150d32f1a9cc4f4e82ffa3f9c))
|
|
25
|
+
|
|
5
26
|
### [0.1.31](https://github.com/geops/rvf-mobility-web-component/compare/v0.1.30...v0.1.31) (2025-02-19)
|
|
6
27
|
|
|
7
28
|
|
package/docutils.js
CHANGED
|
@@ -135,7 +135,7 @@ function generateCodeText(
|
|
|
135
135
|
let codeText = "";
|
|
136
136
|
codeText = `<script\n\ttype="module"\n\tsrc="${pkgSrc}">
|
|
137
137
|
</script>
|
|
138
|
-
<${wc.localName} style="display:block;width:100%;height:500px;"`;
|
|
138
|
+
<${wc.localName} style="display:block;width:100%;height:500px;border:1px solid #e5e7eb;border-radius:16px;"`;
|
|
139
139
|
|
|
140
140
|
attrs.forEach((key) => {
|
|
141
141
|
const attributeValue = wc.getAttribute(key);
|
package/index.html
CHANGED
|
@@ -41,7 +41,7 @@
|
|
|
41
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-hidden w-full"
|
|
44
|
+
class="h-96 block resize overflow-hidden w-full border rounded-[16px]"
|
|
45
45
|
></geops-mobility>
|
|
46
46
|
|
|
47
47
|
<br />
|
|
@@ -69,9 +69,11 @@
|
|
|
69
69
|
// "baselayer",
|
|
70
70
|
"center",
|
|
71
71
|
"details",
|
|
72
|
+
"extent",
|
|
72
73
|
"geolocation",
|
|
73
74
|
"layers",
|
|
74
75
|
"layertree",
|
|
76
|
+
"maxextent",
|
|
75
77
|
// "mapsurl",
|
|
76
78
|
// "mots",
|
|
77
79
|
// "notification",
|
|
@@ -87,6 +89,7 @@
|
|
|
87
89
|
"permalink",
|
|
88
90
|
"print",
|
|
89
91
|
"toolbar",
|
|
92
|
+
"maxextent",
|
|
90
93
|
];
|
|
91
94
|
|
|
92
95
|
const booleanAttrs = [
|
|
@@ -110,10 +113,12 @@
|
|
|
110
113
|
];
|
|
111
114
|
|
|
112
115
|
const descriptionByAttr = {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
116
|
+
extent: "The extent to show when opening the map in EPSG:3857 coordinates, ex: 831634,5933959,940649,6173660. Default is the RVF data extent: 834896.1809495519,6057089.852937808,940649.6972031617,6173660.451962929 . Parameter required if center and zoom are not set.",
|
|
117
|
+
maxextent: "The maximum extent of the map in EPSG:3857 coordinates, ex: 831634,5933959,940649,6173660. Default is the RVF data extent: [834896.1809495519,6057089.852937808,940649.6972031617,6173660.451962929 .",
|
|
118
|
+
search: "Show/hide the search bar on the map. Default to false.",
|
|
119
|
+
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-component. Default to false. Parameter required if extent is not set.",
|
|
120
|
+
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]. Default to null. Parameter required if extent is not set.",
|
|
121
|
+
zoom: "The zoom level of the map (between 0 and 20). Default to null. If maxextent paramter is defined some values will not have any effects because the view will be constraint to the maxextent defined. Parameter required if extent is not set.",
|
|
117
122
|
print: "Show/hide the print button in the toolbar. Default to true.",
|
|
118
123
|
share: "Show/hide the share button in the toolbar. Default to true.",
|
|
119
124
|
layertree: "Show/hide the layer tree button in the toolbar. Default to true.",
|
|
@@ -130,6 +135,9 @@
|
|
|
130
135
|
wc.addEventListener('mwc:attribute', (event) => {
|
|
131
136
|
document.querySelector('#code').innerHTML = generateCodeText(wc, attrs, pkgSrc);
|
|
132
137
|
});
|
|
138
|
+
wc.addEventListener('mwc:permalink', (event) => {
|
|
139
|
+
window.parent?.postMessage({type:"mwc:permalink", data: event.data}, '*');
|
|
140
|
+
});
|
|
133
141
|
applyPermalinkParameters(wc);
|
|
134
142
|
</script>
|
|
135
143
|
</body>
|