@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,43 +1,65 @@
1
- import { BaseComponent } from '@/core/base-component.service';
2
- import type { ICurrentFilters, IExtendedFilterSchema, IPriceConfig } from '../product-list.interface';
1
+ import { BaseComponent } from 'core/base-component.service';
2
+ import type { ProductListFilterType } from 'interfaces/core.interface';
3
3
  export interface IProductListFiltersParams {
4
- enablePersonalized: boolean;
5
- enablePreOrder: boolean;
6
- enableDeliveryOptions: boolean;
7
- sanitizedFilters?: IExtendedFilterSchema[];
8
- currentFilters?: ICurrentFilters;
9
- priceConfig?: IPriceConfig;
10
- isDrawerMode?: boolean;
11
- onPersonalizedChange?: (enabled: boolean) => void;
12
- onPreOrderChange?: (enabled: boolean) => void;
13
- onDeliveryOptionsChange?: (value: 'all' | 'shipping' | 'onDemand') => void;
14
- onPriceChange?: (min: string, max: string) => void;
15
- onCheckboxFilterChange?: (bucket: string, selectedValues: string[]) => void;
16
- onApplyFilters?: () => void;
4
+ filters: ProductListFilterType[];
17
5
  }
18
6
  export declare class ProductListFiltersComponent extends BaseComponent<IProductListFiltersParams> {
19
- private priceCollapsed;
20
- private deliveryCollapsed;
21
- private checkboxFilterStates;
22
- private readonly DEFAULT_MIN;
23
- private readonly DEFAULT_MAX;
24
- private priceChevronContainer?;
25
- private priceSliderContainer?;
26
- private deliveryChevronContainer?;
27
- private deliveryOptionsList?;
7
+ private readonly DEFAULT_MIN_PRICE;
8
+ private readonly DEFAULT_MAX_PRICE;
9
+ private readonly FILTER_DEBOUNCE_DELAY_MS;
10
+ private readonly DESKTOP_BREAKPOINT;
11
+ private isRenderedInDrawerMode;
12
+ private permanentFilters;
13
+ private availableDynamicFilters;
14
+ private checkboxFilterStateMap;
15
+ private isPriceFilterCollapsed;
16
+ private isFulfillmentFilterCollapsed;
17
+ private appliedFiltersChipsContainer;
18
+ private engravingFiltersContainer?;
19
+ private presaleFilterContainer?;
20
+ private fulfillmentFilterContainer?;
21
+ private priceFiltersContainer?;
22
+ private dynamicFiltersContainer?;
23
+ private filterButtonContainer?;
24
+ private fulfillmentOptionsList?;
25
+ private priceFilterChevronIcon?;
26
+ private fulfillmentFilterChevronIcon?;
27
+ private priceSliderWrapper?;
28
+ private resizeHandler;
29
+ private priceFilterDebounceTimer;
30
+ constructor();
28
31
  get hostClasses(): string[];
29
- private isSameDayDeliveryDisabled;
30
- private isPersonalizationDisabled;
31
- private isPreOrderDisabled;
32
- private createPersonalizedFilterWrapper;
33
- private createPreOrderFilterWrapper;
34
- private createDeliveryOptionsFilterWrapper;
35
- private toggleDeliveryCollapse;
36
- private createPriceFilterWrapper;
37
- private togglePriceCollapse;
38
- private createCheckboxFilter;
39
- private renderCheckboxItemsWrapper;
40
- private handleCheckboxChange;
41
- private toggleCheckboxFilter;
32
+ protected connected(): Promise<void>;
33
+ private setupDrawerCloseListener;
34
+ private setupResizeListener;
35
+ private detectIfRenderedInDrawer;
36
+ onStoreWatch(): void;
37
+ private syncFiltersFromStore;
38
+ private refreshUIStates;
39
+ private transformFilterValue;
40
+ private fetchFilters;
41
+ private applyFiltersAndCloseDrawer;
42
42
  protected template(): HTMLElement[];
43
+ private buildFilterButton;
44
+ private openFilterDrawer;
45
+ private buildFilterHeader;
46
+ private clearAllActiveFilters;
47
+ private removeSingleFilter;
48
+ private getFilteredAndSanitizedFilters;
49
+ private buildAppliedFiltersChipsContainer;
50
+ private handleFilterChange;
51
+ private isEngravingCurrentlyDisabled;
52
+ private buildEngravingFilterElements;
53
+ private buildPresaleFilterElements;
54
+ private isSameDayDeliveryCurrentlyDisabled;
55
+ private toggleFulfillmentFilterCollapse;
56
+ private buildFulfillmentFilterElements;
57
+ private togglePriceFilterCollapse;
58
+ private buildPriceFilterElements;
59
+ private buildDynamicFiltersElements;
60
+ private getFilterElements;
61
+ private buildCheckboxFilterElements;
62
+ private toggleCheckboxFilterExpansion;
63
+ private renderCheckboxItemsForFilter;
64
+ private handleCheckboxSelectionChange;
43
65
  }
