ublo-lib 1.40.9 → 1.40.11

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.
@@ -1 +1 @@
1
- {"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAsBA;;;;;;;;;;4CAqEC"}
1
+ {"version":3,"file":"cart-dialog.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/cart-dialog.js"],"names":[],"mappings":";AAuBA;;;;;;;;;;4CAyEC"}
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useUbloContext } from "ublo/with-ublo";
2
3
  import Dialog from "dt-design-system/es/dialog";
3
4
  import ESF from "./esf";
4
5
  import ESFCustom from "./esf-custom";
@@ -19,6 +20,8 @@ const products = {
19
20
  };
20
21
  const STAND_PRODUCTS = ["VAKARIO", "ELLOHA-ACTIVITY"];
21
22
  const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath, hasImage, hideSkiPassesStay, }) => {
23
+ const { lang, config } = useUbloContext();
24
+ const hasLangPrefix = langPrefix.links;
22
25
  if (!cart)
23
26
  return null;
24
27
  const { cart: cartContent, kind, data } = cart;
@@ -27,7 +30,9 @@ const CartDialog = ({ cart, setCart, shortcuts, paxPlan, facet, zoneId, zonePath
27
30
  if (!cartContent?.cart?.orders?.[convertedKind]?.[0]) {
28
31
  return null;
29
32
  }
30
- const cartUrl = shortcuts.cartItem.path;
33
+ const cartUrl = hasLangPrefix
34
+ ? `/${lang}${shortcuts.cartItem.path}`
35
+ : shortcuts.cartItem.path;
31
36
  const orders = cartContent.cart.orders[convertedKind];
32
37
  const { inscriptions } = orders[orders.length - 1];
33
38
  const newItem = inscriptions[inscriptions.length - 1];
@@ -1 +1 @@
1
- {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/message.js"],"names":[],"mappings":"AA4CA,iDAIC;AAED;;QAGC"}
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../src/common/components/cart-dialog/message.js"],"names":[],"mappings":"AA+DA,iDAIC;AAED;;QAGC"}
@@ -36,6 +36,24 @@ const locales = {
36
36
  person: "person",
37
37
  persons: "persons",
38
38
  },
39
+ es: {
40
+ "cart-dialog-lodging-title": "Su alojamiento",
41
+ "cart-dialog-ski-passes-title": "Sus forfaits",
42
+ "cart-dialog-esf-title": "Su curso de esquí",
43
+ "cart-dialog-ski-rental-title": "Su material",
44
+ "cart-dialog-product-title": "Su producto",
45
+ "cart-dialog-title-suffix-singular": "se ha añadido al carrito con éxito",
46
+ "cart-dialog-title-suffix-plural": "se han añadido al carrito con éxito",
47
+ "cart-dialog-continue": "Continuar en el sitio",
48
+ "cart-dialog-go-to-cart": "Finalizar mi pedido",
49
+ "search-filters-pax-plan-adult": "adulto",
50
+ "search-filters-pax-plan-adults": "adultos",
51
+ "search-filters-pax-plan-child": "niño",
52
+ "search-filters-pax-plan-children": "niños",
53
+ "cross-selling-offers-title": "<b>Nuestros servicios</b> que podrían interesarle",
54
+ person: "persona",
55
+ persons: "personas",
56
+ },
39
57
  };
40
58
  export function message(lang, id) {
41
59
  if (!locales || !locales[lang])
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ublo-lib",
3
- "version": "1.40.9",
3
+ "version": "1.40.11",
4
4
  "peerDependencies": {
5
5
  "dt-design-system": "^3.10.8",
6
6
  "leaflet": "^1.9.1",