@wix/headless-stores 0.0.105 → 0.0.107
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/Option.d.ts +1 -0
- package/cjs/dist/react/Product.d.ts +3 -3
- package/cjs/dist/react/Product.js +6 -6
- package/cjs/dist/react/ProductList.d.ts +2 -3
- package/cjs/dist/react/core/Product.d.ts +8 -8
- package/cjs/dist/react/core/ProductModifiers.d.ts +11 -9
- package/cjs/dist/react/core/ProductModifiers.js +6 -3
- package/cjs/dist/react/core/ProductVariantSelector.d.ts +15 -9
- package/cjs/dist/react/core/ProductVariantSelector.js +19 -10
- package/cjs/dist/services/buy-now-service.js +2 -2
- package/cjs/dist/services/product-modifiers-service.d.ts +1 -1
- package/cjs/dist/services/product-modifiers-service.js +1 -1
- package/cjs/dist/services/product-service.d.ts +1 -1
- package/cjs/dist/services/product-service.js +1 -1
- package/cjs/dist/services/selected-variant-service.d.ts +6 -6
- package/cjs/dist/services/selected-variant-service.js +15 -16
- package/dist/react/Option.d.ts +1 -0
- package/dist/react/Product.d.ts +3 -3
- package/dist/react/Product.js +6 -6
- package/dist/react/ProductList.d.ts +2 -3
- package/dist/react/core/Product.d.ts +8 -8
- package/dist/react/core/ProductModifiers.d.ts +11 -9
- package/dist/react/core/ProductModifiers.js +6 -3
- package/dist/react/core/ProductVariantSelector.d.ts +15 -9
- package/dist/react/core/ProductVariantSelector.js +19 -10
- package/dist/services/buy-now-service.js +2 -2
- package/dist/services/product-modifiers-service.d.ts +1 -1
- package/dist/services/product-modifiers-service.js +1 -1
- package/dist/services/product-service.d.ts +1 -1
- package/dist/services/product-service.js +1 -1
- package/dist/services/selected-variant-service.d.ts +6 -6
- package/dist/services/selected-variant-service.js +15 -16
- package/package.json +6 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { AsChildChildren } from '@wix/headless-utils/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { AsContent } from './types.js';
|
|
@@ -37,7 +37,7 @@ export type StockStatus = BasicStockStatus | 'can-pre-order';
|
|
|
37
37
|
*/
|
|
38
38
|
export interface ProductRootProps {
|
|
39
39
|
children: React.ReactNode;
|
|
40
|
-
product: V3Product;
|
|
40
|
+
product: productsV3.V3Product;
|
|
41
41
|
selectedVariant?: any;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -268,7 +268,7 @@ export interface RawProps {
|
|
|
268
268
|
asChild?: boolean;
|
|
269
269
|
/** Custom render function when using asChild */
|
|
270
270
|
children?: AsChildChildren<{
|
|
271
|
-
product: V3Product;
|
|
271
|
+
product: productsV3.V3Product;
|
|
272
272
|
}>;
|
|
273
273
|
/** CSS classes to apply to the default element */
|
|
274
274
|
className?: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
import { Quantity as QuantityComponent } from '@wix/headless-components/react';
|
|
4
4
|
import { Commerce } from '@wix/headless-ecom/react';
|
|
5
5
|
import { MediaGallery } from '@wix/headless-media/react';
|
|
@@ -406,15 +406,15 @@ export const Stock = React.forwardRef((props, ref) => {
|
|
|
406
406
|
let status;
|
|
407
407
|
let label;
|
|
408
408
|
switch (availabilityStatus) {
|
|
409
|
-
case InventoryAvailabilityStatus.IN_STOCK:
|
|
409
|
+
case productsV3.InventoryAvailabilityStatus.IN_STOCK:
|
|
410
410
|
status = 'in-stock';
|
|
411
411
|
label = finalLabels.inStock;
|
|
412
412
|
break;
|
|
413
|
-
case InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
413
|
+
case productsV3.InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
414
414
|
status = 'limited-stock';
|
|
415
415
|
label = finalLabels.limitedStock;
|
|
416
416
|
break;
|
|
417
|
-
case InventoryAvailabilityStatus.OUT_OF_STOCK:
|
|
417
|
+
case productsV3.InventoryAvailabilityStatus.OUT_OF_STOCK:
|
|
418
418
|
default:
|
|
419
419
|
status = 'out-of-stock';
|
|
420
420
|
label = finalLabels.outOfStock;
|
|
@@ -1046,12 +1046,12 @@ function getStockStatusMessage(inStock, isPreOrderEnabled, availabilityStatus, l
|
|
|
1046
1046
|
// Handle stock status based on availability
|
|
1047
1047
|
if (inStock) {
|
|
1048
1048
|
switch (availabilityStatus) {
|
|
1049
|
-
case InventoryAvailabilityStatus.IN_STOCK:
|
|
1049
|
+
case productsV3.InventoryAvailabilityStatus.IN_STOCK:
|
|
1050
1050
|
return {
|
|
1051
1051
|
status: 'in-stock',
|
|
1052
1052
|
label: labels.inStock,
|
|
1053
1053
|
};
|
|
1054
|
-
case InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
1054
|
+
case productsV3.InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
1055
1055
|
return {
|
|
1056
1056
|
status: 'limited-stock',
|
|
1057
1057
|
label: labels.limitedStock,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { V3Product } from '@wix/auto_sdk_stores_products-v-3';
|
|
2
1
|
import { Sort as SortPrimitive, GenericListTotalsRenderProps, GenericListLoadMoreRenderProps, ListVariant, GenericListRepeaterRenderProps } from '@wix/headless-components/react';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import type { ProductsListServiceConfig } from '../services/products-list-service.js';
|
|
@@ -9,7 +8,7 @@ import { AsChildChildren } from '@wix/headless-utils/react';
|
|
|
9
8
|
*/
|
|
10
9
|
export interface ProductListRootProps {
|
|
11
10
|
children: React.ReactNode;
|
|
12
|
-
products?: V3Product[];
|
|
11
|
+
products?: productsV3.V3Product[];
|
|
13
12
|
productsListConfig?: ProductsListServiceConfig;
|
|
14
13
|
className?: string;
|
|
15
14
|
variant?: ListVariant;
|
|
@@ -95,7 +94,7 @@ export declare const Products: React.ForwardRefExoticComponent<ProductsProps & R
|
|
|
95
94
|
/**
|
|
96
95
|
* Render props for ProductRepeater asChild pattern
|
|
97
96
|
*/
|
|
98
|
-
export type ProductRepeaterRenderProps = GenericListRepeaterRenderProps<V3Product>;
|
|
97
|
+
export type ProductRepeaterRenderProps = GenericListRepeaterRenderProps<productsV3.V3Product>;
|
|
99
98
|
/**
|
|
100
99
|
* Props for ProductList ProductRepeater component
|
|
101
100
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductServiceConfig } from '../../services/product-service.js';
|
|
2
|
-
import
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface RootProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
productServiceConfig: ProductServiceConfig;
|
|
@@ -81,18 +81,18 @@ export interface ProductDescriptionProps {
|
|
|
81
81
|
*/
|
|
82
82
|
export interface ProductDescriptionRenderProps {
|
|
83
83
|
/** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
|
|
84
|
-
description: NonNullable<V3Product['description']>;
|
|
84
|
+
description: NonNullable<productsV3.V3Product['description']>;
|
|
85
85
|
/** Product description with plain html */
|
|
86
|
-
plainDescription: NonNullable<V3Product['plainDescription']>;
|
|
86
|
+
plainDescription: NonNullable<productsV3.V3Product['plainDescription']>;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Render props for ProductDescription component
|
|
90
90
|
*/
|
|
91
91
|
export interface ProductDescriptionRenderProps {
|
|
92
92
|
/** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
|
|
93
|
-
description: NonNullable<V3Product['description']>;
|
|
93
|
+
description: NonNullable<productsV3.V3Product['description']>;
|
|
94
94
|
/** Product description with plain html */
|
|
95
|
-
plainDescription: NonNullable<V3Product['plainDescription']>;
|
|
95
|
+
plainDescription: NonNullable<productsV3.V3Product['plainDescription']>;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Headless component for product description display
|
|
@@ -129,15 +129,15 @@ export interface ProductMediaProps {
|
|
|
129
129
|
children: (props: ProductMediaRenderProps) => React.ReactNode;
|
|
130
130
|
}
|
|
131
131
|
export interface ProductMediaRenderProps {
|
|
132
|
-
mediaItems: ProductMedia[];
|
|
133
|
-
mainMedia?: ProductMedia;
|
|
132
|
+
mediaItems: productsV3.ProductMedia[];
|
|
133
|
+
mainMedia?: productsV3.ProductMedia;
|
|
134
134
|
}
|
|
135
135
|
export declare function Media(props: ProductMediaProps): import("react").ReactNode;
|
|
136
136
|
export interface ProductProps {
|
|
137
137
|
children: (props: ProductRenderProps) => React.ReactNode;
|
|
138
138
|
}
|
|
139
139
|
export interface ProductRenderProps {
|
|
140
|
-
product: V3Product;
|
|
140
|
+
product: productsV3.V3Product;
|
|
141
141
|
}
|
|
142
142
|
export declare function Content(props: ProductProps): import("react").ReactNode;
|
|
143
143
|
export interface LoadingProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
export interface RootProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
@@ -89,7 +89,7 @@ export interface ModifiersProps {
|
|
|
89
89
|
*/
|
|
90
90
|
export interface ModifiersRenderProps {
|
|
91
91
|
/** Array of product modifiers */
|
|
92
|
-
modifiers: ConnectedModifier[];
|
|
92
|
+
modifiers: productsV3.ConnectedModifier[];
|
|
93
93
|
/** Whether product has modifiers */
|
|
94
94
|
hasModifiers: boolean;
|
|
95
95
|
/** Currently selected modifier values */
|
|
@@ -148,7 +148,7 @@ export declare function Modifiers(props: ModifiersProps): import("react").ReactN
|
|
|
148
148
|
*/
|
|
149
149
|
export interface ModifierProps {
|
|
150
150
|
/** Product modifier data */
|
|
151
|
-
modifier: ConnectedModifier;
|
|
151
|
+
modifier: productsV3.ConnectedModifier;
|
|
152
152
|
/** Render prop function that receives modifier data */
|
|
153
153
|
children: (props: ModifierRenderProps) => React.ReactNode;
|
|
154
154
|
}
|
|
@@ -156,14 +156,16 @@ export interface ModifierProps {
|
|
|
156
156
|
* Render props for Modifier component
|
|
157
157
|
*/
|
|
158
158
|
export interface ModifierRenderProps {
|
|
159
|
-
/** Modifier name */
|
|
159
|
+
/** Modifier name (may be translated) */
|
|
160
160
|
name: string;
|
|
161
|
+
/** Modifier key (unique identifier) */
|
|
162
|
+
key: string;
|
|
161
163
|
/** Modifier type */
|
|
162
164
|
type: any;
|
|
163
165
|
/** Whether this modifier is mandatory */
|
|
164
166
|
mandatory: boolean;
|
|
165
167
|
/** Array of choices for this modifier (for choice-based modifiers) */
|
|
166
|
-
choices: ConnectedModifierChoice[];
|
|
168
|
+
choices: productsV3.ConnectedModifierChoice[];
|
|
167
169
|
/** Currently selected value for this modifier */
|
|
168
170
|
selectedValue: any;
|
|
169
171
|
/** Whether this modifier has choices */
|
|
@@ -227,9 +229,9 @@ export declare function Modifier(props: ModifierProps): import("react").ReactNod
|
|
|
227
229
|
*/
|
|
228
230
|
export interface ChoiceProps {
|
|
229
231
|
/** Product modifier data */
|
|
230
|
-
modifier: ConnectedModifier;
|
|
232
|
+
modifier: productsV3.ConnectedModifier;
|
|
231
233
|
/** Choice data */
|
|
232
|
-
choice: ConnectedModifierChoice;
|
|
234
|
+
choice: productsV3.ConnectedModifierChoice;
|
|
233
235
|
/** Render prop function that receives choice data */
|
|
234
236
|
children: (props: ChoiceRenderProps) => React.ReactNode;
|
|
235
237
|
}
|
|
@@ -288,7 +290,7 @@ export declare function Choice(props: ChoiceProps): import("react").ReactNode;
|
|
|
288
290
|
*/
|
|
289
291
|
export interface FreeTextProps {
|
|
290
292
|
/** Product modifier data */
|
|
291
|
-
modifier: ConnectedModifier;
|
|
293
|
+
modifier: productsV3.ConnectedModifier;
|
|
292
294
|
/** Render prop function that receives free text data */
|
|
293
295
|
children: (props: FreeTextRenderProps) => React.ReactNode;
|
|
294
296
|
}
|
|
@@ -354,7 +356,7 @@ export declare function FreeText(props: FreeTextProps): import("react").ReactNod
|
|
|
354
356
|
*/
|
|
355
357
|
export interface ToggleFreeTextProps {
|
|
356
358
|
/** Product modifier data */
|
|
357
|
-
modifier: ConnectedModifier;
|
|
359
|
+
modifier: productsV3.ConnectedModifier;
|
|
358
360
|
/** Render prop function that receives toggle data */
|
|
359
361
|
children: (props: ToggleFreeTextRenderProps) => React.ReactNode;
|
|
360
362
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useService, WixServices } from '@wix/services-manager-react';
|
|
4
4
|
import { ProductModifiersServiceDefinition, ProductModifiersService, } from '../../services/product-modifiers-service.js';
|
|
5
|
-
import {
|
|
5
|
+
import { productsV3 } from '@wix/stores';
|
|
6
6
|
import { createServicesMap } from '@wix/services-manager';
|
|
7
7
|
/**
|
|
8
8
|
* Root component that provides the ProductModifiers service context to its children.
|
|
@@ -208,17 +208,20 @@ export function Modifier(props) {
|
|
|
208
208
|
const modifiersService = useModifiersService();
|
|
209
209
|
const { modifier } = props;
|
|
210
210
|
const name = modifier.name || '';
|
|
211
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
212
|
+
const key = modifier.key || name;
|
|
211
213
|
const type = modifier.modifierRenderType;
|
|
212
214
|
const mandatory = modifier.mandatory || false;
|
|
213
215
|
const choices = modifier.choicesSettings?.choices || [];
|
|
214
216
|
const hasChoices = choices.length > 0;
|
|
215
|
-
const isFreeText = type === ModifierRenderType.FREE_TEXT;
|
|
217
|
+
const isFreeText = type === productsV3.ModifierRenderType.FREE_TEXT;
|
|
216
218
|
const freeTextSettings = modifier.freeTextSettings;
|
|
217
219
|
const maxChars = freeTextSettings?.maxLength;
|
|
218
220
|
const placeholder = freeTextSettings?.placeholder;
|
|
219
221
|
const selectedValue = modifiersService?.selectedModifiers.get()[name] || null;
|
|
220
222
|
return props.children({
|
|
221
223
|
name,
|
|
224
|
+
key,
|
|
222
225
|
type,
|
|
223
226
|
mandatory,
|
|
224
227
|
choices,
|
|
@@ -265,7 +268,7 @@ export function Choice(props) {
|
|
|
265
268
|
const modifierName = modifier.name || '';
|
|
266
269
|
const renderType = modifier.modifierRenderType;
|
|
267
270
|
// For TEXT_CHOICES, use choice.key; for SWATCH_CHOICES, use choice.name
|
|
268
|
-
const choiceValue = renderType === ModifierRenderType.TEXT_CHOICES
|
|
271
|
+
const choiceValue = renderType === productsV3.ModifierRenderType.TEXT_CHOICES
|
|
269
272
|
? choice.key || choice.name || ''
|
|
270
273
|
: choice.name || '';
|
|
271
274
|
const value = choice.name || ''; // Display name is always choice.name
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectedVariantServiceConfig } from '../../services/selected-variant-service.js';
|
|
2
|
-
import {
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface RootProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
selectedVariantServiceConfig?: SelectedVariantServiceConfig;
|
|
@@ -55,7 +55,7 @@ export interface OptionsProps {
|
|
|
55
55
|
*/
|
|
56
56
|
export interface OptionsRenderProps {
|
|
57
57
|
/** Array of product options */
|
|
58
|
-
options: ConnectedOption[];
|
|
58
|
+
options: productsV3.ConnectedOption[];
|
|
59
59
|
/** Whether product has options */
|
|
60
60
|
hasOptions: boolean;
|
|
61
61
|
/** Currently selected choices */
|
|
@@ -99,7 +99,7 @@ export declare function Options(props: OptionsProps): import("react").ReactNode;
|
|
|
99
99
|
*/
|
|
100
100
|
export interface OptionProps {
|
|
101
101
|
/** Product option data */
|
|
102
|
-
option: ConnectedOption;
|
|
102
|
+
option: productsV3.ConnectedOption;
|
|
103
103
|
/** Render prop function that receives option data */
|
|
104
104
|
children: (props: OptionRenderProps) => React.ReactNode;
|
|
105
105
|
}
|
|
@@ -107,10 +107,12 @@ export interface OptionProps {
|
|
|
107
107
|
* Render props for Option component
|
|
108
108
|
*/
|
|
109
109
|
export interface OptionRenderProps {
|
|
110
|
-
/** Option name */
|
|
110
|
+
/** Option name (may be translated) */
|
|
111
111
|
name: string;
|
|
112
|
+
/** Option key (unique identifier) */
|
|
113
|
+
key: string;
|
|
112
114
|
/** Array of choices for this option */
|
|
113
|
-
choices: ConnectedOptionChoice[];
|
|
115
|
+
choices: productsV3.ConnectedOptionChoice[];
|
|
114
116
|
/** Currently selected value for this option */
|
|
115
117
|
selectedValue: string | null;
|
|
116
118
|
/** Whether this option has choices */
|
|
@@ -153,9 +155,9 @@ export declare function Option(props: OptionProps): import("react").ReactNode;
|
|
|
153
155
|
*/
|
|
154
156
|
export interface ChoiceProps {
|
|
155
157
|
/** Product option data */
|
|
156
|
-
option: ConnectedOption;
|
|
158
|
+
option: productsV3.ConnectedOption;
|
|
157
159
|
/** Choice data */
|
|
158
|
-
choice: ConnectedOptionChoice;
|
|
160
|
+
choice: productsV3.ConnectedOptionChoice;
|
|
159
161
|
/** Render prop function that receives choice data */
|
|
160
162
|
children: (props: ChoiceRenderProps) => React.ReactNode;
|
|
161
163
|
}
|
|
@@ -165,6 +167,8 @@ export interface ChoiceProps {
|
|
|
165
167
|
export interface ChoiceRenderProps {
|
|
166
168
|
/** Choice value to display */
|
|
167
169
|
value: string;
|
|
170
|
+
/** Choice key (unique identifier) */
|
|
171
|
+
valueKey: string;
|
|
168
172
|
/** Whether this choice is currently selected */
|
|
169
173
|
isSelected: boolean;
|
|
170
174
|
/** Whether this choice is visible */
|
|
@@ -175,8 +179,10 @@ export interface ChoiceRenderProps {
|
|
|
175
179
|
isPreOrderEnabled: boolean;
|
|
176
180
|
/** Function to select this choice */
|
|
177
181
|
select: () => void;
|
|
178
|
-
/** Option name */
|
|
182
|
+
/** Option name (may be translated) */
|
|
179
183
|
optionName: string;
|
|
184
|
+
/** Option key (unique identifier) */
|
|
185
|
+
optionKey: string;
|
|
180
186
|
/** Choice value */
|
|
181
187
|
choiceValue: string;
|
|
182
188
|
}
|
|
@@ -223,7 +229,7 @@ export interface StockRenderProps {
|
|
|
223
229
|
/** Whether pre-order is enabled */
|
|
224
230
|
isPreOrderEnabled: boolean;
|
|
225
231
|
/** Raw inventory availability status */
|
|
226
|
-
availabilityStatus: InventoryAvailabilityStatus | string;
|
|
232
|
+
availabilityStatus: productsV3.InventoryAvailabilityStatus | string;
|
|
227
233
|
/** Whether stock tracking is enabled */
|
|
228
234
|
trackInventory: boolean;
|
|
229
235
|
/** Current variant id */
|
|
@@ -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 { createServicesMap } from '@wix/services-manager';
|
|
5
|
-
import {
|
|
5
|
+
import { productsV3 } from '@wix/stores';
|
|
6
6
|
/**
|
|
7
7
|
* Root component that provides the ProductVariantSelector service context to its children.
|
|
8
8
|
* This component sets up the necessary services for rendering and managing product variant selection.
|
|
@@ -122,10 +122,13 @@ export function Option(props) {
|
|
|
122
122
|
const selectedChoices = variantService.selectedChoices.get();
|
|
123
123
|
const { option } = props;
|
|
124
124
|
const name = option.name || '';
|
|
125
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
126
|
+
const key = option.key || name;
|
|
125
127
|
const choices = option.choicesSettings?.choices || [];
|
|
126
128
|
const selectedValue = selectedChoices[name] || null;
|
|
127
129
|
return props.children({
|
|
128
130
|
name,
|
|
131
|
+
key,
|
|
129
132
|
choices,
|
|
130
133
|
selectedValue,
|
|
131
134
|
hasChoices: choices.length > 0,
|
|
@@ -162,30 +165,36 @@ export function Choice(props) {
|
|
|
162
165
|
const selectedChoices = variantService.selectedChoices.get();
|
|
163
166
|
const { option, choice } = props;
|
|
164
167
|
const optionName = option.name || '';
|
|
168
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
169
|
+
const optionKey = option.key || optionName;
|
|
165
170
|
const choiceValue = choice.name || '';
|
|
166
|
-
|
|
171
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
172
|
+
const choiceKey = choice.key || choiceValue;
|
|
173
|
+
const isSelected = selectedChoices[optionKey] === choiceKey;
|
|
167
174
|
// Check if this choice is available based on current selections
|
|
168
|
-
const isVisible = variantService.isChoiceAvailable(
|
|
175
|
+
const isVisible = variantService.isChoiceAvailable(optionKey, choiceKey);
|
|
169
176
|
// Check if this choice results in an in-stock variant
|
|
170
|
-
const isInStock = variantService.isChoiceInStock(
|
|
177
|
+
const isInStock = variantService.isChoiceInStock(optionKey, choiceKey);
|
|
171
178
|
// Check if this choice is available for pre-order
|
|
172
|
-
const isPreOrderEnabled = variantService.isChoicePreOrderEnabled(
|
|
173
|
-
const
|
|
179
|
+
const isPreOrderEnabled = variantService.isChoicePreOrderEnabled(optionKey, choiceKey);
|
|
180
|
+
const valueKey = choiceKey;
|
|
174
181
|
const select = () => {
|
|
175
182
|
const newChoices = {
|
|
176
183
|
...selectedChoices,
|
|
177
|
-
[
|
|
184
|
+
[optionKey]: choiceKey,
|
|
178
185
|
};
|
|
179
186
|
variantService.setSelectedChoices(newChoices);
|
|
180
187
|
};
|
|
181
188
|
return props.children({
|
|
182
|
-
value,
|
|
189
|
+
value: choiceValue,
|
|
190
|
+
valueKey,
|
|
183
191
|
isSelected,
|
|
184
192
|
isVisible,
|
|
185
193
|
isInStock,
|
|
186
194
|
isPreOrderEnabled,
|
|
187
195
|
select,
|
|
188
196
|
optionName,
|
|
197
|
+
optionKey,
|
|
189
198
|
choiceValue,
|
|
190
199
|
});
|
|
191
200
|
}
|
|
@@ -230,8 +239,8 @@ export function Stock(props) {
|
|
|
230
239
|
const selectedQuantity = variantService.selectedQuantity.get();
|
|
231
240
|
// Return raw availability status - UI components will handle display conversion
|
|
232
241
|
const availabilityStatus = inStock
|
|
233
|
-
? InventoryAvailabilityStatus.IN_STOCK
|
|
234
|
-
: InventoryAvailabilityStatus.OUT_OF_STOCK;
|
|
242
|
+
? productsV3.InventoryAvailabilityStatus.IN_STOCK
|
|
243
|
+
: productsV3.InventoryAvailabilityStatus.OUT_OF_STOCK;
|
|
235
244
|
const incrementQuantity = () => {
|
|
236
245
|
variantService.incrementQuantity();
|
|
237
246
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
3
|
import { getCheckoutUrlForProduct } from '../utils/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { productsV3 } from '@wix/stores';
|
|
5
5
|
/**
|
|
6
6
|
* Service definition for the Buy Now service.
|
|
7
7
|
* This defines the reactive API contract for managing buy now functionality.
|
|
@@ -136,7 +136,7 @@ export const BuyNowServiceImplementation = implementService.withConfig()(BuyNowS
|
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
138
|
export const loadBuyNowServiceInitialData = async (productSlug, variantId) => {
|
|
139
|
-
const res = await getProductBySlug(productSlug, {
|
|
139
|
+
const res = await productsV3.getProductBySlug(productSlug, {
|
|
140
140
|
fields: ['CURRENCY'],
|
|
141
141
|
});
|
|
142
142
|
const product = res.product;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ServiceFactoryConfig } from '@wix/services-definitions';
|
|
2
2
|
import { type Signal, type ReadOnlySignal } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
3
|
+
import { productsV3 } from '@wix/stores';
|
|
4
4
|
export interface ModifierValue {
|
|
5
5
|
modifierName: string;
|
|
6
6
|
choiceValue?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineService, implementService, } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
3
|
+
import { productsV3 } from '@wix/stores';
|
|
4
4
|
import { ProductServiceDefinition } from './product-service.js';
|
|
5
5
|
export const ProductModifiersServiceDefinition = defineService('productModifiers');
|
|
6
6
|
export const ProductModifiersService = implementService.withConfig()(ProductModifiersServiceDefinition, ({ getService }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { type Signal } from '@wix/services-definitions/core-services/signals';
|
|
3
3
|
/**
|
|
4
4
|
* API interface for the Product service, providing reactive product data management.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
3
3
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
4
4
|
import { analytics } from '@wix/site';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Signal, type ReadOnlySignal } from '@wix/services-definitions/core-services/signals';
|
|
2
|
-
import
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface SelectedVariantServiceAPI {
|
|
4
4
|
selectedQuantity: Signal<number>;
|
|
5
5
|
selectedChoices: Signal<Record<string, string>>;
|
|
@@ -39,15 +39,15 @@ export interface SelectedVariantServiceAPI {
|
|
|
39
39
|
decrementQuantity: () => void;
|
|
40
40
|
selectVariantById: (id: string) => void;
|
|
41
41
|
resetSelections: () => void;
|
|
42
|
-
getAvailableChoicesForOption: (
|
|
43
|
-
getChoiceInfo: (
|
|
42
|
+
getAvailableChoicesForOption: (optionKey: string) => string[];
|
|
43
|
+
getChoiceInfo: (optionKey: string, choiceValue: string) => {
|
|
44
44
|
isAvailable: boolean;
|
|
45
45
|
isInStock: boolean;
|
|
46
46
|
isPreOrderEnabled: boolean;
|
|
47
47
|
};
|
|
48
|
-
isChoiceAvailable: (
|
|
49
|
-
isChoiceInStock: (
|
|
50
|
-
isChoicePreOrderEnabled: (
|
|
48
|
+
isChoiceAvailable: (optionKey: string, choiceValue: string) => boolean;
|
|
49
|
+
isChoiceInStock: (optionKey: string, choiceValue: string) => boolean;
|
|
50
|
+
isChoicePreOrderEnabled: (optionKey: string, choiceValue: string) => boolean;
|
|
51
51
|
hasAnySelections: () => boolean;
|
|
52
52
|
IsAllVariantsAreOutOfStock: () => boolean;
|
|
53
53
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
4
|
-
import * as inventoryItemsV3 from '@wix/auto_sdk_stores_inventory-items-v-3';
|
|
3
|
+
import { inventoryItemsV3, productsV3 } from '@wix/stores';
|
|
5
4
|
import { CurrentCartServiceDefinition } from '@wix/headless-ecom/services';
|
|
6
5
|
import { MediaGalleryServiceDefinition } from '@wix/headless-media/services';
|
|
7
6
|
import { ProductServiceDefinition } from './product-service.js';
|
|
@@ -202,8 +201,8 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
202
201
|
if (Object.keys(choices).length !==
|
|
203
202
|
Object.keys(variantChoices).length)
|
|
204
203
|
return false;
|
|
205
|
-
return Object.entries(choices).every(([
|
|
206
|
-
return variantChoices[
|
|
204
|
+
return Object.entries(choices).every(([optionKey, optionValue]) => {
|
|
205
|
+
return variantChoices[optionKey] === optionValue;
|
|
207
206
|
});
|
|
208
207
|
}) || null);
|
|
209
208
|
}));
|
|
@@ -410,7 +409,7 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
410
409
|
selectedQuantity.set(newQuantity);
|
|
411
410
|
};
|
|
412
411
|
// New methods for smart variant selection
|
|
413
|
-
const getAvailableChoicesForOption = (
|
|
412
|
+
const getAvailableChoicesForOption = (optionKey) => {
|
|
414
413
|
const currentChoices = selectedChoices.get();
|
|
415
414
|
const variantsList = variants.get();
|
|
416
415
|
// Get all possible choices for this option that result in valid variants
|
|
@@ -419,21 +418,21 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
419
418
|
const variantChoices = processVariantChoices(variant);
|
|
420
419
|
// Check if this variant matches all currently selected choices (except for the option we're checking)
|
|
421
420
|
const matchesOtherChoices = Object.entries(currentChoices)
|
|
422
|
-
.filter(([key]) => key !==
|
|
421
|
+
.filter(([key]) => key !== optionKey)
|
|
423
422
|
.every(([key, value]) => variantChoices[key] === value);
|
|
424
|
-
if (matchesOtherChoices && variantChoices[
|
|
425
|
-
availableChoices.add(variantChoices[
|
|
423
|
+
if (matchesOtherChoices && variantChoices[optionKey]) {
|
|
424
|
+
availableChoices.add(variantChoices[optionKey]);
|
|
426
425
|
}
|
|
427
426
|
});
|
|
428
427
|
return Array.from(availableChoices);
|
|
429
428
|
};
|
|
430
429
|
// Core method that provides both availability and stock info efficiently
|
|
431
|
-
const getChoiceInfo = (
|
|
430
|
+
const getChoiceInfo = (optionKey, choiceValue) => {
|
|
432
431
|
// Create hypothetical choices with this choice selected
|
|
433
432
|
const currentChoices = selectedChoices.get();
|
|
434
433
|
const hypotheticalChoices = {
|
|
435
434
|
...currentChoices,
|
|
436
|
-
[
|
|
435
|
+
[optionKey]: choiceValue,
|
|
437
436
|
};
|
|
438
437
|
// Get all variants and find one that matches these choices
|
|
439
438
|
const variantsList = variants.get();
|
|
@@ -459,14 +458,14 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
459
458
|
return { isAvailable, isInStock, isPreOrderEnabled };
|
|
460
459
|
};
|
|
461
460
|
// Simplified methods using the core getChoiceInfo
|
|
462
|
-
const isChoiceAvailable = (
|
|
463
|
-
return getChoiceInfo(
|
|
461
|
+
const isChoiceAvailable = (optionKey, choiceValue) => {
|
|
462
|
+
return getChoiceInfo(optionKey, choiceValue).isAvailable;
|
|
464
463
|
};
|
|
465
|
-
const isChoiceInStock = (
|
|
466
|
-
return getChoiceInfo(
|
|
464
|
+
const isChoiceInStock = (optionKey, choiceValue) => {
|
|
465
|
+
return getChoiceInfo(optionKey, choiceValue).isInStock;
|
|
467
466
|
};
|
|
468
|
-
const isChoicePreOrderEnabled = (
|
|
469
|
-
return getChoiceInfo(
|
|
467
|
+
const isChoicePreOrderEnabled = (optionKey, choiceValue) => {
|
|
468
|
+
return getChoiceInfo(optionKey, choiceValue).isPreOrderEnabled;
|
|
470
469
|
};
|
|
471
470
|
const hasAnySelections = () => {
|
|
472
471
|
const currentChoices = selectedChoices.get();
|
package/dist/react/Option.d.ts
CHANGED
package/dist/react/Product.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { AsChildChildren } from '@wix/headless-utils/react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { AsContent } from './types.js';
|
|
@@ -37,7 +37,7 @@ export type StockStatus = BasicStockStatus | 'can-pre-order';
|
|
|
37
37
|
*/
|
|
38
38
|
export interface ProductRootProps {
|
|
39
39
|
children: React.ReactNode;
|
|
40
|
-
product: V3Product;
|
|
40
|
+
product: productsV3.V3Product;
|
|
41
41
|
selectedVariant?: any;
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -268,7 +268,7 @@ export interface RawProps {
|
|
|
268
268
|
asChild?: boolean;
|
|
269
269
|
/** Custom render function when using asChild */
|
|
270
270
|
children?: AsChildChildren<{
|
|
271
|
-
product: V3Product;
|
|
271
|
+
product: productsV3.V3Product;
|
|
272
272
|
}>;
|
|
273
273
|
/** CSS classes to apply to the default element */
|
|
274
274
|
className?: string;
|
package/dist/react/Product.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
import { Quantity as QuantityComponent } from '@wix/headless-components/react';
|
|
4
4
|
import { Commerce } from '@wix/headless-ecom/react';
|
|
5
5
|
import { MediaGallery } from '@wix/headless-media/react';
|
|
@@ -406,15 +406,15 @@ export const Stock = React.forwardRef((props, ref) => {
|
|
|
406
406
|
let status;
|
|
407
407
|
let label;
|
|
408
408
|
switch (availabilityStatus) {
|
|
409
|
-
case InventoryAvailabilityStatus.IN_STOCK:
|
|
409
|
+
case productsV3.InventoryAvailabilityStatus.IN_STOCK:
|
|
410
410
|
status = 'in-stock';
|
|
411
411
|
label = finalLabels.inStock;
|
|
412
412
|
break;
|
|
413
|
-
case InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
413
|
+
case productsV3.InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
414
414
|
status = 'limited-stock';
|
|
415
415
|
label = finalLabels.limitedStock;
|
|
416
416
|
break;
|
|
417
|
-
case InventoryAvailabilityStatus.OUT_OF_STOCK:
|
|
417
|
+
case productsV3.InventoryAvailabilityStatus.OUT_OF_STOCK:
|
|
418
418
|
default:
|
|
419
419
|
status = 'out-of-stock';
|
|
420
420
|
label = finalLabels.outOfStock;
|
|
@@ -1046,12 +1046,12 @@ function getStockStatusMessage(inStock, isPreOrderEnabled, availabilityStatus, l
|
|
|
1046
1046
|
// Handle stock status based on availability
|
|
1047
1047
|
if (inStock) {
|
|
1048
1048
|
switch (availabilityStatus) {
|
|
1049
|
-
case InventoryAvailabilityStatus.IN_STOCK:
|
|
1049
|
+
case productsV3.InventoryAvailabilityStatus.IN_STOCK:
|
|
1050
1050
|
return {
|
|
1051
1051
|
status: 'in-stock',
|
|
1052
1052
|
label: labels.inStock,
|
|
1053
1053
|
};
|
|
1054
|
-
case InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
1054
|
+
case productsV3.InventoryAvailabilityStatus.PARTIALLY_OUT_OF_STOCK:
|
|
1055
1055
|
return {
|
|
1056
1056
|
status: 'limited-stock',
|
|
1057
1057
|
label: labels.limitedStock,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { V3Product } from '@wix/auto_sdk_stores_products-v-3';
|
|
2
1
|
import { Sort as SortPrimitive, GenericListTotalsRenderProps, GenericListLoadMoreRenderProps, ListVariant, GenericListRepeaterRenderProps } from '@wix/headless-components/react';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import type { ProductsListServiceConfig } from '../services/products-list-service.js';
|
|
@@ -9,7 +8,7 @@ import { AsChildChildren } from '@wix/headless-utils/react';
|
|
|
9
8
|
*/
|
|
10
9
|
export interface ProductListRootProps {
|
|
11
10
|
children: React.ReactNode;
|
|
12
|
-
products?: V3Product[];
|
|
11
|
+
products?: productsV3.V3Product[];
|
|
13
12
|
productsListConfig?: ProductsListServiceConfig;
|
|
14
13
|
className?: string;
|
|
15
14
|
variant?: ListVariant;
|
|
@@ -95,7 +94,7 @@ export declare const Products: React.ForwardRefExoticComponent<ProductsProps & R
|
|
|
95
94
|
/**
|
|
96
95
|
* Render props for ProductRepeater asChild pattern
|
|
97
96
|
*/
|
|
98
|
-
export type ProductRepeaterRenderProps = GenericListRepeaterRenderProps<V3Product>;
|
|
97
|
+
export type ProductRepeaterRenderProps = GenericListRepeaterRenderProps<productsV3.V3Product>;
|
|
99
98
|
/**
|
|
100
99
|
* Props for ProductList ProductRepeater component
|
|
101
100
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProductServiceConfig } from '../../services/product-service.js';
|
|
2
|
-
import
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface RootProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
productServiceConfig: ProductServiceConfig;
|
|
@@ -81,18 +81,18 @@ export interface ProductDescriptionProps {
|
|
|
81
81
|
*/
|
|
82
82
|
export interface ProductDescriptionRenderProps {
|
|
83
83
|
/** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
|
|
84
|
-
description: NonNullable<V3Product['description']>;
|
|
84
|
+
description: NonNullable<productsV3.V3Product['description']>;
|
|
85
85
|
/** Product description with plain html */
|
|
86
|
-
plainDescription: NonNullable<V3Product['plainDescription']>;
|
|
86
|
+
plainDescription: NonNullable<productsV3.V3Product['plainDescription']>;
|
|
87
87
|
}
|
|
88
88
|
/**
|
|
89
89
|
* Render props for ProductDescription component
|
|
90
90
|
*/
|
|
91
91
|
export interface ProductDescriptionRenderProps {
|
|
92
92
|
/** Product description using the RICOS (Rich Content Object) format. See https://dev.wix.com/docs/ricos/api-reference/ricos-document */
|
|
93
|
-
description: NonNullable<V3Product['description']>;
|
|
93
|
+
description: NonNullable<productsV3.V3Product['description']>;
|
|
94
94
|
/** Product description with plain html */
|
|
95
|
-
plainDescription: NonNullable<V3Product['plainDescription']>;
|
|
95
|
+
plainDescription: NonNullable<productsV3.V3Product['plainDescription']>;
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Headless component for product description display
|
|
@@ -129,15 +129,15 @@ export interface ProductMediaProps {
|
|
|
129
129
|
children: (props: ProductMediaRenderProps) => React.ReactNode;
|
|
130
130
|
}
|
|
131
131
|
export interface ProductMediaRenderProps {
|
|
132
|
-
mediaItems: ProductMedia[];
|
|
133
|
-
mainMedia?: ProductMedia;
|
|
132
|
+
mediaItems: productsV3.ProductMedia[];
|
|
133
|
+
mainMedia?: productsV3.ProductMedia;
|
|
134
134
|
}
|
|
135
135
|
export declare function Media(props: ProductMediaProps): import("react").ReactNode;
|
|
136
136
|
export interface ProductProps {
|
|
137
137
|
children: (props: ProductRenderProps) => React.ReactNode;
|
|
138
138
|
}
|
|
139
139
|
export interface ProductRenderProps {
|
|
140
|
-
product: V3Product;
|
|
140
|
+
product: productsV3.V3Product;
|
|
141
141
|
}
|
|
142
142
|
export declare function Content(props: ProductProps): import("react").ReactNode;
|
|
143
143
|
export interface LoadingProps {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
export interface RootProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
@@ -89,7 +89,7 @@ export interface ModifiersProps {
|
|
|
89
89
|
*/
|
|
90
90
|
export interface ModifiersRenderProps {
|
|
91
91
|
/** Array of product modifiers */
|
|
92
|
-
modifiers: ConnectedModifier[];
|
|
92
|
+
modifiers: productsV3.ConnectedModifier[];
|
|
93
93
|
/** Whether product has modifiers */
|
|
94
94
|
hasModifiers: boolean;
|
|
95
95
|
/** Currently selected modifier values */
|
|
@@ -148,7 +148,7 @@ export declare function Modifiers(props: ModifiersProps): import("react").ReactN
|
|
|
148
148
|
*/
|
|
149
149
|
export interface ModifierProps {
|
|
150
150
|
/** Product modifier data */
|
|
151
|
-
modifier: ConnectedModifier;
|
|
151
|
+
modifier: productsV3.ConnectedModifier;
|
|
152
152
|
/** Render prop function that receives modifier data */
|
|
153
153
|
children: (props: ModifierRenderProps) => React.ReactNode;
|
|
154
154
|
}
|
|
@@ -156,14 +156,16 @@ export interface ModifierProps {
|
|
|
156
156
|
* Render props for Modifier component
|
|
157
157
|
*/
|
|
158
158
|
export interface ModifierRenderProps {
|
|
159
|
-
/** Modifier name */
|
|
159
|
+
/** Modifier name (may be translated) */
|
|
160
160
|
name: string;
|
|
161
|
+
/** Modifier key (unique identifier) */
|
|
162
|
+
key: string;
|
|
161
163
|
/** Modifier type */
|
|
162
164
|
type: any;
|
|
163
165
|
/** Whether this modifier is mandatory */
|
|
164
166
|
mandatory: boolean;
|
|
165
167
|
/** Array of choices for this modifier (for choice-based modifiers) */
|
|
166
|
-
choices: ConnectedModifierChoice[];
|
|
168
|
+
choices: productsV3.ConnectedModifierChoice[];
|
|
167
169
|
/** Currently selected value for this modifier */
|
|
168
170
|
selectedValue: any;
|
|
169
171
|
/** Whether this modifier has choices */
|
|
@@ -227,9 +229,9 @@ export declare function Modifier(props: ModifierProps): import("react").ReactNod
|
|
|
227
229
|
*/
|
|
228
230
|
export interface ChoiceProps {
|
|
229
231
|
/** Product modifier data */
|
|
230
|
-
modifier: ConnectedModifier;
|
|
232
|
+
modifier: productsV3.ConnectedModifier;
|
|
231
233
|
/** Choice data */
|
|
232
|
-
choice: ConnectedModifierChoice;
|
|
234
|
+
choice: productsV3.ConnectedModifierChoice;
|
|
233
235
|
/** Render prop function that receives choice data */
|
|
234
236
|
children: (props: ChoiceRenderProps) => React.ReactNode;
|
|
235
237
|
}
|
|
@@ -288,7 +290,7 @@ export declare function Choice(props: ChoiceProps): import("react").ReactNode;
|
|
|
288
290
|
*/
|
|
289
291
|
export interface FreeTextProps {
|
|
290
292
|
/** Product modifier data */
|
|
291
|
-
modifier: ConnectedModifier;
|
|
293
|
+
modifier: productsV3.ConnectedModifier;
|
|
292
294
|
/** Render prop function that receives free text data */
|
|
293
295
|
children: (props: FreeTextRenderProps) => React.ReactNode;
|
|
294
296
|
}
|
|
@@ -354,7 +356,7 @@ export declare function FreeText(props: FreeTextProps): import("react").ReactNod
|
|
|
354
356
|
*/
|
|
355
357
|
export interface ToggleFreeTextProps {
|
|
356
358
|
/** Product modifier data */
|
|
357
|
-
modifier: ConnectedModifier;
|
|
359
|
+
modifier: productsV3.ConnectedModifier;
|
|
358
360
|
/** Render prop function that receives toggle data */
|
|
359
361
|
children: (props: ToggleFreeTextRenderProps) => React.ReactNode;
|
|
360
362
|
}
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useService, WixServices } from '@wix/services-manager-react';
|
|
4
4
|
import { ProductModifiersServiceDefinition, ProductModifiersService, } from '../../services/product-modifiers-service.js';
|
|
5
|
-
import {
|
|
5
|
+
import { productsV3 } from '@wix/stores';
|
|
6
6
|
import { createServicesMap } from '@wix/services-manager';
|
|
7
7
|
/**
|
|
8
8
|
* Root component that provides the ProductModifiers service context to its children.
|
|
@@ -208,17 +208,20 @@ export function Modifier(props) {
|
|
|
208
208
|
const modifiersService = useModifiersService();
|
|
209
209
|
const { modifier } = props;
|
|
210
210
|
const name = modifier.name || '';
|
|
211
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
212
|
+
const key = modifier.key || name;
|
|
211
213
|
const type = modifier.modifierRenderType;
|
|
212
214
|
const mandatory = modifier.mandatory || false;
|
|
213
215
|
const choices = modifier.choicesSettings?.choices || [];
|
|
214
216
|
const hasChoices = choices.length > 0;
|
|
215
|
-
const isFreeText = type === ModifierRenderType.FREE_TEXT;
|
|
217
|
+
const isFreeText = type === productsV3.ModifierRenderType.FREE_TEXT;
|
|
216
218
|
const freeTextSettings = modifier.freeTextSettings;
|
|
217
219
|
const maxChars = freeTextSettings?.maxLength;
|
|
218
220
|
const placeholder = freeTextSettings?.placeholder;
|
|
219
221
|
const selectedValue = modifiersService?.selectedModifiers.get()[name] || null;
|
|
220
222
|
return props.children({
|
|
221
223
|
name,
|
|
224
|
+
key,
|
|
222
225
|
type,
|
|
223
226
|
mandatory,
|
|
224
227
|
choices,
|
|
@@ -265,7 +268,7 @@ export function Choice(props) {
|
|
|
265
268
|
const modifierName = modifier.name || '';
|
|
266
269
|
const renderType = modifier.modifierRenderType;
|
|
267
270
|
// For TEXT_CHOICES, use choice.key; for SWATCH_CHOICES, use choice.name
|
|
268
|
-
const choiceValue = renderType === ModifierRenderType.TEXT_CHOICES
|
|
271
|
+
const choiceValue = renderType === productsV3.ModifierRenderType.TEXT_CHOICES
|
|
269
272
|
? choice.key || choice.name || ''
|
|
270
273
|
: choice.name || '';
|
|
271
274
|
const value = choice.name || ''; // Display name is always choice.name
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SelectedVariantServiceConfig } from '../../services/selected-variant-service.js';
|
|
2
|
-
import {
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface RootProps {
|
|
4
4
|
children: React.ReactNode;
|
|
5
5
|
selectedVariantServiceConfig?: SelectedVariantServiceConfig;
|
|
@@ -55,7 +55,7 @@ export interface OptionsProps {
|
|
|
55
55
|
*/
|
|
56
56
|
export interface OptionsRenderProps {
|
|
57
57
|
/** Array of product options */
|
|
58
|
-
options: ConnectedOption[];
|
|
58
|
+
options: productsV3.ConnectedOption[];
|
|
59
59
|
/** Whether product has options */
|
|
60
60
|
hasOptions: boolean;
|
|
61
61
|
/** Currently selected choices */
|
|
@@ -99,7 +99,7 @@ export declare function Options(props: OptionsProps): import("react").ReactNode;
|
|
|
99
99
|
*/
|
|
100
100
|
export interface OptionProps {
|
|
101
101
|
/** Product option data */
|
|
102
|
-
option: ConnectedOption;
|
|
102
|
+
option: productsV3.ConnectedOption;
|
|
103
103
|
/** Render prop function that receives option data */
|
|
104
104
|
children: (props: OptionRenderProps) => React.ReactNode;
|
|
105
105
|
}
|
|
@@ -107,10 +107,12 @@ export interface OptionProps {
|
|
|
107
107
|
* Render props for Option component
|
|
108
108
|
*/
|
|
109
109
|
export interface OptionRenderProps {
|
|
110
|
-
/** Option name */
|
|
110
|
+
/** Option name (may be translated) */
|
|
111
111
|
name: string;
|
|
112
|
+
/** Option key (unique identifier) */
|
|
113
|
+
key: string;
|
|
112
114
|
/** Array of choices for this option */
|
|
113
|
-
choices: ConnectedOptionChoice[];
|
|
115
|
+
choices: productsV3.ConnectedOptionChoice[];
|
|
114
116
|
/** Currently selected value for this option */
|
|
115
117
|
selectedValue: string | null;
|
|
116
118
|
/** Whether this option has choices */
|
|
@@ -153,9 +155,9 @@ export declare function Option(props: OptionProps): import("react").ReactNode;
|
|
|
153
155
|
*/
|
|
154
156
|
export interface ChoiceProps {
|
|
155
157
|
/** Product option data */
|
|
156
|
-
option: ConnectedOption;
|
|
158
|
+
option: productsV3.ConnectedOption;
|
|
157
159
|
/** Choice data */
|
|
158
|
-
choice: ConnectedOptionChoice;
|
|
160
|
+
choice: productsV3.ConnectedOptionChoice;
|
|
159
161
|
/** Render prop function that receives choice data */
|
|
160
162
|
children: (props: ChoiceRenderProps) => React.ReactNode;
|
|
161
163
|
}
|
|
@@ -165,6 +167,8 @@ export interface ChoiceProps {
|
|
|
165
167
|
export interface ChoiceRenderProps {
|
|
166
168
|
/** Choice value to display */
|
|
167
169
|
value: string;
|
|
170
|
+
/** Choice key (unique identifier) */
|
|
171
|
+
valueKey: string;
|
|
168
172
|
/** Whether this choice is currently selected */
|
|
169
173
|
isSelected: boolean;
|
|
170
174
|
/** Whether this choice is visible */
|
|
@@ -175,8 +179,10 @@ export interface ChoiceRenderProps {
|
|
|
175
179
|
isPreOrderEnabled: boolean;
|
|
176
180
|
/** Function to select this choice */
|
|
177
181
|
select: () => void;
|
|
178
|
-
/** Option name */
|
|
182
|
+
/** Option name (may be translated) */
|
|
179
183
|
optionName: string;
|
|
184
|
+
/** Option key (unique identifier) */
|
|
185
|
+
optionKey: string;
|
|
180
186
|
/** Choice value */
|
|
181
187
|
choiceValue: string;
|
|
182
188
|
}
|
|
@@ -223,7 +229,7 @@ export interface StockRenderProps {
|
|
|
223
229
|
/** Whether pre-order is enabled */
|
|
224
230
|
isPreOrderEnabled: boolean;
|
|
225
231
|
/** Raw inventory availability status */
|
|
226
|
-
availabilityStatus: InventoryAvailabilityStatus | string;
|
|
232
|
+
availabilityStatus: productsV3.InventoryAvailabilityStatus | string;
|
|
227
233
|
/** Whether stock tracking is enabled */
|
|
228
234
|
trackInventory: boolean;
|
|
229
235
|
/** Current variant id */
|
|
@@ -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 { createServicesMap } from '@wix/services-manager';
|
|
5
|
-
import {
|
|
5
|
+
import { productsV3 } from '@wix/stores';
|
|
6
6
|
/**
|
|
7
7
|
* Root component that provides the ProductVariantSelector service context to its children.
|
|
8
8
|
* This component sets up the necessary services for rendering and managing product variant selection.
|
|
@@ -122,10 +122,13 @@ export function Option(props) {
|
|
|
122
122
|
const selectedChoices = variantService.selectedChoices.get();
|
|
123
123
|
const { option } = props;
|
|
124
124
|
const name = option.name || '';
|
|
125
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
126
|
+
const key = option.key || name;
|
|
125
127
|
const choices = option.choicesSettings?.choices || [];
|
|
126
128
|
const selectedValue = selectedChoices[name] || null;
|
|
127
129
|
return props.children({
|
|
128
130
|
name,
|
|
131
|
+
key,
|
|
129
132
|
choices,
|
|
130
133
|
selectedValue,
|
|
131
134
|
hasChoices: choices.length > 0,
|
|
@@ -162,30 +165,36 @@ export function Choice(props) {
|
|
|
162
165
|
const selectedChoices = variantService.selectedChoices.get();
|
|
163
166
|
const { option, choice } = props;
|
|
164
167
|
const optionName = option.name || '';
|
|
168
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
169
|
+
const optionKey = option.key || optionName;
|
|
165
170
|
const choiceValue = choice.name || '';
|
|
166
|
-
|
|
171
|
+
// @ts-expect-error - This field is currently INTERNAL but will be public in the future
|
|
172
|
+
const choiceKey = choice.key || choiceValue;
|
|
173
|
+
const isSelected = selectedChoices[optionKey] === choiceKey;
|
|
167
174
|
// Check if this choice is available based on current selections
|
|
168
|
-
const isVisible = variantService.isChoiceAvailable(
|
|
175
|
+
const isVisible = variantService.isChoiceAvailable(optionKey, choiceKey);
|
|
169
176
|
// Check if this choice results in an in-stock variant
|
|
170
|
-
const isInStock = variantService.isChoiceInStock(
|
|
177
|
+
const isInStock = variantService.isChoiceInStock(optionKey, choiceKey);
|
|
171
178
|
// Check if this choice is available for pre-order
|
|
172
|
-
const isPreOrderEnabled = variantService.isChoicePreOrderEnabled(
|
|
173
|
-
const
|
|
179
|
+
const isPreOrderEnabled = variantService.isChoicePreOrderEnabled(optionKey, choiceKey);
|
|
180
|
+
const valueKey = choiceKey;
|
|
174
181
|
const select = () => {
|
|
175
182
|
const newChoices = {
|
|
176
183
|
...selectedChoices,
|
|
177
|
-
[
|
|
184
|
+
[optionKey]: choiceKey,
|
|
178
185
|
};
|
|
179
186
|
variantService.setSelectedChoices(newChoices);
|
|
180
187
|
};
|
|
181
188
|
return props.children({
|
|
182
|
-
value,
|
|
189
|
+
value: choiceValue,
|
|
190
|
+
valueKey,
|
|
183
191
|
isSelected,
|
|
184
192
|
isVisible,
|
|
185
193
|
isInStock,
|
|
186
194
|
isPreOrderEnabled,
|
|
187
195
|
select,
|
|
188
196
|
optionName,
|
|
197
|
+
optionKey,
|
|
189
198
|
choiceValue,
|
|
190
199
|
});
|
|
191
200
|
}
|
|
@@ -230,8 +239,8 @@ export function Stock(props) {
|
|
|
230
239
|
const selectedQuantity = variantService.selectedQuantity.get();
|
|
231
240
|
// Return raw availability status - UI components will handle display conversion
|
|
232
241
|
const availabilityStatus = inStock
|
|
233
|
-
? InventoryAvailabilityStatus.IN_STOCK
|
|
234
|
-
: InventoryAvailabilityStatus.OUT_OF_STOCK;
|
|
242
|
+
? productsV3.InventoryAvailabilityStatus.IN_STOCK
|
|
243
|
+
: productsV3.InventoryAvailabilityStatus.OUT_OF_STOCK;
|
|
235
244
|
const incrementQuantity = () => {
|
|
236
245
|
variantService.incrementQuantity();
|
|
237
246
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
3
|
import { getCheckoutUrlForProduct } from '../utils/index.js';
|
|
4
|
-
import {
|
|
4
|
+
import { productsV3 } from '@wix/stores';
|
|
5
5
|
/**
|
|
6
6
|
* Service definition for the Buy Now service.
|
|
7
7
|
* This defines the reactive API contract for managing buy now functionality.
|
|
@@ -136,7 +136,7 @@ export const BuyNowServiceImplementation = implementService.withConfig()(BuyNowS
|
|
|
136
136
|
* ```
|
|
137
137
|
*/
|
|
138
138
|
export const loadBuyNowServiceInitialData = async (productSlug, variantId) => {
|
|
139
|
-
const res = await getProductBySlug(productSlug, {
|
|
139
|
+
const res = await productsV3.getProductBySlug(productSlug, {
|
|
140
140
|
fields: ['CURRENCY'],
|
|
141
141
|
});
|
|
142
142
|
const product = res.product;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ServiceFactoryConfig } from '@wix/services-definitions';
|
|
2
2
|
import { type Signal, type ReadOnlySignal } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
3
|
+
import { productsV3 } from '@wix/stores';
|
|
4
4
|
export interface ModifierValue {
|
|
5
5
|
modifierName: string;
|
|
6
6
|
choiceValue?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineService, implementService, } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
3
|
+
import { productsV3 } from '@wix/stores';
|
|
4
4
|
import { ProductServiceDefinition } from './product-service.js';
|
|
5
5
|
export const ProductModifiersServiceDefinition = defineService('productModifiers');
|
|
6
6
|
export const ProductModifiersService = implementService.withConfig()(ProductModifiersServiceDefinition, ({ getService }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { type Signal } from '@wix/services-definitions/core-services/signals';
|
|
3
3
|
/**
|
|
4
4
|
* API interface for the Product service, providing reactive product data management.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { productsV3 } from '@wix/stores';
|
|
2
2
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
3
3
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
4
4
|
import { analytics } from '@wix/site';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Signal, type ReadOnlySignal } from '@wix/services-definitions/core-services/signals';
|
|
2
|
-
import
|
|
2
|
+
import { productsV3 } from '@wix/stores';
|
|
3
3
|
export interface SelectedVariantServiceAPI {
|
|
4
4
|
selectedQuantity: Signal<number>;
|
|
5
5
|
selectedChoices: Signal<Record<string, string>>;
|
|
@@ -39,15 +39,15 @@ export interface SelectedVariantServiceAPI {
|
|
|
39
39
|
decrementQuantity: () => void;
|
|
40
40
|
selectVariantById: (id: string) => void;
|
|
41
41
|
resetSelections: () => void;
|
|
42
|
-
getAvailableChoicesForOption: (
|
|
43
|
-
getChoiceInfo: (
|
|
42
|
+
getAvailableChoicesForOption: (optionKey: string) => string[];
|
|
43
|
+
getChoiceInfo: (optionKey: string, choiceValue: string) => {
|
|
44
44
|
isAvailable: boolean;
|
|
45
45
|
isInStock: boolean;
|
|
46
46
|
isPreOrderEnabled: boolean;
|
|
47
47
|
};
|
|
48
|
-
isChoiceAvailable: (
|
|
49
|
-
isChoiceInStock: (
|
|
50
|
-
isChoicePreOrderEnabled: (
|
|
48
|
+
isChoiceAvailable: (optionKey: string, choiceValue: string) => boolean;
|
|
49
|
+
isChoiceInStock: (optionKey: string, choiceValue: string) => boolean;
|
|
50
|
+
isChoicePreOrderEnabled: (optionKey: string, choiceValue: string) => boolean;
|
|
51
51
|
hasAnySelections: () => boolean;
|
|
52
52
|
IsAllVariantsAreOutOfStock: () => boolean;
|
|
53
53
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { defineService, implementService } from '@wix/services-definitions';
|
|
2
2
|
import { SignalsServiceDefinition, } from '@wix/services-definitions/core-services/signals';
|
|
3
|
-
import
|
|
4
|
-
import * as inventoryItemsV3 from '@wix/auto_sdk_stores_inventory-items-v-3';
|
|
3
|
+
import { inventoryItemsV3, productsV3 } from '@wix/stores';
|
|
5
4
|
import { CurrentCartServiceDefinition } from '@wix/headless-ecom/services';
|
|
6
5
|
import { MediaGalleryServiceDefinition } from '@wix/headless-media/services';
|
|
7
6
|
import { ProductServiceDefinition } from './product-service.js';
|
|
@@ -202,8 +201,8 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
202
201
|
if (Object.keys(choices).length !==
|
|
203
202
|
Object.keys(variantChoices).length)
|
|
204
203
|
return false;
|
|
205
|
-
return Object.entries(choices).every(([
|
|
206
|
-
return variantChoices[
|
|
204
|
+
return Object.entries(choices).every(([optionKey, optionValue]) => {
|
|
205
|
+
return variantChoices[optionKey] === optionValue;
|
|
207
206
|
});
|
|
208
207
|
}) || null);
|
|
209
208
|
}));
|
|
@@ -410,7 +409,7 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
410
409
|
selectedQuantity.set(newQuantity);
|
|
411
410
|
};
|
|
412
411
|
// New methods for smart variant selection
|
|
413
|
-
const getAvailableChoicesForOption = (
|
|
412
|
+
const getAvailableChoicesForOption = (optionKey) => {
|
|
414
413
|
const currentChoices = selectedChoices.get();
|
|
415
414
|
const variantsList = variants.get();
|
|
416
415
|
// Get all possible choices for this option that result in valid variants
|
|
@@ -419,21 +418,21 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
419
418
|
const variantChoices = processVariantChoices(variant);
|
|
420
419
|
// Check if this variant matches all currently selected choices (except for the option we're checking)
|
|
421
420
|
const matchesOtherChoices = Object.entries(currentChoices)
|
|
422
|
-
.filter(([key]) => key !==
|
|
421
|
+
.filter(([key]) => key !== optionKey)
|
|
423
422
|
.every(([key, value]) => variantChoices[key] === value);
|
|
424
|
-
if (matchesOtherChoices && variantChoices[
|
|
425
|
-
availableChoices.add(variantChoices[
|
|
423
|
+
if (matchesOtherChoices && variantChoices[optionKey]) {
|
|
424
|
+
availableChoices.add(variantChoices[optionKey]);
|
|
426
425
|
}
|
|
427
426
|
});
|
|
428
427
|
return Array.from(availableChoices);
|
|
429
428
|
};
|
|
430
429
|
// Core method that provides both availability and stock info efficiently
|
|
431
|
-
const getChoiceInfo = (
|
|
430
|
+
const getChoiceInfo = (optionKey, choiceValue) => {
|
|
432
431
|
// Create hypothetical choices with this choice selected
|
|
433
432
|
const currentChoices = selectedChoices.get();
|
|
434
433
|
const hypotheticalChoices = {
|
|
435
434
|
...currentChoices,
|
|
436
|
-
[
|
|
435
|
+
[optionKey]: choiceValue,
|
|
437
436
|
};
|
|
438
437
|
// Get all variants and find one that matches these choices
|
|
439
438
|
const variantsList = variants.get();
|
|
@@ -459,14 +458,14 @@ export const SelectedVariantService = implementService.withConfig()(SelectedVari
|
|
|
459
458
|
return { isAvailable, isInStock, isPreOrderEnabled };
|
|
460
459
|
};
|
|
461
460
|
// Simplified methods using the core getChoiceInfo
|
|
462
|
-
const isChoiceAvailable = (
|
|
463
|
-
return getChoiceInfo(
|
|
461
|
+
const isChoiceAvailable = (optionKey, choiceValue) => {
|
|
462
|
+
return getChoiceInfo(optionKey, choiceValue).isAvailable;
|
|
464
463
|
};
|
|
465
|
-
const isChoiceInStock = (
|
|
466
|
-
return getChoiceInfo(
|
|
464
|
+
const isChoiceInStock = (optionKey, choiceValue) => {
|
|
465
|
+
return getChoiceInfo(optionKey, choiceValue).isInStock;
|
|
467
466
|
};
|
|
468
|
-
const isChoicePreOrderEnabled = (
|
|
469
|
-
return getChoiceInfo(
|
|
467
|
+
const isChoicePreOrderEnabled = (optionKey, choiceValue) => {
|
|
468
|
+
return getChoiceInfo(optionKey, choiceValue).isPreOrderEnabled;
|
|
470
469
|
};
|
|
471
470
|
const hasAnySelections = () => {
|
|
472
471
|
const currentChoices = selectedChoices.get();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/headless-stores",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.107",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@vitest/ui": "^3.1.4",
|
|
51
51
|
"@wix/categories": "^1.0.133",
|
|
52
52
|
"@wix/headless-components": "0.0.0",
|
|
53
|
-
"@wix/stores": "^1.0.
|
|
53
|
+
"@wix/stores": "^1.0.606",
|
|
54
54
|
"jsdom": "^26.1.0",
|
|
55
55
|
"prettier": "^3.4.2",
|
|
56
56
|
"typescript": "^5.8.3",
|
|
@@ -60,11 +60,7 @@
|
|
|
60
60
|
"@radix-ui/react-slot": "^1.2.3",
|
|
61
61
|
"@wix/auto_sdk_bookings_availability-calendar": "^1.0.155",
|
|
62
62
|
"@wix/auto_sdk_categories_categories": "^1.0.62",
|
|
63
|
-
"@wix/
|
|
64
|
-
"@wix/auto_sdk_stores_inventory-items-v-3": "^1.0.26",
|
|
65
|
-
"@wix/auto_sdk_stores_products-v-3": "^1.0.53",
|
|
66
|
-
"@wix/auto_sdk_stores_read-only-variants-v-3": "^1.0.23",
|
|
67
|
-
"@wix/ecom": "^1.0.1461",
|
|
63
|
+
"@wix/ecom": "^1.0.1560",
|
|
68
64
|
"@wix/essentials": "^0.1.24",
|
|
69
65
|
"@wix/headless-ecom": "0.0.38",
|
|
70
66
|
"@wix/headless-media": "0.0.18",
|
|
@@ -72,7 +68,8 @@
|
|
|
72
68
|
"@wix/redirects": "^1.0.83",
|
|
73
69
|
"@wix/services-definitions": "^0.1.4",
|
|
74
70
|
"@wix/services-manager-react": "^0.1.26",
|
|
75
|
-
"@wix/site": "^1.
|
|
71
|
+
"@wix/site": "^1.37.0",
|
|
72
|
+
"@wix/stores": "^1.0.606"
|
|
76
73
|
},
|
|
77
74
|
"peerDependencies": {
|
|
78
75
|
"@wix/headless-components": "^0.0.0"
|
|
@@ -87,5 +84,5 @@
|
|
|
87
84
|
"groupId": "com.wixpress.headless-components"
|
|
88
85
|
}
|
|
89
86
|
},
|
|
90
|
-
"falconPackageHash": "
|
|
87
|
+
"falconPackageHash": "4a62e19798c3f18e7717f4cd36622647f56a785719bee0cba904bc33"
|
|
91
88
|
}
|