ublo-lib 1.43.4 → 1.44.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/@types/global.d.ts +9 -0
- package/es/@types/global.d.ts.map +1 -0
- package/es/@types/global.js +1 -0
- package/es/common/components/cart-dialog/cross-selling-offers.js +1 -1
- package/es/common/components/cookie-consent/cookie-consent.d.ts +2 -1
- package/es/common/components/cookie-consent/cookie-consent.d.ts.map +1 -1
- package/es/common/components/cross-selling-editor/cross-selling-editor.js +2 -2
- package/es/common/components/cross-selling-editor/hooks/use-custom-offers.js +1 -1
- package/es/common/components/cross-selling-editor/hooks/use-fetch.js +1 -1
- package/es/common/components/custom-contact-form/attachment.js +1 -1
- package/es/common/components/date-picker/data.d.ts.map +1 -1
- package/es/common/components/editable-calendar/data.d.ts.map +1 -1
- package/es/common/components/editable-calendar/index.d.ts +2 -1
- package/es/common/components/editable-calendar/index.d.ts.map +1 -1
- package/es/common/components/scroll-spy.d.ts.map +1 -1
- package/es/common/components/scroll-spy.js +1 -4
- package/es/common/components/scrolling-carousel/scrolling-carousel.d.ts.map +1 -1
- package/es/common/components/search-bar/hooks/use-constant.js +1 -1
- package/es/common/components/search-bar/utils/keyboard-keys.d.ts.map +1 -1
- package/es/common/components/week-selector/week-selector.d.ts.map +1 -1
- package/es/common/hooks/use-sticky.d.ts +1 -1
- package/es/common/hooks/use-sticky.d.ts.map +1 -1
- package/es/esf/components/booking-form/booking-form.js +1 -1
- package/es/esf/components/booking-form/summary.js +1 -1
- package/es/esf/components/instant-search/hooks/use-constant.js +1 -1
- package/es/esf/components/period-picker/period-picker.js +1 -1
- package/es/esf/components/period-picker/popup.d.ts +2 -1
- package/es/esf/components/period-picker/popup.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-passes.d.ts.map +1 -1
- package/es/future/components/msem-preset-editor/editors/ski-passes.js +11 -11
- package/es/lbm/components/instant-search/hooks/use-constant.js +1 -1
- package/es/market-place/components/instant-search/hooks/use-constant.js +1 -1
- package/package.json +12 -12
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../src/@types/global.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,IAAI,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,GAAG,CAAC;QACZ,KAAK,YAAY,GAAG,GAAG,CAAC,YAAY,CAAC;QACrC,KAAK,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;QAC3B,KAAK,iBAAiB,GAAG,GAAG,CAAC,iBAAiB,CAAC;KAChD;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,7 +7,7 @@ import * as Plausible from "../plausible";
|
|
|
7
7
|
import { message } from "./message";
|
|
8
8
|
import styles from "./cross-selling-offers.module.css";
|
|
9
9
|
const CrossSellingOffers = ({ kind, cart, closeDialog, zoneId, zonePath }) => {
|
|
10
|
-
const ref = React.useRef();
|
|
10
|
+
const ref = React.useRef(null);
|
|
11
11
|
const { lang, path } = useUbloContext();
|
|
12
12
|
const currentCart = cart.cart.cart;
|
|
13
13
|
const offers = useTunnelOffers(zoneId, zonePath, currentCart);
|
|
@@ -4,5 +4,6 @@ declare function CookieConsent({ lang, consent, updateConsent }: {
|
|
|
4
4
|
lang: any;
|
|
5
5
|
consent: any;
|
|
6
6
|
updateConsent: any;
|
|
7
|
-
}):
|
|
7
|
+
}): React.ReactPortal;
|
|
8
|
+
import * as React from "react";
|
|
8
9
|
//# sourceMappingURL=cookie-consent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-consent.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cookie-consent/cookie-consent.js"],"names":[],"mappings":"AAsGO,0CA6BN;;AArHD;;;;
|
|
1
|
+
{"version":3,"file":"cookie-consent.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cookie-consent/cookie-consent.js"],"names":[],"mappings":"AAsGO,0CA6BN;;AArHD;;;;sBAsFC;uBApGsB,OAAO"}
|
|
@@ -7,8 +7,8 @@ import * as Plausible from "../plausible";
|
|
|
7
7
|
import Editor from "./editor";
|
|
8
8
|
import styles from "./cross-selling-editor.module.css";
|
|
9
9
|
export default function CrossSellingEditor({ titleZoneProps = {}, contentZoneProps = {}, durations, className, tunnelOffersOrder, displayedTunnelOffers, children, }) {
|
|
10
|
-
const ref = React.useRef();
|
|
11
|
-
const titleRef = React.useRef();
|
|
10
|
+
const ref = React.useRef(null);
|
|
11
|
+
const titleRef = React.useRef(null);
|
|
12
12
|
const { cmsMode } = useUbloContext();
|
|
13
13
|
const sendPlausibleEvent = (e) => {
|
|
14
14
|
const container = e.target.closest("data-custom-offers");
|
|
@@ -5,7 +5,7 @@ import * as Utils from "../services/utils";
|
|
|
5
5
|
export default function useCustomOffers({ titleSelector, contentSelector, } = {}) {
|
|
6
6
|
const { lang, path } = useUbloContext();
|
|
7
7
|
const [offers, setOffers] = React.useState();
|
|
8
|
-
const controller = React.useRef();
|
|
8
|
+
const controller = React.useRef(undefined);
|
|
9
9
|
const getOffers = React.useCallback(async () => {
|
|
10
10
|
const titleZone = document.querySelector(titleSelector || "[data-title-zone]");
|
|
11
11
|
const contentZone = document.querySelector(contentSelector || "[data-content-zone]");
|
|
@@ -2,7 +2,7 @@ import * as React from "react";
|
|
|
2
2
|
export default function useFetch({ key, callback, ready = true, }) {
|
|
3
3
|
const [data, setData] = React.useState();
|
|
4
4
|
const [loading, setLoading] = React.useState(false);
|
|
5
|
-
const controller = React.useRef();
|
|
5
|
+
const controller = React.useRef(undefined);
|
|
6
6
|
React.useEffect(() => {
|
|
7
7
|
if (ready && data === undefined) {
|
|
8
8
|
const runEffect = async () => {
|
|
@@ -6,7 +6,7 @@ import * as Icons from "./icons";
|
|
|
6
6
|
import { convertToFileList } from "./utils";
|
|
7
7
|
import css from "./attachment.module.css";
|
|
8
8
|
export default function Attachment({ lang, name, label, settings, data, setData, }) {
|
|
9
|
-
const ref = React.useRef();
|
|
9
|
+
const ref = React.useRef(null);
|
|
10
10
|
const [dragging, setDragging] = React.useState(false);
|
|
11
11
|
const [error, setError] = React.useState(false);
|
|
12
12
|
const items = data?.attachment?.value || [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HpD
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/date-picker/data.js"],"names":[],"mappings":";;;;;;;;;;;AAaA,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2HpD,6BAA8B,CAAC,CAAC;AAEzB,kEAyCN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD
|
|
1
|
+
{"version":3,"file":"data.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/data.js"],"names":[],"mappings":"AA2FA,iEAmCC;AA5HD,+BAAkD;AAElD,gCAAoD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqFpD,6BAA8B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/index.js"],"names":[],"mappings":"AAOA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/components/editable-calendar/index.js"],"names":[],"mappings":"AAOA,gEAiDC;uBAxDsB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scroll-spy.d.ts","sourceRoot":"","sources":["../../../src/common/components/scroll-spy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;
|
|
1
|
+
{"version":3,"file":"scroll-spy.d.ts","sourceRoot":"","sources":["../../../src/common/components/scroll-spy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,KAAK,IAAI,CAAC;IAC/D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,WAAW,CAAC;IACxB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAAC;AAIF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAS,EACT,KAAK,EACL,GAAW,EACX,gBAAgB,EAChB,QAAQ,EACR,UAAuB,EACvB,SAAS,EACT,QAAQ,GACT,EAAE,KAAK,2CAqDP"}
|
|
@@ -38,9 +38,6 @@ export default function ScrollSpy({ className, items, Tag = "div", currentClassN
|
|
|
38
38
|
[props.className]: props.className,
|
|
39
39
|
[currentClassName]: current === i,
|
|
40
40
|
});
|
|
41
|
-
return React.cloneElement(child, {
|
|
42
|
-
...props,
|
|
43
|
-
className,
|
|
44
|
-
});
|
|
41
|
+
return React.cloneElement(child, { ...props, className });
|
|
45
42
|
}) }));
|
|
46
43
|
}
|
|
@@ -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;AAW/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,
|
|
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;AAW/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,2CA6HvE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"keyboard-keys.d.ts","sourceRoot":"","sources":["../../../../../src/common/components/search-bar/utils/keyboard-keys.js"],"names":[],"mappings":"AAAA,gBAAiB,EAAE,CAAC;AACpB,sBAAuB,EAAE,CAAC;AAC1B,wBAAyB,EAAE,CAAC;AAC5B,oBAAqB,EAAE,CAAC;AACxB,qBAAsB,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"week-selector.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/week-selector.tsx"],"names":[],"mappings":"AAWA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;CAC3C,CAAC;AAOF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,cAAc,EACd,OAAO,GACR,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"week-selector.d.ts","sourceRoot":"","sources":["../../../../src/common/components/week-selector/week-selector.tsx"],"names":[],"mappings":"AAWA,KAAK,KAAK,GAAG;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,OAAO,EAAE,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC;CAC3C,CAAC;AAOF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,WAAW,EACX,cAAc,EACd,OAAO,GACR,EAAE,KAAK,2CAqPP"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sticky.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-sticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,QAAA,MAAM,SAAS,
|
|
1
|
+
{"version":3,"file":"use-sticky.d.ts","sourceRoot":"","sources":["../../../src/common/hooks/use-sticky.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,QAAA,MAAM,SAAS,0CAsCd,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -10,7 +10,7 @@ const BookingFormWithSnackbar = (props) => {
|
|
|
10
10
|
return (_jsx(SnackbarProvider, { children: _jsx(BookingForm, { ...props }) }));
|
|
11
11
|
};
|
|
12
12
|
const BookingForm = ({ lang, resort, channel = "ESF", merchant, integration = false, uat = false, noInitialScroll, }) => {
|
|
13
|
-
const ref = React.useRef();
|
|
13
|
+
const ref = React.useRef(null);
|
|
14
14
|
const [fields, setFields] = React.useState(FIELDS);
|
|
15
15
|
const [step, setStep] = React.useState(STEPS.LESSONS);
|
|
16
16
|
const [lessons, setLessons] = React.useState([]);
|
|
@@ -18,7 +18,7 @@ const getChildren = (lang, key, type, label, value, isName, age) => {
|
|
|
18
18
|
return (_jsxs(_Fragment, { children: [_jsxs("span", { children: [label, " :"] }), " ", value] }));
|
|
19
19
|
};
|
|
20
20
|
const Summary = ({ lang, fields, lessons, personalData, setStep, config, clearForm, }) => {
|
|
21
|
-
const ref = React.useRef();
|
|
21
|
+
const ref = React.useRef(null);
|
|
22
22
|
const { groupLessons, data } = fields;
|
|
23
23
|
const { channel, resort, merchant, integration, uat } = config;
|
|
24
24
|
const previousStep = () => setStep(STEPS.PERSONAL_DATA);
|
|
@@ -19,7 +19,7 @@ const { start, end, forceSeasonSwitch = false, extend, } = publicRuntimeConfig.s
|
|
|
19
19
|
const WEEK_STORAGE = "stayWeek";
|
|
20
20
|
const EXTEND_STAY_PICKER_APPEARANCE_DELAY = 1000;
|
|
21
21
|
export default function PeriodPicker({ setClosed = undefined, force = false, onChange = undefined, ubloContext = {}, }) {
|
|
22
|
-
const ref = React.useRef();
|
|
22
|
+
const ref = React.useRef(null);
|
|
23
23
|
const { lang, cmsMode, metadata, path } = {
|
|
24
24
|
...ubloContext,
|
|
25
25
|
...useUbloContext(),
|
|
@@ -4,5 +4,6 @@ export default function Popup({ mustFilterSections, showDialog, opened, onChange
|
|
|
4
4
|
opened: any;
|
|
5
5
|
onChange: any;
|
|
6
6
|
selectAndClose: any;
|
|
7
|
-
}):
|
|
7
|
+
}): React.ReactPortal;
|
|
8
|
+
import * as React from "react";
|
|
8
9
|
//# sourceMappingURL=popup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/period-picker/popup.js"],"names":[],"mappings":"AAKA;;;;;;
|
|
1
|
+
{"version":3,"file":"popup.d.ts","sourceRoot":"","sources":["../../../../src/esf/components/period-picker/popup.js"],"names":[],"mappings":"AAKA;;;;;;sBA2BC;uBAhCsB,OAAO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/ski-passes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiFF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,eAAe,EACf,MAAM,EACN,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../../src/future/components/msem-preset-editor/editors/ski-passes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,IAAI,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;IACnC,SAAS,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;IAC5E,mBAAmB,EAAE,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC,CAAC;IACnE,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IACxD,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAiFF,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,eAAe,EACf,MAAM,EACN,SAAS,EACT,IAAI,EACJ,mBAAmB,EACnB,QAAQ,EACR,UAAU,EACV,WAAW,GACZ,EAAE,KAAK,2CA2UP"}
|
|
@@ -9,10 +9,10 @@ import NumberPicker from "dt-design-system/es/number-picker";
|
|
|
9
9
|
import Form from "../components/form";
|
|
10
10
|
import * as API from "../services/api";
|
|
11
11
|
import css from "./ski-passes.module.css";
|
|
12
|
-
const ALLOWED_FILTERS = ["domains", "durations", "
|
|
12
|
+
const ALLOWED_FILTERS = ["domains", "durations", "pax"];
|
|
13
13
|
const DEFAULT_DATA = {
|
|
14
14
|
firstSkiDate: "",
|
|
15
|
-
|
|
15
|
+
pax: [],
|
|
16
16
|
activities: [],
|
|
17
17
|
domains: [],
|
|
18
18
|
durations: [],
|
|
@@ -142,9 +142,9 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
|
|
|
142
142
|
updateField("domains")(value);
|
|
143
143
|
};
|
|
144
144
|
const updateSkiers = (code) => (value) => {
|
|
145
|
-
const filteredSkiers = data.
|
|
145
|
+
const filteredSkiers = data.pax.filter((skier) => skier !== code);
|
|
146
146
|
const newSkiers = !value ? [] : new Array(Number(value)).fill(code);
|
|
147
|
-
setData({ ...data,
|
|
147
|
+
setData({ ...data, pax: [...filteredSkiers, ...newSkiers] });
|
|
148
148
|
};
|
|
149
149
|
const updateMinimalistLiftScreen = (value) => {
|
|
150
150
|
setData({ ...data, minimalistLiftScreen: value });
|
|
@@ -193,7 +193,7 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
|
|
|
193
193
|
React.useEffect(() => {
|
|
194
194
|
setPreset((current = {}) => {
|
|
195
195
|
const firstSkiDate = data.firstSkiDate || undefined;
|
|
196
|
-
const
|
|
196
|
+
const pax = data.pax?.length ? data.pax : undefined;
|
|
197
197
|
const activities = data.activities?.length ? data.activities : undefined;
|
|
198
198
|
const domains = data.domains?.length ? data.domains : undefined;
|
|
199
199
|
const durations = data.durations?.length ? data.durations : undefined;
|
|
@@ -208,7 +208,7 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
|
|
|
208
208
|
};
|
|
209
209
|
const presets = {
|
|
210
210
|
...(current?.presets || {}),
|
|
211
|
-
|
|
211
|
+
pax,
|
|
212
212
|
firstSkiDate,
|
|
213
213
|
activities,
|
|
214
214
|
domains,
|
|
@@ -223,11 +223,11 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
|
|
|
223
223
|
testPreset,
|
|
224
224
|
cancelPreset,
|
|
225
225
|
confirmPreset: hasCatalog ? confirmPreset : undefined,
|
|
226
|
-
}, children: [_jsx("div", { className: css.title, children: "Options d'affichage" }), _jsx(MultipleSelect, { label: "Cacher", placeholder: "Selectionnez une ou plusieurs options", options: HIDE_OPTIONS, values: selectedHideOptions, onChange: updateField("hide") }), _jsx(Checkbox, { label: "Ecran de forfaits minimaliste", checked: data.minimalistLiftScreen, onCheckedChange: updateMinimalistLiftScreen }), _jsx("div", { className: css.title, children: "Preset" }), _jsx(Select, { label: "Catalogue", value: catalog, options: catalogs ? ["", ...catalogs] : [], onValueChange: setCatalog, loading: !isReady }), loading && _jsx(Loader, { className: css.loader }), hasCatalog && (_jsxs(_Fragment, { children: [_jsx(Input, { type: "date", label: "1er jour", value: data.firstSkiDate, onValueChange: updateFirstSkiDate, defaultMonth: firstSkiDateDefaultMonth, min: stay?.from || undefined, max: stay?.to || undefined }), filters?.
|
|
226
|
+
}, children: [_jsx("div", { className: css.title, children: "Options d'affichage" }), _jsx(MultipleSelect, { label: "Cacher", placeholder: "Selectionnez une ou plusieurs options", options: HIDE_OPTIONS, values: selectedHideOptions, onChange: updateField("hide") }), _jsx(Checkbox, { label: "Ecran de forfaits minimaliste", checked: data.minimalistLiftScreen, onCheckedChange: updateMinimalistLiftScreen }), _jsx("div", { className: css.title, children: "Preset" }), _jsx(Select, { label: "Catalogue", value: catalog, options: catalogs ? ["", ...catalogs] : [], onValueChange: setCatalog, loading: !isReady }), loading && _jsx(Loader, { className: css.loader }), hasCatalog && (_jsxs(_Fragment, { children: [_jsx(Input, { type: "date", label: "1er jour", value: data.firstSkiDate, onValueChange: updateFirstSkiDate, defaultMonth: firstSkiDateDefaultMonth, min: stay?.from || undefined, max: stay?.to || undefined }), filters?.pax && filters?.pax?.length > 1 && (_jsxs("div", { className: css.skiers, children: [_jsx("div", { className: css.label, children: "Skieurs" }), filters.pax.map((skier) => {
|
|
227
227
|
const { code, label, ageMin, ageMax } = skier;
|
|
228
228
|
const title = `${label} (de ${ageMin} à ${ageMax} ans)`;
|
|
229
|
-
const value = data.
|
|
230
|
-
|
|
229
|
+
const value = data.pax?.filter((skier) => skier === code)?.length ||
|
|
230
|
+
0;
|
|
231
231
|
return (_jsx(NumberPicker, { label: title, min: 0, max: 20, value: value, disabled: false, onChange: updateSkiers(code), withInput: true }, code));
|
|
232
232
|
})] })), _jsx("div", { className: css.label, children: "Filtres" }), (activities?.length > 0 || loading) && (_jsx(MultipleSelect, { label: "Activit\u00E9s", placeholder: "Selectionnez une ou plusieurs options", options: activities, values: selectedActivities, onChange: updateField("activities"), loading: loading })), _jsxs("div", { className: css.row, children: [((filteredDomains && filteredDomains.length > 0) || loading) && (_jsx(MultipleSelect, { label: "Domaines", placeholder: "Selectionnez une ou plusieurs options", options: filteredDomains || [], values: selectedDomains, onChange: updateDomains, loading: loading })), ((filteredDurations && filteredDurations?.length > 0) ||
|
|
233
233
|
loading) && (_jsx(MultipleSelect, { label: "Dur\u00E9es", placeholder: "Selectionnez une ou plusieurs options", options: filteredDurations || [], values: selectedDurations, onChange: updateField("durations"), loading: loading }))] })] }))] }));
|
|
@@ -235,10 +235,10 @@ export default function SkiPasses({ msemServicesUrl, preset, setPreset, stay, se
|
|
|
235
235
|
function getDefaultData(preset) {
|
|
236
236
|
if (!preset?.options && !preset?.presets)
|
|
237
237
|
return DEFAULT_DATA;
|
|
238
|
-
const {
|
|
238
|
+
const { pax, firstSkiDate, activities, domains, durations } = preset.presets || {};
|
|
239
239
|
const { hide, minimalistLiftScreen } = preset.options || {};
|
|
240
240
|
return {
|
|
241
|
-
|
|
241
|
+
pax: pax || DEFAULT_DATA.pax,
|
|
242
242
|
firstSkiDate: firstSkiDate || DEFAULT_DATA.firstSkiDate,
|
|
243
243
|
activities: activities || DEFAULT_DATA.activities,
|
|
244
244
|
domains: domains || DEFAULT_DATA.domains,
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ublo-lib",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.44.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"classnames": "^2.5.1",
|
|
6
|
-
"dt-design-system": "^3.
|
|
6
|
+
"dt-design-system": "^3.12.0",
|
|
7
7
|
"framer-motion": "^11.11.9",
|
|
8
8
|
"next": "^12.0.0 || ^13.0.0 || ^14.0.0 || ^15.0.0",
|
|
9
9
|
"react": "^18.2.0 || ^19.0.0",
|
|
@@ -22,23 +22,24 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/css-modules": "^1.0.5",
|
|
25
|
-
"@types/react": "^
|
|
26
|
-
"@types/react-dom": "^
|
|
25
|
+
"@types/react": "^19.0.1",
|
|
26
|
+
"@types/react-dom": "^19.0.1",
|
|
27
27
|
"@typescript-eslint/eslint-plugin": "^7.18.0",
|
|
28
28
|
"@typescript-eslint/parser": "^7.18.0",
|
|
29
29
|
"classnames": "^2.5.1",
|
|
30
30
|
"cpx2": "^7.0.2",
|
|
31
|
-
"dt-design-system": "^3.
|
|
31
|
+
"dt-design-system": "^3.12.0",
|
|
32
32
|
"eslint": "^8.57.1",
|
|
33
33
|
"eslint-plugin-react": "^7.37.2",
|
|
34
34
|
"eslint-plugin-react-hooks": "^4.6.2",
|
|
35
|
-
"framer-motion": "^11.
|
|
35
|
+
"framer-motion": "^11.13.1",
|
|
36
36
|
"mv": "^2.1.1",
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"react
|
|
40
|
-
"
|
|
41
|
-
"
|
|
37
|
+
"node-html-parser": "^6.1.13",
|
|
38
|
+
"next": "^14.2.20",
|
|
39
|
+
"react": "^19.0.0",
|
|
40
|
+
"react-dom": "^19.0.0",
|
|
41
|
+
"typescript": "^5.7.2",
|
|
42
|
+
"ublo": "^3.21.0"
|
|
42
43
|
},
|
|
43
44
|
"scripts": {
|
|
44
45
|
"clean": "rm -rf es",
|
|
@@ -48,7 +49,6 @@
|
|
|
48
49
|
"watch": "bun run clean && tsc --watch & cpx './src/**/*.{json,css,svg}' es -w",
|
|
49
50
|
"lint": "eslint --ext .ts,.tsx src/"
|
|
50
51
|
},
|
|
51
|
-
"packageManager": "yarn@1.22.18",
|
|
52
52
|
"files": [
|
|
53
53
|
"es"
|
|
54
54
|
],
|