@wix/headless-stores 0.0.38 → 0.0.40
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/cjs/dist/react/Category.d.ts +9 -8
- package/cjs/dist/react/CategoryList.d.ts +12 -11
- package/cjs/dist/react/Product.d.ts +5 -4
- package/cjs/dist/react/ProductListFilters.d.ts +14 -10
- package/cjs/dist/react/ProductListFilters.js +19 -10
- package/cjs/dist/react/ProductListPagination.d.ts +17 -15
- package/cjs/dist/react/ProductListPagination.js +4 -4
- package/cjs/dist/react/ProductListSort.d.ts +11 -9
- package/cjs/dist/react/ProductListSort.js +6 -6
- package/cjs/dist/react/ProductModifiers.d.ts +15 -13
- package/cjs/dist/react/ProductModifiers.js +14 -14
- package/cjs/dist/react/ProductVariantSelector.d.ts +11 -14
- package/cjs/dist/react/ProductVariantSelector.js +8 -10
- package/cjs/dist/react/SelectedVariant.d.ts +10 -9
- package/cjs/dist/react/SelectedVariant.js +10 -12
- package/cjs/dist/services/products-list-filters-service.d.ts +41 -24
- package/cjs/dist/services/products-list-filters-service.js +150 -92
- package/cjs/dist/services/products-list-pagination-service.d.ts +5 -5
- package/cjs/dist/services/products-list-pagination-service.js +2 -2
- package/cjs/dist/services/products-list-service.d.ts +4 -2
- package/cjs/dist/services/products-list-service.js +4 -2
- package/dist/react/Category.d.ts +9 -8
- package/dist/react/CategoryList.d.ts +12 -11
- package/dist/react/Product.d.ts +5 -4
- package/dist/react/ProductListFilters.d.ts +14 -10
- package/dist/react/ProductListFilters.js +19 -10
- package/dist/react/ProductListPagination.d.ts +17 -15
- package/dist/react/ProductListPagination.js +4 -4
- package/dist/react/ProductListSort.d.ts +11 -9
- package/dist/react/ProductListSort.js +6 -6
- package/dist/react/ProductModifiers.d.ts +15 -13
- package/dist/react/ProductModifiers.js +14 -14
- package/dist/react/ProductVariantSelector.d.ts +11 -14
- package/dist/react/ProductVariantSelector.js +8 -10
- package/dist/react/SelectedVariant.d.ts +10 -9
- package/dist/react/SelectedVariant.js +10 -12
- package/dist/services/products-list-filters-service.d.ts +41 -24
- package/dist/services/products-list-filters-service.js +150 -92
- package/dist/services/products-list-pagination-service.d.ts +5 -5
- package/dist/services/products-list-pagination-service.js +2 -2
- package/dist/services/products-list-service.d.ts +4 -2
- package/dist/services/products-list-service.js +4 -2
- package/package.json +3 -3
|
@@ -26,7 +26,7 @@ export declare const ProductsListPaginationServiceDefinition: string & {
|
|
|
26
26
|
/** Function to navigate to the previous page */
|
|
27
27
|
prevPage: () => void;
|
|
28
28
|
/** Function to navigate to the first page */
|
|
29
|
-
|
|
29
|
+
navigateToFirstPage: () => void;
|
|
30
30
|
/** Function to load more items (increase the limit) */
|
|
31
31
|
loadMore: (count: number) => void;
|
|
32
32
|
};
|
|
@@ -52,7 +52,7 @@ export declare const ProductsListPaginationServiceDefinition: string & {
|
|
|
52
52
|
/** Function to navigate to the previous page */
|
|
53
53
|
prevPage: () => void;
|
|
54
54
|
/** Function to navigate to the first page */
|
|
55
|
-
|
|
55
|
+
navigateToFirstPage: () => void;
|
|
56
56
|
/** Function to load more items (increase the limit) */
|
|
57
57
|
loadMore: (count: number) => void;
|
|
58
58
|
};
|
|
@@ -106,7 +106,7 @@ export type ProductsListPaginationServiceConfig = {};
|
|
|
106
106
|
*
|
|
107
107
|
* <div>
|
|
108
108
|
* <button
|
|
109
|
-
* onClick={() => paginationService.
|
|
109
|
+
* onClick={() => paginationService.navigateToFirstPage()}
|
|
110
110
|
* disabled={!hasPrevPage}
|
|
111
111
|
* >
|
|
112
112
|
* First
|
|
@@ -154,7 +154,7 @@ export declare const ProductsListPaginationService: import("@wix/services-defini
|
|
|
154
154
|
/** Function to navigate to the previous page */
|
|
155
155
|
prevPage: () => void;
|
|
156
156
|
/** Function to navigate to the first page */
|
|
157
|
-
|
|
157
|
+
navigateToFirstPage: () => void;
|
|
158
158
|
/** Function to load more items (increase the limit) */
|
|
159
159
|
loadMore: (count: number) => void;
|
|
160
160
|
};
|
|
@@ -180,7 +180,7 @@ export declare const ProductsListPaginationService: import("@wix/services-defini
|
|
|
180
180
|
/** Function to navigate to the previous page */
|
|
181
181
|
prevPage: () => void;
|
|
182
182
|
/** Function to navigate to the first page */
|
|
183
|
-
|
|
183
|
+
navigateToFirstPage: () => void;
|
|
184
184
|
/** Function to load more items (increase the limit) */
|
|
185
185
|
loadMore: (count: number) => void;
|
|
186
186
|
}, ProductsListPaginationServiceConfig>;
|
|
@@ -52,7 +52,7 @@ export const ProductsListPaginationServiceDefinition = defineService("products-l
|
|
|
52
52
|
*
|
|
53
53
|
* <div>
|
|
54
54
|
* <button
|
|
55
|
-
* onClick={() => paginationService.
|
|
55
|
+
* onClick={() => paginationService.navigateToFirstPage()}
|
|
56
56
|
* disabled={!hasPrevPage}
|
|
57
57
|
* >
|
|
58
58
|
* First
|
|
@@ -150,7 +150,7 @@ export const ProductsListPaginationService = implementService.withConfig()(Produ
|
|
|
150
150
|
currentCursorSignal.set(previousCursor);
|
|
151
151
|
}
|
|
152
152
|
},
|
|
153
|
-
|
|
153
|
+
navigateToFirstPage: () => {
|
|
154
154
|
currentCursorSignal.set(null);
|
|
155
155
|
},
|
|
156
156
|
};
|
|
@@ -68,8 +68,10 @@ export type ProductsListServiceConfig = {
|
|
|
68
68
|
* export const getServerSideProps: GetServerSideProps<ProductsPageProps> = async () => {
|
|
69
69
|
* const searchOptions = {
|
|
70
70
|
* cursorPaging: { limit: 12 },
|
|
71
|
-
* filter: {
|
|
72
|
-
*
|
|
71
|
+
* filter: {
|
|
72
|
+
* 'allCategoriesInfo.categories': { $matchItems: [{ _id: { $in: [category._id] } }] }
|
|
73
|
+
* },
|
|
74
|
+
* sort: [{ fieldName: 'name' as const, order: 'ASC' as const }]
|
|
73
75
|
* };
|
|
74
76
|
*
|
|
75
77
|
* const productsConfig = await loadProductsListServiceConfig(searchOptions);
|
|
@@ -53,8 +53,10 @@ import { productsV3, readOnlyVariantsV3 } from "@wix/stores";
|
|
|
53
53
|
* export const getServerSideProps: GetServerSideProps<ProductsPageProps> = async () => {
|
|
54
54
|
* const searchOptions = {
|
|
55
55
|
* cursorPaging: { limit: 12 },
|
|
56
|
-
* filter: {
|
|
57
|
-
*
|
|
56
|
+
* filter: {
|
|
57
|
+
* 'allCategoriesInfo.categories': { $matchItems: [{ _id: { $in: [category._id] } }] }
|
|
58
|
+
* },
|
|
59
|
+
* sort: [{ fieldName: 'name' as const, order: 'ASC' as const }]
|
|
58
60
|
* };
|
|
59
61
|
*
|
|
60
62
|
* const productsConfig = await loadProductsListServiceConfig(searchOptions);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-stores",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.40",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"prebuild": "cd ../media && yarn build && cd ../ecom && yarn build",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@wix/auto_sdk_stores_read-only-variants-v-3": "^1.0.23",
|
|
59
59
|
"@wix/ecom": "^1.0.1238",
|
|
60
60
|
"@wix/essentials": "^0.1.24",
|
|
61
|
-
"@wix/headless-ecom": "^0.0.
|
|
62
|
-
"@wix/headless-media": "^0.0.
|
|
61
|
+
"@wix/headless-ecom": "^0.0.11",
|
|
62
|
+
"@wix/headless-media": "^0.0.8",
|
|
63
63
|
"@wix/redirects": "^1.0.83",
|
|
64
64
|
"@wix/services-definitions": "^0.1.4",
|
|
65
65
|
"@wix/services-manager-react": "^0.1.26"
|