@visactor/openinula-vchart 1.13.5-alpha.17 → 1.13.5-alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/cjs/charts/AreaChart.d.ts +8 -0
  2. package/cjs/charts/BarChart.d.ts +8 -0
  3. package/cjs/charts/BaseChart.d.ts +3 -6
  4. package/cjs/charts/BoxPlotChart.d.ts +8 -0
  5. package/cjs/charts/CircularProgressChart.d.ts +8 -0
  6. package/cjs/charts/CommonChart.d.ts +8 -0
  7. package/cjs/charts/FunnelChart.d.ts +8 -0
  8. package/cjs/charts/HistogramChart.d.ts +8 -0
  9. package/cjs/charts/LineChart.d.ts +8 -0
  10. package/cjs/charts/LinearProgressChart.d.ts +8 -0
  11. package/cjs/charts/MapChart.d.ts +8 -0
  12. package/cjs/charts/PieChart.d.ts +8 -0
  13. package/cjs/charts/RadarChart.d.ts +8 -0
  14. package/cjs/charts/RangeColumnChart.d.ts +8 -0
  15. package/cjs/charts/RoseChart.d.ts +8 -0
  16. package/cjs/charts/ScatterChart.d.ts +8 -0
  17. package/cjs/charts/SequenceChart.d.ts +8 -0
  18. package/cjs/charts/WordCloudChart.d.ts +8 -0
  19. package/cjs/components/BaseComponent.d.ts +10 -0
  20. package/cjs/containers/withContainer.d.ts +3 -4
  21. package/cjs/context/chart.d.ts +3 -5
  22. package/cjs/context/stage.d.ts +3 -5
  23. package/cjs/context/view.d.ts +3 -5
  24. package/cjs/series/BaseSeries.d.ts +9 -0
  25. package/cjs/util.d.ts +6 -0
  26. package/esm/charts/AreaChart.d.ts +8 -0
  27. package/esm/charts/BarChart.d.ts +8 -0
  28. package/esm/charts/BaseChart.d.ts +3 -6
  29. package/esm/charts/BoxPlotChart.d.ts +8 -0
  30. package/esm/charts/CircularProgressChart.d.ts +8 -0
  31. package/esm/charts/CommonChart.d.ts +8 -0
  32. package/esm/charts/FunnelChart.d.ts +8 -0
  33. package/esm/charts/HistogramChart.d.ts +8 -0
  34. package/esm/charts/LineChart.d.ts +8 -0
  35. package/esm/charts/LinearProgressChart.d.ts +8 -0
  36. package/esm/charts/MapChart.d.ts +8 -0
  37. package/esm/charts/PieChart.d.ts +8 -0
  38. package/esm/charts/RadarChart.d.ts +8 -0
  39. package/esm/charts/RangeColumnChart.d.ts +8 -0
  40. package/esm/charts/RoseChart.d.ts +8 -0
  41. package/esm/charts/ScatterChart.d.ts +8 -0
  42. package/esm/charts/SequenceChart.d.ts +8 -0
  43. package/esm/charts/WordCloudChart.d.ts +8 -0
  44. package/esm/components/BaseComponent.d.ts +10 -0
  45. package/esm/containers/withContainer.d.ts +3 -4
  46. package/esm/context/chart.d.ts +3 -5
  47. package/esm/context/stage.d.ts +3 -5
  48. package/esm/context/view.d.ts +3 -5
  49. package/esm/series/BaseSeries.d.ts +9 -0
  50. package/esm/util.d.ts +6 -0
  51. package/package.json +7 -7
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IAreaChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface AreaChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IAreaChartSpec, 'type'> {
5
+ }
6
+ export declare const AreaChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IBarChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface BarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBarChartSpec, 'type'> {
5
+ }
6
+ export declare const BarChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -1,4 +1,5 @@
1
1
  import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor } from '@visactor/vchart';
2
+ import React from 'openinula';
2
3
  import { ContainerProps } from '../containers/withContainer';
3
4
  import { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
4
5
  import { IReactTooltipProps } from '../components/tooltip/interface';
@@ -17,10 +18,6 @@ export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBar
17
18
  onError?: (err: Error) => void;
18
19
  useSyncRender?: boolean;
19
20
  }
20
- type Props = React.PropsWithChildren<BaseChartProps>;
21
- export declare const createChart: <T extends Props>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T, defaultProps?: Partial<T>) => T) => import("openinula").ExoticComponent<import("openinula").PropsOmitRef<T & ContainerProps>> & {
22
- key?: import("openinula").Key;
23
- } & {
24
- ref?: import("openinula").Ref<any>;
21
+ export declare const createChart: <T extends React.PropsWithChildren<BaseChartProps>>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T, defaultProps?: Partial<T>) => T) => React.ExoticComponent<React.PropsOmitRef<T & ContainerProps>> & React.Attributes & {
22
+ ref?: React.Ref<any>;
25
23
  };
