@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,1297 @@
1
+ import * as react from 'react';
2
+ import react__default, { ButtonHTMLAttributes, ReactNode, InputHTMLAttributes, HTMLAttributes, ReactElement, SVGAttributes, Component, ErrorInfo } from 'react';
3
+ import { c as TableSchema, o as ColumnSchema, b as QueryTable, q as ColumnSelection, D as DatabaseSchema, r as FilterDefinition, F as FilterOperator, t as SortDefinition, A as AggregationType, Q as QueryResult, a as QueryDefinition, j as SavedQuery } from './types-WrCbOeAV.js';
4
+
5
+ interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'children'> {
6
+ /** Button visual style. */
7
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
8
+ /** Button size. */
9
+ size?: 'sm' | 'md' | 'lg';
10
+ /** Whether the button is in a loading state. */
11
+ loading?: boolean;
12
+ /** Icon to display before the label. */
13
+ leftIcon?: ReactNode;
14
+ /** Icon to display after the label. */
15
+ rightIcon?: ReactNode;
16
+ /** Button content. */
17
+ children: ReactNode;
18
+ }
19
+ /**
20
+ * Button component with multiple variants and sizes.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <Button variant="primary" onClick={() => console.log('clicked')}>
25
+ * Click me
26
+ * </Button>
27
+ *
28
+ * <Button variant="secondary" size="sm" leftIcon={<Icon name="plus" />}>
29
+ * Add item
30
+ * </Button>
31
+ * ```
32
+ */
33
+ declare const Button: react.ForwardRefExoticComponent<ButtonProps & react.RefAttributes<HTMLButtonElement>>;
34
+
35
+ interface InputProps extends InputHTMLAttributes<HTMLInputElement> {
36
+ /** Input size. */
37
+ inputSize?: 'sm' | 'md' | 'lg';
38
+ /** Whether the input has an error. */
39
+ error?: boolean;
40
+ }
41
+ /**
42
+ * Input component with multiple sizes and error state.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <Input
47
+ * placeholder="Enter your name"
48
+ * value={name}
49
+ * onChange={(e) => setName(e.target.value)}
50
+ * />
51
+ *
52
+ * <Input inputSize="sm" error placeholder="Invalid value" />
53
+ * ```
54
+ */
55
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<HTMLInputElement>>;
56
+
57
+ /**
58
+ * Select component.
59
+ */
60
+ interface SelectOption<T> {
61
+ /** Option value. */
62
+ value: T;
63
+ /** Display label. */
64
+ label: string;
65
+ /** Whether the option is disabled. */
66
+ disabled?: boolean;
67
+ }
68
+ interface SelectProps<T> {
69
+ /** Currently selected value. */
70
+ value: T | null;
71
+ /** Callback when value changes. */
72
+ onChange: (value: T) => void;
73
+ /** Available options. */
74
+ options: SelectOption<T>[];
75
+ /** Placeholder text when no value selected. */
76
+ placeholder?: string;
77
+ /** Whether the select is disabled. */
78
+ disabled?: boolean;
79
+ /** Whether to show a search input. */
80
+ searchable?: boolean;
81
+ /** Select size. */
82
+ size?: 'sm' | 'md' | 'lg';
83
+ /** Additional class name. */
84
+ className?: string;
85
+ /** Additional styles. */
86
+ style?: React.CSSProperties;
87
+ }
88
+ declare const Select: <T>(props: SelectProps<T> & {
89
+ ref?: React.ForwardedRef<HTMLDivElement>;
90
+ }) => JSX.Element;
91
+
92
+ interface CheckboxProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'size'> {
93
+ /** Checkbox size. */
94
+ size?: 'sm' | 'md' | 'lg';
95
+ /** Label text. */
96
+ label?: string;
97
+ }
98
+ /**
99
+ * Checkbox component with optional label.
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * <Checkbox
104
+ * checked={isChecked}
105
+ * onChange={(e) => setIsChecked(e.target.checked)}
106
+ * label="Remember me"
107
+ * />
108
+ * ```
109
+ */
110
+ declare const Checkbox: react.ForwardRefExoticComponent<CheckboxProps & react.RefAttributes<HTMLInputElement>>;
111
+
112
+ interface BadgeProps extends HTMLAttributes<HTMLSpanElement> {
113
+ /** Badge visual style. */
114
+ variant?: 'default' | 'primary' | 'success' | 'warning' | 'error' | 'info';
115
+ /** Badge size. */
116
+ size?: 'sm' | 'md' | 'lg';
117
+ /** Badge content. */
118
+ children: ReactNode;
119
+ }
120
+ /**
121
+ * Badge component for status indicators and labels.
122
+ *
123
+ * @example
124
+ * ```tsx
125
+ * <Badge variant="success">Active</Badge>
126
+ * <Badge variant="error" size="sm">Error</Badge>
127
+ * ```
128
+ */
129
+ declare const Badge: react.ForwardRefExoticComponent<BadgeProps & react.RefAttributes<HTMLSpanElement>>;
130
+
131
+ interface TooltipProps {
132
+ /** The content to show in the tooltip. */
133
+ content: ReactNode;
134
+ /** The element that triggers the tooltip. */
135
+ children: ReactElement;
136
+ /** Position of the tooltip relative to the trigger. */
137
+ position?: 'top' | 'bottom' | 'left' | 'right';
138
+ /** Delay before showing tooltip (ms). */
139
+ delay?: number;
140
+ /** Whether the tooltip is disabled. */
141
+ disabled?: boolean;
142
+ /** Additional class name for the tooltip element. */
143
+ className?: string;
144
+ /** Additional styles for the tooltip element. */
145
+ style?: React.CSSProperties;
146
+ }
147
+ /**
148
+ * Tooltip component that shows content on hover.
149
+ *
150
+ * @example
151
+ * ```tsx
152
+ * <Tooltip content="This is a tooltip">
153
+ * <Button>Hover me</Button>
154
+ * </Tooltip>
155
+ * ```
156
+ */
157
+ declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
158
+
159
+ interface DropdownProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
160
+ /** The element that triggers the dropdown. */
161
+ trigger: ReactNode;
162
+ /** The dropdown content. */
163
+ children: ReactNode;
164
+ /** Alignment of the dropdown relative to the trigger. */
165
+ align?: 'start' | 'end';
166
+ /** Whether the dropdown is disabled. */
167
+ disabled?: boolean;
168
+ }
169
+ interface DropdownItemProps extends HTMLAttributes<HTMLDivElement> {
170
+ /** Whether the item is disabled. */
171
+ disabled?: boolean;
172
+ /** Icon to display before the label. */
173
+ icon?: ReactNode;
174
+ /** Item content. */
175
+ children: ReactNode;
176
+ }
177
+ interface DropdownSeparatorProps extends HTMLAttributes<HTMLDivElement> {
178
+ }
179
+ /**
180
+ * An item within a dropdown menu.
181
+ */
182
+ declare const DropdownItem: react.ForwardRefExoticComponent<DropdownItemProps & react.RefAttributes<HTMLDivElement>>;
183
+ /**
184
+ * A separator line within a dropdown menu.
185
+ */
186
+ declare const DropdownSeparator: react.ForwardRefExoticComponent<DropdownSeparatorProps & react.RefAttributes<HTMLDivElement>>;
187
+ /**
188
+ * Dropdown menu component.
189
+ *
190
+ * @example
191
+ * ```tsx
192
+ * <Dropdown
193
+ * trigger={<Button>Open menu</Button>}
194
+ * >
195
+ * <DropdownItem onClick={() => console.log('Edit')}>Edit</DropdownItem>
196
+ * <DropdownItem onClick={() => console.log('Delete')}>Delete</DropdownItem>
197
+ * <DropdownSeparator />
198
+ * <DropdownItem disabled>Disabled</DropdownItem>
199
+ * </Dropdown>
200
+ * ```
201
+ */
202
+ declare const Dropdown: react.ForwardRefExoticComponent<DropdownProps & react.RefAttributes<HTMLDivElement>>;
203
+
204
+ type IconName = 'chevron-down' | 'chevron-up' | 'chevron-left' | 'chevron-right' | 'x' | 'plus' | 'minus' | 'check' | 'search' | 'filter' | 'sort-asc' | 'sort-desc' | 'drag' | 'table' | 'column' | 'key' | 'link' | 'play' | 'refresh' | 'sync' | 'trash' | 'edit' | 'copy' | 'download' | 'settings' | 'sun' | 'moon' | 'info' | 'warning' | 'error' | 'more' | 'more-vertical' | 'expand' | 'fullscreen' | 'minimize' | 'chart-bar' | 'chart-line' | 'chart-pie' | 'grid' | 'layout' | 'calendar' | 'alert-circle';
205
+ interface IconProps extends SVGAttributes<SVGSVGElement> {
206
+ /** Icon name. */
207
+ name: IconName;
208
+ /** Icon size in pixels. */
209
+ size?: number;
210
+ }
211
+ /**
212
+ * Icon component rendering SVG icons.
213
+ *
214
+ * @example
215
+ * ```tsx
216
+ * <Icon name="search" size={20} />
217
+ * <Icon name="plus" style={{ color: 'var(--prismiq-color-primary)' }} />
218
+ * ```
219
+ */
220
+ declare const Icon: react.ForwardRefExoticComponent<IconProps & react.RefAttributes<SVGSVGElement>>;
221
+
222
+ interface DialogProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
223
+ /** Whether the dialog is open. */
224
+ open: boolean;
225
+ /** Called when the dialog should close. */
226
+ onClose: () => void;
227
+ /** Dialog title. */
228
+ title?: ReactNode;
229
+ /** Dialog description. */
230
+ description?: ReactNode;
231
+ /** Dialog content. */
232
+ children: ReactNode;
233
+ /** Whether to show a close button. */
234
+ showCloseButton?: boolean;
235
+ /** Whether clicking the backdrop closes the dialog. */
236
+ closeOnBackdropClick?: boolean;
237
+ /** Whether pressing Escape closes the dialog. */
238
+ closeOnEscape?: boolean;
239
+ /** Dialog width. */
240
+ width?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
241
+ }
242
+ interface DialogHeaderProps extends HTMLAttributes<HTMLDivElement> {
243
+ children: ReactNode;
244
+ }
245
+ interface DialogFooterProps extends HTMLAttributes<HTMLDivElement> {
246
+ children: ReactNode;
247
+ }
248
+ /**
249
+ * Dialog header component.
250
+ */
251
+ declare const DialogHeader: react.ForwardRefExoticComponent<DialogHeaderProps & react.RefAttributes<HTMLDivElement>>;
252
+ /**
253
+ * Dialog footer component for action buttons.
254
+ */
255
+ declare const DialogFooter: react.ForwardRefExoticComponent<DialogFooterProps & react.RefAttributes<HTMLDivElement>>;
256
+ /**
257
+ * Modal dialog component with accessibility features.
258
+ *
259
+ * @example
260
+ * ```tsx
261
+ * function Example() {
262
+ * const [open, setOpen] = useState(false);
263
+ *
264
+ * return (
265
+ * <>
266
+ * <Button onClick={() => setOpen(true)}>Open Dialog</Button>
267
+ * <Dialog
268
+ * open={open}
269
+ * onClose={() => setOpen(false)}
270
+ * title="Confirm Action"
271
+ * description="Are you sure you want to proceed?"
272
+ * >
273
+ * <p>This action cannot be undone.</p>
274
+ * <DialogFooter>
275
+ * <Button variant="secondary" onClick={() => setOpen(false)}>
276
+ * Cancel
277
+ * </Button>
278
+ * <Button variant="danger">Delete</Button>
279
+ * </DialogFooter>
280
+ * </Dialog>
281
+ * </>
282
+ * );
283
+ * }
284
+ * ```
285
+ */
286
+ declare const Dialog: react.ForwardRefExoticComponent<DialogProps & react.RefAttributes<HTMLDivElement>>;
287
+
288
+ /**
289
+ * Props for the Skeleton component.
290
+ */
291
+ interface SkeletonProps {
292
+ /** Width of the skeleton (CSS value or number for pixels) */
293
+ width?: string | number;
294
+ /** Height of the skeleton (CSS value or number for pixels) */
295
+ height?: string | number;
296
+ /** Border radius of the skeleton */
297
+ borderRadius?: string;
298
+ /** Whether to animate the skeleton */
299
+ animate?: boolean;
300
+ /** Additional CSS class name */
301
+ className?: string;
302
+ /** Custom inline styles */
303
+ style?: react__default.CSSProperties;
304
+ }
305
+ /**
306
+ * Base skeleton loading placeholder with shimmer animation.
307
+ *
308
+ * @example
309
+ * ```tsx
310
+ * // Simple skeleton
311
+ * <Skeleton width={200} height={20} />
312
+ *
313
+ * // Circular skeleton
314
+ * <Skeleton width={40} height={40} borderRadius="50%" />
315
+ *
316
+ * // Full width
317
+ * <Skeleton width="100%" height={100} />
318
+ * ```
319
+ */
320
+ declare function Skeleton({ width, height, borderRadius, animate, className, style, }: SkeletonProps): react__default.ReactElement;
321
+
322
+ /**
323
+ * Props for the SkeletonText component.
324
+ */
325
+ interface SkeletonTextProps {
326
+ /** Number of lines to show */
327
+ lines?: number;
328
+ /** Width of the last line (for natural-looking text) */
329
+ lastLineWidth?: string;
330
+ /** Height of each line */
331
+ lineHeight?: number;
332
+ /** Gap between lines */
333
+ gap?: number;
334
+ /** Whether to animate the skeleton */
335
+ animate?: boolean;
336
+ /** Additional CSS class name */
337
+ className?: string;
338
+ }
339
+ /**
340
+ * Skeleton placeholder for text content.
341
+ *
342
+ * @example
343
+ * ```tsx
344
+ * // Single line
345
+ * <SkeletonText />
346
+ *
347
+ * // Multiple lines with shorter last line
348
+ * <SkeletonText lines={3} lastLineWidth="60%" />
349
+ *
350
+ * // Paragraph
351
+ * <SkeletonText lines={5} lastLineWidth="40%" gap={8} />
352
+ * ```
353
+ */
354
+ declare function SkeletonText({ lines, lastLineWidth, lineHeight, gap, animate, className, }: SkeletonTextProps): react__default.ReactElement;
355
+
356
+ /**
357
+ * Props for the SkeletonChart component.
358
+ */
359
+ interface SkeletonChartProps {
360
+ /** Type of chart to simulate */
361
+ type: 'bar' | 'line' | 'pie' | 'area' | 'scatter';
362
+ /** Height of the chart skeleton */
363
+ height?: number;
364
+ /** Whether to animate the skeleton */
365
+ animate?: boolean;
366
+ /** Additional CSS class name */
367
+ className?: string;
368
+ }
369
+ /**
370
+ * Skeleton placeholder for chart components.
371
+ *
372
+ * @example
373
+ * ```tsx
374
+ * <SkeletonChart type="bar" height={300} />
375
+ * <SkeletonChart type="pie" height={250} />
376
+ * <SkeletonChart type="line" />
377
+ * ```
378
+ */
379
+ declare function SkeletonChart({ type, height, animate, className, }: SkeletonChartProps): react__default.ReactElement;
380
+
381
+ /**
382
+ * Props for the SkeletonTable component.
383
+ */
384
+ interface SkeletonTableProps {
385
+ /** Number of rows to show */
386
+ rows?: number;
387
+ /** Number of columns to show */
388
+ columns?: number;
389
+ /** Whether to show a header row */
390
+ showHeader?: boolean;
391
+ /** Height of each row */
392
+ rowHeight?: number;
393
+ /** Whether to animate the skeleton */
394
+ animate?: boolean;
395
+ /** Additional CSS class name */
396
+ className?: string;
397
+ }
398
+ /**
399
+ * Skeleton placeholder for table components.
400
+ *
401
+ * @example
402
+ * ```tsx
403
+ * <SkeletonTable rows={5} columns={4} />
404
+ * <SkeletonTable rows={10} columns={6} showHeader={true} />
405
+ * ```
406
+ */
407
+ declare function SkeletonTable({ rows, columns, showHeader, rowHeight, animate, className, }: SkeletonTableProps): react__default.ReactElement;
408
+
409
+ /**
410
+ * Props for the SkeletonMetricCard component.
411
+ */
412
+ interface SkeletonMetricCardProps {
413
+ /** Whether to show a sparkline placeholder */
414
+ showSparkline?: boolean;
415
+ /** Whether to show a trend indicator placeholder */
416
+ showTrend?: boolean;
417
+ /** Whether to animate the skeleton */
418
+ animate?: boolean;
419
+ /** Additional CSS class name */
420
+ className?: string;
421
+ }
422
+ /**
423
+ * Skeleton placeholder for MetricCard components.
424
+ *
425
+ * @example
426
+ * ```tsx
427
+ * <SkeletonMetricCard />
428
+ * <SkeletonMetricCard showSparkline showTrend />
429
+ * ```
430
+ */
431
+ declare function SkeletonMetricCard({ showSparkline, showTrend, animate, className, }: SkeletonMetricCardProps): react__default.ReactElement;
432
+
433
+ /**
434
+ * Props for the ErrorBoundary component.
435
+ */
436
+ interface ErrorBoundaryProps {
437
+ /** Content to render */
438
+ children: ReactNode;
439
+ /** Custom fallback UI or render function */
440
+ fallback?: ReactNode | ((error: Error, reset: () => void) => ReactNode);
441
+ /** Callback when an error is caught */
442
+ onError?: (error: Error, errorInfo: ErrorInfo) => void;
443
+ /** Reset the error boundary when these values change */
444
+ resetKeys?: unknown[];
445
+ }
446
+ interface ErrorBoundaryState {
447
+ hasError: boolean;
448
+ error: Error | null;
449
+ }
450
+ /**
451
+ * Error boundary component that catches JavaScript errors in child components.
452
+ *
453
+ * @example
454
+ * ```tsx
455
+ * // Basic usage
456
+ * <ErrorBoundary>
457
+ * <MyComponent />
458
+ * </ErrorBoundary>
459
+ *
460
+ * // With custom fallback
461
+ * <ErrorBoundary fallback={<div>Something went wrong</div>}>
462
+ * <MyComponent />
463
+ * </ErrorBoundary>
464
+ *
465
+ * // With error handler
466
+ * <ErrorBoundary onError={(error) => logError(error)}>
467
+ * <MyComponent />
468
+ * </ErrorBoundary>
469
+ *
470
+ * // With reset keys (resets when values change)
471
+ * <ErrorBoundary resetKeys={[userId]}>
472
+ * <MyComponent userId={userId} />
473
+ * </ErrorBoundary>
474
+ * ```
475
+ */
476
+ declare class ErrorBoundary extends Component<ErrorBoundaryProps, ErrorBoundaryState> {
477
+ constructor(props: ErrorBoundaryProps);
478
+ static getDerivedStateFromError(error: Error): ErrorBoundaryState;
479
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
480
+ componentDidUpdate(prevProps: ErrorBoundaryProps): void;
481
+ resetError: () => void;
482
+ render(): ReactNode;
483
+ }
484
+
485
+ /**
486
+ * Props for the ErrorFallback component.
487
+ */
488
+ interface ErrorFallbackProps {
489
+ /** The error that was caught */
490
+ error: Error;
491
+ /** Function to reset the error state */
492
+ resetError: () => void;
493
+ /** Custom title for the error display */
494
+ title?: string;
495
+ /** Whether to show error details */
496
+ showDetails?: boolean;
497
+ }
498
+ /**
499
+ * Default error fallback UI component.
500
+ *
501
+ * @example
502
+ * ```tsx
503
+ * <ErrorFallback
504
+ * error={error}
505
+ * resetError={reset}
506
+ * title="Chart Error"
507
+ * showDetails={true}
508
+ * />
509
+ * ```
510
+ */
511
+ declare function ErrorFallback({ error, resetError, title, showDetails, }: ErrorFallbackProps): react__default.ReactElement;
512
+
513
+ /**
514
+ * Props for the WidgetErrorBoundary component.
515
+ */
516
+ interface WidgetErrorBoundaryProps {
517
+ /** Content to render */
518
+ children: ReactNode;
519
+ /** Title of the widget (for display in error state) */
520
+ widgetTitle?: string;
521
+ /** Callback when an error is caught */
522
+ onError?: (error: Error) => void;
523
+ }
524
+ interface WidgetErrorBoundaryState {
525
+ hasError: boolean;
526
+ error: Error | null;
527
+ }
528
+ /**
529
+ * Error boundary specifically designed for dashboard widgets.
530
+ *
531
+ * Provides a compact error display that fits within widget containers.
532
+ *
533
+ * @example
534
+ * ```tsx
535
+ * <WidgetErrorBoundary widgetTitle="Sales Chart" onError={logError}>
536
+ * <BarChart data={data} />
537
+ * </WidgetErrorBoundary>
538
+ * ```
539
+ */
540
+ declare class WidgetErrorBoundary extends Component<WidgetErrorBoundaryProps, WidgetErrorBoundaryState> {
541
+ constructor(props: WidgetErrorBoundaryProps);
542
+ static getDerivedStateFromError(error: Error): WidgetErrorBoundaryState;
543
+ componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
544
+ resetError: () => void;
545
+ render(): ReactNode;
546
+ }
547
+
548
+ /**
549
+ * Props for the EmptyState component.
550
+ */
551
+ interface EmptyStateProps {
552
+ /** Custom icon to display */
553
+ icon?: react__default.ReactNode;
554
+ /** Title text */
555
+ title: string;
556
+ /** Description text */
557
+ description?: string;
558
+ /** Optional action button */
559
+ action?: {
560
+ label: string;
561
+ onClick: () => void;
562
+ };
563
+ /** Additional CSS class name */
564
+ className?: string;
565
+ }
566
+ /**
567
+ * Generic empty state component with customizable content.
568
+ *
569
+ * @example
570
+ * ```tsx
571
+ * <EmptyState
572
+ * title="No data available"
573
+ * description="Try adjusting your filters"
574
+ * action={{ label: "Clear Filters", onClick: clearFilters }}
575
+ * />
576
+ * ```
577
+ */
578
+ declare function EmptyState({ icon, title, description, action, className, }: EmptyStateProps): react__default.ReactElement;
579
+
580
+ /**
581
+ * Props for the NoData component.
582
+ */
583
+ interface NoDataProps {
584
+ /** Custom message to display */
585
+ message?: string;
586
+ /** Callback when refresh button is clicked */
587
+ onRefresh?: () => void;
588
+ /** Additional CSS class name */
589
+ className?: string;
590
+ }
591
+ /**
592
+ * Empty state for when a query returns no data.
593
+ *
594
+ * @example
595
+ * ```tsx
596
+ * <NoData message="No sales data for this period" onRefresh={refetch} />
597
+ * ```
598
+ */
599
+ declare function NoData({ message, onRefresh, className, }: NoDataProps): react__default.ReactElement;
600
+
601
+ /**
602
+ * Props for the NoResults component.
603
+ */
604
+ interface NoResultsProps {
605
+ /** The search query that returned no results */
606
+ searchQuery?: string;
607
+ /** Callback when clear filters button is clicked */
608
+ onClearFilters?: () => void;
609
+ /** Additional CSS class name */
610
+ className?: string;
611
+ }
612
+ /**
613
+ * Empty state for when a search or filter returns no results.
614
+ *
615
+ * @example
616
+ * ```tsx
617
+ * <NoResults searchQuery="xyz123" onClearFilters={clearFilters} />
618
+ * ```
619
+ */
620
+ declare function NoResults({ searchQuery, onClearFilters, className, }: NoResultsProps): react__default.ReactElement;
621
+
622
+ /**
623
+ * Props for the EmptyDashboard component.
624
+ */
625
+ interface EmptyDashboardProps {
626
+ /** Callback when add widget button is clicked */
627
+ onAddWidget?: () => void;
628
+ /** Additional CSS class name */
629
+ className?: string;
630
+ }
631
+ /**
632
+ * Empty state for dashboards with no widgets.
633
+ *
634
+ * @example
635
+ * ```tsx
636
+ * <EmptyDashboard onAddWidget={openWidgetPalette} />
637
+ * ```
638
+ */
639
+ declare function EmptyDashboard({ onAddWidget, className, }: EmptyDashboardProps): react__default.ReactElement;
640
+
641
+ /**
642
+ * SchemaExplorer component for browsing database tables and columns.
643
+ */
644
+
645
+ interface SchemaExplorerProps {
646
+ /** Callback when a table is selected. */
647
+ onTableSelect?: (table: TableSchema) => void;
648
+ /** Callback when a column is selected. */
649
+ onColumnSelect?: (table: TableSchema, column: ColumnSchema) => void;
650
+ /** Callback when column drag starts. */
651
+ onColumnDragStart?: (table: TableSchema, column: ColumnSchema) => void;
652
+ /** Currently selected table name. */
653
+ selectedTable?: string;
654
+ /** Array of selected column identifiers. */
655
+ selectedColumns?: Array<{
656
+ table: string;
657
+ column: string;
658
+ }>;
659
+ /** Whether to show search input. */
660
+ searchable?: boolean;
661
+ /** Whether tables are collapsible. */
662
+ collapsible?: boolean;
663
+ /** Additional class name. */
664
+ className?: string;
665
+ /** Additional styles. */
666
+ style?: React.CSSProperties;
667
+ }
668
+ /**
669
+ * Schema explorer component for browsing database structure.
670
+ *
671
+ * @example
672
+ * ```tsx
673
+ * <SchemaExplorer
674
+ * onTableSelect={(table) => console.log('Table:', table.name)}
675
+ * onColumnSelect={(table, column) => console.log('Column:', column.name)}
676
+ * searchable
677
+ * collapsible
678
+ * />
679
+ * ```
680
+ */
681
+ declare function SchemaExplorer({ onTableSelect, onColumnSelect, onColumnDragStart, selectedTable, selectedColumns, searchable, collapsible, className, style, }: SchemaExplorerProps): JSX.Element;
682
+
683
+ /**
684
+ * TableNode component for displaying a table in the schema explorer.
685
+ */
686
+
687
+ interface TableNodeProps {
688
+ /** The table schema. */
689
+ table: TableSchema;
690
+ /** Whether the table is currently selected. */
691
+ isSelected?: boolean;
692
+ /** Array of selected column identifiers. */
693
+ selectedColumns?: Array<{
694
+ table: string;
695
+ column: string;
696
+ }>;
697
+ /** Callback when table is clicked. */
698
+ onTableClick?: (table: TableSchema) => void;
699
+ /** Callback when a column is clicked. */
700
+ onColumnClick?: (table: TableSchema, column: ColumnSchema) => void;
701
+ /** Callback when column drag starts. */
702
+ onColumnDragStart?: (table: TableSchema, column: ColumnSchema) => void;
703
+ /** Whether the tree is collapsible. */
704
+ collapsible?: boolean;
705
+ /** Initial expanded state. */
706
+ defaultExpanded?: boolean;
707
+ /** Search filter to highlight matching items. */
708
+ searchFilter?: string;
709
+ /** Additional class name. */
710
+ className?: string;
711
+ }
712
+ /**
713
+ * A table node in the schema explorer tree with expandable columns.
714
+ */
715
+ declare function TableNode({ table, isSelected, selectedColumns, onTableClick, onColumnClick, onColumnDragStart, collapsible, defaultExpanded, searchFilter, className, }: TableNodeProps): JSX.Element;
716
+
717
+ /**
718
+ * ColumnNode component for displaying a column in the schema explorer.
719
+ */
720
+
721
+ interface ColumnNodeProps {
722
+ /** The column schema. */
723
+ column: ColumnSchema;
724
+ /** The parent table schema. */
725
+ table: TableSchema;
726
+ /** Whether this column is selected. */
727
+ isSelected?: boolean;
728
+ /** Callback when column is clicked. */
729
+ onClick?: (table: TableSchema, column: ColumnSchema) => void;
730
+ /** Callback when column drag starts. */
731
+ onDragStart?: (table: TableSchema, column: ColumnSchema) => void;
732
+ /** Additional class name. */
733
+ className?: string;
734
+ }
735
+ /**
736
+ * A single column node in the schema explorer tree.
737
+ */
738
+ declare function ColumnNode({ column, table, isSelected, onClick, onDragStart, className, }: ColumnNodeProps): JSX.Element;
739
+
740
+ /**
741
+ * ColumnSelector component for selecting and ordering columns in a query.
742
+ */
743
+
744
+ interface ColumnSelectorProps {
745
+ /** Tables in the query. */
746
+ tables: QueryTable[];
747
+ /** Selected columns. */
748
+ columns: ColumnSelection[];
749
+ /** Callback when columns change. */
750
+ onChange: (columns: ColumnSelection[]) => void;
751
+ /** Database schema for type information. */
752
+ schema: DatabaseSchema;
753
+ /** Additional class name. */
754
+ className?: string;
755
+ /** Additional styles. */
756
+ style?: React.CSSProperties;
757
+ }
758
+ /**
759
+ * Column selector component for selecting and ordering columns.
760
+ *
761
+ * @example
762
+ * ```tsx
763
+ * <ColumnSelector
764
+ * tables={query.tables}
765
+ * columns={query.columns}
766
+ * onChange={(columns) => setQuery({ ...query, columns })}
767
+ * schema={schema}
768
+ * />
769
+ * ```
770
+ */
771
+ declare function ColumnSelector({ tables, columns, onChange, schema, className, style, }: ColumnSelectorProps): JSX.Element;
772
+
773
+ /**
774
+ * SelectedColumn component for displaying a selected column in the query.
775
+ */
776
+
777
+ interface SelectedColumnProps {
778
+ /** The column selection. */
779
+ column: ColumnSelection;
780
+ /** The table this column belongs to. */
781
+ table: QueryTable;
782
+ /** The table schema for type information. */
783
+ tableSchema: TableSchema | undefined;
784
+ /** Index of this column in the list. */
785
+ index: number;
786
+ /** Callback when the column should be removed. */
787
+ onRemove: () => void;
788
+ /** Callback when the column selection is updated. */
789
+ onUpdate: (column: ColumnSelection) => void;
790
+ /** Callback when drag ends with reorder. */
791
+ onDragEnd: (fromIndex: number, toIndex: number) => void;
792
+ /** Additional class name. */
793
+ className?: string;
794
+ }
795
+ /**
796
+ * A selected column in the query with aggregation and alias options.
797
+ */
798
+ declare function SelectedColumn({ column, table, tableSchema, index, onRemove, onUpdate, onDragEnd, className, }: SelectedColumnProps): JSX.Element;
799
+
800
+ /**
801
+ * FilterBuilder component for building filter conditions.
802
+ */
803
+
804
+ interface FilterBuilderProps {
805
+ /** Tables in the query. */
806
+ tables: QueryTable[];
807
+ /** Current filter definitions. */
808
+ filters: FilterDefinition[];
809
+ /** Callback when filters change. */
810
+ onChange: (filters: FilterDefinition[]) => void;
811
+ /** Database schema. */
812
+ schema: DatabaseSchema;
813
+ /** Additional class name. */
814
+ className?: string;
815
+ /** Additional styles. */
816
+ style?: React.CSSProperties;
817
+ }
818
+ /**
819
+ * Filter builder component for creating filter conditions.
820
+ *
821
+ * @example
822
+ * ```tsx
823
+ * <FilterBuilder
824
+ * tables={query.tables}
825
+ * filters={query.filters ?? []}
826
+ * onChange={(filters) => setQuery({ ...query, filters })}
827
+ * schema={schema}
828
+ * />
829
+ * ```
830
+ */
831
+ declare function FilterBuilder({ tables, filters, onChange, schema, className, style, }: FilterBuilderProps): JSX.Element;
832
+
833
+ /**
834
+ * FilterRow component for a single filter condition.
835
+ */
836
+
837
+ interface FilterRowProps {
838
+ /** The filter definition. */
839
+ filter: FilterDefinition;
840
+ /** Tables in the query. */
841
+ tables: QueryTable[];
842
+ /** Database schema. */
843
+ schema: DatabaseSchema;
844
+ /** Callback when the filter changes. */
845
+ onChange: (filter: FilterDefinition) => void;
846
+ /** Callback when the filter should be removed. */
847
+ onRemove: () => void;
848
+ /** Additional class name. */
849
+ className?: string;
850
+ }
851
+ /**
852
+ * A single filter row with column, operator, and value inputs.
853
+ */
854
+ declare function FilterRow({ filter, tables, schema, onChange, onRemove, className, }: FilterRowProps): JSX.Element;
855
+
856
+ /**
857
+ * FilterValueInput component for entering filter values.
858
+ */
859
+
860
+ interface FilterValueInputProps {
861
+ /** Filter operator. */
862
+ operator: FilterOperator;
863
+ /** Current value. */
864
+ value: unknown;
865
+ /** Callback when value changes. */
866
+ onChange: (value: unknown) => void;
867
+ /** Column data type. */
868
+ dataType?: string;
869
+ /** Whether the input is disabled. */
870
+ disabled?: boolean;
871
+ /** Additional class name. */
872
+ className?: string;
873
+ }
874
+ /**
875
+ * Input component for filter values that adapts to the operator and data type.
876
+ */
877
+ declare function FilterValueInput({ operator, value, onChange, dataType, disabled, className, }: FilterValueInputProps): JSX.Element;
878
+
879
+ /**
880
+ * SortBuilder component for defining sort order.
881
+ */
882
+
883
+ interface SortBuilderProps {
884
+ /** Tables in the query. */
885
+ tables: QueryTable[];
886
+ /** Current sort definitions. */
887
+ sorts: SortDefinition[];
888
+ /** Callback when sorts change. */
889
+ onChange: (sorts: SortDefinition[]) => void;
890
+ /** Database schema. */
891
+ schema: DatabaseSchema;
892
+ /** Maximum number of sorts allowed. */
893
+ maxSorts?: number;
894
+ /** Additional class name. */
895
+ className?: string;
896
+ /** Additional styles. */
897
+ style?: React.CSSProperties;
898
+ }
899
+ /**
900
+ * Sort builder component for defining sort order.
901
+ *
902
+ * @example
903
+ * ```tsx
904
+ * <SortBuilder
905
+ * tables={query.tables}
906
+ * sorts={query.order_by ?? []}
907
+ * onChange={(sorts) => setQuery({ ...query, order_by: sorts })}
908
+ * schema={schema}
909
+ * maxSorts={3}
910
+ * />
911
+ * ```
912
+ */
913
+ declare function SortBuilder({ tables, sorts, onChange, schema, maxSorts, className, style, }: SortBuilderProps): JSX.Element;
914
+
915
+ /**
916
+ * SortRow component for a single sort condition.
917
+ */
918
+
919
+ interface SortRowProps {
920
+ /** The sort definition. */
921
+ sort: SortDefinition;
922
+ /** Tables in the query. */
923
+ tables: QueryTable[];
924
+ /** Database schema. */
925
+ schema: DatabaseSchema;
926
+ /** Index of this sort in the list. */
927
+ index: number;
928
+ /** Callback when the sort changes. */
929
+ onChange: (sort: SortDefinition) => void;
930
+ /** Callback when the sort should be removed. */
931
+ onRemove: () => void;
932
+ /** Callback when drag ends with reorder. */
933
+ onDragEnd: (fromIndex: number, toIndex: number) => void;
934
+ /** Already used columns to prevent duplicates. */
935
+ usedColumns: Array<{
936
+ table_id: string;
937
+ column: string;
938
+ }>;
939
+ /** Additional class name. */
940
+ className?: string;
941
+ }
942
+ /**
943
+ * A single sort row with column and direction.
944
+ */
945
+ declare function SortRow({ sort, tables, schema, index, onChange, onRemove, onDragEnd, usedColumns, className, }: SortRowProps): JSX.Element;
946
+
947
+ /**
948
+ * AggregationPicker component for selecting column aggregations.
949
+ */
950
+
951
+ interface AggregationPickerProps {
952
+ /** Current aggregation value. */
953
+ value: AggregationType;
954
+ /** Callback when aggregation changes. */
955
+ onChange: (aggregation: AggregationType) => void;
956
+ /** Column data type for filtering applicable aggregations. */
957
+ columnType: string;
958
+ /** Whether the picker is disabled. */
959
+ disabled?: boolean;
960
+ /** Size variant. */
961
+ size?: 'sm' | 'md' | 'lg';
962
+ /** Additional class name. */
963
+ className?: string;
964
+ /** Additional styles. */
965
+ style?: React.CSSProperties;
966
+ }
967
+ /**
968
+ * Dropdown picker for selecting column aggregation functions.
969
+ *
970
+ * @example
971
+ * ```tsx
972
+ * <AggregationPicker
973
+ * value={column.aggregation}
974
+ * onChange={(agg) => updateColumn({ ...column, aggregation: agg })}
975
+ * columnType="integer"
976
+ * />
977
+ * ```
978
+ */
979
+ declare function AggregationPicker({ value, onChange, columnType, disabled, size, className, style, }: AggregationPickerProps): JSX.Element;
980
+
981
+ /**
982
+ * ResultsTable component for displaying query results.
983
+ */
984
+
985
+ interface ResultsTableProps {
986
+ /** Query result data. */
987
+ result: QueryResult | null;
988
+ /** Whether data is currently loading. */
989
+ loading?: boolean;
990
+ /** Error that occurred during query execution. */
991
+ error?: Error | null;
992
+ /** Number of rows per page. */
993
+ pageSize?: number;
994
+ /** Whether columns are sortable. */
995
+ sortable?: boolean;
996
+ /** Callback when a column is sorted. */
997
+ onSort?: (column: string, direction: 'asc' | 'desc') => void;
998
+ /** Callback when a row is clicked. */
999
+ onRowClick?: (row: unknown[], index: number) => void;
1000
+ /** Callback when a cell is clicked. */
1001
+ onCellClick?: (value: unknown, column: string, rowIndex: number) => void;
1002
+ /** Custom formatters by column name. */
1003
+ formatters?: Record<string, (value: unknown) => string>;
1004
+ /** Callback when export is requested. */
1005
+ onExport?: (format: 'csv' | 'json') => void;
1006
+ /** Additional class name. */
1007
+ className?: string;
1008
+ /** Additional styles. */
1009
+ style?: React.CSSProperties;
1010
+ }
1011
+ /**
1012
+ * Data grid component for displaying query results.
1013
+ *
1014
+ * @example
1015
+ * ```tsx
1016
+ * <ResultsTable
1017
+ * result={queryResult}
1018
+ * loading={isLoading}
1019
+ * error={error}
1020
+ * pageSize={25}
1021
+ * sortable
1022
+ * onSort={(column, direction) => handleSort(column, direction)}
1023
+ * onRowClick={(row, index) => handleRowClick(row, index)}
1024
+ * />
1025
+ * ```
1026
+ */
1027
+ declare function ResultsTable({ result, loading, error, pageSize: initialPageSize, sortable, onSort, onRowClick, onCellClick, formatters, className, style, }: ResultsTableProps): JSX.Element;
1028
+
1029
+ /**
1030
+ * TableHeader component for rendering the table header row.
1031
+ */
1032
+ interface TableHeaderProps {
1033
+ /** Column names. */
1034
+ columns: string[];
1035
+ /** Column data types. */
1036
+ columnTypes?: string[];
1037
+ /** Whether columns are sortable. */
1038
+ sortable?: boolean;
1039
+ /** Currently sorted column. */
1040
+ sortColumn?: string;
1041
+ /** Current sort direction. */
1042
+ sortDirection?: 'asc' | 'desc';
1043
+ /** Callback when a column header is clicked for sorting. */
1044
+ onSort?: (column: string, direction: 'asc' | 'desc') => void;
1045
+ /** Additional class name. */
1046
+ className?: string;
1047
+ }
1048
+ /**
1049
+ * Table header row with optional sorting.
1050
+ */
1051
+ declare function TableHeader({ columns, sortable, sortColumn, sortDirection, onSort, className, }: TableHeaderProps): JSX.Element;
1052
+
1053
+ /**
1054
+ * TableRow component for rendering a single data row.
1055
+ */
1056
+ interface TableRowProps {
1057
+ /** Row data. */
1058
+ row: unknown[];
1059
+ /** Row index. */
1060
+ index: number;
1061
+ /** Column data types. */
1062
+ columnTypes?: string[];
1063
+ /** Custom formatters by column index or name. */
1064
+ formatters?: Record<string | number, (value: unknown) => string>;
1065
+ /** Callback when the row is clicked. */
1066
+ onRowClick?: (row: unknown[], index: number) => void;
1067
+ /** Callback when a cell is clicked. */
1068
+ onCellClick?: (value: unknown, columnIndex: number, rowIndex: number) => void;
1069
+ /** Whether the row is selected. */
1070
+ isSelected?: boolean;
1071
+ /** Additional class name. */
1072
+ className?: string;
1073
+ }
1074
+ /**
1075
+ * A single data row in the results table.
1076
+ */
1077
+ declare function TableRow({ row, index, columnTypes, formatters, onRowClick, onCellClick, isSelected, className, }: TableRowProps): JSX.Element;
1078
+
1079
+ /**
1080
+ * TableCell component for rendering a single cell in the results table.
1081
+ */
1082
+ interface TableCellProps {
1083
+ /** Cell value. */
1084
+ value: unknown;
1085
+ /** Column data type. */
1086
+ columnType?: string;
1087
+ /** Custom formatter function. */
1088
+ formatter?: (value: unknown) => string;
1089
+ /** Maximum width before truncation. */
1090
+ maxWidth?: number;
1091
+ /** Callback when cell is clicked. */
1092
+ onClick?: () => void;
1093
+ /** Additional class name. */
1094
+ className?: string;
1095
+ }
1096
+ /**
1097
+ * A single cell in the results table.
1098
+ */
1099
+ declare function TableCell({ value, columnType, formatter, maxWidth, onClick, className, }: TableCellProps): JSX.Element;
1100
+
1101
+ /**
1102
+ * Pagination component for the results table.
1103
+ */
1104
+ interface PaginationProps {
1105
+ /** Current page (1-indexed). */
1106
+ currentPage: number;
1107
+ /** Total number of items. */
1108
+ totalItems: number;
1109
+ /** Items per page. */
1110
+ pageSize: number;
1111
+ /** Callback when page changes. */
1112
+ onPageChange: (page: number) => void;
1113
+ /** Callback when page size changes. */
1114
+ onPageSizeChange?: (pageSize: number) => void;
1115
+ /** Available page size options. */
1116
+ pageSizeOptions?: number[];
1117
+ /** Additional class name. */
1118
+ className?: string;
1119
+ /** Additional styles. */
1120
+ style?: React.CSSProperties;
1121
+ }
1122
+ /**
1123
+ * Pagination controls for the results table.
1124
+ */
1125
+ declare function Pagination({ currentPage, totalItems, pageSize, onPageChange, onPageSizeChange, pageSizeOptions, className, style, }: PaginationProps): JSX.Element;
1126
+
1127
+ /**
1128
+ * QueryBuilder component - main container combining all query building components.
1129
+ */
1130
+
1131
+ interface QueryBuilderProps {
1132
+ /** Initial query definition. */
1133
+ initialQuery?: QueryDefinition;
1134
+ /** Callback when query changes. */
1135
+ onQueryChange?: (query: QueryDefinition) => void;
1136
+ /** Callback when query is executed successfully. */
1137
+ onExecute?: (result: QueryResult) => void;
1138
+ /** Callback when an error occurs. */
1139
+ onError?: (error: Error) => void;
1140
+ /** Whether to auto-execute on query change. */
1141
+ autoExecute?: boolean;
1142
+ /** Delay before auto-execute (ms). */
1143
+ autoExecuteDelay?: number;
1144
+ /** Whether to show SQL preview panel. */
1145
+ showSqlPreview?: boolean;
1146
+ /** Whether to show results table. */
1147
+ showResultsTable?: boolean;
1148
+ /** Whether to show saved queries picker. */
1149
+ showSavedQueries?: boolean;
1150
+ /** Callback when a saved query is loaded. */
1151
+ onSavedQueryLoad?: (savedQuery: SavedQuery) => void;
1152
+ /** Callback when the current query is saved. */
1153
+ onSavedQuerySave?: (savedQuery: SavedQuery) => void;
1154
+ /** Layout direction. */
1155
+ layout?: 'horizontal' | 'vertical';
1156
+ /** Additional class name. */
1157
+ className?: string;
1158
+ /** Additional styles. */
1159
+ style?: React.CSSProperties;
1160
+ }
1161
+ interface QueryBuilderState {
1162
+ query: QueryDefinition;
1163
+ result: QueryResult | null;
1164
+ isExecuting: boolean;
1165
+ error: Error | null;
1166
+ }
1167
+ /**
1168
+ * Main QueryBuilder component combining all query building components.
1169
+ *
1170
+ * @example
1171
+ * ```tsx
1172
+ * <QueryBuilder
1173
+ * onQueryChange={(query) => console.log('Query:', query)}
1174
+ * onExecute={(result) => console.log('Result:', result)}
1175
+ * showSqlPreview
1176
+ * showResultsTable
1177
+ * />
1178
+ * ```
1179
+ */
1180
+ declare function QueryBuilder({ initialQuery, onQueryChange, onExecute, onError, autoExecute, autoExecuteDelay, showSqlPreview, showResultsTable, showSavedQueries, onSavedQueryLoad, onSavedQuerySave, layout, className, style, }: QueryBuilderProps): JSX.Element;
1181
+
1182
+ /**
1183
+ * QueryBuilderToolbar component for query actions.
1184
+ */
1185
+ interface QueryBuilderToolbarProps {
1186
+ /** Whether a query is currently executing. */
1187
+ isExecuting: boolean;
1188
+ /** Whether the query can be executed (has valid configuration). */
1189
+ canExecute: boolean;
1190
+ /** Callback when execute button is clicked. */
1191
+ onExecute: () => void;
1192
+ /** Callback when preview button is clicked. */
1193
+ onPreview: () => void;
1194
+ /** Callback when clear button is clicked. */
1195
+ onClear: () => void;
1196
+ /** Whether SQL preview is currently shown. */
1197
+ showingPreview?: boolean;
1198
+ /** Additional class name. */
1199
+ className?: string;
1200
+ /** Additional styles. */
1201
+ style?: React.CSSProperties;
1202
+ }
1203
+ /**
1204
+ * Toolbar with execute, preview, and clear buttons.
1205
+ */
1206
+ declare function QueryBuilderToolbar({ isExecuting, canExecute, onExecute, onPreview, onClear, className, style, }: QueryBuilderToolbarProps): JSX.Element;
1207
+
1208
+ /**
1209
+ * QueryPreview component for displaying SQL preview.
1210
+ */
1211
+ interface QueryPreviewProps {
1212
+ /** The SQL query string. */
1213
+ sql: string | null;
1214
+ /** Whether the preview is loading. */
1215
+ loading?: boolean;
1216
+ /** Error message if SQL generation failed. */
1217
+ error?: string | null;
1218
+ /** Whether the preview is collapsible. */
1219
+ collapsible?: boolean;
1220
+ /** Initial collapsed state. */
1221
+ defaultCollapsed?: boolean;
1222
+ /** Additional class name. */
1223
+ className?: string;
1224
+ /** Additional styles. */
1225
+ style?: React.CSSProperties;
1226
+ }
1227
+ /**
1228
+ * SQL preview panel with syntax highlighting (basic).
1229
+ */
1230
+ declare function QueryPreview({ sql, loading, error, collapsible, defaultCollapsed, className, style, }: QueryPreviewProps): JSX.Element;
1231
+
1232
+ interface SavedQueryPickerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onSelect'> {
1233
+ /** Current query definition (used when saving). */
1234
+ currentQuery?: QueryDefinition | null;
1235
+ /** Callback when a saved query is selected. */
1236
+ onSelect?: (query: SavedQuery) => void;
1237
+ /** Callback after successfully saving a query. */
1238
+ onSave?: (query: SavedQuery) => void;
1239
+ /** Whether to show the save option. */
1240
+ showSave?: boolean;
1241
+ /** Custom trigger element. */
1242
+ trigger?: React.ReactNode;
1243
+ /** Label for the trigger button. */
1244
+ label?: string;
1245
+ }
1246
+ /**
1247
+ * SavedQueryPicker component for selecting and saving queries.
1248
+ *
1249
+ * @example
1250
+ * ```tsx
1251
+ * <SavedQueryPicker
1252
+ * currentQuery={query}
1253
+ * onSelect={(savedQuery) => setQuery(savedQuery.query)}
1254
+ * onSave={(savedQuery) => console.log('Saved:', savedQuery.name)}
1255
+ * />
1256
+ * ```
1257
+ */
1258
+ declare const SavedQueryPicker: react.ForwardRefExoticComponent<SavedQueryPickerProps & react.RefAttributes<HTMLDivElement>>;
1259
+
1260
+ /**
1261
+ * CustomSQLEditor component.
1262
+ *
1263
+ * A simple SQL editor with textarea input, validation, and execution.
1264
+ */
1265
+ interface CustomSQLEditorProps {
1266
+ /** Initial SQL query. */
1267
+ initialSql?: string;
1268
+ /** Callback when SQL changes. */
1269
+ onSqlChange?: (sql: string) => void;
1270
+ /** Callback when query executes successfully. */
1271
+ onExecute?: (sql: string) => void;
1272
+ /** Placeholder text for the textarea. */
1273
+ placeholder?: string;
1274
+ /** Whether to show the results table. */
1275
+ showResults?: boolean;
1276
+ /** Height of the textarea in pixels. */
1277
+ height?: number;
1278
+ /** Additional class name. */
1279
+ className?: string;
1280
+ /** Additional styles. */
1281
+ style?: React.CSSProperties;
1282
+ }
1283
+ /**
1284
+ * SQL editor with textarea input and query execution.
1285
+ *
1286
+ * @example
1287
+ * ```tsx
1288
+ * <CustomSQLEditor
1289
+ * initialSql="SELECT * FROM users LIMIT 10"
1290
+ * onExecute={(sql) => console.log('Executed:', sql)}
1291
+ * showResults
1292
+ * />
1293
+ * ```
1294
+ */
1295
+ declare function CustomSQLEditor({ initialSql, onSqlChange, onExecute, placeholder, showResults, height, className, style, }: CustomSQLEditorProps): JSX.Element;
1296
+
1297
+ export { TableNode as $, SkeletonMetricCard as A, Button as B, Checkbox as C, Dropdown as D, type SkeletonProps as E, type SkeletonTextProps as F, type SkeletonChartProps as G, type SkeletonTableProps as H, Input as I, type SkeletonMetricCardProps as J, ErrorBoundary as K, ErrorFallback as L, type ErrorBoundaryProps as M, type ErrorFallbackProps as N, type WidgetErrorBoundaryProps as O, EmptyState as P, NoData as Q, NoResults as R, Select as S, Tooltip as T, EmptyDashboard as U, type EmptyStateProps as V, WidgetErrorBoundary as W, type NoDataProps as X, type NoResultsProps as Y, type EmptyDashboardProps as Z, SchemaExplorer as _, Badge as a, ColumnNode as a0, type SchemaExplorerProps as a1, type TableNodeProps as a2, type ColumnNodeProps as a3, ColumnSelector as a4, SelectedColumn as a5, type ColumnSelectorProps as a6, type SelectedColumnProps as a7, FilterBuilder as a8, FilterRow as a9, type QueryPreviewProps as aA, SavedQueryPicker as aB, type SavedQueryPickerProps as aC, CustomSQLEditor as aD, type CustomSQLEditorProps as aE, FilterValueInput as aa, type FilterBuilderProps as ab, type FilterRowProps as ac, type FilterValueInputProps as ad, SortBuilder as ae, SortRow as af, type SortBuilderProps as ag, type SortRowProps as ah, AggregationPicker as ai, type AggregationPickerProps as aj, ResultsTable as ak, TableHeader as al, TableRow as am, TableCell as an, Pagination as ao, type ResultsTableProps as ap, type TableHeaderProps as aq, type TableRowProps as ar, type TableCellProps as as, type PaginationProps as at, QueryBuilder as au, QueryBuilderToolbar as av, QueryPreview as aw, type QueryBuilderProps as ax, type QueryBuilderState as ay, type QueryBuilderToolbarProps as az, DropdownItem as b, DropdownSeparator as c, Icon as d, Dialog as e, DialogHeader as f, DialogFooter as g, type ButtonProps as h, type InputProps as i, type SelectProps as j, type SelectOption as k, type CheckboxProps as l, type BadgeProps as m, type TooltipProps as n, type DropdownProps as o, type DropdownItemProps as p, type DropdownSeparatorProps as q, type IconProps as r, type IconName as s, type DialogProps as t, type DialogHeaderProps as u, type DialogFooterProps as v, Skeleton as w, SkeletonText as x, SkeletonChart as y, SkeletonTable as z };