@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
|
@@ -14,7 +14,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
14
14
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
15
15
|
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.MericoMetricSystem>;
|
|
16
16
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
17
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
17
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<import('../../../model').MericoMetricType>, [undefined]>;
|
|
18
18
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
19
19
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
20
20
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -38,7 +38,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
38
38
|
stepKeyFormat: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
39
39
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
40
40
|
}>> | import("mobx-state-tree").ModelCreationType<import("mobx-state-tree/dist/internal").ExtractCFromProps<{
|
|
41
|
-
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType>;
|
|
41
|
+
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.Postgresql | import('../../../model').DataSourceType.MySQL>;
|
|
42
42
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
43
43
|
}>>, import("mobx-state-tree").ModelSnapshotType<{
|
|
44
44
|
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.Transform>;
|
|
@@ -49,7 +49,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
49
49
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
50
50
|
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.MericoMetricSystem>;
|
|
51
51
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
52
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
52
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<import('../../../model').MericoMetricType>, [undefined]>;
|
|
53
53
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
54
54
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
55
55
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -73,7 +73,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
73
73
|
stepKeyFormat: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
74
74
|
}, {}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>;
|
|
75
75
|
}> | import("mobx-state-tree").ModelSnapshotType<{
|
|
76
|
-
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType>;
|
|
76
|
+
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.Postgresql | import('../../../model').DataSourceType.MySQL>;
|
|
77
77
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
78
78
|
}>, import("mobx-state-tree").ModelInstanceType<{
|
|
79
79
|
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.Transform>;
|
|
@@ -100,7 +100,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
100
100
|
}> | import("mobx-state-tree").ModelInstanceType<{
|
|
101
101
|
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.MericoMetricSystem>;
|
|
102
102
|
id: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
103
|
-
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
103
|
+
type: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<import('../../../model').MericoMetricType>, [undefined]>;
|
|
104
104
|
filters: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").IModelType<{
|
|
105
105
|
dimension: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
106
106
|
variable: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
@@ -128,7 +128,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
128
128
|
readonly valid: boolean;
|
|
129
129
|
readonly json: {
|
|
130
130
|
id: string;
|
|
131
|
-
type:
|
|
131
|
+
type: import('../../../model').MericoMetricType;
|
|
132
132
|
filters: {
|
|
133
133
|
dimension: string;
|
|
134
134
|
variable: string;
|
|
@@ -190,14 +190,14 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
190
190
|
setUnitVariable(v: string | null): void;
|
|
191
191
|
setTimeQueryEnabled(v: boolean): void;
|
|
192
192
|
}> | import("mobx-state-tree").ModelInstanceType<{
|
|
193
|
-
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType>;
|
|
193
|
+
_type: import("mobx-state-tree").ISimpleType<import('../../../model').DataSourceType.Postgresql | import('../../../model').DataSourceType.MySQL>;
|
|
194
194
|
sql: import("mobx-state-tree").ISimpleType<string>;
|
|
195
195
|
}, {
|
|
196
196
|
readonly base: (object & import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IAnyComplexType>) | import("mobx-state-tree").IStateTreeNode<import("mobx-state-tree").IAnyStateTreeNode>;
|
|
197
197
|
readonly valid: boolean;
|
|
198
198
|
readonly json: {
|
|
199
199
|
sql: string;
|
|
200
|
-
_type: import('../../../model').DataSourceType;
|
|
200
|
+
_type: import('../../../model').DataSourceType.Postgresql | import('../../../model').DataSourceType.MySQL;
|
|
201
201
|
};
|
|
202
202
|
} & {
|
|
203
203
|
setSQL(sql: string): void;
|
|
@@ -206,9 +206,9 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
206
206
|
post_process: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<string>, [undefined]>;
|
|
207
207
|
run_by: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IArrayType<import("mobx-state-tree").ISimpleType<string>>, [undefined]>;
|
|
208
208
|
} & {
|
|
209
|
-
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<
|
|
209
|
+
state: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").ISimpleType<"error" | "loading" | "idle">, [undefined]>;
|
|
210
210
|
data: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string[][] | number[][] | import("../../..").AnyObject[] | null | undefined, string[][] | number[][] | import("../../..").AnyObject[], string[][] | number[][] | import("../../..").AnyObject[]>, [undefined]>;
|
|
211
|
-
error: import("mobx-state-tree").IType<
|
|
211
|
+
error: import("mobx-state-tree").IOptionalIType<import("mobx-state-tree").IType<string | null, string | null, string | null>, [undefined]>;
|
|
212
212
|
}, {
|
|
213
213
|
readonly valid: boolean;
|
|
214
214
|
readonly json: {
|
|
@@ -224,7 +224,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
224
224
|
_type: import('../../../model').DataSourceType.HTTP;
|
|
225
225
|
} | {
|
|
226
226
|
id: string;
|
|
227
|
-
type:
|
|
227
|
+
type: import('../../../model').MericoMetricType;
|
|
228
228
|
filters: {
|
|
229
229
|
dimension: string;
|
|
230
230
|
variable: string;
|
|
@@ -246,7 +246,7 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
246
246
|
_type: import('../../../model').DataSourceType.MericoMetricSystem;
|
|
247
247
|
} | {
|
|
248
248
|
sql: string;
|
|
249
|
-
_type: import('../../../model').DataSourceType;
|
|
249
|
+
_type: import('../../../model').DataSourceType.Postgresql | import('../../../model').DataSourceType.MySQL;
|
|
250
250
|
};
|
|
251
251
|
pre_process: string;
|
|
252
252
|
post_process: string;
|
|
@@ -263,19 +263,16 @@ export declare const QueryModel: import("mobx-state-tree").IModelType<{
|
|
|
263
263
|
readonly rootModel: any;
|
|
264
264
|
readonly contentModel: any;
|
|
265
265
|
readonly conditionOptions: {
|
|
266
|
-
optionGroups: never[];
|
|
267
|
-
validValues: Set<unknown>;
|
|
268
|
-
} | {
|
|
269
266
|
optionGroups: import("@mantine/core").ComboboxItemGroup<import("@mantine/core").ComboboxItem>[];
|
|
270
267
|
validValues: Set<string>;
|
|
271
268
|
};
|
|
272
269
|
getConditionOptionsWithInvalidValue(value: string | null): {
|
|
273
270
|
optionGroups: import("@mantine/core").ComboboxItemGroup<import("@mantine/core").ComboboxItem>[];
|
|
274
|
-
validValues: Set<string
|
|
271
|
+
validValues: Set<string>;
|
|
275
272
|
};
|
|
276
273
|
readonly conditionOptionsWithInvalidRunbys: {
|
|
277
|
-
optionGroups: import("@mantine/core").ComboboxItemGroup<
|
|
278
|
-
validValues: Set<string
|
|
274
|
+
optionGroups: import("@mantine/core").ComboboxItemGroup<import("@mantine/core").ComboboxItem>[];
|
|
275
|
+
validValues: Set<string>;
|
|
279
276
|
};
|
|
280
277
|
readonly unmetRunByConditions: string[];
|
|
281
278
|
} & {
|
|
@@ -358,8 +358,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
358
358
|
setOrder(v: string | number): void;
|
|
359
359
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
360
360
|
readonly tabViewID: string;
|
|
361
|
-
readonly contentModel:
|
|
362
|
-
readonly panels:
|
|
361
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
362
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
363
363
|
readonly renderViewIDs: string[];
|
|
364
364
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
365
365
|
} & {
|
|
@@ -723,8 +723,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
723
723
|
setOrder(v: string | number): void;
|
|
724
724
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
725
725
|
readonly tabViewID: string;
|
|
726
|
-
readonly contentModel:
|
|
727
|
-
readonly panels:
|
|
726
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
727
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
728
728
|
readonly renderViewIDs: string[];
|
|
729
729
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
730
730
|
} & {
|
|
@@ -765,7 +765,21 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
765
765
|
definition: {
|
|
766
766
|
queries: import('../../../types').AnyObject[];
|
|
767
767
|
};
|
|
768
|
-
layouts:
|
|
768
|
+
layouts: {
|
|
769
|
+
id: string;
|
|
770
|
+
name: string;
|
|
771
|
+
breakpoint: number;
|
|
772
|
+
list: {
|
|
773
|
+
h: number;
|
|
774
|
+
w: number;
|
|
775
|
+
x: number;
|
|
776
|
+
y: number;
|
|
777
|
+
id: string;
|
|
778
|
+
moved: boolean;
|
|
779
|
+
static: boolean;
|
|
780
|
+
panelID: string;
|
|
781
|
+
}[];
|
|
782
|
+
}[];
|
|
769
783
|
version: string;
|
|
770
784
|
};
|
|
771
785
|
downloadSchema(): void;
|
|
@@ -2934,8 +2948,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
2934
2948
|
setOrder(v: string | number): void;
|
|
2935
2949
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
2936
2950
|
readonly tabViewID: string;
|
|
2937
|
-
readonly contentModel:
|
|
2938
|
-
readonly panels:
|
|
2951
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
2952
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
2939
2953
|
readonly renderViewIDs: string[];
|
|
2940
2954
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
2941
2955
|
} & {
|
|
@@ -3296,8 +3310,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
3296
3310
|
setOrder(v: string | number): void;
|
|
3297
3311
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
3298
3312
|
readonly tabViewID: string;
|
|
3299
|
-
readonly contentModel:
|
|
3300
|
-
readonly panels:
|
|
3313
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
3314
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
3301
3315
|
readonly renderViewIDs: string[];
|
|
3302
3316
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
3303
3317
|
} & {
|
|
@@ -4278,8 +4292,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
4278
4292
|
setOrder(v: string | number): void;
|
|
4279
4293
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
4280
4294
|
readonly tabViewID: string;
|
|
4281
|
-
readonly contentModel:
|
|
4282
|
-
readonly panels:
|
|
4295
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
4296
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
4283
4297
|
readonly renderViewIDs: string[];
|
|
4284
4298
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
4285
4299
|
} & {
|
|
@@ -4640,8 +4654,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
4640
4654
|
setOrder(v: string | number): void;
|
|
4641
4655
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
4642
4656
|
readonly tabViewID: string;
|
|
4643
|
-
readonly contentModel:
|
|
4644
|
-
readonly panels:
|
|
4657
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
4658
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
4645
4659
|
readonly renderViewIDs: string[];
|
|
4646
4660
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
4647
4661
|
} & {
|
|
@@ -5622,8 +5636,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
5622
5636
|
setOrder(v: string | number): void;
|
|
5623
5637
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
5624
5638
|
readonly tabViewID: string;
|
|
5625
|
-
readonly contentModel:
|
|
5626
|
-
readonly panels:
|
|
5639
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
5640
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
5627
5641
|
readonly renderViewIDs: string[];
|
|
5628
5642
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
5629
5643
|
} & {
|
|
@@ -5984,8 +5998,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
5984
5998
|
setOrder(v: string | number): void;
|
|
5985
5999
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
5986
6000
|
readonly tabViewID: string;
|
|
5987
|
-
readonly contentModel:
|
|
5988
|
-
readonly panels:
|
|
6001
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
6002
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
5989
6003
|
readonly renderViewIDs: string[];
|
|
5990
6004
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
5991
6005
|
} & {
|
|
@@ -6966,8 +6980,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
6966
6980
|
setOrder(v: string | number): void;
|
|
6967
6981
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
6968
6982
|
readonly tabViewID: string;
|
|
6969
|
-
readonly contentModel:
|
|
6970
|
-
readonly panels:
|
|
6983
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
6984
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
6971
6985
|
readonly renderViewIDs: string[];
|
|
6972
6986
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
6973
6987
|
} & {
|
|
@@ -7328,8 +7342,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
7328
7342
|
setOrder(v: string | number): void;
|
|
7329
7343
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
7330
7344
|
readonly tabViewID: string;
|
|
7331
|
-
readonly contentModel:
|
|
7332
|
-
readonly panels:
|
|
7345
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
7346
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
7333
7347
|
readonly renderViewIDs: string[];
|
|
7334
7348
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
7335
7349
|
} & {
|
|
@@ -8321,8 +8335,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
8321
8335
|
setOrder(v: string | number): void;
|
|
8322
8336
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
8323
8337
|
readonly tabViewID: string;
|
|
8324
|
-
readonly contentModel:
|
|
8325
|
-
readonly panels:
|
|
8338
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
8339
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
8326
8340
|
readonly renderViewIDs: string[];
|
|
8327
8341
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
8328
8342
|
} & {
|
|
@@ -8363,7 +8377,21 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
8363
8377
|
definition: {
|
|
8364
8378
|
queries: import('../../../types').AnyObject[];
|
|
8365
8379
|
};
|
|
8366
|
-
layouts:
|
|
8380
|
+
layouts: {
|
|
8381
|
+
id: string;
|
|
8382
|
+
name: string;
|
|
8383
|
+
breakpoint: number;
|
|
8384
|
+
list: {
|
|
8385
|
+
h: number;
|
|
8386
|
+
w: number;
|
|
8387
|
+
x: number;
|
|
8388
|
+
y: number;
|
|
8389
|
+
id: string;
|
|
8390
|
+
moved: boolean;
|
|
8391
|
+
static: boolean;
|
|
8392
|
+
panelID: string;
|
|
8393
|
+
}[];
|
|
8394
|
+
}[];
|
|
8367
8395
|
version: string;
|
|
8368
8396
|
};
|
|
8369
8397
|
downloadSchema(): void;
|
|
@@ -8722,8 +8750,8 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
8722
8750
|
setOrder(v: string | number): void;
|
|
8723
8751
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
8724
8752
|
readonly tabViewID: string;
|
|
8725
|
-
readonly contentModel:
|
|
8726
|
-
readonly panels:
|
|
8753
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
8754
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
8727
8755
|
readonly renderViewIDs: string[];
|
|
8728
8756
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
8729
8757
|
} & {
|
|
@@ -8764,7 +8792,21 @@ export declare const ViewsModel: import("mobx-state-tree").IModelType<{
|
|
|
8764
8792
|
definition: {
|
|
8765
8793
|
queries: import('../../../types').AnyObject[];
|
|
8766
8794
|
};
|
|
8767
|
-
layouts:
|
|
8795
|
+
layouts: {
|
|
8796
|
+
id: string;
|
|
8797
|
+
name: string;
|
|
8798
|
+
breakpoint: number;
|
|
8799
|
+
list: {
|
|
8800
|
+
h: number;
|
|
8801
|
+
w: number;
|
|
8802
|
+
x: number;
|
|
8803
|
+
y: number;
|
|
8804
|
+
id: string;
|
|
8805
|
+
moved: boolean;
|
|
8806
|
+
static: boolean;
|
|
8807
|
+
panelID: string;
|
|
8808
|
+
}[];
|
|
8809
|
+
}[];
|
|
8768
8810
|
version: string;
|
|
8769
8811
|
};
|
|
8770
8812
|
downloadSchema(): void;
|
|
@@ -356,8 +356,8 @@ export declare const ViewModel: import("mobx-state-tree").IModelType<{
|
|
|
356
356
|
setOrder(v: string | number): void;
|
|
357
357
|
}, import("mobx-state-tree")._NotCustomized, import("mobx-state-tree")._NotCustomized>>) | null | undefined;
|
|
358
358
|
readonly tabViewID: string;
|
|
359
|
-
readonly contentModel:
|
|
360
|
-
readonly panels:
|
|
359
|
+
readonly contentModel: import("../../..").IContentRenderModel;
|
|
360
|
+
readonly panels: import('../../../model').IPanelRenderModel[];
|
|
361
361
|
readonly renderViewIDs: string[];
|
|
362
362
|
downloadScreenshot(dom: HTMLElement): Promise<void>;
|
|
363
363
|
} & {
|
|
@@ -398,7 +398,21 @@ export declare const ViewModel: import("mobx-state-tree").IModelType<{
|
|
|
398
398
|
definition: {
|
|
399
399
|
queries: AnyObject[];
|
|
400
400
|
};
|
|
401
|
-
layouts:
|
|
401
|
+
layouts: {
|
|
402
|
+
id: string;
|
|
403
|
+
name: string;
|
|
404
|
+
breakpoint: number;
|
|
405
|
+
list: {
|
|
406
|
+
h: number;
|
|
407
|
+
w: number;
|
|
408
|
+
x: number;
|
|
409
|
+
y: number;
|
|
410
|
+
id: string;
|
|
411
|
+
moved: boolean;
|
|
412
|
+
static: boolean;
|
|
413
|
+
panelID: string;
|
|
414
|
+
}[];
|
|
415
|
+
}[];
|
|
402
416
|
version: string;
|
|
403
417
|
};
|
|
404
418
|
downloadSchema(): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { TAdditionalQueryInfo } from '../../api-caller/request';
|
|
2
|
+
import { IFiltersRenderModel, ILayoutsRenderModel, IMockContextMeta, IPanelsRenderModel, IQueriesRenderModel, ISQLSnippetsRenderModel, IViewsRenderModel, TPayloadForSQL, TPayloadForViz } from '../../model';
|
|
3
|
+
import { DashboardContentDBType } from '../../types';
|
|
4
|
+
import { payloadToDashboardState } from '../../utils';
|
|
5
|
+
export interface IContentRenderModel {
|
|
6
|
+
id: string;
|
|
7
|
+
name: string;
|
|
8
|
+
dashboard_id: string;
|
|
9
|
+
create_time: string;
|
|
10
|
+
update_time: string;
|
|
11
|
+
version: string;
|
|
12
|
+
filters: IFiltersRenderModel;
|
|
13
|
+
queries: IQueriesRenderModel;
|
|
14
|
+
sqlSnippets: ISQLSnippetsRenderModel;
|
|
15
|
+
views: IViewsRenderModel;
|
|
16
|
+
panels: IPanelsRenderModel;
|
|
17
|
+
layouts: ILayoutsRenderModel;
|
|
18
|
+
mock_context: IMockContextMeta;
|
|
19
|
+
readonly json: DashboardContentDBType;
|
|
20
|
+
readonly contentJSON: DashboardContentDBType['content'];
|
|
21
|
+
readonly payloadForSQL: TPayloadForSQL;
|
|
22
|
+
readonly payloadForViz: TPayloadForViz;
|
|
23
|
+
readonly dashboardState: ReturnType<typeof payloadToDashboardState>;
|
|
24
|
+
getAdditionalQueryInfo(query_id: string): TAdditionalQueryInfo;
|
|
25
|
+
readonly data: Record<string, TQueryData>;
|
|
26
|
+
getDataStuffByID(queryID: string): {
|
|
27
|
+
data: TQueryData;
|
|
28
|
+
len: number;
|
|
29
|
+
state: string;
|
|
30
|
+
error?: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
package/dist/dashboard.es.js
CHANGED
|
@@ -99,8 +99,8 @@ import Vp from "dayjs/plugin/weekday";
|
|
|
99
99
|
import Ap from "dayjs/plugin/weekOfYear";
|
|
100
100
|
import $p from "dayjs/plugin/weekYear";
|
|
101
101
|
import { types as m, cast as Rt, getParent as xe, destroy as Pp, getRoot as Le, addDisposer as Ue, detach as ur, isAlive as Xi, flow as Vt, toGenerator as It, clone as Rp, getSnapshot as Mt, applySnapshot as je, addMiddleware as Ep, getType as Op, castToSnapshot as Hl } from "mobx-state-tree";
|
|
102
|
-
import { saveAs as Lr } from "file-saver";
|
|
103
102
|
import Wl from "dom-to-image-more";
|
|
103
|
+
import { saveAs as Lr } from "file-saver";
|
|
104
104
|
import Ul from "jszip";
|
|
105
105
|
import { AsyncParser as qp } from "@json2csv/whatwg";
|
|
106
106
|
import { encode as Fp, decode as Np } from "js-base64";
|
|
@@ -2425,7 +2425,7 @@ function hm() {
|
|
|
2425
2425
|
} = $.useContext(ts);
|
|
2426
2426
|
return e ? document.getElementById(e) : null;
|
|
2427
2427
|
}
|
|
2428
|
-
const rs = "14.
|
|
2428
|
+
const rs = "14.25.0", pm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2429
2429
|
__proto__: null,
|
|
2430
2430
|
version: rs
|
|
2431
2431
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
@@ -2802,7 +2802,7 @@ function ds() {
|
|
|
2802
2802
|
throw new Error("Please use ContentModelContextProvider");
|
|
2803
2803
|
return e;
|
|
2804
2804
|
}
|
|
2805
|
-
const ce = () => ds(),
|
|
2805
|
+
const ce = () => ds(), Lm = {
|
|
2806
2806
|
inEditMode: !1
|
|
2807
2807
|
}, Rr = $.createContext(Lm), us = $.createContext({
|
|
2808
2808
|
panel: null,
|
|
@@ -2854,7 +2854,7 @@ function gs({
|
|
|
2854
2854
|
firstDayOfWeek: 1
|
|
2855
2855
|
}, children: e });
|
|
2856
2856
|
}
|
|
2857
|
-
const Ha = {
|
|
2857
|
+
const Te = () => ds(), Ha = {
|
|
2858
2858
|
fontSize: "14px",
|
|
2859
2859
|
lineHeight: "32px",
|
|
2860
2860
|
color: "#3D3E45",
|
|
@@ -26756,7 +26756,7 @@ const v3 = I5.views((e) => ({
|
|
|
26756
26756
|
})), vd = m.compose("QueryRenderModel", v3, m.model({
|
|
26757
26757
|
state: m.optional(m.enumeration(["idle", "loading", "error"]), "idle"),
|
|
26758
26758
|
data: m.optional(m.frozen([]), []),
|
|
26759
|
-
error: m.frozen()
|
|
26759
|
+
error: m.optional(m.frozen(), null)
|
|
26760
26760
|
})).views((e) => ({
|
|
26761
26761
|
get datasource() {
|
|
26762
26762
|
const {
|
|
@@ -35345,19 +35345,23 @@ const lD = [{
|
|
|
35345
35345
|
}, [i]), N(() => {
|
|
35346
35346
|
!a.metricID && t.id && a.selectMetric(t.id);
|
|
35347
35347
|
}, [t.id]);
|
|
35348
|
-
const o = z(() => i.data.map((
|
|
35349
|
-
label:
|
|
35350
|
-
value:
|
|
35351
|
-
description:
|
|
35352
|
-
type:
|
|
35353
|
-
})), [i.data]), l = ae((
|
|
35354
|
-
|
|
35355
|
-
}, [a, t]), {
|
|
35356
|
-
|
|
35357
|
-
|
|
35348
|
+
const o = z(() => i.data.map((h) => ({
|
|
35349
|
+
label: h.name,
|
|
35350
|
+
value: h.id,
|
|
35351
|
+
description: h.description,
|
|
35352
|
+
type: h.type
|
|
35353
|
+
})), [i.data]), l = ae((h, p) => {
|
|
35354
|
+
h && (a.selectMetric(h), t.setID(h), t.setType(p.type));
|
|
35355
|
+
}, [a, t]), s = z(() => {
|
|
35356
|
+
const h = window.localStorage.getItem("ee_site_url") ?? "";
|
|
35357
|
+
let p = `${h}/dashboard/admin/metrics/list`;
|
|
35358
|
+
return t.id && t.type && (p = `${h}/dashboard/admin/metrics/details/${t.type}/${t.id}`), p.replace("//dashboard", "/dashboard");
|
|
35359
|
+
}, [t.id, t.type]), {
|
|
35360
|
+
loading: c,
|
|
35361
|
+
error: d
|
|
35358
35362
|
} = i;
|
|
35359
35363
|
return /* @__PURE__ */ r(ze, { children: /* @__PURE__ */ u(y, { justify: "flex-end", gap: 12, align: "flex-end", children: [
|
|
35360
|
-
|
|
35364
|
+
d ? /* @__PURE__ */ r(re, { label: d, children: /* @__PURE__ */ r(q, { size: "xs", label: "指标", error: !0, styles: {
|
|
35361
35365
|
root: {
|
|
35362
35366
|
flexGrow: 1
|
|
35363
35367
|
}
|
|
@@ -35365,8 +35369,8 @@ const lD = [{
|
|
|
35365
35369
|
root: {
|
|
35366
35370
|
flexGrow: 1
|
|
35367
35371
|
}
|
|
35368
|
-
}, maxDropdownHeight: 500, value: t.id, onChange: l, rightSection:
|
|
35369
|
-
/* @__PURE__ */ r(re, { label: "跳转到指标明细页查看详情。", disabled:
|
|
35372
|
+
}, maxDropdownHeight: 500, value: t.id, onChange: l, rightSection: c ? /* @__PURE__ */ r(Da, { size: "xs" }) : null }),
|
|
35373
|
+
/* @__PURE__ */ r(re, { label: "跳转到指标明细页查看详情。", disabled: c, children: /* @__PURE__ */ r(Qn, { size: "md", variant: "subtle", mb: 2, href: s, target: "_blank", underline: "never", children: /* @__PURE__ */ r(tD, { width: 14, height: 14 }) }) })
|
|
35370
35374
|
] }) });
|
|
35371
35375
|
}), OD = D(({
|
|
35372
35376
|
queryModel: e
|
|
@@ -36410,6 +36414,7 @@ export {
|
|
|
36410
36414
|
on as CURRENT_SCHEMA_VERSION,
|
|
36411
36415
|
z9 as ClientPanelRender,
|
|
36412
36416
|
jd as ContentModel,
|
|
36417
|
+
ss as ContentModelContext,
|
|
36413
36418
|
cs as ContentModelContextProvider,
|
|
36414
36419
|
ou as ContentRenderModel,
|
|
36415
36420
|
$i as ContextMeta,
|
|
@@ -36526,6 +36531,8 @@ export {
|
|
|
36526
36531
|
Ye as notifyVizRendered,
|
|
36527
36532
|
w9 as onVizRendered,
|
|
36528
36533
|
wn as pluginManager,
|
|
36534
|
+
ye as pluginServices,
|
|
36535
|
+
ds as useContentModelContext,
|
|
36529
36536
|
Pr as useDashboardContext,
|
|
36530
36537
|
Mm as useDashboardThemeContext,
|
|
36531
36538
|
ce as useEditContentModelContext,
|
|
@@ -36538,5 +36545,6 @@ export {
|
|
|
36538
36545
|
Te as useRenderContentModelContext,
|
|
36539
36546
|
Im as useRenderDashboardContext,
|
|
36540
36547
|
rt as useRenderPanelContext,
|
|
36548
|
+
Fr as useServiceLocator,
|
|
36541
36549
|
k9 as useVisibleFilters
|
|
36542
36550
|
};
|