26
- export {};
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IBoxPlotChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface BoxPlotChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBoxPlotChartSpec, 'type'> {
5
+ }
6
+ export declare const BoxPlotChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ICircularProgressChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface CircularProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICircularProgressChartSpec, 'type'> {
5
+ }
6
+ export declare const CircularProgressChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ICommonChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface CommonChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICommonChartSpec, 'type'> {
5
+ }
6
+ export declare const CommonChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IFunnelChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface FunnelChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IFunnelChartSpec, 'type'> {
5
+ }
6
+ export declare const FunnelChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IHistogramChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface HistogramChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IHistogramChartSpec, 'type'> {
5
+ }
6
+ export declare const HistogramChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { ILineChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface LineChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILineChartSpec, 'type'> {
5
+ }
6
+ export declare const LineChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ILinearProgressChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface LinearProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILinearProgressChartSpec, 'type'> {
5
+ }
6
+ export declare const LinearProgressChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IMapChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface MapChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IMapChartSpec, 'type'> {
5
+ }
6
+ export declare const MapChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IPieChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface PieChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IPieChartSpec, 'type'> {
5
+ }
6
+ export declare const PieChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRadarChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RadarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRadarChartSpec, 'type'> {
5
+ }
6
+ export declare const RadarChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRangeColumnChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RangeColumnChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRangeColumnChartSpec, 'type'> {
5
+ }
6
+ export declare const RangeColumnChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRoseChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RoseChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRoseChartSpec, 'type'> {
5
+ }
6
+ export declare const RoseChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IScatterChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface ScatterChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IScatterChartSpec, 'type'> {
5
+ }
6
+ export declare const ScatterChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { ISequenceChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface SequenceChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ISequenceChartSpec, 'type'> {
5
+ }
6
+ export declare const SequenceChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IWordCloudChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface WordCloudChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IWordCloudChartSpec, 'type'> {
5
+ }
6
+ export declare const WordCloudChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'openinula';
2
+ export interface BaseComponentProps {
3
+ id?: string | number;
4
+ }
5
+ type ComponentProps = BaseComponentProps & {
6
+ updateId?: number;
7
+ componentId?: number;
8
+ };
9
+ export declare const createComponent: <T extends ComponentProps>(componentName: string, specName: string, supportedEvents?: Record<string, string> | null, isSingle?: boolean) => React.FC<T>;
10
+ export {};
@@ -1,11 +1,10 @@
1
+ import React from 'openinula';
1
2
  export interface ContainerProps {
2
3
  style?: React.CSSProperties;
3
4
  className?: string;
4
5
  width?: number | string;
5
6
  height?: number | string;
6
7
  }
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>;
8
+ export default function withContainer<Props extends ContainerProps, CompProps>(Comp: any, name?: string, getProps?: (props: any) => CompProps): React.ExoticComponent<React.PropsOmitRef<CompProps & Props>> & React.Attributes & {
9
+ ref?: React.Ref<any>;
11
10
  };
@@ -4,10 +4,8 @@ export interface ChartContextType {
4
4
  chart?: IVChart;
5
5
  isChildrenUpdated?: boolean;
6
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>;
7
+ declare const ChartContext: React.Context<ChartContextType>;
8
+ export declare function withChartInstance<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
9
+ ref?: React.Ref<any>;
12
10
  };
13
11
  export default ChartContext;
@@ -1,9 +1,7 @@
1
1
  import React from 'openinula';
2
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>;
3
+ declare const StageContext: React.Context<IStage>;
4
+ export declare function withStage<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
5
+ ref?: React.Ref<any>;
8
6
  };
9
7
  export default StageContext;
@@ -1,9 +1,7 @@
1
1
  import React from 'openinula';
2
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>;
3
+ declare const ViewContext: React.Context<IView>;
4
+ export declare function withView<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
5
+ ref?: React.Ref<any>;
8
6
  };
9
7
  export default ViewContext;
