@liquidcommerce/elements-sdk 2.7.2 → 2.7.4
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 +1 -1
- package/dist/index.checkout.esm.js +7345 -7451
- package/dist/index.esm.js +12318 -12512
- package/dist/ssr-stub.checkout.esm.js +18 -0
- package/dist/ssr-stub.esm.js +270 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +3 -1
- package/dist/types/clients/base.d.ts +7 -4
- package/dist/types/clients/builder.d.ts +2 -1
- package/dist/types/clients/checkout.d.ts +2 -10
- package/dist/types/clients/helpers.d.ts +1 -1
- package/dist/types/clients/main.d.ts +2 -1
- package/dist/types/constants/core.constant.d.ts +0 -6
- package/dist/types/core/api/api-client.service.d.ts +16 -15
- package/dist/types/core/api/api-result.d.ts +19 -0
- package/dist/types/core/api/auth-client.service.d.ts +13 -5
- package/dist/types/core/client/client-action.service.d.ts +1 -1
- package/dist/types/core/client/client-config.service.d.ts +1 -1
- package/dist/types/core/pubsub/pubsub.service.d.ts +0 -2
- package/dist/types/core/singleton-manager.service.d.ts +12 -8
- package/dist/types/core/store/interfaces/core.interface.d.ts +8 -12
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +12 -28
- package/dist/types/core/store/store.constant.d.ts +2 -1
- 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 +5 -4
- package/dist/types/index.checkout.d.ts +3 -2
- package/dist/types/index.checkout.umd.d.ts +1 -1
- package/dist/types/index.d.ts +4 -1
- package/dist/types/interfaces/api/product-list.interface.d.ts +2 -1
- 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 +46 -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 +1 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +2 -2
- package/dist/types/interfaces/configs/product-list.interface.d.ts +34 -20
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -1
- package/dist/types/interfaces/injection.interface.d.ts +47 -0
- package/dist/types/modules/address/address-input.component.d.ts +0 -11
- package/dist/types/modules/address/address.command.d.ts +1 -1
- package/dist/types/modules/checkout/components/checkout-completed.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-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 +1 -3
- package/dist/types/modules/product-list/components/card-components/index.d.ts +0 -2
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +1 -3
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +3 -4
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -5
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +0 -6
- package/dist/types/modules/product-list/components/index.d.ts +1 -1
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +7 -5
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +4 -5
- 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 +32 -14
- package/dist/types/modules/product-list/components/product-list-search.component.d.ts +4 -3
- package/dist/types/modules/product-list/product-list-card.component.d.ts +20 -16
- 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 +16 -62
- package/dist/types/modules/product-list/product-list.component.d.ts +3 -11
- package/dist/types/modules/product-list/product-list.constants.d.ts +0 -1
- package/dist/types/modules/product-list/product-list.interface.d.ts +0 -30
- 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 +2 -10
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +5 -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 +6 -4
- package/dist/types/ssr/stub.checkout.d.ts +6 -0
- package/dist/types/ssr/stub.d.ts +10 -0
- package/dist/types/utils/product-selection.d.ts +16 -0
- package/dist/types/utils/product.d.ts +10 -0
- package/docs/v1/README.md +2 -2
- package/docs/v1/api/actions/address-actions.md +11 -11
- package/docs/v1/api/actions/cart-actions.md +13 -13
- package/docs/v1/api/actions/checkout-actions.md +23 -23
- package/docs/v1/api/actions/product-actions.md +6 -6
- package/docs/v1/api/client.md +11 -11
- package/docs/v1/api/ui-helpers.md +11 -11
- package/docs/v1/examples/advanced-patterns.md +1 -1
- package/docs/v1/examples/checkout-flow.md +1 -1
- package/docs/v1/getting-started/concepts.md +7 -7
- package/docs/v1/getting-started/installation.md +2 -2
- package/docs/v1/getting-started/quick-start.md +3 -3
- package/docs/v1/guides/address-component.md +11 -11
- package/docs/v1/guides/best-practices.md +14 -14
- package/docs/v1/guides/cart-component.md +23 -23
- package/docs/v1/guides/checkout-component.md +24 -24
- package/docs/v1/guides/product-component.md +5 -5
- package/docs/v1/integration/nextjs.md +11 -2
- package/docs/v1/integration/react.md +3 -3
- package/docs/v1/integration/vanilla-js.md +1 -1
- package/docs/v1/integration/vue.md +24 -0
- package/docs/v1/reference/error-handling.md +2 -2
- package/docs/v1/reference/troubleshooting.md +10 -2
- package/package.json +17 -13
- package/dist/types/interfaces/core.interface.d.ts +0 -140
- package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +0 -12
- package/dist/types/modules/product-list/components/card-components/product-title.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +0 -26
- package/dist/types/modules/ui-components/modal/modal.component.d.ts +0 -23
- package/dist/types/modules/ui-components/styles/modal.style.d.ts +0 -1
- package/docs/gitbook/actions.md +0 -964
- package/docs/gitbook/address.md +0 -48
- package/docs/gitbook/cart.md +0 -65
- package/docs/gitbook/checkout.md +0 -131
- package/docs/gitbook/events.md +0 -1765
- package/docs/gitbook/overview.md +0 -166
- package/docs/gitbook/product.md +0 -64
- package/docs/gitbook/quick-start-guide.md +0 -393
|
@@ -28,6 +28,30 @@ onMounted(async () => {
|
|
|
28
28
|
</script>
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
+
## Nuxt 3
|
|
32
|
+
|
|
33
|
+
The SDK is SSR-safe out of the box. When Nuxt evaluates the import on the server, a lightweight stub is resolved automatically — no `<ClientOnly>`, `process.client` checks, or dynamic imports required.
|
|
34
|
+
|
|
35
|
+
```vue
|
|
36
|
+
<template>
|
|
37
|
+
<div id="product"></div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script setup>
|
|
41
|
+
import { onMounted } from 'vue';
|
|
42
|
+
import { Elements } from '@liquidcommerce/elements-sdk';
|
|
43
|
+
|
|
44
|
+
onMounted(async () => {
|
|
45
|
+
const client = await Elements('YOUR_API_KEY', { env: 'production' });
|
|
46
|
+
await client.injectProductElement([
|
|
47
|
+
{ containerId: 'product', identifier: '00619947000020' }
|
|
48
|
+
]);
|
|
49
|
+
});
|
|
50
|
+
</script>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
During SSR, `Elements()` returns `null` and logs a warning. All types and enums remain available for TypeScript.
|
|
54
|
+
|
|
31
55
|
## Related Docs
|
|
32
56
|
|
|
33
57
|
- [Product Component](../guides/product-component.md)
|
|
@@ -19,7 +19,7 @@ class SDKError extends Error {
|
|
|
19
19
|
|
|
20
20
|
```javascript
|
|
21
21
|
try {
|
|
22
|
-
await window.elements.injectProductElement([
|
|
22
|
+
await window.LiquidCommerce.elements.injectProductElement([
|
|
23
23
|
{ containerId: 'product', identifier: 'invalid_id' }
|
|
24
24
|
]);
|
|
25
25
|
} catch (error) {
|
|
@@ -34,7 +34,7 @@ try {
|
|
|
34
34
|
The SDK catches and contains its own errors so your app keeps running:
|
|
35
35
|
|
|
36
36
|
```javascript
|
|
37
|
-
window.elements.actions.cart.addProduct([/* invalid */]);
|
|
37
|
+
window.LiquidCommerce.elements.actions.cart.addProduct([/* invalid */]);
|
|
38
38
|
console.log('App still working');
|
|
39
39
|
```
|
|
40
40
|
|
|
@@ -4,7 +4,7 @@ Common setup issues and how to resolve them.
|
|
|
4
4
|
|
|
5
5
|
## SDK Script Not Loading
|
|
6
6
|
|
|
7
|
-
**Symptoms:** 404/CORS in Network tab, `window.elements` is undefined.
|
|
7
|
+
**Symptoms:** 404/CORS in Network tab, `window.LiquidCommerce.elements` is undefined.
|
|
8
8
|
|
|
9
9
|
**Fixes:**
|
|
10
10
|
- Verify the script URL and that the tag includes `data-liquid-commerce-elements`.
|
|
@@ -36,7 +36,7 @@ Common setup issues and how to resolve them.
|
|
|
36
36
|
**Symptoms:** Add to cart works but cart stays closed.
|
|
37
37
|
|
|
38
38
|
**Fixes:**
|
|
39
|
-
- Ensure a cart button is configured or call `window.elements.actions.cart.openCart()`.
|
|
39
|
+
- Ensure a cart button is configured or call `window.LiquidCommerce.elements.actions.cart.openCart()`.
|
|
40
40
|
- Check for JavaScript errors in the console.
|
|
41
41
|
|
|
42
42
|
## Checkout Issues
|
|
@@ -56,6 +56,14 @@ Common setup issues and how to resolve them.
|
|
|
56
56
|
- Make sure the address is set and valid.
|
|
57
57
|
- Listen for `lce:actions.address_failed` to surface errors.
|
|
58
58
|
|
|
59
|
+
## SSR / Server-Side Rendering
|
|
60
|
+
|
|
61
|
+
**Symptoms:** Console warning "This SDK is designed for the browser. Calls made during SSR return null."
|
|
62
|
+
|
|
63
|
+
This is expected behavior. The SDK ships an SSR stub that is automatically resolved when bundled for Node.js (via the `node` export condition in `package.json`). The stub exports all types and enums for TypeScript compatibility and returns `null` from factory functions (`Elements`, `ElementsBuilder`, `ElementsCheckout`).
|
|
64
|
+
|
|
65
|
+
**No action required** — initialize the SDK in a client-only lifecycle hook (`useEffect`, `onMounted`, etc.) and the real client will activate in the browser.
|
|
66
|
+
|
|
59
67
|
## Related Docs
|
|
60
68
|
|
|
61
69
|
- [Installation](../getting-started/installation.md)
|
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.7.
|
|
6
|
+
"version": "2.7.4",
|
|
7
7
|
"homepage": "https://docs.liquidcommerce.co/elements-sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -18,11 +18,15 @@
|
|
|
18
18
|
"exports": {
|
|
19
19
|
".": {
|
|
20
20
|
"types": "./dist/types/index.d.ts",
|
|
21
|
+
"node": "./dist/ssr-stub.esm.js",
|
|
22
|
+
"browser": "./dist/index.esm.js",
|
|
21
23
|
"import": "./dist/index.esm.js",
|
|
22
24
|
"default": "./dist/index.esm.js"
|
|
23
25
|
},
|
|
24
26
|
"./checkout": {
|
|
25
27
|
"types": "./dist/types/index.checkout.d.ts",
|
|
28
|
+
"node": "./dist/ssr-stub.checkout.esm.js",
|
|
29
|
+
"browser": "./dist/index.checkout.esm.js",
|
|
26
30
|
"import": "./dist/index.checkout.esm.js",
|
|
27
31
|
"default": "./dist/index.checkout.esm.js"
|
|
28
32
|
},
|
|
@@ -30,7 +34,7 @@
|
|
|
30
34
|
},
|
|
31
35
|
"files": [
|
|
32
36
|
"dist",
|
|
33
|
-
"docs",
|
|
37
|
+
"docs/v1",
|
|
34
38
|
"README.md",
|
|
35
39
|
"LICENSE"
|
|
36
40
|
],
|
|
@@ -52,15 +56,15 @@
|
|
|
52
56
|
"scripts": {
|
|
53
57
|
"build": "rollup -c",
|
|
54
58
|
"build:checkout": "rollup -c rollup.config.checkout.mjs",
|
|
55
|
-
"build:
|
|
59
|
+
"build:all": "pnpm build && pnpm build:checkout",
|
|
56
60
|
"dev": "rollup -c -w",
|
|
57
61
|
"type-check": "tsc --noEmit",
|
|
58
62
|
"lint": "pnpm biome lint --write",
|
|
59
63
|
"format": "biome format --write",
|
|
60
64
|
"check": "pnpm biome check --write .",
|
|
61
|
-
"fl": "pnpm check && pnpm
|
|
65
|
+
"fl": "pnpm check && pnpm tsc --noEmit",
|
|
62
66
|
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s",
|
|
63
|
-
"clean": "rm -rf dist umd node_modules && pnpm install && pnpm build
|
|
67
|
+
"clean": "rm -rf dist umd node_modules && pnpm install && pnpm build:all",
|
|
64
68
|
"prepublishOnly": "pnpm run build",
|
|
65
69
|
"deprecate:old": "npm deprecate @liquidcommerceteam/elements-sdk@\"*\" \"Package moved to @liquidcommerce/elements-sdk\"",
|
|
66
70
|
"prepare": "husky"
|
|
@@ -77,9 +81,9 @@
|
|
|
77
81
|
"embeddable commerce"
|
|
78
82
|
],
|
|
79
83
|
"devDependencies": {
|
|
80
|
-
"@biomejs/biome": "2.3.
|
|
81
|
-
"@commitlint/cli": "^20.
|
|
82
|
-
"@commitlint/config-conventional": "^20.
|
|
84
|
+
"@biomejs/biome": "^2.3.14",
|
|
85
|
+
"@commitlint/cli": "^20.4.1",
|
|
86
|
+
"@commitlint/config-conventional": "^20.4.1",
|
|
83
87
|
"@rollup/plugin-alias": "^6.0.0",
|
|
84
88
|
"@rollup/plugin-commonjs": "^29.0.0",
|
|
85
89
|
"@rollup/plugin-json": "^6.1.0",
|
|
@@ -89,18 +93,18 @@
|
|
|
89
93
|
"@semantic-release/changelog": "^6.0.3",
|
|
90
94
|
"@semantic-release/commit-analyzer": "^13.0.1",
|
|
91
95
|
"@semantic-release/git": "^10.0.1",
|
|
92
|
-
"@semantic-release/github": "^12.0.
|
|
93
|
-
"@semantic-release/npm": "^13.1.
|
|
96
|
+
"@semantic-release/github": "^12.0.5",
|
|
97
|
+
"@semantic-release/npm": "^13.1.4",
|
|
94
98
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
95
99
|
"@types/core-js": "^2.5.8",
|
|
96
|
-
"@types/node": "^25.
|
|
100
|
+
"@types/node": "^25.2.3",
|
|
97
101
|
"conventional-changelog-cli": "^5.0.0",
|
|
98
102
|
"husky": "^9.1.7",
|
|
99
103
|
"process": "^0.11.10",
|
|
100
|
-
"rollup": "^4.
|
|
104
|
+
"rollup": "^4.57.1",
|
|
101
105
|
"rollup-obfuscator": "^4.1.1",
|
|
102
106
|
"rollup-plugin-typescript2": "^0.36.0",
|
|
103
|
-
"semantic-release": "^25.0.
|
|
107
|
+
"semantic-release": "^25.0.3",
|
|
104
108
|
"ts-node": "^10.9.2",
|
|
105
109
|
"typescript": "^5.9.3"
|
|
106
110
|
},
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import type { PRODUCT_LIST_FILTER_TYPES } from '@/constants';
|
|
2
|
-
import type { IAddressActions } from '@/core/client/actions/client-address-action.service';
|
|
3
|
-
import type { ICartActions } from '@/core/client/actions/client-cart-action.service';
|
|
4
|
-
import type { ICheckoutActions } from '@/core/client/actions/client-checkout-action.service';
|
|
5
|
-
import type { IProductActions } from '@/core/client/actions/client-product-action.service';
|
|
6
|
-
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
7
|
-
import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
|
|
8
|
-
import type { IAddressOptions } from '@/modules/address/address.interface';
|
|
9
|
-
import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
|
|
10
|
-
export type DeepPartial<T> = {
|
|
11
|
-
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
|
|
12
|
-
};
|
|
13
|
-
export interface IElementsProxyConfig {
|
|
14
|
-
baseUrl: string;
|
|
15
|
-
headers?: Record<string, string>;
|
|
16
|
-
}
|
|
17
|
-
export interface ILiquidCommerceElementsDevelopmentConfig {
|
|
18
|
-
customApiUrl?: string;
|
|
19
|
-
paymentMethodId?: string;
|
|
20
|
-
openShadowDom?: boolean;
|
|
21
|
-
}
|
|
22
|
-
export interface IClientCustomThemeConfig {
|
|
23
|
-
global?: UpdateComponentGlobalConfigs;
|
|
24
|
-
product?: UpdateProductComponent;
|
|
25
|
-
address?: UpdateAddressComponent;
|
|
26
|
-
cart?: UpdateCartComponent;
|
|
27
|
-
checkout?: UpdateCheckoutComponent;
|
|
28
|
-
}
|
|
29
|
-
export interface ILiquidCommerceElementsCheckoutConfig {
|
|
30
|
-
pageUrl: string;
|
|
31
|
-
}
|
|
32
|
-
export interface ILiquidCommerceElementsBaseConfig {
|
|
33
|
-
env?: ElementsEnv;
|
|
34
|
-
promoTicker?: IPromoTicker[];
|
|
35
|
-
customTheme?: IClientCustomThemeConfig;
|
|
36
|
-
debugMode?: DebugMode;
|
|
37
|
-
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
38
|
-
}
|
|
39
|
-
export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
|
|
40
|
-
}
|
|
41
|
-
export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
|
|
42
|
-
proxy?: IElementsProxyConfig;
|
|
43
|
-
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
44
|
-
}
|
|
45
|
-
export interface ILiquidCommerceElementsCheckoutClientConfig {
|
|
46
|
-
env?: ElementsEnv;
|
|
47
|
-
customTheme?: IClientCustomThemeConfig;
|
|
48
|
-
debugMode?: DebugMode;
|
|
49
|
-
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
50
|
-
proxy?: IElementsProxyConfig;
|
|
51
|
-
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
52
|
-
}
|
|
53
|
-
export interface IInjectProductElement {
|
|
54
|
-
containerId: string;
|
|
55
|
-
identifier: string;
|
|
56
|
-
}
|
|
57
|
-
export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
|
|
58
|
-
export interface IInjectProductListParams {
|
|
59
|
-
containerId: string;
|
|
60
|
-
rows?: number;
|
|
61
|
-
columns?: number;
|
|
62
|
-
filters?: ProductListFilterType[];
|
|
63
|
-
productUrl?: string;
|
|
64
|
-
}
|
|
65
|
-
export interface IInjectProductListSearchParams {
|
|
66
|
-
containerId: string;
|
|
67
|
-
}
|
|
68
|
-
export interface IInjectProductListFiltersParams {
|
|
69
|
-
containerId: string;
|
|
70
|
-
filters: ProductListFilterType[];
|
|
71
|
-
}
|
|
72
|
-
export interface IBuilderInjectElementParams {
|
|
73
|
-
type: ComponentType;
|
|
74
|
-
containerId: string;
|
|
75
|
-
[key: string]: any;
|
|
76
|
-
}
|
|
77
|
-
export interface IInjectedComponent {
|
|
78
|
-
getType(): ComponentType;
|
|
79
|
-
getElement(): HTMLElement;
|
|
80
|
-
rerender(): void;
|
|
81
|
-
}
|
|
82
|
-
export interface IProcessInjectElementParams {
|
|
83
|
-
type: ComponentType;
|
|
84
|
-
containerId: string;
|
|
85
|
-
identifier?: string;
|
|
86
|
-
options?: IAddressOptions;
|
|
87
|
-
checkoutId?: string;
|
|
88
|
-
hideHeader?: boolean;
|
|
89
|
-
}
|
|
90
|
-
export interface IInjectCheckoutParams {
|
|
91
|
-
containerId: string;
|
|
92
|
-
checkoutId?: string;
|
|
93
|
-
hideHeader?: boolean;
|
|
94
|
-
}
|
|
95
|
-
export interface IInjectCheckoutBuilderParams extends IInjectCheckoutParams {
|
|
96
|
-
simulatePresale?: boolean;
|
|
97
|
-
presaleExpiresInMinutes?: number;
|
|
98
|
-
}
|
|
99
|
-
export interface ILiquidCommerceElementsUIMethod {
|
|
100
|
-
cartButton(containerId: string, showItemsCount?: boolean): void;
|
|
101
|
-
floatingCartButton(showItemsCount?: boolean): void;
|
|
102
|
-
cartSubtotal(elementId: string): void;
|
|
103
|
-
cartItemsCount(elementId: string, options?: {
|
|
104
|
-
hideZero: boolean;
|
|
105
|
-
}): void;
|
|
106
|
-
}
|
|
107
|
-
export interface ILiquidCommerceElementsActions {
|
|
108
|
-
product: IProductActions;
|
|
109
|
-
address: IAddressActions;
|
|
110
|
-
cart: ICartActions;
|
|
111
|
-
checkout: ICheckoutActions;
|
|
112
|
-
}
|
|
113
|
-
export interface ILiquidCommerceElementsBuilderClient {
|
|
114
|
-
updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
|
|
115
|
-
updateProductComponent(configs: UpdateProductComponent): Promise<void>;
|
|
116
|
-
updateAddressComponent(configs: UpdateAddressComponent): void;
|
|
117
|
-
updateCartComponent(configs: UpdateCartComponent): void;
|
|
118
|
-
updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
|
|
119
|
-
injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
|
|
120
|
-
injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
|
|
121
|
-
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
|
|
122
|
-
injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
|
|
123
|
-
injectCheckoutElement(params: IInjectCheckoutBuilderParams): Promise<IInjectedComponent | null>;
|
|
124
|
-
injectProductList(params: IInjectProductListParams): Promise<void>;
|
|
125
|
-
actions: ILiquidCommerceElementsActions;
|
|
126
|
-
}
|
|
127
|
-
export interface ILiquidCommerceElementsClient {
|
|
128
|
-
injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
|
|
129
|
-
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
|
|
130
|
-
injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
|
|
131
|
-
injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
|
|
132
|
-
injectProductList(params: IInjectProductListParams): Promise<void>;
|
|
133
|
-
injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
|
|
134
|
-
injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
|
|
135
|
-
ui: ILiquidCommerceElementsUIMethod;
|
|
136
|
-
actions: ILiquidCommerceElementsActions;
|
|
137
|
-
getInjectedComponents(): Map<string, IInjectedComponent>;
|
|
138
|
-
}
|
|
139
|
-
export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
|
|
140
|
-
export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
|
package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { IProductFulfillmentStore } from 'core/store/interfaces/product.interface';
|
|
2
|
-
import { type NavigationSourceType } from 'enums';
|
|
3
|
-
export interface IFulfillmentSectionParams {
|
|
4
|
-
shippingVariants: Record<string, IProductFulfillmentStore>;
|
|
5
|
-
onDemandVariants: Record<string, IProductFulfillmentStore>;
|
|
6
|
-
enableShippingFulfillment: boolean;
|
|
7
|
-
enableOnDemandFulfillment: boolean;
|
|
8
|
-
productId: string;
|
|
9
|
-
navigationSource?: NavigationSourceType;
|
|
10
|
-
onDeliveryOptionsClick: (productId: string) => void | Promise<void>;
|
|
11
|
-
}
|
|
12
|
-
export declare const createFulfillmentSection: (params: IFulfillmentSectionParams) => HTMLElement;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import type { IProductListProduct } from 'core/store/interfaces/product-list.interface';
|
|
2
|
-
import { type DisplayModeType, type NavigationSourceType } from 'enums';
|
|
3
|
-
import type { IFulfillment } from 'interfaces/api/product.interface';
|
|
4
|
-
import type { IProductListComponent } from 'interfaces/configs';
|
|
5
|
-
import { BaseComponent } from '@/core/base-component.service';
|
|
6
|
-
export interface IProductListRetailersParams {
|
|
7
|
-
product?: IProductListProduct;
|
|
8
|
-
productId: string;
|
|
9
|
-
config?: IProductListComponent;
|
|
10
|
-
displayMode?: DisplayModeType;
|
|
11
|
-
navigationSource?: NavigationSourceType;
|
|
12
|
-
shippingFulfillment?: IFulfillment | null;
|
|
13
|
-
onDemandFulfillment?: IFulfillment | null;
|
|
14
|
-
}
|
|
15
|
-
export declare class ProductListRetailersComponent extends BaseComponent<IProductListRetailersParams, IProductListComponent> {
|
|
16
|
-
get hostClasses(): string[];
|
|
17
|
-
constructor();
|
|
18
|
-
private getProductId;
|
|
19
|
-
protected template(): HTMLElement[];
|
|
20
|
-
private extractFulfillments;
|
|
21
|
-
private onFulfillmentTabClick;
|
|
22
|
-
private onRetailerCardClick;
|
|
23
|
-
private reopenAddToCartDrawer;
|
|
24
|
-
private createHeader;
|
|
25
|
-
private createNoAvailabilityMessage;
|
|
26
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
2
|
-
export declare class ModalComponent extends BaseComponent {
|
|
3
|
-
private isOpen;
|
|
4
|
-
private wrapperElement;
|
|
5
|
-
private modalElement;
|
|
6
|
-
private backdropElement;
|
|
7
|
-
private contentContainer;
|
|
8
|
-
private currentContentType;
|
|
9
|
-
private readonly boundHandleKeydown;
|
|
10
|
-
constructor();
|
|
11
|
-
disconnected(): void;
|
|
12
|
-
onStoreChanged(changes: IOnStoreChanged[]): boolean;
|
|
13
|
-
private openWithContent;
|
|
14
|
-
private open;
|
|
15
|
-
private close;
|
|
16
|
-
private cleanupCurrentContent;
|
|
17
|
-
private handleBackdropClick;
|
|
18
|
-
private handleKeydown;
|
|
19
|
-
private updateModalContentTypeClass;
|
|
20
|
-
private updateModalState;
|
|
21
|
-
private isElementsEnabled;
|
|
22
|
-
protected template(): HTMLElement;
|
|
23
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getModalStyles(): string;
|