@propeller-commerce/propeller-v2-react-ui 0.4.18 → 0.4.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/CHANGELOG.md +19 -0
- package/dist/index.cjs +8 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9 -9
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,25 @@ 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.4.20] - 2026-07-16
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `CartSummary`: the panel title now resolves through the `labels` map
|
|
16
|
+
(`labels.title`) instead of only the `title` prop, so the "Order summary"
|
|
17
|
+
heading is translatable like every other label. Falls back to `props.title`,
|
|
18
|
+
then `labels.title`, then `'Order summary'`.
|
|
19
|
+
|
|
20
|
+
## [0.4.19] - 2026-07-10
|
|
21
|
+
|
|
22
|
+
### Fixed
|
|
23
|
+
|
|
24
|
+
- `CartItem` / `AddToCart`: product, bundle, cluster-option, and crossupsell
|
|
25
|
+
names now resolve for the active `language` (via `getLocalizedValue`) instead
|
|
26
|
+
of always taking `names[0]`. Cart lines, the add-to-cart modal, and the
|
|
27
|
+
"added to cart" toast previously showed the first localised name regardless of
|
|
28
|
+
the cart/page language.
|
|
29
|
+
|
|
11
30
|
## [0.4.18] - 2026-07-10
|
|
12
31
|
|
|
13
32
|
### Added
|
package/dist/index.cjs
CHANGED
|
@@ -3954,7 +3954,7 @@ function AddToCart(rawProps) {
|
|
|
3954
3954
|
}
|
|
3955
3955
|
function getModalName() {
|
|
3956
3956
|
if (addedCartItem) {
|
|
3957
|
-
return addedCartItem.product?.names
|
|
3957
|
+
return propellerV2CoreUi.getLocalizedValue(addedCartItem.product?.names, props.language, "") || propellerV2CoreUi.getLocalizedValue(props.product?.names, props.language, "Product");
|
|
3958
3958
|
}
|
|
3959
3959
|
return propellerV2CoreUi.getLocalizedValue(props.product?.names, props.language, "Product");
|
|
3960
3960
|
}
|
|
@@ -4307,7 +4307,7 @@ function AddToCart(rawProps) {
|
|
|
4307
4307
|
{
|
|
4308
4308
|
className: "propeller-add-to-cart__modal-child flex justify-between items-center text-xs text-muted-foreground",
|
|
4309
4309
|
children: [
|
|
4310
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: child.product?.names
|
|
4310
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: propellerV2CoreUi.getLocalizedValue(child.product?.names, props.language, "Option") }),
|
|
4311
4311
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: propellerV2CoreUi.formatPrice(
|
|
4312
4312
|
((props.includeTax !== void 0 ? !!props.includeTax : includeTax) ? child.totalSumNet : child.totalSum) ?? 0,
|
|
4313
4313
|
{ symbol: props.currency ?? "\u20AC" }
|
|
@@ -6060,7 +6060,7 @@ function CartItem(rawProps) {
|
|
|
6060
6060
|
const minQuantity = getMinQuantity(props.cartItem.product);
|
|
6061
6061
|
const step = getStep(props.cartItem.product);
|
|
6062
6062
|
function getProductName5() {
|
|
6063
|
-
return props.cartItem.product?.names
|
|
6063
|
+
return propellerV2CoreUi.getLocalizedValue(props.cartItem.product?.names, props.language, "Product");
|
|
6064
6064
|
}
|
|
6065
6065
|
function getProductUrl2() {
|
|
6066
6066
|
if (props.configuration?.urls && props.cartItem.product) {
|
|
@@ -6111,7 +6111,7 @@ function CartItem(rawProps) {
|
|
|
6111
6111
|
if (!items) return "";
|
|
6112
6112
|
const leader = items.find((bi) => bi.isLeader === propellerSdkV2.YesNo.Y);
|
|
6113
6113
|
if (!leader) return "";
|
|
6114
|
-
return leader.product.names
|
|
6114
|
+
return propellerV2CoreUi.getLocalizedValue(leader.product.names, props.language, "Product");
|
|
6115
6115
|
}
|
|
6116
6116
|
function getBundleLeaderPrice() {
|
|
6117
6117
|
const items = props.cartItem.bundle?.items;
|
|
@@ -6128,7 +6128,7 @@ function CartItem(rawProps) {
|
|
|
6128
6128
|
return items.filter((bi) => bi.isLeader !== propellerSdkV2.YesNo.Y);
|
|
6129
6129
|
}
|
|
6130
6130
|
function getBundleItemName(bundleItem) {
|
|
6131
|
-
return bundleItem.product.names
|
|
6131
|
+
return propellerV2CoreUi.getLocalizedValue(bundleItem.product.names, props.language, "Product");
|
|
6132
6132
|
}
|
|
6133
6133
|
function getBundleItemPrice(bundleItem) {
|
|
6134
6134
|
const price = bundleItem.price?.net;
|
|
@@ -6137,7 +6137,7 @@ function CartItem(rawProps) {
|
|
|
6137
6137
|
}
|
|
6138
6138
|
function getCrossupsellName(item) {
|
|
6139
6139
|
const product = item?.productTo || item?.clusterTo;
|
|
6140
|
-
return product?.names
|
|
6140
|
+
return propellerV2CoreUi.getLocalizedValue(product?.names, props.language, "Product");
|
|
6141
6141
|
}
|
|
6142
6142
|
function getCrossupsellImageUrl(item) {
|
|
6143
6143
|
const product = item?.productTo || item?.clusterTo;
|
|
@@ -6462,7 +6462,7 @@ function CartItemChildItems(props = {}) {
|
|
|
6462
6462
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: props.className ?? "propeller-cart-item__options mt-3 space-y-1.5 border-l-2 border-border pl-3", children: [
|
|
6463
6463
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-cart-item__options-label text-xs font-semibold text-muted-foreground uppercase tracking-wider mb-1", children: propellerV2CoreUi.getLabel(resolved.labels, "includedOptions", "Included Options:") }),
|
|
6464
6464
|
(cartItem.childItems || []).map((child, idx) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-cart-item__option flex flex-wrap gap-x-2 text-sm text-muted-foreground", children: [
|
|
6465
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: child.product.names
|
|
6465
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: propellerV2CoreUi.getLocalizedValue(child.product.names, resolved.language, "Option") }),
|
|
6466
6466
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle hidden sm:inline", children: "-" }),
|
|
6467
6467
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle text-xs self-center", children: child.product.sku }),
|
|
6468
6468
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 border-b border-dotted border-border mx-1 mb-1" }),
|
|
@@ -7254,7 +7254,7 @@ function CartSummary(rawProps) {
|
|
|
7254
7254
|
});
|
|
7255
7255
|
const [requestLoading, setRequestLoading] = React6.useState(() => false);
|
|
7256
7256
|
function title() {
|
|
7257
|
-
return props.title || "Order summary";
|
|
7257
|
+
return props.title || propellerV2CoreUi.getLabel(props.labels, "title", "Order summary");
|
|
7258
7258
|
}
|
|
7259
7259
|
function showSubtotal() {
|
|
7260
7260
|
return props.showSubtotal !== void 0 ? props.showSubtotal : true;
|