@geops/rvf-mobility-web-component 0.1.48 → 0.1.50
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 +14 -0
- package/index.js +73 -26
- package/package.json +1 -1
- package/src/MobilityMap/MobilityMapAttributes.ts +19 -18
- package/src/RvfMobilityMap/RvfMobilityMap.tsx +52 -0
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@geops/rvf-mobility-web-component",
|
|
3
3
|
"license": "UNLICENSED",
|
|
4
4
|
"description": "Web components for rvf in the domains of mobility and logistics.",
|
|
5
|
-
"version": "0.1.
|
|
5
|
+
"version": "0.1.50",
|
|
6
6
|
"homepage": "https://rvf-mobility-web-component-geops.vercel.app/",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
RVF_LAYERS_NAMES,
|
|
8
8
|
} from "../utils/constants";
|
|
9
9
|
|
|
10
|
-
import type { LayersConfig } from "../utils/hooks/useLayerConfig";
|
|
10
|
+
// import type { LayersConfig } from "../utils/hooks/useLayerConfig";
|
|
11
11
|
|
|
12
12
|
// const geopsApiLink = `<a href="https://developer.geops.io/">geOps API key</a>`;
|
|
13
13
|
// const geopsMapsApiLink = `<a href="https://developer.geops.io/apis/maps">geOps Maps API</a>`;
|
|
@@ -103,23 +103,24 @@ const attrs: MobilityMapAttributes = {
|
|
|
103
103
|
description: `A comma separated list of layers's name to make visible on load, others are hidden. If empty, all layers will be hidden except the baselayer.<br/>Layers available are ${Object.values(RVF_LAYERS_NAMES).join(", ")}.`,
|
|
104
104
|
},
|
|
105
105
|
layersconfig: {
|
|
106
|
-
defaultValue:
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
106
|
+
// defaultValue:
|
|
107
|
+
// JSON.stringify({
|
|
108
|
+
// [RVF_LAYERS_NAMES.liniennetz]: {
|
|
109
|
+
// link: {
|
|
110
|
+
// href: "https://www.rvf.de/fahrtinfo/netzplan",
|
|
111
|
+
// show: true,
|
|
112
|
+
// text: "Zu den Liniennetzplänen",
|
|
113
|
+
// },
|
|
114
|
+
// title: "Liniennetzpläne",
|
|
115
|
+
// },
|
|
116
|
+
// [RVF_LAYERS_NAMES.meldungen]: {
|
|
117
|
+
// link: {
|
|
118
|
+
// href: "https://moco.geops.io/situation/{{id}}",
|
|
119
|
+
// show: true,
|
|
120
|
+
// text: "Zum Moco",
|
|
121
|
+
// },
|
|
122
|
+
// },
|
|
123
|
+
// } as LayersConfig),
|
|
123
124
|
description: `A JSON string to configure the layers and other components associated to it. The layers available are : ${LAYERS_WITH_LINK}.<br/>
|
|
124
125
|
Definition for a layer :
|
|
125
126
|
<pre style="font-size: 12px; overflow: auto;">{
|
|
@@ -474,6 +474,58 @@ function RvfMobilityMap(props: RvfMobilityMapProps) {
|
|
|
474
474
|
|
|
475
475
|
return (
|
|
476
476
|
<I18nContext.Provider value={i18n}>
|
|
477
|
+
{/* There is a bug in tailwindcss@4 , variables are not imported in the shadow dom
|
|
478
|
+
see https://github.com/tailwindlabs/tailwindcss/issues/15005*/}
|
|
479
|
+
<style>
|
|
480
|
+
{`:host {
|
|
481
|
+
--tw-divide-y-reverse: 0;
|
|
482
|
+
--tw-border-style: solid;
|
|
483
|
+
--tw-font-weight: initial;
|
|
484
|
+
--tw-tracking: initial;
|
|
485
|
+
--tw-translate-x: 0;
|
|
486
|
+
--tw-translate-y: 0;
|
|
487
|
+
--tw-translate-z: 0;
|
|
488
|
+
--tw-rotate-x: rotateX(0);
|
|
489
|
+
--tw-rotate-y: rotateY(0);
|
|
490
|
+
--tw-rotate-z: rotateZ(0);
|
|
491
|
+
--tw-skew-x: skewX(0);
|
|
492
|
+
--tw-skew-y: skewY(0);
|
|
493
|
+
--tw-space-x-reverse: 0;
|
|
494
|
+
--tw-gradient-position: initial;
|
|
495
|
+
--tw-gradient-from: #0000;
|
|
496
|
+
--tw-gradient-via: #0000;
|
|
497
|
+
--tw-gradient-to: #0000;
|
|
498
|
+
--tw-gradient-stops: initial;
|
|
499
|
+
--tw-gradient-via-stops: initial;
|
|
500
|
+
--tw-gradient-from-position: 0%;
|
|
501
|
+
--tw-gradient-via-position: 50%;
|
|
502
|
+
--tw-gradient-to-position: 100%;
|
|
503
|
+
--tw-shadow: 0 0 #0000;
|
|
504
|
+
--tw-shadow-color: initial;
|
|
505
|
+
--tw-inset-shadow: 0 0 #0000;
|
|
506
|
+
--tw-inset-shadow-color: initial;
|
|
507
|
+
--tw-ring-color: initial;
|
|
508
|
+
--tw-ring-shadow: 0 0 #0000;
|
|
509
|
+
--tw-inset-ring-color: initial;
|
|
510
|
+
--tw-inset-ring-shadow: 0 0 #0000;
|
|
511
|
+
--tw-ring-inset: initial;
|
|
512
|
+
--tw-ring-offset-width: 0px;
|
|
513
|
+
--tw-ring-offset-color: #fff;
|
|
514
|
+
--tw-ring-offset-shadow: 0 0 #0000;
|
|
515
|
+
--tw-blur: initial;
|
|
516
|
+
--tw-brightness: initial;
|
|
517
|
+
--tw-contrast: initial;
|
|
518
|
+
--tw-grayscale: initial;
|
|
519
|
+
--tw-hue-rotate: initial;
|
|
520
|
+
--tw-invert: initial;
|
|
521
|
+
--tw-opacity: initial;
|
|
522
|
+
--tw-saturate: initial;
|
|
523
|
+
--tw-sepia: initial;
|
|
524
|
+
--tw-drop-shadow: initial;
|
|
525
|
+
--tw-duration: initial;
|
|
526
|
+
--tw-ease: initial;
|
|
527
|
+
}`}
|
|
528
|
+
</style>
|
|
477
529
|
<style>{tailwind}</style>
|
|
478
530
|
<style>{style}</style>
|
|
479
531
|
<MapContext.Provider value={mapContextValue}>
|