@gem-sdk/pages 1.5.23 → 1.5.27
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-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-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 +1 -1
|
@@ -21,9 +21,14 @@ const getBuilderProps = async (fetcher, shopifyFetcher)=>{
|
|
|
21
21
|
title: 'Preview',
|
|
22
22
|
description: shopMeta?.shop.description
|
|
23
23
|
} : {};
|
|
24
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
25
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
26
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
24
27
|
return parseJson.serializableJson({
|
|
25
28
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
26
|
-
|
|
29
|
+
languageIsoCode,
|
|
30
|
+
countryIsoCode,
|
|
31
|
+
locale,
|
|
27
32
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
28
33
|
swr: {
|
|
29
34
|
revalidateOnMount: true
|
|
@@ -109,6 +109,9 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
};
|
|
112
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
113
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
114
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
112
115
|
return parseJson.serializableJson({
|
|
113
116
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
114
117
|
fontStyle,
|
|
@@ -117,7 +120,9 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
117
120
|
fallback
|
|
118
121
|
},
|
|
119
122
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
120
|
-
|
|
123
|
+
languageIsoCode,
|
|
124
|
+
countryIsoCode,
|
|
125
|
+
locale,
|
|
121
126
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
122
127
|
seo,
|
|
123
128
|
mobileOnly,
|
|
@@ -114,13 +114,18 @@ const getStaticPagePropsPreview = (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}`;
|
|
117
120
|
return parseJson.serializableJson({
|
|
118
121
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
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: {
|
|
125
130
|
fallback
|
|
126
131
|
},
|
|
@@ -111,13 +111,18 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
111
111
|
}
|
|
112
112
|
]
|
|
113
113
|
};
|
|
114
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
115
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
116
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
114
117
|
return parseJson.serializableJson({
|
|
115
118
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
116
119
|
fontStyle,
|
|
117
120
|
builderData: pageTemplate,
|
|
118
121
|
pageType,
|
|
119
122
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
120
|
-
|
|
123
|
+
languageIsoCode,
|
|
124
|
+
countryIsoCode,
|
|
125
|
+
locale,
|
|
121
126
|
swr: {
|
|
122
127
|
fallback
|
|
123
128
|
},
|
|
@@ -124,13 +124,18 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
124
124
|
}
|
|
125
125
|
]
|
|
126
126
|
};
|
|
127
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
128
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
129
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
127
130
|
return parseJson.serializableJson({
|
|
128
131
|
themeStyle: genCss.genCSS(dataBuilder?.pageStyle?.data),
|
|
129
132
|
fontStyle,
|
|
130
133
|
builderData: pageTemplate,
|
|
131
134
|
pageType,
|
|
132
135
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
133
|
-
|
|
136
|
+
languageIsoCode,
|
|
137
|
+
countryIsoCode,
|
|
138
|
+
locale,
|
|
134
139
|
swr: {
|
|
135
140
|
fallback
|
|
136
141
|
},
|
|
@@ -19,9 +19,14 @@ const getBuilderProps = async (fetcher, shopifyFetcher)=>{
|
|
|
19
19
|
title: 'Preview',
|
|
20
20
|
description: shopMeta?.shop.description
|
|
21
21
|
} : {};
|
|
22
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
23
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
24
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
22
25
|
return serializableJson({
|
|
23
26
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
24
|
-
|
|
27
|
+
languageIsoCode,
|
|
28
|
+
countryIsoCode,
|
|
29
|
+
locale,
|
|
25
30
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
26
31
|
swr: {
|
|
27
32
|
revalidateOnMount: true
|
|
@@ -107,6 +107,9 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
107
107
|
}
|
|
108
108
|
]
|
|
109
109
|
};
|
|
110
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
111
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
112
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
110
113
|
return serializableJson({
|
|
111
114
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
112
115
|
fontStyle,
|
|
@@ -115,7 +118,9 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
115
118
|
fallback
|
|
116
119
|
},
|
|
117
120
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
118
|
-
|
|
121
|
+
languageIsoCode,
|
|
122
|
+
countryIsoCode,
|
|
123
|
+
locale,
|
|
119
124
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
120
125
|
seo,
|
|
121
126
|
mobileOnly,
|
|
@@ -112,13 +112,18 @@ const getStaticPagePropsPreview = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
112
112
|
}
|
|
113
113
|
]
|
|
114
114
|
};
|
|
115
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
116
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
117
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
115
118
|
return serializableJson({
|
|
116
119
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
117
120
|
fontStyle,
|
|
118
121
|
builderData: pageTemplate,
|
|
119
122
|
pageType,
|
|
120
123
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
121
|
-
|
|
124
|
+
languageIsoCode,
|
|
125
|
+
countryIsoCode,
|
|
126
|
+
locale,
|
|
122
127
|
swr: {
|
|
123
128
|
fallback
|
|
124
129
|
},
|
|
@@ -109,13 +109,18 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
109
109
|
}
|
|
110
110
|
]
|
|
111
111
|
};
|
|
112
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
113
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
114
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
112
115
|
return serializableJson({
|
|
113
116
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data, mobileOnly),
|
|
114
117
|
fontStyle,
|
|
115
118
|
builderData: pageTemplate,
|
|
116
119
|
pageType,
|
|
117
120
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
118
|
-
|
|
121
|
+
languageIsoCode,
|
|
122
|
+
countryIsoCode,
|
|
123
|
+
locale,
|
|
119
124
|
swr: {
|
|
120
125
|
fallback
|
|
121
126
|
},
|
|
@@ -122,13 +122,18 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
122
122
|
}
|
|
123
123
|
]
|
|
124
124
|
};
|
|
125
|
+
const languageIsoCode = shopMeta?.localization.language.isoCode ?? null;
|
|
126
|
+
const countryIsoCode = shopMeta?.localization.country.isoCode ?? null;
|
|
127
|
+
const locale = `${languageIsoCode}-${countryIsoCode}`;
|
|
125
128
|
return serializableJson({
|
|
126
129
|
themeStyle: genCSS(dataBuilder?.pageStyle?.data),
|
|
127
130
|
fontStyle,
|
|
128
131
|
builderData: pageTemplate,
|
|
129
132
|
pageType,
|
|
130
133
|
currency: shopMeta?.localization.country.currency.isoCode ?? null,
|
|
131
|
-
|
|
134
|
+
languageIsoCode,
|
|
135
|
+
countryIsoCode,
|
|
136
|
+
locale,
|
|
132
137
|
swr: {
|
|
133
138
|
fallback
|
|
134
139
|
},
|
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;
|