@conecli/cone-render 0.10.1-shop3.70 → 0.10.1-shop3.71

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.
@@ -69,6 +69,20 @@
69
69
  background: #fff;
70
70
  }
71
71
  }
72
+ .d-floor-inspect-mask {
73
+ position: absolute;
74
+ top: 0;
75
+ left: 0;
76
+ width: 100%;
77
+ height: 100%;
78
+ background-color: rgba(0, 0, 0, 0.3); // 灰色蒙层
79
+ z-index: 999;
80
+ pointer-events: none;
81
+ box-sizing: border-box;
82
+ border: 6px solid red; // 最外层红框
83
+ // 使用内阴影模拟 6px 白色内边距,覆盖在内容边缘之上
84
+ box-shadow: inset 0 0 0 6px #fff;
85
+ }
72
86
  }
73
87
 
74
88
  //@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
  extendInfoData?: object;
7
6
  className?: string;
8
7
  containerItemClass?: object;
9
8
  style?: object;
10
9
  hasGoodsFeeds?: boolean;
11
10
  builtInComponents?: object;
12
11
  loadingEndComponentFn?: functionType;
13
12
  sectionType?: string;
14
13
  updateShopFloorDataFn?: functionType;
15
14
  updateContainerFloorListDataFn?: functionType;
16
15
  refreshFloorListDataFn?: functionType;
17
16
  refreshFloorListDataBtnLabel?: string;
18
17
  customErrorIsvFloorModule?: React.ReactElement;
19
18
  componentExtend?: React.ReactElement;
20
19
  luxuryFixedIndex?: number;
21
20
  isContainerListHasMarginBottom?: boolean;
22
21
  switchConfig?: {
23
22
  [key: string]: any;
24
23
  };
25
24
  const { windowHeight, screenHeight } = taroJdBaseInfo.info.sysInfo;
26
25
  const {
27
26
  className,
28
27
  style,
29
28
  containerItemClass = null,
30
29
  containerFloorListData,
31
30
  extendInfoData,
32
31
  builtInComponents,
33
32
  loadingEndComponentFn,
34
33
  sectionType,
35
34
  updateShopFloorDataFn,
36
35
  updateContainerFloorListDataFn,
37
36
  refreshFloorListDataFn,
38
37
  refreshFloorListDataBtnLabel,
39
38
  customErrorIsvFloorModule,
40
39
  luxuryFixedIndex = -1,
41
40
  isContainerListHasMarginBottom,
42
41
  switchConfig,
43
42
  } = props;
44
43
  const emptyFloorListHidden = switchConfig?.emptyFloorListHidden || false;
45
44
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop;
46
45
  const isHasMarginBottom = isContainerListHasMarginBottom ?? !isSageShop;
47
46
 
48
47
  const hasLiveForSageShop =
49
48
  isSageShop && taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
50
49
 
51
50
  const renderFloorItem = (
52
51
  item,
53
52
  floorItem,
54
53
  floorIndex,
55
54
  containerLayoutLeftRightMargin,
56
55
  lazyLoadState = false,
57
56
  index,
58
57
  borderStyle,
59
58
  ) => {
60
59
  return (
61
60
  <View
62
61
  className={classNames(shopContainerListStyle['d-floor-item'])}
63
62
  data-floor-uid={floorItem?.uid}
64
63
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
65
64
  data-lazy-load={lazyLoadState}
66
65
  key={floorItem.uid}
67
66
  id={`J_floor_${floorItem.uid}`}
68
67
  style={borderStyle}
69
68
  >
70
69
  {isChartH5 && (
71
70
  <View
72
71
  className={shopContainerListStyle['d-floor-chart-item']}
73
72
  id={`J_chart_floor_${floorItem?.uid}`}
74
73
  data-floor-uid={floorItem?.uid}
75
74
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
76
75
  />
77
76
  )}
78
77
  <FloorListItem
79
78
  floorIndex={floorIndex}
80
79
  floorData={floorItem}
81
80
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
82
81
  containerBorderRadius={borderStyle}
83
82
  updateShopFloorDataFn={updateShopFloorDataFn}
84
83
  loadingEndComponentFn={loadingEndComponentFn}
85
84
  extendInfoData={
86
85
  passExtendInfoModuleWhiteList.includes(floorItem?.floorExtInfo?.moduleFlag)
87
86
  ? extendInfoData
88
87
  : undefined
89
88
  }
90
89
  key={floorItem.uid}
91
90
  builtInComponents={builtInComponents}
92
91
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
93
92
  customErrorIsvFloorModule={customErrorIsvFloorModule}
94
93
  />
95
94
  {index === luxuryFixedIndex ? props.children : null}
96
95
  </View>
97
96
  );
98
97
  };
