@conecli/cone-render 0.10.1-shop-beta.5 → 0.10.1-shop3.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 (37) hide show
  1. package/dist/api/index.ts +1 -1
  2. package/dist/common/const.ts +1 -1
  3. package/dist/common/index.h5.ts +1 -1
  4. package/dist/common/index.jd.ts +1 -1
  5. package/dist/common/index.ts +1 -1
  6. package/dist/common/index.weapp.ts +1 -1
  7. package/dist/common/pageType.ts +1 -1
  8. package/dist/common/sgmCustomCode.ts +1 -1
  9. package/dist/components/base/CustomVideo/common.ts +1 -0
  10. package/dist/components/base/CustomVideo/index.tsx +1 -1
  11. package/dist/components/base/LazyLoadImage/index.h5.module.scss +8 -4
  12. package/dist/components/base/LazyLoadImage/index.h5.tsx +1 -1
  13. package/dist/components/base/Price/Base/index.tsx +1 -1
  14. package/dist/components/base/Price/Double/index.tsx +1 -1
  15. package/dist/components/floorItem.tsx +1 -1
  16. package/dist/components/isv/Floor/index.tsx +1 -1
  17. package/dist/interface/component.ts +1 -1
  18. package/dist/interface/jumpEventReport.ts +1 -1
  19. package/dist/interface/service.ts +1 -1
  20. package/dist/jumpEventReport/index.weapp.ts +1 -1
  21. package/dist/jumpEventReport/jumpUrlConfig/base.ts +1 -1
  22. package/dist/jumpEventReport/logEventConfig.ts +1 -1
  23. package/dist/modules/ContainerFloorList/index.h5.tsx +1 -1
  24. package/dist/modules/ContainerFloorList/index.tsx +1 -1
  25. package/dist/open/api/util.ts +1 -1
  26. package/dist/service/http/colorSign.ts +1 -1
  27. package/dist/service/http/h5Http.ts +1 -0
  28. package/dist/service/http/index.h5.ts +1 -0
  29. package/dist/service/requestServer.h5.ts +1 -0
  30. package/dist/service/requestServer.ts +1 -1
  31. package/dist/utils/connectNativeJsBridge.ts +1 -1
  32. package/dist/utils/h5Utils.ts +1 -1
  33. package/dist/utils/index.h5.ts +1 -1
  34. package/dist/utils/index.ts +1 -1
  35. package/dist/utils/index.weapp.ts +1 -1
  36. package/dist/utils/utils.ts +1 -1
  37. package/package.json +1 -1
@@ -1 +1 @@
1
- import React from "react";
2
1
  NETWORK_DATA_TYPE,
3
2
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
4
3
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
5
4
  containerFloorListData: ComponentInterFace.ContainerItemData[];
6
5
  className?: string;
7
6
  containerItemClass?: object;
8
7
  style?: object;
9
8
  hasGoodsFeeds?: boolean;
10
9
  builtInComponents?: Object;
11
10
  loadingEndComponentFn?: Function;
12
11
  sectionType?: string;
13
12
  updateShopFloorDataFn?: Function;
14
13
  updateContainerFloorListDataFn?: Function;
15
14
  refreshFloorListDataFn?: Function;
16
15
  refreshFloorListDataBtnLabel?: string;
17
16
  customErrorIsvFloorModule?: React.ReactElement;
18
17
  componentExtend?: React.ReactElement;
19
18
  luxuryFixedIndex?: number;
20
19
  const { windowHeight } = taroJdBaseInfo.info.sysInfo;
21
20
  const {
22
21
  className,
23
22
  style,
24
23
  containerItemClass = null,
25
24
  containerFloorListData,
26
25
  builtInComponents,
27
26
  loadingEndComponentFn,
28
27
  sectionType,
29
28
  updateShopFloorDataFn,
30
29
  updateContainerFloorListDataFn,
31
30
  refreshFloorListDataFn,
32
31
  refreshFloorListDataBtnLabel,
33
32
  customErrorIsvFloorModule,
34
33
  luxuryFixedIndex = -1,
35
34
  } = props;
36
35
 
