@devtable/dashboard 4.4.0 → 4.6.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/layout-state-context.d.ts +0 -2
- package/dist/dashboard.es.js +17624 -15165
- package/dist/dashboard.umd.js +85 -30
- package/dist/filter/filter-checkbox/render.d.ts +1 -1
- package/dist/filter/index.d.ts +4 -1
- package/dist/index.d.ts +1 -1
- package/dist/main/actions.d.ts +0 -4
- package/dist/main/full-screen-panel.d.ts +2 -0
- package/dist/main/read-only.d.ts +1 -1
- package/dist/main/switch-views/edit-view-modal/config-fields/config.division.d.ts +4 -0
- package/dist/main/switch-views/edit-view-modal/config-fields/config.modal.d.ts +4 -0
- package/dist/main/switch-views/edit-view-modal/config-fields/index.d.ts +4 -0
- package/dist/main/switch-views/edit-view-modal/form.d.ts +4 -0
- package/dist/main/switch-views/edit-view-modal/index.d.ts +9 -0
- package/dist/main/switch-views/index.d.ts +4 -0
- package/dist/main/switch-views/select-with-add-and-edit.d.ts +18 -0
- package/dist/model/filters/filter/index.d.ts +2 -0
- package/dist/model/filters/index.d.ts +1081 -0
- package/dist/model/index.d.ts +1 -0
- package/dist/model/views/view/index.d.ts +798 -0
- package/dist/model/{panels → views/view/panels}/index.d.ts +20 -20
- package/dist/model/{panels → views/view/panels}/layout.d.ts +0 -0
- package/dist/model/{panels → views/view/panels}/panel.d.ts +4 -4
- package/dist/model/{panels → views/view/panels}/viz.d.ts +0 -0
- package/dist/panel/index.d.ts +2 -0
- package/dist/panel/title-bar.d.ts +4 -1
- package/dist/plugins/color-manager/color-manager.d.ts +4 -2
- package/dist/plugins/color-manager/impl.d.ts +4 -1
- package/dist/plugins/color-manager/multi-step-value-mapper.d.ts +9 -0
- package/dist/plugins/color-manager/type.d.ts +7 -0
- package/dist/plugins/colors/diverging-color.d.ts +2 -0
- package/dist/plugins/colors/index.d.ts +9 -0
- package/dist/plugins/colors/sequential-color.d.ts +2 -0
- package/dist/plugins/controls/color-interpolation-select/index.d.ts +9 -0
- package/dist/plugins/controls/color-mapping-editor/index.d.ts +8 -0
- package/dist/plugins/controls/color-mapping-editor/style.d.ts +6 -0
- package/dist/plugins/viz-components/table/components/background-color-select.d.ts +7 -0
- package/dist/plugins/viz-components/table/type.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/types/dashboard.d.ts +12 -1
- package/dist/types/plugin/index.d.ts +15 -2
- package/dist/view/index.d.ts +2 -0
- package/dist/view/layout/index.d.ts +2 -0
- package/dist/view/layout/main-layout.d.ts +11 -0
- package/dist/{layout/read-only.d.ts → view/layout/read-only-layout.d.ts} +2 -0
- package/dist/view/main-view.d.ts +8 -0
- package/dist/view/read-only-view.d.ts +7 -0
- package/dist/view/view-component/preview/division.d.ts +6 -0
- package/dist/view/view-component/preview/index.d.ts +8 -0
- package/dist/view/view-component/preview/modal.d.ts +8 -0
- package/package.json +3 -1
- package/dist/contexts/model-context.d.ts +0 -28957
- package/dist/layout/index.d.ts +0 -9
- package/dist/main/toggle-mode.d.ts +0 -8
- package/dist/model/dashboard.d.ts +0 -19153
|
@@ -26,15 +26,15 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
26
26
|
queryID: import("mobx-state-tree").ISimpleType<string>;
|
|
27
27
|
viz: import("mobx-state-tree").IModelType<{
|
|
28
28
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
29
|
-
conf: import("mobx-state-tree").IType<import("
|
|
29
|
+
conf: import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>;
|
|
30
30
|
}, {
|
|
31
31
|
readonly json: {
|
|
32
32
|
type: string;
|
|
33
|
-
conf: import("
|
|
33
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
34
34
|
};
|
|
35
35
|
} & {
|
|
36
36
|
setType(type: string): void;
|
|
37
|
-
setConf(conf: import("
|
|
37
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
38
38
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
39
39
|
}, {
|
|
40
40
|
readonly json: {
|
|
@@ -52,7 +52,7 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
52
52
|
queryID: string;
|
|
53
53
|
viz: {
|
|
54
54
|
type: string;
|
|
55
|
-
conf: import("
|
|
55
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
} & {
|
|
@@ -87,15 +87,15 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
87
87
|
queryID: import("mobx-state-tree").ISimpleType<string>;
|
|
88
88
|
viz: import("mobx-state-tree").IModelType<{
|
|
89
89
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
90
|
-
conf: import("mobx-state-tree").IType<import("
|
|
90
|
+
conf: import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>;
|
|
91
91
|
}, {
|
|
92
92
|
readonly json: {
|
|
93
93
|
type: string;
|
|
94
|
-
conf: import("
|
|
94
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
95
95
|
};
|
|
96
96
|
} & {
|
|
97
97
|
setType(type: string): void;
|
|
98
|
-
setConf(conf: import("
|
|
98
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
99
99
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
100
100
|
}, {
|
|
101
101
|
readonly json: {
|
|
@@ -113,7 +113,7 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
113
113
|
queryID: string;
|
|
114
114
|
viz: {
|
|
115
115
|
type: string;
|
|
116
|
-
conf: import("
|
|
116
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
117
117
|
};
|
|
118
118
|
};
|
|
119
119
|
} & {
|
|
@@ -139,7 +139,7 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
139
139
|
queryID: string;
|
|
140
140
|
viz: {
|
|
141
141
|
type: string;
|
|
142
|
-
conf: import("
|
|
142
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
143
143
|
};
|
|
144
144
|
}[];
|
|
145
145
|
readonly layouts: {
|
|
@@ -195,26 +195,26 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
195
195
|
queryID: string;
|
|
196
196
|
viz: {
|
|
197
197
|
type: string;
|
|
198
|
-
conf: import("
|
|
198
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
199
199
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
200
200
|
readonly json: {
|
|
201
201
|
type: string;
|
|
202
|
-
conf: import("
|
|
202
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
203
203
|
};
|
|
204
204
|
} & {
|
|
205
205
|
setType(type: string): void;
|
|
206
|
-
setConf(conf: import("
|
|
206
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
207
207
|
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
208
208
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
209
|
-
conf: import("mobx-state-tree").IType<import("
|
|
209
|
+
conf: import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>;
|
|
210
210
|
}, {
|
|
211
211
|
readonly json: {
|
|
212
212
|
type: string;
|
|
213
|
-
conf: import("
|
|
213
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
214
214
|
};
|
|
215
215
|
} & {
|
|
216
216
|
setType(type: string): void;
|
|
217
|
-
setConf(conf: import("
|
|
217
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
218
218
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
219
219
|
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
220
220
|
readonly json: {
|
|
@@ -232,7 +232,7 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
232
232
|
queryID: string;
|
|
233
233
|
viz: {
|
|
234
234
|
type: string;
|
|
235
|
-
conf: import("
|
|
235
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
236
236
|
};
|
|
237
237
|
};
|
|
238
238
|
} & {
|
|
@@ -266,15 +266,15 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
266
266
|
queryID: import("mobx-state-tree").ISimpleType<string>;
|
|
267
267
|
viz: import("mobx-state-tree").IModelType<{
|
|
268
268
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
269
|
-
conf: import("mobx-state-tree").IType<import("
|
|
269
|
+
conf: import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>;
|
|
270
270
|
}, {
|
|
271
271
|
readonly json: {
|
|
272
272
|
type: string;
|
|
273
|
-
conf: import("
|
|
273
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
274
274
|
};
|
|
275
275
|
} & {
|
|
276
276
|
setType(type: string): void;
|
|
277
|
-
setConf(conf: import("
|
|
277
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
278
278
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
279
279
|
}, {
|
|
280
280
|
readonly json: {
|
|
@@ -292,7 +292,7 @@ export declare const PanelsModel: import("mobx-state-tree").IModelType<{
|
|
|
292
292
|
queryID: string;
|
|
293
293
|
viz: {
|
|
294
294
|
type: string;
|
|
295
|
-
conf: import("
|
|
295
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
296
296
|
};
|
|
297
297
|
};
|
|
298
298
|
} & {
|
|
File without changes
|
|
@@ -25,15 +25,15 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
|
|
|
25
25
|
queryID: import("mobx-state-tree").ISimpleType<string>;
|
|
26
26
|
viz: import("mobx-state-tree").IModelType<{
|
|
27
27
|
type: import("mobx-state-tree").ISimpleType<string>;
|
|
28
|
-
conf: import("mobx-state-tree").IType<import("
|
|
28
|
+
conf: import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>;
|
|
29
29
|
}, {
|
|
30
30
|
readonly json: {
|
|
31
31
|
type: string;
|
|
32
|
-
conf: import("
|
|
32
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
33
33
|
};
|
|
34
34
|
} & {
|
|
35
35
|
setType(type: string): void;
|
|
36
|
-
setConf(conf: import("
|
|
36
|
+
setConf(conf: import("../../../..").AnyObject): void;
|
|
37
37
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
38
38
|
}, {
|
|
39
39
|
readonly json: {
|
|
@@ -51,7 +51,7 @@ export declare const PanelModel: import("mobx-state-tree").IModelType<{
|
|
|
51
51
|
queryID: string;
|
|
52
52
|
viz: {
|
|
53
53
|
type: string;
|
|
54
|
-
conf: import("
|
|
54
|
+
conf: import("../../../..").AnyObject & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IType<import("../../../..").AnyObject, import("../../../..").AnyObject, import("../../../..").AnyObject>>;
|
|
55
55
|
};
|
|
56
56
|
};
|
|
57
57
|
} & {
|
|
File without changes
|
package/dist/panel/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IDashboardPanel } from '../types/dashboard';
|
|
3
|
+
import { ViewModelInstance } from '..';
|
|
3
4
|
interface IPanel extends IDashboardPanel {
|
|
5
|
+
view: ViewModelInstance;
|
|
4
6
|
}
|
|
5
7
|
export declare const Panel: React.FunctionComponent<IPanel>;
|
|
6
8
|
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { IColorPaletteItem, ISingleColor } from '~/types/plugin';
|
|
1
|
+
import { IColorInterpolation, IColorPaletteItem, ISingleColor } from '~/types/plugin';
|
|
2
2
|
export interface IColorManager {
|
|
3
3
|
getStaticColors(): ISingleColor[];
|
|
4
|
+
getColorInterpolations(): IColorInterpolation[];
|
|
4
5
|
register<T extends IColorPaletteItem>(paletteItem: T): void;
|
|
5
6
|
decodeStaticColor(key: string): ISingleColor | undefined;
|
|
6
|
-
encodeColor(color:
|
|
7
|
+
encodeColor(color: IColorPaletteItem): string;
|
|
8
|
+
decodeInterpolation(key: string): IColorInterpolation | undefined;
|
|
7
9
|
}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import { IColorPaletteItem, IPluginManager, ISingleColor } from '~/types/plugin';
|
|
1
|
+
import { IColorInterpolation, IColorPaletteItem, IPluginManager, ISingleColor } from '~/types/plugin';
|
|
2
2
|
import { IColorManager } from '~/plugins/color-manager';
|
|
3
3
|
export declare class ColorManager implements IColorManager {
|
|
4
4
|
protected staticColors: Map<string, ISingleColor>;
|
|
5
|
+
protected interpolations: Map<string, IColorInterpolation>;
|
|
5
6
|
constructor(pluginManager: IPluginManager);
|
|
6
7
|
getStaticColors(): ISingleColor[];
|
|
7
8
|
register<T extends IColorPaletteItem>(paletteItem: T): void;
|
|
8
9
|
decodeStaticColor(key: string): ISingleColor | undefined;
|
|
9
10
|
encodeColor(color: IColorPaletteItem): string;
|
|
11
|
+
decodeInterpolation(key: string): IColorInterpolation | undefined;
|
|
12
|
+
getColorInterpolations(): IColorInterpolation[];
|
|
10
13
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IValueStep } from '~/types/plugin';
|
|
2
|
+
import { IValueMapper } from './type';
|
|
3
|
+
export declare class MultiStepValueMapper implements IValueMapper {
|
|
4
|
+
steps: IValueStep[];
|
|
5
|
+
constructor(steps: IValueStep[]);
|
|
6
|
+
protected getLinearFunction(p1: IValueStep, p2: IValueStep): (x: number) => number;
|
|
7
|
+
protected getStepFunctionForValue(value: number): (x: number) => number;
|
|
8
|
+
mapValue(from: number): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IColorInterpolation } from '~/types/plugin';
|
|
2
|
+
export { createDivergingColorPalette } from './diverging-color';
|
|
3
|
+
export { createSequentialColorPalette } from './sequential-color';
|
|
4
|
+
export declare const RedGreen: IColorInterpolation;
|
|
5
|
+
export declare const YellowBlue: IColorInterpolation;
|
|
6
|
+
export declare const Red: IColorInterpolation;
|
|
7
|
+
export declare const Green: IColorInterpolation;
|
|
8
|
+
export declare const Blue: IColorInterpolation;
|
|
9
|
+
export declare const Orange: IColorInterpolation;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IColorManager } from '~/plugins';
|
|
3
|
+
import { IColorInterpolationConfig } from '~/types/plugin';
|
|
4
|
+
export interface IColorInterpolationSelectProps {
|
|
5
|
+
colorManager: IColorManager;
|
|
6
|
+
value: IColorInterpolationConfig;
|
|
7
|
+
onChange?: (value: IColorInterpolationConfig) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ColorInterpolationSelect: (props: IColorInterpolationSelectProps) => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IColorInterpolation, IValueStep } from '~/types/plugin';
|
|
3
|
+
export interface IColorMappingEditorProps {
|
|
4
|
+
steps: IValueStep[];
|
|
5
|
+
onChange?: (steps: IValueStep[]) => void;
|
|
6
|
+
interpolation: IColorInterpolation;
|
|
7
|
+
}
|
|
8
|
+
export declare const ColorMappingEditor: React.FunctionComponent<IColorMappingEditorProps>;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const useStyles: (params: void, options?: import("@mantine/core").UseStylesOptions<"palette" | "paletteItem"> | undefined) => {
|
|
2
|
+
classes: Record<"palette" | "paletteItem", string>;
|
|
3
|
+
cx: (...args: any) => string;
|
|
4
|
+
theme: import("@mantine/core").MantineTheme;
|
|
5
|
+
};
|
|
6
|
+
export declare type StylesType = ReturnType<typeof useStyles>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CellBackgroundColorType } from '~/plugins/viz-components/table/type';
|
|
3
|
+
export interface IBackgroundColorSelectProps {
|
|
4
|
+
value?: CellBackgroundColorType;
|
|
5
|
+
onChange?: (value: CellBackgroundColorType) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const BackgroundColorSelect: (props: IBackgroundColorSelectProps) => JSX.Element;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
|
+
import { IColorInterpolationConfig } from '~/types/plugin';
|
|
1
2
|
export declare enum ValueType {
|
|
2
3
|
string = "string",
|
|
3
4
|
number = "number",
|
|
4
5
|
eloc = "eloc",
|
|
5
6
|
percentage = "percentage"
|
|
6
7
|
}
|
|
8
|
+
export declare type CellBackgroundColorType = string | IColorInterpolationConfig;
|
|
7
9
|
export interface IColumnConf {
|
|
8
10
|
label: string;
|
|
9
11
|
value_field: string;
|
|
10
12
|
value_type: ValueType;
|
|
13
|
+
cellBackgroundColor?: CellBackgroundColorType;
|
|
11
14
|
}
|
|
12
15
|
export interface ITableConf {
|
|
13
16
|
id_field: string;
|
|
@@ -23,4 +26,5 @@ export declare const DEFAULT_CONFIG: ITableConf;
|
|
|
23
26
|
export interface ITableCellContext {
|
|
24
27
|
getClickHandler(): (() => void) | undefined;
|
|
25
28
|
isClickable(): boolean;
|
|
29
|
+
bgColor: string | undefined;
|
|
26
30
|
}
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.viz-root{width:100%;overflow:scroll;padding-top:5px;height:calc(100% - 25px);background-color:#fff}.panel-title-wrapper{text-align:center;transition:background-color .3s ease}.panel-title-wrapper:hover{cursor:pointer;background-color:#6464640d}.panel-root{padding:5px;height:100%;width:100%;max-width:100%;background:transparent;border-radius:
|
|
1
|
+
.filter-settings-tabs{width:100%;height:100%}.filter-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.filter-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.filter-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.viz-root{width:100%;overflow:scroll;padding-top:5px;height:calc(100% - 25px);background-color:#fff}.panel-title-wrapper{text-align:center;transition:background-color .3s ease}.panel-title-wrapper:hover{cursor:pointer;background-color:#6464640d}.panel-root{padding:5px;height:100%;width:100%;max-width:100%;background:transparent;border-radius:4px;border:1px solid #ced4da}.panel-settings-tabs{width:100%;height:100%}.panel-settings-tabs .mantine-Tabs-panel{height:calc(100% - 25px)}.panel-settings-tabs .mantine-Tabs-tabsListWrapper{flex:0}.panel-settings-tabs .mantine-Tabs-body{flex:1;overflow:scroll}.dashboard-layout{margin-left:-10px;margin-right:-10px}.react-grid-item{padding:0}.remove-panel{position:absolute;right:2px;top:0;cursor:pointer}.code-textarea textarea{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.dashboard-root{overflow:scroll;padding:0 10px 10px;height:100%}.dashboard-sticky-area{z-index:100;background:white;margin:0 -10px;padding:0 10px 10px}
|
|
@@ -29,11 +29,22 @@ export interface IDashboardDefinition {
|
|
|
29
29
|
sqlSnippets: SQLSnippetModelInstance[];
|
|
30
30
|
queries: QueryModelInstance[];
|
|
31
31
|
}
|
|
32
|
+
export declare enum EViewComponentType {
|
|
33
|
+
Division = "div",
|
|
34
|
+
Modal = "modal"
|
|
35
|
+
}
|
|
36
|
+
export interface IDashboardView {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
type: EViewComponentType;
|
|
40
|
+
config: Record<string, any>;
|
|
41
|
+
panels: IDashboardPanel[];
|
|
42
|
+
}
|
|
32
43
|
export interface IDashboard {
|
|
33
44
|
id: string;
|
|
34
45
|
name: string;
|
|
35
46
|
definition: IDashboardDefinition;
|
|
36
|
-
|
|
47
|
+
views: IDashboardView[];
|
|
37
48
|
filters: FilterModelInstance[];
|
|
38
49
|
}
|
|
39
50
|
export interface IDashboardConfig {
|
|
@@ -37,9 +37,14 @@ export interface ISingleColor extends IColorPaletteItem {
|
|
|
37
37
|
type: 'single';
|
|
38
38
|
value: string;
|
|
39
39
|
}
|
|
40
|
-
export interface
|
|
40
|
+
export interface IColorInterpolation extends IColorPaletteItem {
|
|
41
41
|
type: 'interpolation';
|
|
42
|
-
|
|
42
|
+
displayName: string;
|
|
43
|
+
/**
|
|
44
|
+
* Map a value (0-100) to a color
|
|
45
|
+
* @param value
|
|
46
|
+
*/
|
|
47
|
+
getColor: (value: number) => string;
|
|
43
48
|
}
|
|
44
49
|
export interface ColorPalette {
|
|
45
50
|
getColor(colorInfo: IColorPaletteItem): (value: unknown) => string;
|
|
@@ -184,4 +189,12 @@ export interface IVizInteractionManager {
|
|
|
184
189
|
removeInteraction(interactionId: string): Promise<void>;
|
|
185
190
|
runInteraction(triggerId: string, payload: Record<string, unknown>): Promise<void>;
|
|
186
191
|
}
|
|
192
|
+
export interface IValueStep {
|
|
193
|
+
from: number;
|
|
194
|
+
to: number;
|
|
195
|
+
}
|
|
196
|
+
export interface IColorInterpolationConfig {
|
|
197
|
+
steps: IValueStep[];
|
|
198
|
+
interpolation: string;
|
|
199
|
+
}
|
|
187
200
|
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ViewModelInstance } from '~/model';
|
|
3
|
+
interface IMainDashboardLayout {
|
|
4
|
+
view: ViewModelInstance;
|
|
5
|
+
className?: string;
|
|
6
|
+
rowHeight?: number;
|
|
7
|
+
isDraggable: boolean;
|
|
8
|
+
isResizable: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const MainDashboardLayout: React.FunctionComponent<IMainDashboardLayout>;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ViewModelInstance } from '..';
|
|
3
|
+
interface IMainDashboardView {
|
|
4
|
+
view: ViewModelInstance;
|
|
5
|
+
saveDashboardChanges: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const MainDashboardView: import("react").FunctionComponent<IMainDashboardView>;
|
|
8
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.6.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@tanstack/react-table": "^8.5.13",
|
|
35
|
+
"@types/chroma-js": "^2.1.4",
|
|
36
|
+
"chroma-js": "^2.4.2",
|
|
35
37
|
"eventemitter2": "^6.4.6",
|
|
36
38
|
"file-saver": "2.0.5",
|
|
37
39
|
"jszip": "3.10.1",
|