ublo-lib 1.44.31 → 1.45.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/hooks/use-sticky.js +2 -2
- package/es/future/components/msem-preset-editor/services/api.js +17 -17
- package/es/future/utils/fetcher.d.ts +5 -4
- package/es/future/utils/fetcher.d.ts.map +1 -1
- package/es/future/utils/fetcher.js +5 -4
- package/es/lbm/components/lumiplan/domain.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/domain.js +1 -1
- package/es/lbm/components/lumiplan/lumiplan.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/lumiplan.js +1 -1
- package/es/lbm/components/lumiplan/opening.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/opening.js +1 -1
- package/es/lbm/components/lumiplan/pois.js +1 -1
- package/es/lbm/components/lumiplan/road-condition.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/road-condition.js +1 -1
- package/es/lbm/components/lumiplan/todays-tips.js +1 -1
- package/es/lbm/components/lumiplan/weather/weather.d.ts.map +1 -1
- package/es/lbm/components/lumiplan/weather/weather.js +1 -1
- package/es/market-place/components/instant-search/services/api.js +3 -3
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ const useSticky = () => {
|
|
|
17
17
|
}
|
|
18
18
|
}, [sticky]);
|
|
19
19
|
const init = React.useCallback(() => {
|
|
20
|
+
observe();
|
|
20
21
|
Object.keys(eventsToBind).forEach((key) => {
|
|
21
22
|
const events = eventsToBind[key];
|
|
22
23
|
const target = window[key];
|
|
@@ -31,10 +32,9 @@ const useSticky = () => {
|
|
|
31
32
|
});
|
|
32
33
|
}, [observe]);
|
|
33
34
|
React.useEffect(() => {
|
|
34
|
-
observe();
|
|
35
35
|
init();
|
|
36
36
|
return () => cleanup();
|
|
37
|
-
}, [cleanup, init
|
|
37
|
+
}, [cleanup, init]);
|
|
38
38
|
return [ref, sticky];
|
|
39
39
|
};
|
|
40
40
|
export default useSticky;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { GET, POST } from "../../../utils/fetcher";
|
|
2
2
|
export function getOffers(msemServicesUrl, lang, channel, resort, facet) {
|
|
3
3
|
const endpoint = `${msemServicesUrl}/api/tunnel/offers/${channel}/${resort}`;
|
|
4
|
-
return
|
|
4
|
+
return GET(endpoint, { lang, facet });
|
|
5
5
|
}
|
|
6
6
|
const kinds = {
|
|
7
7
|
ACTIVITIES: "activities",
|
|
@@ -16,63 +16,63 @@ export async function getOtherOffers(msemServicesUrl, lang, channel, resort, fac
|
|
|
16
16
|
if (!kindSlug)
|
|
17
17
|
return;
|
|
18
18
|
const endpoint = `${msemServicesUrl}/api/tunnel/offers/${channel}/${resort}/${kindSlug}`;
|
|
19
|
-
return
|
|
19
|
+
return GET(endpoint, { lang, facet });
|
|
20
20
|
}
|
|
21
21
|
export async function getRenters(msemServicesUrl, channel, resort) {
|
|
22
22
|
const endpoint = `${msemServicesUrl}/api/ski-rental/${resort}/renters`;
|
|
23
|
-
return
|
|
23
|
+
return POST(endpoint, { channel });
|
|
24
24
|
}
|
|
25
25
|
export async function getSkiPassesCatalogs(msemServicesUrl, merchant) {
|
|
26
26
|
const endpoint = `${msemServicesUrl}/api/ski-pass-eliberty/${merchant}/catalogs`;
|
|
27
|
-
return
|
|
27
|
+
return GET(endpoint);
|
|
28
28
|
}
|
|
29
29
|
export async function getSkiPassesFilters(msemServicesUrl, merchant, catalog) {
|
|
30
30
|
const endpoint = `${msemServicesUrl}/api/ski-pass-eliberty/${merchant}/${catalog}/filters`;
|
|
31
|
-
return
|
|
31
|
+
return GET(endpoint);
|
|
32
32
|
}
|
|
33
33
|
export async function getLodgings(msemServicesUrl, channel, resort) {
|
|
34
34
|
const endpoint = `${msemServicesUrl}/api/lodging/getAccommodationsStructure`;
|
|
35
|
-
return
|
|
35
|
+
return GET(endpoint, { channel, resort });
|
|
36
36
|
}
|
|
37
37
|
export async function getLodgingFilters(msemServicesUrl, channel, resort, facet, lang) {
|
|
38
38
|
const endpoint = `${msemServicesUrl}/api/lodging/resort/${resort}/${channel}`;
|
|
39
|
-
return
|
|
39
|
+
return GET(endpoint, { facet, language: lang });
|
|
40
40
|
}
|
|
41
41
|
export async function getLodgingRooms(msemServicesUrl, id, resort, facet, lang, preview = false) {
|
|
42
42
|
const endpoint = `${msemServicesUrl}/api/lodging/accomodation/${id}`;
|
|
43
|
-
return
|
|
43
|
+
return POST(endpoint, { resort, facet, language: lang, preview });
|
|
44
44
|
}
|
|
45
45
|
export async function getEllohaGroups(msemServicesUrl, merchant, stayFrom, lang) {
|
|
46
46
|
const endpoint = `${msemServicesUrl}/api/elloha-activity/${merchant}/${lang}/kinds`;
|
|
47
|
-
return
|
|
47
|
+
return GET(endpoint, { date: stayFrom });
|
|
48
48
|
}
|
|
49
49
|
export async function getVakarioKinds(msemServicesUrl, channel, merchant, lang) {
|
|
50
50
|
const endpoint = `${msemServicesUrl}/api/vakario/${channel}/${merchant}/${lang}/kinds`;
|
|
51
|
-
return
|
|
51
|
+
return GET(endpoint);
|
|
52
52
|
}
|
|
53
53
|
export async function getVakarioAges(msemServicesUrl, channel, merchant, kind, lang) {
|
|
54
54
|
const endpoint = `${msemServicesUrl}/api/vakario/${channel}/${merchant}/${lang}/${kind}/ages`;
|
|
55
|
-
return
|
|
55
|
+
return GET(endpoint);
|
|
56
56
|
}
|
|
57
57
|
export async function getVakarioCategories(msemServicesUrl, channel, merchant, kind, age, lang) {
|
|
58
58
|
const endpoint = `${msemServicesUrl}/api/vakario/${channel}/${merchant}/${lang}/${kind}/${age}/categories`;
|
|
59
|
-
return
|
|
59
|
+
return GET(endpoint);
|
|
60
60
|
}
|
|
61
61
|
export async function getVakarioLevels(msemServicesUrl, channel, merchant, kind, age, category, lang) {
|
|
62
62
|
const endpoint = `${msemServicesUrl}/api/vakario/${channel}/${merchant}/${lang}/${kind}/${age}/${category}/levels`;
|
|
63
|
-
return
|
|
63
|
+
return GET(endpoint);
|
|
64
64
|
}
|
|
65
65
|
export async function getOtherProductsCategories(msemServicesUrl, facet, merchant, lang) {
|
|
66
66
|
const endpoint = `${msemServicesUrl}/api/standard-product/merchant/${merchant}`;
|
|
67
|
-
return
|
|
67
|
+
return POST(endpoint, { facet: Number(facet), lang });
|
|
68
68
|
}
|
|
69
69
|
export async function getRenterList(msemServicesUrl, channel, resort, date) {
|
|
70
70
|
const endpoint = `${msemServicesUrl}/api/ski-rental/${resort}/renters`;
|
|
71
|
-
return
|
|
71
|
+
return POST(endpoint, { channel, date });
|
|
72
72
|
}
|
|
73
73
|
export async function getEsfKinds(msemServicesUrl, channel, resort, stayFrom, stayTo, season, lang) {
|
|
74
74
|
const endpoint = `${msemServicesUrl}/api/esf/kinds`;
|
|
75
|
-
return
|
|
75
|
+
return POST(endpoint, {
|
|
76
76
|
channel,
|
|
77
77
|
resort,
|
|
78
78
|
lang,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export declare function
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
1
|
+
export declare function GET<T = any>(url: string, params?: Record<string, any>, headers?: Record<string, any>): Promise<T>;
|
|
2
|
+
export declare const PUT: <T = any>(_url: string, body?: Record<string, any>, params?: {}, _headers?: {}) => Promise<T>;
|
|
3
|
+
export declare const POST: <T = any>(_url: string, body?: Record<string, any>, params?: {}, _headers?: {}) => Promise<T>;
|
|
4
|
+
export declare const PATCH: <T = any>(_url: string, body?: Record<string, any>, params?: {}, _headers?: {}) => Promise<T>;
|
|
5
|
+
export declare const DELETE: <T = any>(_url: string, body?: Record<string, any>, params?: {}, _headers?: {}) => Promise<T>;
|
|
5
6
|
//# sourceMappingURL=fetcher.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../../src/future/utils/fetcher.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,cAG9B;AACD,eAAO,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"fetcher.d.ts","sourceRoot":"","sources":["../../../src/future/utils/fetcher.ts"],"names":[],"mappings":"AAAA,wBAAgB,GAAG,CAAC,CAAC,GAAG,GAAG,EACzB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAC5B,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,cAG9B;AACD,eAAO,MAAM,GAAG,GAUA,CAAC,cACP,MAAM,SACL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CAZG,CAAC;AAClC,eAAO,MAAM,IAAI,GASD,CAAC,cACP,MAAM,SACL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CAXK,CAAC;AACpC,eAAO,MAAM,KAAK,GAQF,CAAC,cACP,MAAM,SACL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CAVO,CAAC;AACtC,eAAO,MAAM,MAAM,GAOH,CAAC,cACP,MAAM,SACL,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,2CATS,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export function
|
|
1
|
+
export function GET(url, params, headers) {
|
|
2
2
|
return fetcher("GET")(url, undefined, params, headers);
|
|
3
3
|
}
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
4
|
+
export const PUT = fetcher("PUT");
|
|
5
|
+
export const POST = fetcher("POST");
|
|
6
|
+
export const PATCH = fetcher("PATCH");
|
|
7
|
+
export const DELETE = fetcher("DELETE");
|
|
7
8
|
const defaultContentType = {
|
|
8
9
|
"Content-Type": "application/json; charset=utf-8",
|
|
9
10
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/domain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"domain.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/domain.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG1C,KAAK,KAAK,GAAG;IACX,MAAM,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC5B,CAAC;AAEF,QAAA,MAAM,MAAM,8EAoFV,CAAC;AAIH,eAAe,MAAM,CAAC"}
|
|
@@ -20,7 +20,7 @@ const Domain = React.forwardRef(({ domain }, ref) => {
|
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
22
|
const { lifts, slopes } = domain;
|
|
23
|
-
return (_jsx("div", { ref: ref, className: css.domain, "data-tags": t(lang, "domain.navigation-title"), children: _jsxs("div", { className: css.inner, children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: {
|
|
23
|
+
return (_jsx("div", { ref: ref, className: css.domain, "data-domain": "", "data-tags": t(lang, "domain.navigation-title"), children: _jsxs("div", { className: css.inner, children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: {
|
|
24
24
|
__html: t(lang, "domain.title"),
|
|
25
25
|
} }), _jsxs("div", { className: css.info, children: [_jsxs("div", { className: css.card, children: [_jsx(TelesiegeIcon, {}), _jsx("span", { className: css.cardTitle, children: _jsx(T, { id: "domain.lifts.title" }) }), _jsxs("div", { className: css.cardCount, children: [_jsx("b", { children: lifts.count.open }), " / ", lifts.count.total] })] }), _jsxs("div", { className: css.card, children: [_jsx(SlopesIcon, {}), _jsx("span", { className: css.cardTitle, children: _jsx(T, { id: "domain.slopes.title" }) }), _jsxs("div", { className: css.cardCount, children: [_jsx("b", { children: slopes.count.open }), " / ", slopes.count.total] })] })] }), _jsx("div", { className: css.slopes, children: Object.keys(slopes.slopes).map((key) => {
|
|
26
26
|
const { open, total } = slopes.slopes[key];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lumiplan.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/lumiplan.tsx"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,UAAU,QAAQ,
|
|
1
|
+
{"version":3,"file":"lumiplan.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/lumiplan.tsx"],"names":[],"mappings":"AA2BA,MAAM,CAAC,OAAO,UAAU,QAAQ,4CAkL/B"}
|
|
@@ -156,5 +156,5 @@ export default function Lumiplan() {
|
|
|
156
156
|
fetchData();
|
|
157
157
|
}
|
|
158
158
|
}, [currentResortId, isPoisInView]);
|
|
159
|
-
return (_jsxs("div", { "data-mode": mode, className: css.lumiplan, children: [_jsx(Header, { date: timestamp, mode: mode }), !disablePrint && (_jsx(Toolbar, { setMode: setMode, fetchAllData: fetchAllData })), _jsx(ResortSelector, { resorts: lumiplanResorts, currentResortId: currentResortId, setCurrentResortId: setCurrentResortId }), _jsx(TodaysTips, { ref: todaysTipsRef, resortOpening: resortOpening }), _jsx(Weather, { ref: weatherRef, weather: weather }), _jsx(RoadCondition, { ref: roadConditionRef, resortAccess: resortAccess }), _jsx(Domain, { ref: domainRef, domain: domain }), _jsx(Pois, { ref: poisRef, pois: pois }), showOpening && (_jsx(Opening, { ref: openingsRef, resortOpening: resortOpening, showOpening: currentResort.showOpening })), _jsx(Signature, { signature: signature })] }));
|
|
159
|
+
return (_jsxs("div", { "data-mode": mode, "data-resort": currentResortId, className: css.lumiplan, children: [_jsx(Header, { date: timestamp, mode: mode }), !disablePrint && (_jsx(Toolbar, { setMode: setMode, fetchAllData: fetchAllData })), _jsx(ResortSelector, { resorts: lumiplanResorts, currentResortId: currentResortId, setCurrentResortId: setCurrentResortId }), _jsx(TodaysTips, { ref: todaysTipsRef, resortOpening: resortOpening }), _jsx(Weather, { ref: weatherRef, weather: weather }), _jsx(RoadCondition, { ref: roadConditionRef, resortAccess: resortAccess }), _jsx(Domain, { ref: domainRef, domain: domain }), _jsx(Pois, { ref: poisRef, pois: pois }), showOpening && (_jsx(Opening, { ref: openingsRef, resortOpening: resortOpening, showOpening: currentResort.showOpening })), _jsx(Signature, { signature: signature })] }));
|
|
160
160
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"opening.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/opening.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,aAAa,EAAO,MAAM,SAAS,CAAC;AAGlD,KAAK,KAAK,GAAG;IACX,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"opening.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/opening.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,KAAK,EAAE,aAAa,EAAO,MAAM,SAAS,CAAC;AAGlD,KAAK,KAAK,GAAG;IACX,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,OAAO,8EAoFZ,CAAC;AA0CF,eAAe,OAAO,CAAC"}
|
|
@@ -27,7 +27,7 @@ const Opening = React.forwardRef(({ resortOpening, showOpening }, ref) => {
|
|
|
27
27
|
const dayIndex = new Date().getDay() - 1;
|
|
28
28
|
const orderedDays = reorganizeDays(dawnSkiingDays, dayIndex);
|
|
29
29
|
const orderedNights = reorganizeDays(nightSkiingDays, dayIndex);
|
|
30
|
-
return (_jsx("div", { ref: ref, className: css.opening, "data-tags": t(lang, tagCode), children: _jsx("div", { className: css.tableOuter, children: _jsx("div", { className: css.tableInner, children: _jsxs("table", { className: css.table, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", {}), orderedDays.map((day, i) => {
|
|
30
|
+
return (_jsx("div", { ref: ref, className: css.opening, "data-opening": "", "data-tags": t(lang, tagCode), children: _jsx("div", { className: css.tableOuter, children: _jsx("div", { className: css.tableInner, children: _jsxs("table", { className: css.table, children: [_jsx("thead", { children: _jsxs("tr", { children: [_jsx("th", {}), orderedDays.map((day, i) => {
|
|
31
31
|
const dayNumber = new Date();
|
|
32
32
|
dayNumber.setDate(dayNumber.getDate() + i);
|
|
33
33
|
const weekDay = t(lang, `opening.days.${day.dayType}`);
|
|
@@ -117,7 +117,7 @@ const Pois = React.forwardRef(({ pois }, ref) => {
|
|
|
117
117
|
if (!flattenedPois.length) {
|
|
118
118
|
return null;
|
|
119
119
|
}
|
|
120
|
-
return (_jsx("div", { className: css.pois, children: _jsx("div", { className: css.inner, children: pois.map((zone) => {
|
|
120
|
+
return (_jsx("div", { className: css.pois, "data-pois": "", children: _jsx("div", { className: css.inner, children: pois.map((zone) => {
|
|
121
121
|
const { name, lifts = [], trails = [], activities = [], interconnections = [], } = zone;
|
|
122
122
|
const zonePois = [
|
|
123
123
|
...interconnections,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"road-condition.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/road-condition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,KAAK,KAAK,GAAG;IACX,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"road-condition.d.ts","sourceRoot":"","sources":["../../../../src/lbm/components/lumiplan/road-condition.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG5C,KAAK,KAAK,GAAG;IACX,YAAY,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;CACpC,CAAC;AAEF,QAAA,MAAM,aAAa,8EA8FlB,CAAC;AAIF,eAAe,aAAa,CAAC"}
|
|
@@ -14,7 +14,7 @@ const RoadCondition = React.forwardRef(({ resortAccess }, ref) => {
|
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
16
|
const { roadConditions } = resortAccess;
|
|
17
|
-
return (_jsxs("div", { ref: ref, className: css.conditions, "data-tags": t(lang, "road-conditions.navigation-title"), children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: { __html: t(lang, "road-conditions.title") } }), roadConditions.map(({ id, name, status, roadInfo, equipment, surface, number }) => {
|
|
17
|
+
return (_jsxs("div", { ref: ref, className: css.conditions, "data-road-conditions": "", "data-tags": t(lang, "road-conditions.navigation-title"), children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: { __html: t(lang, "road-conditions.title") } }), roadConditions.map(({ id, name, status, roadInfo, equipment, surface, number }) => {
|
|
18
18
|
const roadInfoData = roadInfo?.data?.find(({ language }) => {
|
|
19
19
|
const _lang = lang === "fr" ? "fr_FR" : "en_US";
|
|
20
20
|
return language === _lang;
|
|
@@ -30,7 +30,7 @@ const TodaysTips = React.forwardRef(({ resortOpening }, ref) => {
|
|
|
30
30
|
const classes = classNames(css.tips, {
|
|
31
31
|
[css.empty]: isEmpty,
|
|
32
32
|
});
|
|
33
|
-
return (_jsxs("div", { ref: ref, className: classes, children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: { __html: t(lang, "todays-tips.title") } }), _jsx("div", { ref: textRef, className: css.text, dangerouslySetInnerHTML: { __html: text.data } })] }));
|
|
33
|
+
return (_jsxs("div", { ref: ref, "data-todays-tips": "", className: classes, children: [_jsx("div", { className: css.title, dangerouslySetInnerHTML: { __html: t(lang, "todays-tips.title") } }), _jsx("div", { ref: textRef, className: css.text, dangerouslySetInnerHTML: { __html: text.data } })] }));
|
|
34
34
|
});
|
|
35
35
|
TodaysTips.displayName = "TodaysTips";
|
|
36
36
|
export default TodaysTips;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/lumiplan/weather/weather.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,UAAU,CAAC;AAK1D,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,QAAA,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../../../../src/lbm/components/lumiplan/weather/weather.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,eAAe,EAAY,MAAM,UAAU,CAAC;AAK1D,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,QAAA,MAAM,OAAO,8EA+GZ,CAAC;AAIF,eAAe,OAAO,CAAC"}
|
|
@@ -35,7 +35,7 @@ const Weather = React.forwardRef(({ weather }, ref) => {
|
|
|
35
35
|
const forecast = forecastData?.data;
|
|
36
36
|
const { weatherInfos } = weatherZones[currentZoneIndex];
|
|
37
37
|
const days = weatherInfos.slice(0, 4);
|
|
38
|
-
return (_jsxs("div", { ref: ref, className: css.weather, "data-tags": t(lang, "weather.title"), children: [_jsx("div", { className: css.forecast, dangerouslySetInnerHTML: { __html: forecast } }), _jsx(Zones, { weatherZones: weatherZones, currentZoneIndex: currentZoneIndex, setCurrentZoneIndex: setCurrentZoneIndex }), _jsx(Days, { days: days, currentDayIndex: currentDayIndex, setCurrentDayIndex: setCurrentDayIndex, lang: lang }), weatherZones.map((zone, i) => {
|
|
38
|
+
return (_jsxs("div", { ref: ref, className: css.weather, "data-weather": "", "data-tags": t(lang, "weather.title"), children: [_jsx("div", { className: css.forecast, dangerouslySetInnerHTML: { __html: forecast } }), _jsx(Zones, { weatherZones: weatherZones, currentZoneIndex: currentZoneIndex, setCurrentZoneIndex: setCurrentZoneIndex }), _jsx(Days, { days: days, currentDayIndex: currentDayIndex, setCurrentDayIndex: setCurrentDayIndex, lang: lang }), weatherZones.map((zone, i) => {
|
|
39
39
|
const { weatherInfos, name, altitude } = zone;
|
|
40
40
|
const { value, unit } = altitude;
|
|
41
41
|
const days = weatherInfos.slice(0, 4);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import getConfig from "next/config";
|
|
2
|
-
import
|
|
2
|
+
import { GET, POST } from "../../../../future/utils/fetcher";
|
|
3
3
|
const { publicRuntimeConfig } = getConfig();
|
|
4
4
|
const { searchApi: api, googleSites } = publicRuntimeConfig;
|
|
5
5
|
export function fetchResults(site, lang, query, groupLimit = 8, queryBy = "title,text,pageTitle,seoKeywords,parentTitle,seoTitle", queryByWeights, semantic) {
|
|
6
6
|
const endpoint = `${api}/ublo-search/search/market-place${semantic ? "/semantic" : ""}`;
|
|
7
|
-
return
|
|
7
|
+
return POST(endpoint, {
|
|
8
8
|
q: query,
|
|
9
9
|
query_by: queryBy + (semantic ? ",embedding" : ""),
|
|
10
10
|
query_by_weights: semantic ? undefined : queryByWeights,
|
|
@@ -17,7 +17,7 @@ export function fetchResults(site, lang, query, groupLimit = 8, queryBy = "title
|
|
|
17
17
|
}
|
|
18
18
|
export async function fetchOTResults(query, lang) {
|
|
19
19
|
const endpoint = `${api}/ublo-search/google-search`;
|
|
20
|
-
return
|
|
20
|
+
return GET(endpoint, {
|
|
21
21
|
query,
|
|
22
22
|
siteSearch: googleSites[lang][0],
|
|
23
23
|
});
|