@propeller-commerce/propeller-v2-react-ui 0.4.13 → 0.4.14
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 +17 -0
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +9 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,23 @@ 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.14] - 2026-06-26
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- **`useCheckout().placeOrder` now supports PSP (deferred-payment) orders.**
|
|
16
|
+
- `orderStatus` accepts `'UNFINISHED'` (and any backend status string), not
|
|
17
|
+
just `'NEW'` / `'REQUEST'` — for an order awaiting an external payment whose
|
|
18
|
+
final status the PSP webhook sets later.
|
|
19
|
+
- New `finalizeOrder?: boolean` option (default `true`). Pass `false` to defer
|
|
20
|
+
the order-confirmation email, confirm event, PDF attachment, **and cart
|
|
21
|
+
deletion** to payment time — so a shopper handed off to a PSP isn't emailed
|
|
22
|
+
and their cart isn't cleared before they've paid.
|
|
23
|
+
|
|
24
|
+
Both are backward compatible: existing callers (which omit `finalizeOrder`)
|
|
25
|
+
behave exactly as before — a normal order and a quote still finalize at
|
|
26
|
+
placement.
|
|
27
|
+
|
|
11
28
|
## [0.4.13] - 2026-06-25
|
|
12
29
|
|
|
13
30
|
### 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:
|
|
1040
|
-
addPDFAttachment:
|
|
1041
|
-
triggerOrderSendConfirmEvent:
|
|
1042
|
-
|
|
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 });
|