@visactor/openinula-vchart 1.10.2-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 +54 -0
- package/cjs/VChart.js +17 -0
- package/cjs/VChart.js.map +1 -0
- package/cjs/VChartSimple.js +10 -0
- package/cjs/VChartSimple.js.map +1 -0
- package/cjs/charts/AreaChart.js +19 -0
- package/cjs/charts/AreaChart.js.map +1 -0
- package/cjs/charts/BarChart.js +19 -0
- package/cjs/charts/BarChart.js.map +1 -0
- package/cjs/charts/BaseChart.d.ts +26 -0
- package/cjs/charts/BaseChart.js +125 -0
- package/cjs/charts/BaseChart.js.map +1 -0
- package/cjs/charts/BoxPlotChart.js +19 -0
- package/cjs/charts/BoxPlotChart.js.map +1 -0
- package/cjs/charts/CircularProgressChart.js +19 -0
- package/cjs/charts/CircularProgressChart.js.map +1 -0
- package/cjs/charts/CommonChart.js +19 -0
- package/cjs/charts/CommonChart.js.map +1 -0
- package/cjs/charts/FunnelChart.js +19 -0
- package/cjs/charts/FunnelChart.js.map +1 -0
- package/cjs/charts/HistogramChart.js +19 -0
- package/cjs/charts/HistogramChart.js.map +1 -0
- package/cjs/charts/LineChart.js +19 -0
- package/cjs/charts/LineChart.js.map +1 -0
- package/cjs/charts/LinearProgressChart.js +19 -0
- package/cjs/charts/LinearProgressChart.js.map +1 -0
- package/cjs/charts/MapChart.js +19 -0
- package/cjs/charts/MapChart.js.map +1 -0
- package/cjs/charts/PieChart.js +19 -0
- package/cjs/charts/PieChart.js.map +1 -0
- package/cjs/charts/RadarChart.js +19 -0
- package/cjs/charts/RadarChart.js.map +1 -0
- package/cjs/charts/RangeColumnChart.js +19 -0
- package/cjs/charts/RangeColumnChart.js.map +1 -0
- package/cjs/charts/RoseChart.js +18 -0
- package/cjs/charts/RoseChart.js.map +1 -0
- package/cjs/charts/ScatterChart.js +19 -0
- package/cjs/charts/ScatterChart.js.map +1 -0
- package/cjs/charts/SequenceChart.js +19 -0
- package/cjs/charts/SequenceChart.js.map +1 -0
- package/cjs/charts/WordCloudChart.js +19 -0
- package/cjs/charts/WordCloudChart.js.map +1 -0
- package/cjs/charts/index.d.ts +18 -0
- package/cjs/charts/index.js +28 -0
- package/cjs/charts/index.js.map +1 -0
- package/cjs/components/Axis.js +10 -0
- package/cjs/components/Axis.js.map +1 -0
- package/cjs/components/BaseComponent.js +55 -0
- package/cjs/components/BaseComponent.js.map +1 -0
- package/cjs/components/Brush.js +10 -0
- package/cjs/components/Brush.js.map +1 -0
- package/cjs/components/Crosshair.js +10 -0
- package/cjs/components/Crosshair.js.map +1 -0
- package/cjs/components/DataZoom.js +10 -0
- package/cjs/components/DataZoom.js.map +1 -0
- package/cjs/components/Indicator.js +10 -0
- package/cjs/components/Indicator.js.map +1 -0
- package/cjs/components/Legend.js +10 -0
- package/cjs/components/Legend.js.map +1 -0
- package/cjs/components/Mark.js +10 -0
- package/cjs/components/Mark.js.map +1 -0
- package/cjs/components/MarkArea.js +10 -0
- package/cjs/components/MarkArea.js.map +1 -0
- package/cjs/components/MarkLine.js +10 -0
- package/cjs/components/MarkLine.js.map +1 -0
- package/cjs/components/MarkPoint.js +10 -0
- package/cjs/components/MarkPoint.js.map +1 -0
- package/cjs/components/Player.js +10 -0
- package/cjs/components/Player.js.map +1 -0
- package/cjs/components/Region.js +9 -0
- package/cjs/components/Region.js.map +1 -0
- package/cjs/components/ScrollBar.js +10 -0
- package/cjs/components/ScrollBar.js.map +1 -0
- package/cjs/components/Title.js +10 -0
- package/cjs/components/Title.js.map +1 -0
- package/cjs/components/index.d.ts +15 -0
- package/cjs/components/index.js +28 -0
- package/cjs/components/index.js.map +1 -0
- package/cjs/components/tooltip/Tooltip.js +10 -0
- package/cjs/components/tooltip/Tooltip.js.map +1 -0
- package/cjs/components/tooltip/constant.d.ts +1 -0
- package/cjs/components/tooltip/constant.js +10 -0
- package/cjs/components/tooltip/constant.js.map +1 -0
- package/cjs/components/tooltip/index.d.ts +3 -0
- package/cjs/components/tooltip/index.js +22 -0
- package/cjs/components/tooltip/index.js.map +1 -0
- package/cjs/components/tooltip/interface.d.ts +14 -0
- package/cjs/components/tooltip/interface.js +6 -0
- package/cjs/components/tooltip/interface.js.map +1 -0
- package/cjs/components/tooltip/util.d.ts +4 -0
- package/cjs/components/tooltip/util.js +47 -0
- package/cjs/components/tooltip/util.js.map +1 -0
- package/cjs/constants.d.ts +1 -0
- package/cjs/constants.js +6 -0
- package/cjs/constants.js.map +1 -0
- package/cjs/containers/withContainer.d.ts +11 -0
- package/cjs/containers/withContainer.js +64 -0
- package/cjs/containers/withContainer.js.map +1 -0
- package/cjs/context/chart.d.ts +13 -0
- package/cjs/context/chart.js +25 -0
- package/cjs/context/chart.js.map +1 -0
- package/cjs/context/stage.d.ts +9 -0
- package/cjs/context/stage.js +24 -0
- package/cjs/context/stage.js.map +1 -0
- package/cjs/context/view.d.ts +9 -0
- package/cjs/context/view.js +24 -0
- package/cjs/context/view.js.map +1 -0
- package/cjs/eventsUtils.d.ts +256 -0
- package/cjs/eventsUtils.js +114 -0
- package/cjs/eventsUtils.js.map +1 -0
- package/cjs/index.d.ts +7 -0
- package/cjs/index.js +23 -0
- package/cjs/index.js.map +1 -0
- package/cjs/series/Area.js +10 -0
- package/cjs/series/Area.js.map +1 -0
- package/cjs/series/Bar.js +10 -0
- package/cjs/series/Bar.js.map +1 -0
- package/cjs/series/BaseSeries.js +51 -0
- package/cjs/series/BaseSeries.js.map +1 -0
- package/cjs/series/BoxPlot.js +10 -0
- package/cjs/series/BoxPlot.js.map +1 -0
- package/cjs/series/CircularProgress.js +10 -0
- package/cjs/series/CircularProgress.js.map +1 -0
- package/cjs/series/Dot.js +10 -0
- package/cjs/series/Dot.js.map +1 -0
- package/cjs/series/Funnel.js +10 -0
- package/cjs/series/Funnel.js.map +1 -0
- package/cjs/series/Line.js +10 -0
- package/cjs/series/Line.js.map +1 -0
- package/cjs/series/LinearProgress.js +10 -0
- package/cjs/series/LinearProgress.js.map +1 -0
- package/cjs/series/Link.js +9 -0
- package/cjs/series/Link.js.map +1 -0
- package/cjs/series/Map.js +10 -0
- package/cjs/series/Map.js.map +1 -0
- package/cjs/series/Pie.js +10 -0
- package/cjs/series/Pie.js.map +1 -0
- package/cjs/series/Radar.js +10 -0
- package/cjs/series/Radar.js.map +1 -0
- package/cjs/series/RangeColumn.js +10 -0
- package/cjs/series/RangeColumn.js.map +1 -0
- package/cjs/series/Rose.js +10 -0
- package/cjs/series/Rose.js.map +1 -0
- package/cjs/series/Scatter.js +10 -0
- package/cjs/series/Scatter.js.map +1 -0
- package/cjs/series/Series.js +10 -0
- package/cjs/series/Series.js.map +1 -0
- package/cjs/series/WordCloud.js +10 -0
- package/cjs/series/WordCloud.js.map +1 -0
- package/cjs/series/index.d.ts +17 -0
- package/cjs/series/index.js +29 -0
- package/cjs/series/index.js.map +1 -0
- package/cjs/util.js +57 -0
- package/cjs/util.js.map +1 -0
- package/esm/VChart.js +9 -0
- package/esm/VChart.js.map +1 -0
- package/esm/VChartSimple.js +4 -0
- package/esm/VChartSimple.js.map +1 -0
- package/esm/charts/AreaChart.js +9 -0
- package/esm/charts/AreaChart.js.map +1 -0
- package/esm/charts/BarChart.js +9 -0
- package/esm/charts/BarChart.js.map +1 -0
- package/esm/charts/BaseChart.d.ts +26 -0
- package/esm/charts/BaseChart.js +104 -0
- package/esm/charts/BaseChart.js.map +1 -0
- package/esm/charts/BoxPlotChart.js +9 -0
- package/esm/charts/BoxPlotChart.js.map +1 -0
- package/esm/charts/CircularProgressChart.js +9 -0
- package/esm/charts/CircularProgressChart.js.map +1 -0
- package/esm/charts/CommonChart.js +9 -0
- package/esm/charts/CommonChart.js.map +1 -0
- package/esm/charts/FunnelChart.js +9 -0
- package/esm/charts/FunnelChart.js.map +1 -0
- package/esm/charts/HistogramChart.js +9 -0
- package/esm/charts/HistogramChart.js.map +1 -0
- package/esm/charts/LineChart.js +9 -0
- package/esm/charts/LineChart.js.map +1 -0
- package/esm/charts/LinearProgressChart.js +9 -0
- package/esm/charts/LinearProgressChart.js.map +1 -0
- package/esm/charts/MapChart.js +9 -0
- package/esm/charts/MapChart.js.map +1 -0
- package/esm/charts/PieChart.js +9 -0
- package/esm/charts/PieChart.js.map +1 -0
- package/esm/charts/RadarChart.js +9 -0
- package/esm/charts/RadarChart.js.map +1 -0
- package/esm/charts/RangeColumnChart.js +9 -0
- package/esm/charts/RangeColumnChart.js.map +1 -0
- package/esm/charts/RoseChart.js +8 -0
- package/esm/charts/RoseChart.js.map +1 -0
- package/esm/charts/ScatterChart.js +9 -0
- package/esm/charts/ScatterChart.js.map +1 -0
- package/esm/charts/SequenceChart.js +9 -0
- package/esm/charts/SequenceChart.js.map +1 -0
- package/esm/charts/WordCloudChart.js +9 -0
- package/esm/charts/WordCloudChart.js.map +1 -0
- package/esm/charts/index.d.ts +18 -0
- package/esm/charts/index.js +32 -0
- package/esm/charts/index.js.map +1 -0
- package/esm/components/Axis.js +4 -0
- package/esm/components/Axis.js.map +1 -0
- package/esm/components/BaseComponent.js +26 -0
- package/esm/components/BaseComponent.js.map +1 -0
- package/esm/components/Brush.js +6 -0
- package/esm/components/Brush.js.map +1 -0
- package/esm/components/Crosshair.js +4 -0
- package/esm/components/Crosshair.js.map +1 -0
- package/esm/components/DataZoom.js +6 -0
- package/esm/components/DataZoom.js.map +1 -0
- package/esm/components/Indicator.js +4 -0
- package/esm/components/Indicator.js.map +1 -0
- package/esm/components/Legend.js +6 -0
- package/esm/components/Legend.js.map +1 -0
- package/esm/components/Mark.js +4 -0
- package/esm/components/Mark.js.map +1 -0
- package/esm/components/MarkArea.js +4 -0
- package/esm/components/MarkArea.js.map +1 -0
- package/esm/components/MarkLine.js +4 -0
- package/esm/components/MarkLine.js.map +1 -0
- package/esm/components/MarkPoint.js +4 -0
- package/esm/components/MarkPoint.js.map +1 -0
- package/esm/components/Player.js +6 -0
- package/esm/components/Player.js.map +1 -0
- package/esm/components/Region.js +3 -0
- package/esm/components/Region.js.map +1 -0
- package/esm/components/ScrollBar.js +6 -0
- package/esm/components/ScrollBar.js.map +1 -0
- package/esm/components/Title.js +4 -0
- package/esm/components/Title.js.map +1 -0
- package/esm/components/index.d.ts +15 -0
- package/esm/components/index.js +30 -0
- package/esm/components/index.js.map +1 -0
- package/esm/components/tooltip/Tooltip.js +4 -0
- package/esm/components/tooltip/Tooltip.js.map +1 -0
- package/esm/components/tooltip/constant.d.ts +1 -0
- package/esm/components/tooltip/constant.js +4 -0
- package/esm/components/tooltip/constant.js.map +1 -0
- package/esm/components/tooltip/index.d.ts +3 -0
- package/esm/components/tooltip/index.js +6 -0
- package/esm/components/tooltip/index.js.map +1 -0
- package/esm/components/tooltip/interface.d.ts +14 -0
- package/esm/components/tooltip/interface.js +2 -0
- package/esm/components/tooltip/interface.js.map +1 -0
- package/esm/components/tooltip/util.d.ts +4 -0
- package/esm/components/tooltip/util.js +40 -0
- package/esm/components/tooltip/util.js.map +1 -0
- package/esm/constants.d.ts +1 -0
- package/esm/constants.js +2 -0
- package/esm/constants.js.map +1 -0
- package/esm/containers/withContainer.d.ts +11 -0
- package/esm/containers/withContainer.js +33 -0
- package/esm/containers/withContainer.js.map +1 -0
- package/esm/context/chart.d.ts +13 -0
- package/esm/context/chart.js +16 -0
- package/esm/context/chart.js.map +1 -0
- package/esm/context/stage.d.ts +9 -0
- package/esm/context/stage.js +16 -0
- package/esm/context/stage.js.map +1 -0
- package/esm/context/view.d.ts +9 -0
- package/esm/context/view.js +16 -0
- package/esm/context/view.js.map +1 -0
- package/esm/eventsUtils.d.ts +256 -0
- package/esm/eventsUtils.js +126 -0
- package/esm/eventsUtils.js.map +1 -0
- package/esm/index.d.ts +7 -0
- package/esm/index.js +12 -0
- package/esm/index.js.map +1 -0
- package/esm/series/Area.js +4 -0
- package/esm/series/Area.js.map +1 -0
- package/esm/series/Bar.js +4 -0
- package/esm/series/Bar.js.map +1 -0
- package/esm/series/BaseSeries.js +45 -0
- package/esm/series/BaseSeries.js.map +1 -0
- package/esm/series/BoxPlot.js +4 -0
- package/esm/series/BoxPlot.js.map +1 -0
- package/esm/series/CircularProgress.js +4 -0
- package/esm/series/CircularProgress.js.map +1 -0
- package/esm/series/Dot.js +4 -0
- package/esm/series/Dot.js.map +1 -0
- package/esm/series/Funnel.js +4 -0
- package/esm/series/Funnel.js.map +1 -0
- package/esm/series/Line.js +4 -0
- package/esm/series/Line.js.map +1 -0
- package/esm/series/LinearProgress.js +4 -0
- package/esm/series/LinearProgress.js.map +1 -0
- package/esm/series/Link.js +3 -0
- package/esm/series/Link.js.map +1 -0
- package/esm/series/Map.js +4 -0
- package/esm/series/Map.js.map +1 -0
- package/esm/series/Pie.js +4 -0
- package/esm/series/Pie.js.map +1 -0
- package/esm/series/Radar.js +4 -0
- package/esm/series/Radar.js.map +1 -0
- package/esm/series/RangeColumn.js +4 -0
- package/esm/series/RangeColumn.js.map +1 -0
- package/esm/series/Rose.js +4 -0
- package/esm/series/Rose.js.map +1 -0
- package/esm/series/Scatter.js +4 -0
- package/esm/series/Scatter.js.map +1 -0
- package/esm/series/Series.js +4 -0
- package/esm/series/Series.js.map +1 -0
- package/esm/series/WordCloud.js +4 -0
- package/esm/series/WordCloud.js.map +1 -0
- package/esm/series/index.d.ts +17 -0
- package/esm/series/index.js +34 -0
- package/esm/series/index.js.map +1 -0
- package/esm/util.js +36 -0
- package/esm/util.js.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/MarkPoint.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,CAAC,CAAC","file":"MarkPoint.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IMarkPointSpec } from '@visactor/vchart';\n\nexport type MarkPointProps = IMarkPointSpec & BaseComponentProps;\n\nexport const MarkPoint = createComponent<MarkPointProps>('MarkPoint', 'markPoint');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Region.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAMtE,MAAM,CAAC,MAAM,MAAM,GAAG,eAAe,CAAc,QAAQ,EAAE,QAAQ,CAAC,CAAC","file":"Region.js","sourcesContent":["import type { IRegionSpec } from '@visactor/vchart';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\n\nexport interface RegionProps extends BaseComponentProps, IRegionSpec {\n //\n}\n\nexport const Region = createComponent<RegionProps>('Region', 'region');\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/ScrollBar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAuB,MAAM,gBAAgB,CAAC;AAClF,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,SAAS,GAAG,eAAe,CAAiB,WAAW,EAAE,WAAW,EAAE,2BAA2B,CAAC,CAAC","file":"ScrollBar.js","sourcesContent":["import { SCROLLBAR_CUSTOMIZED_EVENTS, ScrollBarEventProps } from '../eventsUtils';\nimport { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { IScrollBarSpec } from '@visactor/vchart';\n\nexport type ScrollBarProps = IScrollBarSpec & BaseComponentProps & ScrollBarEventProps;\n\nexport const ScrollBar = createComponent<ScrollBarProps>('ScrollBar', 'scrollBar', SCROLLBAR_CUSTOMIZED_EVENTS);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Title.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAKtE,MAAM,CAAC,MAAM,KAAK,GAAG,eAAe,CAAa,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Title.js","sourcesContent":["import { BaseComponentProps, createComponent } from './BaseComponent';\nimport type { ITitleSpec } from '@visactor/vchart';\n\nexport type TitleProps = ITitleSpec & BaseComponentProps;\n\nexport const Title = createComponent<TitleProps>('Title', 'title', null, true);\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from './Axis';
|
|
2
|
+
export * from './Mark';
|
|
3
|
+
export * from './Region';
|
|
4
|
+
export * from './Legend';
|
|
5
|
+
export * from './Brush';
|
|
6
|
+
export * from './Crosshair';
|
|
7
|
+
export * from './DataZoom';
|
|
8
|
+
export * from './MarkLine';
|
|
9
|
+
export * from './MarkArea';
|
|
10
|
+
export * from './MarkPoint';
|
|
11
|
+
export * from './ScrollBar';
|
|
12
|
+
export * from './tooltip';
|
|
13
|
+
export * from './Player';
|
|
14
|
+
export * from './Indicator';
|
|
15
|
+
export * from './Title';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export * from "./Axis";
|
|
2
|
+
|
|
3
|
+
export * from "./Mark";
|
|
4
|
+
|
|
5
|
+
export * from "./Region";
|
|
6
|
+
|
|
7
|
+
export * from "./Legend";
|
|
8
|
+
|
|
9
|
+
export * from "./Brush";
|
|
10
|
+
|
|
11
|
+
export * from "./Crosshair";
|
|
12
|
+
|
|
13
|
+
export * from "./DataZoom";
|
|
14
|
+
|
|
15
|
+
export * from "./MarkLine";
|
|
16
|
+
|
|
17
|
+
export * from "./MarkArea";
|
|
18
|
+
|
|
19
|
+
export * from "./MarkPoint";
|
|
20
|
+
|
|
21
|
+
export * from "./ScrollBar";
|
|
22
|
+
|
|
23
|
+
export * from "./tooltip";
|
|
24
|
+
|
|
25
|
+
export * from "./Player";
|
|
26
|
+
|
|
27
|
+
export * from "./Indicator";
|
|
28
|
+
|
|
29
|
+
export * from "./Title";
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/Tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGnD,MAAM,CAAC,MAAM,OAAO,GAAG,eAAe,CAAe,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC","file":"Tooltip.js","sourcesContent":["import { createComponent } from '../BaseComponent';\nimport { TooltipProps } from './interface';\n\nexport const Tooltip = createComponent<TooltipProps>('Tooltip', 'tooltip', null, true);\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const REACT_TOOLTIP_ClASS_NAME: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/constant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,MAAM,gBAAgB,CAAC","file":"constant.js","sourcesContent":["import { PREFIX } from '@visactor/vchart';\n\nexport const REACT_TOOLTIP_ClASS_NAME = `${PREFIX}_REACT_TOOLTIP`;\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC","file":"index.js","sourcesContent":["export * from './Tooltip';\nexport * from './interface';\nexport * from './constant';\n"]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { PropsWithChildren, ReactNode } from 'openinula';
|
|
2
|
+
import { BaseComponentProps } from '../BaseComponent';
|
|
3
|
+
import type { ITooltipSpec, ITooltipActual, TooltipHandlerParams } from '@visactor/vchart';
|
|
4
|
+
export type TooltipProps = PropsWithChildren<ITooltipSpec & IReactTooltipProps & BaseComponentProps>;
|
|
5
|
+
export interface ITooltipRenderProps {
|
|
6
|
+
tooltipElement: HTMLElement;
|
|
7
|
+
actualTooltip: ITooltipActual;
|
|
8
|
+
params: TooltipHandlerParams;
|
|
9
|
+
}
|
|
10
|
+
export type TooltipRender = (tooltipElement: HTMLElement, actualTooltip: ITooltipActual, params: TooltipHandlerParams) => ReactNode;
|
|
11
|
+
export interface IReactTooltipProps {
|
|
12
|
+
tooltipRender?: TooltipRender;
|
|
13
|
+
reserveDefaultTooltip?: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import { PropsWithChildren, ReactNode } from 'openinula';\nimport { BaseComponentProps } from '../BaseComponent';\nimport type { ITooltipSpec, ITooltipActual, TooltipHandlerParams } from '@visactor/vchart';\n\nexport type TooltipProps = PropsWithChildren<ITooltipSpec & IReactTooltipProps & BaseComponentProps>;\n\nexport interface ITooltipRenderProps {\n tooltipElement: HTMLElement;\n actualTooltip: ITooltipActual;\n params: TooltipHandlerParams;\n}\n\nexport type TooltipRender = (\n tooltipElement: HTMLElement,\n actualTooltip: ITooltipActual,\n params: TooltipHandlerParams\n) => ReactNode;\n\nexport interface IReactTooltipProps {\n /**\n * tooltip 自定义渲染器\n * @since 1.10.0\n */\n tooltipRender?: TooltipRender;\n /**\n * 在应用 `tooltipRender` 配置时,是否保留默认 tooltip dom 元素的显示\n * @since 1.10.0\n */\n reserveDefaultTooltip?: boolean;\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from 'openinula';
|
|
2
|
+
import type { BaseChartProps } from '../../charts/BaseChart';
|
|
3
|
+
import { ITooltipSpec } from '@visactor/vchart';
|
|
4
|
+
export declare const initCustomTooltip: (setTooltipNode: React.Dispatch<React.SetStateAction<React.ReactNode>>, props: BaseChartProps, spec?: PropsWithChildren<ITooltipSpec & import("./interface").IReactTooltipProps & import("../BaseComponent").BaseComponentProps>) => ITooltipSpec;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import React from "openinula";
|
|
2
|
+
|
|
3
|
+
import { isObject } from "@visactor/vutils";
|
|
4
|
+
|
|
5
|
+
import { REACT_TOOLTIP_ClASS_NAME } from "./constant";
|
|
6
|
+
|
|
7
|
+
import { createPortal } from "openinula";
|
|
8
|
+
|
|
9
|
+
export const initCustomTooltip = (setTooltipNode, props, spec) => {
|
|
10
|
+
let render;
|
|
11
|
+
if ((null == spec ? void 0 : spec.tooltipRender) ? (render = spec.tooltipRender,
|
|
12
|
+
delete spec.tooltipRender) : (null == spec ? void 0 : spec.children) ? render = (tooltipElement, actualTooltip, params) => React.Children.map(spec.children, (child => isObject(child) ? React.cloneElement(child, {
|
|
13
|
+
tooltipElement: tooltipElement,
|
|
14
|
+
actualTooltip: actualTooltip,
|
|
15
|
+
params: params
|
|
16
|
+
}) : child)) : props.tooltipRender && (render = props.tooltipRender), render) {
|
|
17
|
+
let reserve;
|
|
18
|
+
return (null == spec ? void 0 : spec.reserveDefaultTooltip) ? (reserve = spec.reserveDefaultTooltip,
|
|
19
|
+
delete spec.reserveDefaultTooltip) : reserve = props.reserveDefaultTooltip, Object.assign(Object.assign({}, spec), {
|
|
20
|
+
updateElement: (el, actualTooltip, params) => {
|
|
21
|
+
const {changePositionOnly: changePositionOnly} = params;
|
|
22
|
+
if (!changePositionOnly) {
|
|
23
|
+
if (!reserve) {
|
|
24
|
+
el.style.width = "auto", el.style.height = "auto", el.style.minHeight = "auto",
|
|
25
|
+
el.style.padding = "0px";
|
|
26
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
27
|
+
const childNode = el.children[i];
|
|
28
|
+
childNode.className !== REACT_TOOLTIP_ClASS_NAME && "none" !== childNode.style.display && (childNode.style.display = "none");
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
setTooltipNode(createPortal(React.createElement("div", {
|
|
32
|
+
className: REACT_TOOLTIP_ClASS_NAME
|
|
33
|
+
}, render(el, actualTooltip, params)), el));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
return spec;
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/tooltip/util.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,WAAW,CAAC;AAG9B,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAE5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGzC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAC/B,cAAqE,EACrE,KAAqB,EACrB,IAAmB,EACnB,EAAE;IACF,IAAI,MAAM,GAAkB,SAAS,CAAC;IACtC,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,aAAa,EAAE;QACvB,MAAM,GAAG,IAAI,CAAC,aAAa,CAAC;QAC5B,OAAO,IAAI,CAAC,aAAa,CAAC;KAC3B;SAAM,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,QAAQ,EAAE;QACzB,MAAM,GAAG,CAAC,cAAc,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,CACjD,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CACxC,QAAQ,CAAC,KAAK,CAAC;YACb,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,KAAkE,EAAE;gBACrF,cAAc;gBACd,aAAa;gBACb,MAAM;aACP,CAAC;YACJ,CAAC,CAAC,KAAK,CACV,CAAC;KACL;SAAM,IAAI,KAAK,CAAC,aAAa,EAAE;QAC9B,MAAM,GAAG,KAAK,CAAC,aAAa,CAAC;KAC9B;IAED,IAAI,MAAM,EAAE;QACV,IAAI,OAAO,GAAY,SAAS,CAAC;QACjC,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,qBAAqB,EAAE;YAC/B,OAAO,GAAG,IAAI,CAAC,qBAAqB,CAAC;YACrC,OAAO,IAAI,CAAC,qBAAqB,CAAC;SACnC;aAAM;YACL,OAAO,GAAG,KAAK,CAAC,qBAAqB,CAAC;SACvC;QACD,OAAO,gCACF,IAAI,KACP,aAAa,EAAE,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE;gBAC3C,MAAM,EAAE,kBAAkB,EAAE,GAAG,MAAM,CAAC;gBACtC,IAAI,kBAAkB,EAAE;oBACtB,OAAO;iBACR;gBACD,IAAI,CAAC,OAAO,EAAE;oBACZ,EAAE,CAAC,KAAK,CAAC,KAAK,GAAG,MAAM,CAAC;oBACxB,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC;oBACzB,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC;oBAC5B,EAAE,CAAC,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC;oBACzB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;wBAC3C,MAAM,SAAS,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAgB,CAAC;wBAChD,IAAI,SAAS,CAAC,SAAS,KAAK,wBAAwB,IAAI,SAAS,CAAC,KAAK,CAAC,OAAO,KAAK,MAAM,EAAE;4BAC1F,SAAS,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;yBAClC;qBACF;iBACF;gBACD,cAAc,CACZ,YAAY,CAAC,6BAAK,SAAS,EAAE,wBAAwB,IAAG,MAAM,CAAC,EAAE,EAAE,aAAa,EAAE,MAAM,CAAC,CAAO,EAAE,EAAE,CAAC,CACtG,CAAC;YACJ,CAAC,GACc,CAAC;KACnB;IAED,OAAO,IAAoB,CAAC;AAC9B,CAAC,CAAC","file":"util.js","sourcesContent":["import React from 'openinula';\nimport type { BaseChartProps } from '../../charts/BaseChart';\nimport { TooltipProps, TooltipRender } from './interface';\nimport { isObject } from '@visactor/vutils';\nimport { ITooltipSpec } from '@visactor/vchart';\nimport { REACT_TOOLTIP_ClASS_NAME } from './constant';\nimport { createPortal } from 'openinula';\n\n/** tooltip 自定义插槽 */\nexport const initCustomTooltip = (\n setTooltipNode: React.Dispatch<React.SetStateAction<React.ReactNode>>,\n props: BaseChartProps,\n spec?: TooltipProps\n) => {\n let render: TooltipRender = undefined;\n if (spec?.tooltipRender) {\n render = spec.tooltipRender;\n delete spec.tooltipRender;\n } else if (spec?.children) {\n render = (tooltipElement, actualTooltip, params) =>\n React.Children.map(spec.children, child =>\n isObject(child)\n ? React.cloneElement(child as React.ReactElement<any, React.JSXElementConstructor<any>>, {\n tooltipElement,\n actualTooltip,\n params\n })\n : child\n );\n } else if (props.tooltipRender) {\n render = props.tooltipRender;\n }\n\n if (render) {\n let reserve: boolean = undefined;\n if (spec?.reserveDefaultTooltip) {\n reserve = spec.reserveDefaultTooltip;\n delete spec.reserveDefaultTooltip;\n } else {\n reserve = props.reserveDefaultTooltip;\n }\n return {\n ...spec,\n updateElement: (el, actualTooltip, params) => {\n const { changePositionOnly } = params;\n if (changePositionOnly) {\n return;\n }\n if (!reserve) {\n el.style.width = 'auto';\n el.style.height = 'auto';\n el.style.minHeight = 'auto';\n el.style.padding = '0px';\n for (let i = 0; i < el.children.length; i++) {\n const childNode = el.children[i] as HTMLElement;\n if (childNode.className !== REACT_TOOLTIP_ClASS_NAME && childNode.style.display !== 'none') {\n childNode.style.display = 'none';\n }\n }\n }\n setTooltipNode(\n createPortal(<div className={REACT_TOOLTIP_ClASS_NAME}>{render(el, actualTooltip, params)}</div>, el)\n );\n }\n } as ITooltipSpec;\n }\n\n return spec as ITooltipSpec;\n};\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const REACT_PRIVATE_PROPS: string[];
|
package/esm/constants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
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"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ContainerProps {
|
|
2
|
+
style?: React.CSSProperties;
|
|
3
|
+
className?: string;
|
|
4
|
+
width?: number | string;
|
|
5
|
+
height?: number | string;
|
|
6
|
+
}
|
|
7
|
+
export default function withContainer<Props extends ContainerProps, CompProps>(Comp: any, name?: string, getProps?: (props: any) => CompProps): import("openinula").ExoticComponent<import("openinula").PropsOmitRef<CompProps & Props>> & {
|
|
8
|
+
key?: import("openinula").Key;
|
|
9
|
+
} & {
|
|
10
|
+
ref?: import("openinula").Ref<any>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
var __rest = this && this.__rest || function(s, e) {
|
|
2
|
+
var t = {};
|
|
3
|
+
for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0 && (t[p] = s[p]);
|
|
4
|
+
if (null != s && "function" == typeof Object.getOwnPropertySymbols) {
|
|
5
|
+
var i = 0;
|
|
6
|
+
for (p = Object.getOwnPropertySymbols(s); i < p.length; i++) e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]) && (t[p[i]] = s[p[i]]);
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
import React, { useRef, useState, useLayoutEffect } from "openinula";
|
|
12
|
+
|
|
13
|
+
export default function withContainer(Comp, name = "ChartContainer", getProps) {
|
|
14
|
+
const Cls = React.forwardRef(((props, ref) => {
|
|
15
|
+
const container = useRef(), [inited, setInited] = useState(!1), {className: className, style: style, width: width} = props, options = __rest(props, [ "className", "style", "width" ]);
|
|
16
|
+
return useLayoutEffect((() => {
|
|
17
|
+
setInited(!0);
|
|
18
|
+
}), []), React.createElement("div", {
|
|
19
|
+
ref: container,
|
|
20
|
+
className: className,
|
|
21
|
+
style: Object.assign({
|
|
22
|
+
position: "relative",
|
|
23
|
+
height: props.height || "100%",
|
|
24
|
+
width: props.width || "100%"
|
|
25
|
+
}, style)
|
|
26
|
+
}, inited ? React.createElement(Comp, Object.assign({
|
|
27
|
+
ref: ref,
|
|
28
|
+
container: container.current
|
|
29
|
+
}, getProps ? getProps(options) : options)) : React.createElement(React.Fragment, null));
|
|
30
|
+
}));
|
|
31
|
+
return Cls.displayName = name || Comp.name, Cls;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=withContainer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/containers/withContainer.tsx"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AASrE,MAAM,CAAC,OAAO,UAAU,aAAa,CACnC,IAAS,EACT,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 'openinula';\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: any,\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"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'openinula';
|
|
2
|
+
import type { IVChart } from '@visactor/vchart';
|
|
3
|
+
export interface ChartContextType {
|
|
4
|
+
chart?: IVChart;
|
|
5
|
+
isChildrenUpdated?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const ChartContext: import("openinula").Context<ChartContextType>;
|
|
8
|
+
export declare function withChartInstance<T>(Component: typeof React.Component): import("openinula").ExoticComponent<import("openinula").PropsOmitRef<T>> & {
|
|
9
|
+
key?: import("openinula").Key;
|
|
10
|
+
} & {
|
|
11
|
+
ref?: import("openinula").Ref<any>;
|
|
12
|
+
};
|
|
13
|
+
export default ChartContext;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "openinula";
|
|
2
|
+
|
|
3
|
+
const ChartContext = React.createContext(null);
|
|
4
|
+
|
|
5
|
+
ChartContext.displayName = "ChartContext";
|
|
6
|
+
|
|
7
|
+
export function withChartInstance(Component) {
|
|
8
|
+
const Com = React.forwardRef(((props, ref) => React.createElement(ChartContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({
|
|
9
|
+
ref: ref,
|
|
10
|
+
chart: ctx.chart
|
|
11
|
+
}, props))))));
|
|
12
|
+
return Com.displayName = Component.name, Com;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default ChartContext;
|
|
16
|
+
//# sourceMappingURL=chart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context/chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,WAAW,CAAC;AAQ9B,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 'openinula';\nimport type { IVChart } from '@visactor/vchart';\n\nexport interface ChartContextType {\n chart?: IVChart;\n isChildrenUpdated?: boolean;\n}\n\nconst ChartContext = React.createContext<ChartContextType>(null);\nChartContext.displayName = 'ChartContext';\n\nexport function withChartInstance<T>(Component: typeof React.Component) {\n const Com = React.forwardRef<any, T>((props: T, ref) => {\n return (\n <ChartContext.Consumer>\n {(ctx: ChartContextType) => <Component ref={ref} chart={ctx.chart} {...props} />}\n </ChartContext.Consumer>\n );\n });\n Com.displayName = Component.name;\n return Com;\n}\n\nexport default ChartContext;\n"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'openinula';
|
|
2
|
+
import type { IStage } from '@visactor/vrender-core';
|
|
3
|
+
declare const StageContext: import("openinula").Context<IStage>;
|
|
4
|
+
export declare function withStage<T>(Component: typeof React.Component): import("openinula").ExoticComponent<import("openinula").PropsOmitRef<T>> & {
|
|
5
|
+
key?: import("openinula").Key;
|
|
6
|
+
} & {
|
|
7
|
+
ref?: import("openinula").Ref<any>;
|
|
8
|
+
};
|
|
9
|
+
export default StageContext;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "openinula";
|
|
2
|
+
|
|
3
|
+
const StageContext = React.createContext(null);
|
|
4
|
+
|
|
5
|
+
StageContext.displayName = "StageContext";
|
|
6
|
+
|
|
7
|
+
export function withStage(Component) {
|
|
8
|
+
const Com = React.forwardRef(((props, ref) => React.createElement(StageContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({
|
|
9
|
+
ref: ref,
|
|
10
|
+
stage: ctx
|
|
11
|
+
}, props))))));
|
|
12
|
+
return Com.displayName = Component.name, Com;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default StageContext;
|
|
16
|
+
//# sourceMappingURL=stage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context/stage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,WAAW,CAAC;AAG9B,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 'openinula';\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"]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'openinula';
|
|
2
|
+
import type { IView } from '@visactor/vgrammar-core';
|
|
3
|
+
declare const ViewContext: import("openinula").Context<IView>;
|
|
4
|
+
export declare function withView<T>(Component: typeof React.Component): import("openinula").ExoticComponent<import("openinula").PropsOmitRef<T>> & {
|
|
5
|
+
key?: import("openinula").Key;
|
|
6
|
+
} & {
|
|
7
|
+
ref?: import("openinula").Ref<any>;
|
|
8
|
+
};
|
|
9
|
+
export default ViewContext;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "openinula";
|
|
2
|
+
|
|
3
|
+
const ViewContext = React.createContext(null);
|
|
4
|
+
|
|
5
|
+
ViewContext.displayName = "ViewContext";
|
|
6
|
+
|
|
7
|
+
export function withView(Component) {
|
|
8
|
+
const Com = React.forwardRef(((props, ref) => React.createElement(ViewContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({
|
|
9
|
+
ref: ref,
|
|
10
|
+
view: ctx
|
|
11
|
+
}, props))))));
|
|
12
|
+
return Com.displayName = Component.name, Com;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default ViewContext;
|
|
16
|
+
//# sourceMappingURL=view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/context/view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,WAAW,CAAC;AAG9B,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 'openinula';\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"]}
|