@visactor/react-vchart 0.0.1-alpha.2 → 0.16.17-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. package/README.md +33 -5
  2. package/cjs/VChart.d.ts +1 -1
  3. package/cjs/charts/AreaChart.d.ts +4 -1
  4. package/cjs/charts/AreaChart.js.map +1 -1
  5. package/cjs/charts/BarChart.d.ts +4 -1
  6. package/cjs/charts/BarChart.js.map +1 -1
  7. package/cjs/charts/BaseChart.d.ts +7 -5
  8. package/cjs/charts/BaseChart.js +33 -10
  9. package/cjs/charts/BaseChart.js.map +1 -1
  10. package/cjs/charts/BoxPlotChart.d.ts +4 -1
  11. package/cjs/charts/BoxPlotChart.js.map +1 -1
  12. package/cjs/charts/CircularProgressChart.d.ts +4 -1
  13. package/cjs/charts/CircularProgressChart.js.map +1 -1
  14. package/cjs/charts/CommonChart.d.ts +4 -1
  15. package/cjs/charts/CommonChart.js.map +1 -1
  16. package/cjs/charts/FunnelChart.d.ts +4 -1
  17. package/cjs/charts/FunnelChart.js.map +1 -1
  18. package/cjs/charts/HistogramChart.d.ts +4 -1
  19. package/cjs/charts/HistogramChart.js.map +1 -1
  20. package/cjs/charts/LineChart.d.ts +4 -1
  21. package/cjs/charts/LineChart.js.map +1 -1
  22. package/cjs/charts/LinearProgressChart.d.ts +4 -1
  23. package/cjs/charts/LinearProgressChart.js.map +1 -1
  24. package/cjs/charts/MapChart.d.ts +4 -1
  25. package/cjs/charts/MapChart.js.map +1 -1
  26. package/cjs/charts/PieChart.d.ts +4 -1
  27. package/cjs/charts/PieChart.js.map +1 -1
  28. package/cjs/charts/RadarChart.d.ts +4 -1
  29. package/cjs/charts/RadarChart.js.map +1 -1
  30. package/cjs/charts/RangeColumnChart.d.ts +4 -1
  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.map +1 -1
  36. package/cjs/charts/SequenceChart.d.ts +4 -1
  37. package/cjs/charts/SequenceChart.js.map +1 -1
  38. package/cjs/charts/WordCloudChart.d.ts +4 -1
  39. package/cjs/charts/WordCloudChart.js.map +1 -1
  40. package/cjs/charts/index.d.ts +18 -16
  41. package/cjs/charts/index.js +24 -146
  42. package/cjs/charts/index.js.map +1 -1
  43. package/cjs/components/Axis.d.ts +4 -5
  44. package/cjs/components/Axis.js.map +1 -1
  45. package/cjs/components/BaseComponent.d.ts +1 -1
  46. package/cjs/components/BaseComponent.js +10 -5
  47. package/cjs/components/BaseComponent.js.map +1 -1
  48. package/cjs/components/Brush.d.ts +5 -0
  49. package/cjs/components/Brush.js +10 -0
  50. package/cjs/components/Brush.js.map +1 -0
  51. package/cjs/components/Crosshair.d.ts +4 -0
  52. package/cjs/components/Crosshair.js +10 -0
  53. package/cjs/components/Crosshair.js.map +1 -0
  54. package/cjs/components/DataZoom.d.ts +5 -0
  55. package/cjs/components/DataZoom.js +10 -0
  56. package/cjs/components/DataZoom.js.map +1 -0
  57. package/cjs/components/Indicator.d.ts +4 -0
  58. package/cjs/components/Indicator.js +10 -0
  59. package/cjs/components/Indicator.js.map +1 -0
  60. package/cjs/components/Legend.d.ts +4 -8
  61. package/cjs/components/Legend.js.map +1 -1
  62. package/cjs/components/Mark.d.ts +2 -2
  63. package/cjs/components/Mark.js +3 -2
  64. package/cjs/components/Mark.js.map +1 -1
  65. package/cjs/components/MarkArea.d.ts +4 -0
  66. package/cjs/components/MarkArea.js +10 -0
  67. package/cjs/components/MarkArea.js.map +1 -0
  68. package/cjs/components/MarkLine.d.ts +4 -0
  69. package/cjs/components/MarkLine.js +10 -0
  70. package/cjs/components/MarkLine.js.map +1 -0
  71. package/cjs/components/MarkPoint.d.ts +4 -0
  72. package/cjs/components/MarkPoint.js +10 -0
  73. package/cjs/components/MarkPoint.js.map +1 -0
  74. package/cjs/components/Player.d.ts +5 -0
  75. package/cjs/components/Player.js +10 -0
  76. package/cjs/components/Player.js.map +1 -0
  77. package/cjs/components/Region.d.ts +4 -4
  78. package/cjs/components/Region.js.map +1 -1
  79. package/cjs/components/ScrollBar.d.ts +5 -0
  80. package/cjs/components/ScrollBar.js +9 -0
  81. package/cjs/components/ScrollBar.js.map +1 -0
  82. package/cjs/components/Title.d.ts +4 -0
  83. package/cjs/components/Title.js +10 -0
  84. package/cjs/components/Title.js.map +1 -0
  85. package/cjs/components/Tooltip.d.ts +4 -0
  86. package/cjs/components/Tooltip.js +10 -0
  87. package/cjs/components/Tooltip.js.map +1 -0
  88. package/cjs/components/index.d.ts +11 -0
  89. package/cjs/components/index.js +8 -2
  90. package/cjs/components/index.js.map +1 -1
  91. package/cjs/constants.js +1 -1
  92. package/cjs/containers/withContainer.d.ts +2 -2
  93. package/cjs/containers/withContainer.js.map +1 -1
  94. package/cjs/context/stage.d.ts +1 -1
  95. package/cjs/context/stage.js.map +1 -1
  96. package/cjs/context/view.d.ts +2 -2
  97. package/cjs/context/view.js.map +1 -1
  98. package/cjs/eventsUtils.d.ts +146 -47
  99. package/cjs/eventsUtils.js +33 -4
  100. package/cjs/eventsUtils.js.map +1 -1
  101. package/cjs/index.d.ts +1 -1
  102. package/cjs/index.js +4 -12
  103. package/cjs/index.js.map +1 -1
  104. package/cjs/series/Area.d.ts +5 -5
  105. package/cjs/series/Area.js.map +1 -1
  106. package/cjs/series/Bar.d.ts +5 -5
  107. package/cjs/series/Bar.js.map +1 -1
  108. package/cjs/series/BaseSeries.d.ts +1 -1
  109. package/cjs/series/BaseSeries.js +6 -6
  110. package/cjs/series/BaseSeries.js.map +1 -1
  111. package/cjs/series/BoxPlot.d.ts +5 -5
  112. package/cjs/series/BoxPlot.js.map +1 -1
  113. package/cjs/series/CircularProgress.d.ts +5 -5
  114. package/cjs/series/CircularProgress.js.map +1 -1
  115. package/cjs/series/Dot.d.ts +5 -5
  116. package/cjs/series/Dot.js.map +1 -1
  117. package/cjs/series/Funnel.d.ts +5 -5
  118. package/cjs/series/Funnel.js.map +1 -1
  119. package/cjs/series/Line.d.ts +5 -5
  120. package/cjs/series/Line.js.map +1 -1
  121. package/cjs/series/LinearProgress.d.ts +5 -5
  122. package/cjs/series/LinearProgress.js.map +1 -1
  123. package/cjs/series/Link.d.ts +5 -5
  124. package/cjs/series/Link.js +1 -2
  125. package/cjs/series/Link.js.map +1 -1
  126. package/cjs/series/Map.d.ts +5 -5
  127. package/cjs/series/Map.js +2 -1
  128. package/cjs/series/Map.js.map +1 -1
  129. package/cjs/series/Pie.d.ts +5 -5
  130. package/cjs/series/Pie.js.map +1 -1
  131. package/cjs/series/Radar.d.ts +5 -5
  132. package/cjs/series/Radar.js.map +1 -1
  133. package/cjs/series/RangeColumn.d.ts +5 -5
  134. package/cjs/series/RangeColumn.js.map +1 -1
  135. package/cjs/series/Rose.d.ts +5 -5
  136. package/cjs/series/Rose.js.map +1 -1
  137. package/cjs/series/Scatter.d.ts +5 -5
  138. package/cjs/series/Scatter.js.map +1 -1
  139. package/cjs/series/Series.d.ts +5 -6
  140. package/cjs/series/Series.js.map +1 -1
  141. package/cjs/series/WordCloud.d.ts +5 -5
  142. package/cjs/series/WordCloud.js +1 -1
  143. package/cjs/series/WordCloud.js.map +1 -1
  144. package/cjs/series/index.js +1 -1
  145. package/cjs/util.js +1 -1
  146. package/esm/VChart.d.ts +1 -1
  147. package/esm/charts/AreaChart.d.ts +4 -1
  148. package/esm/charts/AreaChart.js.map +1 -1
  149. package/esm/charts/BarChart.d.ts +4 -1
  150. package/esm/charts/BarChart.js.map +1 -1
  151. package/esm/charts/BaseChart.d.ts +7 -5
  152. package/esm/charts/BaseChart.js +34 -10
  153. package/esm/charts/BaseChart.js.map +1 -1
  154. package/esm/charts/BoxPlotChart.d.ts +4 -1
  155. package/esm/charts/BoxPlotChart.js.map +1 -1
  156. package/esm/charts/CircularProgressChart.d.ts +4 -1
  157. package/esm/charts/CircularProgressChart.js.map +1 -1
  158. package/esm/charts/CommonChart.d.ts +4 -1
  159. package/esm/charts/CommonChart.js.map +1 -1
  160. package/esm/charts/FunnelChart.d.ts +4 -1
  161. package/esm/charts/FunnelChart.js.map +1 -1
  162. package/esm/charts/HistogramChart.d.ts +4 -1
  163. package/esm/charts/HistogramChart.js.map +1 -1
  164. package/esm/charts/LineChart.d.ts +4 -1
  165. package/esm/charts/LineChart.js.map +1 -1
  166. package/esm/charts/LinearProgressChart.d.ts +4 -1
  167. package/esm/charts/LinearProgressChart.js.map +1 -1
  168. package/esm/charts/MapChart.d.ts +4 -1
  169. package/esm/charts/MapChart.js.map +1 -1
  170. package/esm/charts/PieChart.d.ts +4 -1
  171. package/esm/charts/PieChart.js.map +1 -1
  172. package/esm/charts/RadarChart.d.ts +4 -1
  173. package/esm/charts/RadarChart.js.map +1 -1
  174. package/esm/charts/RangeColumnChart.d.ts +4 -1
  175. package/esm/charts/RangeColumnChart.js.map +1 -1
  176. package/esm/charts/RoseChart.d.ts +4 -1
  177. package/esm/charts/RoseChart.js.map +1 -1
  178. package/esm/charts/ScatterChart.d.ts +4 -1
  179. package/esm/charts/ScatterChart.js.map +1 -1
  180. package/esm/charts/SequenceChart.d.ts +4 -1
  181. package/esm/charts/SequenceChart.js.map +1 -1
  182. package/esm/charts/WordCloudChart.d.ts +4 -1
  183. package/esm/charts/WordCloudChart.js.map +1 -1
  184. package/esm/charts/index.d.ts +18 -16
  185. package/esm/charts/index.js +17 -17
  186. package/esm/charts/index.js.map +1 -1
  187. package/esm/components/Axis.d.ts +4 -5
  188. package/esm/components/Axis.js.map +1 -1
  189. package/esm/components/BaseComponent.d.ts +1 -1
  190. package/esm/components/BaseComponent.js +11 -5
  191. package/esm/components/BaseComponent.js.map +1 -1
  192. package/esm/components/Brush.d.ts +5 -0
  193. package/esm/components/Brush.js +6 -0
  194. package/esm/components/Brush.js.map +1 -0
  195. package/esm/components/Crosshair.d.ts +4 -0
  196. package/esm/components/Crosshair.js +4 -0
  197. package/esm/components/Crosshair.js.map +1 -0
  198. package/esm/components/DataZoom.d.ts +5 -0
  199. package/esm/components/DataZoom.js +6 -0
  200. package/esm/components/DataZoom.js.map +1 -0
  201. package/esm/components/Indicator.d.ts +4 -0
  202. package/esm/components/Indicator.js +4 -0
  203. package/esm/components/Indicator.js.map +1 -0
  204. package/esm/components/Legend.d.ts +4 -8
  205. package/esm/components/Legend.js.map +1 -1
  206. package/esm/components/Mark.d.ts +2 -2
  207. package/esm/components/Mark.js +3 -2
  208. package/esm/components/Mark.js.map +1 -1
  209. package/esm/components/MarkArea.d.ts +4 -0
  210. package/esm/components/MarkArea.js +4 -0
  211. package/esm/components/MarkArea.js.map +1 -0
  212. package/esm/components/MarkLine.d.ts +4 -0
  213. package/esm/components/MarkLine.js +4 -0
  214. package/esm/components/MarkLine.js.map +1 -0
  215. package/esm/components/MarkPoint.d.ts +4 -0
  216. package/esm/components/MarkPoint.js +4 -0
  217. package/esm/components/MarkPoint.js.map +1 -0
  218. package/esm/components/Player.d.ts +5 -0
  219. package/esm/components/Player.js +6 -0
  220. package/esm/components/Player.js.map +1 -0
  221. package/esm/components/Region.d.ts +4 -4
  222. package/esm/components/Region.js.map +1 -1
  223. package/esm/components/ScrollBar.d.ts +5 -0
  224. package/esm/components/ScrollBar.js +5 -0
  225. package/esm/components/ScrollBar.js.map +1 -0
  226. package/esm/components/Title.d.ts +4 -0
  227. package/esm/components/Title.js +4 -0
  228. package/esm/components/Title.js.map +1 -0
  229. package/esm/components/Tooltip.d.ts +4 -0
  230. package/esm/components/Tooltip.js +4 -0
  231. package/esm/components/Tooltip.js.map +1 -0
  232. package/esm/components/index.d.ts +11 -0
  233. package/esm/components/index.js +23 -1
  234. package/esm/components/index.js.map +1 -1
  235. package/esm/constants.js +1 -1
  236. package/esm/containers/withContainer.d.ts +2 -2
  237. package/esm/containers/withContainer.js.map +1 -1
  238. package/esm/context/stage.d.ts +1 -1
  239. package/esm/context/stage.js.map +1 -1
  240. package/esm/context/view.d.ts +2 -2
  241. package/esm/context/view.js.map +1 -1
  242. package/esm/eventsUtils.d.ts +146 -47
  243. package/esm/eventsUtils.js +46 -3
  244. package/esm/eventsUtils.js.map +1 -1
  245. package/esm/index.d.ts +1 -1
  246. package/esm/index.js +3 -2
  247. package/esm/index.js.map +1 -1
  248. package/esm/series/Area.d.ts +5 -5
  249. package/esm/series/Area.js.map +1 -1
  250. package/esm/series/Bar.d.ts +5 -5
  251. package/esm/series/Bar.js.map +1 -1
  252. package/esm/series/BaseSeries.d.ts +1 -1
  253. package/esm/series/BaseSeries.js +6 -6
  254. package/esm/series/BaseSeries.js.map +1 -1
  255. package/esm/series/BoxPlot.d.ts +5 -5
  256. package/esm/series/BoxPlot.js.map +1 -1
  257. package/esm/series/CircularProgress.d.ts +5 -5
  258. package/esm/series/CircularProgress.js.map +1 -1
  259. package/esm/series/Dot.d.ts +5 -5
  260. package/esm/series/Dot.js.map +1 -1
  261. package/esm/series/Funnel.d.ts +5 -5
  262. package/esm/series/Funnel.js.map +1 -1
  263. package/esm/series/Line.d.ts +5 -5
  264. package/esm/series/Line.js.map +1 -1
  265. package/esm/series/LinearProgress.d.ts +5 -5
  266. package/esm/series/LinearProgress.js.map +1 -1
  267. package/esm/series/Link.d.ts +5 -5
  268. package/esm/series/Link.js +1 -2
  269. package/esm/series/Link.js.map +1 -1
  270. package/esm/series/Map.d.ts +5 -5
  271. package/esm/series/Map.js +2 -1
  272. package/esm/series/Map.js.map +1 -1
  273. package/esm/series/Pie.d.ts +5 -5
  274. package/esm/series/Pie.js.map +1 -1
  275. package/esm/series/Radar.d.ts +5 -5
  276. package/esm/series/Radar.js.map +1 -1
  277. package/esm/series/RangeColumn.d.ts +5 -5
  278. package/esm/series/RangeColumn.js.map +1 -1
  279. package/esm/series/Rose.d.ts +5 -5
  280. package/esm/series/Rose.js.map +1 -1
  281. package/esm/series/Scatter.d.ts +5 -5
  282. package/esm/series/Scatter.js.map +1 -1
  283. package/esm/series/Series.d.ts +5 -6
  284. package/esm/series/Series.js.map +1 -1
  285. package/esm/series/WordCloud.d.ts +5 -5
  286. package/esm/series/WordCloud.js +1 -1
  287. package/esm/series/WordCloud.js.map +1 -1
  288. package/esm/series/index.js +1 -1
  289. package/esm/util.js +1 -1
  290. package/package.json +8 -7