99
98
 
100
99
  const getFloorSetHeight = (item) => {
101
100
  const getHeight = item?.floorExtInfo?.floorHeight
102
101
  ? Number(item?.floorExtInfo?.floorHeight)
103
102
  : 200;
104
103
  return getHeight > 0 ? getHeight : 200;
105
104
  };
106
105
  const containerFloorListDataLen = containerFloorListData.length;
107
106
 
108
107
  const getNoDataContainerHeight = () => {
109
108
  const getWindowHeight = windowHeight > 10 ? windowHeight : screenHeight;
110
109
  const changeHeight = hasLiveForSageShop
111
110
  ? getWindowHeight
112
111
  : getWindowHeight -
113
112
  (isJdApp
114
113
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
115
114
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
116
115
  return {
117
116
  height: `${changeHeight}px`,
118
117
  };
119
118
  };
120
119
  return (
121
120
  <View
122
121
  className={classNames(className, shopContainerListStyle['d-shop-container-list'])}
123
122
  style={style}
124
123
  >
125
124
  <View
126
125
  id="J_shopContainerFloorList"
127
126
  className={
128
127
  isHasMarginBottom
129
128
  ? shopContainerListStyle['d-container-list-with-margin-bottom']
130
129
  : shopContainerListStyle['d-container-list-no-margin-bottom']
131
130
  }
132
131
  >
133
132
  {containerFloorListDataLen > 0 ? (
134
133
  containerFloorListData.map((item, index) => {
135
134
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
136
135
  const getContainerId = `J_container_${item.containerId}`;
137
136
  const borderStyle = getBorderStyle(
138
137
  item,
139
138
  index,
140
139
  containerFloorListData,
141
140
  containerFloorListDataLen,
142
141
  );
143
142
  return (
144
143
  <React.Fragment key={item.containerId + index}>
145
144
  {item.addLuxuryStyle ? (
146
145
  <View className={shopContainerListStyle['d-luxury-header']} />
147
146
  ) : null}
148
147
  {item.addLuxuryBackupStyle ? (
149
148
  <View
150
149
  style={{
151
150
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
152
151
  }}
153
152
  className={shopContainerListStyle['d-luxury-header-black']}
154
153
  />
155
154
  ) : null}
156
155
  {typeof item?.renderExtendComponent === 'function'
157
156
  ? item?.renderExtendComponent(item?.floorExtendData)
158
157
  : null}
159
158
  <View
160
159
  className={classNames(
161
160
  shopContainerListStyle['d-container-item'],
162
161
  containerItemClass,
163
162
  )}
164
163
  id={getContainerId}
165
164
  key={item.containerId}
166
165
  data-container-id={item?.containerId}
167
166
  data-container-type={item?.typeCode}
168
167
  data-container-index={index}
169
168
  style={{
170
169
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
171
170
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
172
171
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
173
172
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
174
173
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
175
174
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
176
175
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
177
176
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
178
177
  '--container-layout-left-right-margin': `${containerLayoutLeftRightMargin}px`,
179
178
  }}
180
179
  >
181
180
  {typeof item?.insertContainerStartComponent === 'function'
182
181
  ? item?.insertContainerStartComponent(item)
183
182
  : null}
184
183
  {item.floors &&
185
184
  item.floors.length > 0 &&
186
185
  item.floors?.map((floorItem, floorIndex) => {
187
186
  return index > lazyLoadStartIndex ? (
188
187
  <LazyLayoutLoad
189
188
  key={item.containerId}
190
189
  sectionType={sectionType}
191
190
  containerId={getContainerId}
192
191
  height={getFloorSetHeight(floorItem)}
193
192
  floorData={floorItem}
194
193
  >
195
194
  {renderFloorItem(
196
195
  item,
197
196
  floorItem,
198
197
  floorIndex,
199
198
  containerLayoutLeftRightMargin,
200
199
  true,
201
200
  index,
202
201
  borderStyle,
203
202
  )}
204
203
  </LazyLayoutLoad>
205
204
  ) : (
206
205
  renderFloorItem(
207
206
  item,
208
207
  floorItem,
209
208
  floorIndex,
210
209
  containerLayoutLeftRightMargin,
211
210
  false,
212
211
  index,
213
212
  borderStyle,
214
213
  )
215
214
  );
216
215
  })}
217
216
  </View>
218
217
  </React.Fragment>
219
218
  );
220
219
  })
221
220
  ) : !emptyFloorListHidden ? (
222
221
  <View
223
222
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
224
223
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
225
224
  })}
226
225
  style={getNoDataContainerHeight()}
227
226
  >
228
227
  <NetworkDataError
229
228
  netWorkShowType={NetWorkShowType.PART}
230
229
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
231
230
  backgroundColorWhite={hasLiveForSageShop}
232
231
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
233
232
  btnLabel={refreshFloorListDataBtnLabel || ''}
234
233
  />
235
234
  </View>
236
235
  ) : null}
