@gem-sdk/components 2.0.0-dev.538 → 2.0.0-dev.540
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/setting/configs/settings.js +14 -0
- package/dist/cjs/estimate-delivery/components/EstimateDate.js +1 -3
- package/dist/cjs/estimate-delivery/setting/configs/settings.js +25 -49
- package/dist/cjs/estimate-delivery/setting/configs/uiV2.js +55 -62
- package/dist/cjs/image/components/AdaptiveImage.js +2 -2
- package/dist/cjs/image/components/common/styles.js +1 -1
- package/dist/cjs/image/setting/configs/settings.js +8 -4
- package/dist/cjs/image/setting/configs/uiV2.js +42 -43
- package/dist/cjs/image-comparison/components/hooks/useCompareImage.js +3 -2
- package/dist/cjs/image-comparison/setting/configs/settings.js +11 -5
- package/dist/cjs/product/components/ProductBundle/setting/ProductBundleDiscount.js +5 -0
- package/dist/cjs/product/components/ProductBundle/setting/uiV2.js +1 -0
- package/dist/cjs/product/setting/product-view-more/configs/settings.js +14 -0
- package/dist/esm/button/setting/configs/settings.js +14 -0
- package/dist/esm/estimate-delivery/components/EstimateDate.js +1 -3
- package/dist/esm/estimate-delivery/setting/configs/settings.js +25 -49
- package/dist/esm/estimate-delivery/setting/configs/uiV2.js +55 -62
- package/dist/esm/image/components/AdaptiveImage.js +2 -2
- package/dist/esm/image/components/common/styles.js +1 -1
- package/dist/esm/image/setting/configs/settings.js +8 -4
- package/dist/esm/image/setting/configs/uiV2.js +42 -43
- package/dist/esm/image-comparison/components/hooks/useCompareImage.js +3 -2
- package/dist/esm/image-comparison/setting/configs/settings.js +11 -5
- package/dist/esm/product/components/ProductBundle/setting/ProductBundleDiscount.js +5 -0
- package/dist/esm/product/components/ProductBundle/setting/uiV2.js +1 -0
- package/dist/esm/product/setting/product-view-more/configs/settings.js +14 -0
- package/dist/types/index.d.ts +4 -0
- package/package.json +2 -2
|
@@ -336,6 +336,13 @@ const ButtonSettings = [
|
|
|
336
336
|
desktop: {
|
|
337
337
|
default: {
|
|
338
338
|
normal: {
|
|
339
|
+
size: 'cover',
|
|
340
|
+
position: {
|
|
341
|
+
x: 50,
|
|
342
|
+
y: 50
|
|
343
|
+
},
|
|
344
|
+
repeat: 'no-repeat',
|
|
345
|
+
attachment: 'scroll',
|
|
339
346
|
image: {
|
|
340
347
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
341
348
|
width: 1200,
|
|
@@ -343,6 +350,13 @@ const ButtonSettings = [
|
|
|
343
350
|
}
|
|
344
351
|
},
|
|
345
352
|
hover: {
|
|
353
|
+
size: 'cover',
|
|
354
|
+
position: {
|
|
355
|
+
x: 50,
|
|
356
|
+
y: 50
|
|
357
|
+
},
|
|
358
|
+
repeat: 'no-repeat',
|
|
359
|
+
attachment: 'scroll',
|
|
346
360
|
image: {
|
|
347
361
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
348
362
|
width: 1200,
|
|
@@ -28,9 +28,7 @@ const EstimateDate = ({ setting, styles, builderAttrs, style, builderProps, adva
|
|
|
28
28
|
cssClass: advancedClass
|
|
29
29
|
},
|
|
30
30
|
style: style,
|
|
31
|
-
styles:
|
|
32
|
-
align: styles?.align
|
|
33
|
-
},
|
|
31
|
+
styles: styles,
|
|
34
32
|
setting: newSetting,
|
|
35
33
|
className: wrapperClasses,
|
|
36
34
|
children: children
|
|
@@ -48,37 +48,25 @@ const EstimateDateSettings = [
|
|
|
48
48
|
{
|
|
49
49
|
id: 'minEstimate',
|
|
50
50
|
label: 'Min estimate',
|
|
51
|
-
type: 'input:
|
|
51
|
+
type: 'input:number',
|
|
52
52
|
default: 2,
|
|
53
|
-
units: [
|
|
54
|
-
'days'
|
|
55
|
-
],
|
|
56
53
|
emptyOnClear: true,
|
|
57
|
-
useOnlyUnitInit: true,
|
|
58
54
|
min: 0
|
|
59
55
|
},
|
|
60
56
|
{
|
|
61
57
|
id: 'maxEstimate',
|
|
62
58
|
label: 'Max estimate',
|
|
63
|
-
type: 'input:
|
|
64
|
-
units: [
|
|
65
|
-
'days'
|
|
66
|
-
],
|
|
59
|
+
type: 'input:number',
|
|
67
60
|
emptyOnClear: true,
|
|
68
61
|
default: 5,
|
|
69
|
-
useOnlyUnitInit: true,
|
|
70
62
|
min: 0
|
|
71
63
|
},
|
|
72
64
|
{
|
|
73
65
|
id: 'estimateTime',
|
|
74
66
|
label: 'Estimate',
|
|
75
|
-
type: 'input:
|
|
67
|
+
type: 'input:number',
|
|
76
68
|
emptyOnClear: true,
|
|
77
|
-
units: [
|
|
78
|
-
'days'
|
|
79
|
-
],
|
|
80
69
|
default: 5,
|
|
81
|
-
useOnlyUnitInit: true,
|
|
82
70
|
min: 0
|
|
83
71
|
}
|
|
84
72
|
]
|
|
@@ -170,18 +158,6 @@ const EstimateDateSettings = [
|
|
|
170
158
|
type: 'size-setting',
|
|
171
159
|
devices: {
|
|
172
160
|
desktop: {
|
|
173
|
-
default: {
|
|
174
|
-
width: 'Auto',
|
|
175
|
-
padding: {
|
|
176
|
-
type: 'medium',
|
|
177
|
-
top: '12px',
|
|
178
|
-
bottom: '12px',
|
|
179
|
-
left: '24px',
|
|
180
|
-
right: '24px'
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
},
|
|
184
|
-
mobile: {
|
|
185
161
|
default: {
|
|
186
162
|
width: '100%'
|
|
187
163
|
}
|
|
@@ -234,7 +210,7 @@ const EstimateDateSettings = [
|
|
|
234
210
|
desktop: {
|
|
235
211
|
default: {
|
|
236
212
|
type: 'color',
|
|
237
|
-
color: '#
|
|
213
|
+
color: '#FFFFFF',
|
|
238
214
|
image: {
|
|
239
215
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
240
216
|
width: 1200,
|
|
@@ -322,7 +298,7 @@ const EstimateDateSettings = [
|
|
|
322
298
|
}
|
|
323
299
|
},
|
|
324
300
|
{
|
|
325
|
-
id: '
|
|
301
|
+
id: 'shapeBorder',
|
|
326
302
|
type: 'border-v2',
|
|
327
303
|
devices: {
|
|
328
304
|
desktop: {
|
|
@@ -332,36 +308,30 @@ const EstimateDateSettings = [
|
|
|
332
308
|
compoDefaultValue: {
|
|
333
309
|
desktop: {
|
|
334
310
|
default: {
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
borderWidth: '1px'
|
|
340
|
-
}
|
|
311
|
+
border: 'solid',
|
|
312
|
+
color: '#121212',
|
|
313
|
+
width: '1px',
|
|
314
|
+
borderWidth: '1px'
|
|
341
315
|
}
|
|
342
316
|
}
|
|
343
317
|
}
|
|
344
318
|
},
|
|
345
319
|
{
|
|
346
|
-
id: '
|
|
320
|
+
id: 'shapeRounded',
|
|
347
321
|
type: 'corner-v2',
|
|
348
322
|
devices: {
|
|
349
323
|
desktop: {
|
|
350
|
-
default:
|
|
351
|
-
normal: undefined
|
|
352
|
-
}
|
|
324
|
+
default: undefined
|
|
353
325
|
}
|
|
354
326
|
},
|
|
355
327
|
compoDefaultValue: {
|
|
356
328
|
desktop: {
|
|
357
329
|
default: {
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
radiusType: 'rounded'
|
|
364
|
-
}
|
|
330
|
+
btrr: '8px',
|
|
331
|
+
bblr: '8px',
|
|
332
|
+
bbrr: '8px',
|
|
333
|
+
btlr: '8px',
|
|
334
|
+
radiusType: 'rounded'
|
|
365
335
|
}
|
|
366
336
|
}
|
|
367
337
|
}
|
|
@@ -397,19 +367,25 @@ const EstimateDateSettings = [
|
|
|
397
367
|
}
|
|
398
368
|
},
|
|
399
369
|
{
|
|
400
|
-
id: '
|
|
370
|
+
id: 'shapeBoxShadow',
|
|
401
371
|
type: 'shadow-v2',
|
|
402
372
|
devices: {
|
|
403
373
|
desktop: {
|
|
404
374
|
default: {
|
|
405
|
-
|
|
375
|
+
enable: false
|
|
406
376
|
}
|
|
407
377
|
}
|
|
408
378
|
},
|
|
409
379
|
compoDefaultValue: {
|
|
410
380
|
desktop: {
|
|
411
381
|
default: {
|
|
412
|
-
|
|
382
|
+
type: 'shadow-2',
|
|
383
|
+
distance: '12px',
|
|
384
|
+
blur: '12px',
|
|
385
|
+
spread: '0px',
|
|
386
|
+
color: 'rgba(18, 18, 18, 0.2)',
|
|
387
|
+
angle: 45,
|
|
388
|
+
enable: true
|
|
413
389
|
}
|
|
414
390
|
}
|
|
415
391
|
}
|
|
@@ -24,7 +24,27 @@ const SettingUIV2 = [
|
|
|
24
24
|
setting: {
|
|
25
25
|
id: 'minEstimate'
|
|
26
26
|
},
|
|
27
|
-
conditionDisplay: `typeEstimate === "${ESTIMATE_DAYS.RANGE}"
|
|
27
|
+
conditionDisplay: `typeEstimate === "${ESTIMATE_DAYS.RANGE}"`,
|
|
28
|
+
controlChangeTrigger: {
|
|
29
|
+
settings: [
|
|
30
|
+
{
|
|
31
|
+
condition: `parseInt(minEstimate) > parseInt(maxEstimate)`,
|
|
32
|
+
source: [
|
|
33
|
+
'maxEstimate',
|
|
34
|
+
'minEstimate'
|
|
35
|
+
],
|
|
36
|
+
action: {
|
|
37
|
+
controlId: 'maxEstimate',
|
|
38
|
+
groupType: 'setting',
|
|
39
|
+
controlType: 'setting',
|
|
40
|
+
valueFromField: 'minEstimate'
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
options: {
|
|
45
|
+
noRecordHistory: true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
28
48
|
},
|
|
29
49
|
{
|
|
30
50
|
label: {
|
|
@@ -33,7 +53,27 @@ const SettingUIV2 = [
|
|
|
33
53
|
setting: {
|
|
34
54
|
id: 'maxEstimate'
|
|
35
55
|
},
|
|
36
|
-
conditionDisplay: `typeEstimate === "${ESTIMATE_DAYS.RANGE}"
|
|
56
|
+
conditionDisplay: `typeEstimate === "${ESTIMATE_DAYS.RANGE}"`,
|
|
57
|
+
controlChangeTrigger: {
|
|
58
|
+
settings: [
|
|
59
|
+
{
|
|
60
|
+
condition: `parseInt(maxEstimate) < parseInt(minEstimate)`,
|
|
61
|
+
source: [
|
|
62
|
+
'maxEstimate',
|
|
63
|
+
'minEstimate'
|
|
64
|
+
],
|
|
65
|
+
action: {
|
|
66
|
+
controlId: 'minEstimate',
|
|
67
|
+
groupType: 'setting',
|
|
68
|
+
controlType: 'setting',
|
|
69
|
+
valueFromField: 'maxEstimate'
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
options: {
|
|
74
|
+
noRecordHistory: true
|
|
75
|
+
}
|
|
76
|
+
}
|
|
37
77
|
},
|
|
38
78
|
{
|
|
39
79
|
label: {
|
|
@@ -58,14 +98,7 @@ const SettingUIV2 = [
|
|
|
58
98
|
setting: {
|
|
59
99
|
id: 'typeFormat'
|
|
60
100
|
}
|
|
61
|
-
}
|
|
62
|
-
]
|
|
63
|
-
},
|
|
64
|
-
{
|
|
65
|
-
label: {
|
|
66
|
-
en: 'Date text'
|
|
67
|
-
},
|
|
68
|
-
controls: [
|
|
101
|
+
},
|
|
69
102
|
{
|
|
70
103
|
conditionDisplay: `typeFormat === 'Custom'`,
|
|
71
104
|
label: {
|
|
@@ -74,7 +107,14 @@ const SettingUIV2 = [
|
|
|
74
107
|
setting: {
|
|
75
108
|
id: 'customFormat'
|
|
76
109
|
}
|
|
77
|
-
}
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
label: {
|
|
115
|
+
en: 'Date text'
|
|
116
|
+
},
|
|
117
|
+
controls: [
|
|
78
118
|
{
|
|
79
119
|
setting: {
|
|
80
120
|
id: 'typoDate'
|
|
@@ -242,8 +282,7 @@ const SettingUIV2 = [
|
|
|
242
282
|
es: 'Borde'
|
|
243
283
|
},
|
|
244
284
|
setting: {
|
|
245
|
-
id: '
|
|
246
|
-
state: 'normal'
|
|
285
|
+
id: 'shapeBorder'
|
|
247
286
|
}
|
|
248
287
|
},
|
|
249
288
|
{
|
|
@@ -253,8 +292,7 @@ const SettingUIV2 = [
|
|
|
253
292
|
es: 'Esquina'
|
|
254
293
|
},
|
|
255
294
|
setting: {
|
|
256
|
-
id: '
|
|
257
|
-
state: 'normal'
|
|
295
|
+
id: 'shapeRounded'
|
|
258
296
|
}
|
|
259
297
|
},
|
|
260
298
|
{
|
|
@@ -264,52 +302,7 @@ const SettingUIV2 = [
|
|
|
264
302
|
es: 'Sombra'
|
|
265
303
|
},
|
|
266
304
|
setting: {
|
|
267
|
-
id: '
|
|
268
|
-
state: 'normal'
|
|
269
|
-
},
|
|
270
|
-
options: {
|
|
271
|
-
updateFields: [
|
|
272
|
-
{
|
|
273
|
-
field: 'normal.enable',
|
|
274
|
-
settingId: 'hasBoxShadow',
|
|
275
|
-
state: 'normal'
|
|
276
|
-
}
|
|
277
|
-
]
|
|
278
|
-
},
|
|
279
|
-
controlChangeTrigger: {
|
|
280
|
-
settings: [
|
|
281
|
-
{
|
|
282
|
-
condition: `boxShadow.normal.enable === true`,
|
|
283
|
-
source: [
|
|
284
|
-
'boxShadow',
|
|
285
|
-
'hasBoxShadow'
|
|
286
|
-
],
|
|
287
|
-
action: {
|
|
288
|
-
controlId: 'hasBoxShadow',
|
|
289
|
-
groupType: 'advanced',
|
|
290
|
-
controlType: 'advanced',
|
|
291
|
-
state: 'normal',
|
|
292
|
-
newValue: true
|
|
293
|
-
}
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
condition: `boxShadow.normal.enable === false`,
|
|
297
|
-
source: [
|
|
298
|
-
'boxShadow',
|
|
299
|
-
'hasBoxShadow'
|
|
300
|
-
],
|
|
301
|
-
action: {
|
|
302
|
-
controlId: 'hasBoxShadow',
|
|
303
|
-
groupType: 'advanced',
|
|
304
|
-
controlType: 'advanced',
|
|
305
|
-
state: 'normal',
|
|
306
|
-
newValue: false
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
],
|
|
310
|
-
options: {
|
|
311
|
-
noRecordHistory: true
|
|
312
|
-
}
|
|
305
|
+
id: 'shapeBoxShadow'
|
|
313
306
|
}
|
|
314
307
|
}
|
|
315
308
|
]
|
|
@@ -327,7 +320,7 @@ const SettingUIV2 = [
|
|
|
327
320
|
options: {
|
|
328
321
|
labelVariant: 'primary',
|
|
329
322
|
fullWidth: true,
|
|
330
|
-
disableMessage: `
|
|
323
|
+
disableMessage: `Horizontal alignment is disabled when the width is set to 100% or greater`
|
|
331
324
|
}
|
|
332
325
|
}
|
|
333
326
|
]
|
|
@@ -37,11 +37,11 @@ const AdaptiveImage = (props)=>{
|
|
|
37
37
|
children: [
|
|
38
38
|
srcMobile && /*#__PURE__*/ jsx("source", {
|
|
39
39
|
media: "(max-width: 767px)",
|
|
40
|
-
srcSet:
|
|
40
|
+
srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcMobile
|
|
41
41
|
}),
|
|
42
42
|
srcTablet && /*#__PURE__*/ jsx("source", {
|
|
43
43
|
media: "(max-width: 1024px)",
|
|
44
|
-
srcSet:
|
|
44
|
+
srcSet: enableLazyloadImage ? IMAGE_PLACEHOLDER : srcTablet
|
|
45
45
|
})
|
|
46
46
|
]
|
|
47
47
|
});
|
|
@@ -25,7 +25,7 @@ const getImageStyles = (styles, builderProps)=>{
|
|
|
25
25
|
...getStyleShadow({
|
|
26
26
|
value: styles?.shadow,
|
|
27
27
|
styleAppliedFor: 'box-shadow',
|
|
28
|
-
isEnableShadow: styles?.shadow?.type !== 'none'
|
|
28
|
+
isEnableShadow: styles?.shadow?.enable && styles?.shadow?.type !== 'none'
|
|
29
29
|
})
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -93,16 +93,20 @@ const ImageSettings = [
|
|
|
93
93
|
id: 'alt',
|
|
94
94
|
label: 'Alt Text',
|
|
95
95
|
type: 'textarea',
|
|
96
|
-
minHeight:
|
|
96
|
+
minHeight: 56,
|
|
97
97
|
autoHeight: true,
|
|
98
|
-
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist design'
|
|
98
|
+
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist design',
|
|
99
|
+
default: 'Describes the appearance of the image'
|
|
99
100
|
},
|
|
100
101
|
{
|
|
101
102
|
id: 'title',
|
|
102
103
|
label: 'Image title',
|
|
103
104
|
info: 'Show title when hover to image',
|
|
104
|
-
type: '
|
|
105
|
-
|
|
105
|
+
type: 'textarea',
|
|
106
|
+
minHeight: 56,
|
|
107
|
+
autoHeight: true,
|
|
108
|
+
placeholder: 'E.g: White t-shirt',
|
|
109
|
+
default: 'Title'
|
|
106
110
|
}
|
|
107
111
|
]
|
|
108
112
|
},
|
|
@@ -19,21 +19,9 @@ const SettingUIV2 = [
|
|
|
19
19
|
action: {
|
|
20
20
|
controlId: 'shape',
|
|
21
21
|
newValue: {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
shapeLinked: true
|
|
26
|
-
},
|
|
27
|
-
tablet: {
|
|
28
|
-
shape: 'square',
|
|
29
|
-
shapeValue: '1/1',
|
|
30
|
-
shapeLinked: true
|
|
31
|
-
},
|
|
32
|
-
mobile: {
|
|
33
|
-
shape: 'square',
|
|
34
|
-
shapeValue: '1/1',
|
|
35
|
-
shapeLinked: true
|
|
36
|
-
}
|
|
22
|
+
shape: 'square',
|
|
23
|
+
shapeValue: '1/1',
|
|
24
|
+
shapeLinked: true
|
|
37
25
|
},
|
|
38
26
|
groupType: 'style',
|
|
39
27
|
controlType: 'style'
|
|
@@ -47,10 +35,10 @@ const SettingUIV2 = [
|
|
|
47
35
|
action: {
|
|
48
36
|
controlId: 'borderRadius',
|
|
49
37
|
newValue: {
|
|
50
|
-
bblr: '
|
|
51
|
-
btrr: '
|
|
52
|
-
bbrr: '
|
|
53
|
-
btlr: '
|
|
38
|
+
bblr: '9999px',
|
|
39
|
+
btrr: '9999px',
|
|
40
|
+
bbrr: '9999px',
|
|
41
|
+
btlr: '9999px',
|
|
54
42
|
radiusType: 'circle'
|
|
55
43
|
},
|
|
56
44
|
groupType: 'style',
|
|
@@ -65,18 +53,8 @@ const SettingUIV2 = [
|
|
|
65
53
|
action: {
|
|
66
54
|
controlId: 'shape',
|
|
67
55
|
newValue: {
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
shapeValue: ''
|
|
71
|
-
},
|
|
72
|
-
tablet: {
|
|
73
|
-
shape: 'original',
|
|
74
|
-
shapeValue: ''
|
|
75
|
-
},
|
|
76
|
-
mobile: {
|
|
77
|
-
shape: 'original',
|
|
78
|
-
shapeValue: ''
|
|
79
|
-
}
|
|
56
|
+
shape: 'original',
|
|
57
|
+
shapeValue: ''
|
|
80
58
|
},
|
|
81
59
|
groupType: 'style',
|
|
82
60
|
controlType: 'style'
|
|
@@ -167,7 +145,6 @@ const SettingUIV2 = [
|
|
|
167
145
|
}
|
|
168
146
|
},
|
|
169
147
|
{
|
|
170
|
-
conditionDisplay: "shape.shape !== 'original'",
|
|
171
148
|
label: {
|
|
172
149
|
en: 'Scale'
|
|
173
150
|
},
|
|
@@ -299,20 +276,46 @@ const SettingUIV2 = [
|
|
|
299
276
|
},
|
|
300
277
|
controls: [
|
|
301
278
|
{
|
|
279
|
+
type: 'combo',
|
|
302
280
|
label: {
|
|
303
281
|
en: 'Alt text'
|
|
304
282
|
},
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
283
|
+
iconName: 'polaris-text-block',
|
|
284
|
+
fixedValue: 'Describes the appearance of the image',
|
|
285
|
+
getValueFromSettingID: 'alt',
|
|
286
|
+
isHideClear: true,
|
|
287
|
+
controls: [
|
|
288
|
+
{
|
|
289
|
+
label: {
|
|
290
|
+
en: 'Content'
|
|
291
|
+
},
|
|
292
|
+
setting: {
|
|
293
|
+
id: 'alt'
|
|
294
|
+
},
|
|
295
|
+
layout: 'vertical'
|
|
296
|
+
}
|
|
297
|
+
]
|
|
308
298
|
},
|
|
309
299
|
{
|
|
300
|
+
type: 'combo',
|
|
310
301
|
label: {
|
|
311
302
|
en: 'Image title'
|
|
312
303
|
},
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
304
|
+
iconName: 'polaris-text-block',
|
|
305
|
+
fixedValue: 'Title',
|
|
306
|
+
getValueFromSettingID: 'title',
|
|
307
|
+
isHideClear: true,
|
|
308
|
+
controls: [
|
|
309
|
+
{
|
|
310
|
+
label: {
|
|
311
|
+
en: 'Content'
|
|
312
|
+
},
|
|
313
|
+
setting: {
|
|
314
|
+
id: 'title'
|
|
315
|
+
},
|
|
316
|
+
layout: 'vertical'
|
|
317
|
+
}
|
|
318
|
+
]
|
|
316
319
|
}
|
|
317
320
|
]
|
|
318
321
|
},
|
|
@@ -320,10 +323,6 @@ const SettingUIV2 = [
|
|
|
320
323
|
label: {
|
|
321
324
|
en: 'Optimize LCP'
|
|
322
325
|
},
|
|
323
|
-
messageConfig: {
|
|
324
|
-
type: 'info',
|
|
325
|
-
message: 'You can optimize image size with our partnered app'
|
|
326
|
-
},
|
|
327
326
|
controls: [
|
|
328
327
|
{
|
|
329
328
|
label: {
|
|
@@ -366,7 +365,7 @@ const SettingUIV2 = [
|
|
|
366
365
|
options: {
|
|
367
366
|
labelVariant: 'primary',
|
|
368
367
|
fullWidth: true,
|
|
369
|
-
disableMessage: `
|
|
368
|
+
disableMessage: `This option is disabled because the width is set to 100%`
|
|
370
369
|
}
|
|
371
370
|
}
|
|
372
371
|
]
|
|
@@ -17,8 +17,9 @@ const useCompareImage = ({ props, aspectRatio })=>{
|
|
|
17
17
|
const leftImageRef = useRef(null);
|
|
18
18
|
const { onListener, saveToElementInteractionData } = useInteraction();
|
|
19
19
|
const ref = useRef(null);
|
|
20
|
-
const memoAspectRatio = useMemo(()=>aspectRatio, [
|
|
21
|
-
aspectRatio
|
|
20
|
+
const memoAspectRatio = useMemo(()=>aspectRatio || styles?.aspectRatio, [
|
|
21
|
+
aspectRatio,
|
|
22
|
+
styles?.aspectRatio
|
|
22
23
|
]);
|
|
23
24
|
useEffect(()=>{
|
|
24
25
|
const selector = `[data-id="${props?.componentUid}"]`;
|
|
@@ -30,6 +30,9 @@ const ImageComparisonSettings = [
|
|
|
30
30
|
src: 'https://ucarecdn.com/f22eb586-02bc-4c17-910f-6435af22301b/-/format/auto/',
|
|
31
31
|
width: 900,
|
|
32
32
|
height: 600
|
|
33
|
+
},
|
|
34
|
+
hiddenSetting: {
|
|
35
|
+
seo: true
|
|
33
36
|
}
|
|
34
37
|
}
|
|
35
38
|
]
|
|
@@ -46,6 +49,9 @@ const ImageComparisonSettings = [
|
|
|
46
49
|
src: 'https://ucarecdn.com/45dae4ae-3e07-40d9-a22c-4032c1c817d6/-/format/auto/',
|
|
47
50
|
width: 900,
|
|
48
51
|
height: 600
|
|
52
|
+
},
|
|
53
|
+
hiddenSetting: {
|
|
54
|
+
seo: true
|
|
49
55
|
}
|
|
50
56
|
}
|
|
51
57
|
]
|
|
@@ -501,21 +507,21 @@ const ImageComparisonSettings = [
|
|
|
501
507
|
},
|
|
502
508
|
{
|
|
503
509
|
id: 'imageScale',
|
|
504
|
-
type: '
|
|
505
|
-
iconViewBox: '0 0 66 48',
|
|
506
|
-
enableItemBackground: true,
|
|
510
|
+
type: 'option:illustration',
|
|
507
511
|
enableTooltip: true,
|
|
508
512
|
label: 'Image scale',
|
|
509
513
|
options: [
|
|
510
514
|
{
|
|
511
515
|
label: 'Fill image',
|
|
512
516
|
value: 'cover',
|
|
513
|
-
type: 'image'
|
|
517
|
+
type: 'image',
|
|
518
|
+
svgName: 'gp-image-cover'
|
|
514
519
|
},
|
|
515
520
|
{
|
|
516
521
|
label: 'Fit image',
|
|
517
522
|
value: 'contain',
|
|
518
|
-
type: 'image'
|
|
523
|
+
type: 'image',
|
|
524
|
+
svgName: 'gp-image-contain'
|
|
519
525
|
}
|
|
520
526
|
],
|
|
521
527
|
devices: {
|
|
@@ -181,6 +181,13 @@ const ProductViewMoreSettings = [
|
|
|
181
181
|
desktop: {
|
|
182
182
|
default: {
|
|
183
183
|
normal: {
|
|
184
|
+
size: 'cover',
|
|
185
|
+
position: {
|
|
186
|
+
x: 50,
|
|
187
|
+
y: 50
|
|
188
|
+
},
|
|
189
|
+
repeat: 'no-repeat',
|
|
190
|
+
attachment: 'scroll',
|
|
184
191
|
image: {
|
|
185
192
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
186
193
|
width: 1200,
|
|
@@ -188,6 +195,13 @@ const ProductViewMoreSettings = [
|
|
|
188
195
|
}
|
|
189
196
|
},
|
|
190
197
|
hover: {
|
|
198
|
+
size: 'cover',
|
|
199
|
+
position: {
|
|
200
|
+
x: 50,
|
|
201
|
+
y: 50
|
|
202
|
+
},
|
|
203
|
+
repeat: 'no-repeat',
|
|
204
|
+
attachment: 'scroll',
|
|
191
205
|
image: {
|
|
192
206
|
src: 'https://ucarecdn.com/06075225-af9e-460c-8e3c-6be63c0b773a/-/format/auto/',
|
|
193
207
|
width: 1200,
|