package/esm/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export * from './charts';
2
2
  export * from './series';
3
3
  export * from './components';
4
- export { VChart } from './VChart';
4
+ export * from './VChart';
5
5
  import VChartCore from '@visactor/vchart';
6
6
  export { VChartCore };
package/esm/index.js CHANGED
@@ -4,8 +4,9 @@ export * from "./series";
4
4
 
5
5
  export * from "./components";
6
6
 
7
- export { VChart } from "./VChart";
7
+ export * from "./VChart";
8
8
 
9
9
  import VChartCore from "@visactor/vchart";
10
10
 
11
- export { VChartCore };
11
+ export { VChartCore };
12
+ //# sourceMappingURL=index.js.map
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport { VChart } from './VChart';\n\nimport VChartCore from '@visactor/vchart';\nexport { VChartCore };\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AAEzB,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\n\nimport VChartCore from '@visactor/vchart';\nexport { VChartCore };\n"]}
@@ -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
  }>;
@@ -21,28 +21,28 @@ export const createSeries = (componentName, markNames, type) => {
21
21
  (null == bindedEvents ? void 0 : bindedEvents[eventKey]) || (context.chart.on(REACT_TO_VCHART_EVENTS[eventKey], handleEvent),
22
22
  bindedEvents || (bindedEvents.current = {}), bindedEvents.current[eventKey] = !0);
23
23
  })));
