@propeller-commerce/propeller-v2-react-ui 0.23.1 → 0.25.0

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,51 @@ 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.25.0] - 2026-09-25
12
+
13
+ ### Added
14
+
15
+ - `CartOverviewProps.paymethodLabels` — maps a lowercased payment-method code
16
+ to its display name, the same contract `CartPaymethods` and `OrderSummary`
17
+ already use.
18
+
19
+ ### Fixed
20
+
21
+ - **The checkout review step printed the raw payment-method code** (e.g.
22
+ "Betaling: ON_ACCOUNT") while the step before it showed the method's name for
23
+ the same selection. `CartOverview` had no way to map the stored code, so it
24
+ was the one place in checkout where the enum leaked to the customer. Pass
25
+ `paymethodLabels` to resolve it; it still falls back to the raw value.
26
+ (PWP-1028)
27
+
28
+ - **The cart line's delete button had no accessible name.** It is icon-only,
29
+ with no `aria-label`, `title` or visually-hidden text, so assistive
30
+ technology announced it as just "button". It now carries both, via a
31
+ `deleteLabel` label key. (PWP-1030)
32
+
33
+ ## [0.24.0] - 2026-09-25
34
+
35
+ ### Added
36
+
37
+ - `QuickOrderProps.includeTax` and the `colPriceInclVat` label key.
38
+
39
+ ### Fixed
40
+
41
+ - **QuickOrder showed tax-inclusive prices under an "excl. VAT" header, and
42
+ ignored the shop's price toggle.** The rows read `price.net`, which the API
43
+ defines as the price *including* tax, while the column said excl. VAT — so a
44
+ line read 21 % high against the same product on the PDP or in the cart. The
45
+ component now takes `includeTax` (resolved from `<PropellerProvider>` like
46
+ every other price-bearing component), picks `price.gross` or `price.net` to
47
+ match, and labels the column accordingly. (PWP-1027)
48
+
49
+ - **The authorization-request detail mixed tax bases in one row.** The unit
50
+ price came from `totalSum` (excl. VAT) and the line total from `totalSumNet`
51
+ (incl. VAT), so 1 × € 478,55 showed a € 579,05 total and the lines did not sum
52
+ to the "Total excl. VAT" figure printed directly below them. Both cells are
53
+ now excl. VAT, matching that totals block, and the column headers say so.
54
+ (PWP-1029)
55
+
11
56
  ## [0.23.1] - 2026-09-24
12
57
 
13
58
  ### Fixed
