@gem-sdk/pages 1.53.0 → 1.53.10
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/builder/Footer.js +4 -3
- package/dist/cjs/components/builder/Header.js +3 -2
- package/dist/cjs/pages/builder.js +9 -2
- package/dist/cjs/pages/static-v2.js +1 -1
- package/dist/esm/components/builder/Footer.js +4 -3
- package/dist/esm/components/builder/Header.js +3 -2
- package/dist/esm/pages/builder.js +9 -2
- package/dist/esm/pages/static-v2.js +1 -1
- package/package.json +2 -2
|
@@ -14,7 +14,7 @@ const defaultMargin = {
|
|
|
14
14
|
const FOOTER_ON_COLOR = '#E2E2E2';
|
|
15
15
|
const FOOTER_OFF_COLOR = '#F4F4F4';
|
|
16
16
|
const Footer = (props)=>{
|
|
17
|
-
const { pageType, isOriginTemplate } = props;
|
|
17
|
+
const { pageType, isOriginTemplate, openPageSetting } = props;
|
|
18
18
|
const urlParams = new URLSearchParams(window.location.search);
|
|
19
19
|
const shopName = urlParams.get('storefrontHandle');
|
|
20
20
|
const layoutSetting = core.useShopStore((s)=>s.layoutSettings);
|
|
@@ -89,8 +89,9 @@ const Footer = (props)=>{
|
|
|
89
89
|
})
|
|
90
90
|
]
|
|
91
91
|
}),
|
|
92
|
-
!isOriginTemplate && /*#__PURE__*/ jsxRuntime.jsx("
|
|
93
|
-
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px]gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
92
|
+
!isOriginTemplate && /*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
93
|
+
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
94
|
+
onClick: openPageSetting,
|
|
94
95
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
95
96
|
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
96
97
|
children: [
|
|
@@ -19,7 +19,7 @@ const sizeCheck = {
|
|
|
19
19
|
mobile: '36px'
|
|
20
20
|
};
|
|
21
21
|
const Header = (props)=>{
|
|
22
|
-
const { pageType, isOriginTemplate } = props;
|
|
22
|
+
const { pageType, isOriginTemplate, openPageSetting } = props;
|
|
23
23
|
const layoutSetting = core.useShopStore((s)=>s.layoutSettings);
|
|
24
24
|
const activeHeader = layoutSetting?.showHeader || isOriginTemplate;
|
|
25
25
|
const headerColor = activeHeader ? HEADER_ON_COLOR : HEADER_OFF_COLOR;
|
|
@@ -120,8 +120,9 @@ const Header = (props)=>{
|
|
|
120
120
|
})
|
|
121
121
|
]
|
|
122
122
|
}),
|
|
123
|
-
!isOriginTemplate && /*#__PURE__*/ jsxRuntime.jsx("
|
|
123
|
+
!isOriginTemplate && /*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
124
124
|
className: "gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
125
|
+
onClick: openPageSetting,
|
|
125
126
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
126
127
|
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
127
128
|
children: [
|
|
@@ -31,6 +31,11 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
31
31
|
react.useEffect(()=>{
|
|
32
32
|
setLoadSuccess(true);
|
|
33
33
|
}, []);
|
|
34
|
+
const openPageSetting = ()=>{
|
|
35
|
+
window?.parent?.postMessage(JSON.stringify({
|
|
36
|
+
type: 'open-page-setting'
|
|
37
|
+
}), '*');
|
|
38
|
+
};
|
|
34
39
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
35
40
|
children: [
|
|
36
41
|
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
@@ -75,7 +80,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
75
80
|
children: /*#__PURE__*/ jsxRuntime.jsx(SwitchView.default, {})
|
|
76
81
|
}) : /*#__PURE__*/ jsxRuntime.jsx(Header.default, {
|
|
77
82
|
pageType: pageType,
|
|
78
|
-
isOriginTemplate: isOriginTemplate
|
|
83
|
+
isOriginTemplate: isOriginTemplate,
|
|
84
|
+
openPageSetting: openPageSetting
|
|
79
85
|
})),
|
|
80
86
|
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
81
87
|
id: "storefront",
|
|
@@ -99,7 +105,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
99
105
|
}),
|
|
100
106
|
!isDisableHeaderFooter() && !hiddenToolbar && /*#__PURE__*/ jsxRuntime.jsx(Footer.default, {
|
|
101
107
|
pageType: pageType,
|
|
102
|
-
isOriginTemplate: isOriginTemplate
|
|
108
|
+
isOriginTemplate: isOriginTemplate,
|
|
109
|
+
openPageSetting: openPageSetting
|
|
103
110
|
})
|
|
104
111
|
]
|
|
105
112
|
})
|
|
@@ -76,7 +76,7 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
|
|
|
76
76
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
77
77
|
components: components,
|
|
78
78
|
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
79
|
-
className: `${isPostPurchase ? 'gp-bg-white' : ''} `,
|
|
79
|
+
className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
|
|
80
80
|
children: [
|
|
81
81
|
isPostPurchase && /*#__PURE__*/ jsxRuntime.jsx(Header.default, {
|
|
82
82
|
pageType: "POST_PURCHASE"
|
|
@@ -10,7 +10,7 @@ const defaultMargin = {
|
|
|
10
10
|
const FOOTER_ON_COLOR = '#E2E2E2';
|
|
11
11
|
const FOOTER_OFF_COLOR = '#F4F4F4';
|
|
12
12
|
const Footer = (props)=>{
|
|
13
|
-
const { pageType, isOriginTemplate } = props;
|
|
13
|
+
const { pageType, isOriginTemplate, openPageSetting } = props;
|
|
14
14
|
const urlParams = new URLSearchParams(window.location.search);
|
|
15
15
|
const shopName = urlParams.get('storefrontHandle');
|
|
16
16
|
const layoutSetting = useShopStore((s)=>s.layoutSettings);
|
|
@@ -85,8 +85,9 @@ const Footer = (props)=>{
|
|
|
85
85
|
})
|
|
86
86
|
]
|
|
87
87
|
}),
|
|
88
|
-
!isOriginTemplate && /*#__PURE__*/ jsx("
|
|
89
|
-
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px]gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
88
|
+
!isOriginTemplate && /*#__PURE__*/ jsx("button", {
|
|
89
|
+
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
90
|
+
onClick: openPageSetting,
|
|
90
91
|
children: /*#__PURE__*/ jsxs("div", {
|
|
91
92
|
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
92
93
|
children: [
|
|
@@ -15,7 +15,7 @@ const sizeCheck = {
|
|
|
15
15
|
mobile: '36px'
|
|
16
16
|
};
|
|
17
17
|
const Header = (props)=>{
|
|
18
|
-
const { pageType, isOriginTemplate } = props;
|
|
18
|
+
const { pageType, isOriginTemplate, openPageSetting } = props;
|
|
19
19
|
const layoutSetting = useShopStore((s)=>s.layoutSettings);
|
|
20
20
|
const activeHeader = layoutSetting?.showHeader || isOriginTemplate;
|
|
21
21
|
const headerColor = activeHeader ? HEADER_ON_COLOR : HEADER_OFF_COLOR;
|
|
@@ -116,8 +116,9 @@ const Header = (props)=>{
|
|
|
116
116
|
})
|
|
117
117
|
]
|
|
118
118
|
}),
|
|
119
|
-
!isOriginTemplate && /*#__PURE__*/ jsx("
|
|
119
|
+
!isOriginTemplate && /*#__PURE__*/ jsx("button", {
|
|
120
120
|
className: "gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#f4f4f4] group-hover:gp-visible",
|
|
121
|
+
onClick: openPageSetting,
|
|
121
122
|
children: /*#__PURE__*/ jsxs("div", {
|
|
122
123
|
className: "gp-gap-2 gp-flex gp-px-1 gp-h-[24px] gp-items-center gp-justify-center gp-leading-5 gp-text-xs gp-font-medium gp-text-[#212121]",
|
|
123
124
|
children: [
|
|
@@ -29,6 +29,11 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
29
29
|
useEffect(()=>{
|
|
30
30
|
setLoadSuccess(true);
|
|
31
31
|
}, []);
|
|
32
|
+
const openPageSetting = ()=>{
|
|
33
|
+
window?.parent?.postMessage(JSON.stringify({
|
|
34
|
+
type: 'open-page-setting'
|
|
35
|
+
}), '*');
|
|
36
|
+
};
|
|
32
37
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
33
38
|
children: [
|
|
34
39
|
/*#__PURE__*/ jsx(NextSeo, {
|
|
@@ -73,7 +78,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
73
78
|
children: /*#__PURE__*/ jsx(Devices, {})
|
|
74
79
|
}) : /*#__PURE__*/ jsx(Header, {
|
|
75
80
|
pageType: pageType,
|
|
76
|
-
isOriginTemplate: isOriginTemplate
|
|
81
|
+
isOriginTemplate: isOriginTemplate,
|
|
82
|
+
openPageSetting: openPageSetting
|
|
77
83
|
})),
|
|
78
84
|
/*#__PURE__*/ jsx("div", {
|
|
79
85
|
id: "storefront",
|
|
@@ -97,7 +103,8 @@ const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, page
|
|
|
97
103
|
}),
|
|
98
104
|
!isDisableHeaderFooter() && !hiddenToolbar && /*#__PURE__*/ jsx(Footer, {
|
|
99
105
|
pageType: pageType,
|
|
100
|
-
isOriginTemplate: isOriginTemplate
|
|
106
|
+
isOriginTemplate: isOriginTemplate,
|
|
107
|
+
openPageSetting: openPageSetting
|
|
101
108
|
})
|
|
102
109
|
]
|
|
103
110
|
})
|
|
@@ -74,7 +74,7 @@ const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, f
|
|
|
74
74
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
75
75
|
components: components,
|
|
76
76
|
children: /*#__PURE__*/ jsxs("div", {
|
|
77
|
-
className: `${isPostPurchase ? 'gp-bg-white' : ''} `,
|
|
77
|
+
className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
|
|
78
78
|
children: [
|
|
79
79
|
isPostPurchase && /*#__PURE__*/ jsx(Header, {
|
|
80
80
|
pageType: "POST_PURCHASE"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.53.
|
|
3
|
+
"version": "1.53.10",
|
|
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.
|
|
29
|
+
"@gem-sdk/core": "1.53.1",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "1.53.0",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "1.53.0",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "1.53.0"
|