ublo-lib 1.21.7 → 1.21.9
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/es/lbm/components/lumiplan/api.js +1 -1
- package/es/lbm/components/lumiplan/i18n/fr.json +1 -0
- package/es/lbm/components/lumiplan/pois.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/pois.js +8 -2
- package/es/lbm/components/lumiplan/road-condition.js +3 -3
- package/es/lbm/components/lumiplan/road-condition.module.css +10 -7
- package/es/lbm/components/lumiplan/weather/snow-data.js +1 -1
- package/es/lbm/components/lumiplan/weather/weather-days.js +1 -1
- package/es/lbm/components/lumiplan/weather/weather-zones.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import getConfig from "next/config";
|
|
2
|
-
// import * as Fetcher from "ublo-lib/es/common/utils/fetcher";
|
|
3
2
|
import * as Fetcher from "../../../common/utils/fetcher";
|
|
3
|
+
// import * as Fetcher from "ublo-lib/es/common/utils/fetcher";
|
|
4
4
|
const { publicRuntimeConfig } = getConfig();
|
|
5
5
|
const { lumiplanApi } = publicRuntimeConfig;
|
|
6
6
|
export async function getResortOpening(resort) {
|
|
@@ -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,
|
|
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"}
|
|
@@ -97,7 +97,7 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
97
97
|
setExpanded(!expanded);
|
|
98
98
|
};
|
|
99
99
|
const displayedPois = expanded ? flattenedPois : flattenedPois.slice(0, 16);
|
|
100
|
-
return (_jsx("div", { className: css.pois, children: _jsxs("div", { className: css.inner, children: [_jsx("div", { className: css.list, children: displayedPois.map(({ id, name, type, liftType, trailType, trailLevel, sectorName, messagePoi, openingStatus, snowQuality, groomingStatus, }) => {
|
|
100
|
+
return (_jsx("div", { className: css.pois, children: _jsxs("div", { className: css.inner, children: [_jsx("div", { className: css.list, children: displayedPois.map(({ id, name, type, liftType, trailType, trailLevel, sectorName, messagePoi, openingStatus, snowQuality, groomingStatus, openingTimesReal, }) => {
|
|
101
101
|
const isLift = type === "SKI_LIFT";
|
|
102
102
|
const translationCode = isLift
|
|
103
103
|
? `pois.lifts.${liftType}`
|
|
@@ -120,6 +120,12 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
120
120
|
if (openingStatus?.includes("DELAYED")) {
|
|
121
121
|
status = "DELAYED";
|
|
122
122
|
}
|
|
123
|
+
else if (openingStatus?.includes("STOPPED")) {
|
|
124
|
+
status = "STOPPED";
|
|
125
|
+
}
|
|
126
|
+
else if (openingStatus?.includes("FORECAST")) {
|
|
127
|
+
status = "FORECAST";
|
|
128
|
+
}
|
|
123
129
|
else {
|
|
124
130
|
status = "CLOSED";
|
|
125
131
|
}
|
|
@@ -127,7 +133,7 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
127
133
|
const Icon = isLift
|
|
128
134
|
? LIFT_ICONS[liftType] || LIFT_ICONS.DEFAULT
|
|
129
135
|
: TRAIL_ICONS[trailType] || TRAIL_ICONS.DEFAULT;
|
|
130
|
-
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}` })] }))] }))] })] }), _jsx("div", { className: css.poiMessage, children: message && (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })] }, id));
|
|
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 && (_jsx(Tooltip, { content: message.data, children: _jsx(Button, { variant: "transparent", children: _jsx(Icons.Info, {}) }) })) })] }, id));
|
|
131
137
|
}) }), _jsx(Tooltip, { content: t(lang, expanded ? "see-less" : "see-more"), children: _jsx(Button, { className: css.expandButton, variant: "transparent", onClick: toggleExpanded, children: _jsx(ExpandIcon, {}) }) })] }) }));
|
|
132
138
|
});
|
|
133
139
|
Pois.displayName = "Pois";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as _jsx,
|
|
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 { useUbloContext } from "ublo/with-ublo";
|
|
4
4
|
import Loader from "dt-design-system/es/loader";
|
|
@@ -19,8 +19,8 @@ const RoadCondition = React.forwardRef(({ resortAccess }, ref) => {
|
|
|
19
19
|
const _lang = lang === "fr" ? "fr_FR" : "en_US";
|
|
20
20
|
return language === _lang;
|
|
21
21
|
});
|
|
22
|
-
const hasValidNumber = !isNaN(parseInt(number, 10));
|
|
23
|
-
return (_jsxs(
|
|
22
|
+
const hasValidNumber = !isNaN(parseInt(number, 10)) && number !== "0";
|
|
23
|
+
return (_jsxs("div", { className: css.condition, children: [_jsx(RoadConditionIcon, { className: css.icon }), _jsxs("div", { className: css.right, children: [_jsxs("div", { className: css.status, children: [_jsx(T, { id: "road-conditions.road" }), " ", _jsx(T, { id: `road-conditions.status.${status ? "OPENED" : "CLOSED"}` })] }), _jsxs("div", { className: css.top, children: [name?.trim() && (_jsxs("div", { className: css.name, children: [name, " ", hasValidNumber && _jsxs(_Fragment, { children: ["n\u00B0", number] })] })), _jsxs("div", { className: css.surface, children: [_jsx("b", { children: _jsx(T, { id: "road-conditions.surface.title" }) }), _jsx(T, { id: `road-conditions.surface.states.${surface}` }), "."] }), _jsxs("div", { className: css.equipment, children: [_jsx("b", { children: _jsx(T, { id: "road-conditions.equipment.title" }) }), _jsx(T, { id: `road-conditions.equipment.states.${equipment}` })] })] }), roadInfoData && (_jsx("div", { className: css.bottom, dangerouslySetInnerHTML: { __html: roadInfoData.data } }))] })] }, id));
|
|
24
24
|
})] }));
|
|
25
25
|
});
|
|
26
26
|
RoadCondition.displayName = "RoadCondition";
|
|
@@ -55,7 +55,12 @@
|
|
|
55
55
|
display: flex;
|
|
56
56
|
flex-direction: column;
|
|
57
57
|
margin-right: auto;
|
|
58
|
-
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.status {
|
|
61
|
+
font-size: 17px;
|
|
62
|
+
font-weight: 700;
|
|
63
|
+
text-transform: uppercase;
|
|
59
64
|
}
|
|
60
65
|
|
|
61
66
|
.top {
|
|
@@ -76,6 +81,10 @@
|
|
|
76
81
|
font-weight: 700;
|
|
77
82
|
}
|
|
78
83
|
|
|
84
|
+
.name:empty {
|
|
85
|
+
display: none;
|
|
86
|
+
}
|
|
87
|
+
|
|
79
88
|
.surface,
|
|
80
89
|
.equipment {
|
|
81
90
|
font-size: 17px;
|
|
@@ -84,9 +93,3 @@
|
|
|
84
93
|
.bottom {
|
|
85
94
|
font-size: 15px;
|
|
86
95
|
}
|
|
87
|
-
|
|
88
|
-
.status {
|
|
89
|
-
font-size: 20px;
|
|
90
|
-
font-weight: 700;
|
|
91
|
-
text-transform: uppercase;
|
|
92
|
-
}
|
|
@@ -4,5 +4,5 @@ import SnowCover from "../icons/snow-cover";
|
|
|
4
4
|
import css from "./snow-data.module.css";
|
|
5
5
|
export default function SnowData({ data, expanded }) {
|
|
6
6
|
const { snowQuality, snowTotalDepth, freshSnowFallDepth12H, freshSnowFallDepth24H, freshSnowFallDepth48H, freshSnowFallDepth72H, } = data;
|
|
7
|
-
return (_jsxs("div", { className: css.snow, children: [_jsx(SnowCover, { className: css.snowIcon }), _jsxs("div", { className: css.snowInfo, children: [_jsxs("div", { className: css.snowState, children: [_jsx(T, { id: "snow.snow-quality.title" }), " ", snowQuality && snowQuality !== "UNDEF" && (_jsxs(_Fragment, { children: [": ", _jsx(T, { id: `snow.snow-quality.states.${snowQuality}` })] }))] }), _jsxs("div", { className: css.snowDepth, children: [snowTotalDepth?.value || 0, _jsx(T, { id: snowTotalDepth?.unit || "CENTIMETER" })] }), expanded && (_jsxs("div", { className: css.expanded, children: [freshSnowFallDepth12H
|
|
7
|
+
return (_jsxs("div", { className: css.snow, children: [_jsx(SnowCover, { className: css.snowIcon }), _jsxs("div", { className: css.snowInfo, children: [_jsxs("div", { className: css.snowState, children: [_jsx(T, { id: "snow.snow-quality.title" }), " ", snowQuality && snowQuality !== "UNDEF" && (_jsxs(_Fragment, { children: [": ", _jsx(T, { id: `snow.snow-quality.states.${snowQuality}` })] }))] }), _jsxs("div", { className: css.snowDepth, children: [snowTotalDepth?.value || 0, _jsx(T, { id: snowTotalDepth?.unit || "CENTIMETER" })] }), expanded && (_jsxs("div", { className: css.expanded, children: [freshSnowFallDepth12H && freshSnowFallDepth12H.value !== 0 && (_jsxs("div", { className: css.snowFall, children: [_jsx(T, { id: "snow.fresh-snow-fall" }), " 12h :", " ", freshSnowFallDepth12H.value, _jsx(T, { id: freshSnowFallDepth12H.unit })] })), freshSnowFallDepth24H && freshSnowFallDepth24H.value !== 0 && (_jsxs("div", { className: css.snowFall, children: [_jsx(T, { id: "snow.fresh-snow-fall" }), " 24h :", " ", freshSnowFallDepth24H.value, _jsx(T, { id: freshSnowFallDepth24H.unit })] })), freshSnowFallDepth48H && freshSnowFallDepth48H.value !== 0 && (_jsxs("div", { className: css.snowFall, children: [_jsx(T, { id: "snow.fresh-snow-fall" }), " 48h :", " ", freshSnowFallDepth48H.value, _jsx(T, { id: freshSnowFallDepth48H.unit })] })), freshSnowFallDepth72H && freshSnowFallDepth72H.value !== 0 && (_jsxs("div", { className: css.snowFall, children: [_jsx(T, { id: "snow.fresh-snow-fall" }), " 72h :", " ", freshSnowFallDepth72H.value, _jsx(T, { id: freshSnowFallDepth72H.unit })] }))] }))] })] }));
|
|
8
8
|
}
|
|
@@ -3,8 +3,8 @@ import * as React from "react";
|
|
|
3
3
|
import classNames from "classnames";
|
|
4
4
|
import Button from "dt-design-system/es/button";
|
|
5
5
|
import T from "../i18n/translations";
|
|
6
|
-
import useWindowSizes from "../../../../common/hooks/use-window-sizes";
|
|
7
6
|
// import useWindowSizes from "ublo-lib/es/common/hooks/use-window-sizes";
|
|
7
|
+
import useWindowSizes from "../../../../common/hooks/use-window-sizes";
|
|
8
8
|
import css from "./weather-days.module.css";
|
|
9
9
|
export default function Days({ days, currentDayIndex, setCurrentDayIndex, lang, }) {
|
|
10
10
|
const [showLeftShadow, setShowLeftShadow] = React.useState(false);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import classNames from "classnames";
|
|
4
|
-
import useWindowSizes from "../../../../common/hooks/use-window-sizes";
|
|
5
4
|
// import useWindowSizes from "ublo-lib/es/common/hooks/use-window-sizes";
|
|
5
|
+
import useWindowSizes from "../../../../common/hooks/use-window-sizes";
|
|
6
6
|
import Button from "dt-design-system/es/button";
|
|
7
7
|
import T from "../i18n/translations";
|
|
8
8
|
import css from "./weather-zones.module.css";
|