package/dist/index.cjs CHANGED
@@ -7354,6 +7354,8 @@ function CartItemDelete(props = {}) {
7354
7354
  className: props.className ?? "propeller-cart-item__delete h-8 w-8 p-0 ml-auto inline-flex items-center justify-center rounded-control text-foreground-subtle hover:text-destructive hover:bg-destructive/10 transition-colors disabled:opacity-50",
7355
7355
  onClick: () => handlers.onDelete(),
7356
7356
  disabled: state.deleting,
7357
+ "aria-label": propellerV2CoreUi.getLabel(resolved.labels, "deleteLabel", "Remove item"),
7358
+ title: propellerV2CoreUi.getLabel(resolved.labels, "deleteLabel", "Remove item"),
7357
7359
  children: [
7358
7360
  state.deleting ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-4 h-4 border-2 border-foreground-subtle border-t-transparent rounded-full animate-spin" }) : null,
7359
7361
  !state.deleting ? /* @__PURE__ */ jsxRuntime.jsxs(
@@ -7734,7 +7736,8 @@ function CartOverview(rawProps) {
7734
7736
  const invoiceAddress = props.cart?.invoiceAddress;
7735
7737
  const deliveryAddress = props.cart?.deliveryAddress;
7736
7738
  const getCountryName = (code) => propellerV2CoreUi.getCountryName(code, props.countries);
7737
- const paymentMethod = props.cart?.paymentData?.method || "";
7739
+ const rawPaymentMethod = props.cart?.paymentData?.method || "";
7740
+ const paymentMethod = rawPaymentMethod ? props.paymethodLabels?.[rawPaymentMethod.toLowerCase()] || rawPaymentMethod : "";
7738
7741
  const carrierName = props.cart?.postageData?.carrier || "";
7739
7742
  function requestDate() {
7740
7743
  const date = props.cart?.postageData?.requestDate;
@@ -14397,6 +14400,7 @@ function blankRow() {
14397
14400
  productId: null,
14398
14401
  name: "",
14399
14402
  netPrice: 0,
14403
+ grossPrice: 0,
14400
14404
  quantity: 1,
14401
14405
  minQuantity: 1,
14402
14406
  matches: [],
@@ -14427,6 +14431,7 @@ function QuickOrderInner(props) {
14427
14431
  const graphqlClient = props.graphqlClient;
14428
14432
  const displayPrice = (n) => props.formatPrice ? props.formatPrice(n) : propellerV2CoreUi.formatPrice(n, { symbol: currency, locale: propellerV2CoreUi.localeForLanguage(props.language) });
14429
14433
  const L = (key, fallback) => propellerV2CoreUi.getLabel(labels, key, fallback);
14434
+ const rowPrice = (r) => props.includeTax ? r.netPrice : r.grossPrice;
14430
14435
  const { submitting, searchProducts, submit } = useQuickOrder({
14431
14436
  graphqlClient,
14432
14437
  user,
@@ -14453,7 +14458,7 @@ function QuickOrderInner(props) {
14453
14458
  }, []);
14454
14459
  const onCodeInput = React6.useCallback(
14455
14460
  (key, value) => {
14456
- patchRow(key, { code: value, productId: null, name: "", netPrice: 0, searched: false });
14461
+ patchRow(key, { code: value, productId: null, name: "", netPrice: 0, grossPrice: 0, searched: false });
14457
14462
  setNotice(null);
14458
14463
  const timers = searchTimers.current;
14459
14464
  if (timers[key]) clearTimeout(timers[key]);
@@ -14474,7 +14479,7 @@ function QuickOrderInner(props) {
14474
14479
  const dup = rows.some((r) => r.key !== key && r.productId && r.code === match.sku);
14475
14480
  if (dup) {
14476
14481
  setNotice(L("alreadyInList", "Product is already in the list"));
14477
- patchRow(key, { code: "", matches: [], productId: null, name: "", netPrice: 0, searched: false });
14482
+ patchRow(key, { code: "", matches: [], productId: null, name: "", netPrice: 0, grossPrice: 0, searched: false });
14478
14483
  return;
14479
14484
  }
14480
14485
  patchRow(key, {
@@ -14483,6 +14488,7 @@ function QuickOrderInner(props) {
14483
14488
  clusterId: match.clusterId,
14484
14489
  name: match.name,
14485
14490
  netPrice: match.netPrice,
14491
+ grossPrice: match.grossPrice,
14486
14492
  quantity: match.minQuantity,
14487
14493
  minQuantity: match.minQuantity,
14488
14494
  matches: [],
@@ -14544,6 +14550,7 @@ function QuickOrderInner(props) {
14544
14550
  clusterId: exact.clusterId,
14545
14551
  name: exact.name,
14546
14552
  netPrice: exact.netPrice,
14553
+ grossPrice: exact.grossPrice,
14547
14554
  quantity: Math.max(exact.minQuantity, line.quantity),
14548
14555
  minQuantity: exact.minQuantity
14549
14556
  });
@@ -14613,7 +14620,7 @@ function QuickOrderInner(props) {
14613
14620
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "hidden md:grid grid-cols-12 gap-2 px-2 pb-2 text-xs font-medium text-muted-foreground border-b border-border", children: [
14614
14621
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: L("colCode", "Article no. / SKU") }),
14615
14622
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3", children: L("colName", "Product name") }),
14616
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: L("colPrice", "excl. VAT") }),
14623
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2", children: props.includeTax ? L("colPriceInclVat", "incl. VAT") : L("colPrice", "excl. VAT") }),
14617
14624
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1", children: L("colQuantity", "Qty") }),
14618
14625
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-2 text-right", children: L("colTotal", "Total") }),
14619
14626
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-1" })
@@ -14666,7 +14673,7 @@ function QuickOrderInner(props) {
14666
14673
  "input",
14667
14674
  {
14668
14675
  type: "text",
14669
- value: r.productId ? displayPrice(r.netPrice) : "",
14676
+ value: r.productId ? displayPrice(rowPrice(r)) : "",
14670
14677
  disabled: true,
14671
14678
  className: "w-full rounded border border-input bg-muted/40 px-2 py-1.5 text-sm text-muted-foreground"
14672
14679
  }
@@ -14686,7 +14693,7 @@ function QuickOrderInner(props) {
14686
14693
  className: "w-full rounded border border-input bg-background px-2 py-1.5 text-sm focus:outline-none focus:ring-2 focus:ring-ring disabled:bg-muted/40"
14687
14694
  }
14688
14695
  ) }),
14689
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-9 md:col-span-2 text-right text-sm text-foreground whitespace-nowrap", children: r.productId ? displayPrice(r.netPrice * r.quantity) : "" }),
14696
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-9 md:col-span-2 text-right text-sm text-foreground whitespace-nowrap", children: r.productId ? displayPrice(rowPrice(r) * r.quantity) : "" }),
14690
14697
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "col-span-3 md:col-span-1 flex justify-end", children: /* @__PURE__ */ jsxRuntime.jsx(
14691
14698
  "button",
14692
14699
  {
@@ -17726,8 +17733,8 @@ function PurchaseAuthorizationRequests(rawProps) {
17726
17733
  /* @__PURE__ */ jsxRuntime.jsx("thead", { className: "bg-muted/50 border-b border-border", children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
17727
17734
  /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-left px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemProduct", "Product") }),
17728
17735
  /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemQty", "Qty") }),
17729
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemUnitPrice", "Unit price") }),
17730
- /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemTotal", "Total") })
17736
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemUnitPrice", "Unit price excl. VAT") }),
17737
+ /* @__PURE__ */ jsxRuntime.jsx("th", { className: "text-right px-3 py-2 font-medium text-muted-foreground", children: propellerV2CoreUi.getLabel(props.labels, "itemTotal", "Total excl. VAT") })
17731
17738
  ] }) }),
17732
17739
  /* @__PURE__ */ jsxRuntime.jsx("tbody", { className: "divide-y divide-border", children: getModalItems().map((item, idx) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
17733
17740
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2", children: getProductName5(item) }),
@@ -17735,7 +17742,7 @@ function PurchaseAuthorizationRequests(rawProps) {
17735
17742
  /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right", children: formatPrice17(
17736
17743
  (item.quantity ?? 0) > 0 ? (item.totalSum ?? 0) / (item.quantity ?? 1) : 0
17737
17744
  ) }),
17738
- /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right font-medium", children: formatPrice17(item.totalSumNet ?? 0) })
17745
+ /* @__PURE__ */ jsxRuntime.jsx("td", { className: "px-3 py-2 text-right font-medium", children: formatPrice17(item.totalSum ?? 0) })
17739
17746
  ] }, idx)) })
17740
17747
  ] }) })
17741
17748
  ] }),