@gem-sdk/pages 2.0.0-dev.168 → 2.0.0-dev.173
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/constants/index.js +12 -0
- package/dist/cjs/libs/api/get-home-page-props-v2.js +20 -8
- package/dist/cjs/libs/api/get-home-page-props.js +15 -3
- package/dist/cjs/libs/api/get-static-page-props-v2.js +12 -8
- package/dist/cjs/libs/api/get-static-page-props.js +16 -3
- package/dist/cjs/libs/helpers/get-metafield.js +7 -0
- package/dist/esm/constants/index.js +12 -0
- package/dist/esm/libs/api/get-home-page-props-v2.js +21 -9
- package/dist/esm/libs/api/get-home-page-props.js +16 -4
- package/dist/esm/libs/api/get-static-page-props-v2.js +12 -8
- package/dist/esm/libs/api/get-static-page-props.js +17 -4
- package/dist/esm/libs/helpers/get-metafield.js +5 -0
- package/dist/types/index.d.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
exports.PublishedThemePageMetafields = void 0;
|
|
4
|
+
(function(PublishedThemePageMetafields) {
|
|
5
|
+
PublishedThemePageMetafields["CUSTOM_CODE_HEADER"] = 'custom_code_header';
|
|
6
|
+
PublishedThemePageMetafields["CUSTOM_CODE_BODY"] = 'custom_code_body';
|
|
7
|
+
PublishedThemePageMetafields["ANALYTICS_GA_TRACKING_ID"] = 'analytics_ga_tracking_id';
|
|
8
|
+
PublishedThemePageMetafields["ANALYTICS_FB_PIXEL_ID"] = 'analytics_fb_pixel_id';
|
|
9
|
+
PublishedThemePageMetafields["ANALYTICS_TIKTOK_PIXEL_ID"] = 'analytics_tiktok_pixel_id';
|
|
10
|
+
PublishedThemePageMetafields["GLOBAL_META_DESCRIPTION"] = 'global-meta-description';
|
|
11
|
+
PublishedThemePageMetafields["GLOBAL_META_THUMBNAIL"] = 'global-meta-thumbnail';
|
|
12
|
+
})(exports.PublishedThemePageMetafields || (exports.PublishedThemePageMetafields = {}));
|
|
@@ -9,13 +9,15 @@ var getFallback = require('../helpers/get-fallback.js');
|
|
|
9
9
|
var normalize = require('../helpers/normalize.js');
|
|
10
10
|
var parseJson = require('../helpers/parse-json.js');
|
|
11
11
|
var nextjs = require('@sentry/nextjs');
|
|
12
|
+
var index = require('../../constants/index.js');
|
|
13
|
+
var getMetafield = require('../helpers/get-metafield.js');
|
|
12
14
|
|
|
13
15
|
const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
14
16
|
try {
|
|
15
17
|
const variables = {
|
|
16
18
|
slugType: 'STATIC'
|
|
17
19
|
};
|
|
18
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
20
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
19
21
|
fetcher([
|
|
20
22
|
core.PublishedThemePagesDocument,
|
|
21
23
|
variables
|
|
@@ -25,11 +27,21 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
25
27
|
]),
|
|
26
28
|
shopifyFetcher([
|
|
27
29
|
adapterShopify.ShopMetaDocument
|
|
30
|
+
]),
|
|
31
|
+
fetcher([
|
|
32
|
+
core.PublishedShopMetasDocument,
|
|
33
|
+
{
|
|
34
|
+
keys: [
|
|
35
|
+
index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
36
|
+
index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
37
|
+
]
|
|
38
|
+
}
|
|
28
39
|
])
|
|
29
40
|
]);
|
|
30
41
|
if (theme.status === 'rejected') {
|
|
31
42
|
throw new Error(theme.reason?.[0]);
|
|
32
43
|
}
|
|
44
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
33
45
|
const dataBuilder = theme.value?.publishedThemePages?.[0];
|
|
34
46
|
if (!dataBuilder) {
|
|
35
47
|
throw new Error(`No data builder found for Home page`);
|
|
@@ -41,8 +53,8 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
41
53
|
getFallback.getFallbackV2(fetcher, homeTemplate)
|
|
42
54
|
]);
|
|
43
55
|
const mobileOnly = dataBuilder.isMobile ?? false;
|
|
44
|
-
const description = dataBuilder?.
|
|
45
|
-
const thumbnail = parseJson.parseJson(dataBuilder?.
|
|
56
|
+
const description = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
57
|
+
const thumbnail = parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
46
58
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
47
59
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
48
60
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -129,11 +141,11 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
129
141
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
130
142
|
seo,
|
|
131
143
|
mobileOnly,
|
|
132
|
-
gaTrackingId: dataBuilder
|
|
133
|
-
facebookPixelId: dataBuilder
|
|
134
|
-
tiktokPixelId: dataBuilder
|
|
135
|
-
customCodeHeader: dataBuilder
|
|
136
|
-
customCodeBody: dataBuilder
|
|
144
|
+
gaTrackingId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID, dataBuilder?.metafields) ?? null,
|
|
145
|
+
facebookPixelId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
146
|
+
tiktokPixelId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
147
|
+
customCodeHeader: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_HEADER, dataBuilder?.metafields) ?? null,
|
|
148
|
+
customCodeBody: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_BODY, dataBuilder?.metafields) ?? null,
|
|
137
149
|
pageHandle: dataBuilder.handle ?? null
|
|
138
150
|
});
|
|
139
151
|
} catch (err) {
|
|
@@ -7,6 +7,8 @@ var genCss = require('../helpers/gen-css.js');
|
|
|
7
7
|
var generateManifres = require('../helpers/generate-manifres.js');
|
|
8
8
|
var normalize = require('../helpers/normalize.js');
|
|
9
9
|
var parseJson = require('../helpers/parse-json.js');
|
|
10
|
+
var index = require('../../constants/index.js');
|
|
11
|
+
var getMetafield = require('../helpers/get-metafield.js');
|
|
10
12
|
|
|
11
13
|
const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
12
14
|
const pageType = 'STATIC';
|
|
@@ -17,7 +19,7 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
17
19
|
// PublishedThemePagesDocument,
|
|
18
20
|
// variables,
|
|
19
21
|
// ]);
|
|
20
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
22
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
21
23
|
fetcher([
|
|
22
24
|
core.PublishedThemePagesDocument,
|
|
23
25
|
variables
|
|
@@ -27,6 +29,15 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
27
29
|
]),
|
|
28
30
|
shopifyFetcher([
|
|
29
31
|
adapterShopify.ShopMetaDocument
|
|
32
|
+
]),
|
|
33
|
+
fetcher([
|
|
34
|
+
core.PublishedShopMetasDocument,
|
|
35
|
+
{
|
|
36
|
+
keys: [
|
|
37
|
+
index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
38
|
+
index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
39
|
+
]
|
|
40
|
+
}
|
|
30
41
|
])
|
|
31
42
|
]);
|
|
32
43
|
if (theme.status === 'rejected') {
|
|
@@ -34,6 +45,7 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
34
45
|
pageType
|
|
35
46
|
};
|
|
36
47
|
}
|
|
48
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
37
49
|
const dataBuilder = theme.value.publishedThemePages?.[0];
|
|
38
50
|
const homeTemplate = normalize.parseBuilderTemplate(dataBuilder);
|
|
39
51
|
const fontStyle = await googleFonts.getFontFromGlobalStyle(dataBuilder?.pageStyle?.data);
|
|
@@ -58,8 +70,8 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
58
70
|
}
|
|
59
71
|
return acc;
|
|
60
72
|
}, {});
|
|
61
|
-
const description = dataBuilder?.
|
|
62
|
-
const thumbnail = parseJson.parseJson(dataBuilder?.
|
|
73
|
+
const description = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
74
|
+
const thumbnail = parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
63
75
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
64
76
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
65
77
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -10,6 +10,8 @@ var normalize = require('../helpers/normalize.js');
|
|
|
10
10
|
var parseJson = require('../helpers/parse-json.js');
|
|
11
11
|
var nextjs = require('@sentry/nextjs');
|
|
12
12
|
var customFonts = require('../custom-fonts.js');
|
|
13
|
+
var getMetafield = require('../helpers/get-metafield.js');
|
|
14
|
+
var index = require('../../constants/index.js');
|
|
13
15
|
|
|
14
16
|
const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
15
17
|
try {
|
|
@@ -33,7 +35,9 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
33
35
|
core.PublishedShopMetasDocument,
|
|
34
36
|
{
|
|
35
37
|
keys: [
|
|
36
|
-
'source_font'
|
|
38
|
+
'source_font',
|
|
39
|
+
index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
40
|
+
index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
37
41
|
]
|
|
38
42
|
}
|
|
39
43
|
])
|
|
@@ -56,8 +60,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
56
60
|
customFonts.getCustomFonts(themePageCustomFonts)
|
|
57
61
|
]);
|
|
58
62
|
const mobileOnly = dataBuilder.isMobile ?? false;
|
|
59
|
-
const description = dataBuilder?.
|
|
60
|
-
const thumbnail = parseJson.parseJson(dataBuilder?.
|
|
63
|
+
const description = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
64
|
+
const thumbnail = parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
61
65
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
62
66
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
63
67
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -145,11 +149,11 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
145
149
|
swatches: parseJson.parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
146
150
|
seo,
|
|
147
151
|
mobileOnly,
|
|
148
|
-
gaTrackingId: dataBuilder
|
|
149
|
-
facebookPixelId: dataBuilder
|
|
150
|
-
tiktokPixelId: dataBuilder
|
|
151
|
-
customCodeHeader: dataBuilder
|
|
152
|
-
customCodeBody: dataBuilder
|
|
152
|
+
gaTrackingId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID, dataBuilder?.metafields) ?? null,
|
|
153
|
+
facebookPixelId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
154
|
+
tiktokPixelId: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
155
|
+
customCodeHeader: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_HEADER, dataBuilder?.metafields) ?? null,
|
|
156
|
+
customCodeBody: getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.CUSTOM_CODE_BODY, dataBuilder?.metafields) ?? null,
|
|
153
157
|
pageHandle: dataBuilder.handle ?? null,
|
|
154
158
|
customFonts: customFonts$1,
|
|
155
159
|
interaction: dataBuilder?.interaction,
|
|
@@ -7,6 +7,8 @@ var genCss = require('../helpers/gen-css.js');
|
|
|
7
7
|
var generateManifres = require('../helpers/generate-manifres.js');
|
|
8
8
|
var normalize = require('../helpers/normalize.js');
|
|
9
9
|
var parseJson = require('../helpers/parse-json.js');
|
|
10
|
+
var index = require('../../constants/index.js');
|
|
11
|
+
var getMetafield = require('../helpers/get-metafield.js');
|
|
10
12
|
|
|
11
13
|
const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
12
14
|
const pageType = 'STATIC';
|
|
@@ -14,7 +16,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
14
16
|
slug,
|
|
15
17
|
slugType: pageType
|
|
16
18
|
};
|
|
17
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
19
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
18
20
|
fetcher([
|
|
19
21
|
core.PublishedThemePagesDocument,
|
|
20
22
|
variables
|
|
@@ -24,6 +26,16 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
24
26
|
]),
|
|
25
27
|
shopifyFetcher([
|
|
26
28
|
adapterShopify.ShopMetaDocument
|
|
29
|
+
]),
|
|
30
|
+
fetcher([
|
|
31
|
+
core.PublishedShopMetasDocument,
|
|
32
|
+
{
|
|
33
|
+
keys: [
|
|
34
|
+
'source_font',
|
|
35
|
+
index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
36
|
+
index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
37
|
+
]
|
|
38
|
+
}
|
|
27
39
|
])
|
|
28
40
|
]);
|
|
29
41
|
if (theme.status === 'rejected') {
|
|
@@ -31,6 +43,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
31
43
|
pageType
|
|
32
44
|
};
|
|
33
45
|
}
|
|
46
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
34
47
|
const dataBuilder = theme.value.publishedThemePages?.[0];
|
|
35
48
|
const pageTemplate = normalize.parseBuilderTemplate(dataBuilder);
|
|
36
49
|
const fontStyle = await googleFonts.getFontFromGlobalStyle(dataBuilder?.pageStyle?.data);
|
|
@@ -55,8 +68,8 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
55
68
|
}
|
|
56
69
|
return acc;
|
|
57
70
|
}, {});
|
|
58
|
-
const description = dataBuilder?.
|
|
59
|
-
const thumbnail = parseJson.parseJson(dataBuilder?.
|
|
71
|
+
const description = getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
72
|
+
const thumbnail = parseJson.parseJson(getMetafield.getPublishedThemePageMetafieldByKey(index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === index.PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
60
73
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
61
74
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
62
75
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var PublishedThemePageMetafields;
|
|
2
|
+
(function(PublishedThemePageMetafields) {
|
|
3
|
+
PublishedThemePageMetafields["CUSTOM_CODE_HEADER"] = 'custom_code_header';
|
|
4
|
+
PublishedThemePageMetafields["CUSTOM_CODE_BODY"] = 'custom_code_body';
|
|
5
|
+
PublishedThemePageMetafields["ANALYTICS_GA_TRACKING_ID"] = 'analytics_ga_tracking_id';
|
|
6
|
+
PublishedThemePageMetafields["ANALYTICS_FB_PIXEL_ID"] = 'analytics_fb_pixel_id';
|
|
7
|
+
PublishedThemePageMetafields["ANALYTICS_TIKTOK_PIXEL_ID"] = 'analytics_tiktok_pixel_id';
|
|
8
|
+
PublishedThemePageMetafields["GLOBAL_META_DESCRIPTION"] = 'global-meta-description';
|
|
9
|
+
PublishedThemePageMetafields["GLOBAL_META_THUMBNAIL"] = 'global-meta-thumbnail';
|
|
10
|
+
})(PublishedThemePageMetafields || (PublishedThemePageMetafields = {}));
|
|
11
|
+
|
|
12
|
+
export { PublishedThemePageMetafields };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PublishedThemePagesDocument, StorePropertyDocument } from '@gem-sdk/core';
|
|
1
|
+
import { PublishedThemePagesDocument, StorePropertyDocument, PublishedShopMetasDocument } from '@gem-sdk/core';
|
|
2
2
|
import { ShopMetaDocument } from '@gem-sdk/adapter-shopify';
|
|
3
3
|
import { getFontStyleFromPageTemplate, getFontFromGlobalStyle } from '../google-fonts.js';
|
|
4
4
|
import { genCSS } from '../helpers/gen-css.js';
|
|
@@ -7,13 +7,15 @@ import { getFallbackV2 } from '../helpers/get-fallback.js';
|
|
|
7
7
|
import { parseBuilderTemplateV2 } from '../helpers/normalize.js';
|
|
8
8
|
import { parseJson, serializableJson } from '../helpers/parse-json.js';
|
|
9
9
|
import { captureException } from '@sentry/nextjs';
|
|
10
|
+
import { PublishedThemePageMetafields } from '../../constants/index.js';
|
|
11
|
+
import { getPublishedThemePageMetafieldByKey } from '../helpers/get-metafield.js';
|
|
10
12
|
|
|
11
13
|
const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
12
14
|
try {
|
|
13
15
|
const variables = {
|
|
14
16
|
slugType: 'STATIC'
|
|
15
17
|
};
|
|
16
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
18
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
17
19
|
fetcher([
|
|
18
20
|
PublishedThemePagesDocument,
|
|
19
21
|
variables
|
|
@@ -23,11 +25,21 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
23
25
|
]),
|
|
24
26
|
shopifyFetcher([
|
|
25
27
|
ShopMetaDocument
|
|
28
|
+
]),
|
|
29
|
+
fetcher([
|
|
30
|
+
PublishedShopMetasDocument,
|
|
31
|
+
{
|
|
32
|
+
keys: [
|
|
33
|
+
PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
34
|
+
PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
35
|
+
]
|
|
36
|
+
}
|
|
26
37
|
])
|
|
27
38
|
]);
|
|
28
39
|
if (theme.status === 'rejected') {
|
|
29
40
|
throw new Error(theme.reason?.[0]);
|
|
30
41
|
}
|
|
42
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
31
43
|
const dataBuilder = theme.value?.publishedThemePages?.[0];
|
|
32
44
|
if (!dataBuilder) {
|
|
33
45
|
throw new Error(`No data builder found for Home page`);
|
|
@@ -39,8 +51,8 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
39
51
|
getFallbackV2(fetcher, homeTemplate)
|
|
40
52
|
]);
|
|
41
53
|
const mobileOnly = dataBuilder.isMobile ?? false;
|
|
42
|
-
const description = dataBuilder?.
|
|
43
|
-
const thumbnail = parseJson(dataBuilder?.
|
|
54
|
+
const description = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
55
|
+
const thumbnail = parseJson(getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
44
56
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
45
57
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
46
58
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -127,11 +139,11 @@ const getHomePagePropsV2 = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
127
139
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
128
140
|
seo,
|
|
129
141
|
mobileOnly,
|
|
130
|
-
gaTrackingId: dataBuilder
|
|
131
|
-
facebookPixelId: dataBuilder
|
|
132
|
-
tiktokPixelId: dataBuilder
|
|
133
|
-
customCodeHeader: dataBuilder
|
|
134
|
-
customCodeBody: dataBuilder
|
|
142
|
+
gaTrackingId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID, dataBuilder?.metafields) ?? null,
|
|
143
|
+
facebookPixelId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
144
|
+
tiktokPixelId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
145
|
+
customCodeHeader: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.CUSTOM_CODE_HEADER, dataBuilder?.metafields) ?? null,
|
|
146
|
+
customCodeBody: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.CUSTOM_CODE_BODY, dataBuilder?.metafields) ?? null,
|
|
135
147
|
pageHandle: dataBuilder.handle ?? null
|
|
136
148
|
});
|
|
137
149
|
} catch (err) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { PublishedThemePagesDocument, StorePropertyDocument, prefetchQueries } from '@gem-sdk/core';
|
|
1
|
+
import { PublishedThemePagesDocument, StorePropertyDocument, PublishedShopMetasDocument, prefetchQueries } from '@gem-sdk/core';
|
|
2
2
|
import { ShopMetaDocument } from '@gem-sdk/adapter-shopify';
|
|
3
3
|
import { getFontFromGlobalStyle } from '../google-fonts.js';
|
|
4
4
|
import { genCSS } from '../helpers/gen-css.js';
|
|
5
5
|
import { generateManifest } from '../helpers/generate-manifres.js';
|
|
6
6
|
import { parseBuilderTemplate } from '../helpers/normalize.js';
|
|
7
7
|
import { parseJson, serializableJson } from '../helpers/parse-json.js';
|
|
8
|
+
import { PublishedThemePageMetafields } from '../../constants/index.js';
|
|
9
|
+
import { getPublishedThemePageMetafieldByKey } from '../helpers/get-metafield.js';
|
|
8
10
|
|
|
9
11
|
const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
10
12
|
const pageType = 'STATIC';
|
|
@@ -15,7 +17,7 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
15
17
|
// PublishedThemePagesDocument,
|
|
16
18
|
// variables,
|
|
17
19
|
// ]);
|
|
18
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
20
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
19
21
|
fetcher([
|
|
20
22
|
PublishedThemePagesDocument,
|
|
21
23
|
variables
|
|
@@ -25,6 +27,15 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
25
27
|
]),
|
|
26
28
|
shopifyFetcher([
|
|
27
29
|
ShopMetaDocument
|
|
30
|
+
]),
|
|
31
|
+
fetcher([
|
|
32
|
+
PublishedShopMetasDocument,
|
|
33
|
+
{
|
|
34
|
+
keys: [
|
|
35
|
+
PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
36
|
+
PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
37
|
+
]
|
|
38
|
+
}
|
|
28
39
|
])
|
|
29
40
|
]);
|
|
30
41
|
if (theme.status === 'rejected') {
|
|
@@ -32,6 +43,7 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
32
43
|
pageType
|
|
33
44
|
};
|
|
34
45
|
}
|
|
46
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
35
47
|
const dataBuilder = theme.value.publishedThemePages?.[0];
|
|
36
48
|
const homeTemplate = parseBuilderTemplate(dataBuilder);
|
|
37
49
|
const fontStyle = await getFontFromGlobalStyle(dataBuilder?.pageStyle?.data);
|
|
@@ -56,8 +68,8 @@ const getHomePageProps = (fetcher, shopifyFetcher)=>async ()=>{
|
|
|
56
68
|
}
|
|
57
69
|
return acc;
|
|
58
70
|
}, {});
|
|
59
|
-
const description = dataBuilder?.
|
|
60
|
-
const thumbnail = parseJson(dataBuilder?.
|
|
71
|
+
const description = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
72
|
+
const thumbnail = parseJson(getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
61
73
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
62
74
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
63
75
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -8,6 +8,8 @@ import { parseBuilderTemplateV2, extractPageBackground } from '../helpers/normal
|
|
|
8
8
|
import { parseJson, serializableJson } from '../helpers/parse-json.js';
|
|
9
9
|
import { captureException } from '@sentry/nextjs';
|
|
10
10
|
import { getCustomFonts } from '../custom-fonts.js';
|
|
11
|
+
import { getPublishedThemePageMetafieldByKey } from '../helpers/get-metafield.js';
|
|
12
|
+
import { PublishedThemePageMetafields } from '../../constants/index.js';
|
|
11
13
|
|
|
12
14
|
const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
13
15
|
try {
|
|
@@ -31,7 +33,9 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
31
33
|
PublishedShopMetasDocument,
|
|
32
34
|
{
|
|
33
35
|
keys: [
|
|
34
|
-
'source_font'
|
|
36
|
+
'source_font',
|
|
37
|
+
PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
38
|
+
PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
35
39
|
]
|
|
36
40
|
}
|
|
37
41
|
])
|
|
@@ -54,8 +58,8 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
54
58
|
getCustomFonts(themePageCustomFonts)
|
|
55
59
|
]);
|
|
56
60
|
const mobileOnly = dataBuilder.isMobile ?? false;
|
|
57
|
-
const description = dataBuilder?.
|
|
58
|
-
const thumbnail = parseJson(dataBuilder?.
|
|
61
|
+
const description = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
62
|
+
const thumbnail = parseJson(getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
59
63
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
60
64
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
61
65
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
|
@@ -143,11 +147,11 @@ const getStaticPagePropsV2 = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
143
147
|
swatches: parseJson(shopData?.storeProperty?.swatchesConfig),
|
|
144
148
|
seo,
|
|
145
149
|
mobileOnly,
|
|
146
|
-
gaTrackingId: dataBuilder
|
|
147
|
-
facebookPixelId: dataBuilder
|
|
148
|
-
tiktokPixelId: dataBuilder
|
|
149
|
-
customCodeHeader: dataBuilder
|
|
150
|
-
customCodeBody: dataBuilder
|
|
150
|
+
gaTrackingId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_GA_TRACKING_ID, dataBuilder?.metafields) ?? null,
|
|
151
|
+
facebookPixelId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_FB_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
152
|
+
tiktokPixelId: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.ANALYTICS_TIKTOK_PIXEL_ID, dataBuilder?.metafields) ?? null,
|
|
153
|
+
customCodeHeader: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.CUSTOM_CODE_HEADER, dataBuilder?.metafields) ?? null,
|
|
154
|
+
customCodeBody: getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.CUSTOM_CODE_BODY, dataBuilder?.metafields) ?? null,
|
|
151
155
|
pageHandle: dataBuilder.handle ?? null,
|
|
152
156
|
customFonts,
|
|
153
157
|
interaction: dataBuilder?.interaction,
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { PublishedThemePagesDocument, StorePropertyDocument, prefetchQueries } from '@gem-sdk/core';
|
|
1
|
+
import { PublishedThemePagesDocument, StorePropertyDocument, PublishedShopMetasDocument, prefetchQueries } from '@gem-sdk/core';
|
|
2
2
|
import { ShopMetaDocument } from '@gem-sdk/adapter-shopify';
|
|
3
3
|
import { getFontFromGlobalStyle } from '../google-fonts.js';
|
|
4
4
|
import { genCSS } from '../helpers/gen-css.js';
|
|
5
5
|
import { generateManifest } from '../helpers/generate-manifres.js';
|
|
6
6
|
import { parseBuilderTemplate } from '../helpers/normalize.js';
|
|
7
7
|
import { parseJson, serializableJson } from '../helpers/parse-json.js';
|
|
8
|
+
import { PublishedThemePageMetafields } from '../../constants/index.js';
|
|
9
|
+
import { getPublishedThemePageMetafieldByKey } from '../helpers/get-metafield.js';
|
|
8
10
|
|
|
9
11
|
const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
10
12
|
const pageType = 'STATIC';
|
|
@@ -12,7 +14,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
12
14
|
slug,
|
|
13
15
|
slugType: pageType
|
|
14
16
|
};
|
|
15
|
-
const [theme, storeProperty, shopifyMeta] = await Promise.allSettled([
|
|
17
|
+
const [theme, storeProperty, shopifyMeta, publishedShopMetas] = await Promise.allSettled([
|
|
16
18
|
fetcher([
|
|
17
19
|
PublishedThemePagesDocument,
|
|
18
20
|
variables
|
|
@@ -22,6 +24,16 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
22
24
|
]),
|
|
23
25
|
shopifyFetcher([
|
|
24
26
|
ShopMetaDocument
|
|
27
|
+
]),
|
|
28
|
+
fetcher([
|
|
29
|
+
PublishedShopMetasDocument,
|
|
30
|
+
{
|
|
31
|
+
keys: [
|
|
32
|
+
'source_font',
|
|
33
|
+
PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION,
|
|
34
|
+
PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL
|
|
35
|
+
]
|
|
36
|
+
}
|
|
25
37
|
])
|
|
26
38
|
]);
|
|
27
39
|
if (theme.status === 'rejected') {
|
|
@@ -29,6 +41,7 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
29
41
|
pageType
|
|
30
42
|
};
|
|
31
43
|
}
|
|
44
|
+
const publishedShopMetaValue = publishedShopMetas.status === 'fulfilled' ? publishedShopMetas.value : undefined;
|
|
32
45
|
const dataBuilder = theme.value.publishedThemePages?.[0];
|
|
33
46
|
const pageTemplate = parseBuilderTemplate(dataBuilder);
|
|
34
47
|
const fontStyle = await getFontFromGlobalStyle(dataBuilder?.pageStyle?.data);
|
|
@@ -53,8 +66,8 @@ const getStaticPageProps = (fetcher, shopifyFetcher)=>async (slug)=>{
|
|
|
53
66
|
}
|
|
54
67
|
return acc;
|
|
55
68
|
}, {});
|
|
56
|
-
const description = dataBuilder?.
|
|
57
|
-
const thumbnail = parseJson(dataBuilder?.
|
|
69
|
+
const description = getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_DESCRIPTION)?.value;
|
|
70
|
+
const thumbnail = parseJson(getPublishedThemePageMetafieldByKey(PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL, dataBuilder?.metafields) || publishedShopMetaValue?.publishedShopMetas?.find((item)=>item?.key === PublishedThemePageMetafields.GLOBAL_META_THUMBNAIL)?.value);
|
|
58
71
|
const shopMeta = shopifyMeta.status === 'fulfilled' ? shopifyMeta.value : undefined;
|
|
59
72
|
const shopData = storeProperty.status === 'fulfilled' ? storeProperty.value : undefined;
|
|
60
73
|
const favicon = shopData?.storeProperty?.favicon ?? '/favicon/favicon-32x32.png';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -123,8 +123,8 @@ declare const usePagePreview: (dataBuilder: ThemePageQueryResponse['themePage'],
|
|
|
123
123
|
pageConfig: {
|
|
124
124
|
mobileOnly: boolean;
|
|
125
125
|
locale: string | null;
|
|
126
|
-
languageIsoCode: ("ID" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LB" | "
|
|
127
|
-
countryIsoCode: ("ID" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "
|
|
126
|
+
languageIsoCode: ("ID" | "LT" | "AF" | "AM" | "AR" | "AZ" | "BE" | "BG" | "BM" | "BN" | "BO" | "BR" | "BS" | "CA" | "CU" | "CY" | "DE" | "DZ" | "EE" | "ES" | "ET" | "FI" | "FO" | "FR" | "GA" | "GD" | "GL" | "HR" | "HU" | "IS" | "IT" | "KI" | "KM" | "KN" | "KW" | "KY" | "LB" | "LU" | "LV" | "MG" | "MK" | "ML" | "MN" | "MR" | "MS" | "MT" | "MY" | "NE" | "NL" | "NO" | "OM" | "PA" | "PL" | "PS" | "PT" | "RO" | "RU" | "RW" | "SD" | "SE" | "SG" | "SI" | "SK" | "SL" | "SN" | "SO" | "SR" | "SV" | "TA" | "TG" | "TH" | "TK" | "TO" | "TR" | "TT" | "UG" | "UZ" | "AK" | "AS" | "CE" | "CS" | "DA" | "EL" | "EN" | "EO" | "EU" | "FA" | "FF" | "FY" | "GU" | "GV" | "HA" | "HE" | "HI" | "HY" | "IA" | "IG" | "II" | "JA" | "JV" | "KA" | "KK" | "KL" | "KO" | "KS" | "KU" | "LG" | "LN" | "LO" | "MI" | "NB" | "ND" | "NN" | "OR" | "OS" | "PT_BR" | "PT_PT" | "QU" | "RM" | "RN" | "SQ" | "SU" | "SW" | "TE" | "TI" | "UK" | "UR" | "VI" | "VO" | "WO" | "XH" | "YI" | "YO" | "ZH" | "ZH_CN" | "ZH_TW" | "ZU") | null;
|
|
127
|
+
countryIsoCode: ("ID" | "GT" | "LT" | "AC" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AN" | "AO" | "AR" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BR" | "BS" | "BT" | "BV" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CF" | "CG" | "CH" | "CI" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CV" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FO" | "FR" | "GA" | "GB" | "GD" | "GE" | "GF" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GP" | "GQ" | "GR" | "GS" | "GW" | "GY" | "HK" | "HM" | "HN" | "HR" | "HT" | "HU" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MF" | "MG" | "MK" | "ML" | "MM" | "MN" | "MO" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NC" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PM" | "PN" | "PS" | "PT" | "PY" | "QA" | "RE" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SD" | "SE" | "SG" | "SH" | "SI" | "SJ" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TA" | "TC" | "TD" | "TF" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "UM" | "US" | "UY" | "UZ" | "VA" | "VC" | "VE" | "VG" | "VN" | "VU" | "WF" | "WS" | "XK" | "YE" | "YT" | "ZA" | "ZM" | "ZW" | "ZZ") | null;
|
|
128
128
|
moneyFormat: string | null;
|
|
129
129
|
currency: ("AED" | "AFN" | "ALL" | "AMD" | "ANG" | "AOA" | "ARS" | "AUD" | "AWG" | "AZN" | "BAM" | "BBD" | "BDT" | "BGN" | "BHD" | "BIF" | "BMD" | "BND" | "BOB" | "BRL" | "BSD" | "BTN" | "BWP" | "BYN" | "BYR" | "BZD" | "CAD" | "CDF" | "CHF" | "CLP" | "CNY" | "COP" | "CRC" | "CVE" | "CZK" | "DJF" | "DKK" | "DOP" | "DZD" | "EGP" | "ERN" | "ETB" | "EUR" | "FJD" | "FKP" | "GBP" | "GEL" | "GHS" | "GIP" | "GMD" | "GNF" | "GTQ" | "GYD" | "HKD" | "HNL" | "HRK" | "HTG" | "HUF" | "IDR" | "ILS" | "INR" | "IQD" | "IRR" | "ISK" | "JEP" | "JMD" | "JOD" | "JPY" | "KES" | "KGS" | "KHR" | "KID" | "KMF" | "KRW" | "KWD" | "KYD" | "KZT" | "LAK" | "LBP" | "LKR" | "LRD" | "LSL" | "LTL" | "LVL" | "LYD" | "MAD" | "MDL" | "MGA" | "MKD" | "MMK" | "MNT" | "MOP" | "MRU" | "MUR" | "MVR" | "MWK" | "MXN" | "MYR" | "MZN" | "NAD" | "NGN" | "NIO" | "NOK" | "NPR" | "NZD" | "OMR" | "PAB" | "PEN" | "PGK" | "PHP" | "PKR" | "PLN" | "PYG" | "QAR" | "RON" | "RSD" | "RUB" | "RWF" | "SAR" | "SBD" | "SCR" | "SDG" | "SEK" | "SGD" | "SHP" | "SLL" | "SOS" | "SRD" | "SSP" | "STD" | "STN" | "SYP" | "SZL" | "THB" | "TJS" | "TMT" | "TND" | "TOP" | "TRY" | "TTD" | "TWD" | "TZS" | "UAH" | "UGX" | "USD" | "UYU" | "UZS" | "VED" | "VEF" | "VES" | "VND" | "VUV" | "WST" | "XAF" | "XCD" | "XOF" | "XPF" | "XXX" | "YER" | "ZAR" | "ZMW") | null;
|
|
130
130
|
swatches: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gem-sdk/pages",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.173",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/cjs/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"next": "latest"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@gem-sdk/core": "2.0.0-dev.
|
|
29
|
+
"@gem-sdk/core": "2.0.0-dev.173",
|
|
30
30
|
"@gem-sdk/plugin-cookie-bar": "1.58.0-dev.142",
|
|
31
31
|
"@gem-sdk/plugin-quick-view": "1.58.0-dev.142",
|
|
32
32
|
"@gem-sdk/plugin-sticky-add-to-cart": "1.58.0-dev.142"
|