@liquidcommerce/elements-sdk 2.6.0-beta.29 → 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 (38) hide show
  1. package/dist/index.esm.js +13685 -12680
  2. package/dist/types/constants/core.constant.d.ts +1 -0
  3. package/dist/types/core/api/api-client.service.d.ts +0 -2
  4. package/dist/types/core/store/interfaces/core.interface.d.ts +12 -1
  5. package/dist/types/core/store/interfaces/product-list.interface.d.ts +47 -0
  6. package/dist/types/core/store/interfaces/product.interface.d.ts +1 -0
  7. package/dist/types/core/store/store.constant.d.ts +2 -0
  8. package/dist/types/elements-base-client.d.ts +2 -0
  9. package/dist/types/enums/core.enum.d.ts +2 -0
  10. package/dist/types/interfaces/api/product-list.interface.d.ts +5 -4
  11. package/dist/types/interfaces/configs/global.interface.d.ts +4 -2
  12. package/dist/types/interfaces/configs/index.d.ts +1 -0
  13. package/dist/types/interfaces/configs/product-list.interface.d.ts +25 -0
  14. package/dist/types/interfaces/core.interface.d.ts +2 -5
  15. package/dist/types/modules/product-list/components/card-components/index.d.ts +4 -0
  16. package/dist/types/modules/product-list/components/card-components/product-button.d.ts +11 -0
  17. package/dist/types/modules/product-list/components/card-components/product-fulfillments.d.ts +13 -0
  18. package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +10 -0
  19. package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +9 -0
  20. package/dist/types/modules/product-list/components/index.d.ts +2 -1
  21. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +32 -40
  22. package/dist/types/modules/product-list/components/product-list-retailers.d.ts +17 -0
  23. package/dist/types/modules/product-list/product-list-card.component.d.ts +35 -0
  24. package/dist/types/modules/product-list/product-list.commands.d.ts +23 -28
  25. package/dist/types/modules/product-list/product-list.component.d.ts +6 -8
  26. package/dist/types/modules/product-list/product-list.interface.d.ts +24 -0
  27. package/dist/types/modules/theme-provider/constants/component-groupings.d.ts +1 -0
  28. package/dist/types/modules/theme-provider/constants/css-variable-mappings.d.ts +1 -1
  29. package/dist/types/modules/theme-provider/styles/ui/index.d.ts +1 -0
  30. package/dist/types/modules/theme-provider/styles/ui/modal.style.d.ts +1 -0
  31. package/dist/types/modules/theme-provider/theme-provider.service.d.ts +2 -1
  32. package/dist/types/modules/ui-components/modal/modal.component.d.ts +21 -0
  33. package/dist/types/modules/ui-components/ui.commands.d.ts +3 -1
  34. package/dist/types/static/icon/check.icon.d.ts +2 -0
  35. package/dist/types/static/icon/index.d.ts +1 -0
  36. package/package.json +1 -1
  37. package/umd/elements.js +1 -1
  38. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +0 -37
@@ -1,3 +1,4 @@
1
+ import type { IProductFulfillmentStore, IProductSizeStore } from 'core/store/interfaces/product.interface';
1
2
  import type { IFilterValue } from '@/interfaces/api/product-list.interface';
2
3
  export interface IPriceConfig {
3
4
  min?: string;
@@ -17,6 +18,7 @@ export interface IProductListSearch {
17
18
  export interface IPagination {
18
19
  currentPage: number;
19
20
  totalPages: number;
21
+ totalCount: number;
20
22
  hasMorePages: boolean;
21
23
  }
22
24
  export interface ICheckboxLabelStates {
@@ -59,3 +61,25 @@ export interface IRenderCheckboxItemsParams {
59
61
  export interface ICreateFiltersContainerParams {
60
62
  isDrawerMode?: boolean;
61
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[];
@@ -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,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';
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "LiquidCommerce Elements SDK",
4
4
  "license": "UNLICENSED",
5
5
  "author": "LiquidCommerce Team",
6
- "version": "2.6.0-beta.29",
6
+ "version": "2.6.0-beta.30",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",