@liquidcommerce/elements-sdk 2.7.1 → 2.7.3

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 (110) hide show
  1. package/README.md +1 -1
  2. package/dist/index.checkout.esm.js +6788 -6890
  3. package/dist/index.esm.js +10440 -10643
  4. package/dist/ssr-stub.checkout.esm.js +18 -0
  5. package/dist/ssr-stub.esm.js +270 -0
  6. package/dist/types/auto-initialize/shared-utils.d.ts +3 -1
  7. package/dist/types/clients/base.d.ts +6 -4
  8. package/dist/types/clients/builder.d.ts +2 -1
  9. package/dist/types/clients/checkout.d.ts +2 -10
  10. package/dist/types/clients/main.d.ts +2 -1
  11. package/dist/types/constants/core.constant.d.ts +0 -5
  12. package/dist/types/core/api/api-client.service.d.ts +16 -15
  13. package/dist/types/core/api/api-result.d.ts +19 -0
  14. package/dist/types/core/api/auth-client.service.d.ts +13 -5
  15. package/dist/types/core/base-component.service.d.ts +2 -1
  16. package/dist/types/core/client/client-action.service.d.ts +1 -1
  17. package/dist/types/core/client/client-config.service.d.ts +1 -1
  18. package/dist/types/core/pubsub/pubsub.service.d.ts +0 -2
  19. package/dist/types/core/singleton-manager.service.d.ts +12 -8
  20. package/dist/types/core/store/interfaces/core.interface.d.ts +7 -11
  21. package/dist/types/core/store/interfaces/product-list.interface.d.ts +12 -28
  22. package/dist/types/core/store/store.service.d.ts +1 -0
  23. package/dist/types/core/telemetry/telemetry.service.d.ts +1 -0
  24. package/dist/types/enums/core.enum.d.ts +5 -4
  25. package/dist/types/index.checkout.d.ts +3 -2
  26. package/dist/types/index.checkout.umd.d.ts +1 -1
  27. package/dist/types/index.d.ts +4 -1
  28. package/dist/types/interfaces/client.interface.d.ts +72 -0
  29. package/dist/types/interfaces/component.interface.d.ts +7 -0
  30. package/dist/types/interfaces/config.interface.d.ts +46 -0
  31. package/dist/types/interfaces/configs/address.interface.d.ts +1 -1
  32. package/dist/types/interfaces/configs/cart.interface.d.ts +1 -1
  33. package/dist/types/interfaces/configs/checkout.interface.d.ts +1 -1
  34. package/dist/types/interfaces/configs/global.interface.d.ts +1 -1
  35. package/dist/types/interfaces/configs/product-list.interface.d.ts +1 -1
  36. package/dist/types/interfaces/configs/product.interface.d.ts +1 -1
  37. package/dist/types/interfaces/injection.interface.d.ts +44 -0
  38. package/dist/types/modules/address/address-input.component.d.ts +0 -11
  39. package/dist/types/modules/address/address.command.d.ts +1 -1
  40. package/dist/types/modules/checkout/components/checkout-completed.component.d.ts +1 -0
  41. package/dist/types/modules/checkout/components/checkout-stripe-form.component.d.ts +2 -1
  42. package/dist/types/modules/product/components/product-image-carousel.component.d.ts +3 -0
  43. package/dist/types/modules/product/components/product-retailers-carousel.component.d.ts +3 -0
  44. package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +3 -2
  45. package/dist/types/modules/product/product.commands.d.ts +1 -3
  46. package/dist/types/modules/product-list/components/card-components/index.d.ts +0 -2
  47. package/dist/types/modules/product-list/components/card-components/product-badge.d.ts +1 -0
  48. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -3
  49. package/dist/types/modules/product-list/components/index.d.ts +1 -1
  50. package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +2 -5
  51. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +3 -3
  52. package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +21 -0
  53. package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +30 -14
  54. package/dist/types/modules/product-list/components/product-list-search.component.d.ts +0 -2
  55. package/dist/types/modules/product-list/product-list-card.component.d.ts +18 -16
  56. package/dist/types/modules/product-list/product-list-filter.utils.d.ts +8 -0
  57. package/dist/types/modules/product-list/product-list.commands.d.ts +7 -54
  58. package/dist/types/modules/product-list/product-list.component.d.ts +2 -11
  59. package/dist/types/modules/product-list/product-list.interface.d.ts +0 -30
  60. package/dist/types/modules/ui-components/drawer/drawer.component.d.ts +1 -0
  61. package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -10
  62. package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +4 -1
  63. package/dist/types/modules/ui-components/lce-element/lce-element.component.d.ts +2 -1
  64. package/dist/types/modules/ui-components/promo-code-ticker/promo-code-ticker.component.d.ts +1 -1
  65. package/dist/types/modules/ui-components/ui.commands.d.ts +6 -4
  66. package/dist/types/ssr/stub.checkout.d.ts +6 -0
  67. package/dist/types/ssr/stub.d.ts +10 -0
  68. package/dist/types/utils/dom-compat.d.ts +2 -0
  69. package/dist/types/utils/product-selection.d.ts +16 -0
  70. package/dist/types/utils/product.d.ts +10 -0
  71. package/docs/v1/README.md +2 -2
  72. package/docs/v1/api/actions/address-actions.md +11 -11
  73. package/docs/v1/api/actions/cart-actions.md +13 -13
  74. package/docs/v1/api/actions/checkout-actions.md +23 -23
  75. package/docs/v1/api/actions/product-actions.md +6 -6
  76. package/docs/v1/api/client.md +11 -11
  77. package/docs/v1/api/ui-helpers.md +11 -11
  78. package/docs/v1/examples/advanced-patterns.md +1 -1
  79. package/docs/v1/examples/checkout-flow.md +1 -1
  80. package/docs/v1/getting-started/concepts.md +7 -7
  81. package/docs/v1/getting-started/installation.md +2 -2
  82. package/docs/v1/getting-started/quick-start.md +3 -3
  83. package/docs/v1/guides/address-component.md +11 -11
  84. package/docs/v1/guides/best-practices.md +14 -14
  85. package/docs/v1/guides/cart-component.md +23 -23
  86. package/docs/v1/guides/checkout-component.md +24 -24
  87. package/docs/v1/guides/events.md +812 -77
  88. package/docs/v1/guides/product-component.md +5 -5
  89. package/docs/v1/integration/nextjs.md +11 -2
  90. package/docs/v1/integration/react.md +3 -3
  91. package/docs/v1/integration/vanilla-js.md +1 -1
  92. package/docs/v1/integration/vue.md +24 -0
  93. package/docs/v1/reference/browser-support.md +9 -0
  94. package/docs/v1/reference/error-handling.md +2 -2
  95. package/docs/v1/reference/troubleshooting.md +10 -2
  96. package/package.json +17 -13
  97. package/dist/types/interfaces/core.interface.d.ts +0 -139
  98. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +0 -12
  99. package/dist/types/modules/product-list/components/card-components/product-title.d.ts +0 -6
  100. package/dist/types/modules/product-list/components/product-list-retailers.component.d.ts +0 -26
  101. package/dist/types/modules/ui-components/modal/modal.component.d.ts +0 -23
  102. package/dist/types/modules/ui-components/styles/modal.style.d.ts +0 -1
  103. package/docs/gitbook/actions.md +0 -160
  104. package/docs/gitbook/address.md +0 -48
  105. package/docs/gitbook/cart.md +0 -65
  106. package/docs/gitbook/checkout.md +0 -131
  107. package/docs/gitbook/events.md +0 -137
  108. package/docs/gitbook/overview.md +0 -166
  109. package/docs/gitbook/product.md +0 -64
  110. package/docs/gitbook/quick-start-guide.md +0 -393
