@visactor/react-vchart 0.0.1-alpha.2 → 0.10.0-alpha.3
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.
- package/README.md +33 -5
- package/cjs/VChart.d.ts +4 -2
- package/cjs/VChart.js +11 -3
- package/cjs/VChart.js.map +1 -1
- package/cjs/VChartSimple.d.ts +6 -0
- package/cjs/VChartSimple.js +10 -0
- package/cjs/VChartSimple.js.map +1 -0
- package/cjs/charts/AreaChart.d.ts +7 -2
- package/cjs/charts/AreaChart.js +11 -2
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +7 -2
- package/cjs/charts/BarChart.js +11 -2
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +10 -6
- package/cjs/charts/BaseChart.js +57 -34
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +6 -1
- package/cjs/charts/BoxPlotChart.js +11 -2
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +6 -1
- package/cjs/charts/CircularProgressChart.js +11 -2
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +6 -1
- package/cjs/charts/CommonChart.js +11 -2
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +6 -1
- package/cjs/charts/FunnelChart.js +11 -2
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +6 -1
- package/cjs/charts/HistogramChart.js +11 -2
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +7 -2
- package/cjs/charts/LineChart.js +11 -2
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +6 -1
- package/cjs/charts/LinearProgressChart.js +11 -2
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +7 -2
- package/cjs/charts/MapChart.js +11 -2
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +7 -2
- package/cjs/charts/PieChart.js +11 -2
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +7 -2
- package/cjs/charts/RadarChart.js +11 -2
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +7 -2
- package/cjs/charts/RangeColumnChart.js +11 -2
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +7 -2
- package/cjs/charts/RoseChart.js +11 -3
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +7 -2
- package/cjs/charts/ScatterChart.js +12 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +7 -2
- package/cjs/charts/SequenceChart.js +11 -2
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +7 -2
- package/cjs/charts/WordCloudChart.js +11 -2
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.d.ts +18 -16
- package/cjs/charts/index.js +24 -146
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.d.ts +4 -5
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.d.ts +2 -1
- package/cjs/components/BaseComponent.js +14 -35
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.d.ts +5 -0
- package/cjs/components/Brush.js +10 -0
- package/cjs/components/Brush.js.map +1 -0
- package/cjs/components/Crosshair.d.ts +4 -0
- package/cjs/components/Crosshair.js +10 -0
- package/cjs/components/Crosshair.js.map +1 -0
- package/cjs/components/DataZoom.d.ts +5 -0
- package/cjs/components/DataZoom.js +10 -0
- package/cjs/components/DataZoom.js.map +1 -0
- package/cjs/components/Indicator.d.ts +4 -0
- package/cjs/components/Indicator.js +10 -0
- package/cjs/components/Indicator.js.map +1 -0
- package/cjs/components/Legend.d.ts +4 -8
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.d.ts +4 -14
- package/cjs/components/Mark.js +2 -60
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.d.ts +4 -0
- package/cjs/components/MarkArea.js +10 -0
- package/cjs/components/MarkArea.js.map +1 -0
- package/cjs/components/MarkLine.d.ts +4 -0
- package/cjs/components/MarkLine.js +10 -0
- package/cjs/components/MarkLine.js.map +1 -0
- package/cjs/components/MarkPoint.d.ts +4 -0
- package/cjs/components/MarkPoint.js +10 -0
- package/cjs/components/MarkPoint.js.map +1 -0
- package/cjs/components/Player.d.ts +5 -0
- package/cjs/components/Player.js +10 -0
- package/cjs/components/Player.js.map +1 -0
- package/cjs/components/Region.d.ts +4 -4
- package/cjs/components/Region.js +1 -2
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.d.ts +5 -0
- package/cjs/components/ScrollBar.js +10 -0
- package/cjs/components/ScrollBar.js.map +1 -0
- package/cjs/components/Title.d.ts +4 -0
- package/cjs/components/Title.js +10 -0
- package/cjs/components/Title.js.map +1 -0
- package/cjs/components/Tooltip.d.ts +4 -0
- package/cjs/components/Tooltip.js +10 -0
- package/cjs/components/Tooltip.js.map +1 -0
- package/cjs/components/index.d.ts +11 -0
- package/cjs/components/index.js +8 -2
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/containers/withContainer.d.ts +2 -2
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/chart.d.ts +2 -3
- package/cjs/context/chart.js.map +1 -1
- package/cjs/context/stage.d.ts +2 -2
- package/cjs/context/stage.js.map +1 -1
- package/cjs/context/view.d.ts +2 -2
- package/cjs/context/view.js.map +1 -1
- package/cjs/eventsUtils.d.ts +148 -47
- package/cjs/eventsUtils.js +35 -5
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +4 -3
- package/cjs/index.js +4 -19
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +6 -5
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +6 -5
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.d.ts +2 -1
- package/cjs/series/BaseSeries.js +22 -49
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +6 -5
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +6 -5
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +6 -5
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +6 -5
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +6 -5
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +6 -5
- package/cjs/series/LinearProgress.js +1 -2
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +6 -5
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +6 -5
- package/cjs/series/Map.js +2 -1
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +6 -5
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +6 -5
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +6 -5
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +6 -5
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +6 -5
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +6 -6
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +6 -5
- package/cjs/series/WordCloud.js +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js +1 -1
- package/cjs/series/index.js.map +1 -1
- package/cjs/util.js +1 -1
- package/cjs/util.js.map +1 -1
- package/esm/VChart.d.ts +4 -2
- package/esm/VChart.js +7 -1
- package/esm/VChart.js.map +1 -1
- package/esm/VChartSimple.d.ts +6 -0
- package/esm/VChartSimple.js +4 -0
- package/esm/VChartSimple.js.map +1 -0
- package/esm/charts/AreaChart.d.ts +7 -2
- package/esm/charts/AreaChart.js +6 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +7 -2
- package/esm/charts/BarChart.js +6 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +10 -6
- package/esm/charts/BaseChart.js +56 -35
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +6 -1
- package/esm/charts/BoxPlotChart.js +6 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +6 -1
- package/esm/charts/CircularProgressChart.js +6 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +6 -1
- package/esm/charts/CommonChart.js +6 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +6 -1
- package/esm/charts/FunnelChart.js +6 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +6 -1
- package/esm/charts/HistogramChart.js +6 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +7 -2
- package/esm/charts/LineChart.js +6 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +6 -1
- package/esm/charts/LinearProgressChart.js +6 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +7 -2
- package/esm/charts/MapChart.js +6 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +7 -2
- package/esm/charts/PieChart.js +6 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +7 -2
- package/esm/charts/RadarChart.js +6 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +7 -2
- package/esm/charts/RangeColumnChart.js +6 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +7 -2
- package/esm/charts/RoseChart.js +6 -2
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +7 -2
- package/esm/charts/ScatterChart.js +7 -1
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +7 -2
- package/esm/charts/SequenceChart.js +6 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +7 -2
- package/esm/charts/WordCloudChart.js +6 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.d.ts +18 -16
- package/esm/charts/index.js +17 -17
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.d.ts +4 -5
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.d.ts +2 -1
- package/esm/components/BaseComponent.js +14 -35
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.d.ts +5 -0
- package/esm/components/Brush.js +6 -0
- package/esm/components/Brush.js.map +1 -0
- package/esm/components/Crosshair.d.ts +4 -0
- package/esm/components/Crosshair.js +4 -0
- package/esm/components/Crosshair.js.map +1 -0
- package/esm/components/DataZoom.d.ts +5 -0
- package/esm/components/DataZoom.js +6 -0
- package/esm/components/DataZoom.js.map +1 -0
- package/esm/components/Indicator.d.ts +4 -0
- package/esm/components/Indicator.js +4 -0
- package/esm/components/Indicator.js.map +1 -0
- package/esm/components/Legend.d.ts +4 -8
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.d.ts +4 -14
- package/esm/components/Mark.js +2 -38
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.d.ts +4 -0
- package/esm/components/MarkArea.js +4 -0
- package/esm/components/MarkArea.js.map +1 -0
- package/esm/components/MarkLine.d.ts +4 -0
- package/esm/components/MarkLine.js +4 -0
- package/esm/components/MarkLine.js.map +1 -0
- package/esm/components/MarkPoint.d.ts +4 -0
- package/esm/components/MarkPoint.js +4 -0
- package/esm/components/MarkPoint.js.map +1 -0
- package/esm/components/Player.d.ts +5 -0
- package/esm/components/Player.js +6 -0
- package/esm/components/Player.js.map +1 -0
- package/esm/components/Region.d.ts +4 -4
- package/esm/components/Region.js +1 -2
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.d.ts +5 -0
- package/esm/components/ScrollBar.js +6 -0
- package/esm/components/ScrollBar.js.map +1 -0
- package/esm/components/Title.d.ts +4 -0
- package/esm/components/Title.js +4 -0
- package/esm/components/Title.js.map +1 -0
- package/esm/components/Tooltip.d.ts +4 -0
- package/esm/components/Tooltip.js +4 -0
- package/esm/components/Tooltip.js.map +1 -0
- package/esm/components/index.d.ts +11 -0
- package/esm/components/index.js +23 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/containers/withContainer.d.ts +2 -2
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/chart.d.ts +2 -3
- package/esm/context/chart.js.map +1 -1
- package/esm/context/stage.d.ts +2 -2
- package/esm/context/stage.js.map +1 -1
- package/esm/context/view.d.ts +2 -2
- package/esm/context/view.js.map +1 -1
- package/esm/eventsUtils.d.ts +148 -47
- package/esm/eventsUtils.js +48 -4
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +4 -3
- package/esm/index.js +4 -3
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +6 -5
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +6 -5
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.d.ts +2 -1
- package/esm/series/BaseSeries.js +22 -50
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +6 -5
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +6 -5
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +6 -5
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +6 -5
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +6 -5
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +6 -5
- package/esm/series/LinearProgress.js +1 -2
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +6 -5
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +6 -5
- package/esm/series/Map.js +2 -1
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +6 -5
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +6 -5
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +6 -5
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +6 -5
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +6 -5
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +6 -6
- package/esm/series/Series.js +1 -1
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +6 -5
- package/esm/series/WordCloud.js +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js +1 -1
- package/esm/series/index.js.map +1 -1
- package/esm/util.js +1 -1
- package/esm/util.js.map +1 -1
- package/package.json +11 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Legend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"sources":["../src/components/Legend.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAoB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAc,QAAQ,EAAE,SAAS,EAAE,wBAAwB,CAAC,CAAC","file":"Legend.js","sourcesContent":["import type { IDiscreteLegendSpec } from '@visactor/vchart';\nimport { LEGEND_CUSTOMIZED_EVENTS, LegendEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;\n\nexport const Legend = createComponent<LegendProps>('Legend', 'legends', LEGEND_CUSTOMIZED_EVENTS);\n"]}
|
package/esm/components/Mark.d.ts
CHANGED
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
glyphType?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface IMarkElement extends React.ReactElement<Props, React.JSXElementConstructor<Props>> {
|
|
8
|
-
id: string | number;
|
|
9
|
-
}
|
|
10
|
-
type Props = MarkProps & {
|
|
11
|
-
updateId: number;
|
|
12
|
-
};
|
|
13
|
-
export declare const Mark: React.FC<Props>;
|
|
14
|
-
export {};
|
|
1
|
+
import type { ICustomMarkSpec, EnableMarkType } from '@visactor/vchart';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
export type MarkProps = ICustomMarkSpec<EnableMarkType> & BaseComponentProps;
|
|
4
|
+
export declare const Mark: import("react").FC<MarkProps>;
|
package/esm/components/Mark.js
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
4
|
-
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
5
|
-
var i = 0;
|
|
6
|
-
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
1
|
+
import { createComponent } from "./BaseComponent";
|
|
10
2
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { isNil } from "@visactor/vutils";
|
|
14
|
-
|
|
15
|
-
import ViewContext from "../context/view";
|
|
16
|
-
|
|
17
|
-
import { uid } from "../util";
|
|
18
|
-
|
|
19
|
-
export const Mark = props => {
|
|
20
|
-
const context = useContext(ViewContext), id = React.useRef(isNil(props.id) ? uid("mark") : props.id);
|
|
21
|
-
return context && addOrUpdateMark(context, id.current, props), useEffect((() => () => {
|
|
22
|
-
context && removeMark(context, id.current);
|
|
23
|
-
}), []), null;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
const addOrUpdateMark = (view, id, props) => {
|
|
27
|
-
var _a;
|
|
28
|
-
if (!view.renderer) return;
|
|
29
|
-
let mark = view.getMarkById(id);
|
|
30
|
-
const {group: group, glyphType: glyphType, updateId: updateId} = props, others = __rest(props, [ "group", "glyphType", "updateId" ]);
|
|
31
|
-
mark || (mark = view.mark(props.type, null !== (_a = props.group) && void 0 !== _a ? _a : view.rootMark, props.glyphType ? {
|
|
32
|
-
glyphType: props.glyphType
|
|
33
|
-
} : null).name(id)), mark.parse(others), view.runAsync();
|
|
34
|
-
}, removeMark = (view, id) => {
|
|
35
|
-
if (view.renderer) {
|
|
36
|
-
view.getMarkById(id);
|
|
37
|
-
view.removeGrammar(id);
|
|
38
|
-
}
|
|
39
|
-
};
|
|
3
|
+
export const Mark = createComponent("Mark", "customMark");
|
|
40
4
|
//# sourceMappingURL=Mark.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Mark.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/components/Mark.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAY,MAAM,EAAE,YAAY,CAAC,CAAC","file":"Mark.js","sourcesContent":["import type { ICustomMarkSpec, EnableMarkType } from '@visactor/vchart';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport type MarkProps = ICustomMarkSpec<EnableMarkType> & BaseComponentProps;\n\nexport const Mark = createComponent<MarkProps>('Mark', 'customMark');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/MarkArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,CAAC,CAAC","file":"MarkArea.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkAreaSpec } from '@visactor/vchart';\n\nexport type MarkAreaProps = IMarkAreaSpec & BaseComponentProps;\n\nexport const MarkArea = createComponent<MarkAreaProps>('MarkArea', 'markArea');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/MarkLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,CAAC,CAAC","file":"MarkLine.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkLineSpec } from '@visactor/vchart';\n\nexport type MarkLineProps = IMarkLineSpec & BaseComponentProps;\n\nexport const MarkLine = createComponent<MarkLineProps>('MarkLine', 'markLine');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/MarkPoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,CAAC,CAAC","file":"MarkPoint.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkPointSpec } from '@visactor/vchart';\n\nexport type MarkPointProps = IMarkPointSpec & BaseComponentProps;\n\nexport const MarkPoint = createComponent<MarkPointProps>('MarkPoint', 'markPoint');\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PlayerEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IPlayerSpec } from '@visactor/vchart';
|
|
4
|
+
export type PlayerProps = IPlayerSpec & BaseComponentProps & PlayerEventProps;
|
|
5
|
+
export declare const Player: import("react").FC<PlayerProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Player.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAoB,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAc,QAAQ,EAAE,QAAQ,EAAE,wBAAwB,EAAE,IAAI,CAAC,CAAC","file":"Player.js","sourcesContent":["import { PLAYER_CUSTOMIZED_EVENTS, PlayerEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IPlayerSpec } from '@visactor/vchart';\n\nexport type PlayerProps = IPlayerSpec & BaseComponentProps & PlayerEventProps;\n\nexport const Player = createComponent<PlayerProps>('Player', 'player', PLAYER_CUSTOMIZED_EVENTS, true);\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IRegionSpec } from '@visactor/vchart';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
export interface RegionProps extends BaseComponentProps, IRegionSpec {
|
|
2
4
|
}
|
|
3
|
-
export declare const Region: import("react").FC<
|
|
4
|
-
updateId?: number;
|
|
5
|
-
}>;
|
|
5
|
+
export declare const Region: import("react").FC<RegionProps>;
|
package/esm/components/Region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Region.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"sources":["../src/components/Region.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMtE,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAc,QAAQ,EAAE,QAAQ,CAAC,CAAC","file":"Region.js","sourcesContent":["import type { IRegionSpec } from '@visactor/vchart';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport interface RegionProps extends BaseComponentProps, IRegionSpec {\n //\n}\n\nexport const Region = createComponent<RegionProps>('Region', 'region');\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScrollBarEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IScrollBarSpec } from '@visactor/vchart';
|
|
4
|
+
export type ScrollBarProps = IScrollBarSpec & BaseComponentProps & ScrollBarEventProps;
|
|
5
|
+
export declare const ScrollBar: import("react").FC<ScrollBarProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ScrollBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAuB,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,2BAA2B,CAAC,CAAC","file":"ScrollBar.js","sourcesContent":["import { SCROLLBAR_CUSTOMIZED_EVENTS, ScrollBarEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IScrollBarSpec } from '@visactor/vchart';\n\nexport type ScrollBarProps = IScrollBarSpec & BaseComponentProps & ScrollBarEventProps;\n\nexport const ScrollBar = createComponent<ScrollBarProps>('ScrollBar', 'scrollBar', SCROLLBAR_CUSTOMIZED_EVENTS);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Title.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ITitleSpec } from '@visactor/vchart';\n\nexport type TitleProps = ITitleSpec & BaseComponentProps;\n\nexport const Title = createComponent<TitleProps>('Title', 'title', null, true);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAe,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Tooltip.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ITooltipSpec } from '@visactor/vchart';\n\nexport type TooltipProps = ITooltipSpec & BaseComponentProps;\n\nexport const Tooltip = createComponent<TooltipProps>('Tooltip', 'tooltip', null, true);\n"]}
|
|
@@ -2,3 +2,14 @@ export * from './Axis';
|
|
|
2
2
|
export * from './Mark';
|
|
3
3
|
export * from './Region';
|
|
4
4
|
export * from './Legend';
|
|
5
|
+
export * from './Brush';
|
|
6
|
+
export * from './Crosshair';
|
|
7
|
+
export * from './DataZoom';
|
|
8
|
+
export * from './MarkLine';
|
|
9
|
+
export * from './MarkArea';
|
|
10
|
+
export * from './MarkPoint';
|
|
11
|
+
export * from './ScrollBar';
|
|
12
|
+
export * from './Tooltip';
|
|
13
|
+
export * from './Player';
|
|
14
|
+
export * from './Indicator';
|
|
15
|
+
export * from './Title';
|
package/esm/components/index.js
CHANGED
|
@@ -5,4 +5,26 @@ export * from "./Mark";
|
|
|
5
5
|
export * from "./Region";
|
|
6
6
|
|
|
7
7
|
export * from "./Legend";
|
|
8
|
-
|
|
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
|
+
|
|
27
|
+
export * from "./Indicator";
|
|
28
|
+
|
|
29
|
+
export * from "./Title";
|
|
30
|
+
//# 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":["../src/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;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,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';\nexport * from './Indicator';\nexport * from './Title';\n"]}
|
package/esm/constants.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const REACT_PRIVATE_PROPS = [ "children", "hooks", "ref" ];
|
|
2
|
-
//# sourceMappingURL=constants.js.map
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
package/esm/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC","file":"constants.js","sourcesContent":["export const REACT_PRIVATE_PROPS = [\"children\", \"hooks\", \"ref\"];\n\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC","file":"constants.js","sourcesContent":["export const REACT_PRIVATE_PROPS = [\"children\", \"hooks\", \"ref\"];\n\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import React from
|
|
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,
|
|
1
|
+
{"version":3,"sources":["../src/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"]}
|
package/esm/context/chart.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type
|
|
2
|
+
import type { IVChart } from '@visactor/vchart';
|
|
3
3
|
export interface ChartContextType {
|
|
4
|
-
chart?:
|
|
5
|
-
specFromChildren: any;
|
|
4
|
+
chart?: IVChart;
|
|
6
5
|
isChildrenUpdated?: boolean;
|
|
7
6
|
}
|
|
8
7
|
declare const ChartContext: React.Context<ChartContextType>;
|
package/esm/context/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["context/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/context/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAmB,IAAI,CAAC,CAAC;AACjE,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,UAAU,iBAAiB,CAAI,SAAiC;IACpE,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAS,CAAC,KAAQ,EAAE,GAAG,EAAE,EAAE;QACrD,OAAO,CACL,oBAAC,YAAY,CAAC,QAAQ,QACnB,CAAC,GAAqB,EAAE,EAAE,CAAC,oBAAC,SAAS,kBAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,CAAC,KAAK,IAAM,KAAK,EAAI,CAC1D,CACzB,CAAC;IACJ,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,eAAe,YAAY,CAAC","file":"chart.js","sourcesContent":["import React from 'react';\nimport type { IVChart } from '@visactor/vchart';\n\nexport interface ChartContextType {\n chart?: IVChart;\n isChildrenUpdated?: boolean;\n}\n\nconst ChartContext = React.createContext<ChartContextType>(null);\nChartContext.displayName = 'ChartContext';\n\nexport function withChartInstance<T>(Component: typeof React.Component) {\n const Com = React.forwardRef<any, T>((props: T, ref) => {\n return (\n <ChartContext.Consumer>\n {(ctx: ChartContextType) => <Component ref={ref} chart={ctx.chart} {...props} />}\n </ChartContext.Consumer>\n );\n });\n Com.displayName = Component.name;\n return Com;\n}\n\nexport default ChartContext;\n"]}
|
package/esm/context/stage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
declare const StageContext: React.Context<
|
|
2
|
+
import type { IStage } from '@visactor/vrender-core';
|
|
3
|
+
declare const StageContext: React.Context<IStage>;
|
|
4
4
|
export declare function withStage<T>(Component: typeof React.Component): React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<any>>;
|
|
5
5
|
export default StageContext;
|
package/esm/context/stage.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["context/stage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,
|
|
1
|
+
{"version":3,"sources":["../src/context/stage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAS,IAAI,CAAC,CAAC;AACvD,YAAY,CAAC,WAAW,GAAG,cAAc,CAAC;AAE1C,MAAM,UAAU,SAAS,CAAI,SAAiC;IAC5D,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAS,CAAC,KAAQ,EAAE,GAAG,EAAE,EAAE;QACrD,OAAO,oBAAC,YAAY,CAAC,QAAQ,QAAE,GAAG,CAAC,EAAE,CAAC,oBAAC,SAAS,kBAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,IAAM,KAAK,EAAI,CAAyB,CAAC;IAChH,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,eAAe,YAAY,CAAC","file":"stage.js","sourcesContent":["import React from 'react';\nimport type { IStage } from '@visactor/vrender-core';\n\nconst StageContext = React.createContext<IStage>(null);\nStageContext.displayName = 'StageContext';\n\nexport function withStage<T>(Component: typeof React.Component) {\n const Com = React.forwardRef<any, T>((props: T, ref) => {\n return <StageContext.Consumer>{ctx => <Component ref={ref} stage={ctx} {...props} />}</StageContext.Consumer>;\n });\n Com.displayName = Component.name;\n return Com;\n}\n\nexport default StageContext;\n"]}
|
package/esm/context/view.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import type { IView } from
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { IView } from '@visactor/vgrammar-core';
|
|
3
3
|
declare const ViewContext: React.Context<IView>;
|
|
4
4
|
export declare function withView<T>(Component: typeof React.Component): React.ForwardRefExoticComponent<React.PropsWithoutRef<T> & React.RefAttributes<any>>;
|
|
5
5
|
export default ViewContext;
|
package/esm/context/view.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["context/view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAQ,IAAI,CAAC,CAAC;AACrD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,MAAM,UAAU,QAAQ,CAAI,SAAiC;IAC3D,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAS,CAAC,KAAQ,EAAE,GAAG,EAAE,EAAE;QACrD,OAAO,
|
|
1
|
+
{"version":3,"sources":["../src/context/view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAQ,IAAI,CAAC,CAAC;AACrD,WAAW,CAAC,WAAW,GAAG,aAAa,CAAC;AAExC,MAAM,UAAU,QAAQ,CAAI,SAAiC;IAC3D,MAAM,GAAG,GAAG,KAAK,CAAC,UAAU,CAAS,CAAC,KAAQ,EAAE,GAAG,EAAE,EAAE;QACrD,OAAO,oBAAC,WAAW,CAAC,QAAQ,QAAE,GAAG,CAAC,EAAE,CAAC,oBAAC,SAAS,kBAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,IAAM,KAAK,EAAI,CAAwB,CAAC;IAC7G,CAAC,CAAC,CAAC;IACH,GAAG,CAAC,WAAW,GAAG,SAAS,CAAC,IAAI,CAAC;IACjC,OAAO,GAAG,CAAC;AACb,CAAC;AAED,eAAe,WAAW,CAAC","file":"view.js","sourcesContent":["import React from 'react';\nimport type { IView } from '@visactor/vgrammar-core';\n\nconst ViewContext = React.createContext<IView>(null);\nViewContext.displayName = 'ViewContext';\n\nexport function withView<T>(Component: typeof React.Component) {\n const Com = React.forwardRef<any, T>((props: T, ref) => {\n return <ViewContext.Consumer>{ctx => <Component ref={ref} view={ctx} {...props} />}</ViewContext.Consumer>;\n });\n Com.displayName = Component.name;\n return Com;\n}\n\nexport default ViewContext;\n"]}
|
package/esm/eventsUtils.d.ts
CHANGED
|
@@ -1,50 +1,91 @@
|
|
|
1
|
-
import type
|
|
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
|
+
}
|
|
28
|
+
export interface DimensionEventProps {
|
|
29
|
+
onDimensionHover?: (e: any) => void;
|
|
30
|
+
onDimensionClick?: (e: any) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface HierarchyEventProps {
|
|
33
|
+
onDrill?: (e: any) => void;
|
|
34
|
+
}
|
|
35
|
+
export interface ChartLifeCycleEventProps {
|
|
36
|
+
onInitialized?: (e: any) => void;
|
|
37
|
+
onRendered?: (e: any) => void;
|
|
38
|
+
onRenderFinished?: (e: any) => void;
|
|
39
|
+
onAnimationFinished?: (e: any) => void;
|
|
40
|
+
onLayoutStart?: (e: any) => void;
|
|
41
|
+
onLayoutEnd?: (e: any) => void;
|
|
42
|
+
}
|
|
2
43
|
export interface EventsProps {
|
|
3
|
-
onPointerDown?:
|
|
4
|
-
onPointerUp?:
|
|
5
|
-
onPointerUpOutside?:
|
|
6
|
-
onPointerTap?:
|
|
7
|
-
onPointerOver?:
|
|
8
|
-
onPointerMove?:
|
|
9
|
-
onPointerEnter?:
|
|
10
|
-
onPointerLeave?:
|
|
11
|
-
onPointerOut?:
|
|
12
|
-
onMouseDown?:
|
|
13
|
-
onMouseUp?:
|
|
14
|
-
onMouseUpOutside?:
|
|
15
|
-
onMouseMove?:
|
|
16
|
-
onMouseOver?:
|
|
17
|
-
onMouseOut?:
|
|
18
|
-
onMouseEnter?:
|
|
19
|
-
onMouseLeave?:
|
|
20
|
-
onPinch?:
|
|
21
|
-
onPinchStart?:
|
|
22
|
-
onPinchEnd?:
|
|
23
|
-
onPan?:
|
|
24
|
-
onPanStart?:
|
|
25
|
-
onPanEnd?:
|
|
26
|
-
onDrag?:
|
|
27
|
-
onDragStart?:
|
|
28
|
-
onDragEnter?:
|
|
29
|
-
onDragLeave?:
|
|
30
|
-
onDragOver?:
|
|
31
|
-
onDragEnd?:
|
|
32
|
-
onRightDown?:
|
|
33
|
-
onRightUp?:
|
|
34
|
-
onRightUpOutside?:
|
|
35
|
-
onTouchStart?:
|
|
36
|
-
onTouchEnd?:
|
|
37
|
-
onTouchEndOutside?:
|
|
38
|
-
onTouchMove?:
|
|
39
|
-
onTouchCancel?:
|
|
40
|
-
onPress?:
|
|
41
|
-
onPressUp?:
|
|
42
|
-
onPressEnd?:
|
|
43
|
-
onSwipe?:
|
|
44
|
-
onDrop?:
|
|
45
|
-
onWeel?:
|
|
46
|
-
onClick?:
|
|
47
|
-
onDblClick?:
|
|
44
|
+
onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;
|
|
45
|
+
onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;
|
|
46
|
+
onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;
|
|
47
|
+
onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;
|
|
48
|
+
onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;
|
|
49
|
+
onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;
|
|
50
|
+
onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;
|
|
51
|
+
onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;
|
|
52
|
+
onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;
|
|
53
|
+
onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;
|
|
54
|
+
onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;
|
|
55
|
+
onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;
|
|
56
|
+
onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;
|
|
57
|
+
onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;
|
|
58
|
+
onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;
|
|
59
|
+
onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;
|
|
60
|
+
onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;
|
|
61
|
+
onPinch?: EventCallback<EventParamsDefinition['pinch']>;
|
|
62
|
+
onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;
|
|
63
|
+
onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;
|
|
64
|
+
onPan?: EventCallback<EventParamsDefinition['pan']>;
|
|
65
|
+
onPanStart?: EventCallback<EventParamsDefinition['panstart']>;
|
|
66
|
+
onPanEnd?: EventCallback<EventParamsDefinition['panend']>;
|
|
67
|
+
onDrag?: EventCallback<EventParamsDefinition['drag']>;
|
|
68
|
+
onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;
|
|
69
|
+
onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;
|
|
70
|
+
onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;
|
|
71
|
+
onDragOver?: EventCallback<EventParamsDefinition['dragover']>;
|
|
72
|
+
onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;
|
|
73
|
+
onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;
|
|
74
|
+
onRightUp?: EventCallback<EventParamsDefinition['rightup']>;
|
|
75
|
+
onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;
|
|
76
|
+
onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;
|
|
77
|
+
onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;
|
|
78
|
+
onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;
|
|
79
|
+
onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;
|
|
80
|
+
onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;
|
|
81
|
+
onPress?: EventCallback<EventParamsDefinition['press']>;
|
|
82
|
+
onPressUp?: EventCallback<EventParamsDefinition['pressup']>;
|
|
83
|
+
onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;
|
|
84
|
+
onSwipe?: EventCallback<EventParamsDefinition['swipe']>;
|
|
85
|
+
onDrop?: EventCallback<EventParamsDefinition['drop']>;
|
|
86
|
+
onWeel?: EventCallback<EventParamsDefinition['weel']>;
|
|
87
|
+
onClick?: EventCallback<EventParamsDefinition['click']>;
|
|
88
|
+
onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;
|
|
48
89
|
}
|
|
49
90
|
export declare const REACT_TO_VCHART_EVENTS: {
|
|
50
91
|
onPointerDown: string;
|
|
@@ -97,6 +138,43 @@ export declare const LEGEND_CUSTOMIZED_EVENTS: {
|
|
|
97
138
|
onLegendItemHover: string;
|
|
98
139
|
onLegendItemUnHover: string;
|
|
99
140
|
onLegendItemClick: string;
|
|
141
|
+
onLegendFilter: string;
|
|
142
|
+
onLegendSelectedDataChange: string;
|
|
143
|
+
};
|
|
144
|
+
export declare const BRUSH_CUSTOMIZED_EVENTS: {
|
|
145
|
+
onBrushStart: string;
|
|
146
|
+
onBrushChange: string;
|
|
147
|
+
onBrushEnd: string;
|
|
148
|
+
onBrushClear: string;
|
|
149
|
+
};
|
|
150
|
+
export declare const DATAZOOM_CUSTOMIZED_EVENTS: {
|
|
151
|
+
onDataZoomChange: string;
|
|
152
|
+
};
|
|
153
|
+
export declare const PLAYER_CUSTOMIZED_EVENTS: {
|
|
154
|
+
onPlayerPlay: string;
|
|
155
|
+
onPlayerPause: string;
|
|
156
|
+
onPlayerEnd: string;
|
|
157
|
+
onPlayerChange: string;
|
|
158
|
+
onPlayerForward: string;
|
|
159
|
+
onPlayerBackward: string;
|
|
160
|
+
};
|
|
161
|
+
export declare const SCROLLBAR_CUSTOMIZED_EVENTS: {
|
|
162
|
+
onScrollBarChange: string;
|
|
163
|
+
};
|
|
164
|
+
export declare const DIMENSION_EVENTS: {
|
|
165
|
+
onDimensionHover: string;
|
|
166
|
+
onDimensionClick: string;
|
|
167
|
+
};
|
|
168
|
+
export declare const HIERARCHY_EVENTS: {
|
|
169
|
+
onDrill: string;
|
|
170
|
+
};
|
|
171
|
+
export declare const CHART_LIFECYCLE_EVENTS: {
|
|
172
|
+
onInitialized: string;
|
|
173
|
+
onRendered: string;
|
|
174
|
+
onRenderFinished: string;
|
|
175
|
+
onAnimationFinished: string;
|
|
176
|
+
onLayoutStart: string;
|
|
177
|
+
onLayoutEnd: string;
|
|
100
178
|
};
|
|
101
179
|
export declare const CHART_EVENTS: {
|
|
102
180
|
onPointerDown: string;
|
|
@@ -144,12 +222,35 @@ export declare const CHART_EVENTS: {
|
|
|
144
222
|
onWeel: string;
|
|
145
223
|
onClick: string;
|
|
146
224
|
onDblClick: string;
|
|
225
|
+
onDrill: string;
|
|
226
|
+
onInitialized: string;
|
|
227
|
+
onRendered: string;
|
|
228
|
+
onRenderFinished: string;
|
|
229
|
+
onAnimationFinished: string;
|
|
230
|
+
onLayoutStart: string;
|
|
231
|
+
onLayoutEnd: string;
|
|
232
|
+
onDimensionHover: string;
|
|
233
|
+
onDimensionClick: string;
|
|
234
|
+
onScrollBarChange: string;
|
|
235
|
+
onDataZoomChange: string;
|
|
236
|
+
onPlayerPlay: string;
|
|
237
|
+
onPlayerPause: string;
|
|
238
|
+
onPlayerEnd: string;
|
|
239
|
+
onPlayerChange: string;
|
|
240
|
+
onPlayerForward: string;
|
|
241
|
+
onPlayerBackward: string;
|
|
242
|
+
onBrushStart: string;
|
|
243
|
+
onBrushChange: string;
|
|
244
|
+
onBrushEnd: string;
|
|
245
|
+
onBrushClear: string;
|
|
147
246
|
onLegendItemHover: string;
|
|
148
247
|
onLegendItemUnHover: string;
|
|
149
248
|
onLegendItemClick: string;
|
|
249
|
+
onLegendFilter: string;
|
|
250
|
+
onLegendSelectedDataChange: string;
|
|
150
251
|
};
|
|
151
252
|
export declare const CHART_EVENTS_KEYS: string[];
|
|
152
253
|
export declare const COMMON_EVENTK_KEYS: string[];
|
|
153
254
|
export declare const VCHART_TO_REACT_EVENTS: {};
|
|
154
255
|
export declare const findEventProps: <T extends EventsProps>(props: T, supportedEvents?: Record<string, string>) => EventsProps;
|
|
155
|
-
export declare const bindEventsToChart: <T>(chart:
|
|
256
|
+
export declare const bindEventsToChart: <T>(chart: IVChart, newProps?: T, prevProps?: T, supportedEvents?: Record<string, string>) => boolean;
|