@gem-sdk/pages 2.0.0-dev.671 → 2.0.0-dev.696
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.
|
@@ -40,6 +40,7 @@ const Toolbox = ()=>{
|
|
|
40
40
|
const changeLayoutSettings = core.useShopStore((s)=>s.changeLayoutSettings);
|
|
41
41
|
const changeCreateThemeSectionCount = core.useShopStore((s)=>s.changeCreateThemeSectionCount);
|
|
42
42
|
const changeShopPlan = core.useShopStore((s)=>s.changeShopPlan);
|
|
43
|
+
const updatePriceWithCurrency = core.useShopStore((s)=>s.updatePriceWithCurrency);
|
|
43
44
|
const changeFontType = libsStore.libsStore((s)=>s.changeFontType);
|
|
44
45
|
const fontType = libsStore.libsStore((s)=>s.fontType);
|
|
45
46
|
const clearModal = core.useModalStore((s)=>s.clearModal);
|
|
@@ -299,6 +300,13 @@ const Toolbox = ()=>{
|
|
|
299
300
|
}, [
|
|
300
301
|
changeShopPlan
|
|
301
302
|
]);
|
|
303
|
+
const onUpdatePriceWithCurrency = react.useCallback((e)=>{
|
|
304
|
+
const isUseCurrency = e.detail;
|
|
305
|
+
if (!isUseCurrency) return;
|
|
306
|
+
updatePriceWithCurrency(isUseCurrency);
|
|
307
|
+
}, [
|
|
308
|
+
updatePriceWithCurrency
|
|
309
|
+
]);
|
|
302
310
|
const onUpdateFontType = react.useCallback((e)=>{
|
|
303
311
|
const fontType = e.detail;
|
|
304
312
|
if (!fontType) return;
|
|
@@ -436,6 +444,7 @@ const Toolbox = ()=>{
|
|
|
436
444
|
window.addEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
437
445
|
window.addEventListener('change-sidebar-mode', onChangeSidebarMode);
|
|
438
446
|
window.addEventListener('update-font-type', onUpdateFontType);
|
|
447
|
+
window.addEventListener('update-price-with-currency', onUpdatePriceWithCurrency);
|
|
439
448
|
return ()=>{
|
|
440
449
|
window.removeEventListener('update-shop-info', onChangeShopInfo);
|
|
441
450
|
window.removeEventListener('revalidate-query', onRevalidateQuery);
|
|
@@ -449,6 +458,7 @@ const Toolbox = ()=>{
|
|
|
449
458
|
window.removeEventListener('on-off-header-footer', onChangeLayoutSettingData);
|
|
450
459
|
window.removeEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
451
460
|
window.removeEventListener('update-shop-plan', onUpdateShopPlan);
|
|
461
|
+
window.removeEventListener('update-price-with-currency', onUpdatePriceWithCurrency);
|
|
452
462
|
window.removeEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
453
463
|
window.removeEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
454
464
|
window.removeEventListener('update-item-name', onUpdateItemName);
|
|
@@ -487,7 +497,8 @@ const Toolbox = ()=>{
|
|
|
487
497
|
onUpdateInteractionSettingType,
|
|
488
498
|
onUpdateFontType,
|
|
489
499
|
onChangeSidebarMode,
|
|
490
|
-
onUpdateDynamicDiscountOffer
|
|
500
|
+
onUpdateDynamicDiscountOffer,
|
|
501
|
+
onUpdatePriceWithCurrency
|
|
491
502
|
]);
|
|
492
503
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
493
504
|
className: "toolbox"
|
|
@@ -36,6 +36,7 @@ const Toolbox = ()=>{
|
|
|
36
36
|
const changeLayoutSettings = useShopStore((s)=>s.changeLayoutSettings);
|
|
37
37
|
const changeCreateThemeSectionCount = useShopStore((s)=>s.changeCreateThemeSectionCount);
|
|
38
38
|
const changeShopPlan = useShopStore((s)=>s.changeShopPlan);
|
|
39
|
+
const updatePriceWithCurrency = useShopStore((s)=>s.updatePriceWithCurrency);
|
|
39
40
|
const changeFontType = libsStore((s)=>s.changeFontType);
|
|
40
41
|
const fontType = libsStore((s)=>s.fontType);
|
|
41
42
|
const clearModal = useModalStore((s)=>s.clearModal);
|
|
@@ -295,6 +296,13 @@ const Toolbox = ()=>{
|
|
|
295
296
|
}, [
|
|
296
297
|
changeShopPlan
|
|
297
298
|
]);
|
|
299
|
+
const onUpdatePriceWithCurrency = useCallback((e)=>{
|
|
300
|
+
const isUseCurrency = e.detail;
|
|
301
|
+
if (!isUseCurrency) return;
|
|
302
|
+
updatePriceWithCurrency(isUseCurrency);
|
|
303
|
+
}, [
|
|
304
|
+
updatePriceWithCurrency
|
|
305
|
+
]);
|
|
298
306
|
const onUpdateFontType = useCallback((e)=>{
|
|
299
307
|
const fontType = e.detail;
|
|
300
308
|
if (!fontType) return;
|
|
@@ -432,6 +440,7 @@ const Toolbox = ()=>{
|
|
|
432
440
|
window.addEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
433
441
|
window.addEventListener('change-sidebar-mode', onChangeSidebarMode);
|
|
434
442
|
window.addEventListener('update-font-type', onUpdateFontType);
|
|
443
|
+
window.addEventListener('update-price-with-currency', onUpdatePriceWithCurrency);
|
|
435
444
|
return ()=>{
|
|
436
445
|
window.removeEventListener('update-shop-info', onChangeShopInfo);
|
|
437
446
|
window.removeEventListener('revalidate-query', onRevalidateQuery);
|
|
@@ -445,6 +454,7 @@ const Toolbox = ()=>{
|
|
|
445
454
|
window.removeEventListener('on-off-header-footer', onChangeLayoutSettingData);
|
|
446
455
|
window.removeEventListener('update-create-theme-section-count', onUpdateCreateThemeSectionCount);
|
|
447
456
|
window.removeEventListener('update-shop-plan', onUpdateShopPlan);
|
|
457
|
+
window.removeEventListener('update-price-with-currency', onUpdatePriceWithCurrency);
|
|
448
458
|
window.removeEventListener('set-dynamic-product', onUpdateDynamicProduct);
|
|
449
459
|
window.removeEventListener('set-dynamic-collection', onUpdateDynamicCollection);
|
|
450
460
|
window.removeEventListener('update-item-name', onUpdateItemName);
|
|
@@ -483,7 +493,8 @@ const Toolbox = ()=>{
|
|
|
483
493
|
onUpdateInteractionSettingType,
|
|
484
494
|
onUpdateFontType,
|
|
485
495
|
onChangeSidebarMode,
|
|
486
|
-
onUpdateDynamicDiscountOffer
|
|
496
|
+
onUpdateDynamicDiscountOffer,
|
|
497
|
+
onUpdatePriceWithCurrency
|
|
487
498
|
]);
|
|
488
499
|
return /*#__PURE__*/ jsx("div", {
|
|
489
500
|
className: "toolbox"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.696",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
30
|
-
"@gem-sdk/plugin-cookie-bar": "2.0.0-dev.
|
|
31
|
-
"@gem-sdk/plugin-quick-view": "2.0.0-dev.
|
|
32
|
-
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "2.0.0-dev.696",
|
|
30
|
+
"@gem-sdk/plugin-cookie-bar": "2.0.0-dev.695",
|
|
31
|
+
"@gem-sdk/plugin-quick-view": "2.0.0-dev.695",
|
|
32
|
+
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-dev.695"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"next": ">=13"
|