237
236
  </View>
238
237
  </View>
239
238
  );
240
239
  updateShopDataFn: null,
240
+ import React from 'react';
241
241
  NETWORK_DATA_TYPE,
242
242
  M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
243
243
  APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT,
244
244
  containerFloorListData: ComponentInterFace.ContainerItemData[];
245
245
  extendInfoData?: object;
246
246
  className?: string;
247
247
  containerItemClass?: object;
248
248
  style?: object;
249
249
  hasGoodsFeeds?: boolean;
250
250
  builtInComponents?: object;
251
251
  loadingEndComponentFn?: functionType;
252
252
  sectionType?: string;
253
253
  updateShopFloorDataFn?: functionType;
254
254
  updateContainerFloorListDataFn?: functionType;
255
255
  refreshFloorListDataFn?: functionType;
256
256
  refreshFloorListDataBtnLabel?: string;
257
257
  customErrorIsvFloorModule?: React.ReactElement;
258
258
  componentExtend?: React.ReactElement;
259
259
  luxuryFixedIndex?: number;
260
260
  isContainerListHasMarginBottom?: boolean;
261
261
  switchConfig?: {
262
262
  [key: string]: any;
263
263
  };
264
264
  const { windowHeight, screenHeight } = taroJdBaseInfo.info.sysInfo;
265
265
  const {
266
266
  className,
267
267
  style,
268
268
  containerItemClass = null,
269
269
  containerFloorListData,
270
270
  extendInfoData,
271
271
  builtInComponents,
272
272
  loadingEndComponentFn,
273
273
  sectionType,
274
274
  updateShopFloorDataFn,
275
275
  updateContainerFloorListDataFn,
276
276
  refreshFloorListDataFn,
277
277
  refreshFloorListDataBtnLabel,
278
278
  customErrorIsvFloorModule,
279
279
  luxuryFixedIndex = -1,
280
280
  isContainerListHasMarginBottom,
281
281
  switchConfig,
282
282
  } = props;
283
283
  const emptyFloorListHidden = switchConfig?.emptyFloorListHidden || false;
284
284
  const isSageShop = taroJdBaseInfo.info?.pageInfo?.isSageShop;
285
285
  const isHasMarginBottom = isContainerListHasMarginBottom ?? !isSageShop;
286
286
 
287
287
  const hasLiveForSageShop =
288
288
  isSageShop && taroJdBaseInfo.info?.pageInfo?.isJdShowNativeImmersivePlayer;
289
289
 
