@gem-sdk/pages 2.0.0-dev.408 → 2.0.0-dev.409
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/dist/cjs/components/FooterForPostPurchase.js +1 -1
- package/dist/cjs/components/builder/Footer.js +1 -1
- package/dist/cjs/components/builder/Toolbox.js +1 -12
- package/dist/esm/components/FooterForPostPurchase.js +1 -1
- package/dist/esm/components/builder/Footer.js +1 -1
- package/dist/esm/components/builder/Toolbox.js +1 -12
- package/package.json +1 -1
|
@@ -13,7 +13,7 @@ const defaultMargin = {
|
|
|
13
13
|
};
|
|
14
14
|
const FooterForPostPurchase = (props)=>{
|
|
15
15
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
16
|
-
className: core.cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-
|
|
16
|
+
className: core.cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-font-sans'),
|
|
17
17
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
18
18
|
className: "gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",
|
|
19
19
|
style: {
|
|
@@ -45,7 +45,7 @@ const Footer = (props)=>{
|
|
|
45
45
|
]);
|
|
46
46
|
return /*#__PURE__*/ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
47
47
|
children: pageType === 'POST_PURCHASE' ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
48
|
-
className: core.cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-
|
|
48
|
+
className: core.cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-font-sans'),
|
|
49
49
|
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
50
50
|
className: "gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",
|
|
51
51
|
style: {
|
|
@@ -13,7 +13,6 @@ var genFonts = require('../../libs/helpers/gen-fonts.js');
|
|
|
13
13
|
var shopifyCdnWithGoogleFonts = require('../../libs/shopify-cdn-with-google-fonts.js');
|
|
14
14
|
var libsStore = require('../../store/libs-store.js');
|
|
15
15
|
var checkOptionFont = require('../../libs/helpers/check-option-font.js');
|
|
16
|
-
var nextI18next = require('next-i18next');
|
|
17
16
|
|
|
18
17
|
const globalStyleId = 'global-style';
|
|
19
18
|
const Toolbox = ()=>{
|
|
@@ -52,7 +51,6 @@ const Toolbox = ()=>{
|
|
|
52
51
|
const fonts = react.useMemo(()=>genFonts.getFontsFromDataBuilder(state), [
|
|
53
52
|
state
|
|
54
53
|
]);
|
|
55
|
-
const { i18n } = nextI18next.useTranslation();
|
|
56
54
|
const setFontsToHead = (className, fonts)=>{
|
|
57
55
|
// clear fonts
|
|
58
56
|
if (!fonts?.length) {
|
|
@@ -395,12 +393,6 @@ const Toolbox = ()=>{
|
|
|
395
393
|
}, [
|
|
396
394
|
setSidebarMode
|
|
397
395
|
]);
|
|
398
|
-
const onChangeLanguage = react.useCallback((e)=>{
|
|
399
|
-
const mode = e.detail;
|
|
400
|
-
i18n.changeLanguage(mode.lang ?? 'en');
|
|
401
|
-
}, [
|
|
402
|
-
i18n
|
|
403
|
-
]);
|
|
404
396
|
const onUpdateInteractionItem = react.useCallback((e)=>{
|
|
405
397
|
const interactionItem = e.detail;
|
|
406
398
|
setInteractionItem(interactionItem);
|
|
@@ -441,7 +433,6 @@ const Toolbox = ()=>{
|
|
|
441
433
|
window.addEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
442
434
|
window.addEventListener('change-sidebar-mode', onChangeSidebarMode);
|
|
443
435
|
window.addEventListener('update-font-type', onUpdateFontType);
|
|
444
|
-
window.addEventListener('change-language', onChangeLanguage);
|
|
445
436
|
return ()=>{
|
|
446
437
|
window.removeEventListener('update-shop-info', onChangeShopInfo);
|
|
447
438
|
window.removeEventListener('revalidate-query', onRevalidateQuery);
|
|
@@ -466,7 +457,6 @@ const Toolbox = ()=>{
|
|
|
466
457
|
window.removeEventListener('update-interaction-item', onUpdateInteractionItem);
|
|
467
458
|
window.removeEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
468
459
|
window.removeEventListener('update-font-type', onUpdateFontType);
|
|
469
|
-
window.removeEventListener('change-language', onChangeLanguage);
|
|
470
460
|
};
|
|
471
461
|
}, [
|
|
472
462
|
onAddEntity,
|
|
@@ -494,8 +484,7 @@ const Toolbox = ()=>{
|
|
|
494
484
|
onUpdateInteractionSettingType,
|
|
495
485
|
onUpdateFontType,
|
|
496
486
|
onChangeSidebarMode,
|
|
497
|
-
onUpdateDynamicDiscountOffer
|
|
498
|
-
onChangeLanguage
|
|
487
|
+
onUpdateDynamicDiscountOffer
|
|
499
488
|
]);
|
|
500
489
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
501
490
|
className: "toolbox"
|
|
@@ -9,7 +9,7 @@ const defaultMargin = {
|
|
|
9
9
|
};
|
|
10
10
|
const FooterForPostPurchase = (props)=>{
|
|
11
11
|
return /*#__PURE__*/ jsx("div", {
|
|
12
|
-
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-
|
|
12
|
+
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-font-sans'),
|
|
13
13
|
children: /*#__PURE__*/ jsx("div", {
|
|
14
14
|
className: "gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",
|
|
15
15
|
style: {
|
|
@@ -41,7 +41,7 @@ const Footer = (props)=>{
|
|
|
41
41
|
]);
|
|
42
42
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
43
43
|
children: pageType === 'POST_PURCHASE' ? /*#__PURE__*/ jsx("div", {
|
|
44
|
-
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-
|
|
44
|
+
className: cls('gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-font-sans'),
|
|
45
45
|
children: /*#__PURE__*/ jsx("div", {
|
|
46
46
|
className: "gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",
|
|
47
47
|
style: {
|
|
@@ -9,7 +9,6 @@ import { getFontsFromDataBuilder } from '../../libs/helpers/gen-fonts.js';
|
|
|
9
9
|
import { shopifyCdnWithGoogleFonts } from '../../libs/shopify-cdn-with-google-fonts.js';
|
|
10
10
|
import { libsStore } from '../../store/libs-store.js';
|
|
11
11
|
import { checkNotInOptionFont } from '../../libs/helpers/check-option-font.js';
|
|
12
|
-
import { useTranslation } from 'next-i18next';
|
|
13
12
|
|
|
14
13
|
const globalStyleId = 'global-style';
|
|
15
14
|
const Toolbox = ()=>{
|
|
@@ -48,7 +47,6 @@ const Toolbox = ()=>{
|
|
|
48
47
|
const fonts = useMemo(()=>getFontsFromDataBuilder(state), [
|
|
49
48
|
state
|
|
50
49
|
]);
|
|
51
|
-
const { i18n } = useTranslation();
|
|
52
50
|
const setFontsToHead = (className, fonts)=>{
|
|
53
51
|
// clear fonts
|
|
54
52
|
if (!fonts?.length) {
|
|
@@ -391,12 +389,6 @@ const Toolbox = ()=>{
|
|
|
391
389
|
}, [
|
|
392
390
|
setSidebarMode
|
|
393
391
|
]);
|
|
394
|
-
const onChangeLanguage = useCallback((e)=>{
|
|
395
|
-
const mode = e.detail;
|
|
396
|
-
i18n.changeLanguage(mode.lang ?? 'en');
|
|
397
|
-
}, [
|
|
398
|
-
i18n
|
|
399
|
-
]);
|
|
400
392
|
const onUpdateInteractionItem = useCallback((e)=>{
|
|
401
393
|
const interactionItem = e.detail;
|
|
402
394
|
setInteractionItem(interactionItem);
|
|
@@ -437,7 +429,6 @@ const Toolbox = ()=>{
|
|
|
437
429
|
window.addEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
438
430
|
window.addEventListener('change-sidebar-mode', onChangeSidebarMode);
|
|
439
431
|
window.addEventListener('update-font-type', onUpdateFontType);
|
|
440
|
-
window.addEventListener('change-language', onChangeLanguage);
|
|
441
432
|
return ()=>{
|
|
442
433
|
window.removeEventListener('update-shop-info', onChangeShopInfo);
|
|
443
434
|
window.removeEventListener('revalidate-query', onRevalidateQuery);
|
|
@@ -462,7 +453,6 @@ const Toolbox = ()=>{
|
|
|
462
453
|
window.removeEventListener('update-interaction-item', onUpdateInteractionItem);
|
|
463
454
|
window.removeEventListener('update-interaction-setting-type', onUpdateInteractionSettingType);
|
|
464
455
|
window.removeEventListener('update-font-type', onUpdateFontType);
|
|
465
|
-
window.removeEventListener('change-language', onChangeLanguage);
|
|
466
456
|
};
|
|
467
457
|
}, [
|
|
468
458
|
onAddEntity,
|
|
@@ -490,8 +480,7 @@ const Toolbox = ()=>{
|
|
|
490
480
|
onUpdateInteractionSettingType,
|
|
491
481
|
onUpdateFontType,
|
|
492
482
|
onChangeSidebarMode,
|
|
493
|
-
onUpdateDynamicDiscountOffer
|
|
494
|
-
onChangeLanguage
|
|
483
|
+
onUpdateDynamicDiscountOffer
|
|
495
484
|
]);
|
|
496
485
|
return /*#__PURE__*/ jsx("div", {
|
|
497
486
|
className: "toolbox"
|