@devtable/dashboard 14.23.1 → 14.25.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/components/panel/panel-render/full-screen-render/use-panel-full-screen.d.ts +1 -14820
- package/dist/components/plugins/index.d.ts +3 -0
- package/dist/components/plugins/plugin-context.d.ts +354 -390
- package/dist/contexts/index.d.ts +1 -0
- package/dist/contexts/panel-context.d.ts +708 -780
- package/dist/contexts/render-content-model-context.d.ts +2 -0
- package/dist/dashboard-editor/model/filters/index.d.ts +2 -12
- package/dist/dashboard-editor/model/panels/panel.d.ts +177 -195
- package/dist/dashboard-editor/model/queries/queries.d.ts +339 -378
- package/dist/dashboard-editor/model/queries/query.d.ts +15 -18
- package/dist/dashboard-editor/model/views/index.d.ts +69 -27
- package/dist/dashboard-editor/model/views/view.d.ts +17 -3
- package/dist/dashboard-render/model/index.d.ts +1 -0
- package/dist/dashboard-render/model/types.d.ts +32 -0
- package/dist/dashboard.es.js +26 -18
- package/dist/dashboard.umd.js +46 -46
- package/dist/index.d.ts +3 -1
- package/dist/model/meta-model/dashboard/content/filter/filter.d.ts +49 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/checkbox.d.ts +13 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/date-range.d.ts +32 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/multi-select.d.ts +33 -6
- package/dist/model/meta-model/dashboard/content/filter/widgets/select-base.d.ts +30 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/select.d.ts +32 -6
- package/dist/model/meta-model/dashboard/content/filter/widgets/text-input.d.ts +13 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-select-base.d.ts +11 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-select.d.ts +29 -0
- package/dist/model/meta-model/dashboard/content/filter/widgets/tree-single-select.d.ts +26 -0
- package/dist/model/meta-model/dashboard/content/layout/layout-item.d.ts +28 -0
- package/dist/model/meta-model/dashboard/content/layout/layout-set.d.ts +32 -1
- package/dist/model/meta-model/dashboard/content/mock-context/mock-context.d.ts +10 -0
- package/dist/model/meta-model/dashboard/content/panel/panel.d.ts +38 -5
- package/dist/model/meta-model/dashboard/content/panel/style/border.d.ts +7 -0
- package/dist/model/meta-model/dashboard/content/panel/style/index.d.ts +7 -0
- package/dist/model/meta-model/dashboard/content/panel/title.d.ts +7 -0
- package/dist/model/meta-model/dashboard/content/panel/variable.d.ts +93 -0
- package/dist/model/meta-model/dashboard/content/panel/viz.d.ts +10 -0
- package/dist/model/meta-model/dashboard/content/query/db-query.d.ts +17 -6
- package/dist/model/meta-model/dashboard/content/query/http-query.d.ts +11 -0
- package/dist/model/meta-model/dashboard/content/query/merico-metric-query.d.ts +66 -6
- package/dist/model/meta-model/dashboard/content/query/query.d.ts +42 -10
- package/dist/model/meta-model/dashboard/content/query/transform-query.d.ts +11 -0
- package/dist/model/meta-model/dashboard/content/sql-snippet/sql-snippet.d.ts +10 -0
- package/dist/model/meta-model/dashboard/content/view/view.d.ts +23 -0
- package/dist/model/meta-model/dashboard/content/view/widgets/division.d.ts +6 -0
- package/dist/model/meta-model/dashboard/content/view/widgets/modal.d.ts +32 -0
- package/dist/model/meta-model/dashboard/content/view/widgets/tabs.d.ts +46 -0
- package/dist/model/render-model/dashboard/content/filters/filters.d.ts +77 -37
- package/dist/model/render-model/dashboard/content/layouts/layouts.d.ts +40 -2
- package/dist/model/render-model/dashboard/content/panels/index.d.ts +1 -0
- package/dist/model/render-model/dashboard/content/panels/panel.d.ts +138 -1561
- package/dist/model/render-model/dashboard/content/panels/types.d.ts +37 -0
- package/dist/model/render-model/dashboard/content/queries/mute-query.d.ts +55 -19
- package/dist/model/render-model/dashboard/content/queries/queries.d.ts +302 -296
- package/dist/model/render-model/dashboard/content/queries/query.d.ts +60 -37
- package/dist/model/render-model/dashboard/content/sql-snippets/sql-snippet.d.ts +4 -0
- package/dist/model/render-model/dashboard/content/sql-snippets/sql-snippets.d.ts +18 -0
- package/dist/model/render-model/dashboard/content/views/view.d.ts +19 -3
- package/dist/model/render-model/dashboard/content/views/views.d.ts +249 -231
- package/dist/stats.html +1 -1
- package/dist/types/utils.d.ts +3 -0
- package/dist/version.json +2 -2
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { IObservableArray } from 'mobx';
|
|
2
|
+
import type { ReactNode } from './react';
|
|
3
|
+
import { IContentRenderModel } from '../../../../../dashboard-render';
|
|
4
|
+
import type { IPanelMeta } from '../../../../meta-model';
|
|
5
|
+
import { type IQueryRenderModel, QueryRenderModelInstance } from '../queries';
|
|
6
|
+
import { VariableAggValueMap, VariableStyleMap, VariableValueMap } from './panel';
|
|
7
|
+
export interface IPanelRenderModel extends IPanelMeta {
|
|
8
|
+
readonly contentModel: IContentRenderModel;
|
|
9
|
+
readonly queries: QueryRenderModelInstance[];
|
|
10
|
+
readonly firstQuery: QueryRenderModelInstance | null;
|
|
11
|
+
readonly firstQueryData: Array<string[] | number[] | Record<string, unknown>>;
|
|
12
|
+
readonly data: TPanelData;
|
|
13
|
+
readonly variableStrings: Record<string, ReactNode>;
|
|
14
|
+
readonly variableAggValueMap: VariableAggValueMap;
|
|
15
|
+
readonly variableValueMap: VariableValueMap;
|
|
16
|
+
readonly variableStyleMap: VariableStyleMap;
|
|
17
|
+
readonly dataLoading: boolean;
|
|
18
|
+
readonly queryStateMessages: string;
|
|
19
|
+
readonly queryErrors: string[];
|
|
20
|
+
readonly canRenderViz: boolean;
|
|
21
|
+
queryByID(queryID: string): IQueryRenderModel | undefined;
|
|
22
|
+
refreshData(): void;
|
|
23
|
+
downloadData(): void;
|
|
24
|
+
getSchema(): {
|
|
25
|
+
panel: IPanelMeta['json'];
|
|
26
|
+
queries: Array<IQueryRenderModel['json']>;
|
|
27
|
+
layouts: unknown;
|
|
28
|
+
};
|
|
29
|
+
downloadSchema(): void;
|
|
30
|
+
}
|
|
31
|
+
export interface IPanelsRenderModel {
|
|
32
|
+
list: IObservableArray<IPanelRenderModel>;
|
|
33
|
+
readonly json: IPanelRenderModel['json'][];
|
|
34
|
+
findByID<T = IPanelRenderModel>(id: string): T | undefined;
|
|
35
|
+
readonly idMap: Map<string, IPanelRenderModel>;
|
|
36
|
+
panelsByIDs(ids: string[]): IPanelRenderModel[];
|
|
37
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ComboboxItem, ComboboxItemGroup } from '@mantine/core';
|
|
2
2
|
import { Instance } from 'mobx-state-tree';
|
|
3
|
-
import {
|
|
3
|
+
import { IContentRenderModel } from '../../../../../dashboard-render';
|
|
4
|
+
import { DataSourceType, MericoMetricType, type IQueryMeta } from '../../../../../model';
|
|
4
5
|
import { DependencyInfo } from '../../../../../utils';
|
|
5
6
|
type MetricQueryPayload = {
|
|
6
7
|
id: string;
|
|
@@ -34,7 +35,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
34
35
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
35
36
|
_type: import("mobx-state-tree").ISimpleType<DataSourceType.MericoMetricSystem>;
|
|
36
37
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
37
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
38
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<MericoMetricType>, [undefined]>;
|
|
38
39
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
39
40
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
40
41
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -58,7 +59,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
58
59
|
stepKeyFormat: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
59
60
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
60
61
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
61
|
-
_type: import("mobx-state-tree").ISimpleType<DataSourceType>;
|
|
62
|
+
_type: import("mobx-state-tree").ISimpleType<DataSourceType.Postgresql | DataSourceType.MySQL>;
|
|
62
63
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
63
64
|
}>>, import("mobx-state-tree").ModelSnapshotType<{
|
|
64
65
|
_type: import("mobx-state-tree").ISimpleType<DataSourceType.Transform>;
|
|
@@ -69,7 +70,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
69
70
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
70
71
|
_type: import("mobx-state-tree").ISimpleType<DataSourceType.MericoMetricSystem>;
|
|
71
72
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
72
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
73
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<MericoMetricType>, [undefined]>;
|
|
73
74
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
74
75
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
75
76
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -93,7 +94,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
93
94
|
stepKeyFormat: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
94
95
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
95
96
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
96
|
-
_type: import("mobx-state-tree").ISimpleType<DataSourceType>;
|
|
97
|
+
_type: import("mobx-state-tree").ISimpleType<DataSourceType.Postgresql | DataSourceType.MySQL>;
|
|
97
98
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
98
99
|
}>, import("mobx-state-tree").ModelInstanceType<{
|
|
99
100
|
_type: import("mobx-state-tree").ISimpleType<DataSourceType.Transform>;
|
|
@@ -120,7 +121,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
120
121
|
}> | import("mobx-state-tree").ModelInstanceType<{
|
|
121
122
|
_type: import("mobx-state-tree").ISimpleType<DataSourceType.MericoMetricSystem>;
|
|
122
123
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
123
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
124
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<MericoMetricType>, [undefined]>;
|
|
124
125
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
125
126
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
126
127
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -148,7 +149,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
148
149
|
readonly valid: boolean;
|
|
149
150
|
readonly json: {
|
|
150
151
|
id: string;
|
|
151
|
-
type:
|
|
152
|
+
type: MericoMetricType;
|
|
152
153
|
filters: {
|
|
153
154
|
dimension: string;
|
|
154
155
|
variable: string;
|
|
@@ -210,14 +211,14 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
210
211
|
setUnitVariable(v: string | null): void;
|
|
211
212
|
setTimeQueryEnabled(v: boolean): void;
|
|
212
213
|
}> | import("mobx-state-tree").ModelInstanceType<{
|
|
213
|
-
_type: import("mobx-state-tree").ISimpleType<DataSourceType>;
|
|
214
|
+
_type: import("mobx-state-tree").ISimpleType<DataSourceType.Postgresql | DataSourceType.MySQL>;
|
|
214
215
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
215
216
|
}, {
|
|
216
217
|
readonly base: (object & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IAnyComplexType>) | import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IAnyStateTreeNode>;
|
|
217
218
|
readonly valid: boolean;
|
|
218
219
|
readonly json: {
|
|
219
220
|
sql: string;
|
|
220
|
-
_type: DataSourceType;
|
|
221
|
+
_type: DataSourceType.Postgresql | DataSourceType.MySQL;
|
|
221
222
|
};
|
|
222
223
|
} & {
|
|
223
224
|
setSQL(sql: string): void;
|
|
@@ -240,7 +241,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
240
241
|
_type: DataSourceType.HTTP;
|
|
241
242
|
} | {
|
|
242
243
|
id: string;
|
|
243
|
-
type:
|
|
244
|
+
type: MericoMetricType;
|
|
244
245
|
filters: {
|
|
245
246
|
dimension: string;
|
|
246
247
|
variable: string;
|
|
@@ -262,7 +263,7 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
262
263
|
_type: DataSourceType.MericoMetricSystem;
|
|
263
264
|
} | {
|
|
264
265
|
sql: string;
|
|
265
|
-
_type: DataSourceType;
|
|
266
|
+
_type: DataSourceType.Postgresql | DataSourceType.MySQL;
|
|
266
267
|
};
|
|
267
268
|
pre_process: string;
|
|
268
269
|
post_process: string;
|
|
@@ -279,19 +280,16 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
279
280
|
readonly rootModel: any;
|
|
280
281
|
readonly contentModel: any;
|
|
281
282
|
readonly conditionOptions: {
|
|
282
|
-
optionGroups:
|
|
283
|
-
validValues: Set<unknown>;
|
|
284
|
-
} | {
|
|
285
|
-
optionGroups: ComboboxItemGroup<ComboboxItem>[];
|
|
283
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
286
284
|
validValues: Set<string>;
|
|
287
285
|
};
|
|
288
286
|
getConditionOptionsWithInvalidValue(value: string | null): {
|
|
289
|
-
optionGroups: ComboboxItemGroup<ComboboxItem
|
|
290
|
-
validValues: Set<string
|
|
287
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
288
|
+
validValues: Set<string>;
|
|
291
289
|
};
|
|
292
290
|
readonly conditionOptionsWithInvalidRunbys: {
|
|
293
|
-
optionGroups: ComboboxItemGroup<
|
|
294
|
-
validValues: Set<string
|
|
291
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
292
|
+
validValues: Set<string>;
|
|
295
293
|
};
|
|
296
294
|
readonly unmetRunByConditions: string[];
|
|
297
295
|
} & {
|
|
@@ -318,4 +316,42 @@ export declare const MuteQueryModel: import("mobx-state-tree").IModelType<{
|
|
|
318
316
|
readonly metricQueryPayloadValid: boolean;
|
|
319
317
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
320
318
|
export type MuteQueryModelInstance = Instance<typeof MuteQueryModel>;
|
|
319
|
+
export interface IMuteQueryModel extends IQueryMeta {
|
|
320
|
+
readonly rootModel: Record<string, unknown>;
|
|
321
|
+
readonly contentModel: IContentRenderModel;
|
|
322
|
+
readonly conditionOptions: {
|
|
323
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
324
|
+
validValues: Set<string>;
|
|
325
|
+
};
|
|
326
|
+
readonly payload: Record<string, unknown>;
|
|
327
|
+
readonly formattedSQL: string;
|
|
328
|
+
readonly httpConfigString: string;
|
|
329
|
+
readonly typedAsSQL: boolean;
|
|
330
|
+
readonly typedAsHTTP: boolean;
|
|
331
|
+
readonly isMericoMetricQuery: boolean;
|
|
332
|
+
readonly isTransform: boolean;
|
|
333
|
+
readonly reQueryKey: string;
|
|
334
|
+
readonly runByConditionsMet: boolean;
|
|
335
|
+
readonly conditionNames: {
|
|
336
|
+
context: string[];
|
|
337
|
+
filters: string[];
|
|
338
|
+
};
|
|
339
|
+
readonly queries: string[];
|
|
340
|
+
readonly inUse: boolean;
|
|
341
|
+
readonly dependencies: DependencyInfo[];
|
|
342
|
+
readonly metricQueryPayload: MetricQueryPayload | null;
|
|
343
|
+
readonly metricQueryPayloadString: string;
|
|
344
|
+
readonly metricQueryPayloadError: string[];
|
|
345
|
+
readonly metricQueryPayloadErrorString: string;
|
|
346
|
+
readonly metricQueryPayloadValid: boolean;
|
|
347
|
+
readonly unmetRunByConditions: string[];
|
|
348
|
+
readonly conditionOptionsWithInvalidRunbys: {
|
|
349
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
350
|
+
validValues: Set<string>;
|
|
351
|
+
};
|
|
352
|
+
getConditionOptionsWithInvalidValue(value: string | null): {
|
|
353
|
+
optionGroups: Array<ComboboxItemGroup<ComboboxItem>>;
|
|
354
|
+
validValues: Set<string>;
|
|
355
|
+
};
|
|
356
|
+
}
|
|
321
357
|
export {};
|