@adminforth/dashboard 1.4.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +23 -4
  2. package/custom/api/dashboardApi.ts +6 -9
  3. package/custom/model/dashboard.types.ts +60 -275
  4. package/custom/model/dashboardTopics.ts +5 -0
  5. package/custom/runtime/DashboardGroup.vue +2 -2
  6. package/custom/runtime/DashboardPage.vue +17 -7
  7. package/custom/runtime/DashboardRuntime.vue +20 -8
  8. package/custom/runtime/WidgetRenderer.vue +1 -2
  9. package/custom/runtime/WidgetShell.vue +3 -3
  10. package/custom/skills/adminforth-dashboard/SKILL.md +2 -2
  11. package/custom/widgets/{gauge-card/GaugeCardWidget.vue → GaugeCardWidget.vue} +63 -61
  12. package/custom/widgets/{kpi-card/KpiCardWidget.vue → KpiCardWidget.vue} +35 -33
  13. package/custom/widgets/{pivot-table/PivotTableWidget.vue → PivotTableWidget.vue} +71 -68
  14. package/custom/widgets/{table/TableWidget.vue → TableWidget.vue} +5 -5
  15. package/custom/widgets/chart/{bar/BarChart.vue → BarChart.vue} +2 -2
  16. package/custom/widgets/chart/ChartWidget.vue +4 -15
  17. package/{dist/custom/widgets/chart/funnel → custom/widgets/chart}/FunnelChart.vue +80 -78
  18. package/{dist/custom/widgets/chart/line → custom/widgets/chart}/LineChart.vue +2 -2
  19. package/custom/widgets/chart/{pie/PieChart.vue → PieChart.vue} +2 -2
  20. package/{dist/custom/widgets/chart/stacked-bar → custom/widgets/chart}/StackedBarChart.vue +97 -95
  21. package/custom/widgets/chart/chart.types.ts +0 -28
  22. package/dist/custom/api/dashboardApi.d.ts +4 -8
  23. package/dist/custom/api/dashboardApi.ts +6 -9
  24. package/dist/custom/model/dashboard.types.d.ts +38 -32
  25. package/dist/custom/model/dashboard.types.js +2 -155
  26. package/dist/custom/model/dashboard.types.ts +60 -275
  27. package/dist/custom/model/dashboardTopics.d.ts +2 -0
  28. package/dist/custom/model/dashboardTopics.js +8 -0
  29. package/dist/custom/model/dashboardTopics.ts +5 -0
  30. package/dist/custom/queries/useDashboardConfig.d.ts +96 -96
  31. package/dist/custom/queries/useWidgetData.d.ts +96 -96
  32. package/dist/custom/runtime/DashboardGroup.vue +2 -2
  33. package/dist/custom/runtime/DashboardPage.vue +17 -7
  34. package/dist/custom/runtime/DashboardRuntime.vue +20 -8
  35. package/dist/custom/runtime/WidgetRenderer.vue +1 -2
  36. package/dist/custom/runtime/WidgetShell.vue +3 -3
  37. package/dist/custom/skills/adminforth-dashboard/SKILL.md +2 -2
  38. package/dist/custom/widgets/{gauge-card/GaugeCardWidget.vue → GaugeCardWidget.vue} +63 -61
  39. package/dist/custom/widgets/{kpi-card/KpiCardWidget.vue → KpiCardWidget.vue} +35 -33
  40. package/dist/custom/widgets/{pivot-table/PivotTableWidget.vue → PivotTableWidget.vue} +71 -68
  41. package/dist/custom/widgets/{table/TableWidget.vue → TableWidget.vue} +5 -5
  42. package/dist/custom/widgets/chart/{bar/BarChart.vue → BarChart.vue} +2 -2
  43. package/dist/custom/widgets/chart/ChartWidget.vue +4 -15
  44. package/{custom/widgets/chart/funnel → dist/custom/widgets/chart}/FunnelChart.vue +80 -78
  45. package/{custom/widgets/chart/line → dist/custom/widgets/chart}/LineChart.vue +2 -2
  46. package/dist/custom/widgets/chart/{pie/PieChart.vue → PieChart.vue} +2 -2
  47. package/{custom/widgets/chart/stacked-bar → dist/custom/widgets/chart}/StackedBarChart.vue +97 -95
  48. package/dist/custom/widgets/chart/chart.types.d.ts +0 -2
  49. package/dist/custom/widgets/chart/chart.types.js +0 -23
  50. package/dist/custom/widgets/chart/chart.types.ts +0 -28
  51. package/dist/endpoint/dashboard.d.ts +2 -3
  52. package/dist/endpoint/dashboard.js +12 -32
  53. package/dist/endpoint/groups.d.ts +2 -21
  54. package/dist/endpoint/groups.js +18 -16
  55. package/dist/endpoint/widgets.d.ts +0 -3
  56. package/dist/endpoint/widgets.js +27 -74
  57. package/dist/index.js +1 -3
  58. package/dist/schema/api.d.ts +2090 -511
  59. package/dist/schema/api.js +18 -15
  60. package/dist/schema/widget.d.ts +1003 -250
  61. package/dist/schema/widget.js +102 -46
  62. package/dist/services/dashboardConfigService.d.ts +0 -10
  63. package/dist/services/dashboardConfigService.js +6 -21
  64. package/dist/services/widgetDataService.js +226 -196
  65. package/endpoint/dashboard.ts +13 -46
  66. package/endpoint/groups.ts +25 -42
  67. package/endpoint/widgets.ts +36 -95
  68. package/index.ts +0 -3
  69. package/package.json +3 -3
  70. package/schema/api.ts +19 -15
  71. package/schema/widget.ts +113 -52
  72. package/services/dashboardConfigService.ts +6 -25
  73. package/services/widgetDataService.ts +304 -229
  74. package/custom/widgets/chart/histogram/HistogramChart.vue +0 -21
  75. package/dist/custom/widgets/chart/histogram/HistogramChart.vue +0 -21
  76. package/dist/services/widgetConfigValidator.d.ts +0 -8
  77. package/dist/services/widgetConfigValidator.js +0 -27
  78. 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