@@ -0,0 +1,17 @@
1
+ import type { IProductListComponent } from 'interfaces/configs';
2
+ import { BaseComponent } from '@/core/base-component.service';
3
+ export interface IProductListRetailersParams {
4
+ productId: string;
5
+ config?: IProductListComponent;
6
+ }
7
+ export declare class ProductListRetailersComponent extends BaseComponent<IProductListRetailersParams, IProductListComponent> {
8
+ get hostClasses(): string[];
9
+ constructor();
10
+ private getProductId;
11
+ protected template(): HTMLElement[];
12
+ private extractFulfillments;
13
+ private onFulfillmentTabClick;
14
+ private onRetailerCardClick;
15
+ private createHeader;
16
+ private createNoAvailabilityMessage;
17
+ }
@@ -0,0 +1,22 @@
1
+ import { BaseComponent } from '@/core/base-component.service';
2
+ export declare class ProductListSearchComponent extends BaseComponent {
3
+ private searchInput?;
4
+ private clearButton?;
5
+ private debounceTimer;
6
+ private currentSearchTerm;
7
+ private readonly ALLOWED_CHARACTERS;
8
+ private readonly MAX_LENGTH;
9
+ private readonly DEFAULT_DEBOUNCE_MS;
10
+ get hostClasses(): string[];
11
+ disconnectedCallback(): void;
12
+ getCurrentSearchTerm(): string;
13
+ private fetchProducts;
14
+ private buildCurrentFiltersFromState;
15
+ protected template(): HTMLElement[];
16
+ private handleDebouncedSearch;
17
+ private handleClearSearch;
18
+ private cleanInput;
19
+ private normalizeForSearch;
20
+ private updateClearButtonVisibility;
21
+ private cleanupDebounceTimer;
22
+ }
@@ -0,0 +1,35 @@
1
+ import type { IProductListProduct } from 'core/store/interfaces/product-list.interface';
2
+ import type { IProductListComponent } from 'interfaces/configs';
3
+ import { BaseComponent } from '@/core/base-component.service';
4
+ import type { IFulfillment } from '@/interfaces/api/product.interface';
5
+ export interface IProductListCardParams {
6
+ product: IProductListProduct;
7
+ shippingFulfillment: IFulfillment | null;
8
+ onDemandFulfillment: IFulfillment | null;
9
+ productUrl?: string;
10
+ }
11
+ export declare class ProductListCardComponent extends BaseComponent<IProductListCardParams, IProductListComponent> {
12
+ private selectedSize;
13
+ private unsubscribeFromState?;
14
+ private readonly DESKTOP_BREAKPOINT;
15
+ constructor();
16
+ get hostClasses(): string[];
17
+ protected connected(): Promise<void>;
18
+ disconnectedCallback(): void;
19
+ private reRender;
20
+ private getAvailabilityData;
21
+ private isPresaleActive;
22
+ private handleAddToCart;
23
+ protected template(): HTMLElement[];
24
+ private generateProductUrl;
25
+ private createVariantStandard;
26
+ private createImageSection;
27
+ private createContentSection;
28
+ private createBadgesSection;
29
+ private createTitleSection;
30
+ private createPricePersonalizationSection;
31
+ private createSizesSection;
32
+ private handleDeliveryOptionsClick;
33
+ private createFulfillmentSectionWrapper;
34
+ private createAddToCartSection;
35
+ }
@@ -1,15 +1,67 @@
1
+ import type { IModalContentConfig } from 'core/store/interfaces/core.interface';
2
+ import type { IProductListProduct, IProductListStore } from 'core/store/interfaces/product-list.interface';
1
3
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { ICatalog, ICatalogParams, IProduct } from '@/interfaces/cloud';
4
+ import { type FulfillmentType } from '@/enums';
5
+ import type { IProduct, IRetailer } from '@/interfaces/api/product.interface';
6
+ import type { IFilterSchema, INavigationResponse, IProductSearchParams, IProductSearchResponse } from '@/interfaces/api/product-list.interface';
7
+ import type { ProductListFilterType } from '@/interfaces/core.interface';
3
8
  import { type AddItemParams } from '@/modules/cart/cart.commands';
