@devtable/dashboard 8.17.0 → 8.19.0

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.
@@ -0,0 +1,2 @@
1
+ export * from './label-position-selector';
2
+ export * from './types';
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { IEchartsLabelPosition, LabelPositionOptionType } from './types';
3
+ interface ILabelPositionSelector {
4
+ label: string;
5
+ value: IEchartsLabelPosition;
6
+ onChange: (v: IEchartsLabelPosition) => void;
7
+ options?: LabelPositionOptionType[];
8
+ }
9
+ export declare const LabelPositionSelector: import("react").ForwardRefExoticComponent<ILabelPositionSelector & import("react").RefAttributes<HTMLInputElement>>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ export declare type IEchartsLabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideBottomLeft' | 'insideTopRight' | 'insideBottomRight' | 'outside';
2
+ export declare type LabelPositionOptionType = {
3
+ label: string;
4
+ value: IEchartsLabelPosition;
5
+ disabled?: boolean;
6
+ };
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import { Control, UseFormWatch } from 'react-hook-form';
3
+ import { IFunnelConf } from '../../type';
4
+ interface ISeriesField {
5
+ control: Control<IFunnelConf, $TSFixMe>;
6
+ watch: UseFormWatch<IFunnelConf>;
7
+ data: $TSFixMe[];
8
+ }
9
+ export declare const SeriesField: ({ control, watch, data }: ISeriesField) => JSX.Element;
10
+ export {};
@@ -0,0 +1,13 @@
1
+ /// <reference types="react" />
2
+ import { Control } from 'react-hook-form';
3
+ import { AnyObject } from '~/types';
4
+ import { IFunnelConf, IFunnelSeriesItem } from '../../type';
5
+ interface ISeriesItemField {
6
+ item: IFunnelSeriesItem;
7
+ control: Control<IFunnelConf, $TSFixMe>;
8
+ data: AnyObject[];
9
+ index: number;
10
+ remove: (index: number) => void;
11
+ }
12
+ export declare const SeriesItemField: ({ item, control, data, index, remove }: ISeriesItemField) => JSX.Element;
13
+ export {};
@@ -0,0 +1,2 @@
1
+ import { VizComponent } from '../../../types/plugin';
2
+ export declare const FunnelVizComponent: VizComponent;
@@ -0,0 +1,42 @@
1
+ import { AnyObject } from '~/types';
2
+ import { IFunnelConf } from '../type';
3
+ export declare function getOption(conf: IFunnelConf, data: AnyObject[]): {
4
+ grid: {
5
+ top: number;
6
+ left: number;
7
+ right: number;
8
+ bottom: number;
9
+ };
10
+ tooltip: {
11
+ trigger: string;
12
+ formatter: (params: import("echarts/types/dist/shared").CallbackDataParams) => string;
13
+ };
14
+ series: {
15
+ label: {
16
+ width: number;
17
+ overflow: "truncate" | "break" | "breakAll";
18
+ ellipsis: "...";
19
+ show: boolean;
20
+ position: import("../../../common-echarts-fields/label-position").IEchartsLabelPosition;
21
+ };
22
+ orient: "horizontal" | "vertical";
23
+ funnelAlign: "right" | "center" | "left";
24
+ data: {
25
+ name: string;
26
+ value: string | number;
27
+ }[];
28
+ id: string;
29
+ name: string;
30
+ gap: number;
31
+ sort: "none" | "ascending" | "descending";
32
+ min: number | undefined;
33
+ max: number | undefined;
34
+ minSize: string;
35
+ maxSize: string;
36
+ top: number;
37
+ left: number;
38
+ right: number;
39
+ bottom: number;
40
+ type: string;
41
+ }[];
42
+ };
@@ -0,0 +1,32 @@
1
+ import { AnyObject } from '~/types';
2
+ import { IFunnelConf } from '../type';
3
+ declare type SeriesDataType = {
4
+ name: string;
5
+ value: string | number;
6
+ };
7
+ export declare function getSeries(conf: IFunnelConf, data: AnyObject[]): {
8
+ label: {
9
+ width: number;
10
+ overflow: "truncate" | "break" | "breakAll";
11
+ ellipsis: "...";
12
+ show: boolean;
13
+ position: import("../../../common-echarts-fields/label-position").IEchartsLabelPosition;
14
+ };
15
+ orient: "horizontal" | "vertical";
16
+ funnelAlign: "right" | "center" | "left";
17
+ data: SeriesDataType[];
18
+ id: string;
19
+ name: string;
20
+ gap: number;
21
+ sort: "none" | "ascending" | "descending";
22
+ min: number | undefined;
23
+ max: number | undefined;
24
+ minSize: string;
25
+ maxSize: string;
26
+ top: number;
27
+ left: number;
28
+ right: number;
29
+ bottom: number;
30
+ type: string;
31
+ }[];
32
+ export {};
@@ -0,0 +1,7 @@
1
+ import { CallbackDataParams } from 'echarts/types/dist/shared';
2
+ import { AnyObject } from '~/types';
3
+ import { IFunnelConf } from '../type';
4
+ export declare function getTooltip(conf: IFunnelConf, data: AnyObject[]): {
5
+ trigger: string;
6
+ formatter: (params: CallbackDataParams) => string;
7
+ };
@@ -0,0 +1,32 @@
1
+ import { IAxisLabelOverflow } from '~/plugins/common-echarts-fields/axis-label-overflow';
2
+ import { IEchartsLabelPosition } from '~/plugins/common-echarts-fields/label-position';
3
+ export declare function getNewSeriesItem(id?: string): IFunnelSeriesItem;
4
+ export interface IFunnelSeriesItem {
5
+ id: string;
6
+ name: string;
7
+ level_name_data_key: string;
8
+ level_value_data_key: string;
9
+ min: {
10
+ value: number;
11
+ enable_value: boolean;
12
+ size: string;
13
+ };
14
+ max: {
15
+ value: number;
16
+ enable_value: boolean;
17
+ size: string;
18
+ };
19
+ gap: number;
20
+ axisLabel: {
21
+ show: boolean;
22
+ position: IEchartsLabelPosition;
23
+ overflow: IAxisLabelOverflow;
24
+ };
25
+ sort: 'ascending' | 'descending' | 'none';
26
+ orient: 'horizontal' | 'vertical';
27
+ funnelAlign: 'left' | 'right' | 'center';
28
+ }
29
+ export interface IFunnelConf {
30
+ series: IFunnelSeriesItem[];
31
+ }
32
+ export declare const DEFAULT_CONFIG: IFunnelConf;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizViewProps } from '~/types/plugin';
3
+ export declare function VizFunnelChart({ context }: VizViewProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ /// <reference types="react" />
2
+ import { VizConfigProps } from '../../../types/plugin';
3
+ export declare function VizFunnelEditor({ context }: VizConfigProps): JSX.Element;
@@ -5,7 +5,7 @@ export declare function getLevels(conf: ISunburstConf): {
5
5
  formatter: ({ treePathInfo, name, value }: IEchartsSunburstLabelFormatter) => string | undefined;
6
6
  rotate: "0" | "radial" | "tangential";
7
7
  align: "right" | "center" | "left";
8
- position: import("../type").TEchartsLabelPosition;
8
+ position: import("../../../common-echarts-fields/label-position").IEchartsLabelPosition;
9
9
  padding: number;
10
10
  };
11
11
  id: string;
@@ -1,4 +1,4 @@
1
- export declare type TEchartsLabelPosition = 'top' | 'left' | 'right' | 'bottom' | 'inside' | 'insideLeft' | 'insideRight' | 'insideTop' | 'insideBottom' | 'insideTopLeft' | 'insideBottomLeft' | 'insideTopRight' | 'insideBottomRight';
1
+ import { IEchartsLabelPosition } from '~/plugins/common-echarts-fields/label-position';
2
2
  export interface ISunburstLevelConf {
3
3
  id: string;
4
4
  r0: string;
@@ -7,7 +7,7 @@ export interface ISunburstLevelConf {
7
7
  show_label_tolerance: number;
8
8
  rotate: 'radial' | 'tangential' | '0';
9
9
  align: 'left' | 'center' | 'right';
10
- position: TEchartsLabelPosition;
10
+ position: IEchartsLabelPosition;
11
11
  padding: number;
12
12
  };
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtable/dashboard",
3
- "version": "8.17.0",
3
+ "version": "8.19.0",
4
4
  "license": "Apache-2.0",
5
5
  "publishConfig": {
6
6
  "access": "public",