@visactor/react-vchart 0.0.1-alpha.1 → 0.16.17-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -5
- package/cjs/VChart.d.ts +1 -1
- package/cjs/charts/AreaChart.d.ts +4 -1
- package/cjs/charts/AreaChart.js.map +1 -1
- package/cjs/charts/BarChart.d.ts +4 -1
- package/cjs/charts/BarChart.js.map +1 -1
- package/cjs/charts/BaseChart.d.ts +7 -5
- package/cjs/charts/BaseChart.js +33 -10
- package/cjs/charts/BaseChart.js.map +1 -1
- package/cjs/charts/BoxPlotChart.d.ts +4 -1
- package/cjs/charts/BoxPlotChart.js.map +1 -1
- package/cjs/charts/CircularProgressChart.d.ts +4 -1
- package/cjs/charts/CircularProgressChart.js.map +1 -1
- package/cjs/charts/CommonChart.d.ts +4 -1
- package/cjs/charts/CommonChart.js.map +1 -1
- package/cjs/charts/FunnelChart.d.ts +4 -1
- package/cjs/charts/FunnelChart.js.map +1 -1
- package/cjs/charts/HistogramChart.d.ts +4 -1
- package/cjs/charts/HistogramChart.js.map +1 -1
- package/cjs/charts/LineChart.d.ts +4 -1
- package/cjs/charts/LineChart.js.map +1 -1
- package/cjs/charts/LinearProgressChart.d.ts +4 -1
- package/cjs/charts/LinearProgressChart.js.map +1 -1
- package/cjs/charts/MapChart.d.ts +4 -1
- package/cjs/charts/MapChart.js +2 -1
- package/cjs/charts/MapChart.js.map +1 -1
- package/cjs/charts/PieChart.d.ts +4 -1
- package/cjs/charts/PieChart.js.map +1 -1
- package/cjs/charts/RadarChart.d.ts +4 -1
- package/cjs/charts/RadarChart.js.map +1 -1
- package/cjs/charts/RangeColumnChart.d.ts +4 -1
- package/cjs/charts/RangeColumnChart.js.map +1 -1
- package/cjs/charts/RoseChart.d.ts +4 -1
- package/cjs/charts/RoseChart.js.map +1 -1
- package/cjs/charts/ScatterChart.d.ts +4 -1
- package/cjs/charts/ScatterChart.js +1 -2
- package/cjs/charts/ScatterChart.js.map +1 -1
- package/cjs/charts/SequenceChart.d.ts +4 -1
- package/cjs/charts/SequenceChart.js.map +1 -1
- package/cjs/charts/WordCloudChart.d.ts +4 -1
- package/cjs/charts/WordCloudChart.js.map +1 -1
- package/cjs/charts/index.d.ts +18 -16
- package/cjs/charts/index.js +24 -146
- package/cjs/charts/index.js.map +1 -1
- package/cjs/components/Axis.d.ts +4 -5
- package/cjs/components/Axis.js.map +1 -1
- package/cjs/components/BaseComponent.d.ts +1 -1
- package/cjs/components/BaseComponent.js +10 -5
- package/cjs/components/BaseComponent.js.map +1 -1
- package/cjs/components/Brush.d.ts +5 -0
- package/cjs/components/Brush.js +10 -0
- package/cjs/components/Brush.js.map +1 -0
- package/cjs/components/Crosshair.d.ts +4 -0
- package/cjs/components/Crosshair.js +10 -0
- package/cjs/components/Crosshair.js.map +1 -0
- package/cjs/components/DataZoom.d.ts +5 -0
- package/cjs/components/DataZoom.js +10 -0
- package/cjs/components/DataZoom.js.map +1 -0
- package/cjs/components/Indicator.d.ts +4 -0
- package/cjs/components/Indicator.js +10 -0
- package/cjs/components/Indicator.js.map +1 -0
- package/cjs/components/Legend.d.ts +4 -8
- package/cjs/components/Legend.js.map +1 -1
- package/cjs/components/Mark.d.ts +2 -2
- package/cjs/components/Mark.js +3 -2
- package/cjs/components/Mark.js.map +1 -1
- package/cjs/components/MarkArea.d.ts +4 -0
- package/cjs/components/MarkArea.js +10 -0
- package/cjs/components/MarkArea.js.map +1 -0
- package/cjs/components/MarkLine.d.ts +4 -0
- package/cjs/components/MarkLine.js +10 -0
- package/cjs/components/MarkLine.js.map +1 -0
- package/cjs/components/MarkPoint.d.ts +4 -0
- package/cjs/components/MarkPoint.js +10 -0
- package/cjs/components/MarkPoint.js.map +1 -0
- package/cjs/components/Player.d.ts +5 -0
- package/cjs/components/Player.js +10 -0
- package/cjs/components/Player.js.map +1 -0
- package/cjs/components/Region.d.ts +4 -4
- package/cjs/components/Region.js.map +1 -1
- package/cjs/components/ScrollBar.d.ts +5 -0
- package/cjs/components/ScrollBar.js +9 -0
- package/cjs/components/ScrollBar.js.map +1 -0
- package/cjs/components/Title.d.ts +4 -0
- package/cjs/components/Title.js +10 -0
- package/cjs/components/Title.js.map +1 -0
- package/cjs/components/Tooltip.d.ts +4 -0
- package/cjs/components/Tooltip.js +10 -0
- package/cjs/components/Tooltip.js.map +1 -0
- package/cjs/components/index.d.ts +11 -0
- package/cjs/components/index.js +8 -2
- package/cjs/components/index.js.map +1 -1
- package/cjs/constants.js +1 -1
- package/cjs/containers/withContainer.d.ts +2 -2
- package/cjs/containers/withContainer.js.map +1 -1
- package/cjs/context/stage.d.ts +1 -1
- package/cjs/context/stage.js.map +1 -1
- package/cjs/context/view.d.ts +2 -2
- package/cjs/context/view.js.map +1 -1
- package/cjs/eventsUtils.d.ts +146 -47
- package/cjs/eventsUtils.js +33 -4
- package/cjs/eventsUtils.js.map +1 -1
- package/cjs/index.d.ts +1 -1
- package/cjs/index.js +4 -12
- package/cjs/index.js.map +1 -1
- package/cjs/series/Area.d.ts +5 -5
- package/cjs/series/Area.js.map +1 -1
- package/cjs/series/Bar.d.ts +5 -5
- package/cjs/series/Bar.js.map +1 -1
- package/cjs/series/BaseSeries.d.ts +1 -1
- package/cjs/series/BaseSeries.js +6 -6
- package/cjs/series/BaseSeries.js.map +1 -1
- package/cjs/series/BoxPlot.d.ts +5 -5
- package/cjs/series/BoxPlot.js.map +1 -1
- package/cjs/series/CircularProgress.d.ts +5 -5
- package/cjs/series/CircularProgress.js.map +1 -1
- package/cjs/series/Dot.d.ts +5 -5
- package/cjs/series/Dot.js.map +1 -1
- package/cjs/series/Funnel.d.ts +5 -5
- package/cjs/series/Funnel.js.map +1 -1
- package/cjs/series/Line.d.ts +5 -5
- package/cjs/series/Line.js.map +1 -1
- package/cjs/series/LinearProgress.d.ts +5 -5
- package/cjs/series/LinearProgress.js +2 -1
- package/cjs/series/LinearProgress.js.map +1 -1
- package/cjs/series/Link.d.ts +5 -5
- package/cjs/series/Link.js +1 -2
- package/cjs/series/Link.js.map +1 -1
- package/cjs/series/Map.d.ts +5 -5
- package/cjs/series/Map.js.map +1 -1
- package/cjs/series/Pie.d.ts +5 -5
- package/cjs/series/Pie.js.map +1 -1
- package/cjs/series/Radar.d.ts +5 -5
- package/cjs/series/Radar.js.map +1 -1
- package/cjs/series/RangeColumn.d.ts +5 -5
- package/cjs/series/RangeColumn.js.map +1 -1
- package/cjs/series/Rose.d.ts +5 -5
- package/cjs/series/Rose.js.map +1 -1
- package/cjs/series/Scatter.d.ts +5 -5
- package/cjs/series/Scatter.js.map +1 -1
- package/cjs/series/Series.d.ts +5 -6
- package/cjs/series/Series.js.map +1 -1
- package/cjs/series/WordCloud.d.ts +5 -5
- package/cjs/series/WordCloud.js +1 -1
- package/cjs/series/WordCloud.js.map +1 -1
- package/cjs/series/index.js +1 -1
- package/cjs/util.js +1 -1
- package/esm/VChart.d.ts +1 -1
- package/esm/charts/AreaChart.d.ts +4 -1
- package/esm/charts/AreaChart.js.map +1 -1
- package/esm/charts/BarChart.d.ts +4 -1
- package/esm/charts/BarChart.js.map +1 -1
- package/esm/charts/BaseChart.d.ts +7 -5
- package/esm/charts/BaseChart.js +34 -10
- package/esm/charts/BaseChart.js.map +1 -1
- package/esm/charts/BoxPlotChart.d.ts +4 -1
- package/esm/charts/BoxPlotChart.js.map +1 -1
- package/esm/charts/CircularProgressChart.d.ts +4 -1
- package/esm/charts/CircularProgressChart.js.map +1 -1
- package/esm/charts/CommonChart.d.ts +4 -1
- package/esm/charts/CommonChart.js.map +1 -1
- package/esm/charts/FunnelChart.d.ts +4 -1
- package/esm/charts/FunnelChart.js.map +1 -1
- package/esm/charts/HistogramChart.d.ts +4 -1
- package/esm/charts/HistogramChart.js.map +1 -1
- package/esm/charts/LineChart.d.ts +4 -1
- package/esm/charts/LineChart.js.map +1 -1
- package/esm/charts/LinearProgressChart.d.ts +4 -1
- package/esm/charts/LinearProgressChart.js.map +1 -1
- package/esm/charts/MapChart.d.ts +4 -1
- package/esm/charts/MapChart.js +2 -1
- package/esm/charts/MapChart.js.map +1 -1
- package/esm/charts/PieChart.d.ts +4 -1
- package/esm/charts/PieChart.js.map +1 -1
- package/esm/charts/RadarChart.d.ts +4 -1
- package/esm/charts/RadarChart.js.map +1 -1
- package/esm/charts/RangeColumnChart.d.ts +4 -1
- package/esm/charts/RangeColumnChart.js.map +1 -1
- package/esm/charts/RoseChart.d.ts +4 -1
- package/esm/charts/RoseChart.js.map +1 -1
- package/esm/charts/ScatterChart.d.ts +4 -1
- package/esm/charts/ScatterChart.js +1 -2
- package/esm/charts/ScatterChart.js.map +1 -1
- package/esm/charts/SequenceChart.d.ts +4 -1
- package/esm/charts/SequenceChart.js.map +1 -1
- package/esm/charts/WordCloudChart.d.ts +4 -1
- package/esm/charts/WordCloudChart.js.map +1 -1
- package/esm/charts/index.d.ts +18 -16
- package/esm/charts/index.js +17 -17
- package/esm/charts/index.js.map +1 -1
- package/esm/components/Axis.d.ts +4 -5
- package/esm/components/Axis.js.map +1 -1
- package/esm/components/BaseComponent.d.ts +1 -1
- package/esm/components/BaseComponent.js +11 -5
- package/esm/components/BaseComponent.js.map +1 -1
- package/esm/components/Brush.d.ts +5 -0
- package/esm/components/Brush.js +6 -0
- package/esm/components/Brush.js.map +1 -0
- package/esm/components/Crosshair.d.ts +4 -0
- package/esm/components/Crosshair.js +4 -0
- package/esm/components/Crosshair.js.map +1 -0
- package/esm/components/DataZoom.d.ts +5 -0
- package/esm/components/DataZoom.js +6 -0
- package/esm/components/DataZoom.js.map +1 -0
- package/esm/components/Indicator.d.ts +4 -0
- package/esm/components/Indicator.js +4 -0
- package/esm/components/Indicator.js.map +1 -0
- package/esm/components/Legend.d.ts +4 -8
- package/esm/components/Legend.js.map +1 -1
- package/esm/components/Mark.d.ts +2 -2
- package/esm/components/Mark.js +3 -2
- package/esm/components/Mark.js.map +1 -1
- package/esm/components/MarkArea.d.ts +4 -0
- package/esm/components/MarkArea.js +4 -0
- package/esm/components/MarkArea.js.map +1 -0
- package/esm/components/MarkLine.d.ts +4 -0
- package/esm/components/MarkLine.js +4 -0
- package/esm/components/MarkLine.js.map +1 -0
- package/esm/components/MarkPoint.d.ts +4 -0
- package/esm/components/MarkPoint.js +4 -0
- package/esm/components/MarkPoint.js.map +1 -0
- package/esm/components/Player.d.ts +5 -0
- package/esm/components/Player.js +6 -0
- package/esm/components/Player.js.map +1 -0
- package/esm/components/Region.d.ts +4 -4
- package/esm/components/Region.js.map +1 -1
- package/esm/components/ScrollBar.d.ts +5 -0
- package/esm/components/ScrollBar.js +5 -0
- package/esm/components/ScrollBar.js.map +1 -0
- package/esm/components/Title.d.ts +4 -0
- package/esm/components/Title.js +4 -0
- package/esm/components/Title.js.map +1 -0
- package/esm/components/Tooltip.d.ts +4 -0
- package/esm/components/Tooltip.js +4 -0
- package/esm/components/Tooltip.js.map +1 -0
- package/esm/components/index.d.ts +11 -0
- package/esm/components/index.js +23 -1
- package/esm/components/index.js.map +1 -1
- package/esm/constants.js +1 -1
- package/esm/containers/withContainer.d.ts +2 -2
- package/esm/containers/withContainer.js.map +1 -1
- package/esm/context/stage.d.ts +1 -1
- package/esm/context/stage.js.map +1 -1
- package/esm/context/view.d.ts +2 -2
- package/esm/context/view.js.map +1 -1
- package/esm/eventsUtils.d.ts +146 -47
- package/esm/eventsUtils.js +46 -3
- package/esm/eventsUtils.js.map +1 -1
- package/esm/index.d.ts +1 -1
- package/esm/index.js +3 -2
- package/esm/index.js.map +1 -1
- package/esm/series/Area.d.ts +5 -5
- package/esm/series/Area.js.map +1 -1
- package/esm/series/Bar.d.ts +5 -5
- package/esm/series/Bar.js.map +1 -1
- package/esm/series/BaseSeries.d.ts +1 -1
- package/esm/series/BaseSeries.js +6 -6
- package/esm/series/BaseSeries.js.map +1 -1
- package/esm/series/BoxPlot.d.ts +5 -5
- package/esm/series/BoxPlot.js.map +1 -1
- package/esm/series/CircularProgress.d.ts +5 -5
- package/esm/series/CircularProgress.js.map +1 -1
- package/esm/series/Dot.d.ts +5 -5
- package/esm/series/Dot.js.map +1 -1
- package/esm/series/Funnel.d.ts +5 -5
- package/esm/series/Funnel.js.map +1 -1
- package/esm/series/Line.d.ts +5 -5
- package/esm/series/Line.js.map +1 -1
- package/esm/series/LinearProgress.d.ts +5 -5
- package/esm/series/LinearProgress.js +2 -1
- package/esm/series/LinearProgress.js.map +1 -1
- package/esm/series/Link.d.ts +5 -5
- package/esm/series/Link.js +1 -2
- package/esm/series/Link.js.map +1 -1
- package/esm/series/Map.d.ts +5 -5
- package/esm/series/Map.js.map +1 -1
- package/esm/series/Pie.d.ts +5 -5
- package/esm/series/Pie.js.map +1 -1
- package/esm/series/Radar.d.ts +5 -5
- package/esm/series/Radar.js.map +1 -1
- package/esm/series/RangeColumn.d.ts +5 -5
- package/esm/series/RangeColumn.js.map +1 -1
- package/esm/series/Rose.d.ts +5 -5
- package/esm/series/Rose.js.map +1 -1
- package/esm/series/Scatter.d.ts +5 -5
- package/esm/series/Scatter.js.map +1 -1
- package/esm/series/Series.d.ts +5 -6
- package/esm/series/Series.js.map +1 -1
- package/esm/series/WordCloud.d.ts +5 -5
- package/esm/series/WordCloud.js +1 -1
- package/esm/series/WordCloud.js.map +1 -1
- package/esm/series/index.js +1 -1
- package/esm/util.js +1 -1
- package/package.json +10 -9
package/cjs/charts/index.js
CHANGED
|
@@ -1,150 +1,28 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
|
|
4
|
+
void 0 === k2 && (k2 = k);
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
get: function() {
|
|
9
|
+
return m[k];
|
|
10
|
+
}
|
|
11
|
+
}), Object.defineProperty(o, k2, desc);
|
|
12
|
+
} : function(o, m, k, k2) {
|
|
13
|
+
void 0 === k2 && (k2 = k), o[k2] = m[k];
|
|
14
|
+
}), __exportStar = this && this.__exportStar || function(m, exports) {
|
|
15
|
+
for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
|
|
3
18
|
Object.defineProperty(exports, "__esModule", {
|
|
4
19
|
value: !0
|
|
5
|
-
}),
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
var BarChart_1 = require("./BarChart");
|
|
17
|
-
|
|
18
|
-
Object.defineProperty(exports, "BarChart", {
|
|
19
|
-
enumerable: !0,
|
|
20
|
-
get: function() {
|
|
21
|
-
return BarChart_1.BarChart;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
var LineChart_1 = require("./LineChart");
|
|
26
|
-
|
|
27
|
-
Object.defineProperty(exports, "LineChart", {
|
|
28
|
-
enumerable: !0,
|
|
29
|
-
get: function() {
|
|
30
|
-
return LineChart_1.LineChart;
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
var ScatterChart_1 = require("./ScatterChart");
|
|
35
|
-
|
|
36
|
-
Object.defineProperty(exports, "ScatterChart", {
|
|
37
|
-
enumerable: !0,
|
|
38
|
-
get: function() {
|
|
39
|
-
return ScatterChart_1.ScatterChart;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
var PieChart_1 = require("./PieChart");
|
|
44
|
-
|
|
45
|
-
Object.defineProperty(exports, "PieChart", {
|
|
46
|
-
enumerable: !0,
|
|
47
|
-
get: function() {
|
|
48
|
-
return PieChart_1.PieChart;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
var RoseChart_1 = require("./RoseChart");
|
|
53
|
-
|
|
54
|
-
Object.defineProperty(exports, "RoseChart", {
|
|
55
|
-
enumerable: !0,
|
|
56
|
-
get: function() {
|
|
57
|
-
return RoseChart_1.RoseChart;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
var RadarChart_1 = require("./RadarChart");
|
|
62
|
-
|
|
63
|
-
Object.defineProperty(exports, "RadarChart", {
|
|
64
|
-
enumerable: !0,
|
|
65
|
-
get: function() {
|
|
66
|
-
return RadarChart_1.RadarChart;
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
|
|
70
|
-
var MapChart_1 = require("./MapChart");
|
|
71
|
-
|
|
72
|
-
Object.defineProperty(exports, "MapChart", {
|
|
73
|
-
enumerable: !0,
|
|
74
|
-
get: function() {
|
|
75
|
-
return MapChart_1.MapChart;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
var HistogramChart_1 = require("./HistogramChart");
|
|
80
|
-
|
|
81
|
-
Object.defineProperty(exports, "HistogramChart", {
|
|
82
|
-
enumerable: !0,
|
|
83
|
-
get: function() {
|
|
84
|
-
return HistogramChart_1.HistogramChart;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
var WordCloudChart_1 = require("./WordCloudChart");
|
|
89
|
-
|
|
90
|
-
Object.defineProperty(exports, "WordCloudChart", {
|
|
91
|
-
enumerable: !0,
|
|
92
|
-
get: function() {
|
|
93
|
-
return WordCloudChart_1.WordCloudChart;
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
var FunnelChart_1 = require("./FunnelChart");
|
|
98
|
-
|
|
99
|
-
Object.defineProperty(exports, "FunnelChart", {
|
|
100
|
-
enumerable: !0,
|
|
101
|
-
get: function() {
|
|
102
|
-
return FunnelChart_1.FunnelChart;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
var BoxPlotChart_1 = require("./BoxPlotChart");
|
|
107
|
-
|
|
108
|
-
Object.defineProperty(exports, "BoxPlotChart", {
|
|
109
|
-
enumerable: !0,
|
|
110
|
-
get: function() {
|
|
111
|
-
return BoxPlotChart_1.BoxPlotChart;
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
|
|
115
|
-
var CircularProgressChart_1 = require("./CircularProgressChart");
|
|
116
|
-
|
|
117
|
-
Object.defineProperty(exports, "CircularProgressChart", {
|
|
118
|
-
enumerable: !0,
|
|
119
|
-
get: function() {
|
|
120
|
-
return CircularProgressChart_1.CircularProgressChart;
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
|
|
124
|
-
var LinearProgressChart_1 = require("./LinearProgressChart");
|
|
125
|
-
|
|
126
|
-
Object.defineProperty(exports, "LinearProgressChart", {
|
|
127
|
-
enumerable: !0,
|
|
128
|
-
get: function() {
|
|
129
|
-
return LinearProgressChart_1.LinearProgressChart;
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
|
|
133
|
-
var RangeColumnChart_1 = require("./RangeColumnChart");
|
|
134
|
-
|
|
135
|
-
Object.defineProperty(exports, "RangeColumnChart", {
|
|
136
|
-
enumerable: !0,
|
|
137
|
-
get: function() {
|
|
138
|
-
return RangeColumnChart_1.RangeColumnChart;
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
|
|
142
|
-
var CommonChart_1 = require("./CommonChart");
|
|
143
|
-
|
|
144
|
-
Object.defineProperty(exports, "CommonChart", {
|
|
145
|
-
enumerable: !0,
|
|
146
|
-
get: function() {
|
|
147
|
-
return CommonChart_1.CommonChart;
|
|
148
|
-
}
|
|
149
|
-
});
|
|
150
|
-
//# sourceMappingURL=index.js.map
|
|
20
|
+
}), __exportStar(require("./AreaChart"), exports), __exportStar(require("./BarChart"), exports),
|
|
21
|
+
__exportStar(require("./LineChart"), exports), __exportStar(require("./ScatterChart"), exports),
|
|
22
|
+
__exportStar(require("./PieChart"), exports), __exportStar(require("./RoseChart"), exports),
|
|
23
|
+
__exportStar(require("./RadarChart"), exports), __exportStar(require("./MapChart"), exports),
|
|
24
|
+
__exportStar(require("./HistogramChart"), exports), __exportStar(require("./WordCloudChart"), exports),
|
|
25
|
+
__exportStar(require("./FunnelChart"), exports), __exportStar(require("./BoxPlotChart"), exports),
|
|
26
|
+
__exportStar(require("./CircularProgressChart"), exports), __exportStar(require("./LinearProgressChart"), exports),
|
|
27
|
+
__exportStar(require("./RangeColumnChart"), exports), __exportStar(require("./CommonChart"), exports);
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
package/cjs/charts/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["charts/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["charts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,6CAA2B;AAC3B,8CAA4B;AAC5B,iDAA+B;AAE/B,6CAA2B;AAC3B,8CAA4B;AAE5B,+CAA6B;AAE7B,6CAA2B;AAC3B,mDAAiC;AACjC,mDAAiC;AACjC,gDAA8B;AAC9B,iDAA+B;AAE/B,0DAAwC;AACxC,wDAAsC;AACtC,qDAAmC;AAEnC,gDAA8B","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"]}
|
package/cjs/components/Axis.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
}
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
}>;
|
|
1
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
+
import type { ICartesianAxisSpec, IPolarAxisSpec } from '@visactor/vchart';
|
|
3
|
+
export type AxisProps = (ICartesianAxisSpec | IPolarAxisSpec) & BaseComponentProps;
|
|
4
|
+
export declare const Axis: import("react").FC<AxisProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"sources":["components/Axis.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,IAAI,GAAG,IAAA,+BAAe,EAAY,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"]}
|
|
@@ -36,11 +36,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
36
36
|
const react_1 = __importStar(require("react")), vutils_1 = require("@visactor/vutils"), chart_1 = __importDefault(require("../context/chart")), eventsUtils_1 = require("../eventsUtils"), util_1 = require("../util"), createComponent = (componentName, specName, supportedEvents, isSingle) => {
|
|
37
37
|
const ignoreKeys = [ "id", "updateId" ], notSpecKeys = supportedEvents ? Object.keys(supportedEvents).concat(ignoreKeys) : ignoreKeys, Comp = props => {
|
|
38
38
|
const context = (0, react_1.useContext)(chart_1.default), id = react_1.default.useRef((0,
|
|
39
|
-
vutils_1.isNil)(props.id) ? (0, util_1.uid)(specName) : props.id), eventsBinded = react_1.default.useRef(null), updateId = react_1.default.useRef(props.updateId), componentSpec = (
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
39
|
+
vutils_1.isNil)(props.id) ? (0, util_1.uid)(specName) : props.id), eventsBinded = react_1.default.useRef(null), updateId = react_1.default.useRef(props.updateId), componentSpec = react_1.default.useRef();
|
|
40
|
+
if (props.updateId !== updateId.current) {
|
|
41
|
+
updateId.current = props.updateId;
|
|
42
|
+
!!supportedEvents && (0, eventsUtils_1.bindEventsToChart)(context.chart, props, eventsBinded.current, supportedEvents) && (eventsBinded.current = props);
|
|
43
|
+
} else {
|
|
44
|
+
const newComponentSpec = (0, vutils_1.pickWithout)(props, notSpecKeys);
|
|
45
|
+
(0, vutils_1.isEqual)(newComponentSpec, componentSpec.current) || (componentSpec.current = newComponentSpec,
|
|
46
|
+
updateToContext(context, id.current, specName, isSingle, newComponentSpec));
|
|
47
|
+
}
|
|
48
|
+
return (0, react_1.useEffect)((() => () => {
|
|
44
49
|
supportedEvents && (0, eventsUtils_1.bindEventsToChart)(context.chart, null, eventsBinded.current, supportedEvents),
|
|
45
50
|
deleteToContext(context, id.current, specName, isSingle);
|
|
46
51
|
}), []), null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,
|
|
1
|
+
{"version":3,"sources":["components/BaseComponent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,6CAA+D;AAE/D,6DAAsE;AACtE,gDAAmD;AACnD,kCAA8B;AAQvB,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,IAAA,kBAAU,EAAC,eAAgB,CAAC,CA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MAAM,eAAe,GAAG,CAAC,OAAyB,EAAE,EAAmB,EAAE,QAAgB,EAAE,QAAiB,EAAE,EAAE;;IAC9G,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE;QAC7B,OAAO;KACR;IAED,IAAI,QAAQ,EAAE;QACZ,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;KAC3C;SAAM;QACL,MAAM,KAAK,GAAG,MAAA,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,mCAAI,EAAE,CAAC;QACvD,MAAM,KAAK,GAAG,KAAK,CAAC,SAAS,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"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BrushEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IBrushSpec } from '@visactor/vchart';
|
|
4
|
+
export type BrushProps = IBrushSpec & BaseComponentProps & BrushEventProps;
|
|
5
|
+
export declare const Brush: import("react").FC<BrushProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Brush = void 0;
|
|
6
|
+
|
|
7
|
+
const eventsUtils_1 = require("../eventsUtils"), BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Brush = (0, BaseComponent_1.createComponent)("Brush", "brush", eventsUtils_1.BRUSH_CUSTOMIZED_EVENTS, !0);
|
|
10
|
+
//# sourceMappingURL=Brush.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Brush.tsx"],"names":[],"mappings":";;;AAAA,gDAA0E;AAC1E,mDAAsE;AAKzD,QAAA,KAAK,GAAG,IAAA,+BAAe,EAAa,OAAO,EAAE,OAAO,EAAE,qCAAuB,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"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
+
import type { ICartesianCrosshairSpec, IPolarCrosshairSpec } from '@visactor/vchart';
|
|
3
|
+
export type CrosshairProps = (ICartesianCrosshairSpec | IPolarCrosshairSpec) & BaseComponentProps;
|
|
4
|
+
export declare const Crosshair: import("react").FC<CrosshairProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Crosshair = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Crosshair = (0, BaseComponent_1.createComponent)("Crosshair", "crosshair");
|
|
10
|
+
//# sourceMappingURL=Crosshair.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Crosshair.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,SAAS,GAAG,IAAA,+BAAe,EAAiB,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"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { DataZoomEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IDataZoomSpec } from '@visactor/vchart';
|
|
4
|
+
export type DataZoomProps = IDataZoomSpec & BaseComponentProps & DataZoomEventProps;
|
|
5
|
+
export declare const DataZoom: import("react").FC<DataZoomProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.DataZoom = void 0;
|
|
6
|
+
|
|
7
|
+
const eventsUtils_1 = require("../eventsUtils"), BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.DataZoom = (0, BaseComponent_1.createComponent)("DataZoom", "dataZoom", eventsUtils_1.DATAZOOM_CUSTOMIZED_EVENTS);
|
|
10
|
+
//# sourceMappingURL=DataZoom.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/DataZoom.tsx"],"names":[],"mappings":";;;AAAA,gDAAgF;AAChF,mDAAsE;AAIzD,QAAA,QAAQ,GAAG,IAAA,+BAAe,EAAgB,UAAU,EAAE,UAAU,EAAE,wCAA0B,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"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Indicator = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Indicator = (0, BaseComponent_1.createComponent)("Indicator", "indicator", null, !0);
|
|
10
|
+
//# sourceMappingURL=Indicator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Indicator.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,SAAS,GAAG,IAAA,+BAAe,EAAiB,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,9 +1,5 @@
|
|
|
1
|
+
import type { IDiscreteLegendSpec } from '@visactor/vchart';
|
|
2
|
+
import { LegendEventProps } from '../eventsUtils';
|
|
1
3
|
import { BaseComponentProps } from './BaseComponent';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
onLegendItemUnHover: (e: any) => void;
|
|
5
|
-
onLegendItemClick: (e: any) => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const Legend: import("react").FC<BaseComponentProps & {
|
|
8
|
-
updateId?: number;
|
|
9
|
-
}>;
|
|
4
|
+
export type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;
|
|
5
|
+
export declare const Legend: import("react").FC<LegendProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Legend.tsx"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"sources":["components/Legend.tsx"],"names":[],"mappings":";;;AACA,gDAA4E;AAC5E,mDAAsE;AAIzD,QAAA,MAAM,GAAG,IAAA,+BAAe,EAAc,QAAQ,EAAE,SAAS,EAAE,sCAAwB,CAAC,CAAC","file":"Legend.js","sourcesContent":["import type { IDiscreteLegendSpec } from '@visactor/vchart';\nimport { LEGEND_CUSTOMIZED_EVENTS, LegendEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport type LegendProps = BaseComponentProps & IDiscreteLegendSpec & LegendEventProps;\n\nexport const Legend = createComponent<LegendProps>('Legend', 'legends', LEGEND_CUSTOMIZED_EVENTS);\n"]}
|
package/cjs/components/Mark.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { MarkSpec } from '@visactor/vgrammar';
|
|
2
|
+
import type { MarkSpec } from '@visactor/vgrammar-core';
|
|
3
3
|
export interface MarkProps extends Omit<MarkSpec, 'name' | 'id'> {
|
|
4
4
|
id?: string | number;
|
|
5
5
|
glyphType?: string;
|
|
@@ -8,7 +8,7 @@ export interface IMarkElement extends React.ReactElement<Props, React.JSXElement
|
|
|
8
8
|
id: string | number;
|
|
9
9
|
}
|
|
10
10
|
type Props = MarkProps & {
|
|
11
|
-
updateId
|
|
11
|
+
updateId?: number;
|
|
12
12
|
};
|
|
13
13
|
export declare const Mark: React.FC<Props>;
|
|
14
14
|
export {};
|
package/cjs/components/Mark.js
CHANGED
|
@@ -43,8 +43,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
43
43
|
|
|
44
44
|
const react_1 = __importStar(require("react")), vutils_1 = require("@visactor/vutils"), view_1 = __importDefault(require("../context/view")), util_1 = require("../util"), Mark = props => {
|
|
45
45
|
const context = (0, react_1.useContext)(view_1.default), id = react_1.default.useRef((0,
|
|
46
|
-
vutils_1.isNil)(props.id) ? (0, util_1.uid)("mark") : props.id);
|
|
47
|
-
return
|
|
46
|
+
vutils_1.isNil)(props.id) ? (0, util_1.uid)("mark") : props.id), updateId = react_1.default.useRef(props.updateId);
|
|
47
|
+
return props.updateId !== updateId.current && (updateId.current = props.updateId,
|
|
48
|
+
context && addOrUpdateMark(context, id.current, props)), (0, react_1.useEffect)((() => () => {
|
|
48
49
|
context && removeMark(context, id.current);
|
|
49
50
|
}), []), null;
|
|
50
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Mark.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAqD;AACrD,6CAAyC;AAGzC,2DAA0C;AAC1C,kCAA8B;AAavB,MAAM,IAAI,GAAoB,CAAC,KAAY,EAAE,EAAE;IACpD,MAAM,OAAO,GAAG,IAAA,kBAAU,EAAC,cAAW,CAAC,CA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EF,MAAM,eAAe,GAAG,CAAC,IAAW,EAAE,EAAU,EAAE,KAAY,EAAE,EAAE;;IAChE,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;QAElB,OAAO;KACR;IAED,IAAI,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAChC,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,KAAgB,KAAK,EAAhB,MAAM,UAAK,KAAK,EAAjD,kCAAyC,CAAQ,CAAC;IACxD,IAAI,CAAC,IAAI,EAAE;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"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.MarkArea = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.MarkArea = (0, BaseComponent_1.createComponent)("MarkArea", "markArea");
|
|
10
|
+
//# sourceMappingURL=MarkArea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/MarkArea.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,QAAQ,GAAG,IAAA,+BAAe,EAAgB,UAAU,EAAE,UAAU,CAAC,CAAC","file":"MarkArea.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkAreaSpec } from '@visactor/vchart';\n\nexport type MarkAreaProps = IMarkAreaSpec & BaseComponentProps;\n\nexport const MarkArea = createComponent<MarkAreaProps>('MarkArea', 'markArea');\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.MarkLine = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.MarkLine = (0, BaseComponent_1.createComponent)("MarkLine", "markLine");
|
|
10
|
+
//# sourceMappingURL=MarkLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/MarkLine.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,QAAQ,GAAG,IAAA,+BAAe,EAAgB,UAAU,EAAE,UAAU,CAAC,CAAC","file":"MarkLine.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkLineSpec } from '@visactor/vchart';\n\nexport type MarkLineProps = IMarkLineSpec & BaseComponentProps;\n\nexport const MarkLine = createComponent<MarkLineProps>('MarkLine', 'markLine');\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.MarkPoint = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.MarkPoint = (0, BaseComponent_1.createComponent)("MarkPoint", "markPoint");
|
|
10
|
+
//# sourceMappingURL=MarkPoint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/MarkPoint.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,SAAS,GAAG,IAAA,+BAAe,EAAiB,WAAW,EAAE,WAAW,CAAC,CAAC","file":"MarkPoint.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkPointSpec } from '@visactor/vchart';\n\nexport type MarkPointProps = IMarkPointSpec & BaseComponentProps;\n\nexport const MarkPoint = createComponent<MarkPointProps>('MarkPoint', 'markPoint');\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { PlayerEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IPlayerSpec } from '@visactor/vchart';
|
|
4
|
+
export type PlayerProps = IPlayerSpec & BaseComponentProps & PlayerEventProps;
|
|
5
|
+
export declare const Player: import("react").FC<PlayerProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Player = void 0;
|
|
6
|
+
|
|
7
|
+
const eventsUtils_1 = require("../eventsUtils"), BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Player = (0, BaseComponent_1.createComponent)("Player", "player", eventsUtils_1.PLAYER_CUSTOMIZED_EVENTS, !0);
|
|
10
|
+
//# sourceMappingURL=Player.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Player.tsx"],"names":[],"mappings":";;;AAAA,gDAA4E;AAC5E,mDAAsE;AAKzD,QAAA,MAAM,GAAG,IAAA,+BAAe,EAAc,QAAQ,EAAE,QAAQ,EAAE,sCAAwB,EAAE,IAAI,CAAC,CAAC","file":"Player.js","sourcesContent":["import { PLAYER_CUSTOMIZED_EVENTS, PlayerEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IPlayerSpec } from '@visactor/vchart';\n\nexport type PlayerProps = IPlayerSpec & BaseComponentProps & PlayerEventProps;\n\nexport const Player = createComponent<PlayerProps>('Player', 'player', PLAYER_CUSTOMIZED_EVENTS, true);\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type { IRegionSpec } from '@visactor/vchart';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
export interface RegionProps extends BaseComponentProps, IRegionSpec {
|
|
2
4
|
}
|
|
3
|
-
export declare const Region: import("react").FC<
|
|
4
|
-
updateId?: number;
|
|
5
|
-
}>;
|
|
5
|
+
export declare const Region: import("react").FC<RegionProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Region.tsx"],"names":[],"mappings":";;;AACA,
|
|
1
|
+
{"version":3,"sources":["components/Region.tsx"],"names":[],"mappings":";;;AACA,mDAAsE;AAMzD,QAAA,MAAM,GAAG,IAAA,+BAAe,EAAc,QAAQ,EAAE,QAAQ,CAAC,CAAC","file":"Region.js","sourcesContent":["import type { IRegionSpec } from '@visactor/vchart';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport interface RegionProps extends BaseComponentProps, IRegionSpec {\n //\n}\n\nexport const Region = createComponent<RegionProps>('Region', 'region');\n"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ScrollBarEventProps } from '../eventsUtils';
|
|
2
|
+
import { BaseComponentProps } from './BaseComponent';
|
|
3
|
+
import type { IScrollBarSpec } from '@visactor/vchart';
|
|
4
|
+
export type ScrollBarProps = IScrollBarSpec & BaseComponentProps & ScrollBarEventProps;
|
|
5
|
+
export declare const ScrollBar: import("react").FC<ScrollBarProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.ScrollBar = void 0;
|
|
6
|
+
|
|
7
|
+
const eventsUtils_1 = require("../eventsUtils"), BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.ScrollBar = (0, BaseComponent_1.createComponent)("ScrollBar", "scrollBar", eventsUtils_1.SCROLLBAR_CUSTOMIZED_EVENTS);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/ScrollBar.tsx"],"names":[],"mappings":";;;AAAA,gDAAkF;AAClF,mDAAsE;AAKzD,QAAA,SAAS,GAAG,IAAA,+BAAe,EAAiB,WAAW,EAAE,WAAW,EAAE,yCAA2B,CAAC,CAAC","file":"ScrollBar.js","sourcesContent":["import { SCROLLBAR_CUSTOMIZED_EVENTS, ScrollBarEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IScrollBarSpec } from '@visactor/vchart';\n\nexport type ScrollBarProps = IScrollBarSpec & BaseComponentProps & ScrollBarEventProps;\n\nexport const ScrollBar = createComponent<ScrollBarProps>('ScrollBar', 'scrollBar', SCROLLBAR_CUSTOMIZED_EVENTS);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Title = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Title = (0, BaseComponent_1.createComponent)("Title", "title", null, !0);
|
|
10
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Title.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,KAAK,GAAG,IAAA,+BAAe,EAAa,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Title.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ITitleSpec } from '@visactor/vchart';\n\nexport type TitleProps = ITitleSpec & BaseComponentProps;\n\nexport const Title = createComponent<TitleProps>('Title', 'title', null, true);\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: !0
|
|
5
|
+
}), exports.Tooltip = void 0;
|
|
6
|
+
|
|
7
|
+
const BaseComponent_1 = require("./BaseComponent");
|
|
8
|
+
|
|
9
|
+
exports.Tooltip = (0, BaseComponent_1.createComponent)("Tooltip", "tooltip", null, !0);
|
|
10
|
+
//# sourceMappingURL=Tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["components/Tooltip.tsx"],"names":[],"mappings":";;;AAAA,mDAAsE;AAKzD,QAAA,OAAO,GAAG,IAAA,+BAAe,EAAe,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"]}
|