pb-sxp-ui 1.1.1 → 1.2.0

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 (162) hide show
  1. package/dist/index.cjs +2257 -857
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.css +356 -175
  4. package/dist/index.js +2257 -857
  5. package/dist/index.js.map +1 -0
  6. package/dist/index.min.cjs +4 -3
  7. package/dist/index.min.cjs.map +1 -0
  8. package/dist/index.min.js +4 -3
  9. package/dist/index.min.js.map +1 -0
  10. package/dist/pb-ui.js +2257 -857
  11. package/dist/pb-ui.js.map +1 -0
  12. package/dist/pb-ui.min.js +4 -3
  13. package/dist/pb-ui.min.js.map +1 -0
  14. package/es/core/Pagebuilder/type.d.ts +1 -0
  15. package/es/core/components/SxpPageRender/Hashtag/index.js +1 -3
  16. package/es/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  17. package/es/core/components/SxpPageRender/Modal/index.js +70 -6
  18. package/es/core/components/SxpPageRender/Navbar.js +1 -1
  19. package/es/core/components/SxpPageRender/Popup/index.js +1 -1
  20. package/es/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  21. package/es/core/components/SxpPageRender/RenderCard.js +16 -12
  22. package/es/core/components/SxpPageRender/VideoWidget/index.js +11 -10
  23. package/es/core/components/SxpPageRender/WaterFall/List.js +1 -1
  24. package/es/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  25. package/es/core/components/SxpPageRender/index.d.ts +3 -2
  26. package/es/core/components/SxpPageRender/index.js +51 -17
  27. package/es/core/components/SxpPageRender/typing.d.ts +1 -0
  28. package/es/core/context/SxpDataSourceProvider.d.ts +1 -0
  29. package/es/core/context/SxpDataSourceProvider.js +6 -3
  30. package/es/core/utils/localStore.d.ts +3 -0
  31. package/es/core/utils/localStore.js +8 -0
  32. package/es/materials/sxp/HashTag/material.js +1 -2
  33. package/es/materials/sxp/cta/AniLink/index.d.ts +14 -0
  34. package/es/materials/sxp/cta/AniLink/index.js +58 -0
  35. package/es/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  36. package/es/materials/sxp/cta/AniLink/interactionRender.js +50 -0
  37. package/es/materials/sxp/cta/AniLink/material.d.ts +2 -0
  38. package/es/materials/sxp/cta/AniLink/material.js +38 -0
  39. package/es/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  40. package/es/materials/sxp/cta/AniLink/settingRender.js +103 -0
  41. package/es/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  42. package/es/materials/sxp/cta/AniLinkPopup/index.js +65 -0
  43. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  44. package/es/materials/sxp/cta/AniLinkPopup/interactionRender.js +50 -0
  45. package/es/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  46. package/es/materials/sxp/cta/AniLinkPopup/material.js +52 -0
  47. package/es/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  48. package/es/materials/sxp/cta/AniLinkPopup/settingRender.js +249 -0
  49. package/es/materials/sxp/cta/index.d.ts +2 -0
  50. package/es/materials/sxp/cta/index.js +2 -0
  51. package/es/materials/sxp/index.d.ts +1 -0
  52. package/es/materials/sxp/index.js +1 -0
  53. package/es/materials/sxp/popup/AppointForm/Form.js +1 -1
  54. package/es/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  55. package/es/materials/sxp/popup/CommodityDetail/index.js +43 -26
  56. package/es/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  57. package/es/materials/sxp/popup/CommodityDetail/interactionRender.js +12 -0
  58. package/es/materials/sxp/popup/CommodityDetail/material.js +3 -1
  59. package/es/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  60. package/es/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  61. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  62. package/es/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  63. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  64. package/es/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +12 -0
  65. package/es/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  66. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  67. package/es/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  68. package/es/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  69. package/es/materials/sxp/popup/CommodityList/index.js +56 -0
  70. package/es/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  71. package/es/materials/sxp/popup/CommodityList/interactionRender.js +11 -0
  72. package/es/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  73. package/es/materials/sxp/popup/CommodityList/material.js +51 -0
  74. package/es/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  75. package/es/materials/sxp/popup/CommodityList/settingRender.js +207 -0
  76. package/es/materials/sxp/popup/index.d.ts +1 -0
  77. package/es/materials/sxp/popup/index.js +1 -0
  78. package/es/materials/sxp/template/Link/index.js +2 -2
  79. package/es/materials/sxp/template/MultiCommodity/index.js +2 -2
  80. package/es/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  81. package/es/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  82. package/es/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  83. package/es/materials/sxp/template/components/CommodityGroup.js +31 -0
  84. package/es/materials/sxp/template/components/Img.js +1 -1
  85. package/es/materials/sxp/template/components/Scroll.d.ts +2 -1
  86. package/es/materials/sxp/template/components/Scroll.js +10 -3
  87. package/es/materials/sxp/template/components/settingRender.js +0 -5
  88. package/lib/core/Pagebuilder/type.d.ts +1 -0
  89. package/lib/core/components/SxpPageRender/Hashtag/index.js +1 -3
  90. package/lib/core/components/SxpPageRender/Modal/index.d.ts +3 -0
  91. package/lib/core/components/SxpPageRender/Modal/index.js +70 -6
  92. package/lib/core/components/SxpPageRender/Navbar.js +1 -1
  93. package/lib/core/components/SxpPageRender/Popup/index.js +1 -1
  94. package/lib/core/components/SxpPageRender/RenderCard.d.ts +1 -0
  95. package/lib/core/components/SxpPageRender/RenderCard.js +16 -12
  96. package/lib/core/components/SxpPageRender/VideoWidget/index.js +11 -10
  97. package/lib/core/components/SxpPageRender/WaterFall/List.js +1 -1
  98. package/lib/core/components/SxpPageRender/WaterFall/WaterfallList.js +1 -1
  99. package/lib/core/components/SxpPageRender/index.d.ts +3 -2
  100. package/lib/core/components/SxpPageRender/index.js +50 -16
  101. package/lib/core/components/SxpPageRender/typing.d.ts +1 -0
  102. package/lib/core/context/SxpDataSourceProvider.d.ts +1 -0
  103. package/lib/core/context/SxpDataSourceProvider.js +6 -3
  104. package/lib/core/utils/localStore.d.ts +3 -0
  105. package/lib/core/utils/localStore.js +11 -1
  106. package/lib/materials/sxp/HashTag/material.js +1 -2
  107. package/lib/materials/sxp/cta/AniLink/index.d.ts +14 -0
  108. package/lib/materials/sxp/cta/AniLink/index.js +60 -0
  109. package/lib/materials/sxp/cta/AniLink/interactionRender.d.ts +42 -0
  110. package/lib/materials/sxp/cta/AniLink/interactionRender.js +52 -0
  111. package/lib/materials/sxp/cta/AniLink/material.d.ts +2 -0
  112. package/lib/materials/sxp/cta/AniLink/material.js +42 -0
  113. package/lib/materials/sxp/cta/AniLink/settingRender.d.ts +73 -0
  114. package/lib/materials/sxp/cta/AniLink/settingRender.js +105 -0
  115. package/lib/materials/sxp/cta/AniLinkPopup/index.d.ts +17 -0
  116. package/lib/materials/sxp/cta/AniLinkPopup/index.js +67 -0
  117. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.d.ts +42 -0
  118. package/lib/materials/sxp/cta/AniLinkPopup/interactionRender.js +52 -0
  119. package/lib/materials/sxp/cta/AniLinkPopup/material.d.ts +2 -0
  120. package/lib/materials/sxp/cta/AniLinkPopup/material.js +56 -0
  121. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.d.ts +176 -0
  122. package/lib/materials/sxp/cta/AniLinkPopup/settingRender.js +251 -0
  123. package/lib/materials/sxp/cta/index.d.ts +2 -0
  124. package/lib/materials/sxp/cta/index.js +5 -0
  125. package/lib/materials/sxp/index.d.ts +1 -0
  126. package/lib/materials/sxp/index.js +1 -0
  127. package/lib/materials/sxp/popup/AppointForm/Form.js +1 -1
  128. package/lib/materials/sxp/popup/CommodityDetail/index.d.ts +5 -0
  129. package/lib/materials/sxp/popup/CommodityDetail/index.js +43 -26
  130. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.d.ts +9 -0
  131. package/lib/materials/sxp/popup/CommodityDetail/interactionRender.js +14 -0
  132. package/lib/materials/sxp/popup/CommodityDetail/material.js +3 -1
  133. package/lib/materials/sxp/popup/CommodityDetail/settingRender.d.ts +37 -0
  134. package/lib/materials/sxp/popup/CommodityDetail/settingRender.js +41 -0
  135. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.d.ts +5 -0
  136. package/lib/materials/sxp/popup/CommodityDetailDiroNew/index.js +11 -25
  137. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.d.ts +9 -0
  138. package/lib/materials/sxp/popup/CommodityDetailDiroNew/interactionRender.js +14 -0
  139. package/lib/materials/sxp/popup/CommodityDetailDiroNew/material.js +3 -1
  140. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.d.ts +37 -0
  141. package/lib/materials/sxp/popup/CommodityDetailDiroNew/settingRender.js +41 -0
  142. package/lib/materials/sxp/popup/CommodityList/index.d.ts +28 -0
  143. package/lib/materials/sxp/popup/CommodityList/index.js +58 -0
  144. package/lib/materials/sxp/popup/CommodityList/interactionRender.d.ts +8 -0
  145. package/lib/materials/sxp/popup/CommodityList/interactionRender.js +13 -0
  146. package/lib/materials/sxp/popup/CommodityList/material.d.ts +2 -0
  147. package/lib/materials/sxp/popup/CommodityList/material.js +55 -0
  148. package/lib/materials/sxp/popup/CommodityList/settingRender.d.ts +151 -0
  149. package/lib/materials/sxp/popup/CommodityList/settingRender.js +209 -0
  150. package/lib/materials/sxp/popup/index.d.ts +1 -0
  151. package/lib/materials/sxp/popup/index.js +1 -0
  152. package/lib/materials/sxp/template/Link/index.js +2 -2
  153. package/lib/materials/sxp/template/MultiCommodity/index.js +2 -2
  154. package/lib/materials/sxp/template/MultiCommodityDiro/index.js +2 -2
  155. package/lib/materials/sxp/template/MultiCommodityDiroNew/index.js +5 -4
  156. package/lib/materials/sxp/template/components/CommodityGroup.d.ts +14 -0
  157. package/lib/materials/sxp/template/components/CommodityGroup.js +34 -0
  158. package/lib/materials/sxp/template/components/Img.js +1 -1
  159. package/lib/materials/sxp/template/components/Scroll.d.ts +2 -1
  160. package/lib/materials/sxp/template/components/Scroll.js +9 -2
  161. package/lib/materials/sxp/template/components/settingRender.js +0 -5
  162. package/package.json +1 -1
