@gem-sdk/components 2.0.0-dev.580 → 2.0.0-dev.582
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/button/components/Button.js +4 -0
- package/dist/cjs/button/components/Button.liquid.js +1 -1
- package/dist/cjs/button/components/ButtonLabel.js +2 -1
- package/dist/cjs/button/components/common/styles.js +2 -2
- package/dist/cjs/image/setting/configs/settings.js +1 -1
- package/dist/cjs/image/setting/configs/uiV2.js +58 -0
- package/dist/cjs/product/components/ProductButton/common/helpers.js +0 -4
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/cjs/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/ProductButtonPrice.liquid.js +1 -3
- package/dist/cjs/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/cjs/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/cjs/product/setting/product-button/configs/settings.js +17 -20
- package/dist/cjs/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/cjs/product/setting/product-list/configs/presets.js +10 -4
- package/dist/cjs/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/cjs/sticky/setting/preset-config.js +8 -2
- package/dist/esm/button/components/Button.js +5 -1
- package/dist/esm/button/components/Button.liquid.js +1 -1
- package/dist/esm/button/components/ButtonLabel.js +2 -1
- package/dist/esm/button/components/common/styles.js +2 -3
- package/dist/esm/image/setting/configs/settings.js +1 -1
- package/dist/esm/image/setting/configs/uiV2.js +58 -0
- package/dist/esm/product/components/ProductButton/common/helpers.js +1 -4
- package/dist/esm/product/components/ProductButton/components/PriceLayout.js +2 -2
- package/dist/esm/product/components/ProductButton/components/PriceLayout.liquid.js +5 -5
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.js +2 -4
- package/dist/esm/product/components/ProductButton/components/ProductButtonPrice.liquid.js +2 -4
- package/dist/esm/product/components/ProductButton/components/Separator.js +1 -0
- package/dist/esm/product/components/ProductButton/components/Separator.liquid.js +1 -0
- package/dist/esm/product/setting/product-button/configs/settings.js +17 -20
- package/dist/esm/product/setting/product-button/configs/uiV2.js +63 -142
- package/dist/esm/product/setting/product-list/configs/presets.js +10 -4
- package/dist/esm/product/setting/product-view-more/configs/uiV2.js +71 -66
- package/dist/esm/sticky/setting/preset-config.js +8 -2
- package/package.json +1 -1
|
@@ -30,6 +30,9 @@ const Button = (props)=>{
|
|
|
30
30
|
const buttonStyles = system.createStyle({
|
|
31
31
|
...styles.getButtonStyles(styles$1)
|
|
32
32
|
});
|
|
33
|
+
const buttonLabelStyles = system.createStyle({
|
|
34
|
+
...styles.getTypoStyles(styles$1)
|
|
35
|
+
});
|
|
33
36
|
const buttonIconStyles = system.createStyle({
|
|
34
37
|
...styles.getButtonIconStyles(styles$1, setting)
|
|
35
38
|
});
|
|
@@ -109,6 +112,7 @@ const Button = (props)=>{
|
|
|
109
112
|
})),
|
|
110
113
|
system.If(enableTextStyle && checkIsShowLabel(), /*#__PURE__*/ jsxRuntime.jsx(ButtonLabel.default, {
|
|
111
114
|
label: getLabelToDisplay(),
|
|
115
|
+
styles: buttonLabelStyles,
|
|
112
116
|
classes: buttonLabelClasses
|
|
113
117
|
}))
|
|
114
118
|
]
|
|
@@ -99,7 +99,7 @@ const Button = (props)=>{
|
|
|
99
99
|
style="${buttonStyles}"
|
|
100
100
|
class="${buttonClasses}"
|
|
101
101
|
>
|
|
102
|
-
${system.If(loading, ButtonLoadingIndicator_liquid.default, '')}
|
|
102
|
+
${system.If(loading, ButtonLoadingIndicator_liquid.default(), '')}
|
|
103
103
|
<div class="${buttonContentWrapperClasses}">
|
|
104
104
|
${system.If(isShowIcon, ButtonIcon_liquid.default({
|
|
105
105
|
iconSvg: iconSvg ?? '',
|
|
@@ -5,9 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
require('react');
|
|
7
7
|
|
|
8
|
-
const ButtonLabel = ({ label, classes })=>{
|
|
8
|
+
const ButtonLabel = ({ label, styles, classes })=>{
|
|
9
9
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
10
10
|
"data-gp-text": true,
|
|
11
|
+
style: styles,
|
|
11
12
|
className: classes,
|
|
12
13
|
dangerouslySetInnerHTML: {
|
|
13
14
|
__html: label
|
|
@@ -14,8 +14,7 @@ const getButtonStyles = (styles)=>({
|
|
|
14
14
|
...getSizeStyles(styles),
|
|
15
15
|
...getRadiusStyles(styles),
|
|
16
16
|
...getShadowStyles(styles),
|
|
17
|
-
...getBackgroundStyles(styles)
|
|
18
|
-
...getTypoStyles(styles)
|
|
17
|
+
...getBackgroundStyles(styles)
|
|
19
18
|
});
|
|
20
19
|
const getButtonIconStyles = (styles, settings)=>{
|
|
21
20
|
return {
|
|
@@ -204,5 +203,6 @@ exports.getButtonWrapperStyles = getButtonWrapperStyles;
|
|
|
204
203
|
exports.getCustomCssStyles = getCustomCssStyles;
|
|
205
204
|
exports.getRadiusStyles = getRadiusStyles;
|
|
206
205
|
exports.getShadowStyles = getShadowStyles;
|
|
206
|
+
exports.getTypoStyles = getTypoStyles;
|
|
207
207
|
exports.processDeviceHoverColor = processDeviceHoverColor;
|
|
208
208
|
exports.processResponsiveHoverColors = processResponsiveHoverColors;
|
|
@@ -93,6 +93,64 @@ const SettingUIV2 = [
|
|
|
93
93
|
},
|
|
94
94
|
controls: [
|
|
95
95
|
{
|
|
96
|
+
conditionDisplay: 'isAdaptive === false',
|
|
97
|
+
setting: {
|
|
98
|
+
id: 'image'
|
|
99
|
+
},
|
|
100
|
+
layout: 'vertical',
|
|
101
|
+
options: {
|
|
102
|
+
updateFields: [
|
|
103
|
+
{
|
|
104
|
+
field: 'preload',
|
|
105
|
+
settingId: 'priority'
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
field: 'altText',
|
|
109
|
+
settingId: 'alt'
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
field: 'imageTitle',
|
|
113
|
+
settingId: 'title'
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
controlChangeTrigger: {
|
|
118
|
+
settings: [
|
|
119
|
+
{
|
|
120
|
+
action: {
|
|
121
|
+
controlId: 'priority',
|
|
122
|
+
valueFromField: 'preload',
|
|
123
|
+
groupType: 'setting',
|
|
124
|
+
controlType: 'setting',
|
|
125
|
+
removeDevice: true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
action: {
|
|
130
|
+
controlId: 'alt',
|
|
131
|
+
valueFromField: 'altText',
|
|
132
|
+
groupType: 'setting',
|
|
133
|
+
controlType: 'setting',
|
|
134
|
+
removeDevice: true
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
action: {
|
|
139
|
+
controlId: 'title',
|
|
140
|
+
valueFromField: 'imageTitle',
|
|
141
|
+
groupType: 'setting',
|
|
142
|
+
controlType: 'setting',
|
|
143
|
+
removeDevice: true
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
options: {
|
|
148
|
+
noRecordHistory: true
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
conditionDisplay: 'isAdaptive === true',
|
|
96
154
|
setting: {
|
|
97
155
|
id: 'srcSet'
|
|
98
156
|
},
|
|
@@ -5,9 +5,6 @@ var constants = require('./constants.js');
|
|
|
5
5
|
const checkIconVisibility = (styles)=>{
|
|
6
6
|
return styles?.enableIcon === true;
|
|
7
7
|
};
|
|
8
|
-
const shouldRenderPrice = (styles)=>{
|
|
9
|
-
return styles?.enablePrice;
|
|
10
|
-
};
|
|
11
8
|
const getRenderRegularPriceSettings = (setting)=>{
|
|
12
9
|
return {
|
|
13
10
|
lineThrough: false,
|
|
@@ -69,4 +66,3 @@ exports.getRenderComparePriceSettings = getRenderComparePriceSettings;
|
|
|
69
66
|
exports.getRenderRegularPriceSettings = getRenderRegularPriceSettings;
|
|
70
67
|
exports.isLayoutSupportComparePrice = isLayoutSupportComparePrice;
|
|
71
68
|
exports.renderSeparator = renderSeparator;
|
|
72
|
-
exports.shouldRenderPrice = shouldRenderPrice;
|
|
@@ -8,14 +8,14 @@ var system = require('@gem-sdk/system');
|
|
|
8
8
|
var Separator = require('./Separator.js');
|
|
9
9
|
var BlankSpace = require('./BlankSpace.js');
|
|
10
10
|
|
|
11
|
-
const PriceLayout = ({ components, showSeparator, separator })=>{
|
|
11
|
+
const PriceLayout = ({ components, showPrice, showSeparator, separator })=>{
|
|
12
12
|
const separatorComponent = system.If(showSeparator, /*#__PURE__*/ jsxRuntime.jsx(Separator.default, {
|
|
13
13
|
separator: separator
|
|
14
14
|
}), /*#__PURE__*/ jsxRuntime.jsx(BlankSpace.default, {}));
|
|
15
15
|
return /*#__PURE__*/ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
16
16
|
children: [
|
|
17
17
|
separatorComponent,
|
|
18
|
-
components.map((component, index)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
|
|
18
|
+
showPrice && components.map((component, index)=>/*#__PURE__*/ jsxRuntime.jsxs(React.Fragment, {
|
|
19
19
|
children: [
|
|
20
20
|
component,
|
|
21
21
|
index < components.length - 1 && /*#__PURE__*/ jsxRuntime.jsx(BlankSpace.default, {})
|
|
@@ -7,16 +7,16 @@ var Separator_liquid = require('./Separator.liquid.js');
|
|
|
7
7
|
var BlankSpace_liquid = require('./BlankSpace.liquid.js');
|
|
8
8
|
var core = require('@gem-sdk/core');
|
|
9
9
|
|
|
10
|
-
const PriceLayout = ({ components, separator, showSeparator })=>{
|
|
10
|
+
const PriceLayout = ({ components, separator, showPrice, showSeparator })=>{
|
|
11
11
|
const separatorComponent = system.If(showSeparator, Separator_liquid.default({
|
|
12
12
|
separator
|
|
13
13
|
}), BlankSpace_liquid.default());
|
|
14
14
|
return core.template`
|
|
15
15
|
${separatorComponent}
|
|
16
|
-
${components.map((component, index)=>core.template`
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
${showPrice && components.map((component, index)=>core.template`
|
|
17
|
+
${component()}
|
|
18
|
+
${index < components.length - 1 ? BlankSpace_liquid.default() : ''}
|
|
19
|
+
`).join('')}
|
|
20
20
|
`;
|
|
21
21
|
};
|
|
22
22
|
|
|
@@ -11,9 +11,6 @@ var PriceLayout = require('./PriceLayout.js');
|
|
|
11
11
|
var PriceComponent = require('./PriceComponent.js');
|
|
12
12
|
|
|
13
13
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
14
|
-
if (!helpers.shouldRenderPrice(styles)) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
14
|
const createPriceComponents = ({ includeCompare })=>{
|
|
18
15
|
const components = [
|
|
19
16
|
/*#__PURE__*/ jsxRuntime.jsx(PriceComponent.default, {
|
|
@@ -35,6 +32,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
35
32
|
return /*#__PURE__*/ jsxRuntime.jsx(PriceLayout.default, {
|
|
36
33
|
components: components,
|
|
37
34
|
separator: setting?.separator,
|
|
35
|
+
showPrice: !!styles?.enablePrice,
|
|
38
36
|
showSeparator: !!styles?.enableSeparator
|
|
39
37
|
});
|
|
40
38
|
};
|
|
@@ -9,9 +9,6 @@ var PriceLayout_liquid = require('./PriceLayout.liquid.js');
|
|
|
9
9
|
var PriceComponent_liquid = require('./PriceComponent.liquid.js');
|
|
10
10
|
|
|
11
11
|
const ProductButtonPrice = ({ setting, styles })=>{
|
|
12
|
-
if (!helpers.shouldRenderPrice(styles)) {
|
|
13
|
-
return '';
|
|
14
|
-
}
|
|
15
12
|
const createPriceComponents = ({ includeCompare })=>{
|
|
16
13
|
const components = [
|
|
17
14
|
()=>PriceComponent_liquid.default({
|
|
@@ -33,6 +30,7 @@ const ProductButtonPrice = ({ setting, styles })=>{
|
|
|
33
30
|
return PriceLayout_liquid.default({
|
|
34
31
|
components,
|
|
35
32
|
separator: setting?.separator,
|
|
33
|
+
showPrice: !!styles?.enablePrice,
|
|
36
34
|
showSeparator: !!styles?.enableSeparator
|
|
37
35
|
});
|
|
38
36
|
};
|
|
@@ -8,6 +8,7 @@ var styles = require('../common/styles.js');
|
|
|
8
8
|
|
|
9
9
|
const Separator = ({ separator })=>{
|
|
10
10
|
return /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
11
|
+
className: "group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden",
|
|
11
12
|
style: styles.getSeparatorStyle(),
|
|
12
13
|
dangerouslySetInnerHTML: {
|
|
13
14
|
__html: helpers.renderSeparator(separator)
|
|
@@ -8,6 +8,7 @@ var styles = require('../common/styles.js');
|
|
|
8
8
|
|
|
9
9
|
const Separator = ({ separator })=>core.template`
|
|
10
10
|
<div
|
|
11
|
+
class="group-data-[state=loading]:gp-invisible data-[hidden=true]:gp-hidden"
|
|
11
12
|
style="${styles.getSeparatorStyle()}"
|
|
12
13
|
>
|
|
13
14
|
${helpers.renderSeparator(separator)}
|
|
@@ -63,12 +63,6 @@ const ProductButtonSettings = [
|
|
|
63
63
|
value: 'cart-icon',
|
|
64
64
|
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>`,
|
|
65
65
|
icon: true
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
id: 'icon-only',
|
|
69
|
-
value: 'icon-only',
|
|
70
|
-
name: `<div class="h-40 w-[200px] rounded-medium bg-dark-200 p-10 flex items-center justify-center gap-4">${cartIcon}</div>`,
|
|
71
|
-
icon: true
|
|
72
66
|
}
|
|
73
67
|
]
|
|
74
68
|
},
|
|
@@ -178,16 +172,16 @@ const ProductButtonSettings = [
|
|
|
178
172
|
{
|
|
179
173
|
id: 'successMessage',
|
|
180
174
|
type: 'textarea',
|
|
181
|
-
label: 'Success
|
|
182
|
-
minHeight:
|
|
175
|
+
label: 'Success',
|
|
176
|
+
minHeight: 58,
|
|
183
177
|
default: 'Add product to cart successfully',
|
|
184
178
|
autoHeight: true
|
|
185
179
|
},
|
|
186
180
|
{
|
|
187
181
|
id: 'errorMessage',
|
|
188
182
|
type: 'textarea',
|
|
189
|
-
label: 'Error
|
|
190
|
-
minHeight:
|
|
183
|
+
label: 'Error',
|
|
184
|
+
minHeight: 58,
|
|
191
185
|
default: 'Cannot add product to cart',
|
|
192
186
|
autoHeight: true
|
|
193
187
|
},
|
|
@@ -195,7 +189,7 @@ const ProductButtonSettings = [
|
|
|
195
189
|
id: 'variantSelectionRequiredMessage',
|
|
196
190
|
type: 'textarea',
|
|
197
191
|
label: 'Error Message',
|
|
198
|
-
minHeight:
|
|
192
|
+
minHeight: 78,
|
|
199
193
|
default: 'Please select a variant to add product to cart',
|
|
200
194
|
autoHeight: true
|
|
201
195
|
}
|
|
@@ -541,14 +535,14 @@ const ProductButtonSettings = [
|
|
|
541
535
|
devices: {
|
|
542
536
|
desktop: {
|
|
543
537
|
default: {
|
|
544
|
-
hover: '
|
|
538
|
+
hover: 'text-3'
|
|
545
539
|
}
|
|
546
540
|
}
|
|
547
541
|
},
|
|
548
542
|
compoDefaultValue: {
|
|
549
543
|
desktop: {
|
|
550
544
|
default: {
|
|
551
|
-
hover: '
|
|
545
|
+
hover: 'text-3'
|
|
552
546
|
}
|
|
553
547
|
}
|
|
554
548
|
}
|
|
@@ -580,14 +574,14 @@ const ProductButtonSettings = [
|
|
|
580
574
|
devices: {
|
|
581
575
|
desktop: {
|
|
582
576
|
default: {
|
|
583
|
-
normal: '
|
|
577
|
+
normal: 'text-3'
|
|
584
578
|
}
|
|
585
579
|
}
|
|
586
580
|
},
|
|
587
581
|
compoDefaultValue: {
|
|
588
582
|
desktop: {
|
|
589
583
|
default: {
|
|
590
|
-
normal: '
|
|
584
|
+
normal: 'text-3'
|
|
591
585
|
}
|
|
592
586
|
}
|
|
593
587
|
}
|
|
@@ -722,19 +716,22 @@ const ProductButtonSettings = [
|
|
|
722
716
|
label: 'Left',
|
|
723
717
|
value: 'left',
|
|
724
718
|
type: 'align',
|
|
725
|
-
tooltip: 'Align left'
|
|
719
|
+
tooltip: 'Align left',
|
|
720
|
+
iconName: 'gp-align-left'
|
|
726
721
|
},
|
|
727
722
|
{
|
|
728
723
|
label: 'Center',
|
|
729
724
|
value: 'center',
|
|
730
725
|
type: 'align',
|
|
731
|
-
tooltip: 'Align center'
|
|
726
|
+
tooltip: 'Align center',
|
|
727
|
+
iconName: 'gp-align-center'
|
|
732
728
|
},
|
|
733
729
|
{
|
|
734
730
|
label: 'Right',
|
|
735
731
|
value: 'right',
|
|
736
732
|
type: 'align',
|
|
737
|
-
tooltip: 'Align right'
|
|
733
|
+
tooltip: 'Align right',
|
|
734
|
+
iconName: 'gp-align-right'
|
|
738
735
|
}
|
|
739
736
|
],
|
|
740
737
|
devices: {
|
|
@@ -766,12 +763,12 @@ const ProductButtonSettings = [
|
|
|
766
763
|
{
|
|
767
764
|
id: 'enablePrice',
|
|
768
765
|
type: 'toggle',
|
|
769
|
-
default:
|
|
766
|
+
default: false
|
|
770
767
|
},
|
|
771
768
|
{
|
|
772
769
|
id: 'enableSeparator',
|
|
773
770
|
type: 'toggle',
|
|
774
|
-
default:
|
|
771
|
+
default: false
|
|
775
772
|
},
|
|
776
773
|
{
|
|
777
774
|
id: 'enableTextStyle',
|
|
@@ -25,18 +25,6 @@ const SettingUIV2 = [
|
|
|
25
25
|
newValue: true
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
|
-
{
|
|
29
|
-
condition: 'buttonLayout === "cart-full"',
|
|
30
|
-
source: [
|
|
31
|
-
'buttonLayout'
|
|
32
|
-
],
|
|
33
|
-
action: {
|
|
34
|
-
controlId: 'enableTextStyle',
|
|
35
|
-
groupType: 'style',
|
|
36
|
-
controlType: 'style',
|
|
37
|
-
newValue: true
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
28
|
{
|
|
41
29
|
condition: 'buttonLayout === "cart-full"',
|
|
42
30
|
source: [
|
|
@@ -85,18 +73,6 @@ const SettingUIV2 = [
|
|
|
85
73
|
newValue: true
|
|
86
74
|
}
|
|
87
75
|
},
|
|
88
|
-
{
|
|
89
|
-
condition: 'buttonLayout === "cart-price"',
|
|
90
|
-
source: [
|
|
91
|
-
'buttonLayout'
|
|
92
|
-
],
|
|
93
|
-
action: {
|
|
94
|
-
controlId: 'enableTextStyle',
|
|
95
|
-
groupType: 'style',
|
|
96
|
-
controlType: 'style',
|
|
97
|
-
newValue: true
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
76
|
{
|
|
101
77
|
condition: 'buttonLayout === "cart-price"',
|
|
102
78
|
source: [
|
|
@@ -145,18 +121,6 @@ const SettingUIV2 = [
|
|
|
145
121
|
newValue: false
|
|
146
122
|
}
|
|
147
123
|
},
|
|
148
|
-
{
|
|
149
|
-
condition: 'buttonLayout === "cart-only"',
|
|
150
|
-
source: [
|
|
151
|
-
'buttonLayout'
|
|
152
|
-
],
|
|
153
|
-
action: {
|
|
154
|
-
controlId: 'enableTextStyle',
|
|
155
|
-
groupType: 'style',
|
|
156
|
-
controlType: 'style',
|
|
157
|
-
newValue: true
|
|
158
|
-
}
|
|
159
|
-
},
|
|
160
124
|
{
|
|
161
125
|
condition: 'buttonLayout === "cart-only"',
|
|
162
126
|
source: [
|
|
@@ -205,18 +169,6 @@ const SettingUIV2 = [
|
|
|
205
169
|
newValue: false
|
|
206
170
|
}
|
|
207
171
|
},
|
|
208
|
-
{
|
|
209
|
-
condition: 'buttonLayout === "cart-price-icon"',
|
|
210
|
-
source: [
|
|
211
|
-
'buttonLayout'
|
|
212
|
-
],
|
|
213
|
-
action: {
|
|
214
|
-
controlId: 'enableTextStyle',
|
|
215
|
-
groupType: 'style',
|
|
216
|
-
controlType: 'style',
|
|
217
|
-
newValue: true
|
|
218
|
-
}
|
|
219
|
-
},
|
|
220
172
|
{
|
|
221
173
|
condition: 'buttonLayout === "cart-price-icon"',
|
|
222
174
|
source: [
|
|
@@ -265,18 +217,6 @@ const SettingUIV2 = [
|
|
|
265
217
|
newValue: false
|
|
266
218
|
}
|
|
267
219
|
},
|
|
268
|
-
{
|
|
269
|
-
condition: 'buttonLayout === "cart-icon"',
|
|
270
|
-
source: [
|
|
271
|
-
'buttonLayout'
|
|
272
|
-
],
|
|
273
|
-
action: {
|
|
274
|
-
controlId: 'enableTextStyle',
|
|
275
|
-
groupType: 'style',
|
|
276
|
-
controlType: 'style',
|
|
277
|
-
newValue: true
|
|
278
|
-
}
|
|
279
|
-
},
|
|
280
220
|
{
|
|
281
221
|
condition: 'buttonLayout === "cart-icon"',
|
|
282
222
|
source: [
|
|
@@ -324,66 +264,6 @@ const SettingUIV2 = [
|
|
|
324
264
|
controlType: 'setting',
|
|
325
265
|
newValue: false
|
|
326
266
|
}
|
|
327
|
-
},
|
|
328
|
-
{
|
|
329
|
-
condition: 'buttonLayout === "icon-only"',
|
|
330
|
-
source: [
|
|
331
|
-
'buttonLayout'
|
|
332
|
-
],
|
|
333
|
-
action: {
|
|
334
|
-
controlId: 'enableTextStyle',
|
|
335
|
-
groupType: 'style',
|
|
336
|
-
controlType: 'style',
|
|
337
|
-
newValue: false
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
{
|
|
341
|
-
condition: 'buttonLayout === "icon-only"',
|
|
342
|
-
source: [
|
|
343
|
-
'buttonLayout'
|
|
344
|
-
],
|
|
345
|
-
action: {
|
|
346
|
-
controlId: 'enableIcon',
|
|
347
|
-
groupType: 'style',
|
|
348
|
-
controlType: 'style',
|
|
349
|
-
newValue: true
|
|
350
|
-
}
|
|
351
|
-
},
|
|
352
|
-
{
|
|
353
|
-
condition: 'buttonLayout === "icon-only"',
|
|
354
|
-
source: [
|
|
355
|
-
'buttonLayout'
|
|
356
|
-
],
|
|
357
|
-
action: {
|
|
358
|
-
controlId: 'enableSeparator',
|
|
359
|
-
groupType: 'style',
|
|
360
|
-
controlType: 'style',
|
|
361
|
-
newValue: false
|
|
362
|
-
}
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
condition: 'buttonLayout === "icon-only"',
|
|
366
|
-
source: [
|
|
367
|
-
'buttonLayout'
|
|
368
|
-
],
|
|
369
|
-
action: {
|
|
370
|
-
controlId: 'enablePrice',
|
|
371
|
-
groupType: 'style',
|
|
372
|
-
controlType: 'style',
|
|
373
|
-
newValue: false
|
|
374
|
-
}
|
|
375
|
-
},
|
|
376
|
-
{
|
|
377
|
-
condition: 'buttonLayout === "icon-only"',
|
|
378
|
-
source: [
|
|
379
|
-
'buttonLayout'
|
|
380
|
-
],
|
|
381
|
-
action: {
|
|
382
|
-
controlId: 'shouldClearSpace',
|
|
383
|
-
groupType: 'setting',
|
|
384
|
-
controlType: 'setting',
|
|
385
|
-
newValue: true
|
|
386
|
-
}
|
|
387
267
|
}
|
|
388
268
|
],
|
|
389
269
|
options: {
|
|
@@ -614,7 +494,7 @@ const SettingUIV2 = [
|
|
|
614
494
|
setting: {
|
|
615
495
|
id: 'iconAlign'
|
|
616
496
|
},
|
|
617
|
-
conditionDisplay: 'enableIcon === true
|
|
497
|
+
conditionDisplay: 'enableIcon === true'
|
|
618
498
|
},
|
|
619
499
|
{
|
|
620
500
|
type: 'control',
|
|
@@ -624,36 +504,39 @@ const SettingUIV2 = [
|
|
|
624
504
|
setting: {
|
|
625
505
|
id: 'iconSpacing'
|
|
626
506
|
},
|
|
627
|
-
conditionDisplay: 'enableIcon === true
|
|
507
|
+
conditionDisplay: 'enableIcon === true'
|
|
628
508
|
}
|
|
629
509
|
]
|
|
630
510
|
},
|
|
631
511
|
{
|
|
512
|
+
label: {
|
|
513
|
+
en: 'Text'
|
|
514
|
+
},
|
|
632
515
|
controls: [
|
|
633
516
|
{
|
|
517
|
+
type: 'combo',
|
|
634
518
|
label: {
|
|
635
|
-
en: '
|
|
636
|
-
},
|
|
637
|
-
setting: {
|
|
638
|
-
id: 'enableTextStyle'
|
|
519
|
+
en: 'Content'
|
|
639
520
|
},
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
521
|
+
iconName: 'polaris-text-block',
|
|
522
|
+
fixedValue: 'Add to cart',
|
|
523
|
+
getValueFromSettingID: 'label',
|
|
524
|
+
isHideClear: true,
|
|
525
|
+
controls: [
|
|
526
|
+
{
|
|
527
|
+
label: {
|
|
528
|
+
en: 'Content'
|
|
529
|
+
},
|
|
530
|
+
setting: {
|
|
531
|
+
id: 'label'
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
]
|
|
644
535
|
},
|
|
645
536
|
{
|
|
646
|
-
label: {
|
|
647
|
-
en: 'Text'
|
|
648
|
-
},
|
|
649
537
|
setting: {
|
|
650
538
|
id: 'typo'
|
|
651
539
|
},
|
|
652
|
-
conditionDisplay: 'enableTextStyle === true',
|
|
653
|
-
options: {
|
|
654
|
-
hideLabel: true,
|
|
655
|
-
fullWidth: true
|
|
656
|
-
},
|
|
657
540
|
layout: 'vertical'
|
|
658
541
|
}
|
|
659
542
|
]
|
|
@@ -699,12 +582,15 @@ const SettingUIV2 = [
|
|
|
699
582
|
},
|
|
700
583
|
{
|
|
701
584
|
label: {
|
|
702
|
-
en: '
|
|
585
|
+
en: 'Product price'
|
|
703
586
|
},
|
|
704
587
|
conditionDisplay: 'enablePrice === true',
|
|
705
588
|
type: 'combo',
|
|
706
589
|
fixedValue: 'Edit',
|
|
707
590
|
iconName: 'polaris-text-title',
|
|
591
|
+
popoverLabel: {
|
|
592
|
+
en: 'Price text style'
|
|
593
|
+
},
|
|
708
594
|
isHideClear: true,
|
|
709
595
|
controls: [
|
|
710
596
|
{
|
|
@@ -717,12 +603,15 @@ const SettingUIV2 = [
|
|
|
717
603
|
},
|
|
718
604
|
{
|
|
719
605
|
label: {
|
|
720
|
-
en: '
|
|
606
|
+
en: 'Compare-at'
|
|
721
607
|
},
|
|
722
608
|
conditionDisplay: 'enablePrice === true',
|
|
723
609
|
type: 'combo',
|
|
724
610
|
fixedValue: 'Edit',
|
|
725
611
|
iconName: 'polaris-text-title',
|
|
612
|
+
popoverLabel: {
|
|
613
|
+
en: 'Price text style'
|
|
614
|
+
},
|
|
726
615
|
isHideClear: true,
|
|
727
616
|
controls: [
|
|
728
617
|
{
|
|
@@ -961,8 +850,11 @@ const SettingUIV2 = [
|
|
|
961
850
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
962
851
|
type: 'combo',
|
|
963
852
|
getValueFromSettingID: 'successMessage',
|
|
964
|
-
iconName: 'polaris-
|
|
853
|
+
iconName: 'polaris-check-circle',
|
|
965
854
|
isHideClear: true,
|
|
855
|
+
popoverLabel: {
|
|
856
|
+
en: 'Success message'
|
|
857
|
+
},
|
|
966
858
|
controls: [
|
|
967
859
|
{
|
|
968
860
|
label: {
|
|
@@ -987,10 +879,39 @@ const SettingUIV2 = [
|
|
|
987
879
|
conditionDisplay: "enableMessage === true && actionEffect === 'continue-shopping'",
|
|
988
880
|
type: 'combo',
|
|
989
881
|
fixedValue: 'Edit',
|
|
990
|
-
iconName: 'polaris-
|
|
882
|
+
iconName: 'polaris-alert-bubble',
|
|
991
883
|
getValueFromSettingID: 'errorMessage',
|
|
992
884
|
isHideClear: true,
|
|
885
|
+
popoverLabel: {
|
|
886
|
+
en: 'Error message'
|
|
887
|
+
},
|
|
993
888
|
controls: [
|
|
889
|
+
{
|
|
890
|
+
label: {
|
|
891
|
+
en: 'Source'
|
|
892
|
+
},
|
|
893
|
+
setting: {
|
|
894
|
+
id: 'errorType'
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
{
|
|
898
|
+
label: {
|
|
899
|
+
en: 'Add failed'
|
|
900
|
+
},
|
|
901
|
+
conditionDisplay: "errorType === 'custom'",
|
|
902
|
+
setting: {
|
|
903
|
+
id: 'errorMessage'
|
|
904
|
+
}
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
label: {
|
|
908
|
+
en: 'Not select variant'
|
|
909
|
+
},
|
|
910
|
+
conditionDisplay: "errorType === 'custom'",
|
|
911
|
+
setting: {
|
|
912
|
+
id: 'variantSelectionRequiredMessage'
|
|
913
|
+
}
|
|
914
|
+
},
|
|
994
915
|
{
|
|
995
916
|
label: {
|
|
996
917
|
en: 'Content'
|