@liquidcommerce/elements-sdk 2.6.0-beta.3 → 2.6.0-beta.30

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 (118) hide show
  1. package/README.md +7 -7
  2. package/dist/index.esm.js +15191 -14530
  3. package/dist/types/constants/core.constant.d.ts +4 -3
  4. package/dist/types/core/api/api-client.service.d.ts +15 -17
  5. package/dist/types/core/api/auth-client.service.d.ts +34 -23
  6. package/dist/types/core/api/http-client.service.d.ts +0 -1
  7. package/dist/types/core/client/client-action.service.d.ts +18 -12
  8. package/dist/types/core/client/client-config.service.d.ts +3 -0
  9. package/dist/types/core/command/base-command.service.d.ts +2 -2
  10. package/dist/types/core/command/common-command.service.d.ts +2 -1
  11. package/dist/types/core/google-tag-manager.service.d.ts +14 -11
  12. package/dist/types/core/logger/logger.service.d.ts +1 -1
  13. package/dist/types/core/pubsub/interfaces/address.interface.d.ts +3 -12
  14. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +27 -64
  15. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +44 -50
  16. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -4
  17. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +16 -81
  18. package/dist/types/core/store/interfaces/address.interface.d.ts +3 -12
  19. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  20. package/dist/types/core/store/interfaces/checkout.interface.d.ts +17 -108
  21. package/dist/types/core/store/interfaces/core.interface.d.ts +18 -5
  22. package/dist/types/core/store/interfaces/product-list.interface.d.ts +47 -0
  23. package/dist/types/core/store/interfaces/product.interface.d.ts +13 -66
  24. package/dist/types/core/store/store.constant.d.ts +3 -1
  25. package/dist/types/core/telemetry/telemetry.interface.d.ts +0 -1
  26. package/dist/types/elements-base-client.d.ts +5 -1
  27. package/dist/types/enums/core.enum.d.ts +26 -1
  28. package/dist/types/enums/index.d.ts +0 -1
  29. package/dist/types/interfaces/api/address.interface.d.ts +28 -0
  30. package/dist/types/interfaces/api/cart.interface.d.ts +95 -0
  31. package/dist/types/interfaces/api/checkout.interface.d.ts +216 -0
  32. package/dist/types/interfaces/api/product-list.interface.d.ts +38 -0
  33. package/dist/types/interfaces/api/product.interface.d.ts +105 -0
  34. package/dist/types/interfaces/configs/configurations.interface.d.ts +5 -5
  35. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  36. package/dist/types/interfaces/configs/index.d.ts +1 -0
  37. package/dist/types/interfaces/configs/product-list.interface.d.ts +25 -0
  38. package/dist/types/interfaces/configs/product.interface.d.ts +1 -0
  39. package/dist/types/interfaces/core.interface.d.ts +17 -5
  40. package/dist/types/modules/address/address.command.d.ts +3 -3
  41. package/dist/types/modules/address/address.interface.d.ts +0 -7
  42. package/dist/types/modules/cart/cart.commands.d.ts +4 -5
  43. package/dist/types/modules/cart/components/cart-body.component.d.ts +2 -1
  44. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  45. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  46. package/dist/types/modules/checkout/checkout.commands.d.ts +18 -9
  47. package/dist/types/modules/checkout/components/checkout-billing.component.d.ts +2 -2
  48. package/dist/types/modules/checkout/components/checkout-items.component.d.ts +4 -3
  49. package/dist/types/modules/checkout/components/checkout-presale-countdown.component.d.ts +14 -1
  50. package/dist/types/modules/checkout/components/checkout-presale-expired.component.d.ts +7 -1
  51. package/dist/types/modules/checkout/components/checkout-tips.component.d.ts +2 -2
  52. package/dist/types/modules/checkout/components/promo-pc-gc.component.d.ts +0 -2
  53. package/dist/types/modules/checkout/constant.d.ts +3 -0
  54. package/dist/types/modules/product/components/components.d.ts +2 -4
  55. package/dist/types/modules/product/product.commands.d.ts +3 -2
  56. package/dist/types/modules/product-list/components/card-components/index.d.ts +4 -0
  57. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  58. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +13 -0
  59. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  60. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  61. package/dist/types/modules/product-list/components/filter-components/index.d.ts +7 -0
  62. package/dist/types/modules/product-list/components/filter-components/product-list-apply-filter-button.d.ts +1 -0
  63. package/dist/types/modules/product-list/components/filter-components/product-list-chip.d.ts +5 -0
  64. package/dist/types/modules/product-list/components/filter-components/product-list-filters-chips.d.ts +13 -0
  65. package/dist/types/modules/product-list/components/filter-components/product-list-fulfillment-filter.d.ts +14 -0
  66. 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
  67. package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +13 -0
  68. package/dist/types/modules/product-list/components/index.d.ts +5 -3
  69. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +59 -37
  70. package/dist/types/modules/product-list/components/product-list-retailers.d.ts +17 -0
  71. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +22 -0
  72. package/dist/types/modules/product-list/product-list-card.component.d.ts +35 -0
  73. package/dist/types/modules/product-list/product-list.commands.d.ts +55 -3
  74. package/dist/types/modules/product-list/product-list.component.d.ts +13 -42
  75. package/dist/types/modules/product-list/product-list.constants.d.ts +39 -0
  76. package/dist/types/modules/product-list/product-list.interface.d.ts +36 -31
  77. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  78. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  79. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +1 -0
  80. package/dist/types/modules/theme-provider/styles/ui/modal.style.d.ts +1 -0
  81. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  82. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
  83. package/dist/types/modules/ui-components/input/index.d.ts +0 -1
  84. package/dist/types/modules/ui-components/input/input.component.d.ts +8 -1
  85. package/dist/types/modules/ui-components/modal/modal.component.d.ts +21 -0
  86. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  87. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  88. package/dist/types/static/icon/check.icon.d.ts +2 -0
  89. package/dist/types/static/icon/index.d.ts +1 -0
  90. package/dist/types/utils/format.d.ts +0 -14
  91. package/docs/ACTIONS.md +13 -13
  92. package/docs/EVENTS.md +7 -7
  93. package/package.json +8 -9
  94. package/umd/elements.js +1 -1
  95. package/dist/types/enums/cloud.enum.d.ts +0 -403
  96. package/dist/types/interfaces/cloud/address.interface.d.ts +0 -36
  97. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  98. package/dist/types/interfaces/cloud/catalog.interface.d.ts +0 -43
  99. package/dist/types/interfaces/cloud/checkout.interface.d.ts +0 -214
  100. package/dist/types/interfaces/cloud/core.interface.d.ts +0 -22
  101. package/dist/types/interfaces/cloud/index.d.ts +0 -7
  102. package/dist/types/interfaces/cloud/product.interface.d.ts +0 -158
  103. package/dist/types/interfaces/cloud/retailer.interface.d.ts +0 -67
  104. package/dist/types/interfaces/cloud/user.interface.d.ts +0 -100
  105. package/dist/types/modules/cart/cart.commands.helper.d.ts +0 -9
  106. package/dist/types/modules/checkout/components/checkout.type.d.ts +0 -4
  107. package/dist/types/modules/product/utils/helpers.d.ts +0 -3
  108. package/dist/types/modules/product/utils/retailer-hours.d.ts +0 -9
  109. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -36
  110. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/index.d.ts +0 -6
  111. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-apply-filter-button.component.d.ts +0 -1
  112. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-delivery-options-filter.components.d.ts +0 -16
  113. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-search.component.d.ts +0 -16
  114. package/dist/types/modules/product-list/components/product-list-filters-subcomponents/product-list-toggle-filters.components.d.ts +0 -18
  115. package/dist/types/modules/ui-components/input/birthdate-input.component.d.ts +0 -53
  116. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
  117. package/dist/types/utils/helper.d.ts +0 -27
  118. /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
