pb-sxp-ui 1.0.2 → 1.0.3-alpha.1
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/index.cjs +1302 -688
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +28 -133
- package/dist/index.js +1302 -688
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -5
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +3 -5
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +1302 -688
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -5
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageCore/index.d.ts +1 -0
- package/es/core/components/SxpPageCore/index.js +2 -2
- package/es/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/es/core/components/SxpPageRender/ExpandableText.js +17 -10
- package/es/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/es/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/es/core/components/SxpPageRender/Modal/index.js +7 -4
- package/es/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/es/core/components/SxpPageRender/Nudge/index.js +13 -0
- package/es/core/components/SxpPageRender/PictureGroup/index.js +11 -7
- package/es/core/components/SxpPageRender/Popup/index.js +3 -3
- package/es/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +4 -3
- package/es/core/components/SxpPageRender/index.d.ts +20 -1
- package/es/core/components/SxpPageRender/index.js +19 -16
- package/es/core/components/SxpPageRender/typing.d.ts +1 -0
- package/es/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/es/core/components/SxpPageRender/useIconLink.js +8 -3
- package/es/core/context/EditorContext.d.ts +5 -0
- package/es/core/context/EditorContext.js +21 -3
- package/es/core/context/SxpDataSourceProvider.js +1 -1
- package/es/core/create.d.ts +1 -1
- package/es/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/es/materials/sxp/popup/CommodityDetail/index.js +44 -21
- package/es/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetail/settingRender.js +167 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +171 -0
- package/es/materials/sxp/popup/index.d.ts +0 -1
- package/es/materials/sxp/popup/index.js +0 -1
- package/es/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/es/materials/sxp/template/Appoint/index.js +4 -18
- package/es/materials/sxp/template/Appoint/material.js +22 -6
- package/es/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/es/materials/sxp/template/Commodity/index.js +5 -22
- package/es/materials/sxp/template/Commodity/material.js +31 -6
- package/es/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/es/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/es/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/Link/index.d.ts +2 -0
- package/es/materials/sxp/template/Link/index.js +4 -13
- package/es/materials/sxp/template/Link/material.js +22 -5
- package/es/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodity/index.js +8 -24
- package/es/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/es/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiro/index.js +8 -27
- package/es/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +8 -25
- package/es/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/es/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/es/materials/sxp/template/components/EventProvider.js +5 -4
- package/es/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/es/materials/sxp/template/components/settingRender.js +198 -0
- package/es/materials/sxp/template/components/typing.d.ts +6 -0
- package/es/materials/sxp/template/components/typing.js +1 -0
- package/lib/core/components/SxpPageCore/index.d.ts +1 -0
- package/lib/core/components/SxpPageCore/index.js +2 -2
- package/lib/core/components/SxpPageRender/ExpandableText.d.ts +1 -0
- package/lib/core/components/SxpPageRender/ExpandableText.js +17 -10
- package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -1
- package/lib/core/components/SxpPageRender/Modal/index.d.ts +2 -0
- package/lib/core/components/SxpPageRender/Modal/index.js +7 -4
- package/lib/core/components/SxpPageRender/Nudge/index.d.ts +24 -0
- package/lib/core/components/SxpPageRender/Nudge/index.js +16 -0
- package/lib/core/components/SxpPageRender/PictureGroup/index.js +10 -6
- package/lib/core/components/SxpPageRender/Popup/index.js +3 -3
- package/lib/core/components/SxpPageRender/VideoWidget/index.js +30 -21
- package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +3 -2
- package/lib/core/components/SxpPageRender/index.d.ts +20 -1
- package/lib/core/components/SxpPageRender/index.js +19 -16
- package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
- package/lib/core/components/SxpPageRender/useIconLink.d.ts +1 -1
- package/lib/core/components/SxpPageRender/useIconLink.js +8 -3
- package/lib/core/context/EditorContext.d.ts +5 -0
- package/lib/core/context/EditorContext.js +21 -3
- package/lib/core/context/SxpDataSourceProvider.js +1 -1
- package/lib/core/create.d.ts +1 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +20 -1
- package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -20
- package/lib/materials/sxp/popup/CommodityDetail/material.js +36 -1
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +169 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +13 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +20 -17
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +46 -1
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +134 -0
- package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +173 -0
- package/lib/materials/sxp/popup/index.d.ts +0 -1
- package/lib/materials/sxp/popup/index.js +0 -1
- package/lib/materials/sxp/template/Appoint/index.d.ts +2 -0
- package/lib/materials/sxp/template/Appoint/index.js +4 -18
- package/lib/materials/sxp/template/Appoint/material.js +22 -6
- package/lib/materials/sxp/template/Commodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/Commodity/index.js +5 -22
- package/lib/materials/sxp/template/Commodity/material.js +31 -6
- package/lib/materials/sxp/template/CommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiro/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiro/material.js +30 -5
- package/lib/materials/sxp/template/CommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/CommodityDiroNew/index.js +5 -24
- package/lib/materials/sxp/template/CommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/Link/index.d.ts +2 -0
- package/lib/materials/sxp/template/Link/index.js +4 -13
- package/lib/materials/sxp/template/Link/material.js +22 -5
- package/lib/materials/sxp/template/MultiCommodity/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodity/index.js +7 -23
- package/lib/materials/sxp/template/MultiCommodity/material.js +30 -5
- package/lib/materials/sxp/template/MultiCommodityDiro/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiro/index.js +7 -26
- package/lib/materials/sxp/template/MultiCommodityDiro/material.js +31 -6
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.d.ts +2 -0
- package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +7 -24
- package/lib/materials/sxp/template/MultiCommodityDiroNew/material.js +32 -6
- package/lib/materials/sxp/template/components/EventProvider.d.ts +2 -1
- package/lib/materials/sxp/template/components/EventProvider.js +4 -3
- package/lib/materials/sxp/template/components/settingRender.d.ts +108 -0
- package/lib/materials/sxp/template/components/settingRender.js +200 -0
- package/lib/materials/sxp/template/components/typing.d.ts +6 -0
- package/lib/materials/sxp/template/components/typing.js +2 -0
- package/package.json +1 -1
@@ -1,3 +1,4 @@
|
|
1
|
+
import settingRender from './settingRender';
|
1
2
|
import CommodityDetailDiroNewComponent from '.';
|
2
3
|
import { createMaterial } from '../../../../core/create';
|
3
4
|
const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
@@ -5,8 +6,52 @@ const CommodityDetailDiroNew = createMaterial(CommodityDetailDiroNewComponent, {
|
|
5
6
|
icon: '',
|
6
7
|
category: 'popup',
|
7
8
|
type: 'CommodityDetailDiroNew',
|
9
|
+
related: {
|
10
|
+
settingRender
|
11
|
+
},
|
8
12
|
defaulSetting: {
|
9
|
-
props: {
|
13
|
+
props: {
|
14
|
+
swiper: {
|
15
|
+
dotsAlign: 'left',
|
16
|
+
delay: 3
|
17
|
+
},
|
18
|
+
commodityStyles: {
|
19
|
+
price: {
|
20
|
+
color: '#000',
|
21
|
+
fontWeight: 'bold',
|
22
|
+
fontSize: 18
|
23
|
+
},
|
24
|
+
title: {
|
25
|
+
color: '#000',
|
26
|
+
fontSize: 13
|
27
|
+
},
|
28
|
+
collection: {
|
29
|
+
color: '#757575',
|
30
|
+
fontSize: 13
|
31
|
+
},
|
32
|
+
info: {
|
33
|
+
color: '#757575',
|
34
|
+
fontSize: 13
|
35
|
+
},
|
36
|
+
taxInfo: {
|
37
|
+
color: '#000',
|
38
|
+
fontWeight: 'bold',
|
39
|
+
fontSize: 13,
|
40
|
+
textAlign: 'right'
|
41
|
+
}
|
42
|
+
},
|
43
|
+
buttonStyle: {
|
44
|
+
backgroundColor: '#000',
|
45
|
+
fontSize: 12,
|
46
|
+
height: 52,
|
47
|
+
fontWeight: 'bold',
|
48
|
+
textAlign: 'center',
|
49
|
+
color: '#fff',
|
50
|
+
borderRadius: 25,
|
51
|
+
marginTop: 16,
|
52
|
+
marginBottom: 16
|
53
|
+
}
|
54
|
+
},
|
10
55
|
style: {}
|
11
56
|
},
|
12
57
|
w: 100,
|
@@ -0,0 +1,134 @@
|
|
1
|
+
declare const _default: ({
|
2
|
+
title: string;
|
3
|
+
child: ({
|
4
|
+
type: string;
|
5
|
+
label: string;
|
6
|
+
options: {
|
7
|
+
label: string;
|
8
|
+
value: string;
|
9
|
+
}[];
|
10
|
+
name: string[];
|
11
|
+
addonAfter?: undefined;
|
12
|
+
} | {
|
13
|
+
type: string;
|
14
|
+
name: string[];
|
15
|
+
addonAfter: string;
|
16
|
+
label?: undefined;
|
17
|
+
options?: undefined;
|
18
|
+
})[];
|
19
|
+
} | {
|
20
|
+
title: string;
|
21
|
+
child: {
|
22
|
+
name: string[];
|
23
|
+
type: string;
|
24
|
+
child: ({
|
25
|
+
label: string;
|
26
|
+
type: string;
|
27
|
+
options: {
|
28
|
+
label: string;
|
29
|
+
value: string;
|
30
|
+
}[];
|
31
|
+
name: string[];
|
32
|
+
initialValue: string;
|
33
|
+
child?: undefined;
|
34
|
+
} | {
|
35
|
+
type: string;
|
36
|
+
label: string;
|
37
|
+
child: ({
|
38
|
+
type: string;
|
39
|
+
name: string[];
|
40
|
+
options?: undefined;
|
41
|
+
addonAfter?: undefined;
|
42
|
+
} | {
|
43
|
+
type: string;
|
44
|
+
options: {
|
45
|
+
label: string;
|
46
|
+
value: string;
|
47
|
+
}[];
|
48
|
+
name: string[];
|
49
|
+
addonAfter?: undefined;
|
50
|
+
} | {
|
51
|
+
type: string;
|
52
|
+
addonAfter: string;
|
53
|
+
name: string[];
|
54
|
+
options?: undefined;
|
55
|
+
})[];
|
56
|
+
options?: undefined;
|
57
|
+
name?: undefined;
|
58
|
+
initialValue?: undefined;
|
59
|
+
} | {
|
60
|
+
label: string;
|
61
|
+
type: string;
|
62
|
+
options?: undefined;
|
63
|
+
name?: undefined;
|
64
|
+
initialValue?: undefined;
|
65
|
+
child?: undefined;
|
66
|
+
} | {
|
67
|
+
label: string;
|
68
|
+
type: string;
|
69
|
+
name: string[];
|
70
|
+
options?: undefined;
|
71
|
+
initialValue?: undefined;
|
72
|
+
child?: undefined;
|
73
|
+
})[];
|
74
|
+
}[];
|
75
|
+
} | {
|
76
|
+
title: string;
|
77
|
+
child: ({
|
78
|
+
type: string;
|
79
|
+
label: string;
|
80
|
+
name: string[];
|
81
|
+
initialValue: string;
|
82
|
+
child?: undefined;
|
83
|
+
} | {
|
84
|
+
type: string;
|
85
|
+
label: string;
|
86
|
+
child: ({
|
87
|
+
type: string;
|
88
|
+
name: string[];
|
89
|
+
max: number;
|
90
|
+
addonAfter?: undefined;
|
91
|
+
} | {
|
92
|
+
type: string;
|
93
|
+
name: string[];
|
94
|
+
addonAfter: string;
|
95
|
+
max: number;
|
96
|
+
})[];
|
97
|
+
name?: undefined;
|
98
|
+
initialValue?: undefined;
|
99
|
+
} | {
|
100
|
+
type: string;
|
101
|
+
name: string[];
|
102
|
+
label?: undefined;
|
103
|
+
initialValue?: undefined;
|
104
|
+
child?: undefined;
|
105
|
+
} | {
|
106
|
+
type: string;
|
107
|
+
label: string;
|
108
|
+
child: ({
|
109
|
+
type: string;
|
110
|
+
name: string[];
|
111
|
+
initialValue: string;
|
112
|
+
options?: undefined;
|
113
|
+
addonAfter?: undefined;
|
114
|
+
} | {
|
115
|
+
type: string;
|
116
|
+
name: string[];
|
117
|
+
options: {
|
118
|
+
label: string;
|
119
|
+
value: string;
|
120
|
+
}[];
|
121
|
+
initialValue?: undefined;
|
122
|
+
addonAfter?: undefined;
|
123
|
+
} | {
|
124
|
+
type: string;
|
125
|
+
name: string[];
|
126
|
+
addonAfter: string;
|
127
|
+
initialValue?: undefined;
|
128
|
+
options?: undefined;
|
129
|
+
})[];
|
130
|
+
name?: undefined;
|
131
|
+
initialValue?: undefined;
|
132
|
+
})[];
|
133
|
+
})[];
|
134
|
+
export default _default;
|
@@ -0,0 +1,171 @@
|
|
1
|
+
export default [
|
2
|
+
{
|
3
|
+
title: '商品图片',
|
4
|
+
child: [
|
5
|
+
{
|
6
|
+
type: 'Radius',
|
7
|
+
label: '轮播指示器',
|
8
|
+
options: [
|
9
|
+
{
|
10
|
+
label: '居左',
|
11
|
+
value: 'left'
|
12
|
+
},
|
13
|
+
{
|
14
|
+
label: '居中',
|
15
|
+
value: 'center'
|
16
|
+
}
|
17
|
+
],
|
18
|
+
name: ['props', 'swiper', 'dotsAlign']
|
19
|
+
},
|
20
|
+
{
|
21
|
+
type: 'Number',
|
22
|
+
name: ['props', 'swiper', 'delay'],
|
23
|
+
addonAfter: 's'
|
24
|
+
}
|
25
|
+
]
|
26
|
+
},
|
27
|
+
{
|
28
|
+
title: '商品文本',
|
29
|
+
child: [
|
30
|
+
{
|
31
|
+
name: ['props', 'commodityStyles'],
|
32
|
+
type: 'SelectLinkage',
|
33
|
+
child: [
|
34
|
+
{
|
35
|
+
label: '字段',
|
36
|
+
type: 'Select',
|
37
|
+
options: [
|
38
|
+
{
|
39
|
+
label: '商品名称',
|
40
|
+
value: 'title'
|
41
|
+
},
|
42
|
+
{
|
43
|
+
label: '系列名称',
|
44
|
+
value: 'collection'
|
45
|
+
},
|
46
|
+
{
|
47
|
+
label: '价格',
|
48
|
+
value: 'price'
|
49
|
+
},
|
50
|
+
{
|
51
|
+
label: '税费说明',
|
52
|
+
value: 'taxInfo'
|
53
|
+
},
|
54
|
+
{
|
55
|
+
label: '商品描述',
|
56
|
+
value: 'info'
|
57
|
+
}
|
58
|
+
],
|
59
|
+
name: ['props', 'commodityStyles', 'field'],
|
60
|
+
initialValue: 'title'
|
61
|
+
},
|
62
|
+
{
|
63
|
+
type: 'Group',
|
64
|
+
label: '标题字体',
|
65
|
+
child: [
|
66
|
+
{
|
67
|
+
type: 'Color',
|
68
|
+
name: ['color']
|
69
|
+
},
|
70
|
+
{
|
71
|
+
type: 'Select',
|
72
|
+
options: [{ label: '黑体', value: '黑体' }],
|
73
|
+
name: ['fontFamily']
|
74
|
+
},
|
75
|
+
{
|
76
|
+
type: 'Number',
|
77
|
+
addonAfter: 'px',
|
78
|
+
name: ['fontSize']
|
79
|
+
}
|
80
|
+
]
|
81
|
+
},
|
82
|
+
{
|
83
|
+
label: '标题样式',
|
84
|
+
type: 'TextStyle'
|
85
|
+
},
|
86
|
+
{
|
87
|
+
label: '标题对齐',
|
88
|
+
type: 'TextAlign'
|
89
|
+
},
|
90
|
+
{
|
91
|
+
label: '默认行数',
|
92
|
+
type: 'Number',
|
93
|
+
name: ['lineClamp']
|
94
|
+
}
|
95
|
+
]
|
96
|
+
}
|
97
|
+
]
|
98
|
+
},
|
99
|
+
{
|
100
|
+
title: '购买按钮样式',
|
101
|
+
child: [
|
102
|
+
{
|
103
|
+
type: 'Color',
|
104
|
+
label: '背景色',
|
105
|
+
name: ['props', 'buttonStyle', 'backgroundColor'],
|
106
|
+
initialValue: '#000'
|
107
|
+
},
|
108
|
+
{
|
109
|
+
type: 'Group',
|
110
|
+
label: '尺寸',
|
111
|
+
child: [
|
112
|
+
{
|
113
|
+
type: 'Number',
|
114
|
+
name: ['props', 'buttonStyle', 'height'],
|
115
|
+
addonAfter: 'H'
|
116
|
+
}
|
117
|
+
]
|
118
|
+
},
|
119
|
+
{
|
120
|
+
type: 'Group',
|
121
|
+
label: '圆角',
|
122
|
+
child: [
|
123
|
+
{
|
124
|
+
type: 'Slider',
|
125
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
126
|
+
max: 100
|
127
|
+
},
|
128
|
+
{
|
129
|
+
type: 'Number',
|
130
|
+
name: ['props', 'buttonStyle', 'borderRadius'],
|
131
|
+
addonAfter: 'px',
|
132
|
+
max: 100
|
133
|
+
}
|
134
|
+
]
|
135
|
+
},
|
136
|
+
{
|
137
|
+
type: 'TextMargin',
|
138
|
+
name: ['props', 'buttonStyle']
|
139
|
+
},
|
140
|
+
{
|
141
|
+
type: 'Group',
|
142
|
+
label: '字体',
|
143
|
+
child: [
|
144
|
+
{
|
145
|
+
type: 'Color',
|
146
|
+
name: ['props', 'buttonStyle', 'color'],
|
147
|
+
initialValue: '#fff'
|
148
|
+
},
|
149
|
+
{
|
150
|
+
type: 'Select',
|
151
|
+
name: ['props', 'buttonStyle', 'fontFamily'],
|
152
|
+
options: [{ label: '黑体', value: '黑体' }]
|
153
|
+
},
|
154
|
+
{
|
155
|
+
type: 'Number',
|
156
|
+
name: ['props', 'buttonStyle', 'fontSize'],
|
157
|
+
addonAfter: 'px'
|
158
|
+
}
|
159
|
+
]
|
160
|
+
},
|
161
|
+
{
|
162
|
+
type: 'TextStyle',
|
163
|
+
name: ['props', 'buttonStyle']
|
164
|
+
},
|
165
|
+
{
|
166
|
+
type: 'TextAlign',
|
167
|
+
name: ['props', 'buttonStyle']
|
168
|
+
}
|
169
|
+
]
|
170
|
+
}
|
171
|
+
];
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../components/typing';
|
2
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
export interface IAppointProps {
|
4
5
|
content?: string;
|
@@ -6,6 +7,7 @@ export interface IAppointProps {
|
|
6
7
|
bgImg?: Record<string, any> | string;
|
7
8
|
recData?: RecItemType;
|
8
9
|
bottom_image?: string;
|
10
|
+
ctaTempStyles?: ICtaTempStylesType;
|
9
11
|
}
|
10
12
|
declare const _default: React.NamedExoticComponent<IAppointProps>;
|
11
13
|
export default _default;
|
@@ -5,26 +5,12 @@ import EventProvider from '../components/EventProvider';
|
|
5
5
|
import { useSxpDataSource } from '../../../../core/hooks';
|
6
6
|
const Appoint = (_a) => {
|
7
7
|
var _b, _c, _d, _e;
|
8
|
-
var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
8
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
9
9
|
const { sxpParameter } = useSxpDataSource();
|
10
10
|
const cta = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindCta;
|
11
|
-
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(
|
12
|
-
React.createElement("div", { className: css({
|
13
|
-
width: '30px',
|
14
|
-
height: '30px',
|
15
|
-
marginRight: '8px',
|
16
|
-
borderRadius: '3px',
|
17
|
-
overflow: 'hidden',
|
18
|
-
flexShrink: 0,
|
19
|
-
backgroundColor: '#f2f2f2'
|
20
|
-
}) },
|
11
|
+
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({ alignItems: 'center' }, style)), style: { display: 'flex' } }, props),
|
12
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
21
13
|
React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: (_d = (_c = cta === null || cta === void 0 ? void 0 : cta.icon) !== null && _c !== void 0 ? _c : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _d !== void 0 ? _d : bottom_image, alt: '' })),
|
22
|
-
React.createElement("div", { className: css({
|
23
|
-
color: '#fff',
|
24
|
-
width: '100%',
|
25
|
-
overflow: 'hidden',
|
26
|
-
fontSize: '12px',
|
27
|
-
textOverflow: 'ellipsis'
|
28
|
-
}) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
14
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', textOverflow: 'ellipsis' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_e = cta === null || cta === void 0 ? void 0 : cta.enTitle) !== null && _e !== void 0 ? _e : 'Product Name')));
|
29
15
|
};
|
30
16
|
export default memo(Appoint);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import settingRender from '../components/settingRender';
|
1
2
|
import interactionRender from './interactionRender';
|
2
3
|
import AppointComponent from '.';
|
3
4
|
import { createMaterial } from '../../../../core/create';
|
@@ -8,18 +9,33 @@ const Appoint = createMaterial(AppointComponent, {
|
|
8
9
|
type: 'Appoint',
|
9
10
|
related: {
|
10
11
|
interactionRender,
|
12
|
+
settingRender: settingRender === null || settingRender === void 0 ? void 0 : settingRender.filter((i) => i.type !== 'commodityTitle'),
|
11
13
|
bindableProps: []
|
12
14
|
},
|
13
15
|
defaulSetting: {
|
14
16
|
props: {
|
15
|
-
|
17
|
+
ctaTempStyles: {
|
18
|
+
img: {
|
19
|
+
borderRadius: 3,
|
20
|
+
width: 30,
|
21
|
+
height: 30,
|
22
|
+
marginRight: 8
|
23
|
+
},
|
24
|
+
ctaTitle: {
|
25
|
+
fontSize: 12,
|
26
|
+
color: '#fff',
|
27
|
+
textAlign: 'left',
|
28
|
+
width: 130,
|
29
|
+
height: 20
|
30
|
+
}
|
31
|
+
}
|
16
32
|
},
|
17
33
|
style: {
|
18
|
-
padding:
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
34
|
+
padding: 7,
|
35
|
+
width: 236,
|
36
|
+
height: 44,
|
37
|
+
borderRadius: 3,
|
38
|
+
backgroundColor: 'rgba(0,0,0,.3)'
|
23
39
|
}
|
24
40
|
},
|
25
41
|
w: 100,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../components/typing';
|
2
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
export interface ICommodityProps {
|
4
5
|
content?: string;
|
@@ -6,6 +7,7 @@ export interface ICommodityProps {
|
|
6
7
|
bgImg?: Record<string, any> | string;
|
7
8
|
recData?: RecItemType;
|
8
9
|
bottom_image?: string;
|
10
|
+
ctaTempStyles?: ICtaTempStylesType;
|
9
11
|
}
|
10
12
|
declare const _default: React.NamedExoticComponent<ICommodityProps>;
|
11
13
|
export default _default;
|
@@ -6,20 +6,12 @@ import styles from './index.module.less';
|
|
6
6
|
import { useSxpDataSource } from '../../../../core/hooks';
|
7
7
|
const Commodity = (_a) => {
|
8
8
|
var _b, _c, _d, _e, _f, _g, _h;
|
9
|
-
var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
9
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
10
10
|
const { sxpParameter } = useSxpDataSource();
|
11
11
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12
12
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
13
|
-
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(
|
14
|
-
React.createElement("div", { className: css({
|
15
|
-
width: '60px',
|
16
|
-
height: '60px',
|
17
|
-
marginRight: '8px',
|
18
|
-
borderRadius: '3px',
|
19
|
-
overflow: 'hidden',
|
20
|
-
flexShrink: 0,
|
21
|
-
backgroundColor: '#f2f2f2'
|
22
|
-
}) },
|
13
|
+
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
14
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
23
15
|
React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
|
24
16
|
React.createElement("div", { className: css({
|
25
17
|
color: '#fff',
|
@@ -29,16 +21,7 @@ const Commodity = (_a) => {
|
|
29
21
|
width: '100%',
|
30
22
|
overflow: 'hidden'
|
31
23
|
}) },
|
32
|
-
React.createElement("div", { className: styles['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
33
|
-
React.createElement("div", { className: css({
|
34
|
-
background: 'rgba(0,0,0,.5)',
|
35
|
-
fontSize: '10px',
|
36
|
-
padding: '2px 7px',
|
37
|
-
width: 'auto',
|
38
|
-
textAlign: 'center',
|
39
|
-
textOverflow: 'ellipsis',
|
40
|
-
overflow: 'hidden',
|
41
|
-
whiteSpace: 'nowrap'
|
42
|
-
}) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
24
|
+
React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
25
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
43
26
|
};
|
44
27
|
export default memo(Commodity);
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import settingRender from '../components/settingRender';
|
1
2
|
import interactionRender from './interactionRender';
|
2
3
|
import CommodityComponent from '.';
|
3
4
|
import { createMaterial } from '../../../../core/create';
|
@@ -8,15 +9,39 @@ const Commodity = createMaterial(CommodityComponent, {
|
|
8
9
|
type: 'Commodity',
|
9
10
|
related: {
|
10
11
|
interactionRender,
|
11
|
-
bindableProps: []
|
12
|
+
bindableProps: [],
|
13
|
+
settingRender
|
12
14
|
},
|
13
15
|
defaulSetting: {
|
14
|
-
props: {
|
16
|
+
props: {
|
17
|
+
ctaTempStyles: {
|
18
|
+
img: {
|
19
|
+
borderRadius: 3,
|
20
|
+
width: 60,
|
21
|
+
height: 60,
|
22
|
+
marginRight: 8
|
23
|
+
},
|
24
|
+
title: {
|
25
|
+
fontSize: 12,
|
26
|
+
color: '#fff',
|
27
|
+
textAlign: 'left'
|
28
|
+
},
|
29
|
+
ctaTitle: {
|
30
|
+
fontSize: 10,
|
31
|
+
color: '#fff',
|
32
|
+
textAlign: 'center',
|
33
|
+
width: 130,
|
34
|
+
height: 20,
|
35
|
+
backgroundColor: 'rgba(0,0,0,.5)'
|
36
|
+
}
|
37
|
+
}
|
38
|
+
},
|
15
39
|
style: {
|
16
|
-
padding:
|
17
|
-
|
18
|
-
|
19
|
-
borderRadius:
|
40
|
+
padding: 7,
|
41
|
+
width: 236,
|
42
|
+
height: 74,
|
43
|
+
borderRadius: 3,
|
44
|
+
backgroundColor: 'rgba(0,0,0,.3)'
|
20
45
|
}
|
21
46
|
},
|
22
47
|
w: 100,
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import React from 'react';
|
2
|
+
import { ICtaTempStylesType } from '../components/typing';
|
2
3
|
import { RecItemType } from '../../../../core/components/SxpPageRender/typing';
|
3
4
|
export interface ICommodityDiroProps {
|
4
5
|
content?: string;
|
@@ -6,6 +7,7 @@ export interface ICommodityDiroProps {
|
|
6
7
|
bgImg?: Record<string, any> | string;
|
7
8
|
recData?: RecItemType;
|
8
9
|
bottom_image?: string;
|
10
|
+
ctaTempStyles?: ICtaTempStylesType;
|
9
11
|
}
|
10
12
|
declare const _default: React.NamedExoticComponent<ICommodityDiroProps>;
|
11
13
|
export default _default;
|
@@ -6,20 +6,12 @@ import styles from './index.module.less';
|
|
6
6
|
import { useSxpDataSource } from '../../../../core/hooks';
|
7
7
|
const CommodityDiro = (_a) => {
|
8
8
|
var _b, _c, _d, _e, _f, _g, _h;
|
9
|
-
var { content, style, bgImg, recData, bottom_image } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image"]);
|
9
|
+
var { content, style, bgImg, recData, bottom_image, ctaTempStyles } = _a, props = __rest(_a, ["content", "style", "bgImg", "recData", "bottom_image", "ctaTempStyles"]);
|
10
10
|
const { sxpParameter } = useSxpDataSource();
|
11
11
|
const product = (_b = recData === null || recData === void 0 ? void 0 : recData.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
|
12
12
|
const src = (_e = (_d = (_c = product === null || product === void 0 ? void 0 : product.homePage) === null || _c === void 0 ? void 0 : _c[0]) !== null && _d !== void 0 ? _d : sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _e !== void 0 ? _e : bottom_image;
|
13
|
-
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign(
|
14
|
-
React.createElement("div", { className: css({
|
15
|
-
width: '60px',
|
16
|
-
height: '60px',
|
17
|
-
marginRight: '8px',
|
18
|
-
borderRadius: '3px',
|
19
|
-
overflow: 'hidden',
|
20
|
-
flexShrink: 0,
|
21
|
-
backgroundColor: '#f2f2f2'
|
22
|
-
}) },
|
13
|
+
return (React.createElement(EventProvider, Object.assign({ rec: recData, className: css(Object.assign({}, style)), style: { display: 'flex' } }, props),
|
14
|
+
React.createElement("div", { className: css(Object.assign({ overflow: 'hidden', flexShrink: 0, backgroundColor: '#f2f2f2' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.img)) },
|
23
15
|
React.createElement("img", { className: css({ width: '100%', objectFit: 'cover', height: '100%' }), src: src, hidden: !src, alt: '' })),
|
24
16
|
React.createElement("div", { className: css({
|
25
17
|
color: '#fff',
|
@@ -29,18 +21,7 @@ const CommodityDiro = (_a) => {
|
|
29
21
|
width: '100%',
|
30
22
|
overflow: 'hidden'
|
31
23
|
}) },
|
32
|
-
React.createElement("div", { className: styles['tow-line-ellipsis'] }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
33
|
-
React.createElement("div", { className: css({
|
34
|
-
background: 'rgba(0,0,0,1)',
|
35
|
-
fontSize: '10px',
|
36
|
-
padding: '2px 7px',
|
37
|
-
textAlign: 'center',
|
38
|
-
textOverflow: 'ellipsis',
|
39
|
-
overflow: 'hidden',
|
40
|
-
borderRadius: '25px',
|
41
|
-
width: 'fit-content',
|
42
|
-
maxWidth: '100%',
|
43
|
-
whiteSpace: 'nowrap'
|
44
|
-
}) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
24
|
+
React.createElement("div", { className: styles['tow-line-ellipsis'], style: ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.title }, (_f = product === null || product === void 0 ? void 0 : product.title) !== null && _f !== void 0 ? _f : 'Product Name'),
|
25
|
+
React.createElement("div", { className: css(Object.assign({ padding: '2px 7px', textOverflow: 'ellipsis', overflow: 'hidden', borderRadius: '25px', whiteSpace: 'nowrap' }, ctaTempStyles === null || ctaTempStyles === void 0 ? void 0 : ctaTempStyles.ctaTitle)) }, (_h = (_g = product === null || product === void 0 ? void 0 : product.bindCta) === null || _g === void 0 ? void 0 : _g.enTitle) !== null && _h !== void 0 ? _h : 'Shop Now'))));
|
45
26
|
};
|
46
27
|
export default memo(CommodityDiro);
|