@prismiq/react 0.1.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 (82) hide show
  1. package/README.md +88 -0
  2. package/dist/CustomSQLEditor-BXB4rf1q.d.cts +1297 -0
  3. package/dist/CustomSQLEditor-DYeId0Gp.d.ts +1297 -0
  4. package/dist/DashboardDialog-B3vYC5Gs.d.ts +1106 -0
  5. package/dist/DashboardDialog-LHmrtNQU.d.cts +1106 -0
  6. package/dist/accessibility-2yy5yqRR.d.cts +145 -0
  7. package/dist/accessibility-2yy5yqRR.d.ts +145 -0
  8. package/dist/charts/index.cjs +110 -0
  9. package/dist/charts/index.cjs.map +1 -0
  10. package/dist/charts/index.d.cts +2 -0
  11. package/dist/charts/index.d.ts +2 -0
  12. package/dist/charts/index.js +5 -0
  13. package/dist/charts/index.js.map +1 -0
  14. package/dist/chunk-2H5WTH4K.js +2409 -0
  15. package/dist/chunk-2H5WTH4K.js.map +1 -0
  16. package/dist/chunk-4AVL6GQK.cjs +470 -0
  17. package/dist/chunk-4AVL6GQK.cjs.map +1 -0
  18. package/dist/chunk-EX74SI67.js +455 -0
  19. package/dist/chunk-EX74SI67.js.map +1 -0
  20. package/dist/chunk-FEABEF3J.cjs +7543 -0
  21. package/dist/chunk-FEABEF3J.cjs.map +1 -0
  22. package/dist/chunk-JTCBZDHY.js +126 -0
  23. package/dist/chunk-JTCBZDHY.js.map +1 -0
  24. package/dist/chunk-LMTG3LRC.cjs +326 -0
  25. package/dist/chunk-LMTG3LRC.cjs.map +1 -0
  26. package/dist/chunk-MDXGGZSW.cjs +273 -0
  27. package/dist/chunk-MDXGGZSW.cjs.map +1 -0
  28. package/dist/chunk-MOAEEF5P.js +7510 -0
  29. package/dist/chunk-MOAEEF5P.js.map +1 -0
  30. package/dist/chunk-NK7HKX2J.cjs +2459 -0
  31. package/dist/chunk-NK7HKX2J.cjs.map +1 -0
  32. package/dist/chunk-NY6TZLST.cjs +8781 -0
  33. package/dist/chunk-NY6TZLST.cjs.map +1 -0
  34. package/dist/chunk-T6STUE7E.js +321 -0
  35. package/dist/chunk-T6STUE7E.js.map +1 -0
  36. package/dist/chunk-TRW7DKLP.cjs +141 -0
  37. package/dist/chunk-TRW7DKLP.cjs.map +1 -0
  38. package/dist/chunk-UPYINBZU.js +8706 -0
  39. package/dist/chunk-UPYINBZU.js.map +1 -0
  40. package/dist/chunk-WWTT2OJ5.js +246 -0
  41. package/dist/chunk-WWTT2OJ5.js.map +1 -0
  42. package/dist/components/index.cjs +222 -0
  43. package/dist/components/index.cjs.map +1 -0
  44. package/dist/components/index.d.cts +207 -0
  45. package/dist/components/index.d.ts +207 -0
  46. package/dist/components/index.js +5 -0
  47. package/dist/components/index.js.map +1 -0
  48. package/dist/dashboard/index.cjs +140 -0
  49. package/dist/dashboard/index.cjs.map +1 -0
  50. package/dist/dashboard/index.d.cts +302 -0
  51. package/dist/dashboard/index.d.ts +302 -0
  52. package/dist/dashboard/index.js +7 -0
  53. package/dist/dashboard/index.js.map +1 -0
  54. package/dist/export/index.cjs +32 -0
  55. package/dist/export/index.cjs.map +1 -0
  56. package/dist/export/index.d.cts +197 -0
  57. package/dist/export/index.d.ts +197 -0
  58. package/dist/export/index.js +3 -0
  59. package/dist/export/index.js.map +1 -0
  60. package/dist/index-C-Qcuu4Y.d.cts +821 -0
  61. package/dist/index-rPc7ijt8.d.ts +821 -0
  62. package/dist/index.cjs +1486 -0
  63. package/dist/index.cjs.map +1 -0
  64. package/dist/index.d.cts +1435 -0
  65. package/dist/index.d.ts +1435 -0
  66. package/dist/index.js +926 -0
  67. package/dist/index.js.map +1 -0
  68. package/dist/ssr/index.cjs +64 -0
  69. package/dist/ssr/index.cjs.map +1 -0
  70. package/dist/ssr/index.d.cts +213 -0
  71. package/dist/ssr/index.d.ts +213 -0
  72. package/dist/ssr/index.js +3 -0
  73. package/dist/ssr/index.js.map +1 -0
  74. package/dist/types-WrCbOeAV.d.cts +569 -0
  75. package/dist/types-WrCbOeAV.d.ts +569 -0
  76. package/dist/utils/index.cjs +64 -0
  77. package/dist/utils/index.cjs.map +1 -0
  78. package/dist/utils/index.d.cts +112 -0
  79. package/dist/utils/index.d.ts +112 -0
  80. package/dist/utils/index.js +3 -0
  81. package/dist/utils/index.js.map +1 -0
  82. package/package.json +110 -0
