@propeller-commerce/propeller-v2-react-ui 0.15.11 → 0.16.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/dist/index.d.cts CHANGED
@@ -4109,6 +4109,11 @@ interface ClusterOptionsProps {
4109
4109
  currency?: string;
4110
4110
  /** Authenticated user. Resolved from PropellerProvider when omitted. */
4111
4111
  user?: Contact | Customer | null;
4112
+ /**
4113
+ * Language used to resolve option and product names. Resolved from
4114
+ * PropellerProvider when omitted.
4115
+ */
4116
+ language?: string;
4112
4117
  /**
4113
4118
  * Portal access mode. In `'semi-closed'` option prices are omitted from the
4114
4119
  * dropdown labels and preview for anonymous visitors. Resolved from
@@ -4123,7 +4128,7 @@ interface ClusterOptionsProps {
4123
4128
  * with a preview of the chosen product. Surfaces validation errors for unset
4124
4129
  * required options when `showErrors` is enabled.
4125
4130
  */
4126
- declare function ClusterOptions(props: ClusterOptionsProps): React$1.JSX.Element;
4131
+ declare function ClusterOptions(rawProps: ClusterOptionsProps): React$1.JSX.Element;
4127
4132
 
4128
4133
  /**
4129
4134
  * @rsc-blocked — Client-only component: browser-only APIs (window/document/storage).
@@ -5184,6 +5189,16 @@ interface OrderItemCardProps {
5184
5189
  orderItem: OrderItem;
5185
5190
  /** Child order items (rendered as indented sub-rows beneath the parent) */
5186
5191
  childItems?: OrderItem[];
5192
+ /**
5193
+ * Language used to resolve localized product names and the slugs in the
5194
+ * item's PDP link. Defaults to the catalog's default language.
5195
+ *
5196
+ * This component is RSC-safe (no hooks, no context), so the host has to pass
5197
+ * it — there is nothing to read it from. Without it a non-default storefront
5198
+ * renders default-language names and, worse, default-language slugs in the
5199
+ * links (PWP-940).
5200
+ */
5201
+ language?: string;
5187
5202
  /** Should the item title be a link to the PDP */
5188
5203
  titleLinkable?: boolean;
5189
5204
  /** Display a small thumbnail of the order item */
package/dist/index.d.ts CHANGED
@@ -4109,6 +4109,11 @@ interface ClusterOptionsProps {
4109
4109
  currency?: string;
4110
4110
  /** Authenticated user. Resolved from PropellerProvider when omitted. */
4111
4111
  user?: Contact | Customer | null;
4112
+ /**
4113
+ * Language used to resolve option and product names. Resolved from
4114
+ * PropellerProvider when omitted.
4115
+ */
4116
+ language?: string;
4112
4117
  /**
4113
4118
  * Portal access mode. In `'semi-closed'` option prices are omitted from the
4114
4119
  * dropdown labels and preview for anonymous visitors. Resolved from
@@ -4123,7 +4128,7 @@ interface ClusterOptionsProps {
4123
4128
  * with a preview of the chosen product. Surfaces validation errors for unset
4124
4129
  * required options when `showErrors` is enabled.
4125
4130
  */
4126
- declare function ClusterOptions(props: ClusterOptionsProps): React$1.JSX.Element;
4131
+ declare function ClusterOptions(rawProps: ClusterOptionsProps): React$1.JSX.Element;
4127
4132
 
4128
4133
  /**
4129
4134
  * @rsc-blocked — Client-only component: browser-only APIs (window/document/storage).
@@ -5184,6 +5189,16 @@ interface OrderItemCardProps {
5184
5189
  orderItem: OrderItem;
5185
5190
  /** Child order items (rendered as indented sub-rows beneath the parent) */
5186
5191
  childItems?: OrderItem[];
5192
+ /**
5193
+ * Language used to resolve localized product names and the slugs in the
5194
+ * item's PDP link. Defaults to the catalog's default language.
5195
+ *
5196
+ * This component is RSC-safe (no hooks, no context), so the host has to pass
5197
+ * it — there is nothing to read it from. Without it a non-default storefront
5198
+ * renders default-language names and, worse, default-language slugs in the
5199
+ * links (PWP-940).
5200
+ */
5201
+ language?: string;
5187
5202
  /** Should the item title be a link to the PDP */
5188
5203
  titleLinkable?: boolean;
5189
5204
  /** Display a small thumbnail of the order item */
package/dist/index.js CHANGED
@@ -718,7 +718,8 @@ function useCart(options) {
718
718
  const { graphqlClient, user, companyId, configuration, onCartCreated } = options;
719
719
  const language = options.language || configuration?.language || "NL";
720
720
  const [cart, setCart] = useState(null);
721
- const [cartId, setCartId] = useState(options.cartId || "");
721
+ const [createdCartId, setCreatedCartId] = useState("");
722
+ const cartId = options.cartId || createdCartId;
722
723
  const [loading, setLoading] = useState(false);
723
724
  const [error, setError] = useState(null);
724
725
  const notesTimers = useRef({});
@@ -754,13 +755,13 @@ function useCart(options) {
754
755
  imageVariantFilters: configuration?.imageVariantFiltersSmall,
755
756
  onCartCreated: (c) => {
756
757
  setCart(c);
757
- setCartId(c.cartId);
758
+ setCreatedCartId(c.cartId);
758
759
  onCartCreated?.(c);
759
760
  }
760
761
  };
761
762
  const resolved = await initCart(config);
762
763
  setCart(resolved);
763
- setCartId(resolved.cartId);
764
+ setCreatedCartId(resolved.cartId);
764
765
  return resolved;
765
766
  }, [graphqlClient, user, companyId, language, configuration, onCartCreated]);
766
767
  const addItem = useCallback(async (opts) => {
@@ -775,7 +776,7 @@ function useCart(options) {
775
776
  if (opts.onAddToCart) {
776
777
  const resultCart2 = opts.onAddToCart(opts.product, opts.cluster?.clusterId, opts.quantity, childItemInputs, opts.notes, opts.price);
777
778
  setCart(resultCart2);
778
- setCartId(resultCart2.cartId);
779
+ setCreatedCartId(resultCart2.cartId);
779
780
  const addedItem2 = resultCart2.items?.find((i) => i.productId === opts.product.productId) ?? null;
780
781
  opts.afterAddToCart?.(resultCart2, addedItem2);
781
782
  return ok({ cart: resultCart2, item: addedItem2 });
@@ -796,7 +797,7 @@ function useCart(options) {
796
797
  imageVariantFilters: configuration?.imageVariantFiltersSmall
797
798
  });
798
799
  setCart(resultCart);
799
- setCartId(resultCart.cartId);
800
+ setCreatedCartId(resultCart.cartId);
800
801
  const addedItem = resultCart.items?.find((i) => i.productId === opts.product.productId) ?? null;
801
802
  opts.afterAddToCart?.(resultCart, addedItem);
802
803
  return ok({ cart: resultCart, item: addedItem });
@@ -10795,8 +10796,8 @@ var ClusterInfo_default = ClusterInfo;
10795
10796
  function formatPrice9(price, currency) {
10796
10797
  return formatPrice(price, { symbol: currency });
10797
10798
  }
10798
- function getProductName2(product) {
10799
- return product.names?.[0]?.value || `Product ${product.productId}`;
10799
+ function getProductName2(product, language) {
10800
+ return getLocalizedValue(product.names, language, `Product ${product.productId}`);
10800
10801
  }
10801
10802
  function getProductImageUrl4(product) {
10802
10803
  const media = product.media;
@@ -10806,9 +10807,11 @@ function getProductImageUrl4(product) {
10806
10807
  }
10807
10808
  return "";
10808
10809
  }
10809
- function ClusterOptions(props) {
10810
+ function ClusterOptions(rawProps) {
10811
+ const props = useInfraProps(rawProps);
10810
10812
  const [selectedProductIds, setSelectedProductIds] = useState({});
10811
10813
  function getOptionsForRender() {
10814
+ const language = props.language;
10812
10815
  const options = props.options || [];
10813
10816
  const sel = selectedProductIds;
10814
10817
  const hidePrices = isContentHidden(props.portalMode, props.user);
@@ -10818,7 +10821,7 @@ function ClusterOptions(props) {
10818
10821
  const products = (option.products || []).map((p) => ({
10819
10822
  productId: p.productId,
10820
10823
  productIdStr: p.productId.toString(),
10821
- label: hidePrices ? getProductName2(p) : `${getProductName2(p)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
10824
+ label: hidePrices ? getProductName2(p, language) : `${getProductName2(p, language)} \u2014 ${formatPrice9(p.price?.gross || 0, props.currency ?? "\u20AC")}`
10822
10825
  }));
10823
10826
  let previewImageUrl = "";
10824
10827
  let previewName = "";
@@ -10829,7 +10832,7 @@ function ClusterOptions(props) {
10829
10832
  );
10830
10833
  if (selectedProduct) {
10831
10834
  previewImageUrl = getProductImageUrl4(selectedProduct);
10832
- previewName = getProductName2(selectedProduct);
10835
+ previewName = getProductName2(selectedProduct, language);
10833
10836
  previewPrice = hidePrices ? "" : formatPrice9(selectedProduct.price?.gross || 0, props.currency ?? "\u20AC");
10834
10837
  }
10835
10838
  }
@@ -10837,7 +10840,7 @@ function ClusterOptions(props) {
10837
10840
  return {
10838
10841
  id: option.id,
10839
10842
  idStr,
10840
- name: option.names?.[0]?.value || `Option ${option.id}`,
10843
+ name: getLocalizedValue(option.names, language, `Option ${option.id}`),
10841
10844
  isRequired,
10842
10845
  selectedProductId,
10843
10846
  hasSelection: !!selectedProductId,
@@ -11305,7 +11308,8 @@ function FavoriteListItem(rawProps) {
11305
11308
  const isProduct = "productId" in props.item;
11306
11309
  const product = props.item;
11307
11310
  const cluster = props.item;
11308
- const name = isProduct ? product?.names?.[0]?.value || "Product" : cluster?.names?.[0]?.value || cluster?.defaultProduct?.names?.[0]?.value || "Cluster";
11311
+ const nameLanguage = props.language;
11312
+ const name = isProduct ? getLocalizedValue(product?.names, nameLanguage, "Product") : getLocalizedValue(cluster?.names, nameLanguage, "") || getLocalizedValue(cluster?.defaultProduct?.names, nameLanguage, "Cluster");
11309
11313
  const sku = isProduct ? product?.sku || "" : cluster?.sku || cluster?.defaultProduct?.sku || "";
11310
11314
  const imageUrl = isProduct ? product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "" : cluster?.defaultProduct?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
11311
11315
  const itemUrl = isProduct ? props.configuration?.urls?.getProductUrl?.(props.item) || "" : props.configuration?.urls?.getClusterUrl?.(props.item) || "";
@@ -11739,9 +11743,10 @@ function FavoriteListDetails(rawProps) {
11739
11743
  }
11740
11744
  }
11741
11745
  function getSearchItemName(item) {
11742
- if ("productId" in item) return item.names?.[0]?.value || "Product";
11746
+ const language = props.language;
11747
+ if ("productId" in item) return getLocalizedValue(item.names, language, "Product");
11743
11748
  const cluster = item;
11744
- return cluster.names?.[0]?.value || cluster.defaultProduct?.names?.[0]?.value || "Cluster";
11749
+ return getLocalizedValue(cluster.names, language, "") || getLocalizedValue(cluster.defaultProduct?.names, language, "Cluster");
11745
11750
  }
11746
11751
  function getSearchItemSku(item) {
11747
11752
  if ("productId" in item) return item.sku || "";
@@ -11984,7 +11989,7 @@ function FavoriteListDetails(rawProps) {
11984
11989
  type: "button",
11985
11990
  className: "propeller-favorite-list-details__add-btn inline-flex items-center justify-center rounded-control bg-secondary px-4 py-2 text-sm font-medium text-secondary-foreground transition-colors hover:bg-secondary/90",
11986
11991
  onClick: () => setShowAddModal(true),
11987
- children: getLabel(props.labels, "addProductDirectly", "Add product directly to this wishlist")
11992
+ children: getLabel(props.labels, "addProductDirectly", "Add product to favorite list")
11988
11993
  }
11989
11994
  ) }),
11990
11995
  allItems.length === 0 ? /* @__PURE__ */ jsxs("div", { className: "propeller-favorite-list-details__empty border border-border rounded-container p-12 text-center space-y-4", children: [
@@ -12860,8 +12865,8 @@ function GridTitleWithProvider(rawProps) {
12860
12865
  return /* @__PURE__ */ jsx(GridTitle_default, { ...props });
12861
12866
  }
12862
12867
  var GridTitleWithProvider_default = GridTitleWithProvider;
12863
- function getItemName(item) {
12864
- return item.product?.names?.[0]?.value || "Product";
12868
+ function getItemName(item, language) {
12869
+ return getLocalizedValue(item.product?.names, language, "Product");
12865
12870
  }
12866
12871
  function getItemImageUrl(item) {
12867
12872
  const url = item.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url;
@@ -12882,6 +12887,7 @@ function getBundleNonLeaders(item) {
12882
12887
  }
12883
12888
  function ItemsOverview(rawProps) {
12884
12889
  const props = useInfraProps(rawProps);
12890
+ const language = props.language;
12885
12891
  const useTax = !!props.includeTax;
12886
12892
  const containerClass = props.itemsOverviewContainerClass || "cart-items-overview";
12887
12893
  const itemNameClickable = props.itemNameClickable !== void 0 ? props.itemNameClickable : true;
@@ -12943,7 +12949,7 @@ function ItemsOverview(rawProps) {
12943
12949
  {
12944
12950
  className: "propeller-items-overview__item-image w-full h-full object-contain p-1.5",
12945
12951
  src: getItemImageUrl(item),
12946
- alt: getItemName(item)
12952
+ alt: getItemName(item, language)
12947
12953
  }
12948
12954
  ) : /* @__PURE__ */ jsx(
12949
12955
  "svg",
@@ -12971,7 +12977,7 @@ function ItemsOverview(rawProps) {
12971
12977
  ] }),
12972
12978
  /* @__PURE__ */ jsxs("div", { className: "propeller-items-overview__item-bundle mt-1.5 space-y-1 border-l-2 border-secondary/10 pl-2", children: [
12973
12979
  leader ? /* @__PURE__ */ jsxs("div", { className: "propeller-items-overview__item-bundle-leader flex justify-between items-center text-xs", children: [
12974
- /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: leader.product.names?.[0]?.value || "Product" }),
12980
+ /* @__PURE__ */ jsx("span", { className: "font-medium text-foreground", children: getLocalizedValue(leader.product.names, language, "Product") }),
12975
12981
  money(bundlePrice(leader.price)) ? /* @__PURE__ */ jsx("span", { className: "text-muted-foreground whitespace-nowrap ml-2", children: money(bundlePrice(leader.price)) }) : null
12976
12982
  ] }) : null,
12977
12983
  getBundleNonLeaders(item).map((bundleItem, idx) => /* @__PURE__ */ jsxs(
@@ -12979,7 +12985,7 @@ function ItemsOverview(rawProps) {
12979
12985
  {
12980
12986
  className: "propeller-items-overview__item-bundle-item flex justify-between items-center text-xs text-muted-foreground",
12981
12987
  children: [
12982
- /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: bundleItem.product?.names?.[0]?.value || "Product" }),
12988
+ /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: getLocalizedValue(bundleItem.product?.names, language, "Product") }),
12983
12989
  money(bundlePrice(bundleItem.price)) ? /* @__PURE__ */ jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: money(bundlePrice(bundleItem.price)) }) : null
12984
12990
  ]
12985
12991
  },
@@ -13000,9 +13006,9 @@ function ItemsOverview(rawProps) {
13000
13006
  {
13001
13007
  className: "propeller-items-overview__item-title font-medium text-sm leading-tight cursor-pointer hover:text-secondary transition-colors line-clamp-2",
13002
13008
  onClick: () => handleItemNameClick(item),
13003
- children: getItemName(item)
13009
+ children: getItemName(item, language)
13004
13010
  }
13005
- ) : /* @__PURE__ */ jsx("p", { className: "propeller-items-overview__item-title font-medium text-sm leading-tight line-clamp-2", children: getItemName(item) }),
13011
+ ) : /* @__PURE__ */ jsx("p", { className: "propeller-items-overview__item-title font-medium text-sm leading-tight line-clamp-2", children: getItemName(item, language) }),
13006
13012
  showPrice ? /* @__PURE__ */ jsx("span", { className: "propeller-items-overview__item-price font-semibold text-sm text-foreground whitespace-nowrap", children: formatItemPrice(lineTotal(item)) }) : null
13007
13013
  ] }),
13008
13014
  showSku && itemSku ? /* @__PURE__ */ jsxs("p", { className: "propeller-items-overview__item-sku text-xs text-muted-foreground mt-0.5", children: [
@@ -13018,7 +13024,7 @@ function ItemsOverview(rawProps) {
13018
13024
  {
13019
13025
  className: "propeller-items-overview__item-option flex justify-between items-center text-xs text-muted-foreground",
13020
13026
  children: [
13021
- /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: child.product?.names?.[0]?.value || "Option" }),
13027
+ /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: getLocalizedValue(child.product?.names, language, "Option") }),
13022
13028
  /* @__PURE__ */ jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: formatItemPrice(lineTotal(child)) })
13023
13029
  ]
13024
13030
  },
@@ -13496,22 +13502,22 @@ function OrderActions(rawProps) {
13496
13502
  );
13497
13503
  }
13498
13504
  var OrderActions_default = OrderActions;
13499
- function getProductName3(orderItem) {
13500
- return orderItem?.product?.names?.[0]?.value || orderItem?.name || "Unknown Product";
13505
+ function getProductName3(orderItem, language) {
13506
+ return getLocalizedValue(orderItem?.product?.names, language, "") || orderItem?.name || "Unknown Product";
13501
13507
  }
13502
- function getClusterUrl(orderItem) {
13508
+ function getClusterUrl(orderItem, language) {
13503
13509
  const cluster = orderItem?.product?.cluster;
13504
13510
  if (!cluster) return "";
13505
13511
  const id = cluster.clusterId;
13506
- const slug = cluster.slugs?.[0]?.value || "";
13512
+ const slug = getLocalizedValue(cluster.slugs, language, "");
13507
13513
  if (!id || !slug) return "";
13508
13514
  return `/cluster/${id}/${slug}`;
13509
13515
  }
13510
- function getProductUrl(orderItem) {
13511
- const cu = getClusterUrl(orderItem);
13516
+ function getProductUrl(orderItem, language) {
13517
+ const cu = getClusterUrl(orderItem, language);
13512
13518
  if (cu) return cu;
13513
13519
  const id = orderItem?.product?.productId;
13514
- const slug = orderItem?.product?.slugs?.[0]?.value || "";
13520
+ const slug = getLocalizedValue(orderItem?.product?.slugs, language, "");
13515
13521
  if (id && slug) return `/product/${id}/${slug}`;
13516
13522
  return "";
13517
13523
  }
@@ -13526,10 +13532,10 @@ function OrderItemCard(props) {
13526
13532
  const showDiscount = props.showDiscount !== void 0 ? props.showDiscount : false;
13527
13533
  const showStockComponent = props.showStockComponent !== void 0 ? props.showStockComponent : false;
13528
13534
  const showItemNotes = props.showItemNotes !== void 0 ? props.showItemNotes : false;
13529
- const productName = getProductName3(item);
13535
+ const productName = getProductName3(item, props.language);
13530
13536
  const productSku = item?.product?.sku || item?.sku || "";
13531
13537
  const productImage = item?.product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
13532
- const productUrl = getProductUrl(item);
13538
+ const productUrl = getProductUrl(item, props.language);
13533
13539
  const quantity = item?.quantity || 0;
13534
13540
  const priceTotal = item?.priceTotal || 0;
13535
13541
  const discount = item?.discount || 0;
@@ -13644,7 +13650,7 @@ function OrderItemCard(props) {
13644
13650
  className: "propeller-order-item-card__child-row border-0",
13645
13651
  "data-child": "true",
13646
13652
  children: [
13647
- /* @__PURE__ */ jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--product px-6 py-2 pl-28", children: /* @__PURE__ */ jsx("span", { className: "propeller-order-item-card__child-title text-sm text-muted-foreground", children: child.product?.names?.[0]?.value || child.name || "Unknown" }) }),
13653
+ /* @__PURE__ */ jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--product px-6 py-2 pl-28", children: /* @__PURE__ */ jsx("span", { className: "propeller-order-item-card__child-title text-sm text-muted-foreground", children: getLocalizedValue(child.product?.names, props.language, "") || child.name || "Unknown" }) }),
13648
13654
  showQuantity ? /* @__PURE__ */ jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--quantity px-6 py-2 text-center text-sm text-muted-foreground", children: child.quantity || 0 }) : null,
13649
13655
  showDiscount ? /* @__PURE__ */ jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--discount px-6 py-2 text-right text-sm text-muted-foreground" }) : null,
13650
13656
  showPrice ? /* @__PURE__ */ jsx("td", { className: "propeller-order-item-card__cell propeller-order-item-card__cell--price px-6 py-2 text-right whitespace-nowrap text-sm text-muted-foreground", children: formatItemPrice(child.priceTotal || 0) }) : null
@@ -13668,7 +13674,8 @@ function OrderBonusItems(rawProps) {
13668
13674
  {
13669
13675
  orderItem: item,
13670
13676
  titleLinkable: false,
13671
- currency: props.currency
13677
+ currency: props.currency,
13678
+ language: props.language
13672
13679
  },
13673
13680
  item.id
13674
13681
  )) }) })
@@ -15039,11 +15046,12 @@ function getItemPrice(item, includeTax) {
15039
15046
  function getProductImage(product) {
15040
15047
  return product?.media?.images?.items?.[0]?.imageVariants?.[0]?.url || "";
15041
15048
  }
15042
- function getProductName4(product) {
15043
- return product?.names?.[0]?.value || "";
15049
+ function getProductName4(product, language) {
15050
+ return getLocalizedValue(product?.names, language, "");
15044
15051
  }
15045
15052
  function ProductBundles(rawProps) {
15046
15053
  const props = useInfraProps(rawProps);
15054
+ const language = props.language;
15047
15055
  const currencySymbol = props.currency ?? "\u20AC";
15048
15056
  const money = (value) => formatPrice(value, { symbol: currencySymbol });
15049
15057
  const [isMounted, setIsMounted] = useState(false);
@@ -15182,10 +15190,10 @@ function ProductBundles(rawProps) {
15182
15190
  {
15183
15191
  className: "propeller-product-bundles__item-image w-full h-full object-contain p-2",
15184
15192
  src: getProductImage(item.product),
15185
- alt: getProductName4(item.product)
15193
+ alt: getProductName4(item.product, language)
15186
15194
  }
15187
15195
  ) : null }),
15188
- /* @__PURE__ */ jsx("div", { className: "propeller-product-bundles__item-name text-sm font-medium text-muted-foreground leading-tight mb-1", children: getProductName4(item.product) || "Product " + item.productId }),
15196
+ /* @__PURE__ */ jsx("div", { className: "propeller-product-bundles__item-name text-sm font-medium text-muted-foreground leading-tight mb-1", children: getProductName4(item.product, language) || "Product " + item.productId }),
15189
15197
  !hidePrices && item.price ? /* @__PURE__ */ jsxs("div", { className: "propeller-product-bundles__item-price text-sm font-semibold text-foreground", children: [
15190
15198
  money(getItemPrice(item, includeTax)),
15191
15199
  /* @__PURE__ */ jsx("span", { className: "text-xs font-normal text-muted-foreground ml-1", children: includeTax ? getLabel(props.labels, "inclTax", "incl. VAT") : getLabel(props.labels, "exclTax", "excl. VAT") })
@@ -15385,7 +15393,7 @@ function ProductBundles(rawProps) {
15385
15393
  {
15386
15394
  className: "propeller-product-bundles__modal-child flex justify-between items-center text-xs text-muted-foreground",
15387
15395
  children: [
15388
- /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: getProductName4(item.product) || "Product" }),
15396
+ /* @__PURE__ */ jsx("span", { className: "line-clamp-1", children: getProductName4(item.product, language) || "Product" }),
15389
15397
  !hidePrices && item.price ? /* @__PURE__ */ jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: money(getItemPrice(item, includeTax)) }) : null
15390
15398
  ]
15391
15399
  },
@@ -18600,7 +18608,7 @@ function mapToSearchBarResult(item, language) {
18600
18608
  const isCluster = "clusterId" in item;
18601
18609
  const displayItem = isCluster ? item.defaultProduct : item;
18602
18610
  const id = isCluster ? item.clusterId : item.productId;
18603
- const slug = item.slugs?.[0]?.value || "";
18611
+ const slug = getLocalizedValue(item.slugs, language, "");
18604
18612
  const url = isCluster ? "/cluster/" + id + "/" + slug : "/product/" + id + "/" + slug;
18605
18613
  const priceNet = displayItem?.price?.net || 0;
18606
18614
  const priceGross = displayItem?.price?.gross || 0;