@liquidcommerce/elements-sdk 2.6.0-beta.126 → 2.6.0-beta.128

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.
@@ -23,6 +23,7 @@ export interface IClientConfigs {
23
23
  openShadowDom?: boolean;
24
24
  hasCustomApiUrl?: boolean;
25
25
  mockMode: boolean;
26
+ enableExpressCheckout: boolean;
26
27
  checkout: ILiquidCommerceElementsCheckoutConfig | null;
27
28
  isCheckoutOnly: boolean;
28
29
  }
@@ -38,6 +39,7 @@ export interface IClientConfigInput {
38
39
  customApiUrl?: string;
39
40
  openShadowDom?: boolean;
40
41
  mockMode?: boolean;
42
+ enableExpressCheckout?: boolean;
41
43
  };
42
44
  checkout?: ILiquidCommerceElementsCheckoutConfig;
43
45
  isCheckoutOnly?: boolean;
@@ -14,6 +14,7 @@ export interface ILiquidCommerceElementsDevelopmentConfig {
14
14
  customApiUrl?: string;
15
15
  openShadowDom?: boolean;
16
16
  mockMode?: boolean;
17
+ enableExpressCheckout?: boolean;
17
18
  }
18
19
  export interface IClientCustomThemeConfig {
19
20
  global?: UpdateComponentGlobalConfigs;
@@ -73,6 +73,9 @@ Injects only the Apple Pay and Google Pay wallet buttons, anywhere on the page,
73
73
  the checkout UI. Confirming the wallet sheet places the order outright — the wallet's contact and
74
74
  billing details are sent to the checkout, so the shopper never fills a checkout form.
75
75
 
76
+ Express checkout is off by default: pass `development.enableExpressCheckout: true` in the client config to show it. Without it this
77
+ method renders nothing and resolves to `null`.
78
+
76
79
  ```typescript
77
80
  injectExpressCheckout(params: IInjectExpressCheckoutParams): Promise<IInjectedComponent | null>
78
81
  ```
@@ -563,6 +563,7 @@ interface ILiquidCommerceElementsDevelopmentConfig {
563
563
  customApiUrl?: string;
564
564
  openShadowDom?: boolean;
565
565
  mockMode?: boolean;
566
+ enableExpressCheckout?: boolean;
566
567
  }
567
568
  ```
568
569
 
@@ -571,6 +572,9 @@ interface ILiquidCommerceElementsDevelopmentConfig {
571
572
  | `customApiUrl` | `string` | Custom API URL for local or custom backend testing |
572
573
  | `openShadowDom` | `boolean` | Use an OPEN (inspectable) Shadow DOM instead of the default closed mode, for debugging. Shadow DOM is always attached; forced off in production (default: `false`) |
573
574
  | `mockMode` | `boolean` | Enable mock mode to receive mock data from the API; sends an `X-Liquid-Api-Mock-Mode` header with all requests (default: `false`) |
575
+ | `enableExpressCheckout` | `boolean` | Show the Apple Pay / Google Pay express checkout and the checkout's delivery-method switch (same-day vs shipping) — the express block and delivery-method section in the checkout element, and `injectExpressCheckoutElement()` / `injectExpressCheckout()`, which otherwise render nothing and resolve to `null`. Honoured in every environment, production included (default: `false`) |
576
+
577
+ > **Temporary:** this flag exists only while express checkout and the delivery-method switch are being verified. Once they are confirmed, the flag will be removed and both will always be on.
574
578
 
575
579
  > To pre-select a payment method and skip the card form (in any environment), use [`actions.checkout.setSavedPaymentMethod`](./actions/checkout-actions.md#actionscheckoutsetsavedpaymentmethod) instead.
576
580
 
@@ -158,6 +158,7 @@ interface ILiquidCommerceElementsDevelopmentConfig {
158
158
  customApiUrl?: string;
159
159
  openShadowDom?: boolean;
160
160
  mockMode?: boolean; // when true, sends an 'X-Liquid-Api-Mock-Mode' header to receive mock data
161
+ enableExpressCheckout?: boolean; // show express checkout and the delivery-method switch; off by default, honoured in production
161
162
  }
162
163
  ```
163
164
 
@@ -373,7 +373,9 @@ window.addEventListener('lce:actions.checkout_item_quantity_decrease', (event) =
373
373
 
374
374
  ### Delivery Method
375
375
 
376
- Fires when the shopper switches a single-item checkout between same-day delivery and shipping.
376
+ Fires when the shopper switches a single-item checkout between same-day delivery and shipping. The
377
+ switch is shown only with `development.enableExpressCheckout: true`, the same opt-in as express
378
+ checkout.
377
379
 
378
380
  ```javascript
379
381
  window.addEventListener('lce:actions.checkout_delivery_method_updated', (event) => {
@@ -563,7 +565,12 @@ Apple Pay and Google Pay are offered as express checkout buttons at the top of t
563
565
  the gift toggle. Tapping one collects the shopper's contact and billing details from the wallet and
564
566
  places the order without them completing the checkout forms.
565
567
 
566
- Express checkout is offered to every shopper whose platform can show a wallet. Each wallet is
568
+ Express checkout is off by default: pass `development.enableExpressCheckout: true` in the client config to show it. Without it the checkout element renders
569
+ no express block, and the injection methods below render nothing and resolve to `null`.
570
+
571
+ > **Temporary:** this flag exists only while express checkout and the delivery-method switch are being verified. Once they are confirmed, the flag will be removed and both will always be on.
572
+
573
+ Once enabled, express checkout is offered to every shopper whose platform can show a wallet. Each wallet is
567
574
  requested with Stripe's `always` policy, so the button renders wherever the device supports it rather
568
575
  than only where Stripe judges it good for conversion. The block hides itself entirely — heading,
569
576
  buttons and divider — in four cases: the device or browser offers no wallet, the order is a
@@ -709,7 +709,8 @@ window.addEventListener('lce:actions.checkout_item_engraving_updated', (event) =
709
709
  ### `lce:actions.checkout_delivery_method_updated`
710
710
 
711
711
  Fires when the shopper moves a single-item checkout between same-day delivery and shipping. The order
712
- is re-priced, so the totals change with it.
712
+ is re-priced, so the totals change with it. The switch is shown only with
713
+ `development.enableExpressCheckout: true`.
713
714
 
714
715
  **Data includes:** `cartId`, `fulfillmentType`, `previousFulfillmentType`, `fulfillmentId`.
715
716
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.6.0-beta.126",
6
+ "version": "2.6.0-beta.128",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -112,7 +112,7 @@
112
112
  "@biomejs/biome": "^2.5.15",
113
113
  "@commitlint/cli": "^21.2.3",
114
114
  "@commitlint/config-conventional": "^21.2.3",
115
- "@playwright/test": "1.63.0",
115
+ "@playwright/test": "1.64.0",
116
116
  "@rollup/plugin-alias": "^6.0.0",
117
117
  "@rollup/plugin-commonjs": "^29.0.3",
118
118
  "@rollup/plugin-json": "^6.1.0",
@@ -126,12 +126,12 @@
126
126
  "@semantic-release/npm": "^13.2.0",
127
127
  "@semantic-release/release-notes-generator": "^14.1.1",
128
128
  "@types/core-js": "^2.5.8",
129
- "@types/node": "^26.6.4",
129
+ "@types/node": "^26.6.5",
130
130
  "conventional-changelog": "8.1.3",
131
131
  "husky": "^9.1.7",
132
132
  "jsdom": "30.1.2",
133
133
  "process": "^0.11.10",
134
- "rollup": "^4.64.0",
134
+ "rollup": "^4.64.5",
135
135
  "rollup-obfuscator": "^4.1.1",
136
136
  "rollup-plugin-typescript2": "^0.37.0",
137
137
  "semantic-release": "^25.0.9",