@liquidcommerce/elements-sdk 2.6.0-beta.5 → 2.6.0-beta.7

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 (29) hide show
  1. package/dist/index.esm.js +9846 -10432
  2. package/dist/types/core/api/api-client.service.d.ts +3 -4
  3. package/dist/types/core/command/common-command.service.d.ts +1 -1
  4. package/dist/types/core/google-tag-manager.service.d.ts +2 -0
  5. package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +2 -14
  6. package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +2 -1
  7. package/dist/types/core/pubsub/interfaces/product.interface.d.ts +0 -1
  8. package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
  9. package/dist/types/core/store/interfaces/checkout.interface.d.ts +2 -2
  10. package/dist/types/core/store/interfaces/core.interface.d.ts +3 -2
  11. package/dist/types/enums/cloud.enum.d.ts +3 -300
  12. package/dist/types/interfaces/api/cart.interface.d.ts +91 -0
  13. package/dist/types/interfaces/cloud/catalog.interface.d.ts +2 -3
  14. package/dist/types/interfaces/cloud/checkout.interface.d.ts +9 -2
  15. package/dist/types/interfaces/cloud/index.d.ts +0 -1
  16. package/dist/types/modules/cart/cart.commands.d.ts +0 -1
  17. package/dist/types/modules/cart/cart.commands.helper.d.ts +1 -6
  18. package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
  19. package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
  20. package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -3
  21. package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +1 -1
  22. package/dist/types/modules/product-list/product-list.component.d.ts +2 -3
  23. package/dist/types/modules/product-list/product-list.interface.d.ts +2 -2
  24. package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
  25. package/dist/types/utils/helper.d.ts +2 -1
  26. package/package.json +3 -3
  27. package/umd/elements.js +1 -1
  28. package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
  29. package/dist/types/modules/ui-components/purchase-min-alert/helpers.d.ts +0 -7
@@ -1,7 +1,7 @@
1
1
  import type { CheckoutEventEnum } from '@/enums';
2
2
  import type { IAddressAddress } from '@/interfaces/api/address.interface';
3
+ import type { ICartItemAttributes } from '@/interfaces/api/cart.interface';
3
4
  import type { ICoreParams } from '@/interfaces/cloud/core.interface';
4
- import type { ICartAttributesPromoCode, ICartItemAttributes } from './cart.interface';
5
5
  import type { IRetailerExpectation } from './retailer.interface';