@@ -0,0 +1,9 @@
1
+ import React from 'openinula';
2
+ import { EventsProps } from '../eventsUtils';
3
+ export interface BaseSeriesProps extends EventsProps {
4
+ id?: string | number;
5
+ }
6
+ export declare const createSeries: <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => React.FC<T & {
7
+ updateId?: number;
8
+ componentId?: string;
9
+ }>;
package/cjs/util.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export declare const uid: (prefix?: string) => string;
2
+ export declare const getDisplayName: (Comp: any) => any;
3
+ export declare const typeOfComponent: (component: any, customTypeKey?: string) => string;
4
+ export declare const toArray: <T = ReactNode, TC = ReactNode>(children: T) => TC[];
5
+ export declare const findAllByType: <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC | TC[]) => T[];
6
+ export declare const findChildByType: <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC) => T;
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IAreaChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface AreaChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IAreaChartSpec, 'type'> {
5
+ }
6
+ export declare const AreaChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IBarChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface BarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBarChartSpec, 'type'> {
5
+ }
6
+ export declare const BarChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -1,4 +1,5 @@
1
1
  import type { IVChart, IData, IInitOption, ISpec, IVChartConstructor } from '@visactor/vchart';
2
+ import React from 'openinula';
2
3
  import { ContainerProps } from '../containers/withContainer';
3
4
  import { EventsProps, LegendEventProps, ScrollBarEventProps, BrushEventProps, DataZoomEventProps, PlayerEventProps, DimensionEventProps, HierarchyEventProps, ChartLifeCycleEventProps } from '../eventsUtils';
4
5
  import { IReactTooltipProps } from '../components/tooltip/interface';
@@ -17,10 +18,6 @@ export interface BaseChartProps extends EventsProps, LegendEventProps, ScrollBar
17
18
  onError?: (err: Error) => void;
18
19
  useSyncRender?: boolean;
19
20
  }
