@propeller-commerce/propeller-v2-react-ui 0.15.1 → 0.15.3

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.js CHANGED
@@ -7795,6 +7795,12 @@ function CartSummary(rawProps) {
7795
7795
  function discountAmount() {
7796
7796
  return props.cart?.total?.discount || 0;
7797
7797
  }
7798
+ function hasTransactionCosts() {
7799
+ return (props.cart?.paymentData?.price || 0) > 0;
7800
+ }
7801
+ function transactionCosts() {
7802
+ return Number(props.cart?.paymentData?.price || 0);
7803
+ }
7798
7804
  function hasShippingCosts() {
7799
7805
  return (props.cart?.postageData?.price || 0) > 0;
7800
7806
  }
@@ -7869,6 +7875,10 @@ function CartSummary(rawProps) {
7869
7875
  formatItemPrice(discountAmount())
7870
7876
  ] })
7871
7877
  ] }) : null,
7878
+ hasTransactionCosts() ? /* @__PURE__ */ jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "transaction-costs", children: [
7879
+ /* @__PURE__ */ jsx("span", { className: "propeller-cart-summary__label", children: getLabel(props.labels, "transactionCosts", "Transaction costs:") }),
7880
+ /* @__PURE__ */ jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(transactionCosts()) })
7881
+ ] }) : null,
7872
7882
  showShippingCosts() && hasShippingCosts() ? /* @__PURE__ */ jsxs("div", { className: "propeller-cart-summary__row flex justify-between text-muted-foreground", "data-row": "shipping-costs", children: [
7873
7883
  /* @__PURE__ */ jsx("span", { className: "propeller-cart-summary__label", children: getLabel(props.labels, "shippingCosts", "Shipping costs:") }),
7874
7884
  /* @__PURE__ */ jsx("span", { className: "propeller-cart-summary__value", children: formatItemPrice(shippingCosts()) })
@@ -9368,7 +9378,10 @@ function GridFilters(rawProps) {
9368
9378
  return filter?.attributeDescription?.name || "";
9369
9379
  }
9370
9380
  function getFilterTitle(filter) {
9371
- return filter?.attributeDescription?.descriptions?.[0]?.value || filter?.attributeDescription?.name || "";
9381
+ const descriptions = filter?.attributeDescription?.descriptions;
9382
+ const lang = props.language?.toUpperCase();
9383
+ const match = lang ? descriptions?.find((d) => d?.language?.toUpperCase() === lang) : void 0;
9384
+ return match?.value || descriptions?.[0]?.value || filter?.attributeDescription?.name || "";
9372
9385
  }
9373
9386
  function getFilteredFilters() {
9374
9387
  const list = props.filters ?? [];