@conecli/cone-render 0.9.1-shop2.36 → 0.9.1-shop2.38

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