@gem-sdk/components 2.0.0-dev.383 → 2.0.0-dev.385
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/grid/row/commons/getStyle.js +8 -3
- package/dist/cjs/grid/section/setting/Section.js +4 -4
- package/dist/cjs/grid/section/setting/configs/settings.js +3 -3
- package/dist/cjs/grid/section/setting/configs/uiV2.js +9 -16
- package/dist/cjs/icon-list-hoz/components/common/getStyle.js +5 -0
- package/dist/cjs/icon-list-hoz/setting/configs/settings.js +1 -1
- package/dist/cjs/icon-list-hoz/setting/configs/uiV2.js +44 -0
- package/dist/esm/grid/row/commons/getStyle.js +8 -3
- package/dist/esm/grid/section/setting/Section.js +4 -4
- package/dist/esm/grid/section/setting/configs/settings.js +3 -3
- package/dist/esm/grid/section/setting/configs/uiV2.js +9 -16
- package/dist/esm/icon-list-hoz/components/common/getStyle.js +6 -1
- package/dist/esm/icon-list-hoz/setting/configs/settings.js +1 -1
- package/dist/esm/icon-list-hoz/setting/configs/uiV2.js +44 -0
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ var helpers = require('./helpers.js');
|
|
|
9
9
|
const getRowStyle = (rowProps)=>{
|
|
10
10
|
const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
|
|
11
11
|
const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
|
|
12
|
-
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile } = styles ?? {};
|
|
12
|
+
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
13
13
|
const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
|
|
14
14
|
const overFlowStyle = core.makeStyleResponsive('of', {
|
|
15
15
|
desktop: innerRadius.desktop ? 'hidden' : undefined,
|
|
@@ -91,11 +91,16 @@ const getRowStyle = (rowProps)=>{
|
|
|
91
91
|
transform: 'translateY(-50%)',
|
|
92
92
|
top: '50%'
|
|
93
93
|
});
|
|
94
|
+
const sectionPagePaddingStyle = {
|
|
95
|
+
desktop: enablePagePadding?.desktop ? 'var(--g-ct-p, 15px)' : undefined,
|
|
96
|
+
tablet: enablePagePadding?.tablet ? 'var(--g-ct-p, 15px)' : undefined,
|
|
97
|
+
mobile: enablePagePadding?.mobile ? 'var(--g-ct-p, 15px)' : undefined
|
|
98
|
+
};
|
|
94
99
|
const sectionStyle = system.createStyle({
|
|
95
100
|
...wrapStyle,
|
|
96
101
|
...core.makeStyleResponsive('w', sizeStyles.wrapper),
|
|
97
|
-
...core.makeStyleResponsive('pl',
|
|
98
|
-
...core.makeStyleResponsive('pr',
|
|
102
|
+
...core.makeStyleResponsive('pl', sectionPagePaddingStyle),
|
|
103
|
+
...core.makeStyleResponsive('pr', sectionPagePaddingStyle)
|
|
99
104
|
});
|
|
100
105
|
return {
|
|
101
106
|
embedVideoStyle,
|
|
@@ -146,8 +146,8 @@ const SectionSettings = [
|
|
|
146
146
|
id: 'style',
|
|
147
147
|
controls: [
|
|
148
148
|
{
|
|
149
|
-
id: '
|
|
150
|
-
label: '
|
|
149
|
+
id: 'enablePagePadding',
|
|
150
|
+
label: 'Page padding',
|
|
151
151
|
type: 'toggle',
|
|
152
152
|
devices: {
|
|
153
153
|
desktop: {
|
|
@@ -174,7 +174,7 @@ const SectionSettings = [
|
|
|
174
174
|
isRowWith: true,
|
|
175
175
|
devices: {
|
|
176
176
|
desktop: {
|
|
177
|
-
default: '
|
|
177
|
+
default: '100%'
|
|
178
178
|
}
|
|
179
179
|
},
|
|
180
180
|
displayOptions: [
|
|
@@ -7,10 +7,7 @@ const SettingUIV2 = [
|
|
|
7
7
|
setting: {
|
|
8
8
|
id: 'layout'
|
|
9
9
|
},
|
|
10
|
-
layout: 'vertical'
|
|
11
|
-
options: {
|
|
12
|
-
fullWidth: true
|
|
13
|
-
}
|
|
10
|
+
layout: 'vertical'
|
|
14
11
|
},
|
|
15
12
|
{
|
|
16
13
|
label: {
|
|
@@ -19,9 +16,6 @@ const SettingUIV2 = [
|
|
|
19
16
|
setting: {
|
|
20
17
|
id: 'columnGap'
|
|
21
18
|
},
|
|
22
|
-
options: {
|
|
23
|
-
fullWidth: true
|
|
24
|
-
},
|
|
25
19
|
conditionDisplay: `pageType == "POST_PURCHASE"`,
|
|
26
20
|
conditionEnable: '!!layout.cols && layout.cols.length > 1'
|
|
27
21
|
}
|
|
@@ -88,17 +82,8 @@ const SettingUIV2 = [
|
|
|
88
82
|
en: 'Size'
|
|
89
83
|
},
|
|
90
84
|
controls: [
|
|
91
|
-
{
|
|
92
|
-
setting: {
|
|
93
|
-
id: 'fullWidth'
|
|
94
|
-
},
|
|
95
|
-
label: {
|
|
96
|
-
en: 'Full Width'
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
85
|
{
|
|
100
86
|
id: 'Width',
|
|
101
|
-
conditionDisplay: 'fullWidth !== true',
|
|
102
87
|
setting: {
|
|
103
88
|
id: 'width'
|
|
104
89
|
},
|
|
@@ -136,6 +121,14 @@ const SettingUIV2 = [
|
|
|
136
121
|
}
|
|
137
122
|
}
|
|
138
123
|
}
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
setting: {
|
|
127
|
+
id: 'enablePagePadding'
|
|
128
|
+
},
|
|
129
|
+
label: {
|
|
130
|
+
en: 'Page padding'
|
|
131
|
+
}
|
|
139
132
|
}
|
|
140
133
|
]
|
|
141
134
|
},
|
|
@@ -10,6 +10,11 @@ const getWrapperStyle = (style, background)=>{
|
|
|
10
10
|
...style,
|
|
11
11
|
...core.getStyleBackgroundByDevice(background, {
|
|
12
12
|
liquid: true
|
|
13
|
+
}),
|
|
14
|
+
...core.getGradientBgrStyleByDevice(background, {
|
|
15
|
+
desktop: true,
|
|
16
|
+
tablet: true,
|
|
17
|
+
mobile: true
|
|
13
18
|
})
|
|
14
19
|
};
|
|
15
20
|
return filterTruthyStyles(composeStyles);
|
|
@@ -79,6 +79,50 @@ const SettingUIV2 = [
|
|
|
79
79
|
setting: {
|
|
80
80
|
id: 'boxShadow',
|
|
81
81
|
state: 'normal'
|
|
82
|
+
},
|
|
83
|
+
options: {
|
|
84
|
+
updateFields: [
|
|
85
|
+
{
|
|
86
|
+
field: 'enable',
|
|
87
|
+
settingId: 'advanced.hasBoxShadow',
|
|
88
|
+
state: 'normal'
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
},
|
|
92
|
+
controlChangeTrigger: {
|
|
93
|
+
settings: [
|
|
94
|
+
{
|
|
95
|
+
condition: `boxShadow.normal.enable === true`,
|
|
96
|
+
source: [
|
|
97
|
+
'boxShadow',
|
|
98
|
+
'hasBoxShadow'
|
|
99
|
+
],
|
|
100
|
+
action: {
|
|
101
|
+
controlId: 'hasBoxShadow',
|
|
102
|
+
groupType: 'advanced',
|
|
103
|
+
controlType: 'advanced',
|
|
104
|
+
state: 'normal',
|
|
105
|
+
newValue: true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
condition: `boxShadow.normal.enable === false`,
|
|
110
|
+
source: [
|
|
111
|
+
'boxShadow',
|
|
112
|
+
'hasBoxShadow'
|
|
113
|
+
],
|
|
114
|
+
action: {
|
|
115
|
+
controlId: 'hasBoxShadow',
|
|
116
|
+
groupType: 'advanced',
|
|
117
|
+
controlType: 'advanced',
|
|
118
|
+
state: 'normal',
|
|
119
|
+
newValue: false
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
options: {
|
|
124
|
+
noRecordHistory: true
|
|
125
|
+
}
|
|
82
126
|
}
|
|
83
127
|
}
|
|
84
128
|
]
|
|
@@ -7,7 +7,7 @@ import { createStyleObject } from './helpers.js';
|
|
|
7
7
|
const getRowStyle = (rowProps)=>{
|
|
8
8
|
const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
|
|
9
9
|
const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
|
|
10
|
-
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile } = styles ?? {};
|
|
10
|
+
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
11
11
|
const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
|
|
12
12
|
const overFlowStyle = makeStyleResponsive('of', {
|
|
13
13
|
desktop: innerRadius.desktop ? 'hidden' : undefined,
|
|
@@ -89,11 +89,16 @@ const getRowStyle = (rowProps)=>{
|
|
|
89
89
|
transform: 'translateY(-50%)',
|
|
90
90
|
top: '50%'
|
|
91
91
|
});
|
|
92
|
+
const sectionPagePaddingStyle = {
|
|
93
|
+
desktop: enablePagePadding?.desktop ? 'var(--g-ct-p, 15px)' : undefined,
|
|
94
|
+
tablet: enablePagePadding?.tablet ? 'var(--g-ct-p, 15px)' : undefined,
|
|
95
|
+
mobile: enablePagePadding?.mobile ? 'var(--g-ct-p, 15px)' : undefined
|
|
96
|
+
};
|
|
92
97
|
const sectionStyle = createStyle({
|
|
93
98
|
...wrapStyle,
|
|
94
99
|
...makeStyleResponsive('w', sizeStyles.wrapper),
|
|
95
|
-
...makeStyleResponsive('pl',
|
|
96
|
-
...makeStyleResponsive('pr',
|
|
100
|
+
...makeStyleResponsive('pl', sectionPagePaddingStyle),
|
|
101
|
+
...makeStyleResponsive('pr', sectionPagePaddingStyle)
|
|
97
102
|
});
|
|
98
103
|
return {
|
|
99
104
|
embedVideoStyle,
|
|
@@ -144,8 +144,8 @@ const SectionSettings = [
|
|
|
144
144
|
id: 'style',
|
|
145
145
|
controls: [
|
|
146
146
|
{
|
|
147
|
-
id: '
|
|
148
|
-
label: '
|
|
147
|
+
id: 'enablePagePadding',
|
|
148
|
+
label: 'Page padding',
|
|
149
149
|
type: 'toggle',
|
|
150
150
|
devices: {
|
|
151
151
|
desktop: {
|
|
@@ -172,7 +172,7 @@ const SectionSettings = [
|
|
|
172
172
|
isRowWith: true,
|
|
173
173
|
devices: {
|
|
174
174
|
desktop: {
|
|
175
|
-
default: '
|
|
175
|
+
default: '100%'
|
|
176
176
|
}
|
|
177
177
|
},
|
|
178
178
|
displayOptions: [
|
|
@@ -5,10 +5,7 @@ const SettingUIV2 = [
|
|
|
5
5
|
setting: {
|
|
6
6
|
id: 'layout'
|
|
7
7
|
},
|
|
8
|
-
layout: 'vertical'
|
|
9
|
-
options: {
|
|
10
|
-
fullWidth: true
|
|
11
|
-
}
|
|
8
|
+
layout: 'vertical'
|
|
12
9
|
},
|
|
13
10
|
{
|
|
14
11
|
label: {
|
|
@@ -17,9 +14,6 @@ const SettingUIV2 = [
|
|
|
17
14
|
setting: {
|
|
18
15
|
id: 'columnGap'
|
|
19
16
|
},
|
|
20
|
-
options: {
|
|
21
|
-
fullWidth: true
|
|
22
|
-
},
|
|
23
17
|
conditionDisplay: `pageType == "POST_PURCHASE"`,
|
|
24
18
|
conditionEnable: '!!layout.cols && layout.cols.length > 1'
|
|
25
19
|
}
|
|
@@ -86,17 +80,8 @@ const SettingUIV2 = [
|
|
|
86
80
|
en: 'Size'
|
|
87
81
|
},
|
|
88
82
|
controls: [
|
|
89
|
-
{
|
|
90
|
-
setting: {
|
|
91
|
-
id: 'fullWidth'
|
|
92
|
-
},
|
|
93
|
-
label: {
|
|
94
|
-
en: 'Full Width'
|
|
95
|
-
}
|
|
96
|
-
},
|
|
97
83
|
{
|
|
98
84
|
id: 'Width',
|
|
99
|
-
conditionDisplay: 'fullWidth !== true',
|
|
100
85
|
setting: {
|
|
101
86
|
id: 'width'
|
|
102
87
|
},
|
|
@@ -134,6 +119,14 @@ const SettingUIV2 = [
|
|
|
134
119
|
}
|
|
135
120
|
}
|
|
136
121
|
}
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
setting: {
|
|
125
|
+
id: 'enablePagePadding'
|
|
126
|
+
},
|
|
127
|
+
label: {
|
|
128
|
+
en: 'Page padding'
|
|
129
|
+
}
|
|
137
130
|
}
|
|
138
131
|
]
|
|
139
132
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getStyleBackgroundByDevice, makeStyle, makeStyleResponsive } from '@gem-sdk/core';
|
|
1
|
+
import { getStyleBackgroundByDevice, getGradientBgrStyleByDevice, makeStyle, makeStyleResponsive } from '@gem-sdk/core';
|
|
2
2
|
|
|
3
3
|
function filterTruthyStyles(styles) {
|
|
4
4
|
return Object.fromEntries(Object.entries(styles || {}).filter(([, value])=>!!value));
|
|
@@ -8,6 +8,11 @@ const getWrapperStyle = (style, background)=>{
|
|
|
8
8
|
...style,
|
|
9
9
|
...getStyleBackgroundByDevice(background, {
|
|
10
10
|
liquid: true
|
|
11
|
+
}),
|
|
12
|
+
...getGradientBgrStyleByDevice(background, {
|
|
13
|
+
desktop: true,
|
|
14
|
+
tablet: true,
|
|
15
|
+
mobile: true
|
|
11
16
|
})
|
|
12
17
|
};
|
|
13
18
|
return filterTruthyStyles(composeStyles);
|
|
@@ -77,6 +77,50 @@ const SettingUIV2 = [
|
|
|
77
77
|
setting: {
|
|
78
78
|
id: 'boxShadow',
|
|
79
79
|
state: 'normal'
|
|
80
|
+
},
|
|
81
|
+
options: {
|
|
82
|
+
updateFields: [
|
|
83
|
+
{
|
|
84
|
+
field: 'enable',
|
|
85
|
+
settingId: 'advanced.hasBoxShadow',
|
|
86
|
+
state: 'normal'
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
controlChangeTrigger: {
|
|
91
|
+
settings: [
|
|
92
|
+
{
|
|
93
|
+
condition: `boxShadow.normal.enable === true`,
|
|
94
|
+
source: [
|
|
95
|
+
'boxShadow',
|
|
96
|
+
'hasBoxShadow'
|
|
97
|
+
],
|
|
98
|
+
action: {
|
|
99
|
+
controlId: 'hasBoxShadow',
|
|
100
|
+
groupType: 'advanced',
|
|
101
|
+
controlType: 'advanced',
|
|
102
|
+
state: 'normal',
|
|
103
|
+
newValue: true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
condition: `boxShadow.normal.enable === false`,
|
|
108
|
+
source: [
|
|
109
|
+
'boxShadow',
|
|
110
|
+
'hasBoxShadow'
|
|
111
|
+
],
|
|
112
|
+
action: {
|
|
113
|
+
controlId: 'hasBoxShadow',
|
|
114
|
+
groupType: 'advanced',
|
|
115
|
+
controlType: 'advanced',
|
|
116
|
+
state: 'normal',
|
|
117
|
+
newValue: false
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
options: {
|
|
122
|
+
noRecordHistory: true
|
|
123
|
+
}
|
|
80
124
|
}
|
|
81
125
|
}
|
|
82
126
|
]
|
package/dist/types/index.d.ts
CHANGED
|
@@ -488,6 +488,7 @@ type RowSettingsType = {
|
|
|
488
488
|
sameHeightSubgridContainer?: boolean;
|
|
489
489
|
};
|
|
490
490
|
type RowStylesType = {
|
|
491
|
+
enablePagePadding?: ObjectDevices$1<boolean>;
|
|
491
492
|
fullWidth?: ObjectDevices$1<boolean>;
|
|
492
493
|
width?: ObjectDevices$1<string>;
|
|
493
494
|
preloadBgImage?: boolean;
|