@liquidcommerce/elements-sdk 2.5.6-beta.2 → 2.5.6-beta.20
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 +99 -25
- package/dist/index.esm.js +12131 -11010
- package/dist/types/constants/core.constant.d.ts +0 -1
- package/dist/types/core/api-client.service.d.ts +1 -1
- package/dist/types/core/auth.service.d.ts +0 -1
- package/dist/types/core/client/client-action.service.d.ts +0 -4
- package/dist/types/core/client/client-config.service.d.ts +8 -0
- package/dist/types/core/fingerprint.service.d.ts +2 -1
- package/dist/types/core/google-tag-manager.service.d.ts +3 -20
- package/dist/types/core/logger/logger.service.d.ts +0 -2
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +0 -2
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +0 -10
- package/dist/types/core/pubsub/interfaces/core.interface.d.ts +14 -8
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +0 -6
- package/dist/types/core/singleton-manager.service.d.ts +6 -1
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +77 -80
- package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
- package/dist/types/core/store/store.constant.d.ts +1 -1
- package/dist/types/core/telemetry/telemetry.interface.d.ts +1 -1
- package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
- package/dist/types/elements-base-client.d.ts +0 -1
- package/dist/types/enums/core.enum.d.ts +15 -11
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/checkout.interface.d.ts +0 -1
- package/dist/types/interfaces/core.interface.d.ts +13 -7
- package/dist/types/modules/cart/components/cart-retailer.component.d.ts +0 -2
- package/dist/types/modules/checkout/checkout.commands.d.ts +28 -25
- package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +14 -0
- package/dist/types/modules/checkout/components/checkout-buyer-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{checkout-information-section.component.d.ts → checkout-buyer.component.d.ts} +5 -5
- package/dist/types/modules/checkout/components/checkout-deliver-to-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-deliver-to.component.d.ts +13 -0
- package/dist/types/modules/checkout/components/checkout-information.component.d.ts +17 -0
- package/dist/types/modules/checkout/components/{checkout-summary-section.component.d.ts → checkout-order-summary.component.d.ts} +1 -1
- package/dist/types/modules/checkout/components/checkout-payment-summary.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/checkout-payment.component.d.ts +30 -0
- package/dist/types/modules/checkout/components/{summary/checkout-place-order-button.component.d.ts → checkout-place-order-button.component.d.ts} +1 -5
- package/dist/types/modules/checkout/components/checkout-send-as-gift.component.d.ts +7 -0
- package/dist/types/modules/checkout/components/{information/checkout-stripe-form.component.d.ts → checkout-stripe-form.component.d.ts} +5 -3
- package/dist/types/modules/checkout/components/checkout-stripe-handler.component.d.ts +50 -0
- package/dist/types/modules/checkout/components/index.d.ts +23 -18
- package/dist/types/modules/checkout/constant.d.ts +0 -1
- package/dist/types/modules/product/components/components.d.ts +1 -1
- package/dist/types/modules/product/utils/helpers.d.ts +0 -7
- package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +6 -4
- package/dist/types/modules/ui-components/input/input.component.d.ts +4 -4
- package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +3 -4
- package/docs/ACTIONS.md +29 -29
- package/docs/CONFIGURATION.md +20 -1
- package/docs/EVENTS.md +62 -29
- package/docs/THEMING.md +2 -5
- package/package.json +8 -8
- package/umd/elements.js +1 -1
- package/dist/types/modules/checkout/checkout.commands.helper.d.ts +0 -13
- package/dist/types/modules/checkout/components/information/checkout-billing-form.component.d.ts +0 -18
- package/dist/types/modules/checkout/components/information/checkout-buyer-information-form.component.d.ts +0 -12
- package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +0 -17
- package/dist/types/modules/checkout/components/information/checkout-payment-form.component.d.ts +0 -21
- package/dist/types/modules/product/utils/index.d.ts +0 -2
- /package/dist/types/modules/checkout/components/{summary/checkout-amounts.component.d.ts → checkout-amounts.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-completed.component.d.ts → checkout-completed.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-gift-cards.component.d.ts → checkout-gift-cards.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item-quantity.component.d.ts → checkout-item-quantity.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-item.component.d.ts → checkout-item.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-items.component.d.ts → checkout-items.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-presale-expired.component.d.ts → checkout-presale-expired.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-promo-code.component.d.ts → checkout-promo-code.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/checkout-tips.component.d.ts → checkout-tips.component.d.ts} +0 -0
- /package/dist/types/modules/checkout/components/{summary/promo-pc-gc.component.d.ts → promo-pc-gc.component.d.ts} +0 -0
|
@@ -23,7 +23,7 @@ export declare class ApiClientService {
|
|
|
23
23
|
prepareCheckout(params: ICheckoutPrepareParams): Promise<ICheckoutPrepareResponse>;
|
|
24
24
|
getPaymentSession(params: IUserPaymentSession): Promise<IUserSession>;
|
|
25
25
|
confirmPaymentSession(confirmationTokenId: string, setupIntentId: string): Promise<ILiquidPaymentToken>;
|
|
26
|
-
checkoutComplete(params: ICheckoutCompleteParams): Promise<ICheckoutCompleteResponse['order']>;
|
|
26
|
+
checkoutComplete(params: Partial<ICheckoutCompleteParams>): Promise<ICheckoutCompleteResponse['order']>;
|
|
27
27
|
catalogSearch(params: ICatalogParams): Promise<ICatalog>;
|
|
28
28
|
private validResponseData;
|
|
29
29
|
private ensureClientInitialized;
|
|
@@ -4,7 +4,6 @@ import type { IBaseProductEventData } from '@/core/pubsub/interfaces/product.int
|
|
|
4
4
|
import { type FulfillmentType } from '@/enums';
|
|
5
5
|
import type { IAddress, ICoords } from '@/interfaces/cloud';
|
|
6
6
|
import type { IAddressData } from '@/modules/address/address.interface';
|
|
7
|
-
import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
|
|
8
7
|
export interface IProductActions {
|
|
9
8
|
getDetails: (identifier: string) => IBaseProductEventData;
|
|
10
9
|
}
|
|
@@ -42,9 +41,6 @@ export interface ICheckoutActions {
|
|
|
42
41
|
toggleIsGift: (active?: boolean) => Promise<void>;
|
|
43
42
|
toggleBillingSameAsShipping: (active?: boolean) => Promise<void>;
|
|
44
43
|
toggleMarketingPreferences: (field: 'canEmail' | 'canSms', active: boolean) => void;
|
|
45
|
-
updateCustomerInfo: (params: Record<CustomerFieldName, string>) => void;
|
|
46
|
-
updateBillingInfo: (params: Record<BillingFieldName, string>) => void;
|
|
47
|
-
updateGiftInfo: (params: Record<GiftFieldName, string>) => void;
|
|
48
44
|
getDetails: () => ICheckoutDetailsEventData;
|
|
49
45
|
}
|
|
50
46
|
export declare class ClientActionService {
|
|
@@ -14,10 +14,13 @@ export interface IClientConfigs {
|
|
|
14
14
|
proxy: IElementsProxyConfig | null;
|
|
15
15
|
deviceType: DeviceType;
|
|
16
16
|
userDeviceId?: string;
|
|
17
|
+
localStorageKeyPrefix?: string;
|
|
17
18
|
isLocalStorageAvailable?: boolean;
|
|
18
19
|
version?: string;
|
|
19
20
|
clientPrepared: boolean;
|
|
20
21
|
promoTicker: IPromoTicker[] | null;
|
|
22
|
+
paymentMethodId?: string;
|
|
23
|
+
openShadowDom?: boolean;
|
|
21
24
|
}
|
|
22
25
|
export interface IClientConfigInput {
|
|
23
26
|
env?: ElementsEnv;
|
|
@@ -26,6 +29,11 @@ export interface IClientConfigInput {
|
|
|
26
29
|
customTheme?: IClientCustomThemeConfig;
|
|
27
30
|
proxy?: IElementsProxyConfig;
|
|
28
31
|
promoTicker?: IPromoTicker[];
|
|
32
|
+
development?: {
|
|
33
|
+
customApiUrl?: string;
|
|
34
|
+
paymentMethodId?: string;
|
|
35
|
+
openShadowDom?: boolean;
|
|
36
|
+
};
|
|
29
37
|
}
|
|
30
38
|
export declare class ClientConfigService {
|
|
31
39
|
private config;
|
|
@@ -4,9 +4,10 @@ interface FingerprintData {
|
|
|
4
4
|
timezone: string;
|
|
5
5
|
}
|
|
6
6
|
export declare class FingerPrintService {
|
|
7
|
-
private readonly keyPrefix;
|
|
8
7
|
private isLocalStorageAvailable;
|
|
9
8
|
private cachedFingerprint;
|
|
9
|
+
private readonly clientConfig;
|
|
10
|
+
constructor();
|
|
10
11
|
static getInstance(): FingerPrintService;
|
|
11
12
|
getId(partnerCode: string): Promise<string>;
|
|
12
13
|
getFingerprintData(): FingerprintData;
|
|
@@ -64,8 +64,10 @@ export declare class GoogleTagManagerService {
|
|
|
64
64
|
private isGTMAlreadyLoaded;
|
|
65
65
|
private isContainerLoaded;
|
|
66
66
|
private isContainerInitialized;
|
|
67
|
-
private initializeGtag;
|
|
68
67
|
private loadGTMScript;
|
|
68
|
+
private waitForContainerInit;
|
|
69
|
+
private injectGTMScript;
|
|
70
|
+
private checkFallbackGTM;
|
|
69
71
|
private processEventQueue;
|
|
70
72
|
private getSendToTargets;
|
|
71
73
|
initialize(config: GTMConfig): Promise<void>;
|
|
@@ -80,26 +82,7 @@ export declare class GoogleTagManagerService {
|
|
|
80
82
|
removeFromCart(item: BaseItem): void;
|
|
81
83
|
beginCheckout(items: BaseItem[], coupon?: string): void;
|
|
82
84
|
addShippingInfo(items: BaseItem[], coupon?: string): void;
|
|
83
|
-
addShippingInfoWithCustomerData(value: number, coupon?: string, customerData?: {
|
|
84
|
-
phone?: string;
|
|
85
|
-
email?: string;
|
|
86
|
-
birth_date?: string;
|
|
87
|
-
customer_id?: string;
|
|
88
|
-
}, amounts?: {
|
|
89
|
-
subtotal?: number;
|
|
90
|
-
total_before_discounts?: number;
|
|
91
|
-
discounts?: number;
|
|
92
|
-
gift_cards?: number;
|
|
93
|
-
net_total?: number;
|
|
94
|
-
}): void;
|
|
95
85
|
addPaymentInfo(items: BaseItem[], paymentType?: string, coupon?: string): void;
|
|
96
|
-
addPaymentInfoWithoutItems(value: number, paymentType?: string, coupon?: string, amounts?: {
|
|
97
|
-
subtotal?: number;
|
|
98
|
-
total_before_discounts?: number;
|
|
99
|
-
discounts?: number;
|
|
100
|
-
gift_cards?: number;
|
|
101
|
-
net_total?: number;
|
|
102
|
-
}): void;
|
|
103
86
|
purchase(purchaseData: PurchaseData & {
|
|
104
87
|
subtotal?: number;
|
|
105
88
|
total_before_discounts?: number;
|
|
@@ -14,7 +14,5 @@ export declare class LoggerService {
|
|
|
14
14
|
info(message: string, data?: Record<string, any>): void;
|
|
15
15
|
warn(message: string, data?: Record<string, any>): void;
|
|
16
16
|
error(message: string, error?: Error | Record<string, any>): void;
|
|
17
|
-
group(label: string, collapsed?: boolean): void;
|
|
18
|
-
groupEnd(): void;
|
|
19
17
|
private sendToTelemetry;
|
|
20
18
|
}
|
|
@@ -92,11 +92,9 @@ export interface ICartItemEngravingUpdatedEventData {
|
|
|
92
92
|
export interface ICartPromoCodeEventData {
|
|
93
93
|
discountAmount?: number;
|
|
94
94
|
newTotal?: number;
|
|
95
|
-
applied: boolean;
|
|
96
95
|
}
|
|
97
96
|
export interface ICartPromoCodeFailedEventData {
|
|
98
97
|
error: string;
|
|
99
|
-
attempted: boolean;
|
|
100
98
|
}
|
|
101
99
|
export interface ICartProductAddEventData {
|
|
102
100
|
itemsAdded: number;
|
|
@@ -43,25 +43,18 @@ export interface ICheckoutItemEngravingUpdatedEventData {
|
|
|
43
43
|
engravingLines: string[];
|
|
44
44
|
previousEngravingLines: string[];
|
|
45
45
|
}
|
|
46
|
-
export interface ICheckoutFormUpdatedEventData {
|
|
47
|
-
fieldName: string;
|
|
48
|
-
}
|
|
49
46
|
export interface ICheckoutPromoCodeEventData {
|
|
50
47
|
discountAmount?: number;
|
|
51
48
|
newTotal?: number;
|
|
52
|
-
applied: boolean;
|
|
53
49
|
}
|
|
54
50
|
export interface ICheckoutPromoCodeFailedEventData {
|
|
55
51
|
error: string;
|
|
56
|
-
attempted: boolean;
|
|
57
52
|
}
|
|
58
53
|
export interface ICheckoutGiftCardEventData {
|
|
59
|
-
applied: boolean;
|
|
60
54
|
newTotal?: number;
|
|
61
55
|
}
|
|
62
56
|
export interface ICheckoutGiftCardFailedEventData {
|
|
63
57
|
error: string;
|
|
64
|
-
attempted: boolean;
|
|
65
58
|
}
|
|
66
59
|
export interface ICheckoutProductAddEventData {
|
|
67
60
|
itemsAdded: number;
|
|
@@ -107,9 +100,6 @@ export interface ICheckoutItemEventData {
|
|
|
107
100
|
}
|
|
108
101
|
export interface ICheckoutDetailsEventData {
|
|
109
102
|
cartId: string;
|
|
110
|
-
acceptedAccountCreation: boolean;
|
|
111
|
-
hasAgeVerify: boolean;
|
|
112
|
-
hasSubstitutionPolicy: boolean;
|
|
113
103
|
isGift: boolean;
|
|
114
104
|
billingSameAsShipping: boolean;
|
|
115
105
|
marketingPreferences: {
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
import type { IAddressActionEventData } from '@/core/pubsub/interfaces/address.interface';
|
|
2
2
|
import type { ICartFailedEventData, ICartItemAddedEventData, ICartItemEngravingUpdatedEventData, ICartItemQuantityChangedEventData, ICartItemRemovedEventData, ICartLoadedEventData, ICartProductAddEventData, ICartProductAddFailedEventData, ICartPromoCodeEventData, ICartPromoCodeFailedEventData, ICartUpdatedEventData } from '@/core/pubsub/interfaces/cart.interface';
|
|
3
|
-
import type { ICheckoutFailedEventData,
|
|
4
|
-
import type {
|
|
3
|
+
import type { ICheckoutFailedEventData, ICheckoutGiftCardEventData, ICheckoutGiftCardFailedEventData, ICheckoutItemEngravingUpdatedEventData, ICheckoutItemQuantityChangedEventData, ICheckoutItemRemovedEventData, ICheckoutLoadedEventData, ICheckoutMarketingPreferencesToggleEventData, ICheckoutProductAddEventData, ICheckoutProductAddFailedEventData, ICheckoutPromoCodeEventData, ICheckoutPromoCodeFailedEventData, ICheckoutSubmitCompletedEventData, ICheckoutSubmitFailedEventData, ICheckoutSubmitStartedEventData, ICheckoutTipUpdatedEventData, ICheckoutToggleEventData } from '@/core/pubsub/interfaces/checkout.interface';
|
|
4
|
+
import type { IProductAddToCartEventData, IProductFulfillmentChangedEventData, IProductFulfillmentTypeChangedEventData, IProductLoadedEventData, IProductQuantityChangedEventData, IProductSizeChangedEventData } from '@/core/pubsub/interfaces/product.interface';
|
|
5
5
|
import { ELEMENTS_ACTIONS_EVENT } from '@/enums';
|
|
6
|
+
export interface IElementsClientIsReadyEventData {
|
|
7
|
+
isReady: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
timestamp: number;
|
|
10
|
+
version?: string;
|
|
11
|
+
}
|
|
6
12
|
export interface IEventMetadata {
|
|
7
13
|
eventId: string;
|
|
8
14
|
namespace: 'actions' | 'forms';
|
|
@@ -17,6 +23,9 @@ export interface IEnhancedEventData<T> {
|
|
|
17
23
|
}
|
|
18
24
|
export interface IElementsActionsEventsMap {
|
|
19
25
|
[ELEMENTS_ACTIONS_EVENT.CLIENT_READY]: IElementsClientIsReadyEventData;
|
|
26
|
+
[ELEMENTS_ACTIONS_EVENT.ADDRESS_UPDATED]: IAddressActionEventData;
|
|
27
|
+
[ELEMENTS_ACTIONS_EVENT.ADDRESS_CLEARED]: boolean;
|
|
28
|
+
[ELEMENTS_ACTIONS_EVENT.ADDRESS_FAILED]: IAddressActionEventData;
|
|
20
29
|
[ELEMENTS_ACTIONS_EVENT.PRODUCT_LOADED]: IProductLoadedEventData;
|
|
21
30
|
[ELEMENTS_ACTIONS_EVENT.PRODUCT_QUANTITY_DECREASE]: IProductQuantityChangedEventData;
|
|
22
31
|
[ELEMENTS_ACTIONS_EVENT.PRODUCT_QUANTITY_INCREASE]: IProductQuantityChangedEventData;
|
|
@@ -40,9 +49,6 @@ export interface IElementsActionsEventsMap {
|
|
|
40
49
|
[ELEMENTS_ACTIONS_EVENT.CART_PROMO_CODE_FAILED]: ICartPromoCodeFailedEventData;
|
|
41
50
|
[ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_SUCCESS]: ICartProductAddEventData;
|
|
42
51
|
[ELEMENTS_ACTIONS_EVENT.CART_PRODUCT_ADD_FAILED]: ICartProductAddFailedEventData;
|
|
43
|
-
[ELEMENTS_ACTIONS_EVENT.ADDRESS_UPDATED]: IAddressActionEventData;
|
|
44
|
-
[ELEMENTS_ACTIONS_EVENT.ADDRESS_CLEARED]: boolean;
|
|
45
|
-
[ELEMENTS_ACTIONS_EVENT.ADDRESS_FAILED]: IAddressActionEventData;
|
|
46
52
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_OPENED]: boolean;
|
|
47
53
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_CLOSED]: boolean;
|
|
48
54
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_LOADED]: ICheckoutLoadedEventData;
|
|
@@ -50,9 +56,9 @@ export interface IElementsActionsEventsMap {
|
|
|
50
56
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_IS_GIFT_TOGGLED]: ICheckoutToggleEventData;
|
|
51
57
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_SAME_AS_SHIPPING_TOGGLED]: ICheckoutToggleEventData;
|
|
52
58
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_MARKETING_PREFERENCES_TOGGLED]: ICheckoutMarketingPreferencesToggleEventData;
|
|
53
|
-
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]:
|
|
54
|
-
[ELEMENTS_ACTIONS_EVENT.
|
|
55
|
-
[ELEMENTS_ACTIONS_EVENT.
|
|
59
|
+
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_CUSTOMER_INFORMATION_UPDATED]: boolean;
|
|
60
|
+
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_GIFT_INFORMATION_UPDATED]: boolean;
|
|
61
|
+
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_BILLING_INFORMATION_UPDATED]: boolean;
|
|
56
62
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_REMOVED]: ICheckoutItemRemovedEventData;
|
|
57
63
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_INCREASE]: ICheckoutItemQuantityChangedEventData;
|
|
58
64
|
[ELEMENTS_ACTIONS_EVENT.CHECKOUT_ITEM_QUANTITY_DECREASE]: ICheckoutItemQuantityChangedEventData;
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import type { FulfillmentType } from '@/enums';
|
|
2
2
|
import type { IAddress, ICoords } from '@/interfaces/cloud';
|
|
3
|
-
export interface IElementsClientIsReadyEventData {
|
|
4
|
-
isReady: boolean;
|
|
5
|
-
message: string;
|
|
6
|
-
timestamp: number;
|
|
7
|
-
version?: string;
|
|
8
|
-
}
|
|
9
3
|
export interface IBaseProductFulfillmentEventData {
|
|
10
4
|
price: number;
|
|
11
5
|
partNumber: string;
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import type { IClientConfigs } from '@/core/client/client-config.service';
|
|
2
2
|
import type { LiquidCommerceElementsBuilderClientConstructor, LiquidCommerceElementsClientConstructor } from '@/interfaces/core.interface';
|
|
3
3
|
export declare class SingletonManager {
|
|
4
|
-
private static instances;
|
|
5
4
|
private static clientConstructor;
|
|
5
|
+
private static regularClientInstances;
|
|
6
|
+
private static builderClientInstances;
|
|
7
|
+
private static currentContext;
|
|
6
8
|
private static getInstances;
|
|
7
9
|
private constructor();
|
|
10
|
+
static setContext({ isBuilder }: {
|
|
11
|
+
isBuilder: boolean;
|
|
12
|
+
}): void;
|
|
8
13
|
static setClientConstructor(lceConstructor: LiquidCommerceElementsClientConstructor | LiquidCommerceElementsBuilderClientConstructor): void;
|
|
9
14
|
static getClientConstructor(): LiquidCommerceElementsClientConstructor | LiquidCommerceElementsBuilderClientConstructor | null;
|
|
10
15
|
static getClassInstance<T>(className: string, instanceCreator: () => T): T;
|
|
@@ -12,43 +12,6 @@ export interface ICheckoutGiftCardStore {
|
|
|
12
12
|
code: string;
|
|
13
13
|
discountAmount: number;
|
|
14
14
|
}
|
|
15
|
-
export interface ICheckoutPaymentStore {
|
|
16
|
-
key: string;
|
|
17
|
-
secret: string;
|
|
18
|
-
paymentMethodId: string | null;
|
|
19
|
-
sendSubmitSignal: boolean;
|
|
20
|
-
}
|
|
21
|
-
export interface ICheckoutGiftRecipientStore {
|
|
22
|
-
firstName: string;
|
|
23
|
-
lastName: string;
|
|
24
|
-
email: string;
|
|
25
|
-
phone: string;
|
|
26
|
-
birthDate: string;
|
|
27
|
-
addressTwo: string | null;
|
|
28
|
-
message: string | null;
|
|
29
|
-
}
|
|
30
|
-
export interface ICheckoutCustomerStore {
|
|
31
|
-
id?: string;
|
|
32
|
-
firstName: string;
|
|
33
|
-
lastName: string;
|
|
34
|
-
email: string;
|
|
35
|
-
phone: string;
|
|
36
|
-
birthDate: string;
|
|
37
|
-
addressTwo: string;
|
|
38
|
-
company: string;
|
|
39
|
-
}
|
|
40
|
-
export interface ICheckoutBillingStore {
|
|
41
|
-
firstName: string;
|
|
42
|
-
lastName: string;
|
|
43
|
-
email: string;
|
|
44
|
-
phone: string;
|
|
45
|
-
company: string | null;
|
|
46
|
-
addressOne: string;
|
|
47
|
-
addressTwo: string | null;
|
|
48
|
-
city: string;
|
|
49
|
-
state: string;
|
|
50
|
-
zipCode: string;
|
|
51
|
-
}
|
|
52
15
|
export interface ICheckoutItemStore {
|
|
53
16
|
liquidId: string;
|
|
54
17
|
variantId: string;
|
|
@@ -84,13 +47,6 @@ export interface ICheckoutItemStore {
|
|
|
84
47
|
updating: boolean;
|
|
85
48
|
error: string | null;
|
|
86
49
|
}
|
|
87
|
-
export interface ICheckoutReadyForSubmitStore {
|
|
88
|
-
customer: boolean;
|
|
89
|
-
gift: boolean;
|
|
90
|
-
billing: boolean;
|
|
91
|
-
payment: boolean;
|
|
92
|
-
prepared: boolean;
|
|
93
|
-
}
|
|
94
50
|
export interface IOnDemandFulfillmentTipInfo {
|
|
95
51
|
fulfillmentId: string;
|
|
96
52
|
retailerId: string;
|
|
@@ -98,56 +54,97 @@ export interface IOnDemandFulfillmentTipInfo {
|
|
|
98
54
|
subtotal: number;
|
|
99
55
|
tip: number;
|
|
100
56
|
}
|
|
101
|
-
export interface
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
57
|
+
export interface ICheckoutPresaleStore {
|
|
58
|
+
isLocked: boolean;
|
|
59
|
+
expiresAt: string | null;
|
|
60
|
+
}
|
|
61
|
+
export interface ICheckoutCustomerStore {
|
|
62
|
+
id?: string;
|
|
63
|
+
firstName: string;
|
|
64
|
+
lastName: string;
|
|
65
|
+
email: string;
|
|
66
|
+
phone: string;
|
|
67
|
+
birthDate: string;
|
|
68
|
+
company: string;
|
|
69
|
+
}
|
|
70
|
+
export interface ICheckoutCustomerFormStore {
|
|
71
|
+
data: ICheckoutCustomerStore;
|
|
72
|
+
isEditing: boolean;
|
|
73
|
+
isValid: boolean;
|
|
74
|
+
isSaving: boolean;
|
|
75
|
+
}
|
|
76
|
+
export interface ICheckoutGiftRecipientStore {
|
|
77
|
+
firstName: string;
|
|
78
|
+
lastName: string;
|
|
79
|
+
email: string;
|
|
80
|
+
phone: string;
|
|
81
|
+
message: string;
|
|
82
|
+
}
|
|
83
|
+
export interface ICheckoutGiftRecipientFormStore {
|
|
84
|
+
data: ICheckoutGiftRecipientStore;
|
|
85
|
+
isEditing: boolean;
|
|
86
|
+
isValid: boolean;
|
|
87
|
+
isSaving: boolean;
|
|
88
|
+
}
|
|
89
|
+
export interface ICheckoutBillingStore {
|
|
90
|
+
firstName: string;
|
|
91
|
+
lastName: string;
|
|
92
|
+
email: string;
|
|
93
|
+
phone: string;
|
|
94
|
+
company: string;
|
|
95
|
+
addressOne: string;
|
|
96
|
+
addressTwo: string;
|
|
97
|
+
city: string;
|
|
98
|
+
state: string;
|
|
99
|
+
zipCode: string;
|
|
100
|
+
}
|
|
101
|
+
export interface ICheckoutPaymentCardStore {
|
|
102
|
+
brand: string;
|
|
103
|
+
last4: string;
|
|
104
|
+
expMonth: string;
|
|
105
|
+
expYear: string;
|
|
106
|
+
}
|
|
107
|
+
export interface ICheckoutPaymentMethodStore {
|
|
108
|
+
id: string;
|
|
109
|
+
card: ICheckoutPaymentCardStore;
|
|
110
|
+
}
|
|
111
|
+
export interface ICheckoutPaymentSessionStore {
|
|
112
|
+
key: string;
|
|
113
|
+
secret: string;
|
|
106
114
|
}
|
|
107
|
-
export interface
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
115
|
+
export interface ICheckoutPaymentFormStore {
|
|
116
|
+
paymentSession: ICheckoutPaymentSessionStore | null;
|
|
117
|
+
paymentMethod: ICheckoutPaymentMethodStore | null;
|
|
118
|
+
data: ICheckoutBillingStore | null;
|
|
119
|
+
billingSameAsShipping: boolean;
|
|
120
|
+
isEditing: boolean;
|
|
121
|
+
isValid: boolean;
|
|
122
|
+
isSaving: boolean;
|
|
114
123
|
}
|
|
115
124
|
export interface ICheckoutStore {
|
|
116
125
|
token: string;
|
|
117
126
|
cartId: string;
|
|
118
|
-
|
|
119
|
-
updating: boolean;
|
|
120
|
-
error: string | null;
|
|
121
|
-
warning: string[];
|
|
122
|
-
isPresaleLocked: boolean;
|
|
123
|
-
presaleExpiresAt: string | null;
|
|
124
|
-
acceptedAccountCreation: boolean;
|
|
125
|
-
deliveryTips: [];
|
|
126
|
-
hasAgeVerify: boolean;
|
|
127
|
-
hasSubstitutionPolicy: boolean;
|
|
127
|
+
presale: ICheckoutPresaleStore | null;
|
|
128
128
|
isGift: boolean;
|
|
129
|
-
billingSameAsShipping: boolean;
|
|
130
129
|
marketingPreferences: ICheckoutMarketingPreferencesStore;
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
130
|
+
customerForm: ICheckoutCustomerFormStore;
|
|
131
|
+
giftRecipientForm: ICheckoutGiftRecipientFormStore;
|
|
132
|
+
paymentForm: ICheckoutPaymentFormStore;
|
|
133
|
+
shippingAddressTwo: string;
|
|
135
134
|
promoCode: ICheckoutPromoCodeStore | null;
|
|
136
135
|
giftCards: ICheckoutGiftCardStore[];
|
|
137
|
-
amounts: ICheckoutTotalAmounts;
|
|
138
136
|
items: Record<string, ICheckoutItemStore>;
|
|
139
|
-
|
|
137
|
+
amounts: ICheckoutTotalAmounts;
|
|
140
138
|
orderNumber: string | null;
|
|
141
|
-
rerender: boolean;
|
|
142
|
-
isFormValid: boolean;
|
|
143
|
-
invalidFields: string[];
|
|
144
|
-
focusField: string | null;
|
|
145
139
|
onDemandFulfillmentTipInfo: Record<string, IOnDemandFulfillmentTipInfo>;
|
|
146
140
|
tipSelection: number;
|
|
147
|
-
|
|
148
|
-
deliveryInstructions: string | null;
|
|
149
|
-
card: ICheckoutCardInfoStore;
|
|
141
|
+
deliveryInstructions: string;
|
|
150
142
|
giftCardError: string | null;
|
|
151
143
|
promoCodeError: string | null;
|
|
144
|
+
rerender: boolean;
|
|
145
|
+
loading: boolean;
|
|
146
|
+
updating: boolean;
|
|
147
|
+
error: string | null;
|
|
148
|
+
warning: string[];
|
|
152
149
|
events: IElementsCheckoutEvents[];
|
|
153
150
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IAddressStore } from '@/core/store/interfaces/address.interface';
|
|
2
|
-
import type {
|
|
2
|
+
import type { ICheckoutCustomerFormStore, ICheckoutGiftRecipientFormStore, ICheckoutGiftRecipientStore, ICheckoutItemStore, ICheckoutMarketingPreferencesStore, ICheckoutPaymentFormStore, ICheckoutPaymentMethodStore, ICheckoutPaymentSessionStore, ICheckoutPresaleStore, ICheckoutPromoCodeStore, ICheckoutStore } from '@/core/store/interfaces/checkout.interface';
|
|
3
3
|
import type { IProductSizeStore, IProductStore } from '@/core/store/interfaces/product.interface';
|
|
4
4
|
import type { ComponentType } from '@/enums';
|
|
5
5
|
import type { ICartItemStore, ICartPromoCodeStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from './cart.interface';
|
|
@@ -25,7 +25,7 @@ export interface IPersistedStore {
|
|
|
25
25
|
p?: string;
|
|
26
26
|
c?: string;
|
|
27
27
|
}
|
|
28
|
-
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.
|
|
28
|
+
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.totals.${keyof ICartTotalsStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof IRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof IRetailerFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCodeStore}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customerForm.${keyof ICheckoutCustomerFormStore}` | `checkout.giftRecipientForm.${keyof ICheckoutGiftRecipientFormStore}` | `checkout.paymentForm.${keyof ICheckoutPaymentFormStore}` | `checkout.paymentForm.paymentSession.${keyof ICheckoutPaymentSessionStore}` | `checkout.paymentForm.paymentMethod.${keyof ICheckoutPaymentMethodStore}` | `checkout.presale.${keyof ICheckoutPresaleStore}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferencesStore}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipientStore}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCodeStore}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.onDemandFulfillmentTipInfo.${string}`;
|
|
29
29
|
interface MiddlewareContext {
|
|
30
30
|
action: string;
|
|
31
31
|
payload: any;
|
|
@@ -3,7 +3,7 @@ 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
5
|
import type { IProductStore } from '@/core/store/interfaces/product.interface';
|
|
6
|
-
export declare const LOCAL_STORAGE_PREFIX = "
|
|
6
|
+
export declare const LOCAL_STORAGE_PREFIX = "lce";
|
|
7
7
|
export declare const initialProductState: IProductStore;
|
|
8
8
|
export declare const initialCartState: ICartStore;
|
|
9
9
|
export declare const initialCheckoutState: ICheckoutStore;
|
|
@@ -55,8 +55,8 @@ export interface ITelemetryComponentContext {
|
|
|
55
55
|
}
|
|
56
56
|
export interface ITelemetryUserContext {
|
|
57
57
|
deviceId: string;
|
|
58
|
-
sessionId?: string;
|
|
59
58
|
isLocalStorageAvailable: boolean;
|
|
59
|
+
selectedAddress?: string;
|
|
60
60
|
}
|
|
61
61
|
export interface ITelemetryBrowserContext {
|
|
62
62
|
userAgent: string;
|
|
@@ -28,7 +28,6 @@ export declare abstract class ElementsBaseClient {
|
|
|
28
28
|
protected clientPrepared: boolean;
|
|
29
29
|
protected componentFactoryInitialized: boolean;
|
|
30
30
|
protected cartDrawerCreated: boolean;
|
|
31
|
-
protected gtmInitialized: boolean;
|
|
32
31
|
protected injectedComponents: Map<string, IInjectedComponent>;
|
|
33
32
|
constructor(clientConfigs: IClientConfigs);
|
|
34
33
|
prepare(): Promise<void>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const ELEMENTS_ENV: {
|
|
2
|
-
readonly LOCAL: "local";
|
|
3
2
|
readonly DEVELOPMENT: "development";
|
|
4
3
|
readonly STAGING: "staging";
|
|
5
4
|
readonly PRODUCTION: "production";
|
|
@@ -7,6 +6,9 @@ export declare const ELEMENTS_ENV: {
|
|
|
7
6
|
export type ElementsEnv = (typeof ELEMENTS_ENV)[keyof typeof ELEMENTS_ENV];
|
|
8
7
|
export declare const ELEMENTS_ACTIONS_EVENT: {
|
|
9
8
|
readonly CLIENT_READY: "client_ready";
|
|
9
|
+
readonly ADDRESS_UPDATED: "address_updated";
|
|
10
|
+
readonly ADDRESS_CLEARED: "address_cleared";
|
|
11
|
+
readonly ADDRESS_FAILED: "address_failed";
|
|
10
12
|
readonly PRODUCT_LOADED: "product_loaded";
|
|
11
13
|
readonly PRODUCT_QUANTITY_INCREASE: "product_quantity_increase";
|
|
12
14
|
readonly PRODUCT_QUANTITY_DECREASE: "product_quantity_decrease";
|
|
@@ -30,9 +32,6 @@ export declare const ELEMENTS_ACTIONS_EVENT: {
|
|
|
30
32
|
readonly CART_PROMO_CODE_FAILED: "cart_promo_code_failed";
|
|
31
33
|
readonly CART_PRODUCT_ADD_SUCCESS: "cart_product_add_success";
|
|
32
34
|
readonly CART_PRODUCT_ADD_FAILED: "cart_product_add_failed";
|
|
33
|
-
readonly ADDRESS_UPDATED: "address_updated";
|
|
34
|
-
readonly ADDRESS_CLEARED: "address_cleared";
|
|
35
|
-
readonly ADDRESS_FAILED: "address_failed";
|
|
36
35
|
readonly CHECKOUT_LOADED: "checkout_loaded";
|
|
37
36
|
readonly CHECKOUT_OPENED: "checkout_opened";
|
|
38
37
|
readonly CHECKOUT_CLOSED: "checkout_closed";
|
|
@@ -41,8 +40,8 @@ export declare const ELEMENTS_ACTIONS_EVENT: {
|
|
|
41
40
|
readonly CHECKOUT_BILLING_SAME_AS_SHIPPING_TOGGLED: "checkout_billing_same_as_shipping_toggled";
|
|
42
41
|
readonly CHECKOUT_MARKETING_PREFERENCES_TOGGLED: "checkout_marketing_preferences_toggled";
|
|
43
42
|
readonly CHECKOUT_CUSTOMER_INFORMATION_UPDATED: "checkout_customer_information_updated";
|
|
44
|
-
readonly CHECKOUT_BILLING_INFORMATION_UPDATED: "checkout_billing_information_updated";
|
|
45
43
|
readonly CHECKOUT_GIFT_INFORMATION_UPDATED: "checkout_gift_information_updated";
|
|
44
|
+
readonly CHECKOUT_BILLING_INFORMATION_UPDATED: "checkout_billing_information_updated";
|
|
46
45
|
readonly CHECKOUT_ITEM_REMOVED: "checkout_item_removed";
|
|
47
46
|
readonly CHECKOUT_ITEM_QUANTITY_INCREASE: "checkout_item_quantity_increase";
|
|
48
47
|
readonly CHECKOUT_ITEM_QUANTITY_DECREASE: "checkout_item_quantity_decrease";
|
|
@@ -108,18 +107,22 @@ export declare const COMPONENT_TYPE: {
|
|
|
108
107
|
readonly CART_BODY: "cart-body";
|
|
109
108
|
readonly CART_FULFILLMENT: "cart-fulfillment";
|
|
110
109
|
readonly CHECKOUT: "checkout";
|
|
111
|
-
readonly
|
|
110
|
+
readonly CHECKOUT_INFORMATION: "checkout-information";
|
|
111
|
+
readonly CHECKOUT_STRIPE_HANDLER: "checkout-stripe-handler";
|
|
112
112
|
readonly CHECKOUT_STRIPE_FORM: "checkout-stripe-form";
|
|
113
|
-
readonly
|
|
114
|
-
readonly
|
|
115
|
-
readonly
|
|
113
|
+
readonly CHECKOUT_PAYMENT: "checkout-payment";
|
|
114
|
+
readonly CHECKOUT_PAYMENT_SUMMARY: "checkout-payment-summary";
|
|
115
|
+
readonly CHECKOUT_BILLING: "checkout-billing";
|
|
116
|
+
readonly CHECKOUT_ORDER_SUMMARY: "checkout-order-summary";
|
|
116
117
|
readonly CHECKOUT_PROMO_CODE: "checkout-promo-code";
|
|
117
118
|
readonly CHECKOUT_GIFT_CARDS: "checkout-gift-cards";
|
|
118
119
|
readonly CHECKOUT_AMOUNTS: "checkout-amounts";
|
|
119
120
|
readonly CHECKOUT_ITEMS: "checkout-items";
|
|
120
121
|
readonly CHECKOUT_COMPLETED: "checkout-completed";
|
|
121
|
-
readonly
|
|
122
|
-
readonly
|
|
122
|
+
readonly CHECKOUT_DELIVER_TO: "checkout-deliver-to";
|
|
123
|
+
readonly CHECKOUT_DELIVER_TO_SUMMARY: "checkout-deliver-to-summary";
|
|
124
|
+
readonly CHECKOUT_BUYER: "checkout-buyer";
|
|
125
|
+
readonly CHECKOUT_BUYER_SUMMARY: "checkout-buyer-summary";
|
|
123
126
|
readonly CHECKOUT_TIPS: "checkout-tips";
|
|
124
127
|
readonly CHECKOUT_PC_GC: "checkout-pc-gc";
|
|
125
128
|
readonly CHECKOUT_ITEM: "checkout-item";
|
|
@@ -128,6 +131,7 @@ export declare const COMPONENT_TYPE: {
|
|
|
128
131
|
readonly CHECKOUT_HEADER: "checkout-header";
|
|
129
132
|
readonly CHECKOUT_PRESALE_COUNTDOWN: "checkout-presale-countdown";
|
|
130
133
|
readonly CHECKOUT_PRESALE_EXPIRED: "checkout-presale-expired";
|
|
134
|
+
readonly CHECKOUT_SEND_AS_GIFT: "checkout-send-as-gift";
|
|
131
135
|
};
|
|
132
136
|
export type ComponentType = (typeof COMPONENT_TYPE)[keyof typeof COMPONENT_TYPE];
|
|
133
137
|
export declare const FULFILLMENT_TYPE: {
|
|
@@ -189,7 +189,7 @@ export interface ICheckoutPrepareResponse {
|
|
|
189
189
|
giftOptions: ICheckoutGiftOptions;
|
|
190
190
|
marketingPreferences: ICheckoutMarketingPreferences;
|
|
191
191
|
shippingAddress: IAddress;
|
|
192
|
-
billingAddress: ICheckoutBillingAddress
|
|
192
|
+
billingAddress: ICheckoutBillingAddress;
|
|
193
193
|
amounts: ICheckoutTotalAmounts;
|
|
194
194
|
items: ICheckoutItem[];
|
|
195
195
|
retailers: ICheckoutRetailer[];
|
|
@@ -17,7 +17,6 @@ export interface ICheckoutLayout {
|
|
|
17
17
|
thankYouButtonText: string;
|
|
18
18
|
drawerHeaderText: string;
|
|
19
19
|
placeOrderButtonText: string;
|
|
20
|
-
placeOrderButtonShowRequiredFields: boolean;
|
|
21
20
|
checkoutCompleted: ICheckoutCompleted;
|
|
22
21
|
}
|
|
23
22
|
export interface ICheckoutCompleted {
|
|
@@ -11,6 +11,11 @@ export interface IElementsProxyConfig {
|
|
|
11
11
|
baseUrl: string;
|
|
12
12
|
headers?: Record<string, string>;
|
|
13
13
|
}
|
|
14
|
+
export interface ILiquidCommerceElementsDevelopmentConfig {
|
|
15
|
+
customApiUrl?: string;
|
|
16
|
+
paymentMethodId?: string;
|
|
17
|
+
openShadowDom?: boolean;
|
|
18
|
+
}
|
|
14
19
|
export interface IClientCustomThemeConfig {
|
|
15
20
|
global?: UpdateComponentGlobalConfigs;
|
|
16
21
|
product?: UpdateProductComponent;
|
|
@@ -18,18 +23,17 @@ export interface IClientCustomThemeConfig {
|
|
|
18
23
|
cart?: UpdateCartComponent;
|
|
19
24
|
checkout?: UpdateCheckoutComponent;
|
|
20
25
|
}
|
|
21
|
-
export interface
|
|
26
|
+
export interface ILiquidCommerceElementsBaseConfig {
|
|
22
27
|
env?: ElementsEnv;
|
|
23
28
|
promoTicker?: IPromoTicker[];
|
|
24
29
|
customTheme?: IClientCustomThemeConfig;
|
|
25
30
|
debugMode?: DebugMode;
|
|
26
31
|
}
|
|
27
|
-
export interface
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
customTheme?: IClientCustomThemeConfig;
|
|
32
|
+
export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
|
|
33
|
+
}
|
|
34
|
+
export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
|
|
31
35
|
proxy?: IElementsProxyConfig;
|
|
32
|
-
|
|
36
|
+
development?: ILiquidCommerceElementsDevelopmentConfig;
|
|
33
37
|
}
|
|
34
38
|
export interface IInjectProductElement {
|
|
35
39
|
containerId: string;
|
|
@@ -66,7 +70,9 @@ export interface ILiquidCommerceElementsUIMethod {
|
|
|
66
70
|
cartButton(containerId: string, showItemsCount?: boolean): void;
|
|
67
71
|
floatingCartButton(showItemsCount?: boolean): void;
|
|
68
72
|
cartSubtotal(elementId: string): void;
|
|
69
|
-
cartItemsCount(elementId: string
|
|
73
|
+
cartItemsCount(elementId: string, options?: {
|
|
74
|
+
hideZero: boolean;
|
|
75
|
+
}): void;
|
|
70
76
|
}
|
|
71
77
|
export interface ILiquidCommerceElementsActions {
|
|
72
78
|
product: IProductActions;
|