@adminforth/dashboard 1.1.0 → 1.3.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.
Files changed (55) hide show
  1. package/README.md +43 -52
  2. package/custom/composables/useElementSize.ts +17 -2
  3. package/custom/model/dashboard.types.ts +385 -98
  4. package/custom/runtime/DashboardRuntime.vue +2 -1
  5. package/custom/runtime/WidgetRenderer.vue +2 -1
  6. package/custom/skills/adminforth-dashboard/SKILL.md +8 -4
  7. package/custom/widgets/chart/ChartWidget.vue +36 -35
  8. package/custom/widgets/chart/bar/BarChart.vue +20 -12
  9. package/custom/widgets/chart/chart.types.ts +42 -8
  10. package/custom/widgets/chart/chart.utils.ts +11 -0
  11. package/custom/widgets/chart/funnel/FunnelChart.vue +6 -4
  12. package/custom/widgets/chart/line/LineChart.vue +23 -15
  13. package/custom/widgets/chart/stacked-bar/StackedBarChart.vue +28 -43
  14. package/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -43
  15. package/custom/widgets/kpi-card/KpiCardWidget.vue +6 -10
  16. package/custom/widgets/pivot-table/PivotTableWidget.vue +10 -11
  17. package/custom/widgets/table/TableWidget.vue +9 -4
  18. package/dist/custom/composables/useElementSize.js +14 -2
  19. package/dist/custom/composables/useElementSize.ts +17 -2
  20. package/dist/custom/model/dashboard.types.d.ts +179 -38
  21. package/dist/custom/model/dashboard.types.js +108 -42
  22. package/dist/custom/model/dashboard.types.ts +385 -98
  23. package/dist/custom/queries/useDashboardConfig.d.ts +832 -68
  24. package/dist/custom/queries/useWidgetData.d.ts +828 -64
  25. package/dist/custom/runtime/DashboardRuntime.vue +2 -1
  26. package/dist/custom/runtime/WidgetRenderer.vue +2 -1
  27. package/dist/custom/skills/adminforth-dashboard/SKILL.md +8 -4
  28. package/dist/custom/widgets/chart/ChartWidget.vue +36 -35
  29. package/dist/custom/widgets/chart/bar/BarChart.vue +20 -12
  30. package/dist/custom/widgets/chart/chart.types.d.ts +14 -8
  31. package/dist/custom/widgets/chart/chart.types.js +23 -0
  32. package/dist/custom/widgets/chart/chart.types.ts +42 -8
  33. package/dist/custom/widgets/chart/chart.utils.d.ts +1 -0
  34. package/dist/custom/widgets/chart/chart.utils.js +7 -0
  35. package/dist/custom/widgets/chart/chart.utils.ts +11 -0
  36. package/dist/custom/widgets/chart/funnel/FunnelChart.vue +6 -4
  37. package/dist/custom/widgets/chart/line/LineChart.vue +23 -15
  38. package/dist/custom/widgets/chart/stacked-bar/StackedBarChart.vue +28 -43
  39. package/dist/custom/widgets/gauge-card/GaugeCardWidget.vue +7 -43
  40. package/dist/custom/widgets/kpi-card/KpiCardWidget.vue +6 -10
  41. package/dist/custom/widgets/pivot-table/PivotTableWidget.vue +10 -11
  42. package/dist/custom/widgets/table/TableWidget.vue +9 -4
  43. package/dist/endpoint/widgets.js +23 -3
  44. package/dist/schema/api.d.ts +2637 -933
  45. package/dist/schema/widget.d.ts +1562 -582
  46. package/dist/schema/widget.js +207 -127
  47. package/dist/services/widgetConfigValidator.js +16 -80
  48. package/dist/services/widgetDataService.d.ts +0 -9
  49. package/dist/services/widgetDataService.js +356 -97
  50. package/endpoint/dashboard.ts +1 -1
  51. package/endpoint/widgets.ts +29 -3
  52. package/package.json +1 -1
  53. package/schema/widget.ts +221 -121
  54. package/services/widgetConfigValidator.ts +29 -100
  55. package/services/widgetDataService.ts +478 -129