20
- type Props = React.PropsWithChildren<BaseChartProps>;
21
- export declare const createChart: <T extends Props>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T, defaultProps?: Partial<T>) => T) => import("openinula").ExoticComponent<import("openinula").PropsOmitRef<T & ContainerProps>> & {
22
- key?: import("openinula").Key;
23
- } & {
24
- ref?: import("openinula").Ref<any>;
21
+ export declare const createChart: <T extends React.PropsWithChildren<BaseChartProps>>(componentName: string, defaultProps?: Partial<T>, callback?: (props: T, defaultProps?: Partial<T>) => T) => React.ExoticComponent<React.PropsOmitRef<T & ContainerProps>> & React.Attributes & {
22
+ ref?: React.Ref<any>;
25
23
  };
26
- export {};
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IBoxPlotChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface BoxPlotChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IBoxPlotChartSpec, 'type'> {
5
+ }
6
+ export declare const BoxPlotChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ICircularProgressChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface CircularProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICircularProgressChartSpec, 'type'> {
5
+ }
6
+ export declare const CircularProgressChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ICommonChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface CommonChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ICommonChartSpec, 'type'> {
5
+ }
6
+ export declare const CommonChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IFunnelChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface FunnelChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IFunnelChartSpec, 'type'> {
5
+ }
6
+ export declare const FunnelChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { IHistogramChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface HistogramChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IHistogramChartSpec, 'type'> {
5
+ }
6
+ export declare const HistogramChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { ILineChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface LineChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILineChartSpec, 'type'> {
5
+ }
6
+ export declare const LineChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import { ILinearProgressChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface LinearProgressChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ILinearProgressChartSpec, 'type'> {
5
+ }
6
+ export declare const LinearProgressChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IMapChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface MapChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IMapChartSpec, 'type'> {
5
+ }
6
+ export declare const MapChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IPieChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface PieChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IPieChartSpec, 'type'> {
5
+ }
6
+ export declare const PieChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRadarChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RadarChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRadarChartSpec, 'type'> {
5
+ }
6
+ export declare const RadarChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRangeColumnChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RangeColumnChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRangeColumnChartSpec, 'type'> {
5
+ }
6
+ export declare const RangeColumnChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IRoseChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface RoseChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IRoseChartSpec, 'type'> {
5
+ }
6
+ export declare const RoseChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IScatterChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface ScatterChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IScatterChartSpec, 'type'> {
5
+ }
6
+ export declare const ScatterChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { ISequenceChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface SequenceChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<ISequenceChartSpec, 'type'> {
5
+ }
6
+ export declare const SequenceChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,8 @@
1
+ import React from 'openinula';
2
+ import type { IWordCloudChartSpec } from '@visactor/vchart';
3
+ import { BaseChartProps } from './BaseChart';
4
+ export interface WordCloudChartProps extends Omit<BaseChartProps, 'spec' | 'container' | 'type'>, Omit<IWordCloudChartSpec, 'type'> {
5
+ }
6
+ export declare const WordCloudChart: React.ExoticComponent<Omit<any, "ref">> & React.Attributes & {
7
+ ref?: React.Ref<any>;
8
+ };
@@ -0,0 +1,10 @@
1
+ import React from 'openinula';
2
+ export interface BaseComponentProps {
3
+ id?: string | number;
4
+ }
5
+ type ComponentProps = BaseComponentProps & {
6
+ updateId?: number;
7
+ componentId?: number;
8
+ };
9
+ export declare const createComponent: <T extends ComponentProps>(componentName: string, specName: string, supportedEvents?: Record<string, string> | null, isSingle?: boolean) => React.FC<T>;
10
+ export {};
@@ -1,11 +1,10 @@
1
+ import React from 'openinula';
1
2
  export interface ContainerProps {
2
3
  style?: React.CSSProperties;
3
4
  className?: string;
4
5
  width?: number | string;
5
6
  height?: number | string;
6
7
  }
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>;
8
+ export default function withContainer<Props extends ContainerProps, CompProps>(Comp: any, name?: string, getProps?: (props: any) => CompProps): React.ExoticComponent<React.PropsOmitRef<CompProps & Props>> & React.Attributes & {
9
+ ref?: React.Ref<any>;
11
10
  };
@@ -4,10 +4,8 @@ export interface ChartContextType {
4
4
  chart?: IVChart;
5
5
  isChildrenUpdated?: boolean;
6
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>;
7
+ declare const ChartContext: React.Context<ChartContextType>;
8
+ export declare function withChartInstance<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
9
+ ref?: React.Ref<any>;
12
10
  };
13
11
  export default ChartContext;
@@ -1,9 +1,7 @@
1
1
  import React from 'openinula';
2
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>;
3
+ declare const StageContext: React.Context<IStage>;
4
+ export declare function withStage<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
5
+ ref?: React.Ref<any>;
8
6
  };
9
7
  export default StageContext;
@@ -1,9 +1,7 @@
1
1
  import React from 'openinula';
2
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>;
3
+ declare const ViewContext: React.Context<IView>;
4
+ export declare function withView<T>(Component: typeof React.Component): React.ExoticComponent<React.PropsOmitRef<T>> & React.Attributes & {
5
+ ref?: React.Ref<any>;
8
6
  };
9
7
  export default ViewContext;
@@ -0,0 +1,9 @@
1
+ import React from 'openinula';
2
+ import { EventsProps } from '../eventsUtils';
3
+ export interface BaseSeriesProps extends EventsProps {
4
+ id?: string | number;
5
+ }
6
+ export declare const createSeries: <T extends BaseSeriesProps>(componentName: string, markNames: string[], type?: string) => React.FC<T & {
7
+ updateId?: number;
8
+ componentId?: string;
9
+ }>;
package/esm/util.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export declare const uid: (prefix?: string) => string;
2
+ export declare const getDisplayName: (Comp: any) => any;
3
+ export declare const typeOfComponent: (component: any, customTypeKey?: string) => string;
4
+ export declare const toArray: <T = ReactNode, TC = ReactNode>(children: T) => TC[];
5
+ export declare const findAllByType: <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC | TC[]) => T[];
6
+ export declare const findChildByType: <T extends React.ReactNode, TC = unknown>(children: React.ReactNode, type: TC) => T;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visactor/openinula-vchart",
3
- "version": "1.13.5-alpha.17",
3
+ "version": "1.13.5-alpha.18",
4
4
  "sideEffects": false,
5
5
  "description": "The openinula version of VChart 4.x",
6
6
  "keywords": [
@@ -23,11 +23,11 @@
23
23
  "dist"
24
24
  ],
25
25
  "dependencies": {
26
- "@visactor/vchart": "1.13.5-alpha.17",
26
+ "@visactor/vchart": "1.13.5-alpha.18",
27
27
  "@visactor/vutils": "~0.19.3",
28
- "@visactor/vrender-core": "0.21.12-alpha.1",
29
- "@visactor/vrender-kits": "0.21.12-alpha.1",
30
- "@visactor/vgrammar-core": "0.15.6-alpha.2",
28
+ "@visactor/vrender-core": "0.21.12-alpha.4",
29
+ "@visactor/vrender-kits": "0.21.12-alpha.4",
30
+ "@visactor/vgrammar-core": "0.15.6-alpha.3",
31
31
  "react-is": "^18.2.0"
32
32
  },
33
33
  "devDependencies": {
@@ -51,9 +51,9 @@
51
51
  "@vitejs/plugin-react": "3.1.0",
52
52
  "vite": "3.2.6",
53
53
  "openinula": ">=0.1.2-SNAPSHOT",
54
+ "@internal/bundler": "0.0.1",
54
55
  "@internal/eslint-config": "0.0.1",
55
- "@internal/ts-config": "0.0.1",
56
- "@internal/bundler": "0.0.1"
56
+ "@internal/ts-config": "0.0.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "openinula": ">=0.1.2-SNAPSHOT"