@quillsql/react 2.13.27 → 2.13.28
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/cjs/Chart.d.ts.map +1 -1
- package/dist/cjs/Chart.js +1 -1
- package/dist/cjs/ChartBuilder.d.ts +20 -2
- package/dist/cjs/ChartBuilder.d.ts.map +1 -1
- package/dist/cjs/ChartBuilder.js +130 -36
- package/dist/cjs/ChartEditor.d.ts +5 -3
- package/dist/cjs/ChartEditor.d.ts.map +1 -1
- package/dist/cjs/ChartEditor.js +4 -5
- package/dist/cjs/Context.d.ts +15 -4
- package/dist/cjs/Context.d.ts.map +1 -1
- package/dist/cjs/Context.js +37 -60
- package/dist/cjs/Dashboard.d.ts +4 -0
- package/dist/cjs/Dashboard.d.ts.map +1 -1
- package/dist/cjs/Dashboard.js +78 -23
- package/dist/cjs/QuillProvider.d.ts +12 -9
- package/dist/cjs/QuillProvider.d.ts.map +1 -1
- package/dist/cjs/QuillProvider.js +2 -2
- package/dist/cjs/ReportBuilder.d.ts +9 -1
- package/dist/cjs/ReportBuilder.d.ts.map +1 -1
- package/dist/cjs/ReportBuilder.js +198 -80
- package/dist/cjs/SQLEditor.d.ts +5 -1
- package/dist/cjs/SQLEditor.d.ts.map +1 -1
- package/dist/cjs/SQLEditor.js +81 -18
- package/dist/cjs/Table.d.ts.map +1 -1
- package/dist/cjs/Table.js +3 -2
- package/dist/cjs/components/Chart/InternalChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/InternalChart.js +106 -27
- package/dist/cjs/components/Chart/PieChart.d.ts.map +1 -1
- package/dist/cjs/components/Chart/PieChart.js +10 -7
- package/dist/cjs/components/Dashboard/DashboardFilter.d.ts +3 -2
- package/dist/cjs/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DashboardFilter.js +65 -65
- package/dist/cjs/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/DataLoader.js +81 -34
- package/dist/cjs/components/Dashboard/MetricComponent.js +3 -3
- package/dist/cjs/components/Dashboard/util.d.ts.map +1 -1
- package/dist/cjs/components/Dashboard/util.js +6 -2
- package/dist/cjs/components/QuillMultiSelectWithCombo.d.ts +1 -1
- package/dist/cjs/components/QuillMultiSelectWithCombo.d.ts.map +1 -1
- package/dist/cjs/components/QuillMultiSelectWithCombo.js +17 -18
- package/dist/cjs/components/QuillTable.d.ts.map +1 -1
- package/dist/cjs/components/QuillTable.js +9 -1
- package/dist/cjs/components/ReportBuilder/FilterModal.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/FilterModal.js +25 -3
- package/dist/cjs/components/ReportBuilder/FilterStack.d.ts +2 -1
- package/dist/cjs/components/ReportBuilder/FilterStack.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/FilterStack.js +2 -2
- package/dist/cjs/components/ReportBuilder/convert.d.ts +1 -0
- package/dist/cjs/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/convert.js +54 -4
- package/dist/cjs/components/ReportBuilder/ui.d.ts +2 -1
- package/dist/cjs/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/cjs/components/ReportBuilder/ui.js +3 -2
- package/dist/cjs/components/UiComponents.d.ts +1 -0
- package/dist/cjs/components/UiComponents.d.ts.map +1 -1
- package/dist/cjs/hooks/useAskQuill.d.ts +1 -1
- package/dist/cjs/hooks/useAskQuill.d.ts.map +1 -1
- package/dist/cjs/hooks/useAskQuill.js +6 -5
- package/dist/cjs/hooks/useAstToFilterTree.d.ts +2 -1
- package/dist/cjs/hooks/useAstToFilterTree.d.ts.map +1 -1
- package/dist/cjs/hooks/useAstToFilterTree.js +3 -3
- package/dist/cjs/hooks/useDashboard.d.ts +5 -2
- package/dist/cjs/hooks/useDashboard.d.ts.map +1 -1
- package/dist/cjs/hooks/useDashboard.js +21 -7
- package/dist/cjs/hooks/useExport.d.ts.map +1 -1
- package/dist/cjs/hooks/useExport.js +6 -4
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts +8 -2
- package/dist/cjs/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/cjs/internals/ReportBuilder/PivotModal.js +59 -30
- package/dist/cjs/models/Client.d.ts +22 -3
- package/dist/cjs/models/Client.d.ts.map +1 -1
- package/dist/cjs/models/Dashboard.d.ts +1 -0
- package/dist/cjs/models/Dashboard.d.ts.map +1 -1
- package/dist/cjs/models/Report.d.ts +4 -0
- package/dist/cjs/models/Report.d.ts.map +1 -1
- package/dist/cjs/utils/astFilterProcessing.d.ts +3 -2
- package/dist/cjs/utils/astFilterProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/astFilterProcessing.js +3323 -977
- package/dist/cjs/utils/astProcessing.d.ts +1 -1
- package/dist/cjs/utils/astProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/astProcessing.js +3 -2
- package/dist/cjs/utils/client.d.ts +4 -2
- package/dist/cjs/utils/client.d.ts.map +1 -1
- package/dist/cjs/utils/client.js +47 -1
- package/dist/cjs/utils/columnProcessing.d.ts +3 -0
- package/dist/cjs/utils/columnProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/columnProcessing.js +34 -1
- package/dist/cjs/utils/dashboard.d.ts +4 -3
- package/dist/cjs/utils/dashboard.d.ts.map +1 -1
- package/dist/cjs/utils/dashboard.js +10 -91
- package/dist/cjs/utils/dataFetcher.d.ts +3 -1
- package/dist/cjs/utils/dataFetcher.d.ts.map +1 -1
- package/dist/cjs/utils/dataFetcher.js +66 -30
- package/dist/cjs/utils/filterProcessing.d.ts +1 -1
- package/dist/cjs/utils/filterProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/filterProcessing.js +2 -0
- package/dist/cjs/utils/pivotConstructor.d.ts +4 -1
- package/dist/cjs/utils/pivotConstructor.d.ts.map +1 -1
- package/dist/cjs/utils/pivotConstructor.js +7 -7
- package/dist/cjs/utils/pivotProcessing.d.ts +4 -1
- package/dist/cjs/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/pivotProcessing.js +27 -20
- package/dist/cjs/utils/queryConstructor.d.ts.map +1 -1
- package/dist/cjs/utils/queryConstructor.js +101 -85
- package/dist/cjs/utils/report.d.ts +17 -5
- package/dist/cjs/utils/report.d.ts.map +1 -1
- package/dist/cjs/utils/report.js +23 -23
- package/dist/cjs/utils/schema.d.ts.map +1 -1
- package/dist/cjs/utils/schema.js +21 -21
- package/dist/cjs/utils/tableProcessing.d.ts +37 -10
- package/dist/cjs/utils/tableProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/tableProcessing.js +45 -38
- package/dist/cjs/utils/tenants.d.ts +11 -0
- package/dist/cjs/utils/tenants.d.ts.map +1 -0
- package/dist/cjs/utils/tenants.js +13 -0
- package/dist/cjs/utils/textProcessing.d.ts +1 -0
- package/dist/cjs/utils/textProcessing.d.ts.map +1 -1
- package/dist/cjs/utils/textProcessing.js +49 -0
- package/dist/cjs/utils/validation.js +1 -1
- package/dist/esm/Chart.d.ts.map +1 -1
- package/dist/esm/Chart.js +1 -1
- package/dist/esm/ChartBuilder.d.ts +20 -2
- package/dist/esm/ChartBuilder.d.ts.map +1 -1
- package/dist/esm/ChartBuilder.js +131 -40
- package/dist/esm/ChartEditor.d.ts +5 -3
- package/dist/esm/ChartEditor.d.ts.map +1 -1
- package/dist/esm/ChartEditor.js +5 -6
- package/dist/esm/Context.d.ts +15 -4
- package/dist/esm/Context.d.ts.map +1 -1
- package/dist/esm/Context.js +36 -59
- package/dist/esm/Dashboard.d.ts +4 -0
- package/dist/esm/Dashboard.d.ts.map +1 -1
- package/dist/esm/Dashboard.js +79 -24
- package/dist/esm/QuillProvider.d.ts +12 -9
- package/dist/esm/QuillProvider.d.ts.map +1 -1
- package/dist/esm/QuillProvider.js +2 -2
- package/dist/esm/ReportBuilder.d.ts +9 -1
- package/dist/esm/ReportBuilder.d.ts.map +1 -1
- package/dist/esm/ReportBuilder.js +200 -84
- package/dist/esm/SQLEditor.d.ts +5 -1
- package/dist/esm/SQLEditor.d.ts.map +1 -1
- package/dist/esm/SQLEditor.js +80 -17
- package/dist/esm/Table.d.ts.map +1 -1
- package/dist/esm/Table.js +4 -3
- package/dist/esm/components/Chart/InternalChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/InternalChart.js +107 -28
- package/dist/esm/components/Chart/PieChart.d.ts.map +1 -1
- package/dist/esm/components/Chart/PieChart.js +10 -7
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts +3 -2
- package/dist/esm/components/Dashboard/DashboardFilter.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DashboardFilter.js +65 -65
- package/dist/esm/components/Dashboard/DataLoader.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/DataLoader.js +82 -35
- package/dist/esm/components/Dashboard/MetricComponent.js +3 -3
- package/dist/esm/components/Dashboard/util.d.ts.map +1 -1
- package/dist/esm/components/Dashboard/util.js +6 -2
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts +1 -1
- package/dist/esm/components/QuillMultiSelectWithCombo.d.ts.map +1 -1
- package/dist/esm/components/QuillMultiSelectWithCombo.js +17 -18
- package/dist/esm/components/QuillTable.d.ts.map +1 -1
- package/dist/esm/components/QuillTable.js +9 -1
- package/dist/esm/components/ReportBuilder/FilterModal.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/FilterModal.js +26 -4
- package/dist/esm/components/ReportBuilder/FilterStack.d.ts +2 -1
- package/dist/esm/components/ReportBuilder/FilterStack.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/FilterStack.js +2 -2
- package/dist/esm/components/ReportBuilder/convert.d.ts +1 -0
- package/dist/esm/components/ReportBuilder/convert.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/convert.js +54 -5
- package/dist/esm/components/ReportBuilder/ui.d.ts +2 -1
- package/dist/esm/components/ReportBuilder/ui.d.ts.map +1 -1
- package/dist/esm/components/ReportBuilder/ui.js +4 -3
- package/dist/esm/components/UiComponents.d.ts +1 -0
- package/dist/esm/components/UiComponents.d.ts.map +1 -1
- package/dist/esm/hooks/useAskQuill.d.ts +1 -1
- package/dist/esm/hooks/useAskQuill.d.ts.map +1 -1
- package/dist/esm/hooks/useAskQuill.js +7 -6
- package/dist/esm/hooks/useAstToFilterTree.d.ts +2 -1
- package/dist/esm/hooks/useAstToFilterTree.d.ts.map +1 -1
- package/dist/esm/hooks/useAstToFilterTree.js +3 -3
- package/dist/esm/hooks/useDashboard.d.ts +5 -2
- package/dist/esm/hooks/useDashboard.d.ts.map +1 -1
- package/dist/esm/hooks/useDashboard.js +21 -7
- package/dist/esm/hooks/useExport.d.ts.map +1 -1
- package/dist/esm/hooks/useExport.js +7 -5
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts +8 -2
- package/dist/esm/internals/ReportBuilder/PivotModal.d.ts.map +1 -1
- package/dist/esm/internals/ReportBuilder/PivotModal.js +59 -30
- package/dist/esm/models/Client.d.ts +22 -3
- package/dist/esm/models/Client.d.ts.map +1 -1
- package/dist/esm/models/Dashboard.d.ts +1 -0
- package/dist/esm/models/Dashboard.d.ts.map +1 -1
- package/dist/esm/models/Report.d.ts +4 -0
- package/dist/esm/models/Report.d.ts.map +1 -1
- package/dist/esm/utils/astFilterProcessing.d.ts +3 -2
- package/dist/esm/utils/astFilterProcessing.d.ts.map +1 -1
- package/dist/esm/utils/astFilterProcessing.js +3323 -977
- package/dist/esm/utils/astProcessing.d.ts +1 -1
- package/dist/esm/utils/astProcessing.d.ts.map +1 -1
- package/dist/esm/utils/astProcessing.js +4 -3
- package/dist/esm/utils/client.d.ts +4 -2
- package/dist/esm/utils/client.d.ts.map +1 -1
- package/dist/esm/utils/client.js +47 -1
- package/dist/esm/utils/columnProcessing.d.ts +3 -0
- package/dist/esm/utils/columnProcessing.d.ts.map +1 -1
- package/dist/esm/utils/columnProcessing.js +31 -1
- package/dist/esm/utils/dashboard.d.ts +4 -3
- package/dist/esm/utils/dashboard.d.ts.map +1 -1
- package/dist/esm/utils/dashboard.js +10 -90
- package/dist/esm/utils/dataFetcher.d.ts +3 -1
- package/dist/esm/utils/dataFetcher.d.ts.map +1 -1
- package/dist/esm/utils/dataFetcher.js +65 -29
- package/dist/esm/utils/filterProcessing.d.ts +1 -1
- package/dist/esm/utils/filterProcessing.d.ts.map +1 -1
- package/dist/esm/utils/filterProcessing.js +2 -0
- package/dist/esm/utils/pivotConstructor.d.ts +4 -1
- package/dist/esm/utils/pivotConstructor.d.ts.map +1 -1
- package/dist/esm/utils/pivotConstructor.js +8 -8
- package/dist/esm/utils/pivotProcessing.d.ts +4 -1
- package/dist/esm/utils/pivotProcessing.d.ts.map +1 -1
- package/dist/esm/utils/pivotProcessing.js +27 -20
- package/dist/esm/utils/queryConstructor.d.ts.map +1 -1
- package/dist/esm/utils/queryConstructor.js +101 -85
- package/dist/esm/utils/report.d.ts +17 -5
- package/dist/esm/utils/report.d.ts.map +1 -1
- package/dist/esm/utils/report.js +20 -23
- package/dist/esm/utils/schema.d.ts.map +1 -1
- package/dist/esm/utils/schema.js +21 -21
- package/dist/esm/utils/tableProcessing.d.ts +37 -10
- package/dist/esm/utils/tableProcessing.d.ts.map +1 -1
- package/dist/esm/utils/tableProcessing.js +46 -39
- package/dist/esm/utils/tenants.d.ts +11 -0
- package/dist/esm/utils/tenants.d.ts.map +1 -0
- package/dist/esm/utils/tenants.js +9 -0
- package/dist/esm/utils/textProcessing.d.ts +1 -0
- package/dist/esm/utils/textProcessing.d.ts.map +1 -1
- package/dist/esm/utils/textProcessing.js +48 -0
- package/dist/esm/utils/validation.js +1 -1
- package/package.json +1 -1
|
@@ -74,12 +74,13 @@ const constants_2 = require("./utils/constants");
|
|
|
74
74
|
* ### Report Builder API
|
|
75
75
|
* @see https://docs.quillsql.com/components/report-builder
|
|
76
76
|
*/
|
|
77
|
-
function ReportBuilder({ initialTableName = '', onSubmitEditReport = () => void null, onSubmitCreateReport = () => void null, onDiscardChanges = undefined, onSaveChanges = undefined, onCloseChartBuilder = undefined, destinationDashboard = undefined, organizationName = '', ButtonComponent = UiComponents_1.MemoizedButton, SecondaryButtonComponent = UiComponents_1.MemoizedSecondaryButton, DeleteButtonComponent = UiComponents_1.MemoizedDeleteButton, ModalComponent = UiComponents_1.MemoizedModal, TextInputComponent = UiComponents_2.QuillTextInput, SelectComponent = QuillSelect_1.QuillSelectComponent, MultiSelectComponent = QuillMultiSelectWithCombo_1.QuillMultiSelectComponentWithCombo, TableComponent = UiComponents_1.QuillTableReportBuilderComponent, PopoverComponent = UiComponents_1.MemoizedPopover, TabsComponent = UiComponents_1.QuillTabs,
|
|
77
|
+
function ReportBuilder({ initialTableName = '', onSubmitEditReport = () => void null, onSubmitCreateReport = () => void null, onDiscardChanges = undefined, onSaveChanges = undefined, onCloseChartBuilder = undefined, destinationDashboard = undefined, chartBuilderTitle = undefined, organizationName = '', ButtonComponent = UiComponents_1.MemoizedButton, SecondaryButtonComponent = UiComponents_1.MemoizedSecondaryButton, DeleteButtonComponent = UiComponents_1.MemoizedDeleteButton, ModalComponent = UiComponents_1.MemoizedModal, TextInputComponent = UiComponents_2.QuillTextInput, SelectComponent = QuillSelect_1.QuillSelectComponent, MultiSelectComponent = QuillMultiSelectWithCombo_1.QuillMultiSelectComponentWithCombo, TableComponent = UiComponents_1.QuillTableReportBuilderComponent, PopoverComponent = UiComponents_1.MemoizedPopover, TabsComponent = UiComponents_1.QuillTabs,
|
|
78
78
|
// CheckboxComponent = MemoizedCheckbox,
|
|
79
|
-
SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer, SelectColumnComponent = ui_1.QuillSelectColumn, DraggableColumnComponent = ui_1.QuillDraggableColumn, SidebarHeadingComponent = ui_1.QuillSidebarHeading, FilterPopoverComponent = ui_1.QuillFilterPopover, SortPopoverComponent = ui_1.QuillSortPopover, LimitPopoverComponent = ui_1.QuillLimitPopover, CardComponent = QuillCard_1.QuillCard, LabelComponent = UiComponents_1.MemoizedLabel, HeaderComponent = UiComponents_1.MemoizedHeader, SubHeaderComponent = UiComponents_1.MemoizedSubHeader, TextComponent = UiComponents_1.MemoizedText, ErrorMessageComponent = UiComponents_1.QuillErrorMessageComponent, ChartBuilderInputRowContainer = UiComponents_1.QuillChartBuilderInputRowContainer, ChartBuilderInputColumnContainer = UiComponents_1.QuillChartBuilderInputColumnContainer, PivotRowContainer = UiComponents_1.QuillPivotRowContainer, PivotColumnContainer = UiComponents_1.QuillPivotColumnContainer, LoadingComponent = UiComponents_1.QuillLoadingComponent, ColumnSearchEmptyState = UiComponents_1.QuillColumnSearchEmptyState, ChartBuilderFormContainer = UiComponents_1.QuillChartBuilderFormContainer, ChartBuilderModalComponent = UiComponents_1.MemoizedModal, isAdminEnabled = false, isAIEnabled = true, containerStyle, className, pivotRecommendationsEnabled = true, reportId, hideCopySQL = true, isChartBuilderHorizontalView = true, onClickChartElement, }) {
|
|
79
|
+
SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer, SelectColumnComponent = ui_1.QuillSelectColumn, DraggableColumnComponent = ui_1.QuillDraggableColumn, SidebarHeadingComponent = ui_1.QuillSidebarHeading, FilterPopoverComponent = ui_1.QuillFilterPopover, SortPopoverComponent = ui_1.QuillSortPopover, LimitPopoverComponent = ui_1.QuillLimitPopover, CardComponent = QuillCard_1.QuillCard, LabelComponent = UiComponents_1.MemoizedLabel, HeaderComponent = UiComponents_1.MemoizedHeader, SubHeaderComponent = UiComponents_1.MemoizedSubHeader, TextComponent = UiComponents_1.MemoizedText, ErrorMessageComponent = UiComponents_1.QuillErrorMessageComponent, ChartBuilderInputRowContainer = UiComponents_1.QuillChartBuilderInputRowContainer, ChartBuilderInputColumnContainer = UiComponents_1.QuillChartBuilderInputColumnContainer, PivotRowContainer = UiComponents_1.QuillPivotRowContainer, PivotColumnContainer = UiComponents_1.QuillPivotColumnContainer, LoadingComponent = UiComponents_1.QuillLoadingComponent, ColumnSearchEmptyState = UiComponents_1.QuillColumnSearchEmptyState, ChartBuilderFormContainer = UiComponents_1.QuillChartBuilderFormContainer, ChartBuilderModalComponent = UiComponents_1.MemoizedModal, isAdminEnabled = false, isAIEnabled = true, containerStyle, className, pivotRecommendationsEnabled = true, reportId, hideCopySQL = true, isChartBuilderHorizontalView = true, onClickChartElement, flagsList, }) {
|
|
80
80
|
const [dashboard, dashboardDispatch] = (0, react_1.useContext)(Context_1.DashboardContext);
|
|
81
81
|
const [schemaData] = (0, react_1.useContext)(Context_1.SchemaDataContext);
|
|
82
82
|
const { dashboardFilters } = (0, react_1.useContext)(Context_1.DashboardFiltersContext);
|
|
83
|
+
const { tenants } = (0, react_1.useContext)(Context_1.TenantContext);
|
|
83
84
|
const specificDashboardFilters = (0, react_1.useMemo)(() => {
|
|
84
85
|
if (!reportId)
|
|
85
86
|
return [];
|
|
@@ -88,6 +89,63 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
88
89
|
return [];
|
|
89
90
|
return Object.values(dashboardFilters[dashboardName] ?? {}).map((f) => f.filter);
|
|
90
91
|
}, [dashboardFilters, reportId, dashboard]);
|
|
92
|
+
const [client] = (0, react_1.useContext)(Context_1.ClientContext);
|
|
93
|
+
// const { dashboardConfig } = useContext(DashboardConfigContext);
|
|
94
|
+
// const flagsToAdd: { [tenantField: string]: string[] } = useMemo(() => {
|
|
95
|
+
// if (client && asSingleDatabaseTenant(client))
|
|
96
|
+
// return { 'QUILL_SINGLE_TENANT': flags ?? {} } as { [tenantField: string]: string[] };
|
|
97
|
+
// const tenantKeys =
|
|
98
|
+
// dashboardConfig[
|
|
99
|
+
// dashboard[reportId ?? '']?.dashboardName ?? destinationDashboard ?? ''
|
|
100
|
+
// ]?.config.tenantKeys ?? [];
|
|
101
|
+
// if (!tenantKeys.length) return {};
|
|
102
|
+
// if (
|
|
103
|
+
// tenants &&
|
|
104
|
+
// (typeof tenants[0] === 'string' || typeof tenants[0] === 'number')
|
|
105
|
+
// ) {
|
|
106
|
+
// const dashboardOwner = tenantKeys[0]!;
|
|
107
|
+
// const tenantIds = (client?.allTenantTypes as QuillTenant[])?.find(
|
|
108
|
+
// (tt) => dashboardOwner === tt.tenantField,
|
|
109
|
+
// )?.tenantIds;
|
|
110
|
+
// return {
|
|
111
|
+
// [dashboardOwner]:
|
|
112
|
+
// tenantIds
|
|
113
|
+
// ?.filter(
|
|
114
|
+
// (tt) =>
|
|
115
|
+
// (tenants as (string | number)[]).includes(tt.id) && tt.flag,
|
|
116
|
+
// )
|
|
117
|
+
// ?.map((tt) => tt.flag!) ?? [],
|
|
118
|
+
// };
|
|
119
|
+
// }
|
|
120
|
+
// const tenantKeysSet = new Set(tenantKeys);
|
|
121
|
+
// return (
|
|
122
|
+
// (
|
|
123
|
+
// tenants as
|
|
124
|
+
// | { tenantField: string; tenantIds: (string | number)[] }[]
|
|
125
|
+
// | undefined
|
|
126
|
+
// )
|
|
127
|
+
// ?.filter((t) => tenantKeysSet.has(t.tenantField))
|
|
128
|
+
// .reduce(
|
|
129
|
+
// (acc, t) => {
|
|
130
|
+
// const tenantIds = new Set(t.tenantIds);
|
|
131
|
+
// acc[t.tenantField] =
|
|
132
|
+
// (client?.allTenantTypes as QuillTenant[])
|
|
133
|
+
// ?.find((tt) => t.tenantField === tt.tenantField)
|
|
134
|
+
// ?.tenantIds?.filter((tt) => tenantIds.has(tt.id) && tt.flag)
|
|
135
|
+
// ?.map((tt) => tt.flag!) ?? [];
|
|
136
|
+
// return acc;
|
|
137
|
+
// },
|
|
138
|
+
// {} as { [tenantField: string]: string[] },
|
|
139
|
+
// ) ?? {}
|
|
140
|
+
// );
|
|
141
|
+
// }, [
|
|
142
|
+
// tenants,
|
|
143
|
+
// flags,
|
|
144
|
+
// dashboardConfig,
|
|
145
|
+
// destinationDashboard,
|
|
146
|
+
// dashboard[reportId ?? '']?.dashboardName,
|
|
147
|
+
// client?.allTenantTypes,
|
|
148
|
+
// ]);
|
|
91
149
|
const [reportInfo, setReportInfo] = (0, react_1.useState)(null);
|
|
92
150
|
const [aiPrompt, setAiPrompt] = (0, react_1.useState)('');
|
|
93
151
|
const [errorMessage, setErrorMessage] = (0, react_1.useState)('');
|
|
@@ -136,12 +194,10 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
136
194
|
/* eslint-disable-next-line */
|
|
137
195
|
const [pivotError, setPivotError] = (0, react_1.useState)(undefined);
|
|
138
196
|
const [dateRanges, setDateRanges] = (0, react_1.useState)(null);
|
|
139
|
-
const [client] = (0, react_1.useContext)(Context_1.ClientContext);
|
|
140
|
-
const [currentOrganizationId, setCurrentOrganizationId] = (0, react_1.useState)(client.organizationId);
|
|
141
197
|
const [fieldValuesMap, setFieldValuesMap] = (0, react_1.useState)({}); // Mapping of unique values per field, used in string filter 'in' and 'not in'
|
|
142
198
|
const [globalUniqueValues, setGlobalUniqueValues] = (0, react_1.useState)({});
|
|
143
199
|
const [globalUniqueValuesIsLoading, setGlobalUniqueValuesIsLoading] = (0, react_1.useState)(false);
|
|
144
|
-
const { filterTree, filterStack } = (0, useAstToFilterTree_1.default)(formData, client); // Stores the state of filters
|
|
200
|
+
const { filterTree, filterStack } = (0, useAstToFilterTree_1.default)(formData, client, columns); // Stores the state of filters
|
|
145
201
|
const [removingFilter, setRemovingFilter] = (0, react_1.useState)(false);
|
|
146
202
|
const [pivotRecommendationsEnabledState, setPivotRecommendationsEnabledState,] = (0, react_1.useState)(pivotRecommendationsEnabled);
|
|
147
203
|
const REPORT_BUILDER_PAGINATION = {
|
|
@@ -150,6 +206,15 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
150
206
|
rowsPerRequest: 1000,
|
|
151
207
|
};
|
|
152
208
|
const [unresolvedReportMessage, setUnresolvedReportMessage] = (0, react_1.useState)('');
|
|
209
|
+
const dashboardName = (0, react_1.useMemo)(() => {
|
|
210
|
+
if (destinationDashboard) {
|
|
211
|
+
return destinationDashboard;
|
|
212
|
+
}
|
|
213
|
+
if (!reportId) {
|
|
214
|
+
return undefined;
|
|
215
|
+
}
|
|
216
|
+
return dashboard[reportId]?.dashboardName;
|
|
217
|
+
}, [reportId, dashboard, destinationDashboard]);
|
|
153
218
|
const [filtersEnabled, setFiltersEnabled] = (0, react_1.useState)(!!reportId);
|
|
154
219
|
(0, react_1.useEffect)(() => {
|
|
155
220
|
if (!client) {
|
|
@@ -197,9 +262,9 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
197
262
|
window.removeEventListener('resize', handleResize);
|
|
198
263
|
};
|
|
199
264
|
}, []);
|
|
200
|
-
const updatePivot = async (changeField, fieldKey) => {
|
|
265
|
+
const updatePivot = async (changeField, fieldKey, prevValue) => {
|
|
201
266
|
const newPivot = (0, util_1.deepCopy)(pivot);
|
|
202
|
-
|
|
267
|
+
setPivotError(undefined);
|
|
203
268
|
// @ts-ignore
|
|
204
269
|
newPivot[fieldKey] = changeField;
|
|
205
270
|
if (fieldKey === 'rowField') {
|
|
@@ -217,12 +282,20 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
217
282
|
newPivot.sort = undefined;
|
|
218
283
|
}
|
|
219
284
|
}
|
|
285
|
+
const { valid, reason } = (0, pivotProcessing_1.isValidPivot)(newPivot);
|
|
286
|
+
if (!valid) {
|
|
287
|
+
setPivotError(reason);
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
setTableLoading(true);
|
|
220
291
|
let dateBucket = undefined;
|
|
221
292
|
const tempDateRange = dateRanges && dateRanges[newPivot.rowField || ''];
|
|
222
293
|
if (tempDateRange) {
|
|
223
294
|
dateBucket = (0, dates_1.getDateBucketFromRange)(tempDateRange.dateRange);
|
|
224
295
|
}
|
|
225
296
|
let distinctValuesForQuery = {};
|
|
297
|
+
const prevPivot = pivot;
|
|
298
|
+
const prevPivotData = pivotData;
|
|
226
299
|
setPivot(newPivot);
|
|
227
300
|
setPivotHint('');
|
|
228
301
|
if (newPivot.columnField) {
|
|
@@ -232,7 +305,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
232
305
|
label: newPivot.columnField,
|
|
233
306
|
format: 'string',
|
|
234
307
|
},
|
|
235
|
-
], activeQuery, [], client, schemaData.customFields ?? []);
|
|
308
|
+
], activeQuery, [], client, tenants, schemaData.customFields ?? [], undefined, dashboardName);
|
|
236
309
|
}
|
|
237
310
|
try {
|
|
238
311
|
const pivotedData = await (0, PivotModal_1.generatePivotTable)({
|
|
@@ -241,12 +314,33 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
241
314
|
report: tempReport,
|
|
242
315
|
client,
|
|
243
316
|
uniqueValues: distinctValuesForQuery,
|
|
317
|
+
dashboardName,
|
|
318
|
+
tenants,
|
|
244
319
|
});
|
|
245
320
|
setPivotData(pivotedData || []);
|
|
246
321
|
const formattedRows = formatRows(pivotedData.rows, columns, true, newPivot.aggregationType);
|
|
247
322
|
setFormattedRows(formattedRows);
|
|
248
323
|
}
|
|
249
324
|
catch (e) {
|
|
325
|
+
switch (fieldKey) {
|
|
326
|
+
case 'rowField':
|
|
327
|
+
setPivotRowField(prevValue);
|
|
328
|
+
break;
|
|
329
|
+
case 'columnField':
|
|
330
|
+
setPivotColumnField(prevValue);
|
|
331
|
+
break;
|
|
332
|
+
case 'valueField':
|
|
333
|
+
setPivotValueField(prevValue);
|
|
334
|
+
break;
|
|
335
|
+
case 'valueField2':
|
|
336
|
+
setPivotValueField2(prevValue);
|
|
337
|
+
break;
|
|
338
|
+
case 'aggregationType':
|
|
339
|
+
setPivotAggregation(prevValue);
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
setPivot(prevPivot);
|
|
343
|
+
setPivotData(prevPivotData);
|
|
250
344
|
if (e instanceof Error)
|
|
251
345
|
setPivotError(e.message);
|
|
252
346
|
}
|
|
@@ -284,9 +378,12 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
284
378
|
setDataDisplayed(false);
|
|
285
379
|
setRows([]);
|
|
286
380
|
setColumns([]);
|
|
381
|
+
setSelectedOrderedColumns([]);
|
|
287
382
|
setErrorMessage('');
|
|
383
|
+
setPivotError(undefined);
|
|
288
384
|
setFormattedRows([]);
|
|
289
|
-
|
|
385
|
+
setCurrentTable('');
|
|
386
|
+
setUniqueValues({});
|
|
290
387
|
setPivot(null);
|
|
291
388
|
setPivotHint('');
|
|
292
389
|
setPivotData(null);
|
|
@@ -295,7 +392,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
295
392
|
};
|
|
296
393
|
const fetchGlobalUniqueValues = async (columns, currentTable, client) => {
|
|
297
394
|
setGlobalUniqueValuesIsLoading(true);
|
|
298
|
-
const global = await (0, tableProcessing_1.getUniqueStringValues)(columns, currentTable, client, schemaData.customFields, undefined, true);
|
|
395
|
+
const global = await (0, tableProcessing_1.getUniqueStringValues)(columns, currentTable, client, tenants, schemaData.customFields, undefined, true, undefined, dashboardName);
|
|
299
396
|
setGlobalUniqueValues((0, filterProcessing_1.uniqueValuesToStringMap)(global));
|
|
300
397
|
setGlobalUniqueValuesIsLoading(false);
|
|
301
398
|
};
|
|
@@ -418,7 +515,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
418
515
|
const dateColumnNames = dateColumns.map((column) => {
|
|
419
516
|
return column.field;
|
|
420
517
|
});
|
|
421
|
-
const dateRanges = await (0, tableProcessing_1.getQueryDateRangeByColumns)(dateColumns, `Select ${dateColumnNames.join(', ')} from ${tableName}`, client, schemaData.customFields ?? []);
|
|
518
|
+
const dateRanges = await (0, tableProcessing_1.getQueryDateRangeByColumns)(dateColumns, `Select ${dateColumnNames.join(', ')} from ${tableName}`, client, tenants, schemaData.customFields ?? [], dashboardName);
|
|
422
519
|
return dateRanges;
|
|
423
520
|
};
|
|
424
521
|
// It's just like getColumnsInPivot but we expand the columnField
|
|
@@ -448,7 +545,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
448
545
|
const tableInfo = tables.find((tableInfo) => tableInfo.name === initialTableName);
|
|
449
546
|
if (tableInfo) {
|
|
450
547
|
setUniqueValuesIsLoading(true);
|
|
451
|
-
const newUniqueValues = await (0, tableProcessing_1.getUniqueStringValues)(tableInfo.columns, initialTableName, client, schemaData.customFields, uniqueValues, true);
|
|
548
|
+
const newUniqueValues = await (0, tableProcessing_1.getUniqueStringValues)(tableInfo.columns, initialTableName, client, tenants, schemaData.customFields, uniqueValues, true, undefined, dashboardName);
|
|
452
549
|
if ((0, crypto_1.hashCode)(uniqueValues) !== (0, crypto_1.hashCode)(newUniqueValues)) {
|
|
453
550
|
setUniqueValues(newUniqueValues);
|
|
454
551
|
updateFieldValuesMap(newUniqueValues, initialTableName);
|
|
@@ -611,16 +708,6 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
611
708
|
const [numberOfRows, setNumberOfRows] = (0, react_1.useState)(0);
|
|
612
709
|
const [rowCountIsLoading, setRowCountIsLoading] = (0, react_1.useState)(false);
|
|
613
710
|
const [tableLoading, setTableLoading] = (0, react_1.useState)(false);
|
|
614
|
-
// const initialData = useMemo(() => ({
|
|
615
|
-
// rows,
|
|
616
|
-
// columns,
|
|
617
|
-
// itemQuery: tempReport.itemQuery ?? [],
|
|
618
|
-
// rowCount: numberOfRows ?? 0,
|
|
619
|
-
// dashboardName: destinationDashboard ?? reportInfo?.dashboardName,
|
|
620
|
-
// query: activeQuery,
|
|
621
|
-
// pivot: pivot,
|
|
622
|
-
// pivotData: pivotData,
|
|
623
|
-
// }), [rows, columns, tempReport, activeQuery, pivot, pivotData, numberOfRows, destinationDashboard, reportInfo]);
|
|
624
711
|
const onPageChange = (page, initiator = 'ReportBuilder') => {
|
|
625
712
|
const pagination = initiator === 'ReportBuilder'
|
|
626
713
|
? REPORT_BUILDER_PAGINATION
|
|
@@ -636,36 +723,30 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
636
723
|
setPreviousPage(page);
|
|
637
724
|
}
|
|
638
725
|
};
|
|
639
|
-
const onSortChange = (sort
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
};
|
|
655
|
-
}
|
|
656
|
-
else {
|
|
657
|
-
newAst.orderby.push({
|
|
658
|
-
expr: { type: 'column_ref', column: sort.field },
|
|
659
|
-
type: sort.direction.toUpperCase(),
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
setBaseAst((0, util_1.deepCopy)(newAst));
|
|
663
|
-
fetchReportFromASTHelper(newAst, newAst.where);
|
|
726
|
+
const onSortChange = (sort) => {
|
|
727
|
+
if ((0, paginationProcessing_1.shouldSortInMemory)(REPORT_BUILDER_PAGINATION, numberOfRows) ||
|
|
728
|
+
(pivot && pivot.rowField !== sort.field)) {
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
const newAst = { ...baseAst };
|
|
732
|
+
if (!newAst.orderby) {
|
|
733
|
+
newAst.orderby = [];
|
|
734
|
+
}
|
|
735
|
+
const existingSortIndex = newAst.orderby.findIndex((item) => (0, astFilterProcessing_1.getFieldFromExpression)(item.expr) === sort.field);
|
|
736
|
+
if (existingSortIndex !== -1) {
|
|
737
|
+
newAst.orderby[existingSortIndex] = {
|
|
738
|
+
expr: { type: 'column_ref', column: sort.field },
|
|
739
|
+
type: sort.direction.toUpperCase(),
|
|
740
|
+
};
|
|
664
741
|
}
|
|
665
742
|
else {
|
|
666
|
-
|
|
743
|
+
newAst.orderby.push({
|
|
744
|
+
expr: { type: 'column_ref', column: sort.field },
|
|
745
|
+
type: sort.direction.toUpperCase(),
|
|
746
|
+
});
|
|
667
747
|
}
|
|
668
|
-
|
|
748
|
+
setBaseAst((0, util_1.deepCopy)(newAst));
|
|
749
|
+
fetchReportFromASTHelper(newAst, newAst.where);
|
|
669
750
|
setPreviousPage(0);
|
|
670
751
|
};
|
|
671
752
|
const fetchRowCount = async (processing, includeFilters) => {
|
|
@@ -673,9 +754,9 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
673
754
|
return;
|
|
674
755
|
}
|
|
675
756
|
setRowCountIsLoading(true);
|
|
676
|
-
const tableInfo = await (0, tableProcessing_1.fetchResultsByQuery)(activeQuery, client, processing, schemaData.customFields, includeFilters ? specificDashboardFilters : undefined, includeFilters
|
|
757
|
+
const tableInfo = await (0, tableProcessing_1.fetchResultsByQuery)(activeQuery, client, tenants, processing, schemaData.customFields, includeFilters ? specificDashboardFilters : undefined, includeFilters
|
|
677
758
|
? (tempReport.dateField ?? reportInfo?.dateField)
|
|
678
|
-
: undefined, false, true);
|
|
759
|
+
: undefined, false, true, undefined, dashboardName);
|
|
679
760
|
if (tableInfo.rowCount) {
|
|
680
761
|
setNumberOfRows(tableInfo.rowCount);
|
|
681
762
|
// @ts-ignore
|
|
@@ -688,7 +769,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
688
769
|
};
|
|
689
770
|
const fetchRowCountFromAST = async (ast, where) => {
|
|
690
771
|
setRowCountIsLoading(true);
|
|
691
|
-
const tableData = await (0, tableProcessing_1.fetchTableByAST)({ ...ast, where }, client, { page: REPORT_BUILDER_PAGINATION }, undefined, false, true);
|
|
772
|
+
const tableData = await (0, tableProcessing_1.fetchTableByAST)({ ...ast, where }, client, tenants, { page: REPORT_BUILDER_PAGINATION }, undefined, false, true, dashboardName);
|
|
692
773
|
if (tableData.rowCount) {
|
|
693
774
|
setNumberOfRows(tableData.rowCount);
|
|
694
775
|
// @ts-ignore
|
|
@@ -703,7 +784,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
703
784
|
try {
|
|
704
785
|
setErrorMessage('');
|
|
705
786
|
setTableLoading(true);
|
|
706
|
-
const tableInfo = await (0, tableProcessing_1.fetchResultsByQuery)(activeQuery, client, processing, schemaData.customFields, undefined, undefined, true);
|
|
787
|
+
const tableInfo = await (0, tableProcessing_1.fetchResultsByQuery)(activeQuery, client, tenants, processing, schemaData.customFields, undefined, undefined, true, undefined, undefined, dashboardName);
|
|
707
788
|
if (tableInfo.error) {
|
|
708
789
|
throw new Error(tableInfo.error);
|
|
709
790
|
}
|
|
@@ -711,7 +792,6 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
711
792
|
throw new Error('No data found');
|
|
712
793
|
}
|
|
713
794
|
fetchRowCount(processing, includeFilters);
|
|
714
|
-
setCurrentProcessing(processing);
|
|
715
795
|
let tempRows = [...rows, ...tableInfo.rows];
|
|
716
796
|
if (resetRows) {
|
|
717
797
|
tempRows = tableInfo.rows;
|
|
@@ -770,7 +850,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
770
850
|
let reportBuilderInfo = undefined;
|
|
771
851
|
try {
|
|
772
852
|
setLoading(true);
|
|
773
|
-
reportBuilderInfo = await (0, report_1.fetchReportBuilderDataFromAST)(baseAst, curFormData, curSchema ?? schemaData.schema, client, curPivot ?? pivot, formData, currentTable, { uniqueStrings: uniqueValues, dateRanges: dateRanges ?? {} }, previousReport ?? reportInfo ?? undefined, schemaData.customFields, true, true, { page: REPORT_BUILDER_PAGINATION });
|
|
853
|
+
reportBuilderInfo = await (0, report_1.fetchReportBuilderDataFromAST)(baseAst, curFormData, curSchema ?? schemaData.schema, client, tenants, curPivot ?? pivot, formData, currentTable, { uniqueStrings: uniqueValues, dateRanges: dateRanges ?? {} }, previousReport ?? reportInfo ?? undefined, schemaData.customFields, true, true, { page: REPORT_BUILDER_PAGINATION }, dashboardName);
|
|
774
854
|
if (reportBuilderInfo.error) {
|
|
775
855
|
throw new Error(reportBuilderInfo.error);
|
|
776
856
|
}
|
|
@@ -786,6 +866,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
786
866
|
return { error: true, message: 'Failed to fetch', rows: [] };
|
|
787
867
|
}
|
|
788
868
|
if (!reportBuilderInfo) {
|
|
869
|
+
setLoading(false);
|
|
789
870
|
setErrorMessage('Failed to fetch');
|
|
790
871
|
return;
|
|
791
872
|
}
|
|
@@ -797,7 +878,6 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
797
878
|
});
|
|
798
879
|
const prevFormData = formData;
|
|
799
880
|
const prevTable = currentTable;
|
|
800
|
-
const prevOrganization = currentOrganizationId;
|
|
801
881
|
setRows(reportBuilderInfo.rows);
|
|
802
882
|
setPreviousPage(0);
|
|
803
883
|
if (!(client.databaseType.toLowerCase() === 'bigquery') ||
|
|
@@ -805,6 +885,9 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
805
885
|
setColumns(reportBuilderInfo.columns);
|
|
806
886
|
setSelectedColumns(reportBuilderInfoColumns);
|
|
807
887
|
}
|
|
888
|
+
if (prevTable !== reportBuilderInfo.table) {
|
|
889
|
+
setSelectedOrderedColumns([]); // reset selected ordered columns
|
|
890
|
+
}
|
|
808
891
|
setNumberOfRows(reportBuilderInfo.rowCount);
|
|
809
892
|
setPivot(reportBuilderInfo.pivot);
|
|
810
893
|
if (!keepPivotHint) {
|
|
@@ -815,7 +898,6 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
815
898
|
setFormattedRows(reportBuilderInfo.formattedRows);
|
|
816
899
|
setDataDisplayed(true);
|
|
817
900
|
setCurrentTable(reportBuilderInfo.table);
|
|
818
|
-
setCurrentOrganizationId(client.organizationId);
|
|
819
901
|
setFormData(curFormData);
|
|
820
902
|
if (reportBuilderInfo.pivot) {
|
|
821
903
|
setPivotRowField(reportBuilderInfo.pivot.rowField);
|
|
@@ -851,8 +933,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
851
933
|
}
|
|
852
934
|
// fetch unique values after everything else since it is the most expensive
|
|
853
935
|
if (prevTable !== reportBuilderInfo.table ||
|
|
854
|
-
!(0, fast_deep_equal_1.default)(prevFormData, curFormData)
|
|
855
|
-
prevOrganization !== client.organizationId) {
|
|
936
|
+
!(0, fast_deep_equal_1.default)(prevFormData, curFormData)) {
|
|
856
937
|
try {
|
|
857
938
|
setUniqueValuesIsLoading(true);
|
|
858
939
|
if (reportBuilderInfo.pivot) {
|
|
@@ -861,7 +942,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
861
942
|
if (!tableInfo) {
|
|
862
943
|
throw new Error('Table info not found');
|
|
863
944
|
}
|
|
864
|
-
const uniqueStrings = await (0, tableProcessing_1.getUniqueStringValues)(tableInfo.columns, reportBuilderInfo.table, client, schemaData.customFields, undefined, true, query);
|
|
945
|
+
const uniqueStrings = await (0, tableProcessing_1.getUniqueStringValues)(tableInfo.columns, reportBuilderInfo.table, client, tenants, schemaData.customFields, undefined, true, query, dashboardName);
|
|
865
946
|
const newUnique = updateUniqueValue(uniqueStrings, reportBuilderInfo.table);
|
|
866
947
|
let pivotChanged = false;
|
|
867
948
|
let newPivot;
|
|
@@ -915,7 +996,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
915
996
|
setLoading(true);
|
|
916
997
|
setAskAILoading(true);
|
|
917
998
|
setErrorMessage('');
|
|
918
|
-
astInfo = await (0, astProcessing_1.fetchAndProcessASTFromPrompt)(prompt, schemaData.schema, client, pivot, activeQuery, currentTable);
|
|
999
|
+
astInfo = await (0, astProcessing_1.fetchAndProcessASTFromPrompt)(prompt, schemaData.schema, client, pivot, activeQuery, currentTable, dashboardName);
|
|
919
1000
|
if (astInfo.error) {
|
|
920
1001
|
throw new Error(astInfo.error);
|
|
921
1002
|
}
|
|
@@ -935,8 +1016,13 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
935
1016
|
astInfo.pivot = null;
|
|
936
1017
|
astInfo.ast.groupby = null;
|
|
937
1018
|
}
|
|
1019
|
+
const _tables = (0, ast_1.getTableNames)(astInfo.ast);
|
|
1020
|
+
const _table = _tables[0] ? _tables[0] : '';
|
|
1021
|
+
const _columns = schemaData.schema.find((table) => {
|
|
1022
|
+
return table.name === _table;
|
|
1023
|
+
})?.columns;
|
|
938
1024
|
// parse the whereAst first
|
|
939
|
-
const filterTree = (0, astFilterProcessing_1.astToFilterTree)(astInfo.whereAST, client.databaseType?.toLowerCase());
|
|
1025
|
+
const filterTree = (0, astFilterProcessing_1.astToFilterTree)(astInfo.whereAST, client.databaseType?.toLowerCase(), _columns);
|
|
940
1026
|
const cleanAst = filterTree
|
|
941
1027
|
? (0, astFilterProcessing_1.filterTreeToAst)(filterTree, client.databaseType?.toLowerCase())
|
|
942
1028
|
: null;
|
|
@@ -978,7 +1064,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
978
1064
|
return { pivot: null, hint: '' };
|
|
979
1065
|
};
|
|
980
1066
|
const isValidPivotForReport = (pivot, uniqueValuesForPivot, reportTable, reportColumns) => {
|
|
981
|
-
if (!(0, pivotProcessing_1.isValidPivot)(pivot)) {
|
|
1067
|
+
if (!(0, pivotProcessing_1.isValidPivot)(pivot).valid) {
|
|
982
1068
|
return false;
|
|
983
1069
|
}
|
|
984
1070
|
const uniqueValuesToCheck = uniqueValuesForPivot ?? uniqueValues;
|
|
@@ -1161,7 +1247,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1161
1247
|
flexDirection: 'column',
|
|
1162
1248
|
gap: 8,
|
|
1163
1249
|
marginBottom: 12,
|
|
1164
|
-
}, children: (0, jsx_runtime_1.jsx)(FilterStack_1.default, { client: client, filterStack: filterStack, filterTree: filterTree, defaultAST: constants_1.defaultAST, baseAst: baseAst, setBaseAst: setBaseAst, setFormData: setFormData, fetchSqlQuery: fetchSqlQuery, schemaData: schemaData, defaultColumn: constants_1.defaultColumn, defaultTable: constants_1.defaultTable, currentTable: currentTable, initialTableName: initialTableName, globalUniqueValues: globalUniqueValues, globalUniqueValuesIsLoading: globalUniqueValuesIsLoading, columns: columns, removingFilter: removingFilter, setRemovingFilter: setRemovingFilter, TabsComponent: TabsComponent, FilterPopoverComponent: FilterPopoverComponent, FilterModal: FilterModal_1.default, ButtonComponent: ButtonComponent, SecondaryButtonComponent: SecondaryButtonComponent, SelectComponent: SelectComponent, TextInputComponent: TextInputComponent, MultiSelectComponent: MultiSelectComponent, actionsEnabled: !tableLoading && !loading }) })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1250
|
+
}, children: (0, jsx_runtime_1.jsx)(FilterStack_1.default, { client: client, filterStack: filterStack, filterTree: filterTree, defaultAST: constants_1.defaultAST, baseAst: baseAst, setBaseAst: setBaseAst, setFormData: setFormData, fetchSqlQuery: fetchSqlQuery, schemaData: schemaData, defaultColumn: constants_1.defaultColumn, defaultTable: constants_1.defaultTable, currentTable: currentTable, initialTableName: initialTableName, globalUniqueValues: globalUniqueValues, globalUniqueValuesIsLoading: globalUniqueValuesIsLoading, columns: columns, removingFilter: removingFilter, setRemovingFilter: setRemovingFilter, TabsComponent: TabsComponent, FilterPopoverComponent: FilterPopoverComponent, FilterModal: FilterModal_1.default, ButtonComponent: ButtonComponent, SecondaryButtonComponent: SecondaryButtonComponent, SelectComponent: SelectComponent, TextInputComponent: TextInputComponent, MultiSelectComponent: MultiSelectComponent, actionsEnabled: !tableLoading && !loading, dashboardName: dashboardName }) })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1165
1251
|
display: 'flex',
|
|
1166
1252
|
flexDirection: 'column',
|
|
1167
1253
|
alignItems: 'flex-start',
|
|
@@ -1234,6 +1320,8 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1234
1320
|
report: tempReport,
|
|
1235
1321
|
client,
|
|
1236
1322
|
uniqueValues,
|
|
1323
|
+
dashboardName,
|
|
1324
|
+
tenants,
|
|
1237
1325
|
});
|
|
1238
1326
|
}
|
|
1239
1327
|
setPivotData(pivotTable || []);
|
|
@@ -1249,23 +1337,29 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1249
1337
|
finally {
|
|
1250
1338
|
setTableLoading(false);
|
|
1251
1339
|
}
|
|
1252
|
-
}, selectPivotOnEdit: true, showTrigger: !pivot, theme: theme, LabelComponent: LabelComponent, HeaderComponent: HeaderComponent, dateRange: undefined, pivotCountRequest: 4, query: activeQuery, initialUniqueValues: uniqueValues[currentTable], uniqueValuesIsLoading: uniqueValuesIsLoading, disabled: !baseAst || !dataDisplayed || tableLoading || loading, pivotRecommendationsEnabled: pivotRecommendationsEnabledState, report: tempReport }), pivot && ((0, jsx_runtime_1.jsx)(PivotForm_1.default, { columns: columns, uniqueValues: uniqueValues[currentTable], uniqueValuesIsLoading: uniqueValuesIsLoading, setPivotRowField: (value) => {
|
|
1340
|
+
}, selectPivotOnEdit: true, showTrigger: !pivot, theme: theme, LabelComponent: LabelComponent, HeaderComponent: HeaderComponent, dateRange: undefined, pivotCountRequest: 4, query: activeQuery, initialUniqueValues: uniqueValues[currentTable], uniqueValuesIsLoading: uniqueValuesIsLoading, disabled: !baseAst || !dataDisplayed || tableLoading || loading, pivotRecommendationsEnabled: pivotRecommendationsEnabledState, report: tempReport, dashboardName: dashboardName }), pivot && ((0, jsx_runtime_1.jsx)(PivotForm_1.default, { columns: columns, uniqueValues: uniqueValues[currentTable], uniqueValuesIsLoading: uniqueValuesIsLoading, setPivotRowField: (value) => {
|
|
1341
|
+
const prev = pivotRowField;
|
|
1253
1342
|
setPivotRowField(value);
|
|
1254
|
-
updatePivot(value, 'rowField');
|
|
1343
|
+
updatePivot(value, 'rowField', prev);
|
|
1255
1344
|
}, setPivotColumnField: (value) => {
|
|
1345
|
+
const prev = pivotColumnField;
|
|
1256
1346
|
setPivotColumnField(value);
|
|
1257
|
-
updatePivot(value, 'columnField');
|
|
1347
|
+
updatePivot(value, 'columnField', prev);
|
|
1258
1348
|
}, setPivotValueField: (value) => {
|
|
1349
|
+
const prev = pivotValueField;
|
|
1259
1350
|
setPivotValueField(value);
|
|
1260
|
-
updatePivot(value, 'valueField');
|
|
1351
|
+
updatePivot(value, 'valueField', prev);
|
|
1261
1352
|
}, setPivotValueField2: (value) => {
|
|
1353
|
+
const prev = pivotValueField2;
|
|
1262
1354
|
setPivotValueField2(value);
|
|
1263
|
-
updatePivot(value, 'valueField2');
|
|
1355
|
+
updatePivot(value, 'valueField2', prev);
|
|
1264
1356
|
}, setPivotAggregation: (value) => {
|
|
1357
|
+
const prev = pivotAggregation;
|
|
1265
1358
|
setPivotAggregation(value);
|
|
1266
|
-
updatePivot(value, 'aggregationType');
|
|
1359
|
+
updatePivot(value, 'aggregationType', prev);
|
|
1267
1360
|
}, onDelete: () => {
|
|
1268
1361
|
setPivot(null);
|
|
1362
|
+
setPivotError(undefined);
|
|
1269
1363
|
setPivotHint('');
|
|
1270
1364
|
setPivotData([]);
|
|
1271
1365
|
const formattedRows = formatRows(rows, columns, false);
|
|
@@ -1309,6 +1403,8 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1309
1403
|
report: tempReport,
|
|
1310
1404
|
client,
|
|
1311
1405
|
uniqueValues: uniqueValues[currentTable],
|
|
1406
|
+
dashboardName,
|
|
1407
|
+
tenants,
|
|
1312
1408
|
});
|
|
1313
1409
|
setPivotData(pivotedData || []);
|
|
1314
1410
|
const formattedRows = formatRows(pivotedData.rows, columns, true, pivot.aggregationType, dateBucket);
|
|
@@ -1356,6 +1452,8 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1356
1452
|
report: tempReport,
|
|
1357
1453
|
client,
|
|
1358
1454
|
uniqueValues: uniqueValues[currentTable],
|
|
1455
|
+
dashboardName,
|
|
1456
|
+
tenants,
|
|
1359
1457
|
});
|
|
1360
1458
|
setPivotData(pivotedData || []);
|
|
1361
1459
|
const formattedRows = formatRows(pivotedData.rows, columns, true, pivot.aggregationType, dateBucket);
|
|
@@ -1468,6 +1566,8 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1468
1566
|
report: tempReport,
|
|
1469
1567
|
client,
|
|
1470
1568
|
uniqueValues: uniqueValues[currentTable],
|
|
1569
|
+
dashboardName,
|
|
1570
|
+
tenants,
|
|
1471
1571
|
});
|
|
1472
1572
|
setErrorMessage('');
|
|
1473
1573
|
setPivotData(pivotedData || []);
|
|
@@ -1581,7 +1681,7 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1581
1681
|
field: c,
|
|
1582
1682
|
};
|
|
1583
1683
|
}), onPageChange: onPageChange, onSortChange: (sort) => {
|
|
1584
|
-
onSortChange(sort
|
|
1684
|
+
onSortChange(sort);
|
|
1585
1685
|
}, containerStyle: {
|
|
1586
1686
|
maxHeight: Math.max(window.innerHeight - 290, 75 + Math.min(Math.max(10, rows.length), 20) * 37),
|
|
1587
1687
|
} })), (0, jsx_runtime_1.jsxs)("div", { style: {
|
|
@@ -1590,14 +1690,15 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1590
1690
|
gap: '12px',
|
|
1591
1691
|
width: '100%',
|
|
1592
1692
|
marginTop: 'auto',
|
|
1593
|
-
|
|
1693
|
+
alignItems: 'center',
|
|
1694
|
+
}, children: [errorMessage || pivotError ? ((0, jsx_runtime_1.jsxs)("div", { style: {
|
|
1594
1695
|
display: 'flex',
|
|
1595
1696
|
flexDirection: 'row',
|
|
1596
1697
|
overflow: 'hidden',
|
|
1597
1698
|
width: '100%',
|
|
1598
1699
|
gap: 12,
|
|
1599
1700
|
alignItems: 'center',
|
|
1600
|
-
}, children: [(0, jsx_runtime_1.jsx)(ErrorMessageComponent, { errorMessage: errorMessage }), (0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { onClick: () => {
|
|
1701
|
+
}, children: [(0, jsx_runtime_1.jsx)(ErrorMessageComponent, { errorMessage: errorMessage || pivotError || '' }), (0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { onClick: () => {
|
|
1601
1702
|
fetchAstFromPromptHelper();
|
|
1602
1703
|
}, label: 'Retry' }), (0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { onClick: clearAllState, label: 'Reset' })] })) : ((0, jsx_runtime_1.jsx)("div", { style: { width: '100%' } })), baseAst && dataDisplayed && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [onDiscardChanges && ((0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { onClick: onDiscardChanges, label: "Discard changes" })), !hideCopySQL && ((0, jsx_runtime_1.jsx)(SecondaryButtonComponent, { label: isCopying ? 'Copied' : 'Copy SQL', onClick: () => copySQLToClipboard() })), (0, jsx_runtime_1.jsx)(ButtonComponent, { onClick: async () => {
|
|
1603
1704
|
onSaveChanges && onSaveChanges();
|
|
@@ -1615,27 +1716,44 @@ SidebarComponent = ui_1.QuillSidebar, ContainerComponent = ui_1.CustomContainer,
|
|
|
1615
1716
|
yAxisFields: reportInfo?.pivot && !pivot
|
|
1616
1717
|
? []
|
|
1617
1718
|
: reportInfo?.yAxisFields,
|
|
1618
|
-
columns:
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1719
|
+
columns: selectedOrderedColumns.length > 0
|
|
1720
|
+
? selectedOrderedColumns
|
|
1721
|
+
.map((columnName) => {
|
|
1722
|
+
return columns.find((col) => col.field === columnName);
|
|
1723
|
+
})
|
|
1724
|
+
.filter((col) => col !== undefined)
|
|
1725
|
+
.map((c) => reportInfo?.columns.find((col) => col.field === c.field))
|
|
1726
|
+
.filter((col) => col !== undefined)
|
|
1727
|
+
: reportInfo?.columns.filter((col) => {
|
|
1728
|
+
return columns.find((c) => {
|
|
1729
|
+
return col.field === c.field;
|
|
1730
|
+
});
|
|
1731
|
+
}),
|
|
1623
1732
|
queryString: activeQuery,
|
|
1624
1733
|
rows: rows,
|
|
1625
1734
|
pivotRows: pivotData?.rows,
|
|
1626
1735
|
pivotColumns: pivotData?.columns,
|
|
1736
|
+
flags: reportInfo?.flags ??
|
|
1737
|
+
tempReport?.flags
|
|
1738
|
+
// flagsToAdd,
|
|
1627
1739
|
}
|
|
1628
1740
|
: {
|
|
1629
1741
|
...tempReport,
|
|
1630
1742
|
id: Report_1.TEMP_REPORT_ID,
|
|
1743
|
+
flags: tempReport?.flags,
|
|
1631
1744
|
}),
|
|
1632
1745
|
},
|
|
1633
1746
|
});
|
|
1634
1747
|
setIsChartBuilderOpen(true);
|
|
1635
1748
|
}, disabled: !!errorMessage ||
|
|
1749
|
+
!!pivotError ||
|
|
1636
1750
|
tableLoading ||
|
|
1637
1751
|
loading ||
|
|
1638
|
-
unresolvedReportMessage, label: reportId ? 'Save changes' : 'Add to dashboard', tooltipText: unresolvedReportMessage })] }))] })] }), (0, jsx_runtime_1.jsx)("style", { children: `body{margin:0;}` })] })), (!isChartBuilderHorizontalView || isChartBuilderOpen) && ((0, jsx_runtime_1.jsx)(ChartBuilder_1.ChartBuilderWithModal, { reportId: reportId, isAdmin: isAdminEnabled, title:
|
|
1752
|
+
unresolvedReportMessage, label: reportId ? 'Save changes' : 'Add to dashboard', tooltipText: unresolvedReportMessage })] }))] })] }), (0, jsx_runtime_1.jsx)("style", { children: `body{margin:0;}` })] })), (!isChartBuilderHorizontalView || isChartBuilderOpen) && ((0, jsx_runtime_1.jsx)(ChartBuilder_1.ChartBuilderWithModal, { reportId: reportId, isAdmin: isAdminEnabled, title: chartBuilderTitle
|
|
1753
|
+
? chartBuilderTitle
|
|
1754
|
+
: reportId
|
|
1755
|
+
? 'Save changes'
|
|
1756
|
+
: 'Add to dashboard', isHorizontalView: true, isOpen: isChartBuilderOpen, setIsOpen: setIsChartBuilderOpen, onAddToDashboardComplete: reportId ? onSubmitEditReport : onSubmitCreateReport, organizationName: organizationName, initialUniqueValues: uniqueValues[currentTable], initialUniqueValuesIsLoading: uniqueValuesIsLoading, pivotRecommendationsEnabled: pivotRecommendationsEnabledState, SelectComponent: SelectComponent, TextInputComponent: TextInputComponent, ButtonComponent: ButtonComponent, SecondaryButtonComponent: SecondaryButtonComponent, HeaderComponent: HeaderComponent, SubHeaderComponent: SubHeaderComponent, LabelComponent: LabelComponent, TextComponent: TextComponent, CardComponent: CardComponent, ModalComponent: ChartBuilderModalComponent, PopoverComponent: PopoverComponent, TableComponent: TableComponent, DeleteButtonComponent: DeleteButtonComponent, LoadingComponent: LoadingComponent, ChartBuilderInputRowContainer: ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer: ChartBuilderInputColumnContainer, FormContainer: ChartBuilderFormContainer, hideDateRangeFilter: true, buttonLabel: !!reportId ? 'Save changes' : 'Add to dashboard', onClickChartElement: onClickChartElement, filtersEnabled: filtersEnabled, onFiltersEnabledChanged: (enabled) => {
|
|
1639
1757
|
setFiltersEnabled(enabled);
|
|
1640
|
-
}, isEditingMode: true }))] }));
|
|
1758
|
+
}, isEditingMode: true, flagsList: flagsList }))] }));
|
|
1641
1759
|
}
|
package/dist/cjs/SQLEditor.d.ts
CHANGED
|
@@ -249,6 +249,10 @@ export interface SQLEditorProps {
|
|
|
249
249
|
* Styles the top-level container of the SQLEditor.
|
|
250
250
|
*/
|
|
251
251
|
containerStyle?: React.CSSProperties;
|
|
252
|
+
/**
|
|
253
|
+
* A list of flags that can be applied to the resulting report (for single tenant per database setups)
|
|
254
|
+
*/
|
|
255
|
+
flagsList?: string[];
|
|
252
256
|
}
|
|
253
257
|
/**
|
|
254
258
|
* ### Quill SQLEditor
|
|
@@ -275,7 +279,7 @@ export interface SQLEditorProps {
|
|
|
275
279
|
* ### SQLEditor API
|
|
276
280
|
* @see https://docs.quillsql.com/components/sql-editor
|
|
277
281
|
*/
|
|
278
|
-
export default function SQLEditor({ ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, TextInputComponent, SelectComponent, TableComponent, isNewQueryEnabled, LoadingComponent, ModalComponent, PopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ChartBuilderFormContainer, defaultQuery, destinationDashboard, onChangeQuery, onChangeData, onChangeColumns, onChangeFields, onDiscardChanges, onSaveChanges, onCloseChartBuilder, isChartBuilderEnabled, isAdminEnabled, chartBuilderTitle, runQueryOnMount, onAddToDashboardComplete, addToDashboardButtonLabel, report, organizationName, isChartBuilderHorizontalView, containerStyle, className, onClickChartElement, }: SQLEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
282
|
+
export default function SQLEditor({ ButtonComponent, SecondaryButtonComponent, DeleteButtonComponent, TextInputComponent, SelectComponent, TableComponent, isNewQueryEnabled, LoadingComponent, ModalComponent, PopoverComponent, CardComponent, LabelComponent, HeaderComponent, SubHeaderComponent, TextComponent, ErrorMessageComponent, ChartBuilderInputRowContainer, ChartBuilderInputColumnContainer, PivotRowContainer, PivotColumnContainer, ChartBuilderFormContainer, defaultQuery, destinationDashboard, onChangeQuery, onChangeData, onChangeColumns, onChangeFields, onDiscardChanges, onSaveChanges, onCloseChartBuilder, isChartBuilderEnabled, isAdminEnabled, chartBuilderTitle, runQueryOnMount, onAddToDashboardComplete, addToDashboardButtonLabel, report, organizationName, isChartBuilderHorizontalView, containerStyle, className, onClickChartElement, flagsList, }: SQLEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
279
283
|
export declare const SchemaListComponent: ({ schema, theme, loading, LoadingComponent, width, onClick, style, }: {
|
|
280
284
|
schema: any;
|
|
281
285
|
theme: any;
|