@quillsql/react 2.16.34 → 2.16.36
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.cjs +2528 -11445
- package/dist/index.d.cts +130 -633
- package/dist/index.d.ts +130 -633
- package/dist/index.js +2288 -11215
- package/package.json +1 -2
package/dist/index.d.cts
CHANGED
|
@@ -73,8 +73,6 @@ 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';
|
|
78
76
|
}
|
|
79
77
|
interface MultiSelectComponentProps {
|
|
80
78
|
label?: string;
|
|
@@ -518,12 +516,12 @@ type ColorMapType = {
|
|
|
518
516
|
/**
|
|
519
517
|
* A set of valid format values for the x and y axes of dashboard items.
|
|
520
518
|
*/
|
|
521
|
-
type AxisFormat
|
|
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';
|
|
522
520
|
|
|
523
521
|
interface Column$1 {
|
|
524
522
|
field: string;
|
|
525
523
|
label: string;
|
|
526
|
-
format: AxisFormat
|
|
524
|
+
format: AxisFormat;
|
|
527
525
|
inferFormat?: boolean;
|
|
528
526
|
}
|
|
529
527
|
interface ColumnInternal extends Column$1 {
|
|
@@ -548,10 +546,6 @@ interface BasePivot {
|
|
|
548
546
|
rowFieldType?: string;
|
|
549
547
|
columnField?: string;
|
|
550
548
|
columnFieldType?: string;
|
|
551
|
-
/** Source table for rowField (multi-table / disambiguation). */
|
|
552
|
-
rowFieldTable?: string;
|
|
553
|
-
/** Source table for columnField (multi-table / disambiguation). */
|
|
554
|
-
columnFieldTable?: string;
|
|
555
549
|
sort?: boolean;
|
|
556
550
|
sortDirection?: 'ASC' | 'DESC';
|
|
557
551
|
sortField?: string;
|
|
@@ -561,14 +555,6 @@ interface BasePivot {
|
|
|
561
555
|
rowLimit?: number;
|
|
562
556
|
columnValues?: string[];
|
|
563
557
|
}
|
|
564
|
-
type PivotAggregation = {
|
|
565
|
-
aggregationType: AggregationType;
|
|
566
|
-
valueField?: string;
|
|
567
|
-
valueFieldType?: string;
|
|
568
|
-
valueField2?: string;
|
|
569
|
-
valueField2Type?: string;
|
|
570
|
-
valueFieldTable?: string;
|
|
571
|
-
};
|
|
572
558
|
interface SingleAggregationPivot extends BasePivot {
|
|
573
559
|
aggregationType: AggregationType;
|
|
574
560
|
valueField?: string;
|
|
@@ -583,7 +569,13 @@ interface MultiAggregationPivot extends BasePivot {
|
|
|
583
569
|
valueField2?: never;
|
|
584
570
|
valueField2Type?: never;
|
|
585
571
|
valueFieldType?: never;
|
|
586
|
-
aggregations:
|
|
572
|
+
aggregations: {
|
|
573
|
+
valueField?: string;
|
|
574
|
+
valueFieldType?: string;
|
|
575
|
+
valueField2?: string;
|
|
576
|
+
valueField2Type?: string;
|
|
577
|
+
aggregationType: AggregationType;
|
|
578
|
+
}[];
|
|
587
579
|
}
|
|
588
580
|
type AggregationType = 'sum' | 'average' | 'min' | 'max' | 'count' | 'avg' | 'percentage';
|
|
589
581
|
type PivotData = {
|
|
@@ -637,28 +629,6 @@ type ReportBuilderState = {
|
|
|
637
629
|
limit: ReportBuilderLimit | null;
|
|
638
630
|
};
|
|
639
631
|
|
|
640
|
-
/**
|
|
641
|
-
* Represents a table object returned from /schema2/:id
|
|
642
|
-
*/
|
|
643
|
-
type Table$1 = {
|
|
644
|
-
_id: string;
|
|
645
|
-
isSelectStar: boolean;
|
|
646
|
-
displayName: string;
|
|
647
|
-
name: string;
|
|
648
|
-
columns: ColumnInternal[];
|
|
649
|
-
viewQuery: string;
|
|
650
|
-
customFieldInfo: any;
|
|
651
|
-
broken?: boolean;
|
|
652
|
-
error?: string;
|
|
653
|
-
ownerTenantFields?: string[];
|
|
654
|
-
};
|
|
655
|
-
interface UniqueValuesByTable {
|
|
656
|
-
[table: string]: UniqueValuesByColumn;
|
|
657
|
-
}
|
|
658
|
-
interface UniqueValuesByColumn {
|
|
659
|
-
[column: string]: string[];
|
|
660
|
-
}
|
|
661
|
-
|
|
662
632
|
/**
|
|
663
633
|
* ## QuillReport
|
|
664
634
|
* Represents an individual item on a dashboard.
|
|
@@ -699,7 +669,7 @@ interface QuillReport {
|
|
|
699
669
|
/** The field to use for this report's xAxis. */
|
|
700
670
|
xAxisField: string;
|
|
701
671
|
/** The format for this report's xAxis. */
|
|
702
|
-
xAxisFormat: AxisFormat
|
|
672
|
+
xAxisFormat: AxisFormat;
|
|
703
673
|
/** The template flag for a report */
|
|
704
674
|
template?: boolean;
|
|
705
675
|
/**
|
|
@@ -711,7 +681,7 @@ interface QuillReport {
|
|
|
711
681
|
/** The label to use for this yAxis. */
|
|
712
682
|
label: string;
|
|
713
683
|
/** The format of the data in this yAxis. */
|
|
714
|
-
format: AxisFormat
|
|
684
|
+
format: AxisFormat;
|
|
715
685
|
}[];
|
|
716
686
|
/**
|
|
717
687
|
* The relative ordering of this report in relation to its siblings. Ordering
|
|
@@ -805,14 +775,6 @@ interface QuillReportInternal extends QuillReport {
|
|
|
805
775
|
* When present, backend will generate SQL from this state instead of using queryString.
|
|
806
776
|
*/
|
|
807
777
|
reportBuilderState?: ReportBuilderState;
|
|
808
|
-
/** String unique values grouped by table/column, used by filter builders. */
|
|
809
|
-
uniqueStringsByTable?: UniqueValuesByTable;
|
|
810
|
-
/** String unique values keyed by column name, used by filter builders. */
|
|
811
|
-
uniqueStringsByColumn?: UniqueValuesByColumn;
|
|
812
|
-
/** Legacy alias for unique string values keyed by column name. */
|
|
813
|
-
columnUniqueValues?: UniqueValuesByColumn;
|
|
814
|
-
/** Backward-compatible alias for unique string values keyed by column name. */
|
|
815
|
-
uniqueValues?: UniqueValuesByColumn;
|
|
816
778
|
}
|
|
817
779
|
|
|
818
780
|
/**
|
|
@@ -1341,43 +1303,6 @@ type QuillProviderProps = QuillCloudProviderProps | SelfHostedProviderProps;
|
|
|
1341
1303
|
*/
|
|
1342
1304
|
declare const QuillProvider: ({ tenants, flags, publicKey, queryEndpoint, streamEndpoint, queryHeaders, children, theme, withCredentials, isAdmin, getAuthorizationToken, eventTracking, }: QuillProviderProps) => react_jsx_runtime.JSX.Element;
|
|
1343
1305
|
|
|
1344
|
-
interface TableComponentProps {
|
|
1345
|
-
rows: object[];
|
|
1346
|
-
rowCount?: number;
|
|
1347
|
-
rowCountIsLoading?: boolean;
|
|
1348
|
-
columns: {
|
|
1349
|
-
label: string;
|
|
1350
|
-
field: string;
|
|
1351
|
-
format?: string;
|
|
1352
|
-
}[];
|
|
1353
|
-
currentPage: number;
|
|
1354
|
-
sort?: {
|
|
1355
|
-
field: string;
|
|
1356
|
-
direction: string;
|
|
1357
|
-
};
|
|
1358
|
-
className?: string;
|
|
1359
|
-
containerStyle?: React$1.CSSProperties;
|
|
1360
|
-
isLoading?: boolean;
|
|
1361
|
-
hideCSVDownloadButton?: boolean;
|
|
1362
|
-
downloadCSV?: () => void;
|
|
1363
|
-
LoadingComponent?: () => React$1.JSX.Element;
|
|
1364
|
-
DownloadCSVButtonComponent?: (props: ButtonComponentProps) => React$1.JSX.Element;
|
|
1365
|
-
rowsPerPage?: number;
|
|
1366
|
-
emptyStateLabel?: string;
|
|
1367
|
-
onPageChange?: (page: number) => void;
|
|
1368
|
-
onSortChange?: (sort: {
|
|
1369
|
-
field: string;
|
|
1370
|
-
direction: string;
|
|
1371
|
-
}) => void;
|
|
1372
|
-
headerBackgroundColor?: string;
|
|
1373
|
-
footerBackgroundColor?: string;
|
|
1374
|
-
borderRadius?: string | number;
|
|
1375
|
-
borderLeft?: string;
|
|
1376
|
-
borderRight?: string;
|
|
1377
|
-
borderTop?: string;
|
|
1378
|
-
borderBottom?: string;
|
|
1379
|
-
}
|
|
1380
|
-
|
|
1381
1306
|
interface BaseChartProps {
|
|
1382
1307
|
colors?: string[];
|
|
1383
1308
|
containerStyle?: React.CSSProperties;
|
|
@@ -1575,7 +1500,7 @@ interface ChartProps {
|
|
|
1575
1500
|
declare function Chart({ colors, reportId, className, containerStyle, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, hideDateRangeFilter, hideFilters, mapColorsToFields, LoadingComponent, SelectComponent, MultiSelectComponent, DateRangePickerComponent, FilterContainerComponent, TableComponent, MetricComponent, filters, onClickChartElement, dateBucket, propagateChanges, isAdmin, }: ChartProps): react_jsx_runtime.JSX.Element;
|
|
1576
1501
|
interface ChartDisplayProps extends WithConfig {
|
|
1577
1502
|
loading: boolean;
|
|
1578
|
-
ErrorComponent?: ({ errorMessage
|
|
1503
|
+
ErrorComponent?: ({ errorMessage }: {
|
|
1579
1504
|
errorMessage: string;
|
|
1580
1505
|
}) => React.JSX.Element;
|
|
1581
1506
|
colorMap?: ColorMapType;
|
|
@@ -1595,10 +1520,8 @@ interface ChartDisplayProps extends WithConfig {
|
|
|
1595
1520
|
showLegend?: boolean;
|
|
1596
1521
|
tableRowsLoading?: boolean;
|
|
1597
1522
|
disableTableSort?: boolean;
|
|
1598
|
-
/** When `chartType` is `table`, applied to QuillTable's outer frame only (not cell lines). */
|
|
1599
|
-
tableChartWrapperBorders?: Pick<TableComponentProps, 'borderRadius' | 'borderLeft' | 'borderRight' | 'borderTop' | 'borderBottom'>;
|
|
1600
1523
|
}
|
|
1601
|
-
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,
|
|
1524
|
+
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, }: ChartDisplayProps) => react_jsx_runtime.JSX.Element;
|
|
1602
1525
|
|
|
1603
1526
|
/**
|
|
1604
1527
|
* Props for the Quill Table component.
|
|
@@ -1666,7 +1589,6 @@ interface TableProps {
|
|
|
1666
1589
|
columns?: {
|
|
1667
1590
|
label: string;
|
|
1668
1591
|
field: string;
|
|
1669
|
-
format?: string;
|
|
1670
1592
|
}[];
|
|
1671
1593
|
/**
|
|
1672
1594
|
* The placeholder filename to use when downloading this table as a csv file.
|
|
@@ -1742,12 +1664,6 @@ interface TableProps {
|
|
|
1742
1664
|
* Styles the top-level container of the Table.
|
|
1743
1665
|
*/
|
|
1744
1666
|
containerStyle?: React$1.CSSProperties;
|
|
1745
|
-
/** Passed through to QuillTable when rendering with `rows` / `columns`. */
|
|
1746
|
-
borderRadius?: string | number;
|
|
1747
|
-
borderLeft?: string;
|
|
1748
|
-
borderRight?: string;
|
|
1749
|
-
borderTop?: string;
|
|
1750
|
-
borderBottom?: string;
|
|
1751
1667
|
/** An array of dashboard filters that are indicated by the frontend dev. */
|
|
1752
1668
|
filters?: Filter[];
|
|
1753
1669
|
}
|
|
@@ -1782,7 +1698,7 @@ interface TableProps {
|
|
|
1782
1698
|
* ### Table API
|
|
1783
1699
|
* @see https://docs.quillsql.com/components/table
|
|
1784
1700
|
*/
|
|
1785
|
-
declare const Table: ({ TableComponent, ...props }: TableProps) => react_jsx_runtime.JSX.Element | null;
|
|
1701
|
+
declare const Table$1: ({ TableComponent, ...props }: TableProps) => react_jsx_runtime.JSX.Element | null;
|
|
1786
1702
|
|
|
1787
1703
|
/**
|
|
1788
1704
|
* Props for the Quill SQLEditor component.
|
|
@@ -2266,7 +2182,7 @@ interface ReportBuilderProps {
|
|
|
2266
2182
|
label: string;
|
|
2267
2183
|
isSelected: boolean;
|
|
2268
2184
|
setSelected: () => void;
|
|
2269
|
-
DragHandle: ({ dragIcon }: {
|
|
2185
|
+
DragHandle: ({ dragIcon, }: {
|
|
2270
2186
|
dragIcon: () => React.JSX.Element;
|
|
2271
2187
|
}) => React.JSX.Element;
|
|
2272
2188
|
}) => React.JSX.Element;
|
|
@@ -2274,7 +2190,7 @@ interface ReportBuilderProps {
|
|
|
2274
2190
|
DraggableColumnComponent?: (props: {
|
|
2275
2191
|
label: string;
|
|
2276
2192
|
onDelete: () => void;
|
|
2277
|
-
DragHandle: ({ dragIcon }: {
|
|
2193
|
+
DragHandle: ({ dragIcon, }: {
|
|
2278
2194
|
dragIcon: () => React.JSX.Element;
|
|
2279
2195
|
}) => React.JSX.Element;
|
|
2280
2196
|
deleteDisabled?: boolean;
|
|
@@ -2680,267 +2596,29 @@ interface ChatProps {
|
|
|
2680
2596
|
ChartViewComponent?: (props: {
|
|
2681
2597
|
reportId: string;
|
|
2682
2598
|
}) => JSX.Element;
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
/**
|
|
2686
|
-
* Current report builder state (e.g. return value `reportBuilderState` from `useReport`). Sent as `state` in agent-light
|
|
2687
|
-
* metadata on each message. Omit or pass null when not in the report builder.
|
|
2688
|
-
*/
|
|
2689
|
-
reportBuilderState?: ReportBuilderState | null;
|
|
2599
|
+
agentEndpoint?: string;
|
|
2600
|
+
suggestions?: string[];
|
|
2690
2601
|
}
|
|
2691
|
-
|
|
2692
|
-
declare function Chat({ selectedDashboard, ChartViewComponent, onReportId, reportBuilderState, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
2693
|
-
|
|
2694
|
-
type QueryBuilderCombinator = 'and' | 'or';
|
|
2695
|
-
type QueryBuilderRule = {
|
|
2696
|
-
field: string;
|
|
2697
|
-
operator: string;
|
|
2698
|
-
value: unknown;
|
|
2699
|
-
};
|
|
2700
|
-
type QueryBuilderRuleGroupEntry = QueryBuilderRule | QueryBuilderRuleGroup | QueryBuilderCombinator;
|
|
2701
|
-
type QueryBuilderRuleGroup = {
|
|
2702
|
-
combinator?: QueryBuilderCombinator;
|
|
2703
|
-
rules: QueryBuilderRuleGroupEntry[];
|
|
2704
|
-
};
|
|
2705
|
-
type QueryBuilderFieldType = 'string' | 'number' | 'date' | 'boolean' | 'null';
|
|
2706
|
-
type QueryBuilderOperatorOption = {
|
|
2707
|
-
name: string;
|
|
2708
|
-
value: string;
|
|
2709
|
-
label: string;
|
|
2710
|
-
arity?: 'unary' | 'binary' | number;
|
|
2711
|
-
};
|
|
2602
|
+
declare function Chat({ selectedDashboard, ChartViewComponent, agentEndpoint, suggestions, }: ChatProps): react_jsx_runtime.JSX.Element;
|
|
2712
2603
|
|
|
2713
2604
|
type SelectOption = {
|
|
2714
2605
|
label: string;
|
|
2715
2606
|
value: string;
|
|
2716
2607
|
};
|
|
2717
|
-
type UseFormTableRow = Record<string, unknown>;
|
|
2718
|
-
type UseFormTableColumn = {
|
|
2719
|
-
label: string;
|
|
2720
|
-
field: string;
|
|
2721
|
-
format: string;
|
|
2722
|
-
};
|
|
2723
|
-
type UseFormTable = {
|
|
2724
|
-
rows: UseFormTableRow[];
|
|
2725
|
-
columns: UseFormTableColumn[];
|
|
2726
|
-
getColumnFormat: (field: string) => string;
|
|
2727
|
-
formatCellValue: (field: string, value: unknown) => string;
|
|
2728
|
-
getFormattedCellValue: (row: UseFormTableRow, field: string) => string;
|
|
2729
|
-
};
|
|
2730
|
-
type ColumnSelectionOption = {
|
|
2731
|
-
value: string;
|
|
2732
|
-
label: string;
|
|
2733
|
-
field: string;
|
|
2734
|
-
tableName: string;
|
|
2735
|
-
type: string;
|
|
2736
|
-
};
|
|
2737
|
-
type UseFormDisplayColumn = ReportBuilderColumn & {
|
|
2738
|
-
format?: string;
|
|
2739
|
-
};
|
|
2740
|
-
type SetReportBuilderColumnInput = Partial<UseFormDisplayColumn> & {
|
|
2741
|
-
field: string;
|
|
2742
|
-
label?: string;
|
|
2743
|
-
};
|
|
2744
|
-
type TableColumnsControllerItem = {
|
|
2745
|
-
id: string;
|
|
2746
|
-
label: string;
|
|
2747
|
-
defaultLabel: string;
|
|
2748
|
-
customLabel: string;
|
|
2749
|
-
/** Persisted axis format value (e.g. `whole_number`). */
|
|
2750
|
-
format: string;
|
|
2751
|
-
/** Format preset label (same strings as chart axis / `tableFormatOptions`). */
|
|
2752
|
-
formatLabel: string;
|
|
2753
|
-
field: string;
|
|
2754
|
-
tableName: string;
|
|
2755
|
-
};
|
|
2756
|
-
type TableColumnListItem = {
|
|
2757
|
-
id: string;
|
|
2758
|
-
label: string;
|
|
2759
|
-
visible: true;
|
|
2760
|
-
/** Axis format preset label (matches `tableFormatOptions` / chart axis). */
|
|
2761
|
-
format: string;
|
|
2762
|
-
/**
|
|
2763
|
-
* When set, overrides the shared `formatOptions` for this row (e.g. pivot date bucket).
|
|
2764
|
-
*/
|
|
2765
|
-
formatOptions?: string[];
|
|
2766
|
-
};
|
|
2767
|
-
/** Selected columns + mutation methods. Pair with `columnOptions` from `useReport` (like `datasources` / `datasourceOptions`). */
|
|
2768
|
-
type TableColumnsController = {
|
|
2769
|
-
items: TableColumnsControllerItem[];
|
|
2770
|
-
/** Schema option per column id (`value` === id) — includes `field`, `tableName`, etc. */
|
|
2771
|
-
optionById: ReadonlyMap<string, ColumnSelectionOption>;
|
|
2772
|
-
byId: ReadonlyMap<string, TableColumnsControllerItem>;
|
|
2773
|
-
/** Ready-made rows for table/column-picker UIs (`id`, `label`, `format` display string). */
|
|
2774
|
-
columnList: TableColumnListItem[];
|
|
2775
|
-
/** Build the `columns` array for `setReport({ columns })` from ordered ids. */
|
|
2776
|
-
getSetReportColumns: (ids: string[]) => SetReportBuilderColumnInput[];
|
|
2777
|
-
reorder: (oldIndex: number, newIndex: number) => void;
|
|
2778
|
-
/** Reorder to match a full id list (e.g. after drag-and-drop column list UIs). */
|
|
2779
|
-
reorderFromOrder: (nextIds: string[]) => void;
|
|
2780
|
-
remove: (id: string) => void;
|
|
2781
|
-
toggle: (id: string) => void;
|
|
2782
|
-
update: (id: string, updates: Partial<{
|
|
2783
|
-
fieldId: string;
|
|
2784
|
-
label: string;
|
|
2785
|
-
format: string;
|
|
2786
|
-
}>) => void;
|
|
2787
|
-
/**
|
|
2788
|
-
* Build `setReport({ columns: { patch } })` for a table column sidebar edit;
|
|
2789
|
-
* `setReport` expands it to a full `columns` list and/or `chartAxes`. Returns
|
|
2790
|
-
* null only when `id` is empty.
|
|
2791
|
-
*/
|
|
2792
|
-
getColumnSidebarSetReportInput: (id: string, updates: Partial<{
|
|
2793
|
-
fieldId: string;
|
|
2794
|
-
label: string;
|
|
2795
|
-
format: string;
|
|
2796
|
-
}>) => SetReportBuilderInput | null;
|
|
2797
|
-
/**
|
|
2798
|
-
* When true (pivot + chartType table), the list mirrors `chart.columns`; reorder,
|
|
2799
|
-
* add, remove, and field swap are disabled — only label/format apply via chart axes.
|
|
2800
|
-
*/
|
|
2801
|
-
structureEditsLocked: boolean;
|
|
2802
|
-
};
|
|
2803
|
-
type ChartAxisFieldOption = {
|
|
2804
|
-
value: string;
|
|
2805
|
-
label: string;
|
|
2806
|
-
format: AxisFormat;
|
|
2807
|
-
};
|
|
2808
|
-
type ChartYAxisControllerItem = {
|
|
2809
|
-
id: string;
|
|
2810
|
-
field: string;
|
|
2811
|
-
label: string;
|
|
2812
|
-
format: AxisFormat;
|
|
2813
|
-
};
|
|
2814
|
-
type ChartAxesController = {
|
|
2815
|
-
xAxis: {
|
|
2816
|
-
field: string;
|
|
2817
|
-
format: AxisFormat;
|
|
2818
|
-
options: ChartAxisFieldOption[];
|
|
2819
|
-
formatOptions: SelectOption[];
|
|
2820
|
-
update: (updates: Partial<{
|
|
2821
|
-
field: string;
|
|
2822
|
-
format: AxisFormat;
|
|
2823
|
-
}>) => void;
|
|
2824
|
-
};
|
|
2825
|
-
yAxis: {
|
|
2826
|
-
items: ChartYAxisControllerItem[];
|
|
2827
|
-
options: ChartAxisFieldOption[];
|
|
2828
|
-
formatOptions: SelectOption[];
|
|
2829
|
-
add: (field?: string) => void;
|
|
2830
|
-
remove: (id: string) => void;
|
|
2831
|
-
reorder: (oldIndex: number, newIndex: number) => void;
|
|
2832
|
-
update: (id: string, updates: Partial<{
|
|
2833
|
-
field: string;
|
|
2834
|
-
label: string;
|
|
2835
|
-
format: AxisFormat;
|
|
2836
|
-
}>) => void;
|
|
2837
|
-
};
|
|
2838
|
-
};
|
|
2839
2608
|
type ColumnSelectorChangeValue = string[];
|
|
2840
|
-
/**
|
|
2841
|
-
* Table column sidebar edit under {@link SetReportBuilderInput.columns}: expands
|
|
2842
|
-
* inside `setReport` to a full `columns` array and/or `chartAxes` (pivot table chart).
|
|
2843
|
-
*/
|
|
2844
|
-
type SetReportTableColumnSidebarPatch = {
|
|
2845
|
-
patch: {
|
|
2846
|
-
id: string;
|
|
2847
|
-
label?: string;
|
|
2848
|
-
format?: string;
|
|
2849
|
-
fieldId?: string;
|
|
2850
|
-
};
|
|
2851
|
-
};
|
|
2852
2609
|
type AggregationStateItem = Partial<{
|
|
2853
2610
|
valueField: string;
|
|
2854
2611
|
valueField2?: string;
|
|
2855
2612
|
aggregationType: AggregationType;
|
|
2856
|
-
/** Resolved datasource table for `valueField` (mirrors `aggregationTablesByIndex`). */
|
|
2857
|
-
valueFieldTable?: string;
|
|
2858
2613
|
}>;
|
|
2859
2614
|
type AggregationOption = {
|
|
2860
2615
|
key: string;
|
|
2861
2616
|
label: string;
|
|
2862
|
-
value
|
|
2617
|
+
value?: string;
|
|
2863
2618
|
options: SelectOption[];
|
|
2864
2619
|
};
|
|
2865
|
-
type AxisFormat = QuillReportInternal['yAxisFields'][number]['format'];
|
|
2866
|
-
type QueryBuilderFieldValueOption = {
|
|
2867
|
-
name: string;
|
|
2868
|
-
label: string;
|
|
2869
|
-
value: string;
|
|
2870
|
-
};
|
|
2871
|
-
type UseFormQueryBuilderField = {
|
|
2872
|
-
name: string;
|
|
2873
|
-
label: string;
|
|
2874
|
-
inputType: string;
|
|
2875
|
-
quillFieldType: QueryBuilderFieldType;
|
|
2876
|
-
values?: QueryBuilderFieldValueOption[];
|
|
2877
|
-
};
|
|
2878
|
-
type UseFormQueryBuilderProps = {
|
|
2879
|
-
fields: UseFormQueryBuilderField[];
|
|
2880
|
-
listsAsArrays: true;
|
|
2881
|
-
getOperators: (field: string, misc?: {
|
|
2882
|
-
fieldData?: Partial<UseFormQueryBuilderField>;
|
|
2883
|
-
}) => QueryBuilderOperatorOption[];
|
|
2884
|
-
getInputType: (field: string, operator: string, misc?: {
|
|
2885
|
-
fieldData?: Partial<UseFormQueryBuilderField>;
|
|
2886
|
-
}) => 'text' | 'number' | 'date' | 'checkbox';
|
|
2887
|
-
getValueEditorType: (field: string, operator: string, misc?: {
|
|
2888
|
-
fieldData?: Partial<UseFormQueryBuilderField>;
|
|
2889
|
-
}) => 'multiselect' | undefined;
|
|
2890
|
-
getValues: (field: string, operator: string, misc?: {
|
|
2891
|
-
fieldData?: Partial<UseFormQueryBuilderField>;
|
|
2892
|
-
}) => QueryBuilderFieldValueOption[];
|
|
2893
|
-
};
|
|
2894
|
-
/** Maps table column format dropdown values to persisted report column `format` (matches `setReport({ columns })` / `update`). */
|
|
2895
|
-
declare function tableColumnFormatFromUiSelection(raw: string): string;
|
|
2896
|
-
/** Shape expected by chart config sidebars that mirror `AxisConfig` (e.g. Quill Chat ConfigForm). */
|
|
2897
|
-
type UseFormAxisConfig = {
|
|
2898
|
-
xAxis: {
|
|
2899
|
-
field: string;
|
|
2900
|
-
label: string;
|
|
2901
|
-
format: string;
|
|
2902
|
-
show: boolean;
|
|
2903
|
-
rotation: number;
|
|
2904
|
-
fontSize: number;
|
|
2905
|
-
};
|
|
2906
|
-
yAxis: {
|
|
2907
|
-
fields: Array<{
|
|
2908
|
-
field: string;
|
|
2909
|
-
label: string;
|
|
2910
|
-
format: string;
|
|
2911
|
-
color: string;
|
|
2912
|
-
}>;
|
|
2913
|
-
label: string;
|
|
2914
|
-
show: boolean;
|
|
2915
|
-
min: string;
|
|
2916
|
-
max: string;
|
|
2917
|
-
fontSize: number;
|
|
2918
|
-
};
|
|
2919
|
-
legend: {
|
|
2920
|
-
show: boolean;
|
|
2921
|
-
};
|
|
2922
|
-
};
|
|
2923
|
-
type SetReportChartAxesInput = {
|
|
2924
|
-
xAxis?: Partial<{
|
|
2925
|
-
field: string;
|
|
2926
|
-
/** Custom X-axis title; empty string clears the override and restores the report/field default. */
|
|
2927
|
-
label: string;
|
|
2928
|
-
format: AxisFormat | string;
|
|
2929
|
-
}>;
|
|
2930
|
-
yAxis?: {
|
|
2931
|
-
fields: Array<{
|
|
2932
|
-
field: string;
|
|
2933
|
-
label?: string;
|
|
2934
|
-
format?: AxisFormat | string;
|
|
2935
|
-
}>;
|
|
2936
|
-
};
|
|
2937
|
-
};
|
|
2938
2620
|
interface SetReportBuilderInput {
|
|
2939
|
-
|
|
2940
|
-
* Column picker ids, a full column list, or `{ patch: { id, … } }` for sidebar
|
|
2941
|
-
* edits (expanded inside `setReport` into a full list and/or `chartAxes`).
|
|
2942
|
-
*/
|
|
2943
|
-
columns?: ColumnSelectorChangeValue | SetReportBuilderColumnInput[] | SetReportTableColumnSidebarPatch;
|
|
2621
|
+
columns?: ColumnSelectorChangeValue | ReportBuilderColumn[];
|
|
2944
2622
|
filters?: Filter[];
|
|
2945
2623
|
groupRowsBy?: string;
|
|
2946
2624
|
groupColumnsBy?: string;
|
|
@@ -2948,148 +2626,25 @@ interface SetReportBuilderInput {
|
|
|
2948
2626
|
index: number;
|
|
2949
2627
|
value: string;
|
|
2950
2628
|
};
|
|
2951
|
-
sort?: ReportBuilderSort[]
|
|
2629
|
+
sort?: ReportBuilderSort[];
|
|
2952
2630
|
limit?: ReportBuilderLimit | null;
|
|
2953
2631
|
chartType?: string;
|
|
2954
|
-
/** When set, updates chart legend visibility (same source as `showLegend` from `useReport`). */
|
|
2955
|
-
showLegend?: boolean;
|
|
2956
|
-
/** When set, merges into chart axis edits (use with returned `xAxis` / `yAxis` / options). */
|
|
2957
|
-
chartAxes?: SetReportChartAxesInput;
|
|
2958
|
-
/**
|
|
2959
|
-
* Schema table names for datasource / multi-table picker UIs.
|
|
2960
|
-
* Empty array clears the override (report base tables apply again).
|
|
2961
|
-
*/
|
|
2962
|
-
datasources?: string[];
|
|
2963
2632
|
}
|
|
2964
|
-
interface
|
|
2633
|
+
interface UseFormOptions {
|
|
2965
2634
|
useInMemoryEngines?: boolean;
|
|
2966
|
-
reportOverride?: QuillReportInternal | null;
|
|
2967
|
-
initialReportBuilderState?: ReportBuilderState | null;
|
|
2968
|
-
/**
|
|
2969
|
-
* When the report payload has no `dashboardName` and the client has no
|
|
2970
|
-
* `defaultDashboard`, use this for engine tasks that require a dashboard
|
|
2971
|
-
* (e.g. filter unique values).
|
|
2972
|
-
*/
|
|
2973
|
-
destinationDashboardName?: string;
|
|
2974
|
-
/**
|
|
2975
|
-
* When true (default), filter pickers, pivot row/column group-by options,
|
|
2976
|
-
* aggregation field dropdowns, and filter-builder field lists only include
|
|
2977
|
-
* columns from the selected datasource
|
|
2978
|
-
* tables (`setReport({ datasources })` / report base tables)—not other tables that
|
|
2979
|
-
* happen to be FK-joinable but were not selected. When false, behaviour matches
|
|
2980
|
-
* the prior schema-wide option lists when no table scope applies.
|
|
2981
|
-
*/
|
|
2982
|
-
restrictFieldOptionsToSelectedDatasources?: boolean;
|
|
2983
2635
|
}
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
* (e.g. missing client, dashboard name, or report state).
|
|
2988
|
-
*/
|
|
2989
|
-
type UseReportSaveChangesFn = () => Promise<unknown>;
|
|
2990
|
-
/**
|
|
2991
|
-
* @param reportIdArg When omitted, the hook can bootstrap a report via `saveReport`
|
|
2992
|
-
* (`create-report`) on the first `setReport({ datasources })`, after schema is available.
|
|
2993
|
-
* Use `destinationDashboardName` so the server can resolve a dashboard for create-report.
|
|
2994
|
-
*/
|
|
2995
|
-
declare function useReport(reportIdArg?: string, options?: UseReportOptions): {
|
|
2996
|
-
chart: {
|
|
2997
|
-
xAxisField: string;
|
|
2998
|
-
xAxisFormat: AxisFormat$1;
|
|
2999
|
-
xAxisLabel: string;
|
|
3000
|
-
yAxisFields: {
|
|
3001
|
-
field: string;
|
|
3002
|
-
label: string;
|
|
3003
|
-
format: AxisFormat$1;
|
|
3004
|
-
}[];
|
|
3005
|
-
columns: Column$1[];
|
|
3006
|
-
pivotQuery?: string;
|
|
3007
|
-
comparisonPivotQuery?: string;
|
|
3008
|
-
itemQuery?: string[];
|
|
3009
|
-
referencedTables?: string[];
|
|
3010
|
-
referencedColumns?: {
|
|
3011
|
-
[table: string]: string[];
|
|
3012
|
-
};
|
|
3013
|
-
error?: string;
|
|
3014
|
-
adminError?: string;
|
|
3015
|
-
triggerReload?: boolean;
|
|
3016
|
-
columnInternal: ColumnInternal[];
|
|
3017
|
-
loadingRows?: boolean;
|
|
3018
|
-
flags?: {
|
|
3019
|
-
[tenantField: string]: string[] | "QUILL_ALL_TENANTS";
|
|
3020
|
-
};
|
|
3021
|
-
reportBuilderState?: ReportBuilderState;
|
|
3022
|
-
uniqueStringsByTable?: UniqueValuesByTable;
|
|
3023
|
-
uniqueStringsByColumn?: UniqueValuesByColumn;
|
|
3024
|
-
columnUniqueValues?: UniqueValuesByColumn;
|
|
3025
|
-
uniqueValues?: UniqueValuesByColumn;
|
|
2636
|
+
declare function useForm(reportId: string, options?: UseFormOptions): {
|
|
2637
|
+
columns: ColumnSelectorChangeValue;
|
|
2638
|
+
columnsOptions: {
|
|
3026
2639
|
id: string;
|
|
3027
2640
|
name: string;
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
chartType: string;
|
|
3033
|
-
showLegend?: boolean;
|
|
3034
|
-
dateField?: {
|
|
3035
|
-
table: string;
|
|
3036
|
-
field: string;
|
|
3037
|
-
};
|
|
3038
|
-
pivot: Pivot | null;
|
|
3039
|
-
template?: boolean;
|
|
3040
|
-
order: number;
|
|
3041
|
-
compareRows: {
|
|
3042
|
-
[key: string]: string;
|
|
3043
|
-
}[];
|
|
3044
|
-
filtersApplied?: InternalFilter[];
|
|
3045
|
-
pagination?: Pagination;
|
|
3046
|
-
sort?: {
|
|
3047
|
-
field: string;
|
|
3048
|
-
direction: string;
|
|
3049
|
-
};
|
|
3050
|
-
rowCount: number;
|
|
3051
|
-
queryString: string;
|
|
3052
|
-
filterMap?: {
|
|
3053
|
-
[key: string]: {
|
|
3054
|
-
table: string;
|
|
3055
|
-
field: string;
|
|
3056
|
-
};
|
|
3057
|
-
};
|
|
3058
|
-
referenceLines?: {
|
|
3059
|
-
label: string;
|
|
3060
|
-
query: [number, number] | string;
|
|
3061
|
-
}[];
|
|
3062
|
-
referenceLineYValues?: {
|
|
3063
|
-
label: string;
|
|
3064
|
-
query: [number, number];
|
|
3065
|
-
}[];
|
|
3066
|
-
includeCustomFields?: boolean;
|
|
3067
|
-
columnsWithCustomFields?: Column$1[];
|
|
3068
|
-
pivotRows?: {
|
|
3069
|
-
[key: string]: string;
|
|
2641
|
+
columns: {
|
|
2642
|
+
id: string;
|
|
2643
|
+
name: string;
|
|
2644
|
+
type: string;
|
|
3070
2645
|
}[];
|
|
3071
|
-
pivotColumns?: ColumnInternal[];
|
|
3072
|
-
pivotRowCount?: number;
|
|
3073
|
-
} | undefined;
|
|
3074
|
-
chartLoading: boolean;
|
|
3075
|
-
table: UseFormTable;
|
|
3076
|
-
tableLoading: boolean;
|
|
3077
|
-
loading: boolean;
|
|
3078
|
-
/** Report title: matching `sourceReport.name`, else `report-name` task, else empty. */
|
|
3079
|
-
name: string;
|
|
3080
|
-
/**
|
|
3081
|
-
* Resolved report id: the `reportId` argument when provided, otherwise the id
|
|
3082
|
-
* returned from `create-report` after the first datasource selection.
|
|
3083
|
-
*/
|
|
3084
|
-
reportId: string | undefined;
|
|
3085
|
-
datasources: {
|
|
3086
|
-
id: string;
|
|
3087
|
-
label: string;
|
|
3088
|
-
}[];
|
|
3089
|
-
datasourceOptions: {
|
|
3090
|
-
id: string;
|
|
3091
|
-
label: string;
|
|
3092
2646
|
}[];
|
|
2647
|
+
filters: Filter[];
|
|
3093
2648
|
groupRowsBy: string | undefined;
|
|
3094
2649
|
groupRowsByOptions: SelectOption[];
|
|
3095
2650
|
groupColumnsBy: string | undefined;
|
|
@@ -3098,178 +2653,53 @@ declare function useReport(reportIdArg?: string, options?: UseReportOptions): {
|
|
|
3098
2653
|
valueField: string;
|
|
3099
2654
|
valueField2?: string;
|
|
3100
2655
|
aggregationType: AggregationType;
|
|
3101
|
-
/** Resolved datasource table for `valueField` (mirrors `aggregationTablesByIndex`). */
|
|
3102
|
-
valueFieldTable?: string;
|
|
3103
2656
|
}>[];
|
|
3104
|
-
aggregationOptions: AggregationOption[];
|
|
3105
2657
|
aggregationDescriptionOptions: {
|
|
3106
2658
|
label: string;
|
|
3107
2659
|
value: string;
|
|
3108
2660
|
}[];
|
|
3109
|
-
|
|
3110
|
-
|
|
2661
|
+
aggregationOptions: AggregationOption[];
|
|
2662
|
+
sort: {
|
|
3111
2663
|
label: string;
|
|
3112
2664
|
value: string;
|
|
3113
2665
|
}[];
|
|
3114
|
-
|
|
3115
|
-
|
|
2666
|
+
sortOptions: SelectOption[];
|
|
2667
|
+
chartTypes: {
|
|
3116
2668
|
label: string;
|
|
3117
2669
|
value: string;
|
|
3118
2670
|
}[];
|
|
3119
|
-
|
|
3120
|
-
columnIds: ColumnSelectorChangeValue;
|
|
3121
|
-
/** Selected columns + `reorder` / `toggle` / `update` / `remove`. */
|
|
3122
|
-
columns: TableColumnsController;
|
|
3123
|
-
/** Schema columns for current datasources — pool for the table column picker. */
|
|
3124
|
-
columnOptions: ColumnSelectionOption[];
|
|
3125
|
-
xAxis: {
|
|
3126
|
-
field: string;
|
|
3127
|
-
format: AxisFormat;
|
|
3128
|
-
options: ChartAxisFieldOption[];
|
|
3129
|
-
formatOptions: SelectOption[];
|
|
3130
|
-
update: (updates: Partial<{
|
|
3131
|
-
field: string;
|
|
3132
|
-
format: AxisFormat;
|
|
3133
|
-
}>) => void;
|
|
3134
|
-
};
|
|
3135
|
-
xAxisOptions: {
|
|
3136
|
-
value: string;
|
|
2671
|
+
chartTypeOptions: {
|
|
3137
2672
|
label: string;
|
|
3138
|
-
format: string;
|
|
3139
|
-
}[];
|
|
3140
|
-
yAxis: {
|
|
3141
|
-
items: ChartYAxisControllerItem[];
|
|
3142
|
-
options: ChartAxisFieldOption[];
|
|
3143
|
-
formatOptions: SelectOption[];
|
|
3144
|
-
add: (field?: string) => void;
|
|
3145
|
-
remove: (id: string) => void;
|
|
3146
|
-
reorder: (oldIndex: number, newIndex: number) => void;
|
|
3147
|
-
update: (id: string, updates: Partial<{
|
|
3148
|
-
field: string;
|
|
3149
|
-
label: string;
|
|
3150
|
-
format: AxisFormat;
|
|
3151
|
-
}>) => void;
|
|
3152
|
-
};
|
|
3153
|
-
yAxisOptions: {
|
|
3154
2673
|
value: string;
|
|
3155
|
-
label: string;
|
|
3156
|
-
format: string;
|
|
3157
|
-
}[];
|
|
3158
|
-
/** Same strings as `axisSelectFormatLabels` (X/Y share chart format presets). */
|
|
3159
|
-
xAxisFormatOptions: string[];
|
|
3160
|
-
yAxisFormatOptions: string[];
|
|
3161
|
-
/** Table column format dropdown labels (same set as chart axis formats). */
|
|
3162
|
-
tableFormatOptions: string[];
|
|
3163
|
-
showLegend: boolean;
|
|
3164
|
-
axisConfig: UseFormAxisConfig;
|
|
3165
|
-
availableFields: {
|
|
3166
|
-
id: string;
|
|
3167
|
-
label: string;
|
|
3168
|
-
type: string;
|
|
3169
2674
|
}[];
|
|
3170
|
-
|
|
3171
|
-
|
|
3172
|
-
chartAxes: ChartAxesController;
|
|
3173
|
-
/** @deprecated Prefer top-level `xAxisOptions` / `yAxisOptions`. */
|
|
3174
|
-
chartAxisOptions: {
|
|
3175
|
-
xAxis: {
|
|
3176
|
-
value: string;
|
|
3177
|
-
label: string;
|
|
3178
|
-
format: string;
|
|
3179
|
-
}[];
|
|
3180
|
-
yAxis: {
|
|
3181
|
-
value: string;
|
|
3182
|
-
label: string;
|
|
3183
|
-
format: string;
|
|
3184
|
-
}[];
|
|
3185
|
-
};
|
|
3186
|
-
hasTableDrivenColumnOrder: boolean;
|
|
3187
|
-
filters: QueryBuilderRuleGroup;
|
|
3188
|
-
filterQueryBuilderProps: UseFormQueryBuilderProps;
|
|
3189
|
-
/** True while `report-builder-unique-values` runs for filter value options (not chart/table load). */
|
|
3190
|
-
filterUniqueValuesLoading: boolean;
|
|
2675
|
+
chartType: string | undefined;
|
|
2676
|
+
chart: QuillReportInternal | undefined;
|
|
3191
2677
|
limit: ReportBuilderLimit | null;
|
|
3192
|
-
chartTypes: {
|
|
3193
|
-
label: string;
|
|
3194
|
-
value: string;
|
|
3195
|
-
}[];
|
|
3196
|
-
columnsOptions: ColumnSelectionOption[];
|
|
3197
|
-
tableColumnOptions: ColumnSelectionOption[];
|
|
3198
|
-
tableColumns: TableColumnsController;
|
|
3199
2678
|
setReport: (nextState: SetReportBuilderInput) => void;
|
|
3200
|
-
saveChanges: UseReportSaveChangesFn;
|
|
3201
|
-
setFilters: (nextFilters: QueryBuilderRuleGroup) => void;
|
|
3202
|
-
setReportBuilder: (nextState: SetReportBuilderInput) => void;
|
|
3203
|
-
/** Current report-builder slice (tables, columns, filters, pivot, sort); pass to e.g. `Chat` as `reportBuilderState`. */
|
|
3204
|
-
reportBuilderState: ReportBuilderState | undefined;
|
|
3205
|
-
};
|
|
3206
|
-
|
|
3207
|
-
/** Normalize react-querybuilder filter trees before stack conversion / persistence. */
|
|
3208
|
-
type QueryBuilderDisplayRule = {
|
|
3209
|
-
id?: unknown;
|
|
3210
|
-
field?: unknown;
|
|
3211
|
-
operator?: unknown;
|
|
3212
|
-
value?: unknown;
|
|
3213
|
-
};
|
|
3214
|
-
type QueryBuilderDisplayGroup = {
|
|
3215
|
-
combinator?: unknown;
|
|
3216
|
-
rules: unknown[];
|
|
3217
2679
|
};
|
|
3218
|
-
declare const isQueryBuilderDisplayGroup: (value: unknown) => value is QueryBuilderDisplayGroup;
|
|
3219
|
-
declare const isQueryBuilderDisplayRule: (value: unknown) => value is QueryBuilderDisplayRule;
|
|
3220
|
-
declare const stripQueryBuilderTransientFields: (value: unknown, seen?: WeakMap<object, unknown>) => unknown;
|
|
3221
|
-
/** Merge relative-date rule values against a prior tree (typically last committed filters). */
|
|
3222
|
-
declare const normalizeRelativeDateRules: (nextQuery: unknown, previousQuery: unknown) => unknown;
|
|
3223
|
-
/** Strip + relative-date normalization used by `useReport` `setFilters` and draft-vs-committed UI. */
|
|
3224
|
-
declare function prepareQueryBuilderFiltersForSet(next: unknown, previousCommitted: unknown): unknown;
|
|
3225
|
-
/**
|
|
3226
|
-
* Whether a react-querybuilder draft differs from committed filters in a way that matters
|
|
3227
|
-
* for Apply (ignores transient `id` / `path`, etc.).
|
|
3228
|
-
*/
|
|
3229
|
-
declare function areQueryBuilderFilterDraftsDirty(draft: unknown, committed: unknown): boolean;
|
|
3230
|
-
/** Number of leaf filter rules (excludes empty groups). */
|
|
3231
|
-
declare function countFilterRules(value: unknown): number;
|
|
3232
|
-
|
|
3233
|
-
type ReportDetailProps = {
|
|
3234
|
-
/** Display name from the loaded report (e.g. `useReport` `name`). Rendered above the chart when non-empty. */
|
|
3235
|
-
reportTitle?: string;
|
|
3236
|
-
chart?: any;
|
|
3237
|
-
chartLoading: boolean;
|
|
3238
|
-
table?: {
|
|
3239
|
-
columns?: unknown[];
|
|
3240
|
-
rows?: unknown[];
|
|
3241
|
-
};
|
|
3242
|
-
tableLoading: boolean;
|
|
3243
|
-
showLegend?: boolean;
|
|
3244
|
-
/** Strip QuillTable's outer frame when chart type is `table` (cell borders unchanged). */
|
|
3245
|
-
hideTableChartOuterBorder?: boolean;
|
|
3246
|
-
};
|
|
3247
|
-
declare function ReportDetail({ reportTitle, chart, chartLoading, table, tableLoading, showLegend, hideTableChartOuterBorder, }: ReportDetailProps): react_jsx_runtime.JSX.Element;
|
|
3248
2680
|
|
|
3249
2681
|
declare const quillFormat: ({ value, format, }: {
|
|
3250
2682
|
value: any;
|
|
3251
2683
|
format: string;
|
|
3252
2684
|
}) => string;
|
|
3253
2685
|
|
|
3254
|
-
/** Refetch dashboard config and filters; optional report upsert/delete and filter overrides. */
|
|
3255
|
-
type UseDashboardReload = (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
|
|
3256
|
-
report: QuillReport | {
|
|
3257
|
-
id: string;
|
|
3258
|
-
};
|
|
3259
|
-
action: 'upsert' | 'delete';
|
|
3260
|
-
}, overrideFilters?: {
|
|
3261
|
-
filters: InternalDashboardFilter[];
|
|
3262
|
-
editedFilterLabel?: string;
|
|
3263
|
-
refetchReports?: boolean;
|
|
3264
|
-
}, options?: {
|
|
3265
|
-
preserveExistingDateFilter?: boolean;
|
|
3266
|
-
}) => Promise<void>;
|
|
3267
2686
|
declare const useDashboardInternal: (dashboardName: string | null, customFilters?: InternalFilter[]) => {
|
|
3268
2687
|
data: DashboardConfig | null;
|
|
3269
2688
|
dashboardFilters: InternalDashboardFilter[] | null;
|
|
3270
2689
|
isLoading: boolean | undefined;
|
|
3271
2690
|
isDashboardFilterLoading: (filterName: string) => boolean | undefined;
|
|
3272
|
-
reload:
|
|
2691
|
+
reload: (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
|
|
2692
|
+
report: QuillReport | {
|
|
2693
|
+
id: string;
|
|
2694
|
+
};
|
|
2695
|
+
action: "upsert" | "delete";
|
|
2696
|
+
}, overrideFilters?: {
|
|
2697
|
+
filters: InternalDashboardFilter[];
|
|
2698
|
+
editedFilterLabel?: string;
|
|
2699
|
+
refetchReports?: boolean;
|
|
2700
|
+
}, options?: {
|
|
2701
|
+
preserveExistingDateFilter?: boolean;
|
|
2702
|
+
}) => Promise<void>;
|
|
3273
2703
|
setSectionOrder: (sectionOrder: {
|
|
3274
2704
|
section: string;
|
|
3275
2705
|
_id?: string;
|
|
@@ -3323,12 +2753,6 @@ declare const useDashboards: () => {
|
|
|
3323
2753
|
}) => Promise<void>;
|
|
3324
2754
|
deleteDashboard: (name: string) => Promise<void>;
|
|
3325
2755
|
};
|
|
3326
|
-
/**
|
|
3327
|
-
* `reload` is the same reference as `useDashboardInternal(dashboardName).reload`.
|
|
3328
|
-
* Use after structural changes or report upsert/delete; use `applyFilters` for
|
|
3329
|
-
* filter-value updates; use `forceCacheRefresh` to bypass cached report payloads
|
|
3330
|
-
* when cache is on. Calling `reload` every render adds network load.
|
|
3331
|
-
*/
|
|
3332
2756
|
declare const useDashboard: (dashboardName: string, config?: {
|
|
3333
2757
|
pageSize?: number;
|
|
3334
2758
|
cacheEnabled?: boolean;
|
|
@@ -3353,7 +2777,6 @@ declare const useDashboard: (dashboardName: string, config?: {
|
|
|
3353
2777
|
} | Filter>) => void;
|
|
3354
2778
|
lastUpdated: number;
|
|
3355
2779
|
forceCacheRefresh: () => void;
|
|
3356
|
-
reload: UseDashboardReload;
|
|
3357
2780
|
};
|
|
3358
2781
|
declare const useDashboardReport: (reportId: string, config?: {
|
|
3359
2782
|
initialFilters?: Filter[];
|
|
@@ -3366,6 +2789,28 @@ declare const useDashboardReport: (reportId: string, config?: {
|
|
|
3366
2789
|
fetchNextPage: () => Promise<void>;
|
|
3367
2790
|
};
|
|
3368
2791
|
|
|
2792
|
+
/**
|
|
2793
|
+
* Represents a table object returned from /schema2/:id
|
|
2794
|
+
*/
|
|
2795
|
+
type Table = {
|
|
2796
|
+
_id: string;
|
|
2797
|
+
isSelectStar: boolean;
|
|
2798
|
+
displayName: string;
|
|
2799
|
+
name: string;
|
|
2800
|
+
columns: ColumnInternal[];
|
|
2801
|
+
viewQuery: string;
|
|
2802
|
+
customFieldInfo: any;
|
|
2803
|
+
broken?: boolean;
|
|
2804
|
+
error?: string;
|
|
2805
|
+
ownerTenantFields?: string[];
|
|
2806
|
+
};
|
|
2807
|
+
interface UniqueValuesByTable {
|
|
2808
|
+
[table: string]: UniqueValuesByColumn;
|
|
2809
|
+
}
|
|
2810
|
+
interface UniqueValuesByColumn {
|
|
2811
|
+
[column: string]: string[];
|
|
2812
|
+
}
|
|
2813
|
+
|
|
3369
2814
|
type ForeignKeyMap = {
|
|
3370
2815
|
[table: string]: {
|
|
3371
2816
|
foreignTable: string;
|
|
@@ -3455,7 +2900,7 @@ type ReportBuilder = {
|
|
|
3455
2900
|
sortField: string;
|
|
3456
2901
|
sortDirection: 'ASC' | 'DESC';
|
|
3457
2902
|
} | undefined, fieldKey: 'rowField' | 'columnField' | 'aggregations' | 'rowLimit' | 'sort') => Promise<void>;
|
|
3458
|
-
filteredSchema: Table
|
|
2903
|
+
filteredSchema: Table[];
|
|
3459
2904
|
foreignKeyMap: ForeignKeyMap;
|
|
3460
2905
|
schemaData: any;
|
|
3461
2906
|
client: any;
|
|
@@ -3644,20 +3089,27 @@ type CustomField = {
|
|
|
3644
3089
|
};
|
|
3645
3090
|
|
|
3646
3091
|
declare const useVirtualTables: () => {
|
|
3647
|
-
data: Table
|
|
3092
|
+
data: Table[];
|
|
3648
3093
|
isLoading: boolean;
|
|
3649
3094
|
loadingTables: {
|
|
3650
3095
|
[key: string]: boolean;
|
|
3651
3096
|
};
|
|
3652
3097
|
reloadAll: (client: any, caller?: string) => Promise<{
|
|
3653
|
-
schema: Table
|
|
3098
|
+
schema: Table[];
|
|
3654
3099
|
customFields: {
|
|
3655
3100
|
[tableName: string]: CustomField[];
|
|
3656
3101
|
} | null;
|
|
3657
3102
|
isSchemaLoading: boolean;
|
|
3658
3103
|
}>;
|
|
3659
|
-
|
|
3660
|
-
schema: Table
|
|
3104
|
+
reloadSome: (client: any, tableIds: string[], caller?: string) => Promise<{
|
|
3105
|
+
schema: Table[];
|
|
3106
|
+
customFields: {
|
|
3107
|
+
[tableName: string]: CustomField[];
|
|
3108
|
+
} | null;
|
|
3109
|
+
isSchemaLoading: boolean;
|
|
3110
|
+
}>;
|
|
3111
|
+
refreshSome: (client: any, tables: Table[]) => Promise<{
|
|
3112
|
+
schema: Table[];
|
|
3661
3113
|
customFields: {
|
|
3662
3114
|
[tableName: string]: CustomField[];
|
|
3663
3115
|
} | null;
|
|
@@ -3665,6 +3117,15 @@ declare const useVirtualTables: () => {
|
|
|
3665
3117
|
}>;
|
|
3666
3118
|
};
|
|
3667
3119
|
|
|
3120
|
+
type ChangelogEntry = {
|
|
3121
|
+
_id?: string;
|
|
3122
|
+
entityId?: string;
|
|
3123
|
+
entityType?: string;
|
|
3124
|
+
};
|
|
3125
|
+
declare const useChangelogRefresh: () => {
|
|
3126
|
+
refreshChangelogEntries: (entries: ChangelogEntry[], client: any) => Promise<void>;
|
|
3127
|
+
};
|
|
3128
|
+
|
|
3668
3129
|
declare const downloadCSV: (data: {
|
|
3669
3130
|
rows: any[];
|
|
3670
3131
|
fields?: Column$1[];
|
|
@@ -3723,6 +3184,42 @@ interface LimitPopoverComponentProps {
|
|
|
3723
3184
|
disabled?: boolean;
|
|
3724
3185
|
}
|
|
3725
3186
|
|
|
3187
|
+
interface TableComponentProps {
|
|
3188
|
+
rows: object[];
|
|
3189
|
+
rowCount?: number;
|
|
3190
|
+
rowCountIsLoading?: boolean;
|
|
3191
|
+
columns: {
|
|
3192
|
+
label: string;
|
|
3193
|
+
field: string;
|
|
3194
|
+
}[];
|
|
3195
|
+
currentPage: number;
|
|
3196
|
+
sort?: {
|
|
3197
|
+
field: string;
|
|
3198
|
+
direction: string;
|
|
3199
|
+
};
|
|
3200
|
+
className?: string;
|
|
3201
|
+
containerStyle?: React$1.CSSProperties;
|
|
3202
|
+
isLoading?: boolean;
|
|
3203
|
+
hideCSVDownloadButton?: boolean;
|
|
3204
|
+
downloadCSV?: () => void;
|
|
3205
|
+
LoadingComponent?: () => React$1.JSX.Element;
|
|
3206
|
+
DownloadCSVButtonComponent?: (props: ButtonComponentProps) => React$1.JSX.Element;
|
|
3207
|
+
rowsPerPage?: number;
|
|
3208
|
+
emptyStateLabel?: string;
|
|
3209
|
+
onPageChange?: (page: number) => void;
|
|
3210
|
+
onSortChange?: (sort: {
|
|
3211
|
+
field: string;
|
|
3212
|
+
direction: string;
|
|
3213
|
+
}) => void;
|
|
3214
|
+
headerBackgroundColor?: string;
|
|
3215
|
+
footerBackgroundColor?: string;
|
|
3216
|
+
borderRadius?: string | number;
|
|
3217
|
+
borderLeft?: string;
|
|
3218
|
+
borderRight?: string;
|
|
3219
|
+
borderTop?: string;
|
|
3220
|
+
borderBottom?: string;
|
|
3221
|
+
}
|
|
3222
|
+
|
|
3726
3223
|
interface DateRangePickerComponentProps {
|
|
3727
3224
|
preset: string;
|
|
3728
3225
|
label?: string;
|
|
@@ -4195,4 +3692,4 @@ interface ReportTableProps {
|
|
|
4195
3692
|
}
|
|
4196
3693
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
4197
3694
|
|
|
4198
|
-
export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat
|
|
3695
|
+
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 QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, 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, useAllReports, useAskQuill, useChangelogRefresh, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useForm, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
|