@gem-sdk/components 2.0.0-dev.399 → 2.0.0-dev.401
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 +4 -2
- package/dist/cjs/grid/row/setting/configs/settings.js +7 -7
- package/dist/cjs/post-purchase/product/settings/product-offer/index.js +7 -0
- package/dist/cjs/post-purchase/product/settings/product-offer/ui/uiV2.js +19 -1
- package/dist/esm/grid/row/commons/getStyle.js +4 -2
- package/dist/esm/grid/row/setting/configs/settings.js +7 -7
- package/dist/esm/post-purchase/product/settings/product-offer/index.js +7 -0
- package/dist/esm/post-purchase/product/settings/product-offer/ui/uiV2.js +19 -1
- package/dist/types/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,11 +5,12 @@ var core = require('@gem-sdk/core');
|
|
|
5
5
|
var getInnerRadius = require('./getInnerRadius.js');
|
|
6
6
|
var system = require('@gem-sdk/system');
|
|
7
7
|
var helpers = require('./helpers.js');
|
|
8
|
+
var helper = require('../../../post-purchase/utils/helper.js');
|
|
8
9
|
|
|
9
10
|
const getRowStyle = (rowProps)=>{
|
|
10
11
|
const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
|
|
11
12
|
const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
|
|
12
|
-
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
13
|
+
const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
13
14
|
const innerRadius = getInnerRadius.getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
|
|
14
15
|
const overFlowStyle = core.makeStyleResponsive('of', {
|
|
15
16
|
desktop: innerRadius.desktop ? 'hidden' : undefined,
|
|
@@ -48,7 +49,8 @@ const getRowStyle = (rowProps)=>{
|
|
|
48
49
|
'--mt': '0px',
|
|
49
50
|
...core.makeStyleResponsive('cg', columnGap),
|
|
50
51
|
...core.makeStyle({
|
|
51
|
-
pc: inlineAlignment
|
|
52
|
+
pc: inlineAlignment,
|
|
53
|
+
rg: rowGap ? helper.postPurchaseViewSpacing[rowGap] : '0px'
|
|
52
54
|
})
|
|
53
55
|
};
|
|
54
56
|
};
|
|
@@ -175,13 +175,13 @@ const RowSettings = [
|
|
|
175
175
|
},
|
|
176
176
|
displayOptions: [
|
|
177
177
|
{
|
|
178
|
-
label: '
|
|
179
|
-
value: '
|
|
178
|
+
label: 'Default',
|
|
179
|
+
value: 'default',
|
|
180
180
|
showValue: true
|
|
181
181
|
},
|
|
182
182
|
{
|
|
183
|
-
label: '
|
|
184
|
-
value: '
|
|
183
|
+
label: 'Full',
|
|
184
|
+
value: '100%',
|
|
185
185
|
showValue: true
|
|
186
186
|
}
|
|
187
187
|
]
|
|
@@ -193,7 +193,7 @@ const RowSettings = [
|
|
|
193
193
|
'px'
|
|
194
194
|
],
|
|
195
195
|
min: 0,
|
|
196
|
-
max:
|
|
196
|
+
max: 120,
|
|
197
197
|
devices: {
|
|
198
198
|
desktop: {
|
|
199
199
|
default: '16px'
|
|
@@ -207,7 +207,7 @@ const RowSettings = [
|
|
|
207
207
|
'px'
|
|
208
208
|
],
|
|
209
209
|
min: 0,
|
|
210
|
-
max:
|
|
210
|
+
max: 120,
|
|
211
211
|
devices: {
|
|
212
212
|
desktop: {
|
|
213
213
|
default: '0px'
|
|
@@ -218,7 +218,7 @@ const RowSettings = [
|
|
|
218
218
|
id: 'columnGap',
|
|
219
219
|
type: 'input:slider',
|
|
220
220
|
min: 0,
|
|
221
|
-
max:
|
|
221
|
+
max: 120,
|
|
222
222
|
step: 1,
|
|
223
223
|
units: [
|
|
224
224
|
'%'
|
|
@@ -312,6 +312,13 @@ const config = {
|
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
},
|
|
315
|
+
{
|
|
316
|
+
type: 'select',
|
|
317
|
+
label: 'Spacing',
|
|
318
|
+
id: 'rowGap',
|
|
319
|
+
options: constants.postPurchaseViewSpacing,
|
|
320
|
+
default: 'base'
|
|
321
|
+
},
|
|
315
322
|
{
|
|
316
323
|
id: 'productOfferColumnGap',
|
|
317
324
|
type: 'input:slider',
|
|
@@ -43,7 +43,25 @@ const ProductOfferSettingUIV2 = [
|
|
|
43
43
|
},
|
|
44
44
|
setting: {
|
|
45
45
|
id: 'columnGap'
|
|
46
|
-
}
|
|
46
|
+
},
|
|
47
|
+
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
label: {
|
|
53
|
+
en: 'Column spacing'
|
|
54
|
+
},
|
|
55
|
+
controls: [
|
|
56
|
+
{
|
|
57
|
+
type: 'control',
|
|
58
|
+
label: {
|
|
59
|
+
en: 'Gap'
|
|
60
|
+
},
|
|
61
|
+
setting: {
|
|
62
|
+
id: 'rowGap'
|
|
63
|
+
},
|
|
64
|
+
conditionDisplay: `!!layout.cols && layout.cols.length == 1`
|
|
47
65
|
}
|
|
48
66
|
]
|
|
49
67
|
},
|
|
@@ -3,11 +3,12 @@ import { makeStyleResponsive, isEmptyChildren, splitStyle, composeRadius, compos
|
|
|
3
3
|
import { getInnerRadiusExcludeBorder } from './getInnerRadius.js';
|
|
4
4
|
import { createStyle } from '@gem-sdk/system';
|
|
5
5
|
import { createStyleObject } from './helpers.js';
|
|
6
|
+
import { postPurchaseViewSpacing } from '../../../post-purchase/utils/helper.js';
|
|
6
7
|
|
|
7
8
|
const getRowStyle = (rowProps)=>{
|
|
8
9
|
const { children, setting, builderProps, styles, style, advanced, isNotFullWidth } = rowProps;
|
|
9
10
|
const { isSection, layout, horizontalAlign, responsive, inlineAlignment } = setting ?? {};
|
|
10
|
-
const { width, columnGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
11
|
+
const { width, columnGap, rowGap, fullWidth, background, verticalGutter, verticalGutterMobile, enablePagePadding } = styles ?? {};
|
|
11
12
|
const innerRadius = getInnerRadiusExcludeBorder(advanced?.border, advanced?.rounded);
|
|
12
13
|
const overFlowStyle = makeStyleResponsive('of', {
|
|
13
14
|
desktop: innerRadius.desktop ? 'hidden' : undefined,
|
|
@@ -46,7 +47,8 @@ const getRowStyle = (rowProps)=>{
|
|
|
46
47
|
'--mt': '0px',
|
|
47
48
|
...makeStyleResponsive('cg', columnGap),
|
|
48
49
|
...makeStyle({
|
|
49
|
-
pc: inlineAlignment
|
|
50
|
+
pc: inlineAlignment,
|
|
51
|
+
rg: rowGap ? postPurchaseViewSpacing[rowGap] : '0px'
|
|
50
52
|
})
|
|
51
53
|
};
|
|
52
54
|
};
|
|
@@ -173,13 +173,13 @@ const RowSettings = [
|
|
|
173
173
|
},
|
|
174
174
|
displayOptions: [
|
|
175
175
|
{
|
|
176
|
-
label: '
|
|
177
|
-
value: '
|
|
176
|
+
label: 'Default',
|
|
177
|
+
value: 'default',
|
|
178
178
|
showValue: true
|
|
179
179
|
},
|
|
180
180
|
{
|
|
181
|
-
label: '
|
|
182
|
-
value: '
|
|
181
|
+
label: 'Full',
|
|
182
|
+
value: '100%',
|
|
183
183
|
showValue: true
|
|
184
184
|
}
|
|
185
185
|
]
|
|
@@ -191,7 +191,7 @@ const RowSettings = [
|
|
|
191
191
|
'px'
|
|
192
192
|
],
|
|
193
193
|
min: 0,
|
|
194
|
-
max:
|
|
194
|
+
max: 120,
|
|
195
195
|
devices: {
|
|
196
196
|
desktop: {
|
|
197
197
|
default: '16px'
|
|
@@ -205,7 +205,7 @@ const RowSettings = [
|
|
|
205
205
|
'px'
|
|
206
206
|
],
|
|
207
207
|
min: 0,
|
|
208
|
-
max:
|
|
208
|
+
max: 120,
|
|
209
209
|
devices: {
|
|
210
210
|
desktop: {
|
|
211
211
|
default: '0px'
|
|
@@ -216,7 +216,7 @@ const RowSettings = [
|
|
|
216
216
|
id: 'columnGap',
|
|
217
217
|
type: 'input:slider',
|
|
218
218
|
min: 0,
|
|
219
|
-
max:
|
|
219
|
+
max: 120,
|
|
220
220
|
step: 1,
|
|
221
221
|
units: [
|
|
222
222
|
'%'
|
|
@@ -41,7 +41,25 @@ const ProductOfferSettingUIV2 = [
|
|
|
41
41
|
},
|
|
42
42
|
setting: {
|
|
43
43
|
id: 'columnGap'
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
conditionDisplay: `!!layout.cols && layout.cols.length > 1`
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
label: {
|
|
51
|
+
en: 'Column spacing'
|
|
52
|
+
},
|
|
53
|
+
controls: [
|
|
54
|
+
{
|
|
55
|
+
type: 'control',
|
|
56
|
+
label: {
|
|
57
|
+
en: 'Gap'
|
|
58
|
+
},
|
|
59
|
+
setting: {
|
|
60
|
+
id: 'rowGap'
|
|
61
|
+
},
|
|
62
|
+
conditionDisplay: `!!layout.cols && layout.cols.length == 1`
|
|
45
63
|
}
|
|
46
64
|
]
|
|
47
65
|
},
|
package/dist/types/index.d.ts
CHANGED
|
@@ -493,6 +493,7 @@ type RowStylesType = {
|
|
|
493
493
|
width?: ObjectDevices$1<string>;
|
|
494
494
|
preloadBgImage?: boolean;
|
|
495
495
|
columnGap?: ObjectDevices$1<string>;
|
|
496
|
+
rowGap?: string;
|
|
496
497
|
border?: ObjectDevices$1<StateProp<Border>>;
|
|
497
498
|
rounded?: ObjectDevices$1<StateProp<CornerRadius>>;
|
|
498
499
|
padding?: ObjectDevices$1<SizeSettingGlobal>;
|