@devtable/dashboard 1.24.0 → 1.27.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 +1783 -1225
- package/dist/dashboard.umd.js +9 -9
- package/dist/layout/index.d.ts +1 -2
- package/dist/main/actions.d.ts +2 -2
- package/dist/panel/index.d.ts +0 -1
- 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 +8 -0
- package/dist/panel/viz/stats/types.d.ts +3 -22
- package/dist/utils/template/editor.d.ts +1 -0
- package/dist/utils/template/types.d.ts +21 -0
- package/package.json +3 -1
package/dist/main/actions.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ interface IDashboardActions {
|
|
|
4
4
|
mode: DashboardMode;
|
|
5
5
|
setMode: React.Dispatch<React.SetStateAction<DashboardMode>>;
|
|
6
6
|
hasChanges: boolean;
|
|
7
|
-
addPanel: () => void;
|
|
8
7
|
saveChanges: () => void;
|
|
8
|
+
revertChanges: () => void;
|
|
9
9
|
}
|
|
10
|
-
export declare function DashboardActions({ mode, setMode, hasChanges,
|
|
10
|
+
export declare function DashboardActions({ mode, setMode, hasChanges, saveChanges, revertChanges, }: IDashboardActions): JSX.Element;
|
|
11
11
|
export {};
|
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;
|
|
@@ -6,5 +6,5 @@ interface ICartesianChart {
|
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
8
8
|
}
|
|
9
|
-
export declare function VizCartesianChart({ conf, data, width, height }: ICartesianChart): JSX.Element
|
|
9
|
+
export declare function VizCartesianChart({ conf, data, width, height }: ICartesianChart): JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from "react-hook-form";
|
|
3
|
+
import { ICartesianChartConf } from "../../type";
|
|
4
|
+
interface IVariablesField {
|
|
5
|
+
control: Control<ICartesianChartConf, any>;
|
|
6
|
+
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
|
+
data: any[];
|
|
8
|
+
}
|
|
9
|
+
export declare function StatsField({ control, watch, data }: IVariablesField): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFieldArrayRemove } from "react-hook-form";
|
|
3
|
+
import { ICartesianChartConf } from "../../type";
|
|
4
|
+
interface VariableField {
|
|
5
|
+
control: Control<ICartesianChartConf, 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,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;
|
|
@@ -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
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { TextInputProps } from "@mantine/core";
|
|
2
2
|
import React, { ChangeEventHandler } from "react";
|
|
3
3
|
import { ITemplateVariable } from "./types";
|
|
4
|
+
export declare function getANewVariable(): ITemplateVariable;
|
|
4
5
|
interface ITemplateInput extends Omit<TextInputProps, 'value' | 'onChange'> {
|
|
5
6
|
value: string;
|
|
6
7
|
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
@@ -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.27.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",
|