9
+ import type { IExtendedFilterSchema, IPagination, IProductListFilters } from './product-list.interface';
10
+ type StateListener = (state: IProductListStore) => void;
4
11
  export declare class ProductListCommands extends BaseCommand {
5
12
  private readonly uiCommands;
6
13
  private readonly cartCommands;
14
+ private readonly checkoutCommands;
15
+ private readonly FILTER_TYPE_MAP;
16
+ private listeners;
7
17
  constructor();
8
18
  static getInstance(): ProductListCommands;
9
- getProductList(params: ICatalogParams): Promise<ICatalog>;
19
+ subscribe(listener: StateListener): () => void;
20
+ private getStoreState;
21
+ updateSearchTerm(searchTerm: string): void;
22
+ setLoading(isLoading: boolean): void;
23
+ private notifyListeners;
24
+ private initializeProductFulfillment;
25
+ private transformProductVariantsToFulfillments;
26
+ private transformSingleProduct;
27
+ private transformProductSize;
28
+ private addShippingFulfillments;
29
+ private addOnDemandFulfillments;
30
+ loadInitialProducts(page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): Promise<void>;
31
+ loadMoreProducts(perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): Promise<void>;
32
+ getProductList(params: IProductSearchParams): Promise<IProductSearchResponse>;
33
+ syncFiltersFromComponent(filters: IProductListFilters): void;
34
+ getSanitizedFilters(filters: IFilterSchema[], configuredFilters: ProductListFilterType[]): IExtendedFilterSchema[];
35
+ buildSearchParams(page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): IProductSearchParams;
36
+ private buildFilters;
37
+ private addToggleFilters;
38
+ private getBooleanFilterValue;
39
+ private addEngravingFilter;
40
+ private addPresaleFilter;
41
+ private addFulfillmentFilter;
42
+ private addPriceFilter;
43
+ private addDynamicFilters;
44
+ setGridConfig(rows: number, columns: number): void;
45
+ getItemsPerPage(): number;
46
+ updatePagination(navigation: INavigationResponse | undefined): IPagination;
47
+ createInitialPagination(): IPagination;
48
+ mergeRetailers(existingRetailers: Record<string, IRetailer>, newRetailers: Record<string, IRetailer>): Record<string, IRetailer>;
49
+ extractProductCardData(product: IProductListProduct, retailers: Record<string, IRetailer>): {
50
+ product: IProductListProduct;
51
+ retailer: IRetailer;
52
+ } | null;
53
+ private getFilterKeyToTypeMap;
10
54
  addToCart(params: AddItemParams): Promise<void>;
11
55
  addPresaleToCart(params: AddItemParams): Promise<void>;
12
56
  trackViewItemList(products: IProduct[]): void;
13
- trackSelectItem(product: IProduct): void;
57
+ trackSelectItem(product: IProductListProduct): void;
14
58
  private convertProductToBaseItem;
59
+ openProductListModal(productId: string, contentType: IModalContentConfig['type'], data?: Record<string, any>): void;
60
+ closeProductListModal(productId: string): void;
61
+ selectFulfillmentType: (productId: string, selectedFulfillmentType: FulfillmentType) => Promise<void>;
62
+ selectFulfillment: (productId: string, fulfillmentId: string) => Promise<void>;
63
+ selectSize: (productId: string, sizeId: string) => Promise<void>;
64
+ private getFulfillmentForSize;
65
+ updateQuantity: (productId: string, quantity: number) => void;
15
66
  }