24
- }, addMarkId = seriesSpec => {
24
+ }, addMarkId = spec => {
25
25
  markNames.forEach((markName => {
26
26
  const defaultMarkId = `${id.current}-${markName}`;
27
- isNil(seriesSpec[markName]) ? seriesSpec[markName] = {
27
+ isNil(spec[markName]) ? spec[markName] = {
28
28
  id: defaultMarkId
29
- } : isNil(seriesSpec[markName].id) && (seriesSpec[markName].id = defaultMarkId);
29
+ } : isNil(spec[markName].id) && (spec[markName].id = defaultMarkId);
30
30
  }));
31
31
  }, insertToContext = props => {
32
32
  if (context.specFromChildren) {
33
33
  context.specFromChildren.series || (context.specFromChildren.series = []);
34
- const seriesSpec = isNil(type) ? Object.assign(Object.assign({}, props), {
34
+ const spec = isNil(type) ? Object.assign(Object.assign({}, props), {
35
35
  id: id.current
36
36
  }) : Object.assign(Object.assign({}, props), {
37
37
  id: id.current,
38
38
  type: type
39
39
  });
40
- addMarkId(seriesSpec), context.specFromChildren.series.push(seriesSpec), context.isChildrenUpdated = !0;
40
+ addMarkId(spec), context.specFromChildren.series.push(spec), context.isChildrenUpdated = !0;
41
41
  }
42
42
  };
43
43
  if (addMarkEvent(findEventProps(props)), props.updateId !== updateId.current) updateId.current = props.updateId; else {
44
44
  const newSeriesSpec = pickWithout(props, notSpecKeys);
45
- isEqual(newSeriesSpec, seriesSpec.current) || (seriesSpec.current = newSeriesSpec,
45
+ addMarkId(newSeriesSpec), isEqual(newSeriesSpec, seriesSpec.current) || (seriesSpec.current = newSeriesSpec,
46
46
  (props => {
47
47
  if (!context.specFromChildren) return;
48
48
  if (!context.specFromChildren.series) return void insertToContext(props);
@@ -1 +1 @@
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,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AiB,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;IACnH,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,kBAAkB,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE1D,MAAM,IAAI,GAAwC,KAAK,CAAC,EAAE;QACxD,MA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AAC;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 = (spec: any) => {\n markNames.forEach(markName => {\n const defaultMarkId = `${id.current}-${markName}`;\n\n if (isNil(spec[markName])) {\n spec[markName] = { id: defaultMarkId };\n } else if (isNil(spec[markName].id)) {\n spec[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 spec = isNil(type) ? { ...props, id: id.current } : { ...props, id: id.current, type };\n\n addMarkId(spec);\n context.specFromChildren.series.push(spec);\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\n addMarkId(newSeriesSpec);\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 +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,4 +1,3 @@
1
1
  import { createSeries } from "./BaseSeries";
2
2
 
3
- export const Link = createSeries("Link", [ "link" ], "link");
4
- //# sourceMappingURL=Link.js.map
3
+ export const Link = createSeries("Link", [ "link" ], "link");
@@ -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"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface MapProps extends BaseSeriesProps {
3
- }
4
- export declare const Map: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IMapSeriesSpec } from '@visactor/vchart';
3
+ export type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;
4
+ export declare const Map: import("react").FC<BaseSeriesProps & Omit<IMapSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
package/esm/series/Map.js CHANGED
@@ -1,3 +1,4 @@
1
1
  import { createSeries } from "./BaseSeries";
2
2
 
3
- export const Map = createSeries("Map", [ "map" ], "map");
3
+ export const Map = createSeries("Map", [ "map" ], "map");
4
+ //# sourceMappingURL=Map.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Map.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":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface MapProps extends BaseSeriesProps {\n //\n}\n\nexport const Map = createSeries(\"Map\", [\"map\"], \"map\");\n"]}
1
+ {"version":3,"sources":["series/Map.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":"Map.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IMapSeriesSpec } from '@visactor/vchart';\n\nexport type MapProps = BaseSeriesProps & Omit<IMapSeriesSpec, 'type'>;\n\nexport const Map = createSeries<MapProps>('Map', ['map'], 'map');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface PieProps extends BaseSeriesProps {
3
- }
4
- export declare const Pie: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IPieSeriesSpec } from '@visactor/vchart';
3
+ export type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;
4
+ export declare const Pie: import("react").FC<BaseSeriesProps & Omit<IPieSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Pie.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":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface PieProps extends BaseSeriesProps {\n //\n}\n\nexport const Pie = createSeries(\"Pie\", [\"pie\"], \"pie\");\n"]}
1
+ {"version":3,"sources":["series/Pie.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":"Pie.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IPieSeriesSpec } from '@visactor/vchart';\n\nexport type PieProps = BaseSeriesProps & Omit<IPieSeriesSpec, 'type'>;\n\nexport const Pie = createSeries<PieProps>('Pie', ['pie'], 'pie');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface RadarProps extends BaseSeriesProps {
3
- }
4
- export declare const Radar: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IRadarSeriesSpec } from '@visactor/vchart';
3
+ export type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;
4
+ export declare const Radar: import("react").FC<BaseSeriesProps & Omit<IRadarSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface RadarProps extends BaseSeriesProps {\n //\n}\n\nexport const Radar = createSeries(\"Radar\", [\"radar\"], \"radar\");\n"]}
1
+ {"version":3,"sources":["series/Radar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,KAAK,GAAG,YAAY,CAAa,OAAO,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAC","file":"Radar.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRadarSeriesSpec } from '@visactor/vchart';\n\nexport type RadarProps = BaseSeriesProps & Omit<IRadarSeriesSpec, 'type'>;\n\nexport const Radar = createSeries<RadarProps>('Radar', ['radar'], 'radar');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface RangeColumnProps extends BaseSeriesProps {
3
- }
4
- export declare const RangeColumn: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IRangeColumnSeriesSpec } from '@visactor/vchart';
3
+ export type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;
4
+ export declare const RangeColumn: import("react").FC<BaseSeriesProps & Omit<IRangeColumnSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CACrC,aAAa,EACb,CAAC,aAAa,CAAC,EACf,aAAa,CACd,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface RangeColumnProps extends BaseSeriesProps {\n //\n}\n\nexport const RangeColumn = createSeries(\n \"RangeColumn\",\n [\"rangeColumn\"],\n \"rangeColumn\"\n);\n"]}
1
+ {"version":3,"sources":["series/RangeColumn.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,WAAW,GAAG,YAAY,CAAmB,aAAa,EAAE,CAAC,aAAa,CAAC,EAAE,aAAa,CAAC,CAAC","file":"RangeColumn.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRangeColumnSeriesSpec } from '@visactor/vchart';\n\nexport type RangeColumnProps = BaseSeriesProps & Omit<IRangeColumnSeriesSpec, 'type'>;\n\nexport const RangeColumn = createSeries<RangeColumnProps>('RangeColumn', ['rangeColumn'], 'rangeColumn');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface RoseProps extends BaseSeriesProps {
3
- }
4
- export declare const Rose: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IRoseSeriesSpec } from '@visactor/vchart';
3
+ export type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;
4
+ export declare const Rose: import("react").FC<BaseSeriesProps & Omit<IRoseSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Rose.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":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface RoseProps extends BaseSeriesProps {\n //\n}\n\nexport const Rose = createSeries(\"Rose\", [\"rose\"], \"rose\");\n"]}
1
+ {"version":3,"sources":["series/Rose.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":"Rose.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IRoseSeriesSpec } from '@visactor/vchart';\n\nexport type RoseProps = BaseSeriesProps & Omit<IRoseSeriesSpec, 'type'>;\n\nexport const Rose = createSeries<RoseProps>('Rose', ['rose'], 'rose');\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface ScatterProps extends BaseSeriesProps {
3
- }
4
- export declare const Scatter: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IScatterSeriesSpec } from '@visactor/vchart';
3
+ export type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;
4
+ export declare const Scatter: import("react").FC<BaseSeriesProps & Omit<IScatterSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Scatter.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":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface ScatterProps extends BaseSeriesProps {\n //\n}\n\nexport const Scatter = createSeries(\"Scatter\", [\"scatter\"], \"scatter\");\n"]}
1
+ {"version":3,"sources":["series/Scatter.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":"Scatter.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IScatterSeriesSpec } from '@visactor/vchart';\n\nexport type ScatterProps = BaseSeriesProps & Omit<IScatterSeriesSpec, 'type'>;\n\nexport const Scatter = createSeries<ScatterProps>('Scatter', ['scatter'], 'scatter');\n"]}
@@ -1,7 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface SeriesProps extends BaseSeriesProps {
3
- type: string;
4
- }
5
- export declare const Series: import("react").FC<BaseSeriesProps & {
6
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IBarSeriesSpec, IAreaSeriesSpec, IBoxPlotSeriesSpec, ICircularProgressSeriesSpec, IDotSeriesSpec, IFunnelSeriesSpec, ILineSeriesSpec, ILinearProgressSeriesSpec, ILinkSeriesSpec, IMapSeriesSpec, IPieSeriesSpec, IRadarSeriesSpec, IRangeColumnSeriesSpec, IRoseSeriesSpec, IScatterSeriesSpec, IWordCloudSeriesSpec } from '@visactor/vchart';
3
+ export type SeriesProps = (IBarSeriesSpec | IAreaSeriesSpec | IBoxPlotSeriesSpec | ICircularProgressSeriesSpec | IDotSeriesSpec | IFunnelSeriesSpec | ILineSeriesSpec | ILinearProgressSeriesSpec | ILinkSeriesSpec | IMapSeriesSpec | IPieSeriesSpec | IRadarSeriesSpec | IRangeColumnSeriesSpec | IRoseSeriesSpec | IScatterSeriesSpec | IWordCloudSeriesSpec) & BaseSeriesProps;
4
+ export declare const Series: import("react").FC<SeriesProps & {
5
+ updateId?: number;
7
6
  }>;
@@ -1 +1 @@
1
- {"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface SeriesProps extends BaseSeriesProps {\n type: string;\n}\n\nexport const Series = createSeries(\"Series\", [\"bar\", \"line\", \"area\"]);\n"]}
1
+ {"version":3,"sources":["series/Series.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAuC7D,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAc,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC","file":"Series.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport {\n IBarSeriesSpec,\n IAreaSeriesSpec,\n IBoxPlotSeriesSpec,\n ICircularProgressSeriesSpec,\n IDotSeriesSpec,\n IFunnelSeriesSpec,\n ILineSeriesSpec,\n ILinearProgressSeriesSpec,\n ILinkSeriesSpec,\n IMapSeriesSpec,\n IPieSeriesSpec,\n IRadarSeriesSpec,\n IRangeColumnSeriesSpec,\n IRoseSeriesSpec,\n IScatterSeriesSpec,\n IWordCloudSeriesSpec\n} from '@visactor/vchart';\nexport type SeriesProps = (\n | IBarSeriesSpec\n | IAreaSeriesSpec\n | IBoxPlotSeriesSpec\n | ICircularProgressSeriesSpec\n | IDotSeriesSpec\n | IFunnelSeriesSpec\n | ILineSeriesSpec\n | ILinearProgressSeriesSpec\n | ILinkSeriesSpec\n | IMapSeriesSpec\n | IPieSeriesSpec\n | IRadarSeriesSpec\n | IRangeColumnSeriesSpec\n | IRoseSeriesSpec\n | IScatterSeriesSpec\n | IWordCloudSeriesSpec\n) &\n BaseSeriesProps;\n\nexport const Series = createSeries<SeriesProps>('Series', ['bar', 'line', 'area']);\n"]}
@@ -1,6 +1,6 @@
1
- import { BaseSeriesProps } from "./BaseSeries";
2
- export interface WordCloudProps extends BaseSeriesProps {
3
- }
4
- export declare const WordCloud: import("react").FC<BaseSeriesProps & {
5
- updateId: number;
1
+ import { BaseSeriesProps } from './BaseSeries';
2
+ import { IWordCloudSeriesSpec } from '@visactor/vchart';
3
+ export type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;
4
+ export declare const WordCloud: import("react").FC<BaseSeriesProps & Omit<IWordCloudSeriesSpec, "type"> & {
5
+ updateId?: number;
6
6
  }>;
@@ -1,4 +1,4 @@
1
1
  import { createSeries } from "./BaseSeries";
2
2
 
3
3
  export const WordCloud = createSeries("WordCloud", [ "wordCloud" ], "wordCloud");
4
- //# sourceMappingURL=WordCloud.js.map
4
+ //# sourceMappingURL=WordCloud.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAM7D,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAC,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from \"./BaseSeries\";\n\nexport interface WordCloudProps extends BaseSeriesProps {\n //\n}\n\nexport const WordCloud = createSeries(\"WordCloud\", [\"wordCloud\"], \"wordCloud\");\n"]}
1
+ {"version":3,"sources":["series/WordCloud.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAmB,YAAY,EAAE,MAAM,cAAc,CAAC;AAK7D,MAAM,CAAC,MAAM,SAAS,GAAG,YAAY,CAAiB,WAAW,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,CAAC,CAAC","file":"WordCloud.js","sourcesContent":["import { BaseSeriesProps, createSeries } from './BaseSeries';\nimport { IWordCloudSeriesSpec } from '@visactor/vchart';\n\nexport type WordCloudProps = BaseSeriesProps & Omit<IWordCloudSeriesSpec, 'type'>;\n\nexport const WordCloud = createSeries<WordCloudProps>('WordCloud', ['wordCloud'], 'wordCloud');\n"]}
@@ -31,4 +31,4 @@ export * from "./LinearProgress";
31
31
  export * from "./RangeColumn";
32
32
 
33
33
  export * from "./BoxPlot";
34
- //# sourceMappingURL=index.js.map
34
+ //# sourceMappingURL=index.js.map
package/esm/util.js CHANGED
@@ -33,4 +33,4 @@ export const findChildByType = (children, type) => {
33
33
  const result = findAllByType(children, type);
34
34
  return null == result ? void 0 : result[0];
35
35
  };
36
- //# sourceMappingURL=util.js.map
36
+ //# sourceMappingURL=util.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/react-vchart",
3
- "version": "0.0.1-alpha.2",
3
+ "version": "0.16.17-alpha.0",
4
4
  "description": "The react version of VChart 4.x",
5
5
  "keywords": [
6
6
  "react",
@@ -22,10 +22,11 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@visactor/vchart": "0.0.1-alpha.2",
26
- "@visactor/vutils": "0.9.0-alpha.2",
27
- "@visactor/vgrammar": "0.0.11-alpha.8",
28
- "@visactor/vrender": "0.9.2-fill-stroke.10",
25
+ "@visactor/vchart": "0.16.17-alpha.0",
26
+ "@visactor/vutils": "~0.16.10",
27
+ "@visactor/vrender-core": "~0.16.15",
28
+ "@visactor/vrender-kits": "~0.16.15",
29
+ "@visactor/vgrammar-core": "~0.8.6",
29
30
  "react-is": "^18.2.0"
30
31
  },
31
32
  "devDependencies": {
@@ -60,7 +61,7 @@
60
61
  "react": ">=16.0.0",
61
62
  "react-dom": ">=16.0.0"
62
63
  },
63
- "homepage": "",
64
+ "homepage": "https://www.visactor.io/vchart",
64
65
  "bugs": "https://github.com/VisActor/VChart/issues",
65
66
  "repository": {
66
67
  "type": "git",
@@ -69,7 +70,7 @@
69
70
  },
70
71
  "author": {
71
72
  "name": "VisActor",
72
- "url": "https://VisActor.io/"
73
+ "url": "https://www.visactor.io/"
73
74
  },
74
75
  "license": "MIT",
75
76
  "publishConfig": {