@wix/stores 1.0.972 → 1.0.974
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/_sdk-exports/context-category-by-id/runtime.d.ts +33 -4
- package/_sdk-exports/context-category-by-id/runtime.js +2 -2
- package/_sdk-exports/context-category-by-slug/runtime.d.ts +33 -4
- package/_sdk-exports/context-category-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-category-info/runtime.d.ts +6 -1
- package/_sdk-exports/context-category-list/runtime.d.ts +5 -1
- package/_sdk-exports/context-product/runtime.d.ts +13 -13
- package/_sdk-exports/context-product-by-id/runtime.d.ts +19 -11
- package/_sdk-exports/context-product-by-id/runtime.js +2 -2
- package/_sdk-exports/context-product-by-slug/runtime.d.ts +17 -11
- package/_sdk-exports/context-product-by-slug/runtime.js +2 -2
- package/_sdk-exports/context-product-item/runtime.d.ts +35 -2
- package/_sdk-exports/context-product-item/runtime.js +2 -2
- package/_sdk-exports/context-product-list/runtime.d.ts +29 -1
- package/_sdk-exports/context-promotion-item/runtime.d.ts +5 -1
- package/build/cjs/context-category-by-id.d.ts +33 -4
- package/build/cjs/context-category-by-id.js +1187 -822
- package/build/cjs/context-category-by-id.js.map +1 -1
- package/build/cjs/context-category-by-slug.d.ts +33 -4
- package/build/cjs/context-category-by-slug.js +1382 -1017
- package/build/cjs/context-category-by-slug.js.map +1 -1
- package/build/cjs/context-category-info.d.ts +6 -1
- package/build/cjs/context-category-list.d.ts +5 -1
- package/build/cjs/context-product-by-id.d.ts +19 -11
- package/build/cjs/context-product-by-id.js +39 -36
- package/build/cjs/context-product-by-id.js.map +1 -1
- package/build/cjs/context-product-by-slug.d.ts +17 -11
- package/build/cjs/context-product-by-slug.js +37 -34
- package/build/cjs/context-product-by-slug.js.map +1 -1
- package/build/cjs/context-product-item.d.ts +35 -2
- package/build/cjs/context-product-item.js +287 -287
- package/build/cjs/context-product-item.js.map +1 -1
- package/build/cjs/context-product-list.d.ts +29 -1
- package/build/cjs/context-product.d.ts +13 -13
- package/build/cjs/context-promotion-item.d.ts +5 -1
- package/build/es/context-category-by-id.d.mts +33 -4
- package/build/es/context-category-by-id.mjs +1194 -829
- package/build/es/context-category-by-id.mjs.map +1 -1
- package/build/es/context-category-by-slug.d.mts +33 -4
- package/build/es/context-category-by-slug.mjs +1382 -1017
- package/build/es/context-category-by-slug.mjs.map +1 -1
- package/build/es/context-category-info.d.mts +6 -1
- package/build/es/context-category-list.d.mts +5 -1
- package/build/es/context-product-by-id.d.mts +19 -11
- package/build/es/context-product-by-id.mjs +39 -36
- package/build/es/context-product-by-id.mjs.map +1 -1
- package/build/es/context-product-by-slug.d.mts +17 -11
- package/build/es/context-product-by-slug.mjs +37 -34
- package/build/es/context-product-by-slug.mjs.map +1 -1
- package/build/es/context-product-item.d.mts +35 -2
- package/build/es/context-product-item.mjs +287 -287
- package/build/es/context-product-item.mjs.map +1 -1
- package/build/es/context-product-list.d.mts +29 -1
- package/build/es/context-product.d.mts +13 -13
- package/build/es/context-promotion-item.d.mts +5 -1
- package/build/internal/cjs/context-category-by-id.d.ts +33 -4
- package/build/internal/cjs/context-category-by-slug.d.ts +33 -4
- package/build/internal/cjs/context-category-info.d.ts +6 -1
- package/build/internal/cjs/context-category-list.d.ts +5 -1
- package/build/internal/cjs/context-product-by-id.d.ts +19 -11
- package/build/internal/cjs/context-product-by-slug.d.ts +17 -11
- package/build/internal/cjs/context-product-item.d.ts +35 -2
- package/build/internal/cjs/context-product-list.d.ts +29 -1
- package/build/internal/cjs/context-product.d.ts +13 -13
- package/build/internal/cjs/context-promotion-item.d.ts +5 -1
- package/build/internal/es/context-category-by-id.d.mts +33 -4
- package/build/internal/es/context-category-by-slug.d.mts +33 -4
- package/build/internal/es/context-category-info.d.mts +6 -1
- package/build/internal/es/context-category-list.d.mts +5 -1
- package/build/internal/es/context-product-by-id.d.mts +19 -11
- package/build/internal/es/context-product-by-slug.d.mts +17 -11
- package/build/internal/es/context-product-item.d.mts +35 -2
- package/build/internal/es/context-product-list.d.mts +29 -1
- package/build/internal/es/context-product.d.mts +13 -13
- package/build/internal/es/context-promotion-item.d.mts +5 -1
- package/package.json +3 -3
|
@@ -3778,12 +3778,35 @@ interface Product {
|
|
|
3778
3778
|
productGroupId?: string;
|
|
3779
3779
|
}
|
|
3780
3780
|
//#endregion
|
|
3781
|
+
//#region src/api/product-groups/product-groups.d.ts
|
|
3782
|
+
declare enum ProductGroupCustomizationType {
|
|
3783
|
+
PRODUCT_OPTION = "PRODUCT_OPTION",
|
|
3784
|
+
MODIFIER = "MODIFIER"
|
|
3785
|
+
}
|
|
3786
|
+
interface ProductGroup {
|
|
3787
|
+
groupingCustomizationId: string;
|
|
3788
|
+
customizationType: ProductGroupCustomizationType;
|
|
3789
|
+
members: ProductGroupMember[];
|
|
3790
|
+
}
|
|
3791
|
+
interface ProductGroupMember {
|
|
3792
|
+
productId: string;
|
|
3793
|
+
choice: ProductChoice;
|
|
3794
|
+
slug: string;
|
|
3795
|
+
inventoryAvailabilityStatus?: AvailabilityStatus;
|
|
3796
|
+
}
|
|
3797
|
+
interface ProductGroupData {
|
|
3798
|
+
productGroup: ProductGroup;
|
|
3799
|
+
selectProductGroupMember: (productId: string) => void;
|
|
3800
|
+
}
|
|
3801
|
+
//#endregion
|
|
3781
3802
|
//#region src/extensions/product/providers/product-item-context/product-item-context-provider.d.ts
|
|
3782
3803
|
interface ProductItem {
|
|
3783
3804
|
/** The current entry of the `productItems` array. */
|
|
3784
3805
|
product: Product;
|
|
3785
3806
|
/** The default location ID for the product. */
|
|
3786
3807
|
defaultLocationId: string | undefined;
|
|
3808
|
+
/** Group data + sibling-swap handler for this product; absent when the product is not grouped. */
|
|
3809
|
+
productGroupData?: ProductGroupData;
|
|
3787
3810
|
}
|
|
3788
3811
|
//#endregion
|
|
3789
3812
|
//#region src/extensions/gallery/providers/api/promotions/promotions.d.ts
|
|
@@ -3954,7 +3977,12 @@ interface ProductListContextValue {
|
|
|
3954
3977
|
}
|
|
3955
3978
|
//#endregion
|
|
3956
3979
|
//#region src/extensions/gallery/providers/product-list-context/product-list-context-provider.d.ts
|
|
3957
|
-
/**
|
|
3980
|
+
/**
|
|
3981
|
+
* The `useProductListContext()` hook provides access to a store category's products, the filters
|
|
3982
|
+
* and sort options for them, and the visitor's filter and sort selection. Use it to show how many
|
|
3983
|
+
* products match the visitor's filters, let visitors filter and sort the list, and load more
|
|
3984
|
+
* products.
|
|
3985
|
+
*/
|
|
3958
3986
|
declare function useProductListContext(): ProductListContextValue;
|
|
3959
3987
|
/** Props accepted by {@link ProductListContextProvider}. */
|
|
3960
3988
|
interface ProductListContextProviderProps extends React.PropsWithChildren {
|
|
@@ -66,7 +66,11 @@ interface PromotionItem {
|
|
|
66
66
|
/** The current entry of the `promotionItems` array. */
|
|
67
67
|
promotion: PromotionItemContextValue;
|
|
68
68
|
}
|
|
69
|
-
/**
|
|
69
|
+
/**
|
|
70
|
+
* The `usePromotionItemContext()` hook provides access to a promotion shown among the products in a
|
|
71
|
+
* **Product List**, including its image, alt text, link, and position. Use it to build a promotion
|
|
72
|
+
* card, such as a banner that links to a sale. It returns `null` outside a **Promotion Item**.
|
|
73
|
+
*/
|
|
70
74
|
declare function usePromotionItemContext(): PromotionItemContextValue | null;
|
|
71
75
|
declare function usePromotionItemContextValue({
|
|
72
76
|
promotion
|
|
@@ -3913,9 +3913,31 @@ interface GetProductsListResponse {
|
|
|
3913
3913
|
hasNext: boolean;
|
|
3914
3914
|
}
|
|
3915
3915
|
//#endregion
|
|
3916
|
+
//#region src/api/product-groups/product-groups.d.ts
|
|
3917
|
+
declare enum ProductGroupCustomizationType {
|
|
3918
|
+
PRODUCT_OPTION = "PRODUCT_OPTION",
|
|
3919
|
+
MODIFIER = "MODIFIER"
|
|
3920
|
+
}
|
|
3921
|
+
interface ProductGroup {
|
|
3922
|
+
groupingCustomizationId: string;
|
|
3923
|
+
customizationType: ProductGroupCustomizationType;
|
|
3924
|
+
members: ProductGroupMember[];
|
|
3925
|
+
}
|
|
3926
|
+
interface ProductGroupMember {
|
|
3927
|
+
productId: string;
|
|
3928
|
+
choice: ProductChoice;
|
|
3929
|
+
slug: string;
|
|
3930
|
+
inventoryAvailabilityStatus?: AvailabilityStatus;
|
|
3931
|
+
}
|
|
3932
|
+
interface ProductGroupData {
|
|
3933
|
+
productGroup: ProductGroup;
|
|
3934
|
+
selectProductGroupMember: (productId: string) => void;
|
|
3935
|
+
}
|
|
3936
|
+
//#endregion
|
|
3916
3937
|
//#region src/extensions/gallery/providers/hooks/use-product-list-context-value/use-product-list/use-product-list.d.ts
|
|
3917
3938
|
interface InitialProductList {
|
|
3918
3939
|
page: GetProductsListResponse;
|
|
3940
|
+
productGroupByGroupId: Record<string, ProductGroup>;
|
|
3919
3941
|
filterSelectionKey: string;
|
|
3920
3942
|
sortType: SortTypes;
|
|
3921
3943
|
productsPerPage: number;
|
|
@@ -3969,6 +3991,16 @@ declare function useCategoryContextValue(data: CategoryPageData): {
|
|
|
3969
3991
|
breadcrumbs: CategoryBreadcrumb[];
|
|
3970
3992
|
};
|
|
3971
3993
|
//#endregion
|
|
3994
|
+
//#region src/extensions/product/providers/product-item-context/product-item-context-provider.d.ts
|
|
3995
|
+
interface ProductItem {
|
|
3996
|
+
/** The current entry of the `productItems` array. */
|
|
3997
|
+
product: Product;
|
|
3998
|
+
/** The default location ID for the product. */
|
|
3999
|
+
defaultLocationId: string | undefined;
|
|
4000
|
+
/** Group data + sibling-swap handler for this product; absent when the product is not grouped. */
|
|
4001
|
+
productGroupData?: ProductGroupData;
|
|
4002
|
+
}
|
|
4003
|
+
//#endregion
|
|
3972
4004
|
//#region src/extensions/gallery/providers/hooks/use-product-list-context-value/use-product-list-context-value.d.ts
|
|
3973
4005
|
declare function useProductListContextValue(data: CategoryPageData, productsPerPage: number): {
|
|
3974
4006
|
productCount: number;
|
|
@@ -3987,10 +4019,7 @@ declare function useProductListContextValue(data: CategoryPageData, productsPerP
|
|
|
3987
4019
|
clearAllFilters: () => void;
|
|
3988
4020
|
filters: Filter[];
|
|
3989
4021
|
currency: string | undefined;
|
|
3990
|
-
productItems:
|
|
3991
|
-
product: Product;
|
|
3992
|
-
defaultLocationId: string | undefined;
|
|
3993
|
-
}[];
|
|
4022
|
+
productItems: ProductItem[];
|
|
3994
4023
|
promotionItems: {
|
|
3995
4024
|
promotion: PromotionItemContextValue;
|
|
3996
4025
|
}[];
|