@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.
@@ -1,4 +1,4 @@
1
- import type { IBaseCartEventData, IBaseProductEventData, ICheckoutDetails } from '@/core/pubsub';
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: () => ICheckoutDetails;
45
+ getDetails: () => ICheckoutDetailsEventData;
46
46
  }
47
47
  export declare class ClientActionService {
48
48
  private readonly pubSub;
@@ -35,6 +35,7 @@ interface BaseItem {
35
35
  upc?: string;
36
36
  grouping_id?: string;
37
37
  product_id?: string;
38
+ item_size?: string;
38
39
  }
39
40
  interface PurchaseData {
40
41
  transaction_id: string;
@@ -55,6 +55,7 @@ export interface IBaseCartEventData {
55
55
  subtotal: number;
56
56
  total: number;
57
57
  };
58
+ itemCount: number;
58
59
  updatedAt: string;
59
60
  createdAt: string;
60
61
  }
@@ -1,5 +1,4 @@
1
- import type { ICheckoutItemStore } from '@/core/store';
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 ICheckoutDetails {
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
- amounts: ICheckoutTotalAmounts;
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;
@@ -36,6 +36,7 @@ export interface ICartTotalsStore {
36
36
  total: number;
37
37
  shippingFee: number;
38
38
  platformFee: number;
39
+ giftCardTotal: number;
39
40
  engravingFee: number;
40
41
  deliveryFee: number;
41
42
  discounts: 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
  }
@@ -153,4 +153,6 @@ export interface IProductPresale {
153
153
  estimatedShipBy: null | string;
154
154
  isActive: boolean;
155
155
  language: string;
156
+ presaleLimit: number;
157
+ price: number;
156
158
  }
@@ -16,5 +16,6 @@ export declare class CartFooterComponent extends BaseComponent<ICartFooterCompon
16
16
  private shouldDisableCheckout;
17
17
  private updateCheckoutButtonState;
18
18
  private updateSubtotalItemsCount;
19
+ private handleCheckout;
19
20
  protected template(): HTMLElement[];
20
21
  }
@@ -6,5 +6,6 @@ export declare class CartItemComponent extends BaseComponent<ICartItemComponentP
6
6
  get hostClasses(): string[];
7
7
  get hostAttributes(): Record<string, string>;
8
8
  constructor();
9
+ private handleOpenEngravingForm;
9
10
  protected template(): HTMLElement[];
10
11
  }
@@ -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[];
@@ -9,5 +9,6 @@ export declare class EngravingViewComponent extends BaseComponent<IEngravingView
9
9
  private engravingQuantityFee;
10
10
  private engravingLines;
11
11
  private handleEdit;
12
+ private handleRemove;
12
13
  protected template(): HTMLElement | HTMLElement[] | string;
13
14
  }