@propeller-commerce/propeller-v2-react-ui 0.15.3 → 0.15.4
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 +16 -0
- package/dist/index.cjs +15 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +15 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,22 @@ 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.15.4] - 2026-08-10
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- `<ItemsOverview>` follows the Incl./Excl. BTW toggle. It never resolved infra,
|
|
16
|
+
so it printed `item.price × quantity` — always excl. VAT — while `<CartItem>`
|
|
17
|
+
on the cart page printed `totalSumNet` (incl.). The same lines therefore
|
|
18
|
+
appeared on two different tax bases in consecutive checkout steps. It now
|
|
19
|
+
reads `includeTax` (and `currency` / `language`, which also silently fell back
|
|
20
|
+
to `'€'` and no language) from `<PropellerProvider>`, and takes line totals
|
|
21
|
+
from `totalSum` / `totalSumNet` — the same fields `<CartItem>` reads. Bundle,
|
|
22
|
+
bundle-item and child-option prices switch on the same basis.
|
|
23
|
+
|
|
24
|
+
Hosts that already render inside `<PropellerProvider>` need no change; pass
|
|
25
|
+
`includeTax` explicitly to override.
|
|
26
|
+
|
|
11
27
|
## [0.15.3] - 2026-08-10
|
|
12
28
|
|
|
13
29
|
### Fixed
|
package/dist/index.cjs
CHANGED
|
@@ -12859,7 +12859,9 @@ function getBundleNonLeaders(item) {
|
|
|
12859
12859
|
if (!items) return [];
|
|
12860
12860
|
return items.filter((bi) => bi.isLeader !== propellerSdkV2.YesNo.Y);
|
|
12861
12861
|
}
|
|
12862
|
-
function ItemsOverview(
|
|
12862
|
+
function ItemsOverview(rawProps) {
|
|
12863
|
+
const props = useInfraProps(rawProps);
|
|
12864
|
+
const useTax = !!props.includeTax;
|
|
12863
12865
|
const containerClass = props.itemsOverviewContainerClass || "cart-items-overview";
|
|
12864
12866
|
const itemNameClickable = props.itemNameClickable !== void 0 ? props.itemNameClickable : true;
|
|
12865
12867
|
const showAvailability = props.showAvailability !== void 0 ? props.showAvailability : true;
|
|
@@ -12875,6 +12877,13 @@ function ItemsOverview(props) {
|
|
|
12875
12877
|
}
|
|
12876
12878
|
return propellerV2CoreUi.formatPrice(price || 0, { symbol: currencySymbol });
|
|
12877
12879
|
}
|
|
12880
|
+
function lineTotal(item) {
|
|
12881
|
+
return (useTax ? item.totalSumNet : item.totalSum) || 0;
|
|
12882
|
+
}
|
|
12883
|
+
function bundlePrice(price) {
|
|
12884
|
+
if (!price) return void 0;
|
|
12885
|
+
return useTax ? price.net : price.gross;
|
|
12886
|
+
}
|
|
12878
12887
|
function getItemSurcharges(item) {
|
|
12879
12888
|
const list = (item.surcharges ?? []).filter(
|
|
12880
12889
|
(s) => s.enabled !== false
|
|
@@ -12937,12 +12946,12 @@ function ItemsOverview(props) {
|
|
|
12937
12946
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
12938
12947
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex justify-between items-start gap-2", children: [
|
|
12939
12948
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-items-overview__item-title text-sm font-medium leading-tight text-foreground line-clamp-2", children: item.bundle?.name || "Bundle" }),
|
|
12940
|
-
showPrice && money(item.bundle?.price
|
|
12949
|
+
showPrice && money(bundlePrice(item.bundle?.price)) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-items-overview__item-price font-semibold text-sm text-foreground whitespace-nowrap", children: money(bundlePrice(item.bundle?.price)) }) : null
|
|
12941
12950
|
] }),
|
|
12942
12951
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-items-overview__item-bundle mt-1.5 space-y-1 border-l-2 border-secondary/10 pl-2", children: [
|
|
12943
12952
|
leader ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "propeller-items-overview__item-bundle-leader flex justify-between items-center text-xs", children: [
|
|
12944
12953
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium text-foreground", children: leader.product.names?.[0]?.value || "Product" }),
|
|
12945
|
-
money(leader.price
|
|
12954
|
+
money(bundlePrice(leader.price)) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground whitespace-nowrap ml-2", children: money(bundlePrice(leader.price)) }) : null
|
|
12946
12955
|
] }) : null,
|
|
12947
12956
|
getBundleNonLeaders(item).map((bundleItem, idx) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
12948
12957
|
"div",
|
|
@@ -12950,7 +12959,7 @@ function ItemsOverview(props) {
|
|
|
12950
12959
|
className: "propeller-items-overview__item-bundle-item flex justify-between items-center text-xs text-muted-foreground",
|
|
12951
12960
|
children: [
|
|
12952
12961
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: bundleItem.product?.names?.[0]?.value || "Product" }),
|
|
12953
|
-
money(bundleItem.price
|
|
12962
|
+
money(bundlePrice(bundleItem.price)) ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: money(bundlePrice(bundleItem.price)) }) : null
|
|
12954
12963
|
]
|
|
12955
12964
|
},
|
|
12956
12965
|
idx
|
|
@@ -12973,7 +12982,7 @@ function ItemsOverview(props) {
|
|
|
12973
12982
|
children: getItemName(item)
|
|
12974
12983
|
}
|
|
12975
12984
|
) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "propeller-items-overview__item-title font-medium text-sm leading-tight line-clamp-2", children: getItemName(item) }),
|
|
12976
|
-
showPrice ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-items-overview__item-price font-semibold text-sm text-foreground whitespace-nowrap", children: formatItemPrice((item
|
|
12985
|
+
showPrice ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "propeller-items-overview__item-price font-semibold text-sm text-foreground whitespace-nowrap", children: formatItemPrice(lineTotal(item)) }) : null
|
|
12977
12986
|
] }),
|
|
12978
12987
|
showSku && itemSku ? /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "propeller-items-overview__item-sku text-xs text-muted-foreground mt-0.5", children: [
|
|
12979
12988
|
"SKU: ",
|
|
@@ -12989,7 +12998,7 @@ function ItemsOverview(props) {
|
|
|
12989
12998
|
className: "propeller-items-overview__item-option flex justify-between items-center text-xs text-muted-foreground",
|
|
12990
12999
|
children: [
|
|
12991
13000
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "line-clamp-1", children: child.product?.names?.[0]?.value || "Option" }),
|
|
12992
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: formatItemPrice(child
|
|
13001
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground-subtle whitespace-nowrap ml-2", children: formatItemPrice(lineTotal(child)) })
|
|
12993
13002
|
]
|
|
12994
13003
|
},
|
|
12995
13004
|
idx
|