@@ -1,4 +1,4 @@
1
- import type { PRODUCT_LIST_CARD_VARIANT, PRODUCT_LIST_FILTER_TYPES } from '@/constants';
1
+ import type { PRODUCT_LIST_FILTER_TYPES } from '@/constants';
2
2
  import type { IAddressActions, ICartActions, ICheckoutActions, IProductActions } from '@/core/client/client-action.service';
3
3
  import type { IClientConfigs } from '@/core/client/client-config.service';
4
4
  import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
@@ -28,6 +28,7 @@ export interface ILiquidCommerceElementsBaseConfig {
28
28
  promoTicker?: IPromoTicker[];
29
29
  customTheme?: IClientCustomThemeConfig;
30
30
  debugMode?: DebugMode;
31
+ checkoutUrl?: string;
31
32
  }
32
33
  export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
33
34
  }
@@ -39,17 +40,21 @@ export interface IInjectProductElement {
39
40
  containerId: string;
40
41
  identifier: string;
41
42
  }
42
- export type ProductListCardVariantType = (typeof PRODUCT_LIST_CARD_VARIANT)[keyof typeof PRODUCT_LIST_CARD_VARIANT];
43
43
  export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
44
44
  export interface IInjectProductListParams {
45
45
  containerId: string;
46
46
  rows?: number;
47
47
  columns?: number;
48
- cardVariant?: ProductListCardVariantType;
49
- fillCard?: boolean;
50
48
  filters?: ProductListFilterType[];
51
49
  productUrl?: string;
52
50
  }
