@liquidcommerce/elements-sdk 2.2.0-beta.4 → 2.2.0-beta.41

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 (114) hide show
  1. package/README.md +1715 -569
  2. package/dist/index.esm.js +14589 -10538
  3. package/dist/types/constants/core.constant.d.ts +32 -0
  4. package/dist/types/constants/index.d.ts +0 -1
  5. package/dist/types/{modules/api-client → core}/api-client.service.d.ts +4 -2
  6. package/dist/types/core/auth.service.d.ts +31 -4
  7. package/dist/types/core/base-component.service.d.ts +7 -3
  8. package/dist/types/core/circuit-breaker.service.d.ts +54 -0
  9. package/dist/types/core/client/client-action.service.d.ts +19 -14
  10. package/dist/types/core/client/client-config.service.d.ts +5 -3
  11. package/dist/types/core/command/base-command.service.d.ts +5 -3
  12. package/dist/types/core/command/command.service.d.ts +2 -0
  13. package/dist/types/core/command/common-command.service.d.ts +2 -1
  14. package/dist/types/core/debug-panel/debug-panel.service.d.ts +43 -0
  15. package/dist/types/core/debug-panel/debug-panel.styles.d.ts +1 -0
  16. package/dist/types/core/fingerprint.service.d.ts +4 -9
  17. package/dist/types/core/google-tag-manager.service.d.ts +128 -2
  18. package/dist/types/core/logger/logger-factory.d.ts +3 -0
  19. package/dist/types/core/logger/logger.service.d.ts +8 -5
  20. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +1 -0
  21. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +46 -6
  22. package/dist/types/core/pubsub/interfaces/core.interface.d.ts +5 -3
  23. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +43 -6
  24. package/dist/types/core/pubsub/pubsub.service.d.ts +3 -2
  25. package/dist/types/core/sdk-error-handler.d.ts +1 -0
  26. package/dist/types/core/singleton-manager.service.d.ts +3 -3
  27. package/dist/types/core/store/interfaces/cart.interface.d.ts +1 -1
  28. package/dist/types/core/store/interfaces/checkout.interface.d.ts +0 -1
  29. package/dist/types/core/store/interfaces/core.interface.d.ts +5 -3
  30. package/dist/types/core/store/interfaces/product.interface.d.ts +18 -7
  31. package/dist/types/core/store/store.constant.d.ts +5 -1
  32. package/dist/types/core/store/store.service.d.ts +4 -2
  33. package/dist/types/core/telemetry/telemetry.interface.d.ts +80 -0
  34. package/dist/types/core/telemetry/telemetry.service.d.ts +27 -0
  35. package/dist/types/core/utils.d.ts +0 -4
  36. package/dist/types/elements-base-client.d.ts +49 -0
  37. package/dist/types/elements-builder-client.d.ts +2 -0
  38. package/dist/types/elements-client-helper.d.ts +3 -0
  39. package/dist/types/enums/core.enum.d.ts +9 -1
  40. package/dist/types/index.d.ts +1 -0
  41. package/dist/types/index.umd.d.ts +2 -2
  42. package/dist/types/interfaces/cloud/catalog.interface.d.ts +43 -0
  43. package/dist/types/interfaces/cloud/index.d.ts +1 -0
  44. package/dist/types/interfaces/cloud/product.interface.d.ts +2 -0
  45. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -1
  46. package/dist/types/interfaces/configs/product.interface.d.ts +2 -0
  47. package/dist/types/interfaces/core.interface.d.ts +47 -19
  48. package/dist/types/modules/address/address.command.d.ts +1 -3
  49. package/dist/types/modules/cart/cart.commands.d.ts +2 -3
  50. package/dist/types/modules/cart/cart.commands.helper.d.ts +3 -2
  51. package/dist/types/modules/cart/cart.component.d.ts +1 -2
  52. package/dist/types/modules/cart/components/cart-footer.component.d.ts +1 -0
  53. package/dist/types/modules/cart/components/cart-item.component.d.ts +2 -6
  54. package/dist/types/modules/cart/components/index.d.ts +2 -0
  55. package/dist/types/modules/checkout/checkout.commands.d.ts +4 -4
  56. package/dist/types/modules/checkout/checkout.commands.helper.d.ts +1 -1
  57. package/dist/types/modules/checkout/checkout.component.d.ts +1 -2
  58. package/dist/types/modules/checkout/components/checkout-summary-section.component.d.ts +2 -0
  59. package/dist/types/modules/checkout/components/information/checkout-delivery-information-form.component.d.ts +1 -1
  60. package/dist/types/modules/checkout/components/summary/checkout-item-quantity.component.d.ts +0 -2
  61. package/dist/types/modules/checkout/components/summary/checkout-item.component.d.ts +2 -1
  62. package/dist/types/modules/checkout/components/summary/checkout-items.component.d.ts +1 -0
  63. package/dist/types/modules/checkout/components/summary/checkout-place-order-button.component.d.ts +0 -1
  64. package/dist/types/modules/checkout/constant.d.ts +0 -1
  65. package/dist/types/modules/product/components/components.d.ts +1 -1
  66. package/dist/types/modules/product/components/index.d.ts +1 -0
  67. package/dist/types/modules/product/components/product-add-to-cart-section.component.d.ts +1 -0
  68. package/dist/types/modules/product/components/product-interactions.component.d.ts +4 -1
  69. package/dist/types/modules/product/components/product-price.component.d.ts +1 -0
  70. package/dist/types/modules/product/components/product-retailers.component.d.ts +1 -0
  71. package/dist/types/modules/product/product.commands.d.ts +3 -4
  72. package/dist/types/modules/product/utils/helpers.d.ts +1 -1
  73. package/dist/types/modules/product/utils/retailer-hours.d.ts +1 -1
  74. package/dist/types/modules/product-list/components/index.d.ts +2 -0
  75. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +36 -0
  76. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +21 -0
  77. package/dist/types/modules/product-list/product-list.commands.d.ts +12 -0
  78. package/dist/types/modules/product-list/product-list.component.d.ts +76 -0
  79. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +0 -2
  80. package/dist/types/modules/theme-provider/services/font-manager.service.d.ts +1 -0
  81. package/dist/types/modules/theme-provider/styles/product-list/index.d.ts +1 -0
  82. package/dist/types/modules/theme-provider/styles/product-list/product-list.style.d.ts +1 -0
  83. package/dist/types/modules/ui-components/alert/alert.component.d.ts +1 -1
  84. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +13 -11
  85. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +4 -9
  86. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -0
  87. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +1 -1
  88. package/dist/types/modules/ui-components/ui.commands.d.ts +1 -1
  89. package/dist/types/static/icon/index.d.ts +0 -1
  90. package/dist/types/utils/format.d.ts +2 -1
  91. package/docs/ACTIONS.md +1300 -0
  92. package/docs/BROWSER_SUPPORT.md +279 -0
  93. package/docs/CONFIGURATION.md +740 -0
  94. package/docs/DOCUMENTATION_INDEX.md +311 -0
  95. package/docs/EVENTS.md +765 -0
  96. package/docs/PROXY.md +228 -0
  97. package/docs/THEMING.md +592 -0
  98. package/docs/TROUBLESHOOTING.md +793 -0
  99. package/package.json +20 -17
  100. package/umd/elements.js +1 -1
  101. package/dist/types/constants/z-index.constant.d.ts +0 -24
  102. package/dist/types/core/pubsub/index.d.ts +0 -2
  103. package/dist/types/core/pubsub/interfaces/index.d.ts +0 -5
  104. package/dist/types/core/store/index.d.ts +0 -2
  105. package/dist/types/core/store/interfaces/index.d.ts +0 -5
  106. package/dist/types/modules/address/index.d.ts +0 -4
  107. package/dist/types/modules/api-client/api-client.interface.d.ts +0 -21
  108. package/dist/types/modules/api-client/index.d.ts +0 -2
  109. package/dist/types/modules/cart/index.d.ts +0 -1
  110. package/dist/types/modules/checkout/index.d.ts +0 -1
  111. package/dist/types/modules/product/constant.d.ts +0 -2
  112. package/dist/types/modules/product/index.d.ts +0 -1
  113. package/dist/types/modules/theme-provider/index.d.ts +0 -2
  114. package/dist/types/static/icon/completed.icon.d.ts +0 -2
