@gem-sdk/components 2.0.0-dev.568 → 2.0.0-dev.569
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/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/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
|
@@ -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: {
|
|
@@ -8,7 +8,386 @@ const SettingUIV2 = [
|
|
|
8
8
|
setting: {
|
|
9
9
|
id: 'buttonLayout'
|
|
10
10
|
},
|
|
11
|
-
layout: 'vertical'
|
|
11
|
+
layout: 'vertical',
|
|
12
|
+
controlChangeTrigger: {
|
|
13
|
+
settings: [
|
|
14
|
+
{
|
|
15
|
+
condition: 'buttonLayout === "cart-full"',
|
|
16
|
+
source: [
|
|
17
|
+
'buttonLayout'
|
|
18
|
+
],
|
|
19
|
+
action: {
|
|
20
|
+
controlId: 'enableIcon',
|
|
21
|
+
groupType: 'style',
|
|
22
|
+
controlType: 'style',
|
|
23
|
+
newValue: true
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
condition: 'buttonLayout === "cart-full"',
|
|
28
|
+
source: [
|
|
29
|
+
'buttonLayout'
|
|
30
|
+
],
|
|
31
|
+
action: {
|
|
32
|
+
controlId: 'enableTextStyle',
|
|
33
|
+
groupType: 'style',
|
|
34
|
+
controlType: 'style',
|
|
35
|
+
newValue: true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
condition: 'buttonLayout === "cart-full"',
|
|
40
|
+
source: [
|
|
41
|
+
'buttonLayout'
|
|
42
|
+
],
|
|
43
|
+
action: {
|
|
44
|
+
controlId: 'enablePrice',
|
|
45
|
+
groupType: 'style',
|
|
46
|
+
controlType: 'style',
|
|
47
|
+
newValue: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
condition: 'buttonLayout === "cart-full"',
|
|
52
|
+
source: [
|
|
53
|
+
'buttonLayout'
|
|
54
|
+
],
|
|
55
|
+
action: {
|
|
56
|
+
controlId: 'enableSeparator',
|
|
57
|
+
groupType: 'style',
|
|
58
|
+
controlType: 'style',
|
|
59
|
+
newValue: true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
condition: 'buttonLayout === "cart-full"',
|
|
64
|
+
source: [
|
|
65
|
+
'buttonLayout'
|
|
66
|
+
],
|
|
67
|
+
action: {
|
|
68
|
+
controlId: 'shouldClearSpace',
|
|
69
|
+
groupType: 'setting',
|
|
70
|
+
controlType: 'setting',
|
|
71
|
+
newValue: false
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
condition: 'buttonLayout === "cart-price"',
|
|
76
|
+
source: [
|
|
77
|
+
'buttonLayout'
|
|
78
|
+
],
|
|
79
|
+
action: {
|
|
80
|
+
controlId: 'enableSeparator',
|
|
81
|
+
groupType: 'style',
|
|
82
|
+
controlType: 'style',
|
|
83
|
+
newValue: true
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
condition: 'buttonLayout === "cart-price"',
|
|
88
|
+
source: [
|
|
89
|
+
'buttonLayout'
|
|
90
|
+
],
|
|
91
|
+
action: {
|
|
92
|
+
controlId: 'enableTextStyle',
|
|
93
|
+
groupType: 'style',
|
|
94
|
+
controlType: 'style',
|
|
95
|
+
newValue: true
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
condition: 'buttonLayout === "cart-price"',
|
|
100
|
+
source: [
|
|
101
|
+
'buttonLayout'
|
|
102
|
+
],
|
|
103
|
+
action: {
|
|
104
|
+
controlId: 'enableSeparator',
|
|
105
|
+
groupType: 'style',
|
|
106
|
+
controlType: 'style',
|
|
107
|
+
newValue: true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
condition: 'buttonLayout === "cart-price"',
|
|
112
|
+
source: [
|
|
113
|
+
'buttonLayout'
|
|
114
|
+
],
|
|
115
|
+
action: {
|
|
116
|
+
controlId: 'enablePrice',
|
|
117
|
+
groupType: 'style',
|
|
118
|
+
controlType: 'style',
|
|
119
|
+
newValue: true
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
condition: 'buttonLayout === "cart-price"',
|
|
124
|
+
source: [
|
|
125
|
+
'buttonLayout'
|
|
126
|
+
],
|
|
127
|
+
action: {
|
|
128
|
+
controlId: 'enableIcon',
|
|
129
|
+
groupType: 'style',
|
|
130
|
+
controlType: 'style',
|
|
131
|
+
newValue: false
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
condition: 'buttonLayout === "cart-price"',
|
|
136
|
+
source: [
|
|
137
|
+
'buttonLayout'
|
|
138
|
+
],
|
|
139
|
+
action: {
|
|
140
|
+
controlId: 'shouldClearSpace',
|
|
141
|
+
groupType: 'setting',
|
|
142
|
+
controlType: 'setting',
|
|
143
|
+
newValue: false
|
|
144
|
+
}
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
condition: 'buttonLayout === "cart-only"',
|
|
148
|
+
source: [
|
|
149
|
+
'buttonLayout'
|
|
150
|
+
],
|
|
151
|
+
action: {
|
|
152
|
+
controlId: 'enableTextStyle',
|
|
153
|
+
groupType: 'style',
|
|
154
|
+
controlType: 'style',
|
|
155
|
+
newValue: true
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
condition: 'buttonLayout === "cart-only"',
|
|
160
|
+
source: [
|
|
161
|
+
'buttonLayout'
|
|
162
|
+
],
|
|
163
|
+
action: {
|
|
164
|
+
controlId: 'enableIcon',
|
|
165
|
+
groupType: 'style',
|
|
166
|
+
controlType: 'style',
|
|
167
|
+
newValue: false
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
condition: 'buttonLayout === "cart-only"',
|
|
172
|
+
source: [
|
|
173
|
+
'buttonLayout'
|
|
174
|
+
],
|
|
175
|
+
action: {
|
|
176
|
+
controlId: 'enableSeparator',
|
|
177
|
+
groupType: 'style',
|
|
178
|
+
controlType: 'style',
|
|
179
|
+
newValue: false
|
|
180
|
+
}
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
condition: 'buttonLayout === "cart-only"',
|
|
184
|
+
source: [
|
|
185
|
+
'buttonLayout'
|
|
186
|
+
],
|
|
187
|
+
action: {
|
|
188
|
+
controlId: 'enablePrice',
|
|
189
|
+
groupType: 'style',
|
|
190
|
+
controlType: 'style',
|
|
191
|
+
newValue: false
|
|
192
|
+
}
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
condition: 'buttonLayout === "cart-only"',
|
|
196
|
+
source: [
|
|
197
|
+
'buttonLayout'
|
|
198
|
+
],
|
|
199
|
+
action: {
|
|
200
|
+
controlId: 'shouldClearSpace',
|
|
201
|
+
groupType: 'setting',
|
|
202
|
+
controlType: 'setting',
|
|
203
|
+
newValue: false
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
condition: 'buttonLayout === "cart-price-icon"',
|
|
208
|
+
source: [
|
|
209
|
+
'buttonLayout'
|
|
210
|
+
],
|
|
211
|
+
action: {
|
|
212
|
+
controlId: 'enableTextStyle',
|
|
213
|
+
groupType: 'style',
|
|
214
|
+
controlType: 'style',
|
|
215
|
+
newValue: true
|
|
216
|
+
}
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
condition: 'buttonLayout === "cart-price-icon"',
|
|
220
|
+
source: [
|
|
221
|
+
'buttonLayout'
|
|
222
|
+
],
|
|
223
|
+
action: {
|
|
224
|
+
controlId: 'enableIcon',
|
|
225
|
+
groupType: 'style',
|
|
226
|
+
controlType: 'style',
|
|
227
|
+
newValue: true
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
condition: 'buttonLayout === "cart-price-icon"',
|
|
232
|
+
source: [
|
|
233
|
+
'buttonLayout'
|
|
234
|
+
],
|
|
235
|
+
action: {
|
|
236
|
+
controlId: 'enableSeparator',
|
|
237
|
+
groupType: 'style',
|
|
238
|
+
controlType: 'style',
|
|
239
|
+
newValue: true
|
|
240
|
+
}
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
condition: 'buttonLayout === "cart-price-icon"',
|
|
244
|
+
source: [
|
|
245
|
+
'buttonLayout'
|
|
246
|
+
],
|
|
247
|
+
action: {
|
|
248
|
+
controlId: 'enablePrice',
|
|
249
|
+
groupType: 'style',
|
|
250
|
+
controlType: 'style',
|
|
251
|
+
newValue: true
|
|
252
|
+
}
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
condition: 'buttonLayout === "cart-price-icon"',
|
|
256
|
+
source: [
|
|
257
|
+
'buttonLayout'
|
|
258
|
+
],
|
|
259
|
+
action: {
|
|
260
|
+
controlId: 'shouldClearSpace',
|
|
261
|
+
groupType: 'setting',
|
|
262
|
+
controlType: 'setting',
|
|
263
|
+
newValue: false
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
condition: 'buttonLayout === "cart-icon"',
|
|
268
|
+
source: [
|
|
269
|
+
'buttonLayout'
|
|
270
|
+
],
|
|
271
|
+
action: {
|
|
272
|
+
controlId: 'enableTextStyle',
|
|
273
|
+
groupType: 'style',
|
|
274
|
+
controlType: 'style',
|
|
275
|
+
newValue: true
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
condition: 'buttonLayout === "cart-icon"',
|
|
280
|
+
source: [
|
|
281
|
+
'buttonLayout'
|
|
282
|
+
],
|
|
283
|
+
action: {
|
|
284
|
+
controlId: 'enableIcon',
|
|
285
|
+
groupType: 'style',
|
|
286
|
+
controlType: 'style',
|
|
287
|
+
newValue: true
|
|
288
|
+
}
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
condition: 'buttonLayout === "cart-icon"',
|
|
292
|
+
source: [
|
|
293
|
+
'buttonLayout'
|
|
294
|
+
],
|
|
295
|
+
action: {
|
|
296
|
+
controlId: 'enableSeparator',
|
|
297
|
+
groupType: 'style',
|
|
298
|
+
controlType: 'style',
|
|
299
|
+
newValue: false
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
condition: 'buttonLayout === "cart-icon"',
|
|
304
|
+
source: [
|
|
305
|
+
'buttonLayout'
|
|
306
|
+
],
|
|
307
|
+
action: {
|
|
308
|
+
controlId: 'enablePrice',
|
|
309
|
+
groupType: 'style',
|
|
310
|
+
controlType: 'style',
|
|
311
|
+
newValue: false
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
condition: 'buttonLayout === "cart-icon"',
|
|
316
|
+
source: [
|
|
317
|
+
'buttonLayout'
|
|
318
|
+
],
|
|
319
|
+
action: {
|
|
320
|
+
controlId: 'shouldClearSpace',
|
|
321
|
+
groupType: 'setting',
|
|
322
|
+
controlType: 'setting',
|
|
323
|
+
newValue: false
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
condition: 'buttonLayout === "icon-only"',
|
|
328
|
+
source: [
|
|
329
|
+
'buttonLayout'
|
|
330
|
+
],
|
|
331
|
+
action: {
|
|
332
|
+
controlId: 'enableTextStyle',
|
|
333
|
+
groupType: 'style',
|
|
334
|
+
controlType: 'style',
|
|
335
|
+
newValue: false
|
|
336
|
+
}
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
condition: 'buttonLayout === "icon-only"',
|
|
340
|
+
source: [
|
|
341
|
+
'buttonLayout'
|
|
342
|
+
],
|
|
343
|
+
action: {
|
|
344
|
+
controlId: 'enableIcon',
|
|
345
|
+
groupType: 'style',
|
|
346
|
+
controlType: 'style',
|
|
347
|
+
newValue: true
|
|
348
|
+
}
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
condition: 'buttonLayout === "icon-only"',
|
|
352
|
+
source: [
|
|
353
|
+
'buttonLayout'
|
|
354
|
+
],
|
|
355
|
+
action: {
|
|
356
|
+
controlId: 'enableSeparator',
|
|
357
|
+
groupType: 'style',
|
|
358
|
+
controlType: 'style',
|
|
359
|
+
newValue: false
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
condition: 'buttonLayout === "icon-only"',
|
|
364
|
+
source: [
|
|
365
|
+
'buttonLayout'
|
|
366
|
+
],
|
|
367
|
+
action: {
|
|
368
|
+
controlId: 'enablePrice',
|
|
369
|
+
groupType: 'style',
|
|
370
|
+
controlType: 'style',
|
|
371
|
+
newValue: false
|
|
372
|
+
}
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
condition: 'buttonLayout === "icon-only"',
|
|
376
|
+
source: [
|
|
377
|
+
'buttonLayout'
|
|
378
|
+
],
|
|
379
|
+
action: {
|
|
380
|
+
controlId: 'shouldClearSpace',
|
|
381
|
+
groupType: 'setting',
|
|
382
|
+
controlType: 'setting',
|
|
383
|
+
newValue: true
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
options: {
|
|
388
|
+
noRecordHistory: true
|
|
389
|
+
}
|
|
390
|
+
}
|
|
12
391
|
}
|
|
13
392
|
]
|
|
14
393
|
},
|
|
@@ -202,7 +581,6 @@ const SettingUIV2 = [
|
|
|
202
581
|
]
|
|
203
582
|
},
|
|
204
583
|
{
|
|
205
|
-
conditionDisplay: '["cart-full", "cart-icon", "cart-price-icon", "icon-only"].includes(buttonLayout ?? "")',
|
|
206
584
|
controls: [
|
|
207
585
|
{
|
|
208
586
|
label: {
|
|
@@ -251,9 +629,20 @@ const SettingUIV2 = [
|
|
|
251
629
|
{
|
|
252
630
|
controls: [
|
|
253
631
|
{
|
|
254
|
-
id: 'typo',
|
|
255
632
|
label: {
|
|
256
|
-
en: '
|
|
633
|
+
en: 'Text style'
|
|
634
|
+
},
|
|
635
|
+
setting: {
|
|
636
|
+
id: 'enableTextStyle'
|
|
637
|
+
},
|
|
638
|
+
options: {
|
|
639
|
+
labelVariant: 'primary',
|
|
640
|
+
toggleStyle: 'switch'
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
label: {
|
|
645
|
+
en: 'Text'
|
|
257
646
|
},
|
|
258
647
|
setting: {
|
|
259
648
|
id: 'typo'
|
|
@@ -268,7 +657,6 @@ const SettingUIV2 = [
|
|
|
268
657
|
]
|
|
269
658
|
},
|
|
270
659
|
{
|
|
271
|
-
conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
|
|
272
660
|
controls: [
|
|
273
661
|
{
|
|
274
662
|
label: {
|
|
@@ -294,7 +682,6 @@ const SettingUIV2 = [
|
|
|
294
682
|
]
|
|
295
683
|
},
|
|
296
684
|
{
|
|
297
|
-
conditionDisplay: '["cart-full", "cart-price", "cart-price-icon"].includes(buttonLayout ?? "")',
|
|
298
685
|
controls: [
|
|
299
686
|
{
|
|
300
687
|
label: {
|
|
@@ -310,7 +697,7 @@ const SettingUIV2 = [
|
|
|
310
697
|
},
|
|
311
698
|
{
|
|
312
699
|
label: {
|
|
313
|
-
en: '
|
|
700
|
+
en: 'Price text style'
|
|
314
701
|
},
|
|
315
702
|
conditionDisplay: 'enablePrice === true',
|
|
316
703
|
type: 'combo',
|
|
@@ -328,7 +715,7 @@ const SettingUIV2 = [
|
|
|
328
715
|
},
|
|
329
716
|
{
|
|
330
717
|
label: {
|
|
331
|
-
en: '
|
|
718
|
+
en: 'Price text style'
|
|
332
719
|
},
|
|
333
720
|
conditionDisplay: 'enablePrice === true',
|
|
334
721
|
type: 'combo',
|
|
@@ -458,16 +845,16 @@ const SettingUIV2 = [
|
|
|
458
845
|
{
|
|
459
846
|
type: 'combo',
|
|
460
847
|
label: {
|
|
461
|
-
en: '
|
|
848
|
+
en: 'Content'
|
|
462
849
|
},
|
|
463
|
-
iconName: 'polaris-text-
|
|
850
|
+
iconName: 'polaris-text-block',
|
|
464
851
|
fixedValue: 'Out of stock',
|
|
465
852
|
getValueFromSettingID: 'outOfStockLabel',
|
|
466
853
|
isHideClear: true,
|
|
467
854
|
controls: [
|
|
468
855
|
{
|
|
469
856
|
label: {
|
|
470
|
-
en: '
|
|
857
|
+
en: 'Content'
|
|
471
858
|
},
|
|
472
859
|
setting: {
|
|
473
860
|
id: 'outOfStockLabel'
|
|
@@ -499,35 +886,40 @@ const SettingUIV2 = [
|
|
|
499
886
|
}
|
|
500
887
|
}
|
|
501
888
|
}
|
|
502
|
-
}
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
889
|
+
}
|
|
890
|
+
],
|
|
891
|
+
moreSettings: {
|
|
892
|
+
type: 'collapse',
|
|
893
|
+
controls: [
|
|
894
|
+
{
|
|
895
|
+
label: {
|
|
896
|
+
en: 'Border'
|
|
897
|
+
},
|
|
898
|
+
setting: {
|
|
899
|
+
id: 'oosBorderV2',
|
|
900
|
+
state: 'normal'
|
|
901
|
+
}
|
|
515
902
|
},
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
903
|
+
{
|
|
904
|
+
label: {
|
|
905
|
+
en: 'Corner'
|
|
906
|
+
},
|
|
907
|
+
setting: {
|
|
908
|
+
id: 'oosRoundedV2',
|
|
909
|
+
state: 'normal'
|
|
910
|
+
}
|
|
524
911
|
},
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
912
|
+
{
|
|
913
|
+
label: {
|
|
914
|
+
en: 'Shadow'
|
|
915
|
+
},
|
|
916
|
+
setting: {
|
|
917
|
+
id: 'oosShadowV2',
|
|
918
|
+
state: 'normal'
|
|
919
|
+
}
|
|
528
920
|
}
|
|
529
|
-
|
|
530
|
-
|
|
921
|
+
]
|
|
922
|
+
}
|
|
531
923
|
},
|
|
532
924
|
{
|
|
533
925
|
label: {
|