@liquidcommerce/elements-sdk 2.6.0-beta.133 → 2.6.0-beta.134
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/dist/index.checkout.esm.js +9901 -9875
- package/dist/index.esm.js +14866 -14840
- package/dist/types/core/api/api-result.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +1 -0
- package/dist/types/utils/delivery-scheduling.d.ts +4 -2
- package/docs/v1/guides/checkout-component.md +1 -1
- package/package.json +1 -1
|
@@ -41,6 +41,7 @@ export declare class CheckoutCommands extends BaseCommand {
|
|
|
41
41
|
private freshCart;
|
|
42
42
|
private dropDeliveryScheduling;
|
|
43
43
|
private lapsedWindowGroupIds;
|
|
44
|
+
private scheduledGroupIds;
|
|
44
45
|
private forgetDeliveryWindow;
|
|
45
46
|
private assertDeliverySlotChoosable;
|
|
46
47
|
private responseFulfillments;
|
|
@@ -18,8 +18,10 @@ export declare const DELIVERY_SCHEDULING_UNAVAILABLE_MESSAGE = "Scheduled delive
|
|
|
18
18
|
export declare const MULTIPLE_FULFILLMENT_OPTIONS_PER_STORE_CODE = "multiple_fulfillment_options_per_store";
|
|
19
19
|
export declare const MULTIPLE_FULFILLMENT_OPTIONS_PER_STORE_MESSAGE = "Scheduled delivery cannot be combined with another delivery method from the same store. Choose ASAP delivery, or use one delivery method for all items from this store.";
|
|
20
20
|
export declare const CLOSED_STORE_MULTIPLE_FULFILLMENT_OPTIONS_MESSAGE = "This store is closed now. Use one delivery method for all items from this store.";
|
|
21
|
-
export declare function
|
|
22
|
-
export declare function
|
|
21
|
+
export declare function splitStoreMessageFromStore(store: Pick<StoreService, 'get'>): string;
|
|
22
|
+
export declare function splitStoreMessageFromError(error: Pick<ApiError, 'errors'> | null | undefined): string | null;
|
|
23
|
+
export declare function splitStoreRefusalText(error: Pick<ApiError, 'errors'> | null | undefined, store: Pick<StoreService, 'get'>): string;
|
|
24
|
+
export declare function splitStoreMessageFromCart(cart: Pick<ICart, 'retailers'>): string;
|
|
23
25
|
export declare function expiredDeliveryFulfillmentIds(store: Pick<StoreService, 'get'>): string[];
|
|
24
26
|
export declare function deliveryWindowLapseOf(error: Pick<ApiError, 'errors'> | null | undefined): DeliveryWindowLapse;
|
|
25
27
|
export type DeliveryWindowLapseText = 'message' | 'label';
|
|
@@ -913,7 +913,7 @@ The accepted window shows in the row and on the items in the order summary ("Sch
|
|
|
913
913
|
|
|
914
914
|
A store that was added to the cart while closed cannot deliver now, so checkout asks for a window and offers no ASAP. If a store closes after the shopper chose ASAP, Place Order answers `delivery_window_required`: the SDK shows "The store cannot deliver now. Choose a delivery time.", opens the picker and keeps Place Order disabled until a window is saved.
|
|
915
915
|
|
|
916
|
-
In a checkout with more than one fulfillment group (another store, or shipping), each same-day group with scheduled delivery gets its own **Delivery time** row and its own picker, which loads that group's windows. Its button reads **Schedule this store's delivery** (**Edit** after a window is saved), and the picker is named after the store ("Schedule delivery from Columbus Avenue Wines"). Every prepare sends each group's current choice, so saving one group keeps the other's window. A group whose store can deliver now stays on as soon as possible; a group whose store cannot needs its own window before payment and Place Order. When a window lapses, only that group's window is cleared and only its picker reopens: the SDK clears the window whose cutoff passed on the page, and for `delivery_window_required` marks the groups that have no window. When an error names its group (`fulfillmentId` on the error entry), only that group is cleared; when
|
|
916
|
+
In a checkout with more than one fulfillment group (another store, or shipping), each same-day group with scheduled delivery gets its own **Delivery time** row and its own picker, which loads that group's windows. Its button reads **Schedule this store's delivery** (**Edit** after a window is saved), and the picker is named after the store ("Schedule delivery from Columbus Avenue Wines"). Every prepare sends each group's current choice, so saving one group keeps the other's window. A group whose store can deliver now stays on as soon as possible; a group whose store cannot needs its own window before payment and Place Order. When a window lapses, only that group's window is cleared and only its picker reopens: the SDK clears the window whose cutoff passed on the page, and for `delivery_window_required` marks the groups that have no window. When an error names its group (`fulfillmentId` on the error entry), only that group is cleared. A name that is not a scheduling group of this checkout counts as no name; when the error names no group and the SDK cannot place it, every saved window is cleared (a refused window save clears nothing and asks for another time). When the save of one store's window is refused because the window of another store lapsed, the SDK clears that other window and names its store: "Choose a delivery window for Columbus Avenue Wines before continuing." Until each store that cannot deliver now has a window, payment says which: "Choose a delivery window for Amsterdam Liquors before continuing." In an order with more than one fulfillment group, the thank-you page has one line per group, named after its store: the accepted window for a scheduled group ("Columbus Avenue Wines" with "Thu, 1 PM – 2 PM"), and the group's own expectation for the others ("Harbor Spirits" with "Ships in 3-5 days"). A scheduled group never shows the as-soon-as-possible expectation. While a store that cannot deliver now has no accepted window, the express wallet buttons stay off, like the card form. When checkout refuses a store that has scheduled delivery and also another delivery method (`multiple_fulfillment_options_per_store`, code 5516), the SDK shows the refusal as the checkout error and keeps the saved windows: "Scheduled delivery cannot be combined with another delivery method from the same store. Choose ASAP delivery, or use one delivery method for all items from this store." When that store is closed now, the text leaves out ASAP: "This store is closed now. Use one delivery method for all items from this store." When the refusal says whether the store is closed now (`closedNow` on the error entry), the SDK uses that. Otherwise, when Place Order is refused, the SDK reads the cart again and decides "closed now" from its `deliveryAvailability`, because a store can close after the last prepare. Place Order and the express wallet stay off until a prepare succeeds after a change to the cart or to a delivery choice.
|
|
917
917
|
|
|
918
918
|
In the delivery-method switch, a same-day method whose `deliveryAvailability` says the store cannot deliver now but can schedule shows "Schedule delivery" in place of its delivery estimate. Without `deliveryAvailability` the card shows the estimate as before.
|
|
919
919
|
|
package/package.json
CHANGED