@gem-sdk/components 2.0.0-dev.568 → 2.0.0-dev.572
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/article/setting/configs/ArticleImage/settings.js +7 -6
- package/dist/cjs/article/setting/configs/ArticleImage/uiV2.js +6 -4
- package/dist/cjs/article/setting/configs/ArticleList/settings.js +3 -2
- package/dist/cjs/article/setting/configs/ArticleReadMore/settings.js +3 -1
- package/dist/cjs/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
- package/dist/cjs/product/components/ProductButton/common/constants.js +3 -3
- package/dist/cjs/product/components/ProductButton/common/data.js +2 -2
- package/dist/cjs/product/components/ProductButton/common/helpers.js +4 -12
- package/dist/cjs/product/components/ProductButton/common/styles.js +2 -1
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
- package/dist/cjs/product/setting/product-button/configs/settings.js +12 -3
- package/dist/cjs/product/setting/product-button/configs/uiV2.js +429 -37
- package/dist/cjs/video/components/HTML5Embed.js +1 -1
- package/dist/cjs/video/components/HTML5Embed.liquid.js +1 -1
- package/dist/cjs/video/components/common/getClasses.js +1 -4
- package/dist/esm/article/setting/configs/ArticleImage/settings.js +7 -6
- package/dist/esm/article/setting/configs/ArticleImage/uiV2.js +6 -4
- package/dist/esm/article/setting/configs/ArticleList/settings.js +3 -2
- package/dist/esm/article/setting/configs/ArticleReadMore/settings.js +3 -1
- package/dist/esm/article/setting/configs/ArticleReadMore/uiV2.js +20 -11
- package/dist/esm/product/components/ProductButton/common/constants.js +3 -3
- package/dist/esm/product/components/ProductButton/common/data.js +2 -2
- package/dist/esm/product/components/ProductButton/common/helpers.js +4 -12
- package/dist/esm/product/components/ProductButton/common/styles.js +2 -1
- package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +2 -2
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +1 -1
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -1
- package/dist/esm/product/setting/product-button/configs/settings.js +12 -3
- package/dist/esm/product/setting/product-button/configs/uiV2.js +429 -37
- package/dist/esm/video/components/HTML5Embed.js +1 -1
- package/dist/esm/video/components/HTML5Embed.liquid.js +1 -1
- package/dist/esm/video/components/common/getClasses.js +1 -4
- package/dist/types/index.d.ts +1 -0
- package/package.json +3 -3
|
@@ -140,11 +140,6 @@ const uiV2 = [
|
|
|
140
140
|
label: 'Full',
|
|
141
141
|
value: '100%',
|
|
142
142
|
showValue: true
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
label: 'Default',
|
|
146
|
-
value: 'default',
|
|
147
|
-
showValue: true
|
|
148
143
|
}
|
|
149
144
|
]
|
|
150
145
|
},
|
|
@@ -314,7 +309,7 @@ const uiV2 = [
|
|
|
314
309
|
setting: {
|
|
315
310
|
id: 'iconAlign'
|
|
316
311
|
},
|
|
317
|
-
conditionDisplay:
|
|
312
|
+
conditionDisplay: `iconVisible == true && readMoreType != 'text'`
|
|
318
313
|
},
|
|
319
314
|
{
|
|
320
315
|
type: 'control',
|
|
@@ -322,9 +317,9 @@ const uiV2 = [
|
|
|
322
317
|
en: 'Gap'
|
|
323
318
|
},
|
|
324
319
|
setting: {
|
|
325
|
-
id: '
|
|
320
|
+
id: 'iconSpacing'
|
|
326
321
|
},
|
|
327
|
-
conditionDisplay:
|
|
322
|
+
conditionDisplay: `iconVisible == true && readMoreType != 'text'`
|
|
328
323
|
}
|
|
329
324
|
]
|
|
330
325
|
},
|
|
@@ -391,10 +386,24 @@ const uiV2 = [
|
|
|
391
386
|
label: {
|
|
392
387
|
en: 'Content'
|
|
393
388
|
},
|
|
389
|
+
getValueFromSettingID: 'label',
|
|
390
|
+
iconName: 'gp-prefix',
|
|
391
|
+
type: 'combo',
|
|
394
392
|
conditionDisplay: `readMoreType === 'text'`,
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
393
|
+
defaultValueWhenClear: '',
|
|
394
|
+
controls: [
|
|
395
|
+
{
|
|
396
|
+
label: {
|
|
397
|
+
en: 'Content'
|
|
398
|
+
},
|
|
399
|
+
type: 'control',
|
|
400
|
+
setting: {
|
|
401
|
+
id: 'label'
|
|
402
|
+
},
|
|
403
|
+
layout: 'vertical',
|
|
404
|
+
defaultValueWhenClear: ''
|
|
405
|
+
}
|
|
406
|
+
]
|
|
398
407
|
},
|
|
399
408
|
{
|
|
400
409
|
id: 'typo',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const SEPARATOR = {
|
|
2
2
|
VERTICAL_LINE: `
|
|
3
|
-
<svg width="
|
|
3
|
+
<svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
4
|
<path
|
|
5
5
|
fill-rule="evenodd"
|
|
6
6
|
clip-rule="evenodd"
|
|
@@ -9,14 +9,14 @@ const SEPARATOR = {
|
|
|
9
9
|
</svg>
|
|
10
10
|
`,
|
|
11
11
|
HORIZONTAL_LINE: `
|
|
12
|
-
<svg width="
|
|
12
|
+
<svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
13
13
|
<path
|
|
14
14
|
d="M1.10522 9C1.10522 8.72386 1.32908 8.5 1.60522 8.5H18.1062C18.3823 8.5 18.6062 8.72386 18.6062 9V11C18.6062 11.2761 18.3823 11.5 18.1062 11.5H1.60522C1.32908 11.5 1.10522 11.2761 1.10522 11V9Z"
|
|
15
15
|
fill="currentColor" />
|
|
16
16
|
</svg>
|
|
17
17
|
`,
|
|
18
18
|
DOT: `
|
|
19
|
-
<svg width="
|
|
19
|
+
<svg width="1em" height="1em" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
20
20
|
<path
|
|
21
21
|
fill-rule="evenodd"
|
|
22
22
|
clip-rule="evenodd"
|
|
@@ -4,12 +4,12 @@ import { getSoldOutButtonStyles, getButtonStyle, getAddToCartButtonStyles } from
|
|
|
4
4
|
const getBaseButtonData = ({ style, styles, setting })=>{
|
|
5
5
|
const { iconSvg, iconAlign, shouldClearSpace } = setting ?? {};
|
|
6
6
|
return {
|
|
7
|
-
iconVisible: checkIconVisibility(styles
|
|
7
|
+
iconVisible: checkIconVisibility(styles),
|
|
8
8
|
buttonStyle: getButtonStyle(style, styles),
|
|
9
9
|
buttonSettings: {
|
|
10
10
|
iconSvg,
|
|
11
11
|
iconAlign,
|
|
12
|
-
iconVisible: checkIconVisibility(styles
|
|
12
|
+
iconVisible: checkIconVisibility(styles),
|
|
13
13
|
shouldClearSpace
|
|
14
14
|
}
|
|
15
15
|
};
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import { SUPPORT_COMPARE_PRICE_LAYOUTS, SEPARATOR } from './constants.js';
|
|
2
2
|
|
|
3
|
-
const checkIconVisibility = (styles
|
|
4
|
-
return styles?.enableIcon === true
|
|
5
|
-
'cart-full',
|
|
6
|
-
'cart-icon',
|
|
7
|
-
'cart-price-icon',
|
|
8
|
-
'icon-only'
|
|
9
|
-
].includes(setting?.buttonLayout ?? '');
|
|
3
|
+
const checkIconVisibility = (styles)=>{
|
|
4
|
+
return styles?.enableIcon === true;
|
|
10
5
|
};
|
|
11
|
-
const shouldRenderPrice = (styles
|
|
12
|
-
return styles?.enablePrice
|
|
13
|
-
'cart-only',
|
|
14
|
-
'cart-icon'
|
|
15
|
-
].includes(setting.buttonLayout);
|
|
6
|
+
const shouldRenderPrice = (styles)=>{
|
|
7
|
+
return styles?.enablePrice;
|
|
16
8
|
};
|
|
17
9
|
const getRenderRegularPriceSettings = (setting)=>{
|
|
18
10
|
return {
|
|
@@ -11,8 +11,8 @@ const PriceLayout = ({ components, separator, showSeparator })=>{
|
|
|
11
11
|
${separatorComponent}
|
|
12
12
|
${components.map((component, index)=>template`
|
|
13
13
|
${component()}
|
|
14
|
-
${index < components.length - 1 ? BlankSpace() : ''}
|
|
15
|
-
`)}
|
|
14
|
+
${index < components.length - 1 ? BlankSpace() : ''}
|
|
15
|
+
`).join('')}
|
|
16
16
|
`;
|
|
17
17
|
};
|
|
18
18
|
|
|
@@ -7,7 +7,7 @@ import PriceLayout from './PriceLayout.js';
|
|
|
7
7
|
import PriceComponent from './PriceComponent.js';
|
|
8
8
|
|
|
9
9
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
10
|
-
if (!shouldRenderPrice(styles
|
|
10
|
+
if (!shouldRenderPrice(styles)) {
|
|
11
11
|
return null;
|
|
12
12
|
}
|
|
13
13
|
const createPriceComponents = ({ includeCompare })=>{
|
|
@@ -5,7 +5,7 @@ import PriceLayout from './PriceLayout.liquid.js';
|
|
|
5
5
|
import PriceComponent from './PriceComponent.liquid.js';
|
|
6
6
|
|
|
7
7
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
8
|
-
if (!shouldRenderPrice(styles
|
|
8
|
+
if (!shouldRenderPrice(styles)) {
|
|
9
9
|
return '';
|
|
10
10
|
}
|
|
11
11
|
const createPriceComponents = ({ includeCompare })=>{
|
|
@@ -61,6 +61,12 @@ const ProductButtonSettings = [
|
|
|
61
61
|
value: 'cart-icon',
|
|
62
62
|
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon} Add to cart</div>`,
|
|
63
63
|
icon: true
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: 'icon-only',
|
|
67
|
+
value: 'icon-only',
|
|
68
|
+
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon}</div>`,
|
|
69
|
+
icon: true
|
|
64
70
|
}
|
|
65
71
|
]
|
|
66
72
|
},
|
|
@@ -70,7 +76,7 @@ const ProductButtonSettings = [
|
|
|
70
76
|
default: {
|
|
71
77
|
type: 'paragraph-1',
|
|
72
78
|
attrs: {
|
|
73
|
-
color: 'text-
|
|
79
|
+
color: 'text-3'
|
|
74
80
|
}
|
|
75
81
|
},
|
|
76
82
|
hiddenSetting: {
|
|
@@ -86,7 +92,7 @@ const ProductButtonSettings = [
|
|
|
86
92
|
default: {
|
|
87
93
|
type: 'paragraph-1',
|
|
88
94
|
attrs: {
|
|
89
|
-
color: 'text-
|
|
95
|
+
color: 'text-3'
|
|
90
96
|
}
|
|
91
97
|
},
|
|
92
98
|
hiddenSetting: {
|
|
@@ -118,6 +124,7 @@ const ProductButtonSettings = [
|
|
|
118
124
|
id: 'outOfStockLabel',
|
|
119
125
|
type: 'input',
|
|
120
126
|
label: 'Out Of Stock Message',
|
|
127
|
+
clearButton: false,
|
|
121
128
|
default: 'Out of stock'
|
|
122
129
|
},
|
|
123
130
|
{
|
|
@@ -203,6 +210,8 @@ const ProductButtonSettings = [
|
|
|
203
210
|
type: 'icon',
|
|
204
211
|
hide: true,
|
|
205
212
|
default: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
|
|
213
|
+
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`,
|
|
214
|
+
compoDefaultValue: `<svg height="20" width="20" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" fill="currentColor" data-id="508414779109605736">
|
|
206
215
|
<path fill="currentColor" strokelinecap="round" strokelinejoin="round" d="M233.21,56.31A12,12,0,0,0,224,52H66L60.53,21.85A12,12,0,0,0,48.73,12H24a12,12,0,0,0,0,24H38.71L63.62,173a28,28,0,0,0,4.07,10.21A32,32,0,1,0,123,196h34a32,32,0,1,0,31-24H91.17a4,4,0,0,1-3.93-3.28L84.92,156H196.1a28,28,0,0,0,27.55-23l12.16-66.86A12,12,0,0,0,233.21,56.31ZM100,204a8,8,0,1,1-8-8A8,8,0,0,1,100,204Zm88,8a8,8,0,1,1,8-8A8,8,0,0,1,188,212Zm12-83.28A4,4,0,0,1,196.1,132H80.56L70.38,76H209.62Z"></path></svg>`
|
|
207
216
|
},
|
|
208
217
|
{
|
|
@@ -739,7 +748,7 @@ const ProductButtonSettings = [
|
|
|
739
748
|
default: {
|
|
740
749
|
type: 'paragraph-1',
|
|
741
750
|
attrs: {
|
|
742
|
-
color: 'text-
|
|
751
|
+
color: 'text-3'
|
|
743
752
|
}
|
|
744
753
|
},
|
|
745
754
|
hiddenSetting: {
|