@@ -0,0 +1,251 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '主题样式',
6
+ child: [
7
+ {
8
+ type: 'Group',
9
+ label: '尺寸',
10
+ child: [
11
+ {
12
+ type: 'Number',
13
+ name: ['style', 'width'],
14
+ addonAfter: 'W'
15
+ },
16
+ {
17
+ type: 'Number',
18
+ name: ['style', 'height'],
19
+ addonAfter: 'H'
20
+ }
21
+ ]
22
+ },
23
+ {
24
+ type: 'Group',
25
+ label: '圆角',
26
+ child: [
27
+ {
28
+ type: 'Slider',
29
+ name: ['style', 'borderRadius'],
30
+ max: 100
31
+ },
32
+ {
33
+ type: 'Number',
34
+ name: ['style', 'borderRadius'],
35
+ addonAfter: 'px',
36
+ max: 100
37
+ }
38
+ ]
39
+ },
40
+ {
41
+ type: 'Color',
42
+ label: '背景色',
43
+ name: ['style', 'backgroundColor']
44
+ },
45
+ {
46
+ label: '外边距',
47
+ type: 'Number',
48
+ name: ['style', 'margin'],
49
+ addonAfter: 'px'
50
+ },
51
+ {
52
+ label: '内边距',
53
+ type: 'Number',
54
+ name: ['style', 'padding'],
55
+ addonAfter: 'px'
56
+ }
57
+ ]
58
+ },
59
+ {
60
+ title: '商品图片',
61
+ child: [
62
+ {
63
+ type: 'Group',
64
+ label: '尺寸',
65
+ child: [
66
+ {
67
+ type: 'Number',
68
+ name: ['props', 'ctaTempStyles', 'img', 'width'],
69
+ addonAfter: 'W'
70
+ },
71
+ {
72
+ type: 'Number',
73
+ name: ['props', 'ctaTempStyles', 'img', 'height'],
74
+ addonAfter: 'H'
75
+ }
76
+ ]
77
+ },
78
+ {
79
+ type: 'Group',
80
+ label: '圆角',
81
+ child: [
82
+ {
83
+ type: 'Slider',
84
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
85
+ max: 100
86
+ },
87
+ {
88
+ type: 'Number',
89
+ name: ['props', 'ctaTempStyles', 'img', 'borderRadius'],
90
+ addonAfter: 'px',
91
+ max: 100
92
+ }
93
+ ]
94
+ },
95
+ {
96
+ type: 'Number',
97
+ label: '与下边边距',
98
+ addonAfter: 'px',
99
+ name: ['props', 'ctaTempStyles', 'img', 'marginBottom']
100
+ },
101
+ {
102
+ label: '居中垂直偏移',
103
+ type: 'Number',
104
+ name: ['props', 'translateY'],
105
+ min: -1000,
106
+ addonAfter: '%',
107
+ initialValue: 0
108
+ }
109
+ ]
110
+ },
111
+ {
112
+ title: '商品标题文本',
113
+ type: 'commodityTitle',
114
+ child: [
115
+ {
116
+ type: 'Group',
117
+ label: '字体',
118
+ child: [
119
+ {
120
+ type: 'Select',
121
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-cn'],
122
+ bottomText: '中文字体'
123
+ },
124
+ {
125
+ type: 'Select',
126
+ name: ['props', 'ctaTempStyles', 'title', 'fontFamily-en'],
127
+ bottomText: '英文/其他字体'
128
+ }
129
+ ]
130
+ },
131
+ {
132
+ type: 'Group',
133
+ label: '',
134
+ child: [
135
+ {
136
+ type: 'Color',
137
+ name: ['props', 'ctaTempStyles', 'title', 'color']
138
+ },
139
+ {
140
+ type: 'Number',
141
+ addonAfter: 'px',
142
+ name: ['props', 'ctaTempStyles', 'title', 'fontSize']
143
+ }
144
+ ]
145
+ },
146
+ {
147
+ label: '样式',
148
+ type: 'TextStyle',
149
+ name: ['props', 'ctaTempStyles', 'title']
150
+ },
151
+ {
152
+ label: '对齐',
153
+ type: 'TextAlign',
154
+ name: ['props', 'ctaTempStyles', 'title']
155
+ },
156
+ {
157
+ label: '间距',
158
+ type: 'TextSpace',
159
+ name: ['props', 'ctaTempStyles', 'title']
160
+ }
161
+ ]
162
+ },
163
+ {
164
+ title: 'CTA标题',
165
+ child: [
166
+ {
167
+ type: 'Group',
168
+ label: '尺寸',
169
+ child: [
170
+ {
171
+ type: 'Number',
172
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'width'],
173
+ addonAfter: 'W'
174
+ },
175
+ {
176
+ type: 'Number',
177
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'height'],
178
+ addonAfter: 'H'
179
+ }
180
+ ]
181
+ },
182
+ {
183
+ type: 'Group',
184
+ label: '圆角',
185
+ child: [
186
+ {
187
+ type: 'Slider',
188
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
189
+ max: 100
190
+ },
191
+ {
192
+ type: 'Number',
193
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'borderRadius'],
194
+ addonAfter: 'px',
195
+ max: 100
196
+ }
197
+ ]
198
+ },
199
+ {
200
+ type: 'TextSpace',
201
+ name: ['props', 'ctaTempStyles', 'title']
202
+ },
203
+ {
204
+ type: 'Color',
205
+ label: '背景色',
206
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'backgroundColor']
207
+ },
208
+ {
209
+ type: 'Group',
210
+ label: '字体',
211
+ child: [
212
+ {
213
+ type: 'Select',
214
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-cn'],
215
+ bottomText: '中文字体'
216
+ },
217
+ {
218
+ type: 'Select',
219
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontFamily-en'],
220
+ bottomText: '英文/其他字体'
221
+ }
222
+ ]
223
+ },
224
+ {
225
+ type: 'Group',
226
+ label: '',
227
+ child: [
228
+ {
229
+ type: 'Color',
230
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'color']
231
+ },
232
+ {
233
+ type: 'Number',
234
+ addonAfter: 'px',
235
+ name: ['props', 'ctaTempStyles', 'ctaTitle', 'fontSize']
236
+ }
237
+ ]
238
+ },
239
+ {
240
+ label: '样式',
241
+ type: 'TextStyle',
242
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
243
+ },
244
+ {
245
+ label: '对齐',
246
+ type: 'TextAlign',
247
+ name: ['props', 'ctaTempStyles', 'ctaTitle']
248
+ }
249
+ ]
250
+ }
251
+ ];
@@ -0,0 +1,2 @@
1
+ export * from './AniLink/material';
2
+ export * from './AniLinkPopup/material';
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./AniLink/material"), exports);
5
+ tslib_1.__exportStar(require("./AniLinkPopup/material"), exports);
@@ -2,3 +2,4 @@ export * from './popup';
2
2
  export * from './template';
