@visactor/react-vchart 1.1.0-beta.7 → 1.1.0-beta.8

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 (253) hide show
  1. package/cjs/VChart.d.ts +1 -1
  2. package/cjs/charts/AreaChart.d.ts +4 -1
  3. package/cjs/charts/AreaChart.js.map +1 -1
  4. package/cjs/charts/BarChart.d.ts +4 -1
  5. package/cjs/charts/BarChart.js.map +1 -1
  6. package/cjs/charts/BaseChart.d.ts +6 -5
  7. package/cjs/charts/BaseChart.js +24 -10
  8. package/cjs/charts/BaseChart.js.map +1 -1
  9. package/cjs/charts/BoxPlotChart.d.ts +4 -1
  10. package/cjs/charts/BoxPlotChart.js.map +1 -1
  11. package/cjs/charts/CircularProgressChart.d.ts +4 -1
  12. package/cjs/charts/CircularProgressChart.js.map +1 -1
  13. package/cjs/charts/CommonChart.d.ts +4 -1
  14. package/cjs/charts/CommonChart.js.map +1 -1
  15. package/cjs/charts/FunnelChart.d.ts +4 -1
  16. package/cjs/charts/FunnelChart.js.map +1 -1
  17. package/cjs/charts/HistogramChart.d.ts +4 -1
  18. package/cjs/charts/HistogramChart.js.map +1 -1
  19. package/cjs/charts/LineChart.d.ts +4 -1
  20. package/cjs/charts/LineChart.js.map +1 -1
  21. package/cjs/charts/LinearProgressChart.d.ts +4 -1
  22. package/cjs/charts/LinearProgressChart.js.map +1 -1
  23. package/cjs/charts/MapChart.d.ts +4 -1
  24. package/cjs/charts/MapChart.js.map +1 -1
  25. package/cjs/charts/PieChart.d.ts +4 -1
  26. package/cjs/charts/PieChart.js.map +1 -1
  27. package/cjs/charts/RadarChart.d.ts +4 -1
  28. package/cjs/charts/RadarChart.js.map +1 -1
  29. package/cjs/charts/RangeColumnChart.d.ts +4 -1
  30. package/cjs/charts/RangeColumnChart.js +1 -2
  31. package/cjs/charts/RangeColumnChart.js.map +1 -1
  32. package/cjs/charts/RoseChart.d.ts +4 -1
  33. package/cjs/charts/RoseChart.js.map +1 -1
  34. package/cjs/charts/ScatterChart.d.ts +4 -1
  35. package/cjs/charts/ScatterChart.js +2 -1
  36. package/cjs/charts/ScatterChart.js.map +1 -1
  37. package/cjs/charts/SequenceChart.d.ts +4 -1
  38. package/cjs/charts/SequenceChart.js.map +1 -1
  39. package/cjs/charts/WordCloudChart.d.ts +4 -1
  40. package/cjs/charts/WordCloudChart.js.map +1 -1
  41. package/cjs/charts/index.js +1 -1
  42. package/cjs/components/Axis.d.ts +4 -5
  43. package/cjs/components/Axis.js.map +1 -1
  44. package/cjs/components/Brush.d.ts +5 -0
  45. package/cjs/components/Brush.js +10 -0
  46. package/cjs/components/Brush.js.map +1 -0
  47. package/cjs/components/Crosshair.d.ts +4 -0
  48. package/cjs/components/Crosshair.js +10 -0
  49. package/cjs/components/Crosshair.js.map +1 -0
  50. package/cjs/components/DataZoom.d.ts +5 -0
  51. package/cjs/components/DataZoom.js +10 -0
  52. package/cjs/components/DataZoom.js.map +1 -0
  53. package/cjs/components/Legend.d.ts +4 -8
  54. package/cjs/components/Legend.js.map +1 -1
  55. package/cjs/components/Mark.d.ts +1 -1
  56. package/cjs/components/Mark.js.map +1 -1
  57. package/cjs/components/MarkArea.d.ts +4 -0
  58. package/cjs/components/MarkArea.js +10 -0
  59. package/cjs/components/MarkArea.js.map +1 -0
  60. package/cjs/components/MarkLine.d.ts +4 -0
  61. package/cjs/components/MarkLine.js +10 -0
  62. package/cjs/components/MarkLine.js.map +1 -0
  63. package/cjs/components/MarkPoint.d.ts +4 -0
  64. package/cjs/components/MarkPoint.js +10 -0
  65. package/cjs/components/MarkPoint.js.map +1 -0
  66. package/cjs/components/Player.d.ts +5 -0
  67. package/cjs/components/Player.js +10 -0
  68. package/cjs/components/Player.js.map +1 -0
  69. package/cjs/components/Region.d.ts +4 -4
  70. package/cjs/components/Region.js.map +1 -1
  71. package/cjs/components/Scrollbar.d.ts +5 -0
  72. package/cjs/components/Scrollbar.js +10 -0
  73. package/cjs/components/Scrollbar.js.map +1 -0
  74. package/cjs/components/Tooltip.d.ts +4 -0
  75. package/cjs/components/Tooltip.js +10 -0
  76. package/cjs/components/Tooltip.js.map +1 -0
  77. package/cjs/components/index.d.ts +9 -0
  78. package/cjs/components/index.js +7 -2
  79. package/cjs/components/index.js.map +1 -1
  80. package/cjs/containers/withContainer.d.ts +2 -2
  81. package/cjs/containers/withContainer.js.map +1 -1
  82. package/cjs/context/chart.js +1 -2
  83. package/cjs/eventsUtils.d.ts +107 -47
  84. package/cjs/eventsUtils.js +21 -4
  85. package/cjs/eventsUtils.js.map +1 -1
  86. package/cjs/index.js +2 -1
  87. package/cjs/series/Area.d.ts +5 -5
  88. package/cjs/series/Area.js.map +1 -1
  89. package/cjs/series/Bar.d.ts +5 -5
  90. package/cjs/series/Bar.js.map +1 -1
  91. package/cjs/series/BaseSeries.d.ts +1 -1
  92. package/cjs/series/BaseSeries.js.map +1 -1
  93. package/cjs/series/BoxPlot.d.ts +5 -5
  94. package/cjs/series/BoxPlot.js.map +1 -1
  95. package/cjs/series/CircularProgress.d.ts +5 -5
  96. package/cjs/series/CircularProgress.js +2 -1
  97. package/cjs/series/CircularProgress.js.map +1 -1
  98. package/cjs/series/Dot.d.ts +5 -5
  99. package/cjs/series/Dot.js.map +1 -1
  100. package/cjs/series/Funnel.d.ts +5 -5
  101. package/cjs/series/Funnel.js.map +1 -1
  102. package/cjs/series/Line.d.ts +5 -5
  103. package/cjs/series/Line.js.map +1 -1
  104. package/cjs/series/LinearProgress.d.ts +5 -5
  105. package/cjs/series/LinearProgress.js.map +1 -1
  106. package/cjs/series/Link.d.ts +5 -5
  107. package/cjs/series/Link.js.map +1 -1
  108. package/cjs/series/Map.d.ts +5 -5
  109. package/cjs/series/Map.js.map +1 -1
  110. package/cjs/series/Pie.d.ts +5 -5
  111. package/cjs/series/Pie.js +1 -2
  112. package/cjs/series/Pie.js.map +1 -1
  113. package/cjs/series/Radar.d.ts +5 -5
  114. package/cjs/series/Radar.js.map +1 -1
  115. package/cjs/series/RangeColumn.d.ts +5 -5
  116. package/cjs/series/RangeColumn.js.map +1 -1
  117. package/cjs/series/Rose.d.ts +5 -5
  118. package/cjs/series/Rose.js.map +1 -1
  119. package/cjs/series/Scatter.d.ts +5 -5
  120. package/cjs/series/Scatter.js.map +1 -1
  121. package/cjs/series/Series.d.ts +5 -6
  122. package/cjs/series/Series.js.map +1 -1
  123. package/cjs/series/WordCloud.d.ts +5 -5
  124. package/cjs/series/WordCloud.js.map +1 -1
  125. package/cjs/series/index.js +1 -1
  126. package/cjs/util.js +1 -1
  127. package/esm/VChart.d.ts +1 -1
  128. package/esm/charts/AreaChart.d.ts +4 -1
  129. package/esm/charts/AreaChart.js.map +1 -1
  130. package/esm/charts/BarChart.d.ts +4 -1
  131. package/esm/charts/BarChart.js.map +1 -1
  132. package/esm/charts/BaseChart.d.ts +6 -5
  133. package/esm/charts/BaseChart.js +25 -10
  134. package/esm/charts/BaseChart.js.map +1 -1
  135. package/esm/charts/BoxPlotChart.d.ts +4 -1
  136. package/esm/charts/BoxPlotChart.js.map +1 -1
  137. package/esm/charts/CircularProgressChart.d.ts +4 -1
  138. package/esm/charts/CircularProgressChart.js.map +1 -1
  139. package/esm/charts/CommonChart.d.ts +4 -1
  140. package/esm/charts/CommonChart.js.map +1 -1
  141. package/esm/charts/FunnelChart.d.ts +4 -1
  142. package/esm/charts/FunnelChart.js.map +1 -1
  143. package/esm/charts/HistogramChart.d.ts +4 -1
  144. package/esm/charts/HistogramChart.js.map +1 -1
  145. package/esm/charts/LineChart.d.ts +4 -1
  146. package/esm/charts/LineChart.js.map +1 -1
  147. package/esm/charts/LinearProgressChart.d.ts +4 -1
  148. package/esm/charts/LinearProgressChart.js.map +1 -1
  149. package/esm/charts/MapChart.d.ts +4 -1
  150. package/esm/charts/MapChart.js.map +1 -1
  151. package/esm/charts/PieChart.d.ts +4 -1
  152. package/esm/charts/PieChart.js.map +1 -1
  153. package/esm/charts/RadarChart.d.ts +4 -1
  154. package/esm/charts/RadarChart.js.map +1 -1
  155. package/esm/charts/RangeColumnChart.d.ts +4 -1
  156. package/esm/charts/RangeColumnChart.js +1 -2
  157. package/esm/charts/RangeColumnChart.js.map +1 -1
  158. package/esm/charts/RoseChart.d.ts +4 -1
  159. package/esm/charts/RoseChart.js.map +1 -1
  160. package/esm/charts/ScatterChart.d.ts +4 -1
  161. package/esm/charts/ScatterChart.js +2 -1
  162. package/esm/charts/ScatterChart.js.map +1 -1
  163. package/esm/charts/SequenceChart.d.ts +4 -1
  164. package/esm/charts/SequenceChart.js.map +1 -1
  165. package/esm/charts/WordCloudChart.d.ts +4 -1
  166. package/esm/charts/WordCloudChart.js.map +1 -1
  167. package/esm/charts/index.js +1 -1
  168. package/esm/components/Axis.d.ts +4 -5
  169. package/esm/components/Axis.js.map +1 -1
  170. package/esm/components/Brush.d.ts +5 -0
  171. package/esm/components/Brush.js +6 -0
  172. package/esm/components/Brush.js.map +1 -0
  173. package/esm/components/Crosshair.d.ts +4 -0
  174. package/esm/components/Crosshair.js +4 -0
  175. package/esm/components/Crosshair.js.map +1 -0
  176. package/esm/components/DataZoom.d.ts +5 -0
  177. package/esm/components/DataZoom.js +6 -0
  178. package/esm/components/DataZoom.js.map +1 -0
  179. package/esm/components/Legend.d.ts +4 -8
  180. package/esm/components/Legend.js.map +1 -1
  181. package/esm/components/Mark.d.ts +1 -1
  182. package/esm/components/Mark.js.map +1 -1
  183. package/esm/components/MarkArea.d.ts +4 -0
  184. package/esm/components/MarkArea.js +4 -0
  185. package/esm/components/MarkArea.js.map +1 -0
  186. package/esm/components/MarkLine.d.ts +4 -0
  187. package/esm/components/MarkLine.js +4 -0
  188. package/esm/components/MarkLine.js.map +1 -0
  189. package/esm/components/MarkPoint.d.ts +4 -0
  190. package/esm/components/MarkPoint.js +4 -0
  191. package/esm/components/MarkPoint.js.map +1 -0
  192. package/esm/components/Player.d.ts +5 -0
  193. package/esm/components/Player.js +6 -0
  194. package/esm/components/Player.js.map +1 -0
  195. package/esm/components/Region.d.ts +4 -4
  196. package/esm/components/Region.js.map +1 -1
  197. package/esm/components/Scrollbar.d.ts +5 -0
  198. package/esm/components/Scrollbar.js +6 -0
  199. package/esm/components/Scrollbar.js.map +1 -0
  200. package/esm/components/Tooltip.d.ts +4 -0
  201. package/esm/components/Tooltip.js +4 -0
  202. package/esm/components/Tooltip.js.map +1 -0
  203. package/esm/components/index.d.ts +9 -0
  204. package/esm/components/index.js +19 -1
  205. package/esm/components/index.js.map +1 -1
  206. package/esm/containers/withContainer.d.ts +2 -2
  207. package/esm/containers/withContainer.js.map +1 -1
  208. package/esm/context/chart.js +1 -2
  209. package/esm/eventsUtils.d.ts +107 -47
  210. package/esm/eventsUtils.js +28 -3
  211. package/esm/eventsUtils.js.map +1 -1
  212. package/esm/index.js +2 -1
  213. package/esm/series/Area.d.ts +5 -5
  214. package/esm/series/Area.js.map +1 -1
  215. package/esm/series/Bar.d.ts +5 -5
  216. package/esm/series/Bar.js.map +1 -1
  217. package/esm/series/BaseSeries.d.ts +1 -1
  218. package/esm/series/BaseSeries.js.map +1 -1
  219. package/esm/series/BoxPlot.d.ts +5 -5
  220. package/esm/series/BoxPlot.js.map +1 -1
  221. package/esm/series/CircularProgress.d.ts +5 -5
  222. package/esm/series/CircularProgress.js +2 -1
  223. package/esm/series/CircularProgress.js.map +1 -1
  224. package/esm/series/Dot.d.ts +5 -5
  225. package/esm/series/Dot.js.map +1 -1
  226. package/esm/series/Funnel.d.ts +5 -5
  227. package/esm/series/Funnel.js.map +1 -1
  228. package/esm/series/Line.d.ts +5 -5
  229. package/esm/series/Line.js.map +1 -1
  230. package/esm/series/LinearProgress.d.ts +5 -5
  231. package/esm/series/LinearProgress.js.map +1 -1
  232. package/esm/series/Link.d.ts +5 -5
  233. package/esm/series/Link.js.map +1 -1
  234. package/esm/series/Map.d.ts +5 -5
  235. package/esm/series/Map.js.map +1 -1
  236. package/esm/series/Pie.d.ts +5 -5
  237. package/esm/series/Pie.js +1 -2
  238. package/esm/series/Pie.js.map +1 -1
  239. package/esm/series/Radar.d.ts +5 -5
  240. package/esm/series/Radar.js.map +1 -1
  241. package/esm/series/RangeColumn.d.ts +5 -5
  242. package/esm/series/RangeColumn.js.map +1 -1
  243. package/esm/series/Rose.d.ts +5 -5
  244. package/esm/series/Rose.js.map +1 -1
  245. package/esm/series/Scatter.d.ts +5 -5
  246. package/esm/series/Scatter.js.map +1 -1
  247. package/esm/series/Series.d.ts +5 -6
  248. package/esm/series/Series.js.map +1 -1
  249. package/esm/series/WordCloud.d.ts +5 -5
  250. package/esm/series/WordCloud.js.map +1 -1
  251. package/esm/series/index.js +1 -1
  252. package/esm/util.js +1 -1
  253. package/package.json +7 -7
