@propeller-commerce/propeller-v2-react-ui 0.4.13 → 0.4.15

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,31 @@ 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.15] - 2026-07-08
12
+
13
+ ### Changed
14
+
15
+ - Bumped the `@propeller-commerce/propeller-sdk-v2` dev dependency to `^0.12.0`
16
+ to build and test against the SDK's 0.12.0 release. The runtime peer stays
17
+ `*` — consumers pin the SDK version. No API change.
18
+
19
+ ## [0.4.14] - 2026-06-26
20
+
21
+ ### Added
22
+
23
+ - **`useCheckout().placeOrder` now supports PSP (deferred-payment) orders.**
24
+ - `orderStatus` accepts `'UNFINISHED'` (and any backend status string), not
25
+ just `'NEW'` / `'REQUEST'` — for an order awaiting an external payment whose
26
+ final status the PSP webhook sets later.
27
+ - New `finalizeOrder?: boolean` option (default `true`). Pass `false` to defer
28
+ the order-confirmation email, confirm event, PDF attachment, **and cart
29
+ deletion** to payment time — so a shopper handed off to a PSP isn't emailed
30
+ and their cart isn't cleared before they've paid.
31
+
32
+ Both are backward compatible: existing callers (which omit `finalizeOrder`)
33
+ behave exactly as before — a normal order and a quote still finalize at
34
+ placement.
35
+
11
36
  ## [0.4.13] - 2026-06-25
12
37
 
13
38
  ### Added
package/dist/index.cjs CHANGED
@@ -1015,6 +1015,8 @@ function useCheckout(options) {
1015
1015
  const cartService = propellerV2CoreUi.createServices(graphqlClient).cart;
1016
1016
  const orderService = propellerV2CoreUi.createServices(graphqlClient).order;
1017
1017
  const { cartId, orderStatus, reference, notes, isQuoteMode } = opts;
1018
+ const finalizeOrder = opts.finalizeOrder ?? true;
1019
+ const sendConfirmation = finalizeOrder && !isQuoteMode;
1018
1020
  if (reference || notes) {
1019
1021
  await cartService.updateCart({
1020
1022
  id: cartId,
@@ -1036,10 +1038,13 @@ function useCheckout(options) {
1036
1038
  orderId,
1037
1039
  status: orderStatus,
1038
1040
  payStatus: propellerSdkV2.PaymentStatuses.OPEN,
1039
- sendOrderConfirmationEmail: !isQuoteMode,
1040
- addPDFAttachment: !isQuoteMode,
1041
- triggerOrderSendConfirmEvent: !isQuoteMode,
1042
- deleteCart: true
1041
+ sendOrderConfirmationEmail: sendConfirmation,
1042
+ addPDFAttachment: sendConfirmation,
1043
+ triggerOrderSendConfirmEvent: sendConfirmation,
1044
+ // Keep the cart only for an unfinalized (PSP-pending) order so the
1045
+ // shopper can retry payment; clear it once the order is finalized
1046
+ // (a normal order or a quote).
1047
+ deleteCart: finalizeOrder
1043
1048
  });
1044
1049
  if (isQuoteMode) {
1045
1050
  await orderService.triggerQuoteSendRequest({ orderId, language });