3
3
  export * from './HashTag/material';
4
4
  export * from './Consent/material';
5
+ export * from './cta';
@@ -5,3 +5,4 @@ tslib_1.__exportStar(require("./popup"), exports);
5
5
  tslib_1.__exportStar(require("./template"), exports);
6
6
  tslib_1.__exportStar(require("./HashTag/material"), exports);
7
7
  tslib_1.__exportStar(require("./Consent/material"), exports);
8
+ tslib_1.__exportStar(require("./cta"), exports);
@@ -6,6 +6,6 @@ const react_2 = tslib_1.__importDefault(require("react"));
6
6
  const Form = ({ layout, columns, onChange }) => {
7
7
  return (react_2.default.createElement(react_2.default.Fragment, null, columns === null || columns === void 0 ? void 0 : columns.map((item, index) => (react_2.default.createElement("div", { key: index, className: 'pb-appoint-form-container-item', style: { flexDirection: layout === 'horizontal' ? 'row' : 'column' } },
8
8
  layout !== 'inline' && react_2.default.createElement("label", { className: 'pb-appoint-form-container-label' }, item === null || item === void 0 ? void 0 : item.title),
9
- (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (react_2.default.createElement("input", { className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex, onChange: onChange })))))));
9
+ (item === null || item === void 0 ? void 0 : item.valueType) === 'text' && (react_2.default.createElement("input", Object.assign({ className: 'pb-appoint-form-container-input', type: 'text', placeholder: layout === 'inline' ? item === null || item === void 0 ? void 0 : item.title : '请输入', name: item === null || item === void 0 ? void 0 : item.dataIndex }, (onChange && { onChange: onChange })))))))));
10
10
  };
