@gem-sdk/pages 1.5.7 → 1.5.14-fix.2
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 +6 -1
- package/dist/cjs/libs/api/get-home-page-props-v2.js +6 -1
- package/dist/cjs/libs/api/get-home-page-props.js +6 -1
- package/dist/cjs/libs/api/get-static-page-props-preview.js +6 -1
- package/dist/cjs/libs/api/get-static-page-props-v2.js +6 -1
- package/dist/cjs/libs/api/get-static-page-props.js +6 -1
- package/dist/esm/libs/api/get-builder-props.js +6 -1
- package/dist/esm/libs/api/get-home-page-props-v2.js +6 -1
- package/dist/esm/libs/api/get-home-page-props.js +6 -1
- package/dist/esm/libs/api/get-static-page-props-preview.js +6 -1
- package/dist/esm/libs/api/get-static-page-props-v2.js +6 -1
- package/dist/esm/libs/api/get-static-page-props.js +6 -1
- package/dist/types/index.d.ts +2 -0
- package/package.json +3 -3
|
@@ -19,9 +19,14 @@ const getBuilderProps = async (fetcher, shopifyFetcher) => {
|
|
|
19
19
|
description: shopMeta?.shop.description,
|
|
20
20
|
}
|
|
21
21
|
: {};
|
|
22
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
23
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
24
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
22
25
|
return parseJson.serializableJson({
|
|
23
26
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
24
|
-
|
|
27
|
+
languageIsoCode,
|
|
28
|
+
countryIsoCode,
|
|
29
|
+
locale,
|
|
25
30
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
26
31
|
swr: {
|
|
27
32
|
revalidateOnMount: true,
|
|
@@ -103,13 +103,18 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher) => async () => {
|
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
105
|
};
|
|
106
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
107
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
108
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
106
109
|
return parseJson.serializableJson({
|
|
107
110
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
108
111
|
fontStyle,
|
|
109
112
|
builderData: homeTemplate,
|
|
110
113
|
swr: { fallback },
|
|
111
114
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
112
|
-
|
|
115
|
+
languageIsoCode,
|
|
116
|
+
countryIsoCode,
|
|
117
|
+
locale,
|
|
113
118
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
114
119
|
seo,
|
|
115
120
|
mobileOnly,
|
|
@@ -119,6 +119,9 @@ const getHomePageProps = (fetcher, shopifyFetcher) => async () => {
|
|
|
119
119
|
},
|
|
120
120
|
],
|
|
121
121
|
};
|
|
122
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
123
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
124
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
122
125
|
return parseJson.serializableJson({
|
|
123
126
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data),
|
|
124
127
|
fontStyle,
|
|
@@ -126,7 +129,9 @@ const getHomePageProps = (fetcher, shopifyFetcher) => async () => {
|
|
|
126
129
|
pageType,
|
|
127
130
|
swr: { fallback },
|
|
128
131
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
129
|
-
locale
|
|
132
|
+
locale,
|
|
133
|
+
languageIsoCode,
|
|
134
|
+
countryIsoCode,
|
|
130
135
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
131
136
|
seo,
|
|
132
137
|
});
|
|
@@ -108,13 +108,18 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
108
108
|
},
|
|
109
109
|
],
|
|
110
110
|
};
|
|
111
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
112
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
113
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
111
114
|
return parseJson.serializableJson({
|
|
112
115
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
113
116
|
fontStyle,
|
|
114
117
|
builderData: pageTemplate,
|
|
115
118
|
pageType,
|
|
116
119
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
117
|
-
|
|
120
|
+
languageIsoCode,
|
|
121
|
+
countryIsoCode,
|
|
122
|
+
locale,
|
|
118
123
|
swr: { fallback },
|
|
119
124
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
120
125
|
seo,
|
|
@@ -105,13 +105,18 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
105
105
|
},
|
|
106
106
|
],
|
|
107
107
|
};
|
|
108
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
109
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
110
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
108
111
|
return parseJson.serializableJson({
|
|
109
112
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
110
113
|
fontStyle,
|
|
111
114
|
builderData: pageTemplate,
|
|
112
115
|
pageType,
|
|
113
116
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
114
|
-
|
|
117
|
+
languageIsoCode,
|
|
118
|
+
countryIsoCode,
|
|
119
|
+
locale,
|
|
115
120
|
swr: { fallback },
|
|
116
121
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
117
122
|
seo,
|
|
@@ -116,13 +116,18 @@ const getStaticPageProps = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
116
116
|
},
|
|
117
117
|
],
|
|
118
118
|
};
|
|
119
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
120
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
121
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
119
122
|
return parseJson.serializableJson({
|
|
120
123
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data),
|
|
121
124
|
fontStyle,
|
|
122
125
|
builderData: pageTemplate,
|
|
123
126
|
pageType,
|
|
124
127
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
125
|
-
|
|
128
|
+
languageIsoCode,
|
|
129
|
+
countryIsoCode,
|
|
130
|
+
locale,
|
|
126
131
|
swr: { fallback },
|
|
127
132
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
128
133
|
seo,
|
|
@@ -17,9 +17,14 @@ const getBuilderProps = async (fetcher, shopifyFetcher) => {
|
|
|
17
17
|
description: shopMeta?.shop.description,
|
|
18
18
|
}
|
|
19
19
|
: {};
|
|
20
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
21
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
22
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
20
23
|
return serializableJson({
|
|
21
24
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
22
|
-
|
|
25
|
+
languageIsoCode,
|
|
26
|
+
countryIsoCode,
|
|
27
|
+
locale,
|
|
23
28
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
24
29
|
swr: {
|
|
25
30
|
revalidateOnMount: true,
|
|
@@ -101,13 +101,18 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher) => async () => {
|
|
|
101
101
|
},
|
|
102
102
|
],
|
|
103
103
|
};
|
|
104
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
105
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
106
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
104
107
|
return serializableJson({
|
|
105
108
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
106
109
|
fontStyle,
|
|
107
110
|
builderData: homeTemplate,
|
|
108
111
|
swr: { fallback },
|
|
109
112
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
110
|
-
|
|
113
|
+
languageIsoCode,
|
|
114
|
+
countryIsoCode,
|
|
115
|
+
locale,
|
|
111
116
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
112
117
|
seo,
|
|
113
118
|
mobileOnly,
|
|
@@ -117,6 +117,9 @@ const getHomePageProps = (fetcher, shopifyFetcher) => async () => {
|
|
|
117
117
|
},
|
|
118
118
|
],
|
|
119
119
|
};
|
|
120
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
121
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
122
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
120
123
|
return serializableJson({
|
|
121
124
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data),
|
|
122
125
|
fontStyle,
|
|
@@ -124,7 +127,9 @@ const getHomePageProps = (fetcher, shopifyFetcher) => async () => {
|
|
|
124
127
|
pageType,
|
|
125
128
|
swr: { fallback },
|
|
126
129
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
127
|
-
locale
|
|
130
|
+
locale,
|
|
131
|
+
languageIsoCode,
|
|
132
|
+
countryIsoCode,
|
|
128
133
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
129
134
|
seo,
|
|
130
135
|
});
|
|
@@ -106,13 +106,18 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
106
106
|
},
|
|
107
107
|
],
|
|
108
108
|
};
|
|
109
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
110
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
111
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
109
112
|
return serializableJson({
|
|
110
113
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
111
114
|
fontStyle,
|
|
112
115
|
builderData: pageTemplate,
|
|
113
116
|
pageType,
|
|
114
117
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
115
|
-
|
|
118
|
+
languageIsoCode,
|
|
119
|
+
countryIsoCode,
|
|
120
|
+
locale,
|
|
116
121
|
swr: { fallback },
|
|
117
122
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
118
123
|
seo,
|
|
@@ -103,13 +103,18 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
103
103
|
},
|
|
104
104
|
],
|
|
105
105
|
};
|
|
106
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
107
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
108
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
106
109
|
return serializableJson({
|
|
107
110
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
108
111
|
fontStyle,
|
|
109
112
|
builderData: pageTemplate,
|
|
110
113
|
pageType,
|
|
111
114
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
112
|
-
|
|
115
|
+
languageIsoCode,
|
|
116
|
+
countryIsoCode,
|
|
117
|
+
locale,
|
|
113
118
|
swr: { fallback },
|
|
114
119
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
115
120
|
seo,
|
|
@@ -114,13 +114,18 @@ const getStaticPageProps = (fetcher, shopifyFetcher) => async (slug) => {
|
|
|
114
114
|
},
|
|
115
115
|
],
|
|
116
116
|
};
|
|
117
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
118
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
119
|
+
const locale = !languageIsoCode || !countryIsoCode ? null : `${languageIsoCode}-${countryIsoCode}`;
|
|
117
120
|
return serializableJson({
|
|
118
121
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data),
|
|
119
122
|
fontStyle,
|
|
120
123
|
builderData: pageTemplate,
|
|
121
124
|
pageType,
|
|
122
125
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
123
|
-
|
|
126
|
+
languageIsoCode,
|
|
127
|
+
countryIsoCode,
|
|
128
|
+
locale,
|
|
124
129
|
swr: { fallback },
|
|
125
130
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
126
131
|
seo,
|
package/dist/types/index.d.ts
CHANGED
|
@@ -21,6 +21,8 @@ type PageBuilderProps = {
|
|
|
21
21
|
pageHandle?: string | null;
|
|
22
22
|
currency?: string | null;
|
|
23
23
|
locale?: string | null;
|
|
24
|
+
languageIsoCode?: string | null;
|
|
25
|
+
countryIsoCode?: string | null;
|
|
24
26
|
favicon?: string | null;
|
|
25
27
|
mobileOnly?: boolean | null;
|
|
26
28
|
swatches?: any[] | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.14-fix.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@sentry/nextjs": "7.21.1",
|
|
23
|
-
"deepmerge": "4.
|
|
24
|
-
"html-react-parser": "^3.0.
|
|
23
|
+
"deepmerge": "4.3.0",
|
|
24
|
+
"html-react-parser": "^3.0.8",
|
|
25
25
|
"next-seo": "^5.15.0"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|