ublo-lib 1.38.1 → 1.38.3
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/esf/components/instant-search/instant-search.js +1 -1
- package/es/future/components/msem/esf.d.ts +20 -0
- package/es/future/components/msem/esf.d.ts.map +1 -0
- package/es/future/components/msem/esf.js +19 -0
- package/es/future/components/msem/index.d.ts +2 -1
- package/es/future/components/msem/index.d.ts.map +1 -1
- package/es/future/components/msem/index.js +2 -1
- package/es/future/components/msem/script.d.ts.map +1 -1
- package/es/future/components/msem/script.js +1 -2
- package/package.json +1 -1
|
@@ -83,5 +83,5 @@ export default function InstantSearch({ lang, suggestions, className, ubloContex
|
|
|
83
83
|
window.removeEventListener("keydown", handleKeyPresses);
|
|
84
84
|
};
|
|
85
85
|
}, [handleKeyPresses]);
|
|
86
|
-
return (_jsxs(_Fragment, { children: [_jsx(Button, { className: classes, onClick: openSearch, children: _jsx(Icons.Search, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
|
|
86
|
+
return (_jsxs(_Fragment, { children: [_jsx(Button, { variant: "transparent", className: classes, onClick: openSearch, children: _jsx(Icons.Search, { className: css.searchIcon }) }), _jsxs(Dialog, { className: css.dialog, isOpened: opened, showCloseButton: false, close: () => closeSearch(), container: "body", children: [_jsx(Input, { lang: lang, text: text, setText: setText, closeSearch: closeSearch, loading: search.loading === true, suggestions: suggestions }), _jsx(Results, { lang: lang, text: text, results: search.result, weekNumber: weekNumber, openPeriodPicker: openPeriodPicker, loading: search.loading === true && search.result === undefined, sendPlausibleGoal: sendPlausibleGoal })] }), _jsx(Dialog, { isOpened: periodPickerOpened, close: closePeriodPicker, container: "body", children: _jsx(PeriodPicker, { onChange: updateWeek, ubloContext: ubloContext }) })] }));
|
|
87
87
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { GlobalOptions, GlobalPresets } from "./types";
|
|
3
|
+
type Show = "stay" | "vel";
|
|
4
|
+
type Hide = "stay" | "vel";
|
|
5
|
+
type Options = GlobalOptions & {
|
|
6
|
+
cartUrl?: string;
|
|
7
|
+
cartChanged?: (cart: any) => void;
|
|
8
|
+
show?: Show;
|
|
9
|
+
hide?: Hide;
|
|
10
|
+
};
|
|
11
|
+
type Presets = GlobalPresets & {};
|
|
12
|
+
type Props = {
|
|
13
|
+
options?: Options;
|
|
14
|
+
presets?: Presets;
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: React.MemoExoticComponent<typeof Esf>;
|
|
18
|
+
export default _default;
|
|
19
|
+
declare function Esf({ options, presets, children }: Props): React.ReactNode;
|
|
20
|
+
//# sourceMappingURL=esf.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"esf.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/esf.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE5D,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AAC3B,KAAK,IAAI,GAAG,MAAM,GAAG,KAAK,CAAC;AAE3B,KAAK,OAAO,GAAG,aAAa,GAAG;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,IAAI,CAAC;CACb,CAAC;AAEF,KAAK,OAAO,GAAG,aAAa,GAAG,EAAE,CAAC;AAElC,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AAEF,wBAA+B;AAE/B,iBAAS,GAAG,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,KAAK,mBAiBjD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import * as Utils from "./utils";
|
|
3
|
+
import * as Plausible from "../plausible";
|
|
4
|
+
export default React.memo(Esf);
|
|
5
|
+
function Esf({ options, presets, children }) {
|
|
6
|
+
React.useEffect(() => {
|
|
7
|
+
const lang = options?.lang === "fr" ? "fr" : "en";
|
|
8
|
+
const patchedOptions = {
|
|
9
|
+
...options,
|
|
10
|
+
lang,
|
|
11
|
+
analytics: (...args) => {
|
|
12
|
+
options?.analytics?.apply(null, args);
|
|
13
|
+
Plausible.callback.apply(null, args);
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
Utils.loadWidget("esf", patchedOptions, presets);
|
|
17
|
+
}, [options, presets]);
|
|
18
|
+
return children;
|
|
19
|
+
}
|
|
@@ -4,8 +4,9 @@ import LodgingNew from "./lodging-new";
|
|
|
4
4
|
import SkiRental from "./ski-rental";
|
|
5
5
|
import SkiPass from "./ski-pass";
|
|
6
6
|
import LiftJb from "./lift-jb";
|
|
7
|
+
import Esf from "./esf";
|
|
7
8
|
import Tunnel from "./tunnel";
|
|
8
9
|
import Account from "./account";
|
|
9
10
|
import { loadWidget } from "./utils";
|
|
10
|
-
export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
|
|
11
|
+
export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
|
|
11
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,MAAM,EACN,OAAO,GACR,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,SAAS,MAAM,cAAc,CAAC;AACrC,OAAO,OAAO,MAAM,YAAY,CAAC;AACjC,OAAO,MAAM,MAAM,WAAW,CAAC;AAC/B,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,MAAM,MAAM,UAAU,CAAC;AAC9B,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,OAAO,EACL,MAAM,EACN,UAAU,EACV,OAAO,EACP,UAAU,EACV,SAAS,EACT,OAAO,EACP,MAAM,EACN,GAAG,EACH,MAAM,EACN,OAAO,GACR,CAAC"}
|
|
@@ -4,7 +4,8 @@ import LodgingNew from "./lodging-new";
|
|
|
4
4
|
import SkiRental from "./ski-rental";
|
|
5
5
|
import SkiPass from "./ski-pass";
|
|
6
6
|
import LiftJb from "./lift-jb";
|
|
7
|
+
import Esf from "./esf";
|
|
7
8
|
import Tunnel from "./tunnel";
|
|
8
9
|
import Account from "./account";
|
|
9
10
|
import { loadWidget } from "./utils";
|
|
10
|
-
export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Tunnel, Account, };
|
|
11
|
+
export { Script, loadWidget, Lodging, LodgingNew, SkiRental, SkiPass, LiftJb, Esf, Tunnel, Account, };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/script.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"script.d.ts","sourceRoot":"","sources":["../../../../src/future/components/msem/script.tsx"],"names":[],"mappings":"AAAA,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,WAAW,2CAa9C"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import NextScript from "next/script";
|
|
3
2
|
export function Script({ msemUrl }) {
|
|
4
3
|
const setLoaded = () => {
|
|
5
4
|
window.MseMLoaded = true;
|
|
6
5
|
};
|
|
7
|
-
return (_jsx(
|
|
6
|
+
return (_jsx("script", { src: `${msemUrl}/static/js/widget-msem.js`, onLoad: setLoaded, async: true, defer: true }));
|
|
8
7
|
}
|