ublo-lib 1.21.10 → 1.21.11

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.
@@ -205,12 +205,11 @@
205
205
  "TRAIL_RUNNING": "Trail",
206
206
  "VIDEO_ZONE": "Zone vidéo"
207
207
  },
208
- "trailLevels": {
208
+ "trail-levels": {
209
209
  "GREEN": "Verte",
210
210
  "BLUE": "Bleue",
211
211
  "RED": "Rouge",
212
- "BLACK": "Noire",
213
- "YELLOW": "Jaune"
212
+ "BLACK": "Noire"
214
213
  },
215
214
  "lifts": {
216
215
  "TRAIN": "Train",
@@ -30,6 +30,8 @@
30
30
  border: 2px solid hsl(var(--primary));
31
31
  border-radius: calc(var(--radius-400) * 2);
32
32
  overflow: hidden;
33
+ transform: translateZ(0);
34
+ isolation: isolate;
33
35
  }
34
36
 
35
37
  .tableOuter::before,
@@ -59,12 +61,6 @@
59
61
  transform: rotate(0.5turn);
60
62
  }
61
63
 
62
- @media (min-width: 580px) {
63
- .tableOuter {
64
- padding: 40px;
65
- }
66
- }
67
-
68
64
  .tableInner {
69
65
  padding: 20px 30px;
70
66
  overflow: auto;
@@ -1 +1 @@
1
- {"version":3,"file":"pois.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/pois.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAO,QAAQ,EAAQ,MAAM,SAAS,CAAC;AAwDnD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB,CAAC;AASF,QAAA,MAAM,IAAI,8EA0LR,CAAC;AAIH,eAAe,IAAI,CAAC"}
1
+ {"version":3,"file":"pois.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/pois.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,OAAO,KAAK,EAAO,QAAQ,EAAQ,MAAM,SAAS,CAAC;AAwDnD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB,CAAC;AASF,QAAA,MAAM,IAAI,8EAiMR,CAAC;AAIH,eAAe,IAAI,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import * as React from "react";
3
3
  import getConfig from "next/config";
4
4
  import Image from "next/image";
@@ -48,7 +48,7 @@ const TRAIL_ICONS = {
48
48
  PATH: TrailIcons.Pieton,
49
49
  PEDESTRIAN: TrailIcons.Pieton,
50
50
  ROUTE_OF_CROSS_COUNTRY: TrailIcons.Freeride,
51
- SKI_TOURING: TrailIcons.Luge,
51
+ SKI_TOURING: TrailIcons.SkiFond,
52
52
  SLEDDING_HILL: TrailIcons.Luge,
53
53
  SNOWPARK: TrailIcons.Snowpark,
54
54
  SNOWPARK_LINE: TrailIcons.Snowpark,
@@ -102,11 +102,13 @@ const Pois = React.forwardRef(({ pois }, ref) => {
102
102
  const translationCode = isLift
103
103
  ? `pois.lifts.${liftType}`
104
104
  : `pois.trails.${trailType}`;
105
- const hasTrailLevel = trailLevel !== undefined && trailLevel !== "UNDEF";
105
+ const hasTrailLevel = trailLevel !== undefined &&
106
+ trailLevel !== "UNDEF" &&
107
+ trailLevel !== "YELLOW";
106
108
  const trailLevelLabel = hasTrailLevel
107
- ? `(${t(lang, `pois.trailLevels.${trailLevel}`)})`
109
+ ? `(${t(lang, `pois.trail-levels.${trailLevel}`)})`
108
110
  : null;
109
- const specialTrail = Object.keys(SPECIAL_TRAILS).find((key) => name?.includes(key));
111
+ const specialTrail = Object.keys(SPECIAL_TRAILS).find((key) => name?.toLowerCase()?.includes(key.toLowerCase()));
110
112
  const message = messagePoi?.data?.find(({ language }) => {
111
113
  const _lang = lang === "fr" ? "fr_FR" : "en_US";
112
114
  return language === _lang;
@@ -116,7 +118,7 @@ const Pois = React.forwardRef(({ pois }, ref) => {
116
118
  const classes = classNames(css.poi, {
117
119
  [css[trailLevel]]: hasTrailLevel,
118
120
  });
119
- let status = "OPEN";
121
+ let status = "CLOSED";
120
122
  if (openingStatus?.includes("DELAYED")) {
121
123
  status = "DELAYED";
122
124
  }
@@ -126,14 +128,15 @@ const Pois = React.forwardRef(({ pois }, ref) => {
126
128
  else if (openingStatus?.includes("FORECAST")) {
127
129
  status = "FORECAST";
128
130
  }
129
- else {
130
- status = "CLOSED";
131
+ else if (openingStatus?.includes("OPEN")) {
132
+ status = "OPEN";
131
133
  }
132
134
  const statusCode = `pois.opening-statuses.${status}`;
133
135
  const Icon = isLift
134
136
  ? LIFT_ICONS[liftType] || LIFT_ICONS.DEFAULT
135
137
  : TRAIL_ICONS[trailType] || TRAIL_ICONS.DEFAULT;
136
- 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 }), _jsx("span", { className: css.poiStatus, children: _jsx(T, { id: statusCode }) })] }), _jsxs("div", { className: css.poiDetail, children: [_jsxs("div", { className: css.poiDetailHeader, children: [_jsx("b", { children: sectorName }), " | ", _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}` })] }))] })), openingTimesReal && (_jsxs("div", { className: css.poiOpeningTimes, children: [openingTimesReal.beginTime, " -", " ", openingTimesReal.endTime] }))] })] }), _jsx("div", { className: css.poiMessage, children: message?.data && (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })] }, id));
138
+ 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 }), _jsx("span", { className: css.poiStatus, children: _jsx(T, { id: statusCode }) })] }), _jsxs("div", { className: css.poiDetail, children: [_jsxs("div", { className: css.poiDetailHeader, children: [_jsx("b", { children: sectorName }), " ", trailType !== "FUN_ZONE" && (_jsxs(_Fragment, { 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}` })] }))] })), openingTimesReal?.beginTime &&
139
+ openingTimesReal?.endTime && (_jsxs("div", { className: css.poiOpeningTimes, children: [openingTimesReal.beginTime, " -", " ", openingTimesReal.endTime] }))] })] }), _jsx("div", { className: css.poiMessage, children: message?.data && (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })] }, id));
137
140
  }) }), _jsx(Tooltip, { content: t(lang, expanded ? "see-less" : "see-more"), children: _jsx(Button, { className: css.expandButton, variant: "transparent", onClick: toggleExpanded, children: _jsx(ExpandIcon, {}) }) })] }) }));
138
141
  });
139
142
  Pois.displayName = "Pois";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.21.10",
3
+ "version": "1.21.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.1.5",
6
6
  "leaflet": "^1.9.1",