@gem-sdk/pages 1.53.0-dev.161 → 1.53.0-dev.165
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.
|
@@ -19,6 +19,7 @@ const Toolbox = ()=>{
|
|
|
19
19
|
const provider = core.useShopStore((s)=>s.provider);
|
|
20
20
|
const changeStorefrontInfo = core.useShopStore((s)=>s.changeStorefrontInfo);
|
|
21
21
|
const setDynamicProduct = core.usePageStore((s)=>s.setDynamicProduct);
|
|
22
|
+
const setNumberOfProduct = core.usePageStore((s)=>s.setNumberOfProduct);
|
|
22
23
|
const setPostPurchaseProductOffers = core.usePageStore((s)=>s.setPostPurchaseProductOffers);
|
|
23
24
|
const setSalePageProductId = core.usePageStore((s)=>s.setSalePageProductId);
|
|
24
25
|
const setDynamicCollection = core.usePageStore((s)=>s.setDynamicCollection);
|
|
@@ -306,6 +307,13 @@ const Toolbox = ()=>{
|
|
|
306
307
|
}, [
|
|
307
308
|
setDynamicProduct
|
|
308
309
|
]);
|
|
310
|
+
const onUpdateNumberOfProduct = react.useCallback((e)=>{
|
|
311
|
+
const numberOfProduct = e.detail;
|
|
312
|
+
if (!numberOfProduct) return;
|
|
313
|
+
setNumberOfProduct(numberOfProduct);
|
|
314
|
+
}, [
|
|
315
|
+
setNumberOfProduct
|
|
316
|
+
]);
|
|
309
317
|
const onUpdateDynamicCollection = react.useCallback((e)=>{
|
|
310
318
|
const collection = e.detail;
|
|
311
319
|
if (!collection) return;
|
|
@@ -396,6 +404,7 @@ const Toolbox = ()=>{
|
|
|
396
404
|
window.addEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
397
405
|
window.addEventListener('update-shop-plan', onUpdateShopPlan);
|
|
398
406
|
window.addEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
407
|
+
window.addEventListener('set-number-of-product', onUpdateNumberOfProduct);
|
|
399
408
|
window.addEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
400
409
|
window.addEventListener('update-item-name', onUpdateItemName);
|
|
401
410
|
window.addEventListener('update-item-attribute', onUpdateItemAttribute);
|
|
@@ -419,6 +428,7 @@ const Toolbox = ()=>{
|
|
|
419
428
|
window.removeEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
420
429
|
window.removeEventListener('update-shop-plan', onUpdateShopPlan);
|
|
421
430
|
window.removeEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
431
|
+
window.removeEventListener('set-number-of-product', onUpdateNumberOfProduct);
|
|
422
432
|
window.removeEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
423
433
|
window.removeEventListener('update-item-name', onUpdateItemName);
|
|
424
434
|
window.removeEventListener('update-item-attribute', onUpdateItemAttribute);
|
|
@@ -452,7 +462,8 @@ const Toolbox = ()=>{
|
|
|
452
462
|
onUpdateInteractionItem,
|
|
453
463
|
onUpdateInteractionIsSelectOnPage,
|
|
454
464
|
onUpdateInteractionSettingType,
|
|
455
|
-
onUpdateFontType
|
|
465
|
+
onUpdateFontType,
|
|
466
|
+
onUpdateNumberOfProduct
|
|
456
467
|
]);
|
|
457
468
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
458
469
|
className: "toolbox"
|
|
@@ -15,6 +15,7 @@ const Toolbox = ()=>{
|
|
|
15
15
|
const provider = useShopStore((s)=>s.provider);
|
|
16
16
|
const changeStorefrontInfo = useShopStore((s)=>s.changeStorefrontInfo);
|
|
17
17
|
const setDynamicProduct = usePageStore((s)=>s.setDynamicProduct);
|
|
18
|
+
const setNumberOfProduct = usePageStore((s)=>s.setNumberOfProduct);
|
|
18
19
|
const setPostPurchaseProductOffers = usePageStore((s)=>s.setPostPurchaseProductOffers);
|
|
19
20
|
const setSalePageProductId = usePageStore((s)=>s.setSalePageProductId);
|
|
20
21
|
const setDynamicCollection = usePageStore((s)=>s.setDynamicCollection);
|
|
@@ -302,6 +303,13 @@ const Toolbox = ()=>{
|
|
|
302
303
|
}, [
|
|
303
304
|
setDynamicProduct
|
|
304
305
|
]);
|
|
306
|
+
const onUpdateNumberOfProduct = useCallback((e)=>{
|
|
307
|
+
const numberOfProduct = e.detail;
|
|
308
|
+
if (!numberOfProduct) return;
|
|
309
|
+
setNumberOfProduct(numberOfProduct);
|
|
310
|
+
}, [
|
|
311
|
+
setNumberOfProduct
|
|
312
|
+
]);
|
|
305
313
|
const onUpdateDynamicCollection = useCallback((e)=>{
|
|
306
314
|
const collection = e.detail;
|
|
307
315
|
if (!collection) return;
|
|
@@ -392,6 +400,7 @@ const Toolbox = ()=>{
|
|
|
392
400
|
window.addEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
393
401
|
window.addEventListener('update-shop-plan', onUpdateShopPlan);
|
|
394
402
|
window.addEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
403
|
+
window.addEventListener('set-number-of-product', onUpdateNumberOfProduct);
|
|
395
404
|
window.addEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
396
405
|
window.addEventListener('update-item-name', onUpdateItemName);
|
|
397
406
|
window.addEventListener('update-item-attribute', onUpdateItemAttribute);
|
|
@@ -415,6 +424,7 @@ const Toolbox = ()=>{
|
|
|
415
424
|
window.removeEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
416
425
|
window.removeEventListener('update-shop-plan', onUpdateShopPlan);
|
|
417
426
|
window.removeEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
427
|
+
window.removeEventListener('set-number-of-product', onUpdateNumberOfProduct);
|
|
418
428
|
window.removeEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
419
429
|
window.removeEventListener('update-item-name', onUpdateItemName);
|
|
420
430
|
window.removeEventListener('update-item-attribute', onUpdateItemAttribute);
|
|
@@ -448,7 +458,8 @@ const Toolbox = ()=>{
|
|
|
448
458
|
onUpdateInteractionItem,
|
|
449
459
|
onUpdateInteractionIsSelectOnPage,
|
|
450
460
|
onUpdateInteractionSettingType,
|
|
451
|
-
onUpdateFontType
|
|
461
|
+
onUpdateFontType,
|
|
462
|
+
onUpdateNumberOfProduct
|
|
452
463
|
]);
|
|
453
464
|
return /*#__PURE__*/ jsx("div", {
|
|
454
465
|
className: "toolbox"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.53.0-dev.
|
|
3
|
+
"version": "1.53.0-dev.165",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "1.53.0-dev.
|
|
29
|
+
"@gem-sdk/core": "1.53.0-dev.165",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "1.53.0-dev.105",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "1.53.0-dev.105",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "1.53.0-dev.105"
|