ublo-lib 1.35.18 → 1.36.0
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/common/components/date-picker/calendar.d.ts.map +1 -1
- package/es/common/components/date-picker/calendar.js +8 -12
- package/es/common/components/date-picker/calendar.module.css +8 -0
- package/es/common/components/date-picker/date-picker.module.css +0 -44
- package/es/common/components/scrolling-carousel/scrolling-carousel.module.css +4 -0
- package/es/lbm/components/instant-search/facet-switch.d.ts +8 -0
- package/es/lbm/components/instant-search/facet-switch.d.ts.map +1 -0
- package/es/lbm/components/instant-search/facet-switch.js +15 -0
- package/es/lbm/components/instant-search/facet-switch.module.css +19 -0
- package/es/lbm/components/instant-search/faqs.d.ts +12 -0
- package/es/lbm/components/instant-search/faqs.d.ts.map +1 -0
- package/es/lbm/components/instant-search/faqs.js +44 -0
- package/es/lbm/components/instant-search/faqs.module.css +102 -0
- package/es/lbm/components/instant-search/hooks/use-constant.d.ts +2 -0
- package/es/lbm/components/instant-search/hooks/use-constant.d.ts.map +1 -0
- package/es/lbm/components/instant-search/hooks/use-constant.js +8 -0
- package/es/lbm/components/instant-search/hooks/use-debounced-search.d.ts +11 -0
- package/es/lbm/components/instant-search/hooks/use-debounced-search.d.ts.map +1 -0
- package/es/lbm/components/instant-search/hooks/use-debounced-search.js +12 -0
- package/es/lbm/components/instant-search/hooks/use-search.d.ts +17 -0
- package/es/lbm/components/instant-search/hooks/use-search.d.ts.map +1 -0
- package/es/lbm/components/instant-search/hooks/use-search.js +10 -0
- package/es/lbm/components/instant-search/i18n.json +32 -0
- package/es/lbm/components/instant-search/index.d.ts +3 -0
- package/es/lbm/components/instant-search/index.d.ts.map +1 -0
- package/es/lbm/components/instant-search/index.js +2 -0
- package/es/lbm/components/instant-search/instant-search.d.ts +19 -0
- package/es/lbm/components/instant-search/instant-search.d.ts.map +1 -0
- package/es/lbm/components/instant-search/instant-search.js +64 -0
- package/es/lbm/components/instant-search/instant-search.module.css +8 -0
- package/es/lbm/components/instant-search/links.d.ts +12 -0
- package/es/lbm/components/instant-search/links.d.ts.map +1 -0
- package/es/lbm/components/instant-search/links.js +30 -0
- package/es/lbm/components/instant-search/links.module.css +96 -0
- package/es/lbm/components/instant-search/no-product.d.ts +6 -0
- package/es/lbm/components/instant-search/no-product.d.ts.map +1 -0
- package/es/lbm/components/instant-search/no-product.js +4 -0
- package/es/lbm/components/instant-search/products.d.ts +14 -0
- package/es/lbm/components/instant-search/products.d.ts.map +1 -0
- package/es/lbm/components/instant-search/products.js +47 -0
- package/es/lbm/components/instant-search/products.module.css +163 -0
- package/es/lbm/components/instant-search/results.d.ts +79 -0
- package/es/lbm/components/instant-search/results.d.ts.map +1 -0
- package/es/lbm/components/instant-search/results.js +34 -0
- package/es/lbm/components/instant-search/results.module.css +85 -0
- package/es/lbm/components/instant-search/search-input.d.ts +15 -0
- package/es/lbm/components/instant-search/search-input.d.ts.map +1 -0
- package/es/lbm/components/instant-search/search-input.js +56 -0
- package/es/lbm/components/instant-search/search-input.module.css +88 -0
- package/es/lbm/components/instant-search/services/api.d.ts +2 -0
- package/es/lbm/components/instant-search/services/api.d.ts.map +1 -0
- package/es/lbm/components/instant-search/services/api.js +22 -0
- package/es/lbm/components/instant-search/services/lumiplan-api.d.ts +9 -0
- package/es/lbm/components/instant-search/services/lumiplan-api.d.ts.map +1 -0
- package/es/lbm/components/instant-search/services/lumiplan-api.js +37 -0
- package/es/lbm/components/instant-search/services/messages.d.ts +2 -0
- package/es/lbm/components/instant-search/services/messages.d.ts.map +1 -0
- package/es/lbm/components/instant-search/services/messages.js +5 -0
- package/es/lbm/components/instant-search/services/utils.d.ts +4 -0
- package/es/lbm/components/instant-search/services/utils.d.ts.map +1 -0
- package/es/lbm/components/instant-search/services/utils.js +28 -0
- package/es/lbm/components/instant-search/widgets/access.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/access.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/access.js +29 -0
- package/es/lbm/components/instant-search/widgets/activity.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/activity.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/activity.js +74 -0
- package/es/lbm/components/instant-search/widgets/activity.module.css +6 -0
- package/es/lbm/components/instant-search/widgets/components/card.d.ts +11 -0
- package/es/lbm/components/instant-search/widgets/components/card.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/components/card.js +15 -0
- package/es/lbm/components/instant-search/widgets/components/card.module.css +60 -0
- package/es/lbm/components/instant-search/widgets/components/metric.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/components/metric.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/components/metric.js +6 -0
- package/es/lbm/components/instant-search/widgets/components/metric.module.css +12 -0
- package/es/lbm/components/instant-search/widgets/components/status-with-icon.d.ts +9 -0
- package/es/lbm/components/instant-search/widgets/components/status-with-icon.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/components/status-with-icon.js +5 -0
- package/es/lbm/components/instant-search/widgets/components/status-with-icon.module.css +12 -0
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts +9 -0
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.js +37 -0
- package/es/lbm/components/instant-search/widgets/dawn-nights-openings.module.css +33 -0
- package/es/lbm/components/instant-search/widgets/lift.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/lift.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/lift.js +52 -0
- package/es/lbm/components/instant-search/widgets/lift.module.css +6 -0
- package/es/lbm/components/instant-search/widgets/lifts.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/lifts.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/lifts.js +26 -0
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/msem-widget.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/msem-widget.js +31 -0
- package/es/lbm/components/instant-search/widgets/msem-widget.module.css +51 -0
- package/es/lbm/components/instant-search/widgets/openings.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/openings.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/openings.js +32 -0
- package/es/lbm/components/instant-search/widgets/slope.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/slope.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/slope.js +73 -0
- package/es/lbm/components/instant-search/widgets/slope.module.css +26 -0
- package/es/lbm/components/instant-search/widgets/slopes.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/slopes.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/slopes.js +26 -0
- package/es/lbm/components/instant-search/widgets/snow.d.ts +9 -0
- package/es/lbm/components/instant-search/widgets/snow.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/snow.js +25 -0
- package/es/lbm/components/instant-search/widgets/types.d.ts +27 -0
- package/es/lbm/components/instant-search/widgets/types.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/types.js +1 -0
- package/es/lbm/components/instant-search/widgets/weather.d.ts +9 -0
- package/es/lbm/components/instant-search/widgets/weather.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/weather.js +36 -0
- package/es/lbm/components/instant-search/widgets/weather.module.css +32 -0
- package/es/lbm/components/instant-search/widgets/webcam.d.ts +8 -0
- package/es/lbm/components/instant-search/widgets/webcam.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets/webcam.js +9 -0
- package/es/lbm/components/instant-search/widgets/webcam.module.css +13 -0
- package/es/lbm/components/instant-search/widgets.d.ts +11 -0
- package/es/lbm/components/instant-search/widgets.d.ts.map +1 -0
- package/es/lbm/components/instant-search/widgets.js +68 -0
- package/es/lbm/components/instant-search/widgets.module.css +14 -0
- package/package.json +3 -3
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import dynamic from "next/dynamic";
|
|
3
|
+
import Loader from "dt-design-system/es/loader";
|
|
4
|
+
import css from "./widgets.module.css";
|
|
5
|
+
import MsemWidget from "./widgets/msem-widget";
|
|
6
|
+
const Lift = dynamic(() => import("./widgets/lift"));
|
|
7
|
+
const Slope = dynamic(() => import("./widgets/slope"));
|
|
8
|
+
const Slopes = dynamic(() => import("./widgets/slopes"));
|
|
9
|
+
const Lifts = dynamic(() => import("./widgets/lifts"));
|
|
10
|
+
const Openings = dynamic(() => import("./widgets/openings"));
|
|
11
|
+
const Access = dynamic(() => import("./widgets/access"));
|
|
12
|
+
const Activity = dynamic(() => import("./widgets/activity"));
|
|
13
|
+
const DawnNightOpenings = dynamic(() => import("./widgets/dawn-nights-openings"));
|
|
14
|
+
const Weather = dynamic(() => import("./widgets/weather"));
|
|
15
|
+
const Webcam = dynamic(() => import("./widgets/webcam"));
|
|
16
|
+
const Snow = dynamic(() => import("./widgets/snow"));
|
|
17
|
+
const PLACEHOLDERS = [...new Array(4)];
|
|
18
|
+
export default function Widgets({ widgets, loading, faqsMaximized, ...props }) {
|
|
19
|
+
const noWidget = !loading && !widgets.length;
|
|
20
|
+
if (faqsMaximized || noWidget)
|
|
21
|
+
return null;
|
|
22
|
+
return (_jsxs("div", { className: css.widgets, children: [loading &&
|
|
23
|
+
PLACEHOLDERS.map((_, i) => {
|
|
24
|
+
return (_jsx("div", { className: css.loaderContainer, children: _jsx(Loader, { className: css.loader, variant: "overlay" }) }, i));
|
|
25
|
+
}), !loading &&
|
|
26
|
+
widgets.slice(0, 4).map((hit, i) => {
|
|
27
|
+
switch (hit.document.type) {
|
|
28
|
+
case "widget":
|
|
29
|
+
switch (hit.document.path) {
|
|
30
|
+
case "widget-lift":
|
|
31
|
+
return _jsx(Lift, { doc: hit, ...props }, i);
|
|
32
|
+
case "widget-lifts":
|
|
33
|
+
return _jsx(Lifts, { doc: hit, ...props }, i);
|
|
34
|
+
case "widget-slope":
|
|
35
|
+
return _jsx(Slope, { doc: hit, ...props }, i);
|
|
36
|
+
case "widget-slopes":
|
|
37
|
+
return _jsx(Slopes, { doc: hit, ...props }, i);
|
|
38
|
+
case "widget-access":
|
|
39
|
+
return _jsx(Access, { doc: hit, ...props }, i);
|
|
40
|
+
case "widget-activity":
|
|
41
|
+
return _jsx(Activity, { doc: hit, ...props }, i);
|
|
42
|
+
case "widget-openings":
|
|
43
|
+
return _jsx(Openings, { doc: hit, ...props }, i);
|
|
44
|
+
case "widget-dawn":
|
|
45
|
+
return (_jsx(DawnNightOpenings, { doc: hit, dawn: true, ...props }, i));
|
|
46
|
+
case "widget-night":
|
|
47
|
+
return _jsx(DawnNightOpenings, { doc: hit, ...props }, i);
|
|
48
|
+
case "widget-snow":
|
|
49
|
+
return _jsx(Snow, { doc: hit, ...props }, i);
|
|
50
|
+
case "widget-snow-summit":
|
|
51
|
+
return _jsx(Snow, { doc: hit, summit: true, ...props }, i);
|
|
52
|
+
case "widget-weather":
|
|
53
|
+
return _jsx(Weather, { doc: hit, ...props }, i);
|
|
54
|
+
case "widget-weather-summit":
|
|
55
|
+
return _jsx(Weather, { doc: hit, summit: true, ...props }, i);
|
|
56
|
+
case "widget-webcam":
|
|
57
|
+
return _jsx(Webcam, { doc: hit, ...props }, i);
|
|
58
|
+
default:
|
|
59
|
+
return null;
|
|
60
|
+
}
|
|
61
|
+
case "msem-widget":
|
|
62
|
+
return _jsx(MsemWidget, { doc: hit, ...props }, i);
|
|
63
|
+
case "lodging":
|
|
64
|
+
default:
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
})] }));
|
|
68
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.widgets {
|
|
2
|
+
display: grid;
|
|
3
|
+
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
|
4
|
+
align-content: flex-start;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
padding: 12px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.loaderContainer {
|
|
10
|
+
position: relative;
|
|
11
|
+
width: 100%;
|
|
12
|
+
height: 75px;
|
|
13
|
+
border-radius: var(--ds-input-radius, var(--ds-radius-200, 8px));
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ublo-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.36.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"dt-design-system": "^3.
|
|
5
|
+
"dt-design-system": "^3.9.9",
|
|
6
6
|
"leaflet": "^1.9.1",
|
|
7
7
|
"next": "^12.0.0 || ^13.0.0 || ^14.0.0",
|
|
8
8
|
"react": "^18.2.0",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"eslint": "8.57.0",
|
|
40
40
|
"eslint-plugin-react": "7.34.1",
|
|
41
41
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
42
|
-
"dt-design-system": "3.
|
|
42
|
+
"dt-design-system": "3.9.9",
|
|
43
43
|
"mv": "2.1.1",
|
|
44
44
|
"next": "14.1.0",
|
|
45
45
|
"react": "18.2.0",
|