@gem-sdk/pages 1.58.0-staging.42 → 1.58.0-staging.44
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/libs/parse-html.js +14 -21
- package/dist/cjs/pages/404.js +0 -1
- package/dist/cjs/pages/500.js +0 -1
- package/dist/cjs/pages/CollectionGlobalProvider.js +0 -1
- package/dist/cjs/pages/builder.js +22 -14
- package/dist/cjs/pages/collection-detail.js +40 -31
- package/dist/cjs/pages/preview.js +0 -1
- package/dist/cjs/pages/product-detail.js +29 -18
- package/dist/cjs/pages/static-v2.js +98 -92
- package/dist/cjs/pages/static.js +44 -34
- package/dist/esm/libs/parse-html.js +14 -21
- package/dist/esm/pages/404.js +0 -1
- package/dist/esm/pages/500.js +0 -1
- package/dist/esm/pages/CollectionGlobalProvider.js +0 -1
- package/dist/esm/pages/builder.js +22 -14
- package/dist/esm/pages/collection-detail.js +41 -32
- package/dist/esm/pages/preview.js +0 -1
- package/dist/esm/pages/product-detail.js +30 -19
- package/dist/esm/pages/static-v2.js +99 -93
- package/dist/esm/pages/static.js +45 -35
- package/package.json +1 -1
|
@@ -9,28 +9,21 @@ const parseHtml = (html, isHead)=>{
|
|
|
9
9
|
try {
|
|
10
10
|
return parse(html, {
|
|
11
11
|
replace: (node)=>{
|
|
12
|
-
if (node.type
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
} else {
|
|
28
|
-
if (!isHead) {
|
|
29
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
30
|
-
...node.attribs
|
|
31
|
-
});
|
|
12
|
+
if (node.type !== 'script' || !(node instanceof parse.Element)) return null;
|
|
13
|
+
const child = node.children?.[0];
|
|
14
|
+
if (!child) return null;
|
|
15
|
+
if (!(child instanceof parse.Text) && !isHead) return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
16
|
+
...node.attribs
|
|
17
|
+
});
|
|
18
|
+
if (child instanceof parse.Text && isHead) {
|
|
19
|
+
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
20
|
+
...node.attribs,
|
|
21
|
+
type: "text/javascript",
|
|
22
|
+
strategy: isHead ? 'beforeInteractive' : 'afterInteractive',
|
|
23
|
+
dangerouslySetInnerHTML: {
|
|
24
|
+
__html: child.data
|
|
32
25
|
}
|
|
33
|
-
}
|
|
26
|
+
});
|
|
34
27
|
}
|
|
35
28
|
}
|
|
36
29
|
});
|
package/dist/cjs/pages/404.js
CHANGED
package/dist/cjs/pages/500.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
4
|
var core = require('@gem-sdk/core');
|
|
5
|
+
var nextSeo = require('next-seo');
|
|
6
|
+
var Head = require('next/head');
|
|
6
7
|
var react = require('react');
|
|
7
8
|
var Toolbox = require('../components/builder/Toolbox.js');
|
|
8
9
|
var Header = require('../components/builder/Header.js');
|
|
@@ -14,7 +15,7 @@ var Toolbar = require('../components/builder/Toolbar.js');
|
|
|
14
15
|
var SwitchView = require('../components/builder/SwitchView.js');
|
|
15
16
|
var Body = require('../components/builder/Body.js');
|
|
16
17
|
|
|
17
|
-
const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
18
|
+
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
18
19
|
const [loadSuccess, setLoadSuccess] = react.useState(false);
|
|
19
20
|
const isDisableHeaderFooter = ()=>{
|
|
20
21
|
return isThemeSectionEditor;
|
|
@@ -37,19 +38,26 @@ const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType,
|
|
|
37
38
|
};
|
|
38
39
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
39
40
|
children: [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
id: "global-style",
|
|
43
|
-
dangerouslySetInnerHTML: {
|
|
44
|
-
__html: themeStyle
|
|
45
|
-
}
|
|
41
|
+
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
42
|
+
...seo
|
|
46
43
|
}),
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
44
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
45
|
+
children: [
|
|
46
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
47
|
+
type: "text/css",
|
|
48
|
+
id: "global-style",
|
|
49
|
+
dangerouslySetInnerHTML: {
|
|
50
|
+
__html: themeStyle
|
|
51
|
+
}
|
|
52
|
+
}),
|
|
53
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
54
|
+
"data-id": "google-fonts",
|
|
55
|
+
type: "text/css",
|
|
56
|
+
dangerouslySetInnerHTML: {
|
|
57
|
+
__html: fontStyle
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
]
|
|
53
61
|
}),
|
|
54
62
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
55
63
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -1,47 +1,56 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
4
|
|
|
6
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var core = require('@gem-sdk/core');
|
|
7
|
+
var nextSeo = require('next-seo');
|
|
8
8
|
var dynamic = require('next/dynamic');
|
|
9
|
-
var
|
|
9
|
+
var Head = require('next/head');
|
|
10
|
+
var router = require('next/router');
|
|
10
11
|
|
|
11
12
|
const CollectionProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.CollectionProvider));
|
|
12
|
-
const CollectionDetailPage = ({ components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
13
|
+
const CollectionDetailPage = ({ seo, components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
14
|
+
const router$1 = router.useRouter();
|
|
15
|
+
if (router$1.isFallback) {
|
|
16
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17
|
+
children: "Loading..."
|
|
18
|
+
});
|
|
19
|
+
}
|
|
13
20
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
14
21
|
children: [
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
type: "text/css",
|
|
18
|
-
dangerouslySetInnerHTML: {
|
|
19
|
-
__html: themeStyle
|
|
20
|
-
}
|
|
22
|
+
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
23
|
+
...seo
|
|
21
24
|
}),
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
26
|
+
children: [
|
|
27
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
28
|
+
"data-id": "global-style",
|
|
29
|
+
type: "text/css",
|
|
30
|
+
dangerouslySetInnerHTML: {
|
|
31
|
+
__html: themeStyle
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
35
|
+
"data-id": "google-fonts",
|
|
36
|
+
type: "text/css",
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: fontStyle
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
]
|
|
28
42
|
}),
|
|
29
|
-
/*#__PURE__*/ jsxRuntime.jsx(
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
children: builderData && /*#__PURE__*/ jsxRuntime.jsx(core.BuilderProvider, {
|
|
41
|
-
state: builderData,
|
|
42
|
-
children: /*#__PURE__*/ jsxRuntime.jsx(core.Render, {
|
|
43
|
-
uid: "ROOT"
|
|
44
|
-
})
|
|
43
|
+
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
44
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
45
|
+
components: components,
|
|
46
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.SectionProvider, {
|
|
47
|
+
data: sectionData,
|
|
48
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(CollectionProvider, {
|
|
49
|
+
collection: collection,
|
|
50
|
+
children: builderData && /*#__PURE__*/ jsxRuntime.jsx(core.BuilderProvider, {
|
|
51
|
+
state: builderData,
|
|
52
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.Render, {
|
|
53
|
+
uid: "ROOT"
|
|
45
54
|
})
|
|
46
55
|
})
|
|
47
56
|
})
|
|
@@ -1,33 +1,44 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
4
|
|
|
6
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var core = require('@gem-sdk/core');
|
|
7
|
+
var nextSeo = require('next-seo');
|
|
8
8
|
var dynamic = require('next/dynamic');
|
|
9
|
-
var
|
|
9
|
+
var Head = require('next/head');
|
|
10
|
+
var router = require('next/router');
|
|
10
11
|
|
|
11
12
|
const ProductProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.ProductProvider));
|
|
12
|
-
const ProductDetailPage = ({ themeStyle, fontStyle, product, components, builderData, sectionData })=>{
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
const ProductDetailPage = ({ themeStyle, fontStyle, seo, product, components, builderData, sectionData })=>{
|
|
14
|
+
const router$1 = router.useRouter();
|
|
15
|
+
if (router$1.isFallback) {
|
|
16
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
15
17
|
children: "Loading..."
|
|
16
|
-
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
17
21
|
children: [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
type: "text/css",
|
|
21
|
-
dangerouslySetInnerHTML: {
|
|
22
|
-
__html: themeStyle
|
|
23
|
-
}
|
|
22
|
+
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
23
|
+
...seo
|
|
24
24
|
}),
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
25
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
26
|
+
children: [
|
|
27
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
28
|
+
"data-id": "global-style",
|
|
29
|
+
type: "text/css",
|
|
30
|
+
dangerouslySetInnerHTML: {
|
|
31
|
+
__html: themeStyle
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
35
|
+
"data-id": "google-fonts",
|
|
36
|
+
type: "text/css",
|
|
37
|
+
dangerouslySetInnerHTML: {
|
|
38
|
+
__html: fontStyle
|
|
39
|
+
}
|
|
40
|
+
})
|
|
41
|
+
]
|
|
31
42
|
}),
|
|
32
43
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
33
44
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -1,110 +1,116 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
4
|
var core = require('@gem-sdk/core');
|
|
5
|
+
var nextSeo = require('next-seo');
|
|
6
|
+
var Head = require('next/head');
|
|
7
|
+
var router = require('next/router');
|
|
6
8
|
var useTrackingView = require('../libs/hooks/use-tracking-view.js');
|
|
7
9
|
var parseHtml = require('../libs/parse-html.js');
|
|
8
10
|
var Header = require('../components/builder/Header.js');
|
|
9
11
|
var FooterForPostPurchase = require('../components/FooterForPostPurchase.js');
|
|
10
12
|
var Script = require('next/script');
|
|
11
|
-
var react = require('react');
|
|
12
13
|
|
|
13
|
-
const StaticPageV2 = (
|
|
14
|
-
const
|
|
14
|
+
const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
15
|
+
const router$1 = router.useRouter();
|
|
15
16
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
16
|
-
useTrackingView.useTrackingView(shopToken, pageHandle);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
17
|
+
useTrackingView.useTrackingView(shopToken, pageHandle, router$1.isFallback);
|
|
18
|
+
if (router$1.isFallback) {
|
|
19
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
20
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
21
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
22
|
+
className: "gp-flex gp-gap-2",
|
|
23
|
+
children: [
|
|
24
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
25
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
26
|
+
}),
|
|
27
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
28
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
29
|
+
}),
|
|
30
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
31
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
32
|
+
})
|
|
33
|
+
]
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
}
|
|
34
37
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
35
38
|
children: [
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
"data-id": "global-style",
|
|
39
|
-
type: "text/css",
|
|
40
|
-
dangerouslySetInnerHTML: {
|
|
41
|
-
__html: themeStyle
|
|
42
|
-
}
|
|
39
|
+
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
40
|
+
...seo
|
|
43
41
|
}),
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
43
|
+
children: [
|
|
44
|
+
parseHtml.parseHtml(customCodeHeader, true),
|
|
45
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
46
|
+
"data-id": "global-style",
|
|
47
|
+
type: "text/css",
|
|
48
|
+
dangerouslySetInnerHTML: {
|
|
49
|
+
__html: themeStyle
|
|
50
|
+
}
|
|
51
|
+
}),
|
|
52
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
53
|
+
"data-id": "google-fonts",
|
|
54
|
+
type: "text/css",
|
|
55
|
+
dangerouslySetInnerHTML: {
|
|
56
|
+
__html: fontStyle
|
|
57
|
+
}
|
|
58
|
+
}),
|
|
59
|
+
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
60
|
+
"data-id": "google-element-fonts",
|
|
61
|
+
type: "text/css",
|
|
62
|
+
dangerouslySetInnerHTML: {
|
|
63
|
+
__html: fontStyle
|
|
64
|
+
}
|
|
65
|
+
}, fontStyle)),
|
|
66
|
+
customFonts && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
67
|
+
"data-id": "custom-element-fonts",
|
|
68
|
+
type: "text/css",
|
|
69
|
+
dangerouslySetInnerHTML: {
|
|
70
|
+
__html: customFonts
|
|
71
|
+
}
|
|
72
|
+
}, fontStyle)
|
|
73
|
+
]
|
|
50
74
|
}),
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
isPreview: isPreview,
|
|
91
|
-
children: [
|
|
92
|
-
/*#__PURE__*/ jsxRuntime.jsx(core.Render, {
|
|
93
|
-
uid: builder.uid
|
|
94
|
-
}),
|
|
95
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
96
|
-
defer: true,
|
|
97
|
-
strategy: "lazyOnload",
|
|
98
|
-
src: `${baseAssetURL}/assets-v2/gp-flow-action-lip.js`
|
|
99
|
-
})
|
|
100
|
-
]
|
|
101
|
-
}, builder.uid))
|
|
102
|
-
}),
|
|
103
|
-
isPostPurchase && /*#__PURE__*/ jsxRuntime.jsx(FooterForPostPurchase.default, {
|
|
104
|
-
shopName: shopName || ''
|
|
105
|
-
})
|
|
106
|
-
]
|
|
107
|
-
})
|
|
75
|
+
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
76
|
+
productOffers: productOffers,
|
|
77
|
+
publicStoreFrontData: publicStoreFrontData,
|
|
78
|
+
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
79
|
+
components: components,
|
|
80
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
81
|
+
className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
|
|
82
|
+
children: [
|
|
83
|
+
isPostPurchase && /*#__PURE__*/ jsxRuntime.jsx(Header.default, {
|
|
84
|
+
pageType: "POST_PURCHASE"
|
|
85
|
+
}),
|
|
86
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
87
|
+
dangerouslySetInnerHTML: {
|
|
88
|
+
__html: `<div id="gp-interaction" style="display: none;">${JSON.stringify(interaction?.value || [])}</div>`
|
|
89
|
+
}
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ jsxRuntime.jsx(core.SectionProvider, {
|
|
92
|
+
data: sectionData,
|
|
93
|
+
children: builderData?.map((builder)=>/*#__PURE__*/ jsxRuntime.jsxs(core.BuilderProvider, {
|
|
94
|
+
state: builder.data,
|
|
95
|
+
lazy: builder.lazy,
|
|
96
|
+
priority: builder.priority,
|
|
97
|
+
isPostPurchase: isPostPurchase,
|
|
98
|
+
isPreview: isPreview,
|
|
99
|
+
children: [
|
|
100
|
+
/*#__PURE__*/ jsxRuntime.jsx(core.Render, {
|
|
101
|
+
uid: builder.uid
|
|
102
|
+
}),
|
|
103
|
+
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
104
|
+
defer: true,
|
|
105
|
+
src: `${baseAssetURL}/assets-v2/gp-flow-action-lip.js`
|
|
106
|
+
})
|
|
107
|
+
]
|
|
108
|
+
}, builder.uid))
|
|
109
|
+
}),
|
|
110
|
+
isPostPurchase && /*#__PURE__*/ jsxRuntime.jsx(FooterForPostPurchase.default, {
|
|
111
|
+
shopName: shopName || ''
|
|
112
|
+
})
|
|
113
|
+
]
|
|
108
114
|
})
|
|
109
115
|
})
|
|
110
116
|
})
|
package/dist/cjs/pages/static.js
CHANGED
|
@@ -1,46 +1,56 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
'use strict';
|
|
3
2
|
|
|
4
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
4
|
|
|
6
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
6
|
var core = require('@gem-sdk/core');
|
|
8
|
-
var
|
|
7
|
+
var nextSeo = require('next-seo');
|
|
8
|
+
var Head = require('next/head');
|
|
9
|
+
var router = require('next/router');
|
|
9
10
|
|
|
10
|
-
const StaticPage = ({ components, builderData, sectionData, themeStyle, fontStyle })=>{
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
className: "gp-flex gp-
|
|
15
|
-
children:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
11
|
+
const StaticPage = ({ components, builderData, sectionData, seo, themeStyle, fontStyle })=>{
|
|
12
|
+
const router$1 = router.useRouter();
|
|
13
|
+
if (router$1.isFallback) {
|
|
14
|
+
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
15
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
16
|
+
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
17
|
+
className: "gp-flex gp-gap-2",
|
|
18
|
+
children: [
|
|
19
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
20
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
21
|
+
}),
|
|
22
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
23
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
26
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
27
|
+
})
|
|
28
|
+
]
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
30
33
|
children: [
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
type: "text/css",
|
|
34
|
-
dangerouslySetInnerHTML: {
|
|
35
|
-
__html: themeStyle
|
|
36
|
-
}
|
|
34
|
+
/*#__PURE__*/ jsxRuntime.jsx(nextSeo.NextSeo, {
|
|
35
|
+
...seo
|
|
37
36
|
}),
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
37
|
+
/*#__PURE__*/ jsxRuntime.jsxs(Head, {
|
|
38
|
+
children: [
|
|
39
|
+
themeStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
40
|
+
"data-id": "global-style",
|
|
41
|
+
type: "text/css",
|
|
42
|
+
dangerouslySetInnerHTML: {
|
|
43
|
+
__html: themeStyle
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
fontStyle && /*#__PURE__*/ jsxRuntime.jsx("style", {
|
|
47
|
+
"data-id": "google-fonts",
|
|
48
|
+
type: "text/css",
|
|
49
|
+
dangerouslySetInnerHTML: {
|
|
50
|
+
__html: fontStyle
|
|
51
|
+
}
|
|
52
|
+
})
|
|
53
|
+
]
|
|
44
54
|
}),
|
|
45
55
|
/*#__PURE__*/ jsxRuntime.jsx(core.PageProvider, {
|
|
46
56
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
@@ -7,28 +7,21 @@ const parseHtml = (html, isHead)=>{
|
|
|
7
7
|
try {
|
|
8
8
|
return parse(html, {
|
|
9
9
|
replace: (node)=>{
|
|
10
|
-
if (node.type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
} else {
|
|
26
|
-
if (!isHead) {
|
|
27
|
-
return /*#__PURE__*/ jsx(Script, {
|
|
28
|
-
...node.attribs
|
|
29
|
-
});
|
|
10
|
+
if (node.type !== 'script' || !(node instanceof Element)) return null;
|
|
11
|
+
const child = node.children?.[0];
|
|
12
|
+
if (!child) return null;
|
|
13
|
+
if (!(child instanceof Text) && !isHead) return /*#__PURE__*/ jsx(Script, {
|
|
14
|
+
...node.attribs
|
|
15
|
+
});
|
|
16
|
+
if (child instanceof Text && isHead) {
|
|
17
|
+
return /*#__PURE__*/ jsx(Script, {
|
|
18
|
+
...node.attribs,
|
|
19
|
+
type: "text/javascript",
|
|
20
|
+
strategy: isHead ? 'beforeInteractive' : 'afterInteractive',
|
|
21
|
+
dangerouslySetInnerHTML: {
|
|
22
|
+
__html: child.data
|
|
30
23
|
}
|
|
31
|
-
}
|
|
24
|
+
});
|
|
32
25
|
}
|
|
33
26
|
}
|
|
34
27
|
});
|
package/dist/esm/pages/404.js
CHANGED
package/dist/esm/pages/500.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
'use client';
|
|
2
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderPreviewProvider } from '@gem-sdk/core';
|
|
3
|
+
import { NextSeo } from 'next-seo';
|
|
4
|
+
import Head from 'next/head';
|
|
4
5
|
import { useState, useMemo, useEffect } from 'react';
|
|
5
6
|
import Toolbox from '../components/builder/Toolbox.js';
|
|
6
7
|
import Header from '../components/builder/Header.js';
|
|
@@ -12,7 +13,7 @@ import Toolbar from '../components/builder/Toolbar.js';
|
|
|
12
13
|
import Devices from '../components/builder/SwitchView.js';
|
|
13
14
|
import Body from '../components/builder/Body.js';
|
|
14
15
|
|
|
15
|
-
const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
16
|
+
const BuilderPage = ({ components, seo, themeStyle, fontStyle, sectionData, pageType, editorImageToLayout, isThemeSectionEditor, hiddenToolbar, pageName, isOriginTemplate })=>{
|
|
16
17
|
const [loadSuccess, setLoadSuccess] = useState(false);
|
|
17
18
|
const isDisableHeaderFooter = ()=>{
|
|
18
19
|
return isThemeSectionEditor;
|
|
@@ -35,19 +36,26 @@ const BuilderPage = ({ components, themeStyle, fontStyle, sectionData, pageType,
|
|
|
35
36
|
};
|
|
36
37
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
37
38
|
children: [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
id: "global-style",
|
|
41
|
-
dangerouslySetInnerHTML: {
|
|
42
|
-
__html: themeStyle
|
|
43
|
-
}
|
|
39
|
+
/*#__PURE__*/ jsx(NextSeo, {
|
|
40
|
+
...seo
|
|
44
41
|
}),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
42
|
+
/*#__PURE__*/ jsxs(Head, {
|
|
43
|
+
children: [
|
|
44
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
45
|
+
type: "text/css",
|
|
46
|
+
id: "global-style",
|
|
47
|
+
dangerouslySetInnerHTML: {
|
|
48
|
+
__html: themeStyle
|
|
49
|
+
}
|
|
50
|
+
}),
|
|
51
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
52
|
+
"data-id": "google-fonts",
|
|
53
|
+
type: "text/css",
|
|
54
|
+
dangerouslySetInnerHTML: {
|
|
55
|
+
__html: fontStyle
|
|
56
|
+
}
|
|
57
|
+
})
|
|
58
|
+
]
|
|
51
59
|
}),
|
|
52
60
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
53
61
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
@@ -1,43 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
|
+
import { NextSeo } from 'next-seo';
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
|
-
import
|
|
5
|
+
import Head from 'next/head';
|
|
6
|
+
import { useRouter } from 'next/router';
|
|
6
7
|
|
|
7
8
|
const CollectionProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.CollectionProvider));
|
|
8
|
-
const CollectionDetailPage = ({ components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
9
|
+
const CollectionDetailPage = ({ seo, components, builderData, sectionData, themeStyle, collection, fontStyle })=>{
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
if (router.isFallback) {
|
|
12
|
+
return /*#__PURE__*/ jsx("div", {
|
|
13
|
+
children: "Loading..."
|
|
14
|
+
});
|
|
15
|
+
}
|
|
9
16
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
10
17
|
children: [
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
type: "text/css",
|
|
14
|
-
dangerouslySetInnerHTML: {
|
|
15
|
-
__html: themeStyle
|
|
16
|
-
}
|
|
18
|
+
/*#__PURE__*/ jsx(NextSeo, {
|
|
19
|
+
...seo
|
|
17
20
|
}),
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
/*#__PURE__*/ jsxs(Head, {
|
|
22
|
+
children: [
|
|
23
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
24
|
+
"data-id": "global-style",
|
|
25
|
+
type: "text/css",
|
|
26
|
+
dangerouslySetInnerHTML: {
|
|
27
|
+
__html: themeStyle
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
31
|
+
"data-id": "google-fonts",
|
|
32
|
+
type: "text/css",
|
|
33
|
+
dangerouslySetInnerHTML: {
|
|
34
|
+
__html: fontStyle
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
]
|
|
24
38
|
}),
|
|
25
|
-
/*#__PURE__*/ jsx(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
children: builderData && /*#__PURE__*/ jsx(BuilderProvider, {
|
|
37
|
-
state: builderData,
|
|
38
|
-
children: /*#__PURE__*/ jsx(Render, {
|
|
39
|
-
uid: "ROOT"
|
|
40
|
-
})
|
|
39
|
+
/*#__PURE__*/ jsx(PageProvider, {
|
|
40
|
+
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
41
|
+
components: components,
|
|
42
|
+
children: /*#__PURE__*/ jsx(SectionProvider, {
|
|
43
|
+
data: sectionData,
|
|
44
|
+
children: /*#__PURE__*/ jsx(CollectionProvider, {
|
|
45
|
+
collection: collection,
|
|
46
|
+
children: builderData && /*#__PURE__*/ jsx(BuilderProvider, {
|
|
47
|
+
state: builderData,
|
|
48
|
+
children: /*#__PURE__*/ jsx(Render, {
|
|
49
|
+
uid: "ROOT"
|
|
41
50
|
})
|
|
42
51
|
})
|
|
43
52
|
})
|
|
@@ -1,29 +1,40 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render, AddOn } from '@gem-sdk/core';
|
|
3
|
+
import { NextSeo } from 'next-seo';
|
|
4
4
|
import dynamic from 'next/dynamic';
|
|
5
|
-
import
|
|
5
|
+
import Head from 'next/head';
|
|
6
|
+
import { useRouter } from 'next/router';
|
|
6
7
|
|
|
7
8
|
const ProductProvider = dynamic(()=>import('@gem-sdk/core').then((m)=>m.ProductProvider));
|
|
8
|
-
const ProductDetailPage = ({ themeStyle, fontStyle, product, components, builderData, sectionData })=>{
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
const ProductDetailPage = ({ themeStyle, fontStyle, seo, product, components, builderData, sectionData })=>{
|
|
10
|
+
const router = useRouter();
|
|
11
|
+
if (router.isFallback) {
|
|
12
|
+
return /*#__PURE__*/ jsx("div", {
|
|
11
13
|
children: "Loading..."
|
|
12
|
-
})
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
13
17
|
children: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
type: "text/css",
|
|
17
|
-
dangerouslySetInnerHTML: {
|
|
18
|
-
__html: themeStyle
|
|
19
|
-
}
|
|
18
|
+
/*#__PURE__*/ jsx(NextSeo, {
|
|
19
|
+
...seo
|
|
20
20
|
}),
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
21
|
+
/*#__PURE__*/ jsxs(Head, {
|
|
22
|
+
children: [
|
|
23
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
24
|
+
"data-id": "global-style",
|
|
25
|
+
type: "text/css",
|
|
26
|
+
dangerouslySetInnerHTML: {
|
|
27
|
+
__html: themeStyle
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
31
|
+
"data-id": "google-fonts",
|
|
32
|
+
type: "text/css",
|
|
33
|
+
dangerouslySetInnerHTML: {
|
|
34
|
+
__html: fontStyle
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
]
|
|
27
38
|
}),
|
|
28
39
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
29
40
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
@@ -1,108 +1,114 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
3
|
+
import { NextSeo } from 'next-seo';
|
|
4
|
+
import Head from 'next/head';
|
|
5
|
+
import { useRouter } from 'next/router';
|
|
4
6
|
import { useTrackingView } from '../libs/hooks/use-tracking-view.js';
|
|
5
7
|
import { parseHtml } from '../libs/parse-html.js';
|
|
6
8
|
import Header from '../components/builder/Header.js';
|
|
7
9
|
import FooterForPostPurchase from '../components/FooterForPostPurchase.js';
|
|
8
10
|
import Script from 'next/script';
|
|
9
|
-
import { Suspense } from 'react';
|
|
10
11
|
|
|
11
|
-
const StaticPageV2 = (
|
|
12
|
-
const
|
|
12
|
+
const StaticPageV2 = ({ components, builderData, sectionData, seo, themeStyle, fontStyle, elementFontStyle, customCodeHeader, shopToken, pageHandle, customFonts, isPostPurchase, shopName, productOffers, publicStoreFrontData, isPreview, interaction })=>{
|
|
13
|
+
const router = useRouter();
|
|
13
14
|
const baseAssetURL = process.env.NEXT_GP_BASE_ASSET_URL || 'https://d3kbi0je7pp4lw.cloudfront.net';
|
|
14
|
-
useTrackingView(shopToken, pageHandle);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
15
|
+
useTrackingView(shopToken, pageHandle, router.isFallback);
|
|
16
|
+
if (router.isFallback) {
|
|
17
|
+
return /*#__PURE__*/ jsx("div", {
|
|
18
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
19
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
20
|
+
className: "gp-flex gp-gap-2",
|
|
21
|
+
children: [
|
|
22
|
+
/*#__PURE__*/ jsx("span", {
|
|
23
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
24
|
+
}),
|
|
25
|
+
/*#__PURE__*/ jsx("span", {
|
|
26
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ jsx("span", {
|
|
29
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
30
|
+
})
|
|
31
|
+
]
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
}
|
|
32
35
|
return /*#__PURE__*/ jsxs(Fragment, {
|
|
33
36
|
children: [
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"data-id": "global-style",
|
|
37
|
-
type: "text/css",
|
|
38
|
-
dangerouslySetInnerHTML: {
|
|
39
|
-
__html: themeStyle
|
|
40
|
-
}
|
|
37
|
+
/*#__PURE__*/ jsx(NextSeo, {
|
|
38
|
+
...seo
|
|
41
39
|
}),
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
40
|
+
/*#__PURE__*/ jsxs(Head, {
|
|
41
|
+
children: [
|
|
42
|
+
parseHtml(customCodeHeader, true),
|
|
43
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
44
|
+
"data-id": "global-style",
|
|
45
|
+
type: "text/css",
|
|
46
|
+
dangerouslySetInnerHTML: {
|
|
47
|
+
__html: themeStyle
|
|
48
|
+
}
|
|
49
|
+
}),
|
|
50
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
51
|
+
"data-id": "google-fonts",
|
|
52
|
+
type: "text/css",
|
|
53
|
+
dangerouslySetInnerHTML: {
|
|
54
|
+
__html: fontStyle
|
|
55
|
+
}
|
|
56
|
+
}),
|
|
57
|
+
elementFontStyle && elementFontStyle.map((fontStyle)=>/*#__PURE__*/ jsx("style", {
|
|
58
|
+
"data-id": "google-element-fonts",
|
|
59
|
+
type: "text/css",
|
|
60
|
+
dangerouslySetInnerHTML: {
|
|
61
|
+
__html: fontStyle
|
|
62
|
+
}
|
|
63
|
+
}, fontStyle)),
|
|
64
|
+
customFonts && /*#__PURE__*/ jsx("style", {
|
|
65
|
+
"data-id": "custom-element-fonts",
|
|
66
|
+
type: "text/css",
|
|
67
|
+
dangerouslySetInnerHTML: {
|
|
68
|
+
__html: customFonts
|
|
69
|
+
}
|
|
70
|
+
}, fontStyle)
|
|
71
|
+
]
|
|
48
72
|
}),
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
isPreview: isPreview,
|
|
89
|
-
children: [
|
|
90
|
-
/*#__PURE__*/ jsx(Render, {
|
|
91
|
-
uid: builder.uid
|
|
92
|
-
}),
|
|
93
|
-
/*#__PURE__*/ jsx(Script, {
|
|
94
|
-
defer: true,
|
|
95
|
-
strategy: "lazyOnload",
|
|
96
|
-
src: `${baseAssetURL}/assets-v2/gp-flow-action-lip.js`
|
|
97
|
-
})
|
|
98
|
-
]
|
|
99
|
-
}, builder.uid))
|
|
100
|
-
}),
|
|
101
|
-
isPostPurchase && /*#__PURE__*/ jsx(FooterForPostPurchase, {
|
|
102
|
-
shopName: shopName || ''
|
|
103
|
-
})
|
|
104
|
-
]
|
|
105
|
-
})
|
|
73
|
+
/*#__PURE__*/ jsx(PageProvider, {
|
|
74
|
+
productOffers: productOffers,
|
|
75
|
+
publicStoreFrontData: publicStoreFrontData,
|
|
76
|
+
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|
|
77
|
+
components: components,
|
|
78
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
79
|
+
className: `${isPostPurchase ? 'gp-bg-white post-purchase-page' : ''} `,
|
|
80
|
+
children: [
|
|
81
|
+
isPostPurchase && /*#__PURE__*/ jsx(Header, {
|
|
82
|
+
pageType: "POST_PURCHASE"
|
|
83
|
+
}),
|
|
84
|
+
/*#__PURE__*/ jsx("div", {
|
|
85
|
+
dangerouslySetInnerHTML: {
|
|
86
|
+
__html: `<div id="gp-interaction" style="display: none;">${JSON.stringify(interaction?.value || [])}</div>`
|
|
87
|
+
}
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ jsx(SectionProvider, {
|
|
90
|
+
data: sectionData,
|
|
91
|
+
children: builderData?.map((builder)=>/*#__PURE__*/ jsxs(BuilderProvider, {
|
|
92
|
+
state: builder.data,
|
|
93
|
+
lazy: builder.lazy,
|
|
94
|
+
priority: builder.priority,
|
|
95
|
+
isPostPurchase: isPostPurchase,
|
|
96
|
+
isPreview: isPreview,
|
|
97
|
+
children: [
|
|
98
|
+
/*#__PURE__*/ jsx(Render, {
|
|
99
|
+
uid: builder.uid
|
|
100
|
+
}),
|
|
101
|
+
/*#__PURE__*/ jsx(Script, {
|
|
102
|
+
defer: true,
|
|
103
|
+
src: `${baseAssetURL}/assets-v2/gp-flow-action-lip.js`
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
}, builder.uid))
|
|
107
|
+
}),
|
|
108
|
+
isPostPurchase && /*#__PURE__*/ jsx(FooterForPostPurchase, {
|
|
109
|
+
shopName: shopName || ''
|
|
110
|
+
})
|
|
111
|
+
]
|
|
106
112
|
})
|
|
107
113
|
})
|
|
108
114
|
})
|
package/dist/esm/pages/static.js
CHANGED
|
@@ -1,42 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
3
2
|
import { PageProvider, BuilderComponentProvider, SectionProvider, BuilderProvider, Render } from '@gem-sdk/core';
|
|
4
|
-
import {
|
|
3
|
+
import { NextSeo } from 'next-seo';
|
|
4
|
+
import Head from 'next/head';
|
|
5
|
+
import { useRouter } from 'next/router';
|
|
5
6
|
|
|
6
|
-
const StaticPage = ({ components, builderData, sectionData, themeStyle, fontStyle })=>{
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
className: "gp-flex gp-
|
|
11
|
-
children:
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
const StaticPage = ({ components, builderData, sectionData, seo, themeStyle, fontStyle })=>{
|
|
8
|
+
const router = useRouter();
|
|
9
|
+
if (router.isFallback) {
|
|
10
|
+
return /*#__PURE__*/ jsx("div", {
|
|
11
|
+
className: "gp-flex gp-h-[100vh] gp-items-center gp-justify-center",
|
|
12
|
+
children: /*#__PURE__*/ jsxs("div", {
|
|
13
|
+
className: "gp-flex gp-gap-2",
|
|
14
|
+
children: [
|
|
15
|
+
/*#__PURE__*/ jsx("span", {
|
|
16
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"
|
|
17
|
+
}),
|
|
18
|
+
/*#__PURE__*/ jsx("span", {
|
|
19
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"
|
|
20
|
+
}),
|
|
21
|
+
/*#__PURE__*/ jsx("span", {
|
|
22
|
+
className: "gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"
|
|
23
|
+
})
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
return /*#__PURE__*/ jsxs(Fragment, {
|
|
26
29
|
children: [
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
type: "text/css",
|
|
30
|
-
dangerouslySetInnerHTML: {
|
|
31
|
-
__html: themeStyle
|
|
32
|
-
}
|
|
30
|
+
/*#__PURE__*/ jsx(NextSeo, {
|
|
31
|
+
...seo
|
|
33
32
|
}),
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
/*#__PURE__*/ jsxs(Head, {
|
|
34
|
+
children: [
|
|
35
|
+
themeStyle && /*#__PURE__*/ jsx("style", {
|
|
36
|
+
"data-id": "global-style",
|
|
37
|
+
type: "text/css",
|
|
38
|
+
dangerouslySetInnerHTML: {
|
|
39
|
+
__html: themeStyle
|
|
40
|
+
}
|
|
41
|
+
}),
|
|
42
|
+
fontStyle && /*#__PURE__*/ jsx("style", {
|
|
43
|
+
"data-id": "google-fonts",
|
|
44
|
+
type: "text/css",
|
|
45
|
+
dangerouslySetInnerHTML: {
|
|
46
|
+
__html: fontStyle
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
]
|
|
40
50
|
}),
|
|
41
51
|
/*#__PURE__*/ jsx(PageProvider, {
|
|
42
52
|
children: /*#__PURE__*/ jsx(BuilderComponentProvider, {
|