6
6
  export interface ICheckoutRecipient {
7
7
  firstName?: string;
@@ -175,6 +175,13 @@ export interface ICheckoutEvents {
175
175
  type: CheckoutEventEnum;
176
176
  message: string;
177
177
  }
178
+ export interface ICheckoutAttributesPromoCode {
179
+ value: string;
180
+ discount: number;
181
+ freeDelivery: boolean;
182
+ freeServiceFee: boolean;
183
+ freeShipping: boolean;
184
+ }
178
185
  export interface ICheckoutPrepareResponse {
179
186
  token: string;
180
187
  cartId: string;
@@ -196,7 +203,7 @@ export interface ICheckoutPrepareResponse {
196
203
  payment?: string;
197
204
  giftCards: ICheckoutGiftCard[];
198
205
  events: ICheckoutEvents[];
199
- promoCode: ICartAttributesPromoCode;
206
+ promoCode: ICheckoutAttributesPromoCode;
200
207
  isPresaleLocked: boolean;
201
208
  presaleExpiresAt: string | null;
202
209
  }
@@ -1,4 +1,3 @@
1
- export * from './cart.interface';
2
1
  export * from './catalog.interface';
3
2
  export * from './checkout.interface';
4
3
  export * from './core.interface';
@@ -1,7 +1,6 @@
1
1
  import { BaseCommand } from '@/core/command/base-command.service';
2
2
  import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
3
3
  export interface AddItemParams {
4
- upc: string;
5
4
  fulfillmentId: string;
6
5
  partNumber: string;
7
6
  quantity: number;
@@ -1,9 +1,4 @@
1
1
  import type { IBaseCartEventData } from '@/core/pubsub/interfaces/cart.interface';
2
2
  import type { IAddressStore } from '@/core/store/interfaces/address.interface';
3
- import type { ICartItemStore, ICartStore, ICartTotalsStore, IRetailerFulfillmentStore, IRetailerStore } from '@/core/store/interfaces/cart.interface';
4
- import type { ICart, ICartItem, ICartRetailer, IRetailerFulfillments } from '@/interfaces/cloud';
5
- export declare function buildCartItemStore(apiItem: ICartItem): ICartItemStore;
6
- export declare function buildCartTotals(cart: ICart): ICartTotalsStore;
7
- export declare function buildRetailerStore(retailer: ICartRetailer): IRetailerStore;
8
- export declare function buildFulfillmentStore(fulfillment: IRetailerFulfillments, retailer: ICartRetailer): IRetailerFulfillmentStore;
3
+ import type { ICartStore } from '@/core/store/interfaces/cart.interface';
9
4
  export declare function cartDataForEventFromStore(cartStore: ICartStore, addressStore: IAddressStore): IBaseCartEventData;
@@ -12,7 +12,6 @@ export declare class CartFooterComponent extends BaseComponent<ICartFooterCompon
12
12
  onStoreWatch(changes: IOnStoreChanged[]): void;
13
13
  afterRender(): void;
14
14
  private isAnythingLoading;
15
- private hasUnmetMinimum;
16
15
  private shouldDisableCheckout;
17
16
  private updateCheckoutButtonState;
18
17
  private updateSubtotalItemsCount;
@@ -6,7 +6,6 @@ export declare class CartFulfillmentComponent extends BaseComponent<ICartFulfill
6
6
  get hostClasses(): string[];
7
7
  constructor();
8
8
  private getFulfillmentId;
9
- private getProductStore;
10
9
  private handleItemsUpdate;
11
10
  private setupItemElements;
12
11
  private setupMinimumPurchaseAlert;
@@ -17,7 +16,6 @@ export declare class CartFulfillmentComponent extends BaseComponent<ICartFulfill
17
16
  private isAnyItemUpdating;
18
17
  private checkAndUpdateLoadingState;
19
18
  onStoreChanged(changes: IOnStoreChanged[]): boolean | undefined;
20
- private hasFulfillmentFeesChanged;
21
19
  private hasFulfillmentDataChanged;
22
20
  protected afterRender(): void;
23
21
  protected disconnected(): void;
@@ -1,12 +1,12 @@
1
1
  import { BaseComponent } from '@/core/base-component.service';
2
- import type { IProduct } from '@/interfaces/api/product.interface';
3
- import type { IRetailerFulfillments } from '@/interfaces/cloud';
2
+ import type { IFulfillment, IProduct } from '@/interfaces/api/product.interface';
4
3
  import type { ProductListCardVariantType } from '@/interfaces/core.interface';
5
4
  export interface IProductListCardParams {
6
5
  variant: ProductListCardVariantType;
7
6
  fillCard: boolean;
8
7
  product: IProduct;
9
- fulfillments: IRetailerFulfillments[];
8
+ shippingFulfillment: IFulfillment | null;
9
+ onDemandFulfillment: IFulfillment | null;
10
10
  productUrl?: string;
11
11
  }
12
12
  export interface IProductAvailabilityData {
@@ -12,7 +12,7 @@ export interface IProductListFiltersParams {
12
12
  onPreOrderChange?: (enabled: boolean) => void;
13
13
  onDeliveryOptionsChange?: (value: 'all' | 'shipping' | 'onDemand') => void;
14
14
  onPriceChange?: (min: string, max: string) => void;
15
- onCheckboxFilterChange?: (bucket: string, selectedValues: string[]) => void;
15
+ onCheckboxFilterChange?: (filterCategory: string, selectedValues: string[]) => void;
16
16
  onApplyFilters?: () => void;
17
17
  }
18
18
  export declare class ProductListFiltersComponent extends BaseComponent<IProductListFiltersParams> {
@@ -12,7 +12,7 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
12
12
  private products;
13
13
  private retailers;
14
14
  private pagination;
15
- private sanitizedFilters;
15
+ private filters;
16
16
  private searchFilter;
17
17
  private currentFilters;
18
18
  private cardsContainer;
@@ -37,8 +37,6 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
37
37
  protected template(): HTMLElement[];
38
38
  private setLoadingState;
39
39
  private renderCurrentState;
40
- private sanitizeFilterValues;
41
- private processResponseFilters;
42
40
  private loadInitialProducts;
43
41
  private updateFiltersComponent;
44
42
  private loadMoreProducts;
@@ -58,6 +56,7 @@ export declare class ProductListComponent extends BaseComponent<IProductListComp
58
56
  private isPreOrderDisabled;
59
57
  private isSameDayDeliveryDisabled;
60
58
  private createCardsContainer;
59
+ private getResponsiveColumns;
61
60
  private renderLoadingState;
62
61
  private renderProducts;
63
62
  private appendNewProducts;
@@ -13,8 +13,8 @@ export interface IExtendedFilterValue extends IFilterValue {
13
13
  formattedValue?: string;
14
14
  }
15
15
  export interface IExtendedFilterSchema {
16
- bucket: string;
17
- values: IExtendedFilterValue[];
16
+ filterCategory: string;
17
+ filterValues: IExtendedFilterValue[];
18
18
  }
19
19
  export interface IProductListSearch {
20
20
  searchTerm?: string;
@@ -1,2 +1 @@
1
- export * from './helpers';
2
1
  export * from './purchase-min-alert.component';
@@ -1,5 +1,6 @@
1
1
  import type { CartEventEnum, CheckoutEventEnum } from 'enums';
2
- import type { ICartEvent, ICheckoutEvents } from 'interfaces/cloud';
2
+ import type { ICheckoutEvents } from 'interfaces/cloud';
3
+ import type { ICartEvent } from '@/interfaces/api/cart.interface';
3
4
  export type ElementEventLevel = 'success' | 'warning' | 'error';
4
5
  export interface IElementsCartEvent {
5
6
  type: CartEventEnum;
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.5",
6
+ "version": "2.6.0-beta.7",
7
7
  "homepage": "https://docs.liquidcommerce.co/elements-sdk",
8
8
  "repository": {
9
9
  "type": "git",
@@ -71,8 +71,8 @@
71
71
  ],
72
72
  "devDependencies": {
73
73
  "@biomejs/biome": "2.3.5",
74
- "@commitlint/cli": "^20.1.0",
75
- "@commitlint/config-conventional": "^20.0.0",
74
+ "@commitlint/cli": "^20.2.0",
75
+ "@commitlint/config-conventional": "^20.2.0",
76
76
  "@rollup/plugin-alias": "^6.0.0",
77
77
  "@rollup/plugin-commonjs": "^29.0.0",
78
78
  "@rollup/plugin-json": "^6.1.0",