@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.
Files changed (172) hide show
  1. package/README.md +156 -2500
  2. package/dist/index.checkout.esm.js +16087 -0
  3. package/dist/index.esm.js +16301 -14189
  4. package/dist/types/auto-initialize/checkout.d.ts +2 -0
  5. package/dist/types/auto-initialize/shared-utils.d.ts +22 -0
  6. package/dist/types/{elements-base-client.d.ts → clients/base.d.ts} +11 -1
  7. package/dist/types/clients/checkout.d.ts +13 -0
  8. package/dist/types/constants/core.constant.d.ts +5 -3
  9. package/dist/types/core/api/api-client.service.d.ts +10 -12
  10. package/dist/types/core/api/auth-client.service.d.ts +31 -9
  11. package/dist/types/core/api/http-client.service.d.ts +0 -1
  12. package/dist/types/core/client/actions/base-action.service.d.ts +15 -0
  13. package/dist/types/core/client/actions/client-address-action.service.d.ts +18 -0
  14. package/dist/types/core/client/actions/client-cart-action.service.d.ts +37 -0
  15. package/dist/types/core/client/actions/client-checkout-action.service.d.ts +50 -0
  16. package/dist/types/core/client/actions/client-product-action.service.d.ts +12 -0
  17. package/dist/types/core/client/client-action.service.d.ts +6 -70
  18. package/dist/types/core/client/client-config.service.d.ts +3 -2
  19. package/dist/types/core/command/common-command.service.d.ts +2 -1
  20. package/dist/types/core/google-tag-manager.service.d.ts +4 -1
  21. package/dist/types/core/logger/logger.service.d.ts +1 -1
  22. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  23. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  24. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  25. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -75
  26. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -56
  27. package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
  28. package/dist/types/core/store/interfaces/core.interface.d.ts +18 -3
  29. package/dist/types/core/store/interfaces/metadata.interface.d.ts +11 -0
  30. package/dist/types/core/store/interfaces/product-list.interface.d.ts +45 -0
  31. package/dist/types/core/store/interfaces/product.interface.d.ts +3 -1
  32. package/dist/types/core/store/store.constant.d.ts +4 -0
  33. package/dist/types/enums/core.enum.d.ts +38 -1
  34. package/dist/types/enums/index.d.ts +0 -1
  35. package/dist/types/index.checkout.d.ts +7 -0
  36. package/dist/types/index.checkout.umd.d.ts +4 -0
  37. package/dist/types/index.d.ts +2 -2
  38. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  39. package/dist/types/interfaces/api/checkout.interface.d.ts +217 -0
  40. package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
  41. package/dist/types/interfaces/api/product.interface.d.ts +5 -7
  42. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -0
  43. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  44. package/dist/types/interfaces/configs/index.d.ts +1 -0
  45. package/dist/types/interfaces/configs/product-list.interface.d.ts +28 -0
  46. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  47. package/dist/types/interfaces/core.interface.d.ts +34 -6
  48. package/dist/types/modules/address/address-input.component.d.ts +11 -0
  49. package/dist/types/modules/address/address.command.d.ts +1 -0
  50. package/dist/types/modules/address/styles/register-styles.d.ts +1 -0
  51. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  52. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  53. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  54. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  55. package/dist/types/modules/cart/styles/register-styles.d.ts +1 -0
  56. package/dist/types/modules/checkout/checkout.commands.d.ts +22 -9
  57. package/dist/types/modules/checkout/checkout.component.d.ts +2 -0
  58. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  59. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +2 -0
  60. package/dist/types/modules/checkout/components/checkout-header.component.d.ts +1 -0
  61. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  62. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  63. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  64. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  65. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  66. package/dist/types/modules/checkout/constant.d.ts +3 -0
  67. package/dist/types/modules/checkout/styles/register-styles.d.ts +1 -0
  68. package/dist/types/modules/product/product.commands.d.ts +1 -0
  69. package/dist/types/modules/product/styles/register-styles.d.ts +1 -0
  70. package/dist/types/modules/product-list/components/card-components/index.d.ts +7 -0
  71. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +8 -0
  72. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  73. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +12 -0
  74. package/dist/types/modules/product-list/components/card-components/product-price-and-personalization.d.ts +13 -0
  75. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  76. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  77. package/dist/types/modules/product-list/components/card-components/product-title.d.ts +6 -0
  78. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  79. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  80. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  81. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  82. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  83. 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
  84. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
  85. package/dist/types/modules/product-list/components/index.d.ts +7 -3
  86. package/dist/types/modules/product-list/components/product-list-card-loading.component.d.ts +2 -1
  87. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +10 -0
  88. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +58 -37
  89. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +28 -0
  90. package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +26 -0
  91. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
  92. package/dist/types/modules/product-list/product-list-card.component.d.ts +30 -0
  93. package/dist/types/modules/product-list/product-list.commands.d.ts +64 -4
  94. package/dist/types/modules/product-list/product-list.component.d.ts +16 -44
  95. package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
  96. package/dist/types/modules/product-list/product-list.interface.d.ts +37 -31
  97. package/dist/types/modules/product-list/styles/product-list-card.style.d.ts +1 -0
  98. package/dist/types/modules/product-list/styles/product-list-filters.style.d.ts +1 -0
  99. package/dist/types/modules/product-list/styles/register-styles.d.ts +1 -0
  100. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  101. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  102. package/dist/types/modules/theme-provider/services/style-registry.service.d.ts +16 -0
  103. package/dist/types/modules/theme-provider/services/stylesheet-generator.service.d.ts +0 -1
  104. package/dist/types/modules/theme-provider/styles/register-styles.d.ts +1 -0
  105. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  106. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +14 -1
  107. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  108. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  109. package/dist/types/modules/ui-components/modal/modal.component.d.ts +23 -0
  110. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  111. package/dist/types/modules/ui-components/styles/modal.style.d.ts +1 -0
  112. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  113. package/dist/types/static/icon/check.icon.d.ts +2 -0
  114. package/dist/types/static/icon/index.d.ts +1 -0
  115. package/dist/types/utils/format.d.ts +0 -14
  116. package/docs/actions.md +320 -0
  117. package/docs/address.md +242 -0
  118. package/docs/cart.md +387 -0
  119. package/docs/checkout.md +420 -0
  120. package/docs/{CONFIGURATION.md → configuration.md} +212 -48
  121. package/docs/events.md +181 -0
  122. package/docs/product-list.md +311 -0
  123. package/docs/product.md +250 -0
  124. package/docs/{THEMING.md → theming.md} +110 -20
  125. package/docs/{TROUBLESHOOTING.md → troubleshooting.md} +6 -6
  126. package/package.json +20 -13
  127. package/dist/types/enums/cloud.enum.d.ts +0 -403
  128. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  129. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  130. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -211
  131. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  132. package/dist/types/interfaces/cloud/index.d.ts +0 -5
  133. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  134. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  135. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  136. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  137. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
  138. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  139. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  140. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  141. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  142. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  143. package/dist/types/modules/theme-provider/styles/address/index.d.ts +0 -1
  144. package/dist/types/modules/theme-provider/styles/cart/index.d.ts +0 -1
  145. package/dist/types/modules/theme-provider/styles/checkout/index.d.ts +0 -1
  146. package/dist/types/modules/theme-provider/styles/product/index.d.ts +0 -3
  147. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +0 -1
  148. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +0 -3
  149. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  150. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  151. package/dist/types/utils/helper.d.ts +0 -27
  152. package/docs/ACTIONS.md +0 -1300
  153. package/docs/DOCUMENTATION_INDEX.md +0 -311
  154. package/docs/EVENTS.md +0 -798
  155. package/umd/elements.js +0 -1
  156. /package/dist/types/{auto-initialize.d.ts → auto-initialize/main.d.ts} +0 -0
  157. /package/dist/types/{elements-builder-client.d.ts → clients/builder.d.ts} +0 -0
  158. /package/dist/types/{elements-client-helper.d.ts → clients/helpers.d.ts} +0 -0
  159. /package/dist/types/{elements-client.d.ts → clients/main.d.ts} +0 -0
  160. /package/dist/types/modules/{theme-provider/styles/address → address/styles}/address.style.d.ts +0 -0
  161. /package/dist/types/modules/{theme-provider/styles/cart → cart/styles}/cart.style.d.ts +0 -0
  162. /package/dist/types/modules/{theme-provider/styles/checkout → checkout/styles}/checkout.style.d.ts +0 -0
  163. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/image-carousel.style.d.ts +0 -0
  164. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/product.style.d.ts +0 -0
  165. /package/dist/types/modules/{theme-provider/styles/product → product/styles}/retailers.style.d.ts +0 -0
  166. /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
  167. /package/dist/types/modules/{theme-provider/styles/product-list → product-list/styles}/product-list.style.d.ts +0 -0
  168. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/drawer.style.d.ts +0 -0
  169. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/loading.style.d.ts +0 -0
  170. /package/dist/types/modules/{theme-provider/styles/ui → ui-components/styles}/promo-code-ticker.style.d.ts +0 -0
  171. /package/docs/{BROWSER_SUPPORT.md → browser-support.md} +0 -0
  172. /package/docs/{PROXY.md → proxy.md} +0 -0