11
11
  exports.default = (0, react_1.memo)(Form);
@@ -30,6 +30,11 @@ export interface ICommodityDetailProps {
30
30
  };
31
31
  buttonStyle?: CSSProperties;
32
32
  index?: number;
33
+ commodityGroup?: {
34
+ open?: boolean;
35
+ translateY?: number;
36
+ style?: CSSProperties;
37
+ };
33
38
  }
34
39
  declare const _default: React.NamedExoticComponent<ICommodityDetailProps>;
35
40
  export default _default;
@@ -12,14 +12,16 @@ const Modal_1 = tslib_1.__importDefault(require("../../../../core/components/Sxp
12
12
  const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/ExpandableText"));
13
13
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
14
14
  const tool_1 = require("../../../../core/utils/tool");
15
+ const CommodityGroup_1 = tslib_1.__importDefault(require("../../template/components/CommodityGroup"));
15
16
  const CommodityDetail = (_a) => {
16
17
  var _b, _c, _d, _e, _f, _g, _h, _j, _k;
17
- var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index"]);
18
+ var { content, style, bgImg, onClick, schema, isDefault, bottom_image, tipText, isPost, viewTime, rec, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = tslib_1.__rest(_a, ["content", "style", "bgImg", "onClick", "schema", "isDefault", "bottom_image", "tipText", "isPost", "viewTime", "rec", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
18
19
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
19
20
  const { popupDetailData, bffEventReport, isPreview, bffFbReport } = (0, hooks_1.useSxpDataSource)();
20
21
  const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
21
22
  const curTimeRef = (0, react_1.useRef)(null);
22
23
  const [showModal, setShowModal] = (0, react_1.useState)(false);
24
+ const [show3DModal, setShow3DModal] = (0, react_1.useState)(false);
23
25
  const data = isPost ? rec : popupDetailData;
24
26
  const product = isPost ? data === null || data === void 0 ? void 0 : data.product : (_b = data === null || data === void 0 ? void 0 : data.video) === null || _b === void 0 ? void 0 : _b.bindProduct;
25
27
  const cta = isPost ? (_c = data === null || data === void 0 ? void 0 : data.product) === null || _c === void 0 ? void 0 : _c.bindCta : (_e = (_d = data === null || data === void 0 ? void 0 : data.video) === null || _d === void 0 ? void 0 : _d.bindProduct) === null || _e === void 0 ? void 0 : _e.bindCta;
@@ -94,31 +96,39 @@ const CommodityDetail = (_a) => {
94
96
  }
95
97
  return style;
96
98
  }, []);
97
- return (react_1.default.createElement("div", { className: 'pb-commondity' },
99
+ const renderCommodityGroup = (0, react_1.useCallback)(() => {
100
+ var _a, _b, _c;
101
+ if (isPost)
102
+ return;
103
+ return (react_1.default.createElement(CommodityGroup_1.default, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
104
+ }, []);
105
+ return (react_1.default.createElement(react_1.default.Fragment, null,
98
106
  react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
99
- product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
100
- clickable: true,
101
- bulletActiveClass: 'swipe-item-active-bullet',
102
- clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
103
- ? 'commondityDetail-swiper-clickable-left'
104
- : 'commondityDetail-swiper-clickable-center'
105
- }, loop: true, autoplay: {
106
- delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
107
- } }, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
108
- return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
109
- react_1.default.createElement("div", { style: {
110
- overflow: 'hidden',
111
- width,
112
- height: width
113
- } },
114
- react_1.default.createElement(FormatImage_1.default, { style: {
115
- height: '100%',
116
- width: '100%',
117
- objectFit: 'cover',
118
- display: 'block',
119
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
120
- }, src: src }))));
121
- }))),
107
+ product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement("div", { style: { position: 'relative' } },
108
+ react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
109
+ clickable: true,
110
+ bulletActiveClass: 'swipe-item-active-bullet',
111
+ clickableClass: (swiper === null || swiper === void 0 ? void 0 : swiper.dotsAlign) === 'left'
112
+ ? 'commondityDetail-swiper-clickable-left'
113
+ : 'commondityDetail-swiper-clickable-center'
114
+ }, loop: true, autoplay: {
115
+ delay: (swiper === null || swiper === void 0 ? void 0 : swiper.delay) * 1000
116
+ } },
117
+ react_1.default.createElement(react_1.default.Fragment, null, (_h = product === null || product === void 0 ? void 0 : product.homePage) === null || _h === void 0 ? void 0 : _h.map((src) => {
118
+ return (react_1.default.createElement(react_2.SwiperSlide, { key: src },
119
+ react_1.default.createElement("div", { style: {
120
+ overflow: 'hidden',
121
+ width,
122
+ height: width
123
+ } },
124
+ react_1.default.createElement(FormatImage_1.default, { style: {
125
+ height: '100%',
126
+ width: '100%',
127
+ objectFit: 'cover',
128
+ display: 'block',
129
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
130
+ }, src: src }))));
131
+ }))))),
122
132
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
123
133
  position: 'relative',
