@quillsql/react 2.15.4 → 2.15.6
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 +1087 -141
- package/dist/index.d.cts +77 -19
- package/dist/index.d.ts +77 -19
- package/dist/index.js +1107 -132
- package/package.json +8 -8
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,15 +2466,17 @@ 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[];
|
|
@@ -2711,6 +2737,36 @@ declare const useReportBuilder: ({ reportId, ownerDashboard, config, }: {
|
|
|
2711
2737
|
config?: UseReportBuilderConfig;
|
|
2712
2738
|
}) => UseReportBuilder;
|
|
2713
2739
|
|
|
2740
|
+
declare const useTenants: (dashboardName: string | null) => {
|
|
2741
|
+
tenants: (string | number)[] | {
|
|
2742
|
+
tenantField: string;
|
|
2743
|
+
tenantIds: (string | number)[];
|
|
2744
|
+
}[] | undefined;
|
|
2745
|
+
flags: string[] | undefined;
|
|
2746
|
+
childTenantMappings: Record<string, {
|
|
2747
|
+
label: string;
|
|
2748
|
+
value: string;
|
|
2749
|
+
}[]>;
|
|
2750
|
+
mappedTenants: Record<string, {
|
|
2751
|
+
label: string;
|
|
2752
|
+
value: string;
|
|
2753
|
+
}[]>;
|
|
2754
|
+
viewerTenants: {
|
|
2755
|
+
label: string;
|
|
2756
|
+
field: string;
|
|
2757
|
+
}[];
|
|
2758
|
+
isLoadingMappedTenants: boolean;
|
|
2759
|
+
isLoadingViewerTenants: boolean;
|
|
2760
|
+
getMappedTenantsForDashboard: (dashboardName: string) => Promise<Record<string, {
|
|
2761
|
+
label: string;
|
|
2762
|
+
value: string;
|
|
2763
|
+
}[]> | undefined>;
|
|
2764
|
+
getViewerTenantsByOwner: (ownerTenant: string) => Promise<{
|
|
2765
|
+
label: string;
|
|
2766
|
+
field: string;
|
|
2767
|
+
}[]>;
|
|
2768
|
+
};
|
|
2769
|
+
|
|
2714
2770
|
declare const useReports: () => {
|
|
2715
2771
|
reloadFilteredReports: (predicate: (report: QuillReportInternal) => boolean) => void;
|
|
2716
2772
|
};
|
|
@@ -3202,11 +3258,11 @@ interface SaveReportProps {
|
|
|
3202
3258
|
destinationSection?: string;
|
|
3203
3259
|
/** A select component. */
|
|
3204
3260
|
SelectComponent?: (props: {
|
|
3205
|
-
value: string | undefined | null;
|
|
3261
|
+
value: string | number | undefined | null;
|
|
3206
3262
|
label?: string;
|
|
3207
3263
|
width: number;
|
|
3208
3264
|
options: {
|
|
3209
|
-
value: string;
|
|
3265
|
+
value: string | number;
|
|
3210
3266
|
label: string;
|
|
3211
3267
|
}[];
|
|
3212
3268
|
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -3336,8 +3392,10 @@ interface SaveReportProps {
|
|
|
3336
3392
|
}) => JSX.Element;
|
|
3337
3393
|
/** A callback function triggered when a chart element is clicked. */
|
|
3338
3394
|
onClickChartElement?: (data: any) => void;
|
|
3395
|
+
/** The label for the submit button. */
|
|
3396
|
+
submitButtonLabel?: string;
|
|
3339
3397
|
}
|
|
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;
|
|
3398
|
+
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
3399
|
|
|
3342
3400
|
interface ReportTableProps {
|
|
3343
3401
|
reportBuilder: ReportBuilder;
|
|
@@ -3364,4 +3422,4 @@ interface ReportTableProps {
|
|
|
3364
3422
|
}
|
|
3365
3423
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
3366
3424
|
|
|
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 };
|
|
3425
|
+
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,15 +2466,17 @@ 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[];
|
|
@@ -2711,6 +2737,36 @@ declare const useReportBuilder: ({ reportId, ownerDashboard, config, }: {
|
|
|
2711
2737
|
config?: UseReportBuilderConfig;
|
|
2712
2738
|
}) => UseReportBuilder;
|
|
2713
2739
|
|
|
2740
|
+
declare const useTenants: (dashboardName: string | null) => {
|
|
2741
|
+
tenants: (string | number)[] | {
|
|
2742
|
+
tenantField: string;
|
|
2743
|
+
tenantIds: (string | number)[];
|
|
2744
|
+
}[] | undefined;
|
|
2745
|
+
flags: string[] | undefined;
|
|
2746
|
+
childTenantMappings: Record<string, {
|
|
2747
|
+
label: string;
|
|
2748
|
+
value: string;
|
|
2749
|
+
}[]>;
|
|
2750
|
+
mappedTenants: Record<string, {
|
|
2751
|
+
label: string;
|
|
2752
|
+
value: string;
|
|
2753
|
+
}[]>;
|
|
2754
|
+
viewerTenants: {
|
|
2755
|
+
label: string;
|
|
2756
|
+
field: string;
|
|
2757
|
+
}[];
|
|
2758
|
+
isLoadingMappedTenants: boolean;
|
|
2759
|
+
isLoadingViewerTenants: boolean;
|
|
2760
|
+
getMappedTenantsForDashboard: (dashboardName: string) => Promise<Record<string, {
|
|
2761
|
+
label: string;
|
|
2762
|
+
value: string;
|
|
2763
|
+
}[]> | undefined>;
|
|
2764
|
+
getViewerTenantsByOwner: (ownerTenant: string) => Promise<{
|
|
2765
|
+
label: string;
|
|
2766
|
+
field: string;
|
|
2767
|
+
}[]>;
|
|
2768
|
+
};
|
|
2769
|
+
|
|
2714
2770
|
declare const useReports: () => {
|
|
2715
2771
|
reloadFilteredReports: (predicate: (report: QuillReportInternal) => boolean) => void;
|
|
2716
2772
|
};
|
|
@@ -3202,11 +3258,11 @@ interface SaveReportProps {
|
|
|
3202
3258
|
destinationSection?: string;
|
|
3203
3259
|
/** A select component. */
|
|
3204
3260
|
SelectComponent?: (props: {
|
|
3205
|
-
value: string | undefined | null;
|
|
3261
|
+
value: string | number | undefined | null;
|
|
3206
3262
|
label?: string;
|
|
3207
3263
|
width: number;
|
|
3208
3264
|
options: {
|
|
3209
|
-
value: string;
|
|
3265
|
+
value: string | number;
|
|
3210
3266
|
label: string;
|
|
3211
3267
|
}[];
|
|
3212
3268
|
onChange: (event: React.ChangeEvent<HTMLSelectElement>) => void;
|
|
@@ -3336,8 +3392,10 @@ interface SaveReportProps {
|
|
|
3336
3392
|
}) => JSX.Element;
|
|
3337
3393
|
/** A callback function triggered when a chart element is clicked. */
|
|
3338
3394
|
onClickChartElement?: (data: any) => void;
|
|
3395
|
+
/** The label for the submit button. */
|
|
3396
|
+
submitButtonLabel?: string;
|
|
3339
3397
|
}
|
|
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;
|
|
3398
|
+
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
3399
|
|
|
3342
3400
|
interface ReportTableProps {
|
|
3343
3401
|
reportBuilder: ReportBuilder;
|
|
@@ -3364,4 +3422,4 @@ interface ReportTableProps {
|
|
|
3364
3422
|
}
|
|
3365
3423
|
declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
|
|
3366
3424
|
|
|
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 };
|
|
3425
|
+
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 };
|