ublo-lib 1.44.32 → 1.45.1
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/scrollbar-size.d.ts +2 -0
- package/es/common/components/scrollbar-size.d.ts.map +1 -0
- package/es/common/components/scrollbar-size.js +22 -0
- 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/market-place/components/instant-search/services/api.js +3 -3
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollbar-size.d.ts","sourceRoot":"","sources":["../../../src/common/components/scrollbar-size.js"],"names":[],"mappings":"AAEA,iFA8BC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export default function ScrollbarSize() {
|
|
4
|
+
const ref = React.useRef();
|
|
5
|
+
const [scrollbarSize, setScrollbarSize] = React.useState();
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
if (!scrollbarSize) {
|
|
8
|
+
setScrollbarSize(ref.current ? ref.current.offsetWidth - ref.current.clientWidth : 0);
|
|
9
|
+
}
|
|
10
|
+
}, [scrollbarSize]);
|
|
11
|
+
return scrollbarSize !== undefined ? (_jsx("style", { jsx: true, global: true, children: `
|
|
12
|
+
:root {
|
|
13
|
+
--scrollbar-size: ${scrollbarSize}px;
|
|
14
|
+
}
|
|
15
|
+
` })) : (_jsx("div", { ref: ref, style: {
|
|
16
|
+
position: "absolute",
|
|
17
|
+
top: "-9999px",
|
|
18
|
+
width: "50px",
|
|
19
|
+
height: "50px",
|
|
20
|
+
overflow: "scroll",
|
|
21
|
+
} }));
|
|
22
|
+
}
|
|
@@ -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,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
|
});
|