@devtable/dashboard 6.8.0 → 6.10.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 +15558 -5809
- package/dist/dashboard.umd.js +78 -22
- package/dist/filter/filter-tree-select/editor.d.ts +7 -0
- package/dist/filter/filter-tree-select/expected-structure.d.ts +2 -0
- package/dist/filter/filter-tree-select/render/index.d.ts +12 -0
- package/dist/filter/filter-tree-select/render/query-data-to-tree.d.ts +2 -0
- package/dist/filter/filter-tree-select/render/switcher-icon.d.ts +3 -0
- package/dist/filter/filter-tree-select/render/tree-icon.d.ts +3 -0
- package/dist/filter/filter-tree-select/render/widget.d.ts +14 -0
- package/dist/filter/filter-tree-select/render/widget.styles.d.ts +10 -0
- package/dist/filter/filter-tree-select/types.d.ts +5 -0
- package/dist/model/filters/filter/common.d.ts +1 -0
- package/dist/model/filters/filter/tree-select.d.ts +90 -0
- package/dist/plugins/viz-components/cartesian/index.d.ts +1 -1
- package/dist/plugins/viz-components/cartesian/panel/reference-lines/index.d.ts +1 -1
- package/dist/plugins/viz-components/cartesian/panel/reference-lines/reference-line.d.ts +3 -2
- package/dist/plugins/viz-components/cartesian/panel/x-axis/x-axis-label-formatter/function-editor.d.ts +8 -0
- package/dist/plugins/viz-components/cartesian/panel/x-axis/x-axis-label-formatter/get-echarts-x-axis-tick-label.d.ts +2 -0
- package/dist/plugins/viz-components/cartesian/panel/x-axis/x-axis-label-formatter/index.d.ts +10 -0
- package/dist/plugins/viz-components/cartesian/panel/x-axis/x-axis-label-formatter/types.d.ts +8 -0
- package/dist/plugins/viz-components/cartesian/type.d.ts +3 -0
- package/package.json +3 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { IFilterConfig_TreeSelect } from '../../model/filters/filter/tree-select';
|
|
3
|
+
interface IFilterEditorTreeSelect {
|
|
4
|
+
config: IFilterConfig_TreeSelect;
|
|
5
|
+
}
|
|
6
|
+
export declare const FilterEditorTreeSelect: import("react").FunctionComponent<IFilterEditorTreeSelect>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { FilterModelInstance } from '../../../model';
|
|
3
|
+
import { IFilterConfig_TreeSelect } from '../../../model/filters/filter/tree-select';
|
|
4
|
+
interface IFilterTreeSelect extends Omit<FilterModelInstance, 'key' | 'type' | 'config'> {
|
|
5
|
+
config: IFilterConfig_TreeSelect;
|
|
6
|
+
value: $TSFixMe;
|
|
7
|
+
onChange: (v: $TSFixMe) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const FilterTreeSelect: (({ label, config, value, onChange }: IFilterTreeSelect) => JSX.Element) & {
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { DefaultProps, MantineNumberSize, Selectors } from '@mantine/core';
|
|
3
|
+
import useStyles, { TreeSelectWidgetStylesParams } from './widget.styles';
|
|
4
|
+
declare type MyComponentStylesNames = Selectors<typeof useStyles>;
|
|
5
|
+
interface IFilterTreeSelectWidget extends DefaultProps<MyComponentStylesNames, TreeSelectWidgetStylesParams> {
|
|
6
|
+
radius?: MantineNumberSize;
|
|
7
|
+
style?: Record<string, any>;
|
|
8
|
+
label: string;
|
|
9
|
+
value: string[];
|
|
10
|
+
onChange: (v: string[]) => void;
|
|
11
|
+
treeData: $TSFixMe;
|
|
12
|
+
}
|
|
13
|
+
export declare const FilterTreeSelectWidget: ({ classNames, styles, unstyled, radius, style, label, value, onChange, treeData, }: IFilterTreeSelectWidget) => JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MantineNumberSize } from '@mantine/core';
|
|
2
|
+
export interface TreeSelectWidgetStylesParams {
|
|
3
|
+
radius?: MantineNumberSize;
|
|
4
|
+
}
|
|
5
|
+
declare const _default: (params: TreeSelectWidgetStylesParams, options?: import("@mantine/core").UseStylesOptions<"label" | "root" | "dropdown"> | undefined) => {
|
|
6
|
+
classes: Record<"label" | "root" | "dropdown", string>;
|
|
7
|
+
cx: (...args: any) => string;
|
|
8
|
+
theme: import("@mantine/core").MantineTheme;
|
|
9
|
+
};
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { Instance } from 'mobx-state-tree';
|
|
2
|
+
export declare const FilterConfigModel_TreeSelect: import("mobx-state-tree").IModelType<{
|
|
3
|
+
_name: import("mobx-state-tree").ISimpleType<"tree-select">;
|
|
4
|
+
default_value: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
5
|
+
min_width: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
+
} & {
|
|
7
|
+
static_options: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
8
|
+
label: import("mobx-state-tree").ISimpleType<string>;
|
|
9
|
+
value: import("mobx-state-tree").ISimpleType<string>;
|
|
10
|
+
}, {
|
|
11
|
+
setLabel(label: string): void;
|
|
12
|
+
setValue(value: string): void;
|
|
13
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
|
|
14
|
+
options_query_id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
15
|
+
select_first_by_default: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
16
|
+
}, {
|
|
17
|
+
readonly options: any;
|
|
18
|
+
} & {
|
|
19
|
+
addStaticOption(option: {
|
|
20
|
+
label: string;
|
|
21
|
+
value: string;
|
|
22
|
+
}): void;
|
|
23
|
+
removeStaticOption(index: number): void;
|
|
24
|
+
setSelectFirstByDefault(v: boolean): void;
|
|
25
|
+
setOptionsQueryID(id: string): void;
|
|
26
|
+
} & {
|
|
27
|
+
setDefaultValue(default_value: string[]): void;
|
|
28
|
+
setMinWidth(v: string): void;
|
|
29
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
30
|
+
export declare type IFilterConfig_TreeSelect = Instance<typeof FilterConfigModel_TreeSelect>;
|
|
31
|
+
export declare const createFilterConfig_TreeSelect: () => {
|
|
32
|
+
_name: "tree-select";
|
|
33
|
+
default_value: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").ISimpleType<string>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>>;
|
|
34
|
+
min_width: string;
|
|
35
|
+
static_options: import("mobx-state-tree").IMSTArray<import("mobx-state-tree").IModelType<{
|
|
36
|
+
label: import("mobx-state-tree").ISimpleType<string>;
|
|
37
|
+
value: import("mobx-state-tree").ISimpleType<string>;
|
|
38
|
+
}, {
|
|
39
|
+
setLabel(label: string): void;
|
|
40
|
+
setValue(value: string): void;
|
|
41
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>> & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
42
|
+
label: import("mobx-state-tree").ISimpleType<string>;
|
|
43
|
+
value: import("mobx-state-tree").ISimpleType<string>;
|
|
44
|
+
}, {
|
|
45
|
+
setLabel(label: string): void;
|
|
46
|
+
setValue(value: string): void;
|
|
47
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>>;
|
|
48
|
+
options_query_id: string;
|
|
49
|
+
select_first_by_default: boolean;
|
|
50
|
+
} & import("mobx-state-tree/dist/internal").NonEmptyObject & {
|
|
51
|
+
readonly options: any;
|
|
52
|
+
} & {
|
|
53
|
+
addStaticOption(option: {
|
|
54
|
+
label: string;
|
|
55
|
+
value: string;
|
|
56
|
+
}): void;
|
|
57
|
+
removeStaticOption(index: number): void;
|
|
58
|
+
setSelectFirstByDefault(v: boolean): void;
|
|
59
|
+
setOptionsQueryID(id: string): void;
|
|
60
|
+
} & {
|
|
61
|
+
setDefaultValue(default_value: string[]): void;
|
|
62
|
+
setMinWidth(v: string): void;
|
|
63
|
+
} & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IModelType<{
|
|
64
|
+
_name: import("mobx-state-tree").ISimpleType<"tree-select">;
|
|
65
|
+
default_value: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
66
|
+
min_width: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
67
|
+
} & {
|
|
68
|
+
static_options: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
69
|
+
label: import("mobx-state-tree").ISimpleType<string>;
|
|
70
|
+
value: import("mobx-state-tree").ISimpleType<string>;
|
|
71
|
+
}, {
|
|
72
|
+
setLabel(label: string): void;
|
|
73
|
+
setValue(value: string): void;
|
|
74
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>, [undefined]>;
|
|
75
|
+
options_query_id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
76
|
+
select_first_by_default: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<boolean>, [undefined]>;
|
|
77
|
+
}, {
|
|
78
|
+
readonly options: any;
|
|
79
|
+
} & {
|
|
80
|
+
addStaticOption(option: {
|
|
81
|
+
label: string;
|
|
82
|
+
value: string;
|
|
83
|
+
}): void;
|
|
84
|
+
removeStaticOption(index: number): void;
|
|
85
|
+
setSelectFirstByDefault(v: boolean): void;
|
|
86
|
+
setOptionsQueryID(id: string): void;
|
|
87
|
+
} & {
|
|
88
|
+
setDefaultValue(default_value: string[]): void;
|
|
89
|
+
setMinWidth(v: string): void;
|
|
90
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { VizComponent } from '~/types/plugin';
|
|
2
2
|
import { VersionBasedMigrator } from '~/plugins/plugin-data-migrator';
|
|
3
3
|
export declare class VizCartesianMigrator extends VersionBasedMigrator {
|
|
4
|
-
readonly VERSION =
|
|
4
|
+
readonly VERSION = 3;
|
|
5
5
|
configVersions(): void;
|
|
6
6
|
}
|
|
7
7
|
export declare const CartesianVizComponent: VizComponent;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { Control, UseFormWatch } from 'react-hook-form';
|
|
3
|
-
import { ICartesianChartConf } from '../../type';
|
|
4
3
|
import { ITemplateVariable } from '~/utils/template';
|
|
4
|
+
import { ICartesianChartConf } from '../../type';
|
|
5
5
|
interface IReferenceLinesField {
|
|
6
6
|
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
7
7
|
watch: UseFormWatch<ICartesianChartConf>;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Control, UseFieldArrayRemove } from 'react-hook-form';
|
|
2
|
+
import { Control, UseFieldArrayRemove, UseFormWatch } from 'react-hook-form';
|
|
3
3
|
import { ICartesianChartConf } from '../../type';
|
|
4
4
|
interface IReferenceLineField {
|
|
5
5
|
control: Control<ICartesianChartConf, $TSFixMe>;
|
|
6
6
|
index: number;
|
|
7
|
+
watch: UseFormWatch<ICartesianChartConf>;
|
|
7
8
|
remove: UseFieldArrayRemove;
|
|
8
9
|
variableOptions: {
|
|
9
10
|
label: string;
|
|
10
11
|
value: string;
|
|
11
12
|
}[];
|
|
12
13
|
}
|
|
13
|
-
export declare function ReferenceLineField({ control, index, remove, variableOptions }: IReferenceLineField): JSX.Element;
|
|
14
|
+
export declare function ReferenceLineField({ control, index, remove, watch, variableOptions }: IReferenceLineField): JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface IXAxisLabelFormatterFunctionEditor {
|
|
3
|
+
disabled: boolean;
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (v: string) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const XAxisLabelFormatterFunctionEditor: ({ disabled, value, onChange, }: IXAxisLabelFormatterFunctionEditor) => JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AnyObject } from '~/types';
|
|
3
|
+
import { IXAxisLabelFormatter } from './types';
|
|
4
|
+
interface IXAxisLabelFormatterField {
|
|
5
|
+
value: IXAxisLabelFormatter;
|
|
6
|
+
onChange: (v: IXAxisLabelFormatter) => void;
|
|
7
|
+
data: AnyObject[];
|
|
8
|
+
}
|
|
9
|
+
export declare const XAxisLabelFormatterField: ({ value, onChange, data }: IXAxisLabelFormatterField) => JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TNumbroFormat } from '~/panel/settings/common/numbro-format-selector';
|
|
2
2
|
import { TScatterSize } from './panel/scatter-size-select/types';
|
|
3
|
+
import { IXAxisLabelFormatter } from './panel/x-axis/x-axis-label-formatter/types';
|
|
3
4
|
export interface ICartesianChartSeriesItem {
|
|
4
5
|
type: 'line' | 'bar' | 'scatter';
|
|
5
6
|
name: string;
|
|
@@ -54,6 +55,7 @@ export interface ICartesianReferenceLine {
|
|
|
54
55
|
name: string;
|
|
55
56
|
template: string;
|
|
56
57
|
variable_key: string;
|
|
58
|
+
orientation: 'horizontal' | 'vertical';
|
|
57
59
|
}
|
|
58
60
|
export interface ICartesianReferenceArea {
|
|
59
61
|
name: string;
|
|
@@ -72,6 +74,7 @@ export interface ICartesianChartConf {
|
|
|
72
74
|
x_axis: {
|
|
73
75
|
axisLabel: {
|
|
74
76
|
rotate: number;
|
|
77
|
+
formatter: IXAxisLabelFormatter;
|
|
75
78
|
};
|
|
76
79
|
};
|
|
77
80
|
series: ICartesianChartSeriesItem[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtable/dashboard",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.10.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -33,8 +33,10 @@
|
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@types/chroma-js": "^2.1.4",
|
|
35
35
|
"file-saver": "2.0.5",
|
|
36
|
+
"performant-array-to-tree": "1.11.0",
|
|
36
37
|
"popmotion": "^11.0.3",
|
|
37
38
|
"@monaco-editor/react": "4.4.6",
|
|
39
|
+
"rc-tree-select": "5.5.5",
|
|
38
40
|
"stickybits": "3.7.11"
|
|
39
41
|
},
|
|
40
42
|
"devDependencies": {
|