@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.
- package/dist/index.esm.js +9846 -10432
- package/dist/types/core/api/api-client.service.d.ts +3 -4
- package/dist/types/core/command/common-command.service.d.ts +1 -1
- package/dist/types/core/google-tag-manager.service.d.ts +2 -0
- package/dist/types/core/pubsub/interfaces/cart.interface.d.ts +2 -14
- package/dist/types/core/pubsub/interfaces/checkout.interface.d.ts +2 -1
- package/dist/types/core/pubsub/interfaces/product.interface.d.ts +0 -1
- package/dist/types/core/store/interfaces/cart.interface.d.ts +16 -55
- package/dist/types/core/store/interfaces/checkout.interface.d.ts +2 -2
- package/dist/types/core/store/interfaces/core.interface.d.ts +3 -2
- package/dist/types/enums/cloud.enum.d.ts +3 -300
- package/dist/types/interfaces/api/cart.interface.d.ts +91 -0
- package/dist/types/interfaces/cloud/catalog.interface.d.ts +2 -3
- package/dist/types/interfaces/cloud/checkout.interface.d.ts +9 -2
- package/dist/types/interfaces/cloud/index.d.ts +0 -1
- package/dist/types/modules/cart/cart.commands.d.ts +0 -1
- package/dist/types/modules/cart/cart.commands.helper.d.ts +1 -6
- package/dist/types/modules/cart/components/cart-footer.component.d.ts +0 -1
- package/dist/types/modules/cart/components/cart-fulfillment.component.d.ts +0 -2
- package/dist/types/modules/product-list/components/product-list-card.component.d.ts +3 -3
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +1 -1
- package/dist/types/modules/product-list/product-list.component.d.ts +2 -3
- package/dist/types/modules/product-list/product-list.interface.d.ts +2 -2
- package/dist/types/modules/ui-components/purchase-min-alert/index.d.ts +0 -1
- package/dist/types/utils/helper.d.ts +2 -1
- package/package.json +3 -3
- package/umd/elements.js +1 -1
- package/dist/types/interfaces/cloud/cart.interface.d.ts +0 -132
- 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:
|
|
206
|
+
promoCode: ICheckoutAttributesPromoCode;
|
|
200
207
|
isPresaleLocked: boolean;
|
|
201
208
|
presaleExpiresAt: string | null;
|
|
202
209
|
}
|
|
@@ -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 {
|
|
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
|
-
|
|
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?: (
|
|
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
|
|
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
|
-
|
|
17
|
-
|
|
16
|
+
filterCategory: string;
|
|
17
|
+
filterValues: IExtendedFilterValue[];
|
|
18
18
|
}
|
|
19
19
|
export interface IProductListSearch {
|
|
20
20
|
searchTerm?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { CartEventEnum, CheckoutEventEnum } from 'enums';
|
|
2
|
-
import type {
|
|
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.
|
|
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.
|
|
75
|
-
"@commitlint/config-conventional": "^20.
|
|
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",
|