@liquidcommerce/elements-sdk 2.6.0-beta.4 → 2.6.0-beta.40
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 +156 -2500
- package/dist/index.checkout.esm.js +16087 -0
- package/dist/index.esm.js +16301 -14189
- package/dist/types/auto-initialize/checkout.d.ts +2 -0
- package/dist/types/auto-initialize/shared-utils.d.ts +22 -0
- package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +11 -1
- package/dist/types/clients/checkout.d.ts +13 -0
- package/dist/types/constants/core.constant.d.ts +5 -3
- package/dist/types/core/api/api-client.service.d.ts +10 -12
- package/dist/types/core/api/auth-client.service.d.ts +31 -9
- package/dist/types/core/api/http-client.service.d.ts +0 -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 +50 -0
- package/dist/types/core/client/actions/client-product-action.service.d.ts +12 -0
- package/dist/types/core/client/client-action.service.d.ts +6 -70
- package/dist/types/core/client/client-config.service.d.ts +3 -2
- package/dist/types/core/command/common-command.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +4 -1
- package/dist/types/core/logger/logger.service.d.ts +1 -1
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
- package/dist/types/core/store/interfaces/core.interface.d.ts +18 -3
- package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
- package/dist/types/core/store/interfaces/product-list.interface.d.ts +45 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +3 -1
- package/dist/types/core/store/store.constant.d.ts +4 -0
- package/dist/types/enums/core.enum.d.ts +38 -1
- package/dist/types/enums/index.d.ts +0 -1
- package/dist/types/index.checkout.d.ts +7 -0
- package/dist/types/index.checkout.umd.d.ts +4 -0
- package/dist/types/index.d.ts +2 -2
- package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
- package/dist/types/interfaces/api/checkout.interface.d.ts +217 -0
- package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
- package/dist/types/interfaces/api/product.interface.d.ts +5 -7
- package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -0
- package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
- package/dist/types/interfaces/configs/index.d.ts +1 -0
- package/dist/types/interfaces/configs/product-list.interface.d.ts +28 -0
- package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
- package/dist/types/interfaces/core.interface.d.ts +34 -6
- package/dist/types/modules/address/address-input.component.d.ts +11 -0
- package/dist/types/modules/address/address.command.d.ts +1 -0
- package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/cart/cart.commands.d.ts +4 -5
- package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/checkout/checkout.commands.d.ts +22 -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 +2 -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-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/product.commands.d.ts +1 -0
- package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
- package/dist/types/modules/product-list/components/card-components/index.d.ts +7 -0
- package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
- package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +12 -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 +10 -0
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
- package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -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 +13 -0
- package/dist/types/modules/product-list/components/index.d.ts +7 -3
- 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-engraving.component.d.ts +10 -0
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -37
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
- package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +26 -0
- package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
- package/dist/types/modules/product-list/product-list-card.component.d.ts +30 -0
- package/dist/types/modules/product-list/product-list.commands.d.ts +64 -4
- package/dist/types/modules/product-list/product-list.component.d.ts +16 -44
- package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
- package/dist/types/modules/product-list/product-list.interface.d.ts +37 -31
- 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 -1
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +14 -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/modal/modal.component.d.ts +23 -0
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/modules/ui-components/styles/modal.style.d.ts +1 -0
- package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
- 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/format.d.ts +0 -14
- package/docs/actions.md +320 -0
- package/docs/address.md +242 -0
- package/docs/cart.md +387 -0
- package/docs/checkout.md +420 -0
- package/docs/{CONFIGURATION.md → configuration.md} +212 -48
- package/docs/events.md +181 -0
- package/docs/product-list.md +311 -0
- package/docs/product.md +250 -0
- package/docs/{THEMING.md → theming.md} +110 -20
- package/docs/{TROUBLESHOOTING.md → troubleshooting.md} +6 -6
- package/package.json +20 -13
- package/dist/types/enums/cloud.enum.d.ts +0 -403
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
- package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
- package/dist/types/interfaces/cloud/index.d.ts +0 -5
- 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/modules/cart/cart.commands.helper.d.ts +0 -9
- package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
- 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-search.component.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/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
- package/dist/types/utils/helper.d.ts +0 -27
- package/docs/ACTIONS.md +0 -1300
- package/docs/DOCUMENTATION_INDEX.md +0 -311
- package/docs/EVENTS.md +0 -798
- package/umd/elements.js +0 -1
- /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
- /package/dist/types/{elements-builder-client.d.ts → clients/builder.d.ts} +0 -0
- /package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +0 -0
- /package/dist/types/{elements-client.d.ts → clients/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
- /package/docs/{BROWSER_SUPPORT.md → browser-support.md} +0 -0
- /package/docs/{PROXY.md → proxy.md} +0 -0
|
@@ -2,11 +2,15 @@ import type { IAddressStore } from '@/core/store/interfaces/address.interface';
|
|
|
2
2
|
import type { ICartStore } from '@/core/store/interfaces/cart.interface';
|
|
3
3
|
import type { ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
|
|
4
4
|
import type { IGlobalStore, IUIStore } from '@/core/store/interfaces/core.interface';
|
|
5
|
+
import type { IElementsMetadataStore } from '@/core/store/interfaces/metadata.interface';
|
|
5
6
|
import type { IProductStore } from '@/core/store/interfaces/product.interface';
|
|
7
|
+
import type { IProductListStore } from './interfaces/product-list.interface';
|
|
6
8
|
export declare const LOCAL_STORAGE_PREFIX = "lce";
|
|
7
9
|
export declare const initialAddressState: IAddressStore;
|
|
8
10
|
export declare const initialProductState: IProductStore;
|
|
9
11
|
export declare const initialCartState: ICartStore;
|
|
10
12
|
export declare const initialCheckoutState: ICheckoutStore;
|
|
11
13
|
export declare const initialUIState: IUIStore;
|
|
14
|
+
export declare const initialMetadataState: IElementsMetadataStore;
|
|
15
|
+
export declare const initialProductsListState: IProductListStore;
|
|
12
16
|
export declare const initialStoreState: IGlobalStore;
|
|
@@ -32,6 +32,7 @@ export declare const ELEMENTS_ACTIONS_EVENT: {
|
|
|
32
32
|
readonly CART_PROMO_CODE_FAILED: "cart_promo_code_failed";
|
|
33
33
|
readonly CART_PRODUCT_ADD_SUCCESS: "cart_product_add_success";
|
|
34
34
|
readonly CART_PRODUCT_ADD_FAILED: "cart_product_add_failed";
|
|
35
|
+
readonly INTERNAL_CART_TO_CHECKOUT: "internal_cart_to_checkout";
|
|
35
36
|
readonly CHECKOUT_LOADED: "checkout_loaded";
|
|
36
37
|
readonly CHECKOUT_OPENED: "checkout_opened";
|
|
37
38
|
readonly CHECKOUT_CLOSED: "checkout_closed";
|
|
@@ -67,7 +68,6 @@ export declare const ELEMENTS_FORM: {
|
|
|
67
68
|
export declare const COMPONENT_TYPE: {
|
|
68
69
|
readonly DRAWER: "drawer";
|
|
69
70
|
readonly INPUT: "input";
|
|
70
|
-
readonly BIRTHDATE_INPUT: "birthdate-input";
|
|
71
71
|
readonly ENGRAVING_FORM: "engraving-form";
|
|
72
72
|
readonly ENGRAVING_VIEW: "engraving-view";
|
|
73
73
|
readonly BUTTONS_CART_OPEN: "buttons-cart-open";
|
|
@@ -76,6 +76,7 @@ export declare const COMPONENT_TYPE: {
|
|
|
76
76
|
readonly PURCHASE_MIN_ALERT: "purchase-min-alert";
|
|
77
77
|
readonly ALERT: "alert";
|
|
78
78
|
readonly PROMO_CODE_TICKER: "promo-code-ticker";
|
|
79
|
+
readonly MODAL: "modal";
|
|
79
80
|
readonly ADDRESS: "address";
|
|
80
81
|
readonly ADDRESS_INPUT: "address-input";
|
|
81
82
|
readonly ADDRESS_DISPLAY: "address-display";
|
|
@@ -97,6 +98,9 @@ export declare const COMPONENT_TYPE: {
|
|
|
97
98
|
readonly PRODUCT_LIST_FILTERS: "product-list-filters";
|
|
98
99
|
readonly PRODUCT_LIST_SEARCH: "product-list-search";
|
|
99
100
|
readonly PRODUCT_LIST_CARD_LOADING: "product-list-card-loading";
|
|
101
|
+
readonly PRODUCT_LIST_RETAILERS: "product-list-retailers";
|
|
102
|
+
readonly PRODUCT_LIST_ENGRAVING_FORM: "product-list-engraving-form";
|
|
103
|
+
readonly PRODUCT_LIST_PRODUCT_PRE_CART: "product-list-product-pre-cart";
|
|
100
104
|
readonly CART: "cart";
|
|
101
105
|
readonly CART_RETAILER: "cart-retailer";
|
|
102
106
|
readonly CART_ITEM: "cart-item";
|
|
@@ -146,3 +150,36 @@ export declare const DEBUG_MODE: {
|
|
|
146
150
|
readonly PANEL: "panel";
|
|
147
151
|
};
|
|
148
152
|
export type DebugMode = (typeof DEBUG_MODE)[keyof typeof DEBUG_MODE];
|
|
153
|
+
export declare const CART_EVENT_TYPE: {
|
|
154
|
+
readonly GENERIC: "generic";
|
|
155
|
+
readonly PROMO_CODE: "promo-code";
|
|
156
|
+
};
|
|
157
|
+
export type CartEventType = (typeof CART_EVENT_TYPE)[keyof typeof CART_EVENT_TYPE];
|
|
158
|
+
export declare const CART_EVENT_LEVEL: {
|
|
159
|
+
readonly SUCCESS: "success";
|
|
160
|
+
readonly WARNING: "warning";
|
|
161
|
+
readonly ERROR: "error";
|
|
162
|
+
};
|
|
163
|
+
export type CartEventLevel = (typeof CART_EVENT_LEVEL)[keyof typeof CART_EVENT_LEVEL];
|
|
164
|
+
export declare const CHECKOUT_EVENT_TYPE: {
|
|
165
|
+
readonly GENERIC: "generic";
|
|
166
|
+
readonly PROMO_CODE: "promo-code";
|
|
167
|
+
readonly GIFT_CARD: "gift-card";
|
|
168
|
+
};
|
|
169
|
+
export type CheckoutEventType = (typeof CHECKOUT_EVENT_TYPE)[keyof typeof CHECKOUT_EVENT_TYPE];
|
|
170
|
+
export declare const CHECKOUT_EVENT_LEVEL: {
|
|
171
|
+
readonly SUCCESS: "success";
|
|
172
|
+
readonly WARNING: "warning";
|
|
173
|
+
readonly ERROR: "error";
|
|
174
|
+
};
|
|
175
|
+
export type CheckoutEventLevel = (typeof CHECKOUT_EVENT_LEVEL)[keyof typeof CHECKOUT_EVENT_LEVEL];
|
|
176
|
+
export declare const DISPLAY_MODE: {
|
|
177
|
+
readonly MODAL: "modal";
|
|
178
|
+
readonly DRAWER: "drawer";
|
|
179
|
+
};
|
|
180
|
+
export type DisplayModeType = (typeof DISPLAY_MODE)[keyof typeof DISPLAY_MODE];
|
|
181
|
+
export declare const NAVIGATION_SOURCE: {
|
|
182
|
+
readonly PRODUCT_CARD: "productCard";
|
|
183
|
+
readonly ADD_TO_CART_DRAWER: "addToCartDrawer";
|
|
184
|
+
};
|
|
185
|
+
export type NavigationSourceType = (typeof NAVIGATION_SOURCE)[keyof typeof NAVIGATION_SOURCE];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/clients/checkout';
|
|
2
|
+
import { ElementsCheckout } from '@/clients/checkout';
|
|
3
|
+
import type { DebugMode, ElementsEnv } from '@/enums';
|
|
4
|
+
import { DEBUG_MODE, ELEMENTS_ENV } from '@/enums';
|
|
5
|
+
import type { IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/core.interface';
|
|
6
|
+
export { DEBUG_MODE, ELEMENTS_ENV, ElementsCheckout };
|
|
7
|
+
export type { DebugMode, ElementsEnv, IElementsCheckoutActions, IElementsCheckoutClient, IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig, };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
export * from './clients/builder';
|
|
2
|
+
export * from './clients/main';
|
|
1
3
|
export * from './core/sdk-error-handler';
|
|
2
|
-
export * from './elements-builder-client';
|
|
3
|
-
export * from './elements-client';
|
|
4
4
|
export * from './enums';
|
|
5
5
|
export * from './interfaces/configs';
|
|
6
6
|
export * from './interfaces/core.interface';
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { CartEventLevel, CartEventType, FulfillmentType } from '@/enums';
|
|
2
|
+
import type { ILocation } from '@/interfaces/api/address.interface';
|
|
3
|
+
import type { IProductPresale } from '@/interfaces/api/product.interface';
|
|
4
|
+
export interface ICartUpdateItem {
|
|
5
|
+
id?: string;
|
|
6
|
+
partNumber: string;
|
|
7
|
+
quantity: number;
|
|
8
|
+
fulfillmentId: string;
|
|
9
|
+
engravingLines?: string[];
|
|
10
|
+
}
|
|
11
|
+
export interface ICartUpdateParams {
|
|
12
|
+
id: string;
|
|
13
|
+
items: ICartUpdateItem[];
|
|
14
|
+
promoCode?: string;
|
|
15
|
+
location?: ILocation;
|
|
16
|
+
}
|
|
17
|
+
export interface ICartFulfillment {
|
|
18
|
+
id: string;
|
|
19
|
+
canEngrave: boolean;
|
|
20
|
+
type: FulfillmentType;
|
|
21
|
+
expectation: string;
|
|
22
|
+
engravingExpectation: string;
|
|
23
|
+
itemIds: string[];
|
|
24
|
+
subtotal: number;
|
|
25
|
+
hasUnmetMinimumPurchaseAmount: boolean;
|
|
26
|
+
minimumPurchaseAmount: number;
|
|
27
|
+
}
|
|
28
|
+
export interface ICartRetailer {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
subtotal: number;
|
|
32
|
+
itemsQuantity: number;
|
|
33
|
+
fulfillments: Record<string, ICartFulfillment>;
|
|
34
|
+
}
|
|
35
|
+
export interface ICartItemAttributes {
|
|
36
|
+
engraving: ICartItemEngraving;
|
|
37
|
+
presale: IProductPresale;
|
|
38
|
+
}
|
|
39
|
+
export interface ICartItem {
|
|
40
|
+
id: string;
|
|
41
|
+
variantId: string;
|
|
42
|
+
liquidId: string;
|
|
43
|
+
retailerId: string;
|
|
44
|
+
partNumber: string;
|
|
45
|
+
fulfillmentId: string;
|
|
46
|
+
upc: string;
|
|
47
|
+
sku: string;
|
|
48
|
+
salsifyGrouping: string;
|
|
49
|
+
catPath: string;
|
|
50
|
+
volume: string;
|
|
51
|
+
uom: string;
|
|
52
|
+
pack: boolean;
|
|
53
|
+
packDesc: string;
|
|
54
|
+
container: string;
|
|
55
|
+
containerType: string;
|
|
56
|
+
name: string;
|
|
57
|
+
brand: string;
|
|
58
|
+
size: string;
|
|
59
|
+
price: number;
|
|
60
|
+
quantity: number;
|
|
61
|
+
maxQuantity: number;
|
|
62
|
+
unitPrice: number;
|
|
63
|
+
mainImage: string;
|
|
64
|
+
attributes: ICartItemAttributes;
|
|
65
|
+
}
|
|
66
|
+
export interface ICartPromoCode {
|
|
67
|
+
code: string;
|
|
68
|
+
discount: number;
|
|
69
|
+
freeDelivery: boolean;
|
|
70
|
+
freeServiceFee: boolean;
|
|
71
|
+
freeShipping: boolean;
|
|
72
|
+
}
|
|
73
|
+
export interface ICartEvent {
|
|
74
|
+
type: CartEventType;
|
|
75
|
+
message: string;
|
|
76
|
+
level: CartEventLevel;
|
|
77
|
+
}
|
|
78
|
+
export interface ICart {
|
|
79
|
+
id: string;
|
|
80
|
+
subtotal: number;
|
|
81
|
+
itemsQuantity: number;
|
|
82
|
+
items: Record<string, ICartItem>;
|
|
83
|
+
retailers: Record<string, ICartRetailer>;
|
|
84
|
+
promoCode: ICartPromoCode | null;
|
|
85
|
+
events: ICartEvent[];
|
|
86
|
+
}
|
|
87
|
+
export interface ICartItemEngraving {
|
|
88
|
+
isEngravable: boolean;
|
|
89
|
+
hasEngraving: boolean;
|
|
90
|
+
fee: number;
|
|
91
|
+
maxCharsPerLine: number;
|
|
92
|
+
maxLines: number;
|
|
93
|
+
location: string;
|
|
94
|
+
lines: string[];
|
|
95
|
+
}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { CheckoutEventLevel, CheckoutEventType, FulfillmentType } from '@/enums';
|
|
2
|
+
import type { IAddressAddress, IAddressCoordinates, ILocation } from '@/interfaces/api/address.interface';
|
|
3
|
+
import type { ICart } from '@/interfaces/api/cart.interface';
|
|
4
|
+
import type { IProductPresale } from '@/interfaces/api/product.interface';
|
|
5
|
+
export interface ICheckoutComplete {
|
|
6
|
+
orderNumber: string;
|
|
7
|
+
}
|
|
8
|
+
export interface ICheckoutPaymentSession {
|
|
9
|
+
key: string;
|
|
10
|
+
secret: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ICheckoutPaymentConfirmParams {
|
|
13
|
+
confirmationTokenId: string;
|
|
14
|
+
setupIntentId: string;
|
|
15
|
+
}
|
|
16
|
+
export interface ICheckoutPaymentConfirmCard {
|
|
17
|
+
brand: string;
|
|
18
|
+
expMonth: string;
|
|
19
|
+
expYear: string;
|
|
20
|
+
last4: string;
|
|
21
|
+
}
|
|
22
|
+
export interface ICheckoutPaymentConfirm {
|
|
23
|
+
id: string;
|
|
24
|
+
card: ICheckoutPaymentConfirmCard;
|
|
25
|
+
}
|
|
26
|
+
export interface ICheckoutCustomer {
|
|
27
|
+
email: string;
|
|
28
|
+
firstName: string;
|
|
29
|
+
lastName: string;
|
|
30
|
+
company: string;
|
|
31
|
+
phone: string;
|
|
32
|
+
birthDate: string;
|
|
33
|
+
}
|
|
34
|
+
export interface ICheckoutBilling {
|
|
35
|
+
firstName: string;
|
|
36
|
+
lastName: string;
|
|
37
|
+
email: string;
|
|
38
|
+
phone: string;
|
|
39
|
+
company: string;
|
|
40
|
+
one: string;
|
|
41
|
+
two: string;
|
|
42
|
+
city: string;
|
|
43
|
+
state: string;
|
|
44
|
+
zip: string;
|
|
45
|
+
}
|
|
46
|
+
export interface ICheckoutGiftRecipient {
|
|
47
|
+
firstName: string;
|
|
48
|
+
lastName: string;
|
|
49
|
+
email: string;
|
|
50
|
+
phone: string;
|
|
51
|
+
message: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ICheckoutMarketingPreferences {
|
|
54
|
+
canEmail: boolean;
|
|
55
|
+
canSms: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ICheckoutDeliveryTip {
|
|
58
|
+
fulfillmentId: string;
|
|
59
|
+
tip: number;
|
|
60
|
+
}
|
|
61
|
+
export interface ICheckoutDeliveryInstructions {
|
|
62
|
+
fulfillmentId: string;
|
|
63
|
+
instructions: string;
|
|
64
|
+
}
|
|
65
|
+
export interface ICheckoutPrepareParams {
|
|
66
|
+
cartId?: string;
|
|
67
|
+
token?: string;
|
|
68
|
+
customer?: ICheckoutCustomer;
|
|
69
|
+
shippingAddressTwo?: string;
|
|
70
|
+
billingAddress?: ICheckoutBilling;
|
|
71
|
+
isGift?: boolean;
|
|
72
|
+
billingSameAsShipping?: boolean;
|
|
73
|
+
giftOptions?: ICheckoutGiftRecipient;
|
|
74
|
+
marketingPreferences?: ICheckoutMarketingPreferences;
|
|
75
|
+
deliveryTips?: ICheckoutDeliveryTip[];
|
|
76
|
+
deliveryInstructions?: ICheckoutDeliveryInstructions[];
|
|
77
|
+
payment?: string;
|
|
78
|
+
promoCode?: string;
|
|
79
|
+
giftCards?: string[];
|
|
80
|
+
}
|
|
81
|
+
export interface ICheckoutUpdateItem {
|
|
82
|
+
id?: string;
|
|
83
|
+
partNumber: string;
|
|
84
|
+
quantity: number;
|
|
85
|
+
fulfillmentId: string;
|
|
86
|
+
engravingLines?: string[];
|
|
87
|
+
}
|
|
88
|
+
export interface ICheckoutItemsUpdateParams {
|
|
89
|
+
cartId: string;
|
|
90
|
+
items: ICheckoutUpdateItem[];
|
|
91
|
+
location?: ILocation;
|
|
92
|
+
}
|
|
93
|
+
export interface ICheckoutItemsUpdateResponse {
|
|
94
|
+
cart: ICart;
|
|
95
|
+
checkout: ICheckoutPrepare;
|
|
96
|
+
}
|
|
97
|
+
export interface ICheckoutAmounts {
|
|
98
|
+
subtotal: number;
|
|
99
|
+
engraving: number;
|
|
100
|
+
service: number;
|
|
101
|
+
shipping: number;
|
|
102
|
+
delivery: number;
|
|
103
|
+
platform: number;
|
|
104
|
+
discounts: number;
|
|
105
|
+
giftCards: number;
|
|
106
|
+
tax: number;
|
|
107
|
+
tip: number;
|
|
108
|
+
total: number;
|
|
109
|
+
}
|
|
110
|
+
export interface ICheckoutPromoCode {
|
|
111
|
+
code: string;
|
|
112
|
+
discount: number;
|
|
113
|
+
freeDelivery: boolean;
|
|
114
|
+
freeServiceFee: boolean;
|
|
115
|
+
freeShipping: boolean;
|
|
116
|
+
}
|
|
117
|
+
export interface ICheckoutGiftCard {
|
|
118
|
+
code: string;
|
|
119
|
+
applied: number;
|
|
120
|
+
}
|
|
121
|
+
export interface ICheckoutShippingAddress {
|
|
122
|
+
formattedAddress: string;
|
|
123
|
+
address: IAddressAddress;
|
|
124
|
+
coordinates: IAddressCoordinates;
|
|
125
|
+
}
|
|
126
|
+
export interface ICheckoutItemEngraving {
|
|
127
|
+
isEngravable: boolean;
|
|
128
|
+
hasEngraving: boolean;
|
|
129
|
+
fee: number;
|
|
130
|
+
maxCharsPerLine: number;
|
|
131
|
+
maxLines: number;
|
|
132
|
+
location: string;
|
|
133
|
+
lines: string[];
|
|
134
|
+
}
|
|
135
|
+
export interface ICheckoutItemAttributes {
|
|
136
|
+
engraving: ICheckoutItemEngraving;
|
|
137
|
+
presale: IProductPresale;
|
|
138
|
+
}
|
|
139
|
+
export interface ICheckoutItem {
|
|
140
|
+
variantId: string;
|
|
141
|
+
cartItemId: string;
|
|
142
|
+
liquidId: string;
|
|
143
|
+
retailerId: string;
|
|
144
|
+
fulfillmentId: string;
|
|
145
|
+
salsifyPid?: string;
|
|
146
|
+
salsifyGrouping?: string;
|
|
147
|
+
name: string;
|
|
148
|
+
catPath: string;
|
|
149
|
+
volume: string;
|
|
150
|
+
uom: string;
|
|
151
|
+
proof: string;
|
|
152
|
+
abv: string;
|
|
153
|
+
containerType: string;
|
|
154
|
+
container: string;
|
|
155
|
+
size: string;
|
|
156
|
+
pack: boolean;
|
|
157
|
+
packDesc: string;
|
|
158
|
+
mainImage: string;
|
|
159
|
+
brand: string;
|
|
160
|
+
partNumber: string;
|
|
161
|
+
upc: string;
|
|
162
|
+
sku: string;
|
|
163
|
+
price: number;
|
|
164
|
+
unitPrice: number;
|
|
165
|
+
quantity: number;
|
|
166
|
+
tax: number;
|
|
167
|
+
unitTax: number;
|
|
168
|
+
bottleDeposits: number;
|
|
169
|
+
attributes: ICheckoutItemAttributes;
|
|
170
|
+
}
|
|
171
|
+
export interface ICheckoutFulfillment {
|
|
172
|
+
id: string;
|
|
173
|
+
deliveryInstructions: string;
|
|
174
|
+
type: FulfillmentType;
|
|
175
|
+
expectation: string;
|
|
176
|
+
engravingExpectation: string;
|
|
177
|
+
itemIds: string[];
|
|
178
|
+
doesAllowPromos: boolean;
|
|
179
|
+
doesAllowGiftCards: boolean;
|
|
180
|
+
amounts: ICheckoutAmounts;
|
|
181
|
+
itemsQuantity: number;
|
|
182
|
+
}
|
|
183
|
+
export interface ICheckoutRetailer {
|
|
184
|
+
id: string;
|
|
185
|
+
name: string;
|
|
186
|
+
fulfillments: Record<string, ICheckoutFulfillment>;
|
|
187
|
+
amounts: ICheckoutAmounts;
|
|
188
|
+
}
|
|
189
|
+
export interface ICheckoutPresale {
|
|
190
|
+
isLocked: boolean;
|
|
191
|
+
expiresAt: string;
|
|
192
|
+
}
|
|
193
|
+
export interface ICheckoutEvent {
|
|
194
|
+
type: CheckoutEventType;
|
|
195
|
+
message: string;
|
|
196
|
+
level: CheckoutEventLevel;
|
|
197
|
+
}
|
|
198
|
+
export interface ICheckoutPrepare {
|
|
199
|
+
token: string;
|
|
200
|
+
cartId: string;
|
|
201
|
+
customer: ICheckoutCustomer;
|
|
202
|
+
isGift: boolean;
|
|
203
|
+
billingSameAsShipping: boolean;
|
|
204
|
+
payment?: string;
|
|
205
|
+
giftOptions: ICheckoutGiftRecipient;
|
|
206
|
+
marketingPreferences: ICheckoutMarketingPreferences;
|
|
207
|
+
shippingAddress: ICheckoutShippingAddress;
|
|
208
|
+
billingAddress: ICheckoutBilling;
|
|
209
|
+
promoCode: ICheckoutPromoCode | null;
|
|
210
|
+
amounts: ICheckoutAmounts;
|
|
211
|
+
giftCards: ICheckoutGiftCard[];
|
|
212
|
+
presale: ICheckoutPresale | null;
|
|
213
|
+
itemsQuantity: number;
|
|
214
|
+
items: Record<string, ICheckoutItem>;
|
|
215
|
+
retailers: Record<string, ICheckoutRetailer>;
|
|
216
|
+
events: ICheckoutEvent[];
|
|
217
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { FILTER_KEYS } from 'modules/product-list/product-list.constants';
|
|
2
|
+
import type { ILocation } from '@/interfaces/api/address.interface';
|
|
3
|
+
import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
|
|
4
|
+
export interface IProductSearchParams {
|
|
5
|
+
location?: ILocation;
|
|
6
|
+
search?: string;
|
|
7
|
+
pageToken?: string;
|
|
8
|
+
page?: number;
|
|
9
|
+
perPage?: number;
|
|
10
|
+
filters?: IFilterParams[];
|
|
11
|
+
}
|
|
12
|
+
export type IFilterParamsValue = string | string[] | {
|
|
13
|
+
min?: string | number;
|
|
14
|
+
max?: string | number;
|
|
15
|
+
} | boolean;
|
|
16
|
+
export interface IFilterParams {
|
|
17
|
+
key: string;
|
|
18
|
+
values: IFilterParamsValue;
|
|
19
|
+
}
|
|
20
|
+
export type FacetFilterKeys = typeof FILTER_KEYS.BRANDS | typeof FILTER_KEYS.CATEGORIES | typeof FILTER_KEYS.FLAVOR | typeof FILTER_KEYS.REGION | typeof FILTER_KEYS.VARIETY | typeof FILTER_KEYS.VINTAGE | typeof FILTER_KEYS.COUNTRY | typeof FILTER_KEYS.APPELLATION | typeof FILTER_KEYS.TAGS | typeof FILTER_KEYS.MATERIALS | typeof FILTER_KEYS.SIZES | typeof FILTER_KEYS.ENGRAVING | typeof FILTER_KEYS.PRESALE | typeof FILTER_KEYS.FULFILLMENT | typeof FILTER_KEYS.PRICE | typeof FILTER_KEYS.AVAILABILITY | typeof FILTER_KEYS.COLORS;
|
|
21
|
+
export interface IFilterSchema {
|
|
22
|
+
type: FacetFilterKeys;
|
|
23
|
+
values: IFilterValue[];
|
|
24
|
+
}
|
|
25
|
+
export interface IFilterValue {
|
|
26
|
+
value: string;
|
|
27
|
+
name: string;
|
|
28
|
+
count: number;
|
|
29
|
+
}
|
|
30
|
+
export interface INavigationResponse {
|
|
31
|
+
currentPage: number;
|
|
32
|
+
totalPages: number;
|
|
33
|
+
totalCount: number;
|
|
34
|
+
filters: IFilterSchema[];
|
|
35
|
+
}
|
|
36
|
+
export interface IProductSearchResponse extends IProductAvailabilityResponse {
|
|
37
|
+
navigation: INavigationResponse;
|
|
38
|
+
}
|
|
@@ -13,7 +13,6 @@ export interface IProductVariant {
|
|
|
13
13
|
shippingFulfillmentId: string;
|
|
14
14
|
onDemandFulfillmentId: string;
|
|
15
15
|
isEngravable: boolean;
|
|
16
|
-
fulfillmentTypes: FulfillmentType[];
|
|
17
16
|
partNumber: string;
|
|
18
17
|
price: number;
|
|
19
18
|
stock: number;
|
|
@@ -29,12 +28,12 @@ export interface IProductSize {
|
|
|
29
28
|
image: string;
|
|
30
29
|
uom: string;
|
|
31
30
|
volume: string;
|
|
31
|
+
maxQuantityPerOrder: number;
|
|
32
32
|
attributes: IProductSizeAttributes;
|
|
33
33
|
shippingVariants: Record<string, IProductVariant>;
|
|
34
34
|
onDemandVariants: Record<string, IProductVariant>;
|
|
35
35
|
}
|
|
36
36
|
export interface IProductFulfillmentHourStatus {
|
|
37
|
-
text: string;
|
|
38
37
|
isOpen: boolean;
|
|
39
38
|
openTime: string;
|
|
40
39
|
isClosed: boolean;
|
|
@@ -69,12 +68,12 @@ export interface IProduct {
|
|
|
69
68
|
sizes: Record<string, IProductSize>;
|
|
70
69
|
}
|
|
71
70
|
export interface IFulfillment {
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
id: string;
|
|
72
|
+
type: FulfillmentType;
|
|
74
73
|
doesAllowGiftCards: boolean;
|
|
75
74
|
doesAllowPromos: boolean;
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
expectation: string;
|
|
76
|
+
engravingExpectation: string;
|
|
78
77
|
fee: number;
|
|
79
78
|
timezone: string;
|
|
80
79
|
hourStatus: IProductFulfillmentHourStatus;
|
|
@@ -97,7 +96,6 @@ export interface IProductSizeEngraving {
|
|
|
97
96
|
export interface IProductSizeAttributes {
|
|
98
97
|
presale: IProductPresale;
|
|
99
98
|
engraving: IProductSizeEngraving;
|
|
100
|
-
maxQuantityPerOrder: number;
|
|
101
99
|
}
|
|
102
100
|
export interface IProductPresale {
|
|
103
101
|
canPurchaseOn: null | string;
|
|
@@ -4,6 +4,7 @@ import type { IAddressComponent } from './address.interface';
|
|
|
4
4
|
import type { ICartComponent } from './cart.interface';
|
|
5
5
|
import type { ICheckoutComponent } from './checkout.interface';
|
|
6
6
|
import type { IProductComponent } from './product.interface';
|
|
7
|
+
import type { IProductListComponent } from './product-list.interface';
|
|
7
8
|
export interface IFontFamily {
|
|
8
9
|
name: string;
|
|
9
10
|
weights: number[];
|
|
@@ -55,6 +56,7 @@ export interface IAllConfigs {
|
|
|
55
56
|
address: IAddressComponent;
|
|
56
57
|
cart: ICartComponent;
|
|
57
58
|
checkout: ICheckoutComponent;
|
|
59
|
+
productList: IProductListComponent;
|
|
58
60
|
}
|
|
59
|
-
export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout';
|
|
60
|
-
export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent;
|
|
61
|
+
export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout' | 'productList';
|
|
62
|
+
export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent | IProductListComponent;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { DisplayModeType } from 'enums';
|
|
2
|
+
import type { DeepPartial } from '@/interfaces/core.interface';
|
|
3
|
+
export type ProductListCardStyle = 'card' | 'ghost';
|
|
4
|
+
export type ProductListCardCornerRadius = 'rounded' | 'sharp';
|
|
5
|
+
export interface IProductListTheme {
|
|
6
|
+
backgroundColor: string;
|
|
7
|
+
}
|
|
8
|
+
export interface IProductListLayout {
|
|
9
|
+
productCard: {
|
|
10
|
+
style: ProductListCardStyle;
|
|
11
|
+
cornerRadius: ProductListCardCornerRadius;
|
|
12
|
+
showPrice: boolean;
|
|
13
|
+
showSizeSelector: boolean;
|
|
14
|
+
showFulfillment: boolean;
|
|
15
|
+
showRetailerName: boolean;
|
|
16
|
+
showQuantityCounter: boolean;
|
|
17
|
+
enableShippingFulfillment: boolean;
|
|
18
|
+
enableOnDemandFulfillment: boolean;
|
|
19
|
+
showCollections: boolean;
|
|
20
|
+
enablePersonalization: boolean;
|
|
21
|
+
};
|
|
22
|
+
displayMode: DisplayModeType;
|
|
23
|
+
}
|
|
24
|
+
export interface IProductListComponent {
|
|
25
|
+
theme: IProductListTheme;
|
|
26
|
+
layout: IProductListLayout;
|
|
27
|
+
}
|
|
28
|
+
export type UpdateProductListComponent = DeepPartial<IProductListComponent>;
|
|
@@ -2,6 +2,7 @@ import type { DeepPartial } from '@/interfaces/core.interface';
|
|
|
2
2
|
export type FulfillmentDisplayType = 'carousel' | 'popup';
|
|
3
3
|
export interface IProductLayout {
|
|
4
4
|
showImages: boolean;
|
|
5
|
+
showOnlyMainImage: boolean;
|
|
5
6
|
showTitle: boolean;
|
|
6
7
|
showDescription: boolean;
|
|
7
8
|
showQuantityCounter: boolean;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { IAddressActions
|
|
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';
|
|
3
6
|
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
4
7
|
import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
|
|
5
8
|
import type { IAddressOptions } from '@/modules/address/address.interface';
|
|
@@ -23,11 +26,15 @@ export interface IClientCustomThemeConfig {
|
|
|
23
26
|
cart?: UpdateCartComponent;
|
|
24
27
|
checkout?: UpdateCheckoutComponent;
|
|
25
28
|
}
|
|
29
|
+
export interface ILiquidCommerceElementsCheckoutConfig {
|
|
30
|
+
pageUrl: string;
|
|
31
|
+
}
|
|
26
32
|
export interface ILiquidCommerceElementsBaseConfig {
|
|
27
33
|
env?: ElementsEnv;
|
|
28
34
|
promoTicker?: IPromoTicker[];
|
|
29
35
|
customTheme?: IClientCustomThemeConfig;
|
|
30
36
|
debugMode?: DebugMode;
|
|
37
|
+
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
31
38
|
}
|
|
32
39
|
export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
|
|
33
40
|
}
|
|
@@ -35,21 +42,33 @@ export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBa
|
|
|
35
42
|
proxy?: IElementsProxyConfig;
|
|
36
43
|
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
37
44
|
}
|
|
45
|
+
export interface ILiquidCommerceElementsCheckoutClientConfig {
|
|
46
|
+
env?: ElementsEnv;
|
|
47
|
+
customTheme?: IClientCustomThemeConfig;
|
|
48
|
+
debugMode?: DebugMode;
|
|
49
|
+
checkout?: ILiquidCommerceElementsCheckoutConfig;
|
|
50
|
+
proxy?: IElementsProxyConfig;
|
|
51
|
+
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
52
|
+
}
|
|
38
53
|
export interface IInjectProductElement {
|
|
39
54
|
containerId: string;
|
|
40
55
|
identifier: string;
|
|
41
56
|
}
|
|
42
|
-
export type ProductListCardVariantType = (typeof PRODUCT_LIST_CARD_VARIANT)[keyof typeof PRODUCT_LIST_CARD_VARIANT];
|
|
43
57
|
export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
|
|
44
58
|
export interface IInjectProductListParams {
|
|
45
59
|
containerId: string;
|
|
46
60
|
rows?: number;
|
|
47
61
|
columns?: number;
|
|
48
|
-
cardVariant?: ProductListCardVariantType;
|
|
49
|
-
fillCard?: boolean;
|
|
50
62
|
filters?: ProductListFilterType[];
|
|
51
63
|
productUrl?: string;
|
|
52
64
|
}
|
|
65
|
+
export interface IInjectProductListSearchParams {
|
|
66
|
+
containerId: string;
|
|
67
|
+
}
|
|
68
|
+
export interface IInjectProductListFiltersParams {
|
|
69
|
+
containerId: string;
|
|
70
|
+
filters: ProductListFilterType[];
|
|
71
|
+
}
|
|
53
72
|
export interface IBuilderInjectElementParams {
|
|
54
73
|
type: ComponentType;
|
|
55
74
|
containerId: string;
|
|
@@ -65,6 +84,13 @@ export interface IProcessInjectElementParams {
|
|
|
65
84
|
containerId: string;
|
|
66
85
|
identifier?: string;
|
|
67
86
|
options?: IAddressOptions;
|
|
87
|
+
checkoutId?: string;
|
|
88
|
+
hideHeader?: boolean;
|
|
89
|
+
}
|
|
90
|
+
export interface IInjectCheckoutParams {
|
|
91
|
+
containerId: string;
|
|
92
|
+
checkoutId?: string;
|
|
93
|
+
hideHeader?: boolean;
|
|
68
94
|
}
|
|
69
95
|
export interface ILiquidCommerceElementsUIMethod {
|
|
70
96
|
cartButton(containerId: string, showItemsCount?: boolean): void;
|
|
@@ -101,8 +127,10 @@ export interface ILiquidCommerceElementsClient {
|
|
|
101
127
|
injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
|
|
102
128
|
injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
|
|
103
129
|
injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
|
|
104
|
-
injectCheckoutElement(
|
|
130
|
+
injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
|
|
105
131
|
injectProductList(params: IInjectProductListParams): Promise<void>;
|
|
132
|
+
injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
|
|
133
|
+
injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
|
|
106
134
|
ui: ILiquidCommerceElementsUIMethod;
|
|
107
135
|
actions: ILiquidCommerceElementsActions;
|
|
108
136
|
getInjectedComponents(): Map<string, IInjectedComponent>;
|