@gem-sdk/pages 2.0.0-staging.866 → 2.0.0-staging.872
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),nextSeo=require("next-seo"),Head=require("next/head"),router=require("next/router"),useTrackingView=require("../libs/hooks/use-tracking-view.js"),parseHtml=require("../libs/parse-html.js"),Header=require("../components/builder/Header.js"),FooterForPostPurchase=require("../components/FooterForPostPurchase.js"),Script=require("next/script"),react=require("react");const StaticPageV2=({components:e,builderData:s,sectionData:t,seo:r,themeStyle:i,fontStyle:n,elementFontStyle:a,customCodeHeader:o,shopToken:
|
|
1
|
+
"use strict";var jsxRuntime=require("react/jsx-runtime"),core=require("@gem-sdk/core"),nextSeo=require("next-seo"),Head=require("next/head"),router=require("next/router"),useTrackingView=require("../libs/hooks/use-tracking-view.js"),parseHtml=require("../libs/parse-html.js"),Header=require("../components/builder/Header.js"),FooterForPostPurchase=require("../components/FooterForPostPurchase.js"),Script=require("next/script"),react=require("react");const StaticPageV2=({components:e,builderData:s,sectionData:t,seo:r,themeStyle:i,fontStyle:n,elementFontStyle:a,customCodeHeader:o,shopToken:u,pageHandle:l,customFonts:c,isPostPurchase:d,shopName:m,productOffers:g,publicStoreFrontData:x,dynamicDiscountOffer:p,isPreview:j,interaction:h,pageBackground:R})=>{let f=router.useRouter(),{t:y}=core.useI18n(),_=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";useTrackingView.useTrackingView(u,l,f.isFallback);let P="custom-code-header";if(react.useEffect(()=>{let e=document.querySelectorAll(`#${P}`);e.length>1&&e.forEach((e,s)=>{0!==s&&e.remove()})},[]),f.isFallback)return jsxRuntime.jsx("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:jsxRuntime.jsxs("div",{className:"gp-flex gp-gap-2",children:[jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),jsxRuntime.jsx("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let S=(h?.value||[]).length>0;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(nextSeo.NextSeo,{...r}),jsxRuntime.jsxs(Head,{children:[parseHtml.parseHtml(P,o,!0),i&&jsxRuntime.jsx("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:i}},"global-style"),n&&jsxRuntime.jsx("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:n}},"google-fonts"),a&&a.map(e=>jsxRuntime.jsx("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:e}},e)),c&&jsxRuntime.jsx("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:c}},n),R?.isUsePageBackground&&R?.background&&jsxRuntime.jsx("style",{children:`
|
|
2
2
|
body {
|
|
3
|
-
background: ${
|
|
3
|
+
background: ${R.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${
|
|
5
|
+
`},`page_background_${R?.background}`)]}),jsxRuntime.jsx(core.PageProvider,{productOffers:g,publicStoreFrontData:x,dynamicDiscountOffer:p,children:jsxRuntime.jsx(core.BuilderComponentProvider,{components:e,children:jsxRuntime.jsxs("div",{className:`${d?"gp-bg-white post-purchase-page":""} `,children:[d&&jsxRuntime.jsx(Header.default,{pageType:"POST_PURCHASE"}),S&&jsxRuntime.jsx("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(h?.value||[])}</div>`}}),jsxRuntime.jsx(core.SectionProvider,{data:t,children:jsxRuntime.jsx(core.I18nProvider,{t:y,children:s?.map(e=>jsxRuntime.jsxs(core.BuilderProvider,{state:e.data,lazy:e.lazy,priority:e.priority,isPostPurchase:d,isPreview:j,children:[jsxRuntime.jsx(core.Render,{uid:e.uid}),S&&jsxRuntime.jsx(Script,{defer:!0,src:`${_}/assets-v2/gp-flow-action-lip.js`})]},e.uid))})}),d&&jsxRuntime.jsx(FooterForPostPurchase.default,{shopName:m||""})]})})})]})};exports.StaticPageV2=StaticPageV2;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t,Fragment as
|
|
1
|
+
import{jsx as e,jsxs as t,Fragment as s}from"react/jsx-runtime";import{useI18n as a,PageProvider as r,BuilderComponentProvider as n,SectionProvider as l,I18nProvider as o,BuilderProvider as i,Render as p}from"@gem-sdk/core";import{NextSeo as c}from"next-seo";import g from"next/head";import{useRouter as m}from"next/router";import{useTrackingView as d}from"../libs/hooks/use-tracking-view.js";import{parseHtml as u}from"../libs/parse-html.js";import h from"../components/builder/Header.js";import f from"../components/FooterForPostPurchase.js";import y from"next/script";import{useEffect as _}from"react";let StaticPageV2=({components:b,builderData:S,sectionData:v,seo:x,themeStyle:k,fontStyle:P,elementFontStyle:N,customCodeHeader:T,shopToken:j,pageHandle:H,customFonts:L,isPostPurchase:$,shopName:E,productOffers:F,publicStoreFrontData:I,dynamicDiscountOffer:M,isPreview:q,interaction:w,pageBackground:A})=>{let O=m(),{t:z}=a(),U=process.env.NEXT_GP_BASE_ASSET_URL||"https://assets.gemcommerce.xyz";d(j,H,O.isFallback);let B="custom-code-header";if(_(()=>{let e=document.querySelectorAll(`#${B}`);e.length>1&&e.forEach((e,t)=>{0!==t&&e.remove()})},[]),O.isFallback)return e("div",{className:"gp-flex gp-h-[100vh] gp-items-center gp-justify-center",children:t("div",{className:"gp-flex gp-gap-2",children:[e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_200ms_linear_alternate] gp-rounded-full gp-bg-slate-800"}),e("span",{className:"gp-aspect-square gp-h-2 gp-animate-[flashing_500ms_infinite_500ms_alternate] gp-rounded-full gp-bg-slate-800"})]})});let D=(w?.value||[]).length>0;return t(s,{children:[e(c,{...x}),t(g,{children:[u(B,T,!0),k&&e("style",{"data-id":"global-style",type:"text/css",dangerouslySetInnerHTML:{__html:k}},"global-style"),P&&e("style",{"data-id":"google-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:P}},"google-fonts"),N&&N.map(t=>e("style",{"data-id":"google-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:t}},t)),L&&e("style",{"data-id":"custom-element-fonts",type:"text/css",dangerouslySetInnerHTML:{__html:L}},P),A?.isUsePageBackground&&A?.background&&e("style",{children:`
|
|
2
2
|
body {
|
|
3
3
|
background: ${A.background};
|
|
4
4
|
}
|
|
5
|
-
`},`page_background_${A?.background}`)]}),e(
|
|
5
|
+
`},`page_background_${A?.background}`)]}),e(r,{productOffers:F,publicStoreFrontData:I,dynamicDiscountOffer:M,children:e(n,{components:b,children:t("div",{className:`${$?"gp-bg-white post-purchase-page":""} `,children:[$&&e(h,{pageType:"POST_PURCHASE"}),D&&e("div",{dangerouslySetInnerHTML:{__html:`<div id="gp-interaction" style="display: none;">${JSON.stringify(w?.value||[])}</div>`}}),e(l,{data:v,children:e(o,{t:z,children:S?.map(s=>t(i,{state:s.data,lazy:s.lazy,priority:s.priority,isPostPurchase:$,isPreview:q,children:[e(p,{uid:s.uid}),D&&e(y,{defer:!0,src:`${U}/assets-v2/gp-flow-action-lip.js`})]},s.uid))})}),$&&e(f,{shopName:E||""})]})})})]})};export{StaticPageV2};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "2.0.0-staging.
|
|
3
|
+
"version": "2.0.0-staging.872",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "14.2.20"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-staging.
|
|
29
|
+
"@gem-sdk/core": "2.0.0-staging.872",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "2.0.0-staging.860",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "2.0.0-staging.860",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "2.0.0-staging.860"
|