290
290
  const renderFloorItem = (
291
291
  item,
292
292
  floorItem,
293
293
  floorIndex,
294
294
  containerLayoutLeftRightMargin,
295
295
  lazyLoadState = false,
296
296
  index,
297
297
  borderStyle,
298
298
  ) => {
299
299
  return (
300
300
  <View
301
301
  className={classNames(shopContainerListStyle['d-floor-item'])}
302
302
  data-floor-uid={floorItem?.uid}
303
303
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
304
304
  data-lazy-load={lazyLoadState}
305
305
  key={floorItem.uid}
306
306
  id={`J_floor_${floorItem.uid}`}
307
307
  style={borderStyle}
308
308
  >
309
309
  {isChartH5 && (
310
310
  <View
311
311
  className={shopContainerListStyle['d-floor-chart-item']}
312
312
  id={`J_chart_floor_${floorItem?.uid}`}
313
313
  data-floor-uid={floorItem?.uid}
314
314
  data-floor-type={floorItem?.floorExtInfo?.moduleFlag || ''}
315
315
  />
316
316
  )}
317
317
  <FloorListItem
318
318
  floorIndex={floorIndex}
319
319
  floorData={floorItem}
320
320
  layoutLeftRightMargin={containerLayoutLeftRightMargin}
321
321
  containerBorderRadius={borderStyle}
322
322
  updateShopFloorDataFn={updateShopFloorDataFn}
323
323
  loadingEndComponentFn={loadingEndComponentFn}
324
324
  extendInfoData={
325
325
  passExtendInfoModuleWhiteList.includes(floorItem?.floorExtInfo?.moduleFlag)
326
326
  ? extendInfoData
327
327
  : undefined
328
328
  }
329
329
  key={floorItem.uid}
330
330
  builtInComponents={builtInComponents}
331
331
  updateContainerFloorListDataFn={updateContainerFloorListDataFn}
332
332
  customErrorIsvFloorModule={customErrorIsvFloorModule}
333
333
  />
334
334
  {index === luxuryFixedIndex ? props.children : null}
335
335
  {floorItem?.inspectResult === '1' && (
336
336
  <View className={shopContainerListStyle['d-floor-inspect-mask']} />
337
337
  )}
338
338
  </View>
339
339
  );
340
340
  };
341
341
 
342
342
  const getFloorSetHeight = (item) => {
343
343
  const getHeight = item?.floorExtInfo?.floorHeight
344
344
  ? Number(item?.floorExtInfo?.floorHeight)
345
345
  : 200;
346
346
  return getHeight > 0 ? getHeight : 200;
347
347
  };
348
348
  const containerFloorListDataLen = containerFloorListData.length;
349
349
 
350
350
  const getNoDataContainerHeight = () => {
351
351
  const getWindowHeight = windowHeight > 10 ? windowHeight : screenHeight;
352
352
  const changeHeight = hasLiveForSageShop
353
353
  ? getWindowHeight
354
354
  : getWindowHeight -
355
355
  (isJdApp
356
356
  ? APP_SHOP_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT
357
357
  : M_SHOP_DOWNLOAD_HEADER_NAV_BAR_BOTTOM_MENU_HEIGHT);
358
358
  return {
359
359
  height: `${changeHeight}px`,
360
360
  };
361
361
  };