37
36
  const renderFloorItem = (
38
37
  item,
39
38
  floorItem,
40
39
  floorIndex,
41
40
  containerLayoutLeftRightMargin,
42
41
  lazyLoadState = false,
43
42
  index
44
43
  ) => {
45
44
  return (
46
45
  <View
47
46
  className={classNames(shopContainerListStyle["d-floor-item"])}
48
47
  data-floor-uid={floorItem?.uid}
49
48
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ""}
50
49
  data-lazy-load={lazyLoadState}
51
50
  key={floorItem.uid}
52
51
  id={`J_floor_${floorItem.uid}`}
53
52
  style={{
54
53
  borderRadius: `${item?.borderRadius || 0}px`,
55
54
  }}
56
55
  >
57
56
  {isChartH5 && (
58
57
  <View
59
58
  className={shopContainerListStyle["d-floor-chart-item"]}
60
59
  id={`J_chart_floor_${floorItem?.uid}`}
61
60
  data-floor-uid={floorItem?.uid}
62
61
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ""}
63
62
  />
64
63
  )}
65
64
  <FloorListItem
66
65
  floorIndex={floorIndex}
67
66
  floorData={floorItem}
68
67
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
69
68
  containerBorderRadius={item?.borderRadius || 0}
70
69
  updateShopFloorDataFn={updateShopFloorDataFn}
71
70
  loadingEndComponentFn={loadingEndComponentFn}
72
71
  key={floorItem.uid}
73
72
  builtInComponents={builtInComponents}
74
73
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
75
74
  customErrorIsvFloorModule={customErrorIsvFloorModule}
76
75
  />
77
76
  {index === luxuryFixedIndex ? props.children : null}
78
77
  </View>
79
78
  );
80
79
  };
81
80
 
82
81
  const getFloorSetHeight = (item) => {
83
82
  const getHeight = item?.floorExtInfo?.floorHeight
84
83
  ? Number(item?.floorExtInfo?.floorHeight)
85
84
  : 200;
86
85
  return getHeight > 0 ? getHeight : 200;
87
86
  };
88
87
  return (
89
88
  <View
90
89
  className={classNames(
91
90
  className,
92
91
  shopContainerListStyle["d-shop-container-list"]
93
92
  )}
94
93
  style={style}
95
94
  >
96
95
  <View id="J_shopContainerFloorList">
97
96
  {containerFloorListData.length > 0 ? (
98
97
  containerFloorListData.map((item, index) => {
99
98
  const containerLayoutLeftRightMargin =
100
99
  (item.marginLeft || 0) + (item.marginRight || 0);
101
100
  const getContainerId = `J_container_${item.containerId}`;
102
101
  return (
103
102
  <React.Fragment key={item.containerId + index}>
104
103
  {item.addLuxuryStyle ? (
105
104
  <View className={shopContainerListStyle["d-luxury-header"]} />
106
105
  ) : null}
107
106
  {item.addLuxuryBackupStyle ? (
108
107
  <View
109
108
  style={{
110
109
  height:
111
110
  taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight +
112
111
  "px",
113
112
  }}
114
113
  className={shopContainerListStyle["d-luxury-header-black"]}
115
114
  />
116
115
  ) : null}
117
116
  {typeof item?.renderExtendComponent === "function"
118
117
  ? item?.renderExtendComponent(item?.floorExtendData)
119
118
  : null}
120
119
  <View
121
120
  className={classNames(
122
121
  shopContainerListStyle["d-container-item"],
123
122
  containerItemClass
124
123
  )}
125
124
  id={getContainerId}
126
125
  key={item.containerId}
127
126
  data-container-id={item?.containerId}
128
127
  data-container-type={item?.typeCode}
129
128
  style={{
130
129
  marginBottom: item.marginBottom
131
130
  ? `${item.marginBottom}px`
132
131
  : 0,
133
132
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
134
133
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
135
134
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
136
135
  borderRadius: item.borderRadius
137
136
  ? `${item.borderRadius}px`
138
137
  : 0,
139
138
  }}
140
139
  >
141
140
  {typeof item?.insertContainerStartComponent === "function"
142
141
  ? item?.insertContainerStartComponent(item)
143
142
  : null}
144
143
  {item.floors &&
145
144
  item.floors.length > 0 &&
146
145
  item.floors?.map((floorItem, floorIndex) => {
147
146
  return index > lazyLoadStartIndex ? (
148
147
  <LazyLayoutLoad
149
148
  key={item.containerId}
150
149
  sectionType={sectionType}
151
150
  containerId={getContainerId}
152
151
  height={getFloorSetHeight(floorItem)}
153
152
  floorData={floorItem}
154
153
  >
155
154
  {renderFloorItem(
156
155
  item,
157
156
  floorItem,
158
157
  floorIndex,
159
158
  containerLayoutLeftRightMargin,
160
159
  true,
161
160
  index
162
161
  )}
163
162
  </LazyLayoutLoad>
164
163
  ) : (
165
164
  renderFloorItem(
166
165
  item,
167
166
  floorItem,
168
167
  floorIndex,
169
168
  containerLayoutLeftRightMargin,
170
169
  false,
171
170
  index
172
171
  )
173
172
  );
174
173
  })}
175
174
  </View>
176
175
  </React.Fragment>
177
176
  );
178
177
  })
179
178
  ) : (
180
179
  <View
181
180
  className={shopContainerListStyle["d-container-list-no-data"]}
182
181
  style={{
183
182
  height: `${
184
183
  windowHeight -
185
184
  (isJdApp
186
185
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
187
186
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT)
188
187
  }px`,
189
188
  }}
190
189
  >
191
190
  <NetworkDataError
192
191
  netWorkShowType={NetWorkShowType.PART}
193
192
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
194
193
  refreshCallBackFn={
195
194
  refreshFloorListDataFn ? refreshFloorListDataFn : null
196
195
  }
197
196
  btnLabel={refreshFloorListDataBtnLabel || ""}
198
197
  />
199
198
  </View>
200
199
  )}
201
200
  </View>
202
201
  </View>
203
202
  );
