@devtable/dashboard 1.22.0 → 1.24.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 +639 -289
- package/dist/dashboard.umd.js +9 -8
- package/dist/panel/settings/common/aggregation-selector.d.ts +9 -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/index.d.ts +10 -0
- package/dist/panel/viz/stats/panel/variable.d.ts +11 -0
- package/dist/panel/viz/stats/panel/variables.d.ts +10 -0
- package/dist/panel/viz/stats/update/index.d.ts +15 -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 +15 -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
|
@@ -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,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 {};
|
|
@@ -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 {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Control, UseFormWatch } from "react-hook-form";
|
|
3
|
+
import { IVizStatsConf } from "../types";
|
|
4
|
+
interface IVariablesField {
|
|
5
|
+
control: Control<IVizStatsConf, any>;
|
|
6
|
+
watch: UseFormWatch<IVizStatsConf>;
|
|
7
|
+
data: any[];
|
|
8
|
+
}
|
|
9
|
+
export declare function VariablesField({ control, watch, data }: IVariablesField): JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -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;
|
|
@@ -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,15 @@
|
|
|
1
|
+
import { TextInputProps } from "@mantine/core";
|
|
2
|
+
import React, { ChangeEventHandler } from "react";
|
|
3
|
+
import { ITemplateVariable } from "./types";
|
|
4
|
+
interface ITemplateInput extends Omit<TextInputProps, 'value' | 'onChange'> {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: ChangeEventHandler<HTMLInputElement>;
|
|
7
|
+
}
|
|
8
|
+
export declare const TemplateInput: React.ForwardRefExoticComponent<ITemplateInput & React.RefAttributes<unknown>>;
|
|
9
|
+
interface ITemplateVariableField {
|
|
10
|
+
value: ITemplateVariable;
|
|
11
|
+
onChange: (v: ITemplateVariable) => void;
|
|
12
|
+
data: any[];
|
|
13
|
+
}
|
|
14
|
+
export declare function TemplateVariableField({ value, onChange, data }: ITemplateVariableField): JSX.Element;
|
|
15
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.24.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",
|