67
+ export {};
@@ -1,10 +1,8 @@
1
1
  import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
- import type { ProductListCardVariantType, ProductListFilterType } from '@/interfaces/core.interface';
2
+ import type { ProductListFilterType } from '@/interfaces/core.interface';
3
3
  export interface IProductListComponentParams {
4
- cardVariant: ProductListCardVariantType;
5
4
  rows: number;
6
5
  columns: number;
7
- fillCard: boolean;
8
6
  filters: ProductListFilterType[];
9
7
  productUrl?: string;
10
8
  }
@@ -12,63 +10,35 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
12
10
  private products;
13
11
  private retailers;
14
12
  private pagination;
15
- private sanitizedFilters;
16
- private searchFilter;
17
- private currentFilters;
18
13
  private cardsContainer;
19
- private filtersContainer;
20
- private searchContainer;
21
14
  private sentinelElement;
22
- private personalizedSwitch;
23
- private preOrderSwitch;
24
- private deliveryRadios;
25
- private deliveryRadioLabels;
26
15
  private loadingState;
27
16
  private scrollObserver;
28
17
  private initializationPromise;
29
- private filterDebounceTimer;
30
- private readonly FILTER_DEBOUNCE_MS;
31
- private filterButton;
18
+ private unsubscribeFromState?;
32
19
  get hostClasses(): string[];
33
20
  constructor();
34
21
  protected connected(): Promise<void>;
35
22
  disconnectedCallback(): void;
36
23
  private initializeComponent;
37
- protected template(): HTMLElement[];
24
+ private handleStateUpdate;
25
+ private updateLoadingState;
26
+ private hasProductsChanged;
27
+ private updateProductData;
28
+ private handleProductRendering;
29
+ private renderSimplifiedProducts;
38
30
  private setLoadingState;
39
31
  private renderCurrentState;
40
- private sanitizeFilterValues;
41
- private processResponseFilters;
42
32
  private loadInitialProducts;
43
- private updateFiltersComponent;
44
33
  private loadMoreProducts;
45
- private mergeRetailers;
46
- private updatePagination;
47
- private buildApiParams;
48
- private buildFiltersFromState;
49
- private syncFiltersFromResponse;
50
- private onFilterChange;
51
- private resetPagination;
52
- private updateFiltersUI;
53
- private updatePersonalizedSwitch;
54
- private updatePreOrderSwitch;
55
- private updateDeliveryOptions;
56
- private updateRadioLabel;
57
- private isPersonalizationDisabled;
58
- private isPreOrderDisabled;
59
- private isSameDayDeliveryDisabled;
34
+ private buildCurrentFiltersFromState;
35
+ private mapStateFilterToComponentFilter;
60
36
  private createCardsContainer;
61
37
  private renderLoadingState;
62
38
  private renderProducts;
63
39
  private appendNewProducts;
64
40
  private createProductCard;
65
- private filterSanitizedFilters;
66
- private buildFiltersParams;
67
- private createSearchContainer;
68
- private createFiltersContainer;
69
- private storeFilterElementReferences;
70
- private openFiltersDrawer;
71
- private createFilterButton;
41
+ private getResponsiveColumns;
72
42
  private setupInfiniteScroll;
73
43
  private createScrollSentinel;
74
44
  private updateSentinel;
@@ -80,6 +50,7 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
80
50
  private showErrorState;
81
51
  private clearCardsContainer;
82
52
  private cleanupScrollObserver;
83
- onStoreWatch(changes: IOnStoreChanged[]): Promise<void>;
84
53
  private doCleanup;
54
+ onStoreWatch(changes: IOnStoreChanged[]): Promise<void>;
55
+ protected template(): HTMLElement[];
85
56
  }
