@quillsql/react 2.16.43 → 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.cjs +484 -34
- package/dist/index.d.cts +112 -6
- package/dist/index.d.ts +112 -6
- package/dist/index.js +483 -35
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1383,6 +1383,12 @@ interface TableComponentProps {
|
|
|
1383
1383
|
field: string;
|
|
1384
1384
|
direction: string;
|
|
1385
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;
|
|
1386
1392
|
headerBackgroundColor?: string;
|
|
1387
1393
|
footerBackgroundColor?: string;
|
|
1388
1394
|
borderRadius?: string | number;
|
|
@@ -1762,6 +1768,17 @@ interface TableProps {
|
|
|
1762
1768
|
borderRight?: string;
|
|
1763
1769
|
borderTop?: string;
|
|
1764
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;
|
|
1765
1782
|
/** An array of dashboard filters that are indicated by the frontend dev. */
|
|
1766
1783
|
filters?: Filter[];
|
|
1767
1784
|
}
|
|
@@ -2763,6 +2780,23 @@ type UseReportFilterDraft = {
|
|
|
2763
2780
|
seedFilterDraft: () => void;
|
|
2764
2781
|
};
|
|
2765
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
|
+
|
|
2766
2800
|
type SelectOption = {
|
|
2767
2801
|
label: string;
|
|
2768
2802
|
value: string;
|
|
@@ -2773,7 +2807,41 @@ type UseFormTableColumn = {
|
|
|
2773
2807
|
field: string;
|
|
2774
2808
|
format: string;
|
|
2775
2809
|
};
|
|
2776
|
-
|
|
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 & {
|
|
2777
2845
|
rows: UseFormTableRow[];
|
|
2778
2846
|
columns: UseFormTableColumn[];
|
|
2779
2847
|
getColumnFormat: (field: string) => string;
|
|
@@ -3033,6 +3101,34 @@ interface UseReportOptions {
|
|
|
3033
3101
|
* the prior schema-wide option lists when no table scope applies.
|
|
3034
3102
|
*/
|
|
3035
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;
|
|
3036
3132
|
}
|
|
3037
3133
|
/**
|
|
3038
3134
|
* `saveChanges` from `useReport`. Always returns a Promise so UIs can `await`
|
|
@@ -3290,15 +3386,25 @@ declare function areQueryBuilderFilterDraftsDirty(draft: unknown, committed: unk
|
|
|
3290
3386
|
/** Number of leaf filter rules (excludes empty groups). */
|
|
3291
3387
|
declare function countFilterRules(value: unknown): number;
|
|
3292
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
|
+
};
|
|
3293
3402
|
type ReportDetailProps = {
|
|
3294
3403
|
/** Display name from the loaded report (e.g. `useReport` `name`). Rendered above the chart when non-empty. */
|
|
3295
3404
|
reportTitle?: string;
|
|
3296
3405
|
chart?: any;
|
|
3297
3406
|
chartLoading: boolean;
|
|
3298
|
-
table?:
|
|
3299
|
-
columns?: unknown[];
|
|
3300
|
-
rows?: unknown[];
|
|
3301
|
-
};
|
|
3407
|
+
table?: ReportDetailTable;
|
|
3302
3408
|
tableLoading: boolean;
|
|
3303
3409
|
showLegend?: boolean;
|
|
3304
3410
|
/** Strip QuillTable's outer frame when chart type is `table` (cell borders unchanged). */
|
|
@@ -4334,4 +4440,4 @@ interface ReportTableProps {
|
|
|
4334
4440
|
}
|
|
4335
4441
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
4336
4442
|
|
|
4337
|
-
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, 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 Option, 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, 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 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 };
|
|
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1383,6 +1383,12 @@ interface TableComponentProps {
|
|
|
1383
1383
|
field: string;
|
|
1384
1384
|
direction: string;
|
|
1385
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;
|
|
1386
1392
|
headerBackgroundColor?: string;
|
|
1387
1393
|
footerBackgroundColor?: string;
|
|
1388
1394
|
borderRadius?: string | number;
|
|
@@ -1762,6 +1768,17 @@ interface TableProps {
|
|
|
1762
1768
|
borderRight?: string;
|
|
1763
1769
|
borderTop?: string;
|
|
1764
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;
|
|
1765
1782
|
/** An array of dashboard filters that are indicated by the frontend dev. */
|
|
1766
1783
|
filters?: Filter[];
|
|
1767
1784
|
}
|
|
@@ -2763,6 +2780,23 @@ type UseReportFilterDraft = {
|
|
|
2763
2780
|
seedFilterDraft: () => void;
|
|
2764
2781
|
};
|
|
2765
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
|
+
|
|
2766
2800
|
type SelectOption = {
|
|
2767
2801
|
label: string;
|
|
2768
2802
|
value: string;
|
|
@@ -2773,7 +2807,41 @@ type UseFormTableColumn = {
|
|
|
2773
2807
|
field: string;
|
|
2774
2808
|
format: string;
|
|
2775
2809
|
};
|
|
2776
|
-
|
|
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 & {
|
|
2777
2845
|
rows: UseFormTableRow[];
|
|
2778
2846
|
columns: UseFormTableColumn[];
|
|
2779
2847
|
getColumnFormat: (field: string) => string;
|
|
@@ -3033,6 +3101,34 @@ interface UseReportOptions {
|
|
|
3033
3101
|
* the prior schema-wide option lists when no table scope applies.
|
|
3034
3102
|
*/
|
|
3035
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;
|
|
3036
3132
|
}
|
|
3037
3133
|
/**
|
|
3038
3134
|
* `saveChanges` from `useReport`. Always returns a Promise so UIs can `await`
|
|
@@ -3290,15 +3386,25 @@ declare function areQueryBuilderFilterDraftsDirty(draft: unknown, committed: unk
|
|
|
3290
3386
|
/** Number of leaf filter rules (excludes empty groups). */
|
|
3291
3387
|
declare function countFilterRules(value: unknown): number;
|
|
3292
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
|
+
};
|
|
3293
3402
|
type ReportDetailProps = {
|
|
3294
3403
|
/** Display name from the loaded report (e.g. `useReport` `name`). Rendered above the chart when non-empty. */
|
|
3295
3404
|
reportTitle?: string;
|
|
3296
3405
|
chart?: any;
|
|
3297
3406
|
chartLoading: boolean;
|
|
3298
|
-
table?:
|
|
3299
|
-
columns?: unknown[];
|
|
3300
|
-
rows?: unknown[];
|
|
3301
|
-
};
|
|
3407
|
+
table?: ReportDetailTable;
|
|
3302
3408
|
tableLoading: boolean;
|
|
3303
3409
|
showLegend?: boolean;
|
|
3304
3410
|
/** Strip QuillTable's outer frame when chart type is `table` (cell borders unchanged). */
|
|
@@ -4334,4 +4440,4 @@ interface ReportTableProps {
|
|
|
4334
4440
|
}
|
|
4335
4441
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
4336
4442
|
|
|
4337
|
-
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, 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 Option, 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, 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 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 };
|
|
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 };
|