ublo-lib 1.39.19 → 1.39.20
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/cart-dialog/cart-dialog-inner.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog-inner.js +2 -2
- package/es/common/components/cart-dialog/cart-dialog.d.ts +2 -1
- package/es/common/components/cart-dialog/cart-dialog.d.ts.map +1 -1
- package/es/common/components/cart-dialog/cart-dialog.js +2 -2
- package/es/common/components/cart-dialog/ski-passes.d.ts +2 -1
- package/es/common/components/cart-dialog/ski-passes.d.ts.map +1 -1
- package/es/common/components/cart-dialog/ski-passes.js +2 -2
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default CartDialogInner;
|
|
2
|
-
declare function CartDialogInner({ kind, title, image, thumbnail, price, label, contentTitle, paxPlan, closeDialog, goToCart, cart, zoneId, zonePath, }: {
|
|
2
|
+
declare function CartDialogInner({ kind, title, image, thumbnail, price, label, contentTitle, paxPlan, closeDialog, goToCart, cart, zoneId, zonePath, hideSkiPassesStay, }: {
|
|
3
3
|
kind: any;
|
|
4
4
|
title: any;
|
|
5
5
|
image: any;
|
|
@@ -13,5 +13,6 @@ declare function CartDialogInner({ kind, title, image, thumbnail, price, label,
|
|
|
13
13
|
cart: any;
|
|
14
14
|
zoneId: any;
|
|
15
15
|
zonePath: any;
|
|
16
|
+
hideSkiPassesStay: any;
|
|
16
17
|
}): import("react/jsx-runtime").JSX.Element;
|
|
17
18
|
//# sourceMappingURL=cart-dialog-inner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-dialog-inner.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog-inner.js"],"names":[],"mappings":";AAWA
|
|
1
|
+
{"version":3,"file":"cart-dialog-inner.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog-inner.js"],"names":[],"mappings":";AAWA;;;;;;;;;;;;;;;4CA0GC"}
|
|
@@ -9,7 +9,7 @@ import * as Icons from "dt-design-system/es/icons";
|
|
|
9
9
|
import { message } from "./message";
|
|
10
10
|
import CrossSellingOffers from "./cross-selling-offers";
|
|
11
11
|
import styles from "./cart-dialog-inner.module.css";
|
|
12
|
-
const CartDialogInner = ({ kind, title, image, thumbnail, price, label, contentTitle, paxPlan, closeDialog, goToCart, cart, zoneId, zonePath, }) => {
|
|
12
|
+
const CartDialogInner = ({ kind, title, image, thumbnail, price, label, contentTitle, paxPlan, closeDialog, goToCart, cart, zoneId, zonePath, hideSkiPassesStay, }) => {
|
|
13
13
|
const [stay, setStay] = React.useState({ from: "", to: "" });
|
|
14
14
|
const { lang, config } = useUbloContext();
|
|
15
15
|
const hasLangPrefix = config.langPrefix.links;
|
|
@@ -21,6 +21,6 @@ const CartDialogInner = ({ kind, title, image, thumbnail, price, label, contentT
|
|
|
21
21
|
const formattedStayFrom = new Date(stay.from).toLocaleDateString(lang, formatOptions);
|
|
22
22
|
const formattedStayTo = new Date(stay.to).toLocaleDateString(lang, formatOptions);
|
|
23
23
|
const buttonClasses = classNames(styles.contentButton, styles.contentButtonContinue);
|
|
24
|
-
return (_jsxs("div", { className: styles.inner, children: [_jsxs("div", { className: styles.title, children: [_jsx(Icons.CheckCircle, { className: styles.titleIcon }), _jsx("div", { className: styles.titleText, children: title })] }), _jsxs("div", { className: styles.content, children: [image && (_jsx("div", { className: styles.contentLeft, children: _jsx(Image, { className: styles.productImage, src: image, width: 320, height: 200, placeholder: thumbnail ? "blur" : undefined, blurDataURL: thumbnail, alt: "" }) })), _jsxs("div", { className: styles.contentRight, children: [_jsxs("div", { className: styles.wrapper, children: [label && (_jsx("div", { className: styles.contentLabel, dangerouslySetInnerHTML: { __html: label } })), price && _jsxs("div", { className: styles.price, children: [price, " \u20AC"] })] }), contentTitle && (_jsx("div", { className: styles.contentTitle, children: contentTitle })), _jsxs("div", { className: styles.stay, children: [formattedStayFrom, " \uA537 ", formattedStayTo] }), paxPlan && _jsx("div", { className: styles.paxPlan, children: paxPlan }), _jsxs("div", { className: styles.contentButtons, children: [_jsx(Button, { tag: Link, href: hasLangPrefix ? `/${lang}/` : "/", className: buttonClasses, variant: "secondary", onClick: closeDialog, children: message(lang, "cart-dialog-continue") }), _jsx(Button, { className: styles.contentButton, onClick: goToCart, children: message(lang, "cart-dialog-go-to-cart") })] })] })] }), kind && (_jsx(CrossSellingOffers, { kind: kind, cart: cart, closeDialog: closeDialog, zoneId: zoneId, zonePath: zonePath }))] }));
|
|
24
|
+
return (_jsxs("div", { className: styles.inner, children: [_jsxs("div", { className: styles.title, children: [_jsx(Icons.CheckCircle, { className: styles.titleIcon }), _jsx("div", { className: styles.titleText, children: title })] }), _jsxs("div", { className: styles.content, children: [image && (_jsx("div", { className: styles.contentLeft, children: _jsx(Image, { className: styles.productImage, src: image, width: 320, height: 200, placeholder: thumbnail ? "blur" : undefined, blurDataURL: thumbnail, alt: "" }) })), _jsxs("div", { className: styles.contentRight, children: [_jsxs("div", { className: styles.wrapper, children: [label && (_jsx("div", { className: styles.contentLabel, dangerouslySetInnerHTML: { __html: label } })), price && _jsxs("div", { className: styles.price, children: [price, " \u20AC"] })] }), contentTitle && (_jsx("div", { className: styles.contentTitle, children: contentTitle })), !hideSkiPassesStay && (_jsxs("div", { className: styles.stay, children: [formattedStayFrom, " \uA537 ", formattedStayTo] })), paxPlan && _jsx("div", { className: styles.paxPlan, children: paxPlan }), _jsxs("div", { className: styles.contentButtons, children: [_jsx(Button, { tag: Link, href: hasLangPrefix ? `/${lang}/` : "/", className: buttonClasses, variant: "secondary", onClick: closeDialog, children: message(lang, "cart-dialog-continue") }), _jsx(Button, { className: styles.contentButton, onClick: goToCart, children: message(lang, "cart-dialog-go-to-cart") })] })] })] }), kind && (_jsx(CrossSellingOffers, { kind: kind, cart: cart, closeDialog: closeDialog, zoneId: zoneId, zonePath: zonePath }))] }));
|
|
25
25
|
};
|
|
26
26
|
export default CartDialogInner;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default CartDialog;
|
|
2
|
-
declare function CartDialog({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, }: {
|
|
2
|
+
declare function CartDialog({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, hideSkiPassesStay, }: {
|
|
3
3
|
cart: any;
|
|
4
4
|
setCart: any;
|
|
5
5
|
shortcuts: any;
|
|
@@ -8,5 +8,6 @@ declare function CartDialog({ cart, setCart, shortcuts, paxPlan, facet, zoneId,
|
|
|
8
8
|
zoneId: any;
|
|
9
9
|
zonePath: any;
|
|
10
10
|
hasImage: any;
|
|
11
|
+
hideSkiPassesStay: any;
|
|
11
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=cart-dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAuBA
|
|
1
|
+
{"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAuBA;;;;;;;;;;4CAqEC"}
|
|
@@ -19,7 +19,7 @@ const products = {
|
|
|
19
19
|
VAKARIO: Vakario,
|
|
20
20
|
};
|
|
21
21
|
const STAND_PRODUCTS = ["VAKARIO", "ELLOHA-ACTIVITY"];
|
|
22
|
-
const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, }) => {
|
|
22
|
+
const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, hideSkiPassesStay, }) => {
|
|
23
23
|
if (!cart)
|
|
24
24
|
return null;
|
|
25
25
|
const { cart: cartContent, kind, data } = cart;
|
|
@@ -45,6 +45,6 @@ const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath
|
|
|
45
45
|
Router.push(cartUrl);
|
|
46
46
|
};
|
|
47
47
|
const Component = isSupported ? products[kind] : products.DEFAULT;
|
|
48
|
-
return (_jsx(Dialog, { className: styles.cartDialog, isOpened: Boolean(cart), close: closeDialogAndReload, closeButtonVariant: "link", children: _jsx(Component, { kind: kind, item: newItem, data: data, closeDialog: closeDialog, goToCart: goToCart, cart: cart, paxPlan: paxPlan, facet: facet, zoneId: zoneId, zonePath: zonePath, hasImage: hasImage }) }));
|
|
48
|
+
return (_jsx(Dialog, { className: styles.cartDialog, isOpened: Boolean(cart), close: closeDialogAndReload, closeButtonVariant: "link", children: _jsx(Component, { kind: kind, item: newItem, data: data, closeDialog: closeDialog, goToCart: goToCart, cart: cart, paxPlan: paxPlan, facet: facet, zoneId: zoneId, zonePath: zonePath, hasImage: hasImage, hideSkiPassesStay: hideSkiPassesStay }) }));
|
|
49
49
|
};
|
|
50
50
|
export default CartDialog;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default SkiPasses;
|
|
2
|
-
declare function SkiPasses({ item, facet, closeDialog, goToCart, cart, zoneId, zonePath, hasImage, }: {
|
|
2
|
+
declare function SkiPasses({ item, facet, closeDialog, goToCart, cart, zoneId, zonePath, hasImage, hideSkiPassesStay, }: {
|
|
3
3
|
item: any;
|
|
4
4
|
facet: any;
|
|
5
5
|
closeDialog: any;
|
|
@@ -8,5 +8,6 @@ declare function SkiPasses({ item, facet, closeDialog, goToCart, cart, zoneId, z
|
|
|
8
8
|
zoneId: any;
|
|
9
9
|
zonePath: any;
|
|
10
10
|
hasImage: any;
|
|
11
|
+
hideSkiPassesStay: any;
|
|
11
12
|
}): import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
//# sourceMappingURL=ski-passes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/ski-passes.js"],"names":[],"mappings":";AAUA
|
|
1
|
+
{"version":3,"file":"ski-passes.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/ski-passes.js"],"names":[],"mappings":";AAUA;;;;;;;;;;4CAiDC"}
|
|
@@ -8,7 +8,7 @@ const getGroupLabel = (lang, tickets) => {
|
|
|
8
8
|
return `1 ${message(lang, "person")}`;
|
|
9
9
|
return `${tickets.length} ${message(lang, "persons")}`;
|
|
10
10
|
};
|
|
11
|
-
const SkiPasses = ({ item, facet, closeDialog, goToCart, cart, zoneId, zonePath, hasImage, }) => {
|
|
11
|
+
const SkiPasses = ({ item, facet, closeDialog, goToCart, cart, zoneId, zonePath, hasImage, hideSkiPassesStay, }) => {
|
|
12
12
|
const { lang } = useUbloContext();
|
|
13
13
|
const { label, price, tickets } = item;
|
|
14
14
|
const kind = "ski-passes";
|
|
@@ -20,6 +20,6 @@ const SkiPasses = ({ item, facet, closeDialog, goToCart, cart, zoneId, zonePath,
|
|
|
20
20
|
const Title = () => {
|
|
21
21
|
return (_jsxs(_Fragment, { children: [_jsxs("b", { children: [message(lang, "cart-dialog-ski-passes-title"), " "] }), message(lang, "cart-dialog-title-suffix-plural")] }));
|
|
22
22
|
};
|
|
23
|
-
return (_jsx(CartDialogInner, { kind: kind, title: _jsx(Title, {}), image: image, price: price, contentTitle: label, paxPlan: formattedPaxPlan, closeDialog: closeDialog, goToCart: goToCart, cart: cart, facet: facet, zoneId: zoneId, zonePath: zonePath }));
|
|
23
|
+
return (_jsx(CartDialogInner, { kind: kind, title: _jsx(Title, {}), image: image, price: price, contentTitle: label, paxPlan: formattedPaxPlan, closeDialog: closeDialog, goToCart: goToCart, cart: cart, facet: facet, zoneId: zoneId, zonePath: zonePath, hideSkiPassesStay: hideSkiPassesStay }));
|
|
24
24
|
};
|
|
25
25
|
export default SkiPasses;
|