@gem-sdk/core 2.0.0-dev.723 → 2.0.0-dev.724
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.
|
@@ -139,7 +139,7 @@ const createProductStoreProvider = (data)=>zustand.createStore((set, get)=>({
|
|
|
139
139
|
});
|
|
140
140
|
}
|
|
141
141
|
}));
|
|
142
|
-
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct })=>{
|
|
142
|
+
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct, hasPreSelected })=>{
|
|
143
143
|
const uiqueId = react.useId();
|
|
144
144
|
const store = react.useMemo(()=>{
|
|
145
145
|
let selectedOptions = {};
|
|
@@ -166,14 +166,16 @@ const ProductProvider = ({ children, product, initialVariantId, quantity = 1, is
|
|
|
166
166
|
selectedOptions,
|
|
167
167
|
uiqueId,
|
|
168
168
|
featuredImageGlobal,
|
|
169
|
-
isSyncProduct
|
|
169
|
+
isSyncProduct,
|
|
170
|
+
hasPreSelected
|
|
170
171
|
});
|
|
171
172
|
}, [
|
|
172
|
-
initialVariantId,
|
|
173
173
|
product,
|
|
174
174
|
quantity,
|
|
175
175
|
uiqueId,
|
|
176
|
-
isSyncProduct
|
|
176
|
+
isSyncProduct,
|
|
177
|
+
hasPreSelected,
|
|
178
|
+
initialVariantId
|
|
177
179
|
]);
|
|
178
180
|
return /*#__PURE__*/ jsxRuntime.jsx(ProductContext.Provider, {
|
|
179
181
|
value: store,
|
|
@@ -137,7 +137,7 @@ const createProductStoreProvider = (data)=>createStore((set, get)=>({
|
|
|
137
137
|
});
|
|
138
138
|
}
|
|
139
139
|
}));
|
|
140
|
-
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct })=>{
|
|
140
|
+
const ProductProvider = ({ children, product, initialVariantId, quantity = 1, isSyncProduct, hasPreSelected })=>{
|
|
141
141
|
const uiqueId = useId();
|
|
142
142
|
const store = useMemo(()=>{
|
|
143
143
|
let selectedOptions = {};
|
|
@@ -164,14 +164,16 @@ const ProductProvider = ({ children, product, initialVariantId, quantity = 1, is
|
|
|
164
164
|
selectedOptions,
|
|
165
165
|
uiqueId,
|
|
166
166
|
featuredImageGlobal,
|
|
167
|
-
isSyncProduct
|
|
167
|
+
isSyncProduct,
|
|
168
|
+
hasPreSelected
|
|
168
169
|
});
|
|
169
170
|
}, [
|
|
170
|
-
initialVariantId,
|
|
171
171
|
product,
|
|
172
172
|
quantity,
|
|
173
173
|
uiqueId,
|
|
174
|
-
isSyncProduct
|
|
174
|
+
isSyncProduct,
|
|
175
|
+
hasPreSelected,
|
|
176
|
+
initialVariantId
|
|
175
177
|
]);
|
|
176
178
|
return /*#__PURE__*/ jsx(ProductContext.Provider, {
|
|
177
179
|
value: store,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -34816,7 +34816,7 @@ type ProductContextProps = {
|
|
|
34816
34816
|
isChangeSelectedOption?: boolean;
|
|
34817
34817
|
setIsChangeSelectedOption: (value: boolean) => void;
|
|
34818
34818
|
};
|
|
34819
|
-
type ProductProviderProps = Pick<ProductContextProps, 'product' | 'quantity' | 'selectedOptions' | 'isSyncProduct'> & {
|
|
34819
|
+
type ProductProviderProps = Pick<ProductContextProps, 'product' | 'quantity' | 'selectedOptions' | 'isSyncProduct' | 'hasPreSelected'> & {
|
|
34820
34820
|
initialVariantId?: string;
|
|
34821
34821
|
readOnly?: boolean;
|
|
34822
34822
|
children: React.ReactNode;
|