@gem-sdk/pages 1.5.27 → 1.6.0
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/api/get-builder-props.js +1 -1
- package/dist/cjs/libs/api/get-home-page-props-v2.js +1 -1
- package/dist/cjs/libs/api/get-home-page-props.js +6 -1
- package/dist/cjs/libs/api/get-static-page-props-preview.js +1 -1
- package/dist/cjs/libs/api/get-static-page-props-v2.js +1 -1
- package/dist/cjs/libs/api/get-static-page-props.js +1 -1
- package/dist/cjs/pages/builder.js +4 -5
- package/dist/esm/libs/api/get-builder-props.js +1 -1
- package/dist/esm/libs/api/get-home-page-props-v2.js +1 -1
- package/dist/esm/libs/api/get-home-page-props.js +6 -1
- package/dist/esm/libs/api/get-static-page-props-preview.js +1 -1
- package/dist/esm/libs/api/get-static-page-props-v2.js +1 -1
- package/dist/esm/libs/api/get-static-page-props.js +1 -1
- package/dist/esm/pages/builder.js +2 -3
- package/dist/types/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -23,7 +23,7 @@ const getBuilderProps = async (fetcher, shopifyFetcher)=>{
|
|
|
23
23
|
} : {};
|
|
24
24
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
25
25
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
26
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
26
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
27
27
|
return parseJson.serializableJson({
|
|
28
28
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
29
29
|
languageIsoCode,
|
|
@@ -111,7 +111,7 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
111
111
|
};
|
|
112
112
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
113
113
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
114
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
114
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
115
115
|
return parseJson.serializableJson({
|
|
116
116
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
117
117
|
fontStyle,
|
|
@@ -127,6 +127,9 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
127
127
|
}
|
|
128
128
|
]
|
|
129
129
|
};
|
|
130
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
131
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
132
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
130
133
|
return parseJson.serializableJson({
|
|
131
134
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data),
|
|
132
135
|
fontStyle,
|
|
@@ -136,7 +139,9 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
136
139
|
fallback
|
|
137
140
|
},
|
|
138
141
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
139
|
-
locale
|
|
142
|
+
locale,
|
|
143
|
+
languageIsoCode,
|
|
144
|
+
countryIsoCode,
|
|
140
145
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
141
146
|
seo
|
|
142
147
|
});
|
|
@@ -116,7 +116,7 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
116
116
|
};
|
|
117
117
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
118
118
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
119
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
119
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
120
120
|
return parseJson.serializableJson({
|
|
121
121
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
122
122
|
fontStyle,
|
|
@@ -113,7 +113,7 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
113
113
|
};
|
|
114
114
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
115
115
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
116
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
116
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
117
117
|
return parseJson.serializableJson({
|
|
118
118
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
119
119
|
fontStyle,
|
|
@@ -126,7 +126,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
126
126
|
};
|
|
127
127
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
128
128
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
129
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
129
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
130
130
|
return parseJson.serializableJson({
|
|
131
131
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data),
|
|
132
132
|
fontStyle,
|
|
@@ -6,10 +6,9 @@ var nextSeo = require('next-seo');
|
|
|
6
6
|
var Head = require('next/head');
|
|
7
7
|
var react = require('react');
|
|
8
8
|
var Toolbox = require('../components/builder/Toolbox.js');
|
|
9
|
-
var
|
|
9
|
+
var Header = require('../components/Header.js');
|
|
10
|
+
var Footer = require('../components/Footer.js');
|
|
10
11
|
|
|
11
|
-
const Header = dynamic(()=>Promise.resolve().then(function () { return require('../components/Header.js'); }));
|
|
12
|
-
const Footer = dynamic(()=>Promise.resolve().then(function () { return require('../components/Footer.js'); }));
|
|
13
12
|
const BuilderPage = ({ components , seo , themeStyle , fontStyle , sectionData })=>{
|
|
14
13
|
const [loadSuccess, setLoadSuccess] = react.useState(false);
|
|
15
14
|
const initState = {
|
|
@@ -46,7 +45,7 @@ const BuilderPage = ({ components , seo , themeStyle , fontStyle , sectionData
|
|
|
46
45
|
})
|
|
47
46
|
]
|
|
48
47
|
}),
|
|
49
|
-
/*#__PURE__*/ jsxRuntime.jsx(Header, {}),
|
|
48
|
+
/*#__PURE__*/ jsxRuntime.jsx(Header.default, {}),
|
|
50
49
|
/*#__PURE__*/ jsxRuntime.jsx(core.BuilderComponentProvider, {
|
|
51
50
|
components: components,
|
|
52
51
|
children: /*#__PURE__*/ jsxRuntime.jsx(core.SectionProvider, {
|
|
@@ -73,7 +72,7 @@ const BuilderPage = ({ components , seo , themeStyle , fontStyle , sectionData
|
|
|
73
72
|
}, "preview")
|
|
74
73
|
})
|
|
75
74
|
}),
|
|
76
|
-
/*#__PURE__*/ jsxRuntime.jsx(Footer, {})
|
|
75
|
+
/*#__PURE__*/ jsxRuntime.jsx(Footer.default, {})
|
|
77
76
|
]
|
|
78
77
|
});
|
|
79
78
|
};
|
|
@@ -21,7 +21,7 @@ const getBuilderProps = async (fetcher, shopifyFetcher)=>{
|
|
|
21
21
|
} : {};
|
|
22
22
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
23
23
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
24
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
24
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
25
25
|
return serializableJson({
|
|
26
26
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
27
27
|
languageIsoCode,
|
|
@@ -109,7 +109,7 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
109
109
|
};
|
|
110
110
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
111
111
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
112
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
112
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
113
113
|
return serializableJson({
|
|
114
114
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
115
115
|
fontStyle,
|
|
@@ -125,6 +125,9 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
125
125
|
}
|
|
126
126
|
]
|
|
127
127
|
};
|
|
128
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
129
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
130
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
128
131
|
return serializableJson({
|
|
129
132
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data),
|
|
130
133
|
fontStyle,
|
|
@@ -134,7 +137,9 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
134
137
|
fallback
|
|
135
138
|
},
|
|
136
139
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
137
|
-
locale
|
|
140
|
+
locale,
|
|
141
|
+
languageIsoCode,
|
|
142
|
+
countryIsoCode,
|
|
138
143
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
139
144
|
seo
|
|
140
145
|
});
|
|
@@ -114,7 +114,7 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
114
114
|
};
|
|
115
115
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
116
116
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
117
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
117
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
118
118
|
return serializableJson({
|
|
119
119
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
120
120
|
fontStyle,
|
|
@@ -111,7 +111,7 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
111
111
|
};
|
|
112
112
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
113
113
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
114
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
114
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
115
115
|
return serializableJson({
|
|
116
116
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
117
117
|
fontStyle,
|
|
@@ -124,7 +124,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
124
124
|
};
|
|
125
125
|
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
126
126
|
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
127
|
-
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
127
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
128
128
|
return serializableJson({
|
|
129
129
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data),
|
|
130
130
|
fontStyle,
|
|
@@ -4,10 +4,9 @@ import { NextSeo } from 'next-seo';
|
|
|
4
4
|
import Head from 'next/head';
|
|
5
5
|
import { useState, useEffect } from 'react';
|
|
6
6
|
import Toolbox from '../components/builder/Toolbox.js';
|
|
7
|
-
import
|
|
7
|
+
import Header from '../components/Header.js';
|
|
8
|
+
import Footer from '../components/Footer.js';
|
|
8
9
|
|
|
9
|
-
const Header = dynamic(()=>import('../components/Header.js'));
|
|
10
|
-
const Footer = dynamic(()=>import('../components/Footer.js'));
|
|
11
10
|
const BuilderPage = ({ components , seo , themeStyle , fontStyle , sectionData })=>{
|
|
12
11
|
const [loadSuccess, setLoadSuccess] = useState(false);
|
|
13
12
|
const initState = {
|
package/dist/types/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@sentry/nextjs": "7.21.1",
|
|
23
23
|
"deepmerge": "4.3.0",
|
|
24
|
-
"html-react-parser": "
|
|
24
|
+
"html-react-parser": "3.0.9",
|
|
25
25
|
"next-seo": "^5.15.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|