@quantaroute/checkout 1.8.2 → 1.8.3
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 +11 -0
- package/dist/embed/quantaroute-checkout.css +1 -1
- package/dist/embed/quantaroute-checkout.js +1 -1
- package/dist/lib/index.d.ts +11 -1
- package/dist/lib/quantaroute-checkout.es.js +88 -80
- package/dist/lib/quantaroute-checkout.umd.js +59 -51
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/SavedAddressStep.tsx +100 -7
- package/src/core/types.ts +11 -1
- package/src/styles/checkout.css +61 -0
package/dist/lib/index.d.ts
CHANGED
|
@@ -1014,8 +1014,18 @@ export declare interface SavedAddressStepProps {
|
|
|
1014
1014
|
sessionToken: string;
|
|
1015
1015
|
functionBaseUrl: string;
|
|
1016
1016
|
merchantId: string;
|
|
1017
|
-
/**
|
|
1017
|
+
/**
|
|
1018
|
+
* May return a promise; the step shows a spinner until it settles. If it
|
|
1019
|
+
* rejects, the message is shown on that address's card. Reject with an error
|
|
1020
|
+
* whose `code` is `'ADDRESS_UNDELIVERABLE'` to mark the card as undeliverable.
|
|
1021
|
+
*/
|
|
1018
1022
|
onSelectAddress: (address: SavedAddress) => void | Promise<void>;
|
|
1023
|
+
/**
|
|
1024
|
+
* Optional delivery check, run for each saved address when the list loads.
|
|
1025
|
+
* Resolve with a message when the merchant doesn't deliver there, or null.
|
|
1026
|
+
* Undeliverable cards are marked before the shopper picks one.
|
|
1027
|
+
*/
|
|
1028
|
+
checkDeliverable?: (address: SavedAddress) => Promise<string | null>;
|
|
1019
1029
|
onAddNew: () => void;
|
|
1020
1030
|
}
|
|
1021
1031
|
|