- minWidth?: number | undefined;
14
- maxWidth?: number | null | undefined;
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
- minWidth?: number | undefined;
26
- maxWidth?: number | null | undefined;
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
- pageSize?: number | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
74
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
99
- maxWidth?: number | null | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
178
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
219
- maxWidth?: number | null | undefined;
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?: unknown;
235
- sparkline?: unknown;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
273
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
298
- maxWidth?: number | null | undefined;
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
- valueField: string;
316
- targetValue?: number | undefined;
317
- targetField?: string | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
358
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
383
- maxWidth?: number | null | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
440
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
468
- maxWidth?: number | null | undefined;
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
- minWidth?: number | undefined;
480
- maxWidth?: number | null | undefined;
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
- pageSize?: number | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
528
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
553
- maxWidth?: number | null | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
632
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
673
- maxWidth?: number | null | undefined;
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?: unknown;
689
- sparkline?: unknown;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
727
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
752
- maxWidth?: number | null | undefined;
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
- valueField: string;
770
- targetValue?: number | undefined;
771
- targetField?: string | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
812
- lt?: unknown;
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, unknown> | undefined;
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
- minWidth?: number | undefined;
837
- maxWidth?: number | null | undefined;
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
- groupBy?: (string | {
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
- orderBy?: {
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
- timeSeries?: {
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?: unknown;
894
- lt?: unknown;
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, unknown> | undefined;
908
+ formatting?: Record<string, import("../model/dashboard.types.js").JsonValue> | undefined;
909
909
  };
910
910
  };
911
911
  data: unknown;
@@ -112,8 +112,8 @@
112
112
  :layout="{
113
113
  size: widget.size,
114
114
  width: widget.width,
115
- minWidth: widget.minWidth,
116
- maxWidth: widget.maxWidth,
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)"
@@ -50,20 +50,31 @@ import { useRoute } from 'vue-router'
50
50
  import { Button } from '@/afcl'
51
51
  import { useCoreStore } from '@/stores/core'
52
52
  import websocket from '@/websocket'
53
+ import { getDashboardConfigUpdatedTopic } from '../model/dashboardTopics.js'
53
54
  import DashboardRuntime from './DashboardRuntime.vue'
54
55
  import { useDashboardConfig } from '../queries/useDashboardConfig.js'
55
56
 
56
57
  const route = useRoute()
57
58
  const coreStore = useCoreStore()
58
59
 
59
- const dashboardSlug = computed(() => {
60
- const slug = route.params.slug
60
+ function getDashboardSlugFromRouteParam(value: string | string[] | undefined) {
61
+ if (Array.isArray(value)) {
62
+ if (!value[0]) {
63
+ throw new Error('Dashboard slug route param is required')
64
+ }
65
+
66
+ return value[0]
67
+ }
61
68
 
62
- if (Array.isArray(slug)) {
63
- return slug[0] || 'default'
69
+ if (!value) {
70
+ throw new Error('Dashboard slug route param is required')
64
71
  }
65
72
 
66
- return (slug as string) || 'default'
73
+ return value
74
+ }
75
+
76
+ const dashboardSlug = computed(() => {
77
+ return getDashboardSlugFromRouteParam(route.params.slug as string | string[] | undefined)
67
78
  })
68
79
 
69
80
  const {
@@ -78,11 +89,10 @@ const isAdmin = computed(() => {
78
89
  return coreStore.adminUser?.dbUser.role === 'superadmin'
79
90
  })
80
91
 
81
- const DASHBOARD_CONFIG_UPDATED_TOPIC_PREFIX = '/opentopic/dashboard-config-updated'
82
92
  const subscribedTopic = ref<string | null>(null)
83
93
 
84
94
  const dashboardConfigUpdatedTopic = computed(() => {
85
- return `${DASHBOARD_CONFIG_UPDATED_TOPIC_PREFIX}/${dashboardSlug.value}`
95
+ return getDashboardConfigUpdatedTopic(dashboardSlug.value)
86
96
  })
87
97
 
88
98
  function handleDashboardConfigUpdated(data: { slug?: string; revision?: number }) {