124
134
  height: 0,
@@ -133,10 +143,17 @@ const CommodityDetail = (_a) => {
133
143
  objectFit: 'cover',
134
144
  width: '100%'
135
145
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
146
+ renderCommodityGroup(),
136
147
  react_1.default.createElement("div", { className: 'pb-commondity-content' }, renderContent({ isPost }))),
137
148
  renderBtn(),
138
149
  react_1.default.createElement(Modal_1.default, { visible: showModal, onClose: () => setShowModal(false) },
139
150
  react_1.default.createElement("div", { style: { paddingBottom: '80px' } }, renderContent({ isPost: false })),
140
- renderBtn())));
151
+ renderBtn()),
152
+ react_1.default.createElement(Modal_1.default, { visible: show3DModal, padding: 0, isFullScreen: true, onClose: () => setShow3DModal(false) },
153
+ react_1.default.createElement("iframe", { src: 'https://rimowa.threedium.co.uk/product-experience/latest/?sku=92573974&lang=en', style: {
154
+ width: '100%',
155
+ height: 'calc(100% - 40px)',
156
+ marginTop: '40px'
157
+ } }))));
141
158
  };
142
159
  exports.default = (0, react_1.memo)(CommodityDetail);
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ title: string;
3
+ child: {
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ }[];
8
+ }[];
9
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '滑动事件',
6
+ child: [
7
+ {
8
+ type: 'Switch',
9
+ label: '滑动铺满全屏',
10
+ name: ['isScrollFullScreen']
11
+ }
12
+ ]
13
+ }
14
+ ];
@@ -5,13 +5,15 @@ const tslib_1 = require("tslib");
5
5
  const settingRender_1 = tslib_1.__importDefault(require("./settingRender"));
