@propeller-commerce/propeller-v2-react-ui 0.15.6 → 0.15.7

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,20 @@ 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.7] - 2026-08-10
12
+
13
+ ### Fixed
14
+
15
+ - **`OrderBonusItems` showed the list price of a free item.** The API models a
16
+ bonus as two order lines: the product line at its list price, plus a sibling
17
+ `class: 'incentive'` line carrying the negative delta and pointing back via
18
+ `parentOrderItemId`. The component rendered the product line and ignored the
19
+ sibling, so a bonus that reads € 0,00 in the cart and at checkout reappeared
20
+ at its list price on the thank-you page and in order details. Bonus lines are
21
+ now netted against their incentive siblings via `getNettedBonusItems()`
22
+ (core-ui 0.6.2); partial discounts keep their remainder instead of collapsing
23
+ to zero. Order totals were already correct — this was display-only.
24
+
11
25
  ## [0.15.6] - 2026-08-10
12
26
 
13
27
  ### Fixed
package/dist/index.cjs CHANGED
@@ -13634,9 +13634,7 @@ var OrderItemCard_default = OrderItemCard;
13634
13634
  function OrderBonusItems(rawProps) {
13635
13635
  const props = useInfraProps(rawProps);
13636
13636
  const allItems = props.items ?? props.order?.items ?? [];
13637
- const bonusItems = allItems.filter(
13638
- (item) => item.class === propellerSdkV2.OrderItemClass.product && item.isBonus === propellerSdkV2.YesNo.Y
13639
- );
13637
+ const bonusItems = propellerV2CoreUi.getNettedBonusItems(allItems);
13640
13638
  if (bonusItems.length === 0) return null;
13641
13639
  const OrderItemCardImpl = props.orderItemCardComponent ?? OrderItemCard_default;
13642
13640
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `propeller-order-bonus-items ${props.className || "mb-8"}`, children: [