@geops/rvf-mobility-web-component 0.1.91 → 0.1.93

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/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.91",
5
+ "version": "0.1.93",
6
6
  "homepage": "https://rvf-mobility-web-component-geops.vercel.app/",
7
7
  "type": "module",
8
8
  "main": "index.js",
@@ -11,14 +11,13 @@ import DragPanWarning from "./DragPanWarning";
11
11
  import type { HTMLAttributes, PreactDOMAttributes } from "preact";
12
12
 
13
13
  export type EmbedNavigationProps = {
14
- contentClassName?: string;
15
14
  elementClassName?: string;
16
15
  iconProps?: React.SVGProps<SVGSVGElement>;
17
16
  } & HTMLAttributes<HTMLDivElement> &
18
17
  PreactDOMAttributes;
19
18
 
20
19
  function EmbedNavigation({
21
- contentClassName,
20
+ children,
22
21
  elementClassName,
23
22
  iconProps,
24
23
  }: EmbedNavigationProps) {
@@ -60,7 +59,6 @@ function EmbedNavigation({
60
59
  });
61
60
  };
62
61
  }, [map, target, isEmbed, element]);
63
-
64
62
  return (
65
63
  <div
66
64
  ref={(node) => {
@@ -69,7 +67,7 @@ function EmbedNavigation({
69
67
  >
70
68
  <div
71
69
  className={twMerge(
72
- "absolute inset-0 z-100000 flex h-full w-full flex-col items-center justify-center font-bold",
70
+ "absolute inset-0 z-100000 flex flex-col items-center justify-center bg-black/60 p-6 font-bold text-white",
73
71
  elementClassName,
74
72
  "hidden",
75
73
  )}
@@ -77,15 +75,12 @@ function EmbedNavigation({
77
75
  return setElement(node);
78
76
  }}
79
77
  >
80
- <div
81
- className={twMerge(
82
- "flex flex-col items-center gap-2 rounded-2xl bg-white p-10 shadow-lg",
83
- contentClassName,
84
- )}
85
- >
86
- <TouchFingers height="48" width="48" {...iconProps}></TouchFingers>
87
- <p>{t("use_2_fingers")}</p>
88
- </div>
78
+ {children || (
79
+ <>
80
+ <TouchFingers height="48" width="48" {...iconProps}></TouchFingers>
81
+ <p>{t("use_2_fingers")}</p>
82
+ </>
83
+ )}
89
84
  </div>
90
85
  </div>
91
86
  );
@@ -233,7 +233,8 @@ function NotificationDetails({
233
233
  <div>
234
234
  {textualContentMultilingual.infoLinks.map(
235
235
  ({ label, uri }) => {
236
- const title = label[locale()] || label.de || uri;
236
+ const title =
237
+ label?.[locale()] || label?.de || uri || "";
237
238
  return (
238
239
  <Link href={uri} key={uri} title={title}>
239
240
  {title}
@@ -273,7 +273,8 @@ function SituationDetails({
273
273
  <div>
274
274
  {textualContentMultilingual.infoLinks.map(
275
275
  ({ label, uri }) => {
276
- const title = label[locale()] || label.de || uri;
276
+ const title =
277
+ label?.[locale()] || label?.de || uri || "";
277
278
  return (
278
279
  <Link href={uri} key={uri} title={title}>
279
280
  {title}