@gem-sdk/core 1.8.14 → 1.8.22
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/helpers/compose-advance-style.js +7 -0
- package/dist/cjs/helpers/queries/get-collection.js +8 -6
- package/dist/cjs/helpers/queries/get-product-by-slug.js +2 -2
- package/dist/cjs/helpers/queries/get-product.js +2 -2
- package/dist/cjs/helpers/queries/get-products.js +2 -2
- package/dist/esm/helpers/compose-advance-style.js +7 -0
- package/dist/esm/helpers/queries/get-collection.js +8 -6
- package/dist/esm/helpers/queries/get-product-by-slug.js +2 -2
- package/dist/esm/helpers/queries/get-product.js +2 -2
- package/dist/esm/helpers/queries/get-products.js +2 -2
- package/package.json +1 -1
|
@@ -121,6 +121,13 @@ function composeAdvanceStyle(data, tag) {
|
|
|
121
121
|
if (attr === 'rounded') {
|
|
122
122
|
Object.assign(styles, radius.getCornerCSSFromGlobal(value));
|
|
123
123
|
}
|
|
124
|
+
if (attr === 'hasBoxShadow') {
|
|
125
|
+
Object.assign(styles, shadow.getStyleShadow({
|
|
126
|
+
value: data.boxShadow,
|
|
127
|
+
styleAppliedFor: 'box-shadow',
|
|
128
|
+
isEnableShadow: data.hasBoxShadow
|
|
129
|
+
}));
|
|
130
|
+
}
|
|
124
131
|
if (attr === 'boxShadow') {
|
|
125
132
|
Object.assign(styles, shadow.getStyleShadow({
|
|
126
133
|
value: value,
|
|
@@ -27,9 +27,11 @@ function productSortedByOrder(key) {
|
|
|
27
27
|
field: 'CREATED_AT'
|
|
28
28
|
};
|
|
29
29
|
case 'none':
|
|
30
|
-
return undefined;
|
|
31
30
|
default:
|
|
32
|
-
return
|
|
31
|
+
return {
|
|
32
|
+
direction: 'ASC',
|
|
33
|
+
field: 'TITLE'
|
|
34
|
+
};
|
|
33
35
|
}
|
|
34
36
|
}
|
|
35
37
|
const getCollection = async (fetcher, arg)=>{
|
|
@@ -67,8 +69,8 @@ const loopFetchCollection = async (fetcher, arg)=>{
|
|
|
67
69
|
firstVariant: 1,
|
|
68
70
|
firstMedia: 30,
|
|
69
71
|
orderBy: {
|
|
70
|
-
field: '
|
|
71
|
-
direction: '
|
|
72
|
+
field: 'TITLE',
|
|
73
|
+
direction: 'ASC'
|
|
72
74
|
},
|
|
73
75
|
orderByMedia: {
|
|
74
76
|
field: 'POSITION',
|
|
@@ -163,8 +165,8 @@ const fetchVariantsByBaseIds = async (fetcher, { ids , isSample , isStorefront
|
|
|
163
165
|
firstVariant: 100,
|
|
164
166
|
first: ids?.length || 1,
|
|
165
167
|
orderBy: {
|
|
166
|
-
field: '
|
|
167
|
-
direction: '
|
|
168
|
+
field: 'TITLE',
|
|
169
|
+
direction: 'ASC'
|
|
168
170
|
},
|
|
169
171
|
where: {
|
|
170
172
|
status: 'ACTIVE',
|
|
@@ -24,8 +24,8 @@ const getProductBySlug = async (fetcher, slug)=>{
|
|
|
24
24
|
};
|
|
25
25
|
};
|
|
26
26
|
const orderBy = {
|
|
27
|
-
field: '
|
|
28
|
-
direction: '
|
|
27
|
+
field: 'TITLE',
|
|
28
|
+
direction: 'ASC'
|
|
29
29
|
};
|
|
30
30
|
const fetchProduct = async (fetcher, handle, isStorefront)=>{
|
|
31
31
|
const variables = {
|
|
@@ -36,8 +36,8 @@ const getProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
const orderBy = {
|
|
39
|
-
field: '
|
|
40
|
-
direction: '
|
|
39
|
+
field: 'TITLE',
|
|
40
|
+
direction: 'ASC'
|
|
41
41
|
};
|
|
42
42
|
const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
43
43
|
const variables = {
|
|
@@ -78,8 +78,8 @@ const loopFetchProducts = async (fetcher, { ids , isSample , isStorefront })=>{
|
|
|
78
78
|
firstMedia: 1,
|
|
79
79
|
firstVariant: 1,
|
|
80
80
|
orderBy: {
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
field: 'TITLE',
|
|
82
|
+
direction: 'ASC'
|
|
83
83
|
},
|
|
84
84
|
orderByMedia: {
|
|
85
85
|
field: 'POSITION',
|
|
@@ -119,6 +119,13 @@ function composeAdvanceStyle(data, tag) {
|
|
|
119
119
|
if (attr === 'rounded') {
|
|
120
120
|
Object.assign(styles, getCornerCSSFromGlobal(value));
|
|
121
121
|
}
|
|
122
|
+
if (attr === 'hasBoxShadow') {
|
|
123
|
+
Object.assign(styles, getStyleShadow({
|
|
124
|
+
value: data.boxShadow,
|
|
125
|
+
styleAppliedFor: 'box-shadow',
|
|
126
|
+
isEnableShadow: data.hasBoxShadow
|
|
127
|
+
}));
|
|
128
|
+
}
|
|
122
129
|
if (attr === 'boxShadow') {
|
|
123
130
|
Object.assign(styles, getStyleShadow({
|
|
124
131
|
value: value,
|
|
@@ -25,9 +25,11 @@ function productSortedByOrder(key) {
|
|
|
25
25
|
field: 'CREATED_AT'
|
|
26
26
|
};
|
|
27
27
|
case 'none':
|
|
28
|
-
return undefined;
|
|
29
28
|
default:
|
|
30
|
-
return
|
|
29
|
+
return {
|
|
30
|
+
direction: 'ASC',
|
|
31
|
+
field: 'TITLE'
|
|
32
|
+
};
|
|
31
33
|
}
|
|
32
34
|
}
|
|
33
35
|
const getCollection = async (fetcher, arg)=>{
|
|
@@ -65,8 +67,8 @@ const loopFetchCollection = async (fetcher, arg)=>{
|
|
|
65
67
|
firstVariant: 1,
|
|
66
68
|
firstMedia: 30,
|
|
67
69
|
orderBy: {
|
|
68
|
-
field: '
|
|
69
|
-
direction: '
|
|
70
|
+
field: 'TITLE',
|
|
71
|
+
direction: 'ASC'
|
|
70
72
|
},
|
|
71
73
|
orderByMedia: {
|
|
72
74
|
field: 'POSITION',
|
|
@@ -161,8 +163,8 @@ const fetchVariantsByBaseIds = async (fetcher, { ids , isSample , isStorefront
|
|
|
161
163
|
firstVariant: 100,
|
|
162
164
|
first: ids?.length || 1,
|
|
163
165
|
orderBy: {
|
|
164
|
-
field: '
|
|
165
|
-
direction: '
|
|
166
|
+
field: 'TITLE',
|
|
167
|
+
direction: 'ASC'
|
|
166
168
|
},
|
|
167
169
|
where: {
|
|
168
170
|
status: 'ACTIVE',
|
|
@@ -22,8 +22,8 @@ const getProductBySlug = async (fetcher, slug)=>{
|
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
24
|
const orderBy = {
|
|
25
|
-
field: '
|
|
26
|
-
direction: '
|
|
25
|
+
field: 'TITLE',
|
|
26
|
+
direction: 'ASC'
|
|
27
27
|
};
|
|
28
28
|
const fetchProduct = async (fetcher, handle, isStorefront)=>{
|
|
29
29
|
const variables = {
|
|
@@ -34,8 +34,8 @@ const getProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
36
|
const orderBy = {
|
|
37
|
-
field: '
|
|
38
|
-
direction: '
|
|
37
|
+
field: 'TITLE',
|
|
38
|
+
direction: 'ASC'
|
|
39
39
|
};
|
|
40
40
|
const fetchProduct = async (fetcher, { id , isSample , isStorefront })=>{
|
|
41
41
|
const variables = {
|
|
@@ -76,8 +76,8 @@ const loopFetchProducts = async (fetcher, { ids , isSample , isStorefront })=>{
|
|
|
76
76
|
firstMedia: 1,
|
|
77
77
|
firstVariant: 1,
|
|
78
78
|
orderBy: {
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
field: 'TITLE',
|
|
80
|
+
direction: 'ASC'
|
|
81
81
|
},
|
|
82
82
|
orderByMedia: {
|
|
83
83
|
field: 'POSITION',
|