@liquidcommerce/elements-sdk 2.7.3 → 2.7.4
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.checkout.esm.js +6771 -6766
- package/dist/index.esm.js +11192 -11157
- package/dist/types/clients/base.d.ts +1 -0
- package/dist/types/clients/helpers.d.ts +1 -1
- package/dist/types/constants/core.constant.d.ts +0 -1
- package/dist/types/core/api/api-client.service.d.ts +1 -1
- package/dist/types/core/store/interfaces/core.interface.d.ts +2 -2
- package/dist/types/core/store/store.constant.d.ts +2 -1
- package/dist/types/interfaces/api/product-list.interface.d.ts +2 -1
- package/dist/types/interfaces/configs/global.interface.d.ts +1 -1
- package/dist/types/interfaces/configs/product-list.interface.d.ts +33 -19
- package/dist/types/interfaces/injection.interface.d.ts +4 -1
- package/dist/types/modules/product/components/product-retailers-popup-list.component.d.ts +2 -0
- package/dist/types/modules/product-list/components/card-components/product-button.d.ts +1 -3
- package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts +3 -4
- package/dist/types/modules/product-list/components/card-components/product-sizes-list.d.ts +0 -2
- package/dist/types/modules/product-list/components/filter-components/product-list-toggle-filters.d.ts +0 -6
- package/dist/types/modules/product-list/components/product-list-engraving.component.d.ts +6 -1
- package/dist/types/modules/product-list/components/product-list-filters.component.d.ts +1 -2
- package/dist/types/modules/product-list/components/product-list-product-engraving-lines.component.d.ts +1 -0
- package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts +2 -0
- package/dist/types/modules/product-list/components/product-list-search.component.d.ts +4 -1
- package/dist/types/modules/product-list/product-list-card.component.d.ts +2 -0
- package/dist/types/modules/product-list/product-list-filter.utils.d.ts +1 -1
- package/dist/types/modules/product-list/product-list.commands.d.ts +14 -13
- package/dist/types/modules/product-list/product-list.component.d.ts +1 -0
- package/dist/types/modules/product-list/product-list.constants.d.ts +0 -1
- package/dist/types/modules/ui-components/engraving/engraving-form.component.d.ts +1 -0
- package/dist/types/modules/ui-components/engraving/engraving-view.component.d.ts +1 -0
- package/package.json +2 -2
|
@@ -51,6 +51,7 @@ export declare abstract class ElementsBaseClient {
|
|
|
51
51
|
injectProductListFilters(params: IInjectProductListFiltersParams): Promise<void>;
|
|
52
52
|
protected ensureCartDrawerExists(): void;
|
|
53
53
|
protected ensureAllComponentsRegistered(): void;
|
|
54
|
+
private getServerListConfig;
|
|
54
55
|
protected createInjectedComponentWrapper(containerId: string, type: ComponentType, element: HTMLElement): IInjectedComponent;
|
|
55
56
|
destroy(): void;
|
|
56
57
|
protected rerenderInjectedComponentsByType(type: ComponentType): void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { type ComponentType } from '@/enums';
|
|
2
|
-
export declare function deepMergeConfigs<T extends Record<string, any>>(target: T, source: Partial<T
|
|
2
|
+
export declare function deepMergeConfigs<T extends Record<string, any>>(target: T, source: Partial<T>, currentPath?: string): T;
|
|
3
3
|
export declare const layoutFieldToComponentTypes: Map<string, ComponentType[]>;
|
|
4
4
|
export declare function getComponentTypesForLayoutFields(parentPath: string, layoutFields: Record<string, any>): ComponentType[];
|
|
@@ -18,7 +18,7 @@ export declare class ApiClientService {
|
|
|
18
18
|
getAddressSuggestions(input: string): Promise<ApiResult<IAddressAutocompleteResult[]>>;
|
|
19
19
|
getAddressDetails(id: string): Promise<ApiResult<IAddressDetailsResult>>;
|
|
20
20
|
getProductsData(identifier: string[], location?: ILocation): Promise<ApiResult<IProductAvailabilityResponse>>;
|
|
21
|
-
|
|
21
|
+
productListSearch(params: IProductSearchParams): Promise<ApiResult<IProductSearchResponse>>;
|
|
22
22
|
getCartData(id: string | null): Promise<ApiResult<ICart>>;
|
|
23
23
|
updateCart(params: ICartUpdateParams): Promise<ApiResult<ICart>>;
|
|
24
24
|
prepareCheckout(params: ICheckoutPrepareParams): Promise<ApiResult<ICheckoutPrepare>>;
|
|
@@ -25,7 +25,7 @@ export interface IGlobalStore {
|
|
|
25
25
|
products: Record<string, IProductStore>;
|
|
26
26
|
cart: ICartStore;
|
|
27
27
|
checkout: ICheckoutStore;
|
|
28
|
-
productsList: IProductListStore
|
|
28
|
+
productsList: Record<string, IProductListStore>;
|
|
29
29
|
ui: IUIStore;
|
|
30
30
|
metadata: IElementsMetadataStore;
|
|
31
31
|
}
|
|
@@ -36,7 +36,7 @@ export interface IPersistedStore {
|
|
|
36
36
|
export interface IPersistedStoreAction {
|
|
37
37
|
success: boolean;
|
|
38
38
|
}
|
|
39
|
-
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof ICartRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof ICartFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCode}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customerForm.${keyof ICheckoutCustomerFormStore}` | `checkout.giftRecipientForm.${keyof ICheckoutGiftRecipientFormStore}` | `checkout.paymentForm.${keyof ICheckoutPaymentFormStore}` | `checkout.paymentForm.paymentSession.${keyof ICheckoutPaymentSessionStore}` | `checkout.paymentForm.paymentMethod.${keyof ICheckoutPaymentMethodStore}` | `checkout.presale.${keyof ICheckoutPresale}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferences}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipient}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCode}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.retailers.${string}` | `checkout.retailers.${string}.${keyof ICheckoutRetailer}` | `checkout.fulfillments.${string}` | `productsList.${keyof IProductListStore}` | `productsList.products.${string}` | `productsList.products.${string}.${keyof IPLProductStore}` | `metadata.${keyof IElementsMetadataStore}` | `metadata.checkout.${keyof ICheckoutMetadata}` | `metadata.checkout.injection.${keyof ICheckoutInjection}`;
|
|
39
|
+
export type StorePaths = keyof IGlobalStore | `products.${string}` | `products.${string}.${keyof IProductStore}` | `products.${string}.sizes.${string}` | `products.${string}.sizes.${string}.${keyof IProductSizeStore}` | `address.${keyof IAddressStore}` | `cart.${keyof ICartStore}` | `cart.items.${string}` | `cart.items.${string}.${keyof ICartItemStore}` | `cart.retailers.${string}` | `cart.items.${string}.${keyof ICartRetailerStore}` | `cart.fulfillments.${string}` | `cart.fulfillments.${string}.${keyof ICartFulfillmentStore}` | `cart.promoCode.${keyof ICartPromoCode}` | `ui.${keyof IUIStore}` | `ui.drawer.${keyof IDrawerStore}` | `checkout.${keyof ICheckoutStore}` | `checkout.customerForm.${keyof ICheckoutCustomerFormStore}` | `checkout.giftRecipientForm.${keyof ICheckoutGiftRecipientFormStore}` | `checkout.paymentForm.${keyof ICheckoutPaymentFormStore}` | `checkout.paymentForm.paymentSession.${keyof ICheckoutPaymentSessionStore}` | `checkout.paymentForm.paymentMethod.${keyof ICheckoutPaymentMethodStore}` | `checkout.presale.${keyof ICheckoutPresale}` | `checkout.marketingPreferences.${keyof ICheckoutMarketingPreferences}` | `checkout.giftRecipient.${keyof ICheckoutGiftRecipient}` | `checkout.giftCards.${string}` | `checkout.promoCode.${keyof ICheckoutPromoCode}` | `checkout.items.${string}` | `checkout.items.${string}.${keyof ICheckoutItemStore}` | `checkout.retailers.${string}` | `checkout.retailers.${string}.${keyof ICheckoutRetailer}` | `checkout.fulfillments.${string}` | `productsList.${string}` | `productsList.${string}.${keyof IProductListStore}` | `productsList.${string}.products.${string}` | `productsList.${string}.products.${string}.${keyof IPLProductStore}` | `metadata.${keyof IElementsMetadataStore}` | `metadata.checkout.${keyof ICheckoutMetadata}` | `metadata.checkout.injection.${keyof ICheckoutInjection}`;
|
|
40
40
|
interface MiddlewareContext {
|
|
41
41
|
action: string;
|
|
42
42
|
payload: any;
|
|
@@ -12,5 +12,6 @@ export declare const initialCartState: ICartStore;
|
|
|
12
12
|
export declare const initialCheckoutState: ICheckoutStore;
|
|
13
13
|
export declare const initialUIState: IUIStore;
|
|
14
14
|
export declare const initialMetadataState: IElementsMetadataStore;
|
|
15
|
-
export declare const initialProductsListState: IProductListStore
|
|
15
|
+
export declare const initialProductsListState: Record<string, IProductListStore>;
|
|
16
|
+
export declare function createInitialProductListState(): IProductListStore;
|
|
16
17
|
export declare const initialStoreState: IGlobalStore;
|
|
@@ -2,6 +2,7 @@ import type { FILTER_KEYS } from 'modules/product-list/product-list.constants';
|
|
|
2
2
|
import type { ILocation } from '@/interfaces/api/address.interface';
|
|
3
3
|
import type { IProductAvailabilityResponse } from '@/interfaces/api/product.interface';
|
|
4
4
|
export interface IProductSearchParams {
|
|
5
|
+
slug: string;
|
|
5
6
|
location?: ILocation;
|
|
6
7
|
search?: string;
|
|
7
8
|
pageToken?: string;
|
|
@@ -17,7 +18,7 @@ export interface IFilterParams {
|
|
|
17
18
|
key: string;
|
|
18
19
|
values: IFilterParamsValue;
|
|
19
20
|
}
|
|
20
|
-
export type FacetFilterKeys = typeof FILTER_KEYS.BRANDS | typeof FILTER_KEYS.CATEGORIES | typeof FILTER_KEYS.FLAVOR | typeof FILTER_KEYS.REGION | typeof FILTER_KEYS.VARIETY | typeof FILTER_KEYS.VINTAGE | typeof FILTER_KEYS.COUNTRY | typeof FILTER_KEYS.APPELLATION | typeof FILTER_KEYS.TAGS | typeof FILTER_KEYS.MATERIALS | typeof FILTER_KEYS.SIZES | typeof FILTER_KEYS.ENGRAVING | typeof FILTER_KEYS.
|
|
21
|
+
export type FacetFilterKeys = typeof FILTER_KEYS.BRANDS | typeof FILTER_KEYS.CATEGORIES | typeof FILTER_KEYS.FLAVOR | typeof FILTER_KEYS.REGION | typeof FILTER_KEYS.VARIETY | typeof FILTER_KEYS.VINTAGE | typeof FILTER_KEYS.COUNTRY | typeof FILTER_KEYS.APPELLATION | typeof FILTER_KEYS.TAGS | typeof FILTER_KEYS.MATERIALS | typeof FILTER_KEYS.SIZES | typeof FILTER_KEYS.ENGRAVING | typeof FILTER_KEYS.FULFILLMENT | typeof FILTER_KEYS.PRICE | typeof FILTER_KEYS.AVAILABILITY | typeof FILTER_KEYS.COLORS;
|
|
21
22
|
export interface IFilterSchema {
|
|
22
23
|
type: FacetFilterKeys;
|
|
23
24
|
values: IFilterValue[];
|
|
@@ -53,10 +53,10 @@ export interface IAllConfigs {
|
|
|
53
53
|
configurations: IElementsConfigurations;
|
|
54
54
|
global: IComponentGlobalConfigs;
|
|
55
55
|
product: IProductComponent;
|
|
56
|
+
productList: IProductListComponent;
|
|
56
57
|
address: IAddressComponent;
|
|
57
58
|
cart: ICartComponent;
|
|
58
59
|
checkout: ICheckoutComponent;
|
|
59
|
-
productList: IProductListComponent;
|
|
60
60
|
}
|
|
61
61
|
export type ConfigsKeyType = 'all' | 'configurations' | 'global' | 'product' | 'address' | 'cart' | 'checkout' | 'productList';
|
|
62
62
|
export type ConfigsType = IAllConfigs | IElementsConfigurations | IComponentGlobalConfigs | IProductComponent | IAddressComponent | ICartComponent | ICheckoutComponent | IProductListComponent;
|
|
@@ -1,25 +1,39 @@
|
|
|
1
|
-
import type { DisplayModeType } from 'enums';
|
|
2
1
|
import type { DeepPartial } from '@/interfaces/config.interface';
|
|
3
|
-
|
|
4
|
-
export type
|
|
5
|
-
export
|
|
6
|
-
|
|
2
|
+
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
3
|
+
export type PLCPresentationModeType = 'drawer' | 'modal';
|
|
4
|
+
export type PLCListType = 'curated' | 'dynamic';
|
|
5
|
+
export type PLCCardStyle = 'card' | 'ghost';
|
|
6
|
+
export interface IPLCProductCard {
|
|
7
|
+
style: PLCCardStyle;
|
|
8
|
+
cornerRadius: string;
|
|
9
|
+
showPrice: boolean;
|
|
10
|
+
showSizes: boolean;
|
|
11
|
+
showRetailerName: boolean;
|
|
12
|
+
showFulfillmentOptions: boolean;
|
|
13
|
+
enableShippingFulfillment: boolean;
|
|
14
|
+
enableOnDemandFulfillment: boolean;
|
|
15
|
+
enablePersonalization: boolean;
|
|
16
|
+
showQuantityCounter: boolean;
|
|
17
|
+
enablePreCart: boolean;
|
|
18
|
+
showCollectionTags: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface IPLCList {
|
|
21
|
+
type: PLCListType;
|
|
22
|
+
name: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
filters: Record<string, string[]>;
|
|
25
|
+
productCard: IPLCProductCard;
|
|
26
|
+
presentationMode: PLCPresentationModeType;
|
|
27
|
+
availableFilters: ProductListFilterType[];
|
|
28
|
+
rows: number;
|
|
29
|
+
columns: number;
|
|
30
|
+
productUrl: string | null;
|
|
7
31
|
}
|
|
8
32
|
export interface IProductListLayout {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
showSizeSelector: boolean;
|
|
14
|
-
showFulfillment: boolean;
|
|
15
|
-
showRetailerName: boolean;
|
|
16
|
-
showQuantityCounter: boolean;
|
|
17
|
-
enableShippingFulfillment: boolean;
|
|
18
|
-
enableOnDemandFulfillment: boolean;
|
|
19
|
-
showCollections: boolean;
|
|
20
|
-
enablePersonalization: boolean;
|
|
21
|
-
};
|
|
22
|
-
displayMode: DisplayModeType;
|
|
33
|
+
lists: IPLCList[];
|
|
34
|
+
}
|
|
35
|
+
export interface IProductListTheme {
|
|
36
|
+
backgroundColor: string;
|
|
23
37
|
}
|
|
24
38
|
export interface IProductListComponent {
|
|
25
39
|
theme: IProductListTheme;
|
|
@@ -8,6 +8,7 @@ export interface IInjectProductElement {
|
|
|
8
8
|
export type ProductListFilterType = (typeof PRODUCT_LIST_FILTER_TYPES)[keyof typeof PRODUCT_LIST_FILTER_TYPES];
|
|
9
9
|
export interface IInjectProductListParams {
|
|
10
10
|
containerId: string;
|
|
11
|
+
slug: string;
|
|
11
12
|
rows?: number;
|
|
12
13
|
columns?: number;
|
|
13
14
|
filters?: ProductListFilterType[];
|
|
@@ -15,10 +16,12 @@ export interface IInjectProductListParams {
|
|
|
15
16
|
}
|
|
16
17
|
export interface IInjectProductListSearchParams {
|
|
17
18
|
containerId: string;
|
|
19
|
+
slug: string;
|
|
18
20
|
}
|
|
19
21
|
export interface IInjectProductListFiltersParams {
|
|
20
22
|
containerId: string;
|
|
21
|
-
|
|
23
|
+
slug: string;
|
|
24
|
+
filters?: ProductListFilterType[];
|
|
22
25
|
}
|
|
23
26
|
export interface IBuilderInjectElementParams {
|
|
24
27
|
type: ComponentType;
|
|
@@ -4,9 +4,11 @@ import type { IProductComponent } from '@/interfaces/configs';
|
|
|
4
4
|
export interface IProductRetailersPopupListComponentParams {
|
|
5
5
|
productId: string;
|
|
6
6
|
navigationSource: NavigationSourceType;
|
|
7
|
+
slug?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare class ProductRetailersPopupListComponent extends BaseComponent<IProductRetailersPopupListComponentParams, IProductComponent> {
|
|
9
10
|
get hostClasses(): string[];
|
|
11
|
+
private get isProductListContext();
|
|
10
12
|
beforeSetupStoreWatchers(): void;
|
|
11
13
|
private onFulfillmentTabClick;
|
|
12
14
|
private onRetailerCardClick;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import type { ProductListCardCornerRadius } from 'interfaces/configs';
|
|
2
1
|
export interface IAddToCartButtonParams {
|
|
3
2
|
isPresale: boolean;
|
|
4
3
|
hasAvailability: boolean;
|
|
5
4
|
state: string;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
borderRadius: ProductListCardCornerRadius;
|
|
8
6
|
hasAddress: boolean;
|
|
9
7
|
onClick?: (e: MouseEvent) => void | Promise<void>;
|
|
10
8
|
}
|
|
11
|
-
export declare const createAddToCartButton: ({ isPresale, hasAvailability, state, disabled,
|
|
9
|
+
export declare const createAddToCartButton: ({ isPresale, hasAvailability, state, disabled, hasAddress, onClick, }: IAddToCartButtonParams) => HTMLElement;
|
package/dist/types/modules/product-list/components/card-components/product-quantity-selector.d.ts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { PLCCardStyle } from 'interfaces/configs/product-list.interface';
|
|
2
2
|
export interface IQuantitySelectorParams {
|
|
3
3
|
initialQuantity: number;
|
|
4
4
|
minQuantity: number;
|
|
5
5
|
maxQuantity: number;
|
|
6
|
-
|
|
7
|
-
cardStyle: ProductListCardStyle;
|
|
6
|
+
cardStyle: PLCCardStyle;
|
|
8
7
|
onChange: (quantity: number) => void;
|
|
9
8
|
}
|
|
10
|
-
export declare const createQuantitySelector: ({ initialQuantity, minQuantity, maxQuantity,
|
|
9
|
+
export declare const createQuantitySelector: ({ initialQuantity, minQuantity, maxQuantity, cardStyle, onChange }: IQuantitySelectorParams) => HTMLElement;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import type { IProductSizeStore } from 'core/store/interfaces/product.interface';
|
|
2
|
-
import type { ProductListCardCornerRadius } from 'interfaces/configs';
|
|
3
2
|
import { BaseComponent } from '@/core/base-component.service';
|
|
4
3
|
export interface IProductListSizeSelectorParams {
|
|
5
4
|
sizes: Record<string, IProductSizeStore>;
|
|
6
5
|
selectedSizeId: string | null;
|
|
7
|
-
cornerRadius: ProductListCardCornerRadius;
|
|
8
6
|
onSelect?: (size: IProductSizeStore) => void;
|
|
9
7
|
}
|
|
10
8
|
export declare class ProductListSizeSelectorComponent extends BaseComponent<IProductListSizeSelectorParams> {
|
|
@@ -4,10 +4,4 @@ export interface ICreateEngravingFilterParams {
|
|
|
4
4
|
isPersonalizationDisabled: boolean;
|
|
5
5
|
onEngravingChange?: (enabled: boolean) => void;
|
|
6
6
|
}
|
|
7
|
-
export interface ICreatePresaleFilterParams {
|
|
8
|
-
currentFilters?: IProductListFilters;
|
|
9
|
-
isPresaleDisabled: boolean;
|
|
10
|
-
onPresaleChange?: (enabled: boolean) => void;
|
|
11
|
-
}
|
|
12
7
|
export declare function createEngravingFilter(params: ICreateEngravingFilterParams): HTMLElement[];
|
|
13
|
-
export declare function createPresaleFilter(params: ICreatePresaleFilterParams): HTMLElement[];
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { BaseComponent } from 'core/base-component.service';
|
|
2
2
|
import type { IProductListComponent } from 'interfaces/configs';
|
|
3
3
|
import type { IEngravingFormComponentParams } from 'modules/ui-components/engraving';
|
|
4
|
-
|
|
4
|
+
interface IProductListEngravingParams extends IEngravingFormComponentParams {
|
|
5
|
+
slug: string;
|
|
6
|
+
}
|
|
7
|
+
export declare class ProductListEngravingComponent extends BaseComponent<IProductListEngravingParams, IProductListComponent> {
|
|
8
|
+
private getListConfig;
|
|
5
9
|
protected template(): HTMLElement[];
|
|
6
10
|
private createHeader;
|
|
7
11
|
}
|
|
12
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from 'core/base-component.service';
|
|
2
2
|
import type { ProductListFilterType } from 'interfaces/injection.interface';
|
|
3
3
|
export interface IProductListFiltersParams {
|
|
4
|
+
slug: string;
|
|
4
5
|
filters: ProductListFilterType[];
|
|
5
6
|
}
|
|
6
7
|
export declare class ProductListFiltersComponent extends BaseComponent<IProductListFiltersParams> {
|
|
@@ -15,7 +16,6 @@ export declare class ProductListFiltersComponent extends BaseComponent<IProductL
|
|
|
15
16
|
private isFulfillmentFilterCollapsed;
|
|
16
17
|
private appliedFiltersChipsContainer;
|
|
17
18
|
private engravingFiltersContainer?;
|
|
18
|
-
private presaleFilterContainer?;
|
|
19
19
|
private fulfillmentFilterContainer?;
|
|
20
20
|
private priceFiltersContainer?;
|
|
21
21
|
private dynamicFiltersContainer?;
|
|
@@ -49,7 +49,6 @@ export declare class ProductListFiltersComponent extends BaseComponent<IProductL
|
|
|
49
49
|
private handleFilterChange;
|
|
50
50
|
private isEngravingCurrentlyDisabled;
|
|
51
51
|
private buildEngravingFilterElements;
|
|
52
|
-
private buildPresaleFilterElements;
|
|
53
52
|
private isSameDayDeliveryCurrentlyDisabled;
|
|
54
53
|
private toggleFulfillmentFilterCollapse;
|
|
55
54
|
private buildFulfillmentFilterElements;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseComponent } from 'core/base-component.service';
|
|
2
2
|
import type { IProductListComponent } from 'interfaces/configs';
|
|
3
3
|
export interface IProductListProductEngravingLinesComponentParams {
|
|
4
|
+
slug: string;
|
|
4
5
|
identifier: string;
|
|
5
6
|
lines: string[];
|
|
6
7
|
maxLines: number;
|
package/dist/types/modules/product-list/components/product-list-product-pre-cart.component.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseComponent, type IOnStoreChanged } from 'core/base-component.service';
|
|
2
2
|
import type { IProductListComponent } from 'interfaces/configs';
|
|
3
3
|
export interface IProductListProductPreCartComponentParams {
|
|
4
|
+
slug: string;
|
|
4
5
|
productId: string;
|
|
5
6
|
}
|
|
6
7
|
export declare class ProductListProductPreCartComponent extends BaseComponent<IProductListProductPreCartComponentParams, IProductListComponent> {
|
|
@@ -15,6 +16,7 @@ export declare class ProductListProductPreCartComponent extends BaseComponent<IP
|
|
|
15
16
|
private previousSelectedSizeId;
|
|
16
17
|
private previousSelectedFulfillmentId;
|
|
17
18
|
constructor();
|
|
19
|
+
private getListConfig;
|
|
18
20
|
protected afterRender?(): void;
|
|
19
21
|
private handleRetailersBack;
|
|
20
22
|
private handleEngravingBack;
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { BaseComponent } from '@/core/base-component.service';
|
|
2
|
-
export
|
|
2
|
+
export interface IProductListSearchParams {
|
|
3
|
+
slug: string;
|
|
4
|
+
}
|
|
5
|
+
export declare class ProductListSearchComponent extends BaseComponent<IProductListSearchParams> {
|
|
3
6
|
private searchInput?;
|
|
4
7
|
private clearButton?;
|
|
5
8
|
private debounceTimer;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IProductListComponent } from 'interfaces/configs';
|
|
2
2
|
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
3
3
|
export interface IProductListCardParams {
|
|
4
|
+
slug: string;
|
|
4
5
|
productId: string;
|
|
5
6
|
productUrl?: string;
|
|
6
7
|
}
|
|
@@ -13,6 +14,7 @@ export declare class ProductListCardComponent extends BaseComponent<IProductList
|
|
|
13
14
|
private previousSelectedSizeId;
|
|
14
15
|
private previousSelectedFulfillmentId;
|
|
15
16
|
constructor();
|
|
17
|
+
private getListConfig;
|
|
16
18
|
get hostClasses(): string[];
|
|
17
19
|
protected disconnected?(): void;
|
|
18
20
|
onStoreWatch(changes: IOnStoreChanged[]): void;
|
|
@@ -4,5 +4,5 @@ import type { IExtendedFilterSchema, IProductListFilters } from './product-list.
|
|
|
4
4
|
export declare const FILTER_TYPE_MAP: Record<string, string>;
|
|
5
5
|
export declare function getSanitizedFilters(filters: IFilterSchema[], configuredFilters: ProductListFilterType[]): IExtendedFilterSchema[];
|
|
6
6
|
export declare function syncFiltersToAppliedFormat(filters: IProductListFilters): Record<string, string[]>;
|
|
7
|
-
export declare function buildSearchParams(page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): IProductSearchParams;
|
|
7
|
+
export declare function buildSearchParams(slug: string, page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): IProductSearchParams;
|
|
8
8
|
export declare function buildCurrentFiltersFromState(stateFilters: Record<string, string[]>): IProductListFilters;
|
|
@@ -9,21 +9,22 @@ export declare class ProductListCommands extends BaseCommand {
|
|
|
9
9
|
private readonly cartCommands;
|
|
10
10
|
constructor();
|
|
11
11
|
static getInstance(): ProductListCommands;
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
initializeListStore(slug: string): void;
|
|
13
|
+
updateSearchTerm(slug: string, searchTerm: string): void;
|
|
14
|
+
setLoading(slug: string, isLoading: boolean): void;
|
|
15
|
+
loadInitialProducts(slug: string, page: number, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): Promise<void>;
|
|
16
|
+
loadMoreProducts(slug: string, perPage: number, searchTerm: string, currentFilters: IProductListFilters, configuredFilters: ProductListFilterType[]): Promise<void>;
|
|
16
17
|
getProductList(params: IProductSearchParams): Promise<IProductSearchResponse>;
|
|
17
|
-
syncFiltersFromComponent(filters: IProductListFilters): void;
|
|
18
|
+
syncFiltersFromComponent(slug: string, filters: IProductListFilters): void;
|
|
18
19
|
getSanitizedFilters(filters: IFilterSchema[], configuredFilters: ProductListFilterType[]): IExtendedFilterSchema[];
|
|
19
|
-
setGridConfig(rows: number, columns: number): void;
|
|
20
|
-
getItemsPerPage(): number;
|
|
20
|
+
setGridConfig(slug: string, rows: number, columns: number): void;
|
|
21
|
+
getItemsPerPage(slug: string): number;
|
|
21
22
|
updatePagination(navigation: INavigationResponse | undefined): IPagination;
|
|
22
23
|
createInitialPagination(): IPagination;
|
|
23
|
-
addToCart(productId: string, params: AddItemParams): Promise<void>;
|
|
24
|
-
selectSize(productId: string, sizeId: string): Promise<void>;
|
|
25
|
-
changeFulfillmentType: (productId: string, newFulfillmentType: FulfillmentType) => Promise<void>;
|
|
26
|
-
selectFulfillment: (productId: string, selectedFulfillmentId: string) => Promise<void>;
|
|
27
|
-
updateQuantity: (productId: string, quantity: number) => void;
|
|
28
|
-
saveEngravingLines(productId: string, engravingLines: string[]): void;
|
|
24
|
+
addToCart(slug: string, productId: string, params: AddItemParams): Promise<void>;
|
|
25
|
+
selectSize(slug: string, productId: string, sizeId: string): Promise<void>;
|
|
26
|
+
changeFulfillmentType: (slug: string, productId: string, newFulfillmentType: FulfillmentType) => Promise<void>;
|
|
27
|
+
selectFulfillment: (slug: string, productId: string, selectedFulfillmentId: string) => Promise<void>;
|
|
28
|
+
updateQuantity: (slug: string, productId: string, quantity: number) => void;
|
|
29
|
+
saveEngravingLines(slug: string, productId: string, engravingLines: string[]): void;
|
|
29
30
|
}
|
|
@@ -2,6 +2,7 @@ import type { IProductListComponent } from 'interfaces/configs';
|
|
|
2
2
|
import { BaseComponent, type IOnStoreChanged } from '@/core/base-component.service';
|
|
3
3
|
import type { ProductListFilterType } from '@/interfaces/injection.interface';
|
|
4
4
|
export interface IProductListComponentParams {
|
|
5
|
+
slug: string;
|
|
5
6
|
rows: number;
|
|
6
7
|
columns: number;
|
|
7
8
|
filters: ProductListFilterType[];
|
|
@@ -7,7 +7,6 @@ export declare const FILTER_KEYS: {
|
|
|
7
7
|
readonly VARIETY: "variety";
|
|
8
8
|
readonly ENGRAVING: "engraving";
|
|
9
9
|
readonly PRICE: "price";
|
|
10
|
-
readonly PRESALE: "presale";
|
|
11
10
|
readonly AVAILABILITY: "availability";
|
|
12
11
|
readonly CATEGORIES: "categories";
|
|
13
12
|
readonly SIZES: "sizes";
|
|
@@ -3,6 +3,7 @@ import type { IProductComponent } from '@/interfaces/configs';
|
|
|
3
3
|
export interface IEngravingViewComponentParams {
|
|
4
4
|
identifier: string;
|
|
5
5
|
context: 'cart' | 'checkout' | 'product-list';
|
|
6
|
+
slug?: string;
|
|
6
7
|
productListMaxLines?: number;
|
|
7
8
|
productListMaxCharsPerLine?: number;
|
|
8
9
|
productListLocation?: string;
|
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.7.
|
|
6
|
+
"version": "2.7.4",
|
|
7
7
|
"homepage": "https://docs.liquidcommerce.co/elements-sdk",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"@semantic-release/npm": "^13.1.4",
|
|
98
98
|
"@semantic-release/release-notes-generator": "^14.1.0",
|
|
99
99
|
"@types/core-js": "^2.5.8",
|
|
100
|
-
"@types/node": "^25.2.
|
|
100
|
+
"@types/node": "^25.2.3",
|
|
101
101
|
"conventional-changelog-cli": "^5.0.0",
|
|
102
102
|
"husky": "^9.1.7",
|
|
103
103
|
"process": "^0.11.10",
|