@quillsql/react 2.16.44 → 2.16.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -73,6 +73,8 @@ interface SelectComponentProps {
73
73
  isLoading?: boolean;
74
74
  hideEmptyOption?: boolean;
75
75
  disabled?: boolean;
76
+ /** Compact trigger (e.g. chat toolbar). */
77
+ size?: 'default' | 'sm';
76
78
  }
77
79
  interface MultiSelectComponentProps {
78
80
  label?: string;
@@ -516,12 +518,12 @@ type ColorMapType = {
516
518
  /**
517
519
  * A set of valid format values for the x and y axes of dashboard items.
518
520
  */
519
- type AxisFormat = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy';
521
+ type AxisFormat$1 = 'percent' | 'dollar_amount' | 'dollar_cents' | 'whole_number' | 'one_decimal_place' | 'two_decimal_places' | 'percentage' | 'string' | 'yyyy' | 'MMM_dd' | 'MMM_yyyy' | 'MMM_dd_yyyy' | 'hh_ap_pm' | 'MMM_dd-MMM_dd' | 'MMM_dd_hh:mm_ap_pm' | 'wo, yyyy';
520
522
 
521
523
  interface Column$1 {
522
524
  field: string;
523
525
  label: string;
524
- format: AxisFormat;
526
+ format: AxisFormat$1;
525
527
  inferFormat?: boolean;
526
528
  }
527
529
  interface ColumnInternal extends Column$1 {
@@ -546,6 +548,10 @@ interface BasePivot {
546
548
  rowFieldType?: string;
547
549
  columnField?: string;
548
550
  columnFieldType?: string;
551
+ /** Source table for rowField (multi-table / disambiguation). */
552
+ rowFieldTable?: string;
553
+ /** Source table for columnField (multi-table / disambiguation). */
554
+ columnFieldTable?: string;
549
555
  sort?: boolean;
550
556
  sortDirection?: 'ASC' | 'DESC';
551
557
  sortField?: string;
@@ -556,6 +562,14 @@ interface BasePivot {
556
562
  columnValues?: string[];
557
563
  dateBucket?: 'day' | 'week' | 'month' | 'year';
558
564
  }
565
+ type PivotAggregation = {
566
+ aggregationType: AggregationType;
567
+ valueField?: string;
568
+ valueFieldType?: string;
569
+ valueField2?: string;
570
+ valueField2Type?: string;
571
+ valueFieldTable?: string;
572
+ };
559
573
  interface SingleAggregationPivot extends BasePivot {
560
574
  aggregationType: AggregationType;
561
575
  valueField?: string;
@@ -570,13 +584,7 @@ interface MultiAggregationPivot extends BasePivot {
570
584
  valueField2?: never;
571
585
  valueField2Type?: never;
572
586
  valueFieldType?: never;
573
- aggregations: {
574
- valueField?: string;
575
- valueFieldType?: string;
576
- valueField2?: string;
577
- valueField2Type?: string;
578
- aggregationType: AggregationType;
579
- }[];
587
+ aggregations: PivotAggregation[];
580
588
  }
581
589
  type AggregationType = 'sum' | 'average' | 'min' | 'max' | 'count' | 'avg' | 'percentage';
582
590
  type PivotData = {
@@ -630,6 +638,29 @@ type ReportBuilderState = {
630
638
  limit: ReportBuilderLimit | null;
631
639
  };
632
640
 
641
+ /**
642
+ * Represents a table object returned from /schema2/:id
643
+ */
644
+ type Table$1 = {
645
+ _id: string;
646
+ isSelectStar: boolean;
647
+ displayName: string;
648
+ name: string;
649
+ description?: string;
650
+ columns: ColumnInternal[];
651
+ viewQuery: string;
652
+ customFieldInfo: any;
653
+ broken?: boolean;
654
+ error?: string;
655
+ ownerTenantFields?: string[];
656
+ };
657
+ interface UniqueValuesByTable {
658
+ [table: string]: UniqueValuesByColumn;
659
+ }
660
+ interface UniqueValuesByColumn {
661
+ [column: string]: string[];
662
+ }
663
+
633
664
  /**
634
665
  * ## QuillReport
635
666
  * Represents an individual item on a dashboard.
@@ -670,7 +701,7 @@ interface QuillReport {
670
701
  /** The field to use for this report's xAxis. */
671
702
  xAxisField: string;
672
703
  /** The format for this report's xAxis. */
673
- xAxisFormat: AxisFormat;
704
+ xAxisFormat: AxisFormat$1;
674
705
  /** The template flag for a report */
675
706
  template?: boolean;
676
707
  /**
@@ -682,7 +713,7 @@ interface QuillReport {
682
713
  /** The label to use for this yAxis. */
683
714
  label: string;
684
715
  /** The format of the data in this yAxis. */
685
- format: AxisFormat;
716
+ format: AxisFormat$1;
686
717
  }[];
687
718
  /**
688
719
  * The relative ordering of this report in relation to its siblings. Ordering
@@ -776,6 +807,14 @@ interface QuillReportInternal extends QuillReport {
776
807
  * When present, backend will generate SQL from this state instead of using queryString.
777
808
  */
778
809
  reportBuilderState?: ReportBuilderState;
810
+ /** String unique values grouped by table/column, used by filter builders. */
811
+ uniqueStringsByTable?: UniqueValuesByTable;
812
+ /** String unique values keyed by column name, used by filter builders. */
813
+ uniqueStringsByColumn?: UniqueValuesByColumn;
814
+ /** Legacy alias for unique string values keyed by column name. */
815
+ columnUniqueValues?: UniqueValuesByColumn;
816
+ /** Backward-compatible alias for unique string values keyed by column name. */
817
+ uniqueValues?: UniqueValuesByColumn;
779
818
  }
780
819
 
781
820
  /**
@@ -1316,6 +1355,49 @@ type QuillProviderProps = QuillCloudProviderProps | SelfHostedProviderProps;
1316
1355
  */
1317
1356
  declare const QuillProvider: ({ tenants, flags, publicKey, queryEndpoint, streamEndpoint, queryHeaders, children, theme, withCredentials, isAdmin, getAuthorizationToken, eventTracking, onChangelogs, }: QuillProviderProps) => react_jsx_runtime.JSX.Element;
1318
1357
 
1358
+ interface TableComponentProps {
1359
+ rows: object[];
1360
+ rowCount?: number;
1361
+ rowCountIsLoading?: boolean;
1362
+ columns: {
1363
+ label: string;
1364
+ field: string;
1365
+ format?: string;
1366
+ }[];
1367
+ currentPage: number;
1368
+ sort?: {
1369
+ field: string;
1370
+ direction: string;
1371
+ };
1372
+ className?: string;
1373
+ containerStyle?: React$1.CSSProperties;
1374
+ isLoading?: boolean;
1375
+ hideCSVDownloadButton?: boolean;
1376
+ downloadCSV?: () => void;
1377
+ LoadingComponent?: () => React$1.JSX.Element;
1378
+ DownloadCSVButtonComponent?: (props: ButtonComponentProps) => React$1.JSX.Element;
1379
+ rowsPerPage?: number;
1380
+ emptyStateLabel?: string;
1381
+ onPageChange?: (page: number) => void;
1382
+ onSortChange?: (sort: {
1383
+ field: string;
1384
+ direction: string;
1385
+ }) => void;
1386
+ /** When true, `rows` are already the current page (server/manual pagination). */
1387
+ manualPagination?: boolean;
1388
+ /** Total page count from the data source; `-1` when unknown (TanStack semantics). */
1389
+ pageCount?: number;
1390
+ canNextPage?: boolean;
1391
+ canPreviousPage?: boolean;
1392
+ headerBackgroundColor?: string;
1393
+ footerBackgroundColor?: string;
1394
+ borderRadius?: string | number;
1395
+ borderLeft?: string;
1396
+ borderRight?: string;
1397
+ borderTop?: string;
1398
+ borderBottom?: string;
1399
+ }
1400
+
1319
1401
  interface BaseChartProps {
1320
1402
  colors?: string[];
1321
1403
  containerStyle?: React.CSSProperties;
@@ -1524,7 +1606,6 @@ interface ChartDisplayProps extends WithConfig {
1524
1606
  direction: string;
1525
1607
  }) => void;
1526
1608
  onClickChartElement?: (data: any) => void;
1527
- onClickLegendElement?: (data: any) => void;
1528
1609
  scrollable?: boolean;
1529
1610
  overrideTheme?: QuillTheme;
1530
1611
  referenceLines?: {
@@ -1534,8 +1615,10 @@ interface ChartDisplayProps extends WithConfig {
1534
1615
  showLegend?: boolean;
1535
1616
  tableRowsLoading?: boolean;
1536
1617
  disableTableSort?: boolean;
1618
+ /** When `chartType` is `table`, applied to QuillTable's outer frame only (not cell lines). */
1619
+ tableChartWrapperBorders?: Pick<TableComponentProps, 'borderRadius' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom'>;
1537
1620
  }
1538
- declare const ChartDisplay: ({ reportId, config, colors, className, containerStyle, hideXAxis, hideYAxis, hideCartesianGrid, hideDateRangeFilter, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, isAnimationActive, scrollable, loading, ErrorComponent, colorMap, LoadingComponent, onPageChange, onSortChange, onClickChartElement, onClickLegendElement, overrideTheme, referenceLines, showLegend, tableRowsLoading, }: ChartDisplayProps) => react_jsx_runtime.JSX.Element;
1621
+ declare const ChartDisplay: ({ reportId, config, colors, className, containerStyle, hideXAxis, hideYAxis, hideCartesianGrid, hideDateRangeFilter, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, isAnimationActive, scrollable, loading, ErrorComponent, colorMap, LoadingComponent, onPageChange, onSortChange, onClickChartElement, overrideTheme, referenceLines, showLegend, tableRowsLoading, tableChartWrapperBorders, }: ChartDisplayProps) => react_jsx_runtime.JSX.Element;
1539
1622
 
1540
1623
  /**
1541
1624
  * Props for the Quill Table component.
@@ -1603,6 +1686,7 @@ interface TableProps {
1603
1686
  columns?: {
1604
1687
  label: string;
1605
1688
  field: string;
1689
+ format?: string;
1606
1690
  }[];
1607
1691
  /**
1608
1692
  * The placeholder filename to use when downloading this table as a csv file.
@@ -1678,6 +1762,23 @@ interface TableProps {
1678
1762
  * Styles the top-level container of the Table.
1679
1763
  */
1680
1764
  containerStyle?: React$1.CSSProperties;
1765
+ /** Passed through to QuillTable when rendering with `rows` / `columns`. */
1766
+ borderRadius?: string | number;
1767
+ borderLeft?: string;
1768
+ borderRight?: string;
1769
+ borderTop?: string;
1770
+ borderBottom?: string;
1771
+ /** Controlled pagination for `rows` / `columns` mode (e.g. `useReport.table`). */
1772
+ currentPage?: number;
1773
+ rowsPerPage?: number;
1774
+ rowCount?: number;
1775
+ rowCountIsLoading?: boolean;
1776
+ onPageChange?: (page: number) => void;
1777
+ manualPagination?: boolean;
1778
+ pageCount?: number;
1779
+ canNextPage?: boolean;
1780
+ canPreviousPage?: boolean;
1781
+ disableSort?: boolean;
1681
1782
  /** An array of dashboard filters that are indicated by the frontend dev. */
1682
1783
  filters?: Filter[];
1683
1784
  }
@@ -1712,7 +1813,7 @@ interface TableProps {
1712
1813
  * ### Table API
1713
1814
  * @see https://docs.quillsql.com/components/table
1714
1815
  */
1715
- declare const Table$1: ({ TableComponent, ...props }: TableProps) => react_jsx_runtime.JSX.Element | null;
1816
+ declare const Table: ({ TableComponent, ...props }: TableProps) => react_jsx_runtime.JSX.Element | null;
1716
1817
 
1717
1818
  /**
1718
1819
  * Props for the Quill SQLEditor component.
@@ -2591,7 +2692,6 @@ declare function ChartEditor({ isOpen, reportId, isAdmin, chartBuilderTitle, cha
2591
2692
  interface StaticChartBaseProps {
2592
2693
  reportId: string;
2593
2694
  onClickChartElement?: (data: any) => void;
2594
- onClickLegendElement?: (data: any) => void;
2595
2695
  showLegend?: boolean;
2596
2696
  }
2597
2697
  type StaticChartProps = (StaticChartBaseProps & {
@@ -2614,26 +2714,354 @@ interface ChatProps {
2614
2714
  agentEndpoint?: string;
2615
2715
  suggestions?: string[];
2616
2716
  }
2717
+ type ChatModelId = 'gemini-2-flash' | 'gemini-2.5-flash' | 'gemini-3-flash-preview' | 'gpt-5.1' | 'opus-4.5' | 'kimi-k2.5';
2617
2718
  declare function Chat({ selectedDashboard, ChartViewComponent, agentEndpoint, suggestions, }: ChatProps): react_jsx_runtime.JSX.Element;
2618
2719
 
2720
+ type QueryBuilderCombinator = 'and' | 'or';
2721
+ type QueryBuilderRule = {
2722
+ field: string;
2723
+ operator: string;
2724
+ value: unknown;
2725
+ };
2726
+ type QueryBuilderRuleGroupEntry = QueryBuilderRule | QueryBuilderRuleGroup | QueryBuilderCombinator;
2727
+ type QueryBuilderRuleGroup = {
2728
+ combinator?: QueryBuilderCombinator;
2729
+ rules: QueryBuilderRuleGroupEntry[];
2730
+ };
2731
+ type QueryBuilderFieldType = 'string' | 'number' | 'date' | 'boolean' | 'null';
2732
+ type QueryBuilderOperatorOption = {
2733
+ name: string;
2734
+ value: string;
2735
+ label: string;
2736
+ arity?: 'unary' | 'binary' | number;
2737
+ };
2738
+
2739
+ /**
2740
+ * Default `value` for a new react-querybuilder rule given a Quill operator.
2741
+ * List operators (`in` / `notIn`) need `[]` so the multiselect editor works
2742
+ * with `listsAsArrays`; everything else starts as an empty string.
2743
+ */
2744
+ declare const defaultFilterRuleValueForOperator: (operator: unknown) => unknown;
2745
+ /**
2746
+ * One-rule react-querybuilder tree seeded from the first field in the catalog,
2747
+ * using that field's first operator and a matching default value. Used for the
2748
+ * "Add filter" empty state, where react-querybuilder's own "+ Rule" button is
2749
+ * not rendered yet.
2750
+ */
2751
+ declare const buildSeededFilterQuery: (queryBuilderProps: Pick<UseFormQueryBuilderProps, "fields" | "getOperators"> | null | undefined) => QueryBuilderRuleGroup;
2752
+ type FilterDraftQueryBuilderProps = UseFormQueryBuilderProps & {
2753
+ /** Committed-or-draft tree react-querybuilder hydrates from on mount (uncontrolled mode). */
2754
+ defaultQuery: QueryBuilderRuleGroup;
2755
+ onQueryChange: (next: unknown) => void;
2756
+ addRuleToNewGroups: true;
2757
+ getDefaultValue: (rule: {
2758
+ operator?: unknown;
2759
+ }) => unknown;
2760
+ };
2761
+ type UseReportFilterDraft = {
2762
+ /**
2763
+ * Pass as `key` on `QueryBuilder` (not inside the spread — React warns on
2764
+ * spread `key`). Changes whenever react-querybuilder must rehydrate from
2765
+ * `defaultQuery`: report switch, committed filters change, field catalog
2766
+ * change, or `resetFilterDraft`.
2767
+ */
2768
+ filterDraftKey: string;
2769
+ /** Spread onto `react-querybuilder`'s `QueryBuilder`: `<QueryBuilder key={filterDraftKey} {...filterDraftQueryBuilderProps} />`. */
2770
+ filterDraftQueryBuilderProps: FilterDraftQueryBuilderProps;
2771
+ /** Draft differs from committed filters (commit would change the report). */
2772
+ isFilterDraftDirty: boolean;
2773
+ /** Draft tree has no rules at all; show an "Add filter" affordance instead of the builder. */
2774
+ isFilterDraftEmpty: boolean;
2775
+ /** Commit the draft via `setFilters` (report/chart refresh follows). */
2776
+ commitFilterDraft: () => void;
2777
+ /** Drop the draft and rehydrate the builder from committed filters. */
2778
+ resetFilterDraft: () => void;
2779
+ /** Seed a first rule (field + operator + default value) and leave the empty state. */
2780
+ seedFilterDraft: () => void;
2781
+ };
2782
+
2783
+ /**
2784
+ * Pagination types and pure helpers for `useReport`, mirroring the
2785
+ * TanStack Table v8 pagination API (`@tanstack/table-core` RowPagination)
2786
+ * so devs can reuse the same integration patterns and muscle memory.
2787
+ */
2788
+ interface PaginationState {
2789
+ /** Zero-based page index. */
2790
+ pageIndex: number;
2791
+ /** Rows per page (minimum 1). */
2792
+ pageSize: number;
2793
+ }
2794
+ type Updater<T> = T | ((old: T) => T);
2795
+ type OnChangeFn<T> = (updaterOrValue: Updater<T>) => void;
2796
+ declare const DEFAULT_PAGE_SIZE = 10;
2797
+ /** Base row window fetched before per-page server requests kick in. */
2798
+ declare const DEFAULT_USE_REPORT_ROWS_PER_REQUEST: number;
2799
+
2619
2800
  type SelectOption = {
2620
2801
  label: string;
2621
2802
  value: string;
2622
2803
  };
2804
+ type UseFormTableRow = Record<string, unknown>;
2805
+ type UseFormTableColumn = {
2806
+ label: string;
2807
+ field: string;
2808
+ format: string;
2809
+ };
2810
+ /**
2811
+ * Pagination surface mirroring TanStack Table's `PaginationInstance`
2812
+ * (https://tanstack.com/table/v8/docs/api/features/pagination), so a custom
2813
+ * table can use the exact patterns from the TanStack docs, and a real
2814
+ * `useReactTable` can be driven with `manualPagination: true`,
2815
+ * `state: { pagination: table.pagination }`, and
2816
+ * `onPaginationChange: table.setPagination`.
2817
+ *
2818
+ * Until pagination is used (a method is called or pagination options are
2819
+ * passed to `useReport`), `rows` contains the full fetched window, preserving
2820
+ * pre-pagination behavior — analogous to a TanStack table without
2821
+ * `getPaginationRowModel()`.
2822
+ */
2823
+ type UseFormTablePagination = {
2824
+ /** Current pagination state (≙ TanStack `table.getState().pagination`). */
2825
+ pagination: PaginationState;
2826
+ setPagination: (updater: Updater<PaginationState>) => void;
2827
+ setPageIndex: (updater: Updater<number>) => void;
2828
+ setPageSize: (updater: Updater<number>) => void;
2829
+ resetPagination: (defaultState?: boolean) => void;
2830
+ resetPageIndex: (defaultState?: boolean) => void;
2831
+ resetPageSize: (defaultState?: boolean) => void;
2832
+ nextPage: () => void;
2833
+ previousPage: () => void;
2834
+ firstPage: () => void;
2835
+ lastPage: () => void;
2836
+ getCanNextPage: () => boolean;
2837
+ getCanPreviousPage: () => boolean;
2838
+ /** Total page count; `-1` while the total row count is unknown. */
2839
+ getPageCount: () => number;
2840
+ /** Total row count across all pages (server count when available). */
2841
+ getRowCount: () => number;
2842
+ getPageOptions: () => number[];
2843
+ };
2844
+ type UseFormTable = UseFormTablePagination & {
2845
+ rows: UseFormTableRow[];
2846
+ columns: UseFormTableColumn[];
2847
+ getColumnFormat: (field: string) => string;
2848
+ formatCellValue: (field: string, value: unknown) => string;
2849
+ getFormattedCellValue: (row: UseFormTableRow, field: string) => string;
2850
+ };
2851
+ type ColumnSelectionOption = {
2852
+ value: string;
2853
+ label: string;
2854
+ field: string;
2855
+ tableName: string;
2856
+ type: string;
2857
+ };
2858
+ type UseFormDisplayColumn = ReportBuilderColumn & {
2859
+ format?: string;
2860
+ };
2861
+ type SetReportBuilderColumnInput = Partial<UseFormDisplayColumn> & {
2862
+ field: string;
2863
+ label?: string;
2864
+ };
2865
+ type TableColumnsControllerItem = {
2866
+ id: string;
2867
+ label: string;
2868
+ defaultLabel: string;
2869
+ customLabel: string;
2870
+ /** Persisted axis format value (e.g. `whole_number`). */
2871
+ format: string;
2872
+ /** Format preset label (same strings as chart axis / `tableFormatOptions`). */
2873
+ formatLabel: string;
2874
+ field: string;
2875
+ tableName: string;
2876
+ };
2877
+ type TableColumnListItem = {
2878
+ id: string;
2879
+ label: string;
2880
+ visible: true;
2881
+ /** Axis format preset label (matches `tableFormatOptions` / chart axis). */
2882
+ format: string;
2883
+ /**
2884
+ * When set, overrides the shared `formatOptions` for this row (e.g. pivot date bucket).
2885
+ */
2886
+ formatOptions?: string[];
2887
+ };
2888
+ /** Selected columns + mutation methods. Pair with `columnOptions` from `useReport` (like `datasources` / `datasourceOptions`). */
2889
+ type TableColumnsController = {
2890
+ items: TableColumnsControllerItem[];
2891
+ /** Schema option per column id (`value` === id) — includes `field`, `tableName`, etc. */
2892
+ optionById: ReadonlyMap<string, ColumnSelectionOption>;
2893
+ byId: ReadonlyMap<string, TableColumnsControllerItem>;
2894
+ /** Ready-made rows for table/column-picker UIs (`id`, `label`, `format` display string). */
2895
+ columnList: TableColumnListItem[];
2896
+ /** Build the `columns` array for `setReport({ columns })` from ordered ids. */
2897
+ getSetReportColumns: (ids: string[]) => SetReportBuilderColumnInput[];
2898
+ reorder: (oldIndex: number, newIndex: number) => void;
2899
+ /** Reorder to match a full id list (e.g. after drag-and-drop column list UIs). */
2900
+ reorderFromOrder: (nextIds: string[]) => void;
2901
+ remove: (id: string) => void;
2902
+ toggle: (id: string) => void;
2903
+ update: (id: string, updates: Partial<{
2904
+ fieldId: string;
2905
+ label: string;
2906
+ format: string;
2907
+ }>) => void;
2908
+ /**
2909
+ * Build `setReport({ columns: { patch } })` for a table column sidebar edit;
2910
+ * `setReport` expands it to a full `columns` list and/or `chartAxes`. Returns
2911
+ * null only when `id` is empty.
2912
+ */
2913
+ getColumnSidebarSetReportInput: (id: string, updates: Partial<{
2914
+ fieldId: string;
2915
+ label: string;
2916
+ format: string;
2917
+ }>) => SetReportBuilderInput | null;
2918
+ /**
2919
+ * When true (pivot + chartType table), the list mirrors `chart.columns`; reorder,
2920
+ * add, remove, and field swap are disabled — only label/format apply via chart axes.
2921
+ */
2922
+ structureEditsLocked: boolean;
2923
+ };
2924
+ type ChartAxisFieldOption = {
2925
+ value: string;
2926
+ label: string;
2927
+ format: AxisFormat;
2928
+ };
2929
+ type ChartYAxisControllerItem = {
2930
+ id: string;
2931
+ field: string;
2932
+ label: string;
2933
+ format: AxisFormat;
2934
+ };
2935
+ type ChartAxesController = {
2936
+ xAxis: {
2937
+ field: string;
2938
+ format: AxisFormat;
2939
+ options: ChartAxisFieldOption[];
2940
+ formatOptions: SelectOption[];
2941
+ update: (updates: Partial<{
2942
+ field: string;
2943
+ format: AxisFormat;
2944
+ }>) => void;
2945
+ };
2946
+ yAxis: {
2947
+ items: ChartYAxisControllerItem[];
2948
+ options: ChartAxisFieldOption[];
2949
+ formatOptions: SelectOption[];
2950
+ add: (field?: string) => void;
2951
+ remove: (id: string) => void;
2952
+ reorder: (oldIndex: number, newIndex: number) => void;
2953
+ update: (id: string, updates: Partial<{
2954
+ field: string;
2955
+ label: string;
2956
+ format: AxisFormat;
2957
+ }>) => void;
2958
+ };
2959
+ };
2623
2960
  type ColumnSelectorChangeValue = string[];
2961
+ /**
2962
+ * Table column sidebar edit under {@link SetReportBuilderInput.columns}: expands
2963
+ * inside `setReport` to a full `columns` array and/or `chartAxes` (pivot table chart).
2964
+ */
2965
+ type SetReportTableColumnSidebarPatch = {
2966
+ patch: {
2967
+ id: string;
2968
+ label?: string;
2969
+ format?: string;
2970
+ fieldId?: string;
2971
+ };
2972
+ };
2624
2973
  type AggregationStateItem = Partial<{
2625
2974
  valueField: string;
2626
2975
  valueField2?: string;
2627
2976
  aggregationType: AggregationType;
2977
+ /** Resolved datasource table for `valueField` (mirrors `aggregationTablesByIndex`). */
2978
+ valueFieldTable?: string;
2628
2979
  }>;
2629
2980
  type AggregationOption = {
2630
2981
  key: string;
2631
2982
  label: string;
2632
- value?: string;
2983
+ value: string;
2633
2984
  options: SelectOption[];
2634
2985
  };
2986
+ type AxisFormat = QuillReportInternal['yAxisFields'][number]['format'];
2987
+ type QueryBuilderFieldValueOption = {
2988
+ name: string;
2989
+ label: string;
2990
+ value: string;
2991
+ };
2992
+ type UseFormQueryBuilderField = {
2993
+ name: string;
2994
+ label: string;
2995
+ inputType: string;
2996
+ quillFieldType: QueryBuilderFieldType;
2997
+ values?: QueryBuilderFieldValueOption[];
2998
+ };
2999
+ type UseFormQueryBuilderProps = {
3000
+ fields: UseFormQueryBuilderField[];
3001
+ listsAsArrays: true;
3002
+ getOperators: (field: string, misc?: {
3003
+ fieldData?: Partial<UseFormQueryBuilderField>;
3004
+ }) => QueryBuilderOperatorOption[];
3005
+ getInputType: (field: string, operator: string, misc?: {
3006
+ fieldData?: Partial<UseFormQueryBuilderField>;
3007
+ }) => 'text' | 'number' | 'date' | 'checkbox';
3008
+ getValueEditorType: (field: string, operator: string, misc?: {
3009
+ fieldData?: Partial<UseFormQueryBuilderField>;
3010
+ }) => 'multiselect' | undefined;
3011
+ getValues: (field: string, operator: string, misc?: {
3012
+ fieldData?: Partial<UseFormQueryBuilderField>;
3013
+ }) => QueryBuilderFieldValueOption[];
3014
+ };
3015
+ /** Maps table column format dropdown values to persisted report column `format` (matches `setReport({ columns })` / `update`). */
3016
+ declare function tableColumnFormatFromUiSelection(raw: string): string;
3017
+ /** Shape expected by chart config sidebars that mirror `AxisConfig` (e.g. Quill Chat ConfigForm). */
3018
+ type UseFormAxisConfig = {
3019
+ xAxis: {
3020
+ field: string;
3021
+ label: string;
3022
+ format: string;
3023
+ show: boolean;
3024
+ rotation: number;
3025
+ fontSize: number;
3026
+ };
3027
+ yAxis: {
3028
+ fields: Array<{
3029
+ field: string;
3030
+ label: string;
3031
+ format: string;
3032
+ color: string;
3033
+ }>;
3034
+ label: string;
3035
+ show: boolean;
3036
+ min: string;
3037
+ max: string;
3038
+ fontSize: number;
3039
+ };
3040
+ legend: {
3041
+ show: boolean;
3042
+ };
3043
+ };
3044
+ type SetReportChartAxesInput = {
3045
+ xAxis?: Partial<{
3046
+ field: string;
3047
+ /** Custom X-axis title; empty string clears the override and restores the report/field default. */
3048
+ label: string;
3049
+ format: AxisFormat | string;
3050
+ }>;
3051
+ yAxis?: {
3052
+ fields: Array<{
3053
+ field: string;
3054
+ label?: string;
3055
+ format?: AxisFormat | string;
3056
+ }>;
3057
+ };
3058
+ };
2635
3059
  interface SetReportBuilderInput {
2636
- columns?: ColumnSelectorChangeValue | ReportBuilderColumn[];
3060
+ /**
3061
+ * Column picker ids, a full column list, or `{ patch: { id, … } }` for sidebar
3062
+ * edits (expanded inside `setReport` into a full list and/or `chartAxes`).
3063
+ */
3064
+ columns?: ColumnSelectorChangeValue | SetReportBuilderColumnInput[] | SetReportTableColumnSidebarPatch;
2637
3065
  filters?: Filter[];
2638
3066
  groupRowsBy?: string;
2639
3067
  groupColumnsBy?: string;
@@ -2641,25 +3069,199 @@ interface SetReportBuilderInput {
2641
3069
  index: number;
2642
3070
  value: string;
2643
3071
  };
2644
- sort?: ReportBuilderSort[];
3072
+ sort?: ReportBuilderSort[] | string;
2645
3073
  limit?: ReportBuilderLimit | null;
2646
3074
  chartType?: string;
3075
+ /** When set, updates chart legend visibility (same source as `showLegend` from `useReport`). */
3076
+ showLegend?: boolean;
3077
+ /** When set, merges into chart axis edits (use with returned `xAxis` / `yAxis` / options). */
3078
+ chartAxes?: SetReportChartAxesInput;
3079
+ /**
3080
+ * Schema table names for datasource / multi-table picker UIs.
3081
+ * Empty array clears the override (report base tables apply again).
3082
+ */
3083
+ datasources?: string[];
2647
3084
  }
2648
- interface UseFormOptions {
3085
+ interface UseReportOptions {
2649
3086
  useInMemoryEngines?: boolean;
3087
+ reportOverride?: QuillReportInternal | null;
3088
+ initialReportBuilderState?: ReportBuilderState | null;
3089
+ /**
3090
+ * When the report payload has no `dashboardName` and the client has no
3091
+ * `defaultDashboard`, use this for engine tasks that require a dashboard
3092
+ * (e.g. filter unique values).
3093
+ */
3094
+ destinationDashboardName?: string;
3095
+ /**
3096
+ * When true (default), filter pickers, pivot row/column group-by options,
3097
+ * aggregation field dropdowns, and filter-builder field lists only include
3098
+ * columns from the selected datasource
3099
+ * tables (`setReport({ datasources })` / report base tables)—not other tables that
3100
+ * happen to be FK-joinable but were not selected. When false, behaviour matches
3101
+ * the prior schema-wide option lists when no table scope applies.
3102
+ */
3103
+ restrictFieldOptionsToSelectedDatasources?: boolean;
3104
+ /**
3105
+ * Initial (uncontrolled) state, mirroring TanStack Table's
3106
+ * `initialState.pagination`. Providing it activates table pagination
3107
+ * immediately (equivalent to adding `getPaginationRowModel()` in TanStack).
3108
+ */
3109
+ initialState?: {
3110
+ pagination?: Partial<PaginationState>;
3111
+ };
3112
+ /**
3113
+ * Controlled state, mirroring TanStack Table's `state.pagination`. When
3114
+ * provided, it overrides internal pagination state; manage updates via
3115
+ * `onPaginationChange`.
3116
+ */
3117
+ state?: {
3118
+ pagination?: PaginationState;
3119
+ };
3120
+ /**
3121
+ * Called with a TanStack-style updater whenever pagination changes
3122
+ * (mirrors `onPaginationChange`). When `state.pagination` is not provided,
3123
+ * internal state is still updated as well.
3124
+ */
3125
+ onPaginationChange?: OnChangeFn<PaginationState>;
3126
+ /**
3127
+ * Reset `pageIndex` to 0 when the underlying query state changes (filters,
3128
+ * columns, sort, datasources, limit). Defaults to true, mirroring TanStack's
3129
+ * `autoResetPageIndex`.
3130
+ */
3131
+ autoResetPageIndex?: boolean;
2650
3132
  }
2651
- declare function useForm(reportId: string, options?: UseFormOptions): {
2652
- columns: ColumnSelectorChangeValue;
2653
- columnsOptions: {
3133
+ /**
3134
+ * `saveChanges` from `useReport`. Always returns a Promise so UIs can `await`
3135
+ * before navigation or feedback. Resolves to `undefined` when persist is skipped
3136
+ * (e.g. missing client, dashboard name, or report state).
3137
+ */
3138
+ type UseReportSaveChangesFn = () => Promise<unknown>;
3139
+ /**
3140
+ * @param reportIdArg When omitted, the hook can bootstrap a report via `saveReport`
3141
+ * (`create-report`) on the first `setReport({ datasources })`, after schema is available.
3142
+ * Use `destinationDashboardName` so the server can resolve a dashboard for create-report.
3143
+ */
3144
+ declare function useReport(reportIdArg?: string, options?: UseReportOptions): {
3145
+ /** True while `report-builder-unique-values` runs for filter value options (not chart/table load). */
3146
+ filterUniqueValuesLoading: boolean;
3147
+ limit: ReportBuilderLimit | null;
3148
+ chartTypes: {
3149
+ label: string;
3150
+ value: string;
3151
+ }[];
3152
+ columnsOptions: ColumnSelectionOption[];
3153
+ tableColumnOptions: ColumnSelectionOption[];
3154
+ tableColumns: TableColumnsController;
3155
+ setReport: (nextState: SetReportBuilderInput) => void;
3156
+ saveChanges: UseReportSaveChangesFn;
3157
+ setFilters: (nextFilters: QueryBuilderRuleGroup) => void;
3158
+ setReportBuilder: (nextState: SetReportBuilderInput) => void;
3159
+ /** Current report-builder slice (tables, columns, filters, pivot, sort); pass to e.g. `Chat` as `reportBuilderState`. */
3160
+ reportBuilderState: ReportBuilderState | undefined;
3161
+ filterDraftKey: string;
3162
+ filterDraftQueryBuilderProps: FilterDraftQueryBuilderProps;
3163
+ isFilterDraftDirty: boolean;
3164
+ isFilterDraftEmpty: boolean;
3165
+ commitFilterDraft: () => void;
3166
+ resetFilterDraft: () => void;
3167
+ seedFilterDraft: () => void;
3168
+ chart: {
3169
+ xAxisField: string;
3170
+ xAxisFormat: AxisFormat$1;
3171
+ xAxisLabel: string;
3172
+ yAxisFields: {
3173
+ field: string;
3174
+ label: string;
3175
+ format: AxisFormat$1;
3176
+ }[];
3177
+ columns: Column$1[];
3178
+ pivotQuery?: string;
3179
+ comparisonPivotQuery?: string;
3180
+ itemQuery?: string[];
3181
+ referencedTables?: string[];
3182
+ referencedColumns?: {
3183
+ [table: string]: string[];
3184
+ };
3185
+ error?: string;
3186
+ adminError?: string;
3187
+ triggerReload?: boolean;
3188
+ columnInternal: ColumnInternal[];
3189
+ loadingRows?: boolean;
3190
+ flags?: {
3191
+ [tenantField: string]: string[] | "QUILL_ALL_TENANTS";
3192
+ };
3193
+ reportBuilderState?: ReportBuilderState;
3194
+ uniqueStringsByTable?: UniqueValuesByTable;
3195
+ uniqueStringsByColumn?: UniqueValuesByColumn;
3196
+ columnUniqueValues?: UniqueValuesByColumn;
3197
+ uniqueValues?: UniqueValuesByColumn;
2654
3198
  id: string;
2655
3199
  name: string;
2656
- columns: {
2657
- id: string;
2658
- name: string;
2659
- type: string;
3200
+ dashboardName: string;
3201
+ rows: {
3202
+ [key: string]: string;
3203
+ }[];
3204
+ chartType: string;
3205
+ showLegend?: boolean;
3206
+ dateField?: {
3207
+ table: string;
3208
+ field: string;
3209
+ };
3210
+ pivot: Pivot | null;
3211
+ template?: boolean;
3212
+ order: number;
3213
+ compareRows: {
3214
+ [key: string]: string;
3215
+ }[];
3216
+ filtersApplied?: InternalFilter[];
3217
+ pagination?: Pagination;
3218
+ sort?: {
3219
+ field: string;
3220
+ direction: string;
3221
+ };
3222
+ rowCount: number;
3223
+ queryString: string;
3224
+ filterMap?: {
3225
+ [key: string]: {
3226
+ table: string;
3227
+ field: string;
3228
+ };
3229
+ };
3230
+ referenceLines?: {
3231
+ label: string;
3232
+ query: [number, number] | string;
2660
3233
  }[];
3234
+ referenceLineYValues?: {
3235
+ label: string;
3236
+ query: [number, number];
3237
+ }[];
3238
+ includeCustomFields?: boolean;
3239
+ columnsWithCustomFields?: Column$1[];
3240
+ pivotRows?: {
3241
+ [key: string]: string;
3242
+ }[];
3243
+ pivotColumns?: ColumnInternal[];
3244
+ pivotRowCount?: number;
3245
+ } | undefined;
3246
+ chartLoading: boolean;
3247
+ table: UseFormTable;
3248
+ tableLoading: boolean;
3249
+ loading: boolean;
3250
+ /** Report title: matching `sourceReport.name`, else `report-name` task, else empty. */
3251
+ name: string;
3252
+ /**
3253
+ * Resolved report id: the `reportId` argument when provided, otherwise the id
3254
+ * returned from `create-report` after the first datasource selection.
3255
+ */
3256
+ reportId: string | undefined;
3257
+ datasources: {
3258
+ id: string;
3259
+ label: string;
3260
+ }[];
3261
+ datasourceOptions: {
3262
+ id: string;
3263
+ label: string;
2661
3264
  }[];
2662
- filters: Filter[];
2663
3265
  groupRowsBy: string | undefined;
2664
3266
  groupRowsByOptions: SelectOption[];
2665
3267
  groupColumnsBy: string | undefined;
@@ -2668,53 +3270,172 @@ declare function useForm(reportId: string, options?: UseFormOptions): {
2668
3270
  valueField: string;
2669
3271
  valueField2?: string;
2670
3272
  aggregationType: AggregationType;
3273
+ /** Resolved datasource table for `valueField` (mirrors `aggregationTablesByIndex`). */
3274
+ valueFieldTable?: string;
2671
3275
  }>[];
3276
+ aggregationOptions: AggregationOption[];
2672
3277
  aggregationDescriptionOptions: {
2673
3278
  label: string;
2674
3279
  value: string;
2675
3280
  }[];
2676
- aggregationOptions: AggregationOption[];
2677
- sort: {
3281
+ sort: string;
3282
+ sortOptions: {
2678
3283
  label: string;
2679
3284
  value: string;
2680
3285
  }[];
2681
- sortOptions: SelectOption[];
2682
- chartTypes: {
3286
+ chartType: string | undefined;
3287
+ chartTypeOptions: {
2683
3288
  label: string;
2684
3289
  value: string;
2685
3290
  }[];
2686
- chartTypeOptions: {
3291
+ /** Encoded field keys for the current column selection (for `setReport({ columns })`, etc.). */
3292
+ columnIds: ColumnSelectorChangeValue;
3293
+ /** Selected columns + `reorder` / `toggle` / `update` / `remove`. */
3294
+ columns: TableColumnsController;
3295
+ /** Schema columns for current datasources — pool for the table column picker. */
3296
+ columnOptions: ColumnSelectionOption[];
3297
+ xAxis: {
3298
+ field: string;
3299
+ format: AxisFormat;
3300
+ options: ChartAxisFieldOption[];
3301
+ formatOptions: SelectOption[];
3302
+ update: (updates: Partial<{
3303
+ field: string;
3304
+ format: AxisFormat;
3305
+ }>) => void;
3306
+ };
3307
+ xAxisOptions: {
3308
+ value: string;
2687
3309
  label: string;
3310
+ format: string;
3311
+ }[];
3312
+ yAxis: {
3313
+ items: ChartYAxisControllerItem[];
3314
+ options: ChartAxisFieldOption[];
3315
+ formatOptions: SelectOption[];
3316
+ add: (field?: string) => void;
3317
+ remove: (id: string) => void;
3318
+ reorder: (oldIndex: number, newIndex: number) => void;
3319
+ update: (id: string, updates: Partial<{
3320
+ field: string;
3321
+ label: string;
3322
+ format: AxisFormat;
3323
+ }>) => void;
3324
+ };
3325
+ yAxisOptions: {
2688
3326
  value: string;
3327
+ label: string;
3328
+ format: string;
2689
3329
  }[];
2690
- chartType: string | undefined;
2691
- chart: QuillReportInternal | undefined;
2692
- limit: ReportBuilderLimit | null;
2693
- setReport: (nextState: SetReportBuilderInput) => void;
3330
+ /** Same strings as `axisSelectFormatLabels` (X/Y share chart format presets). */
3331
+ xAxisFormatOptions: string[];
3332
+ yAxisFormatOptions: string[];
3333
+ /** Table column format dropdown labels (same set as chart axis formats). */
3334
+ tableFormatOptions: string[];
3335
+ showLegend: boolean;
3336
+ axisConfig: UseFormAxisConfig;
3337
+ availableFields: {
3338
+ id: string;
3339
+ label: string;
3340
+ type: string;
3341
+ }[];
3342
+ axisSelectFormatLabels: string[];
3343
+ /** @deprecated Prefer top-level `xAxis`, `yAxis`, and `showLegend`. */
3344
+ chartAxes: ChartAxesController;
3345
+ /** @deprecated Prefer top-level `xAxisOptions` / `yAxisOptions`. */
3346
+ chartAxisOptions: {
3347
+ xAxis: {
3348
+ value: string;
3349
+ label: string;
3350
+ format: string;
3351
+ }[];
3352
+ yAxis: {
3353
+ value: string;
3354
+ label: string;
3355
+ format: string;
3356
+ }[];
3357
+ };
3358
+ hasTableDrivenColumnOrder: boolean;
3359
+ filters: QueryBuilderRuleGroup;
3360
+ filterQueryBuilderProps: UseFormQueryBuilderProps;
3361
+ };
3362
+
3363
+ /** Normalize react-querybuilder filter trees before stack conversion / persistence. */
3364
+ type QueryBuilderDisplayRule = {
3365
+ id?: unknown;
3366
+ field?: unknown;
3367
+ operator?: unknown;
3368
+ value?: unknown;
3369
+ };
3370
+ type QueryBuilderDisplayGroup = {
3371
+ combinator?: unknown;
3372
+ rules: unknown[];
2694
3373
  };
3374
+ declare const isQueryBuilderDisplayGroup: (value: unknown) => value is QueryBuilderDisplayGroup;
3375
+ declare const isQueryBuilderDisplayRule: (value: unknown) => value is QueryBuilderDisplayRule;
3376
+ declare const stripQueryBuilderTransientFields: (value: unknown, seen?: WeakMap<object, unknown>) => unknown;
3377
+ /** Merge relative-date rule values against a prior tree (typically last committed filters). */
3378
+ declare const normalizeRelativeDateRules: (nextQuery: unknown, previousQuery: unknown) => unknown;
3379
+ /** Strip + relative-date normalization used by `useReport` `setFilters` and draft-vs-committed UI. */
3380
+ declare function prepareQueryBuilderFiltersForSet(next: unknown, previousCommitted: unknown): unknown;
3381
+ /**
3382
+ * Whether a react-querybuilder draft differs from committed filters in a way that matters
3383
+ * for Apply (ignores transient `id` / `path`, etc.).
3384
+ */
3385
+ declare function areQueryBuilderFilterDraftsDirty(draft: unknown, committed: unknown): boolean;
3386
+ /** Number of leaf filter rules (excludes empty groups). */
3387
+ declare function countFilterRules(value: unknown): number;
3388
+
3389
+ type ReportDetailTable = {
3390
+ columns?: unknown[];
3391
+ rows?: unknown[];
3392
+ pagination?: {
3393
+ pageIndex: number;
3394
+ pageSize: number;
3395
+ };
3396
+ setPageIndex?: (updater: number | ((old: number) => number)) => void;
3397
+ getRowCount?: () => number;
3398
+ getPageCount?: () => number;
3399
+ getCanNextPage?: () => boolean;
3400
+ getCanPreviousPage?: () => boolean;
3401
+ };
3402
+ type ReportDetailProps = {
3403
+ /** Display name from the loaded report (e.g. `useReport` `name`). Rendered above the chart when non-empty. */
3404
+ reportTitle?: string;
3405
+ chart?: any;
3406
+ chartLoading: boolean;
3407
+ table?: ReportDetailTable;
3408
+ tableLoading: boolean;
3409
+ showLegend?: boolean;
3410
+ /** Strip QuillTable's outer frame when chart type is `table` (cell borders unchanged). */
3411
+ hideTableChartOuterBorder?: boolean;
3412
+ };
3413
+ declare function ReportDetail({ reportTitle, chart, chartLoading, table, tableLoading, showLegend, hideTableChartOuterBorder, }: ReportDetailProps): react_jsx_runtime.JSX.Element;
2695
3414
 
2696
3415
  declare const quillFormat: ({ value, format, }: {
2697
3416
  value: any;
2698
3417
  format: string;
2699
3418
  }) => string;
2700
3419
 
3420
+ /** Refetch dashboard config and filters; optional report upsert/delete and filter overrides. */
3421
+ type UseDashboardReload = (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
3422
+ report: QuillReport | {
3423
+ id: string;
3424
+ };
3425
+ action: 'upsert' | 'delete';
3426
+ }, overrideFilters?: {
3427
+ filters: InternalDashboardFilter[];
3428
+ editedFilterLabel?: string;
3429
+ refetchReports?: boolean;
3430
+ }, options?: {
3431
+ preserveExistingDateFilter?: boolean;
3432
+ }) => Promise<void>;
2701
3433
  declare const useDashboardInternal: (dashboardName: string | null, customFilters?: InternalFilter[]) => {
2702
3434
  data: DashboardConfig | null;
2703
3435
  dashboardFilters: InternalDashboardFilter[] | null;
2704
3436
  isLoading: boolean | undefined;
2705
3437
  isDashboardFilterLoading: (filterName: string) => boolean | undefined;
2706
- reload: (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
2707
- report: QuillReport | {
2708
- id: string;
2709
- };
2710
- action: "upsert" | "delete";
2711
- }, overrideFilters?: {
2712
- filters: InternalDashboardFilter[];
2713
- editedFilterLabel?: string;
2714
- refetchReports?: boolean;
2715
- }, options?: {
2716
- preserveExistingDateFilter?: boolean;
2717
- }) => Promise<void>;
3438
+ reload: UseDashboardReload;
2718
3439
  setSectionOrder: (sectionOrder: {
2719
3440
  section: string;
2720
3441
  _id?: string;
@@ -2770,6 +3491,12 @@ declare const useDashboards: () => {
2770
3491
  }) => Promise<void>;
2771
3492
  deleteDashboard: (name: string) => Promise<void>;
2772
3493
  };
3494
+ /**
3495
+ * `reload` is the same reference as `useDashboardInternal(dashboardName).reload`.
3496
+ * Use after structural changes or report upsert/delete; use `applyFilters` for
3497
+ * filter-value updates; use `forceCacheRefresh` to bypass cached report payloads
3498
+ * when cache is on. Calling `reload` every render adds network load.
3499
+ */
2773
3500
  declare const useDashboard: (dashboardName: string, config?: {
2774
3501
  pageSize?: number;
2775
3502
  cacheEnabled?: boolean;
@@ -2794,6 +3521,7 @@ declare const useDashboard: (dashboardName: string, config?: {
2794
3521
  } | Filter>) => void;
2795
3522
  lastUpdated: number;
2796
3523
  forceCacheRefresh: () => void;
3524
+ reload: UseDashboardReload;
2797
3525
  };
2798
3526
  declare const useDashboardReport: (reportId: string, config?: {
2799
3527
  initialFilters?: Filter[];
@@ -2806,29 +3534,6 @@ declare const useDashboardReport: (reportId: string, config?: {
2806
3534
  fetchNextPage: () => Promise<void>;
2807
3535
  };
2808
3536
 
2809
- /**
2810
- * Represents a table object returned from /schema2/:id
2811
- */
2812
- type Table = {
2813
- _id: string;
2814
- isSelectStar: boolean;
2815
- displayName: string;
2816
- name: string;
2817
- description?: string;
2818
- columns: ColumnInternal[];
2819
- viewQuery: string;
2820
- customFieldInfo: any;
2821
- broken?: boolean;
2822
- error?: string;
2823
- ownerTenantFields?: string[];
2824
- };
2825
- interface UniqueValuesByTable {
2826
- [table: string]: UniqueValuesByColumn;
2827
- }
2828
- interface UniqueValuesByColumn {
2829
- [column: string]: string[];
2830
- }
2831
-
2832
3537
  type ForeignKeyMap = {
2833
3538
  [table: string]: {
2834
3539
  foreignTable: string;
@@ -2920,7 +3625,7 @@ type ReportBuilder = {
2920
3625
  sortField: string;
2921
3626
  sortDirection: 'ASC' | 'DESC';
2922
3627
  } | undefined, fieldKey: 'rowField' | 'columnField' | 'aggregations' | 'rowLimit' | 'sort') => Promise<void>;
2923
- filteredSchema: Table[];
3628
+ filteredSchema: Table$1[];
2924
3629
  foreignKeyMap: ForeignKeyMap;
2925
3630
  schemaData: any;
2926
3631
  client: any;
@@ -3109,27 +3814,27 @@ type CustomField = {
3109
3814
  };
3110
3815
 
3111
3816
  declare const useVirtualTables: () => {
3112
- data: Table[];
3817
+ data: Table$1[];
3113
3818
  isLoading: boolean;
3114
3819
  loadingTables: {
3115
3820
  [key: string]: boolean;
3116
3821
  };
3117
3822
  reloadAll: (client: any, caller?: string) => Promise<{
3118
- schema: Table[];
3823
+ schema: Table$1[];
3119
3824
  customFields: {
3120
3825
  [tableName: string]: CustomField[];
3121
3826
  } | null;
3122
3827
  isSchemaLoading: boolean;
3123
3828
  }>;
3124
3829
  reloadSome: (client: any, tableIds: string[], caller?: string) => Promise<{
3125
- schema: Table[];
3830
+ schema: Table$1[];
3126
3831
  customFields: {
3127
3832
  [tableName: string]: CustomField[];
3128
3833
  } | null;
3129
3834
  isSchemaLoading: boolean;
3130
3835
  }>;
3131
- refreshSome: (client: any, tables: Table[]) => Promise<{
3132
- schema: Table[];
3836
+ refreshSome: (client: any, tables: Table$1[]) => Promise<{
3837
+ schema: Table$1[];
3133
3838
  customFields: {
3134
3839
  [tableName: string]: CustomField[];
3135
3840
  } | null;
@@ -3143,8 +3848,8 @@ type ClientFeatures = {
3143
3848
  };
3144
3849
  type QuillProviderClient = {
3145
3850
  name: string;
3146
- id?: string;
3147
- clientId?: string;
3851
+ clientId: string;
3852
+ publicKey: string;
3148
3853
  queryEndpoint: string;
3149
3854
  streamEndpoint?: string;
3150
3855
  queryHeaders?: HeadersInit;
@@ -3185,7 +3890,7 @@ type QuillTenant = {
3185
3890
  };
3186
3891
 
3187
3892
  interface QuillFetchOptions {
3188
- client: Pick<QuillProviderClient, 'id' | 'clientId' | 'queryEndpoint' | 'queryHeaders' | 'withCredentials'>;
3893
+ client: Pick<QuillProviderClient, 'clientId' | 'queryEndpoint' | 'queryHeaders' | 'withCredentials'>;
3189
3894
  task: string;
3190
3895
  method?: string;
3191
3896
  metadata: any;
@@ -3263,42 +3968,6 @@ interface LimitPopoverComponentProps {
3263
3968
  disabled?: boolean;
3264
3969
  }
3265
3970
 
3266
- interface TableComponentProps {
3267
- rows: object[];
3268
- rowCount?: number;
3269
- rowCountIsLoading?: boolean;
3270
- columns: {
3271
- label: string;
3272
- field: string;
3273
- }[];
3274
- currentPage: number;
3275
- sort?: {
3276
- field: string;
3277
- direction: string;
3278
- };
3279
- className?: string;
3280
- containerStyle?: React$1.CSSProperties;
3281
- isLoading?: boolean;
3282
- hideCSVDownloadButton?: boolean;
3283
- downloadCSV?: () => void;
3284
- LoadingComponent?: () => React$1.JSX.Element;
3285
- DownloadCSVButtonComponent?: (props: ButtonComponentProps) => React$1.JSX.Element;
3286
- rowsPerPage?: number;
3287
- emptyStateLabel?: string;
3288
- onPageChange?: (page: number) => void;
3289
- onSortChange?: (sort: {
3290
- field: string;
3291
- direction: string;
3292
- }) => void;
3293
- headerBackgroundColor?: string;
3294
- footerBackgroundColor?: string;
3295
- borderRadius?: string | number;
3296
- borderLeft?: string;
3297
- borderRight?: string;
3298
- borderTop?: string;
3299
- borderBottom?: string;
3300
- }
3301
-
3302
3971
  interface DateRangePickerComponentProps {
3303
3972
  preset: string;
3304
3973
  label?: string;
@@ -3771,4 +4440,4 @@ interface ReportTableProps {
3771
4440
  }
3772
4441
  declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
3773
4442
 
3774
- export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, type ChangelogEntry, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillFetchOptions, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillResults, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table$1 as Table, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, downloadCSV, quillFormat as format, quillFetch, useAllReports, useAskQuill, useChangelogRefresh, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useForm, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
4443
+ export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat$1 as AxisFormat, type ButtonComponentProps, Calculation, type ChangelogEntry, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatModelId, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ColumnSelectionOption, type ContainerComponentProps, DEFAULT_PAGE_SIZE, DEFAULT_USE_REPORT_ROWS_PER_REQUEST, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterDraftQueryBuilderProps, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type OnChangeFn, type Option, type PaginationState, type Pivot, type PivotAggregation, type PopoverComponentProps, type QueryBuilderDisplayGroup, type QueryBuilderDisplayRule, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillFetchOptions, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillResults, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportDetail, type ReportDetailProps, type ReportDetailTable, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SetReportBuilderInput, type SetReportChartAxesInput, type SetReportTableColumnSidebarPatch, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table, type TableColumnListItem, type TableColumnsController, type TableColumnsControllerItem, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, type Updater, type UseDashboardReload, type UseFormAxisConfig, type UseFormQueryBuilderField, type UseFormQueryBuilderProps, type UseReportFilterDraft, areQueryBuilderFilterDraftsDirty, buildSeededFilterQuery, countFilterRules, defaultFilterRuleValueForOperator, downloadCSV, quillFormat as format, isQueryBuilderDisplayGroup, isQueryBuilderDisplayRule, normalizeRelativeDateRules, prepareQueryBuilderFiltersForSet, quillFetch, stripQueryBuilderTransientFields, tableColumnFormatFromUiSelection, useAllReports, useAskQuill, useChangelogRefresh, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReport, useReportBuilder, useReports, useTenants, useVirtualTables };