@@ -1,3 +1,7 @@
1
+ import type { IProductListProduct } from 'core/store/interfaces/product-list.interface';
2
+ import { type NavigationSourceType } from 'enums';
3
+ import type { IFulfillment } from 'interfaces/api/product.interface';
4
+ import type { IProductListComponent } from 'interfaces/configs';
1
5
  import { BaseComponent } from '@/core/base-component.service';
2
6
  import type { IAddressComponent } from '@/interfaces/configs';
3
7
  import type { IAddressOptions } from './address.interface';
@@ -5,6 +9,12 @@ export interface IAddressInputComponentParams {
5
9
  productId?: string;
6
10
  isIndependentComponent?: boolean;
7
11
  options?: IAddressOptions;
12
+ navigationSource?: NavigationSourceType;
13
+ product?: IProductListProduct;
14
+ shippingFulfillment?: IFulfillment | null;
15
+ onDemandFulfillment?: IFulfillment | null;
16
+ showCollections?: boolean;
17
+ config?: IProductListComponent;
8
18
  }
9
19
  export declare class AddressInputComponent extends BaseComponent<IAddressInputComponentParams, IAddressComponent> {
10
20
  private suggestions;
@@ -24,6 +34,7 @@ export declare class AddressInputComponent extends BaseComponent<IAddressInputCo
24
34
  private closeDrawer;
25
35
  private handleCancel;
26
36
  private handleCheckAvailability;
37
+ private reopenAddToCartDrawer;
27
38
  private handleSuggestionClick;
28
39
  private handleDocumentClick;
29
40
  private searchAddresses;
@@ -11,4 +11,5 @@ export declare class AddressCommands extends BaseCommand {
11
11
  setAddressManually(address: IAddressAddress, coordinates: IAddressCoordinates): Promise<void>;
12
12
  clearSelectedAddress(): Promise<void>;
13
13
  getDetails(): IAddressData | null;
14
+ private buildFormattedAddressString;
14
15
  }
@@ -1,7 +1,6 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
2
  import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
3
3
  export interface AddItemParams {
4
- upc: string;
5
4
  fulfillmentId: string;
6
5
  partNumber: string;
7
6
  quantity: number;
@@ -9,17 +8,15 @@ export interface AddItemParams {
9
8
  identifier: string;
10
9
  }
11
10
  export declare class CartCommands extends BaseCommand {
12
- private readonly uiCommands;
13
- private readonly checkoutCommands;
14
- private readonly commonCommands;
15
11
  constructor();
16
12
  static getInstance(): CartCommands;
17
13
  updateItemQuantity(itemId: string, delta: number): Promise<void>;
18
14
  removeItem(itemId: string, isNotStandAlone?: boolean): Promise<void>;
19
15
  updateItemEngraving(productItemId: string, engravingLines: string[]): Promise<void>;
20
16
  addItem(params: AddItemParams): Promise<void>;
21
- addPresaleItem(params: AddItemParams): Promise<void>;
22
17
  handleGoToCheckout(): Promise<void>;
18
+ private trackBeginCheckout;
19
+ private resolveCheckoutRedirectUrl;
23
20
  applyPromoCode(promoCode: string): Promise<void>;
24
21
  removePromoCode(): Promise<void>;
25
22
  rerenderCart(): void;
@@ -32,4 +29,6 @@ export declare class CartCommands extends BaseCommand {
32
29
  private updateFulfillment;
33
30
  private addNewFulfillmentAndRetailer;
34
31
  private cleanupAfterItemRemoval;
32
+ private syncCartState;
33
+ private buildCartLoadedEventData;
35
34
  }
@@ -1,5 +1,6 @@
1
1
  import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
- export declare class CartBodyComponent extends BaseComponent<null, null> {
2
+ import type { ICartComponent } from '@/interfaces/configs';
3
+ export declare class CartBodyComponent extends BaseComponent<null, ICartComponent> {
3
4
  get hostClasses(): string[];
4
5
  constructor();
5
6
  private createEmptyCartElement;
@@ -12,7 +12,6 @@ export declare class CartFooterComponent extends BaseComponent<ICartFooterCompon
12
12
  onStoreWatch(changes: IOnStoreChanged[]): void;
13
13
  afterRender(): void;
14
14
  private isAnythingLoading;
15
- private hasUnmetMinimum;
16
15
  private shouldDisableCheckout;
17
16
  private updateCheckoutButtonState;
18
17
  private updateSubtotalItemsCount;
@@ -6,7 +6,6 @@ export declare class CartFulfillmentComponent extends BaseComponent<ICartFulfill
6
6
  get hostClasses(): string[];
7
7
  constructor();
8
8
  private getFulfillmentId;
9
- private getProductStore;
10
9
  private handleItemsUpdate;
11
10
  private setupItemElements;
12
11
  private setupMinimumPurchaseAlert;
@@ -17,7 +16,6 @@ export declare class CartFulfillmentComponent extends BaseComponent<ICartFulfill
17
16
  private isAnyItemUpdating;
18
17
  private checkAndUpdateLoadingState;
19
18
  onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
20
- private hasFulfillmentFeesChanged;
21
19
  private hasFulfillmentDataChanged;
22
20
  protected afterRender(): void;
23
21
  protected disconnected(): void;
@@ -1,11 +1,19 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore, ICheckoutPaymentMethodStore } from '@/core/store/interfaces/checkout.interface';
2
+ import type { ICheckoutDetailsEventData } from '@/core/pubsub/interfaces/checkout.interface';
3
+ import type { ICheckoutPaymentMethodStore } from '@/core/store/interfaces/checkout.interface';
4
+ import type { ICheckoutBilling, ICheckoutCustomer, ICheckoutGiftRecipient } from '@/interfaces/api/checkout.interface';
5
+ import type { AddItemParams } from '@/modules/cart/cart.commands';
6
+ import type { PresaleExpiredReason } from '@/modules/checkout/components';
3
7
  export declare class CheckoutCommands extends BaseCommand {
4
8
  private readonly uiCommands;
5
- private readonly commonCommands;
6
9
  constructor();
7
10
  static getInstance(): CheckoutCommands;
8
- loadCheckout(cartIdParam?: string): Promise<void>;
11
+ addPresaleItem(params: AddItemParams): Promise<void>;
12
+ loadCheckout(params: {
13
+ checkoutId?: string;
14
+ cartId?: string;
15
+ isForPresale?: boolean;
16
+ }): Promise<void>;
9
17
  toggleIsGift(active?: boolean): Promise<void>;
10
18
  toggleBillingSameAsShipping(active?: boolean): Promise<void>;
11
19
  toggleMarketingPreferences(fieldName: 'canEmail' | 'canSms', active?: boolean): Promise<void>;
@@ -17,7 +25,10 @@ export declare class CheckoutCommands extends BaseCommand {
17
25
  applyGiftCard(code: string): Promise<void>;
18
26
  removeGiftCard(code: string): Promise<void>;
19
27
  clearGiftCardError(): Promise<void>;
20
- openPresaleExpiredDrawer(): void;
28
+ showPresaleExpired(reason?: PresaleExpiredReason): void;
29
+ openCheckout(): void;
30
+ getReturnUrl(): string | null;
31
+ private resolveCheckoutPageUrl;
21
32
  rerenderCheckout(): void;
22
33
  updateCheckoutItemQuantity(itemId: string, delta: number): Promise<void>;
23
34
  removeItemEngraving(productItemId: string): Promise<void>;
@@ -28,18 +39,18 @@ export declare class CheckoutCommands extends BaseCommand {
28
39
  clearCheckoutError(): Promise<void>;
29
40
  editCustomerForm(): Promise<void>;
30
41
  saveCustomerForm({ shippingAddressTwo, deliveryInstructions, customerData, }: {
31
- customerData: ICheckoutCustomerStore;
42
+ customerData: ICheckoutCustomer;
32
43
  shippingAddressTwo: string;
33
44
  deliveryInstructions: string;
34
45
  }): Promise<void>;
35
46
  editGiftRecipientForm(): Promise<void>;
36
- saveGiftRecipientForm({ shippingAddressTwo, deliveryInstructions, ...giftRecipientData }: ICheckoutGiftRecipientStore & {
47
+ saveGiftRecipientForm({ shippingAddressTwo, deliveryInstructions, ...giftRecipientData }: ICheckoutGiftRecipient & {
37
48
  shippingAddressTwo: string;
38
49
  deliveryInstructions: string;
39
50
  }): Promise<void>;
40
51
  editPaymentForm(): Promise<void>;
41
52
  savePaymentForm({ billingFormData, paymentSession, }: {
42
- billingFormData?: ICheckoutBillingStore;
53
+ billingFormData?: ICheckoutBilling;
43
54
  paymentSession?: {
44
55
  confirmationTokenId: string;
45
56
  setupIntentId: string;
@@ -47,7 +58,9 @@ export declare class CheckoutCommands extends BaseCommand {
47
58
  }): Promise<void>;
48
59
  checkoutComplete(): Promise<void>;
49
60
  private updateStoreFromCheckoutResponse;
50
- private partialLoadCheckout;
61
+ private syncFromItemUpdate;
62
+ private syncCheckoutState;
63
+ private refreshCheckout;
51
64
  private dataForCheckoutPrepare;
52
- private buildCheckoutItemStore;
65
+ getDetails(): ICheckoutDetailsEventData;
53
66
  }
@@ -3,8 +3,10 @@ import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export interface ICheckoutComponentParams {
4
4
  checkoutId: string;
5
5
  isIndependentComponent: boolean;
6
+ hideHeader: boolean;
6
7
  }
7
8
  export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
8
9
  constructor();
9
10
  protected template(): HTMLElement[];
11
+ private createHeader;
10
12
  }
@@ -1,8 +1,8 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
- import type { ICheckoutBillingStore } from '@/core/store/interfaces/checkout.interface';
2
+ import type { ICheckoutBilling } from '@/interfaces/api/checkout.interface';
3
3
  import type { ICheckoutComponent } from '@/interfaces/configs';
4
4
  export interface ICheckoutBillingComponentParams {
5
- isFormValid: (isValid: boolean, data: ICheckoutBillingStore) => void;
5
+ isFormValid: (isValid: boolean, data: ICheckoutBilling) => void;
6
6
  }
7
7
  export declare class CheckoutBillingComponent extends BaseComponent<ICheckoutBillingComponentParams, ICheckoutComponent> {
8
8
  private billingData;
@@ -6,6 +6,8 @@ export interface ICheckoutCompletedComponentParams {
6
6
  cardLast4: string;
7
7
  customerEmail: string;
8
8
  giftRecipientEmail: string | null;
9
+ checkoutToken?: string;
10
+ cartId?: string;
9
11
  }
10
12
  export declare class CheckoutCompletedComponent extends BaseComponent<ICheckoutCompletedComponentParams, ICheckoutComponent> {
11
13
  get hostClasses(): string[];
@@ -2,6 +2,7 @@ import { BaseComponent } from '@/core/base-component.service';
2
2
  export interface ICheckoutHeaderParams {
3
3
  onClose?: () => void;
4
4
  onBackToCart?: () => void;
5
+ isHostedCheckout?: boolean;
5
6
  }
6
7
  export declare class CheckoutHeaderComponent extends BaseComponent<ICheckoutHeaderParams> {
7
8
  get hostClasses(): string[];
@@ -1,14 +1,15 @@
1
1
  import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export declare class CheckoutItemsComponent extends BaseComponent<null, ICheckoutComponent> {
4
+ private togglerElement;
5
+ private togglerButton;
6
+ private togglerLabel;
7
+ private itemsList;
4
8
  get hostClasses(): string[];
5
9
  constructor();
6
10
  private createItemElement;
7
- private getItemsListContainer;
8
- private getTogglerLabel;
9
11
  private getCurrentItemsMap;
10
12
  private syncItemsWithStore;
11
- private updateItemCount;
12
13
  onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
13
14
  private handleToggle;
14
15
  private setupToggler;
@@ -1,8 +1,11 @@
1
1
  import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
2
  export declare class CheckoutPresaleCountdownComponent extends BaseComponent<null> {
3
+ private static readonly DEFAULT_PRESALE_DURATION_SECONDS;
4
+ private static readonly ONE_MINUTE_THRESHOLD_SECONDS;
5
+ private static readonly COUNTDOWN_UPDATE_INTERVAL_MS;
3
6
  private countdownInterval;
4
7
  private expiresAt;
5
- private totalDuration;
8
+ private initialDurationSeconds;
6
9
  private rootElement;
7
10
  private scrollHandler;
8
11
  private scrollContainer;
@@ -11,16 +14,26 @@ export declare class CheckoutPresaleCountdownComponent extends BaseComponent<nul
11
14
  get hostClasses(): string[];
12
15
  constructor();
13
16
  onStoreChanged(changes: IOnStoreChanged[]): boolean;
17
+ private resetCountdownState;
14
18
  protected afterRender(): void;
15
19
  protected disconnected(): void;
16
20
  private setupDrawerScrollDetection;
21
+ private findScrollContainer;
22
+ private setScrolledState;
17
23
  private isScrollable;
18
24
  private cleanupScrollListener;
19
25
  private updateExpiresAt;
20
26
  private startCountdown;
21
27
  private stopCountdown;
22
28
  private updateCountdown;
29
+ private updateWarningState;
30
+ private updateTimerDisplay;
31
+ private updateProgressBar;
23
32
  private formatTime;
24
33
  private handleExpire;
25
34
  protected template(): HTMLElement;
35
+ private createTextContainer;
36
+ private createHeader;
37
+ private createSubtitle;
38
+ private createProgressBar;
26
39
  }
@@ -1,11 +1,17 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
- export declare class CheckoutPresaleExpiredComponent extends BaseComponent<null, ICheckoutComponent> {
3
+ export type PresaleExpiredReason = 'time_expired' | 'items_unavailable';
4
+ export interface ICheckoutPresaleExpiredComponentParams {
5
+ reason: PresaleExpiredReason;
6
+ }
7
+ export declare class CheckoutPresaleExpiredComponent extends BaseComponent<ICheckoutPresaleExpiredComponentParams, ICheckoutComponent> {
4
8
  private autoCloseInterval;
5
9
  private autoCloseSeconds;
6
10
  private autoCloseElement;
7
11
  get hostClasses(): string[];
8
12
  get hostAttributes(): Record<string, string>;
13
+ private isItemsUnavailable;
14
+ private isTimeExpired;
9
15
  protected afterRender(): void;
10
16
  protected disconnected(): void;
11
17
  private handleExit;
@@ -6,8 +6,8 @@ export declare class CheckoutTipsComponent extends BaseComponent<null, ICheckout
6
6
  constructor();
7
7
  protected afterRender(): void;
8
8
  private getTipSelection;
9
- private getOnDemandFulfillmentTipInfo;
10
- private getFulfillmentTipInfoArray;
9
+ private getOnDemandFulfillments;
10
+ private getRetailerNameForFulfillment;
11
11
  private handlePercentageSelect;
12
12
  private handleFulfillmentTipInput;
13
13
  private removeTipFromFulfillment;
@@ -7,8 +7,6 @@ export declare class CheckoutPcGcComponent extends BaseComponent<null, ICheckout
7
7
  onStoreWatch(changes: IOnStoreChanged[]): void;
8
8
  private updateAppliedGiftCards;
9
9
  private createAppliedGiftCardElement;
10
- private pcInputContainer;
11
- private gcInputContainer;
12
10
  private inputContainer;
13
11
  private createErrorElement;
14
12
  protected template(): HTMLElement[];
@@ -8,6 +8,7 @@ export declare const customerFormFields: {
8
8
  readonly addressTwo: "addressTwo";
9
9
  readonly company: "company";
10
10
  };
11
+ export type CustomerFieldName = (typeof customerFormFields)[keyof typeof customerFormFields];
11
12
  export declare const giftFormFields: {
12
13
  readonly firstName: "firstName";
13
14
  readonly lastName: "lastName";
@@ -16,6 +17,7 @@ export declare const giftFormFields: {
16
17
  readonly addressTwo: "addressTwo";
17
18
  readonly message: "message";
18
19
  };
20
+ export type GiftFieldName = (typeof giftFormFields)[keyof typeof giftFormFields];
19
21
  export declare const billingFormFields: {
20
22
  readonly firstName: "firstName";
21
23
  readonly lastName: "lastName";
@@ -28,3 +30,4 @@ export declare const billingFormFields: {
28
30
  readonly state: "state";
29
31
  readonly zipCode: "zipCode";
30
32
  };
33
+ export type BillingFieldName = (typeof billingFormFields)[keyof typeof billingFormFields];
@@ -7,6 +7,7 @@ import { type AddItemParams } from '@/modules/cart/cart.commands';
7
7
  export declare class ProductCommands extends BaseCommand {
8
8
  private readonly uiCommands;
9
9
  private readonly cartCommands;
10
+ private readonly checkoutCommands;
10
11
  constructor();
11
12
  static getInstance(): ProductCommands;
12
13
  createProductInstance(productId: string, firstTime?: boolean): Promise<void>;
@@ -0,0 +1,7 @@
1
+ export * from './product-badge';
2
+ export * from './product-button';
3
+ export * from './product-fulfillments';
4
+ export * from './product-price-and-personalization';
5
+ export * from './product-quantity-selector';
6
+ export * from './product-sizes-list';
7
+ export * from './product-title';
@@ -0,0 +1,8 @@
1
+ export interface IBadgesParams {
2
+ badges: Array<{
3
+ text: string;
4
+ className?: string;
5
+ }>;
6
+ separatorText?: string;
7
+ }
8
+ export declare const createProductBadges: ({ badges, separatorText }: IBadgesParams) => HTMLElement;
@@ -0,0 +1,11 @@
1
+ import type { ProductListCardCornerRadius } from 'interfaces/configs';
2
+ export interface IAddToCartButtonParams {
3
+ isPresale: boolean;
4
+ hasAvailability: boolean;
5
+ state: string;
6
+ disabled?: boolean;
7
+ borderRadius: ProductListCardCornerRadius;
8
+ hasAddress: boolean;
9
+ onClick?: (e: MouseEvent) => void | Promise<void>;
10
+ }
11
+ export declare const createAddToCartButton: ({ isPresale, hasAvailability, state, disabled, borderRadius, hasAddress, onClick, }: IAddToCartButtonParams) => HTMLElement;
@@ -0,0 +1,12 @@
1
+ import type { IProductFulfillmentStore } from 'core/store/interfaces/product.interface';
2
+ import { type NavigationSourceType } from 'enums';
3
+ export interface IFulfillmentSectionParams {
4
+ shippingVariants: Record<string, IProductFulfillmentStore>;
5
+ onDemandVariants: Record<string, IProductFulfillmentStore>;
6
+ enableShippingFulfillment: boolean;
7
+ enableOnDemandFulfillment: boolean;
8
+ productId: string;
9
+ navigationSource?: NavigationSourceType;
10
+ onDeliveryOptionsClick: (productId: string) => void | Promise<void>;
11
+ }
12
+ export declare const createFulfillmentSection: (params: IFulfillmentSectionParams) => HTMLElement;
@@ -0,0 +1,13 @@
1
+ export interface IPricePersonalizationSectionParams {
2
+ price: number;
3
+ showPrice: boolean;
4
+ hasPersonalization: boolean;
5
+ showPersonalization: boolean;
6
+ hasAddress: boolean;
7
+ wrapperClassName?: string;
8
+ priceClassName?: string;
9
+ personalizeClassName?: string;
10
+ personalizeText?: string;
11
+ onPersonalizeClick?: () => void;
12
+ }
13
+ export declare const createPricePersonalizationSection: ({ price, showPrice, hasPersonalization, showPersonalization, hasAddress, wrapperClassName, priceClassName, personalizeClassName, personalizeText, onPersonalizeClick, }: IPricePersonalizationSectionParams) => HTMLElement | null;
@@ -0,0 +1,10 @@
1
+ import type { ProductListCardCornerRadius, ProductListCardStyle } from 'interfaces/configs';
2
+ export interface IQuantitySelectorParams {
3
+ initialQuantity: number;
4
+ minQuantity: number;
5
+ maxQuantity: number;
6
+ cornerRadius: ProductListCardCornerRadius;
7
+ cardStyle: ProductListCardStyle;
8
+ onChange: (quantity: number) => void;
9
+ }
10
+ export declare const createQuantitySelector: ({ initialQuantity, minQuantity, maxQuantity, cornerRadius, cardStyle, onChange, }: IQuantitySelectorParams) => HTMLElement;
@@ -0,0 +1,9 @@
1
+ import type { IProductSizeStore } from 'core/store/interfaces/product.interface';
2
+ import type { ProductListCardCornerRadius } from 'interfaces/configs';
3
+ export interface ISizeSelectorParams {
4
+ sizes: Record<string, IProductSizeStore>;
5
+ selectedSize: IProductSizeStore;
6
+ cornerRadius: ProductListCardCornerRadius;
7
+ onSelect?: (size: IProductSizeStore) => void;
8
+ }
9
+ export declare const createProductSizesList: ({ sizes, selectedSize, cornerRadius, onSelect }: ISizeSelectorParams) => HTMLElement;
@@ -0,0 +1,6 @@
1
+ export interface ITitleSectionParams {
2
+ name: string;
3
+ productUrl?: string | null;
4
+ onTitleClick?: () => void;
5
+ }
6
+ export declare const createProductTitle: ({ name, productUrl, onTitleClick }: ITitleSectionParams) => HTMLElement;
@@ -0,0 +1,7 @@
1
+ export * from './product-list-apply-filter-button';
2
+ export * from './product-list-checkbox-filter';
3
+ export * from './product-list-chip';
4
+ export * from './product-list-filters-chips';
5
+ export * from './product-list-fulfillment-filter';
6
+ export * from './product-list-price-filter';
7
+ export * from './product-list-toggle-filters';
@@ -0,0 +1 @@
1
+ export declare function createApplyFiltersButton(onApplyFilters: VoidFunction): HTMLElement;
@@ -0,0 +1,5 @@
1
+ export interface IChipComponentParams {
2
+ text: string;
3
+ onRemove?: VoidFunction;
4
+ }
5
+ export declare function createChip(params: IChipComponentParams): HTMLElement;
@@ -0,0 +1,13 @@
1
+ import type { IExtendedFilterSchema, IProductListFilters } from 'modules/product-list/product-list.interface';
2
+ export interface ICreateChipsContainerParams {
3
+ currentFilters?: IProductListFilters;
4
+ sanitizedFilters?: IExtendedFilterSchema[];
5
+ onRemoveFilter: (key: string, value: string) => void;
6
+ onClearAllFilters: VoidFunction;
7
+ }
8
+ export interface IActiveFilter {
9
+ key: string;
10
+ value: string;
11
+ label: string;
12
+ }
13
+ export declare function createChipsContainer(params: ICreateChipsContainerParams): HTMLElement;
@@ -0,0 +1,14 @@
1
+ import { FULFILLMENT_OPTIONS } from 'modules/product-list/product-list.constants';
2
+ import type { IProductListFilters } from 'modules/product-list/product-list.interface';
3
+ export interface ICreateFulfillmentFilterParams {
4
+ currentFilters?: IProductListFilters;
5
+ deliveryCollapsed: boolean;
6
+ isSameDayDeliveryDisabled: boolean;
7
+ onFulfillmentOptionsChange?: (value: typeof FULFILLMENT_OPTIONS.ALL | typeof FULFILLMENT_OPTIONS.SHIPPING | typeof FULFILLMENT_OPTIONS.ON_DEMAND) => void;
8
+ onToggleCollapse: () => void;
9
+ }
10
+ export declare function createFulfillmentFilter(params: ICreateFulfillmentFilterParams): {
11
+ elements: HTMLElement[];
12
+ chevronContainer: HTMLElement;
13
+ fulfillmentList: HTMLElement;
14
+ };
@@ -11,7 +11,7 @@ export interface ICreatePriceFilterParams {
11
11
  };
12
12
  priceCollapsed: boolean;
13
13
  onPriceChange?: (min: string, max: string) => void;
14
- onToggleCollapse: () => void;
14
+ onToggleCollapse: VoidFunction;
15
15
  DEFAULT_MIN: string;
16
16
  DEFAULT_MAX: string;
17
17
  }
@@ -0,0 +1,13 @@
1
+ import type { IProductListFilters } from 'modules/product-list/product-list.interface';
2
+ export interface ICreateEngravingFilterParams {
3
+ currentFilters?: IProductListFilters;
4
+ isPersonalizationDisabled: boolean;
5
+ onEngravingChange?: (enabled: boolean) => void;
6
+ }
7
+ export interface ICreatePresaleFilterParams {
8
+ currentFilters?: IProductListFilters;
9
+ isPresaleDisabled: boolean;
10
+ onPresaleChange?: (enabled: boolean) => void;
11
+ }
12
+ export declare function createEngravingFilter(params: ICreateEngravingFilterParams): HTMLElement[];
13
+ export declare function createPresaleFilter(params: ICreatePresaleFilterParams): HTMLElement[];
@@ -1,5 +1,9 @@
1
- export * from './product-list-card.component';
1
+ export * from '../product-list-card.component';
2
+ export * from './filter-components';
3
+ export * from './filter-components/product-list-apply-filter-button';
2
4
  export * from './product-list-card-loading.component';
5
+ export * from './product-list-engraving.component';
3
6
  export * from './product-list-filters.component';
4
- export * from './product-list-filters-subcomponents';
5
- export * from './product-list-filters-subcomponents/product-list-apply-filter-button.component';
7
+ export * from './product-list-product-pre-cart.component';
8
+ export * from './product-list-retailers.component';
9
+ export * from './product-list-search.component';
@@ -1,6 +1,7 @@
1
+ import type { IProductListComponent } from 'interfaces/configs';
1
2
  import { BaseComponent } from '@/core/base-component.service';
2
3
  import type { IProductListComponentParams } from '@/modules/product-list/product-list.component';
3
- export declare class ProductListCardLoadingComponent extends BaseComponent<IProductListComponentParams> {
4
+ export declare class ProductListCardLoadingComponent extends BaseComponent<IProductListComponentParams, IProductListComponent> {
4
5
  get hostClasses(): string[];
5
6
  private createSkeletonCard;
6
7
  protected template(): HTMLElement[];
@@ -0,0 +1,10 @@
1
+ import { BaseComponent } from 'core/base-component.service';
2
+ import type { IEngravingFormComponentParams } from 'modules/ui-components/engraving';
3
+ export declare class ProductListEngravingComponent extends BaseComponent<IEngravingFormComponentParams> {
4
+ protected template(): HTMLElement[];
5
+ private createHeader;
6
+ private handleClose;
7
+ private handleEngravingComplete;
8
+ private handleEngravingCancel;
9
+ private reopenAddToCartDrawer;
10
+ }