@@ -5,4 +5,22 @@ export * from "./Mark";
5
5
  export * from "./Region";
6
6
 
7
7
  export * from "./Legend";
8
- //# sourceMappingURL=index.js.map
8
+
9
+ export * from "./Brush";
10
+
11
+ export * from "./Crosshair";
12
+
13
+ export * from "./DataZoom";
14
+
15
+ export * from "./MarkLine";
16
+
17
+ export * from "./MarkArea";
18
+
19
+ export * from "./MarkPoint";
20
+
21
+ export * from "./Scrollbar";
22
+
23
+ export * from "./Tooltip";
24
+
25
+ export * from "./Player";
26
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC","file":"index.js","sourcesContent":["export * from './Axis';\nexport * from './Mark';\nexport * from './Region';\nexport * from './Legend';"]}
1
+ {"version":3,"sources":["components/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC","file":"index.js","sourcesContent":["export * from './Axis';\nexport * from './Mark';\nexport * from './Region';\nexport * from './Legend';\nexport * from './Brush';\nexport * from './Crosshair';\nexport * from './DataZoom';\nexport * from './MarkLine';\nexport * from './MarkArea';\nexport * from './MarkPoint';\nexport * from './Scrollbar';\nexport * from './Tooltip';\nexport * from './Player';\n"]}
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface ContainerProps {
3
3
  style?: React.CSSProperties;
4
4
  className?: string;
5
5
  width?: number | string;
6
6
  height?: number | string;
7
7
  }
8
- export default function withContainer<Props extends ContainerProps, CompProps>(Comp: typeof React.Component<any, CompProps>, name?: string, getProps?: (props: any) => CompProps): React.ForwardRefExoticComponent<React.PropsWithoutRef<Props> & React.RefAttributes<any>>;
8
+ export default function withContainer<Props extends ContainerProps, CompProps>(Comp: typeof React.Component<any, CompProps>, name?: string, getProps?: (props: any) => CompProps): React.ForwardRefExoticComponent<React.PropsWithoutRef<CompProps & Props> & React.RefAttributes<any>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAA4C,EAC5C,OAAe,gBAAgB,EAC/B,QAAoC;IAEpC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAa,CAAC,KAAY,EAAE,GAAG,EAAE,EAAE;QAC7D,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAA/C,+BAAuC,CAAQ,CAAC;QAEtD,eAAe,CAAC,GAAG,EAAE;YACnB,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,CACL,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,kBACH,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,IACzB,KAAK,KAGT,MAAM,CAAC,CAAC,CAAC,CACR,oBAAC,IAAI,kBACH,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,CAAC,OAAO,IACxB,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,OAAqB,CAAC,EAC3D,CACH,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACP,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,CAAC;AACb,CAAC","file":"withContainer.js","sourcesContent":["import React, { useRef, useState, useLayoutEffect } from \"react\";\n\nexport interface ContainerProps {\n style?: React.CSSProperties;\n className?: string;\n width?: number | string;\n height?: number | string;\n}\n\nexport default function withContainer<Props extends ContainerProps, CompProps>(\n Comp: typeof React.Component<any, CompProps>,\n name: string = \"ChartContainer\",\n getProps?: (props: any) => CompProps\n) {\n const Cls = React.forwardRef<any, Props>((props: Props, ref) => {\n const container = useRef();\n const [inited, setInited] = useState(false);\n const { className, style, width, ...options } = props;\n\n useLayoutEffect(() => {\n setInited(true);\n }, []);\n\n return (\n <div\n ref={container}\n className={className}\n style={{\n position: \"relative\",\n height: props.height || \"100%\",\n width: props.width || \"100%\",\n ...style,\n }}\n >\n {inited ? (\n <Comp\n ref={ref}\n container={container.current}\n {...(getProps ? getProps(options) : (options as CompProps))}\n />\n ) : (\n <></>\n )}\n </div>\n );\n });\n Cls.displayName = name || Comp.name;\n return Cls;\n}\n"]}
1
+ {"version":3,"sources":["containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,OAAO,CAAC;AASjE,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAA4C,EAC5C,IAAI,GAAG,gBAAgB,EACvB,QAAoC;IAEpC,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAyB,CAAC,KAAwB,EAAE,GAAG,EAAE,EAAE;QACrF,MAAM,SAAS,GAAG,MAAM,EAAE,CAAC;QAC3B,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;QAC5C,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,KAAiB,KAAK,EAAjB,OAAO,UAAK,KAAK,EAA/C,+BAAuC,CAAQ,CAAC;QAEtD,eAAe,CAAC,GAAG,EAAE;YACnB,SAAS,CAAC,IAAI,CAAC,CAAC;QAClB,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,CACL,6BACE,GAAG,EAAE,SAAS,EACd,SAAS,EAAE,SAAS,EACpB,KAAK,kBACH,QAAQ,EAAE,UAAU,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,MAAM,EAC9B,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,IACzB,KAAK,KAGT,MAAM,CAAC,CAAC,CAAC,CACR,oBAAC,IAAI,kBAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,CAAC,OAAO,IAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAE,OAAqB,CAAC,EAAI,CAC9G,CAAC,CAAC,CAAC,CACF,yCAAK,CACN,CACG,CACP,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC;IACpC,OAAO,GAAG,CAAC;AACb,CAAC","file":"withContainer.js","sourcesContent":["import React, { useRef, useState, useLayoutEffect } from 'react';\n\nexport interface ContainerProps {\n style?: React.CSSProperties;\n className?: string;\n width?: number | string;\n height?: number | string;\n}\n\nexport default function withContainer<Props extends ContainerProps, CompProps>(\n Comp: typeof React.Component<any, CompProps>,\n name = 'ChartContainer',\n getProps?: (props: any) => CompProps\n) {\n const Cls = React.forwardRef<any, CompProps & Props>((props: CompProps & Props, ref) => {\n const container = useRef();\n const [inited, setInited] = useState(false);\n const { className, style, width, ...options } = props;\n\n useLayoutEffect(() => {\n setInited(true);\n }, []);\n\n return (\n <div\n ref={container}\n className={className}\n style={{\n position: 'relative',\n height: props.height || '100%',\n width: props.width || '100%',\n ...style\n }}\n >\n {inited ? (\n <Comp ref={ref} container={container.current} {...(getProps ? getProps(options) : (options as CompProps))} />\n ) : (\n <></>\n )}\n </div>\n );\n });\n Cls.displayName = name || Comp.name;\n return Cls;\n}\n"]}
@@ -12,5 +12,4 @@ export function withChartInstance(Component) {
12
12
  return Com.displayName = Component.name, Com;
13
13
  }
14
14
 
15
- export default ChartContext;
16
- //# sourceMappingURL=chart.js.map
15
+ export default ChartContext;
@@ -1,50 +1,76 @@
1
- import type VChart from '@visactor/vchart';
1
+ import type { IVChart, EventCallback, EventParamsDefinition } from '@visactor/vchart';
2
+ export interface LegendEventProps {
3
+ onLegendItemHover?: (e: any) => void;
4
+ onLegendItemUnHover?: (e: any) => void;
5
+ onLegendItemClick?: (e: any) => void;
6
+ onLegendFilter?: (e: any) => void;
7
+ onLegendSelectedDataChange?: (e: any) => void;
8
+ }
9
+ export interface BrushEventProps {
10
+ onBrushStart?: (e: any) => void;
11
+ onBrushChange?: (e: any) => void;
12
+ onBrushEnd?: (e: any) => void;
13
+ }
14
+ export interface DataZoomEventProps {
15
+ onDataZoomChange?: (e: any) => void;
16
+ }
17
+ export interface PlayerEventProps {
18
+ onPlayerPlay?: (e: any) => void;
19
+ onPlayerPause?: (e: any) => void;
20
+ onPlayerEnd?: (e: any) => void;
21
+ onPlayerChange?: (e: any) => void;
22
+ onPlayerForward?: (e: any) => void;
23
+ onPlayerBackward?: (e: any) => void;
24
+ }
25
+ export interface ScrollBarEventProps {
26
+ onScrollBarChange?: (e: any) => void;
27
+ }
2
28
  export interface EventsProps {
3
- onPointerDown?: (e: any) => void | boolean;
4
- onPointerUp?: (e: any) => void | boolean;
5
- onPointerUpOutside?: (e: any) => void | boolean;
6
- onPointerTap?: (e: any) => void | boolean;
7
- onPointerOver?: (e: any) => void | boolean;
8
- onPointerMove?: (e: any) => void | boolean;
9
- onPointerEnter?: (e: any) => void | boolean;
10
- onPointerLeave?: (e: any) => void | boolean;
11
- onPointerOut?: (e: any) => void | boolean;
12
- onMouseDown?: (e: any) => void | boolean;
13
- onMouseUp?: (e: any) => void | boolean;
14
- onMouseUpOutside?: (e: any) => void | boolean;
15
- onMouseMove?: (e: any) => void | boolean;
16
- onMouseOver?: (e: any) => void | boolean;
17
- onMouseOut?: (e: any) => void | boolean;
18
- onMouseEnter?: (e: any) => void | boolean;
19
- onMouseLeave?: (e: any) => void | boolean;
20
- onPinch?: (e: any) => void | boolean;
21
- onPinchStart?: (e: any) => void | boolean;
22
- onPinchEnd?: (e: any) => void | boolean;
23
- onPan?: (e: any) => void | boolean;
24
- onPanStart?: (e: any) => void | boolean;
25
- onPanEnd?: (e: any) => void | boolean;
26
- onDrag?: (e: any) => void | boolean;
27
- onDragStart?: (e: any) => void | boolean;
28
- onDragEnter?: (e: any) => void | boolean;
29
- onDragLeave?: (e: any) => void | boolean;
30
- onDragOver?: (e: any) => void | boolean;
31
- onDragEnd?: (e: any) => void | boolean;
32
- onRightDown?: (e: any) => void | boolean;
33
- onRightUp?: (e: any) => void | boolean;
34
- onRightUpOutside?: (e: any) => void | boolean;
35
- onTouchStart?: (e: any) => void | boolean;
36
- onTouchEnd?: (e: any) => void | boolean;
37
- onTouchEndOutside?: (e: any) => void | boolean;
38
- onTouchMove?: (e: any) => void | boolean;
39
- onTouchCancel?: (e: any) => void | boolean;
40
- onPress?: (e: any) => void | boolean;
41
- onPressUp?: (e: any) => void | boolean;
42
- onPressEnd?: (e: any) => void | boolean;
43
- onSwipe?: (e: any) => void | boolean;
44
- onDrop?: (e: any) => void | boolean;
45
- onWeel?: (e: any) => void | boolean;
46
- onClick?: (e: any) => void | boolean;
47
- onDblClick?: (e: any) => void | boolean;
29
+ onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;
30
+ onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;
31
+ onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;
32
+ onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;
33
+ onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;
34
+ onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;
35
+ onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;
36
+ onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;
37
+ onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;
38
+ onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;
39
+ onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;
40
+ onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;
41
+ onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;
42
+ onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;
43
+ onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;
44
+ onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;
45
+ onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;
46
+ onPinch?: EventCallback<EventParamsDefinition['pinch']>;
47
+ onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;
48
+ onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;
49
+ onPan?: EventCallback<EventParamsDefinition['pan']>;
50
+ onPanStart?: EventCallback<EventParamsDefinition['panstart']>;
51
+ onPanEnd?: EventCallback<EventParamsDefinition['panend']>;
52
+ onDrag?: EventCallback<EventParamsDefinition['drag']>;
53
+ onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;
54
+ onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;
55
+ onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;
56
+ onDragOver?: EventCallback<EventParamsDefinition['dragover']>;
57
+ onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;
58
+ onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;
59
+ onRightUp?: EventCallback<EventParamsDefinition['rightup']>;
60
+ onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;
61
+ onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;
62
+ onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;
63
+ onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;
64
+ onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;
65
+ onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;
66
+ onPress?: EventCallback<EventParamsDefinition['press']>;
67
+ onPressUp?: EventCallback<EventParamsDefinition['pressup']>;
68
+ onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;
69
+ onSwipe?: EventCallback<EventParamsDefinition['swipe']>;
70
+ onDrop?: EventCallback<EventParamsDefinition['drop']>;
71
+ onWeel?: EventCallback<EventParamsDefinition['weel']>;
72
+ onClick?: EventCallback<EventParamsDefinition['click']>;
73
+ onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;
48
74
  }
49
75
  export declare const REACT_TO_VCHART_EVENTS: {
50
76
  onPointerDown: string;
@@ -97,6 +123,27 @@ export declare const LEGEND_CUSTOMIZED_EVENTS: {
97
123
  onLegendItemHover: string;
98
124
  onLegendItemUnHover: string;
99
125
  onLegendItemClick: string;
126
+ onLegendFilter: string;
127
+ onLegendSelectedDataChange: string;
128
+ };
129
+ export declare const BRUSH_CUSTOMIZED_EVENTS: {
130
+ onBrushStart: string;
131
+ onBrushChange: string;
132
+ onBrushEnd: string;
133
+ };
134
+ export declare const DATAZOOM_CUSTOMIZED_EVENTS: {
135
+ onDataZoomChange: string;
136
+ };
137
+ export declare const PLAYER_CUSTOMIZED_EVENTS: {
138
+ onPlayerPlay: string;
139
+ onPlayerPause: string;
140
+ onPlayerEnd: string;
141
+ onPlayerChange: string;
142
+ onPlayerForward: string;
143
+ onPlayerBackward: string;
144
+ };
145
+ export declare const SCROLLBAR_CUSTOMIZED_EVENTS: {
146
+ onScrollBarChange: string;
100
147
  };
101
148
  export declare const CHART_EVENTS: {
102
149
  onPointerDown: string;
@@ -144,12 +191,25 @@ export declare const CHART_EVENTS: {
144
191
  onWeel: string;
145
192
  onClick: string;
146
193
  onDblClick: string;
194
+ onScrollBarChange: string;
195
+ onDataZoomChange: string;
196
+ onPlayerPlay: string;
197
+ onPlayerPause: string;
198
+ onPlayerEnd: string;
199
+ onPlayerChange: string;
200
+ onPlayerForward: string;
201
+ onPlayerBackward: string;
202
+ onBrushStart: string;
203
+ onBrushChange: string;
204
+ onBrushEnd: string;
147
205
  onLegendItemHover: string;
148
206
  onLegendItemUnHover: string;
149
207
  onLegendItemClick: string;
208
+ onLegendFilter: string;
209
+ onLegendSelectedDataChange: string;
150
210
  };
151
211
  export declare const CHART_EVENTS_KEYS: string[];
152
212
  export declare const COMMON_EVENTK_KEYS: string[];
153
213
  export declare const VCHART_TO_REACT_EVENTS: {};
154
214
  export declare const findEventProps: <T extends EventsProps>(props: T, supportedEvents?: Record<string, string>) => EventsProps;
155
- export declare const bindEventsToChart: <T>(chart: VChart, newProps?: T, prevProps?: T, supportedEvents?: Record<string, string>) => boolean;
215
+ export declare const bindEventsToChart: <T>(chart: IVChart, newProps?: T, prevProps?: T, supportedEvents?: Record<string, string>) => boolean;
@@ -49,10 +49,35 @@ export const REACT_TO_VCHART_EVENTS = {
49
49
  export const LEGEND_CUSTOMIZED_EVENTS = {
50
50
  onLegendItemHover: "legendItemHover",
51
51
  onLegendItemUnHover: "legendItemUnHover",
52
- onLegendItemClick: "legendItemClick"
52
+ onLegendItemClick: "legendItemClick",
53
+ onLegendFilter: "legendFilter",
54
+ onLegendSelectedDataChange: "legendSelectedDataChange"
53
55
  };
54
56
 
55
- export const CHART_EVENTS = Object.assign(Object.assign({}, LEGEND_CUSTOMIZED_EVENTS), REACT_TO_VCHART_EVENTS);
57
+ export const BRUSH_CUSTOMIZED_EVENTS = {
58
+ onBrushStart: "brushStart",
59
+ onBrushChange: "brushChange",
60
+ onBrushEnd: "brushEnd"
61
+ };
62
+
63
+ export const DATAZOOM_CUSTOMIZED_EVENTS = {
64
+ onDataZoomChange: "dataZoomChange"
65
+ };
66
+
67
+ export const PLAYER_CUSTOMIZED_EVENTS = {
68
+ onPlayerPlay: "playerPlay",
69
+ onPlayerPause: "playerPause",
70
+ onPlayerEnd: "playerEnd",
71
+ onPlayerChange: "playerChange",
72
+ onPlayerForward: "playerForward",
73
+ onPlayerBackward: "playerBackward"
74
+ };
75
+
76
+ export const SCROLLBAR_CUSTOMIZED_EVENTS = {
77
+ onScrollBarChange: "scrollBarChange"
78
+ };
79
+
80
+ export const CHART_EVENTS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, LEGEND_CUSTOMIZED_EVENTS), BRUSH_CUSTOMIZED_EVENTS), PLAYER_CUSTOMIZED_EVENTS), DATAZOOM_CUSTOMIZED_EVENTS), SCROLLBAR_CUSTOMIZED_EVENTS), REACT_TO_VCHART_EVENTS);
56
81
 
