@wix/headless-stores 0.0.38 → 0.0.39
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 +9 -5
- package/cjs/dist/react/ProductListFilters.js +14 -5
- package/cjs/dist/react/ProductListPagination.d.ts +14 -12
- package/cjs/dist/react/ProductListSort.d.ts +6 -4
- package/cjs/dist/react/ProductModifiers.d.ts +4 -2
- package/cjs/dist/react/ProductVariantSelector.d.ts +5 -4
- package/cjs/dist/react/SelectedVariant.d.ts +5 -4
- package/cjs/dist/react/SelectedVariant.js +2 -4
- package/cjs/dist/services/products-list-filters-service.d.ts +41 -24
- package/cjs/dist/services/products-list-filters-service.js +150 -92
- 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 +9 -5
- package/dist/react/ProductListFilters.js +14 -5
- package/dist/react/ProductListPagination.d.ts +14 -12
- package/dist/react/ProductListSort.d.ts +6 -4
- package/dist/react/ProductModifiers.d.ts +4 -2
- package/dist/react/ProductVariantSelector.d.ts +5 -4
- package/dist/react/SelectedVariant.d.ts +5 -4
- package/dist/react/SelectedVariant.js +2 -4
- package/dist/services/products-list-filters-service.d.ts +41 -24
- package/dist/services/products-list-filters-service.js +150 -92
- package/package.json +2 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
2
1
|
import { type CategoryServiceConfig } from "../services/category-service.js";
|
|
2
|
+
export interface RootProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
categoryServiceConfig: CategoryServiceConfig;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Root component that provides the Category service context to its children.
|
|
5
8
|
* This component sets up the necessary services for managing category state.
|
|
@@ -24,15 +27,13 @@ import { type CategoryServiceConfig } from "../services/category-service.js";
|
|
|
24
27
|
* }
|
|
25
28
|
* ```
|
|
26
29
|
*/
|
|
27
|
-
export declare function Root(props:
|
|
28
|
-
categoryServiceConfig: CategoryServiceConfig;
|
|
29
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
30
31
|
/**
|
|
31
32
|
* Props for Name headless component
|
|
32
33
|
*/
|
|
33
34
|
export interface NameProps {
|
|
34
35
|
/** Content to display (can be a render function receiving name data or ReactNode) */
|
|
35
|
-
children: ((props: NameRenderProps) => ReactNode) | ReactNode;
|
|
36
|
+
children: ((props: NameRenderProps) => React.ReactNode) | React.ReactNode;
|
|
36
37
|
}
|
|
37
38
|
/**
|
|
38
39
|
* Render props for Name component
|
|
@@ -60,13 +61,13 @@ export interface NameRenderProps {
|
|
|
60
61
|
* }
|
|
61
62
|
* ```
|
|
62
63
|
*/
|
|
63
|
-
export declare function Name(props: NameProps): ReactNode;
|
|
64
|
+
export declare function Name(props: NameProps): import("react").ReactNode;
|
|
64
65
|
/**
|
|
65
66
|
* Props for Slug headless component
|
|
66
67
|
*/
|
|
67
68
|
export interface SlugProps {
|
|
68
69
|
/** Content to display (can be a render function receiving slug data or ReactNode) */
|
|
69
|
-
children: ((props: SlugRenderProps) => ReactNode) | ReactNode;
|
|
70
|
+
children: ((props: SlugRenderProps) => React.ReactNode) | React.ReactNode;
|
|
70
71
|
}
|
|
71
72
|
/**
|
|
72
73
|
* Render props for Slug component
|
|
@@ -94,4 +95,4 @@ export interface SlugRenderProps {
|
|
|
94
95
|
* }
|
|
95
96
|
* ```
|
|
96
97
|
*/
|
|
97
|
-
export declare function Slug(props: SlugProps): ReactNode;
|
|
98
|
+
export declare function Slug(props: SlugProps): import("react").ReactNode;
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { type CategoriesListServiceConfig } from "../services/categories-list-service.js";
|
|
2
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
3
2
|
import { categories } from "@wix/categories";
|
|
3
|
+
export interface RootProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
categoriesListConfig: CategoriesListServiceConfig;
|
|
6
|
+
}
|
|
4
7
|
/**
|
|
5
8
|
* Root component that provides the CategoryList service context to its children.
|
|
6
9
|
* This component sets up the necessary services for managing categories list state.
|
|
@@ -26,15 +29,13 @@ import { categories } from "@wix/categories";
|
|
|
26
29
|
* }
|
|
27
30
|
* ```
|
|
28
31
|
*/
|
|
29
|
-
export declare function Root(props:
|
|
30
|
-
categoriesListConfig: CategoriesListServiceConfig;
|
|
31
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
32
33
|
/**
|
|
33
34
|
* Props for EmptyState headless component
|
|
34
35
|
*/
|
|
35
36
|
export interface EmptyStateProps {
|
|
36
37
|
/** Content to display when categories list is empty (can be a render function or ReactNode) */
|
|
37
|
-
children: ((props: EmptyStateRenderProps) => ReactNode) | ReactNode;
|
|
38
|
+
children: ((props: EmptyStateRenderProps) => React.ReactNode) | React.ReactNode;
|
|
38
39
|
}
|
|
39
40
|
/**
|
|
40
41
|
* Render props for EmptyState component
|
|
@@ -64,13 +65,13 @@ export interface EmptyStateRenderProps {
|
|
|
64
65
|
* }
|
|
65
66
|
* ```
|
|
66
67
|
*/
|
|
67
|
-
export declare function EmptyState(props: EmptyStateProps): ReactNode;
|
|
68
|
+
export declare function EmptyState(props: EmptyStateProps): import("react").ReactNode;
|
|
68
69
|
/**
|
|
69
70
|
* Props for Loading headless component
|
|
70
71
|
*/
|
|
71
72
|
export interface LoadingProps {
|
|
72
73
|
/** Content to display during loading (can be a render function or ReactNode) */
|
|
73
|
-
children: ((props: LoadingRenderProps) => ReactNode) | ReactNode;
|
|
74
|
+
children: ((props: LoadingRenderProps) => React.ReactNode) | React.ReactNode;
|
|
74
75
|
}
|
|
75
76
|
/**
|
|
76
77
|
* Render props for Loading component
|
|
@@ -100,13 +101,13 @@ export interface LoadingRenderProps {
|
|
|
100
101
|
* }
|
|
101
102
|
* ```
|
|
102
103
|
*/
|
|
103
|
-
export declare function Loading(props: LoadingProps): ReactNode;
|
|
104
|
+
export declare function Loading(props: LoadingProps): import("react").ReactNode;
|
|
104
105
|
/**
|
|
105
106
|
* Props for Error headless component
|
|
106
107
|
*/
|
|
107
108
|
export interface ErrorProps {
|
|
108
109
|
/** Content to display during error state (can be a render function or ReactNode) */
|
|
109
|
-
children: ((props: ErrorRenderProps) => ReactNode) | ReactNode;
|
|
110
|
+
children: ((props: ErrorRenderProps) => React.ReactNode) | React.ReactNode;
|
|
110
111
|
}
|
|
111
112
|
/**
|
|
112
113
|
* Render props for Error component
|
|
@@ -141,13 +142,13 @@ export interface ErrorRenderProps {
|
|
|
141
142
|
* }
|
|
142
143
|
* ```
|
|
143
144
|
*/
|
|
144
|
-
export declare function Error(props: ErrorProps): ReactNode;
|
|
145
|
+
export declare function Error(props: ErrorProps): import("react").ReactNode;
|
|
145
146
|
/**
|
|
146
147
|
* Props for ItemContent headless component
|
|
147
148
|
*/
|
|
148
149
|
export interface ItemContentProps {
|
|
149
150
|
/** Content to display for each category (can be a render function receiving category data or ReactNode) */
|
|
150
|
-
children: ((props: ItemContentRenderProps) => ReactNode) | ReactNode;
|
|
151
|
+
children: ((props: ItemContentRenderProps) => React.ReactNode) | React.ReactNode;
|
|
151
152
|
}
|
|
152
153
|
/**
|
|
153
154
|
* Render props for ItemContent component
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { ProductServiceConfig } from "../services/product-service.js";
|
|
2
2
|
import type { V3Product, ProductMedia } from "@wix/auto_sdk_stores_products-v-3";
|
|
3
|
-
|
|
3
|
+
export interface RootProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
productServiceConfig: ProductServiceConfig;
|
|
6
|
+
}
|
|
4
7
|
/**
|
|
5
8
|
* Root component that provides the Product service context to its children.
|
|
6
9
|
* This component sets up the necessary services for rendering and managing a single product's data.
|
|
@@ -31,9 +34,7 @@ import type { PropsWithChildren } from "react";
|
|
|
31
34
|
* }
|
|
32
35
|
* ```
|
|
33
36
|
*/
|
|
34
|
-
export declare function Root(props:
|
|
35
|
-
productServiceConfig: ProductServiceConfig;
|
|
36
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
37
38
|
/**
|
|
38
39
|
* Props for ProductName headless component
|
|
39
40
|
*/
|
|
@@ -39,7 +39,7 @@ export interface RootProps {
|
|
|
39
39
|
* }
|
|
40
40
|
* ```
|
|
41
41
|
*/
|
|
42
|
-
export declare function Root(props: RootProps):
|
|
42
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
43
43
|
/**
|
|
44
44
|
* Props for InventoryStatus headless component
|
|
45
45
|
*/
|
|
@@ -144,13 +144,17 @@ export interface PriceRangeProps {
|
|
|
144
144
|
*/
|
|
145
145
|
export interface PriceRangeRenderProps {
|
|
146
146
|
/** Current minimum price filter value */
|
|
147
|
-
|
|
147
|
+
selectedMinPrice: number;
|
|
148
148
|
/** Current maximum price filter value */
|
|
149
|
-
|
|
149
|
+
selectedMaxPrice: number;
|
|
150
|
+
/** Catalog minimum price */
|
|
151
|
+
availableMinPrice: number;
|
|
152
|
+
/** Catalog maximum price */
|
|
153
|
+
availableMaxPrice: number;
|
|
150
154
|
/** Function to update the minimum price filter */
|
|
151
|
-
|
|
155
|
+
setSelectedMinPrice: (minPrice: number) => void;
|
|
152
156
|
/** Function to update the maximum price filter */
|
|
153
|
-
|
|
157
|
+
setSelectedMaxPrice: (maxPrice: number) => void;
|
|
154
158
|
}
|
|
155
159
|
/**
|
|
156
160
|
* Headless component for managing price range filters (combined min/max)
|
|
@@ -153,12 +153,21 @@ export function ResetTrigger(props) {
|
|
|
153
153
|
*/
|
|
154
154
|
export function PriceRange(props) {
|
|
155
155
|
const service = useService(ProductsListFiltersServiceDefinition);
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
156
|
+
const selectedMinPrice = service.selectedMinPrice.get();
|
|
157
|
+
const availableMinPrice = service.availableMinPrice.get();
|
|
158
|
+
const selectedMaxPrice = service.selectedMaxPrice.get();
|
|
159
|
+
const availableMaxPrice = service.availableMaxPrice.get();
|
|
160
|
+
const setSelectedMinPrice = service.setSelectedMinPrice;
|
|
161
|
+
const setSelectedMaxPrice = service.setSelectedMaxPrice;
|
|
160
162
|
return typeof props.children === "function"
|
|
161
|
-
? props.children({
|
|
163
|
+
? props.children({
|
|
164
|
+
availableMinPrice,
|
|
165
|
+
selectedMinPrice,
|
|
166
|
+
selectedMaxPrice,
|
|
167
|
+
availableMaxPrice,
|
|
168
|
+
setSelectedMinPrice,
|
|
169
|
+
setSelectedMaxPrice,
|
|
170
|
+
})
|
|
162
171
|
: props.children;
|
|
163
172
|
}
|
|
164
173
|
/**
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
export interface RootProps {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
}
|
|
2
4
|
/**
|
|
3
5
|
* Root component that provides the ProductListPagination service context to its children.
|
|
4
6
|
* This component sets up the necessary services for managing products list pagination.
|
|
@@ -27,13 +29,13 @@ import type { PropsWithChildren, ReactNode } from "react";
|
|
|
27
29
|
* }
|
|
28
30
|
* ```
|
|
29
31
|
*/
|
|
30
|
-
export declare function Root(props:
|
|
32
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
31
33
|
/**
|
|
32
34
|
* Props for PageSize headless component
|
|
33
35
|
*/
|
|
34
36
|
export interface PageSizeProps {
|
|
35
37
|
/** Content to display (can be a render function receiving page size controls or ReactNode) */
|
|
36
|
-
children: ((props: PageSizeRenderProps) => ReactNode) | ReactNode;
|
|
38
|
+
children: ((props: PageSizeRenderProps) => React.ReactNode) | React.ReactNode;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
41
|
* Render props for PageSize component
|
|
@@ -73,13 +75,13 @@ export interface PageSizeRenderProps {
|
|
|
73
75
|
* }
|
|
74
76
|
* ```
|
|
75
77
|
*/
|
|
76
|
-
export declare function PageSize(props: PageSizeProps): ReactNode;
|
|
78
|
+
export declare function PageSize(props: PageSizeProps): import("react").ReactNode;
|
|
77
79
|
/**
|
|
78
80
|
* Props for NextPageTrigger headless component
|
|
79
81
|
*/
|
|
80
82
|
export interface NextPageTriggerProps {
|
|
81
83
|
/** Content to display (can be a render function receiving next page controls or ReactNode) */
|
|
82
|
-
children: ((props: NextPageTriggerRenderProps) => ReactNode) | ReactNode;
|
|
84
|
+
children: ((props: NextPageTriggerRenderProps) => React.ReactNode) | React.ReactNode;
|
|
83
85
|
}
|
|
84
86
|
/**
|
|
85
87
|
* Render props for NextPageTrigger component
|
|
@@ -115,13 +117,13 @@ export interface NextPageTriggerRenderProps {
|
|
|
115
117
|
* }
|
|
116
118
|
* ```
|
|
117
119
|
*/
|
|
118
|
-
export declare function NextPageTrigger(props: NextPageTriggerProps): ReactNode;
|
|
120
|
+
export declare function NextPageTrigger(props: NextPageTriggerProps): import("react").ReactNode;
|
|
119
121
|
/**
|
|
120
122
|
* Props for PreviousPageTrigger headless component
|
|
121
123
|
*/
|
|
122
124
|
export interface PreviousPageTriggerProps {
|
|
123
125
|
/** Content to display (can be a render function receiving previous page controls or ReactNode) */
|
|
124
|
-
children: ((props: PreviousPageTriggerRenderProps) => ReactNode) | ReactNode;
|
|
126
|
+
children: ((props: PreviousPageTriggerRenderProps) => React.ReactNode) | React.ReactNode;
|
|
125
127
|
}
|
|
126
128
|
/**
|
|
127
129
|
* Render props for PreviousPageTrigger component
|
|
@@ -157,13 +159,13 @@ export interface PreviousPageTriggerRenderProps {
|
|
|
157
159
|
* }
|
|
158
160
|
* ```
|
|
159
161
|
*/
|
|
160
|
-
export declare function PreviousPageTrigger(props: PreviousPageTriggerProps): ReactNode;
|
|
162
|
+
export declare function PreviousPageTrigger(props: PreviousPageTriggerProps): import("react").ReactNode;
|
|
161
163
|
/**
|
|
162
164
|
* Props for FirstPageTrigger headless component
|
|
163
165
|
*/
|
|
164
166
|
export interface FirstPageTriggerProps {
|
|
165
167
|
/** Content to display (can be a render function receiving first page controls or ReactNode) */
|
|
166
|
-
children: ((props: FirstPageTriggerRenderProps) => ReactNode) | ReactNode;
|
|
168
|
+
children: ((props: FirstPageTriggerRenderProps) => React.ReactNode) | React.ReactNode;
|
|
167
169
|
}
|
|
168
170
|
/**
|
|
169
171
|
* Render props for FirstPageTrigger component
|
|
@@ -199,13 +201,13 @@ export interface FirstPageTriggerRenderProps {
|
|
|
199
201
|
* }
|
|
200
202
|
* ```
|
|
201
203
|
*/
|
|
202
|
-
export declare function FirstPageTrigger(props: FirstPageTriggerProps): ReactNode;
|
|
204
|
+
export declare function FirstPageTrigger(props: FirstPageTriggerProps): import("react").ReactNode;
|
|
203
205
|
/**
|
|
204
206
|
* Props for LoadMoreTrigger headless component
|
|
205
207
|
*/
|
|
206
208
|
export interface LoadMoreTriggerProps {
|
|
207
209
|
/** Content to display (can be a render function receiving load more controls or ReactNode) */
|
|
208
|
-
children: ((props: LoadMoreTriggerRenderProps) => ReactNode) | ReactNode;
|
|
210
|
+
children: ((props: LoadMoreTriggerRenderProps) => React.ReactNode) | React.ReactNode;
|
|
209
211
|
}
|
|
210
212
|
/**
|
|
211
213
|
* Render props for LoadMoreTrigger component
|
|
@@ -243,4 +245,4 @@ export interface LoadMoreTriggerRenderProps {
|
|
|
243
245
|
* }
|
|
244
246
|
* ```
|
|
245
247
|
*/
|
|
246
|
-
export declare function LoadMoreTrigger(props: LoadMoreTriggerProps): ReactNode;
|
|
248
|
+
export declare function LoadMoreTrigger(props: LoadMoreTriggerProps): import("react").ReactNode;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import type { PropsWithChildren, ReactNode } from "react";
|
|
2
1
|
import { SortType } from "../services/products-list-sort-service.js";
|
|
2
|
+
export interface RootProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* Root component that provides the ProductListSort service context to its children.
|
|
5
7
|
* This component sets up the necessary services for managing products list sorting.
|
|
@@ -32,13 +34,13 @@ import { SortType } from "../services/products-list-sort-service.js";
|
|
|
32
34
|
* }
|
|
33
35
|
* ```
|
|
34
36
|
*/
|
|
35
|
-
export declare function Root(props:
|
|
37
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
36
38
|
/**
|
|
37
39
|
* Props for Options headless component
|
|
38
40
|
*/
|
|
39
41
|
export interface OptionsProps {
|
|
40
42
|
/** Content to display (can be a render function receiving sort controls or ReactNode) */
|
|
41
|
-
children: ((props: OptionsRenderProps) => ReactNode) | ReactNode;
|
|
43
|
+
children: ((props: OptionsRenderProps) => React.ReactNode) | React.ReactNode;
|
|
42
44
|
}
|
|
43
45
|
/**
|
|
44
46
|
* Render props for Options component
|
|
@@ -84,4 +86,4 @@ export interface OptionsRenderProps {
|
|
|
84
86
|
* }
|
|
85
87
|
* ```
|
|
86
88
|
*/
|
|
87
|
-
export declare function Options(props: OptionsProps): ReactNode;
|
|
89
|
+
export declare function Options(props: OptionsProps): import("react").ReactNode;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { type ConnectedModifier, type ConnectedModifierChoice } from "@wix/auto_sdk_stores_products-v-3";
|
|
2
|
-
|
|
2
|
+
export interface RootProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
3
5
|
/**
|
|
4
6
|
* Root component that provides the ProductModifiers service context to its children.
|
|
5
7
|
* This component sets up the necessary services for managing product modifier functionality.
|
|
@@ -74,7 +76,7 @@ import type { PropsWithChildren } from "react";
|
|
|
74
76
|
* }
|
|
75
77
|
* ```
|
|
76
78
|
*/
|
|
77
|
-
export declare function Root(props:
|
|
79
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
78
80
|
/**
|
|
79
81
|
* Props for Modifiers headless component
|
|
80
82
|
*/
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { SelectedVariantServiceConfig } from "../services/selected-variant-service.js";
|
|
2
|
-
import type { PropsWithChildren } from "react";
|
|
3
2
|
import { type ConnectedOption, type ConnectedOptionChoice, InventoryAvailabilityStatus } from "@wix/auto_sdk_stores_products-v-3";
|
|
3
|
+
export interface RootProps {
|
|
4
|
+
children: React.ReactNode;
|
|
5
|
+
selectedVariantServiceConfig: SelectedVariantServiceConfig;
|
|
6
|
+
}
|
|
4
7
|
/**
|
|
5
8
|
* Root component that provides the ProductVariantSelector service context to its children.
|
|
6
9
|
* This component sets up the necessary services for rendering and managing product variant selection.
|
|
@@ -39,9 +42,7 @@ import { type ConnectedOption, type ConnectedOptionChoice, InventoryAvailability
|
|
|
39
42
|
* }
|
|
40
43
|
* ```
|
|
41
44
|
*/
|
|
42
|
-
export declare function Root(props:
|
|
43
|
-
selectedVariantServiceConfig?: SelectedVariantServiceConfig;
|
|
44
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
45
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
45
46
|
/**
|
|
46
47
|
* Props for Options headless component
|
|
47
48
|
*/
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { SelectedVariantServiceConfig } from "../services/selected-variant-service.js";
|
|
2
|
-
|
|
2
|
+
export interface RootProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
selectedVariantServiceConfig: SelectedVariantServiceConfig;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Root component that provides the SelectedVariant service context to its children.
|
|
5
8
|
* This component sets up the necessary services for rendering and managing selected variant data.
|
|
@@ -33,9 +36,7 @@ import type { PropsWithChildren } from "react";
|
|
|
33
36
|
* }
|
|
34
37
|
* ```
|
|
35
38
|
*/
|
|
36
|
-
export declare function Root(props:
|
|
37
|
-
selectedVariantServiceConfig?: SelectedVariantServiceConfig;
|
|
38
|
-
}>): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function Root(props: RootProps): React.ReactNode;
|
|
39
40
|
/**
|
|
40
41
|
* Props for ProductDetails headless component
|
|
41
42
|
*/
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useService, WixServices } from "@wix/services-manager-react";
|
|
3
3
|
import { SelectedVariantServiceDefinition, SelectedVariantService, } from "../services/selected-variant-service.js";
|
|
4
4
|
import { ProductModifiersServiceDefinition } from "../services/product-modifiers-service.js";
|
|
5
|
-
import {
|
|
5
|
+
import { CurrentCartServiceDefinition } from "@wix/headless-ecom/services";
|
|
6
6
|
import { createServicesMap } from "@wix/services-manager";
|
|
7
7
|
/**
|
|
8
8
|
* Root component that provides the SelectedVariant service context to its children.
|
|
@@ -38,9 +38,7 @@ import { createServicesMap } from "@wix/services-manager";
|
|
|
38
38
|
* ```
|
|
39
39
|
*/
|
|
40
40
|
export function Root(props) {
|
|
41
|
-
return (_jsx(WixServices, { servicesMap: createServicesMap()
|
|
42
|
-
.addService(SelectedVariantServiceDefinition, SelectedVariantService, props.selectedVariantServiceConfig)
|
|
43
|
-
.addService(CurrentCartServiceDefinition, CurrentCartService, {}), children: props.children }));
|
|
41
|
+
return (_jsx(WixServices, { servicesMap: createServicesMap().addService(SelectedVariantServiceDefinition, SelectedVariantService, props.selectedVariantServiceConfig), children: props.children }));
|
|
44
42
|
}
|
|
45
43
|
/**
|
|
46
44
|
* Headless component for selected variant details display
|
|
@@ -112,10 +112,14 @@ export declare function loadProductsListFiltersServiceConfig(): Promise<Products
|
|
|
112
112
|
*/
|
|
113
113
|
export declare const ProductsListFiltersServiceDefinition: string & {
|
|
114
114
|
__api: {
|
|
115
|
-
/** Reactive signal containing the minimum price filter value */
|
|
116
|
-
|
|
117
|
-
/** Reactive signal containing the maximum price filter value */
|
|
118
|
-
|
|
115
|
+
/** Reactive signal containing the user's selected minimum price filter value */
|
|
116
|
+
selectedMinPrice: Signal<number>;
|
|
117
|
+
/** Reactive signal containing the user's selected maximum price filter value */
|
|
118
|
+
selectedMaxPrice: Signal<number>;
|
|
119
|
+
/** Reactive signal containing the catalog minimum price (for UI bounds) */
|
|
120
|
+
availableMinPrice: Signal<number>;
|
|
121
|
+
/** Reactive signal containing the catalog maximum price (for UI bounds) */
|
|
122
|
+
availableMaxPrice: Signal<number>;
|
|
119
123
|
/** Reactive signal containing available inventory status options */
|
|
120
124
|
availableInventoryStatuses: Signal<InventoryStatusType[]>;
|
|
121
125
|
/** Reactive signal containing selected inventory status filters */
|
|
@@ -125,9 +129,9 @@ export declare const ProductsListFiltersServiceDefinition: string & {
|
|
|
125
129
|
/** Reactive signal containing selected product option filters */
|
|
126
130
|
selectedProductOptions: Signal<Record<string, string[]>>;
|
|
127
131
|
/** Function to set the minimum price filter */
|
|
128
|
-
|
|
132
|
+
setSelectedMinPrice: (minPrice: number) => void;
|
|
129
133
|
/** Function to set the maximum price filter */
|
|
130
|
-
|
|
134
|
+
setSelectedMaxPrice: (maxPrice: number) => void;
|
|
131
135
|
/** Function to toggle an inventory status filter */
|
|
132
136
|
toggleInventoryStatus: (status: InventoryStatusType) => void;
|
|
133
137
|
/** Function to toggle a product option choice filter */
|
|
@@ -140,10 +144,14 @@ export declare const ProductsListFiltersServiceDefinition: string & {
|
|
|
140
144
|
__config: {};
|
|
141
145
|
isServiceDefinition?: boolean;
|
|
142
146
|
} & {
|
|
143
|
-
/** Reactive signal containing the minimum price filter value */
|
|
144
|
-
|
|
145
|
-
/** Reactive signal containing the maximum price filter value */
|
|
146
|
-
|
|
147
|
+
/** Reactive signal containing the user's selected minimum price filter value */
|
|
148
|
+
selectedMinPrice: Signal<number>;
|
|
149
|
+
/** Reactive signal containing the user's selected maximum price filter value */
|
|
150
|
+
selectedMaxPrice: Signal<number>;
|
|
151
|
+
/** Reactive signal containing the catalog minimum price (for UI bounds) */
|
|
152
|
+
availableMinPrice: Signal<number>;
|
|
153
|
+
/** Reactive signal containing the catalog maximum price (for UI bounds) */
|
|
154
|
+
availableMaxPrice: Signal<number>;
|
|
147
155
|
/** Reactive signal containing available inventory status options */
|
|
148
156
|
availableInventoryStatuses: Signal<InventoryStatusType[]>;
|
|
149
157
|
/** Reactive signal containing selected inventory status filters */
|
|
@@ -153,9 +161,9 @@ export declare const ProductsListFiltersServiceDefinition: string & {
|
|
|
153
161
|
/** Reactive signal containing selected product option filters */
|
|
154
162
|
selectedProductOptions: Signal<Record<string, string[]>>;
|
|
155
163
|
/** Function to set the minimum price filter */
|
|
156
|
-
|
|
164
|
+
setSelectedMinPrice: (minPrice: number) => void;
|
|
157
165
|
/** Function to set the maximum price filter */
|
|
158
|
-
|
|
166
|
+
setSelectedMaxPrice: (maxPrice: number) => void;
|
|
159
167
|
/** Function to toggle an inventory status filter */
|
|
160
168
|
toggleInventoryStatus: (status: InventoryStatusType) => void;
|
|
161
169
|
/** Function to toggle a product option choice filter */
|
|
@@ -233,14 +241,19 @@ export declare const ProductsListFiltersServiceDefinition: string & {
|
|
|
233
241
|
* </div>
|
|
234
242
|
* );
|
|
235
243
|
* }
|
|
244
|
+
* }
|
|
236
245
|
* ```
|
|
237
246
|
*/
|
|
238
247
|
export declare const ProductsListFiltersService: import("@wix/services-definitions").ServiceFactory<string & {
|
|
239
248
|
__api: {
|
|
240
|
-
/** Reactive signal containing the minimum price filter value */
|
|
241
|
-
|
|
242
|
-
/** Reactive signal containing the maximum price filter value */
|
|
243
|
-
|
|
249
|
+
/** Reactive signal containing the user's selected minimum price filter value */
|
|
250
|
+
selectedMinPrice: Signal<number>;
|
|
251
|
+
/** Reactive signal containing the user's selected maximum price filter value */
|
|
252
|
+
selectedMaxPrice: Signal<number>;
|
|
253
|
+
/** Reactive signal containing the catalog minimum price (for UI bounds) */
|
|
254
|
+
availableMinPrice: Signal<number>;
|
|
255
|
+
/** Reactive signal containing the catalog maximum price (for UI bounds) */
|
|
256
|
+
availableMaxPrice: Signal<number>;
|
|
244
257
|
/** Reactive signal containing available inventory status options */
|
|
245
258
|
availableInventoryStatuses: Signal<InventoryStatusType[]>;
|
|
246
259
|
/** Reactive signal containing selected inventory status filters */
|
|
@@ -250,9 +263,9 @@ export declare const ProductsListFiltersService: import("@wix/services-definitio
|
|
|
250
263
|
/** Reactive signal containing selected product option filters */
|
|
251
264
|
selectedProductOptions: Signal<Record<string, string[]>>;
|
|
252
265
|
/** Function to set the minimum price filter */
|
|
253
|
-
|
|
266
|
+
setSelectedMinPrice: (minPrice: number) => void;
|
|
254
267
|
/** Function to set the maximum price filter */
|
|
255
|
-
|
|
268
|
+
setSelectedMaxPrice: (maxPrice: number) => void;
|
|
256
269
|
/** Function to toggle an inventory status filter */
|
|
257
270
|
toggleInventoryStatus: (status: InventoryStatusType) => void;
|
|
258
271
|
/** Function to toggle a product option choice filter */
|
|
@@ -265,10 +278,14 @@ export declare const ProductsListFiltersService: import("@wix/services-definitio
|
|
|
265
278
|
__config: {};
|
|
266
279
|
isServiceDefinition?: boolean;
|
|
267
280
|
} & {
|
|
268
|
-
/** Reactive signal containing the minimum price filter value */
|
|
269
|
-
|
|
270
|
-
/** Reactive signal containing the maximum price filter value */
|
|
271
|
-
|
|
281
|
+
/** Reactive signal containing the user's selected minimum price filter value */
|
|
282
|
+
selectedMinPrice: Signal<number>;
|
|
283
|
+
/** Reactive signal containing the user's selected maximum price filter value */
|
|
284
|
+
selectedMaxPrice: Signal<number>;
|
|
285
|
+
/** Reactive signal containing the catalog minimum price (for UI bounds) */
|
|
286
|
+
availableMinPrice: Signal<number>;
|
|
287
|
+
/** Reactive signal containing the catalog maximum price (for UI bounds) */
|
|
288
|
+
availableMaxPrice: Signal<number>;
|
|
272
289
|
/** Reactive signal containing available inventory status options */
|
|
273
290
|
availableInventoryStatuses: Signal<InventoryStatusType[]>;
|
|
274
291
|
/** Reactive signal containing selected inventory status filters */
|
|
@@ -278,9 +295,9 @@ export declare const ProductsListFiltersService: import("@wix/services-definitio
|
|
|
278
295
|
/** Reactive signal containing selected product option filters */
|
|
279
296
|
selectedProductOptions: Signal<Record<string, string[]>>;
|
|
280
297
|
/** Function to set the minimum price filter */
|
|
281
|
-
|
|
298
|
+
setSelectedMinPrice: (minPrice: number) => void;
|
|
282
299
|
/** Function to set the maximum price filter */
|
|
283
|
-
|
|
300
|
+
setSelectedMaxPrice: (maxPrice: number) => void;
|
|
284
301
|
/** Function to toggle an inventory status filter */
|
|
285
302
|
toggleInventoryStatus: (status: InventoryStatusType) => void;
|
|
286
303
|
/** Function to toggle a product option choice filter */
|