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