@@ -1,6 +1,7 @@
1
+ import type { PRODUCT_LIST_CARD_VARIANT, PRODUCT_LIST_FILTER_TYPES } from '@/constants';
1
2
  import type { IAddressActions, ICartActions, ICheckoutActions, IProductActions } from '@/core/client/client-action.service';
2
3
  import type { IClientConfigs } from '@/core/client/client-config.service';
3
- import type { ComponentType, ElementsEnv } from '@/enums';
4
+ import type { ComponentType, DebugMode, ElementsEnv } from '@/enums';
4
5
  import type { IAddressOptions } from '@/modules/address/address.interface';
5
6
  import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from './configs';
6
7
  export type DeepPartial<T> = {
@@ -17,34 +18,43 @@ export interface IClientCustomThemeConfig {
17
18
  cart?: UpdateCartComponent;
18
19
  checkout?: UpdateCheckoutComponent;
19
20
  }
21
+ export interface ILiquidCommerceElementsBuilderConfig {
22
+ env?: ElementsEnv;
23
+ promoTicker?: IPromoTicker[];
24
+ customTheme?: IClientCustomThemeConfig;
25
+ debugMode?: DebugMode;
26
+ }
20
27
  export interface ILiquidCommerceElementsConfig {
21
28
  env?: ElementsEnv;
22
29
  promoTicker?: IPromoTicker[];
23
30
  customTheme?: IClientCustomThemeConfig;
24
31
  proxy?: IElementsProxyConfig;
25
- isBuilder?: boolean;
26
- enableDebugging?: boolean;
32
+ debugMode?: DebugMode;
27
33
  }
28
34
  export interface IInjectProductElement {
29
35
  containerId: string;
30
36
  identifier: string;
31
37
  }
38
+ export type ProductListCardVariantType = (typeof PRODUCT_LIST_CARD_VARIANT)[keyof typeof PRODUCT_LIST_CARD_VARIANT];
39
+ export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
40
+ export interface IInjectProductListParams {
41
+ containerId: string;
42
+ rows?: number;
43
+ columns?: number;
44
+ cardVariant?: ProductListCardVariantType;
45
+ fillCard?: boolean;
46
+ filters?: ProductListFilterType[];
47
+ productUrl?: string;
48
+ }
32
49
  export interface IBuilderInjectElementParams {
33
50
  type: ComponentType;
34
51
  containerId: string;
35
52
  [key: string]: any;
36
53
  }
37
- export interface ILiquidCommerceElementsBuilderMethod {
38
- updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
39
- updateProductComponent(configs: UpdateProductComponent): Promise<void>;
40
- updateAddressComponent(configs: UpdateAddressComponent): void;
41
- updateCartComponent(configs: UpdateCartComponent): void;
42
- updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
43
- injectElement(params: IBuilderInjectElementParams): Promise<void>;
44
- injectProductElement(params: IInjectProductElement[]): Promise<void>;
45
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
46
- injectCartElement(containerId: string): Promise<void>;
47
- injectCheckoutElement(containerId: string): Promise<void>;
54
+ export interface IInjectedComponent {
55
+ getType(): ComponentType;
56
+ getElement(): HTMLElement;
57
+ rerender(): void;
48
58
  }
49
59
  export interface IProcessInjectElementParams {
50
60
  type: ComponentType;
@@ -64,13 +74,31 @@ export interface ILiquidCommerceElementsActions {
64
74
  cart: ICartActions;
65
75
  checkout: ICheckoutActions;
66
76
  }
77
+ export interface ILiquidCommerceElementsBuilderClient {
78
+ updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
79
+ updateProductComponent(configs: UpdateProductComponent): Promise<void>;
80
+ updateAddressComponent(configs: UpdateAddressComponent): void;
81
+ updateCartComponent(configs: UpdateCartComponent): void;
82
+ updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
83
+ injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
84
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
85
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
86
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
87
+ injectCheckoutElement(containerId: string, options?: {
88
+ simulatePresale?: boolean;
89
+ presaleExpiresInMinutes?: number;
90
+ }): Promise<IInjectedComponent | null>;
91
+ actions: ILiquidCommerceElementsActions;
92
+ }
67
93
  export interface ILiquidCommerceElementsClient {
68
- builder: ILiquidCommerceElementsBuilderMethod;
69
- injectProductElement(params: IInjectProductElement[]): Promise<void>;
70
- injectAddressElement(containerId: string, options?: IAddressOptions): Promise<void>;
71
- injectCartElement(containerId: string): Promise<void>;
72
- injectCheckoutElement(containerId: string): Promise<void>;
94
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
95
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
96
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
97
+ injectCheckoutElement(containerId: string): Promise<IInjectedComponent | null>;
98
+ injectProductList(params: IInjectProductListParams): Promise<void>;
73
99
  ui: ILiquidCommerceElementsUIMethod;
74
100
  actions: ILiquidCommerceElementsActions;
101
+ getInjectedComponents(): Map<string, IInjectedComponent>;
75
102
  }
76
103
  export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
104
+ export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
@@ -10,8 +10,6 @@ export declare class AddressCommands extends BaseCommand {
10
10
  getAddressDetails(addressId: string): Promise<IAddressDetailsResult>;
11
11
  setSelectedAddress(addressData: IAddressData): Promise<void>;
12
12
  setAddressManually(address: Omit<IAddress, 'id'>, coordinates: ICoords): Promise<void>;
13
- clearSelectedAddress(): void;
14
- private shouldResetCartForAddressChange;
15
- private persistSessionData;
13
+ clearSelectedAddress(): Promise<void>;
16
14
  getDetails(): IAddressData | null;
17
15
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { IBaseCartEventData } from '@/core/pubsub';
2
+ import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
3
3
  export interface AddItemParams {
4
4
  upc: string;
5
5
  fulfillmentId: string;
@@ -11,7 +11,6 @@ export interface AddItemParams {
11
11
  export declare class CartCommands extends BaseCommand {
12
12
  private readonly uiCommands;
13
13
  private readonly checkoutCommands;
14
- private readonly pubSubService;
15
14
  private readonly commonCommands;
16
15
  constructor();
17
16
  static getInstance(): CartCommands;
@@ -23,13 +22,13 @@ export declare class CartCommands extends BaseCommand {
23
22
  handleGoToCheckout(): Promise<void>;
24
23
  applyPromoCode(promoCode: string): Promise<void>;
25
24
  removePromoCode(): Promise<void>;
26
- clearPromoCodeError(): Promise<void>;
27
25
  rerenderCart(): void;
28
26
  resetCart(): Promise<void>;
29
27
  getDetails(): IBaseCartEventData;
30
28
  private buildItemUpdate;
31
29
  private syncItemsFromApiResponse;
32
30
  private syncCartMetaFromApiResponse;
31
+ private syncRetailersFromApiResponse;
33
32
  private updateFulfillment;
34
33
  private addNewFulfillmentAndRetailer;
35
34
  private cleanupAfterItemRemoval;
@@ -1,5 +1,6 @@
1
- import type { IBaseCartEventData } from '@/core/pubsub';
2
- import type { IAddressStore, ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store';
1
+ import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
2
+ import type { IAddressStore } from '@/core/store/interfaces/address.interface';
3
+ import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store/interfaces/cart.interface';
3
4
  import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
4
5
  export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
5
6
  export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICartComponent } from '@/interfaces/configs';
3
3
  export interface ICartComponentParams {
4
4
  isIndependentComponent: boolean;
@@ -6,6 +6,5 @@ export interface ICartComponentParams {
6
6
  export declare class CartComponent extends BaseComponent<ICartComponentParams, ICartComponent> {
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
10
9
  protected template(): HTMLElement[];
11
10
  }
@@ -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
  }
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  export interface ICartItemComponentParams {
3
3
  itemId: string;
4
4
  }
@@ -6,10 +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 getItemId;
10
- onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
11
- private handleEngravingElement;
12
- private updateShippingTime;
9
+ private handleOpenEngravingForm;
13
10
  protected template(): HTMLElement[];
14
- afterRender(): void;
15
11
  }
@@ -1,5 +1,7 @@
1
1
  export * from './cart-body.component';
2
2
  export * from './cart-footer.component';
3
+ export * from './cart-fulfillment.component';
4
+ export * from './cart-fulfillment.component';
3
5
  export * from './cart-header.component';
4
6
  export * from './cart-item.component';
5
7
  export * from './cart-item-quantity-price.component';
@@ -1,11 +1,10 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { ICheckoutItemStore, ICheckoutStripeFormStatusStore } from '@/core/store';
3
- import type { ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
2
+ import type { ICheckoutItemStore, ICheckoutStripeFormStatusStore } from '@/core/store/interfaces/checkout.interface';
3
+ import type { ICart, ICheckoutFulfillment, ICheckoutItem, ICheckoutPrepareResponse, ICheckoutRetailer } from '@/interfaces/cloud';
4
4
  import type { BillingFieldName, CustomerFieldName, GiftFieldName } from '@/modules/checkout/components/checkout.type';
5
5
  export declare function buildCheckoutItemStore(apiItem: ICheckoutItem, retailer: ICheckoutRetailer, fulfillment: ICheckoutFulfillment): ICheckoutItemStore;
6
6
  export declare class CheckoutCommands extends BaseCommand {
7
7
  private readonly uiCommands;
8
- private readonly themeProvider;
9
8
  private readonly commonCommands;
10
9
  constructor();
11
10
  static getInstance(): CheckoutCommands;
@@ -13,6 +12,7 @@ export declare class CheckoutCommands extends BaseCommand {
13
12
  partialLoadCheckout(params?: {
14
13
  cartId?: string;
15
14
  response?: ICheckoutPrepareResponse;
15
+ cartResponse?: ICart;
16
16
  }): Promise<void>;
17
17
  toggleIsGift(active?: boolean): Promise<void>;
18
18
  toggleBillingSameAsShipping(active?: boolean): Promise<void>;
@@ -22,7 +22,7 @@ export declare class CheckoutCommands extends BaseCommand {
22
22
  applyPromoCode(code: string): Promise<void>;
23
23
  clearPromoCodeError(): Promise<void>;
24
24
  removePromoCode(): Promise<void>;
25
- applyGiftCard(code?: string): Promise<void>;
25
+ applyGiftCard(code: string): Promise<void>;
26
26
  clearGiftCardError(): Promise<void>;
27
27
  removeGiftCard(code: string): Promise<void>;
28
28
  updateCustomerInfo(fieldName: CustomerFieldName, fieldValue: string): void;
@@ -1,4 +1,4 @@
1
- import type { ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore } from '@/core/store';
1
+ import type { ICheckoutBillingStore, ICheckoutCustomerStore, ICheckoutGiftRecipientStore } from '@/core/store/interfaces/checkout.interface';
2
2
  export declare function validateCustomerInfo(customer: ICheckoutCustomerStore): {
3
3
  isValid: boolean;
4
4
  invalidFields: string[];
@@ -1,4 +1,4 @@
1
- import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
1
+ import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export interface ICheckoutComponentParams {
4
4
  checkoutId: string;
@@ -6,6 +6,5 @@ export interface ICheckoutComponentParams {
6
6
  }
7
7
  export declare class CheckoutComponent extends BaseComponent<ICheckoutComponentParams, ICheckoutComponent> {
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
10
9
  protected template(): HTMLElement[];
11
10
  }
@@ -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[];
@@ -1,8 +1,8 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
2
  import type { ICheckoutComponent } from '@/interfaces/configs';
3
3
  export declare class CheckoutDeliveryInformationComponent extends BaseComponent<null, ICheckoutComponent> {
4
- constructor();
5
4
  get hostClasses(): string[];
5
+ constructor();
6
6
  private hasOnDemandFulfillments;
7
7
  private handleDeliveryInstructionsChange;
8
8
  private handleFirstNameChange;
@@ -9,11 +9,9 @@ export declare class CheckoutItemQuantityComponent extends BaseComponent<IChecko
9
9
  get hostClasses(): string[];
10
10
  constructor();
11
11
  onStoreWatch(changes: IOnStoreChanged[]): void;
12
- private getCheckoutItemStore;
13
12
  private getAvailableQuantity;
14
13
  private calculateQuantityLimits;
15
14
  private updateButtonStates;
16
15
  private handleQuantityChange;
17
- private createQuantityContainer;
18
16
  protected template(): HTMLElement[];
19
17
  }
@@ -6,7 +6,8 @@ export declare class CheckoutItemComponent extends BaseComponent<ICheckoutItemCo
6
6
  private trashButton;
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
- onStoreWatch(changes: IOnStoreChanged[]): void;
9
+ onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
10
+ private updateEngravingElement;
10
11
  private setupMinimumPurchaseAlert;
11
12
  private updateTrashButtonState;
12
13
  private createLoadingOverlay;
@@ -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[];
@@ -16,7 +16,6 @@ export declare class CheckoutPlaceOrderButtonComponent extends BaseComponent<nul
16
16
  private determineButtonState;
17
17
  private applyButtonState;
18
18
  private handlePlaceOrderClick;
19
- private focusFirstInvalidField;
20
19
  private showPaymentError;
21
20
  private handleCheckoutReadyForSubmit;
22
21
  protected template(): HTMLElement[];
@@ -15,7 +15,6 @@ export declare const giftFormFields: {
15
15
  readonly phone: "phone";
16
16
  readonly birthDate: "birthDate";
17
17
  readonly addressTwo: "addressTwo";
18
- readonly company: "company";
19
18
  readonly message: "message";
20
19
  };
21
20
  export declare const billingFormFields: {
@@ -1,4 +1,4 @@
1
- import type { IProductFulfillmentStore } from '@/core/store';
1
+ import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
2
  import { type FulfillmentType } from '@/enums';
3
3
  import type { IProductSizeAttributes } from '@/interfaces/cloud';
4
4
  import { type RetailerStatus } from '@/modules/product/utils';
@@ -1,3 +1,4 @@
1
+ export * from '../../ui-components/engraving/engraving-form.component';
1
2
  export * from '../../ui-components/engraving/engraving-view.component';
2
3
  export * from './components';
3
4
  export * from './product-add-to-cart-section.component';
@@ -9,6 +9,7 @@ export declare class ProductAddToCartSectionComponent extends BaseComponent<IAdd
9
9
  private qtyDecreaseButton;
10
10
  private quantityText;
11
11
  get hostClasses(): string[];
12
+ get hostAttributes(): Record<string, string>;
12
13
  constructor();
13
14
  private getProductId;
14
15
  private getAvailableQuantity;
@@ -1,10 +1,13 @@
1
- import { BaseComponent } from '@/core/base-component.service';
1
+ import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
2
  import type { IProductComponent } from '@/interfaces/configs';
3
3
  export interface IProductInteractionsComponent {
4
4
  productId: string;
5
5
  }
6
6
  export declare class ProductInteractionsComponent extends BaseComponent<IProductInteractionsComponent, IProductComponent> {
7
7
  get hostClasses(): string[];
8
+ private addPersonalizationSpan;
9
+ constructor();
10
+ onStoreWatch(changedPaths: IOnStoreChanged[]): void;
8
11
  private getProductId;
9
12
  afterRender(): void;
10
13
  private setupSizeButtonsEventListener;
@@ -5,6 +5,7 @@ export interface IProductPriceComponentParams {
5
5
  }
6
6
  export declare class ProductPriceComponent extends BaseComponent<IProductPriceComponentParams, IProductComponent> {
7
7
  get hostClasses(): string[];
8
+ get hostAttributes(): Record<string, string>;
8
9
  constructor();
9
10
  private getProductId;
10
11
  protected template(): string;
@@ -6,6 +6,7 @@ export interface IProductRetailersComponent {
6
6
  export declare class ProductRetailersComponent extends BaseComponent<IProductRetailersComponent, IProductComponent> {
7
7
  get hostClasses(): string[];
8
8
  constructor();
9
+ get hostAttributes(): Record<string, string>;
9
10
  private getProductId;
10
11
  protected template(): HTMLElement | HTMLElement[];
11
12
  }
@@ -1,11 +1,10 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { IBaseProductEventData } from '@/core/pubsub';
3
- import type { IProductDrawerContentConfig } from '@/core/store';
2
+ import type { IBaseProductEventData } from '@/core/pubsub/interfaces/product.interface';
3
+ import type { IProductDrawerContentConfig } from '@/core/store/interfaces/product.interface';
4
4
  import { type FulfillmentType } from '@/enums';
5
5
  import type { IProductData } from '@/interfaces/cloud';
6
6
  import { type AddItemParams } from '@/modules/cart/cart.commands';
7
7
  export declare class ProductCommands extends BaseCommand {
8
- private readonly themeProvider;
9
8
  private readonly uiCommands;
10
9
  private readonly cartCommands;
11
10
  constructor();
@@ -18,12 +17,12 @@ export declare class ProductCommands extends BaseCommand {
18
17
  updateQuantity(productId: string, delta: number): Promise<void>;
19
18
  changeFulfillmentType(productId: string, selectedFulfillmentType: FulfillmentType): Promise<void>;
20
19
  removeProduct(productId: string): Promise<void>;
21
- updateEngravingLines(productId: string, engravingLines: string[]): Promise<void>;
22
20
  openProductDrawer(productId: string, contentType: IProductDrawerContentConfig['type'], data?: Record<string, any>): Promise<void>;
23
21
  closeProductDrawer(productId: string): Promise<void>;
24
22
  rerenderAllProducts(): Promise<void>;
25
23
  addToCart(productId: string, params: AddItemParams): Promise<void>;
26
24
  addPresaleToCart(productId: string, params: AddItemParams): Promise<void>;
27
25
  productDataForEventFromStore(identifier: string): IBaseProductEventData;
26
+ private findFirstAvailableSize;
28
27
  private loadProductStoreUpdate;
29
28
  }
@@ -1,4 +1,4 @@
1
- import type { IProductFulfillmentStore } from '@/core/store';
1
+ import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
2
  import { type FulfillmentType } from '@/enums';
3
3
  import type { IProductSize, IRetailer } from '@/interfaces/cloud';
4
4
  export declare const filterRetailersByFulfillmentType: ({ retailers, selectedSize, engravingLines, fulfillmentType, }: {
@@ -1,4 +1,4 @@
1
- import type { IProductFulfillmentStore } from '@/core/store';
1
+ import type { IProductFulfillmentStore } from '@/core/store/interfaces/product.interface';
2
2
  export interface RetailerStatus {
3
3
  message: string | null;
4
4
  isOpen: boolean;
@@ -0,0 +1,2 @@
1
+ export * from './product-list-card.component';
2
+ export * from './product-list-filters.component';
@@ -0,0 +1,36 @@
1
+ import { BaseComponent } from '@/core/base-component.service';
2
+ import type { IProduct, IRetailerFulfillments } from '@/interfaces/cloud';
3
+ import type { ProductListCardVariantType } from '@/interfaces/core.interface';
4
+ export interface IProductListCardParams {
5
+ variant: ProductListCardVariantType;
6
+ fillCard: boolean;
7
+ product: IProduct;
8
+ fulfillments: IRetailerFulfillments[];
9
+ productUrl?: string;
10
+ }
11
+ export interface IProductAvailabilityData {
12
+ hasAvailability: boolean;
13
+ upc: string;
14
+ fulfillmentId: string;
15
+ partNumber: string;
16
+ quantity: number;
17
+ state: string;
18
+ isPresale: boolean;
19
+ isPresaleActive: boolean;
20
+ }
21
+ export interface IProductVariantParams {
22
+ image: string;
23
+ name: string;
24
+ size: string | null;
25
+ price: number;
26
+ availability: IProductAvailabilityData;
27
+ }
28
+ export declare class ProductListCardComponent extends BaseComponent<IProductListCardParams> {
29
+ get hostClasses(): string[];
30
+ private getAvailabilityData;
31
+ private isPresaleActive;
32
+ private handleAddToCart;
33
+ protected template(): HTMLElement[];
34
+ private generateProductUrl;
35
+ private createVariantStandard;
36
+ }
@@ -0,0 +1,21 @@
1
+ import { BaseComponent } from '@/core/base-component.service';
2
+ export interface IProductListFiltersParams {
3
+ enablePersonalized: boolean;
4
+ enablePreOrder: boolean;
5
+ enableDeliveryOptions: boolean;
6
+ onPersonalizedChange?: (enabled: boolean) => void;
7
+ onPreOrderChange?: (enabled: boolean) => void;
8
+ onDeliveryOptionsChange?: (value: 'all' | 'shipping' | 'onDemand') => void;
9
+ currentFilters?: {
10
+ personalized: boolean;
11
+ preOrder: boolean;
12
+ deliveryOptions: 'all' | 'shipping' | 'onDemand';
13
+ };
14
+ }
15
+ export declare class ProductListFiltersComponent extends BaseComponent<IProductListFiltersParams> {
16
+ get hostClasses(): string[];
17
+ private isSameDayDeliveryDisabled;
18
+ private isPersonalizationDisabled;
19
+ private isPreOrderDisabled;
20
+ protected template(): HTMLElement[];
21
+ }
@@ -0,0 +1,12 @@
1
+ import { BaseCommand } from '@/core/command/base-command.service';
2
+ import type { ICatalog, ICatalogParams } from '@/interfaces/cloud';
3
+ import { type AddItemParams } from '@/modules/cart/cart.commands';
4
+ export declare class ProductListCommands extends BaseCommand {
5
+ private readonly uiCommands;
6
+ private readonly cartCommands;
7
+ constructor();
8
+ static getInstance(): ProductListCommands;
9
+ getProductList(params: ICatalogParams): Promise<ICatalog>;
10
+ addToCart(params: AddItemParams): Promise<void>;
11
+ addPresaleToCart(params: AddItemParams): Promise<void>;
12
+ }
@@ -0,0 +1,76 @@
1
+ import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
+ import type { ProductListCardVariantType, ProductListFilterType } from '@/interfaces/core.interface';
3
+ export interface IProductListComponentParams {
4
+ cardVariant: ProductListCardVariantType;
5
+ rows: number;
6
+ columns: number;
7
+ fillCard: boolean;
8
+ filters: ProductListFilterType[];
9
+ productUrl?: string;
10
+ }
11
+ export interface IProductListFilters {
12
+ personalized: boolean;
13
+ preOrder: boolean;
14
+ deliveryOptions: 'all' | 'shipping' | 'onDemand';
15
+ }
16
+ export declare class ProductListComponent extends BaseComponent<IProductListComponentParams> {
17
+ private products;
18
+ private retailers;
19
+ private pagination;
20
+ private currentFilters;
21
+ private cardsContainer;
22
+ private filtersContainer;
23
+ private sentinelElement;
24
+ private personalizedSwitch;
25
+ private preOrderSwitch;
26
+ private deliveryRadios;
27
+ private deliveryRadioLabels;
28
+ private loadingState;
29
+ private scrollObserver;
30
+ private initializationPromise;
31
+ get hostClasses(): string[];
32
+ constructor();
33
+ protected connected(): Promise<void>;
34
+ disconnectedCallback(): void;
35
+ private initializeComponent;
36
+ protected template(): HTMLElement[];
37
+ private setLoadingState;
38
+ private renderCurrentState;
39
+ private loadInitialProducts;
40
+ private loadMoreProducts;
41
+ private mergeRetailers;
42
+ private updatePagination;
43
+ private buildApiParams;
44
+ private buildFiltersFromState;
45
+ private syncFiltersFromResponse;
46
+ private onFilterChange;
47
+ private resetPagination;
48
+ private updateFiltersUI;
49
+ private updatePersonalizedSwitch;
50
+ private updatePreOrderSwitch;
51
+ private updateDeliveryOptions;
52
+ private updateRadioLabel;
53
+ private isPersonalizationDisabled;
54
+ private isPreOrderDisabled;
55
+ private isSameDayDeliveryDisabled;
56
+ private createCardsContainer;
57
+ private renderLoadingState;
58
+ private renderProducts;
59
+ private appendNewProducts;
60
+ private createProductCard;
61
+ private createFiltersContainer;
62
+ private storeFilterElementReferences;
63
+ private setupInfiniteScroll;
64
+ private createScrollSentinel;
65
+ private updateSentinel;
66
+ private updateSentinelContent;
67
+ private showSentinelError;
68
+ private createLoadingElement;
69
+ private createErrorElement;
70
+ private createInfoElement;
71
+ private showErrorState;
72
+ private clearCardsContainer;
73
+ private cleanupScrollObserver;
74
+ onStoreWatch(changes: IOnStoreChanged[]): Promise<void>;
75
+ private doCleanup;
76
+ }
@@ -1,7 +1,5 @@
1
1
  import { type ComponentType } from '@/enums';
2
- export declare const mainComponents: ComponentType[];
3
2
  export declare const productGroupComponents: ComponentType[];
4
3
  export declare const addressGroupComponents: ComponentType[];
5
4
  export declare const cartGroupComponents: ComponentType[];
6
5
  export declare const checkoutGroupComponents: ComponentType[];
7
- export declare const isMainComponent: (componentType: ComponentType) => boolean;
@@ -2,6 +2,7 @@ import type { IFontFamily } from '@/interfaces/configs';
2
2
  export declare class FontManagerService {
3
3
  private googleFontsUrl;
4
4
  private defaultFontFamilies;
5
+ private readonly fontsLinkAttribute;
5
6
  loadGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
6
7
  updateGoogleFonts(fonts: IFontFamily[], globalDisplay?: string): void;
7
8
  private injectGoogleFontsResourceHints;
@@ -0,0 +1 @@
1
+ export * from './product-list.style';
@@ -0,0 +1 @@
1
+ export declare const getProductListStyles: () => string;
@@ -1,5 +1,5 @@
1
1
  import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
- import type { StorePaths } from '@/core/store';
2
+ import type { StorePaths } from '@/core/store/interfaces/core.interface';
3
3
  export interface IAlertComponentParams {
4
4
  errorStorePath: StorePaths;
5
5
  fromEvents?: boolean;