@@ -0,0 +1,39 @@
1
+ export declare const FILTER_KEYS: {
2
+ readonly BRANDS: "brands";
3
+ readonly FLAVOR: "flavor";
4
+ readonly FULFILLMENT: "fulfillment";
5
+ readonly TAGS: "tags";
6
+ readonly REGION: "region";
7
+ readonly VARIETY: "variety";
8
+ readonly ENGRAVING: "engraving";
9
+ readonly PRICE: "price";
10
+ readonly PRESALE: "presale";
11
+ readonly AVAILABILITY: "availability";
12
+ readonly CATEGORIES: "categories";
13
+ readonly SIZES: "sizes";
14
+ readonly COLORS: "colors";
15
+ readonly APPELLATION: "appellation";
16
+ readonly COUNTRY: "country";
17
+ readonly VINTAGE: "vintage";
18
+ readonly MATERIALS: "materials";
19
+ readonly COLLECTION_TAGS: "collectionTags";
20
+ };
21
+ export declare const FULFILLMENT_OPTIONS: {
22
+ readonly ALL: "all";
23
+ readonly SHIPPING: "shipping";
24
+ readonly ON_DEMAND: "onDemand";
25
+ };
26
+ export declare const PRICE_OPTIONS: {
27
+ readonly MIN: "0";
28
+ readonly MAX: "1000";
29
+ };
30
+ export declare const FILTER_VALUE_OPTIONS: {
31
+ readonly YES: "YES";
32
+ readonly NO: "NO";
33
+ };
34
+ export declare const FILTER_LOADING_STATE: {
35
+ readonly IDLE: "idle";
36
+ readonly LOADING_INITIAL: "loading_initial";
37
+ readonly LOADING_MORE: "loading_more";
38
+ readonly ERROR: "error";
39
+ };
@@ -1,27 +1,24 @@
1
- import type { IFilterValue } from 'enums';
2
- export interface IProductListFilters {
3
- personalized: boolean;
4
- preOrder: boolean;
5
- deliveryOptions: 'all' | 'shipping' | 'onDemand';
6
- price?: {
7
- min?: string;
8
- max?: string;
9
- };
10
- [key: string]: any;
1
+ import type { IProductFulfillmentStore, IProductSizeStore } from 'core/store/interfaces/product.interface';
2
+ import type { IFilterValue } from '@/interfaces/api/product-list.interface';
3
+ export interface IPriceConfig {
4
+ min?: string;
5
+ max?: string;
11
6
  }
12
- export interface IExtendedFilterValue extends IFilterValue {
13
- formattedValue?: string;
7
+ export interface IProductListFilters {
8
+ price?: IPriceConfig;
9
+ [key: string]: boolean | string | string[] | IPriceConfig | undefined;
14
10
  }
15
11
  export interface IExtendedFilterSchema {
16
- bucket: string;
17
- values: IExtendedFilterValue[];
12
+ type: string;
13
+ values: IFilterValue[];
18
14
  }
19
15
  export interface IProductListSearch {
20
- searchTerm?: string;
16
+ searchTerm: string;
21
17
  }
22
18
  export interface IPagination {
23
19
  currentPage: number;
24
20
  totalPages: number;
21
+ totalCount: number;
25
22
  hasMorePages: boolean;
26
23
  }
27
24
  export interface ICheckboxLabelStates {
@@ -29,29 +26,15 @@ export interface ICheckboxLabelStates {
29
26
  selectedValues: Set<string>;
30
27
  searchInput: HTMLInputElement | null;
31
28
  checkboxList: HTMLElement | null;
32
- filteredItems: IExtendedFilterValue[];
29
+ filteredItems: IFilterValue[];
33
30
  contentElement: HTMLElement | null;
34
31
  iconElement: HTMLElement | null;
35
32
  hasUserInteraction: boolean;
36
33
  }
37
- export interface ICurrentFilters {
38
- personalized: boolean;
39
- preOrder: boolean;
40
- deliveryOptions: 'all' | 'shipping' | 'onDemand';
41
- price?: {
42
- min?: string;
43
- max?: string;
44
- };
45
- [key: string]: any;
46
- }
47
- export interface IPriceConfig {
48
- min: string;
49
- max: string;
50
- }
51
34
  export interface ICreateCheckboxItemParams {
52
35
  filter: IExtendedFilterSchema;
53
36
  state: ICheckboxLabelStates;
54
- item: IExtendedFilterValue;
37
+ item: IFilterValue;
55
38
  onChange: VoidFunction;
56
39
  }
57
40
  export interface IHandleCheckboxFilterSearchParams {
@@ -78,3 +61,25 @@ export interface IRenderCheckboxItemsParams {
78
61
  export interface ICreateFiltersContainerParams {
79
62
  isDrawerMode?: boolean;
80
63
  }
64
+ export interface IProductAvailabilityData {
65
+ hasAvailability: boolean;
66
+ upc: string;
67
+ fulfillmentId: string;
68
+ partNumber: string;
69
+ quantity: number;
70
+ state: string;
71
+ isPresale: boolean;
72
+ isPresaleActive: boolean;
73
+ }
74
+ export interface IProductVariantParams {
75
+ image: string;
76
+ name: string;
77
+ size: string | null;
78
+ price: number;
79
+ availability: IProductAvailabilityData;
80
+ hasPersonalization: boolean;
81
+ sizes: Record<string, IProductSizeStore>;
82
+ maxQuantityPerOrder: number;
83
+ shippingVariants: Record<string, IProductFulfillmentStore>;
84
+ onDemandVariants: Record<string, IProductFulfillmentStore>;
85
+ }
@@ -3,3 +3,4 @@ export declare const productGroupComponents: ComponentType[];
3
3
  export declare const addressGroupComponents: ComponentType[];
4
4
  export declare const cartGroupComponents: ComponentType[];
5
5
  export declare const checkoutGroupComponents: ComponentType[];
6
+ export declare const productListGroupComponent: ComponentType[];
@@ -1,2 +1,2 @@
1
- export type StylesheetType = 'global' | 'ui' | 'product' | 'address' | 'cart' | 'checkout';
1
+ export type StylesheetType = 'global' | 'ui' | 'product' | 'address' | 'cart' | 'checkout' | 'product-list';
2
2
  export declare function getCSSVariableMapping(componentPrefix: string): Record<string, string>;
@@ -1,3 +1,4 @@
1
1
  export * from './drawer.style';
2
2
  export * from './loading.style';
3
+ export * from './modal.style';
3
4
  export * from './promo-code-ticker.style';
@@ -0,0 +1 @@
1
+ export declare function getModalStyles(): string;
@@ -1,5 +1,5 @@
1
1
  import { type ComponentType } from '@/enums';
2
- import type { ConfigsKeyType, ConfigsType, IAllConfigs, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent } from '@/interfaces/configs';
2
+ import type { ConfigsKeyType, ConfigsType, IAllConfigs, UpdateAddressComponent, UpdateCartComponent, UpdateCheckoutComponent, UpdateComponentGlobalConfigs, UpdateProductComponent, UpdateProductListComponent } from '@/interfaces/configs';
3
3
  import { type GeneratedStylesheet } from './services/stylesheet-generator.service';
4
4
  export declare class ThemeProviderService {
5
5
  private data;
@@ -14,6 +14,7 @@ export declare class ThemeProviderService {
14
14
  updateAddressComponent(data: UpdateAddressComponent): void;
15
15
  updateCartComponent(data: UpdateCartComponent): void;
16
16
  updateCheckoutComponent(data: UpdateCheckoutComponent): void;
17
+ updateProductListComponent(data: UpdateProductListComponent): void;
17
18
  getConfigs<T = any>(type: ConfigsKeyType): T;
18
19
  getComponentConfig(componentType: ComponentType): ConfigsType | undefined;
19
20
  getStylesheet(componentType: ComponentType): GeneratedStylesheet[];
@@ -15,6 +15,7 @@ export declare class EngravingFormComponent extends BaseComponent<IEngravingForm
15
15
  private addToCartButton;
16
16
  private fulfillmentId;
17
17
  private partNumber;
18
+ private isPresale;
18
19
  beforeConnected(): void;
19
20
  private calculateTotalPrice;
20
21
  private productInformationSection;
@@ -1,2 +1 @@
1
- export * from './birthdate-input.component';
2
1
  export * from './input.component';
@@ -5,9 +5,13 @@ export interface IInputValidation {
5
5
  max?: number;
6
6
  pattern?: string;
7
7
  customValidator?: (value: string) => string | null;
8
+ minYear?: number;
9
+ maxYear?: number;
10
+ minAge?: number;
11
+ maxAge?: number;
8
12
  }
9
13
  export interface IInputComponentParams {
10
- inputType: 'text' | 'number' | 'email' | 'tel' | 'date';
14
+ inputType: 'text' | 'number' | 'email' | 'tel' | 'date' | 'birthdate';
11
15
  value?: string | null;
12
16
  placeholder?: string;
13
17
  className?: string;
@@ -31,6 +35,9 @@ export declare class InputComponent extends BaseComponent<IInputComponentParams,
31
35
  private validateEmail;
32
36
  private validateTel;
33
37
  private validateDate;
38
+ private parseDateString;
39
+ private calculateAge;
40
+ private validateDateConstraints;
34
41
  private isFieldComplete;
35
42
  private validateInput;
36
43
  private scheduleValidation;
@@ -0,0 +1,21 @@
1
+ import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
2
+ export declare class ModalComponent extends BaseComponent {
3
+ private isOpen;
4
+ private modalElement;
5
+ private contentContainer;
6
+ private currentContentType;
7
+ private readonly boundHandleKeydown;
8
+ constructor();
9
+ disconnected(): void;
10
+ onStoreChanged(changes: IOnStoreChanged[]): boolean;
11
+ private openWithContent;
12
+ private open;
13
+ private close;
14
+ private cleanupCurrentContent;
15
+ private handleCancel;
16
+ private handleBackdropClick;
17
+ private handleKeydown;
18
+ private updateModalContentTypeClass;
19
+ private isElementsEnabled;
20
+ protected template(): HTMLElement;
21
+ }
@@ -1,2 +1 @@
1
- export * from './helpers';
2
1
  export * from './purchase-min-alert.component';
@@ -1,7 +1,9 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
- import type { IDrawerContentConfig } from '@/core/store/interfaces/core.interface';
2
+ import type { IDrawerContentConfig, IModalContentConfig } from '@/core/store/interfaces/core.interface';
3
3
  export declare class UICommands extends BaseCommand {
4
4
  static getInstance(): UICommands;
5
5
  openDrawer(contentType: IDrawerContentConfig['type'], data?: Record<string, any>): void;
6
6
  closeDrawer(): void;
7
+ openModal(contentType: IModalContentConfig['type'], data?: Record<string, any>): void;
8
+ closeModal(): void;
7
9
  }
@@ -0,0 +1,2 @@
1
+ import type { IconProps } from './icon.types';
2
+ export declare const CheckIcon: ({ width, height, className, color }: IconProps) => string;
@@ -1,5 +1,6 @@
1
1
  export * from './arrow-right.icon';
2
2
  export * from './bag.icon';
3
+ export * from './check.icon';
3
4
  export * from './checkbox.icon';
4
5
  export * from './chevron-down.icon';
5
6
  export * from './chevron-left.icon';
@@ -1,21 +1,7 @@
1
1
  export declare function centToDollar(cent: number): number;
2
2
  export declare function formatCentToDollarText(cent: number, showZeroDecimals?: boolean): string;
3
3
  export declare function htmlStringToElement(htmlString: string): HTMLElement;
4
- export declare function format24TimeTo12(time24h: string): string;
5
4
  export declare function formatISODateToMMDDYYYY(isoDateString: string | null | undefined): string;
6
- export declare function validateMinimumAge(birthDate: string | Date | null | undefined, minimumAge?: number, minimumYear?: number): {
7
- isValid: boolean;
8
- age: number | null;
9
- error?: string;
10
- };
11
- export declare function buildFormattedAddressString(address: {
12
- one: string;
13
- two: string;
14
- city: string;
15
- state: string;
16
- zip: string;
17
- country?: string;
18
- }): string;
19
5
  export declare function capitalizeFirstLetter(text: string): string;
20
6
  export declare function splitCategoryPath(catPath?: string): {
21
7
  category: string;