51
+ export interface IInjectProductListSearchParams {
52
+ containerId: string;
53
+ }
54
+ export interface IInjectProductListFiltersParams {
55
+ containerId: string;
56
+ filters: ProductListFilterType[];
57
+ }
53
58
  export interface IBuilderInjectElementParams {
54
59
  type: ComponentType;
55
60
  containerId: string;
@@ -65,6 +70,11 @@ export interface IProcessInjectElementParams {
65
70
  containerId: string;
66
71
  identifier?: string;
67
72
  options?: IAddressOptions;
73
+ checkoutId?: string;
74
+ }
75
+ export interface IInjectCheckoutParams {
76
+ containerId: string;
77
+ checkoutId?: string;
68
78
  }
69
79
  export interface ILiquidCommerceElementsUIMethod {
70
80
  cartButton(containerId: string, showItemsCount?: boolean): void;
@@ -101,8 +111,10 @@ export interface ILiquidCommerceElementsClient {
101
111
  injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
102
112
  injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
103
113
  injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
104
- injectCheckoutElement(containerId: string): Promise<IInjectedComponent | null>;
114
+ injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
105
115
  injectProductList(params: IInjectProductListParams): Promise<void>;
116
+ injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
117
+ injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
106
118
  ui: ILiquidCommerceElementsUIMethod;
107
119
  actions: ILiquidCommerceElementsActions;
108
120
  getInjectedComponents(): Map<string, IInjectedComponent>;
@@ -1,6 +1,5 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { IAddress, IAddressAutocompleteResult, IAddressDetailsResult, ICoords } from '@/interfaces/cloud';
3
- import type { IAddressData } from './address.interface';
2
+ import type { IAddressAddress, IAddressAutocompleteResult, IAddressCoordinates, IAddressData, IAddressDetailsResult } from '@/interfaces/api/address.interface';
4
3
  export declare class AddressCommands extends BaseCommand {
5
4
  private productCommands;
6
5
  private cartCommands;
@@ -9,7 +8,8 @@ export declare class AddressCommands extends BaseCommand {
9
8
  searchAddresses(query: string): Promise<IAddressAutocompleteResult[]>;
10
9
  getAddressDetails(addressId: string): Promise<IAddressDetailsResult>;
11
10
  setSelectedAddress(addressData: IAddressData): Promise<void>;
12
- setAddressManually(address: Omit<IAddress, 'id'>, coordinates: ICoords): Promise<void>;
11
+ setAddressManually(address: IAddressAddress, coordinates: IAddressCoordinates): Promise<void>;
13
12
  clearSelectedAddress(): Promise<void>;
14
13
  getDetails(): IAddressData | null;
14
+ private buildFormattedAddressString;
15
15
  }
@@ -1,10 +1,3 @@
1
- import type { IAddress, ICoords } from '@/interfaces/cloud/address.interface';
2
1
  export interface IAddressOptions {
3
2
  showLabel?: boolean;
4
3
  }
5
- export interface IAddressData {
6
- id: string;
7
- formattedAddress: string;
8
- address: Omit<IAddress, 'id'>;
9
- coordinates: ICoords;
10
- }
@@ -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,18 @@
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
+ customCartId?: string;
14
+ isForPresale?: boolean;
15
+ }): Promise<void>;
9
16
  toggleIsGift(active?: boolean): Promise<void>;
10
17
  toggleBillingSameAsShipping(active?: boolean): Promise<void>;
11
18
  toggleMarketingPreferences(fieldName: 'canEmail' | 'canSms', active?: boolean): Promise<void>;
@@ -17,7 +24,7 @@ export declare class CheckoutCommands extends BaseCommand {
17
24
  applyGiftCard(code: string): Promise<void>;
18
25
  removeGiftCard(code: string): Promise<void>;
19
26
  clearGiftCardError(): Promise<void>;
20
- openPresaleExpiredDrawer(): void;
27
+ openPresaleExpiredDrawer(reason?: PresaleExpiredReason): void;
21
28
  rerenderCheckout(): void;
22
29
  updateCheckoutItemQuantity(itemId: string, delta: number): Promise<void>;
23
30
  removeItemEngraving(productItemId: string): Promise<void>;
@@ -28,18 +35,18 @@ export declare class CheckoutCommands extends BaseCommand {
28
35
  clearCheckoutError(): Promise<void>;
29
36
  editCustomerForm(): Promise<void>;
30
37
  saveCustomerForm({ shippingAddressTwo, deliveryInstructions, customerData, }: {
31
- customerData: ICheckoutCustomerStore;
38
+ customerData: ICheckoutCustomer;
32
39
  shippingAddressTwo: string;
33
40
  deliveryInstructions: string;
34
41
  }): Promise<void>;
35
42
  editGiftRecipientForm(): Promise<void>;
36
- saveGiftRecipientForm({ shippingAddressTwo, deliveryInstructions, ...giftRecipientData }: ICheckoutGiftRecipientStore & {
43
+ saveGiftRecipientForm({ shippingAddressTwo, deliveryInstructions, ...giftRecipientData }: ICheckoutGiftRecipient & {
37
44
  shippingAddressTwo: string;
38
45
  deliveryInstructions: string;
39
46
  }): Promise<void>;
40
47
  editPaymentForm(): Promise<void>;
41
48
  savePaymentForm({ billingFormData, paymentSession, }: {
42
- billingFormData?: ICheckoutBillingStore;
49
+ billingFormData?: ICheckoutBilling;
43
50
  paymentSession?: {
44
51
  confirmationTokenId: string;
45
52
  setupIntentId: string;
@@ -47,7 +54,9 @@ export declare class CheckoutCommands extends BaseCommand {
47
54
  }): Promise<void>;
48
55
  checkoutComplete(): Promise<void>;
49
56
  private updateStoreFromCheckoutResponse;
50
- private partialLoadCheckout;
57
+ private syncFromItemUpdate;
58
+ private syncCheckoutState;
59
+ private refreshCheckout;
51
60
  private dataForCheckoutPrepare;
52
- private buildCheckoutItemStore;
61
+ getDetails(): ICheckoutDetailsEventData;
53
62
  }
@@ -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;
@@ -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];
@@ -1,12 +1,10 @@
1
1
  import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
2
  import { type FulfillmentType } from '@/enums';
3
- import type { IProductSizeAttributes } from '@/interfaces/cloud';
4
- import type { RetailerStatus } from '@/modules/product/utils/retailer-hours';
5
- export declare function renderPopupRetailerCard({ fulfillment, selectedFulfillmentType, isSelected, fulfillmentStatus, selectedSizeAttributes, }: {
3
+ import type { IProductSizeAttributes } from '@/interfaces/api/product.interface';
4
+ export declare function renderPopupRetailerCard({ fulfillment, selectedFulfillmentType, isSelected, selectedSizeAttributes, }: {
6
5
  fulfillment: IProductFulfillmentStore;
7
6
  selectedFulfillmentType: FulfillmentType;
8
7
  isSelected: boolean;
9
- fulfillmentStatus: RetailerStatus;
10
8
  selectedSizeAttributes: IProductSizeAttributes | null;
11
9
  }): HTMLElement;
12
10
  export declare function renderFulfillmentTabsContainer({ shippingFulfillments, onDemandFulfillments, shippingSelected, onDemandSelected, onTabClick, enableShippingFulfillment, enableOnDemandFulfillment, }: {
@@ -2,16 +2,17 @@ import { BaseCommand } from '@/core/command/base-command.service';
2
2
  import type { IBaseProductEventData } from '@/core/pubsub/interfaces/product.interface';
3
3
  import type { IProductDrawerContentConfig } from '@/core/store/interfaces/product.interface';
4
4
  import { type FulfillmentType } from '@/enums';
5
- import type { IProductData } from '@/interfaces/cloud';
5
+ import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
6
6
  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>;
13
14
  loadMultipleProducts(productIds: string[]): Promise<void>;
14
- loadProduct(productId: string, customProductData?: IProductData | null): Promise<void>;
15
+ loadProduct(productId: string, customProductData?: IProductAvailabilityResponse | null): Promise<void>;
15
16
  selectSize(productId: string, sizeId: string): Promise<void>;
16
17
  selectFulfillment(productId: string, selectedFulfillmentId: string): Promise<void>;
17
18
  updateQuantity(productId: string, delta: number): Promise<void>;
@@ -0,0 +1,4 @@
1
+ export * from './product-button';
2
+ export * from './product-fulfillments';
3
+ export * from './product-quantity-selector';
4
+ export * from './product-sizes-list';
@@ -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,13 @@
1
+ import type { IProductFulfillmentStore } from 'core/store/interfaces/product.interface';
2
+ import { type FulfillmentType } from '@/enums';
3
+ export interface IFulfillmentSectionParams {
4
+ shippingVariants: Record<string, IProductFulfillmentStore>;
5
+ onDemandVariants: Record<string, IProductFulfillmentStore>;
6
+ enableShippingFulfillment: boolean;
7
+ enableOnDemandFulfillment: boolean;
8
+ selectedFulfillmentType: FulfillmentType;
9
+ selectedFulfillmentRetailerName: string;
10
+ productId: string;
11
+ onDeliveryOptionsClick: (productId: string) => void | Promise<void>;
12
+ }
13
+ export declare const createFulfillmentSection: (params: IFulfillmentSectionParams) => HTMLElement;
@@ -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,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,7 @@
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';
3
5
  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';
6
+ export * from './product-list-retailers';
7
+ export * from './product-list-search.component';