@adminforth/dashboard 1.4.0 → 1.4.2
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/README.md +23 -4
- package/custom/api/dashboardApi.ts +6 -9
- package/custom/model/dashboard.types.ts +60 -275
- package/custom/model/dashboardTopics.ts +5 -0
- package/custom/package.json +1 -0
- package/custom/runtime/DashboardGroup.vue +2 -2
- package/custom/runtime/DashboardPage.vue +17 -7
- package/custom/runtime/DashboardRuntime.vue +20 -8
- package/custom/runtime/WidgetRenderer.vue +1 -2
- package/custom/runtime/WidgetShell.vue +3 -3
- package/custom/skills/adminforth-dashboard/SKILL.md +2 -2
- package/custom/widgets/{gauge-card/GaugeCardWidget.vue → GaugeCardWidget.vue} +63 -61
- package/custom/widgets/{kpi-card/KpiCardWidget.vue → KpiCardWidget.vue} +35 -33
- package/custom/widgets/{pivot-table/PivotTableWidget.vue → PivotTableWidget.vue} +71 -68
- package/custom/widgets/{table/TableWidget.vue → TableWidget.vue} +5 -5
- package/custom/widgets/chart/{bar/BarChart.vue → BarChart.vue} +2 -2
- package/custom/widgets/chart/ChartWidget.vue +4 -15
- package/{dist/custom/widgets/chart/funnel → custom/widgets/chart}/FunnelChart.vue +80 -78
- package/{dist/custom/widgets/chart/line → custom/widgets/chart}/LineChart.vue +2 -2
- package/custom/widgets/chart/{pie/PieChart.vue → PieChart.vue} +2 -2
- package/{dist/custom/widgets/chart/stacked-bar → custom/widgets/chart}/StackedBarChart.vue +97 -95
- package/custom/widgets/chart/chart.types.ts +0 -28
- package/dist/custom/api/dashboardApi.d.ts +4 -8
- package/dist/custom/api/dashboardApi.js +2 -6
- package/dist/custom/api/dashboardApi.ts +6 -9
- package/dist/custom/composables/useElementSize.js +7 -10
- package/dist/custom/model/dashboard.types.d.ts +38 -32
- package/dist/custom/model/dashboard.types.js +4 -161
- package/dist/custom/model/dashboard.types.ts +60 -275
- package/dist/custom/model/dashboardTopics.d.ts +2 -0
- package/dist/custom/model/dashboardTopics.js +4 -0
- package/dist/custom/model/dashboardTopics.ts +5 -0
- package/dist/custom/package.json +1 -0
- package/dist/custom/queries/useDashboardConfig.d.ts +96 -96
- package/dist/custom/queries/useDashboardConfig.js +9 -12
- package/dist/custom/queries/useWidgetData.d.ts +96 -96
- package/dist/custom/queries/useWidgetData.js +9 -12
- package/dist/custom/runtime/DashboardGroup.vue +2 -2
- package/dist/custom/runtime/DashboardPage.vue +17 -7
- package/dist/custom/runtime/DashboardRuntime.vue +20 -8
- package/dist/custom/runtime/WidgetRenderer.vue +1 -2
- package/dist/custom/runtime/WidgetShell.vue +3 -3
- package/dist/custom/skills/adminforth-dashboard/SKILL.md +2 -2
- package/dist/custom/widgets/{gauge-card/GaugeCardWidget.vue → GaugeCardWidget.vue} +63 -61
- package/dist/custom/widgets/{kpi-card/KpiCardWidget.vue → KpiCardWidget.vue} +35 -33
- package/dist/custom/widgets/{pivot-table/PivotTableWidget.vue → PivotTableWidget.vue} +71 -68
- package/dist/custom/widgets/{table/TableWidget.vue → TableWidget.vue} +5 -5
- package/dist/custom/widgets/chart/{bar/BarChart.vue → BarChart.vue} +2 -2
- package/dist/custom/widgets/chart/ChartWidget.vue +4 -15
- package/{custom/widgets/chart/funnel → dist/custom/widgets/chart}/FunnelChart.vue +80 -78
- package/{custom/widgets/chart/line → dist/custom/widgets/chart}/LineChart.vue +2 -2
- package/dist/custom/widgets/chart/{pie/PieChart.vue → PieChart.vue} +2 -2
- package/{custom/widgets/chart/stacked-bar → dist/custom/widgets/chart}/StackedBarChart.vue +97 -95
- package/dist/custom/widgets/chart/chart.types.d.ts +0 -2
- package/dist/custom/widgets/chart/chart.types.js +1 -25
- package/dist/custom/widgets/chart/chart.types.ts +0 -28
- package/dist/custom/widgets/chart/chart.utils.js +6 -14
- package/dist/custom/widgets/registry.js +14 -22
- package/dist/endpoint/dashboard.d.ts +2 -3
- package/dist/endpoint/dashboard.js +12 -32
- package/dist/endpoint/groups.d.ts +2 -21
- package/dist/endpoint/groups.js +18 -16
- package/dist/endpoint/widgets.d.ts +0 -3
- package/dist/endpoint/widgets.js +27 -74
- package/dist/index.js +1 -3
- package/dist/schema/api.d.ts +2090 -511
- package/dist/schema/api.js +18 -15
- package/dist/schema/widget.d.ts +1003 -250
- package/dist/schema/widget.js +102 -46
- package/dist/services/dashboardConfigService.d.ts +0 -10
- package/dist/services/dashboardConfigService.js +6 -21
- package/dist/services/widgetDataService.js +226 -196
- package/endpoint/dashboard.ts +13 -46
- package/endpoint/groups.ts +25 -42
- package/endpoint/widgets.ts +36 -95
- package/index.ts +0 -3
- package/package.json +3 -3
- package/schema/api.ts +19 -15
- package/schema/widget.ts +113 -52
- package/services/dashboardConfigService.ts +6 -25
- package/services/widgetDataService.ts +304 -229
- package/custom/widgets/chart/histogram/HistogramChart.vue +0 -21
- package/dist/custom/widgets/chart/histogram/HistogramChart.vue +0 -21
- package/dist/services/widgetConfigValidator.d.ts +0 -8
- package/dist/services/widgetConfigValidator.js +0 -27
- package/services/widgetConfigValidator.ts +0 -61
|
@@ -10,8 +10,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
10
10
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
11
11
|
width?: number | undefined;
|
|
12
12
|
height?: number | undefined;
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
min_width?: number | undefined;
|
|
14
|
+
max_width?: number | null | undefined;
|
|
15
15
|
order: number;
|
|
16
16
|
target: "empty";
|
|
17
17
|
} | {
|
|
@@ -22,8 +22,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
22
22
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
23
23
|
width?: number | undefined;
|
|
24
24
|
height?: number | undefined;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
min_width?: number | undefined;
|
|
26
|
+
max_width?: number | null | undefined;
|
|
27
27
|
order: number;
|
|
28
28
|
target: "table";
|
|
29
29
|
table?: {
|
|
@@ -33,7 +33,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
33
33
|
format?: import("../model/dashboard.types.js").ValueFormat | undefined;
|
|
34
34
|
})[] | undefined;
|
|
35
35
|
pagination?: boolean | undefined;
|
|
36
|
-
|
|
36
|
+
page_size?: number | undefined;
|
|
37
37
|
} | undefined;
|
|
38
38
|
query: {
|
|
39
39
|
resource: string;
|
|
@@ -51,27 +51,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
51
51
|
as: string;
|
|
52
52
|
})[] | undefined;
|
|
53
53
|
filters?: any;
|
|
54
|
-
|
|
54
|
+
group_by?: (string | {
|
|
55
55
|
field: string;
|
|
56
56
|
as?: string | undefined;
|
|
57
57
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
58
58
|
timezone?: string | undefined;
|
|
59
59
|
})[] | undefined;
|
|
60
|
-
|
|
60
|
+
order_by?: {
|
|
61
61
|
field: string;
|
|
62
62
|
direction?: "asc" | "desc" | undefined;
|
|
63
63
|
}[] | undefined;
|
|
64
64
|
limit?: number | undefined;
|
|
65
65
|
offset?: number | undefined;
|
|
66
|
-
|
|
66
|
+
time_series?: {
|
|
67
67
|
field: string;
|
|
68
68
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
69
69
|
timezone?: string | undefined;
|
|
70
70
|
} | undefined;
|
|
71
71
|
period?: {
|
|
72
72
|
field: string;
|
|
73
|
-
gte?:
|
|
74
|
-
lt?:
|
|
73
|
+
gte?: any;
|
|
74
|
+
lt?: any;
|
|
75
75
|
} | undefined;
|
|
76
76
|
bucket?: {
|
|
77
77
|
field: string;
|
|
@@ -85,7 +85,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
85
85
|
calc: string;
|
|
86
86
|
as: string;
|
|
87
87
|
}[] | undefined;
|
|
88
|
-
formatting?: Record<string,
|
|
88
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
89
89
|
};
|
|
90
90
|
} | {
|
|
91
91
|
id: string;
|
|
@@ -95,8 +95,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
95
95
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
96
96
|
width?: number | undefined;
|
|
97
97
|
height?: number | undefined;
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
min_width?: number | undefined;
|
|
99
|
+
max_width?: number | null | undefined;
|
|
100
100
|
order: number;
|
|
101
101
|
target: "chart";
|
|
102
102
|
chart: {
|
|
@@ -155,27 +155,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
155
155
|
as: string;
|
|
156
156
|
})[] | undefined;
|
|
157
157
|
filters?: any;
|
|
158
|
-
|
|
158
|
+
group_by?: (string | {
|
|
159
159
|
field: string;
|
|
160
160
|
as?: string | undefined;
|
|
161
161
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
162
162
|
timezone?: string | undefined;
|
|
163
163
|
})[] | undefined;
|
|
164
|
-
|
|
164
|
+
order_by?: {
|
|
165
165
|
field: string;
|
|
166
166
|
direction?: "asc" | "desc" | undefined;
|
|
167
167
|
}[] | undefined;
|
|
168
168
|
limit?: number | undefined;
|
|
169
169
|
offset?: number | undefined;
|
|
170
|
-
|
|
170
|
+
time_series?: {
|
|
171
171
|
field: string;
|
|
172
172
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
173
173
|
timezone?: string | undefined;
|
|
174
174
|
} | undefined;
|
|
175
175
|
period?: {
|
|
176
176
|
field: string;
|
|
177
|
-
gte?:
|
|
178
|
-
lt?:
|
|
177
|
+
gte?: any;
|
|
178
|
+
lt?: any;
|
|
179
179
|
} | undefined;
|
|
180
180
|
bucket?: {
|
|
181
181
|
field: string;
|
|
@@ -189,7 +189,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
189
189
|
calc: string;
|
|
190
190
|
as: string;
|
|
191
191
|
}[] | undefined;
|
|
192
|
-
formatting?: Record<string,
|
|
192
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
193
193
|
} | {
|
|
194
194
|
steps: {
|
|
195
195
|
name: string;
|
|
@@ -215,8 +215,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
215
215
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
216
216
|
width?: number | undefined;
|
|
217
217
|
height?: number | undefined;
|
|
218
|
-
|
|
219
|
-
|
|
218
|
+
min_width?: number | undefined;
|
|
219
|
+
max_width?: number | null | undefined;
|
|
220
220
|
order: number;
|
|
221
221
|
target: "kpi_card";
|
|
222
222
|
card: {
|
|
@@ -231,8 +231,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
231
231
|
text?: string | undefined;
|
|
232
232
|
field?: string | undefined;
|
|
233
233
|
} | undefined;
|
|
234
|
-
comparison?:
|
|
235
|
-
sparkline?:
|
|
234
|
+
comparison?: any;
|
|
235
|
+
sparkline?: any;
|
|
236
236
|
};
|
|
237
237
|
query: {
|
|
238
238
|
resource: string;
|
|
@@ -250,27 +250,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
250
250
|
as: string;
|
|
251
251
|
})[] | undefined;
|
|
252
252
|
filters?: any;
|
|
253
|
-
|
|
253
|
+
group_by?: (string | {
|
|
254
254
|
field: string;
|
|
255
255
|
as?: string | undefined;
|
|
256
256
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
257
257
|
timezone?: string | undefined;
|
|
258
258
|
})[] | undefined;
|
|
259
|
-
|
|
259
|
+
order_by?: {
|
|
260
260
|
field: string;
|
|
261
261
|
direction?: "asc" | "desc" | undefined;
|
|
262
262
|
}[] | undefined;
|
|
263
263
|
limit?: number | undefined;
|
|
264
264
|
offset?: number | undefined;
|
|
265
|
-
|
|
265
|
+
time_series?: {
|
|
266
266
|
field: string;
|
|
267
267
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
268
268
|
timezone?: string | undefined;
|
|
269
269
|
} | undefined;
|
|
270
270
|
period?: {
|
|
271
271
|
field: string;
|
|
272
|
-
gte?:
|
|
273
|
-
lt?:
|
|
272
|
+
gte?: any;
|
|
273
|
+
lt?: any;
|
|
274
274
|
} | undefined;
|
|
275
275
|
bucket?: {
|
|
276
276
|
field: string;
|
|
@@ -284,7 +284,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
284
284
|
calc: string;
|
|
285
285
|
as: string;
|
|
286
286
|
}[] | undefined;
|
|
287
|
-
formatting?: Record<string,
|
|
287
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
288
288
|
};
|
|
289
289
|
} | {
|
|
290
290
|
id: string;
|
|
@@ -294,8 +294,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
294
294
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
295
295
|
width?: number | undefined;
|
|
296
296
|
height?: number | undefined;
|
|
297
|
-
|
|
298
|
-
|
|
297
|
+
min_width?: number | undefined;
|
|
298
|
+
max_width?: number | null | undefined;
|
|
299
299
|
order: number;
|
|
300
300
|
target: "gauge_card";
|
|
301
301
|
card: {
|
|
@@ -312,9 +312,9 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
312
312
|
label?: string | undefined;
|
|
313
313
|
} | undefined;
|
|
314
314
|
progress?: {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
315
|
+
value_field: string;
|
|
316
|
+
target_value?: number | undefined;
|
|
317
|
+
target_field?: string | undefined;
|
|
318
318
|
format?: import("../model/dashboard.types.js").ValueFormat | undefined;
|
|
319
319
|
} | undefined;
|
|
320
320
|
color?: string | undefined;
|
|
@@ -335,27 +335,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
335
335
|
as: string;
|
|
336
336
|
})[] | undefined;
|
|
337
337
|
filters?: any;
|
|
338
|
-
|
|
338
|
+
group_by?: (string | {
|
|
339
339
|
field: string;
|
|
340
340
|
as?: string | undefined;
|
|
341
341
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
342
342
|
timezone?: string | undefined;
|
|
343
343
|
})[] | undefined;
|
|
344
|
-
|
|
344
|
+
order_by?: {
|
|
345
345
|
field: string;
|
|
346
346
|
direction?: "asc" | "desc" | undefined;
|
|
347
347
|
}[] | undefined;
|
|
348
348
|
limit?: number | undefined;
|
|
349
349
|
offset?: number | undefined;
|
|
350
|
-
|
|
350
|
+
time_series?: {
|
|
351
351
|
field: string;
|
|
352
352
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
353
353
|
timezone?: string | undefined;
|
|
354
354
|
} | undefined;
|
|
355
355
|
period?: {
|
|
356
356
|
field: string;
|
|
357
|
-
gte?:
|
|
358
|
-
lt?:
|
|
357
|
+
gte?: any;
|
|
358
|
+
lt?: any;
|
|
359
359
|
} | undefined;
|
|
360
360
|
bucket?: {
|
|
361
361
|
field: string;
|
|
@@ -369,7 +369,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
369
369
|
calc: string;
|
|
370
370
|
as: string;
|
|
371
371
|
}[] | undefined;
|
|
372
|
-
formatting?: Record<string,
|
|
372
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
373
373
|
};
|
|
374
374
|
} | {
|
|
375
375
|
id: string;
|
|
@@ -379,8 +379,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
379
379
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
380
380
|
width?: number | undefined;
|
|
381
381
|
height?: number | undefined;
|
|
382
|
-
|
|
383
|
-
|
|
382
|
+
min_width?: number | undefined;
|
|
383
|
+
max_width?: number | null | undefined;
|
|
384
384
|
order: number;
|
|
385
385
|
target: "pivot_table";
|
|
386
386
|
pivot: {
|
|
@@ -417,27 +417,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
417
417
|
as: string;
|
|
418
418
|
})[] | undefined;
|
|
419
419
|
filters?: any;
|
|
420
|
-
|
|
420
|
+
group_by?: (string | {
|
|
421
421
|
field: string;
|
|
422
422
|
as?: string | undefined;
|
|
423
423
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
424
424
|
timezone?: string | undefined;
|
|
425
425
|
})[] | undefined;
|
|
426
|
-
|
|
426
|
+
order_by?: {
|
|
427
427
|
field: string;
|
|
428
428
|
direction?: "asc" | "desc" | undefined;
|
|
429
429
|
}[] | undefined;
|
|
430
430
|
limit?: number | undefined;
|
|
431
431
|
offset?: number | undefined;
|
|
432
|
-
|
|
432
|
+
time_series?: {
|
|
433
433
|
field: string;
|
|
434
434
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
435
435
|
timezone?: string | undefined;
|
|
436
436
|
} | undefined;
|
|
437
437
|
period?: {
|
|
438
438
|
field: string;
|
|
439
|
-
gte?:
|
|
440
|
-
lt?:
|
|
439
|
+
gte?: any;
|
|
440
|
+
lt?: any;
|
|
441
441
|
} | undefined;
|
|
442
442
|
bucket?: {
|
|
443
443
|
field: string;
|
|
@@ -451,7 +451,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
451
451
|
calc: string;
|
|
452
452
|
as: string;
|
|
453
453
|
}[] | undefined;
|
|
454
|
-
formatting?: Record<string,
|
|
454
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
455
455
|
};
|
|
456
456
|
};
|
|
457
457
|
data: unknown;
|
|
@@ -464,8 +464,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
464
464
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
465
465
|
width?: number | undefined;
|
|
466
466
|
height?: number | undefined;
|
|
467
|
-
|
|
468
|
-
|
|
467
|
+
min_width?: number | undefined;
|
|
468
|
+
max_width?: number | null | undefined;
|
|
469
469
|
order: number;
|
|
470
470
|
target: "empty";
|
|
471
471
|
} | {
|
|
@@ -476,8 +476,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
476
476
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
477
477
|
width?: number | undefined;
|
|
478
478
|
height?: number | undefined;
|
|
479
|
-
|
|
480
|
-
|
|
479
|
+
min_width?: number | undefined;
|
|
480
|
+
max_width?: number | null | undefined;
|
|
481
481
|
order: number;
|
|
482
482
|
target: "table";
|
|
483
483
|
table?: {
|
|
@@ -487,7 +487,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
487
487
|
format?: import("../model/dashboard.types.js").ValueFormat | undefined;
|
|
488
488
|
})[] | undefined;
|
|
489
489
|
pagination?: boolean | undefined;
|
|
490
|
-
|
|
490
|
+
page_size?: number | undefined;
|
|
491
491
|
} | undefined;
|
|
492
492
|
query: {
|
|
493
493
|
resource: string;
|
|
@@ -505,27 +505,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
505
505
|
as: string;
|
|
506
506
|
})[] | undefined;
|
|
507
507
|
filters?: any;
|
|
508
|
-
|
|
508
|
+
group_by?: (string | {
|
|
509
509
|
field: string;
|
|
510
510
|
as?: string | undefined;
|
|
511
511
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
512
512
|
timezone?: string | undefined;
|
|
513
513
|
})[] | undefined;
|
|
514
|
-
|
|
514
|
+
order_by?: {
|
|
515
515
|
field: string;
|
|
516
516
|
direction?: "asc" | "desc" | undefined;
|
|
517
517
|
}[] | undefined;
|
|
518
518
|
limit?: number | undefined;
|
|
519
519
|
offset?: number | undefined;
|
|
520
|
-
|
|
520
|
+
time_series?: {
|
|
521
521
|
field: string;
|
|
522
522
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
523
523
|
timezone?: string | undefined;
|
|
524
524
|
} | undefined;
|
|
525
525
|
period?: {
|
|
526
526
|
field: string;
|
|
527
|
-
gte?:
|
|
528
|
-
lt?:
|
|
527
|
+
gte?: any;
|
|
528
|
+
lt?: any;
|
|
529
529
|
} | undefined;
|
|
530
530
|
bucket?: {
|
|
531
531
|
field: string;
|
|
@@ -539,7 +539,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
539
539
|
calc: string;
|
|
540
540
|
as: string;
|
|
541
541
|
}[] | undefined;
|
|
542
|
-
formatting?: Record<string,
|
|
542
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
543
543
|
};
|
|
544
544
|
} | {
|
|
545
545
|
id: string;
|
|
@@ -549,8 +549,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
549
549
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
550
550
|
width?: number | undefined;
|
|
551
551
|
height?: number | undefined;
|
|
552
|
-
|
|
553
|
-
|
|
552
|
+
min_width?: number | undefined;
|
|
553
|
+
max_width?: number | null | undefined;
|
|
554
554
|
order: number;
|
|
555
555
|
target: "chart";
|
|
556
556
|
chart: {
|
|
@@ -609,27 +609,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
609
609
|
as: string;
|
|
610
610
|
})[] | undefined;
|
|
611
611
|
filters?: any;
|
|
612
|
-
|
|
612
|
+
group_by?: (string | {
|
|
613
613
|
field: string;
|
|
614
614
|
as?: string | undefined;
|
|
615
615
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
616
616
|
timezone?: string | undefined;
|
|
617
617
|
})[] | undefined;
|
|
618
|
-
|
|
618
|
+
order_by?: {
|
|
619
619
|
field: string;
|
|
620
620
|
direction?: "asc" | "desc" | undefined;
|
|
621
621
|
}[] | undefined;
|
|
622
622
|
limit?: number | undefined;
|
|
623
623
|
offset?: number | undefined;
|
|
624
|
-
|
|
624
|
+
time_series?: {
|
|
625
625
|
field: string;
|
|
626
626
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
627
627
|
timezone?: string | undefined;
|
|
628
628
|
} | undefined;
|
|
629
629
|
period?: {
|
|
630
630
|
field: string;
|
|
631
|
-
gte?:
|
|
632
|
-
lt?:
|
|
631
|
+
gte?: any;
|
|
632
|
+
lt?: any;
|
|
633
633
|
} | undefined;
|
|
634
634
|
bucket?: {
|
|
635
635
|
field: string;
|
|
@@ -643,7 +643,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
643
643
|
calc: string;
|
|
644
644
|
as: string;
|
|
645
645
|
}[] | undefined;
|
|
646
|
-
formatting?: Record<string,
|
|
646
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
647
647
|
} | {
|
|
648
648
|
steps: {
|
|
649
649
|
name: string;
|
|
@@ -669,8 +669,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
669
669
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
670
670
|
width?: number | undefined;
|
|
671
671
|
height?: number | undefined;
|
|
672
|
-
|
|
673
|
-
|
|
672
|
+
min_width?: number | undefined;
|
|
673
|
+
max_width?: number | null | undefined;
|
|
674
674
|
order: number;
|
|
675
675
|
target: "kpi_card";
|
|
676
676
|
card: {
|
|
@@ -685,8 +685,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
685
685
|
text?: string | undefined;
|
|
686
686
|
field?: string | undefined;
|
|
687
687
|
} | undefined;
|
|
688
|
-
comparison?:
|
|
689
|
-
sparkline?:
|
|
688
|
+
comparison?: any;
|
|
689
|
+
sparkline?: any;
|
|
690
690
|
};
|
|
691
691
|
query: {
|
|
692
692
|
resource: string;
|
|
@@ -704,27 +704,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
704
704
|
as: string;
|
|
705
705
|
})[] | undefined;
|
|
706
706
|
filters?: any;
|
|
707
|
-
|
|
707
|
+
group_by?: (string | {
|
|
708
708
|
field: string;
|
|
709
709
|
as?: string | undefined;
|
|
710
710
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
711
711
|
timezone?: string | undefined;
|
|
712
712
|
})[] | undefined;
|
|
713
|
-
|
|
713
|
+
order_by?: {
|
|
714
714
|
field: string;
|
|
715
715
|
direction?: "asc" | "desc" | undefined;
|
|
716
716
|
}[] | undefined;
|
|
717
717
|
limit?: number | undefined;
|
|
718
718
|
offset?: number | undefined;
|
|
719
|
-
|
|
719
|
+
time_series?: {
|
|
720
720
|
field: string;
|
|
721
721
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
722
722
|
timezone?: string | undefined;
|
|
723
723
|
} | undefined;
|
|
724
724
|
period?: {
|
|
725
725
|
field: string;
|
|
726
|
-
gte?:
|
|
727
|
-
lt?:
|
|
726
|
+
gte?: any;
|
|
727
|
+
lt?: any;
|
|
728
728
|
} | undefined;
|
|
729
729
|
bucket?: {
|
|
730
730
|
field: string;
|
|
@@ -738,7 +738,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
738
738
|
calc: string;
|
|
739
739
|
as: string;
|
|
740
740
|
}[] | undefined;
|
|
741
|
-
formatting?: Record<string,
|
|
741
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
742
742
|
};
|
|
743
743
|
} | {
|
|
744
744
|
id: string;
|
|
@@ -748,8 +748,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
748
748
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
749
749
|
width?: number | undefined;
|
|
750
750
|
height?: number | undefined;
|
|
751
|
-
|
|
752
|
-
|
|
751
|
+
min_width?: number | undefined;
|
|
752
|
+
max_width?: number | null | undefined;
|
|
753
753
|
order: number;
|
|
754
754
|
target: "gauge_card";
|
|
755
755
|
card: {
|
|
@@ -766,9 +766,9 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
766
766
|
label?: string | undefined;
|
|
767
767
|
} | undefined;
|
|
768
768
|
progress?: {
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
769
|
+
value_field: string;
|
|
770
|
+
target_value?: number | undefined;
|
|
771
|
+
target_field?: string | undefined;
|
|
772
772
|
format?: import("../model/dashboard.types.js").ValueFormat | undefined;
|
|
773
773
|
} | undefined;
|
|
774
774
|
color?: string | undefined;
|
|
@@ -789,27 +789,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
789
789
|
as: string;
|
|
790
790
|
})[] | undefined;
|
|
791
791
|
filters?: any;
|
|
792
|
-
|
|
792
|
+
group_by?: (string | {
|
|
793
793
|
field: string;
|
|
794
794
|
as?: string | undefined;
|
|
795
795
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
796
796
|
timezone?: string | undefined;
|
|
797
797
|
})[] | undefined;
|
|
798
|
-
|
|
798
|
+
order_by?: {
|
|
799
799
|
field: string;
|
|
800
800
|
direction?: "asc" | "desc" | undefined;
|
|
801
801
|
}[] | undefined;
|
|
802
802
|
limit?: number | undefined;
|
|
803
803
|
offset?: number | undefined;
|
|
804
|
-
|
|
804
|
+
time_series?: {
|
|
805
805
|
field: string;
|
|
806
806
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
807
807
|
timezone?: string | undefined;
|
|
808
808
|
} | undefined;
|
|
809
809
|
period?: {
|
|
810
810
|
field: string;
|
|
811
|
-
gte?:
|
|
812
|
-
lt?:
|
|
811
|
+
gte?: any;
|
|
812
|
+
lt?: any;
|
|
813
813
|
} | undefined;
|
|
814
814
|
bucket?: {
|
|
815
815
|
field: string;
|
|
@@ -823,7 +823,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
823
823
|
calc: string;
|
|
824
824
|
as: string;
|
|
825
825
|
}[] | undefined;
|
|
826
|
-
formatting?: Record<string,
|
|
826
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
827
827
|
};
|
|
828
828
|
} | {
|
|
829
829
|
id: string;
|
|
@@ -833,8 +833,8 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
833
833
|
size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
|
|
834
834
|
width?: number | undefined;
|
|
835
835
|
height?: number | undefined;
|
|
836
|
-
|
|
837
|
-
|
|
836
|
+
min_width?: number | undefined;
|
|
837
|
+
max_width?: number | null | undefined;
|
|
838
838
|
order: number;
|
|
839
839
|
target: "pivot_table";
|
|
840
840
|
pivot: {
|
|
@@ -871,27 +871,27 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
871
871
|
as: string;
|
|
872
872
|
})[] | undefined;
|
|
873
873
|
filters?: any;
|
|
874
|
-
|
|
874
|
+
group_by?: (string | {
|
|
875
875
|
field: string;
|
|
876
876
|
as?: string | undefined;
|
|
877
877
|
grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
|
|
878
878
|
timezone?: string | undefined;
|
|
879
879
|
})[] | undefined;
|
|
880
|
-
|
|
880
|
+
order_by?: {
|
|
881
881
|
field: string;
|
|
882
882
|
direction?: "asc" | "desc" | undefined;
|
|
883
883
|
}[] | undefined;
|
|
884
884
|
limit?: number | undefined;
|
|
885
885
|
offset?: number | undefined;
|
|
886
|
-
|
|
886
|
+
time_series?: {
|
|
887
887
|
field: string;
|
|
888
888
|
grain: import("../model/dashboard.types.js").TimeGrain;
|
|
889
889
|
timezone?: string | undefined;
|
|
890
890
|
} | undefined;
|
|
891
891
|
period?: {
|
|
892
892
|
field: string;
|
|
893
|
-
gte?:
|
|
894
|
-
lt?:
|
|
893
|
+
gte?: any;
|
|
894
|
+
lt?: any;
|
|
895
895
|
} | undefined;
|
|
896
896
|
bucket?: {
|
|
897
897
|
field: string;
|
|
@@ -905,7 +905,7 @@ export declare function useWidgetData(slug: Ref<string>, widgetId: Ref<string>,
|
|
|
905
905
|
calc: string;
|
|
906
906
|
as: string;
|
|
907
907
|
}[] | undefined;
|
|
908
|
-
formatting?: Record<string,
|
|
908
|
+
formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
|
|
909
909
|
};
|
|
910
910
|
};
|
|
911
911
|
data: unknown;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
2
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
3
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -8,15 +7,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
8
|
});
|
|
10
9
|
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
-
const isFetching = (0, vue_1.ref)(false);
|
|
19
|
-
const error = (0, vue_1.ref)(null);
|
|
10
|
+
import { ref, watch } from 'vue';
|
|
11
|
+
import { dashboardApi } from '../api/dashboardApi.js';
|
|
12
|
+
export function useWidgetData(slug, widgetId, request) {
|
|
13
|
+
const data = ref(null);
|
|
14
|
+
const isLoading = ref(false);
|
|
15
|
+
const isFetching = ref(false);
|
|
16
|
+
const error = ref(null);
|
|
20
17
|
function refetch() {
|
|
21
18
|
return __awaiter(this, void 0, void 0, function* () {
|
|
22
19
|
if (!slug.value || !widgetId.value) {
|
|
@@ -29,7 +26,7 @@ function useWidgetData(slug, widgetId, request) {
|
|
|
29
26
|
isLoading.value = true;
|
|
30
27
|
}
|
|
31
28
|
try {
|
|
32
|
-
const response = yield
|
|
29
|
+
const response = yield dashboardApi.getDashboardWidgetData(slug.value, widgetId.value, request === null || request === void 0 ? void 0 : request.value);
|
|
33
30
|
data.value = response;
|
|
34
31
|
error.value = null;
|
|
35
32
|
return response;
|
|
@@ -44,7 +41,7 @@ function useWidgetData(slug, widgetId, request) {
|
|
|
44
41
|
}
|
|
45
42
|
});
|
|
46
43
|
}
|
|
47
|
-
|
|
44
|
+
watch(request ? [slug, widgetId, request] : [slug, widgetId], () => {
|
|
48
45
|
void refetch();
|
|
49
46
|
}, { immediate: true });
|
|
50
47
|
return {
|
|
@@ -112,8 +112,8 @@
|
|
|
112
112
|
:layout="{
|
|
113
113
|
size: widget.size,
|
|
114
114
|
width: widget.width,
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
min_width: widget.min_width,
|
|
116
|
+
max_width: widget.max_width,
|
|
117
117
|
height: widget.height,
|
|
118
118
|
}"
|
|
119
119
|
@edit="emit('edit-widget', widget)"
|