@propeller-commerce/propeller-v2-vue-ui 0.3.27 → 0.3.28

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/CHANGELOG.md CHANGED
@@ -8,6 +8,16 @@ once it reaches 1.0. Until then (the `0.x` line) the public API may change
8
8
  between minor versions; breaking changes are called out below and in
9
9
  [MIGRATION.md](./MIGRATION.md).
10
10
 
11
+ ## [0.3.28] - 2026-07-10
12
+
13
+ ### Fixed
14
+
15
+ - `CartItem` / `AddToCart`: product, bundle, cluster-option, and crossupsell
16
+ names now resolve for the active `language` (via `getLanguageString`) instead
17
+ of always taking `names[0]`. Cart lines, the add-to-cart modal, and the
18
+ "added to cart" toast previously showed the first localised name regardless of
19
+ the cart/page language. Mirrors the React fix.
20
+
11
21
  ## [0.3.27] - 2026-07-10
12
22
 
13
23
  ### Added
package/dist/index.cjs CHANGED
@@ -4078,7 +4078,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
4078
4078
  toastVisible.value = false;
4079
4079
  }
4080
4080
  function getProductName() {
4081
- return props.product?.names?.[0]?.value || "Product";
4081
+ return index.getLanguageString(props.product?.names, props.language || "NL", "Product");
4082
4082
  }
4083
4083
  function getProductUrl() {
4084
4084
  return props.configuration?.urls?.getProductUrl(props.product, props.language) ?? "#";
@@ -4143,7 +4143,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
4143
4143
  }
4144
4144
  function getModalName() {
4145
4145
  if (addedCartItem.value) {
4146
- return addedCartItem.value.product?.names?.[0]?.value || getProductName();
4146
+ return index.getLanguageString(addedCartItem.value.product?.names, props.language || "NL", "") || getProductName();
4147
4147
  }
4148
4148
  return getProductName();
4149
4149
  }
@@ -4398,7 +4398,7 @@ const _sfc_main$R = /* @__PURE__ */ vue.defineComponent({
4398
4398
  key: idx,
4399
4399
  class: "propeller-add-to-cart__modal-child flex justify-between items-center text-xs text-muted-foreground"
4400
4400
  }, [
4401
- vue.createElementVNode("span", _hoisted_35$c, vue.toDisplayString(child.product?.names?.[0]?.value || "Option"), 1),
4401
+ vue.createElementVNode("span", _hoisted_35$c, vue.toDisplayString(vue.unref(index.getLanguageString)(child.product?.names, __props.language || "NL", "Option")), 1),
4402
4402
  vue.createElementVNode("span", _hoisted_36$c, vue.toDisplayString(getChildItemPrice(child)), 1)
4403
4403
  ]);
4404
4404
  }), 128))
@@ -6311,7 +6311,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
6311
6311
  return index.getLabel(props.labels, key, fallback);
6312
6312
  }
6313
6313
  function getProductName() {
6314
- return props.cartItem.product?.names?.[0]?.value || "Product";
6314
+ return index.getLanguageString(props.cartItem.product?.names, props.language || "NL", "Product");
6315
6315
  }
6316
6316
  function getProductUrl() {
6317
6317
  if (props.configuration?.urls && props.cartItem.product) {
@@ -6370,7 +6370,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
6370
6370
  if (!items) return "";
6371
6371
  const leader = items.find((bi) => bi.isLeader === propellerSdkV2.YesNo.Y);
6372
6372
  if (!leader) return "";
6373
- return leader.product.names?.[0]?.value || "Product";
6373
+ return index.getLanguageString(leader.product.names, props.language || "NL", "Product");
6374
6374
  }
6375
6375
  function getBundleLeaderPrice() {
6376
6376
  const items = props.cartItem.bundle?.items;
@@ -6387,7 +6387,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
6387
6387
  return items.filter((bi) => bi.isLeader !== propellerSdkV2.YesNo.Y);
6388
6388
  }
6389
6389
  function getBundleItemName(bundleItem) {
6390
- return bundleItem.product.names?.[0]?.value || "Product";
6390
+ return index.getLanguageString(bundleItem.product.names, props.language || "NL", "Product");
6391
6391
  }
6392
6392
  function getBundleItemPrice(bundleItem) {
6393
6393
  const price = bundleItem.price?.net;
@@ -6459,7 +6459,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
6459
6459
  }
6460
6460
  function getCrossupsellName(item) {
6461
6461
  const product = item?.productTo || item?.clusterTo;
6462
- return product?.names?.[0]?.value || "Product";
6462
+ return index.getLanguageString(product?.names, props.language || "NL", "Product");
6463
6463
  }
6464
6464
  function getCrossupsellImageUrl(item) {
6465
6465
  const product = item?.productTo || item?.clusterTo;
@@ -6638,7 +6638,7 @@ const _sfc_main$K = /* @__PURE__ */ vue.defineComponent({
6638
6638
  key: idx,
6639
6639
  class: "propeller-cart-item__option flex flex-wrap gap-x-2 text-sm text-muted-foreground"
6640
6640
  }, [
6641
- vue.createElementVNode("span", _hoisted_22$h, vue.toDisplayString(child.product.names?.[0]?.value || "Option"), 1),
6641
+ vue.createElementVNode("span", _hoisted_22$h, vue.toDisplayString(vue.unref(index.getLanguageString)(child.product.names, __props.language || "NL", "Option")), 1),
6642
6642
  _cache[10] || (_cache[10] = vue.createElementVNode("span", { class: "text-foreground-subtle hidden sm:inline" }, "-", -1)),
6643
6643
  vue.createElementVNode("span", _hoisted_23$h, vue.toDisplayString(child.product.sku), 1),
6644
6644
  _cache[11] || (_cache[11] = vue.createElementVNode("div", { class: "flex-1 border-b border-dotted border-input mx-1 mb-1" }, null, -1)),