@devtable/dashboard 13.44.2 → 14.0.1
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/api-caller/index.d.ts +7 -0
- package/dist/api-caller/request.d.ts +21 -0
- package/dist/api-caller/types.d.ts +8 -1
- package/dist/components/filter/filter-select/editor/editor.d.ts +8 -0
- package/dist/components/filter/filter-select/editor/index.d.ts +1 -0
- package/dist/components/filter/filter-select/editor/preset-option-series.d.ts +2 -0
- package/dist/components/filter/filter-select/editor/static-options.d.ts +8 -0
- package/dist/components/panel/panel-render/full-screen-render/use-panel-full-screen.d.ts +7636 -336
- package/dist/components/plugins/plugin-context.d.ts +7636 -336
- package/dist/contexts/panel-context.d.ts +15113 -513
- package/dist/dashboard-editor/model/datasources/datasource.d.ts +166 -71
- package/dist/dashboard-editor/model/datasources/db-info/db-info.d.ts +84 -0
- package/dist/dashboard-editor/model/datasources/db-info/index.d.ts +1 -0
- package/dist/dashboard-editor/model/datasources/{table-data.d.ts → db-info/table-data.d.ts} +1 -1
- package/dist/dashboard-editor/model/datasources/index.d.ts +785 -242
- package/dist/dashboard-editor/model/datasources/mm-info/index.d.ts +4 -0
- package/dist/dashboard-editor/model/datasources/mm-info/metric-detail.d.ts +63 -0
- package/dist/dashboard-editor/model/datasources/mm-info/metric-detail.types.d.ts +50 -0
- package/dist/dashboard-editor/model/datasources/mm-info/metric-detail.utils.d.ts +46 -0
- package/dist/dashboard-editor/model/datasources/mm-info/metrics.d.ts +24 -0
- package/dist/dashboard-editor/model/datasources/mm-info/mm-info.d.ts +96 -0
- package/dist/dashboard-editor/model/panels/panel.d.ts +3727 -77
- package/dist/dashboard-editor/model/queries/queries.d.ts +4514 -118
- package/dist/dashboard-editor/model/queries/query.d.ts +251 -12
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/merico-icons/play.d.ts +1 -1
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/dimension-selector/dimension-icon/dimension-icon.d.ts +2 -2
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/dimension-selector/dimension-icon/dimension.d.ts +1 -0
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/dimension-selector/dimension-selector.d.ts +4 -4
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/dimension-selector/styles.d.ts +60 -0
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/set-groupby-metrics.d.ts +1 -1
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/variable-selector.d.ts +2 -1
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/preview-metric-query.d.ts +8 -0
- package/dist/dashboard.es.js +10964 -10233
- package/dist/dashboard.umd.js +110 -109
- package/dist/i18n/en.d.ts +4 -0
- package/dist/i18n/zh.d.ts +4 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/multi-select.d.ts +6 -12
- package/dist/model/meta-model/dashboard/content/filter/widgets/select-base.d.ts +4 -4
- package/dist/model/meta-model/dashboard/content/filter/widgets/select.d.ts +6 -12
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-select-base.d.ts +2 -4
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-select.d.ts +6 -12
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-single-select.d.ts +6 -12
- package/dist/model/meta-model/dashboard/content/initial-content.d.ts +1 -1
- package/dist/model/meta-model/dashboard/content/query/db-query.d.ts +42 -0
- package/dist/model/meta-model/dashboard/content/query/http-query.d.ts +39 -0
- package/dist/model/meta-model/dashboard/content/query/index.d.ts +1 -0
- package/dist/model/meta-model/dashboard/content/query/merico-metric-query.d.ts +237 -0
- package/dist/model/meta-model/dashboard/content/query/query.d.ts +231 -12
- package/dist/model/meta-model/dashboard/content/query/transform-query.d.ts +39 -0
- package/dist/model/meta-model/datasources/datasources.d.ts +1 -1
- package/dist/model/render-model/dashboard/content/panels/panel.d.ts +3727 -77
- package/dist/model/render-model/dashboard/content/queries/mute-query.d.ts +254 -13
- package/dist/model/render-model/dashboard/content/queries/queries.d.ts +2781 -70
- package/dist/model/render-model/dashboard/content/queries/query.d.ts +251 -12
- package/dist/stats.html +1 -1
- package/dist/version.json +2 -2
- package/package.json +1 -1
- package/dist/components/filter/filter-select/editor.d.ts +0 -7
- package/dist/dashboard-editor/ui/settings/content/edit-query/merico-metric-query-editor-form/query-tabs/edit-metric-query/dimension-selector/type.d.ts +0 -8
- /package/dist/dashboard-editor/model/datasources/{columns.d.ts → db-info/columns.d.ts} +0 -0
- /package/dist/dashboard-editor/model/datasources/{indexes.d.ts → db-info/indexes.d.ts} +0 -0
- /package/dist/dashboard-editor/model/datasources/{tables.d.ts → db-info/tables.d.ts} +0 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { CombinedMetricCol, MetricDetail, MetricSourceCol } from './metric-detail.types';
|
|
2
|
+
import { MetricGroupByColOption } from './metric-detail.utils';
|
|
3
|
+
export declare const MetricDetailModel: import("mobx-state-tree").IModelType<{
|
|
4
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<MetricDetail | null, MetricDetail | null, MetricDetail | null>, [undefined]>;
|
|
5
|
+
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<(MetricSourceCol | CombinedMetricCol)[], (MetricSourceCol | CombinedMetricCol)[], (MetricSourceCol | CombinedMetricCol)[]>, [undefined]>;
|
|
6
|
+
groupBys: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<(MetricSourceCol | CombinedMetricCol)[], (MetricSourceCol | CombinedMetricCol)[], (MetricSourceCol | CombinedMetricCol)[]>, [undefined]>;
|
|
7
|
+
trendingDateCol: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<MetricSourceCol | null, MetricSourceCol | null, MetricSourceCol | null>, [undefined]>;
|
|
8
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
|
+
error: import("mobx-state-tree").IType<any, any, any>;
|
|
10
|
+
}, {
|
|
11
|
+
controller: AbortController;
|
|
12
|
+
} & {
|
|
13
|
+
readonly loading: boolean;
|
|
14
|
+
readonly hasData: boolean;
|
|
15
|
+
readonly mmInfo: any;
|
|
16
|
+
readonly metricID: string;
|
|
17
|
+
readonly metric: any;
|
|
18
|
+
readonly metricType: any;
|
|
19
|
+
readonly filterColOptions: {
|
|
20
|
+
group: string;
|
|
21
|
+
items: ({
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
dimension: null;
|
|
25
|
+
colType: "dimension" | "value_col" | "dimension_col";
|
|
26
|
+
dataType: import("./metric-detail.types").DimensionColDataType;
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
group?: undefined;
|
|
30
|
+
items?: undefined;
|
|
31
|
+
} | {
|
|
32
|
+
group: string;
|
|
33
|
+
description: string;
|
|
34
|
+
items: {
|
|
35
|
+
id: string;
|
|
36
|
+
description: string;
|
|
37
|
+
field: string;
|
|
38
|
+
dataType: import("./metric-detail.types").DimensionColDataType;
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
}[];
|
|
42
|
+
})[];
|
|
43
|
+
}[];
|
|
44
|
+
readonly groupByColOptions: MetricGroupByColOption[];
|
|
45
|
+
readonly flatGroupByColOptions: {
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
description: string;
|
|
49
|
+
dataType: "dimension" | import("./metric-detail.types").DimensionColDataType;
|
|
50
|
+
dimension: import("./metric-detail.types").DimensionInfo | null;
|
|
51
|
+
}[];
|
|
52
|
+
getGroupByOptions(values: string[]): {
|
|
53
|
+
label: string;
|
|
54
|
+
value: string;
|
|
55
|
+
description: string;
|
|
56
|
+
dataType: "dimension" | import("./metric-detail.types").DimensionColDataType;
|
|
57
|
+
dimension: import("./metric-detail.types").DimensionInfo | null;
|
|
58
|
+
}[];
|
|
59
|
+
} & {
|
|
60
|
+
load: () => Promise<void>;
|
|
61
|
+
} & {
|
|
62
|
+
afterCreate(): void;
|
|
63
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export type DimensionInfo = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
fields: {
|
|
5
|
+
id: string;
|
|
6
|
+
description: string;
|
|
7
|
+
field: string;
|
|
8
|
+
dataType: DimensionColDataType;
|
|
9
|
+
}[];
|
|
10
|
+
};
|
|
11
|
+
export type MetricSourceCol_Simple = {
|
|
12
|
+
id: string;
|
|
13
|
+
colType: 'value_col' | 'dimension_col' | 'dimension';
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
dataType: DimensionColDataType;
|
|
17
|
+
dimension: null;
|
|
18
|
+
};
|
|
19
|
+
export type MetricSourceCol_Dimension = {
|
|
20
|
+
id: string;
|
|
21
|
+
colType: 'dimension';
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
dataType: null;
|
|
25
|
+
dimension: DimensionInfo;
|
|
26
|
+
};
|
|
27
|
+
export type MetricSourceCol = MetricSourceCol_Simple | MetricSourceCol_Dimension;
|
|
28
|
+
export type DimensionColDataType = 'number' | 'string' | 'date' | 'boolean';
|
|
29
|
+
export type DimensionCol = {
|
|
30
|
+
id: string;
|
|
31
|
+
type: 'filter' | 'group_by' | 'default_filter' | 'trending_date_col';
|
|
32
|
+
defaultFilterComparison: any | null;
|
|
33
|
+
dimensionFieldId: string | null;
|
|
34
|
+
metricSourceCol: MetricSourceCol;
|
|
35
|
+
};
|
|
36
|
+
export type DerivedMetric = {
|
|
37
|
+
id: string;
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
cols: DimensionCol[];
|
|
41
|
+
};
|
|
42
|
+
export type CombinedMetricCol = Omit<MetricSourceCol_Simple, 'id'> | Omit<MetricSourceCol_Dimension, 'id'>;
|
|
43
|
+
export type CombinedMetric = {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
filters: CombinedMetricCol[];
|
|
48
|
+
groupBys: CombinedMetricCol[];
|
|
49
|
+
};
|
|
50
|
+
export type MetricDetail = DerivedMetric | CombinedMetric;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { CombinedMetricCol, DimensionColDataType, DimensionInfo, MetricDetail, MetricSourceCol } from './metric-detail.types';
|
|
2
|
+
export declare function parseData(data: MetricDetail): {
|
|
3
|
+
filters: MetricSourceCol[];
|
|
4
|
+
groupBys: MetricSourceCol[];
|
|
5
|
+
trendingDateCol: MetricSourceCol | null;
|
|
6
|
+
} | {
|
|
7
|
+
filters: CombinedMetricCol[];
|
|
8
|
+
groupBys: CombinedMetricCol[];
|
|
9
|
+
trendingDateCol: null;
|
|
10
|
+
};
|
|
11
|
+
export declare function makeFilterColOptions(cols: Array<CombinedMetricCol | MetricSourceCol>): {
|
|
12
|
+
group: string;
|
|
13
|
+
items: ({
|
|
14
|
+
name: string;
|
|
15
|
+
description: string;
|
|
16
|
+
dimension: null;
|
|
17
|
+
colType: "dimension" | "value_col" | "dimension_col";
|
|
18
|
+
dataType: DimensionColDataType;
|
|
19
|
+
label: string;
|
|
20
|
+
value: string;
|
|
21
|
+
group?: undefined;
|
|
22
|
+
items?: undefined;
|
|
23
|
+
} | {
|
|
24
|
+
group: string;
|
|
25
|
+
description: string;
|
|
26
|
+
items: {
|
|
27
|
+
id: string;
|
|
28
|
+
description: string;
|
|
29
|
+
field: string;
|
|
30
|
+
dataType: DimensionColDataType;
|
|
31
|
+
label: string;
|
|
32
|
+
value: string;
|
|
33
|
+
}[];
|
|
34
|
+
})[];
|
|
35
|
+
}[];
|
|
36
|
+
export type MetricGroupByColOption = {
|
|
37
|
+
group: string;
|
|
38
|
+
items: {
|
|
39
|
+
label: string;
|
|
40
|
+
value: string;
|
|
41
|
+
description: string;
|
|
42
|
+
dataType: DimensionColDataType | 'dimension';
|
|
43
|
+
dimension: DimensionInfo | null;
|
|
44
|
+
}[];
|
|
45
|
+
};
|
|
46
|
+
export declare function makeGroupByColOptions(cols: Array<CombinedMetricCol | MetricSourceCol>): MetricGroupByColOption[];
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export type MetricBriefInfo = {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
type: 'derived' | 'combined';
|
|
6
|
+
};
|
|
7
|
+
export declare const MetricsModel: import("mobx-state-tree").IModelType<{
|
|
8
|
+
keyword: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
9
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<MetricBriefInfo[], MetricBriefInfo[], MetricBriefInfo[]>, [undefined]>;
|
|
10
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
11
|
+
error: import("mobx-state-tree").IType<any, any, any>;
|
|
12
|
+
}, {
|
|
13
|
+
controller: AbortController;
|
|
14
|
+
} & {
|
|
15
|
+
readonly loading: boolean;
|
|
16
|
+
readonly empty: boolean;
|
|
17
|
+
readonly mmInfo: any;
|
|
18
|
+
} & {
|
|
19
|
+
setKeyword(v: string): void;
|
|
20
|
+
} & {
|
|
21
|
+
load: () => Promise<void>;
|
|
22
|
+
} & {
|
|
23
|
+
afterCreate(): void;
|
|
24
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { Instance } from 'mobx-state-tree';
|
|
2
|
+
import { TAdditionalQueryInfo } from '../../../../api-caller/request';
|
|
3
|
+
export declare const MMInfoModel: import("mobx-state-tree").IModelType<{
|
|
4
|
+
metrics: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
5
|
+
keyword: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
6
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("./metrics").MetricBriefInfo[], import("./metrics").MetricBriefInfo[], import("./metrics").MetricBriefInfo[]>, [undefined]>;
|
|
7
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
8
|
+
error: import("mobx-state-tree").IType<any, any, any>;
|
|
9
|
+
}, {
|
|
10
|
+
controller: AbortController;
|
|
11
|
+
} & {
|
|
12
|
+
readonly loading: boolean;
|
|
13
|
+
readonly empty: boolean;
|
|
14
|
+
readonly mmInfo: any;
|
|
15
|
+
} & {
|
|
16
|
+
setKeyword(v: string): void;
|
|
17
|
+
} & {
|
|
18
|
+
load: () => Promise<void>;
|
|
19
|
+
} & {
|
|
20
|
+
afterCreate(): void;
|
|
21
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
22
|
+
metricDetail: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IModelType<{
|
|
23
|
+
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("./metric-detail.types").MetricDetail | null, import("./metric-detail.types").MetricDetail | null, import("./metric-detail.types").MetricDetail | null>, [undefined]>;
|
|
24
|
+
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<(import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[], (import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[], (import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[]>, [undefined]>;
|
|
25
|
+
groupBys: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<(import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[], (import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[], (import("./metric-detail.types").MetricSourceCol | import("./metric-detail.types").CombinedMetricCol)[]>, [undefined]>;
|
|
26
|
+
trendingDateCol: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<import("./metric-detail.types").MetricSourceCol | null, import("./metric-detail.types").MetricSourceCol | null, import("./metric-detail.types").MetricSourceCol | null>, [undefined]>;
|
|
27
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
28
|
+
error: import("mobx-state-tree").IType<any, any, any>;
|
|
29
|
+
}, {
|
|
30
|
+
controller: AbortController;
|
|
31
|
+
} & {
|
|
32
|
+
readonly loading: boolean;
|
|
33
|
+
readonly hasData: boolean;
|
|
34
|
+
readonly mmInfo: any;
|
|
35
|
+
readonly metricID: string;
|
|
36
|
+
readonly metric: any;
|
|
37
|
+
readonly metricType: any;
|
|
38
|
+
readonly filterColOptions: {
|
|
39
|
+
group: string;
|
|
40
|
+
items: ({
|
|
41
|
+
name: string;
|
|
42
|
+
description: string;
|
|
43
|
+
dimension: null;
|
|
44
|
+
colType: "dimension" | "value_col" | "dimension_col";
|
|
45
|
+
dataType: import("./metric-detail.types").DimensionColDataType;
|
|
46
|
+
label: string;
|
|
47
|
+
value: string;
|
|
48
|
+
group?: undefined;
|
|
49
|
+
items?: undefined;
|
|
50
|
+
} | {
|
|
51
|
+
group: string;
|
|
52
|
+
description: string;
|
|
53
|
+
items: {
|
|
54
|
+
id: string;
|
|
55
|
+
description: string;
|
|
56
|
+
field: string;
|
|
57
|
+
dataType: import("./metric-detail.types").DimensionColDataType;
|
|
58
|
+
label: string;
|
|
59
|
+
value: string;
|
|
60
|
+
}[];
|
|
61
|
+
})[];
|
|
62
|
+
}[];
|
|
63
|
+
readonly groupByColOptions: import("./metric-detail.utils").MetricGroupByColOption[];
|
|
64
|
+
readonly flatGroupByColOptions: {
|
|
65
|
+
label: string;
|
|
66
|
+
value: string;
|
|
67
|
+
description: string;
|
|
68
|
+
dataType: "dimension" | import("./metric-detail.types").DimensionColDataType;
|
|
69
|
+
dimension: import("./metric-detail.types").DimensionInfo | null;
|
|
70
|
+
}[];
|
|
71
|
+
getGroupByOptions(values: string[]): {
|
|
72
|
+
label: string;
|
|
73
|
+
value: string;
|
|
74
|
+
description: string;
|
|
75
|
+
dataType: "dimension" | import("./metric-detail.types").DimensionColDataType;
|
|
76
|
+
dimension: import("./metric-detail.types").DimensionInfo | null;
|
|
77
|
+
}[];
|
|
78
|
+
} & {
|
|
79
|
+
load: () => Promise<void>;
|
|
80
|
+
} & {
|
|
81
|
+
afterCreate(): void;
|
|
82
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>, [undefined]>;
|
|
83
|
+
keyword: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
84
|
+
metricID: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
85
|
+
}, {
|
|
86
|
+
readonly rootModel: any;
|
|
87
|
+
readonly contentModel: any;
|
|
88
|
+
readonly additionalQueryInfo: TAdditionalQueryInfo;
|
|
89
|
+
readonly dataSource: any;
|
|
90
|
+
readonly key: any;
|
|
91
|
+
readonly type: any;
|
|
92
|
+
readonly metric: import("./metrics").MetricBriefInfo | null;
|
|
93
|
+
} & {
|
|
94
|
+
selectMetric(metricID: string): void;
|
|
95
|
+
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
96
|
+
export type MMInfoModelInstance = Instance<typeof MMInfoModel>;
|