@liquidcommerce/elements-sdk 2.6.0-beta.7 → 2.6.0-beta.71
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/README.md +83 -2519
- package/dist/index.checkout.esm.js +16607 -0
- package/dist/index.esm.js +23556 -20638
- package/dist/ssr-stub.checkout.esm.js +18 -0
- package/dist/ssr-stub.esm.js +270 -0
- package/dist/types/auto-initialize/checkout.d.ts +2 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +46 -0
- package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +15 -2
- package/dist/types/clients/builder.d.ts +3 -0
- package/dist/types/clients/checkout.d.ts +6 -0
- package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +3 -1
- package/dist/types/clients/main.d.ts +3 -0
- package/dist/types/constants/core.constant.d.ts +2 -6
- package/dist/types/core/api/api-client.service.d.ts +20 -18
- package/dist/types/core/api/api-result.d.ts +19 -0
- package/dist/types/core/api/auth-client.service.d.ts +40 -13
- package/dist/types/core/api/http-client.service.d.ts +0 -1
- package/dist/types/core/base-component.service.d.ts +2 -1
- package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
- package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
- package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
- package/dist/types/core/client/actions/client-checkout-action.service.d.ts +56 -0
- package/dist/types/core/client/actions/client-product-action.service.d.ts +15 -0
- package/dist/types/core/client/client-action.service.d.ts +6 -70
- package/dist/types/core/client/client-config.service.d.ts +8 -2
- package/dist/types/core/command/common-command.service.d.ts +1 -0
- package/dist/types/core/google-tag-manager.service.d.ts +2 -1
- package/dist/types/core/logger/logger.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -52
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +45 -51
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +9 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -74
- package/dist/types/core/pubsub/pubsub.service.d.ts +1 -2
- package/dist/types/core/singleton-manager.service.d.ts +12 -8
- package/dist/types/core/store/interfaces/cart.interface.d.ts +3 -4
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
- package/dist/types/core/store/interfaces/core.interface.d.ts +12 -2
- package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +30 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
- package/dist/types/core/store/store.constant.d.ts +5 -0
- package/dist/types/core/store/store.service.d.ts +1 -0
- package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
- package/dist/types/enums/core.enum.d.ts +39 -1
- package/dist/types/enums/index.d.ts +0 -1
- package/dist/types/index.checkout.d.ts +8 -0
- package/dist/types/index.checkout.umd.d.ts +4 -0
- package/dist/types/index.d.ts +8 -3
- package/dist/types/interfaces/api/cart.interface.d.ts +13 -8
- package/dist/types/interfaces/api/checkout.interface.d.ts +239 -0
- package/dist/types/interfaces/api/index.d.ts +5 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +39 -0
- package/dist/types/interfaces/api/product.interface.d.ts +10 -4
- package/dist/types/interfaces/client.interface.d.ts +72 -0
- package/dist/types/interfaces/component.interface.d.ts +7 -0
- package/dist/types/interfaces/config.interface.d.ts +41 -0
- package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +2 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +5 -3
- package/dist/types/interfaces/configs/index.d.ts +1 -0
- package/dist/types/interfaces/configs/product-list.interface.d.ts +47 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +4 -1
- package/dist/types/interfaces/injection.interface.d.ts +47 -0
- package/dist/types/modules/address/address.command.d.ts +2 -1
- package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +4 -4
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +23 -9
- package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +3 -0
- package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
- package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
- package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
- package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
- package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
- package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
- package/dist/types/modules/checkout/constant.d.ts +3 -0
- package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-description.component.d.ts +1 -0
- package/dist/types/modules/product/components/product-image-carousel.component.d.ts +3 -0
- package/dist/types/modules/product/components/product-options.component.d.ts +2 -1
- package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
- package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +5 -2
- package/dist/types/modules/product/product.commands.d.ts +2 -3
- package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +5 -0
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
- package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-price-filter.components.d.ts → filter-components/product-list-price-filter.d.ts} +1 -1
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +7 -0
- package/dist/types/modules/product-list/components/index.d.ts +6 -2
- package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +27 -30
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +12 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +55 -36
- package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +22 -0
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +49 -0
- package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-search.component.d.ts → product-list-search.component.d.ts} +11 -4
- package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +23 -8
- package/dist/types/modules/product-list/product-list.component.d.ts +10 -45
- package/dist/types/modules/product-list/product-list.constants.d.ts +38 -0
- package/dist/types/modules/product-list/product-list.interface.d.ts +20 -35
- package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
- package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
- package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
- package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
- package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -2
- package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +6 -1
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +6 -1
- package/dist/types/modules/ui-components/input/index.d.ts +0 -1
- package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
- package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
- package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
- package/dist/types/modules/ui-components/ui.commands.d.ts +5 -1
- package/dist/types/ssr/stub.checkout.d.ts +6 -0
- package/dist/types/ssr/stub.d.ts +10 -0
- package/dist/types/static/icon/check.icon.d.ts +2 -0
- package/dist/types/static/icon/index.d.ts +1 -0
- package/dist/types/utils/dom-compat.d.ts +2 -0
- package/dist/types/utils/format.d.ts +0 -14
- package/dist/types/utils/product-selection.d.ts +16 -0
- package/dist/types/utils/product.d.ts +10 -0
- package/docs/v1/README.md +210 -0
- package/docs/v1/api/actions/address-actions.md +281 -0
- package/docs/v1/api/actions/cart-actions.md +337 -0
- package/docs/v1/api/actions/checkout-actions.md +427 -0
- package/docs/v1/api/actions/product-actions.md +158 -0
- package/docs/v1/api/client.md +495 -0
- package/docs/v1/api/configuration.md +528 -0
- package/docs/v1/api/injection-methods.md +261 -0
- package/docs/v1/api/typescript-types.md +398 -0
- package/docs/v1/api/ui-helpers.md +200 -0
- package/docs/v1/examples/advanced-patterns.md +198 -0
- package/docs/v1/examples/checkout-flow.md +91 -0
- package/docs/v1/examples/custom-theming.md +63 -0
- package/docs/v1/examples/multi-product-page.md +90 -0
- package/docs/v1/examples/simple-product-page.md +89 -0
- package/docs/v1/getting-started/concepts.md +507 -0
- package/docs/v1/getting-started/installation.md +328 -0
- package/docs/v1/getting-started/quick-start.md +405 -0
- package/docs/v1/guides/address-component.md +431 -0
- package/docs/v1/guides/best-practices.md +353 -0
- package/docs/v1/guides/cart-component.md +737 -0
- package/docs/v1/guides/checkout-component.md +672 -0
- package/docs/v1/guides/events.md +926 -0
- package/docs/v1/guides/product-component.md +686 -0
- package/docs/v1/guides/product-list-component.md +507 -0
- package/docs/v1/guides/theming.md +216 -0
- package/docs/v1/integration/angular.md +39 -0
- package/docs/v1/integration/laravel.md +41 -0
- package/docs/v1/integration/nextjs.md +69 -0
- package/docs/v1/integration/proxy-setup.md +89 -0
- package/docs/v1/integration/react.md +64 -0
- package/docs/v1/integration/vanilla-js.md +84 -0
- package/docs/v1/integration/vue.md +58 -0
- package/docs/v1/reference/browser-support.md +44 -0
- package/docs/v1/reference/error-handling.md +70 -0
- package/docs/v1/reference/performance.md +54 -0
- package/docs/v1/reference/troubleshooting.md +136 -0
- package/package.json +31 -27
- package/dist/types/elements-builder-client.d.ts +0 -2
- package/dist/types/elements-client.d.ts +0 -2
- package/dist/types/enums/cloud.enum.d.ts +0 -106
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -42
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -218
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -4
- package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
- package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
- package/dist/types/interfaces/core.interface.d.ts +0 -111
- package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -4
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
- package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
- package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
- package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
- package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
- package/dist/types/utils/helper.d.ts +0 -28
- package/docs/ACTIONS.md +0 -1300
- package/docs/BROWSER_SUPPORT.md +0 -279
- package/docs/CONFIGURATION.md +0 -853
- package/docs/DOCUMENTATION_INDEX.md +0 -311
- package/docs/EVENTS.md +0 -798
- package/docs/PROXY.md +0 -228
- package/docs/THEMING.md +0 -592
- package/docs/TROUBLESHOOTING.md +0 -793
- package/umd/elements.js +0 -1
- /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
- /package/dist/types/modules/product-list/components/{product-list-filters-subcomponents/product-list-checkbox-filter.components.d.ts → filter-components/product-list-checkbox-filter.d.ts} +0 -0
- /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
- /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
# Configuration Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all configuration options available in the Elements SDK.
|
|
4
|
+
|
|
5
|
+
## Client Configuration
|
|
6
|
+
|
|
7
|
+
### ILiquidCommerceElementsConfig
|
|
8
|
+
|
|
9
|
+
Top-level configuration passed to `Elements()` or `ElementsBuilder()`.
|
|
10
|
+
|
|
11
|
+
```typescript
|
|
12
|
+
interface ILiquidCommerceElementsConfig {
|
|
13
|
+
env?: ElementsEnv;
|
|
14
|
+
promoTicker?: IPromoTicker[];
|
|
15
|
+
customTheme?: IClientCustomThemeConfig;
|
|
16
|
+
debugMode?: DebugMode;
|
|
17
|
+
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
18
|
+
proxy?: IElementsProxyConfig;
|
|
19
|
+
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
| Property | Type | Required | Description |
|
|
24
|
+
|----------|------|----------|-------------|
|
|
25
|
+
| `env` | `'development' \| 'staging' \| 'production'` | No | API environment |
|
|
26
|
+
| `promoTicker` | `IPromoTicker[]` | No | Promotional ticker configurations |
|
|
27
|
+
| `customTheme` | `IClientCustomThemeConfig` | No | Theme overrides for all components |
|
|
28
|
+
| `debugMode` | `'none' \| 'console' \| 'panel'` | No | Debug output mode |
|
|
29
|
+
| `checkout` | `ILiquidCommerceElementsCheckoutConfig` | No | Checkout behavior settings |
|
|
30
|
+
| `proxy` | `IElementsProxyConfig` | No | Proxy configuration for API requests |
|
|
31
|
+
| `development` | `ILiquidCommerceElementsDevelopmentConfig` | No | Development/testing options |
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Theme Configuration
|
|
36
|
+
|
|
37
|
+
### IClientCustomThemeConfig
|
|
38
|
+
|
|
39
|
+
Override default theme settings for any component.
|
|
40
|
+
|
|
41
|
+
```typescript
|
|
42
|
+
interface IClientCustomThemeConfig {
|
|
43
|
+
global?: UpdateComponentGlobalConfigs;
|
|
44
|
+
product?: UpdateProductComponent;
|
|
45
|
+
address?: UpdateAddressComponent;
|
|
46
|
+
cart?: UpdateCartComponent;
|
|
47
|
+
checkout?: UpdateCheckoutComponent;
|
|
48
|
+
productList?: UpdateProductListComponent;
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
All theme properties are deeply partial -- you only need to specify the values you want to override.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
### Global Theme
|
|
57
|
+
|
|
58
|
+
#### IGlobalTheme
|
|
59
|
+
|
|
60
|
+
```typescript
|
|
61
|
+
interface IGlobalTheme {
|
|
62
|
+
buttonCornerRadius: string;
|
|
63
|
+
cardCornerRadius: string;
|
|
64
|
+
headingFont: IFontFamily;
|
|
65
|
+
paragraphFont: IFontFamily;
|
|
66
|
+
primaryColor: string;
|
|
67
|
+
accentColor: string;
|
|
68
|
+
defaultTextColor: string;
|
|
69
|
+
selectedTextColor: string;
|
|
70
|
+
linkTextColor: string;
|
|
71
|
+
errorColor: string;
|
|
72
|
+
warningColor: string;
|
|
73
|
+
successColor: string;
|
|
74
|
+
drawerBackgroundColor: string;
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
| Property | Type | Description |
|
|
79
|
+
|----------|------|-------------|
|
|
80
|
+
| `buttonCornerRadius` | `string` | CSS border-radius for buttons (e.g., `'8px'`) |
|
|
81
|
+
| `cardCornerRadius` | `string` | CSS border-radius for cards |
|
|
82
|
+
| `headingFont` | `IFontFamily` | Font family and weights for headings |
|
|
83
|
+
| `paragraphFont` | `IFontFamily` | Font family and weights for body text |
|
|
84
|
+
| `primaryColor` | `string` | Primary brand color (buttons, links, highlights) |
|
|
85
|
+
| `accentColor` | `string` | Secondary accent color |
|
|
86
|
+
| `defaultTextColor` | `string` | Default text color |
|
|
87
|
+
| `selectedTextColor` | `string` | Text color for selected/active elements |
|
|
88
|
+
| `linkTextColor` | `string` | Color for links |
|
|
89
|
+
| `errorColor` | `string` | Color for error states |
|
|
90
|
+
| `warningColor` | `string` | Color for warning states |
|
|
91
|
+
| `successColor` | `string` | Color for success states |
|
|
92
|
+
| `drawerBackgroundColor` | `string` | Background color for drawer components |
|
|
93
|
+
|
|
94
|
+
#### IFontFamily
|
|
95
|
+
|
|
96
|
+
```typescript
|
|
97
|
+
interface IFontFamily {
|
|
98
|
+
name: string; // Google Font name (e.g., 'Inter')
|
|
99
|
+
weights: number[]; // Font weights to load (e.g., [400, 500, 700])
|
|
100
|
+
}
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
#### IGlobalLayout
|
|
104
|
+
|
|
105
|
+
```typescript
|
|
106
|
+
interface IGlobalLayout {
|
|
107
|
+
enablePersonalization: boolean;
|
|
108
|
+
personalizationText: string;
|
|
109
|
+
personalizationCardStyle: 'outlined' | 'filled';
|
|
110
|
+
allowPromoCodes: boolean;
|
|
111
|
+
inputFieldStyle: 'outlined' | 'filled';
|
|
112
|
+
showPoweredBy: boolean;
|
|
113
|
+
poweredByMode: 'light' | 'dark';
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
| Property | Type | Description |
|
|
118
|
+
|----------|------|-------------|
|
|
119
|
+
| `enablePersonalization` | `boolean` | Enable engraving/personalization features |
|
|
120
|
+
| `personalizationText` | `string` | Label text for personalization option |
|
|
121
|
+
| `personalizationCardStyle` | `'outlined' \| 'filled'` | Visual style for personalization cards |
|
|
122
|
+
| `allowPromoCodes` | `boolean` | Show promo code inputs in cart/checkout |
|
|
123
|
+
| `inputFieldStyle` | `'outlined' \| 'filled'` | Visual style for input fields |
|
|
124
|
+
| `showPoweredBy` | `boolean` | Show "Powered by LiquidCommerce" badge |
|
|
125
|
+
| `poweredByMode` | `'light' \| 'dark'` | Color mode for the powered-by badge |
|
|
126
|
+
|
|
127
|
+
**Example:**
|
|
128
|
+
|
|
129
|
+
```javascript
|
|
130
|
+
customTheme: {
|
|
131
|
+
global: {
|
|
132
|
+
theme: {
|
|
133
|
+
primaryColor: '#007bff',
|
|
134
|
+
buttonCornerRadius: '8px',
|
|
135
|
+
headingFont: { name: 'Inter', weights: [400, 600, 700] }
|
|
136
|
+
},
|
|
137
|
+
layout: {
|
|
138
|
+
allowPromoCodes: true,
|
|
139
|
+
inputFieldStyle: 'outlined'
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
### Product Theme
|
|
148
|
+
|
|
149
|
+
#### IProductComponent
|
|
150
|
+
|
|
151
|
+
```typescript
|
|
152
|
+
interface IProductComponent {
|
|
153
|
+
theme: IProductTheme;
|
|
154
|
+
layout: IProductLayout;
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
#### IProductTheme
|
|
159
|
+
|
|
160
|
+
```typescript
|
|
161
|
+
interface IProductTheme {
|
|
162
|
+
backgroundColor: string;
|
|
163
|
+
}
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### IProductLayout
|
|
167
|
+
|
|
168
|
+
```typescript
|
|
169
|
+
interface IProductLayout {
|
|
170
|
+
showImages: boolean;
|
|
171
|
+
showOnlyMainImage: boolean;
|
|
172
|
+
showTitle: boolean;
|
|
173
|
+
showDescription: boolean;
|
|
174
|
+
showQuantityCounter: boolean;
|
|
175
|
+
showOffHours: boolean;
|
|
176
|
+
quantityCounterStyle: 'outlined' | 'ghost';
|
|
177
|
+
fulfillmentDisplay: 'carousel' | 'popup';
|
|
178
|
+
enableShippingFulfillment: boolean;
|
|
179
|
+
enableOnDemandFulfillment: boolean;
|
|
180
|
+
addToCartButtonText: string;
|
|
181
|
+
addToCartButtonShowTotalPrice: boolean;
|
|
182
|
+
buyNowButtonText: string;
|
|
183
|
+
preSaleButtonText: string;
|
|
184
|
+
prioritizeEngraving: boolean;
|
|
185
|
+
noAvailabilityText: string;
|
|
186
|
+
}
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
| Property | Type | Description |
|
|
190
|
+
|----------|------|-------------|
|
|
191
|
+
| `showImages` | `boolean` | Show product image carousel |
|
|
192
|
+
| `showOnlyMainImage` | `boolean` | Show only the main product image (no carousel) |
|
|
193
|
+
| `showTitle` | `boolean` | Show product title |
|
|
194
|
+
| `showDescription` | `boolean` | Show product description |
|
|
195
|
+
| `showQuantityCounter` | `boolean` | Show quantity selector |
|
|
196
|
+
| `showOffHours` | `boolean` | Show off-hours messaging |
|
|
197
|
+
| `quantityCounterStyle` | `'outlined' \| 'ghost'` | Visual style for quantity counter |
|
|
198
|
+
| `fulfillmentDisplay` | `'carousel' \| 'popup'` | How to display fulfillment/retailer options |
|
|
199
|
+
| `enableShippingFulfillment` | `boolean` | Enable shipping fulfillment option |
|
|
200
|
+
| `enableOnDemandFulfillment` | `boolean` | Enable on-demand delivery option |
|
|
201
|
+
| `addToCartButtonText` | `string` | Custom text for add-to-cart button |
|
|
202
|
+
| `addToCartButtonShowTotalPrice` | `boolean` | Show total price on add-to-cart button |
|
|
203
|
+
| `buyNowButtonText` | `string` | Custom text for buy-now button |
|
|
204
|
+
| `preSaleButtonText` | `string` | Custom text for pre-sale button |
|
|
205
|
+
| `prioritizeEngraving` | `boolean` | Show engraving option before add-to-cart |
|
|
206
|
+
| `noAvailabilityText` | `string` | Text shown when product is unavailable |
|
|
207
|
+
|
|
208
|
+
**Example:**
|
|
209
|
+
|
|
210
|
+
```javascript
|
|
211
|
+
customTheme: {
|
|
212
|
+
product: {
|
|
213
|
+
layout: {
|
|
214
|
+
fulfillmentDisplay: 'popup',
|
|
215
|
+
addToCartButtonText: 'Add to Bag',
|
|
216
|
+
showQuantityCounter: true
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
### Cart Theme
|
|
225
|
+
|
|
226
|
+
#### ICartComponent
|
|
227
|
+
|
|
228
|
+
```typescript
|
|
229
|
+
interface ICartComponent {
|
|
230
|
+
theme: ICartTheme;
|
|
231
|
+
layout: ICartLayout;
|
|
232
|
+
}
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
#### ICartTheme
|
|
236
|
+
|
|
237
|
+
```typescript
|
|
238
|
+
interface ICartTheme {
|
|
239
|
+
backgroundColor: string;
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### ICartLayout
|
|
244
|
+
|
|
245
|
+
```typescript
|
|
246
|
+
interface ICartLayout {
|
|
247
|
+
showQuantityCounter: boolean;
|
|
248
|
+
quantityCounterStyle: 'outlined' | 'ghost';
|
|
249
|
+
drawerHeaderText: string;
|
|
250
|
+
goToCheckoutButtonText: string;
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
| Property | Type | Description |
|
|
255
|
+
|----------|------|-------------|
|
|
256
|
+
| `showQuantityCounter` | `boolean` | Show quantity counter in cart items |
|
|
257
|
+
| `quantityCounterStyle` | `'outlined' \| 'ghost'` | Visual style for quantity counter |
|
|
258
|
+
| `drawerHeaderText` | `string` | Header text for the cart drawer |
|
|
259
|
+
| `goToCheckoutButtonText` | `string` | Custom text for checkout button |
|
|
260
|
+
|
|
261
|
+
**Example:**
|
|
262
|
+
|
|
263
|
+
```javascript
|
|
264
|
+
customTheme: {
|
|
265
|
+
cart: {
|
|
266
|
+
theme: { backgroundColor: '#f8f9fa' },
|
|
267
|
+
layout: {
|
|
268
|
+
drawerHeaderText: 'Your Bag',
|
|
269
|
+
goToCheckoutButtonText: 'Proceed to Checkout'
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
---
|
|
276
|
+
|
|
277
|
+
### Checkout Theme
|
|
278
|
+
|
|
279
|
+
#### ICheckoutComponent
|
|
280
|
+
|
|
281
|
+
```typescript
|
|
282
|
+
interface ICheckoutComponent {
|
|
283
|
+
theme: ICheckoutTheme;
|
|
284
|
+
layout: ICheckoutLayout;
|
|
285
|
+
}
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
#### ICheckoutTheme
|
|
289
|
+
|
|
290
|
+
```typescript
|
|
291
|
+
interface ICheckoutTheme {
|
|
292
|
+
backgroundColor: string;
|
|
293
|
+
}
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
#### ICheckoutLayout
|
|
297
|
+
|
|
298
|
+
```typescript
|
|
299
|
+
interface ICheckoutLayout {
|
|
300
|
+
emailOptIn: ICheckoutMarketingOptIn;
|
|
301
|
+
smsOptIn: ICheckoutMarketingOptIn;
|
|
302
|
+
allowGiftCards: boolean;
|
|
303
|
+
legalMessage: ICheckoutLegalMessage;
|
|
304
|
+
continueShoppingUrl: string;
|
|
305
|
+
exitUrl: string;
|
|
306
|
+
thankYouButtonText: string;
|
|
307
|
+
drawerHeaderText: string;
|
|
308
|
+
placeOrderButtonText: string;
|
|
309
|
+
checkoutCompleted: ICheckoutCompleted;
|
|
310
|
+
}
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
| Property | Type | Description |
|
|
314
|
+
|----------|------|-------------|
|
|
315
|
+
| `emailOptIn` | `ICheckoutMarketingOptIn` | Email marketing opt-in configuration |
|
|
316
|
+
| `smsOptIn` | `ICheckoutMarketingOptIn` | SMS marketing opt-in configuration |
|
|
317
|
+
| `allowGiftCards` | `boolean` | Enable gift card payment option |
|
|
318
|
+
| `legalMessage` | `ICheckoutLegalMessage` | Legal/terms message configuration |
|
|
319
|
+
| `continueShoppingUrl` | `string` | URL for "Continue Shopping" link |
|
|
320
|
+
| `exitUrl` | `string` | URL for exit/back navigation |
|
|
321
|
+
| `thankYouButtonText` | `string` | Button text on order confirmation page |
|
|
322
|
+
| `drawerHeaderText` | `string` | Header text for checkout drawer |
|
|
323
|
+
| `placeOrderButtonText` | `string` | Custom text for place order button |
|
|
324
|
+
| `checkoutCompleted` | `ICheckoutCompleted` | Order confirmation page customization |
|
|
325
|
+
|
|
326
|
+
#### ICheckoutMarketingOptIn
|
|
327
|
+
|
|
328
|
+
```typescript
|
|
329
|
+
interface ICheckoutMarketingOptIn {
|
|
330
|
+
show: boolean; // Show the opt-in checkbox
|
|
331
|
+
checked: boolean; // Default checked state
|
|
332
|
+
text: string; // Label text (supports rich HTML)
|
|
333
|
+
}
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
#### ICheckoutLegalMessage
|
|
337
|
+
|
|
338
|
+
```typescript
|
|
339
|
+
interface ICheckoutLegalMessage {
|
|
340
|
+
show: boolean; // Show the legal message
|
|
341
|
+
text: string; // Message content (supports rich HTML)
|
|
342
|
+
}
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
#### ICheckoutCompleted
|
|
346
|
+
|
|
347
|
+
```typescript
|
|
348
|
+
interface ICheckoutCompleted {
|
|
349
|
+
customLogo: string; // URL to custom logo image
|
|
350
|
+
customText: string | null; // Custom confirmation text
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
**Example:**
|
|
355
|
+
|
|
356
|
+
```javascript
|
|
357
|
+
customTheme: {
|
|
358
|
+
checkout: {
|
|
359
|
+
layout: {
|
|
360
|
+
placeOrderButtonText: 'Complete Purchase',
|
|
361
|
+
emailOptIn: { show: true, checked: false, text: 'Subscribe to our newsletter' },
|
|
362
|
+
legalMessage: { show: true, text: 'By placing this order, you agree to our <a href="/terms">Terms</a>.' }
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
### Address Theme
|
|
371
|
+
|
|
372
|
+
#### IAddressComponent
|
|
373
|
+
|
|
374
|
+
```typescript
|
|
375
|
+
interface IAddressComponent {
|
|
376
|
+
theme: IAddressTheme;
|
|
377
|
+
}
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
#### IAddressTheme
|
|
381
|
+
|
|
382
|
+
```typescript
|
|
383
|
+
interface IAddressTheme {
|
|
384
|
+
backgroundColor: string;
|
|
385
|
+
}
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
### Product List Theme
|
|
391
|
+
|
|
392
|
+
#### IProductListComponent
|
|
393
|
+
|
|
394
|
+
```typescript
|
|
395
|
+
interface IProductListComponent {
|
|
396
|
+
theme: IProductListTheme;
|
|
397
|
+
layout: IProductListLayout;
|
|
398
|
+
}
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
Product list theme updates use a special structure where lists are keyed by slug:
|
|
402
|
+
|
|
403
|
+
```typescript
|
|
404
|
+
interface UpdateProductListComponent {
|
|
405
|
+
theme?: { backgroundColor?: string };
|
|
406
|
+
layout?: {
|
|
407
|
+
lists?: Record<string, DeepPartial<IPLCList>>;
|
|
408
|
+
};
|
|
409
|
+
}
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Example:**
|
|
413
|
+
|
|
414
|
+
```javascript
|
|
415
|
+
customTheme: {
|
|
416
|
+
productList: {
|
|
417
|
+
theme: { backgroundColor: '#ffffff' },
|
|
418
|
+
layout: {
|
|
419
|
+
lists: {
|
|
420
|
+
'best-sellers': {
|
|
421
|
+
productCard: {
|
|
422
|
+
style: 'card',
|
|
423
|
+
showPrice: true,
|
|
424
|
+
enablePreCart: true
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
---
|
|
434
|
+
|
|
435
|
+
## Promo Ticker Configuration
|
|
436
|
+
|
|
437
|
+
### IPromoTicker
|
|
438
|
+
|
|
439
|
+
```typescript
|
|
440
|
+
interface IPromoTicker {
|
|
441
|
+
promoCode: string; // Promo code to auto-apply
|
|
442
|
+
text: string[]; // Array of messages to rotate
|
|
443
|
+
separator: string; // Separator between messages (e.g., '|')
|
|
444
|
+
activeFrom: string; // Start date in ISO 8601 UTC format
|
|
445
|
+
activeUntil: string; // End date in ISO 8601 UTC format
|
|
446
|
+
}
|
|
447
|
+
```
|
|
448
|
+
|
|
449
|
+
**Example:**
|
|
450
|
+
|
|
451
|
+
```javascript
|
|
452
|
+
promoTicker: [
|
|
453
|
+
{
|
|
454
|
+
promoCode: 'SUMMER20',
|
|
455
|
+
text: ['20% Off Summer Sale', 'Free Shipping on $50+'],
|
|
456
|
+
separator: '|',
|
|
457
|
+
activeFrom: '2026-06-01T00:00:00Z',
|
|
458
|
+
activeUntil: '2026-08-31T23:59:59Z'
|
|
459
|
+
}
|
|
460
|
+
]
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## Checkout Configuration
|
|
466
|
+
|
|
467
|
+
### ILiquidCommerceElementsCheckoutConfig
|
|
468
|
+
|
|
469
|
+
```typescript
|
|
470
|
+
interface ILiquidCommerceElementsCheckoutConfig {
|
|
471
|
+
pageUrl?: string; // URL with {token} placeholder
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
When `pageUrl` is set, the cart's checkout button redirects to this URL instead of opening the checkout drawer. Use `{token}` as a placeholder for the checkout session token.
|
|
476
|
+
|
|
477
|
+
**Example:**
|
|
478
|
+
|
|
479
|
+
```javascript
|
|
480
|
+
checkout: {
|
|
481
|
+
pageUrl: 'https://yoursite.com/checkout?lce_checkout={token}'
|
|
482
|
+
}
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Proxy Configuration
|
|
488
|
+
|
|
489
|
+
### IElementsProxyConfig
|
|
490
|
+
|
|
491
|
+
```typescript
|
|
492
|
+
interface IElementsProxyConfig {
|
|
493
|
+
baseUrl: string;
|
|
494
|
+
headers?: Record<string, string>;
|
|
495
|
+
}
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
Route SDK API requests through your own server to avoid ad blockers.
|
|
499
|
+
|
|
500
|
+
See [Proxy Setup Guide](../integration/proxy-setup.md) for implementation details.
|
|
501
|
+
|
|
502
|
+
---
|
|
503
|
+
|
|
504
|
+
## Development Configuration
|
|
505
|
+
|
|
506
|
+
### ILiquidCommerceElementsDevelopmentConfig
|
|
507
|
+
|
|
508
|
+
```typescript
|
|
509
|
+
interface ILiquidCommerceElementsDevelopmentConfig {
|
|
510
|
+
customApiUrl?: string;
|
|
511
|
+
paymentMethodId?: string;
|
|
512
|
+
openShadowDom?: boolean;
|
|
513
|
+
}
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
| Property | Type | Description |
|
|
517
|
+
|----------|------|-------------|
|
|
518
|
+
| `customApiUrl` | `string` | Custom API URL for local or custom backend testing |
|
|
519
|
+
| `paymentMethodId` | `string` | Hardcoded Stripe payment method ID for automated testing |
|
|
520
|
+
| `openShadowDom` | `boolean` | Disable Shadow DOM isolation for debugging (default: `false`) |
|
|
521
|
+
|
|
522
|
+
---
|
|
523
|
+
|
|
524
|
+
## See Also
|
|
525
|
+
|
|
526
|
+
- [Client API](./client.md) - Client initialization and usage
|
|
527
|
+
- [TypeScript Types](./typescript-types.md) - Complete type reference
|
|
528
|
+
- [Theming Guide](../guides/theming.md) - Theming best practices
|