57
82
  export const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);
58
83
 
@@ -79,4 +104,4 @@ export const bindEventsToChart = (chart, newProps, prevProps, supportedEvents =
79
104
  prevEventProps && prevEventProps[eventKey] && prevEventProps[eventKey] === newEventProps[eventKey] || chart.on(supportedEvents[eventKey], newEventProps[eventKey]);
80
105
  })), !0;
81
106
  };
82
- //# sourceMappingURL=eventsUtils.js.map
107
+ //# sourceMappingURL=eventsUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["eventsUtils.ts"],"names":[],"mappings":"AAkDA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,UAAU;IACtB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,SAAS,EAAE,SAAS;IACpB,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,UAAU;IACtB,iBAAiB,EAAE,iBAAiB;IACpC,WAAW,EAAE,WAAW;IACxB,aAAa,EAAE,aAAa;IAC5B,OAAO,EAAE,OAAO;IAChB,SAAS,EAAE,SAAS;IACpB,UAAU,EA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\n onPointerDown?: (e: any) => void | boolean;\n onPointerUp?: (e: any) => void | boolean;\n onPointerUpOutside?: (e: any) => void | boolean;\n onPointerTap?: (e: any) => void | boolean;\n onPointerOver?: (e: any) => void | boolean;\n onPointerMove?: (e: any) => void | boolean;\n onPointerEnter?: (e: any) => void | boolean;\n onPointerLeave?: (e: any) => void | boolean;\n onPointerOut?: (e: any) => void | boolean;\n onMouseDown?: (e: any) => void | boolean;\n onMouseUp?: (e: any) => void | boolean;\n onMouseUpOutside?: (e: any) => void | boolean;\n onMouseMove?: (e: any) => void | boolean;\n onMouseOver?: (e: any) => void | boolean;\n onMouseOut?: (e: any) => void | boolean;\n onMouseEnter?: (e: any) => void | boolean;\n onMouseLeave?: (e: any) => void | boolean;\n onPinch?: (e: any) => void | boolean;\n onPinchStart?: (e: any) => void | boolean;\n onPinchEnd?: (e: any) => void | boolean;\n onPan?: (e: any) => void | boolean;\n onPanStart?: (e: any) => void | boolean;\n onPanEnd?: (e: any) => void | boolean;\n onDrag?: (e: any) => void | boolean;\n onDragStart?: (e: any) => void | boolean;\n onDragEnter?: (e: any) => void | boolean;\n onDragLeave?: (e: any) => void | boolean;\n onDragOver?: (e: any) => void | boolean;\n onDragEnd?: (e: any) => void | boolean;\n onRightDown?: (e: any) => void | boolean;\n onRightUp?: (e: any) => void | boolean;\n onRightUpOutside?: (e: any) => void | boolean;\n onTouchStart?: (e: any) => void | boolean;\n onTouchEnd?: (e: any) => void | boolean;\n onTouchEndOutside?: (e: any) => void | boolean;\n onTouchMove?: (e: any) => void | boolean;\n onTouchCancel?: (e: any) => void | boolean;\n onPress?: (e: any) => void | boolean;\n onPressUp?: (e: any) => void | boolean;\n onPressEnd?: (e: any) => void | boolean;\n onSwipe?: (e: any) => void | boolean;\n onDrop?: (e: any) => void | boolean;\n onWeel?: (e: any) => void | boolean;\n onClick?: (e: any) => void | boolean;\n onDblClick?: (e: any) => void | boolean;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: VChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
1
+ {"version":3,"sources":["eventsUtils.ts"],"names":[],"mappings":"AAiFA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,U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endEventProps {\n onLegendItemHover?: (e: any) => void;\n onLegendItemUnHover?: (e: any) => void;\n onLegendItemClick?: (e: any) => void;\n onLegendFilter?: (e: any) => void;\n onLegendSelectedDataChange?: (e: any) => void;\n}\n\nexport interface BrushEventProps {\n onBrushStart?: (e: any) => void;\n onBrushChange?: (e: any) => void;\n onBrushEnd?: (e: any) => void;\n}\n\nexport interface DataZoomEventProps {\n onDataZoomChange?: (e: any) => void;\n}\n\nexport interface PlayerEventProps {\n onPlayerPlay?: (e: any) => void;\n onPlayerPause?: (e: any) => void;\n onPlayerEnd?: (e: any) => void;\n onPlayerChange?: (e: any) => void;\n onPlayerForward?: (e: any) => void;\n onPlayerBackward?: (e: any) => void;\n}\n\nexport interface ScrollBarEventProps {\n onScrollBarChange?: (e: any) => void;\n}\n\nexport interface EventsProps {\n onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;\n onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;\n onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;\n onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;\n onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;\n onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;\n onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;\n onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;\n onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;\n onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;\n onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;\n onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;\n onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;\n onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;\n onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;\n onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;\n onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;\n onPinch?: EventCallback<EventParamsDefinition['pinch']>;\n onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;\n onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;\n onPan?: EventCallback<EventParamsDefinition['pan']>;\n onPanStart?: EventCallback<EventParamsDefinition['panstart']>;\n onPanEnd?: EventCallback<EventParamsDefinition['panend']>;\n onDrag?: EventCallback<EventParamsDefinition['drag']>;\n onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;\n onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;\n onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;\n onDragOver?: EventCallback<EventParamsDefinition['dragover']>;\n onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;\n onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;\n onRightUp?: EventCallback<EventParamsDefinition['rightup']>;\n onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;\n onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;\n onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;\n onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;\n onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;\n onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;\n onPress?: EventCallback<EventParamsDefinition['press']>;\n onPressUp?: EventCallback<EventParamsDefinition['pressup']>;\n onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;\n onSwipe?: EventCallback<EventParamsDefinition['swipe']>;\n onDrop?: EventCallback<EventParamsDefinition['drop']>;\n onWeel?: EventCallback<EventParamsDefinition['weel']>;\n onClick?: EventCallback<EventParamsDefinition['click']>;\n onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick',\n onLegendFilter: 'legendFilter',\n onLegendSelectedDataChange: 'legendSelectedDataChange'\n};\nexport const BRUSH_CUSTOMIZED_EVENTS = {\n onBrushStart: 'brushStart',\n onBrushChange: 'brushChange',\n onBrushEnd: 'brushEnd'\n};\n\nexport const DATAZOOM_CUSTOMIZED_EVENTS = {\n onDataZoomChange: 'dataZoomChange'\n};\n\nexport const PLAYER_CUSTOMIZED_EVENTS = {\n onPlayerPlay: 'playerPlay',\n onPlayerPause: 'playerPause',\n onPlayerEnd: 'playerEnd',\n onPlayerChange: 'playerChange',\n onPlayerForward: 'playerForward',\n onPlayerBackward: 'playerBackward'\n};\n\nexport const SCROLLBAR_CUSTOMIZED_EVENTS = {\n onScrollBarChange: 'scrollBarChange'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...BRUSH_CUSTOMIZED_EVENTS,\n ...PLAYER_CUSTOMIZED_EVENTS,\n ...DATAZOOM_CUSTOMIZED_EVENTS,\n ...SCROLLBAR_CUSTOMIZED_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: IVChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
package/esm/index.js CHANGED
@@ -8,4 +8,5 @@ export { VChart } from "./VChart";
8
8
 
9
9
  import VChartCore from "@visactor/vchart";
10
10
 
11
- export { VChartCore };
11
+ export { VChartCore };
12
+ //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface AreaProps extends BaseSeriesProps {
3
- }
4
- export declare const Area: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IAreaSeriesSpec } from '@visactor/vchart';
3
+ export type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;
4
+ export declare const Area: import("react").FC<BaseSeriesProps & Omit<IAreaSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Area.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface AreaProps extends BaseSeriesProps {\n //\n}\n\nexport const Area = createSeries(\"Area\", [\"area\"], \"area\");\n"]}
1
+ {"version":3,"sources":["series/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAI7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Area.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IAreaSeriesSpec } from '@visactor/vchart';\n\nexport type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;\nexport const Area = createSeries<AreaProps>('Area', ['area'], 'area');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface BarProps extends BaseSeriesProps {
3
- }
4
- export declare const Bar: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IBarSeriesSpec } from '@visactor/vchart';
3
+ export type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;
4
+ export declare const Bar: import("react").FC<BaseSeriesProps & Omit<IBarSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Bar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface BarProps extends BaseSeriesProps {\n //\n}\n\nexport const Bar = createSeries(\"Bar\", [\"bar\"], \"bar\");\n"]}
1
+ {"version":3,"sources":["series/Bar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Bar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\n\nimport { IBarSeriesSpec } from '@visactor/vchart';\n\nexport type BarProps = BaseSeriesProps & Omit<IBarSeriesSpec, 'type'>;\n\nexport const Bar = createSeries<BarProps>('Bar', ['bar'], 'bar');\n"]}
@@ -4,5 +4,5 @@ export interface BaseSeriesProps extends EventsProps {
4
4
  id?: string | number;
5
5
  }
6
6
  export declare const createSeries: <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => React.FC<T & {
7
- updateId: number;
7
+ updateId?: number;
8
8
  }>;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K,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;gBAC7E,OAAO,CAAC,gBAAgB,CAAC,MAAM,GAAG,SAAS,CAAC;gBAC5C,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;aAClC;QACH,CAAC,CAAC;QAEF,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;QACpC,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,EAAE;YAEvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,CAAC;SACnC;aAAM;YACL,MAAM,aAAa,GAAG,WAAW,CAAI,KAAK,EAAE,WAAW,CAAC,CAAC;YACzD,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC/C,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;gBACnC,eAAe,CAAC,aAAa,CAAC,CAAC;aAChC;SACF;QAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,OAAO,GAAG,EAAE;gBACV,eAAe,EAAE,CAAC;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseSeries.js","sourcesContent":["import React from 'react';\nimport { isNil, isEqual, pickWithout } from '@visactor/vutils';\nimport RootChartContext from '../context/chart';\nimport {\n REACT_TO_VCHART_EVENTS,\n EventsProps,\n findEventProps,\n COMMON_EVENTK_KEYS,\n VCHART_TO_REACT_EVENTS\n} from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseSeriesProps extends EventsProps {\n id?: string | number;\n}\n\nexport const createSeries = <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = COMMON_EVENTK_KEYS.concat(ignoreKeys);\n\n const Comp: React.FC<T & { updateId: number }> = props => {\n const context = React.useContext(RootChartContext);\n\n const id = React.useRef<string | number>(isNil(props.id) ? uid(type ?? 'series') : props.id);\n\n const seriesSpec = React.useRef<Partial<T>>();\n const bindedEvents = React.useRef<Record<string, boolean>>({});\n const updateId = React.useRef<number>(props.updateId);\n\n const handleEvent = (e: any) => {\n const markIds = markNames.map(markName => `${id.current}-${markName}`);\n if (e?.mark && markIds.includes(e.mark.getUserId())) {\n props[VCHART_TO_REACT_EVENTS[e.event.type]](e);\n }\n };\n\n const addMarkEvent = (events: EventsProps) => {\n if (!events || !context.chart) {\n return;\n }\n\n if (bindedEvents) {\n Object.keys(bindedEvents).forEach(eventKey => {\n if (!events[eventKey]) {\n context.chart.off(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n }\n bindedEvents.current[eventKey] = false;\n });\n }\n\n Object.keys(events).forEach(eventKey => {\n if (!bindedEvents?.[eventKey]) {\n context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n\n if (!bindedEvents) {\n bindedEvents.current = {};\n }\n bindedEvents.current[eventKey] = true;\n }\n });\n };\n\n const removeMarkEvent = () => {\n addMarkEvent({});\n };\n\n const addMarkId = (seriesSpec: any) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${id.current}-${markName}`;\n\n if (isNil(seriesSpec[markName])) {\n seriesSpec[markName] = { id: defaultMarkId };\n } else if (isNil(seriesSpec[markName].id)) {\n seriesSpec[markName].id = defaultMarkId;\n }\n });\n };\n\n const insertToContext = (props: Partial<T>) => {\n if (context.specFromChildren) {\n if (!context.specFromChildren.series) {\n context.specFromChildren.series = [];\n }\n\n const seriesSpec = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n\n addMarkId(seriesSpec);\n context.specFromChildren.series.push(seriesSpec);\n context.isChildrenUpdated = true;\n }\n };\n\n const updateToContext = (props: Partial<T>) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (!context.specFromChildren.series) {\n insertToContext(props);\n return;\n }\n\n const series = context.specFromChildren.series;\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n series[index] = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n addMarkId(series[index]);\n } else {\n insertToContext(props);\n }\n context.isChildrenUpdated = true;\n };\n\n const deleteToContext = () => {\n if (!context.specFromChildren) {\n return;\n }\n const series = context.specFromChildren.series ?? [];\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n const newSeries = series.slice(0, index - 1).concat(series.slice(index + 1));\n context.specFromChildren.series = newSeries;\n context.isChildrenUpdated = true;\n }\n };\n\n addMarkEvent(findEventProps(props));\n if (props.updateId !== updateId.current) {\n // chart render\n updateId.current = props.updateId;\n } else {\n const newSeriesSpec = pickWithout<T>(props, notSpecKeys);\n if (!isEqual(newSeriesSpec, seriesSpec.current)) {\n seriesSpec.current = newSeriesSpec;\n updateToContext(newSeriesSpec);\n }\n }\n\n React.useEffect(() => {\n return () => {\n deleteToContext();\n removeMarkEvent();\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n"]}
1
+ {"version":3,"sources":["series/BaseSeries.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,gBAAgB,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,sBAAsB,EAEtB,cAAc,EACd,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAM9B,MAAM,CAAC,MAAM,YAAY,GAAG,CAA4B,aAAqB,EAAE,SAAmB,EAAE,IAAa,EAAE,EAAE;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I,KAAK,EAAE,WAAW,CAAC,CAAC;YACzD,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,OAAO,CAAC,EAAE;gBAC/C,UAAU,CAAC,OAAO,GAAG,aAAa,CAAC;gBACnC,eAAe,CAAC,aAAa,CAAC,CAAC;aAChC;SACF;QAED,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;YACnB,OAAO,GAAG,EAAE;gBACV,eAAe,EAAE,CAAC;gBAClB,eAAe,EAAE,CAAC;YACpB,CAAC,CAAC;QACJ,CAAC,EAAE,EAAE,CAAC,CAAC;QAEP,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;IAEF,IAAI,CAAC,WAAW,GAAG,aAAa,CAAC;IACjC,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"BaseSeries.js","sourcesContent":["import React from 'react';\nimport { isNil, isEqual, pickWithout } from '@visactor/vutils';\nimport RootChartContext from '../context/chart';\nimport {\n REACT_TO_VCHART_EVENTS,\n EventsProps,\n findEventProps,\n COMMON_EVENTK_KEYS,\n VCHART_TO_REACT_EVENTS\n} from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseSeriesProps extends EventsProps {\n id?: string | number;\n}\n\nexport const createSeries = <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = COMMON_EVENTK_KEYS.concat(ignoreKeys);\n\n const Comp: React.FC<T & { updateId?: number }> = props => {\n const context = React.useContext(RootChartContext);\n\n const id = React.useRef<string | number>(isNil(props.id) ? uid(type ?? 'series') : props.id);\n\n const seriesSpec = React.useRef<Partial<T>>();\n const bindedEvents = React.useRef<Record<string, boolean>>({});\n const updateId = React.useRef<number>(props.updateId);\n\n const handleEvent = (e: any) => {\n const markIds = markNames.map(markName => `${id.current}-${markName}`);\n if (e?.mark && markIds.includes(e.mark.getUserId())) {\n props[VCHART_TO_REACT_EVENTS[e.event.type]](e);\n }\n };\n\n const addMarkEvent = (events: EventsProps) => {\n if (!events || !context.chart) {\n return;\n }\n\n if (bindedEvents) {\n Object.keys(bindedEvents).forEach(eventKey => {\n if (!events[eventKey]) {\n context.chart.off(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n }\n bindedEvents.current[eventKey] = false;\n });\n }\n\n Object.keys(events).forEach(eventKey => {\n if (!bindedEvents?.[eventKey]) {\n context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent);\n\n if (!bindedEvents) {\n bindedEvents.current = {};\n }\n bindedEvents.current[eventKey] = true;\n }\n });\n };\n\n const removeMarkEvent = () => {\n addMarkEvent({});\n };\n\n const addMarkId = (seriesSpec: any) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${id.current}-${markName}`;\n\n if (isNil(seriesSpec[markName])) {\n seriesSpec[markName] = { id: defaultMarkId };\n } else if (isNil(seriesSpec[markName].id)) {\n seriesSpec[markName].id = defaultMarkId;\n }\n });\n };\n\n const insertToContext = (props: Partial<T>) => {\n if (context.specFromChildren) {\n if (!context.specFromChildren.series) {\n context.specFromChildren.series = [];\n }\n\n const seriesSpec = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n\n addMarkId(seriesSpec);\n context.specFromChildren.series.push(seriesSpec);\n context.isChildrenUpdated = true;\n }\n };\n\n const updateToContext = (props: Partial<T>) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (!context.specFromChildren.series) {\n insertToContext(props);\n return;\n }\n\n const series = context.specFromChildren.series;\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n series[index] = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n addMarkId(series[index]);\n } else {\n insertToContext(props);\n }\n context.isChildrenUpdated = true;\n };\n\n const deleteToContext = () => {\n if (!context.specFromChildren) {\n return;\n }\n const series = context.specFromChildren.series ?? [];\n const index = series.findIndex((entry: any) => entry.id === id.current);\n\n if (index >= 0) {\n const newSeries = series.slice(0, index - 1).concat(series.slice(index + 1));\n context.specFromChildren.series = newSeries;\n context.isChildrenUpdated = true;\n }\n };\n\n addMarkEvent(findEventProps(props));\n if (props.updateId !== updateId.current) {\n // chart render\n updateId.current = props.updateId;\n } else {\n const newSeriesSpec = pickWithout<T>(props, notSpecKeys);\n if (!isEqual(newSeriesSpec, seriesSpec.current)) {\n seriesSpec.current = newSeriesSpec;\n updateToContext(newSeriesSpec);\n }\n }\n\n React.useEffect(() => {\n return () => {\n deleteToContext();\n removeMarkEvent();\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface BoxPlotProps extends BaseSeriesProps {
3
- }
4
- export declare const BoxPlot: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IBoxPlotSeriesSpec } from '@visactor/vchart';
3
+ export type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;
4
+ export declare const BoxPlot: import("react").FC<BaseSeriesProps & Omit<IBoxPlotSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface BoxPlotProps extends BaseSeriesProps {\n //\n}\n\nexport const BoxPlot = createSeries(\"BoxPlot\", [\"boxPlot\"], \"boxPlot\");\n"]}
1
+ {"version":3,"sources":["series/BoxPlot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,OAAO,GAAG,YAAY,CAAe,SAAS,EAAE,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC,CAAC","file":"BoxPlot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IBoxPlotSeriesSpec } from '@visactor/vchart';\n\nexport type BoxPlotProps = BaseSeriesProps & Omit<IBoxPlotSeriesSpec, 'type'>;\n\nexport const BoxPlot = createSeries<BoxPlotProps>('BoxPlot', ['boxPlot'], 'boxPlot');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface CircularProgressProps extends BaseSeriesProps {
3
- }
4
- export declare const CircularProgress: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { ICircularProgressSeriesSpec } from '@visactor/vchart';
3
+ export type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;
4
+ export declare const CircularProgress: import("react").FC<BaseSeriesProps & Omit<ICircularProgressSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1,3 +1,4 @@
1
1
  import { createSeries } from "./BaseSeries";
2
2
 
3
- export const CircularProgress = createSeries("CircularProgress", [ "circularProgress" ], "circularProgress");
3
+ export const CircularProgress = createSeries("CircularProgress", [ "circularProgress" ], "circularProgress");
4
+ //# sourceMappingURL=CircularProgress.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface CircularProgressProps extends BaseSeriesProps {\n //\n}\n\nexport const CircularProgress = createSeries(\n \"CircularProgress\",\n [\"circularProgress\"],\n \"circularProgress\"\n);\n"]}
1
+ {"version":3,"sources":["series/CircularProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,gBAAgB,GAAG,YAAY,CAC1C,kBAAkB,EAClB,CAAC,kBAAkB,CAAC,EACpB,kBAAkB,CACnB,CAAC","file":"CircularProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ICircularProgressSeriesSpec } from '@visactor/vchart';\n\nexport type CircularProgressProps = BaseSeriesProps & Omit<ICircularProgressSeriesSpec, 'type'>;\n\nexport const CircularProgress = createSeries<CircularProgressProps>(\n 'CircularProgress',\n ['circularProgress'],\n 'circularProgress'\n);\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface DotProps extends BaseSeriesProps {
3
- }
4
- export declare const Dot: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IDotSeriesSpec } from '@visactor/vchart';
3
+ export type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;
4
+ export declare const Dot: import("react").FC<BaseSeriesProps & Omit<IDotSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface DotProps extends BaseSeriesProps {\n //\n}\n\nexport const Dot = createSeries(\"Dot\", [\"dot\"], \"dot\");\n"]}
1
+ {"version":3,"sources":["series/Dot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAW,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC,CAAC","file":"Dot.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IDotSeriesSpec } from '@visactor/vchart';\n\nexport type DotProps = BaseSeriesProps & Omit<IDotSeriesSpec, 'type'>;\n\nexport const Dot = createSeries<DotProps>('Dot', ['dot'], 'dot');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface FunnelProps extends BaseSeriesProps {
3
- }
4
- export declare const Funnel: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IFunnelSeriesSpec } from '@visactor/vchart';
3
+ export type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;
4
+ export declare const Funnel: import("react").FC<BaseSeriesProps & Omit<IFunnelSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface FunnelProps extends BaseSeriesProps {\n //\n}\n\nexport const Funnel = createSeries(\"Funnel\", [\"funnel\"], \"funnel\");\n"]}
1
+ {"version":3,"sources":["series/Funnel.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC","file":"Funnel.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IFunnelSeriesSpec } from '@visactor/vchart';\n\nexport type FunnelProps = BaseSeriesProps & Omit<IFunnelSeriesSpec, 'type'>;\n\nexport const Funnel = createSeries<FunnelProps>('Funnel', ['funnel'], 'funnel');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface LineProps extends BaseSeriesProps {
3
- }
4
- export declare const Line: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { ILineSeriesSpec } from '@visactor/vchart';
3
+ export type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;
4
+ export declare const Line: import("react").FC<BaseSeriesProps & Omit<ILineSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface LineProps extends BaseSeriesProps {\n //\n}\n\nexport const Line = createSeries(\"Line\", [\"line\"], \"line\");\n"]}
1
+ {"version":3,"sources":["series/Line.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Line.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILineSeriesSpec } from '@visactor/vchart';\n\nexport type LineProps = BaseSeriesProps & Omit<ILineSeriesSpec, 'type'>;\n\nexport const Line = createSeries<LineProps>('Line', ['line'], 'line');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface LinearProgressProps extends BaseSeriesProps {
3
- }
4
- export declare const LinearProgress: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { ILinearProgressSeriesSpec } from '@visactor/vchart';
3
+ export type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;
4
+ export declare const LinearProgress: import("react").FC<BaseSeriesProps & Omit<ILinearProgressSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CACxC,gBAAgB,EAChB,CAAC,gBAAgB,CAAC,EAClB,gBAAgB,CACjB,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface LinearProgressProps extends BaseSeriesProps {\n //\n}\n\nexport const LinearProgress = createSeries(\n \"LinearProgress\",\n [\"linearProgress\"],\n \"linearProgress\"\n);\n"]}
1
+ {"version":3,"sources":["series/LinearProgress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,cAAc,GAAG,YAAY,CAAsB,gBAAgB,EAAE,CAAC,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC","file":"LinearProgress.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinearProgressSeriesSpec } from '@visactor/vchart';\n\nexport type LinearProgressProps = BaseSeriesProps & Omit<ILinearProgressSeriesSpec, 'type'>;\n\nexport const LinearProgress = createSeries<LinearProgressProps>('LinearProgress', ['linearProgress'], 'linearProgress');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface LinkProps extends BaseSeriesProps {
3
- }
4
- export declare const Link: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { ILinkSeriesSpec } from '@visactor/vchart';
3
+ export type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;
4
+ export declare const Link: import("react").FC<BaseSeriesProps & Omit<ILinkSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface LinkProps extends BaseSeriesProps {\n //\n}\n\nexport const Link = createSeries(\"Link\", [\"link\"], \"link\");\n"]}
1
+ {"version":3,"sources":["series/Link.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,IAAI,GAAG,YAAY,CAAY,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC","file":"Link.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { ILinkSeriesSpec } from '@visactor/vchart';\n\nexport type LinkProps = BaseSeriesProps & Omit<ILinkSeriesSpec, 'type'>;\n\nexport const Link = createSeries<LinkProps>('Link', ['link'], 'link');\n"]}