@@ -12,7 +12,7 @@ export declare function useDashboardConfig(slug: Ref<string>): {
12
12
  label: string;
13
13
  order: number;
14
14
  }[];
15
- widgets: {
15
+ widgets: ({
16
16
  id: string;
17
17
  group_id: string;
18
18
  label?: string | undefined;
@@ -22,56 +22,438 @@ export declare function useDashboardConfig(slug: Ref<string>): {
22
22
  minWidth?: number | undefined;
23
23
  maxWidth?: number | null | undefined;
24
24
  order: number;
25
- target: import("../model/dashboard.types.js").DashboardWidgetTarget;
26
- dataSource?: {
27
- type: "resource";
28
- resourceId: string;
29
- columns?: string[] | undefined;
30
- sort?: unknown;
31
- filters?: unknown;
32
- } | {
33
- type: "aggregate";
34
- resourceId: string;
35
- aggregations: Record<string, import("../model/dashboard.types.js").AggregationRule>;
36
- groupBy?: {
37
- type: "field";
25
+ target: "empty";
26
+ } | {
27
+ id: string;
28
+ group_id: string;
29
+ label?: string | undefined;
30
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
31
+ width?: number | undefined;
32
+ height?: number | undefined;
33
+ minWidth?: number | undefined;
34
+ maxWidth?: number | null | undefined;
35
+ order: number;
36
+ target: "table";
37
+ table?: {
38
+ columns?: (string | {
38
39
  field: string;
40
+ label?: string | undefined;
41
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
42
+ })[] | undefined;
43
+ pagination?: boolean | undefined;
44
+ pageSize?: number | undefined;
45
+ } | undefined;
46
+ query: {
47
+ resource: string;
48
+ select?: ({
49
+ field: string;
50
+ as?: string | undefined;
51
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
52
+ } | {
53
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
54
+ field?: string | undefined;
55
+ as: string;
56
+ filters?: any;
39
57
  } | {
40
- type: "date_trunc";
58
+ calc: string;
59
+ as: string;
60
+ })[] | undefined;
61
+ filters?: any;
62
+ groupBy?: (string | {
41
63
  field: string;
42
- truncation: "day" | "week" | "month" | "year";
64
+ as?: string | undefined;
65
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
66
+ timezone?: string | undefined;
67
+ })[] | undefined;
68
+ orderBy?: {
69
+ field: string;
70
+ direction?: "asc" | "desc" | undefined;
71
+ }[] | undefined;
72
+ limit?: number | undefined;
73
+ offset?: number | undefined;
74
+ timeSeries?: {
75
+ field: string;
76
+ grain: import("../model/dashboard.types.js").TimeGrain;
43
77
  timezone?: string | undefined;
44
78
  } | undefined;
45
- filters?: unknown;
46
- } | undefined;
47
- chart?: {
79
+ period?: {
80
+ field: string;
81
+ gte?: unknown;
82
+ lt?: unknown;
83
+ } | undefined;
84
+ bucket?: {
85
+ field: string;
86
+ buckets: {
87
+ label: string;
88
+ min?: number | undefined;
89
+ max?: number | undefined;
90
+ }[];
91
+ } | undefined;
92
+ calcs?: {
93
+ calc: string;
94
+ as: string;
95
+ }[] | undefined;
96
+ formatting?: Record<string, unknown> | undefined;
97
+ };
98
+ } | {
99
+ id: string;
100
+ group_id: string;
101
+ label?: string | undefined;
102
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
103
+ width?: number | undefined;
104
+ height?: number | undefined;
105
+ minWidth?: number | undefined;
106
+ maxWidth?: number | null | undefined;
107
+ order: number;
108
+ target: "chart";
109
+ chart: {
48
110
  type: import("../widgets/chart/chart.types.js").ChartWidgetType;
49
111
  title?: string | undefined;
50
- x_field?: string | undefined;
51
- y_field?: string | undefined;
52
- label_field?: string | undefined;
53
- value_field?: string | undefined;
54
- bucket_field?: string | undefined;
112
+ x?: {
113
+ field: string;
114
+ label?: string | undefined;
115
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
116
+ } | undefined;
117
+ y?: {
118
+ field: string;
119
+ label?: string | undefined;
120
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
121
+ } | {
122
+ field: string;
123
+ label?: string | undefined;
124
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
125
+ }[] | undefined;
126
+ label?: {
127
+ field: string;
128
+ label?: string | undefined;
129
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
130
+ } | undefined;
131
+ value?: {
132
+ field: string;
133
+ label?: string | undefined;
134
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
135
+ } | undefined;
55
136
  buckets?: {
56
137
  label: string;
57
138
  min?: number | undefined;
58
139
  max?: number | undefined;
59
140
  }[] | undefined;
60
141
  series?: {
61
- name: string;
62
142
  field: string;
143
+ label?: string | undefined;
63
144
  color?: string | undefined;
64
- }[] | undefined;
65
- series_name?: string | undefined;
145
+ } | undefined;
66
146
  color?: string | undefined;
67
147
  colors?: string[] | undefined;
68
- } | undefined;
69
- table?: unknown;
70
- kpi_card?: unknown;
71
- pivot_table?: unknown;
72
- gauge_card?: unknown;
73
- query?: unknown;
74
- }[];
148
+ };
149
+ query: {
150
+ resource: string;
151
+ select?: ({
152
+ field: string;
153
+ as?: string | undefined;
154
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
155
+ } | {
156
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
157
+ field?: string | undefined;
158
+ as: string;
159
+ filters?: any;
160
+ } | {
161
+ calc: string;
162
+ as: string;
163
+ })[] | undefined;
164
+ filters?: any;
165
+ groupBy?: (string | {
166
+ field: string;
167
+ as?: string | undefined;
168
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
169
+ timezone?: string | undefined;
170
+ })[] | undefined;
171
+ orderBy?: {
172
+ field: string;
173
+ direction?: "asc" | "desc" | undefined;
174
+ }[] | undefined;
175
+ limit?: number | undefined;
176
+ offset?: number | undefined;
177
+ timeSeries?: {
178
+ field: string;
179
+ grain: import("../model/dashboard.types.js").TimeGrain;
180
+ timezone?: string | undefined;
181
+ } | undefined;
182
+ period?: {
183
+ field: string;
184
+ gte?: unknown;
185
+ lt?: unknown;
186
+ } | undefined;
187
+ bucket?: {
188
+ field: string;
189
+ buckets: {
190
+ label: string;
191
+ min?: number | undefined;
192
+ max?: number | undefined;
193
+ }[];
194
+ } | undefined;
195
+ calcs?: {
196
+ calc: string;
197
+ as: string;
198
+ }[] | undefined;
199
+ formatting?: Record<string, unknown> | undefined;
200
+ } | {
201
+ steps: {
202
+ name: string;
203
+ resource: string;
204
+ metric: {
205
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
206
+ field?: string | undefined;
207
+ as: string;
208
+ filters?: any;
209
+ };
210
+ filters?: any;
211
+ }[];
212
+ };
213
+ } | {
214
+ id: string;
215
+ group_id: string;
216
+ label?: string | undefined;
217
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
218
+ width?: number | undefined;
219
+ height?: number | undefined;
220
+ minWidth?: number | undefined;
221
+ maxWidth?: number | null | undefined;
222
+ order: number;
223
+ target: "kpi_card";
224
+ card: {
225
+ title?: string | undefined;
226
+ value: {
227
+ field: string;
228
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
229
+ prefix?: string | undefined;
230
+ suffix?: string | undefined;
231
+ };
232
+ subtitle?: {
233
+ text?: string | undefined;
234
+ field?: string | undefined;
235
+ } | undefined;
236
+ comparison?: unknown;
237
+ sparkline?: unknown;
238
+ };
239
+ query: {
240
+ resource: string;
241
+ select?: ({
242
+ field: string;
243
+ as?: string | undefined;
244
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
245
+ } | {
246
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
247
+ field?: string | undefined;
248
+ as: string;
249
+ filters?: any;
250
+ } | {
251
+ calc: string;
252
+ as: string;
253
+ })[] | undefined;
254
+ filters?: any;
255
+ groupBy?: (string | {
256
+ field: string;
257
+ as?: string | undefined;
258
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
259
+ timezone?: string | undefined;
260
+ })[] | undefined;
261
+ orderBy?: {
262
+ field: string;
263
+ direction?: "asc" | "desc" | undefined;
264
+ }[] | undefined;
265
+ limit?: number | undefined;
266
+ offset?: number | undefined;
267
+ timeSeries?: {
268
+ field: string;
269
+ grain: import("../model/dashboard.types.js").TimeGrain;
270
+ timezone?: string | undefined;
271
+ } | undefined;
272
+ period?: {
273
+ field: string;
274
+ gte?: unknown;
275
+ lt?: unknown;
276
+ } | undefined;
277
+ bucket?: {
278
+ field: string;
279
+ buckets: {
280
+ label: string;
281
+ min?: number | undefined;
282
+ max?: number | undefined;
283
+ }[];
284
+ } | undefined;
285
+ calcs?: {
286
+ calc: string;
287
+ as: string;
288
+ }[] | undefined;
289
+ formatting?: Record<string, unknown> | undefined;
290
+ };
291
+ } | {
292
+ id: string;
293
+ group_id: string;
294
+ label?: string | undefined;
295
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
296
+ width?: number | undefined;
297
+ height?: number | undefined;
298
+ minWidth?: number | undefined;
299
+ maxWidth?: number | null | undefined;
300
+ order: number;
301
+ target: "gauge_card";
302
+ card: {
303
+ title?: string | undefined;
304
+ value: {
305
+ field: string;
306
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
307
+ prefix?: string | undefined;
308
+ suffix?: string | undefined;
309
+ };
310
+ target?: {
311
+ value?: number | undefined;
312
+ field?: string | undefined;
313
+ label?: string | undefined;
314
+ } | undefined;
315
+ progress?: {
316
+ valueField: string;
317
+ targetValue?: number | undefined;
318
+ targetField?: string | undefined;
319
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
320
+ } | undefined;
321
+ color?: string | undefined;
322
+ };
323
+ query: {
324
+ resource: string;
325
+ select?: ({
326
+ field: string;
327
+ as?: string | undefined;
328
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
329
+ } | {
330
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
331
+ field?: string | undefined;
332
+ as: string;
333
+ filters?: any;
334
+ } | {
335
+ calc: string;
336
+ as: string;
337
+ })[] | undefined;
338
+ filters?: any;
339
+ groupBy?: (string | {
340
+ field: string;
341
+ as?: string | undefined;
342
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
343
+ timezone?: string | undefined;
344
+ })[] | undefined;
345
+ orderBy?: {
346
+ field: string;
347
+ direction?: "asc" | "desc" | undefined;
348
+ }[] | undefined;
349
+ limit?: number | undefined;
350
+ offset?: number | undefined;
351
+ timeSeries?: {
352
+ field: string;
353
+ grain: import("../model/dashboard.types.js").TimeGrain;
354
+ timezone?: string | undefined;
355
+ } | undefined;
356
+ period?: {
357
+ field: string;
358
+ gte?: unknown;
359
+ lt?: unknown;
360
+ } | undefined;
361
+ bucket?: {
362
+ field: string;
363
+ buckets: {
364
+ label: string;
365
+ min?: number | undefined;
366
+ max?: number | undefined;
367
+ }[];
368
+ } | undefined;
369
+ calcs?: {
370
+ calc: string;
371
+ as: string;
372
+ }[] | undefined;
373
+ formatting?: Record<string, unknown> | undefined;
374
+ };
375
+ } | {
376
+ id: string;
377
+ group_id: string;
378
+ label?: string | undefined;
379
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
380
+ width?: number | undefined;
381
+ height?: number | undefined;
382
+ minWidth?: number | undefined;
383
+ maxWidth?: number | null | undefined;
384
+ order: number;
385
+ target: "pivot_table";
386
+ pivot: {
387
+ rows: (string | {
388
+ field: string;
389
+ label?: string | undefined;
390
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
391
+ })[];
392
+ columns?: (string | {
393
+ field: string;
394
+ label?: string | undefined;
395
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
396
+ })[] | undefined;
397
+ values: {
398
+ field: string;
399
+ label?: string | undefined;
400
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
401
+ aggregation?: "sum" | "count" | "avg" | "min" | "max" | undefined;
402
+ }[];
403
+ };
404
+ query: {
405
+ resource: string;
406
+ select?: ({
407
+ field: string;
408
+ as?: string | undefined;
409
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
410
+ } | {
411
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
412
+ field?: string | undefined;
413
+ as: string;
414
+ filters?: any;
415
+ } | {
416
+ calc: string;
417
+ as: string;
418
+ })[] | undefined;
419
+ filters?: any;
420
+ groupBy?: (string | {
421
+ field: string;
422
+ as?: string | undefined;
423
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
424
+ timezone?: string | undefined;
425
+ })[] | undefined;
426
+ orderBy?: {
427
+ field: string;
428
+ direction?: "asc" | "desc" | undefined;
429
+ }[] | undefined;
430
+ limit?: number | undefined;
431
+ offset?: number | undefined;
432
+ timeSeries?: {
433
+ field: string;
434
+ grain: import("../model/dashboard.types.js").TimeGrain;
435
+ timezone?: string | undefined;
436
+ } | undefined;
437
+ period?: {
438
+ field: string;
439
+ gte?: unknown;
440
+ lt?: unknown;
441
+ } | undefined;
442
+ bucket?: {
443
+ field: string;
444
+ buckets: {
445
+ label: string;
446
+ min?: number | undefined;
447
+ max?: number | undefined;
448
+ }[];
449
+ } | undefined;
450
+ calcs?: {
451
+ calc: string;
452
+ as: string;
453
+ }[] | undefined;
454
+ formatting?: Record<string, unknown> | undefined;
455
+ };
456
+ })[];
75
457
  };
