@gem-sdk/pages 1.36.20 → 2.0.0-dev.834
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/ErrorBoundary.js +1 -40
- package/dist/cjs/components/ErrorFallback.js +1 -26
- package/dist/cjs/components/FacebookPixel.js +3 -36
- package/dist/cjs/components/Footer.js +1 -125
- package/dist/cjs/components/FooterForPostPurchase.js +1 -0
- package/dist/cjs/components/GoogleAnalytic.js +5 -67
- package/dist/cjs/components/Header.js +1 -96
- package/dist/cjs/components/TikTokPixel.js +3 -19
- package/dist/cjs/components/builder/PopupManager.js +1 -62
- package/dist/cjs/components/builder/Toolbar.js +1 -883
- package/dist/cjs/components/builder/Toolbox.js +1 -384
- package/dist/cjs/components/builder/toolbar/Onboarding.js +1 -110
- package/dist/cjs/components/image-to-layout/AddSectionImageToLayout.js +1 -263
- package/dist/cjs/components/image-to-layout/DropElement.js +1 -164
- package/dist/cjs/components/image-to-layout/ImageToLayout.js +1 -41
- package/dist/cjs/index.js +1 -75
- package/dist/cjs/layouts/main.js +1 -30
- package/dist/cjs/libs/api/get-builder-props.js +1 -41
- package/dist/cjs/libs/api/get-collection-props.js +1 -68
- package/dist/cjs/libs/api/get-home-page-props-v2.js +1 -145
- package/dist/cjs/libs/api/get-home-page-props.js +1 -151
- package/dist/cjs/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/cjs/libs/api/get-preview-props.js +1 -18
- package/dist/cjs/libs/api/get-product-props.js +1 -73
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -150
- package/dist/cjs/libs/api/get-static-page-props-v2.js +1 -152
- package/dist/cjs/libs/api/get-static-page-props.js +1 -148
- package/dist/cjs/libs/custom-fonts.js +6 -60
- package/dist/cjs/libs/fetcher.js +1 -67
- package/dist/cjs/libs/get-layout.js +1 -13
- package/dist/cjs/libs/get-storefront-api.js +1 -12
- package/dist/cjs/libs/getStaticPaths.js +1 -10
- package/dist/cjs/libs/google-fonts.js +1 -81
- package/dist/cjs/libs/helpers/common.js +1 -27
- package/dist/cjs/libs/helpers/gen-css.js +1 -117
- package/dist/cjs/libs/helpers/gen-fonts.js +1 -68
- package/dist/cjs/libs/helpers/generate-manifres.js +1 -5
- package/dist/cjs/libs/helpers/get-fallback.js +1 -35
- package/dist/cjs/libs/helpers/normalize.js +1 -90
- package/dist/cjs/libs/helpers/parse-json.js +1 -16
- package/dist/cjs/libs/helpers/user-agent.js +1 -7
- package/dist/cjs/libs/hooks/use-tracking-view.js +1 -45
- package/dist/cjs/libs/hooks/usePagePreview.js +1 -0
- package/dist/cjs/libs/parse-html.js +1 -42
- package/dist/cjs/libs/shopify-cdn-with-google-fonts.js +1 -1845
- package/dist/cjs/pages/404.js +1 -43
- package/dist/cjs/pages/500.js +1 -74
- package/dist/cjs/pages/CollectionGlobalProvider.js +1 -59
- package/dist/cjs/pages/builder.js +1 -103
- package/dist/cjs/pages/collection-detail.js +1 -64
- package/dist/cjs/pages/preview.js +1 -26
- package/dist/cjs/pages/product-detail.js +1 -69
- package/dist/cjs/pages/static-v2.js +1 -91
- package/dist/cjs/pages/static.js +1 -75
- package/dist/esm/components/ErrorBoundary.js +1 -38
- package/dist/esm/components/ErrorFallback.js +1 -24
- package/dist/esm/components/FacebookPixel.js +3 -34
- package/dist/esm/components/Footer.js +1 -121
- package/dist/esm/components/FooterForPostPurchase.js +1 -0
- package/dist/esm/components/GoogleAnalytic.js +5 -65
- package/dist/esm/components/Header.js +1 -92
- package/dist/esm/components/TikTokPixel.js +3 -17
- package/dist/esm/components/builder/PopupManager.js +1 -58
- package/dist/esm/components/builder/Toolbar.js +1 -879
- package/dist/esm/components/builder/Toolbox.js +1 -380
- package/dist/esm/components/builder/toolbar/Onboarding.js +1 -106
- package/dist/esm/components/image-to-layout/AddSectionImageToLayout.js +1 -259
- package/dist/esm/components/image-to-layout/DropElement.js +1 -162
- package/dist/esm/components/image-to-layout/ImageToLayout.js +1 -37
- package/dist/esm/index.js +1 -33
- package/dist/esm/layouts/main.js +1 -26
- package/dist/esm/libs/api/get-builder-props.js +1 -39
- package/dist/esm/libs/api/get-collection-props.js +1 -66
- package/dist/esm/libs/api/get-home-page-props-v2.js +1 -143
- package/dist/esm/libs/api/get-home-page-props.js +1 -149
- package/dist/esm/libs/api/get-post-purchase-props-preview.js +1 -0
- package/dist/esm/libs/api/get-preview-props.js +1 -16
- package/dist/esm/libs/api/get-product-props.js +1 -71
- package/dist/esm/libs/api/get-static-page-props-preview.js +1 -148
- package/dist/esm/libs/api/get-static-page-props-v2.js +1 -150
- package/dist/esm/libs/api/get-static-page-props.js +1 -146
- package/dist/esm/libs/custom-fonts.js +6 -55
- package/dist/esm/libs/fetcher.js +1 -64
- package/dist/esm/libs/get-layout.js +1 -11
- package/dist/esm/libs/get-storefront-api.js +1 -10
- package/dist/esm/libs/getStaticPaths.js +1 -8
- package/dist/esm/libs/google-fonts.js +1 -75
- package/dist/esm/libs/helpers/common.js +1 -24
- package/dist/esm/libs/helpers/gen-css.js +1 -115
- package/dist/esm/libs/helpers/gen-fonts.js +1 -65
- package/dist/esm/libs/helpers/generate-manifres.js +1 -3
- package/dist/esm/libs/helpers/get-fallback.js +1 -33
- package/dist/esm/libs/helpers/normalize.js +1 -85
- package/dist/esm/libs/helpers/parse-json.js +1 -13
- package/dist/esm/libs/helpers/user-agent.js +1 -5
- package/dist/esm/libs/hooks/use-tracking-view.js +1 -43
- package/dist/esm/libs/hooks/usePagePreview.js +1 -0
- package/dist/esm/libs/parse-html.js +1 -40
- package/dist/esm/libs/shopify-cdn-with-google-fonts.js +1 -1843
- package/dist/esm/pages/404.js +1 -41
- package/dist/esm/pages/500.js +1 -72
- package/dist/esm/pages/CollectionGlobalProvider.js +1 -55
- package/dist/esm/pages/builder.js +1 -101
- package/dist/esm/pages/collection-detail.js +1 -60
- package/dist/esm/pages/preview.js +1 -24
- package/dist/esm/pages/product-detail.js +1 -65
- package/dist/esm/pages/static-v2.js +1 -89
- package/dist/esm/pages/static.js +1 -71
- package/dist/types/index.d.ts +29 -6
- package/package.json +5 -5
|
@@ -1,40 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var react = require('react');
|
|
5
|
-
|
|
6
|
-
const initialState = {
|
|
7
|
-
hasError: false
|
|
8
|
-
};
|
|
9
|
-
class ErrorBoundary extends react.Component {
|
|
10
|
-
state = initialState;
|
|
11
|
-
static getDerivedStateFromError(error) {
|
|
12
|
-
// Update state so the next render will show the fallback UI
|
|
13
|
-
return {
|
|
14
|
-
hasError: true,
|
|
15
|
-
error
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
reset = ()=>{
|
|
19
|
-
this.setState(initialState);
|
|
20
|
-
};
|
|
21
|
-
componentDidCatch(error, errorInfo) {
|
|
22
|
-
// You can use your own error logging service here
|
|
23
|
-
this.props.onError?.(error, errorInfo);
|
|
24
|
-
}
|
|
25
|
-
render() {
|
|
26
|
-
const { FallbackComponent } = this.props;
|
|
27
|
-
// Check if the error is thrown
|
|
28
|
-
if (this.state.hasError) {
|
|
29
|
-
// You can render any custom fallback UI
|
|
30
|
-
return /*#__PURE__*/ jsxRuntime.jsx(FallbackComponent, {
|
|
31
|
-
error: this.state.error,
|
|
32
|
-
resetErrorBoundary: this.reset
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
// Return children components in case of no error
|
|
36
|
-
return this.props.children;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
exports.ErrorBoundary = ErrorBoundary;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),react=require("react");const initialState={hasError:!1};class ErrorBoundary extends react.Component{state=initialState;static getDerivedStateFromError(r){return{hasError:!0,error:r}}reset=()=>{this.setState(initialState)};componentDidCatch(r,t){this.props.onError?.(r,t)}render(){let{FallbackComponent:r}=this.props;return this.state.hasError?jsxRuntime.jsx(r,{error:this.state.error,resetErrorBoundary:this.reset}):this.props.children}}exports.ErrorBoundary=ErrorBoundary;
|
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
|
|
5
|
-
const ErrorFallback = ({ error, resetErrorBoundary })=>{
|
|
6
|
-
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
7
|
-
role: "alert",
|
|
8
|
-
className: "gp-flex gp-flex-col gp-items-center gp-gap-2",
|
|
9
|
-
children: [
|
|
10
|
-
/*#__PURE__*/ jsxRuntime.jsx("p", {
|
|
11
|
-
className: "gp-text-center gp-text-2xl",
|
|
12
|
-
children: "Oops! Something went wrong"
|
|
13
|
-
}),
|
|
14
|
-
/*#__PURE__*/ jsxRuntime.jsx("pre", {
|
|
15
|
-
children: error?.message
|
|
16
|
-
}),
|
|
17
|
-
/*#__PURE__*/ jsxRuntime.jsx("button", {
|
|
18
|
-
onClick: resetErrorBoundary,
|
|
19
|
-
className: "gp-inline-flex gp-h-10 gp-items-center gp-justify-center gp-gap-2 gp-rounded gp-bg-[#3C67FF] gp-px-6 gp-text-white active:gp-translate-y-1",
|
|
20
|
-
children: "Try again"
|
|
21
|
-
})
|
|
22
|
-
]
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
exports.ErrorFallback = ErrorFallback;
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime");const ErrorFallback=({error:e,resetErrorBoundary:t})=>jsxRuntime.jsxs("div",{role:"alert",className:"gp-flex gp-flex-col gp-items-center gp-gap-2",children:[jsxRuntime.jsx("p",{className:"gp-text-center gp-text-2xl",children:"Oops! Something went wrong"}),jsxRuntime.jsx("pre",{children:e?.message}),jsxRuntime.jsx("button",{onClick:t,className:"gp-inline-flex gp-h-10 gp-items-center gp-justify-center gp-gap-2 gp-rounded gp-bg-[#3C67FF] gp-px-6 gp-text-white active:gp-translate-y-1",children:"Try again"})]});exports.ErrorFallback=ErrorFallback;
|
|
@@ -1,32 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var core = require('@gem-sdk/core');
|
|
5
|
-
var router = require('next/router');
|
|
6
|
-
var Script = require('next/script');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
|
|
9
|
-
const FacebookPixel = ({ pixelId })=>{
|
|
10
|
-
const router$1 = router.useRouter();
|
|
11
|
-
react.useEffect(()=>{
|
|
12
|
-
const handleRouteChange = ()=>{
|
|
13
|
-
core.fpixel.pageview();
|
|
14
|
-
};
|
|
15
|
-
router$1.events.on('routeChangeComplete', handleRouteChange);
|
|
16
|
-
router$1.events.on('hashChangeComplete', handleRouteChange);
|
|
17
|
-
return ()=>{
|
|
18
|
-
router$1.events.off('routeChangeComplete', handleRouteChange);
|
|
19
|
-
router$1.events.off('hashChangeComplete', handleRouteChange);
|
|
20
|
-
};
|
|
21
|
-
}, [
|
|
22
|
-
router$1.events
|
|
23
|
-
]);
|
|
24
|
-
if (!pixelId) return null;
|
|
25
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
26
|
-
id: "fb-pixel",
|
|
27
|
-
strategy: "lazyOnload",
|
|
28
|
-
dangerouslySetInnerHTML: {
|
|
29
|
-
__html: `
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),router=require("next/router"),Script=require("next/script"),react=require("react");const FacebookPixel=({pixelId:e})=>{let t=router.useRouter();return(react.useEffect(()=>{let e=()=>{core.fpixel.pageview()};return t.events.on("routeChangeComplete",e),t.events.on("hashChangeComplete",e),()=>{t.events.off("routeChangeComplete",e),t.events.off("hashChangeComplete",e)}},[t.events]),e)?jsxRuntime.jsx(Script,{id:"fb-pixel",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`
|
|
30
2
|
!function(f,b,e,v,n,t,s)
|
|
31
3
|
{if(f.fbq)return;n=f.fbq=function(){n.callMethod?
|
|
32
4
|
n.callMethod.apply(n,arguments):n.queue.push(arguments)};
|
|
@@ -35,11 +7,6 @@ const FacebookPixel = ({ pixelId })=>{
|
|
|
35
7
|
t.src=v;s=b.getElementsByTagName(e)[0];
|
|
36
8
|
s.parentNode.insertBefore(t,s)}(window, document,'script',
|
|
37
9
|
'https://connect.facebook.net/en_US/fbevents.js');
|
|
38
|
-
fbq('init', ${
|
|
10
|
+
fbq('init', ${e});
|
|
39
11
|
fbq('track', 'PageView');
|
|
40
|
-
`
|
|
41
|
-
}
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
|
-
|
|
45
|
-
exports.FacebookPixel = FacebookPixel;
|
|
12
|
+
`}}):null};exports.FacebookPixel=FacebookPixel;
|
|
@@ -1,125 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var core = require('@gem-sdk/core');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
|
|
9
|
-
const defaultMargin = {
|
|
10
|
-
desktop: '40px',
|
|
11
|
-
tablet: '40px',
|
|
12
|
-
mobile: '40px'
|
|
13
|
-
};
|
|
14
|
-
const FOOTER_OFF_COLOR = '#F4F4F4';
|
|
15
|
-
const Footer = ()=>{
|
|
16
|
-
const layoutSetting = core.useShopStore((s)=>s.layoutSettings);
|
|
17
|
-
const [shouldFixed, setShouldFixed] = react.useState(false);
|
|
18
|
-
react.useEffect(()=>{
|
|
19
|
-
const $iframe = parent.document.querySelector('.iframe');
|
|
20
|
-
if (!$iframe) return;
|
|
21
|
-
const $storefront = document.querySelector('#storefront');
|
|
22
|
-
if (!$storefront) return;
|
|
23
|
-
const headerHeight = 40;
|
|
24
|
-
const footerHeight = 48;
|
|
25
|
-
const iframeHeight = $iframe.clientHeight;
|
|
26
|
-
const comparedHeight = layoutSetting?.showHeader ? iframeHeight - headerHeight - footerHeight : iframeHeight - footerHeight;
|
|
27
|
-
const observer = new ResizeObserver((entries)=>{
|
|
28
|
-
// Handle set fixed footer
|
|
29
|
-
const currentEditingFrameHeight = entries[0]?.target.clientHeight;
|
|
30
|
-
if (currentEditingFrameHeight && comparedHeight) setShouldFixed(currentEditingFrameHeight < comparedHeight);
|
|
31
|
-
});
|
|
32
|
-
observer.observe($storefront);
|
|
33
|
-
return ()=>{
|
|
34
|
-
observer.unobserve($storefront);
|
|
35
|
-
};
|
|
36
|
-
}, [
|
|
37
|
-
layoutSetting
|
|
38
|
-
]);
|
|
39
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
40
|
-
className: core.cls('gp-footer-container gp-border-1 gp-group gp-flex gp-h-[48px] gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans', {
|
|
41
|
-
'gp-fixed gp-bottom-0 gp-w-full': shouldFixed
|
|
42
|
-
}),
|
|
43
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
44
|
-
className: "gp-flex gp-h-[40px] gp-flex-1 gp-items-center gp-justify-between",
|
|
45
|
-
style: {
|
|
46
|
-
maxWidth: `var(--g-ct-w)`,
|
|
47
|
-
...core.makeStyleResponsive('ml', defaultMargin),
|
|
48
|
-
...core.makeStyleResponsive('mr', defaultMargin)
|
|
49
|
-
},
|
|
50
|
-
children: [
|
|
51
|
-
/*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
52
|
-
width: "192",
|
|
53
|
-
height: "8",
|
|
54
|
-
viewBox: "0 0 192 8",
|
|
55
|
-
fill: "none",
|
|
56
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
57
|
-
children: [
|
|
58
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
59
|
-
d: "M0 4C0 1.79086 1.79086 0 4 0H52C54.2091 0 56 1.79086 56 4C56 6.20914 54.2091 8 52 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
60
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
63
|
-
d: "M68 4C68 1.79086 69.7909 0 72 0H120C122.209 0 124 1.79086 124 4C124 6.20914 122.209 8 120 8H72C69.7909 8 68 6.20914 68 4Z",
|
|
64
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
67
|
-
d: "M136 4C136 1.79086 137.791 0 140 0H188C190.209 0 192 1.79086 192 4C192 6.20914 190.209 8 188 8H140C137.791 8 136 6.20914 136 4Z",
|
|
68
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
}),
|
|
72
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
73
|
-
className: "gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#0000001a] group-hover:gp-visible",
|
|
74
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
75
|
-
className: "gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",
|
|
76
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
77
|
-
width: "14",
|
|
78
|
-
height: "14",
|
|
79
|
-
viewBox: "0 0 14 14",
|
|
80
|
-
fill: "none",
|
|
81
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
82
|
-
children: [
|
|
83
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
84
|
-
fillRule: "evenodd",
|
|
85
|
-
clipRule: "evenodd",
|
|
86
|
-
d: "M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",
|
|
87
|
-
fill: "#212121"
|
|
88
|
-
}),
|
|
89
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
90
|
-
fillRule: "evenodd",
|
|
91
|
-
clipRule: "evenodd",
|
|
92
|
-
d: "M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",
|
|
93
|
-
fill: "#212121"
|
|
94
|
-
})
|
|
95
|
-
]
|
|
96
|
-
})
|
|
97
|
-
})
|
|
98
|
-
}),
|
|
99
|
-
/*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
100
|
-
width: "82",
|
|
101
|
-
height: "8",
|
|
102
|
-
viewBox: "0 0 82 8",
|
|
103
|
-
fill: "none",
|
|
104
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
105
|
-
children: [
|
|
106
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
107
|
-
d: "M0 4C0 1.79086 1.79086 0 4 0H18C20.2091 0 22 1.79086 22 4C22 6.20914 20.2091 8 18 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
108
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
109
|
-
}),
|
|
110
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
111
|
-
d: "M30 4C30 1.79086 31.7909 0 34 0H48C50.2091 0 52 1.79086 52 4C52 6.20914 50.2091 8 48 8H34C31.7909 8 30 6.20914 30 4Z",
|
|
112
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
113
|
-
}),
|
|
114
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
115
|
-
d: "M60 4C60 1.79086 61.7909 0 64 0H78C80.2091 0 82 1.79086 82 4C82 6.20914 80.2091 8 78 8H64C61.7909 8 60 6.20914 60 4Z",
|
|
116
|
-
fill: layoutSetting?.showFooter ? '#D6D6D6' : FOOTER_OFF_COLOR
|
|
117
|
-
})
|
|
118
|
-
]
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
|
|
125
|
-
exports.default = Footer;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const defaultMargin={desktop:"40px",tablet:"40px",mobile:"40px"},FOOTER_OFF_COLOR="#F4F4F4",Footer=e=>{let{pageType:t}=e,s=new URLSearchParams(window.location.search),r=s.get("storefrontHandle"),i=core.useShopStore(e=>e.layoutSettings),[l,o]=react.useState(!1);return react.useEffect(()=>{let e=parent.document.querySelector(".iframe");if(!e)return;let t=document.querySelector("#storefront");if(!t)return;let s=e.clientHeight,r=i?.showHeader?s-40-48:s-48,l=new ResizeObserver(e=>{let t=e[0]?.target.clientHeight;t&&r&&o(t<r)});return l.observe(t),()=>{l.unobserve(t)}},[i]),jsxRuntime.jsx(jsxRuntime.Fragment,{children:"POST_PURCHASE"===t?jsxRuntime.jsx("div",{className:core.cls("gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans"),children:jsxRuntime.jsx("div",{className:"gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",style:{maxWidth:"var(--g-ct-w, 1200px)",...core.makeStyleResponsive("ml",defaultMargin),...core.makeStyleResponsive("mr",defaultMargin)},children:jsxRuntime.jsxs("p",{className:"gp-text-lg",children:["All rights reserved ",r]})})}):jsxRuntime.jsx("div",{className:core.cls("gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans",{"gp-fixed gp-bottom-0 gp-w-full":l}),children:jsxRuntime.jsxs("div",{className:"gp-flex gp-h-[40px] gp-flex-1 gp-items-center gp-justify-between",style:{maxWidth:"var(--g-ct-w)",...core.makeStyleResponsive("ml",defaultMargin),...core.makeStyleResponsive("mr",defaultMargin)},children:[jsxRuntime.jsxs("svg",{width:"192",height:"8",viewBox:"0 0 192 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H52C54.2091 0 56 1.79086 56 4C56 6.20914 54.2091 8 52 8H4C1.79086 8 0 6.20914 0 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M68 4C68 1.79086 69.7909 0 72 0H120C122.209 0 124 1.79086 124 4C124 6.20914 122.209 8 120 8H72C69.7909 8 68 6.20914 68 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M136 4C136 1.79086 137.791 0 140 0H188C190.209 0 192 1.79086 192 4C192 6.20914 190.209 8 188 8H140C137.791 8 136 6.20914 136 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR})]}),jsxRuntime.jsx("div",{className:"gp-footer gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#0000001a] group-hover:gp-visible",children:jsxRuntime.jsx("div",{className:"gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",children:jsxRuntime.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",fill:"#212121"})]})})}),jsxRuntime.jsxs("svg",{width:"82",height:"8",viewBox:"0 0 82 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H18C20.2091 0 22 1.79086 22 4C22 6.20914 20.2091 8 18 8H4C1.79086 8 0 6.20914 0 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M30 4C30 1.79086 31.7909 0 34 0H48C50.2091 0 52 1.79086 52 4C52 6.20914 50.2091 8 48 8H34C31.7909 8 30 6.20914 30 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M60 4C60 1.79086 61.7909 0 64 0H78C80.2091 0 82 1.79086 82 4C82 6.20914 80.2091 8 78 8H64C61.7909 8 60 6.20914 60 4Z",fill:i?.showFooter?"#D6D6D6":FOOTER_OFF_COLOR})]})]})})})};exports.default=Footer;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core");const defaultMargin={desktop:"40px",tablet:"40px",mobile:"40px"},FooterForPostPurchase=e=>jsxRuntime.jsx("div",{className:core.cls("gp-footer-container gp-border-1 gp-group gp-flex gp-justify-center gp-border-y gp-border-[#EEEEEE] gp-bg-white gp-font-sans"),children:jsxRuntime.jsx("div",{className:"gp-flex gp-flex-1 gp-items-center gp-justify-between gp-py-6",style:{maxWidth:"var(--g-ct-w, 1200px)",...core.makeStyleResponsive("ml",defaultMargin),...core.makeStyleResponsive("mr",defaultMargin)},children:jsxRuntime.jsxs("p",{className:"gp-text-lg",children:["All rights reserved ",e.shopName]})})});exports.default=FooterForPostPurchase;
|
|
@@ -1,74 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var core = require('@gem-sdk/core');
|
|
5
|
-
var router = require('next/router');
|
|
6
|
-
var Script = require('next/script');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
|
|
9
|
-
const GoogleAnalytic = ({ trackingId })=>{
|
|
10
|
-
const router$1 = router.useRouter();
|
|
11
|
-
react.useEffect(()=>{
|
|
12
|
-
const handleRouteChange = (url)=>{
|
|
13
|
-
core.gtag.pageview(url, trackingId);
|
|
14
|
-
};
|
|
15
|
-
router$1.events.on('routeChangeComplete', handleRouteChange);
|
|
16
|
-
router$1.events.on('hashChangeComplete', handleRouteChange);
|
|
17
|
-
return ()=>{
|
|
18
|
-
router$1.events.off('routeChangeComplete', handleRouteChange);
|
|
19
|
-
router$1.events.off('hashChangeComplete', handleRouteChange);
|
|
20
|
-
};
|
|
21
|
-
}, [
|
|
22
|
-
trackingId,
|
|
23
|
-
router$1.events
|
|
24
|
-
]);
|
|
25
|
-
const handleOnReady = ()=>{
|
|
26
|
-
core.gtag.pageview(router$1.pathname, trackingId);
|
|
27
|
-
};
|
|
28
|
-
if (!trackingId) return null;
|
|
29
|
-
if (trackingId.startsWith('UA-')) return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
30
|
-
children: [
|
|
31
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
32
|
-
strategy: "lazyOnload",
|
|
33
|
-
onReady: handleOnReady,
|
|
34
|
-
src: "https://www.google-analytics.com/analytics.js"
|
|
35
|
-
}),
|
|
36
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
37
|
-
id: "google-analytics",
|
|
38
|
-
strategy: "lazyOnload",
|
|
39
|
-
dangerouslySetInnerHTML: {
|
|
40
|
-
__html: `window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
|
41
|
-
ga('create', '${trackingId}', 'auto');
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),router=require("next/router"),Script=require("next/script"),react=require("react");const GoogleAnalytic=({trackingId:e})=>{let t=router.useRouter();react.useEffect(()=>{let a=t=>{core.gtag.pageview(t,e)};return t.events.on("routeChangeComplete",a),t.events.on("hashChangeComplete",a),()=>{t.events.off("routeChangeComplete",a),t.events.off("hashChangeComplete",a)}},[e,t.events]);let a=()=>{core.gtag.pageview(t.pathname,e)};return e?e.startsWith("UA-")?jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Script,{strategy:"lazyOnload",onReady:a,src:"https://www.google-analytics.com/analytics.js"}),jsxRuntime.jsx(Script,{id:"google-analytics",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
|
|
2
|
+
ga('create', '${e}', 'auto');
|
|
42
3
|
ga('require', 'ec');
|
|
43
4
|
ga('send', 'pageview');
|
|
44
|
-
`
|
|
45
|
-
}
|
|
46
|
-
})
|
|
47
|
-
]
|
|
48
|
-
});
|
|
49
|
-
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
50
|
-
children: [
|
|
51
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
52
|
-
strategy: "lazyOnload",
|
|
53
|
-
onReady: handleOnReady,
|
|
54
|
-
src: `https://www.googletagmanager.com/gtag/js?id=${trackingId}`
|
|
55
|
-
}),
|
|
56
|
-
/*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
57
|
-
id: "gtag-init",
|
|
58
|
-
strategy: "lazyOnload",
|
|
59
|
-
dangerouslySetInnerHTML: {
|
|
60
|
-
__html: `
|
|
5
|
+
`}})]}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(Script,{strategy:"lazyOnload",onReady:a,src:`https://www.googletagmanager.com/gtag/js?id=${e}`}),jsxRuntime.jsx(Script,{id:"gtag-init",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`
|
|
61
6
|
window.dataLayer = window.dataLayer || [];
|
|
62
7
|
function gtag(){dataLayer.push(arguments);}
|
|
63
8
|
gtag('js', new Date());
|
|
64
|
-
gtag('config', '${
|
|
9
|
+
gtag('config', '${e}', {
|
|
65
10
|
page_path: window.location.pathname,
|
|
66
11
|
});
|
|
67
|
-
`
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
]
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
exports.GoogleAnalytic = GoogleAnalytic;
|
|
12
|
+
`}})]}):null};exports.GoogleAnalytic=GoogleAnalytic;
|
|
@@ -1,96 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var core = require('@gem-sdk/core');
|
|
7
|
-
|
|
8
|
-
const defaultMargin = {
|
|
9
|
-
desktop: '40px',
|
|
10
|
-
tablet: '40px',
|
|
11
|
-
mobile: '40px'
|
|
12
|
-
};
|
|
13
|
-
const HEADER_OFF_COLOR = '#F4F4F4';
|
|
14
|
-
const Header = ()=>{
|
|
15
|
-
const layoutSetting = core.useShopStore((s)=>s.layoutSettings);
|
|
16
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
17
|
-
className: core.cls('gp-header-container gp-border-1 gp-group gp-relative gp-flex gp-justify-center gp-border-b gp-border-[#EEEEEE] gp-font-sans'),
|
|
18
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
19
|
-
className: "gp-flex gp-h-[40px] gp-flex-1 gp-items-center gp-justify-between",
|
|
20
|
-
style: {
|
|
21
|
-
maxWidth: `var(--g-ct-w)`,
|
|
22
|
-
...core.makeStyleResponsive('ml', defaultMargin),
|
|
23
|
-
...core.makeStyleResponsive('mr', defaultMargin)
|
|
24
|
-
},
|
|
25
|
-
children: [
|
|
26
|
-
/*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
27
|
-
width: "84",
|
|
28
|
-
height: "8",
|
|
29
|
-
viewBox: "0 0 84 8",
|
|
30
|
-
fill: "none",
|
|
31
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
32
|
-
children: [
|
|
33
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
34
|
-
d: "M0 4C0 1.79086 1.79086 0 4 0H18C20.2091 0 22 1.79086 22 4C22 6.20914 20.2091 8 18 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
35
|
-
fill: layoutSetting?.showHeader ? '#9E9E9E' : HEADER_OFF_COLOR
|
|
36
|
-
}),
|
|
37
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
38
|
-
d: "M28 4C28 1.79086 29.7909 0 32 0H80C82.2091 0 84 1.79086 84 4C84 6.20914 82.2091 8 80 8H32C29.7909 8 28 6.20914 28 4Z",
|
|
39
|
-
fill: layoutSetting?.showHeader ? '#D6D6D6' : HEADER_OFF_COLOR
|
|
40
|
-
})
|
|
41
|
-
]
|
|
42
|
-
}),
|
|
43
|
-
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
44
|
-
className: "gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#0000001a] group-hover:gp-visible",
|
|
45
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
46
|
-
className: "gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",
|
|
47
|
-
children: /*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
48
|
-
width: "14",
|
|
49
|
-
height: "14",
|
|
50
|
-
viewBox: "0 0 14 14",
|
|
51
|
-
fill: "none",
|
|
52
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
53
|
-
children: [
|
|
54
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
55
|
-
fillRule: "evenodd",
|
|
56
|
-
clipRule: "evenodd",
|
|
57
|
-
d: "M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",
|
|
58
|
-
fill: "#212121"
|
|
59
|
-
}),
|
|
60
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
61
|
-
fillRule: "evenodd",
|
|
62
|
-
clipRule: "evenodd",
|
|
63
|
-
d: "M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",
|
|
64
|
-
fill: "#212121"
|
|
65
|
-
})
|
|
66
|
-
]
|
|
67
|
-
})
|
|
68
|
-
})
|
|
69
|
-
}),
|
|
70
|
-
/*#__PURE__*/ jsxRuntime.jsxs("svg", {
|
|
71
|
-
width: "192",
|
|
72
|
-
height: "8",
|
|
73
|
-
viewBox: "0 0 192 8",
|
|
74
|
-
fill: "none",
|
|
75
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
76
|
-
children: [
|
|
77
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
78
|
-
d: "M0 4C0 1.79086 1.79086 0 4 0H52C54.2091 0 56 1.79086 56 4C56 6.20914 54.2091 8 52 8H4C1.79086 8 0 6.20914 0 4Z",
|
|
79
|
-
fill: layoutSetting?.showHeader ? '#D6D6D6' : HEADER_OFF_COLOR
|
|
80
|
-
}),
|
|
81
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
82
|
-
d: "M68 4C68 1.79086 69.7909 0 72 0H120C122.209 0 124 1.79086 124 4C124 6.20914 122.209 8 120 8H72C69.7909 8 68 6.20914 68 4Z",
|
|
83
|
-
fill: layoutSetting?.showHeader ? '#D6D6D6' : HEADER_OFF_COLOR
|
|
84
|
-
}),
|
|
85
|
-
/*#__PURE__*/ jsxRuntime.jsx("path", {
|
|
86
|
-
d: "M136 4C136 1.79086 137.791 0 140 0H188C190.209 0 192 1.79086 192 4C192 6.20914 190.209 8 188 8H140C137.791 8 136 6.20914 136 4Z",
|
|
87
|
-
fill: layoutSetting?.showHeader ? '#D6D6D6' : HEADER_OFF_COLOR
|
|
88
|
-
})
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
})
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
|
|
96
|
-
exports.default = Header;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core");const defaultMargin={desktop:"40px",tablet:"40px",mobile:"40px"},HEADER_OFF_COLOR="#F4F4F4",sizeCheck={desktop:"24px",tablet:"36px",mobile:"36px"},Header=e=>{let{pageType:s}=e,i=core.useShopStore(e=>e.layoutSettings);return jsxRuntime.jsx("div",{className:core.cls("gp-header-container gp-border-1 gp-group gp-relative gp-flex gp-justify-center gp-border-b gp-border-[#EEEEEE] gp-font-sans"),children:"POST_PURCHASE"===s?jsxRuntime.jsx("div",{className:"gp-flex gp-flex-1 gp-items-center gp-justify-between",style:{maxWidth:"var(--g-ct-w, 1200px)",...core.makeStyleResponsive("ml",defaultMargin),...core.makeStyleResponsive("mr",defaultMargin)},children:jsxRuntime.jsxs("div",{className:"tablet:gp-items-center gp-flex gp-py-3",children:[jsxRuntime.jsxs("svg",{style:{...core.makeStyleResponsive("w",sizeCheck),...core.makeStyleResponsive("h",sizeCheck)},viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M15.7244 10.6242C15.9587 10.3899 15.9587 10.01 15.7244 9.77571C15.49 9.5414 15.1101 9.5414 14.8758 9.77571L11.1001 13.5514L9.42436 11.8757C9.19005 11.6414 8.81015 11.6414 8.57583 11.8757C8.34152 12.11 8.34152 12.4899 8.57583 12.7242L10.6758 14.8242C10.9101 15.0586 11.29 15.0586 11.5244 14.8242L15.7244 10.6242Z",fill:"#197BBD"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M20.4001 12C20.4001 16.6392 16.6393 20.4 12.0001 20.4C7.36091 20.4 3.6001 16.6392 3.6001 12C3.6001 7.36078 7.36091 3.59998 12.0001 3.59998C16.6393 3.59998 20.4001 7.36078 20.4001 12ZM19.2001 12C19.2001 15.9764 15.9765 19.2 12.0001 19.2C8.02365 19.2 4.8001 15.9764 4.8001 12C4.8001 8.02352 8.02365 4.79998 12.0001 4.79998C15.9765 4.79998 19.2001 8.02352 19.2001 12Z",fill:"#197BBD"})]}),jsxRuntime.jsxs("div",{className:"gp-ml-4",children:[jsxRuntime.jsx("p",{className:"gp-text-sm",children:"Order #1001"}),jsxRuntime.jsx("p",{children:"You’ve paid for your order."}),jsxRuntime.jsxs("div",{className:"gp-mt-1 gp-flex gp-items-center gp-text-[#197BBD]",children:[jsxRuntime.jsx("div",{className:"gp-text-sm",children:"View order confirmation"}),jsxRuntime.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4.6318 9.21817C4.45607 9.04244 4.45607 8.75751 4.6318 8.58178L6.7136 6.49998L4.6318 4.41817C4.45607 4.24244 4.45607 3.95751 4.6318 3.78178C4.80754 3.60604 5.09246 3.60604 5.2682 3.78178L7.6682 6.18178C7.84393 6.35751 7.84393 6.64244 7.6682 6.81817L5.2682 9.21817C5.09246 9.39391 4.80754 9.39391 4.6318 9.21817Z",fill:"#197BBD"})})]})]})]})}):jsxRuntime.jsx("div",{className:"gp-flex gp-h-[40px] gp-flex-1 gp-items-center gp-justify-between",style:{maxWidth:"var(--g-ct-w)",...core.makeStyleResponsive("ml",defaultMargin),...core.makeStyleResponsive("mr",defaultMargin)},children:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs("svg",{width:"84",height:"8",viewBox:"0 0 84 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H18C20.2091 0 22 1.79086 22 4C22 6.20914 20.2091 8 18 8H4C1.79086 8 0 6.20914 0 4Z",fill:i?.showHeader?"#9E9E9E":HEADER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M28 4C28 1.79086 29.7909 0 32 0H80C82.2091 0 84 1.79086 84 4C84 6.20914 82.2091 8 80 8H32C29.7909 8 28 6.20914 28 4Z",fill:i?.showHeader?"#D6D6D6":HEADER_OFF_COLOR})]}),jsxRuntime.jsx("div",{className:"gp-header gp-invisible gp-absolute gp-left-[8px] gp-flex gp-h-[24px] gp-w-[24px] gp-cursor-pointer gp-items-center gp-justify-center gp-rounded gp-bg-[#EEEEEE] gp-p-[4px] hover:gp-bg-[#0000001a] group-hover:gp-visible",children:jsxRuntime.jsx("div",{className:"gp-flex gp-h-[24px] gp-w-[24px] gp-items-center gp-justify-center",children:jsxRuntime.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.99985 4.08501C5.38983 4.08501 4.08465 5.39019 4.08465 7.00021C4.08465 8.61023 5.38983 9.9154 6.99985 9.9154C8.60987 9.9154 9.91504 8.61023 9.91504 7.00021C9.91504 5.39019 8.60987 4.08501 6.99985 4.08501ZM5.08465 7.00021C5.08465 5.94247 5.94211 5.08501 6.99985 5.08501C8.05758 5.08501 8.91504 5.94247 8.91504 7.00021C8.91504 8.05794 8.05758 8.9154 6.99985 8.9154C5.94211 8.9154 5.08465 8.05794 5.08465 7.00021Z",fill:"#212121"}),jsxRuntime.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.52351 0.00390625C5.28138 0.00390625 5.07405 0.177388 5.03135 0.415715L4.7415 2.03321C4.40346 2.18248 4.08346 2.36419 3.78558 2.57432L2.18557 2.00147C1.95684 1.91958 1.70235 2.01395 1.58232 2.22517L0.122204 4.79451C0.00217064 5.00572 0.0513362 5.27266 0.238747 5.42725L1.50086 6.46836C1.48358 6.64355 1.47474 6.82106 1.47474 7.00047C1.47474 7.17981 1.48357 7.35726 1.50084 7.53238L0.238747 8.57347C0.0513362 8.72806 0.00217064 8.995 0.122203 9.20622L1.58232 11.7756C1.70235 11.9868 1.95684 12.0811 2.18557 11.9993L3.78537 11.4265C4.08332 11.6367 4.40341 11.8185 4.74155 11.9678L5.03135 13.585C5.07405 13.8233 5.28138 13.9968 5.52351 13.9968H8.47647C8.7186 13.9968 8.92593 13.8233 8.96863 13.585L9.25846 11.9676C9.5965 11.8183 9.91649 11.6365 10.2144 11.4264L11.8144 11.9993C12.0431 12.0811 12.2976 11.9868 12.4177 11.7756L13.8778 9.20622C13.9978 8.995 13.9486 8.72806 13.7612 8.57347L12.4988 7.5321C12.516 7.35706 12.5249 7.17971 12.5249 7.00047C12.5249 6.82116 12.516 6.64375 12.4988 6.46864L13.7612 5.42725C13.9486 5.27266 13.9978 5.00572 13.8778 4.79451L12.4177 2.22517C12.2976 2.01395 12.0431 1.91958 11.8144 2.00147L10.2141 2.57441C9.91636 2.36433 9.59645 2.18264 9.25851 2.0334L8.96863 0.415715C8.92593 0.177389 8.7186 0.00390625 8.47647 0.00390625H5.52351ZM5.67747 2.47943L5.94187 1.00391H8.0581L8.32253 2.47958C8.35348 2.6523 8.47271 2.79616 8.63668 2.85863C9.06768 3.02283 9.46674 3.25007 9.82215 3.5288C9.95734 3.63483 10.1375 3.66402 10.2993 3.6061L11.7559 3.08459L12.8007 4.92323L11.6503 5.8722C11.5145 5.98427 11.4476 6.15956 11.4743 6.33366C11.5076 6.55089 11.5249 6.77354 11.5249 7.00047C11.5249 7.22735 11.5076 7.44993 11.4743 7.66711C11.4476 7.8412 11.5145 8.01648 11.6504 8.12855L12.8007 9.07749L11.7559 10.9161L10.2994 10.3947C10.1377 10.3368 9.95752 10.366 9.82233 10.472C9.46686 10.7508 9.06773 10.9781 8.63664 11.1423C8.47267 11.2048 8.35344 11.3487 8.32249 11.5214L8.0581 12.9968H5.94187L5.67752 11.5215C5.64656 11.3488 5.52732 11.2049 5.36333 11.1425C4.93215 10.9782 4.53292 10.7509 4.17738 10.4721C4.04219 10.3661 3.86203 10.3369 3.70027 10.3948L2.24412 10.9161L1.19924 9.07749L2.34929 8.12883C2.48516 8.01675 2.55204 7.84146 2.52535 7.66736C2.49205 7.4501 2.47474 7.22743 2.47474 7.00047C2.47474 6.77345 2.49206 6.55072 2.52538 6.33341C2.55207 6.15931 2.48519 5.984 2.34932 5.87192L1.19924 4.92323L2.24412 3.08459L3.70047 3.60601C3.86221 3.66392 4.04236 3.63474 4.17755 3.52872C4.53304 3.24994 4.93219 3.02269 5.36329 2.85849C5.52728 2.79603 5.64652 2.65216 5.67747 2.47943Z",fill:"#212121"})]})})}),jsxRuntime.jsxs("svg",{width:"192",height:"8",viewBox:"0 0 192 8",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[jsxRuntime.jsx("path",{d:"M0 4C0 1.79086 1.79086 0 4 0H52C54.2091 0 56 1.79086 56 4C56 6.20914 54.2091 8 52 8H4C1.79086 8 0 6.20914 0 4Z",fill:i?.showHeader?"#D6D6D6":HEADER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M68 4C68 1.79086 69.7909 0 72 0H120C122.209 0 124 1.79086 124 4C124 6.20914 122.209 8 120 8H72C69.7909 8 68 6.20914 68 4Z",fill:i?.showHeader?"#D6D6D6":HEADER_OFF_COLOR}),jsxRuntime.jsx("path",{d:"M136 4C136 1.79086 137.791 0 140 0H188C190.209 0 192 1.79086 192 4C192 6.20914 190.209 8 188 8H140C137.791 8 136 6.20914 136 4Z",fill:i?.showHeader?"#D6D6D6":HEADER_OFF_COLOR})]})]})})})};exports.default=Header;
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var Script = require('next/script');
|
|
5
|
-
|
|
6
|
-
const TikTokPixel = ({ pixelId })=>{
|
|
7
|
-
if (!pixelId) return null;
|
|
8
|
-
return /*#__PURE__*/ jsxRuntime.jsx(Script, {
|
|
9
|
-
id: "tiktok-pixel",
|
|
10
|
-
strategy: "lazyOnload",
|
|
11
|
-
dangerouslySetInnerHTML: {
|
|
12
|
-
__html: `
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),Script=require("next/script");const TikTokPixel=({pixelId:t})=>t?jsxRuntime.jsx(Script,{id:"tiktok-pixel",strategy:"lazyOnload",dangerouslySetInnerHTML:{__html:`
|
|
13
2
|
!function (w, d, t) {
|
|
14
3
|
w.TiktokAnalyticsObject=t;var ttq=w[t]=w[t]||[];ttq.methods=["page","track","identify","instances","debug","on","off","once","ready","alias","group","enableCookie","disableCookie"],ttq.setAndDefer=function(t,e){t[e]=function(){t.push([e].concat(Array.prototype.slice.call(arguments,0)))}};for(var i=0;i<ttq.methods.length;i++)ttq.setAndDefer(ttq,ttq.methods[i]);ttq.instance=function(t){for(var e=ttq._i[t]||[],n=0;n<ttq.methods.length;n++)ttq.setAndDefer(e,ttq.methods[n]);return e},ttq.load=function(e,n){var i="https://analytics.tiktok.com/i18n/pixel/events.js";ttq._i=ttq._i||{},ttq._i[e]=[],ttq._i[e]._u=i,ttq._t=ttq._t||{},ttq._t[e]=+new Date,ttq._o=ttq._o||{},ttq._o[e]=n||{};var o=document.createElement("script");o.type="text/javascript",o.async=!0,o.src=i+"?sdkid="+e+"&lib="+t;var a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)};
|
|
15
|
-
ttq.load('${
|
|
4
|
+
ttq.load('${t}');
|
|
16
5
|
ttq.page();
|
|
17
6
|
}(window, document, 'ttq');
|
|
18
|
-
`
|
|
19
|
-
}
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
exports.TikTokPixel = TikTokPixel;
|
|
7
|
+
`}}):null;exports.TikTokPixel=TikTokPixel;
|
|
@@ -1,62 +1 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
6
|
-
var core = require('@gem-sdk/core');
|
|
7
|
-
var react = require('react');
|
|
8
|
-
|
|
9
|
-
const isDialog = (item)=>!!item && item?.tag === 'Dialog' && item.type === 'component';
|
|
10
|
-
const PopupManager = ()=>{
|
|
11
|
-
const state = core.useBuilderPreviewStore((s)=>s.state);
|
|
12
|
-
const setModalActive = core.useModalStore((s)=>s.setModalActive);
|
|
13
|
-
const activeModalId = core.useModalStore((s)=>s.activeId);
|
|
14
|
-
const popups = react.useMemo(()=>{
|
|
15
|
-
return state.ROOT.childrens?.map((id)=>{
|
|
16
|
-
return state?.[id];
|
|
17
|
-
}).filter(isDialog);
|
|
18
|
-
}, [
|
|
19
|
-
state
|
|
20
|
-
]);
|
|
21
|
-
const onSetActiveModal = react.useCallback((e)=>{
|
|
22
|
-
const detail = e.detail;
|
|
23
|
-
setModalActive(detail?.modalId);
|
|
24
|
-
}, [
|
|
25
|
-
setModalActive
|
|
26
|
-
]);
|
|
27
|
-
react.useEffect(()=>{
|
|
28
|
-
window.addEventListener('set-active-modal', onSetActiveModal);
|
|
29
|
-
return ()=>{
|
|
30
|
-
window.removeEventListener('set-active-modal', onSetActiveModal);
|
|
31
|
-
};
|
|
32
|
-
}, [
|
|
33
|
-
onSetActiveModal
|
|
34
|
-
]);
|
|
35
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
36
|
-
className: "gp-pointer-events-none gp-fixed gp-inset-y-0 gp-right-0 gp-z-10 gp-flex gp-w-10 gp-flex-col gp-items-center gp-justify-center gp-gap-1 gp-overflow-y-auto gp-overflow-x-hidden gp-text-sm",
|
|
37
|
-
children: popups?.map((item)=>{
|
|
38
|
-
const display = item?.advanced?.d;
|
|
39
|
-
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
40
|
-
className: core.cls('gp-pointer-events-auto gp-w-full gp-shrink gp-cursor-pointer gp-select-none gp-items-center gp-justify-center gp-whitespace-nowrap gp-py-2 gp-text-white [writing-mode:vertical-lr]', {
|
|
41
|
-
'gp-bg-blue-500': activeModalId === item.uid,
|
|
42
|
-
'gp-bg-blue-700': activeModalId !== item.uid
|
|
43
|
-
}),
|
|
44
|
-
role: "button",
|
|
45
|
-
"aria-hidden": "true",
|
|
46
|
-
onClick: ()=>setModalActive(item?.uid),
|
|
47
|
-
style: {
|
|
48
|
-
'--d': display?.desktop ? 'inline-flex' : 'none',
|
|
49
|
-
'--d-tablet': display?.tablet ? 'inline-flex' : 'none',
|
|
50
|
-
'--d-mobile': display?.mobile ? 'inline-flex' : 'none'
|
|
51
|
-
},
|
|
52
|
-
children: /*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
53
|
-
className: "gp-text-ellipsis gp-whitespace-nowrap",
|
|
54
|
-
children: item?.settings?.name || 'Popup Name'
|
|
55
|
-
})
|
|
56
|
-
}, item?.uid);
|
|
57
|
-
})
|
|
58
|
-
});
|
|
59
|
-
};
|
|
60
|
-
var PopupManager$1 = /*#__PURE__*/ react.memo(PopupManager);
|
|
61
|
-
|
|
62
|
-
exports.default = PopupManager$1;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),react=require("react");const isDialog=e=>!!e&&e?.tag==="Dialog"&&"component"===e.type,PopupManager=()=>{let e=core.useBuilderPreviewStore(e=>e.state),t=core.useModalStore(e=>e.setModalActive),i=core.useModalStore(e=>e.activeId),r=react.useMemo(()=>e.ROOT.childrens?.map(t=>e?.[t]).filter(isDialog),[e]),n=react.useCallback(e=>{let i=e.detail;t(i?.modalId)},[t]);return react.useEffect(()=>(window.addEventListener("set-active-modal",n),()=>{window.removeEventListener("set-active-modal",n)}),[n]),jsxRuntime.jsx("div",{className:"gp-pointer-events-none gp-fixed gp-inset-y-0 gp-right-0 gp-z-10 gp-flex gp-w-10 gp-flex-col gp-items-center gp-justify-center gp-gap-1 gp-overflow-y-auto gp-overflow-x-hidden gp-text-sm",children:r?.map(e=>{let r=e?.advanced?.d;return jsxRuntime.jsx("div",{className:core.cls("gp-pointer-events-auto gp-w-full gp-shrink gp-cursor-pointer gp-select-none gp-items-center gp-justify-center gp-whitespace-nowrap gp-py-2 gp-text-white [writing-mode:vertical-lr]",{"gp-bg-blue-500":i===e.uid,"gp-bg-blue-700":i!==e.uid}),role:"button","aria-hidden":"true",onClick:()=>t(e?.uid),style:{"--d":r?.desktop?"inline-flex":"none","--d-tablet":r?.tablet?"inline-flex":"none","--d-mobile":r?.mobile?"inline-flex":"none"},children:jsxRuntime.jsx("span",{className:"gp-text-ellipsis gp-whitespace-nowrap",children:e?.settings?.name||"Popup Name"})},e?.uid)})})};var PopupManager$1=react.memo(PopupManager);exports.default=PopupManager$1;
|