6
6
  const _1 = tslib_1.__importDefault(require("."));
7
7
  const create_1 = require("../../../../core/create");
8
+ const interactionRender_1 = tslib_1.__importDefault(require("./interactionRender"));
8
9
  const CommodityDetail = (0, create_1.createMaterial)(_1.default, {
9
10
  displayName: '商品详情',
10
11
  icon: '',
11
12
  category: 'popup',
12
13
  type: 'CommodityDetail',
13
14
  related: {
14
- settingRender: settingRender_1.default
15
+ settingRender: settingRender_1.default,
16
+ interactionRender: interactionRender_1.default
15
17
  },
16
18
  defaulSetting: {
17
19
  props: {
@@ -32,6 +32,43 @@ declare const _default: ({
32
32
  name?: undefined;
33
33
  addonAfter?: undefined;
34
34
  })[];
35
+ } | {
36
+ title: string;
37
+ child: ({
38
+ type: string;
39
+ name: string[];
40
+ label: string;
41
+ child?: undefined;
42
+ } | {
43
+ type: string;
44
+ child: {
45
+ label: string;
46
+ type: string;
47
+ name: string[];
48
+ min: number;
49
+ addonAfter: string;
50
+ initialValue: number;
51
+ }[];
52
+ name?: undefined;
53
+ label?: undefined;
54
+ } | {
55
+ type: string;
56
+ child: ({
57
+ label: string;
58
+ name: string[];
59
+ type: string;
60
+ addonAfter: string;
61
+ initialValue: number;
62
+ } | {
63
+ label: string;
64
+ name: string[];
65
+ type: string;
66
+ addonAfter: string;
67
+ initialValue?: undefined;
68
+ })[];
69
+ name?: undefined;
70
+ label?: undefined;
71
+ })[];
35
72
  } | {
36
73
  title: string;
37
74
  child: {
@@ -39,6 +39,47 @@ exports.default = [
39
39
  }
40
40
  ]
41
41
  },
42
+ {
43
+ title: '多商品切换器',
44
+ child: [
45
+ {
46
+ type: 'Switch',
47
+ name: ['props', 'commodityGroup', 'open'],
48
+ label: '快速切换开关'
49
+ },
50
+ {
51
+ type: 'Group',
52
+ child: [
53
+ {
54
+ label: '居中垂直偏移',
55
+ type: 'Number',
56
+ name: ['props', 'commodityGroup', 'translateY'],
57
+ min: -1000,
58
+ addonAfter: '%',
59
+ initialValue: 0
60
+ }
61
+ ]
62
+ },
63
+ {
64
+ type: 'Group',
65
+ child: [
66
+ {
67
+ label: '上边距',
68
+ name: ['props', 'commodityGroup', 'style', 'marginTop'],
69
+ type: 'Number',
70
+ addonAfter: 'px',
71
+ initialValue: 20
72
+ },
73
+ {
74
+ label: '下边距',
75
+ name: ['props', 'commodityGroup', 'style', 'marginBottom'],
76
+ type: 'Number',
77
+ addonAfter: 'px'
78
+ }
79
+ ]
80
+ }
81
+ ]
82
+ },
42
83
  {
43
84
  title: '商品文本',
44
85
  child: [
@@ -31,6 +31,11 @@ export interface ICommodityDetailDiroNewProps {
31
31
  };
32
32
  buttonStyle?: CSSProperties;
33
33
  index?: number;
34
+ commodityGroup?: {
35
+ open?: boolean;
36
+ translateY?: number;
37
+ style?: CSSProperties;
38
+ };
34
39
  }
35
40
  declare const _default: React.NamedExoticComponent<ICommodityDetailDiroNewProps>;
36
41
  export default _default;
@@ -12,16 +12,14 @@ const ExpandableText_1 = tslib_1.__importDefault(require("../../../../core/compo
12
12
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
13
13
  const FormatImage_1 = tslib_1.__importDefault(require("../../../../core/components/SxpPageRender/FormatImage"));
14
14
  const tool_1 = require("../../../../core/utils/tool");
15
+ const CommodityGroup_1 = tslib_1.__importDefault(require("../../template/components/CommodityGroup"));
15
16
  const CommodityDetailDiroNew = (_a) => {
16
17
  var _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
17
- var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index"]);
18
+ var { style, isDefault, rec, viewTime, isPost, bottom_image, tipText, swiper, commodityStyles, buttonStyle, index, commodityGroup } = _a, props = tslib_1.__rest(_a, ["style", "isDefault", "rec", "viewTime", "isPost", "bottom_image", "tipText", "swiper", "commodityStyles", "buttonStyle", "index", "commodityGroup"]);
18
19
  const [spread, setSpread] = (0, react_1.useState)(true);
19
20
  const { sxpParameter } = (0, hooks_1.useSxpDataSource)();
20
21
  const { popupDetailData, bffEventReport, isPreview, swiperRef, bffFbReport } = (0, hooks_1.useSxpDataSource)();
21
22
  const { jumpToWeb, productView } = (0, useEventReport_1.useEventReport)();
22
- const scrollRef = (0, react_1.useRef)(null);
23
- const touchRef = (0, react_1.useRef)(null);
24
- const touchMoveRef = (0, react_1.useRef)(null);
25
23
  const [stopSlide, setStopSlide] = (0, react_1.useState)(false);
26
24
  const [isBottom, setIsBottom] = (0, react_1.useState)(false);
27
25
  const [isTop, setIsTop] = (0, react_1.useState)(true);
@@ -72,25 +70,6 @@ const CommodityDetailDiroNew = (_a) => {
72
70
  const handleClickCollapse = () => {
73
71
  setSpread(!spread);
74
72
  };
75
- const handleTouchStart = (event) => {
76
- event.stopPropagation();
77
- touchRef.current = event.touches[0].clientY;
78
- touchMoveRef.current = true;
79
- };
80
- const handleTouchMove = (event) => {
81
- var _a, _b, _c, _d;
82
- if (touchMoveRef.current) {
83
- touchMoveRef.current = false;
84
- const currentY = event.touches[0].clientY;
85
- const diff = touchRef.current - currentY;
86
- if (diff > 0 && (isBottom || !stopSlide)) {
87
- (_b = (_a = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _a === void 0 ? void 0 : _a.swiper) === null || _b === void 0 ? void 0 : _b.slideNext();
88
- }
89
- else if (diff < 0 && (isTop || !stopSlide)) {
90
- (_d = (_c = swiperRef === null || swiperRef === void 0 ? void 0 : swiperRef.current) === null || _c === void 0 ? void 0 : _c.swiper) === null || _d === void 0 ? void 0 : _d.slidePrev();
91
- }
92
- }
93
- };
94
73
  const productInfoText = ({ isPost }) => {
95
74
  return (react_1.default.createElement("div", { hidden: !!product && (!(product === null || product === void 0 ? void 0 : product.info) || (product === null || product === void 0 ? void 0 : product.info) === '') },
96
75
  react_1.default.createElement(ExpandableText_1.default, { isPost: isPost, onClick: () => setShowModal(true), className: 'pb-commondityDiroNew-info', style: commodityStyles === null || commodityStyles === void 0 ? void 0 : commodityStyles.info, foldText: tipText === null || tipText === void 0 ? void 0 : tipText.foldText, unfoldText: tipText === null || tipText === void 0 ? void 0 : tipText.unfoldText, text: (product === null || product === void 0 ? void 0 : product.info) ||
@@ -103,8 +82,14 @@ Made in Italy` })));
103
82
  }
104
83
  return style;
105
84
  }, []);
85
+ const renderCommodityGroup = (0, react_1.useCallback)(() => {
86
+ var _a, _b, _c;
87
+ if (isPost)
88
+ return;
89
+ return (react_1.default.createElement(CommodityGroup_1.default, { products: (_a = data === null || data === void 0 ? void 0 : data.video) === null || _a === void 0 ? void 0 : _a.bindProducts, data: commodityGroup, defImg: (_c = (_b = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _b !== void 0 ? _b : bottom_image) !== null && _c !== void 0 ? _c : '', style: { padding: '0 19px' } }));
90
+ }, []);
106
91
  return (react_1.default.createElement("div", { className: 'pb-commondityDiroNew' },
107
- react_1.default.createElement("div", Object.assign({ ref: scrollRef, className: (0, css_1.css)(Object.assign({}, style)) }, props),
92
+ react_1.default.createElement("div", Object.assign({ className: (0, css_1.css)(Object.assign({}, style)) }, props),
108
93
  product && ((_g = product === null || product === void 0 ? void 0 : product.homePage) === null || _g === void 0 ? void 0 : _g.length) > 0 && (react_1.default.createElement(react_2.Swiper, { height: width, modules: [modules_1.Pagination, modules_1.Autoplay], pagination: {
109
94
  clickable: true,
110
95
  bulletActiveClass: 'commondityDiroNew-swipe-item-active-bullet',
@@ -125,7 +110,7 @@ Made in Italy` })));
125
110
  width: '100%',
126
111
  objectFit: 'cover',
127
112
  display: 'block',
128
- objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? (swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
113
+ objectPosition: `50% ${(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) ? -(swiper === null || swiper === void 0 ? void 0 : swiper.translateY) + 50 : 50}%`
129
114
  }, src: src }))));
130
115
  }))),
131
116
  !((_j = product === null || product === void 0 ? void 0 : product.homePage) === null || _j === void 0 ? void 0 : _j.length) && (react_1.default.createElement("div", { className: (0, css_1.css)({
@@ -142,6 +127,7 @@ Made in Italy` })));
142
127
  objectFit: 'cover',
143
128
  width: '100%'
144
129
  }), src: (_k = sxpParameter === null || sxpParameter === void 0 ? void 0 : sxpParameter.bottom_image) !== null && _k !== void 0 ? _k : bottom_image, alt: 'pdp image' }))),
130
+ renderCommodityGroup(),
145
131
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content' },
146
132
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top' },
147
133
  react_1.default.createElement("div", { className: 'pb-commondityDiroNew-content-top-left' },
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ title: string;
3
+ child: {
4
+ type: string;
5
+ label: string;
6
+ name: string[];
7
+ }[];
8
+ }[];
9
+ export default _default;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = [
4
+ {
5
+ title: '滑动事件',
6
+ child: [
7
+ {
8
+ type: 'Switch',
9
+ label: '滑动铺满全屏',
10
+ name: ['isScrollFullScreen']
11
+ }
12
+ ]
13
+ }
14
+ ];