@@ -0,0 +1,1106 @@
1
+ import * as react from 'react';
2
+ import { HTMLAttributes, ReactNode } from 'react';
3
+ import { a as QueryDefinition, Q as QueryResult, D as DatabaseSchema, d as Dashboard$2, e as DashboardCreate, f as DashboardUpdate } from './types-WrCbOeAV.cjs';
4
+
5
+ /**
6
+ * Dashboard type definitions for Prismiq.
7
+ *
8
+ * These types define dashboards, widgets, and filters.
9
+ */
10
+
11
+ /**
12
+ * Supported widget types.
13
+ */
14
+ type WidgetType = 'metric' | 'bar_chart' | 'line_chart' | 'area_chart' | 'pie_chart' | 'scatter_chart' | 'table' | 'text';
15
+ /**
16
+ * Widget position and size in the grid layout.
17
+ */
18
+ interface WidgetPosition {
19
+ /** X coordinate (column position). */
20
+ x: number;
21
+ /** Y coordinate (row position). */
22
+ y: number;
23
+ /** Width in grid units. */
24
+ w: number;
25
+ /** Height in grid units. */
26
+ h: number;
27
+ /** Minimum width constraint. */
28
+ minW?: number;
29
+ /** Minimum height constraint. */
30
+ minH?: number;
31
+ /** Maximum width constraint. */
32
+ maxW?: number;
33
+ /** Maximum height constraint. */
34
+ maxH?: number;
35
+ }
36
+ /**
37
+ * Cross-filter widget configuration.
38
+ */
39
+ interface WidgetCrossFilterConfig {
40
+ /** Enable cross-filtering on this widget. */
41
+ enabled: boolean;
42
+ /** Column to filter on (defaults to x_axis). */
43
+ column?: string;
44
+ /** Table for the filter (optional). */
45
+ table?: string;
46
+ }
47
+ /**
48
+ * A reference line (threshold/goal) for charts.
49
+ */
50
+ interface ReferenceLine {
51
+ /** Y-axis value where line should appear. */
52
+ value: number;
53
+ /** Optional label displayed on the line. */
54
+ label?: string;
55
+ /** Line color (hex). */
56
+ color?: string;
57
+ /** Line style. */
58
+ lineStyle?: 'solid' | 'dashed' | 'dotted';
59
+ }
60
+ /**
61
+ * Widget-specific configuration options.
62
+ */
63
+ interface WidgetConfig {
64
+ /** Column to use for X axis. */
65
+ x_axis?: string;
66
+ /** Columns to use for Y axis (supports multiple for multi-series). */
67
+ y_axis?: string[];
68
+ /** Column that defines series for multi-series charts (e.g., category column in long-format data). */
69
+ series_column?: string;
70
+ /** Maximum number of series to display (top N by total value). Useful for charts with many series. */
71
+ max_series?: number;
72
+ /** Chart orientation for bar charts. */
73
+ orientation?: 'vertical' | 'horizontal';
74
+ /** Whether to stack series. */
75
+ stacked?: boolean;
76
+ /** Whether to show the legend. */
77
+ show_legend?: boolean;
78
+ /** Whether to show data labels on chart elements. */
79
+ show_data_labels?: boolean;
80
+ /** Custom color palette for the chart. */
81
+ colors?: string[];
82
+ /** Value format for chart axes (e.g., 'currency', 'percent'). */
83
+ valueFormat?: 'number' | 'currency' | 'percent' | 'compact';
84
+ /** Currency symbol when valueFormat is 'currency'. */
85
+ currencySymbol?: string;
86
+ /** Compact notation mode (K for thousands, M for millions, etc.). Null means no compacting. */
87
+ compactNotation?: 'K' | 'M' | 'B' | 'T' | null;
88
+ /** Number of decimal digits to show. */
89
+ decimalDigits?: number;
90
+ /** Reference lines for charts (thresholds, goals). */
91
+ referenceLines?: ReferenceLine[];
92
+ /** Cross-filter configuration for this widget. */
93
+ cross_filter?: WidgetCrossFilterConfig;
94
+ /** Number format for metric display. */
95
+ format?: 'number' | 'currency' | 'percent' | 'compact';
96
+ /** Column to use for trend comparison (deprecated, use trendDateColumn). */
97
+ trend_comparison?: string;
98
+ /** Whether to show trend indicator. */
99
+ showTrend?: boolean;
100
+ /** Comparison period for trend calculation. */
101
+ trendPeriod?: 'previous_period' | 'previous_year' | 'previous_month' | 'previous_week';
102
+ /** Date column to use for trend comparison. */
103
+ trendDateColumn?: string;
104
+ /** Number of rows per page. */
105
+ page_size?: number;
106
+ /** Whether table columns are sortable. */
107
+ sortable?: boolean;
108
+ /** Column to pivot (for pivot tables). Unique values become columns. */
109
+ pivot_column?: string;
110
+ /** Column containing values to distribute across pivoted columns. */
111
+ value_column?: string;
112
+ /** Date format strings for datetime columns (column name -> date-fns format string). Used by tables and chart axes. */
113
+ dateFormats?: Record<string, string>;
114
+ /** Text content for text widgets. */
115
+ content?: string;
116
+ /** Whether to render content as markdown. */
117
+ markdown?: boolean;
118
+ /** Text alignment for text widgets. */
119
+ alignment?: 'Left' | 'Center' | 'Right';
120
+ /** Font size for text widgets. */
121
+ fontSize?: 'Small' | 'Normal' | 'Large' | 'XLarge';
122
+ }
123
+ /**
124
+ * Widget hyperlink configuration for linking to external URLs.
125
+ */
126
+ interface WidgetHyperlink {
127
+ /** URL to navigate to. */
128
+ url: string;
129
+ /** Link title/tooltip. */
130
+ title?: string;
131
+ /** Target window (_blank for new tab, _self for same tab). */
132
+ target?: '_blank' | '_self';
133
+ }
134
+ /**
135
+ * A widget in a dashboard.
136
+ */
137
+ interface Widget$1 {
138
+ /** Unique widget identifier. */
139
+ id: string;
140
+ /** Widget type determines rendering. */
141
+ type: WidgetType;
142
+ /** Widget display title. */
143
+ title: string;
144
+ /** Query to execute for widget data (null for text widgets). */
145
+ query: QueryDefinition | null;
146
+ /** Position and size in the grid. */
147
+ position: WidgetPosition;
148
+ /** Widget-specific configuration. */
149
+ config: WidgetConfig;
150
+ /** Optional hyperlink to external URL (displayed as link icon in header). */
151
+ hyperlink?: WidgetHyperlink;
152
+ /** Data source mode last used when editing this widget. */
153
+ dataSourceMode?: 'guided' | 'advanced' | 'saved';
154
+ /** Creation timestamp (ISO string). */
155
+ created_at?: string;
156
+ /** Last update timestamp (ISO string). */
157
+ updated_at?: string;
158
+ }
159
+ /**
160
+ * Supported dashboard filter types.
161
+ */
162
+ type DashboardFilterType = 'date_range' | 'select' | 'multi_select' | 'text' | 'number_range';
163
+ /**
164
+ * Filter option for select/multi-select filters.
165
+ */
166
+ interface FilterOption {
167
+ /** Option value. */
168
+ value: string;
169
+ /** Display label. */
170
+ label: string;
171
+ }
172
+ /**
173
+ * A dashboard filter definition.
174
+ */
175
+ interface DashboardFilter {
176
+ /** Unique filter identifier. */
177
+ id: string;
178
+ /** Filter type determines the input component. */
179
+ type: DashboardFilterType;
180
+ /** Display label for the filter. */
181
+ label: string;
182
+ /** Column name this filter applies to. */
183
+ field: string;
184
+ /** Table name if filter targets a specific table. */
185
+ table?: string;
186
+ /** Default value for the filter. */
187
+ default_value?: unknown;
188
+ /** Available options for select/multi-select filters. */
189
+ options?: FilterOption[];
190
+ /** Date preset for date_range filters (e.g., 'last_7_days'). */
191
+ date_preset?: string;
192
+ /**
193
+ * Whether to dynamically load options from the database.
194
+ * When true, options are fetched from the table's column using getColumnSample.
195
+ * Requires `table` and `field` to be set.
196
+ */
197
+ dynamic?: boolean;
198
+ }
199
+ /**
200
+ * A filter value set by the user.
201
+ */
202
+ interface FilterValue {
203
+ /** ID of the filter this value belongs to. */
204
+ filter_id: string;
205
+ /** The filter value. */
206
+ value: unknown;
207
+ }
208
+ /**
209
+ * Date range value for date_range filters.
210
+ */
211
+ interface DateRangeValue {
212
+ /** Start date (ISO string). */
213
+ start: string;
214
+ /** End date (ISO string). */
215
+ end: string;
216
+ }
217
+ /**
218
+ * Number range value for number_range filters.
219
+ */
220
+ interface NumberRangeValue {
221
+ /** Minimum value. */
222
+ min: number | null;
223
+ /** Maximum value. */
224
+ max: number | null;
225
+ }
226
+ /**
227
+ * Dashboard layout configuration.
228
+ */
229
+ interface DashboardLayout$1 {
230
+ /** Number of columns in the grid. */
231
+ columns: number;
232
+ /** Height of a single row in pixels. */
233
+ row_height: number;
234
+ /** Margin between widgets [horizontal, vertical]. */
235
+ margin: [number, number];
236
+ /** Compact type for auto-arranging widgets. */
237
+ compact_type: 'vertical' | 'horizontal' | null;
238
+ }
239
+ /**
240
+ * A complete dashboard definition.
241
+ */
242
+ interface Dashboard$1 {
243
+ /** Unique dashboard identifier. */
244
+ id: string;
245
+ /** Dashboard name. */
246
+ name: string;
247
+ /** Optional description. */
248
+ description?: string;
249
+ /** Grid layout configuration. */
250
+ layout: DashboardLayout$1;
251
+ /** Widgets in the dashboard. */
252
+ widgets: Widget$1[];
253
+ /** Dashboard-level filters. */
254
+ filters: DashboardFilter[];
255
+ /** Whether the dashboard is publicly accessible. */
256
+ is_public: boolean;
257
+ /** Owner user ID. */
258
+ owner_id?: string | null;
259
+ /** List of user IDs with view access. */
260
+ allowed_viewers?: string[];
261
+ /** Creation timestamp (ISO string). */
262
+ created_at?: string;
263
+ /** Last update timestamp (ISO string). */
264
+ updated_at?: string;
265
+ }
266
+ /**
267
+ * Configuration for scroll-based lazy loading of widgets.
268
+ */
269
+ interface LazyLoadingConfig {
270
+ /** Whether lazy loading is enabled (default: true). */
271
+ enabled?: boolean;
272
+ /** Root margin for prefetching - loads widgets before visible (default: "200px"). */
273
+ rootMargin?: string;
274
+ }
275
+ /**
276
+ * Dashboard context value for read-only mode.
277
+ */
278
+ interface DashboardContextValue {
279
+ /** Current dashboard (null while loading). */
280
+ dashboard: Dashboard$1 | null;
281
+ /** Whether the dashboard is loading. */
282
+ isLoading: boolean;
283
+ /** Error if dashboard failed to load. */
284
+ error: Error | null;
285
+ /** Current filter values. */
286
+ filterValues: FilterValue[];
287
+ /** Query results keyed by widget ID. */
288
+ widgetResults: Record<string, QueryResult>;
289
+ /** Query errors keyed by widget ID. */
290
+ widgetErrors: Record<string, Error>;
291
+ /** Loading state keyed by widget ID. */
292
+ widgetLoading: Record<string, boolean>;
293
+ /** Unix timestamps when each widget was last refreshed. */
294
+ widgetRefreshTimes: Record<string, number>;
295
+ /** Set of widget IDs currently being refreshed (force refresh). */
296
+ refreshingWidgets: Set<string>;
297
+ /** Set a filter value. */
298
+ setFilterValue: (filterId: string, value: unknown) => void;
299
+ /** Refresh all widgets (with batching). */
300
+ refreshDashboard: () => Promise<void>;
301
+ /** Refresh a single widget (bypasses cache). */
302
+ refreshWidget: (widgetId: string) => Promise<void>;
303
+ /** Refresh all widgets with configurable batch size. */
304
+ refreshAll: (batchSize?: number) => Promise<void>;
305
+ /** Get oldest widget refresh timestamp (for dashboard-level indicator). */
306
+ getOldestRefreshTime: () => number | null;
307
+ /** Register a widget's visibility state (for lazy loading). */
308
+ registerVisibility: (widgetId: string, isVisible: boolean) => void;
309
+ /** Unregister a widget when unmounted (for lazy loading). */
310
+ unregisterVisibility: (widgetId: string) => void;
311
+ /** Whether lazy loading is enabled. */
312
+ lazyLoadingEnabled: boolean;
313
+ }
314
+ /**
315
+ * Dashboard context value for editor mode.
316
+ * Extends the read-only context with editing capabilities.
317
+ */
318
+ interface DashboardEditorContextValue extends DashboardContextValue {
319
+ /** Whether the dashboard is in edit mode. */
320
+ isEditing: boolean;
321
+ /** Whether there are unsaved changes. */
322
+ hasChanges: boolean;
323
+ /** Add a new widget. */
324
+ addWidget: (widget: Omit<Widget$1, 'id'>) => void;
325
+ /** Update an existing widget. */
326
+ updateWidget: (widgetId: string, updates: Partial<Widget$1>) => void;
327
+ /** Remove a widget. */
328
+ removeWidget: (widgetId: string) => void;
329
+ /** Duplicate a widget. */
330
+ duplicateWidget: (widgetId: string) => void;
331
+ /** Update widget positions after layout change. */
332
+ updateLayout: (positions: Record<string, WidgetPosition>) => void;
333
+ /** Save the dashboard. */
334
+ save: () => Promise<void>;
335
+ /** Cancel editing and revert changes. */
336
+ cancel: () => void;
337
+ }
338
+ /**
339
+ * Props for DashboardProvider.
340
+ */
341
+ interface DashboardProviderProps {
342
+ /** Dashboard ID to load. */
343
+ dashboardId: string;
344
+ /**
345
+ * @deprecated Auto-refresh is no longer supported. Use manual refresh via refreshAll().
346
+ */
347
+ refreshInterval?: number;
348
+ /** Number of widgets to load in each batch (default: 8). */
349
+ batchSize?: number;
350
+ /** Lazy loading configuration (default: enabled with 200px margin). */
351
+ lazyLoading?: LazyLoadingConfig;
352
+ /** Children to render. */
353
+ children: React.ReactNode;
354
+ }
355
+ /**
356
+ * Props for Dashboard component.
357
+ */
358
+ interface DashboardProps {
359
+ /** Dashboard ID to display. */
360
+ id: string;
361
+ /** Whether to show the filter bar. */
362
+ showFilters?: boolean;
363
+ /** Whether to show the dashboard title. */
364
+ showTitle?: boolean;
365
+ /** Auto-refresh interval in milliseconds. */
366
+ refreshInterval?: number;
367
+ /** Number of widgets to load in each batch (default: 8). */
368
+ batchSize?: number;
369
+ /** Lazy loading configuration (default: enabled with 200px margin). */
370
+ lazyLoading?: LazyLoadingConfig;
371
+ /** Callback when a widget is clicked. */
372
+ onWidgetClick?: (widget: Widget$1, result: QueryResult) => void;
373
+ /** Additional CSS class. */
374
+ className?: string;
375
+ }
376
+ /**
377
+ * Props for DashboardEditor component.
378
+ */
379
+ interface DashboardEditorProps {
380
+ /** Dashboard ID to edit (omit for new dashboard). */
381
+ dashboardId?: string;
382
+ /** Callback when dashboard is saved. */
383
+ onSave?: (dashboard: Dashboard$1) => void;
384
+ /** Callback when editing is cancelled. */
385
+ onCancel?: () => void;
386
+ /** Number of widgets to load in each batch (default: 4). */
387
+ batchSize?: number;
388
+ /** Additional CSS class. */
389
+ className?: string;
390
+ }
391
+ /**
392
+ * Props for DashboardLayout component.
393
+ */
394
+ interface DashboardLayoutProps {
395
+ /** Widgets to display. */
396
+ widgets: Widget$1[];
397
+ /** Layout configuration. */
398
+ layout: DashboardLayout$1;
399
+ /** Whether the layout is editable. */
400
+ editable?: boolean;
401
+ /** Callback when layout changes. */
402
+ onLayoutChange?: (positions: Record<string, WidgetPosition>) => void;
403
+ /** Render function for each widget. */
404
+ renderWidget: (widget: Widget$1) => React.ReactNode;
405
+ /** Additional CSS class. */
406
+ className?: string;
407
+ }
408
+ /**
409
+ * Props for Widget component.
410
+ */
411
+ interface WidgetProps {
412
+ /** Widget to display. */
413
+ widget: Widget$1;
414
+ /** Query result for the widget. */
415
+ result: QueryResult | null;
416
+ /** Whether the widget is loading. */
417
+ isLoading?: boolean;
418
+ /** Error if query failed. */
419
+ error?: Error | null;
420
+ /** Additional CSS class. */
421
+ className?: string;
422
+ /** Unix timestamp when widget was last refreshed. */
423
+ lastRefreshed?: number;
424
+ /** Whether the widget is currently being refreshed (force refresh). */
425
+ isRefreshing?: boolean;
426
+ /** Callback to trigger widget refresh. */
427
+ onRefresh?: () => void;
428
+ }
429
+ /**
430
+ * Props for WidgetHeader component.
431
+ */
432
+ interface WidgetHeaderProps {
433
+ /** Widget title. */
434
+ title: string;
435
+ /** Optional hyperlink for the widget (shows link icon in header). */
436
+ hyperlink?: WidgetHyperlink;
437
+ /** Unix timestamp when widget was last refreshed. */
438
+ lastRefreshed?: number;
439
+ /** Whether the widget is currently being refreshed (force refresh). */
440
+ isRefreshing?: boolean;
441
+ /** Callback to trigger widget refresh. */
442
+ onRefresh?: () => void;
443
+ }
444
+ /**
445
+ * Props for FilterBar component.
446
+ */
447
+ interface FilterBarProps {
448
+ /** Filters to display. */
449
+ filters: DashboardFilter[];
450
+ /** Current filter values. */
451
+ values: FilterValue[];
452
+ /** Callback when a filter value changes. */
453
+ onChange: (filterId: string, value: unknown) => void;
454
+ /** Callback to reset all filters. */
455
+ onReset?: () => void;
456
+ /** Additional CSS class. */
457
+ className?: string;
458
+ }
459
+ /**
460
+ * Props for DateRangeFilter component.
461
+ */
462
+ interface DateRangeFilterProps {
463
+ /** Filter definition. */
464
+ filter: DashboardFilter;
465
+ /** Current value (DateRangeValue or preset string). */
466
+ value: DateRangeValue | string | null;
467
+ /** Callback when value changes. */
468
+ onChange: (value: DateRangeValue | string) => void;
469
+ }
470
+ /**
471
+ * Props for SelectFilter component.
472
+ */
473
+ interface SelectFilterProps {
474
+ /** Filter definition. */
475
+ filter: DashboardFilter;
476
+ /** Current value. */
477
+ value: string | null;
478
+ /** Callback when value changes. */
479
+ onChange: (value: string | null) => void;
480
+ }
481
+ /**
482
+ * Props for MultiSelectFilter component.
483
+ */
484
+ interface MultiSelectFilterProps {
485
+ /** Filter definition. */
486
+ filter: DashboardFilter;
487
+ /** Current values. */
488
+ value: string[];
489
+ /** Callback when values change. */
490
+ onChange: (value: string[]) => void;
491
+ }
492
+ /**
493
+ * Props for TextFilter component.
494
+ */
495
+ interface TextFilterProps {
496
+ /** Filter definition. */
497
+ filter: DashboardFilter;
498
+ /** Current value. */
499
+ value: string;
500
+ /** Callback when value changes. */
501
+ onChange: (value: string) => void;
502
+ /** Debounce delay in milliseconds. */
503
+ debounceMs?: number;
504
+ }
505
+ /**
506
+ * Props for WidgetPalette component.
507
+ */
508
+ interface WidgetPaletteProps {
509
+ /** Callback when a widget type is selected. */
510
+ onAddWidget: (type: WidgetType) => void;
511
+ }
512
+ /**
513
+ * Props for WidgetEditor component.
514
+ */
515
+ interface WidgetEditorProps {
516
+ /** Widget to edit. */
517
+ widget: Widget$1;
518
+ /** Database schema for column selection. */
519
+ schema: DatabaseSchema;
520
+ /** Callback when widget is saved. */
521
+ onSave: (widget: Widget$1) => void;
522
+ /** Callback when editing is cancelled. */
523
+ onCancel: () => void;
524
+ }
525
+
526
+ /**
527
+ * Dashboard context.
528
+ */
529
+ declare const DashboardContext: react.Context<DashboardContextValue | null>;
530
+ /**
531
+ * Provider component for dashboard state management.
532
+ */
533
+ declare function DashboardProvider({ dashboardId, batchSize, lazyLoading, children, }: DashboardProviderProps): JSX.Element;
534
+
535
+ /**
536
+ * Hook to access dashboard context.
537
+ */
538
+
539
+ /**
540
+ * Hook to access the full dashboard context.
541
+ *
542
+ * Must be used within a DashboardProvider.
543
+ *
544
+ * @returns Dashboard context value
545
+ * @throws Error if used outside DashboardProvider
546
+ *
547
+ * @example
548
+ * ```tsx
549
+ * function DashboardHeader() {
550
+ * const { dashboard, isLoading, refreshDashboard } = useDashboard();
551
+ *
552
+ * if (isLoading) return <Spinner />;
553
+ *
554
+ * return (
555
+ * <header>
556
+ * <h1>{dashboard?.name}</h1>
557
+ * <button onClick={refreshDashboard}>Refresh</button>
558
+ * </header>
559
+ * );
560
+ * }
561
+ * ```
562
+ */
563
+ declare function useDashboard(): DashboardContextValue;
564
+
565
+ /**
566
+ * Hook to manage dashboard filter state.
567
+ */
568
+
569
+ /**
570
+ * Result of the useDashboardFilters hook.
571
+ */
572
+ interface UseDashboardFiltersResult {
573
+ /** All dashboard filters. */
574
+ filters: DashboardFilter[];
575
+ /** Current filter values. */
576
+ values: FilterValue[];
577
+ /** Set a filter value. */
578
+ setValue: (filterId: string, value: unknown) => void;
579
+ /** Reset all filters to defaults. */
580
+ resetAll: () => void;
581
+ /** Reset a single filter to its default. */
582
+ resetFilter: (filterId: string) => void;
583
+ /** Get the current value for a filter. */
584
+ getValue: (filterId: string) => unknown;
585
+ }
586
+ /**
587
+ * Hook to manage dashboard filter state.
588
+ *
589
+ * Provides convenient methods for working with dashboard filters.
590
+ *
591
+ * @returns Filter management utilities
592
+ *
593
+ * @example
594
+ * ```tsx
595
+ * function FilterControls() {
596
+ * const { filters, values, setValue, resetAll, getValue } = useDashboardFilters();
597
+ *
598
+ * return (
599
+ * <div>
600
+ * {filters.map((filter) => (
601
+ * <FilterInput
602
+ * key={filter.id}
603
+ * filter={filter}
604
+ * value={getValue(filter.id)}
605
+ * onChange={(v) => setValue(filter.id, v)}
606
+ * />
607
+ * ))}
608
+ * <button onClick={resetAll}>Reset</button>
609
+ * </div>
610
+ * );
611
+ * }
612
+ * ```
613
+ */
614
+ declare function useDashboardFilters(): UseDashboardFiltersResult;
615
+
616
+ /**
617
+ * Hook to access a single widget's state.
618
+ */
619
+
620
+ /**
621
+ * Result of the useWidget hook.
622
+ */
623
+ interface UseWidgetResult {
624
+ /** The widget definition. */
625
+ widget: Widget$1;
626
+ /** Query result for this widget (null if not yet loaded or text widget). */
627
+ result: QueryResult | null;
628
+ /** Whether the widget query is loading. */
629
+ isLoading: boolean;
630
+ /** Error if the query failed. */
631
+ error: Error | null;
632
+ /** Refresh this widget's data. */
633
+ refresh: () => Promise<void>;
634
+ }
635
+ /**
636
+ * Hook to access a single widget's state.
637
+ *
638
+ * Provides the widget definition, query result, loading state, and refresh function.
639
+ *
640
+ * @param widgetId - ID of the widget to access
641
+ * @returns Widget state and refresh function
642
+ * @throws Error if widget not found
643
+ *
644
+ * @example
645
+ * ```tsx
646
+ * function WidgetDisplay({ widgetId }: { widgetId: string }) {
647
+ * const { widget, result, isLoading, error, refresh } = useWidget(widgetId);
648
+ *
649
+ * if (isLoading) return <Spinner />;
650
+ * if (error) return <Error message={error.message} />;
651
+ *
652
+ * return (
653
+ * <div>
654
+ * <h3>{widget.title}</h3>
655
+ * <Chart type={widget.type} data={result} />
656
+ * <button onClick={refresh}>Refresh</button>
657
+ * </div>
658
+ * );
659
+ * }
660
+ * ```
661
+ */
662
+ declare function useWidget(widgetId: string): UseWidgetResult;
663
+
664
+ /**
665
+ * Hook for auto-refreshing dashboard data.
666
+ */
667
+ /**
668
+ * Options for useAutoRefresh hook.
669
+ */
670
+ interface UseAutoRefreshOptions {
671
+ /** Refresh callback to execute. */
672
+ onRefresh: () => Promise<void>;
673
+ /** Interval in milliseconds. Set to 0 to disable. */
674
+ intervalMs: number;
675
+ /** Whether to start paused. */
676
+ startPaused?: boolean;
677
+ }
678
+ /**
679
+ * Result of useAutoRefresh hook.
680
+ */
681
+ interface UseAutoRefreshResult {
682
+ /** Whether auto-refresh is currently active. */
683
+ isActive: boolean;
684
+ /** Time until next refresh in milliseconds. */
685
+ timeUntilRefresh: number;
686
+ /** Pause auto-refresh. */
687
+ pause: () => void;
688
+ /** Resume auto-refresh. */
689
+ resume: () => void;
690
+ /** Toggle auto-refresh. */
691
+ toggle: () => void;
692
+ /** Trigger an immediate refresh. */
693
+ refreshNow: () => Promise<void>;
694
+ }
695
+ /**
696
+ * Hook for auto-refreshing data at a specified interval.
697
+ *
698
+ * @example
699
+ * ```tsx
700
+ * const { isActive, timeUntilRefresh, pause, resume, refreshNow } = useAutoRefresh({
701
+ * onRefresh: async () => {
702
+ * await fetchData();
703
+ * },
704
+ * intervalMs: 30000, // 30 seconds
705
+ * });
706
+ *
707
+ * return (
708
+ * <div>
709
+ * <button onClick={refreshNow}>Refresh Now</button>
710
+ * <button onClick={isActive ? pause : resume}>
711
+ * {isActive ? 'Pause' : 'Resume'}
712
+ * </button>
713
+ * <span>Next refresh in: {Math.round(timeUntilRefresh / 1000)}s</span>
714
+ * </div>
715
+ * );
716
+ * ```
717
+ */
718
+ declare function useAutoRefresh({ onRefresh, intervalMs, startPaused, }: UseAutoRefreshOptions): UseAutoRefreshResult;
719
+
720
+ /**
721
+ * Hook for managing fullscreen mode.
722
+ */
723
+ /**
724
+ * Result of useFullscreen hook.
725
+ */
726
+ interface UseFullscreenResult {
727
+ /** Whether fullscreen mode is currently active. */
728
+ isFullscreen: boolean;
729
+ /** Enter fullscreen mode. */
730
+ enterFullscreen: () => Promise<void>;
731
+ /** Exit fullscreen mode. */
732
+ exitFullscreen: () => Promise<void>;
733
+ /** Toggle fullscreen mode. */
734
+ toggleFullscreen: () => Promise<void>;
735
+ /** Ref to attach to the element that should become fullscreen. */
736
+ ref: React.RefObject<HTMLDivElement>;
737
+ }
738
+ /**
739
+ * Hook for managing fullscreen mode on an element.
740
+ *
741
+ * @example
742
+ * ```tsx
743
+ * function Dashboard() {
744
+ * const { isFullscreen, toggleFullscreen, ref } = useFullscreen();
745
+ *
746
+ * return (
747
+ * <div ref={ref}>
748
+ * <button onClick={toggleFullscreen}>
749
+ * {isFullscreen ? 'Exit Fullscreen' : 'Fullscreen'}
750
+ * </button>
751
+ * <DashboardContent />
752
+ * </div>
753
+ * );
754
+ * }
755
+ * ```
756
+ */
757
+ declare function useFullscreen(): UseFullscreenResult;
758
+
759
+ /**
760
+ * Main Dashboard component for embedding.
761
+ */
762
+
763
+ /**
764
+ * Dashboard component for embedding.
765
+ *
766
+ * @example
767
+ * ```tsx
768
+ * <AnalyticsProvider endpoint="https://api.example.com">
769
+ * <Dashboard
770
+ * id="my-dashboard"
771
+ * showFilters={true}
772
+ * refreshInterval={60000}
773
+ * />
774
+ * </AnalyticsProvider>
775
+ * ```
776
+ */
777
+ declare function Dashboard({ id, showFilters, showTitle, refreshInterval, batchSize, lazyLoading, className, }: DashboardProps): JSX.Element;
778
+
779
+ /**
780
+ * Dashboard grid layout component using react-grid-layout.
781
+ * Supports responsive breakpoints for mobile-friendly layouts.
782
+ */
783
+
784
+ /**
785
+ * Dashboard grid layout component.
786
+ *
787
+ * Uses react-grid-layout to provide a responsive, draggable and resizable grid.
788
+ * Supports multiple breakpoints for mobile-friendly layouts.
789
+ *
790
+ * @example
791
+ * ```tsx
792
+ * <DashboardLayout
793
+ * widgets={widgets}
794
+ * layout={dashboardLayout}
795
+ * editable={true}
796
+ * onLayoutChange={(positions) => updatePositions(positions)}
797
+ * renderWidget={(widget) => <Widget widget={widget} />}
798
+ * />
799
+ * ```
800
+ */
801
+ declare function DashboardLayout({ widgets, layout, editable, onLayoutChange, renderWidget, className, }: DashboardLayoutProps): JSX.Element;
802
+
803
+ /**
804
+ * Widget container component.
805
+ */
806
+
807
+ /**
808
+ * Widget container with header and content.
809
+ *
810
+ * @example
811
+ * ```tsx
812
+ * <Widget
813
+ * widget={widget}
814
+ * result={queryResult}
815
+ * isLoading={false}
816
+ * lastRefreshed={1706123456}
817
+ * isRefreshing={false}
818
+ * onRefresh={() => refreshWidget(widget.id)}
819
+ * />
820
+ * ```
821
+ */
822
+ declare function Widget({ widget, result, isLoading, error, className, lastRefreshed, isRefreshing, onRefresh, }: WidgetProps): JSX.Element;
823
+
824
+ /**
825
+ * Widget header component with title, refresh button, and actions.
826
+ */
827
+
828
+ /**
829
+ * Widget header with title, refresh timestamp, and optional hyperlink.
830
+ */
831
+ declare function WidgetHeader({ title, hyperlink, lastRefreshed, isRefreshing, onRefresh, }: WidgetHeaderProps): JSX.Element;
832
+
833
+ /**
834
+ * Widget content renderer that displays the appropriate chart or component.
835
+ */
836
+
837
+ /**
838
+ * Props for WidgetContent.
839
+ */
840
+ interface WidgetContentProps {
841
+ /** Widget to render. */
842
+ widget: Widget$1;
843
+ /** Query result data. */
844
+ result: QueryResult | null;
845
+ /** Whether data is loading. */
846
+ isLoading?: boolean;
847
+ /** Error if query failed. */
848
+ error?: Error | null;
849
+ /** Whether widget is being force-refreshed (shows spinner overlay). */
850
+ isRefreshing?: boolean;
851
+ }
852
+ /**
853
+ * Widget content renderer.
854
+ *
855
+ * Renders the appropriate visualization based on widget type.
856
+ */
857
+ declare function WidgetContent({ widget, result, isLoading, error, isRefreshing, }: WidgetContentProps): JSX.Element;
858
+
859
+ /**
860
+ * Filter bar component for dashboard filters.
861
+ */
862
+
863
+ /**
864
+ * FilterBar component displays all dashboard filters.
865
+ */
866
+ declare function FilterBar({ filters, values, onChange, onReset, className, }: FilterBarProps): JSX.Element | null;
867
+
868
+ /**
869
+ * Date range filter component.
870
+ */
871
+
872
+ /**
873
+ * Date range filter with start/end date inputs.
874
+ */
875
+ declare function DateRangeFilter({ filter, value, onChange, }: DateRangeFilterProps): JSX.Element;
876
+
877
+ /**
878
+ * Select filter component with dynamic option loading.
879
+ */
880
+
881
+ /**
882
+ * Single select dropdown filter.
883
+ *
884
+ * Supports dynamic option loading when filter.dynamic is true.
885
+ */
886
+ declare function SelectFilter({ filter, value, onChange, }: SelectFilterProps): JSX.Element;
887
+
888
+ /**
889
+ * Multi-select filter component with dynamic option loading.
890
+ *
891
+ * Features:
892
+ * - "All" option at top (visually selects/deselects all options)
893
+ * - Deferred apply (changes only apply on "Apply" button click)
894
+ * - Search functionality
895
+ * - Item count display
896
+ * - "clear all" link
897
+ */
898
+
899
+ /**
900
+ * Multi-select dropdown filter with deferred apply.
901
+ *
902
+ * Supports dynamic option loading when filter.dynamic is true.
903
+ *
904
+ * Note: External value [] means "no filter" (show all data).
905
+ * Internally, we track actual selections. When all options are selected,
906
+ * we send [] to the backend (no filter needed).
907
+ */
908
+ declare function MultiSelectFilter({ filter, value, onChange, }: MultiSelectFilterProps): JSX.Element;
909
+
910
+ /**
911
+ * Text filter component with debouncing.
912
+ */
913
+
914
+ /**
915
+ * Text input filter with debounced updates.
916
+ */
917
+ declare function TextFilter({ filter, value, onChange, debounceMs, }: TextFilterProps): JSX.Element;
918
+
919
+ /**
920
+ * Dashboard editor component for creating and editing dashboards.
921
+ */
922
+
923
+ declare function DashboardEditor({ dashboardId, onSave, onCancel, batchSize, className, }: DashboardEditorProps): JSX.Element;
924
+
925
+ /**
926
+ * Dashboard editor toolbar component.
927
+ */
928
+ /**
929
+ * Props for EditorToolbar component.
930
+ */
931
+ interface EditorToolbarProps {
932
+ /** Dashboard name. */
933
+ dashboardName: string;
934
+ /** Callback when dashboard name changes. */
935
+ onNameChange?: (name: string) => void;
936
+ /** Whether there are unsaved changes. */
937
+ hasChanges: boolean;
938
+ /** Whether save is in progress. */
939
+ isSaving: boolean;
940
+ /** Callback when add widget is clicked. */
941
+ onAddWidget: () => void;
942
+ /** Callback when edit filters is clicked. */
943
+ onEditFilters?: () => void;
944
+ /** Callback when settings is clicked. */
945
+ onSettings?: () => void;
946
+ /** Callback when save is clicked. */
947
+ onSave: () => void;
948
+ /** Callback when cancel is clicked. */
949
+ onCancel: () => void;
950
+ }
951
+ /**
952
+ * Editor toolbar with actions for dashboard editing.
953
+ */
954
+ declare function EditorToolbar({ dashboardName, onNameChange, hasChanges, isSaving, onAddWidget, onEditFilters, onSettings, onSave, onCancel, }: EditorToolbarProps): JSX.Element;
955
+
956
+ /**
957
+ * Widget palette for adding new widgets to the dashboard.
958
+ */
959
+
960
+ /**
961
+ * Widget palette for selecting widget types to add.
962
+ */
963
+ declare function WidgetPalette({ onAddWidget, }: WidgetPaletteProps): JSX.Element;
964
+
965
+ /**
966
+ * Widget editor modal for configuring widget properties.
967
+ */
968
+
969
+ /**
970
+ * Widget editor for configuring widget properties.
971
+ */
972
+ declare function WidgetEditor({ widget, schema, onSave, onCancel, }: WidgetEditorProps): JSX.Element;
973
+
974
+ interface DashboardCardProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick'> {
975
+ /** The dashboard to display. */
976
+ dashboard: Dashboard$2;
977
+ /** Called when the card is clicked. */
978
+ onClick?: (dashboard: Dashboard$2) => void;
979
+ /** Called when edit is requested. */
980
+ onEdit?: (dashboard: Dashboard$2) => void;
981
+ /** Called when delete is requested. */
982
+ onDelete?: (dashboard: Dashboard$2) => void;
983
+ /** Called when duplicate is requested. */
984
+ onDuplicate?: (dashboard: Dashboard$2) => void;
985
+ /** Whether the card is selected. */
986
+ selected?: boolean;
987
+ /** Whether actions are disabled. */
988
+ actionsDisabled?: boolean;
989
+ /** Custom action buttons. */
990
+ actions?: ReactNode;
991
+ }
992
+ /**
993
+ * Dashboard card component for displaying dashboard summary.
994
+ *
995
+ * @example
996
+ * ```tsx
997
+ * <DashboardCard
998
+ * dashboard={dashboard}
999
+ * onClick={(d) => navigate(`/dashboard/${d.id}`)}
1000
+ * onEdit={(d) => openEditDialog(d)}
1001
+ * onDelete={(d) => confirmDelete(d)}
1002
+ * />
1003
+ * ```
1004
+ */
1005
+ declare const DashboardCard: react.ForwardRefExoticComponent<DashboardCardProps & react.RefAttributes<HTMLDivElement>>;
1006
+
1007
+ interface DashboardListProps extends HTMLAttributes<HTMLDivElement> {
1008
+ /** List of dashboards to display. */
1009
+ dashboards: Dashboard$2[] | null;
1010
+ /** Whether the list is loading. */
1011
+ isLoading?: boolean;
1012
+ /** Error that occurred during fetch. */
1013
+ error?: Error | null;
1014
+ /** Called when a dashboard card is clicked. */
1015
+ onDashboardClick?: (dashboard: Dashboard$2) => void;
1016
+ /** Called when edit is requested for a dashboard. */
1017
+ onEdit?: (dashboard: Dashboard$2) => void;
1018
+ /** Called when delete is requested for a dashboard. */
1019
+ onDelete?: (dashboard: Dashboard$2) => void;
1020
+ /** Called when duplicate is requested for a dashboard. */
1021
+ onDuplicate?: (dashboard: Dashboard$2) => void;
1022
+ /** Called when create new dashboard is requested. */
1023
+ onCreate?: () => void;
1024
+ /** Number of columns in the grid. */
1025
+ columns?: 1 | 2 | 3 | 4;
1026
+ /** ID of the currently selected dashboard. */
1027
+ selectedId?: string;
1028
+ /** Whether actions are disabled. */
1029
+ actionsDisabled?: boolean;
1030
+ /** Custom empty state content. */
1031
+ emptyState?: ReactNode;
1032
+ /** Custom card render function. */
1033
+ renderCard?: (dashboard: Dashboard$2, props: DashboardCardProps) => ReactNode;
1034
+ }
1035
+ /**
1036
+ * Dashboard list component for displaying all dashboards.
1037
+ *
1038
+ * @example
1039
+ * ```tsx
1040
+ * function DashboardsPage() {
1041
+ * const { data, isLoading, error } = useDashboards();
1042
+ * const { createDashboard } = useDashboardMutations();
1043
+ *
1044
+ * return (
1045
+ * <DashboardList
1046
+ * dashboards={data}
1047
+ * isLoading={isLoading}
1048
+ * error={error}
1049
+ * onDashboardClick={(d) => navigate(`/dashboard/${d.id}`)}
1050
+ * onCreate={() => setShowCreateDialog(true)}
1051
+ * />
1052
+ * );
1053
+ * }
1054
+ * ```
1055
+ */
1056
+ declare const DashboardList: react.ForwardRefExoticComponent<DashboardListProps & react.RefAttributes<HTMLDivElement>>;
1057
+
1058
+ interface DashboardDialogProps {
1059
+ /** Whether the dialog is open. */
1060
+ open: boolean;
1061
+ /** Called when the dialog should close. */
1062
+ onClose: () => void;
1063
+ /** Called when the form is submitted. */
1064
+ onSubmit: (data: DashboardCreate | DashboardUpdate) => Promise<void>;
1065
+ /** Dashboard to edit (null for create mode). */
1066
+ dashboard?: Dashboard$2 | null;
1067
+ /** Whether the submit action is loading. */
1068
+ isLoading?: boolean;
1069
+ /** Error message to display. */
1070
+ error?: string | null;
1071
+ }
1072
+ /**
1073
+ * Dialog for creating or editing a dashboard.
1074
+ *
1075
+ * @example
1076
+ * ```tsx
1077
+ * function DashboardsPage() {
1078
+ * const [dialogOpen, setDialogOpen] = useState(false);
1079
+ * const [editingDashboard, setEditingDashboard] = useState<Dashboard | null>(null);
1080
+ * const { createDashboard, updateDashboard, state } = useDashboardMutations();
1081
+ *
1082
+ * const handleSubmit = async (data: DashboardCreate | DashboardUpdate) => {
1083
+ * if (editingDashboard) {
1084
+ * await updateDashboard(editingDashboard.id, data);
1085
+ * } else {
1086
+ * await createDashboard(data as DashboardCreate);
1087
+ * }
1088
+ * setDialogOpen(false);
1089
+ * };
1090
+ *
1091
+ * return (
1092
+ * <DashboardDialog
1093
+ * open={dialogOpen}
1094
+ * onClose={() => setDialogOpen(false)}
1095
+ * onSubmit={handleSubmit}
1096
+ * dashboard={editingDashboard}
1097
+ * isLoading={state.isLoading}
1098
+ * error={state.error?.message}
1099
+ * />
1100
+ * );
1101
+ * }
1102
+ * ```
1103
+ */
1104
+ declare const DashboardDialog: react.ForwardRefExoticComponent<DashboardDialogProps & react.RefAttributes<HTMLDivElement>>;
1105
+
1106
+ export { TextFilter as $, useWidget as A, type UseWidgetResult as B, useAutoRefresh as C, type DashboardLayout$1 as D, type UseAutoRefreshOptions as E, type FilterOption as F, type UseAutoRefreshResult as G, useFullscreen as H, type UseFullscreenResult as I, Dashboard as J, DashboardLayout as K, type LazyLoadingConfig as L, type MultiSelectFilterProps as M, type NumberRangeValue as N, Widget as O, WidgetHeader as P, WidgetContent as Q, type ReferenceLine as R, type SelectFilterProps as S, type TextFilterProps as T, type UseDashboardFiltersResult as U, type WidgetContentProps as V, type Widget$1 as W, FilterBar as X, DateRangeFilter as Y, SelectFilter as Z, MultiSelectFilter as _, type WidgetPosition as a, DashboardEditor as a0, EditorToolbar as a1, WidgetPalette as a2, WidgetEditor as a3, type EditorToolbarProps as a4, DashboardList as a5, DashboardCard as a6, DashboardDialog as a7, type DashboardListProps as a8, type DashboardCardProps as a9, type DashboardDialogProps as aa, type WidgetType as b, type WidgetConfig as c, type WidgetCrossFilterConfig as d, type WidgetHyperlink as e, type DashboardFilterType as f, type DashboardFilter as g, type FilterValue as h, type DateRangeValue as i, type Dashboard$1 as j, type DashboardContextValue as k, type DashboardEditorContextValue as l, type DashboardProviderProps as m, type DashboardProps as n, type DashboardEditorProps as o, type DashboardLayoutProps as p, type WidgetProps as q, type WidgetHeaderProps as r, type FilterBarProps as s, type DateRangeFilterProps as t, type WidgetPaletteProps as u, type WidgetEditorProps as v, DashboardProvider as w, DashboardContext as x, useDashboard as y, useDashboardFilters as z };