@liquidcommerce/elements-sdk 2.3.0 → 2.4.1
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 +25 -21
- package/dist/index.esm.js +8543 -8169
- package/dist/types/core/client/client-action.service.d.ts +2 -2
- package/dist/types/core/google-tag-manager.service.d.ts +1 -0
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -0
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -6
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +43 -1
- package/dist/types/core/store/interfaces/cart.interface.d.ts +1 -0
- package/dist/types/core/store/interfaces/product.interface.d.ts +18 -6
- package/dist/types/interfaces/cloud/product.interface.d.ts +2 -0
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +1 -0
- package/dist/types/modules/cart/components/cart-item.component.d.ts +1 -0
- package/dist/types/modules/checkout/components/checkout-summary-section.component.d.ts +2 -0
- package/dist/types/modules/checkout/components/summary/checkout-items.component.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +1 -0
- package/docs/ACTIONS.md +1237 -0
- package/docs/BROWSER_SUPPORT.md +279 -0
- package/docs/CONFIGURATION.md +613 -0
- package/docs/DOCUMENTATION_INDEX.md +311 -0
- package/docs/EVENTS.md +765 -0
- package/docs/PROXY.md +228 -0
- package/docs/THEMING.md +592 -0
- package/docs/TROUBLESHOOTING.md +755 -0
- package/package.json +10 -7
- package/umd/elements.js +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBaseCartEventData, IBaseProductEventData,
|
|
1
|
+
import type { IBaseCartEventData, IBaseProductEventData, ICheckoutDetailsEventData } from '@/core/pubsub';
|
|
2
2
|
import { type FulfillmentType } from '@/enums';
|
|
3
3
|
import type { IAddress, ICoords } from '@/interfaces/cloud';
|
|
4
4
|
import type { IAddressData } from '@/modules/address';
|
|
@@ -42,7 +42,7 @@ export interface ICheckoutActions {
|
|
|
42
42
|
updateCustomerInfo: (params: Record<CustomerFieldName, string>) => void;
|
|
43
43
|
updateBillingInfo: (params: Record<BillingFieldName, string>) => void;
|
|
44
44
|
updateGiftInfo: (params: Record<GiftFieldName, string>) => void;
|
|
45
|
-
getDetails: () =>
|
|
45
|
+
getDetails: () => ICheckoutDetailsEventData;
|
|
46
46
|
}
|
|
47
47
|
export declare class ClientActionService {
|
|
48
48
|
private readonly pubSub;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { ICheckoutTotalAmounts } from '@/interfaces/cloud';
|
|
1
|
+
import type { ICartItemAttributes, ICheckoutTotalAmounts } from '@/interfaces/cloud';
|
|
3
2
|
export interface IBaseCheckoutEventData {
|
|
4
3
|
cartId: string;
|
|
5
4
|
}
|
|
@@ -72,13 +71,52 @@ export interface ICheckoutProductAddFailedEventData {
|
|
|
72
71
|
identifiers: string[];
|
|
73
72
|
error: string;
|
|
74
73
|
}
|
|
75
|
-
export interface
|
|
74
|
+
export interface ICheckoutItemEventData {
|
|
75
|
+
liquidId: string;
|
|
76
|
+
variantId: string;
|
|
77
|
+
cartItemId: string;
|
|
78
|
+
retailerId: string;
|
|
79
|
+
fulfillmentId: string;
|
|
80
|
+
salsifyGrouping: string;
|
|
81
|
+
name: string;
|
|
82
|
+
catPath: string;
|
|
83
|
+
volume: string;
|
|
84
|
+
uom: string;
|
|
85
|
+
proof: string;
|
|
86
|
+
abv: string;
|
|
87
|
+
containerType: string;
|
|
88
|
+
container: string;
|
|
89
|
+
size: string;
|
|
90
|
+
pack: boolean;
|
|
91
|
+
packDesc: string;
|
|
92
|
+
mainImage: string;
|
|
93
|
+
brand: string;
|
|
94
|
+
partNumber: string;
|
|
95
|
+
upc: string;
|
|
96
|
+
sku: string;
|
|
97
|
+
price: number;
|
|
98
|
+
unitPrice: number;
|
|
99
|
+
quantity: number;
|
|
100
|
+
unitTax: number;
|
|
101
|
+
bottleDeposits: number;
|
|
102
|
+
attributes: ICartItemAttributes;
|
|
103
|
+
retailerName: string;
|
|
104
|
+
expectationDetail: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ICheckoutDetailsEventData {
|
|
76
107
|
cartId: string;
|
|
77
|
-
|
|
78
|
-
items: Record<string, Omit<ICheckoutItemStore, 'attributes'>>;
|
|
79
|
-
isGift: boolean;
|
|
108
|
+
acceptedAccountCreation: boolean;
|
|
80
109
|
hasAgeVerify: boolean;
|
|
110
|
+
hasSubstitutionPolicy: boolean;
|
|
111
|
+
isGift: boolean;
|
|
112
|
+
billingSameAsShipping: boolean;
|
|
113
|
+
marketingPreferences: {
|
|
114
|
+
canEmail: boolean;
|
|
115
|
+
canSms: boolean;
|
|
116
|
+
};
|
|
81
117
|
hasPromoCode: boolean;
|
|
82
118
|
hasGiftCards: boolean;
|
|
119
|
+
amounts: ICheckoutTotalAmounts;
|
|
83
120
|
itemCount: number;
|
|
121
|
+
items: Record<string, ICheckoutItemEventData>;
|
|
84
122
|
}
|
|
@@ -9,6 +9,8 @@ export interface IElementsClientIsReadyEventData {
|
|
|
9
9
|
export interface IBaseProductFulfillmentEventData {
|
|
10
10
|
price: number;
|
|
11
11
|
partNumber: string;
|
|
12
|
+
stock: number;
|
|
13
|
+
isEngravable: boolean;
|
|
12
14
|
fulfillmentId: string;
|
|
13
15
|
fulfillmentType: FulfillmentType;
|
|
14
16
|
modalities: FulfillmentType[];
|
|
@@ -17,6 +19,23 @@ export interface IBaseProductFulfillmentEventData {
|
|
|
17
19
|
retailerAddress: (IAddress & ICoords) | null;
|
|
18
20
|
retailerTimezone: string;
|
|
19
21
|
}
|
|
22
|
+
export interface IBaseProductSizeAttributesEventData {
|
|
23
|
+
engraving?: {
|
|
24
|
+
status: boolean;
|
|
25
|
+
maxLines: number;
|
|
26
|
+
maxCharsPerLine: number;
|
|
27
|
+
fee: number;
|
|
28
|
+
location: string;
|
|
29
|
+
};
|
|
30
|
+
presale?: {
|
|
31
|
+
canPurchaseOn: null | string;
|
|
32
|
+
estimatedShipBy: null | string;
|
|
33
|
+
isActive: boolean;
|
|
34
|
+
language: string;
|
|
35
|
+
presaleLimit: number;
|
|
36
|
+
price: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
20
39
|
export interface IBaseProductSizeEventData {
|
|
21
40
|
id: string;
|
|
22
41
|
upc: string;
|
|
@@ -29,17 +48,40 @@ export interface IBaseProductSizeEventData {
|
|
|
29
48
|
image: string;
|
|
30
49
|
uom: string;
|
|
31
50
|
volume: string;
|
|
51
|
+
attributes: IBaseProductSizeAttributesEventData;
|
|
32
52
|
shippingFulfillments: Record<string, IBaseProductFulfillmentEventData>;
|
|
33
53
|
onDemandFulfillments: Record<string, IBaseProductFulfillmentEventData>;
|
|
34
54
|
}
|
|
35
55
|
export interface IBaseProductEventData {
|
|
36
56
|
identifier: string;
|
|
57
|
+
selectedSizeId: string | null;
|
|
58
|
+
selectedFulfillmentId: string | null;
|
|
59
|
+
selectedFulfillmentType: FulfillmentType;
|
|
37
60
|
id: string;
|
|
38
61
|
name: string;
|
|
39
62
|
brand: string;
|
|
40
|
-
category: string;
|
|
41
63
|
catPath: string;
|
|
64
|
+
category: string;
|
|
42
65
|
classification: string;
|
|
66
|
+
type: string;
|
|
67
|
+
salsifyGrouping: string;
|
|
68
|
+
subType: string;
|
|
69
|
+
mainImage: string | null;
|
|
70
|
+
images: string[];
|
|
71
|
+
region: string;
|
|
72
|
+
country: string;
|
|
73
|
+
material: string;
|
|
74
|
+
abv: string;
|
|
75
|
+
proof: string;
|
|
76
|
+
age: string;
|
|
77
|
+
color: string;
|
|
78
|
+
flavor: string;
|
|
79
|
+
variety: string;
|
|
80
|
+
appellation: string;
|
|
81
|
+
vintage: string;
|
|
82
|
+
description: string;
|
|
83
|
+
htmlDescription: string;
|
|
84
|
+
tastingNotes: string;
|
|
43
85
|
priceInfo: {
|
|
44
86
|
min: number;
|
|
45
87
|
max: number;
|
|
@@ -49,20 +49,33 @@ export interface IProductStore {
|
|
|
49
49
|
id: string;
|
|
50
50
|
name: string;
|
|
51
51
|
brand: string;
|
|
52
|
-
category: string;
|
|
53
52
|
catPath: string;
|
|
53
|
+
category: string;
|
|
54
54
|
classification: string;
|
|
55
55
|
type: string;
|
|
56
|
-
subType: string;
|
|
57
56
|
salsifyGrouping: string;
|
|
57
|
+
subType: string;
|
|
58
|
+
mainImage: string | null;
|
|
59
|
+
images: string[];
|
|
60
|
+
region: string;
|
|
61
|
+
country: string;
|
|
62
|
+
material: string;
|
|
63
|
+
abv: string;
|
|
64
|
+
proof: string;
|
|
65
|
+
age: string;
|
|
66
|
+
color: string;
|
|
67
|
+
flavor: string;
|
|
68
|
+
variety: string;
|
|
69
|
+
appellation: string;
|
|
70
|
+
vintage: string;
|
|
71
|
+
description: string;
|
|
72
|
+
htmlDescription: string;
|
|
73
|
+
tastingNotes: string;
|
|
58
74
|
priceInfo?: {
|
|
59
75
|
min: number;
|
|
60
76
|
max: number;
|
|
61
77
|
avg: number;
|
|
62
78
|
};
|
|
63
|
-
description: string;
|
|
64
|
-
htmlDescription: string;
|
|
65
|
-
images: string[];
|
|
66
79
|
quantity: number;
|
|
67
80
|
sizes: Record<string, IProductSizeStore>;
|
|
68
81
|
productHasAvailability: boolean;
|
|
@@ -76,5 +89,4 @@ export interface IProductStore {
|
|
|
76
89
|
error: string | null;
|
|
77
90
|
drawer: IProductDrawerStore;
|
|
78
91
|
rerender: boolean;
|
|
79
|
-
mainImage: string | null;
|
|
80
92
|
}
|
|
@@ -6,6 +6,8 @@ export declare class CheckoutSummarySectionComponent extends BaseComponent<null,
|
|
|
6
6
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
7
7
|
private updateZeroAmountElement;
|
|
8
8
|
protected afterRender(): void;
|
|
9
|
+
private handleEmailToggle;
|
|
10
|
+
private handleSmsToggle;
|
|
9
11
|
private marketingOptInsContainer;
|
|
10
12
|
private hasOnDemandOrder;
|
|
11
13
|
protected template(): HTMLElement[];
|
|
@@ -10,6 +10,7 @@ export declare class CheckoutItemsComponent extends BaseComponent<null, ICheckou
|
|
|
10
10
|
private syncItemsWithStore;
|
|
11
11
|
private updateItemCount;
|
|
12
12
|
onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
|
|
13
|
+
private handleToggle;
|
|
13
14
|
private setupToggler;
|
|
14
15
|
protected afterRender(): void;
|
|
15
16
|
protected template(): HTMLElement[];
|