203
+ import React from 'react'
204
204
  NETWORK_DATA_TYPE,
205
205
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
206
206
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
207
207
  containerFloorListData: ComponentInterFace.ContainerItemData[]
208
208
  className?: string
209
209
  containerItemClass?: object
210
210
  style?: object
211
211
  hasGoodsFeeds?: boolean
212
212
  builtInComponents?: Object
213
213
  loadingEndComponentFn?: Function
214
214
  sectionType?: string
215
215
  updateShopFloorDataFn?: Function
216
216
  updateContainerFloorListDataFn?: Function
217
217
  refreshFloorListDataFn?: Function
218
218
  refreshFloorListDataBtnLabel?: string
219
219
  customErrorIsvFloorModule?: React.ReactElement
220
220
  componentExtend?: React.ReactElement
221
221
  luxuryFixedIndex?: number
222
222
  const { windowHeight } = taroJdBaseInfo.info.sysInfo
223
223
  const {
224
224
  className,
225
225
  style,
226
226
  containerItemClass = null,
227
227
  containerFloorListData,
228
228
  builtInComponents,
229
229
  loadingEndComponentFn,
230
230
  sectionType,
231
231
  updateShopFloorDataFn,
232
232
  updateContainerFloorListDataFn,
233
233
  refreshFloorListDataFn,
234
234
  refreshFloorListDataBtnLabel,
235
235
  customErrorIsvFloorModule,
236
236
  luxuryFixedIndex = -1,
237
237
  } = props
238
238
 
239
239
  const renderFloorItem = (
240
240
  item,
241
241
  floorItem,
242
242
  floorIndex,
243
243
  containerLayoutLeftRightMargin,
244
244
  lazyLoadState = false,
245
245
  index,
246
246
  borderStyle,
247
247
  ) => {
248
248
  return (
249
249
  <View
250
250
  className={classNames(shopContainerListStyle['d-floor-item'])}
251
251
  data-floor-uid={floorItem?.uid}
252
252
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
253
253
  data-lazy-load={lazyLoadState}
254
254
  key={floorItem.uid}
255
255
  id={`J_floor_${floorItem.uid}`}
256
256
  style={borderStyle}
257
257
  >
258
258
  {isChartH5 && (
259
259
  <View
260
260
  className={shopContainerListStyle['d-floor-chart-item']}
261
261
  id={`J_chart_floor_${floorItem?.uid}`}
262
262
  data-floor-uid={floorItem?.uid}
263
263
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
264
264
  />
265
265
  )}
266
266
  <FloorListItem
267
267
  floorIndex={floorIndex}
268
268
  floorData={floorItem}
269
269
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
270
270
  containerBorderRadius={borderStyle}
271
271
  updateShopFloorDataFn={updateShopFloorDataFn}
272
272
  loadingEndComponentFn={loadingEndComponentFn}
273
273
  key={floorItem.uid}
274
274
  builtInComponents={builtInComponents}
275
275
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
276
276
  customErrorIsvFloorModule={customErrorIsvFloorModule}
277
277
  />
278
278
  {index === luxuryFixedIndex ? props.children : null}
279
279
  </View>
280
280
  )
281
281
  }
282
282
 
283
283
  const getFloorSetHeight = (item) => {
284
284
  const getHeight = item?.floorExtInfo?.floorHeight
285
285
  ? Number(item?.floorExtInfo?.floorHeight)
286
286
  : 200
287
287
  return getHeight > 0 ? getHeight : 200
288
288
  }
289
289
  const containerFloorListDataLen = containerFloorListData.length
