ublo-lib 1.21.12 → 1.21.14
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":"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;
|
|
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;AAyDnD,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,QAAQ,GAAG,IAAI,CAAC;CACxB,CAAC;AAUF,QAAA,MAAM,IAAI,8EA+MR,CAAC;AAIH,eAAe,IAAI,CAAC"}
|
|
@@ -31,6 +31,7 @@ const TRAIL_ICONS = {
|
|
|
31
31
|
BIKE_PARK: TrailIcons.VTT,
|
|
32
32
|
BOARDERCROSS: TrailIcons.BoarderCross,
|
|
33
33
|
BUMP_TRAIL: TrailIcons.ChampDeBosse,
|
|
34
|
+
COASTER: TrailIcons.Luge,
|
|
34
35
|
CROSS_COUNTRY_MOUNTAIN_BIKING: TrailIcons.BoarderCross,
|
|
35
36
|
CROSS_COUNTRY_SKIING: TrailIcons.Freeride,
|
|
36
37
|
DOWNHILL_MOUNTAIN_BIKING: TrailIcons.VTT,
|
|
@@ -107,6 +108,7 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
107
108
|
setExpanded(!expanded);
|
|
108
109
|
};
|
|
109
110
|
const displayedPois = expanded ? flattenedPois : flattenedPois.slice(0, 16);
|
|
111
|
+
const showExpandButton = flattenedPois.length > displayedPois.length;
|
|
110
112
|
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, activityType, trailLevel, sectorName, messagePoi, openingStatus, snowQuality, groomingStatus, openingTimesReal, }) => {
|
|
111
113
|
const isLift = type === "SKI_LIFT";
|
|
112
114
|
const translationCode = isLift
|
|
@@ -144,11 +146,11 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
144
146
|
const statusCode = `pois.opening-statuses.${status}`;
|
|
145
147
|
const Icon = isLift
|
|
146
148
|
? LIFT_ICONS[liftType] || LIFT_ICONS.DEFAULT
|
|
147
|
-
: TRAIL_ICONS[trailType] || TRAIL_ICONS.DEFAULT;
|
|
149
|
+
: TRAIL_ICONS[activityType || trailType] || TRAIL_ICONS.DEFAULT;
|
|
148
150
|
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" &&
|
|
149
151
|
activityType !== "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 &&
|
|
150
152
|
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));
|
|
151
|
-
}) }), _jsx(Tooltip, { content: t(lang, expanded ? "see-less" : "see-more"), children: _jsx(Button, { className: css.expandButton, variant: "transparent", onClick: toggleExpanded, children: _jsx(ExpandIcon, {}) }) })] }) }));
|
|
153
|
+
}) }), showExpandButton && (_jsx(Tooltip, { content: t(lang, expanded ? "see-less" : "see-more"), children: _jsx(Button, { className: css.expandButton, variant: "transparent", onClick: toggleExpanded, children: _jsx(ExpandIcon, {}) }) }))] }) }));
|
|
152
154
|
});
|
|
153
155
|
Pois.displayName = "Pois";
|
|
154
156
|
export default Pois;
|