@devtable/dashboard 1.22.0 → 1.26.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.
- package/dist/dashboard.es.js +1819 -1286
- package/dist/dashboard.umd.js +9 -8
- package/dist/panel/settings/common/aggregation-selector.d.ts +9 -0
- package/dist/panel/viz/cartesian/index.d.ts +1 -1
- package/dist/panel/viz/cartesian/panel/stats/index.d.ts +10 -0
- package/dist/panel/viz/cartesian/panel/stats/variable.d.ts +11 -0
- package/dist/panel/viz/cartesian/type.d.ts +22 -1
- package/dist/panel/viz/rich-text/index.d.ts +10 -0
- package/dist/panel/viz/rich-text/panel.d.ts +3 -0
- package/dist/panel/viz/rich-text/type.d.ts +8 -0
- package/dist/panel/viz/stats/index.d.ts +1 -1
- package/dist/panel/viz/stats/panel/variable.d.ts +11 -0
- package/dist/utils/aggregation.d.ts +2 -0
- package/dist/utils/color-mapping.d.ts +1 -2
- package/dist/utils/template/editor.d.ts +16 -0
- package/dist/utils/template/render.d.ts +3 -0
- package/package.json +15 -15
- package/dist/panel/viz/stats/panel.d.ts +0 -3
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { IVizPanelProps } from "../../../types";
|
|
2
2
|
import { TNumbroFormat } from "../../settings/common/numbro-format-selector";
|
|
3
3
|
export interface ICartesianChartSeriesItem {
|
|
4
|
-
type: 'line' | 'bar';
|
|
4
|
+
type: 'line' | 'bar' | 'scatter';
|
|
5
5
|
name: string;
|
|
6
6
|
showSymbol: false;
|
|
7
|
+
symbolSize: number;
|
|
7
8
|
y_axis_data_key: string;
|
|
8
9
|
yAxisIndex: number;
|
|
9
10
|
label_position?: string;
|
|
@@ -17,11 +18,31 @@ export interface IYAxisConf {
|
|
|
17
18
|
name: string;
|
|
18
19
|
label_formatter: TNumbroFormat;
|
|
19
20
|
}
|
|
21
|
+
export interface IRegressionTransform {
|
|
22
|
+
type: 'ecStat:regression';
|
|
23
|
+
config: {
|
|
24
|
+
method: 'linear' | 'exponential' | 'logarithmic' | 'polynomial';
|
|
25
|
+
order: number;
|
|
26
|
+
formulaOn: 'end';
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
export interface IRegressionLineConf {
|
|
30
|
+
type: 'line';
|
|
31
|
+
yAxisIndex: number;
|
|
32
|
+
color: string;
|
|
33
|
+
}
|
|
34
|
+
export interface IRegressionConf {
|
|
35
|
+
transform: IRegressionTransform;
|
|
36
|
+
plot: IRegressionLineConf;
|
|
37
|
+
name: string;
|
|
38
|
+
y_axis_data_key: string;
|
|
39
|
+
}
|
|
20
40
|
export interface ICartesianChartConf {
|
|
21
41
|
x_axis_data_key: string;
|
|
22
42
|
x_axis_name: string;
|
|
23
43
|
y_axes: IYAxisConf[];
|
|
24
44
|
series: ICartesianChartSeriesItem[];
|
|
45
|
+
regressions: IRegressionConf[];
|
|
25
46
|
}
|
|
26
47
|
export interface IVizCartesianChartPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
|
|
27
48
|
conf: ICartesianChartConf;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IRichTextConf } from './type';
|
|
3
|
+
interface IRichText {
|
|
4
|
+
conf: IRichTextConf;
|
|
5
|
+
data: any[];
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function VizRichText({ conf, width, height }: IRichText): JSX.Element | null;
|
|
10
|
+
export {};
|
|
@@ -6,5 +6,5 @@ interface IVizStats {
|
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function VizStats({ conf: {
|
|
9
|
+
export declare function VizStats({ conf: { template, variables, align }, data }: IVizStats): JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFieldArrayRemove } from "react-hook-form";
|
|
3
|
+
import { IVizStatsConf } from "../types";
|
|
4
|
+
interface VariableField {
|
|
5
|
+
control: Control<IVizStatsConf, any>;
|
|
6
|
+
index: number;
|
|
7
|
+
remove: UseFieldArrayRemove;
|
|
8
|
+
data: any[];
|
|
9
|
+
}
|
|
10
|
+
export declare function VariableField({ control, index, remove, data }: VariableField): JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
interface InterpolateColorOption {
|
|
1
|
+
export interface InterpolateColorOption {
|
|
2
2
|
valueRange: number[];
|
|
3
3
|
colorRange: string[];
|
|
4
4
|
}
|
|
@@ -7,4 +7,3 @@ export declare class InterpolateColor {
|
|
|
7
7
|
constructor({ valueRange, colorRange }: InterpolateColorOption);
|
|
8
8
|
getColor(value: number): string;
|
|
9
9
|
}
|
|
10
|
-
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { TextInputProps } from "@mantine/core";
|
|
2
|
+
import React, { ChangeEventHandler } from "react";
|
|
3
|
+
import { ITemplateVariable } from "./types";
|
|
4
|
+
export declare function getANewVariable(): ITemplateVariable;
|
|
5
|
+
interface ITemplateInput extends Omit<TextInputProps, 'value' | 'onChange'> {
|
|
6
|
+
value: string;
|
|
7
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
8
|
+
}
|
|
9
|
+
export declare const TemplateInput: React.ForwardRefExoticComponent<ITemplateInput & React.RefAttributes<unknown>>;
|
|
10
|
+
interface ITemplateVariableField {
|
|
11
|
+
value: ITemplateVariable;
|
|
12
|
+
onChange: (v: ITemplateVariable) => void;
|
|
13
|
+
data: any[];
|
|
14
|
+
}
|
|
15
|
+
export declare function TemplateVariableField({ value, onChange, data }: ITemplateVariableField): JSX.Element;
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"popmotion": "^11.0.3"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
|
-
"@mantine/core": "^4.2.
|
|
34
|
-
"@mantine/dates": "^4.2.
|
|
35
|
-
"@mantine/form": "^4.2.
|
|
36
|
-
"@mantine/hooks": "^4.2.
|
|
37
|
-
"@mantine/notifications": "^4.2.
|
|
38
|
-
"@mantine/prism": "^4.2.
|
|
39
|
-
"@mantine/rte": "^4.2.
|
|
33
|
+
"@mantine/core": "^4.2.12",
|
|
34
|
+
"@mantine/dates": "^4.2.12",
|
|
35
|
+
"@mantine/form": "^4.2.12",
|
|
36
|
+
"@mantine/hooks": "^4.2.12",
|
|
37
|
+
"@mantine/notifications": "^4.2.12",
|
|
38
|
+
"@mantine/prism": "^4.2.12",
|
|
39
|
+
"@mantine/rte": "^4.2.12",
|
|
40
40
|
"@types/lodash": "^4.14.182",
|
|
41
41
|
"@types/react": "^18.0.0",
|
|
42
42
|
"@types/react-dom": "^18.0.0",
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"vite-plugin-dts": "^1.1.1"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
|
-
"@mantine/core": "^4.2.
|
|
62
|
-
"@mantine/dates": "^4.2.
|
|
63
|
-
"@mantine/form": "^4.2.
|
|
64
|
-
"@mantine/hooks": "^4.2.
|
|
65
|
-
"@mantine/notifications": "^4.2.
|
|
66
|
-
"@mantine/prism": "^4.2.
|
|
67
|
-
"@mantine/rte": "^4.2.
|
|
61
|
+
"@mantine/core": "^4.2.12",
|
|
62
|
+
"@mantine/dates": "^4.2.12",
|
|
63
|
+
"@mantine/form": "^4.2.12",
|
|
64
|
+
"@mantine/hooks": "^4.2.12",
|
|
65
|
+
"@mantine/notifications": "^4.2.12",
|
|
66
|
+
"@mantine/prism": "^4.2.12",
|
|
67
|
+
"@mantine/rte": "^4.2.12",
|
|
68
68
|
"ahooks": "^3.3.11",
|
|
69
69
|
"axios": "^0.27.2",
|
|
70
70
|
"echarts": "^5.3.2",
|