@wix/headless-stores 0.0.92 → 0.0.93

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.
@@ -1,5 +1,5 @@
1
1
  import type { V3Product } from '@wix/auto_sdk_stores_products-v-3';
2
- import { Sort as SortPrimitive } from '@wix/headless-components/react';
2
+ import { Sort as SortPrimitive, GenericListTotalsRenderProps, GenericListLoadMoreRenderProps } from '@wix/headless-components/react';
3
3
  import React from 'react';
4
4
  import type { ProductsListServiceConfig } from '../services/products-list-service.js';
5
5
  import { productsV3 } from '@wix/stores';
@@ -120,11 +120,7 @@ export declare const ProductRepeater: React.ForwardRefExoticComponent<ProductRep
120
120
  */
121
121
  export interface LoadMoreTriggerProps {
122
122
  /** Custom render function when using asChild */
123
- children?: React.ReactNode | React.ForwardRefRenderFunction<HTMLButtonElement, {
124
- isLoading: boolean;
125
- hasMoreProducts: boolean;
126
- loadMore: () => void;
127
- }>;
123
+ children?: React.ReactNode | React.ForwardRefRenderFunction<HTMLButtonElement, GenericListLoadMoreRenderProps>;
128
124
  /**
129
125
  * Whether to render as a child component.
130
126
  * @default false
@@ -163,9 +159,7 @@ export interface TotalsDisplayedProps {
163
159
  /** Whether to render as a child component */
164
160
  asChild?: boolean;
165
161
  /** Custom render function when using asChild */
166
- children?: AsChildChildren<{
167
- displayedItems: number;
168
- }>;
162
+ children?: AsChildChildren<GenericListTotalsRenderProps>;
169
163
  /** CSS classes to apply to the default element */
170
164
  className?: string;
171
165
  }
@@ -182,7 +176,7 @@ export interface TotalsDisplayedProps {
182
176
  * </ProductList.TotalsDisplayed>
183
177
  * // or with render function
184
178
  * <ProductList.TotalsDisplayed asChild>
185
- * {({ displayedProducts }, ref) => <strong ref={ref}>{displayedProducts}</strong>}
179
+ * {({ displayedItems }, ref) => <strong ref={ref}>{displayedItems}</strong>}
186
180
  * </ProductList.TotalsDisplayed>
187
181
  * ```
188
182
  */
@@ -177,7 +177,7 @@ export const LoadMoreTrigger = React.forwardRef((props, ref) => {
177
177
  * </ProductList.TotalsDisplayed>
178
178
  * // or with render function
179
179
  * <ProductList.TotalsDisplayed asChild>
180
- * {({ displayedProducts }, ref) => <strong ref={ref}>{displayedProducts}</strong>}
180
+ * {({ displayedItems }, ref) => <strong ref={ref}>{displayedItems}</strong>}
181
181
  * </ProductList.TotalsDisplayed>
182
182
  * ```
183
183
  */
@@ -1,5 +1,5 @@
1
1
  import type { V3Product } from '@wix/auto_sdk_stores_products-v-3';
2
- import { Sort as SortPrimitive } from '@wix/headless-components/react';
2
+ import { Sort as SortPrimitive, GenericListTotalsRenderProps, GenericListLoadMoreRenderProps } from '@wix/headless-components/react';
3
3
  import React from 'react';
4
4
  import type { ProductsListServiceConfig } from '../services/products-list-service.js';
5
5
  import { productsV3 } from '@wix/stores';
@@ -120,11 +120,7 @@ export declare const ProductRepeater: React.ForwardRefExoticComponent<ProductRep
120
120
  */
121
121
  export interface LoadMoreTriggerProps {
122
122
  /** Custom render function when using asChild */
123
- children?: React.ReactNode | React.ForwardRefRenderFunction<HTMLButtonElement, {
124
- isLoading: boolean;
125
- hasMoreProducts: boolean;
126
- loadMore: () => void;
127
- }>;
123
+ children?: React.ReactNode | React.ForwardRefRenderFunction<HTMLButtonElement, GenericListLoadMoreRenderProps>;
128
124
  /**
129
125
  * Whether to render as a child component.
130
126
  * @default false
@@ -163,9 +159,7 @@ export interface TotalsDisplayedProps {
163
159
  /** Whether to render as a child component */
164
160
  asChild?: boolean;
165
161
  /** Custom render function when using asChild */
166
- children?: AsChildChildren<{
167
- displayedItems: number;
168
- }>;
162
+ children?: AsChildChildren<GenericListTotalsRenderProps>;
169
163
  /** CSS classes to apply to the default element */
170
164
  className?: string;
171
165
  }
@@ -182,7 +176,7 @@ export interface TotalsDisplayedProps {
182
176
  * </ProductList.TotalsDisplayed>
183
177
  * // or with render function
184
178
  * <ProductList.TotalsDisplayed asChild>
185
- * {({ displayedProducts }, ref) => <strong ref={ref}>{displayedProducts}</strong>}
179
+ * {({ displayedItems }, ref) => <strong ref={ref}>{displayedItems}</strong>}
186
180
  * </ProductList.TotalsDisplayed>
187
181
  * ```
188
182
  */
@@ -177,7 +177,7 @@ export const LoadMoreTrigger = React.forwardRef((props, ref) => {
177
177
  * </ProductList.TotalsDisplayed>
178
178
  * // or with render function
179
179
  * <ProductList.TotalsDisplayed asChild>
180
- * {({ displayedProducts }, ref) => <strong ref={ref}>{displayedProducts}</strong>}
180
+ * {({ displayedItems }, ref) => <strong ref={ref}>{displayedItems}</strong>}
181
181
  * </ProductList.TotalsDisplayed>
182
182
  * ```
183
183
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/headless-stores",
3
- "version": "0.0.92",
3
+ "version": "0.0.93",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "prebuild": "cd ../media && yarn build && cd ../ecom && yarn build",
@@ -62,7 +62,7 @@
62
62
  "@wix/auto_sdk_stores_read-only-variants-v-3": "^1.0.23",
63
63
  "@wix/ecom": "^1.0.1278",
64
64
  "@wix/essentials": "^0.1.24",
65
- "@wix/headless-ecom": "0.0.30",
65
+ "@wix/headless-ecom": "0.0.31",
66
66
  "@wix/headless-media": "0.0.14",
67
67
  "@wix/headless-utils": "0.0.3",
68
68
  "@wix/redirects": "^1.0.83",
@@ -70,6 +70,6 @@
70
70
  "@wix/services-manager-react": "^0.1.26"
71
71
  },
72
72
  "peerDependencies": {
73
- "@wix/headless-components": "0.0.13"
73
+ "@wix/headless-components": "0.0.14"
74
74
  }
75
75
  }