ublo-lib 1.16.4 → 1.17.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/admin-links/admin-links.d.ts +3 -4
- package/es/common/components/admin-links/admin-links.d.ts.map +1 -1
- package/es/common/components/breadcrumb.d.ts +3 -4
- package/es/common/components/breadcrumb.d.ts.map +1 -1
- package/es/common/components/editable-map/icons/esf.js +0 -5
- package/es/common/components/editable-map/icons/sata-huez.js +0 -4
- package/es/common/components/editable-map/index.js +0 -1
- package/es/common/components/editable-map/marker-list.js +0 -1
- package/es/common/components/instant-search/hooks/use-search.d.ts +1 -1
- package/es/common/components/instant-search/hooks/use-search.d.ts.map +1 -1
- package/es/common/components/instant-search/input.d.ts +3 -4
- package/es/common/components/instant-search/input.d.ts.map +1 -1
- package/es/common/components/instant-search/instant-search.d.ts +2 -3
- package/es/common/components/instant-search/instant-search.d.ts.map +1 -1
- package/es/common/components/instant-search/links.d.ts +2 -3
- package/es/common/components/instant-search/links.d.ts.map +1 -1
- package/es/common/components/instant-search/no-product.d.ts +2 -3
- package/es/common/components/instant-search/no-product.d.ts.map +1 -1
- package/es/common/components/instant-search/products.d.ts +2 -2
- package/es/common/components/instant-search/products.d.ts.map +1 -1
- package/es/common/components/instant-search/results.d.ts +10 -11
- package/es/common/components/instant-search/results.d.ts.map +1 -1
- package/es/common/components/instant-search/services/dates.js +0 -1
- package/es/common/components/msem-preset-editor/components/facet-selector.d.ts +6 -0
- package/es/common/components/msem-preset-editor/components/facet-selector.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/components/facet-selector.js +23 -0
- package/es/common/components/msem-preset-editor/components/form.d.ts +8 -0
- package/es/common/components/msem-preset-editor/components/form.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/components/form.js +8 -0
- package/es/common/components/msem-preset-editor/components/form.module.css +39 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.d.ts +14 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.js +35 -0
- package/es/common/components/msem-preset-editor/components/stay-picker.module.css +5 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts +12 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.js +48 -0
- package/es/common/components/msem-preset-editor/components/widget-list-item.module.css +115 -0
- package/es/common/components/msem-preset-editor/components/widget-list.d.ts +17 -0
- package/es/common/components/msem-preset-editor/components/widget-list.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/components/widget-list.js +34 -0
- package/es/common/components/msem-preset-editor/components/widget-list.module.css +12 -0
- package/es/common/components/msem-preset-editor/editor-dialog.d.ts +29 -0
- package/es/common/components/msem-preset-editor/editor-dialog.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editor-dialog.js +16 -0
- package/es/common/components/msem-preset-editor/editor-dialog.module.css +31 -0
- package/es/common/components/msem-preset-editor/editors/elloha.d.ts +14 -0
- package/es/common/components/msem-preset-editor/editors/elloha.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/elloha.js +69 -0
- package/es/common/components/msem-preset-editor/editors/elloha.module.css +8 -0
- package/es/common/components/msem-preset-editor/editors/index.d.ts +14 -0
- package/es/common/components/msem-preset-editor/editors/index.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/index.js +13 -0
- package/es/common/components/msem-preset-editor/editors/lodgings.d.ts +16 -0
- package/es/common/components/msem-preset-editor/editors/lodgings.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/lodgings.js +199 -0
- package/es/common/components/msem-preset-editor/editors/lodgings.module.css +21 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.js +196 -0
- package/es/common/components/msem-preset-editor/editors/ski-passes.module.css +25 -0
- package/es/common/components/msem-preset-editor/editors/standard-products.d.ts +15 -0
- package/es/common/components/msem-preset-editor/editors/standard-products.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/standard-products.js +64 -0
- package/es/common/components/msem-preset-editor/editors/vakario.d.ts +14 -0
- package/es/common/components/msem-preset-editor/editors/vakario.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/editors/vakario.js +181 -0
- package/es/common/components/msem-preset-editor/index.js +2 -0
- package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts +27 -0
- package/es/common/components/msem-preset-editor/msem-preset-editor.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/msem-preset-editor.js +127 -0
- package/es/common/components/msem-preset-editor/msem-preset-editor.module.css +49 -0
- package/es/common/components/msem-preset-editor/services/api.d.ts +15 -0
- package/es/common/components/msem-preset-editor/services/api.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/services/api.js +74 -0
- package/es/common/components/msem-preset-editor/services/offers.d.ts +47 -0
- package/es/common/components/msem-preset-editor/services/offers.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/services/offers.js +39 -0
- package/es/common/components/msem-preset-editor/services/preset.d.ts +40 -0
- package/es/common/components/msem-preset-editor/services/preset.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/services/preset.js +15 -0
- package/es/common/components/msem-preset-editor/services/url-params.d.ts +3 -0
- package/es/common/components/msem-preset-editor/services/url-params.d.ts.map +1 -0
- package/es/common/components/msem-preset-editor/services/url-params.js +26 -0
- package/es/common/components/msem-preset-linker/components/actions.d.ts +11 -0
- package/es/common/components/msem-preset-linker/components/actions.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/components/actions.js +43 -0
- package/es/common/components/msem-preset-linker/components/actions.module.css +66 -0
- package/es/common/components/msem-preset-linker/components/overlays.d.ts +8 -0
- package/es/common/components/msem-preset-linker/components/overlays.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/components/overlays.js +47 -0
- package/es/common/components/msem-preset-linker/components/overlays.module.css +64 -0
- package/es/common/components/msem-preset-linker/components/resort-selector.d.ts +6 -0
- package/es/common/components/msem-preset-linker/components/resort-selector.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/components/resort-selector.js +12 -0
- package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts +4 -0
- package/es/common/components/msem-preset-linker/hooks/use-msem-presets.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/hooks/use-msem-presets.js +36 -0
- package/es/common/components/msem-preset-linker/index.d.ts +3 -0
- package/es/common/components/msem-preset-linker/index.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/index.js +2 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts +29 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.js +54 -0
- package/es/common/components/msem-preset-linker/msem-preset-linker.module.css +23 -0
- package/es/common/components/msem-preset-linker/services/url-params.d.ts +2 -0
- package/es/common/components/msem-preset-linker/services/url-params.d.ts.map +1 -0
- package/es/common/components/msem-preset-linker/services/url-params.js +13 -0
- package/es/common/components/plausible/services/callback.js +0 -1
- package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts +2 -2
- package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts.map +1 -1
- package/es/common/components/tabbed-zones.d.ts +3 -4
- package/es/common/components/tabbed-zones.d.ts.map +1 -1
- package/es/common/hooks/use-in-view.d.ts +1 -1
- package/es/common/hooks/use-in-view.d.ts.map +1 -1
- package/es/common/hooks/use-scroll-direction.d.ts +2 -2
- package/es/common/hooks/use-scroll-direction.d.ts.map +1 -1
- package/es/common/hooks/use-tunnel.d.ts +1 -1
- package/es/common/hooks/use-tunnel.d.ts.map +1 -1
- package/es/common/hooks/use-window-sizes.d.ts +1 -1
- package/es/common/hooks/use-window-sizes.d.ts.map +1 -1
- package/es/common/utils/fetcher.js +0 -1
- package/es/common/utils/msem-widget.d.ts +3 -4
- package/es/common/utils/msem-widget.d.ts.map +1 -1
- package/es/esf/components/covid-link/index.js +0 -6
- package/es/esf/components/cp-form.js +0 -1
- package/es/esf/components/magic-box/magic-box.d.ts +3 -3
- package/es/esf/components/magic-box/magic-box.d.ts.map +1 -1
- package/es/esf/components/parcours-esf/parcours-esf.d.ts +2 -3
- package/es/esf/components/parcours-esf/parcours-esf.d.ts.map +1 -1
- package/es/esf/components/parcours-esf/parcours-esf.js +2 -1
- package/es/esf/components/period-picker/services/dates.js +0 -1
- package/es/esf/components/village-maps/utils.js +0 -1
- package/es/esf/components/week-picker/index.js +1 -2
- package/es/esf/components/week-picker/utils.js +0 -1
- package/es/esf/components/week-picker-2/index.js +1 -2
- package/es/esf/components/week-picker-2/utils.js +0 -1
- package/package.json +34 -30
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
.overlay {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: -4px;
|
|
4
|
+
left: -4px;
|
|
5
|
+
width: calc(100% + 8px);
|
|
6
|
+
height: calc(100% + 8px);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
border-radius: var(--ublo-radius-200, 10px);
|
|
11
|
+
z-index: 800;
|
|
12
|
+
transition: background-color 160ms
|
|
13
|
+
var(--ds-transition-easing, cubic-bezier(0.4, 0.1, 0.2, 0.9));
|
|
14
|
+
pointer-events: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
body:not(:has(.active)) .overlay:hover {
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
body:not(:has(.active)) .overlay:hover,
|
|
22
|
+
.active {
|
|
23
|
+
background-color: rgba(0, 0, 0, 0.25);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.active {
|
|
27
|
+
outline: 2px solid var(--ublo-blue-500, #4177f6);
|
|
28
|
+
outline-offset: 3px;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.presetIndicator {
|
|
32
|
+
width: 44px;
|
|
33
|
+
height: 44px;
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
justify-content: center;
|
|
37
|
+
background: var(
|
|
38
|
+
--ublo-blue-gradient,
|
|
39
|
+
linear-gradient(
|
|
40
|
+
175deg,
|
|
41
|
+
var(--ublo-blue-400, #4177f6),
|
|
42
|
+
var(--ublo-blue-500, #004cc2)
|
|
43
|
+
)
|
|
44
|
+
);
|
|
45
|
+
border-radius: var(--ublo-radius-200, 10px);
|
|
46
|
+
box-shadow: var(--ublo-shadow-100, 0 5px 10px rgba(0, 0, 0, 0.12));
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.obsolete .presetIndicator {
|
|
50
|
+
background: var(
|
|
51
|
+
--ublo-yellow-gradient,
|
|
52
|
+
linear-gradient(
|
|
53
|
+
175deg,
|
|
54
|
+
var(--ublo-yellow-400, #ffb648),
|
|
55
|
+
var(--ublo-yellow-500, #e2a445)
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.presetIndicatorIcon {
|
|
61
|
+
width: 24px;
|
|
62
|
+
height: 24px;
|
|
63
|
+
fill: var(--ublo-grey-000, #fff);
|
|
64
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resort-selector.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/components/resort-selector.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE;;;;CAAA,2CAiBpE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Select from "dt-design-system/es/select";
|
|
3
|
+
export default function ResortSelector({ resorts, resort, setResort }) {
|
|
4
|
+
const formatedResorts = resorts.map((resort) => ({
|
|
5
|
+
label: resort.label,
|
|
6
|
+
value: String(resort.resort),
|
|
7
|
+
}));
|
|
8
|
+
return (_jsx(Select, { value: resort, onValueChange: setResort, label: "Destination", options: [
|
|
9
|
+
{ label: "Sélectionnez une destination pour continuer", value: "" },
|
|
10
|
+
...formatedResorts,
|
|
11
|
+
] }));
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-msem-presets.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/hooks/use-msem-presets.ts"],"names":[],"mappings":"AAOA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,IAAI,EAAE;;CAAA,QAoC9C"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { useUbloContext } from "ublo/with-ublo";
|
|
3
|
+
import { MODES, PRESET_ATTRIBUTE } from "../msem-preset-linker";
|
|
4
|
+
import * as UrlParams from "../services/url-params";
|
|
5
|
+
import * as MseM from "../../../utils/msem-widget";
|
|
6
|
+
// import * as MseM from "ublo-lib/es/common/utils/msem-widget";
|
|
7
|
+
export default function useMsemPresets({ mode }) {
|
|
8
|
+
const { lang, cmsMode, path } = useUbloContext();
|
|
9
|
+
const isEnabled = cmsMode !== "editing" && cmsMode !== "info" && mode !== MODES.EDITING;
|
|
10
|
+
const handleSectionClick = React.useCallback((e) => {
|
|
11
|
+
const target = e.target;
|
|
12
|
+
const preset = target
|
|
13
|
+
.closest(`section[${PRESET_ATTRIBUTE}]`)
|
|
14
|
+
?.getAttribute(PRESET_ATTRIBUTE);
|
|
15
|
+
if (!preset)
|
|
16
|
+
return;
|
|
17
|
+
const { widget, options, presets, url } = JSON.parse(preset);
|
|
18
|
+
if (url) {
|
|
19
|
+
const params = UrlParams.build({ options, presets });
|
|
20
|
+
const endpoint = url.concat(params);
|
|
21
|
+
window.open(endpoint, "_blank");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
e.stopPropagation();
|
|
26
|
+
MseM.loadWidget(widget, options, presets);
|
|
27
|
+
}, []);
|
|
28
|
+
React.useEffect(() => {
|
|
29
|
+
if (isEnabled) {
|
|
30
|
+
window.addEventListener("click", handleSectionClick);
|
|
31
|
+
return () => {
|
|
32
|
+
window.removeEventListener("click", handleSectionClick);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
}, [lang, handleSectionClick, isEnabled, path]);
|
|
36
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/msem-preset-linker/index.tsx"],"names":[],"mappings":"AAAA,OAAO,gBAAgB,MAAM,sBAAsB,CAAC;AAEpD,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
type Props = {
|
|
3
|
+
lang: "fr" | "en";
|
|
4
|
+
options: {
|
|
5
|
+
channel: string;
|
|
6
|
+
resort: string;
|
|
7
|
+
cartUrl?: string;
|
|
8
|
+
analytics?: () => void;
|
|
9
|
+
};
|
|
10
|
+
urls?: {
|
|
11
|
+
skiPasses?: {
|
|
12
|
+
winter: string;
|
|
13
|
+
summer: string;
|
|
14
|
+
};
|
|
15
|
+
lodgings?: {
|
|
16
|
+
winter: string;
|
|
17
|
+
summer: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
export declare const MODES: {
|
|
23
|
+
CONNECTED: number;
|
|
24
|
+
EDITING: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const PRESET_ATTRIBUTE = "data-msem-preset";
|
|
27
|
+
export default function MseMPresetLinker({ lang, options, urls, children, }: Props): import("react/jsx-runtime").JSX.Element | null;
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=msem-preset-linker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msem-preset-linker.d.ts","sourceRoot":"","sources":["../../../../src/common/components/msem-preset-linker/msem-preset-linker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,OAAO,EAAE;QACP,OAAO,EAAE,MAAM,CAAC;QAChB,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;KACxB,CAAC;IACF,IAAI,CAAC,EAAE;QACL,SAAS,CAAC,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;QAC/C,QAAQ,CAAC,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,MAAM,EAAE,MAAM,CAAA;SAAE,CAAC;KAC/C,CAAC;IACF,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,KAAK;;;CAGjB,CAAC;AAEF,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AAEnD,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,QAAQ,GACT,EAAE,KAAK,kDA8DP"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { useUbloContext } from "ublo/with-ublo";
|
|
4
|
+
import Router from "next/router";
|
|
5
|
+
import Actions from "./components/actions";
|
|
6
|
+
import css from "./msem-preset-linker.module.css";
|
|
7
|
+
import Overlays from "./components/overlays";
|
|
8
|
+
import EditorDialog from "../msem-preset-editor/editor-dialog";
|
|
9
|
+
import useMsemPresets from "./hooks/use-msem-presets";
|
|
10
|
+
export const MODES = {
|
|
11
|
+
CONNECTED: 0,
|
|
12
|
+
EDITING: 1,
|
|
13
|
+
};
|
|
14
|
+
export const PRESET_ATTRIBUTE = "data-msem-preset";
|
|
15
|
+
export default function MseMPresetLinker({ lang, options, urls, children, }) {
|
|
16
|
+
const { cmsMode } = useUbloContext();
|
|
17
|
+
const [mode, setMode] = React.useState(MODES.CONNECTED);
|
|
18
|
+
const [target, setTarget] = React.useState(null);
|
|
19
|
+
const link = target?.querySelector(":scope > a");
|
|
20
|
+
const urlOverride = link?.getAttribute("href") || undefined;
|
|
21
|
+
const urlsWithOverride = {
|
|
22
|
+
...urls,
|
|
23
|
+
override: urlOverride,
|
|
24
|
+
};
|
|
25
|
+
const removeObsoletePreset = () => {
|
|
26
|
+
const attributes = ["data-config", "data-widget", "data-resort"];
|
|
27
|
+
attributes.forEach((attribute) => {
|
|
28
|
+
target?.removeAttribute(attribute);
|
|
29
|
+
});
|
|
30
|
+
setTarget(null);
|
|
31
|
+
};
|
|
32
|
+
const updatePreset = (newPreset) => {
|
|
33
|
+
if (newPreset) {
|
|
34
|
+
target?.setAttribute(PRESET_ATTRIBUTE, JSON.stringify(newPreset));
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
target?.removeAttribute(PRESET_ATTRIBUTE);
|
|
38
|
+
}
|
|
39
|
+
removeObsoletePreset();
|
|
40
|
+
setTarget(null);
|
|
41
|
+
};
|
|
42
|
+
const closeEditor = () => {
|
|
43
|
+
setTarget(null);
|
|
44
|
+
};
|
|
45
|
+
Router.ready(() => {
|
|
46
|
+
Router.events.on("routeChangeStart", () => {
|
|
47
|
+
setMode(MODES.CONNECTED);
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
useMsemPresets({ mode });
|
|
51
|
+
if (!cmsMode)
|
|
52
|
+
return null;
|
|
53
|
+
return (_jsxs("div", { className: css.linker, children: [_jsx(Actions, { mode: mode, setMode: setMode }), _jsx(Overlays, { mode: mode, target: target, setTarget: setTarget }), _jsx(EditorDialog, { lang: lang, options: options, target: target, updatePreset: updatePreset, closeEditor: closeEditor, removeObsoletePreset: removeObsoletePreset, urls: urlsWithOverride, children: children })] }));
|
|
54
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.linker {
|
|
2
|
+
--ds-primary: var(--ds-blue-500, #073ff8);
|
|
3
|
+
--ds-secondary: var(--ds-blue-400, #4177f6);
|
|
4
|
+
|
|
5
|
+
--ds-focus-ring-color: var(--ds-blue-400, #4177f6);
|
|
6
|
+
--ds-focus-ring-width: 2px;
|
|
7
|
+
--ds-focus-ring-offset: 2px;
|
|
8
|
+
|
|
9
|
+
--ds-button-background: var(--ds-secondary, var(--ds-blue-400, #4177f6));
|
|
10
|
+
--ds-button-hover-background: var(--ds-primary, var(--ds-blue-500, #073ff8));
|
|
11
|
+
|
|
12
|
+
position: fixed;
|
|
13
|
+
top: 0;
|
|
14
|
+
left: 0;
|
|
15
|
+
width: 100%;
|
|
16
|
+
height: 100%;
|
|
17
|
+
display: flex;
|
|
18
|
+
align-items: center;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
font-family: "Open Sans", sans-serif;
|
|
21
|
+
pointer-events: none;
|
|
22
|
+
z-index: 811;
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"url-params.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/msem-preset-linker/services/url-params.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,WAAY,OAAO,MAAM,EAAE,GAAG,CAAC,WAWhD,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export const build = (params) => {
|
|
2
|
+
return Object.keys(params)
|
|
3
|
+
.map((key, i) => {
|
|
4
|
+
const param = params[key];
|
|
5
|
+
if (!param)
|
|
6
|
+
return "";
|
|
7
|
+
const isObject = typeof param === "object";
|
|
8
|
+
const sign = i === 0 ? "?" : "&";
|
|
9
|
+
const value = isObject ? encodeURI(JSON.stringify(param)) : param;
|
|
10
|
+
return `${sign}${key}=${value}`;
|
|
11
|
+
})
|
|
12
|
+
.join("");
|
|
13
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
type Props = {
|
|
3
3
|
className?: string;
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
};
|
|
6
|
-
export default function ScrollingCarousel({ className, children }: Props): JSX.Element;
|
|
6
|
+
export default function ScrollingCarousel({ className, children }: Props): import("react/jsx-runtime").JSX.Element;
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=scrolling-carousel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scrolling-carousel.d.ts","sourceRoot":"","sources":["../../../../src/common/components/scrolling-carousel/scrolling-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,
|
|
1
|
+
{"version":3,"file":"scrolling-carousel.d.ts","sourceRoot":"","sources":["../../../../src/common/components/scrolling-carousel/scrolling-carousel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAKF,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAkGvE"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
declare type Tab = {
|
|
1
|
+
type Tab = {
|
|
3
2
|
subs: number | null;
|
|
4
3
|
};
|
|
5
|
-
|
|
4
|
+
type Props = {
|
|
6
5
|
current?: number;
|
|
7
6
|
currentSub?: number;
|
|
8
7
|
tabs?: Tab[];
|
|
9
8
|
zonesProps: Record<string, unknown>;
|
|
10
9
|
};
|
|
11
|
-
export default function TabbedZones({ current, currentSub, tabs, zonesProps, }: Props): JSX.Element;
|
|
10
|
+
export default function TabbedZones({ current, currentSub, tabs, zonesProps, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
12
11
|
export {};
|
|
13
12
|
//# sourceMappingURL=tabbed-zones.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabbed-zones.d.ts","sourceRoot":"","sources":["../../../src/common/components/tabbed-zones.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tabbed-zones.d.ts","sourceRoot":"","sources":["../../../src/common/components/tabbed-zones.tsx"],"names":[],"mappings":"AAIA,KAAK,GAAG,GAAG;IACT,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,OAAW,EACX,UAAc,EACd,IAAkB,EAClB,UAAe,GAChB,EAAE,KAAK,2CAmHP"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
type CmsMode = "connected" | "info" | "editing";
|
|
3
3
|
export default function useInView(ref: React.MutableRefObject<HTMLElement>, cmsMode: CmsMode, selector: string, repeat?: boolean, intersectionValue?: number): void;
|
|
4
4
|
export {};
|
|
5
5
|
//# sourceMappingURL=use-in-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-in-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,
|
|
1
|
+
{"version":3,"file":"use-in-view.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-in-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAOhD,MAAM,CAAC,OAAO,UAAU,SAAS,CAC/B,GAAG,EAAE,KAAK,CAAC,gBAAgB,CAAC,WAAW,CAAC,EACxC,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,MAAM,EAChB,MAAM,GAAE,OAAc,EACtB,iBAAiB,GAAE,MAAY,QAmFhC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-scroll-direction.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-scroll-direction.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"use-scroll-direction.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-scroll-direction.ts"],"names":[],"mappings":"AAEA,KAAK,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;AAE/B,KAAK,KAAK,GAAG;IACX,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,GAAG,CAAC,EAAE,OAAO,CAAC;CACf,CAAC;AAKF,QAAA,MAAM,kBAAkB,iDAIrB,KAAK;;CAoCP,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-tunnel.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-tunnel.ts"],"names":[],"mappings":"AAMA,
|
|
1
|
+
{"version":3,"file":"use-tunnel.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-tunnel.ts"],"names":[],"mappings":"AAMA,KAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAMF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,OAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,GAAE,KAAU,QA0BZ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-window-sizes.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-window-sizes.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"use-window-sizes.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-window-sizes.ts"],"names":[],"mappings":"AAEA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC;AAOF,QAAA,MAAM,cAAc,aA4BnB,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -1,17 +1,16 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
declare global {
|
|
3
2
|
interface Window {
|
|
4
3
|
MseM: any;
|
|
5
4
|
MseMLoaded: boolean;
|
|
6
5
|
}
|
|
7
6
|
}
|
|
8
|
-
|
|
7
|
+
type Widget = "tunnel" | "lodging" | "esf" | "skiRental" | "skiPass" | "liftJb" | "transfer" | "shuttle" | "excursion" | "otherProducts" | "genericLine" | "esfCustom" | "vakario" | "elloha" | "widgetPackage" | "customerAccount";
|
|
9
8
|
export declare const loadWigetMseM: (id?: string, forceIntegration?: boolean) => Promise<unknown>;
|
|
10
9
|
export declare const openMseM: (widget: Widget, options?: {}, presets?: {}) => Promise<void>;
|
|
11
10
|
export declare function loadWidget(widget: Widget, options?: {}, presets?: {}): void;
|
|
12
|
-
|
|
11
|
+
type ScriptProps = {
|
|
13
12
|
msemUrl: string;
|
|
14
13
|
};
|
|
15
|
-
export declare function Script({ msemUrl }: ScriptProps): JSX.Element;
|
|
14
|
+
export declare function Script({ msemUrl }: ScriptProps): import("react/jsx-runtime").JSX.Element;
|
|
16
15
|
export {};
|
|
17
16
|
//# sourceMappingURL=msem-widget.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"msem-widget.d.ts","sourceRoot":"","sources":["../../../src/common/utils/msem-widget.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"msem-widget.d.ts","sourceRoot":"","sources":["../../../src/common/utils/msem-widget.tsx"],"names":[],"mappings":"AAIA,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,IAAI,EAAE,GAAG,CAAC;QACV,UAAU,EAAE,OAAO,CAAC;KACrB;CACF;AAED,KAAK,MAAM,GACP,QAAQ,GACR,SAAS,GACT,KAAK,GACL,WAAW,GACX,SAAS,GACT,QAAQ,GACR,UAAU,GACV,SAAS,GACT,WAAW,GACX,eAAe,GACf,aAAa,GACb,WAAW,GACX,SAAS,GACT,QAAQ,GACR,eAAe,GACf,iBAAiB,CAAC;AAEtB,eAAO,MAAM,aAAa,+DAWzB,CAAC;AAEF,eAAO,MAAM,QAAQ,WAAkB,MAAM,8CAG5C,CAAC;AAEF,wBAAgB,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,KAAK,EAAE,OAAO,KAAK,QAQpE;AAED,KAAK,WAAW,GAAG;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EAAE,OAAO,EAAE,EAAE,WAAW,2CAY9C"}
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
1
|
const DEFAULT_TOOLTIP = {
|
|
4
2
|
fr: "Informations Covid-19",
|
|
5
3
|
en: "Covid-19 Information"
|
|
6
4
|
};
|
|
7
|
-
|
|
8
5
|
const CovidLink = ({
|
|
9
6
|
lang,
|
|
10
7
|
site,
|
|
@@ -17,9 +14,6 @@ const CovidLink = ({
|
|
|
17
14
|
openInPopup,
|
|
18
15
|
hideFixedButton
|
|
19
16
|
}) => {
|
|
20
|
-
|
|
21
17
|
return null;
|
|
22
|
-
|
|
23
18
|
};
|
|
24
|
-
|
|
25
19
|
export default CovidLink;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { memo, useEffect } from "react";
|
|
3
|
-
|
|
4
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
4
|
export const preview = typeof window !== "undefined" && window.location.search.indexOf("preview") !== -1;
|
|
6
5
|
export const loadJS = (url, id) => {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
|
|
2
|
+
type Stay = {
|
|
3
3
|
from: string;
|
|
4
4
|
to: string;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type Props = {
|
|
7
7
|
stay?: Stay;
|
|
8
8
|
cartUrl: string;
|
|
9
9
|
channel: "ESF" | "MSEM";
|
|
@@ -14,6 +14,6 @@ declare type Props = {
|
|
|
14
14
|
maxDays?: number;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
16
|
};
|
|
17
|
-
declare const _default: React.MemoExoticComponent<({ stay, cartUrl, channel, className, alignContent, maxCPDuration, minDays, maxDays, children, }: Props) => JSX.Element>;
|
|
17
|
+
declare const _default: React.MemoExoticComponent<({ stay, cartUrl, channel, className, alignContent, maxCPDuration, minDays, maxDays, children, }: Props) => import("react/jsx-runtime").JSX.Element>;
|
|
18
18
|
export default _default;
|
|
19
19
|
//# sourceMappingURL=magic-box.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magic-box.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/magic-box/magic-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,
|
|
1
|
+
{"version":3,"file":"magic-box.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/magic-box/magic-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,IAAI,GAAG;IACV,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF,KAAK,KAAK,GAAG;IACX,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,KAAK,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;;AA6HF,wBAAoC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
declare type Props = {
|
|
1
|
+
type Props = {
|
|
3
2
|
parcours: "alpin" | "nordic" | "snowboard";
|
|
4
3
|
constraints: number[];
|
|
5
4
|
noeudsExclus: number[];
|
|
6
5
|
niveauxExclus: string[];
|
|
7
6
|
};
|
|
8
|
-
export default function ParcoursEsf({ parcours, constraints, noeudsExclus, niveauxExclus, }: Props): JSX.Element;
|
|
7
|
+
export default function ParcoursEsf({ parcours, constraints, noeudsExclus, niveauxExclus, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
declare global {
|
|
10
9
|
interface Window {
|
|
11
10
|
EsfParcours: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parcours-esf.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/parcours-esf/parcours-esf.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"parcours-esf.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/parcours-esf/parcours-esf.tsx"],"names":[],"mappings":"AAOA,KAAK,KAAK,GAAG;IACX,QAAQ,EAAE,OAAO,GAAG,QAAQ,GAAG,WAAW,CAAC;IAC3C,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAClC,QAAQ,EACR,WAAgB,EAChB,YAAiB,EACjB,aAAkB,GACnB,EAAE,KAAK,2CA6CP;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,WAAW,EAAE,GAAG,CAAC;KAClB;CACF"}
|
|
@@ -29,7 +29,8 @@ export default function ParcoursEsf({ parcours, constraints = [], noeudsExclus =
|
|
|
29
29
|
};
|
|
30
30
|
Router.ready(() => {
|
|
31
31
|
Router.events.on("routeChangeComplete", () => {
|
|
32
|
-
|
|
32
|
+
setLoaded(false);
|
|
33
|
+
loadParcours();
|
|
33
34
|
});
|
|
34
35
|
});
|
|
35
36
|
return (_jsxs(_Fragment, { children: [!loaded && (_jsx("div", { className: css.loader, children: _jsx(Loader, {}) })), _jsx("div", { id: ID, className: css.parcours }), _jsx(Script, { src: "https://parcours-esf.msem.tech/static/js/widget-esf-parcours.js", onLoad: loadParcours })] }));
|