@conecli/cone-render 0.10.1-shop3.45 → 0.10.1-shop3.47

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.
@@ -1 +1 @@
1
- import React, { useRef } from 'react';
2
1
  const {
3
2
  className,
4
3
  pointClassName,
5
4
  children,
6
5
  reportData,
7
6
  customReportDataKey,
8
7
  customReportDataFn,
9
8
  trackCallback,
10
9
  ...otherProps
11
10
  } = props;
12
11
  const itemViewExposureRef = useRef(null);
13
12
  const isCustomReport = customReportDataKey && customReportDataFn;
14
13
  const checkReportData = Array.isArray(reportData);
15
14
  const [floorData, mInfo] = checkReportData ? reportData : [];
16
15
  const checkReportDataState = isCustomReport ? true : floorData && mInfo;
17
16
 
18
17
  floorData && mInfo && !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0);
19
18
  return (
20
19
  <View
21
20
  ref={itemViewExposureRef}
22
21
  className={classNames(itemViewExposureSmartStyle['d-item-point-layout'], className)}
23
22
  {...otherProps}
24
23
  >
25
24
  {children ? children : null}
26
25
  {checkReportDataState && (
27
26
  <ExposureSmart
28
27
  className={classNames(pointClassName, {
29
28
  [itemViewExposureSmartStyle['d-item-chart-point']]: isChartH5,
30
29
  })}
31
30
  innerRef={itemViewExposureRef}
32
31
  reportData={reportData}
33
32
  trackCallback={trackCallback}
34
33
  customReportDataFn={customReportDataFn}
35
34
  customReportDataKey={customReportDataKey}
36
35
  markPoint
37
36
  />
38
37
  )}
39
38
  </View>
40
39
  );
41
40
  reportData: [],
42
41
  customReportDataKey: null,
43
42
  customReportDataFn: null,
44
43
  customReportDataForMapFn: null,
44
+ import React, { useRef, useEffect } from 'react';
45
45
  const {
46
46
  className,
47
47
  pointClassName,
48
48
  children,
49
49
  reportData,
50
50
  customReportDataKey,
51
51
  customReportDataFn,
52
52
  trackCallback,
53
53
  ...otherProps
54
54
  } = props;
55
55
  const itemViewExposureRef = useRef(null);
56
56
  const isCustomReport = customReportDataKey && customReportDataFn;
57
57
  const checkReportData = Array.isArray(reportData);
58
58
  const [floorData, mInfo] = checkReportData ? reportData : [];
59
59
  const checkReportDataState = isCustomReport ? true : floorData && mInfo;
60
60
 
61
61
  floorData && mInfo && !mInfo.hasOwnProperty('pos') && (mInfo.pos = 0);
62
62
  return (
63
63
  <View
64
64
  ref={itemViewExposureRef}
65
65
  className={classNames(itemViewExposureSmartStyle['d-item-point-layout'], className)}
66
66
  {...otherProps}
67
67
  >
68
68
  {children ? children : null}
69
69
  {checkReportDataState && (
70
70
  <ExposureSmart
71
71
  className={classNames(pointClassName, {
72
72
  [itemViewExposureSmartStyle['d-item-chart-point']]: isChartH5,
73
73
  })}
74
74
  innerRef={itemViewExposureRef}
75
75
  reportData={reportData}
76
76
  trackCallback={trackCallback}
77
77
  customReportDataFn={customReportDataFn}
78
78
  customReportDataKey={customReportDataKey}
79
79
  markPoint
80
80
  />
81
81
  )}
82
82
  </View>
83
83
  );
84
84
  reportData: [],
85
85
  customReportDataKey: null,
86
86
  customReportDataFn: null,
87
87
  customReportDataForMapFn: null,