@lockerverse/react 0.2.253-dev.1 → 0.2.255
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/MIGRATIONS.md +11 -77
- package/dist/booking-payment.d.ts +6 -0
- package/dist/booking-payment.d.ts.map +1 -1
- package/dist/booking-payment.js +1 -1
- package/dist/booking-payment.js.map +1 -1
- package/dist/embed/chunks/{auction-payment-view-EHVUMV2E.js → auction-payment-view-PUPDF755.js} +1 -1
- package/dist/embed/chunks/{chunk-Z7VB3RC6.js → chunk-2Z3NXASX.js} +2 -2
- package/dist/embed/chunks/{chunk-N3EKRKUJ.js → chunk-BDPIC42C.js} +2 -2
- package/dist/embed/chunks/{chunk-Z63EAJ4B.js → chunk-U5RZWWIG.js} +1 -1
- package/dist/embed/chunks/{lockerverse-auction-item-LIULZZDW.js → lockerverse-auction-item-C5Q36TJQ.js} +2 -2
- package/dist/embed/lockerverse.js +1 -1
- package/dist/embed/runtime.js +2 -2
- package/guides/auctions.md +1 -1
- package/guides/bookings.md +41 -1
- package/guides/browser-embed.md +1 -1
- package/guides/events.md +1 -1
- package/guides/integration.md +1 -1
- package/guides/payment-widgets.md +1 -1
- package/guides/signup.md +1 -1
- package/package.json +2 -2
- /package/dist/embed/chunks/{chunk-Z7VB3RC6.js.LEGAL.txt → chunk-2Z3NXASX.js.LEGAL.txt} +0 -0
- /package/dist/embed/chunks/{chunk-N3EKRKUJ.js.LEGAL.txt → chunk-BDPIC42C.js.LEGAL.txt} +0 -0
- /package/dist/embed/chunks/{lockerverse-auction-item-LIULZZDW.js.LEGAL.txt → lockerverse-auction-item-C5Q36TJQ.js.LEGAL.txt} +0 -0
package/guides/auctions.md
CHANGED
package/guides/bookings.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Lockerverse bookings guide
|
|
2
2
|
|
|
3
|
-
Package: @lockerverse/react@0.2.
|
|
3
|
+
Package: @lockerverse/react@0.2.255
|
|
4
4
|
|
|
5
5
|
Generated from this release's maintained documentation. Do not edit this copy.
|
|
6
6
|
|
|
@@ -99,6 +99,46 @@ booking status and recovery controls outside this boundary, so a module load
|
|
|
99
99
|
error cannot remove the recovery path. Reload or retry card entry only for the
|
|
100
100
|
same recovered attempt; do not create another attempt to handle a load error.
|
|
101
101
|
|
|
102
|
+
### Contact details and card entry on one step
|
|
103
|
+
|
|
104
|
+
A live booking does not need a separate contact step. While
|
|
105
|
+
`configuration.ready` is true, `configuration.payment` holds the public
|
|
106
|
+
`publishableKey` and `stripeAccountId`. Show the contact fields and the payment
|
|
107
|
+
component together before an attempt exists, and create the attempt in
|
|
108
|
+
`beforeConfirm`. It runs after the card details pass validation and before the
|
|
109
|
+
confirmation token is created:
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
const payment = booking.configuration?.payment;
|
|
113
|
+
const ready = booking.attempt
|
|
114
|
+
? booking.canPay || booking.needsPaymentAction
|
|
115
|
+
: Boolean(payment && booking.recovered && contactIsValid && !booking.busy);
|
|
116
|
+
|
|
117
|
+
<BookingPayment
|
|
118
|
+
key={`${service.serviceVariationId}:${start}`}
|
|
119
|
+
publishableKey={booking.attempt?.publishableKey ?? payment.publishableKey}
|
|
120
|
+
stripeAccountId={payment.stripeAccountId}
|
|
121
|
+
amountCents={service.amountCents}
|
|
122
|
+
currency={service.currency}
|
|
123
|
+
attempt={booking.attempt ?? undefined}
|
|
124
|
+
beforeConfirm={async () => {
|
|
125
|
+
if (!booking.attempt) {
|
|
126
|
+
await booking.initialize({ date, start, customer, serviceVariationId });
|
|
127
|
+
}
|
|
128
|
+
}}
|
|
129
|
+
onConfirm={booking.confirm}
|
|
130
|
+
onRecover={booking.recover}
|
|
131
|
+
disabled={!ready}
|
|
132
|
+
/>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Keep the component mounted when the attempt arrives; it uses the same account and
|
|
136
|
+
amount. Lock the contact fields while an attempt exists, because the saved attempt
|
|
137
|
+
keeps the details it was created with. If `beforeConfirm` rejects, no payment is
|
|
138
|
+
sent and the customer can correct the problem and pay again. Show the hook error
|
|
139
|
+
next to the form. A saved or recovered attempt still uses the saved amount and the
|
|
140
|
+
recovery rules below.
|
|
141
|
+
|
|
102
142
|
The optional payment entry needs the Stripe peer versions in the package
|
|
103
143
|
manifest. It creates a confirmation token with off-session setup and sends it to
|
|
104
144
|
the Lockerverse backend. It does not confirm or charge on the client. Its button
|
package/guides/browser-embed.md
CHANGED
package/guides/events.md
CHANGED
package/guides/integration.md
CHANGED
package/guides/signup.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.255",
|
|
4
4
|
"description": "Tree-shakable React payment and signup UI for Lockerverse",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -152,7 +152,7 @@
|
|
|
152
152
|
"embla-carousel-react": "8.6.0",
|
|
153
153
|
"lucide-react": "0.536.0",
|
|
154
154
|
"valibot": "1.4.2",
|
|
155
|
-
"@lockerverse/sdk": "0.2.
|
|
155
|
+
"@lockerverse/sdk": "0.2.255"
|
|
156
156
|
},
|
|
157
157
|
"devDependencies": {
|
|
158
158
|
"@size-limit/file": "13.0.3",
|
|
File without changes
|
|
File without changes
|