@gem-sdk/components 2.0.0-dev.409 → 2.0.0-dev.410
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/banner/components/common/common.js +3 -3
- package/dist/cjs/banner/setting/setting.js +20 -2
- package/dist/cjs/banner/setting/uiV2.js +105 -1
- package/dist/esm/banner/components/common/common.js +3 -3
- package/dist/esm/banner/setting/setting.js +20 -2
- package/dist/esm/banner/setting/uiV2.js +105 -1
- package/package.json +1 -1
|
@@ -441,9 +441,9 @@ const getClassContentPosition = (positions)=>{
|
|
|
441
441
|
const tablet = positions.tablet || desktop;
|
|
442
442
|
const mobile = positions.mobile || tablet;
|
|
443
443
|
return {
|
|
444
|
-
[
|
|
445
|
-
[`tablet
|
|
446
|
-
[`mobile
|
|
444
|
+
[`gp-justify-${classMap[desktop || 'center']}`]: !!desktop,
|
|
445
|
+
[`tablet:gp-justify-${classMap[tablet || 'center']}`]: !!tablet,
|
|
446
|
+
[`mobile:gp-justify-${classMap[mobile || 'center']}`]: !!mobile
|
|
447
447
|
};
|
|
448
448
|
};
|
|
449
449
|
const getResponsiveSetting = (setting)=>{
|
|
@@ -269,12 +269,12 @@ const SettingsV2 = [
|
|
|
269
269
|
type: 'textarea',
|
|
270
270
|
minHeight: 100,
|
|
271
271
|
autoHeight: true,
|
|
272
|
-
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist
|
|
272
|
+
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist design'
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
id: 'title',
|
|
276
276
|
label: 'Image title',
|
|
277
|
-
info: '
|
|
277
|
+
info: 'E.g: White t-shirt',
|
|
278
278
|
type: 'input',
|
|
279
279
|
placeholder: 'E.g: White t-shirt'
|
|
280
280
|
}
|
|
@@ -722,6 +722,15 @@ const SettingsV2 = [
|
|
|
722
722
|
right: '16px',
|
|
723
723
|
linked: false
|
|
724
724
|
}
|
|
725
|
+
},
|
|
726
|
+
mobile: {
|
|
727
|
+
default: {
|
|
728
|
+
top: '16px',
|
|
729
|
+
left: '16px',
|
|
730
|
+
bottom: '16px',
|
|
731
|
+
right: '16px',
|
|
732
|
+
linked: false
|
|
733
|
+
}
|
|
725
734
|
}
|
|
726
735
|
},
|
|
727
736
|
compoDefaultValue: {
|
|
@@ -733,6 +742,15 @@ const SettingsV2 = [
|
|
|
733
742
|
right: '16px',
|
|
734
743
|
linked: false
|
|
735
744
|
}
|
|
745
|
+
},
|
|
746
|
+
mobile: {
|
|
747
|
+
default: {
|
|
748
|
+
top: '16px',
|
|
749
|
+
left: '16px',
|
|
750
|
+
bottom: '16px',
|
|
751
|
+
right: '16px',
|
|
752
|
+
linked: false
|
|
753
|
+
}
|
|
736
754
|
}
|
|
737
755
|
}
|
|
738
756
|
}
|
|
@@ -10,7 +10,86 @@ const SettingUIV2 = [
|
|
|
10
10
|
setting: {
|
|
11
11
|
id: 'layout'
|
|
12
12
|
},
|
|
13
|
-
layout: 'vertical'
|
|
13
|
+
layout: 'vertical',
|
|
14
|
+
controlChangeTrigger: {
|
|
15
|
+
settings: [
|
|
16
|
+
{
|
|
17
|
+
condition: `layout.cols.length == 1 && layout.type === 'center-top'`,
|
|
18
|
+
source: [
|
|
19
|
+
'layout'
|
|
20
|
+
],
|
|
21
|
+
action: {
|
|
22
|
+
controlId: 'contentPosition1Col',
|
|
23
|
+
groupType: 'style',
|
|
24
|
+
controlType: 'style',
|
|
25
|
+
newValue: 'top'
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
condition: `layout.cols.length == 1 && layout.type === 'center'`,
|
|
30
|
+
source: [
|
|
31
|
+
'layout'
|
|
32
|
+
],
|
|
33
|
+
action: {
|
|
34
|
+
controlId: 'contentPosition1Col',
|
|
35
|
+
groupType: 'style',
|
|
36
|
+
controlType: 'style',
|
|
37
|
+
newValue: 'center'
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
condition: `layout.cols.length == 1 && layout.type === 'center-bottom'`,
|
|
42
|
+
source: [
|
|
43
|
+
'layout'
|
|
44
|
+
],
|
|
45
|
+
action: {
|
|
46
|
+
controlId: 'contentPosition1Col',
|
|
47
|
+
groupType: 'style',
|
|
48
|
+
controlType: 'style',
|
|
49
|
+
newValue: 'bottom'
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')`,
|
|
54
|
+
source: [
|
|
55
|
+
'layout'
|
|
56
|
+
],
|
|
57
|
+
action: {
|
|
58
|
+
controlId: 'contentPosition2Col',
|
|
59
|
+
groupType: 'style',
|
|
60
|
+
controlType: 'style',
|
|
61
|
+
newValue: 'top'
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')`,
|
|
66
|
+
source: [
|
|
67
|
+
'layout'
|
|
68
|
+
],
|
|
69
|
+
action: {
|
|
70
|
+
controlId: 'contentPosition2Col',
|
|
71
|
+
groupType: 'style',
|
|
72
|
+
controlType: 'style',
|
|
73
|
+
newValue: 'center'
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')`,
|
|
78
|
+
source: [
|
|
79
|
+
'layout'
|
|
80
|
+
],
|
|
81
|
+
action: {
|
|
82
|
+
controlId: 'contentPosition2Col',
|
|
83
|
+
groupType: 'style',
|
|
84
|
+
controlType: 'style',
|
|
85
|
+
newValue: 'bottom'
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
],
|
|
89
|
+
options: {
|
|
90
|
+
noRecordHistory: true
|
|
91
|
+
}
|
|
92
|
+
}
|
|
14
93
|
}
|
|
15
94
|
]
|
|
16
95
|
},
|
|
@@ -259,6 +338,31 @@ const SettingUIV2 = [
|
|
|
259
338
|
}
|
|
260
339
|
]
|
|
261
340
|
},
|
|
341
|
+
{
|
|
342
|
+
label: {
|
|
343
|
+
en: 'SEO'
|
|
344
|
+
},
|
|
345
|
+
controls: [
|
|
346
|
+
{
|
|
347
|
+
type: 'control',
|
|
348
|
+
setting: {
|
|
349
|
+
id: 'alt'
|
|
350
|
+
},
|
|
351
|
+
label: {
|
|
352
|
+
en: 'Alt text'
|
|
353
|
+
}
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
type: 'control',
|
|
357
|
+
setting: {
|
|
358
|
+
id: 'title'
|
|
359
|
+
},
|
|
360
|
+
label: {
|
|
361
|
+
en: 'Image title'
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
]
|
|
365
|
+
},
|
|
262
366
|
{
|
|
263
367
|
controls: [
|
|
264
368
|
{
|
|
@@ -439,9 +439,9 @@ const getClassContentPosition = (positions)=>{
|
|
|
439
439
|
const tablet = positions.tablet || desktop;
|
|
440
440
|
const mobile = positions.mobile || tablet;
|
|
441
441
|
return {
|
|
442
|
-
[
|
|
443
|
-
[`tablet
|
|
444
|
-
[`mobile
|
|
442
|
+
[`gp-justify-${classMap[desktop || 'center']}`]: !!desktop,
|
|
443
|
+
[`tablet:gp-justify-${classMap[tablet || 'center']}`]: !!tablet,
|
|
444
|
+
[`mobile:gp-justify-${classMap[mobile || 'center']}`]: !!mobile
|
|
445
445
|
};
|
|
446
446
|
};
|
|
447
447
|
const getResponsiveSetting = (setting)=>{
|
|
@@ -267,12 +267,12 @@ const SettingsV2 = [
|
|
|
267
267
|
type: 'textarea',
|
|
268
268
|
minHeight: 100,
|
|
269
269
|
autoHeight: true,
|
|
270
|
-
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist
|
|
270
|
+
placeholder: 'E.g: Classic white crewneck t-shirt with minimalist design'
|
|
271
271
|
},
|
|
272
272
|
{
|
|
273
273
|
id: 'title',
|
|
274
274
|
label: 'Image title',
|
|
275
|
-
info: '
|
|
275
|
+
info: 'E.g: White t-shirt',
|
|
276
276
|
type: 'input',
|
|
277
277
|
placeholder: 'E.g: White t-shirt'
|
|
278
278
|
}
|
|
@@ -720,6 +720,15 @@ const SettingsV2 = [
|
|
|
720
720
|
right: '16px',
|
|
721
721
|
linked: false
|
|
722
722
|
}
|
|
723
|
+
},
|
|
724
|
+
mobile: {
|
|
725
|
+
default: {
|
|
726
|
+
top: '16px',
|
|
727
|
+
left: '16px',
|
|
728
|
+
bottom: '16px',
|
|
729
|
+
right: '16px',
|
|
730
|
+
linked: false
|
|
731
|
+
}
|
|
723
732
|
}
|
|
724
733
|
},
|
|
725
734
|
compoDefaultValue: {
|
|
@@ -731,6 +740,15 @@ const SettingsV2 = [
|
|
|
731
740
|
right: '16px',
|
|
732
741
|
linked: false
|
|
733
742
|
}
|
|
743
|
+
},
|
|
744
|
+
mobile: {
|
|
745
|
+
default: {
|
|
746
|
+
top: '16px',
|
|
747
|
+
left: '16px',
|
|
748
|
+
bottom: '16px',
|
|
749
|
+
right: '16px',
|
|
750
|
+
linked: false
|
|
751
|
+
}
|
|
734
752
|
}
|
|
735
753
|
}
|
|
736
754
|
}
|
|
@@ -8,7 +8,86 @@ const SettingUIV2 = [
|
|
|
8
8
|
setting: {
|
|
9
9
|
id: 'layout'
|
|
10
10
|
},
|
|
11
|
-
layout: 'vertical'
|
|
11
|
+
layout: 'vertical',
|
|
12
|
+
controlChangeTrigger: {
|
|
13
|
+
settings: [
|
|
14
|
+
{
|
|
15
|
+
condition: `layout.cols.length == 1 && layout.type === 'center-top'`,
|
|
16
|
+
source: [
|
|
17
|
+
'layout'
|
|
18
|
+
],
|
|
19
|
+
action: {
|
|
20
|
+
controlId: 'contentPosition1Col',
|
|
21
|
+
groupType: 'style',
|
|
22
|
+
controlType: 'style',
|
|
23
|
+
newValue: 'top'
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
condition: `layout.cols.length == 1 && layout.type === 'center'`,
|
|
28
|
+
source: [
|
|
29
|
+
'layout'
|
|
30
|
+
],
|
|
31
|
+
action: {
|
|
32
|
+
controlId: 'contentPosition1Col',
|
|
33
|
+
groupType: 'style',
|
|
34
|
+
controlType: 'style',
|
|
35
|
+
newValue: 'center'
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
condition: `layout.cols.length == 1 && layout.type === 'center-bottom'`,
|
|
40
|
+
source: [
|
|
41
|
+
'layout'
|
|
42
|
+
],
|
|
43
|
+
action: {
|
|
44
|
+
controlId: 'contentPosition1Col',
|
|
45
|
+
groupType: 'style',
|
|
46
|
+
controlType: 'style',
|
|
47
|
+
newValue: 'bottom'
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'left-top' || layout.type === 'right-top')`,
|
|
52
|
+
source: [
|
|
53
|
+
'layout'
|
|
54
|
+
],
|
|
55
|
+
action: {
|
|
56
|
+
controlId: 'contentPosition2Col',
|
|
57
|
+
groupType: 'style',
|
|
58
|
+
controlType: 'style',
|
|
59
|
+
newValue: 'top'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'right' || layout.type === 'left')`,
|
|
64
|
+
source: [
|
|
65
|
+
'layout'
|
|
66
|
+
],
|
|
67
|
+
action: {
|
|
68
|
+
controlId: 'contentPosition2Col',
|
|
69
|
+
groupType: 'style',
|
|
70
|
+
controlType: 'style',
|
|
71
|
+
newValue: 'center'
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
condition: `layout.cols.length > 1 && ( layout.type === 'left-bottom' || layout.type === 'right-bottom')`,
|
|
76
|
+
source: [
|
|
77
|
+
'layout'
|
|
78
|
+
],
|
|
79
|
+
action: {
|
|
80
|
+
controlId: 'contentPosition2Col',
|
|
81
|
+
groupType: 'style',
|
|
82
|
+
controlType: 'style',
|
|
83
|
+
newValue: 'bottom'
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
],
|
|
87
|
+
options: {
|
|
88
|
+
noRecordHistory: true
|
|
89
|
+
}
|
|
90
|
+
}
|
|
12
91
|
}
|
|
13
92
|
]
|
|
14
93
|
},
|
|
@@ -257,6 +336,31 @@ const SettingUIV2 = [
|
|
|
257
336
|
}
|
|
258
337
|
]
|
|
259
338
|
},
|
|
339
|
+
{
|
|
340
|
+
label: {
|
|
341
|
+
en: 'SEO'
|
|
342
|
+
},
|
|
343
|
+
controls: [
|
|
344
|
+
{
|
|
345
|
+
type: 'control',
|
|
346
|
+
setting: {
|
|
347
|
+
id: 'alt'
|
|
348
|
+
},
|
|
349
|
+
label: {
|
|
350
|
+
en: 'Alt text'
|
|
351
|
+
}
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
type: 'control',
|
|
355
|
+
setting: {
|
|
356
|
+
id: 'title'
|
|
357
|
+
},
|
|
358
|
+
label: {
|
|
359
|
+
en: 'Image title'
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
]
|
|
363
|
+
},
|
|
260
364
|
{
|
|
261
365
|
controls: [
|
|
262
366
|
{
|