76
458
  } | null, import("../api/dashboardApi.js").DashboardResponse | {
77
459
  id: string;
@@ -85,7 +467,7 @@ export declare function useDashboardConfig(slug: Ref<string>): {
85
467
  label: string;
86
468
  order: number;
87
469
  }[];
88
- widgets: {
470
+ widgets: ({
89
471
  id: string;
90
472
  group_id: string;
91
473
  label?: string | undefined;
@@ -95,56 +477,438 @@ export declare function useDashboardConfig(slug: Ref<string>): {
95
477
  minWidth?: number | undefined;
96
478
  maxWidth?: number | null | undefined;
97
479
  order: number;
98
- target: import("../model/dashboard.types.js").DashboardWidgetTarget;
99
- dataSource?: {
100
- type: "resource";
101
- resourceId: string;
102
- columns?: string[] | undefined;
103
- sort?: unknown;
104
- filters?: unknown;
105
- } | {
106
- type: "aggregate";
107
- resourceId: string;
108
- aggregations: Record<string, import("../model/dashboard.types.js").AggregationRule>;
109
- groupBy?: {
110
- type: "field";
480
+ target: "empty";
481
+ } | {
482
+ id: string;
483
+ group_id: string;
484
+ label?: string | undefined;
485
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
486
+ width?: number | undefined;
487
+ height?: number | undefined;
488
+ minWidth?: number | undefined;
489
+ maxWidth?: number | null | undefined;
490
+ order: number;
491
+ target: "table";
492
+ table?: {
493
+ columns?: (string | {
111
494
  field: string;
495
+ label?: string | undefined;
496
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
497
+ })[] | undefined;
498
+ pagination?: boolean | undefined;
499
+ pageSize?: number | undefined;
500
+ } | undefined;
501
+ query: {
502
+ resource: string;
503
+ select?: ({
504
+ field: string;
505
+ as?: string | undefined;
506
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
507
+ } | {
508
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
509
+ field?: string | undefined;
510
+ as: string;
511
+ filters?: any;
112
512
  } | {
113
- type: "date_trunc";
513
+ calc: string;
514
+ as: string;
515
+ })[] | undefined;
516
+ filters?: any;
517
+ groupBy?: (string | {
114
518
  field: string;
115
- truncation: "day" | "week" | "month" | "year";
519
+ as?: string | undefined;
520
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
521
+ timezone?: string | undefined;
522
+ })[] | undefined;
523
+ orderBy?: {
524
+ field: string;
525
+ direction?: "asc" | "desc" | undefined;
526
+ }[] | undefined;
527
+ limit?: number | undefined;
528
+ offset?: number | undefined;
529
+ timeSeries?: {
530
+ field: string;
531
+ grain: import("../model/dashboard.types.js").TimeGrain;
116
532
  timezone?: string | undefined;
117
533
  } | undefined;
118
- filters?: unknown;
119
- } | undefined;
120
- chart?: {
534
+ period?: {
535
+ field: string;
536
+ gte?: unknown;
537
+ lt?: unknown;
538
+ } | undefined;
539
+ bucket?: {
540
+ field: string;
541
+ buckets: {
542
+ label: string;
543
+ min?: number | undefined;
544
+ max?: number | undefined;
545
+ }[];
546
+ } | undefined;
547
+ calcs?: {
548
+ calc: string;
549
+ as: string;
550
+ }[] | undefined;
551
+ formatting?: Record<string, unknown> | undefined;
552
+ };
553
+ } | {
554
+ id: string;
555
+ group_id: string;
556
+ label?: string | undefined;
557
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
558
+ width?: number | undefined;
559
+ height?: number | undefined;
560
+ minWidth?: number | undefined;
561
+ maxWidth?: number | null | undefined;
562
+ order: number;
563
+ target: "chart";
564
+ chart: {
121
565
  type: import("../widgets/chart/chart.types.js").ChartWidgetType;
122
566
  title?: string | undefined;
123
- x_field?: string | undefined;
124
- y_field?: string | undefined;
125
- label_field?: string | undefined;
126
- value_field?: string | undefined;
127
- bucket_field?: string | undefined;
567
+ x?: {
568
+ field: string;
569
+ label?: string | undefined;
570
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
571
+ } | undefined;
572
+ y?: {
573
+ field: string;
574
+ label?: string | undefined;
575
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
576
+ } | {
577
+ field: string;
578
+ label?: string | undefined;
579
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
580
+ }[] | undefined;
581
+ label?: {
582
+ field: string;
583
+ label?: string | undefined;
584
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
585
+ } | undefined;
586
+ value?: {
587
+ field: string;
588
+ label?: string | undefined;
589
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
590
+ } | undefined;
128
591
  buckets?: {
129
592
  label: string;
130
593
  min?: number | undefined;
131
594
  max?: number | undefined;
132
595
  }[] | undefined;
133
596
  series?: {
134
- name: string;
135
597
  field: string;
598
+ label?: string | undefined;
136
599
  color?: string | undefined;
137
- }[] | undefined;
138
- series_name?: string | undefined;
600
+ } | undefined;
139
601
  color?: string | undefined;
140
602
  colors?: string[] | undefined;
141
- } | undefined;
142
- table?: unknown;
143
- kpi_card?: unknown;
144
- pivot_table?: unknown;
145
- gauge_card?: unknown;
146
- query?: unknown;
147
- }[];
603
+ };
604
+ query: {
605
+ resource: string;
606
+ select?: ({
607
+ field: string;
608
+ as?: string | undefined;
609
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
610
+ } | {
611
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
612
+ field?: string | undefined;
613
+ as: string;
614
+ filters?: any;
615
+ } | {
616
+ calc: string;
617
+ as: string;
618
+ })[] | undefined;
619
+ filters?: any;
620
+ groupBy?: (string | {
621
+ field: string;
622
+ as?: string | undefined;
623
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
624
+ timezone?: string | undefined;
625
+ })[] | undefined;
626
+ orderBy?: {
627
+ field: string;
628
+ direction?: "asc" | "desc" | undefined;
629
+ }[] | undefined;
630
+ limit?: number | undefined;
631
+ offset?: number | undefined;
632
+ timeSeries?: {
633
+ field: string;
634
+ grain: import("../model/dashboard.types.js").TimeGrain;
635
+ timezone?: string | undefined;
636
+ } | undefined;
637
+ period?: {
638
+ field: string;
639
+ gte?: unknown;
640
+ lt?: unknown;
641
+ } | undefined;
642
+ bucket?: {
643
+ field: string;
644
+ buckets: {
645
+ label: string;
646
+ min?: number | undefined;
647
+ max?: number | undefined;
648
+ }[];
649
+ } | undefined;
650
+ calcs?: {
651
+ calc: string;
652
+ as: string;
653
+ }[] | undefined;
654
+ formatting?: Record<string, unknown> | undefined;
655
+ } | {
656
+ steps: {
657
+ name: string;
658
+ resource: string;
659
+ metric: {
660
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
661
+ field?: string | undefined;
662
+ as: string;
663
+ filters?: any;
664
+ };
665
+ filters?: any;
666
+ }[];
667
+ };
668
+ } | {
669
+ id: string;
670
+ group_id: string;
671
+ label?: string | undefined;
672
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
673
+ width?: number | undefined;
674
+ height?: number | undefined;
675
+ minWidth?: number | undefined;
676
+ maxWidth?: number | null | undefined;
677
+ order: number;
678
+ target: "kpi_card";
679
+ card: {
680
+ title?: string | undefined;
681
+ value: {
682
+ field: string;
683
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
684
+ prefix?: string | undefined;
685
+ suffix?: string | undefined;
686
+ };
687
+ subtitle?: {
688
+ text?: string | undefined;
689
+ field?: string | undefined;
690
+ } | undefined;
691
+ comparison?: unknown;
692
+ sparkline?: unknown;
693
+ };
694
+ query: {
695
+ resource: string;
696
+ select?: ({
697
+ field: string;
698
+ as?: string | undefined;
699
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
700
+ } | {
701
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
702
+ field?: string | undefined;
703
+ as: string;
704
+ filters?: any;
705
+ } | {
706
+ calc: string;
707
+ as: string;
708
+ })[] | undefined;
709
+ filters?: any;
710
+ groupBy?: (string | {
711
+ field: string;
712
+ as?: string | undefined;
713
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
714
+ timezone?: string | undefined;
715
+ })[] | undefined;
716
+ orderBy?: {
717
+ field: string;
718
+ direction?: "asc" | "desc" | undefined;
719
+ }[] | undefined;
720
+ limit?: number | undefined;
721
+ offset?: number | undefined;
722
+ timeSeries?: {
723
+ field: string;
724
+ grain: import("../model/dashboard.types.js").TimeGrain;
725
+ timezone?: string | undefined;
726
+ } | undefined;
727
+ period?: {
728
+ field: string;
729
+ gte?: unknown;
730
+ lt?: unknown;
731
+ } | undefined;
732
+ bucket?: {
733
+ field: string;
734
+ buckets: {
735
+ label: string;
736
+ min?: number | undefined;
737
+ max?: number | undefined;
738
+ }[];
739
+ } | undefined;
740
+ calcs?: {
741
+ calc: string;
742
+ as: string;
743
+ }[] | undefined;
744
+ formatting?: Record<string, unknown> | undefined;
745
+ };
746
+ } | {
747
+ id: string;
748
+ group_id: string;
749
+ label?: string | undefined;
750
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
751
+ width?: number | undefined;
752
+ height?: number | undefined;
753
+ minWidth?: number | undefined;
754
+ maxWidth?: number | null | undefined;
755
+ order: number;
756
+ target: "gauge_card";
757
+ card: {
758
+ title?: string | undefined;
759
+ value: {
760
+ field: string;
761
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
762
+ prefix?: string | undefined;
763
+ suffix?: string | undefined;
764
+ };
765
+ target?: {
766
+ value?: number | undefined;
767
+ field?: string | undefined;
768
+ label?: string | undefined;
769
+ } | undefined;
770
+ progress?: {
771
+ valueField: string;
772
+ targetValue?: number | undefined;
773
+ targetField?: string | undefined;
774
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
775
+ } | undefined;
776
+ color?: string | undefined;
777
+ };
778
+ query: {
779
+ resource: string;
780
+ select?: ({
781
+ field: string;
782
+ as?: string | undefined;
783
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
784
+ } | {
785
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
786
+ field?: string | undefined;
787
+ as: string;
788
+ filters?: any;
789
+ } | {
790
+ calc: string;
791
+ as: string;
792
+ })[] | undefined;
793
+ filters?: any;
794
+ groupBy?: (string | {
795
+ field: string;
796
+ as?: string | undefined;
797
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
798
+ timezone?: string | undefined;
799
+ })[] | undefined;
800
+ orderBy?: {
801
+ field: string;
802
+ direction?: "asc" | "desc" | undefined;
803
+ }[] | undefined;
804
+ limit?: number | undefined;
805
+ offset?: number | undefined;
806
+ timeSeries?: {
807
+ field: string;
808
+ grain: import("../model/dashboard.types.js").TimeGrain;
809
+ timezone?: string | undefined;
810
+ } | undefined;
811
+ period?: {
812
+ field: string;
813
+ gte?: unknown;
814
+ lt?: unknown;
815
+ } | undefined;
816
+ bucket?: {
817
+ field: string;
818
+ buckets: {
819
+ label: string;
820
+ min?: number | undefined;
821
+ max?: number | undefined;
822
+ }[];
823
+ } | undefined;
824
+ calcs?: {
825
+ calc: string;
826
+ as: string;
827
+ }[] | undefined;
828
+ formatting?: Record<string, unknown> | undefined;
829
+ };
830
+ } | {
831
+ id: string;
832
+ group_id: string;
833
+ label?: string | undefined;
834
+ size?: import("../model/dashboard.types.js").DashboardWidgetSize | undefined;
835
+ width?: number | undefined;
836
+ height?: number | undefined;
837
+ minWidth?: number | undefined;
838
+ maxWidth?: number | null | undefined;
839
+ order: number;
840
+ target: "pivot_table";
841
+ pivot: {
842
+ rows: (string | {
843
+ field: string;
844
+ label?: string | undefined;
845
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
846
+ })[];
847
+ columns?: (string | {
848
+ field: string;
849
+ label?: string | undefined;
850
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
851
+ })[] | undefined;
852
+ values: {
853
+ field: string;
854
+ label?: string | undefined;
855
+ format?: import("../model/dashboard.types.js").ValueFormat | undefined;
856
+ aggregation?: "sum" | "count" | "avg" | "min" | "max" | undefined;
857
+ }[];
858
+ };
859
+ query: {
860
+ resource: string;
861
+ select?: ({
862
+ field: string;
863
+ as?: string | undefined;
864
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
865
+ } | {
866
+ agg: import("../model/dashboard.types.js").QueryAggregateOperation;
867
+ field?: string | undefined;
868
+ as: string;
869
+ filters?: any;
870
+ } | {
871
+ calc: string;
872
+ as: string;
873
+ })[] | undefined;
874
+ filters?: any;
875
+ groupBy?: (string | {
876
+ field: string;
877
+ as?: string | undefined;
878
+ grain?: import("../model/dashboard.types.js").TimeGrain | undefined;
879
+ timezone?: string | undefined;
880
+ })[] | undefined;
881
+ orderBy?: {
882
+ field: string;
883
+ direction?: "asc" | "desc" | undefined;
884
+ }[] | undefined;
885
+ limit?: number | undefined;
886
+ offset?: number | undefined;
887
+ timeSeries?: {
888
+ field: string;
889
+ grain: import("../model/dashboard.types.js").TimeGrain;
890
+ timezone?: string | undefined;
891
+ } | undefined;
892
+ period?: {
893
+ field: string;
894
+ gte?: unknown;
895
+ lt?: unknown;
896
+ } | undefined;
897
+ bucket?: {
898
+ field: string;
899
+ buckets: {
900
+ label: string;
901
+ min?: number | undefined;
902
+ max?: number | undefined;
903
+ }[];
904
+ } | undefined;
905
+ calcs?: {
906
+ calc: string;
907
+ as: string;
908
+ }[] | undefined;
909
+ formatting?: Record<string, unknown> | undefined;
910
+ };
911
+ })[];
148
912
  };
149
913
  } | null>;
150
914
  isLoading: Ref<boolean, boolean>;