362
362
  return (
363
363
  <View
364
364
  className={classNames(className, shopContainerListStyle['d-shop-container-list'])}
365
365
  style={style}
366
366
  >
367
367
  <View
368
368
  id="J_shopContainerFloorList"
369
369
  className={
370
370
  isHasMarginBottom
371
371
  ? shopContainerListStyle['d-container-list-with-margin-bottom']
372
372
  : shopContainerListStyle['d-container-list-no-margin-bottom']
373
373
  }
374
374
  >
375
375
  {containerFloorListDataLen > 0 ? (
376
376
  containerFloorListData.map((item, index) => {
377
377
  const containerLayoutLeftRightMargin = (item.marginLeft || 0) + (item.marginRight || 0);
378
378
  const getContainerId = `J_container_${item.containerId}`;
379
379
  const borderStyle = getBorderStyle(
380
380
  item,
381
381
  index,
382
382
  containerFloorListData,
383
383
  containerFloorListDataLen,
384
384
  );
385
385
  return (
386
386
  <React.Fragment key={item.containerId + index}>
387
387
  {item.addLuxuryStyle ? (
388
388
  <View className={shopContainerListStyle['d-luxury-header']} />
389
389
  ) : null}
390
390
  {item.addLuxuryBackupStyle ? (
391
391
  <View
392
392
  style={{
393
393
  height: taroJdBaseInfo?.info?.sysInfo?.jdNativeHeaderHeight + 'px',
394
394
  }}
395
395
  className={shopContainerListStyle['d-luxury-header-black']}
396
396
  />
397
397
  ) : null}
398
398
  {typeof item?.renderExtendComponent === 'function'
399
399
  ? item?.renderExtendComponent(item?.floorExtendData)
400
400
  : null}
401
401
  <View
402
402
  className={classNames(
403
403
  shopContainerListStyle['d-container-item'],
404
404
  containerItemClass,
405
405
  )}
406
406
  id={getContainerId}
407
407
  key={item.containerId}
408
408
  data-container-id={item?.containerId}
409
409
  data-container-type={item?.typeCode}
410
410
  data-container-index={index}
411
411
  style={{
412
412
  marginBottom: item.marginBottom ? `${item.marginBottom}px` : 0,
413
413
  marginTop: item.marginTop ? `${item.marginTop}px` : 0,
414
414
  marginLeft: item.marginLeft ? `${item.marginLeft}px` : 0,
415
415
  marginRight: item.marginRight ? `${item.marginRight}px` : 0,
416
416
  borderTopLeftRadius: borderStyle?.borderTopLeftRadius || `0px`,
417
417
  borderTopRightRadius: borderStyle?.borderTopRightRadiu || `0px`,
418
418
  borderBottomLeftRadius: borderStyle?.borderBottomLeftRadius || `0px`,
419
419
  borderBottomRightRadius: borderStyle?.borderBottomRightRadius || `0px`,
420
420
  '--container-layout-left-right-margin': `${containerLayoutLeftRightMargin}px`,
421
421
  }}
422
422
  >
423
423
  {typeof item?.insertContainerStartComponent === 'function'
424
424
  ? item?.insertContainerStartComponent(item)
425
425
  : null}
426
426
  {item.floors &&
427
427
  item.floors.length > 0 &&
428
428
  item.floors?.map((floorItem, floorIndex) => {
429
429
  return index > lazyLoadStartIndex ? (
430
430
  <LazyLayoutLoad
431
431
  key={item.containerId}
432
432
  sectionType={sectionType}
433
433
  containerId={getContainerId}
434
434
  height={getFloorSetHeight(floorItem)}
435
435
  floorData={floorItem}
436
436
  >
437
437
  {renderFloorItem(
438
438
  item,
439
439
  floorItem,
440
440
  floorIndex,
441
441
  containerLayoutLeftRightMargin,
442
442
  true,
443
443
  index,
444
444
  borderStyle,
445
445
  )}
446
446
  </LazyLayoutLoad>
447
447
  ) : (
448
448
  renderFloorItem(
449
449
  item,
450
450
  floorItem,
451
451
  floorIndex,
452
452
  containerLayoutLeftRightMargin,
453
453
  false,
454
454
  index,
455
455
  borderStyle,
456
456
  )
457
457
  );
458
458
  })}
459
459
  </View>
460
460
  </React.Fragment>
461
461
  );
462
462
  })
463
463
  ) : !emptyFloorListHidden ? (
464
464
  <View
465
465
  className={classNames(shopContainerListStyle['d-container-list-no-data'], {
466
466
  [shopContainerListStyle['d-sage-shop-no-data']]: hasLiveForSageShop,
467
467
  })}
468
468
  style={getNoDataContainerHeight()}
469
469
  >
470
470
  <NetworkDataError
471
471
  netWorkShowType={NetWorkShowType.PART}
472
472
  netWorkDataType={NETWORK_DATA_TYPE.DATA_ERROR}
473
473
  backgroundColorWhite={hasLiveForSageShop}
474
474
  refreshCallBackFn={refreshFloorListDataFn ? refreshFloorListDataFn : null}
475
475
  btnLabel={refreshFloorListDataBtnLabel || ''}
476
476
  />
477
477
  </View>
478
478
  ) : null}
479
479
  </View>
480
480
  </View>
481
481
  );
482
482
  updateShopDataFn: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@conecli/cone-render",
3
- "version": "0.10.1-shop3.70",
3
+ "version": "0.10.1-shop3.71",
4
4
  "private": false,
5
5
  "files": [
6
6
  "dist/"