@devtable/dashboard 1.25.0 → 1.28.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/contexts/dashboard-action-context.d.ts +7 -0
- package/dist/contexts/panel-context.d.ts +1 -0
- package/dist/dashboard.es.js +511 -76
- package/dist/dashboard.umd.js +9 -9
- package/dist/layout/index.d.ts +1 -2
- package/dist/main/actions.d.ts +3 -2
- package/dist/main/view-schema-modal.d.ts +8 -0
- package/dist/panel/index.d.ts +0 -1
- package/dist/panel/viz/cartesian/type.d.ts +8 -0
- package/dist/panel/viz/stats/panel/index.d.ts +10 -0
- package/dist/panel/viz/stats/types.d.ts +3 -22
- package/dist/panel/viz/stats/update/index.d.ts +15 -0
- package/dist/utils/template/types.d.ts +21 -0
- package/package.json +3 -1
package/dist/panel/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { IDashboardPanel } from '../types/dashboard';
|
|
3
3
|
interface IPanel extends IDashboardPanel {
|
|
4
|
-
destroy?: () => void;
|
|
5
4
|
update?: (panel: IDashboardPanel) => void;
|
|
6
5
|
}
|
|
7
6
|
export declare function Panel({ viz: initialViz, queryID: initialQueryID, title: initialTitle, description: initialDesc, update, layout, id, }: IPanel): JSX.Element;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { IVizPanelProps } from "../../../types";
|
|
2
|
+
import { ITemplateVariable } from "../../../utils/template/types";
|
|
2
3
|
import { TNumbroFormat } from "../../settings/common/numbro-format-selector";
|
|
3
4
|
export interface ICartesianChartSeriesItem {
|
|
4
5
|
type: 'line' | 'bar' | 'scatter';
|
|
@@ -43,6 +44,13 @@ export interface ICartesianChartConf {
|
|
|
43
44
|
y_axes: IYAxisConf[];
|
|
44
45
|
series: ICartesianChartSeriesItem[];
|
|
45
46
|
regressions: IRegressionConf[];
|
|
47
|
+
stats: {
|
|
48
|
+
templates: {
|
|
49
|
+
top: string;
|
|
50
|
+
bottom: string;
|
|
51
|
+
};
|
|
52
|
+
variables: ITemplateVariable[];
|
|
53
|
+
};
|
|
46
54
|
}
|
|
47
55
|
export interface IVizCartesianChartPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
|
|
48
56
|
conf: ICartesianChartConf;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IVizPanelProps } from "../../../../types/viz-panel";
|
|
3
|
+
import { IVizStatsConf } from "../types";
|
|
4
|
+
import { ILegacyStatsConf } from "../update";
|
|
5
|
+
interface IVizStatsPanel extends Omit<IVizPanelProps, 'conf' | 'setConf'> {
|
|
6
|
+
conf: IVizStatsConf | ILegacyStatsConf;
|
|
7
|
+
setConf: (conf: IVizStatsConf) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function VizStatsPanel({ conf, setConf, data }: IVizStatsPanel): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare type ColorConf = {
|
|
3
|
-
type: 'static';
|
|
4
|
-
staticColor: string;
|
|
5
|
-
} | {
|
|
6
|
-
type: 'continuous';
|
|
7
|
-
valueRange: number[];
|
|
8
|
-
colorRange: string[];
|
|
9
|
-
valueField: string;
|
|
10
|
-
} | {
|
|
11
|
-
type: 'piecewise';
|
|
12
|
-
};
|
|
13
|
-
export interface IVizStatsContent {
|
|
14
|
-
prefix: string;
|
|
15
|
-
data_field: string;
|
|
16
|
-
formatter: TNumbroFormat;
|
|
17
|
-
postfix: string;
|
|
18
|
-
}
|
|
1
|
+
import { ITemplateVariable } from "../../../utils/template/types";
|
|
19
2
|
export interface IVizStatsConf {
|
|
20
3
|
align: 'center';
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
weight: string;
|
|
24
|
-
content: IVizStatsContent;
|
|
4
|
+
template: string;
|
|
5
|
+
variables: ITemplateVariable[];
|
|
25
6
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TNumbroFormat } from "../../../settings/common/numbro-format-selector";
|
|
2
|
+
import { IVizStatsConf } from "../types";
|
|
3
|
+
export interface ILegacyStatsConf {
|
|
4
|
+
align: 'center';
|
|
5
|
+
size: string;
|
|
6
|
+
weight: string;
|
|
7
|
+
color: any;
|
|
8
|
+
content: {
|
|
9
|
+
prefix: string;
|
|
10
|
+
data_field: string;
|
|
11
|
+
formatter: TNumbroFormat;
|
|
12
|
+
postfix: string;
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export declare function updateSchema(legacyConf: IVizStatsConf | ILegacyStatsConf): IVizStatsConf;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TNumbroFormat } from "../../panel/settings/common/numbro-format-selector";
|
|
2
|
+
import { AggregationType } from "../aggregation";
|
|
3
|
+
export declare type ColorConfType = {
|
|
4
|
+
type: 'static';
|
|
5
|
+
staticColor: string;
|
|
6
|
+
} | {
|
|
7
|
+
type: 'continuous';
|
|
8
|
+
valueRange: number[];
|
|
9
|
+
colorRange: string[];
|
|
10
|
+
} | {
|
|
11
|
+
type: 'piecewise';
|
|
12
|
+
};
|
|
13
|
+
export interface ITemplateVariable {
|
|
14
|
+
name: string;
|
|
15
|
+
data_field: string;
|
|
16
|
+
aggregation: AggregationType;
|
|
17
|
+
formatter: TNumbroFormat;
|
|
18
|
+
color: ColorConfType;
|
|
19
|
+
size: string;
|
|
20
|
+
weight: string;
|
|
21
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.28.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
"@mantine/dates": "^4.2.12",
|
|
35
35
|
"@mantine/form": "^4.2.12",
|
|
36
36
|
"@mantine/hooks": "^4.2.12",
|
|
37
|
+
"@mantine/modals": "^4.2.12",
|
|
37
38
|
"@mantine/notifications": "^4.2.12",
|
|
38
39
|
"@mantine/prism": "^4.2.12",
|
|
39
40
|
"@mantine/rte": "^4.2.12",
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
"@mantine/dates": "^4.2.12",
|
|
63
64
|
"@mantine/form": "^4.2.12",
|
|
64
65
|
"@mantine/hooks": "^4.2.12",
|
|
66
|
+
"@mantine/modals": "^4.2.12",
|
|
65
67
|
"@mantine/notifications": "^4.2.12",
|
|
66
68
|
"@mantine/prism": "^4.2.12",
|
|
67
69
|
"@mantine/rte": "^4.2.12",
|