@gem-sdk/components 2.0.0-dev.398 → 2.0.0-dev.400
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/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/cjs/product/setting/product-properties/configs/uiV2.js +24 -2
- package/dist/esm/grid/row/commons/getStyle.js +4 -2
- 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/esm/product/setting/product-properties/configs/uiV2.js +24 -2
- 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
|
};
|
|
@@ -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
|
},
|
|
@@ -10,7 +10,27 @@ const SettingUIV2 = [
|
|
|
10
10
|
setting: {
|
|
11
11
|
id: 'type'
|
|
12
12
|
},
|
|
13
|
-
layout: 'vertical'
|
|
13
|
+
layout: 'vertical',
|
|
14
|
+
controlChangeTrigger: {
|
|
15
|
+
settings: [
|
|
16
|
+
{
|
|
17
|
+
action: {
|
|
18
|
+
controlId: 'required',
|
|
19
|
+
newValue: false,
|
|
20
|
+
groupType: 'setting',
|
|
21
|
+
controlType: 'style'
|
|
22
|
+
},
|
|
23
|
+
condition: `type === 'hidden'`,
|
|
24
|
+
source: [
|
|
25
|
+
'required',
|
|
26
|
+
'type'
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
options: {
|
|
31
|
+
noRecordHistory: true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
14
34
|
}
|
|
15
35
|
]
|
|
16
36
|
},
|
|
@@ -751,6 +771,8 @@ const SettingUIV2 = [
|
|
|
751
771
|
type: 'combo',
|
|
752
772
|
isHideClear: true,
|
|
753
773
|
conditionDisplay: 'type === "hidden"',
|
|
774
|
+
iconName: 'polaris-text-block',
|
|
775
|
+
getValueFromSettingID: 'valueHidden',
|
|
754
776
|
controls: [
|
|
755
777
|
{
|
|
756
778
|
setting: {
|
|
@@ -766,7 +788,7 @@ const SettingUIV2 = [
|
|
|
766
788
|
label: {
|
|
767
789
|
en: 'Error message'
|
|
768
790
|
},
|
|
769
|
-
conditionDisplay: 'type
|
|
791
|
+
conditionDisplay: '["text", "textarea", "email"].includes(type) || (["checkbox", "radio", "dropdown"].includes(type) && required)',
|
|
770
792
|
controls: [
|
|
771
793
|
{
|
|
772
794
|
type: 'combo',
|
|
@@ -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
|
};
|
|
@@ -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
|
},
|
|
@@ -8,7 +8,27 @@ const SettingUIV2 = [
|
|
|
8
8
|
setting: {
|
|
9
9
|
id: 'type'
|
|
10
10
|
},
|
|
11
|
-
layout: 'vertical'
|
|
11
|
+
layout: 'vertical',
|
|
12
|
+
controlChangeTrigger: {
|
|
13
|
+
settings: [
|
|
14
|
+
{
|
|
15
|
+
action: {
|
|
16
|
+
controlId: 'required',
|
|
17
|
+
newValue: false,
|
|
18
|
+
groupType: 'setting',
|
|
19
|
+
controlType: 'style'
|
|
20
|
+
},
|
|
21
|
+
condition: `type === 'hidden'`,
|
|
22
|
+
source: [
|
|
23
|
+
'required',
|
|
24
|
+
'type'
|
|
25
|
+
]
|
|
26
|
+
}
|
|
27
|
+
],
|
|
28
|
+
options: {
|
|
29
|
+
noRecordHistory: true
|
|
30
|
+
}
|
|
31
|
+
}
|
|
12
32
|
}
|
|
13
33
|
]
|
|
14
34
|
},
|
|
@@ -749,6 +769,8 @@ const SettingUIV2 = [
|
|
|
749
769
|
type: 'combo',
|
|
750
770
|
isHideClear: true,
|
|
751
771
|
conditionDisplay: 'type === "hidden"',
|
|
772
|
+
iconName: 'polaris-text-block',
|
|
773
|
+
getValueFromSettingID: 'valueHidden',
|
|
752
774
|
controls: [
|
|
753
775
|
{
|
|
754
776
|
setting: {
|
|
@@ -764,7 +786,7 @@ const SettingUIV2 = [
|
|
|
764
786
|
label: {
|
|
765
787
|
en: 'Error message'
|
|
766
788
|
},
|
|
767
|
-
conditionDisplay: 'type
|
|
789
|
+
conditionDisplay: '["text", "textarea", "email"].includes(type) || (["checkbox", "radio", "dropdown"].includes(type) && required)',
|
|
768
790
|
controls: [
|
|
769
791
|
{
|
|
770
792
|
type: 'combo',
|
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>;
|