@visactor/react-vchart 1.8.3-alpha.0 → 1.8.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/cjs/VChart.d.ts +3 -1
- 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 +3 -1
- package/cjs/charts/AreaChart.js +11 -2
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +3 -1
- package/cjs/charts/BarChart.js +11 -2
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +5 -3
- package/cjs/charts/BaseChart.js +35 -39
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +2 -0
- package/cjs/charts/BoxPlotChart.js +11 -2
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +2 -0
- package/cjs/charts/CircularProgressChart.js +11 -2
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +2 -0
- package/cjs/charts/CommonChart.js +11 -2
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +2 -0
- package/cjs/charts/FunnelChart.js +11 -2
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +2 -0
- package/cjs/charts/HistogramChart.js +11 -2
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +3 -1
- package/cjs/charts/LineChart.js +11 -2
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +2 -0
- package/cjs/charts/LinearProgressChart.js +11 -2
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +3 -1
- package/cjs/charts/MapChart.js +11 -2
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +3 -1
- package/cjs/charts/PieChart.js +11 -2
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +3 -1
- package/cjs/charts/RadarChart.js +11 -2
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +3 -1
- package/cjs/charts/RangeColumnChart.js +11 -2
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +3 -1
- package/cjs/charts/RoseChart.js +11 -3
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +3 -1
- package/cjs/charts/ScatterChart.js +12 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +3 -1
- package/cjs/charts/SequenceChart.js +11 -2
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +3 -1
- package/cjs/charts/WordCloudChart.js +11 -2
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.js.map +1 -1
- package/cjs/components/Crosshair.js.map +1 -1
- package/cjs/components/DataZoom.js.map +1 -1
- package/cjs/components/Indicator.js.map +1 -1
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.js.map +1 -1
- package/cjs/components/MarkLine.js.map +1 -1
- package/cjs/components/MarkPoint.js.map +1 -1
- package/cjs/components/Player.js.map +1 -1
- package/cjs/components/Region.js +1 -2
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.js +2 -1
- package/cjs/components/ScrollBar.js.map +1 -1
- package/cjs/components/Title.js.map +1 -1
- package/cjs/components/Tooltip.js.map +1 -1
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js.map +1 -1
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/chart.d.ts +2 -2
- 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.js.map +1 -1
- package/cjs/eventsUtils.d.ts +2 -0
- package/cjs/eventsUtils.js +2 -1
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +2 -2
- package/cjs/index.js +3 -10
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +1 -1
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +1 -1
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +1 -1
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +1 -1
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +1 -1
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +1 -1
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +1 -1
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +1 -1
- package/cjs/series/LinearProgress.js +1 -2
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +1 -1
- package/cjs/series/Link.js +2 -1
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +1 -1
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +1 -1
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +1 -1
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +1 -1
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +1 -1
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +1 -1
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +1 -1
- package/cjs/series/Series.js +1 -1
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js.map +1 -1
- package/cjs/util.js.map +1 -1
- package/esm/VChart.d.ts +3 -1
- 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 +3 -1
- package/esm/charts/AreaChart.js +6 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +3 -1
- package/esm/charts/BarChart.js +6 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +5 -3
- package/esm/charts/BaseChart.js +34 -41
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +2 -0
- package/esm/charts/BoxPlotChart.js +6 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +2 -0
- package/esm/charts/CircularProgressChart.js +6 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +2 -0
- package/esm/charts/CommonChart.js +6 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +2 -0
- package/esm/charts/FunnelChart.js +6 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +2 -0
- package/esm/charts/HistogramChart.js +6 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +3 -1
- package/esm/charts/LineChart.js +6 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +2 -0
- package/esm/charts/LinearProgressChart.js +6 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +3 -1
- package/esm/charts/MapChart.js +6 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +3 -1
- package/esm/charts/PieChart.js +6 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +3 -1
- package/esm/charts/RadarChart.js +6 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +3 -1
- package/esm/charts/RangeColumnChart.js +6 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +3 -1
- package/esm/charts/RoseChart.js +6 -2
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +3 -1
- package/esm/charts/ScatterChart.js +7 -1
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +3 -1
- package/esm/charts/SequenceChart.js +6 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +3 -1
- package/esm/charts/WordCloudChart.js +6 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.js.map +1 -1
- package/esm/components/Crosshair.js.map +1 -1
- package/esm/components/DataZoom.js.map +1 -1
- package/esm/components/Indicator.js.map +1 -1
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.js.map +1 -1
- package/esm/components/MarkLine.js.map +1 -1
- package/esm/components/MarkPoint.js.map +1 -1
- package/esm/components/Player.js.map +1 -1
- package/esm/components/Region.js +1 -2
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.js +2 -1
- package/esm/components/ScrollBar.js.map +1 -1
- package/esm/components/Title.js.map +1 -1
- package/esm/components/Tooltip.js.map +1 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js.map +1 -1
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/chart.d.ts +2 -2
- 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.js.map +1 -1
- package/esm/eventsUtils.d.ts +2 -0
- package/esm/eventsUtils.js +2 -1
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +2 -2
- package/esm/index.js +2 -2
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +1 -1
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +1 -1
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +1 -1
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +1 -1
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +1 -1
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +1 -1
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +1 -1
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +1 -1
- package/esm/series/LinearProgress.js +1 -2
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +1 -1
- package/esm/series/Link.js +2 -1
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +1 -1
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +1 -1
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +1 -1
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +1 -1
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +1 -1
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +1 -1
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +1 -1
- package/esm/series/Series.js +1 -1
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js.map +1 -1
- package/esm/util.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RadarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/charts/RadarChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAA+D,YAAY,EAAE;IAChH,IAAI,EAAE,OAAO;IACb,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RadarChart.js","sourcesContent":["import React from 'react';\nimport type { IRadarChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RadarChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRadarChartSpec, 'type'> {}\n\nexport const RadarChart = createChart<React.PropsWithChildren<RadarChartProps> & { type: 'radar' }>('RadarChart', {\n type: 'radar',\n vchartConstrouctor: VChart\n});\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IRangeColumnChartSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IRangeColumnChartSpec } from '@visactor/vchart';
|
|
3
3
|
import { BaseChartProps } from './BaseChart';
|
|
4
4
|
export interface RangeColumnChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRangeColumnChartSpec, 'type'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const RangeColumnChart: React.ForwardRefExoticComponent<RangeColumnChartProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
type: 'rangeColumn';
|
|
8
10
|
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const RangeColumnChart = createChart("RangeColumnChart",
|
|
5
|
+
export const RangeColumnChart = createChart("RangeColumnChart", {
|
|
6
|
+
type: "rangeColumn",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=RangeColumnChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RangeColumnChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CACzC,kBAAkB,EAClB,aAAa,
|
|
1
|
+
{"version":3,"sources":["../src/charts/RangeColumnChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,gBAAgB,GAAG,WAAW,CACzC,kBAAkB,EAClB;IACE,IAAI,EAAE,aAAa;IACnB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"RangeColumnChart.js","sourcesContent":["import React from 'react';\nimport type { IRangeColumnChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RangeColumnChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRangeColumnChartSpec, 'type'> {}\n\nexport const RangeColumnChart = createChart<React.PropsWithChildren<RangeColumnChartProps> & { type: 'rangeColumn' }>(\n 'RangeColumnChart',\n {\n type: 'rangeColumn',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IRoseChartSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IRoseChartSpec } from '@visactor/vchart';
|
|
3
3
|
import { BaseChartProps } from './BaseChart';
|
|
4
4
|
export interface RoseChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRoseChartSpec, 'type'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const RoseChart: React.ForwardRefExoticComponent<RoseChartProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
type: 'rose';
|
|
8
10
|
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
package/esm/charts/RoseChart.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const RoseChart = createChart("RoseChart",
|
|
4
|
-
|
|
5
|
+
export const RoseChart = createChart("RoseChart", {
|
|
6
|
+
type: "rose",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/RoseChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/charts/RoseChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,SAAS,GAAG,WAAW,CAA6D,WAAW,EAAE;IAC5G,IAAI,EAAE,MAAM;IACZ,kBAAkB,EAAE,MAAM;CAC3B,CAAC,CAAC","file":"RoseChart.js","sourcesContent":["import React from 'react';\nimport type { IRoseChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface RoseChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IRoseChartSpec, 'type'> {}\n\nexport const RoseChart = createChart<React.PropsWithChildren<RoseChartProps> & { type: 'rose' }>('RoseChart', {\n type: 'rose',\n vchartConstrouctor: VChart\n});\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IScatterChartSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IScatterChartSpec } from '@visactor/vchart';
|
|
3
3
|
import { BaseChartProps } from './BaseChart';
|
|
4
4
|
export interface ScatterChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IScatterChartSpec, 'type'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const ScatterChart: React.ForwardRefExoticComponent<ScatterChartProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
type: 'scatter';
|
|
8
10
|
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const ScatterChart = createChart("ScatterChart",
|
|
5
|
+
export const ScatterChart = createChart("ScatterChart", {
|
|
6
|
+
type: "scatter",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
9
|
+
//# sourceMappingURL=ScatterChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/ScatterChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/charts/ScatterChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,YAAY,GAAG,WAAW,CACrC,cAAc,EACd;IACE,IAAI,EAAE,SAAS;IACf,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"ScatterChart.js","sourcesContent":["import React from 'react';\nimport type { IScatterChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface ScatterChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IScatterChartSpec, 'type'> {}\n\nexport const ScatterChart = createChart<React.PropsWithChildren<ScatterChartProps> & { type: 'scatter' }>(\n 'ScatterChart',\n {\n type: 'scatter',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ISequenceChartSpec } from '@visactor/vchart';
|
|
2
|
+
import type { ISequenceChartSpec } from '@visactor/vchart';
|
|
3
3
|
import { BaseChartProps } from './BaseChart';
|
|
4
4
|
export interface SequenceChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ISequenceChartSpec, 'type'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const SequenceChart: React.ForwardRefExoticComponent<SequenceChartProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
type: 'sequence';
|
|
8
10
|
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const SequenceChart = createChart("SequenceChart",
|
|
5
|
+
export const SequenceChart = createChart("SequenceChart", {
|
|
6
|
+
type: "sequence",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=SequenceChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/SequenceChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/charts/SequenceChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,aAAa,GAAG,WAAW,CACtC,eAAe,EACf;IACE,IAAI,EAAE,UAAU;IAChB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"SequenceChart.js","sourcesContent":["import React from 'react';\nimport type { ISequenceChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface SequenceChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<ISequenceChartSpec, 'type'> {}\n\nexport const SequenceChart = createChart<React.PropsWithChildren<SequenceChartProps> & { type: 'sequence' }>(\n 'SequenceChart',\n {\n type: 'sequence',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { IWordCloudChartSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IWordCloudChartSpec } from '@visactor/vchart';
|
|
3
3
|
import { BaseChartProps } from './BaseChart';
|
|
4
4
|
export interface WordCloudChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IWordCloudChartSpec, 'type'> {
|
|
5
5
|
}
|
|
6
6
|
export declare const WordCloudChart: React.ForwardRefExoticComponent<WordCloudChartProps & {
|
|
7
7
|
children?: React.ReactNode;
|
|
8
|
+
} & {
|
|
9
|
+
type: 'wordCloud';
|
|
8
10
|
} & import("../containers/withContainer").ContainerProps & React.RefAttributes<any>>;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
+
import { default as VChart } from "@visactor/vchart";
|
|
2
|
+
|
|
1
3
|
import { createChart } from "./BaseChart";
|
|
2
4
|
|
|
3
|
-
export const WordCloudChart = createChart("WordCloudChart",
|
|
5
|
+
export const WordCloudChart = createChart("WordCloudChart", {
|
|
6
|
+
type: "wordCloud",
|
|
7
|
+
vchartConstrouctor: VChart
|
|
8
|
+
});
|
|
4
9
|
//# sourceMappingURL=WordCloudChart.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/WordCloudChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,
|
|
1
|
+
{"version":3,"sources":["../src/charts/WordCloudChart.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAkB,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1D,MAAM,CAAC,MAAM,cAAc,GAAG,WAAW,CACvC,gBAAgB,EAChB;IACE,IAAI,EAAE,WAAW;IACjB,kBAAkB,EAAE,MAAM;CAC3B,CACF,CAAC","file":"WordCloudChart.js","sourcesContent":["import React from 'react';\nimport type { IWordCloudChartSpec } from '@visactor/vchart';\nimport { default as VChart } from '@visactor/vchart';\nimport { BaseChartProps, createChart } from './BaseChart';\n\nexport interface WordCloudChartProps\n extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>,\n Omit<IWordCloudChartSpec, 'type'> {}\n\nexport const WordCloudChart = createChart<React.PropsWithChildren<WordCloudChartProps> & { type: 'wordCloud' }>(\n 'WordCloudChart',\n {\n type: 'wordCloud',\n vchartConstrouctor: VChart\n }\n);\n"]}
|
package/esm/charts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAE7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './AreaChart';\nexport * from './BarChart';\nexport * from './LineChart';\nexport * from './ScatterChart';\n\nexport * from './PieChart';\nexport * from './RoseChart';\n\nexport * from './RadarChart';\n\nexport * from './MapChart';\nexport * from './HistogramChart';\nexport * from './WordCloudChart';\nexport * from './FunnelChart';\nexport * from './BoxPlotChart';\n\nexport * from './CircularProgressChart';\nexport * from './LinearProgressChart';\nexport * from './RangeColumnChart';\n\nexport * from './CommonChart';\n\nexport type { ChartOptions } from './BaseChart';\nexport type { IData, IChartSpec } from '@visactor/vchart';\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/charts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAE5B,cAAc,cAAc,CAAC;AAE7B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAE/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AAEnC,cAAc,eAAe,CAAC","file":"index.js","sourcesContent":["export * from './AreaChart';\nexport * from './BarChart';\nexport * from './LineChart';\nexport * from './ScatterChart';\n\nexport * from './PieChart';\nexport * from './RoseChart';\n\nexport * from './RadarChart';\n\nexport * from './MapChart';\nexport * from './HistogramChart';\nexport * from './WordCloudChart';\nexport * from './FunnelChart';\nexport * from './BoxPlotChart';\n\nexport * from './CircularProgressChart';\nexport * from './LinearProgressChart';\nexport * from './RangeColumnChart';\n\nexport * from './CommonChart';\n\nexport type { ChartOptions } from './BaseChart';\nexport type { IData, IChartSpec } from '@visactor/vchart';\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAY,MAAM,EAAE,MAAM,CAAC,CAAC","file":"Axis.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';\n\nexport type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;\n\nexport const Axis = createComponent<AxisProps>('Axis', 'axes');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Axis.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,IAAI,GAAG,eAAe,CAAY,MAAM,EAAE,MAAM,CAAC,CAAC","file":"Axis.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';\n\nexport type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;\n\nexport const Axis = createComponent<AxisProps>('Axis', 'axes');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,gBAAsC,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAQ9B,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,aAAqB,EACrB,QAAgB,EAChB,eAA+C,EAC/C,QAAkB,EAClB,EAAE;IACF,MAAM,UAAU,GAAG,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;IACtC,MAAM,WAAW,GAAG,eAAe,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC;IAEnG,MAAM,IAAI,GAAgB,CAAC,KAAQ,EAAE,EAAE;QACrC,MAAM,OAAO,GAAG,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC7C,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAkB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;QAErF,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAI,IAAI,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAS,K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AAS,CAAC,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAE/D,IAAI,KAAK,IAAI,CAAC,EAAE;YACd,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC;YAE1E,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAAC;YAC9C,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC;SAClC;KACF;AACH,CAAC,CAAC","file":"BaseComponent.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { isEqual, isNil, pickWithout } from '@visactor/vutils';\n\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport { bindEventsToChart } from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number };\n\nexport const createComponent = <T extends ComponentProps>(\n componentName: string,\n specName: string,\n supportedEvents?: Record<string, string> | null,\n isSingle?: boolean\n) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;\n\n const Comp: React.FC<T> = (props: T) => {\n const context = useContext(RootChartContext);\n const id = React.useRef<string | number>(isNil(props.id) ? uid(specName) : props.id);\n\n const eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\n const componentSpec = React.useRef<Partial<T>>();\n\n if (props.updateId !== updateId.current) {\n // update triggered by chart when chart is rendered\n updateId.current = props.updateId;\n\n // rebind events after chart render\n const hasPrevEventsBinded = supportedEvents\n ? bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents)\n : false;\n if (hasPrevEventsBinded) {\n eventsBinded.current = props;\n }\n } else {\n const newComponentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n\n if (!isEqual(newComponentSpec, componentSpec.current)) {\n componentSpec.current = newComponentSpec;\n updateToContext(context, id.current, specName, isSingle, newComponentSpec);\n }\n }\n\n useEffect(() => {\n return () => {\n if (supportedEvents) {\n bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);\n }\n deleteToContext(context, id.current, specName, isSingle);\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n\nconst updateToContext = (\n context: ChartContextType,\n id: string | number,\n specName: string,\n isSingle: boolean,\n props: Partial<ComponentProps>\n) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = { ...props };\n } else {\n if (!context.specFromChildren[specName]) {\n context.specFromChildren[specName] = [];\n }\n\n const comps = context.specFromChildren[specName];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n comps[index] = {\n id,\n ...props\n };\n } else {\n context.specFromChildren[specName].push({\n id,\n ...props\n });\n }\n }\n context.isChildrenUpdated = true;\n};\n\nconst deleteToContext = (context: ChartContextType, id: string | number, specName: string, isSingle: boolean) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = null;\n } else {\n const comps = context.specFromChildren[specName] ?? [];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));\n\n context.specFromChildren[specName] = newComps;\n context.isChildrenUpdated = true;\n }\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/BaseComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,gBAAsC,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,M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useContext, useEffect } from 'react';\nimport { isEqual, isNil, pickWithout } from '@visactor/vutils';\n\nimport RootChartContext, { ChartContextType } from '../context/chart';\nimport { bindEventsToChart } from '../eventsUtils';\nimport { uid } from '../util';\n\nexport interface BaseComponentProps {\n id?: string | number;\n}\n\ntype ComponentProps = BaseComponentProps & { updateId?: number };\n\nexport const createComponent = <T extends ComponentProps>(\n componentName: string,\n specName: string,\n supportedEvents?: Record<string, string> | null,\n isSingle?: boolean\n) => {\n const ignoreKeys = ['id', 'updateId'];\n const notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys;\n\n const Comp: React.FC<T> = (props: T) => {\n const context = useContext(RootChartContext);\n const id = React.useRef<string | number>(isNil(props.id) ? uid(specName) : props.id);\n\n const eventsBinded = React.useRef<T>(null);\n const updateId = React.useRef<number>(props.updateId);\n const componentSpec = React.useRef<Partial<T>>();\n\n if (props.updateId !== updateId.current) {\n // update triggered by chart when chart is rendered\n updateId.current = props.updateId;\n\n // rebind events after chart render\n const hasPrevEventsBinded = supportedEvents\n ? bindEventsToChart(context.chart, props, eventsBinded.current, supportedEvents)\n : false;\n if (hasPrevEventsBinded) {\n eventsBinded.current = props;\n }\n } else {\n const newComponentSpec: Partial<T> = pickWithout<T>(props, notSpecKeys);\n\n if (!isEqual(newComponentSpec, componentSpec.current)) {\n componentSpec.current = newComponentSpec;\n updateToContext(context, id.current, specName, isSingle, newComponentSpec);\n }\n }\n\n useEffect(() => {\n return () => {\n if (supportedEvents) {\n bindEventsToChart(context.chart, null, eventsBinded.current, supportedEvents);\n }\n deleteToContext(context, id.current, specName, isSingle);\n };\n }, []);\n\n return null;\n };\n\n Comp.displayName = componentName;\n return Comp;\n};\n\nconst updateToContext = (\n context: ChartContextType,\n id: string | number,\n specName: string,\n isSingle: boolean,\n props: Partial<ComponentProps>\n) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = { ...props };\n } else {\n if (!context.specFromChildren[specName]) {\n context.specFromChildren[specName] = [];\n }\n\n const comps = context.specFromChildren[specName];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n comps[index] = {\n id,\n ...props\n };\n } else {\n context.specFromChildren[specName].push({\n id,\n ...props\n });\n }\n }\n context.isChildrenUpdated = true;\n};\n\nconst deleteToContext = (context: ChartContextType, id: string | number, specName: string, isSingle: boolean) => {\n if (!context.specFromChildren) {\n return;\n }\n\n if (isSingle) {\n context.specFromChildren[specName] = null;\n } else {\n const comps = context.specFromChildren[specName] ?? [];\n const index = comps.findIndex((entry: any) => entry.id === id);\n\n if (index >= 0) {\n const newComps = comps.slice(0, index - 1).concat(comps.slice(index + 1));\n\n context.specFromChildren[specName] = newComps;\n context.isChildrenUpdated = true;\n }\n }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Brush.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAmB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC","file":"Brush.js","sourcesContent":["import { BRUSH_CUSTOMIZED_EVENTS, BrushEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IBrushSpec } from '@visactor/vchart';\n\nexport type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;\n\nexport const Brush = createComponent<BrushProps>('Brush', 'brush', BRUSH_CUSTOMIZED_EVENTS, true);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Brush.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAmB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,uBAAuB,EAAE,IAAI,CAAC,CAAC","file":"Brush.js","sourcesContent":["import { BRUSH_CUSTOMIZED_EVENTS, BrushEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IBrushSpec } from '@visactor/vchart';\n\nexport type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;\n\nexport const Brush = createComponent<BrushProps>('Brush', 'brush', BRUSH_CUSTOMIZED_EVENTS, true);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Crosshair.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":"Crosshair.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';\n\nexport type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;\n\nexport const Crosshair = createComponent<CrosshairProps>('Crosshair', 'crosshair');\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Crosshair.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":"Crosshair.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';\n\nexport type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;\n\nexport const Crosshair = createComponent<CrosshairProps>('Crosshair', 'crosshair');\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/DataZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAsB,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC","file":"DataZoom.js","sourcesContent":["import { DATAZOOM_CUSTOMIZED_EVENTS, DataZoomEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IDataZoomSpec } from '@visactor/vchart';\n\nexport type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;\nexport const DataZoom = createComponent<DataZoomProps>('DataZoom', 'dataZoom', DATAZOOM_CUSTOMIZED_EVENTS);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/DataZoom.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAsB,MAAM,gBAAgB,CAAC;AAChF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAItE,MAAM,CAAC,MAAM,QAAQ,GAAG,eAAe,CAAgB,UAAU,EAAE,UAAU,EAAE,0BAA0B,CAAC,CAAC","file":"DataZoom.js","sourcesContent":["import { DATAZOOM_CUSTOMIZED_EVENTS, DataZoomEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IDataZoomSpec } from '@visactor/vchart';\n\nexport type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;\nexport const DataZoom = createComponent<DataZoomProps>('DataZoom', 'dataZoom', DATAZOOM_CUSTOMIZED_EVENTS);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Indicator.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IIndicatorSpec } from '@visactor/vchart';\n\nexport type IndicatorProps = IIndicatorSpec & BaseComponentProps;\n\nexport const Indicator = createComponent<IndicatorProps>('Indicator', 'indicator', null, true);\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Indicator.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Indicator.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IIndicatorSpec } from '@visactor/vchart';\n\nexport type IndicatorProps = IIndicatorSpec & BaseComponentProps;\n\nexport const Indicator = createComponent<IndicatorProps>('Indicator', 'indicator', null, true);\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Mark.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,OAAO,WAAW,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,SAAS,CAAC;AAa9B,MAAM,CAAC,MAAM,IAAI,GAAoB,CAAC,KAAY,EAAE,EAAE;IACpD,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACxC,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAkB,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACnF,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAS,KAAK,CAAC,QAAQ,CAAC,CAAC;IAEtD,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,OAAO,EAAE;QAEvC,QAAQ,CAAC,OAAO,GAAG,KAAK,CAAC,QAAQ,C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QACjC,IAAY,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;KACjC;AACH,CAAC,CAAC","file":"Mark.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { isNil } from '@visactor/vutils';\nimport type { IView, MarkSpec } from '@visactor/vgrammar-core';\n\nimport ViewContext from '../context/view';\nimport { uid } from '../util';\n\nexport interface MarkProps extends Omit<MarkSpec, 'name' | 'id'> {\n id?: string | number;\n glyphType?: string;\n}\n\nexport interface IMarkElement extends React.ReactElement<Props, React.JSXElementConstructor<Props>> {\n id: string | number;\n}\n\ntype Props = MarkProps & { updateId?: number };\n\nexport const Mark: React.FC<Props> = (props: Props) => {\n const context = useContext(ViewContext);\n const id = React.useRef<string | number>(isNil(props.id) ? uid('mark') : props.id);\n const updateId = React.useRef<number>(props.updateId);\n\n if (props.updateId !== updateId.current) {\n // only update mark when chart finished render\n updateId.current = props.updateId;\n if (context) {\n addOrUpdateMark(context, id.current as string, props);\n }\n }\n\n useEffect(() => {\n return () => {\n if (context) {\n removeMark(context, id.current as string);\n }\n };\n }, []);\n\n return null;\n};\n\nconst addOrUpdateMark = (view: IView, id: string, props: Props) => {\n if (!view.renderer) {\n // view has been released\n return;\n }\n\n let mark = view.getMarkById(id);\n const { group, glyphType, updateId, ...others } = props;\n if (!mark) {\n mark = (view as any)\n .mark(props.type, props.group ?? view.rootMark, props.glyphType ? { glyphType: props.glyphType } : null)\n .name(id);\n }\n\n mark.parse(others);\n view.runAsync();\n};\n\nconst removeMark = (view: IView, id: string) => {\n if (view.renderer) {\n const mark = view.getMarkById(id);\n (view as any).removeGrammar(id);\n }\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/Mark.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACrD,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAGzC,OAAO,WAAW,MAAM,iBAAiB,CA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AAE;QACT,IAAI,GAAI,IAAY;aACjB,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,MAAA,KAAK,CAAC,KAAK,mCAAI,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;aACvG,IAAI,CAAC,EAAE,CAAC,CAAC;KACb;IAED,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnB,IAAI,CAAC,QAAQ,EAAE,CAAC;AAClB,CAAC,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,IAAW,EAAE,EAAU,EAAE,EAAE;IAC7C,IAAI,IAAI,CAAC,QAAQ,EAAE;QACjB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QACjC,IAAY,CAAC,aAAa,CAAC,EAAE,CAAC,CAAC;KACjC;AACH,CAAC,CAAC","file":"Mark.js","sourcesContent":["import React, { useContext, useEffect } from 'react';\nimport { isNil } from '@visactor/vutils';\nimport type { IView, MarkSpec } from '@visactor/vgrammar-core';\n\nimport ViewContext from '../context/view';\nimport { uid } from '../util';\n\nexport interface MarkProps extends Omit<MarkSpec, 'name' | 'id'> {\n id?: string | number;\n glyphType?: string;\n}\n\nexport interface IMarkElement extends React.ReactElement<Props, React.JSXElementConstructor<Props>> {\n id: string | number;\n}\n\ntype Props = MarkProps & { updateId?: number };\n\nexport const Mark: React.FC<Props> = (props: Props) => {\n const context = useContext(ViewContext);\n const id = React.useRef<string | number>(isNil(props.id) ? uid('mark') : props.id);\n const updateId = React.useRef<number>(props.updateId);\n\n if (props.updateId !== updateId.current) {\n // only update mark when chart finished render\n updateId.current = props.updateId;\n if (context) {\n addOrUpdateMark(context, id.current as string, props);\n }\n }\n\n useEffect(() => {\n return () => {\n if (context) {\n removeMark(context, id.current as string);\n }\n };\n }, []);\n\n return null;\n};\n\nconst addOrUpdateMark = (view: IView, id: string, props: Props) => {\n if (!view.renderer) {\n // view has been released\n return;\n }\n\n let mark = view.getMarkById(id);\n const { group, glyphType, updateId, ...others } = props;\n if (!mark) {\n mark = (view as any)\n .mark(props.type, props.group ?? view.rootMark, props.glyphType ? { glyphType: props.glyphType } : null)\n .name(id);\n }\n\n mark.parse(others);\n view.runAsync();\n};\n\nconst removeMark = (view: IView, id: string) => {\n if (view.renderer) {\n const mark = view.getMarkById(id);\n (view as any).removeGrammar(id);\n }\n};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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
|
+
{"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"]}
|
package/esm/components/Region.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -2,4 +2,5 @@ import { SCROLLBAR_CUSTOMIZED_EVENTS } from "../eventsUtils";
|
|
|
2
2
|
|
|
3
3
|
import { createComponent } from "./BaseComponent";
|
|
4
4
|
|
|
5
|
-
export const ScrollBar = createComponent("ScrollBar", "scrollBar", SCROLLBAR_CUSTOMIZED_EVENTS);
|
|
5
|
+
export const ScrollBar = createComponent("ScrollBar", "scrollBar", SCROLLBAR_CUSTOMIZED_EVENTS);
|
|
6
|
+
//# sourceMappingURL=ScrollBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["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"]}
|
|
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"]}
|
|
@@ -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;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"]}
|
|
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.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 +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,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 </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,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
package/esm/context/chart.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["context/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,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
|
|
1
|
+
{"version":3,"sources":["../src/context/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,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 specFromChildren: any;\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.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,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"]}
|
|
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
|
@@ -145,6 +145,7 @@ export declare const BRUSH_CUSTOMIZED_EVENTS: {
|
|
|
145
145
|
onBrushStart: string;
|
|
146
146
|
onBrushChange: string;
|
|
147
147
|
onBrushEnd: string;
|
|
148
|
+
onBrushClear: string;
|
|
148
149
|
};
|
|
149
150
|
export declare const DATAZOOM_CUSTOMIZED_EVENTS: {
|
|
150
151
|
onDataZoomChange: string;
|
|
@@ -241,6 +242,7 @@ export declare const CHART_EVENTS: {
|
|
|
241
242
|
onBrushStart: string;
|
|
242
243
|
onBrushChange: string;
|
|
243
244
|
onBrushEnd: string;
|
|
245
|
+
onBrushClear: string;
|
|
244
246
|
onLegendItemHover: string;
|
|
245
247
|
onLegendItemUnHover: string;
|
|
246
248
|
onLegendItemClick: string;
|
package/esm/eventsUtils.js
CHANGED
|
@@ -57,7 +57,8 @@ export const LEGEND_CUSTOMIZED_EVENTS = {
|
|
|
57
57
|
export const BRUSH_CUSTOMIZED_EVENTS = {
|
|
58
58
|
onBrushStart: "brushStart",
|
|
59
59
|
onBrushChange: "brushChange",
|
|
60
|
-
onBrushEnd: "brushEnd"
|
|
60
|
+
onBrushEnd: "brushEnd",
|
|
61
|
+
onBrushClear: "brushClear"
|
|
61
62
|
};
|
|
62
63
|
|
|
63
64
|
export const DATAZOOM_CUSTOMIZED_EVENTS = {
|
package/esm/eventsUtils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["eventsUtils.ts"],"names":[],"mappings":"AAmGA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,UAAU;IACtB,YAAY,EAAE,YAAY;IAC1B,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,UAAU,EAAE,UAAU;IACtB,KAAK,EAAE,KAAK;IACZ,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,QAAQ;IAClB,MAAM,EAAE,MAAM;IACd,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE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H,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"eventsUtils.js","sourcesContent":["import type { IVChart, EventCallback, EventParamsDefinition } from '@visactor/vchart';\n\nexport interface LegendEventProps {\n onLegendItemHover?: (e: any) => void;\n onLegendItemUnHover?: (e: any) => void;\n onLegendItemClick?: (e: any) => void;\n onLegendFilter?: (e: any) => void;\n onLegendSelectedDataChange?: (e: any) => void;\n}\n\nexport interface BrushEventProps {\n onBrushStart?: (e: any) => void;\n onBrushChange?: (e: any) => void;\n onBrushEnd?: (e: any) => void;\n}\n\nexport interface DataZoomEventProps {\n onDataZoomChange?: (e: any) => void;\n}\n\nexport interface PlayerEventProps {\n onPlayerPlay?: (e: any) => void;\n onPlayerPause?: (e: any) => void;\n onPlayerEnd?: (e: any) => void;\n onPlayerChange?: (e: any) => void;\n onPlayerForward?: (e: any) => void;\n onPlayerBackward?: (e: any) => void;\n}\n\nexport interface ScrollBarEventProps {\n onScrollBarChange?: (e: any) => void;\n}\n\nexport interface DimensionEventProps {\n onDimensionHover?: (e: any) => void;\n onDimensionClick?: (e: any) => void;\n}\n\nexport interface HierarchyEventProps {\n onDrill?: (e: any) => void;\n}\n\nexport interface ChartLifeCycleEventProps {\n onInitialized?: (e: any) => void;\n onRendered?: (e: any) => void;\n onRenderFinished?: (e: any) => void;\n onAnimationFinished?: (e: any) => void;\n onLayoutStart?: (e: any) => void;\n onLayoutEnd?: (e: any) => void;\n}\n\nexport interface EventsProps {\n onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;\n onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;\n onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;\n onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;\n onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;\n onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;\n onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;\n onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;\n onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;\n onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;\n onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;\n onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;\n onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;\n onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;\n onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;\n onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;\n onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;\n onPinch?: EventCallback<EventParamsDefinition['pinch']>;\n onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;\n onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;\n onPan?: EventCallback<EventParamsDefinition['pan']>;\n onPanStart?: EventCallback<EventParamsDefinition['panstart']>;\n onPanEnd?: EventCallback<EventParamsDefinition['panend']>;\n onDrag?: EventCallback<EventParamsDefinition['drag']>;\n onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;\n onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;\n onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;\n onDragOver?: EventCallback<EventParamsDefinition['dragover']>;\n onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;\n onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;\n onRightUp?: EventCallback<EventParamsDefinition['rightup']>;\n onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;\n onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;\n onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;\n onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;\n onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;\n onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;\n onPress?: EventCallback<EventParamsDefinition['press']>;\n onPressUp?: EventCallback<EventParamsDefinition['pressup']>;\n onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;\n onSwipe?: EventCallback<EventParamsDefinition['swipe']>;\n onDrop?: EventCallback<EventParamsDefinition['drop']>;\n onWeel?: EventCallback<EventParamsDefinition['weel']>;\n onClick?: EventCallback<EventParamsDefinition['click']>;\n onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick',\n onLegendFilter: 'legendFilter',\n onLegendSelectedDataChange: 'legendSelectedDataChange'\n};\nexport const BRUSH_CUSTOMIZED_EVENTS = {\n onBrushStart: 'brushStart',\n onBrushChange: 'brushChange',\n onBrushEnd: 'brushEnd'\n};\n\nexport const DATAZOOM_CUSTOMIZED_EVENTS = {\n onDataZoomChange: 'dataZoomChange'\n};\n\nexport const PLAYER_CUSTOMIZED_EVENTS = {\n onPlayerPlay: 'playerPlay',\n onPlayerPause: 'playerPause',\n onPlayerEnd: 'playerEnd',\n onPlayerChange: 'playerChange',\n onPlayerForward: 'playerForward',\n onPlayerBackward: 'playerBackward'\n};\n\nexport const SCROLLBAR_CUSTOMIZED_EVENTS = {\n onScrollBarChange: 'scrollBarChange'\n};\n\nexport const DIMENSION_EVENTS = {\n onDimensionHover: 'dimensionHover',\n onDimensionClick: 'dimensionClick'\n};\n\nexport const HIERARCHY_EVENTS = {\n onDrill: 'drill'\n};\n\nexport const CHART_LIFECYCLE_EVENTS = {\n onInitialized: 'initialized',\n onRendered: 'rendered',\n onRenderFinished: 'renderFinished',\n onAnimationFinished: 'animationFinished',\n onLayoutStart: 'layoutStart',\n onLayoutEnd: 'layoutEnd'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...BRUSH_CUSTOMIZED_EVENTS,\n ...PLAYER_CUSTOMIZED_EVENTS,\n ...DATAZOOM_CUSTOMIZED_EVENTS,\n ...SCROLLBAR_CUSTOMIZED_EVENTS,\n ...DIMENSION_EVENTS,\n ...CHART_LIFECYCLE_EVENTS,\n ...HIERARCHY_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: IVChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/eventsUtils.ts"],"names":[],"mappings":"AAmGA,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,aAAa;IAC5B,WAAW,EAAE,WAAW;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,YAAY,EAAE,YAAY;IAC1B,aAAa,EAAE,aAAa;IAC5B,aAAa,EAAE,aAAa;IAC5B,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,WAAW,EAAE,WAAW;IACxB,SAAS,EAAE,SAAS;IACpB,gBAAgB,EAAE,gBAAgB;IAClC,WAAW,EAAE,WAAW;IACxB,WAAW,EAAE,WAAW;IACxB,UAAU,EAAE,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jB,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;YAC5C,IAAI,CAAC,cAAc,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,cAAc,CAAC,QAAQ,CAAC,KAAK,aAAa,CAAC,QAAQ,CAAC,EAAE;gBACxG,KAAK,CAAC,EAAE,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,aAAa,CAAC,QAAQ,CAAC,CAAC,CAAC;aAC9D;QACH,CAAC,CAAC,CAAC;KACJ;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","file":"eventsUtils.js","sourcesContent":["import type { IVChart, EventCallback, EventParamsDefinition } from '@visactor/vchart';\n\nexport interface LegendEventProps {\n onLegendItemHover?: (e: any) => void;\n onLegendItemUnHover?: (e: any) => void;\n onLegendItemClick?: (e: any) => void;\n onLegendFilter?: (e: any) => void;\n onLegendSelectedDataChange?: (e: any) => void;\n}\n\nexport interface BrushEventProps {\n onBrushStart?: (e: any) => void;\n onBrushChange?: (e: any) => void;\n onBrushEnd?: (e: any) => void;\n}\n\nexport interface DataZoomEventProps {\n onDataZoomChange?: (e: any) => void;\n}\n\nexport interface PlayerEventProps {\n onPlayerPlay?: (e: any) => void;\n onPlayerPause?: (e: any) => void;\n onPlayerEnd?: (e: any) => void;\n onPlayerChange?: (e: any) => void;\n onPlayerForward?: (e: any) => void;\n onPlayerBackward?: (e: any) => void;\n}\n\nexport interface ScrollBarEventProps {\n onScrollBarChange?: (e: any) => void;\n}\n\nexport interface DimensionEventProps {\n onDimensionHover?: (e: any) => void;\n onDimensionClick?: (e: any) => void;\n}\n\nexport interface HierarchyEventProps {\n onDrill?: (e: any) => void;\n}\n\nexport interface ChartLifeCycleEventProps {\n onInitialized?: (e: any) => void;\n onRendered?: (e: any) => void;\n onRenderFinished?: (e: any) => void;\n onAnimationFinished?: (e: any) => void;\n onLayoutStart?: (e: any) => void;\n onLayoutEnd?: (e: any) => void;\n}\n\nexport interface EventsProps {\n onPointerDown?: EventCallback<EventParamsDefinition['pointerdown']>;\n onPointerUp?: EventCallback<EventParamsDefinition['pointerup']>;\n onPointerUpOutside?: EventCallback<EventParamsDefinition['pointerupoutside']>;\n onPointerTap?: EventCallback<EventParamsDefinition['pointertap']>;\n onPointerOver?: EventCallback<EventParamsDefinition['pointerover']>;\n onPointerMove?: EventCallback<EventParamsDefinition['pointermove']>;\n onPointerEnter?: EventCallback<EventParamsDefinition['pointerenter']>;\n onPointerLeave?: EventCallback<EventParamsDefinition['pointerleave']>;\n onPointerOut?: EventCallback<EventParamsDefinition['pointerout']>;\n onMouseDown?: EventCallback<EventParamsDefinition['mousedown']>;\n onMouseUp?: EventCallback<EventParamsDefinition['mouseup']>;\n onMouseUpOutside?: EventCallback<EventParamsDefinition['mouseupoutside']>;\n onMouseMove?: EventCallback<EventParamsDefinition['mousemove']>;\n onMouseOver?: EventCallback<EventParamsDefinition['mouseover']>;\n onMouseOut?: EventCallback<EventParamsDefinition['mouseout']>;\n onMouseEnter?: EventCallback<EventParamsDefinition['mouseenter']>;\n onMouseLeave?: EventCallback<EventParamsDefinition['mouseleave']>;\n onPinch?: EventCallback<EventParamsDefinition['pinch']>;\n onPinchStart?: EventCallback<EventParamsDefinition['pinchstart']>;\n onPinchEnd?: EventCallback<EventParamsDefinition['pinchend']>;\n onPan?: EventCallback<EventParamsDefinition['pan']>;\n onPanStart?: EventCallback<EventParamsDefinition['panstart']>;\n onPanEnd?: EventCallback<EventParamsDefinition['panend']>;\n onDrag?: EventCallback<EventParamsDefinition['drag']>;\n onDragStart?: EventCallback<EventParamsDefinition['dragstart']>;\n onDragEnter?: EventCallback<EventParamsDefinition['dragenter']>;\n onDragLeave?: EventCallback<EventParamsDefinition['dragleave']>;\n onDragOver?: EventCallback<EventParamsDefinition['dragover']>;\n onDragEnd?: EventCallback<EventParamsDefinition['dragend']>;\n onRightDown?: EventCallback<EventParamsDefinition['rightdown']>;\n onRightUp?: EventCallback<EventParamsDefinition['rightup']>;\n onRightUpOutside?: EventCallback<EventParamsDefinition['rightupoutside']>;\n onTouchStart?: EventCallback<EventParamsDefinition['touchstart']>;\n onTouchEnd?: EventCallback<EventParamsDefinition['touchend']>;\n onTouchEndOutside?: EventCallback<EventParamsDefinition['touchendoutside']>;\n onTouchMove?: EventCallback<EventParamsDefinition['touchmove']>;\n onTouchCancel?: EventCallback<EventParamsDefinition['touchcancel']>;\n onPress?: EventCallback<EventParamsDefinition['press']>;\n onPressUp?: EventCallback<EventParamsDefinition['pressup']>;\n onPressEnd?: EventCallback<EventParamsDefinition['pressend']>;\n onSwipe?: EventCallback<EventParamsDefinition['swipe']>;\n onDrop?: EventCallback<EventParamsDefinition['drop']>;\n onWeel?: EventCallback<EventParamsDefinition['weel']>;\n onClick?: EventCallback<EventParamsDefinition['click']>;\n onDblClick?: EventCallback<EventParamsDefinition['dblclick']>;\n}\n\nexport const REACT_TO_VCHART_EVENTS = {\n onPointerDown: 'pointerdown',\n onPointerUp: 'pointerup',\n onPointerUpOutside: 'pointerupoutside',\n onPointerTap: 'pointertap',\n onPointerOver: 'pointerover',\n onPointerMove: 'pointermove',\n onPointerEnter: 'pointerenter',\n onPointerLeave: 'pointerleave',\n onPointerOut: 'pointerout',\n onMouseDown: 'mousedown',\n onMouseUp: 'mouseup',\n onMouseUpOutside: 'mouseupoutside',\n onMouseMove: 'mousemove',\n onMouseOver: 'mouseover',\n onMouseOut: 'mouseout',\n onMouseEnter: 'mouseenter',\n onMouseLeave: 'mouseleave',\n onPinch: 'pinch',\n onPinchStart: 'pinchstart',\n onPinchEnd: 'pinchend',\n onPan: 'pan',\n onPanStart: 'panstart',\n onPanEnd: 'panend',\n onDrag: 'drag',\n onDragStart: 'dragstart',\n onDragEnter: 'dragenter',\n onDragLeave: 'dragleave',\n onDragOver: 'dragover',\n onDragEnd: 'dragend',\n onRightDown: 'rightdown',\n onRightUp: 'rightup',\n onRightUpOutside: 'rightupoutside',\n onTouchStart: 'touchstart',\n onTouchEnd: 'touchend',\n onTouchEndOutside: 'touchendoutside',\n onTouchMove: 'touchmove',\n onTouchCancel: 'touchcancel',\n onPress: 'press',\n onPressUp: 'pressup',\n onPressEnd: 'pressend',\n onSwipe: 'swipe',\n onDrop: 'drop',\n onWeel: 'wheel',\n onClick: 'click',\n onDblClick: 'dblclick'\n};\n\nexport const LEGEND_CUSTOMIZED_EVENTS = {\n onLegendItemHover: 'legendItemHover',\n onLegendItemUnHover: 'legendItemUnHover',\n onLegendItemClick: 'legendItemClick',\n onLegendFilter: 'legendFilter',\n onLegendSelectedDataChange: 'legendSelectedDataChange'\n};\nexport const BRUSH_CUSTOMIZED_EVENTS = {\n onBrushStart: 'brushStart',\n onBrushChange: 'brushChange',\n onBrushEnd: 'brushEnd',\n onBrushClear: 'brushClear'\n};\n\nexport const DATAZOOM_CUSTOMIZED_EVENTS = {\n onDataZoomChange: 'dataZoomChange'\n};\n\nexport const PLAYER_CUSTOMIZED_EVENTS = {\n onPlayerPlay: 'playerPlay',\n onPlayerPause: 'playerPause',\n onPlayerEnd: 'playerEnd',\n onPlayerChange: 'playerChange',\n onPlayerForward: 'playerForward',\n onPlayerBackward: 'playerBackward'\n};\n\nexport const SCROLLBAR_CUSTOMIZED_EVENTS = {\n onScrollBarChange: 'scrollBarChange'\n};\n\nexport const DIMENSION_EVENTS = {\n onDimensionHover: 'dimensionHover',\n onDimensionClick: 'dimensionClick'\n};\n\nexport const HIERARCHY_EVENTS = {\n onDrill: 'drill'\n};\n\nexport const CHART_LIFECYCLE_EVENTS = {\n onInitialized: 'initialized',\n onRendered: 'rendered',\n onRenderFinished: 'renderFinished',\n onAnimationFinished: 'animationFinished',\n onLayoutStart: 'layoutStart',\n onLayoutEnd: 'layoutEnd'\n};\n\nexport const CHART_EVENTS = {\n ...LEGEND_CUSTOMIZED_EVENTS,\n ...BRUSH_CUSTOMIZED_EVENTS,\n ...PLAYER_CUSTOMIZED_EVENTS,\n ...DATAZOOM_CUSTOMIZED_EVENTS,\n ...SCROLLBAR_CUSTOMIZED_EVENTS,\n ...DIMENSION_EVENTS,\n ...CHART_LIFECYCLE_EVENTS,\n ...HIERARCHY_EVENTS,\n ...REACT_TO_VCHART_EVENTS\n};\n\nexport const CHART_EVENTS_KEYS = Object.keys(CHART_EVENTS);\n\nexport const COMMON_EVENTK_KEYS = Object.keys(REACT_TO_VCHART_EVENTS);\n\nexport const VCHART_TO_REACT_EVENTS = Object.keys(REACT_TO_VCHART_EVENTS).reduce((res, key) => {\n res[REACT_TO_VCHART_EVENTS[key]] = key;\n\n return res;\n}, {});\n\nexport const findEventProps = <T extends EventsProps>(\n props: T,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n): EventsProps => {\n const result: EventsProps = {};\n\n Object.keys(props).forEach(key => {\n if (supportedEvents[key]) {\n result[key] = props[key];\n }\n });\n\n return result;\n};\n\nexport const bindEventsToChart = <T>(\n chart: IVChart,\n newProps?: T | null,\n prevProps?: T | null,\n supportedEvents: Record<string, string> = REACT_TO_VCHART_EVENTS\n) => {\n if ((!newProps && !prevProps) || !chart) {\n return false;\n }\n\n const prevEventProps = prevProps ? findEventProps(prevProps, supportedEvents) : null;\n const newEventProps = newProps ? findEventProps(newProps, supportedEvents) : null;\n\n if (prevEventProps) {\n Object.keys(prevEventProps).forEach(eventKey => {\n if (!newEventProps || !newEventProps[eventKey] || newEventProps[eventKey] !== prevEventProps[eventKey]) {\n const res = chart.off(supportedEvents[eventKey], prevProps[eventKey]);\n }\n });\n }\n\n if (newEventProps) {\n Object.keys(newEventProps).forEach(eventKey => {\n if (!prevEventProps || !prevEventProps[eventKey] || prevEventProps[eventKey] !== newEventProps[eventKey]) {\n chart.on(supportedEvents[eventKey], newEventProps[eventKey]);\n }\n });\n }\n\n return true;\n};\n"]}
|
package/esm/index.d.ts
CHANGED
|
@@ -2,6 +2,6 @@ export * from './charts';
|
|
|
2
2
|
export * from './series';
|
|
3
3
|
export * from './components';
|
|
4
4
|
export * from './VChart';
|
|
5
|
-
|
|
6
|
-
export
|
|
5
|
+
export * from './VChartSimple';
|
|
6
|
+
export declare const version = "1.8.3";
|
|
7
7
|
export type { IAreaChartSpec, IBarChartSpec, IBar3dChartSpec, IBoxPlotChartSpec, ICirclePackingChartSpec, ICommonChartSpec, IFunnelChartSpec, IFunnel3dChartSpec, IGaugeChartSpec, IHeatmapChartSpec, IHistogramChartSpec, IHistogram3dChartSpec, ILineChartSpec, IMapChartSpec, IPieChartSpec, IPie3dChartSpec, ICircularProgressChartSpec, ILinearProgressChartSpec, IRadarChartSpec, IRangeColumnChartSpec, IRangeColumn3dChartSpec, IRangeAreaChartSpec, IRoseChartSpec, IScatterChartSpec, ISankeyChartSpec, ISequenceChartSpec, ISunburstChartSpec, ITreemapChartSpec, IWaterfallChartSpec, ICorrelationChartSpec, IWordCloud3dChartSpec, IWordCloudChartSpec, IPolarChartSpec, ICartesianChartSpec, ITheme, IInitOption, ISpec, IVChart } from '@visactor/vchart';
|
package/esm/index.js
CHANGED
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,cAAc,UAAU,CAAC;
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAG/B,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","file":"index.js","sourcesContent":["export * from './charts';\nexport * from './series';\nexport * from './components';\nexport * from './VChart';\nexport * from './VChartSimple';\n\n// export the version, since @1.8.3\nexport const version = \"1.8.3\";\n\nexport type {\n IAreaChartSpec,\n IBarChartSpec,\n IBar3dChartSpec,\n IBoxPlotChartSpec,\n ICirclePackingChartSpec,\n ICommonChartSpec,\n IFunnelChartSpec,\n IFunnel3dChartSpec,\n IGaugeChartSpec,\n IHeatmapChartSpec,\n IHistogramChartSpec,\n IHistogram3dChartSpec,\n ILineChartSpec,\n IMapChartSpec,\n IPieChartSpec,\n IPie3dChartSpec,\n ICircularProgressChartSpec,\n ILinearProgressChartSpec,\n IRadarChartSpec,\n IRangeColumnChartSpec,\n IRangeColumn3dChartSpec,\n IRangeAreaChartSpec,\n IRoseChartSpec,\n IScatterChartSpec,\n ISankeyChartSpec,\n ISequenceChartSpec,\n ISunburstChartSpec,\n ITreemapChartSpec,\n IWaterfallChartSpec,\n ICorrelationChartSpec,\n IWordCloud3dChartSpec,\n IWordCloudChartSpec,\n IPolarChartSpec,\n ICartesianChartSpec,\n ITheme,\n IInitOption,\n ISpec,\n IVChart\n} from '@visactor/vchart';\n"]}
|
package/esm/series/Area.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BaseSeriesProps } from './BaseSeries';
|
|
2
|
-
import { IAreaSeriesSpec } from '@visactor/vchart';
|
|
2
|
+
import type { IAreaSeriesSpec } from '@visactor/vchart';
|
|
3
3
|
export type AreaProps = BaseSeriesProps & Omit<IAreaSeriesSpec, 'type'>;
|
|
4
4
|
export declare const Area: import("react").FC<BaseSeriesProps & Omit<IAreaSeriesSpec, "type"> & {
|
|
5
5
|
updateId?: number;
|