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