@quillsql/react 2.15.5 → 2.15.7
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 +1148 -79
- package/dist/index.d.cts +82 -20
- package/dist/index.d.ts +82 -20
- package/dist/index.js +1484 -386
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -62,11 +62,11 @@ interface ContainerComponentProps {
|
|
|
62
62
|
children: ReactNode;
|
|
63
63
|
}
|
|
64
64
|
interface SelectComponentProps {
|
|
65
|
-
value: string | null | undefined;
|
|
65
|
+
value: string | number | null | undefined;
|
|
66
66
|
label?: string;
|
|
67
67
|
width: number;
|
|
68
68
|
options: {
|
|
69
|
-
value: string;
|
|
69
|
+
value: string | number;
|
|
70
70
|
label: string;
|
|
71
71
|
}[];
|
|
72
72
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -77,9 +77,9 @@ interface SelectComponentProps {
|
|
|
77
77
|
interface MultiSelectComponentProps {
|
|
78
78
|
label?: string;
|
|
79
79
|
width: number;
|
|
80
|
-
value: (string | null)[];
|
|
80
|
+
value: (string | number | null)[];
|
|
81
81
|
options: {
|
|
82
|
-
value: string;
|
|
82
|
+
value: string | number;
|
|
83
83
|
label: string;
|
|
84
84
|
}[];
|
|
85
85
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement> | {
|
|
@@ -363,17 +363,19 @@ type InternalFilter = BaseFilter | InternalStringFilter | InternalStringInFilter
|
|
|
363
363
|
/** Dashboard filters are filters that persist with the dashboard */
|
|
364
364
|
declare enum InternalDashboardFilterType {
|
|
365
365
|
String = "string",
|
|
366
|
-
Date = "date_range"
|
|
366
|
+
Date = "date_range",
|
|
367
|
+
Tenant = "tenant"
|
|
367
368
|
}
|
|
368
369
|
declare enum StringFilterType {
|
|
369
370
|
Default = "default",
|
|
370
371
|
Multiselect = "multiselect"
|
|
371
372
|
}
|
|
372
|
-
type InternalDashboardFilter = InternalDashboardStringFilter | InternalDashboardDateFilter;
|
|
373
|
+
type InternalDashboardFilter = InternalDashboardStringFilter | InternalDashboardDateFilter | InternalDashboardTenantFilter;
|
|
373
374
|
declare enum DashboardFilterType {
|
|
374
375
|
Select = "select",
|
|
375
376
|
MultiSelect = "multiselect",
|
|
376
|
-
Date = "date"
|
|
377
|
+
Date = "date",
|
|
378
|
+
Tenant = "tenant"
|
|
377
379
|
}
|
|
378
380
|
interface BaseDashboardFilter {
|
|
379
381
|
label: string;
|
|
@@ -409,7 +411,15 @@ interface DashboardDateFilter extends BaseDashboardFilter {
|
|
|
409
411
|
endDate?: Date;
|
|
410
412
|
}[];
|
|
411
413
|
}
|
|
412
|
-
|
|
414
|
+
interface DashboardTenantFilter extends BaseDashboardFilter {
|
|
415
|
+
type: DashboardFilterType.Tenant;
|
|
416
|
+
value: string | number | (string | number)[] | null;
|
|
417
|
+
options: {
|
|
418
|
+
label: string;
|
|
419
|
+
value: string | number;
|
|
420
|
+
}[];
|
|
421
|
+
}
|
|
422
|
+
type DashboardFilter = DashboardSingleFilter | DashboardMultiFilter | DashboardDateFilter | DashboardTenantFilter;
|
|
413
423
|
interface InternalDashboardBaseFilter {
|
|
414
424
|
filterType: InternalDashboardFilterType;
|
|
415
425
|
label: string;
|
|
@@ -458,6 +468,16 @@ interface InternalDashboardDateFilter extends InternalDashboardBaseFilter {
|
|
|
458
468
|
value: ComparisonRangeKey;
|
|
459
469
|
};
|
|
460
470
|
}
|
|
471
|
+
interface InternalDashboardTenantFilter extends InternalDashboardBaseFilter {
|
|
472
|
+
filterType: InternalDashboardFilterType.Tenant;
|
|
473
|
+
multiSelect: boolean;
|
|
474
|
+
label: string;
|
|
475
|
+
options?: {
|
|
476
|
+
label: string;
|
|
477
|
+
value: string | number;
|
|
478
|
+
}[];
|
|
479
|
+
values?: (string | number)[];
|
|
480
|
+
}
|
|
461
481
|
interface FilterTreeNode {
|
|
462
482
|
leaf: boolean;
|
|
463
483
|
operator: 'and' | 'or' | null;
|
|
@@ -992,6 +1012,8 @@ type DashboardConfig = {
|
|
|
992
1012
|
dashboardId: string;
|
|
993
1013
|
name: string;
|
|
994
1014
|
filters: InternalDashboardStringFilter[];
|
|
1015
|
+
allTenantFilters?: InternalDashboardTenantFilter[];
|
|
1016
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
995
1017
|
dateFilter?: InternalDashboardDateFilter;
|
|
996
1018
|
customFiltersEnabled?: boolean;
|
|
997
1019
|
sections?: {
|
|
@@ -1585,10 +1607,10 @@ interface SQLEditorProps {
|
|
|
1585
1607
|
TextInputComponent?: ((props: TextInputComponentProps) => JSX.Element) | React$1.ForwardRefExoticComponent<TextInputComponentProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1586
1608
|
/** A select component. */
|
|
1587
1609
|
SelectComponent?: (props: {
|
|
1588
|
-
value: string | null | undefined;
|
|
1610
|
+
value: string | number | null | undefined;
|
|
1589
1611
|
label?: string;
|
|
1590
1612
|
options: {
|
|
1591
|
-
value: string;
|
|
1613
|
+
value: string | number;
|
|
1592
1614
|
label: string;
|
|
1593
1615
|
}[];
|
|
1594
1616
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -2139,6 +2161,8 @@ interface ReportBuilderProps {
|
|
|
2139
2161
|
onClickChartElement?: (element: any) => void;
|
|
2140
2162
|
/** A callback function triggered when the user wants to add a virtual table */
|
|
2141
2163
|
onRequestAddVirtualTable?: () => void;
|
|
2164
|
+
/** The label for the submit button. */
|
|
2165
|
+
submitButtonLabel?: string;
|
|
2142
2166
|
}
|
|
2143
2167
|
/**
|
|
2144
2168
|
* Quill Report Builder
|
|
@@ -2171,7 +2195,7 @@ interface ReportBuilderProps {
|
|
|
2171
2195
|
* ### Report Builder API
|
|
2172
2196
|
* @see https://docs.quillsql.com/components/report-builder
|
|
2173
2197
|
*/
|
|
2174
|
-
declare function ReportBuilder$1({ initialTableName, onSubmitEditReport, onSubmitCreateReport, onSubmitSaveQuery, onDiscardChanges, onSaveChanges, onCloseChartBuilder, destinationDashboard, destinationSection, chartBuilderTitle, organizationName, ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, ModalComponent, TextInputComponent, SelectComponent, MultiSelectComponent, TableComponent, PopoverComponent, TabsComponent, CheckboxComponent, SidebarComponent, ContainerComponent, SelectColumnComponent, DraggableColumnComponent, SidebarHeadingComponent, FilterPopoverComponent, SortPopoverComponent, LimitPopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, LoadingComponent, ColumnSearchEmptyState, ChartBuilderFormContainer, ChartBuilderModalComponent, isAdminEnabled, isAIEnabled, containerStyle, className, pivotRecommendationsEnabled, reportId, hideCopySQL, isChartBuilderHorizontalView, onClickChartElement, onRequestAddVirtualTable, }: ReportBuilderProps): react_jsx_runtime.JSX.Element;
|
|
2198
|
+
declare function ReportBuilder$1({ initialTableName, onSubmitEditReport, onSubmitCreateReport, onSubmitSaveQuery, onDiscardChanges, onSaveChanges, onCloseChartBuilder, destinationDashboard, destinationSection, chartBuilderTitle, organizationName, ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, ModalComponent, TextInputComponent, SelectComponent, MultiSelectComponent, TableComponent, PopoverComponent, TabsComponent, CheckboxComponent, SidebarComponent, ContainerComponent, SelectColumnComponent, DraggableColumnComponent, SidebarHeadingComponent, FilterPopoverComponent, SortPopoverComponent, LimitPopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, LoadingComponent, ColumnSearchEmptyState, ChartBuilderFormContainer, ChartBuilderModalComponent, isAdminEnabled, isAIEnabled, containerStyle, className, pivotRecommendationsEnabled, reportId, hideCopySQL, isChartBuilderHorizontalView, onClickChartElement, onRequestAddVirtualTable, submitButtonLabel, }: ReportBuilderProps): react_jsx_runtime.JSX.Element;
|
|
2175
2199
|
|
|
2176
2200
|
/**
|
|
2177
2201
|
* Props for the Quill ChartEditor component.
|
|
@@ -2203,10 +2227,10 @@ interface ChartEditorProps {
|
|
|
2203
2227
|
onDelete?: () => boolean | Promise<boolean>;
|
|
2204
2228
|
/** A select component. */
|
|
2205
2229
|
SelectComponent?: (props: {
|
|
2206
|
-
value: string | null | undefined;
|
|
2230
|
+
value: string | number | null | undefined;
|
|
2207
2231
|
label?: string;
|
|
2208
2232
|
options: {
|
|
2209
|
-
value: string;
|
|
2233
|
+
value: string | number;
|
|
2210
2234
|
label: string;
|
|
2211
2235
|
}[];
|
|
2212
2236
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -2442,22 +2466,26 @@ declare const useDashboards: () => {
|
|
|
2442
2466
|
}[] | undefined;
|
|
2443
2467
|
}[] | null;
|
|
2444
2468
|
isLoading: boolean;
|
|
2445
|
-
createDashboard: ({ name, filters, dateFilter, dashboardOwners, }: {
|
|
2469
|
+
createDashboard: ({ name, tenantFilters, filters, dateFilter, dashboardOwners, }: {
|
|
2446
2470
|
name: string;
|
|
2471
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
2447
2472
|
filters: InternalDashboardFilter[];
|
|
2448
2473
|
dashboardOwners: string[];
|
|
2449
2474
|
dateFilter?: InternalDashboardFilter;
|
|
2450
2475
|
}) => Promise<void>;
|
|
2451
|
-
updateDashboard: (name: string, { newName, filters, dateFilter, customFilters, tenantKeys, }: {
|
|
2476
|
+
updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, }: {
|
|
2452
2477
|
newName: string;
|
|
2453
2478
|
filters: InternalDashboardFilter[];
|
|
2479
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
2454
2480
|
dateFilter?: InternalDashboardFilter;
|
|
2455
2481
|
customFilters?: InternalFilter[];
|
|
2456
2482
|
tenantKeys?: string[];
|
|
2457
2483
|
}) => Promise<void>;
|
|
2458
2484
|
deleteDashboard: (name: string) => Promise<void>;
|
|
2459
2485
|
};
|
|
2460
|
-
declare const useDashboard: (dashboardName: string
|
|
2486
|
+
declare const useDashboard: (dashboardName: string, config?: {
|
|
2487
|
+
pageSize?: number;
|
|
2488
|
+
}) => {
|
|
2461
2489
|
isLoading: boolean;
|
|
2462
2490
|
sections: Record<string, QuillReport[]> | null;
|
|
2463
2491
|
filters: DashboardFilter[];
|
|
@@ -2473,9 +2501,11 @@ declare const useDashboardReport: (reportId: string, config?: {
|
|
|
2473
2501
|
initialFilters?: Filter[];
|
|
2474
2502
|
}) => {
|
|
2475
2503
|
report: QuillReport | null;
|
|
2504
|
+
isLoading: boolean;
|
|
2476
2505
|
loading: boolean;
|
|
2477
2506
|
applyFilters: (filters: Filter[]) => void;
|
|
2478
2507
|
deleteReport: () => void;
|
|
2508
|
+
fetchNextPage: () => Promise<void>;
|
|
2479
2509
|
};
|
|
2480
2510
|
|
|
2481
2511
|
/**
|
|
@@ -2711,6 +2741,36 @@ declare const useReportBuilder: ({ reportId, ownerDashboard, config, }: {
|
|
|
2711
2741
|
config?: UseReportBuilderConfig;
|
|
2712
2742
|
}) => UseReportBuilder;
|
|
2713
2743
|
|
|
2744
|
+
declare const useTenants: (dashboardName: string | null) => {
|
|
2745
|
+
tenants: (string | number)[] | {
|
|
2746
|
+
tenantField: string;
|
|
2747
|
+
tenantIds: (string | number)[];
|
|
2748
|
+
}[] | undefined;
|
|
2749
|
+
flags: string[] | undefined;
|
|
2750
|
+
childTenantMappings: Record<string, {
|
|
2751
|
+
label: string;
|
|
2752
|
+
value: string;
|
|
2753
|
+
}[]>;
|
|
2754
|
+
mappedTenants: Record<string, {
|
|
2755
|
+
label: string;
|
|
2756
|
+
value: string;
|
|
2757
|
+
}[]>;
|
|
2758
|
+
viewerTenants: {
|
|
2759
|
+
label: string;
|
|
2760
|
+
field: string;
|
|
2761
|
+
}[];
|
|
2762
|
+
isLoadingMappedTenants: boolean;
|
|
2763
|
+
isLoadingViewerTenants: boolean;
|
|
2764
|
+
getMappedTenantsForDashboard: (dashboardName: string) => Promise<Record<string, {
|
|
2765
|
+
label: string;
|
|
2766
|
+
value: string;
|
|
2767
|
+
}[]> | undefined>;
|
|
2768
|
+
getViewerTenantsByOwner: (ownerTenant: string) => Promise<{
|
|
2769
|
+
label: string;
|
|
2770
|
+
field: string;
|
|
2771
|
+
}[]>;
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2714
2774
|
declare const useReports: () => {
|
|
2715
2775
|
reloadFilteredReports: (predicate: (report: QuillReportInternal) => boolean) => void;
|
|
2716
2776
|
};
|
|
@@ -3202,11 +3262,11 @@ interface SaveReportProps {
|
|
|
3202
3262
|
destinationSection?: string;
|
|
3203
3263
|
/** A select component. */
|
|
3204
3264
|
SelectComponent?: (props: {
|
|
3205
|
-
value: string | undefined | null;
|
|
3265
|
+
value: string | number | undefined | null;
|
|
3206
3266
|
label?: string;
|
|
3207
3267
|
width: number;
|
|
3208
3268
|
options: {
|
|
3209
|
-
value: string;
|
|
3269
|
+
value: string | number;
|
|
3210
3270
|
label: string;
|
|
3211
3271
|
}[];
|
|
3212
3272
|
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -3336,8 +3396,10 @@ interface SaveReportProps {
|
|
|
3336
3396
|
}) => JSX.Element;
|
|
3337
3397
|
/** A callback function triggered when a chart element is clicked. */
|
|
3338
3398
|
onClickChartElement?: (data: any) => void;
|
|
3399
|
+
/** The label for the submit button. */
|
|
3400
|
+
submitButtonLabel?: string;
|
|
3339
3401
|
}
|
|
3340
|
-
declare const SaveReport: ({ reportBuilder, isOpen, setIsOpen, isAdminEnabled, chartBuilderTitle, onSubmitEditReport, onSubmitCreateReport, destinationSection, SelectComponent, TextInputComponent, ButtonComponent, SecondaryButtonComponent, HeaderComponent, SubHeaderComponent, LabelComponent, TextComponent, CardComponent, ModalComponent, PopoverComponent, TableComponent, DeleteButtonComponent, LoadingComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ErrorMessageComponent, CheckboxComponent, ChartBuilderFormContainer, onClickChartElement, SaveTrigger, }: SaveReportProps) => react_jsx_runtime.JSX.Element;
|
|
3402
|
+
declare const SaveReport: ({ reportBuilder, isOpen, setIsOpen, isAdminEnabled, chartBuilderTitle, onSubmitEditReport, onSubmitCreateReport, destinationSection, SelectComponent, TextInputComponent, ButtonComponent, SecondaryButtonComponent, HeaderComponent, SubHeaderComponent, LabelComponent, TextComponent, CardComponent, ModalComponent, PopoverComponent, TableComponent, DeleteButtonComponent, LoadingComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ErrorMessageComponent, CheckboxComponent, ChartBuilderFormContainer, onClickChartElement, SaveTrigger, submitButtonLabel, }: SaveReportProps) => react_jsx_runtime.JSX.Element;
|
|
3341
3403
|
|
|
3342
3404
|
interface ReportTableProps {
|
|
3343
3405
|
reportBuilder: ReportBuilder;
|
|
@@ -3364,4 +3426,4 @@ interface ReportTableProps {
|
|
|
3364
3426
|
}
|
|
3365
3427
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
3366
3428
|
|
|
3367
|
-
export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, 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 InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, 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, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useVirtualTables };
|
|
3429
|
+
export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, 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, 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, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
|
package/dist/index.d.ts
CHANGED
|
@@ -62,11 +62,11 @@ interface ContainerComponentProps {
|
|
|
62
62
|
children: ReactNode;
|
|
63
63
|
}
|
|
64
64
|
interface SelectComponentProps {
|
|
65
|
-
value: string | null | undefined;
|
|
65
|
+
value: string | number | null | undefined;
|
|
66
66
|
label?: string;
|
|
67
67
|
width: number;
|
|
68
68
|
options: {
|
|
69
|
-
value: string;
|
|
69
|
+
value: string | number;
|
|
70
70
|
label: string;
|
|
71
71
|
}[];
|
|
72
72
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -77,9 +77,9 @@ interface SelectComponentProps {
|
|
|
77
77
|
interface MultiSelectComponentProps {
|
|
78
78
|
label?: string;
|
|
79
79
|
width: number;
|
|
80
|
-
value: (string | null)[];
|
|
80
|
+
value: (string | number | null)[];
|
|
81
81
|
options: {
|
|
82
|
-
value: string;
|
|
82
|
+
value: string | number;
|
|
83
83
|
label: string;
|
|
84
84
|
}[];
|
|
85
85
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement> | {
|
|
@@ -363,17 +363,19 @@ type InternalFilter = BaseFilter | InternalStringFilter | InternalStringInFilter
|
|
|
363
363
|
/** Dashboard filters are filters that persist with the dashboard */
|
|
364
364
|
declare enum InternalDashboardFilterType {
|
|
365
365
|
String = "string",
|
|
366
|
-
Date = "date_range"
|
|
366
|
+
Date = "date_range",
|
|
367
|
+
Tenant = "tenant"
|
|
367
368
|
}
|
|
368
369
|
declare enum StringFilterType {
|
|
369
370
|
Default = "default",
|
|
370
371
|
Multiselect = "multiselect"
|
|
371
372
|
}
|
|
372
|
-
type InternalDashboardFilter = InternalDashboardStringFilter | InternalDashboardDateFilter;
|
|
373
|
+
type InternalDashboardFilter = InternalDashboardStringFilter | InternalDashboardDateFilter | InternalDashboardTenantFilter;
|
|
373
374
|
declare enum DashboardFilterType {
|
|
374
375
|
Select = "select",
|
|
375
376
|
MultiSelect = "multiselect",
|
|
376
|
-
Date = "date"
|
|
377
|
+
Date = "date",
|
|
378
|
+
Tenant = "tenant"
|
|
377
379
|
}
|
|
378
380
|
interface BaseDashboardFilter {
|
|
379
381
|
label: string;
|
|
@@ -409,7 +411,15 @@ interface DashboardDateFilter extends BaseDashboardFilter {
|
|
|
409
411
|
endDate?: Date;
|
|
410
412
|
}[];
|
|
411
413
|
}
|
|
412
|
-
|
|
414
|
+
interface DashboardTenantFilter extends BaseDashboardFilter {
|
|
415
|
+
type: DashboardFilterType.Tenant;
|
|
416
|
+
value: string | number | (string | number)[] | null;
|
|
417
|
+
options: {
|
|
418
|
+
label: string;
|
|
419
|
+
value: string | number;
|
|
420
|
+
}[];
|
|
421
|
+
}
|
|
422
|
+
type DashboardFilter = DashboardSingleFilter | DashboardMultiFilter | DashboardDateFilter | DashboardTenantFilter;
|
|
413
423
|
interface InternalDashboardBaseFilter {
|
|
414
424
|
filterType: InternalDashboardFilterType;
|
|
415
425
|
label: string;
|
|
@@ -458,6 +468,16 @@ interface InternalDashboardDateFilter extends InternalDashboardBaseFilter {
|
|
|
458
468
|
value: ComparisonRangeKey;
|
|
459
469
|
};
|
|
460
470
|
}
|
|
471
|
+
interface InternalDashboardTenantFilter extends InternalDashboardBaseFilter {
|
|
472
|
+
filterType: InternalDashboardFilterType.Tenant;
|
|
473
|
+
multiSelect: boolean;
|
|
474
|
+
label: string;
|
|
475
|
+
options?: {
|
|
476
|
+
label: string;
|
|
477
|
+
value: string | number;
|
|
478
|
+
}[];
|
|
479
|
+
values?: (string | number)[];
|
|
480
|
+
}
|
|
461
481
|
interface FilterTreeNode {
|
|
462
482
|
leaf: boolean;
|
|
463
483
|
operator: 'and' | 'or' | null;
|
|
@@ -992,6 +1012,8 @@ type DashboardConfig = {
|
|
|
992
1012
|
dashboardId: string;
|
|
993
1013
|
name: string;
|
|
994
1014
|
filters: InternalDashboardStringFilter[];
|
|
1015
|
+
allTenantFilters?: InternalDashboardTenantFilter[];
|
|
1016
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
995
1017
|
dateFilter?: InternalDashboardDateFilter;
|
|
996
1018
|
customFiltersEnabled?: boolean;
|
|
997
1019
|
sections?: {
|
|
@@ -1585,10 +1607,10 @@ interface SQLEditorProps {
|
|
|
1585
1607
|
TextInputComponent?: ((props: TextInputComponentProps) => JSX.Element) | React$1.ForwardRefExoticComponent<TextInputComponentProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
1586
1608
|
/** A select component. */
|
|
1587
1609
|
SelectComponent?: (props: {
|
|
1588
|
-
value: string | null | undefined;
|
|
1610
|
+
value: string | number | null | undefined;
|
|
1589
1611
|
label?: string;
|
|
1590
1612
|
options: {
|
|
1591
|
-
value: string;
|
|
1613
|
+
value: string | number;
|
|
1592
1614
|
label: string;
|
|
1593
1615
|
}[];
|
|
1594
1616
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -2139,6 +2161,8 @@ interface ReportBuilderProps {
|
|
|
2139
2161
|
onClickChartElement?: (element: any) => void;
|
|
2140
2162
|
/** A callback function triggered when the user wants to add a virtual table */
|
|
2141
2163
|
onRequestAddVirtualTable?: () => void;
|
|
2164
|
+
/** The label for the submit button. */
|
|
2165
|
+
submitButtonLabel?: string;
|
|
2142
2166
|
}
|
|
2143
2167
|
/**
|
|
2144
2168
|
* Quill Report Builder
|
|
@@ -2171,7 +2195,7 @@ interface ReportBuilderProps {
|
|
|
2171
2195
|
* ### Report Builder API
|
|
2172
2196
|
* @see https://docs.quillsql.com/components/report-builder
|
|
2173
2197
|
*/
|
|
2174
|
-
declare function ReportBuilder$1({ initialTableName, onSubmitEditReport, onSubmitCreateReport, onSubmitSaveQuery, onDiscardChanges, onSaveChanges, onCloseChartBuilder, destinationDashboard, destinationSection, chartBuilderTitle, organizationName, ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, ModalComponent, TextInputComponent, SelectComponent, MultiSelectComponent, TableComponent, PopoverComponent, TabsComponent, CheckboxComponent, SidebarComponent, ContainerComponent, SelectColumnComponent, DraggableColumnComponent, SidebarHeadingComponent, FilterPopoverComponent, SortPopoverComponent, LimitPopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, LoadingComponent, ColumnSearchEmptyState, ChartBuilderFormContainer, ChartBuilderModalComponent, isAdminEnabled, isAIEnabled, containerStyle, className, pivotRecommendationsEnabled, reportId, hideCopySQL, isChartBuilderHorizontalView, onClickChartElement, onRequestAddVirtualTable, }: ReportBuilderProps): react_jsx_runtime.JSX.Element;
|
|
2198
|
+
declare function ReportBuilder$1({ initialTableName, onSubmitEditReport, onSubmitCreateReport, onSubmitSaveQuery, onDiscardChanges, onSaveChanges, onCloseChartBuilder, destinationDashboard, destinationSection, chartBuilderTitle, organizationName, ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, ModalComponent, TextInputComponent, SelectComponent, MultiSelectComponent, TableComponent, PopoverComponent, TabsComponent, CheckboxComponent, SidebarComponent, ContainerComponent, SelectColumnComponent, DraggableColumnComponent, SidebarHeadingComponent, FilterPopoverComponent, SortPopoverComponent, LimitPopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, LoadingComponent, ColumnSearchEmptyState, ChartBuilderFormContainer, ChartBuilderModalComponent, isAdminEnabled, isAIEnabled, containerStyle, className, pivotRecommendationsEnabled, reportId, hideCopySQL, isChartBuilderHorizontalView, onClickChartElement, onRequestAddVirtualTable, submitButtonLabel, }: ReportBuilderProps): react_jsx_runtime.JSX.Element;
|
|
2175
2199
|
|
|
2176
2200
|
/**
|
|
2177
2201
|
* Props for the Quill ChartEditor component.
|
|
@@ -2203,10 +2227,10 @@ interface ChartEditorProps {
|
|
|
2203
2227
|
onDelete?: () => boolean | Promise<boolean>;
|
|
2204
2228
|
/** A select component. */
|
|
2205
2229
|
SelectComponent?: (props: {
|
|
2206
|
-
value: string | null | undefined;
|
|
2230
|
+
value: string | number | null | undefined;
|
|
2207
2231
|
label?: string;
|
|
2208
2232
|
options: {
|
|
2209
|
-
value: string;
|
|
2233
|
+
value: string | number;
|
|
2210
2234
|
label: string;
|
|
2211
2235
|
}[];
|
|
2212
2236
|
onChange: (event: React$1.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -2442,22 +2466,26 @@ declare const useDashboards: () => {
|
|
|
2442
2466
|
}[] | undefined;
|
|
2443
2467
|
}[] | null;
|
|
2444
2468
|
isLoading: boolean;
|
|
2445
|
-
createDashboard: ({ name, filters, dateFilter, dashboardOwners, }: {
|
|
2469
|
+
createDashboard: ({ name, tenantFilters, filters, dateFilter, dashboardOwners, }: {
|
|
2446
2470
|
name: string;
|
|
2471
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
2447
2472
|
filters: InternalDashboardFilter[];
|
|
2448
2473
|
dashboardOwners: string[];
|
|
2449
2474
|
dateFilter?: InternalDashboardFilter;
|
|
2450
2475
|
}) => Promise<void>;
|
|
2451
|
-
updateDashboard: (name: string, { newName, filters, dateFilter, customFilters, tenantKeys, }: {
|
|
2476
|
+
updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, }: {
|
|
2452
2477
|
newName: string;
|
|
2453
2478
|
filters: InternalDashboardFilter[];
|
|
2479
|
+
tenantFilters?: InternalDashboardTenantFilter[];
|
|
2454
2480
|
dateFilter?: InternalDashboardFilter;
|
|
2455
2481
|
customFilters?: InternalFilter[];
|
|
2456
2482
|
tenantKeys?: string[];
|
|
2457
2483
|
}) => Promise<void>;
|
|
2458
2484
|
deleteDashboard: (name: string) => Promise<void>;
|
|
2459
2485
|
};
|
|
2460
|
-
declare const useDashboard: (dashboardName: string
|
|
2486
|
+
declare const useDashboard: (dashboardName: string, config?: {
|
|
2487
|
+
pageSize?: number;
|
|
2488
|
+
}) => {
|
|
2461
2489
|
isLoading: boolean;
|
|
2462
2490
|
sections: Record<string, QuillReport[]> | null;
|
|
2463
2491
|
filters: DashboardFilter[];
|
|
@@ -2473,9 +2501,11 @@ declare const useDashboardReport: (reportId: string, config?: {
|
|
|
2473
2501
|
initialFilters?: Filter[];
|
|
2474
2502
|
}) => {
|
|
2475
2503
|
report: QuillReport | null;
|
|
2504
|
+
isLoading: boolean;
|
|
2476
2505
|
loading: boolean;
|
|
2477
2506
|
applyFilters: (filters: Filter[]) => void;
|
|
2478
2507
|
deleteReport: () => void;
|
|
2508
|
+
fetchNextPage: () => Promise<void>;
|
|
2479
2509
|
};
|
|
2480
2510
|
|
|
2481
2511
|
/**
|
|
@@ -2711,6 +2741,36 @@ declare const useReportBuilder: ({ reportId, ownerDashboard, config, }: {
|
|
|
2711
2741
|
config?: UseReportBuilderConfig;
|
|
2712
2742
|
}) => UseReportBuilder;
|
|
2713
2743
|
|
|
2744
|
+
declare const useTenants: (dashboardName: string | null) => {
|
|
2745
|
+
tenants: (string | number)[] | {
|
|
2746
|
+
tenantField: string;
|
|
2747
|
+
tenantIds: (string | number)[];
|
|
2748
|
+
}[] | undefined;
|
|
2749
|
+
flags: string[] | undefined;
|
|
2750
|
+
childTenantMappings: Record<string, {
|
|
2751
|
+
label: string;
|
|
2752
|
+
value: string;
|
|
2753
|
+
}[]>;
|
|
2754
|
+
mappedTenants: Record<string, {
|
|
2755
|
+
label: string;
|
|
2756
|
+
value: string;
|
|
2757
|
+
}[]>;
|
|
2758
|
+
viewerTenants: {
|
|
2759
|
+
label: string;
|
|
2760
|
+
field: string;
|
|
2761
|
+
}[];
|
|
2762
|
+
isLoadingMappedTenants: boolean;
|
|
2763
|
+
isLoadingViewerTenants: boolean;
|
|
2764
|
+
getMappedTenantsForDashboard: (dashboardName: string) => Promise<Record<string, {
|
|
2765
|
+
label: string;
|
|
2766
|
+
value: string;
|
|
2767
|
+
}[]> | undefined>;
|
|
2768
|
+
getViewerTenantsByOwner: (ownerTenant: string) => Promise<{
|
|
2769
|
+
label: string;
|
|
2770
|
+
field: string;
|
|
2771
|
+
}[]>;
|
|
2772
|
+
};
|
|
2773
|
+
|
|
2714
2774
|
declare const useReports: () => {
|
|
2715
2775
|
reloadFilteredReports: (predicate: (report: QuillReportInternal) => boolean) => void;
|
|
2716
2776
|
};
|
|
@@ -3202,11 +3262,11 @@ interface SaveReportProps {
|
|
|
3202
3262
|
destinationSection?: string;
|
|
3203
3263
|
/** A select component. */
|
|
3204
3264
|
SelectComponent?: (props: {
|
|
3205
|
-
value: string | undefined | null;
|
|
3265
|
+
value: string | number | undefined | null;
|
|
3206
3266
|
label?: string;
|
|
3207
3267
|
width: number;
|
|
3208
3268
|
options: {
|
|
3209
|
-
value: string;
|
|
3269
|
+
value: string | number;
|
|
3210
3270
|
label: string;
|
|
3211
3271
|
}[];
|
|
3212
3272
|
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -3336,8 +3396,10 @@ interface SaveReportProps {
|
|
|
3336
3396
|
}) => JSX.Element;
|
|
3337
3397
|
/** A callback function triggered when a chart element is clicked. */
|
|
3338
3398
|
onClickChartElement?: (data: any) => void;
|
|
3399
|
+
/** The label for the submit button. */
|
|
3400
|
+
submitButtonLabel?: string;
|
|
3339
3401
|
}
|
|
3340
|
-
declare const SaveReport: ({ reportBuilder, isOpen, setIsOpen, isAdminEnabled, chartBuilderTitle, onSubmitEditReport, onSubmitCreateReport, destinationSection, SelectComponent, TextInputComponent, ButtonComponent, SecondaryButtonComponent, HeaderComponent, SubHeaderComponent, LabelComponent, TextComponent, CardComponent, ModalComponent, PopoverComponent, TableComponent, DeleteButtonComponent, LoadingComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ErrorMessageComponent, CheckboxComponent, ChartBuilderFormContainer, onClickChartElement, SaveTrigger, }: SaveReportProps) => react_jsx_runtime.JSX.Element;
|
|
3402
|
+
declare const SaveReport: ({ reportBuilder, isOpen, setIsOpen, isAdminEnabled, chartBuilderTitle, onSubmitEditReport, onSubmitCreateReport, destinationSection, SelectComponent, TextInputComponent, ButtonComponent, SecondaryButtonComponent, HeaderComponent, SubHeaderComponent, LabelComponent, TextComponent, CardComponent, ModalComponent, PopoverComponent, TableComponent, DeleteButtonComponent, LoadingComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ErrorMessageComponent, CheckboxComponent, ChartBuilderFormContainer, onClickChartElement, SaveTrigger, submitButtonLabel, }: SaveReportProps) => react_jsx_runtime.JSX.Element;
|
|
3341
3403
|
|
|
3342
3404
|
interface ReportTableProps {
|
|
3343
3405
|
reportBuilder: ReportBuilder;
|
|
@@ -3364,4 +3426,4 @@ interface ReportTableProps {
|
|
|
3364
3426
|
}
|
|
3365
3427
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
3366
3428
|
|
|
3367
|
-
export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, 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 InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PopoverComponentProps, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, 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, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useVirtualTables };
|
|
3429
|
+
export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartEditor, type ChartEditorProps, type ChartProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ContainerComponentProps, Dashboard, DashboardFilterType, type DashboardProps, type DashboardSectionComponentProps, 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, 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, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReportBuilder, useReports, useTenants, useVirtualTables };
|