ublo-lib 1.21.28 → 1.21.30

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.
@@ -1 +1 @@
1
- {"version":3,"file":"use-msem-presets.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/hooks/use-msem-presets.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE;;CAAA,QAuC9C"}
1
+ {"version":3,"file":"use-msem-presets.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/hooks/use-msem-presets.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE;;CAAA,QA0C9C"}
@@ -15,7 +15,10 @@ export default function useMsemPresets({ mode }) {
15
15
  if (!preset)
16
16
  return;
17
17
  const { widget, options, presets, url } = JSON.parse(preset);
18
- const destination = anchor?.getAttribute("href") || url;
18
+ const anchorHasHref = anchor?.hasAttribute("href");
19
+ const destination = anchorHasHref
20
+ ? anchor?.getAttribute("href") || url
21
+ : null;
19
22
  e.preventDefault();
20
23
  e.stopPropagation();
21
24
  if (destination) {
@@ -172,10 +172,9 @@ const Pois = React.forwardRef(({ pois }, ref) => {
172
172
  Icon = LinkIcon;
173
173
  }
174
174
  const openingTimes = openingTimesReal || openingTimesTh;
175
- return (_jsxs("div", { className: classes, children: [_jsx("div", { className: css.poiIcon, children: specialTrail ? (_jsx(Image, { src: SPECIAL_TRAILS[specialTrail], width: 50, height: 50, alt: specialTrail })) : (_jsx(Icon, {})) }), _jsxs("div", { className: css.poiInfo, children: [_jsxs("div", { className: css.poiHeader, children: [_jsx("span", { className: css.poiName, children: name }), _jsxs("span", { className: css.poiStatus, children: [_jsx(T, { id: statusCode }), openingTimes &&
176
- openingTimes?.length > 0 &&
177
- openingTimes &&
178
- openingTimes?.length > 0 && (_jsxs("div", { className: css.poiOpeningTimes, children: [openingTimes[0].beginTime, " -", " ", openingTimes[0].endTime] }))] })] }), _jsxs("div", { className: css.poiDetail, children: [isInterconnection && (_jsx("div", { className: css.poiDetailHeader, children: _jsx("b", { children: _jsx(T, { id: "interconnection" }) }) })), trailType !== "FUN_ZONE" &&
175
+ const isClosed = status === "CLOSED";
176
+ const showOpeningTimes = !isClosed && openingTimes && openingTimes?.length > 0;
177
+ return (_jsxs("div", { className: classes, children: [_jsx("div", { className: css.poiIcon, children: specialTrail ? (_jsx(Image, { src: SPECIAL_TRAILS[specialTrail], width: 50, height: 50, alt: specialTrail })) : (_jsx(Icon, {})) }), _jsxs("div", { className: css.poiInfo, children: [_jsxs("div", { className: css.poiHeader, children: [_jsx("span", { className: css.poiName, children: name }), _jsxs("span", { className: css.poiStatus, children: [_jsx(T, { id: statusCode }), showOpeningTimes && (_jsxs("div", { className: css.poiOpeningTimes, children: [openingTimes[0].beginTime, " -", " ", openingTimes[0].endTime] }))] })] }), _jsxs("div", { className: css.poiDetail, children: [isInterconnection && (_jsx("div", { className: css.poiDetailHeader, children: _jsx("b", { children: _jsx(T, { id: "interconnection" }) }) })), trailType !== "FUN_ZONE" &&
179
178
  activityType !== "FUN_ZONE" && (_jsxs("div", { className: css.poiDetailKind, children: [_jsx(T, { id: translationCode }), " ", trailLevelLabel] })), !isLift && (_jsxs("div", { className: css.poiTrailDetail, children: [hasGroomingStatus && (_jsx("div", { className: css.poiTrailDetailItem, children: _jsx(T, { id: `snow.grooming.states.${groomingStatus}` }) })), hasSnowQuality && (_jsxs("div", { className: css.poiTrailDetailItem, children: [_jsx(T, { id: "snow.snow-quality.title" }), " :", " ", _jsx(T, { id: `snow.snow-quality.states.${snowQuality}` })] }))] }))] })] }), _jsx("div", { className: css.poiMessage, children: message?.data && (_jsx(_Fragment, { children: isMobile ? (
180
179
  // @ts-ignore
181
180
  _jsx(Popover, { innerClassName: css.poiPopover, trigger: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }), children: message.data })) : (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })) })] }, id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.21.28",
3
+ "version": "1.21.30",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",