@@ -1,45 +1,29 @@
1
1
  import type { IPagination } from 'modules/product-list/product-list.interface';
2
2
  import type { FulfillmentType } from '@/enums';
3
- import type { IFulfillment, IProduct, IProductVariant, IRetailer, IRetailerAddress } from '@/interfaces/api/product.interface';
3
+ import type { IProduct } from '@/interfaces/api/product.interface';
4
4
  import type { IFilterSchema } from '@/interfaces/api/product-list.interface';
5
- import type { IProductSizeStore } from './product.interface';
6
- export type IProductFulfillmentStore = IFulfillment & {
7
- retailerName: string;
8
- retailerAddress: IRetailerAddress;
9
- retailerAddressFormatted: string;
10
- variant: IProductVariant;
11
- image: string | null;
12
- };
13
- export interface IProductList extends IProduct {
5
+ import type { IProductFulfillmentStore, IProductSizeStore } from './product.interface';
6
+ export interface IPLProductStore extends Omit<IProduct, 'sizes'> {
7
+ id: string;
8
+ sizes: Record<string, IProductSizeStore>;
14
9
  quantity: number;
15
10
  selectedSizeId: string | null;
16
11
  selectedFulfillmentType: FulfillmentType;
17
12
  selectedFulfillmentId: string | null;
18
13
  selectedFulfillment: IProductFulfillmentStore | null;
14
+ engravingLines: string[];
19
15
  productHasAvailability: boolean;
20
16
  fulfillmentHasAvailability: boolean;
21
- }
22
- export interface IProductListProduct extends Omit<IProduct, 'sizes'> {
23
- sizes: Record<string, IProductSizeStore>;
17
+ loading: boolean;
18
+ updating: boolean;
24
19
  }
25
20
  export interface IProductListStore {
26
- products: IProductListProduct[];
27
- retailers: Record<string, IRetailer>;
21
+ products: Record<string, IPLProductStore>;
22
+ appliedFilters: Record<string, string[]>;
28
23
  filters: IFilterSchema[];
29
24
  pagination: IPagination;
30
- appliedFilters: Record<string, string[]>;
31
25
  searchTerm: string;
32
- gridConfig?: {
33
- rows: number;
34
- columns: number;
35
- };
36
- userProducts: {
37
- [productId: string]: {
38
- selectedSizeId: string;
39
- selectedFulfillmentType: FulfillmentType;
40
- selectedFulfillment: IProductFulfillmentStore | null;
41
- selectedQuantity: number;
42
- };
43
- };
26
+ rows: number;
27
+ columns: number;
44
28
  loading: boolean;
45
29
  }
@@ -28,6 +28,7 @@ export declare class StoreService {
28
28
  createProductInstance(productId: string): boolean;
29
29
  removeProductInstance(productId: string): boolean;
30
30
  getProductInstances(): Record<string, IProductStore>;
31
+ destroy(): void;
31
32
  getState(): IGlobalStore;
32
33
  private setupMiddleware;
33
34
  private loggingMiddleware;
@@ -10,6 +10,7 @@ export declare class TelemetryService {
10
10
  constructor();
11
11
  static getInstance(): TelemetryService;
12
12
  isEnabled(): boolean;
13
+ destroy(): void;
13
14
  captureEvent(level: TelemetryLevel, message: string, options?: ITelemetryEventOptions): void;
14
15
  private buildErrorContext;
15
16
  private buildSDKContext;
@@ -76,7 +76,6 @@ export declare const COMPONENT_TYPE: {
76
76
  readonly PURCHASE_MIN_ALERT: "purchase-min-alert";
77
77
  readonly ALERT: "alert";
78
78
  readonly PROMO_CODE_TICKER: "promo-code-ticker";
79
- readonly MODAL: "modal";
80
79
  readonly ADDRESS: "address";
81
80
  readonly ADDRESS_INPUT: "address-input";
82
81
  readonly ADDRESS_DISPLAY: "address-display";
@@ -98,9 +97,10 @@ export declare const COMPONENT_TYPE: {
98
97
  readonly PRODUCT_LIST_FILTERS: "product-list-filters";
99
98
  readonly PRODUCT_LIST_SEARCH: "product-list-search";
100
99
  readonly PRODUCT_LIST_CARD_LOADING: "product-list-card-loading";
101
- readonly PRODUCT_LIST_RETAILERS: "product-list-retailers";
102
100
  readonly PRODUCT_LIST_ENGRAVING_FORM: "product-list-engraving-form";
103
101
  readonly PRODUCT_LIST_PRODUCT_PRE_CART: "product-list-product-pre-cart";
102
+ readonly PRODUCT_LIST_PRODUCT_ENGRAVING_LINES: "product-list-product-engraving-lines";
103
+ readonly PRODUCT_LIST_SIZE_SELECTOR: "product-list-size-selector";
104
104
  readonly CART: "cart";
105
105
  readonly CART_RETAILER: "cart-retailer";
106
106
  readonly CART_ITEM: "cart-item";
@@ -179,7 +179,8 @@ export declare const DISPLAY_MODE: {
179
179
  };
180
180
  export type DisplayModeType = (typeof DISPLAY_MODE)[keyof typeof DISPLAY_MODE];
181
181
  export declare const NAVIGATION_SOURCE: {
182
- readonly PRODUCT_CARD: "productCard";
183
- readonly ADD_TO_CART_DRAWER: "addToCartDrawer";
182
+ readonly PRODUCT: "product";
183
+ readonly PRODUCT_LIST_CARD: "product-list-card";
184
+ readonly PRE_CART: "pre-cart";
184
185
  };
185
186
  export type NavigationSourceType = (typeof NAVIGATION_SOURCE)[keyof typeof NAVIGATION_SOURCE];
@@ -1,7 +1,8 @@
1
- import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/clients/checkout';
2
1
  import { ElementsCheckout } from '@/clients/checkout';
3
2
  import type { DebugMode, ElementsEnv } from '@/enums';
4
3
  import { DEBUG_MODE, ELEMENTS_ENV } from '@/enums';
5
- import type { IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/core.interface';
4
+ import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
5
+ import type { IInjectedComponent } from '@/interfaces/component.interface';
6
+ import type { ILiquidCommerceElementsCheckoutClientConfig } from '@/interfaces/config.interface';
6
7
  export { DEBUG_MODE, ELEMENTS_ENV, ElementsCheckout };
7
8
  export type { DebugMode, ElementsEnv, IElementsCheckoutActions, IElementsCheckoutClient, IInjectedComponent, ILiquidCommerceElementsCheckoutClientConfig, };
@@ -1,4 +1,4 @@
1
- import type { IElementsCheckoutActions, IElementsCheckoutClient } from './clients/checkout';
1
+ import type { IElementsCheckoutActions, IElementsCheckoutClient } from '@/interfaces/client.interface';
2
2
  import { ElementsCheckout } from './clients/checkout';
3
3
  export { ElementsCheckout };
4
4
  export type { IElementsCheckoutActions, IElementsCheckoutClient };
@@ -2,5 +2,8 @@ export * from './clients/builder';
2
2
  export * from './clients/main';
3
3
  export * from './core/sdk-error-handler';
4
4
  export * from './enums';
5
+ export * from './interfaces/client.interface';
6
+ export * from './interfaces/component.interface';
7
+ export * from './interfaces/config.interface';
5
8
  export * from './interfaces/configs';
6
- export * from './interfaces/core.interface';
9
+ export * from './interfaces/injection.interface';
@@ -0,0 +1,72 @@
1
+ import type { IAddressActions } from '@/core/client/actions/client-address-action.service';
2
+ import type { ICartActions } from '@/core/client/actions/client-cart-action.service';
3
+ import type { ICheckoutActions } from '@/core/client/actions/client-checkout-action.service';
4
+ import type { IProductActions } from '@/core/client/actions/client-product-action.service';
5
+ import type { IClientConfigs } from '@/core/client/client-config.service';
6
+ import type { IAddressOptions } from '@/modules/address/address.interface';
7
+ import type { IInjectedComponent } from './component.interface';
8
+ import type { UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from './configs';
9
+ import type { IBuilderInjectElementParams, IInjectCheckoutBuilderParams, IInjectCheckoutParams, IInjectProductElement, IInjectProductListFiltersParams, IInjectProductListParams, IInjectProductListSearchParams } from './injection.interface';
10
+ export interface ILiquidCommerceElementsUIMethod {
11
+ cartButton(containerId: string, showItemsCount?: boolean): void;
12
+ floatingCartButton(showItemsCount?: boolean): void;
13
+ cartSubtotal(elementId: string): void;
14
+ cartItemsCount(elementId: string, options?: {
15
+ hideZero: boolean;
16
+ }): void;
17
+ }
18
+ export interface ILiquidCommerceElementsActions {
19
+ product: IProductActions;
20
+ address: IAddressActions;
21
+ cart: ICartActions;
22
+ checkout: ICheckoutActions;
23
+ }
24
+ export interface IElementsCheckoutActions extends Omit<ICheckoutActions, 'openCheckout' | 'closeCheckout' | 'toggleCheckout'> {
25
+ }
26
+ export interface IElementsCheckoutClient {
27
+ injectCheckout: (params: IInjectCheckoutParams) => Promise<IInjectedComponent | null>;
28
+ actions: {
29
+ checkout: IElementsCheckoutActions;
30
+ };
31
+ destroy(): void;
32
+ }
33
+ export interface ILiquidCommerceElementsBuilderClient {
34
+ updateComponentGlobalConfigs(configs: UpdateComponentGlobalConfigs): Promise<void>;
35
+ updateProductComponent(configs: UpdateProductComponent): Promise<void>;
36
+ updateAddressComponent(configs: UpdateAddressComponent): void;
37
+ updateCartComponent(configs: UpdateCartComponent): void;
38
+ updateCheckoutComponent(configs: UpdateCheckoutComponent): void;
39
+ updateProductListComponent(configs: UpdateProductListComponent): void;
40
+ injectElement(params: IBuilderInjectElementParams): Promise<IInjectedComponent | null>;
41
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
42
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
43
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
44
+ injectCheckoutElement(params: IInjectCheckoutBuilderParams): Promise<IInjectedComponent | null>;
45
+ injectProductList(params: IInjectProductListParams): Promise<void>;
46
+ actions: ILiquidCommerceElementsActions;
47
+ destroy(): void;
48
+ }
49
+ export interface ILiquidCommerceElementsClient {
50
+ injectProductElement(params: IInjectProductElement[]): Promise<IInjectedComponent[]>;
51
+ injectAddressElement(containerId: string, options?: IAddressOptions): Promise<IInjectedComponent | null>;
52
+ injectCartElement(containerId: string): Promise<IInjectedComponent | null>;
53
+ injectCheckoutElement(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
54
+ injectProductList(params: IInjectProductListParams): Promise<void>;
55
+ injectProductListSearch(params: IInjectProductListSearchParams): Promise<void>;
56
+ injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
57
+ ui: ILiquidCommerceElementsUIMethod;
58
+ actions: ILiquidCommerceElementsActions;
59
+ getInjectedComponents(): Map<string, IInjectedComponent>;
60
+ destroy(): void;
61
+ }
62
+ export interface ILiquidCommerceElementsCheckoutClient {
63
+ prepare(): Promise<void>;
64
+ injectCheckout(params: IInjectCheckoutParams): Promise<IInjectedComponent | null>;
65
+ actions: {
66
+ checkout: IElementsCheckoutActions;
67
+ };
68
+ destroy(): void;
69
+ }
70
+ export type LiquidCommerceElementsClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsClient;
71
+ export type LiquidCommerceElementsBuilderClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsBuilderClient;
72
+ export type LiquidCommerceElementsCheckoutClientConstructor = new (clientConfigs: IClientConfigs) => ILiquidCommerceElementsCheckoutClient;
@@ -0,0 +1,7 @@
1
+ import type { ComponentType } from '@/enums';
2
+ export interface IInjectedComponent {
3
+ getType(): ComponentType;
4
+ getElement(): HTMLElement;
5
+ rerender(): void;
6
+ destroy(): void;
7
+ }
@@ -0,0 +1,46 @@
1
+ import type { DebugMode, ElementsEnv } from '@/enums';
2
+ import type { IPromoTicker, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from './configs';
3
+ export type DeepPartial<T> = {
4
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
5
+ };
6
+ export interface IElementsProxyConfig {
7
+ baseUrl: string;
8
+ headers?: Record<string, string>;
9
+ }
10
+ export interface ILiquidCommerceElementsDevelopmentConfig {
11
+ customApiUrl?: string;
12
+ paymentMethodId?: string;
13
+ openShadowDom?: boolean;
14
+ }
15
+ export interface IClientCustomThemeConfig {
16
+ global?: UpdateComponentGlobalConfigs;
17
+ product?: UpdateProductComponent;
18
+ address?: UpdateAddressComponent;
19
+ cart?: UpdateCartComponent;
20
+ checkout?: UpdateCheckoutComponent;
21
+ productList?: UpdateProductListComponent;
22
+ }
23
+ export interface ILiquidCommerceElementsCheckoutConfig {
24
+ pageUrl: string;
25
+ }
26
+ export interface ILiquidCommerceElementsBaseConfig {
27
+ env?: ElementsEnv;
28
+ promoTicker?: IPromoTicker[];
29
+ customTheme?: IClientCustomThemeConfig;
30
+ debugMode?: DebugMode;
31
+ checkout?: ILiquidCommerceElementsCheckoutConfig;
32
+ }
33
+ export interface ILiquidCommerceElementsBuilderConfig extends ILiquidCommerceElementsBaseConfig {
34
+ }
35
+ export interface ILiquidCommerceElementsConfig extends ILiquidCommerceElementsBaseConfig {
36
+ proxy?: IElementsProxyConfig;
37
+ development?: ILiquidCommerceElementsDevelopmentConfig;
38
+ }
39
+ export interface ILiquidCommerceElementsCheckoutClientConfig {
40
+ env?: ElementsEnv;
41
+ customTheme?: IClientCustomThemeConfig;
42
+ debugMode?: DebugMode;
43
+ checkout?: ILiquidCommerceElementsCheckoutConfig;
44
+ proxy?: IElementsProxyConfig;
45
+ development?: ILiquidCommerceElementsDevelopmentConfig;
46
+ }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface IAddressTheme {
3
3
  backgroundColor: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface ICartTheme {
3
3
  backgroundColor: string;
4
4
  }
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export interface ICheckoutMarketingOptIn {
3
3
  show: boolean;
4
4
  checked: boolean;
@@ -1,5 +1,5 @@
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
1
2
  import type { IElementsConfigurations } from '@/interfaces/configs/configurations.interface';
2
- import type { DeepPartial } from '@/interfaces/core.interface';
3
3
  import type { IAddressComponent } from './address.interface';
4
4
  import type { ICartComponent } from './cart.interface';
5
5
  import type { ICheckoutComponent } from './checkout.interface';
@@ -1,5 +1,5 @@
1
1
  import type { DisplayModeType } from 'enums';
2
- import type { DeepPartial } from '@/interfaces/core.interface';
2
+ import type { DeepPartial } from '@/interfaces/config.interface';
3
3
  export type ProductListCardStyle = 'card' | 'ghost';
4
4
  export type ProductListCardCornerRadius = 'rounded' | 'sharp';
5
5
  export interface IProductListTheme {
@@ -1,4 +1,4 @@
1
- import type { DeepPartial } from '@/interfaces/core.interface';
1
+ import type { DeepPartial } from '@/interfaces/config.interface';
2
2
  export type FulfillmentDisplayType = 'carousel' | 'popup';
3
3
  export interface IProductLayout {
4
4
  showImages: boolean;
@@ -0,0 +1,44 @@
1
+ import type { PRODUCT_LIST_FILTER_TYPES } from '@/constants';
2
+ import type { ComponentType } from '@/enums';
3
+ import type { IAddressOptions } from '@/modules/address/address.interface';
4
+ export interface IInjectProductElement {
5
+ containerId: string;
6
+ identifier: string;
7
+ }
8
+ export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
9
+ export interface IInjectProductListParams {
10
+ containerId: string;
11
+ rows?: number;
12
+ columns?: number;
13
+ filters?: ProductListFilterType[];
14
+ productUrl?: string;
15
+ }
16
+ export interface IInjectProductListSearchParams {
17
+ containerId: string;
18
+ }
19
+ export interface IInjectProductListFiltersParams {
20
+ containerId: string;
21
+ filters: ProductListFilterType[];
22
+ }
23
+ export interface IBuilderInjectElementParams {
24
+ type: ComponentType;
25
+ containerId: string;
26
+ [key: string]: any;
27
+ }
28
+ export interface IProcessInjectElementParams {
29
+ type: ComponentType;
30
+ containerId: string;
31
+ identifier?: string;
32
+ options?: IAddressOptions;
33
+ checkoutId?: string;
34
+ hideHeader?: boolean;
35
+ }
36
+ export interface IInjectCheckoutParams {
37
+ containerId: string;
38
+ checkoutId?: string;
39
+ hideHeader?: boolean;
40
+ }
41
+ export interface IInjectCheckoutBuilderParams extends IInjectCheckoutParams {
42
+ simulatePresale?: boolean;
43
+ presaleExpiresInMinutes?: number;
44
+ }
@@ -1,7 +1,3 @@
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';
5
1
  import { BaseComponent } from '@/core/base-component.service';
6
2
  import type { IAddressComponent } from '@/interfaces/configs';
7
3
  import type { IAddressOptions } from './address.interface';
@@ -9,12 +5,6 @@ export interface IAddressInputComponentParams {
9
5
  productId?: string;
10
6
  isIndependentComponent?: boolean;
11
7
  options?: IAddressOptions;
12
- navigationSource?: NavigationSourceType;
13
- product?: IProductListProduct;
14
- shippingFulfillment?: IFulfillment | null;
15
- onDemandFulfillment?: IFulfillment | null;
16
- showCollections?: boolean;
17
- config?: IProductListComponent;
18
8
  }
19
9
  export declare class AddressInputComponent extends BaseComponent<IAddressInputComponentParams, IAddressComponent> {
20
10
  private suggestions;
@@ -34,7 +24,6 @@ export declare class AddressInputComponent extends BaseComponent<IAddressInputCo
34
24
  private closeDrawer;
35
25
  private handleCancel;
36
26
  private handleCheckAvailability;
37
- private reopenAddToCartDrawer;
38
27
  private handleSuggestionClick;
39
28
  private handleDocumentClick;
40
29
  private searchAddresses;
@@ -6,7 +6,7 @@ export declare class AddressCommands extends BaseCommand {
6
6
  constructor();
7
7
  static getInstance(): AddressCommands;
8
8
  searchAddresses(query: string): Promise<IAddressAutocompleteResult[]>;
9
- getAddressDetails(addressId: string): Promise<IAddressDetailsResult>;
9
+ getAddressDetails(addressId: string): Promise<IAddressDetailsResult | null>;
10
10
  setSelectedAddress(addressData: IAddressData): Promise<void>;
11
11
  setAddressManually(address: IAddressAddress, coordinates: IAddressCoordinates): Promise<void>;
12
12
  clearSelectedAddress(): Promise<void>;
@@ -8,6 +8,7 @@ export interface ICheckoutCompletedComponentParams {
8
8
  giftRecipientEmail: string | null;
9
9
  checkoutToken?: string;
10
10
  cartId?: string;
11
+ isCompleted?: boolean;
11
12
  }
12
13
  export declare class CheckoutCompletedComponent extends BaseComponent<ICheckoutCompletedComponentParams, ICheckoutComponent> {
13
14
  get hostClasses(): string[];
@@ -1,3 +1,4 @@
1
+ import { SafeHTMLElement } from '@/utils/dom-compat';
1
2
  declare global {
2
3
  interface Window {
3
4
  Stripe: any;
@@ -23,7 +24,7 @@ export interface IStripeFormStatus {
23
24
  hasError: boolean;
24
25
  errorMessage: string | null;
25
26
  }
26
- export declare class CheckoutStripeFormComponent extends HTMLElement {
27
+ export declare class CheckoutStripeFormComponent extends SafeHTMLElement {
27
28
  private _initialized;
28
29
  private _stripe;
29
30
  private _stripeElements;
@@ -17,6 +17,8 @@ export declare class ProductImageCarouselComponent extends BaseComponent<IImageC
17
17
  private startX;
18
18
  private currentTranslateX;
19
19
  private translateX;
20
+ private boundDragMove;
21
+ private boundDragEnd;
20
22
  constructor();
21
23
  afterRender(): void;
22
24
  onStoreWatch(changes: IOnStoreChanged[]): void;
@@ -26,6 +28,7 @@ export declare class ProductImageCarouselComponent extends BaseComponent<IImageC
26
28
  private scrollToIndex;
27
29
  private setupMainImageSwipe;
28
30
  private setupGalleryDrag;
31
+ protected disconnected(): void;
29
32
  private handleDragStart;
30
33
  private handleDragMove;
31
34
  private handleDragEnd;
@@ -13,6 +13,8 @@ export declare class ProductRetailersCarouselComponent extends BaseComponent<IPr
13
13
  private startX;
14
14
  private currentTranslateX;
15
15
  private translateX;
16
+ private boundDragMove;
17
+ private boundDragEnd;
16
18
  constructor();
17
19
  afterRender(): void;
18
20
  private cacheElements;
@@ -21,6 +23,7 @@ export declare class ProductRetailersCarouselComponent extends BaseComponent<IPr
21
23
  private updateSelectedCard;
22
24
  private scrollToIndex;
23
25
  private setupDrag;
26
+ protected disconnected(): void;
24
27
  private handleDragStart;
25
28
  private handleDragMove;
26
29
  private handleDragEnd;
@@ -1,12 +1,13 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
+ import { type NavigationSourceType } from '@/enums';
2
3
  import type { IProductComponent } from '@/interfaces/configs';
3
4
  export interface IProductRetailersPopupListComponentParams {
4
5
  productId: string;
6
+ navigationSource: NavigationSourceType;
5
7
  }
6
8
  export declare class ProductRetailersPopupListComponent extends BaseComponent<IProductRetailersPopupListComponentParams, IProductComponent> {
7
9
  get hostClasses(): string[];
8
- constructor();
9
- private getProductId;
10
+ beforeSetupStoreWatchers(): void;
10
11
  private onFulfillmentTabClick;
11
12
  private onRetailerCardClick;
12
13
  protected template(): HTMLElement[];
@@ -16,7 +16,7 @@ export declare class ProductCommands extends BaseCommand {
16
16
  selectSize(productId: string, sizeId: string): Promise<void>;
17
17
  selectFulfillment(productId: string, selectedFulfillmentId: string): Promise<void>;
18
18
  updateQuantity(productId: string, delta: number): Promise<void>;
19
- changeFulfillmentType(productId: string, selectedFulfillmentType: FulfillmentType): Promise<void>;
19
+ changeFulfillmentType(productId: string, newFulfillmentType: FulfillmentType): Promise<void>;
20
20
  removeProduct(productId: string): Promise<void>;
21
21
  openProductDrawer(productId: string, contentType: IProductDrawerContentConfig['type'], data?: Record<string, any>): Promise<void>;
22
22
  closeProductDrawer(productId: string): Promise<void>;
@@ -24,6 +24,4 @@ export declare class ProductCommands extends BaseCommand {
24
24
  addToCart(productId: string, params: AddItemParams): Promise<void>;
25
25
  addPresaleToCart(productId: string, params: AddItemParams): Promise<void>;
26
26
  productDataForEventFromStore(identifier: string): IBaseProductEventData;
27
- private findFirstAvailableSize;
28
- private loadProductStoreUpdate;
29
27
  }
@@ -1,7 +1,5 @@
1
1
  export * from './product-badge';
2
2
  export * from './product-button';
3
- export * from './product-fulfillments';
4
3
  export * from './product-price-and-personalization';
5
4
  export * from './product-quantity-selector';
6
5
  export * from './product-sizes-list';
7
- export * from './product-title';
@@ -5,4 +5,5 @@ export interface IBadgesParams {
5
5
  }>;
6
6
  separatorText?: string;
7
7
  }
8
+ export declare const createProductBadge: (name: string, className?: string) => HTMLElement;
8
9
  export declare const createProductBadges: ({ badges, separatorText }: IBadgesParams) => HTMLElement;
@@ -1,9 +1,15 @@
1
1
  import type { IProductSizeStore } from 'core/store/interfaces/product.interface';
2
2
  import type { ProductListCardCornerRadius } from 'interfaces/configs';
3
- export interface ISizeSelectorParams {
3
+ import { BaseComponent } from '@/core/base-component.service';
4
+ export interface IProductListSizeSelectorParams {
4
5
  sizes: Record<string, IProductSizeStore>;
5
- selectedSize: IProductSizeStore;
6
+ selectedSizeId: string | null;
6
7
  cornerRadius: ProductListCardCornerRadius;
7
8
  onSelect?: (size: IProductSizeStore) => void;
8
9
  }
9
- export declare const createProductSizesList: ({ sizes, selectedSize, cornerRadius, onSelect }: ISizeSelectorParams) => HTMLElement;
10
+ export declare class ProductListSizeSelectorComponent extends BaseComponent<IProductListSizeSelectorParams> {
11
+ private onOutsideClick;
12
+ get hostClasses(): string[];
13
+ protected disconnected?(): void;
14
+ protected template(): HTMLElement[];
15
+ }
@@ -4,6 +4,6 @@ export * from './filter-components/product-list-apply-filter-button';
4
4
  export * from './product-list-card-loading.component';
5
5
  export * from './product-list-engraving.component';
6
6
  export * from './product-list-filters.component';
7
+ export * from './product-list-product-engraving-lines.component';
7
8
  export * from './product-list-product-pre-cart.component';
8
- export * from './product-list-retailers.component';
9
9
  export * from './product-list-search.component';
@@ -1,10 +1,7 @@
1
1
  import { BaseComponent } from 'core/base-component.service';
2
+ import type { IProductListComponent } from 'interfaces/configs';
2
3
  import type { IEngravingFormComponentParams } from 'modules/ui-components/engraving';
3
- export declare class ProductListEngravingComponent extends BaseComponent<IEngravingFormComponentParams> {
4
+ export declare class ProductListEngravingComponent extends BaseComponent<IEngravingFormComponentParams, IProductListComponent> {
4
5
  protected template(): HTMLElement[];
5
6
  private createHeader;
6
- private handleClose;
7
- private handleEngravingComplete;
8
- private handleEngravingCancel;
9
- private reopenAddToCartDrawer;
10
7
  }
@@ -1,5 +1,5 @@
1
1
  import { BaseComponent } from 'core/base-component.service';
2
- import type { ProductListFilterType } from 'interfaces/core.interface';
2
+ import type { ProductListFilterType } from 'interfaces/injection.interface';
3
3
  export interface IProductListFiltersParams {
4
4
  filters: ProductListFilterType[];
5
5
  }
@@ -24,13 +24,13 @@ export declare class ProductListFiltersComponent extends BaseComponent<IProductL
24
24
  private priceFilterChevronIcon?;
25
25
  private fulfillmentFilterChevronIcon?;
26
26
  private priceSliderWrapper?;
27
- private resizeHandler;
27
+ private boundDrawerClosedHandler;
28
28
  private priceFilterDebounceTimer;
29
29
  constructor();
30
30
  get hostClasses(): string[];
31
31
  protected connected(): Promise<void>;
32
32
  private setupDrawerCloseListener;
33
- private setupResizeListener;
33
+ protected disconnected(): void;
34
34
  private detectIfRenderedInDrawer;
35
35
  onStoreWatch(): void;
36
36
  private syncFiltersFromStore;
@@ -0,0 +1,21 @@
1
+ import { BaseComponent } from 'core/base-component.service';
2
+ import type { IProductListComponent } from 'interfaces/configs';
3
+ export interface IProductListProductEngravingLinesComponentParams {
4
+ identifier: string;
5
+ lines: string[];
6
+ maxLines: number;
7
+ maxCharsPerLine: number;
8
+ location?: string;
9
+ fee: number;
10
+ }
11
+ export declare class ProductListProductEngravingLinesComponent extends BaseComponent<IProductListProductEngravingLinesComponentParams, IProductListComponent> {
12
+ private engravingLines;
13
+ private addEngravingButton;
14
+ constructor();
15
+ protected disconnected?(): void;
16
+ template(): HTMLElement;
17
+ private engravingLinesSection;
18
+ private actionButtonsSection;
19
+ private calculateTotalPrice;
20
+ private addToCartButtonText;
21
+ }