290
290
  return (
291
291
  <View
292
292
  className={classNames(
293
293
  className,
294
294
  shopContainerListStyle['d-shop-container-list'],
295
295
  )}
296
296
  style={style}
297
297
  >
298
298
  <View id="J_shopContainerFloorList">
299
299
  {containerFloorListDataLen > 0 ? (
300
300
  containerFloorListData.map((item, index) => {
301
301
  const containerLayoutLeftRightMargin =
302
302
  (item.marginLeft || 0) + (item.marginRight || 0)
303
303
  const getContainerId = `J_container_${item.containerId}`
304
304
  const borderStyle = getBorderStyle(
305
305
  item,
306
306
  index,
307
307
  containerFloorListData,
308
308
  containerFloorListDataLen,
309
309
  )
310
310
  if (index === containerFloorListDataLen - 1) item.marginBottom = 8
311
311
  return (
312
312
  <React.Fragment key={item.containerId + index}>
313
313
  {item.addLuxuryStyle ? (
314
314
  <View className={shopContainerListStyle['d-luxury-header']} />
315
315
  ) : null}
316
316
  {item.addLuxuryBackupStyle ? (
317
317
  <View
318
318
  style={{
319
319
  height:
320
320
  taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight +
321
321
  'px',
322
322
  }}
323
323
  className={shopContainerListStyle['d-luxury-header-black']}
324
324
  />
325
325
  ) : null}
326
326
  {typeof item?.renderExtendComponent === 'function'
327
327
  ? item?.renderExtendComponent(item?.floorExtendData)
328
328
  : null}
329
329
  <View
330
330
  className={classNames(
331
331
  shopContainerListStyle['d-container-item'],
332
332
  containerItemClass,
333
333
  )}
334
334
  id={getContainerId}
335
335
  key={item.containerId}
336
336
  data-container-id={item?.containerId}
337
337
  data-container-type={item?.typeCode}
338
338
  style={{
339
339
  marginBottom: item.marginBottom
340
340
  ? `${item.marginBottom}px`
341
341
  : 0,
342
342
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
343
343
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
344
344
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
345
345
  borderTopLeftRadius:
346
346
  borderStyle?.borderTopLeftRadius || `0px`,
347
347
  borderTopRightRadius:
348
348
  borderStyle?.borderTopRightRadiu || `0px`,
349
349
  borderBottomLeftRadius:
350
350
  borderStyle?.borderBottomLeftRadius || `0px`,
351
351
  borderBottomRightRadius:
352
352
  borderStyle?.borderBottomRightRadius || `0px`,
353
353
  }}
354
354
  >
355
355
  {typeof item?.insertContainerStartComponent === 'function'
356
356
  ? item?.insertContainerStartComponent(item)
357
357
  : null}
358
358
  {item.floors &&
359
359
  item.floors.length > 0 &&
360
360
  item.floors?.map((floorItem, floorIndex) => {
361
361
  return index > lazyLoadStartIndex ? (
362
362
  <LazyLayoutLoad
363
363
  key={item.containerId}
364
364
  sectionType={sectionType}
365
365
  containerId={getContainerId}
366
366
  height={getFloorSetHeight(floorItem)}
367
367
  floorData={floorItem}
368
368
  >
369
369
  {renderFloorItem(
370
370
  item,
371
371
  floorItem,
372
372
  floorIndex,
373
373
  containerLayoutLeftRightMargin,
374
374
  true,
375
375
  index,
376
376
  borderStyle,
377
377
  )}
378
378
  </LazyLayoutLoad>
379
379
  ) : (
380
380
  renderFloorItem(
381
381
  item,
382
382
  floorItem,
383
383
  floorIndex,
384
384
  containerLayoutLeftRightMargin,
385
385
  false,
386
386
  index,
387
387
  borderStyle,
388
388
  )
389
389
  )
390
390
  })}
391
391
  </View>
392
392
  </React.Fragment>
393
393
  )
394
394
  })
395
395
  ) : (
396
396
  <View
397
397
  className={shopContainerListStyle['d-container-list-no-data']}
398
398
  style={{
399
399
  height: `${
400
400
  windowHeight -
401
401
  (isJdApp
402
402
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
403
403
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT)
404
404
  }px`,
405
405
  }}
406
406
  >
407
407
  <NetworkDataError
408
408
  netWorkShowType={NetWorkShowType.PART}
409
409
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
410
410
  refreshCallBackFn={
411
411
  refreshFloorListDataFn ? refreshFloorListDataFn : null
412
412
  }
413
413
  btnLabel={refreshFloorListDataBtnLabel || ''}
414
414
  />
415
415
  </View>
416
416
  )}
417
417
  </View>
418
418
  </View>
419
419
  )