@quillsql/react 2.16.33 → 2.16.34

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 CHANGED
@@ -27737,7 +27737,8 @@ var useDashboard = (dashboardName, config) => {
27737
27737
  filters,
27738
27738
  applyFilters,
27739
27739
  lastUpdated,
27740
- forceCacheRefresh
27740
+ forceCacheRefresh,
27741
+ reload
27741
27742
  };
27742
27743
  };
27743
27744
  var useDashboardReportInternal = (reportId, config) => {
@@ -58786,7 +58787,12 @@ function createUseFormPivotTableDataRefreshQueryKey(input) {
58786
58787
  ];
58787
58788
  }
58788
58789
  function createUseFormReportNameQueryKey(input) {
58789
- return ["useReport", "report-name", input.reportId, input.clientHash];
58790
+ return [
58791
+ "useReport",
58792
+ "report-name",
58793
+ input.reportId,
58794
+ input.clientHash
58795
+ ];
58790
58796
  }
58791
58797
  function createUseFormQueryFn(loader) {
58792
58798
  return async () => loader();
@@ -66212,12 +66218,6 @@ function useReport(reportIdArg, options = {}) {
66212
66218
  tenants,
66213
66219
  draftSessionId: draftSessionId || void 0
66214
66220
  });
66215
- const savedId = String(
66216
- resp?.id ?? resp?._id ?? effectiveReportId ?? ""
66217
- ).trim();
66218
- if (resp && resp.name !== "error" && !resp.error && savedId) {
66219
- setDraftSessionId(generateDraftSessionId());
66220
- }
66221
66221
  return resp;
66222
66222
  }, [
66223
66223
  chartType,
package/dist/index.d.cts CHANGED
@@ -3251,23 +3251,25 @@ declare const quillFormat: ({ value, format, }: {
3251
3251
  format: string;
3252
3252
  }) => string;
3253
3253
 
3254
+ /** Refetch dashboard config and filters; optional report upsert/delete and filter overrides. */
3255
+ type UseDashboardReload = (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
3256
+ report: QuillReport | {
3257
+ id: string;
3258
+ };
3259
+ action: 'upsert' | 'delete';
3260
+ }, overrideFilters?: {
3261
+ filters: InternalDashboardFilter[];
3262
+ editedFilterLabel?: string;
3263
+ refetchReports?: boolean;
3264
+ }, options?: {
3265
+ preserveExistingDateFilter?: boolean;
3266
+ }) => Promise<void>;
3254
3267
  declare const useDashboardInternal: (dashboardName: string | null, customFilters?: InternalFilter[]) => {
3255
3268
  data: DashboardConfig | null;
3256
3269
  dashboardFilters: InternalDashboardFilter[] | null;
3257
3270
  isLoading: boolean | undefined;
3258
3271
  isDashboardFilterLoading: (filterName: string) => boolean | undefined;
3259
- reload: (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
3260
- report: QuillReport | {
3261
- id: string;
3262
- };
3263
- action: "upsert" | "delete";
3264
- }, overrideFilters?: {
3265
- filters: InternalDashboardFilter[];
3266
- editedFilterLabel?: string;
3267
- refetchReports?: boolean;
3268
- }, options?: {
3269
- preserveExistingDateFilter?: boolean;
3270
- }) => Promise<void>;
3272
+ reload: UseDashboardReload;
3271
3273
  setSectionOrder: (sectionOrder: {
3272
3274
  section: string;
3273
3275
  _id?: string;
@@ -3321,6 +3323,12 @@ declare const useDashboards: () => {
3321
3323
  }) => Promise<void>;
3322
3324
  deleteDashboard: (name: string) => Promise<void>;
3323
3325
  };
3326
+ /**
3327
+ * `reload` is the same reference as `useDashboardInternal(dashboardName).reload`.
3328
+ * Use after structural changes or report upsert/delete; use `applyFilters` for
3329
+ * filter-value updates; use `forceCacheRefresh` to bypass cached report payloads
3330
+ * when cache is on. Calling `reload` every render adds network load.
3331
+ */
3324
3332
  declare const useDashboard: (dashboardName: string, config?: {
3325
3333
  pageSize?: number;
3326
3334
  cacheEnabled?: boolean;
@@ -3345,6 +3353,7 @@ declare const useDashboard: (dashboardName: string, config?: {
3345
3353
  } | Filter>) => void;
3346
3354
  lastUpdated: number;
3347
3355
  forceCacheRefresh: () => void;
3356
+ reload: UseDashboardReload;
3348
3357
  };
3349
3358
  declare const useDashboardReport: (reportId: string, config?: {
3350
3359
  initialFilters?: Filter[];
@@ -4186,4 +4195,4 @@ interface ReportTableProps {
4186
4195
  }
4187
4196
  declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
4188
4197
 
4189
- export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat$1 as AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatModelId, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ColumnSelectionOption, type ContainerComponentProps, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PivotAggregation, type PopoverComponentProps, type QueryBuilderDisplayGroup, type QueryBuilderDisplayRule, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportDetail, type ReportDetailProps, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SetReportBuilderInput, type SetReportChartAxesInput, type SetReportTableColumnSidebarPatch, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table, type TableColumnListItem, type TableColumnsController, type TableColumnsControllerItem, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, type UseFormAxisConfig, areQueryBuilderFilterDraftsDirty, countFilterRules, downloadCSV, quillFormat as format, isQueryBuilderDisplayGroup, isQueryBuilderDisplayRule, normalizeRelativeDateRules, prepareQueryBuilderFiltersForSet, stripQueryBuilderTransientFields, tableColumnFormatFromUiSelection, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReport, useReportBuilder, useReports, useTenants, useVirtualTables };
4198
+ export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat$1 as AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatModelId, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ColumnSelectionOption, type ContainerComponentProps, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PivotAggregation, type PopoverComponentProps, type QueryBuilderDisplayGroup, type QueryBuilderDisplayRule, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportDetail, type ReportDetailProps, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SetReportBuilderInput, type SetReportChartAxesInput, type SetReportTableColumnSidebarPatch, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table, type TableColumnListItem, type TableColumnsController, type TableColumnsControllerItem, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, type UseDashboardReload, type UseFormAxisConfig, areQueryBuilderFilterDraftsDirty, countFilterRules, downloadCSV, quillFormat as format, isQueryBuilderDisplayGroup, isQueryBuilderDisplayRule, normalizeRelativeDateRules, prepareQueryBuilderFiltersForSet, stripQueryBuilderTransientFields, tableColumnFormatFromUiSelection, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReport, useReportBuilder, useReports, useTenants, useVirtualTables };
package/dist/index.d.ts CHANGED
@@ -3251,23 +3251,25 @@ declare const quillFormat: ({ value, format, }: {
3251
3251
  format: string;
3252
3252
  }) => string;
3253
3253
 
3254
+ /** Refetch dashboard config and filters; optional report upsert/delete and filter overrides. */
3255
+ type UseDashboardReload = (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
3256
+ report: QuillReport | {
3257
+ id: string;
3258
+ };
3259
+ action: 'upsert' | 'delete';
3260
+ }, overrideFilters?: {
3261
+ filters: InternalDashboardFilter[];
3262
+ editedFilterLabel?: string;
3263
+ refetchReports?: boolean;
3264
+ }, options?: {
3265
+ preserveExistingDateFilter?: boolean;
3266
+ }) => Promise<void>;
3254
3267
  declare const useDashboardInternal: (dashboardName: string | null, customFilters?: InternalFilter[]) => {
3255
3268
  data: DashboardConfig | null;
3256
3269
  dashboardFilters: InternalDashboardFilter[] | null;
3257
3270
  isLoading: boolean | undefined;
3258
3271
  isDashboardFilterLoading: (filterName: string) => boolean | undefined;
3259
- reload: (overrideDashboardName?: string, fetchFromServer?: boolean, reportAction?: {
3260
- report: QuillReport | {
3261
- id: string;
3262
- };
3263
- action: "upsert" | "delete";
3264
- }, overrideFilters?: {
3265
- filters: InternalDashboardFilter[];
3266
- editedFilterLabel?: string;
3267
- refetchReports?: boolean;
3268
- }, options?: {
3269
- preserveExistingDateFilter?: boolean;
3270
- }) => Promise<void>;
3272
+ reload: UseDashboardReload;
3271
3273
  setSectionOrder: (sectionOrder: {
3272
3274
  section: string;
3273
3275
  _id?: string;
@@ -3321,6 +3323,12 @@ declare const useDashboards: () => {
3321
3323
  }) => Promise<void>;
3322
3324
  deleteDashboard: (name: string) => Promise<void>;
3323
3325
  };
3326
+ /**
3327
+ * `reload` is the same reference as `useDashboardInternal(dashboardName).reload`.
3328
+ * Use after structural changes or report upsert/delete; use `applyFilters` for
3329
+ * filter-value updates; use `forceCacheRefresh` to bypass cached report payloads
3330
+ * when cache is on. Calling `reload` every render adds network load.
3331
+ */
3324
3332
  declare const useDashboard: (dashboardName: string, config?: {
3325
3333
  pageSize?: number;
3326
3334
  cacheEnabled?: boolean;
@@ -3345,6 +3353,7 @@ declare const useDashboard: (dashboardName: string, config?: {
3345
3353
  } | Filter>) => void;
3346
3354
  lastUpdated: number;
3347
3355
  forceCacheRefresh: () => void;
3356
+ reload: UseDashboardReload;
3348
3357
  };
3349
3358
  declare const useDashboardReport: (reportId: string, config?: {
3350
3359
  initialFilters?: Filter[];
@@ -4186,4 +4195,4 @@ interface ReportTableProps {
4186
4195
  }
4187
4196
  declare const ReportTable: ({ reportBuilder, TableComponent, }: ReportTableProps) => react_jsx_runtime.JSX.Element;
4188
4197
 
4189
- export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat$1 as AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatModelId, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ColumnSelectionOption, type ContainerComponentProps, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PivotAggregation, type PopoverComponentProps, type QueryBuilderDisplayGroup, type QueryBuilderDisplayRule, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportDetail, type ReportDetailProps, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SetReportBuilderInput, type SetReportChartAxesInput, type SetReportTableColumnSidebarPatch, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table, type TableColumnListItem, type TableColumnsController, type TableColumnsControllerItem, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, type UseFormAxisConfig, areQueryBuilderFilterDraftsDirty, countFilterRules, downloadCSV, quillFormat as format, isQueryBuilderDisplayGroup, isQueryBuilderDisplayRule, normalizeRelativeDateRules, prepareQueryBuilderFiltersForSet, stripQueryBuilderTransientFields, tableColumnFormatFromUiSelection, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReport, useReportBuilder, useReports, useTenants, useVirtualTables };
4198
+ export { ALL_TENANTS, AddColumns, AddFilters, AddLimit, AddPivot, AddSort, type AxisFormat$1 as AxisFormat, type ButtonComponentProps, Calculation, Chart, ChartDisplay, ChartEditor, type ChartEditorProps, type ChartProps, Chat, type ChatModelId, type ChatProps, type CheckboxComponentProps, type ColorMapType, type Column$1 as Column, type ColumnSelectionOption, type ContainerComponentProps, Dashboard, type DashboardDateFilter, type DashboardFilter, DashboardFilterType, DashboardLegacy, type DashboardLegacyProps, type DashboardMultiFilter, type DashboardProps, type DashboardSectionComponentProps, type DashboardSingleFilter, type DashboardTenantFilter, DateOperator, type DateRange, type DateRangePickerComponentProps, type DateRangePickerOption, type DeleteButtonComponentProps, type DraggableColumnComponentProps, type EventBreadcrumb, type EventContext, type EventError, type EventMetadata, type EventTracking, type EventUser, type Filter, type FilterPopoverComponentProps, FilterType, type HeaderComponentProps, type HeaderProps, type InternalDashboardDateFilter, type InternalDashboardTenantFilter, type InternalFilter, type LabelComponentProps, type LimitPopoverComponentProps, type ModalComponentProps, NullOperator, NumberOperator, type Option, type Pivot, type PivotAggregation, type PopoverComponentProps, type QueryBuilderDisplayGroup, type QueryBuilderDisplayRule, type QuillCustomInterval, type QuillCustomRelativeInterval, type QuillCustomRepeatingInterval, type QuillCustomStaticInterval, type QuillPreviousMonthInterval, type QuillPreviousQuarterInterval, QuillProvider, type QuillProviderProps, type QuillReport, type QuillReportProps, type QuillTheme, type QuillWeekInterval, ReportBuilder$1 as ReportBuilder, type ReportBuilderColumn, type ReportBuilderLimit, type ReportBuilderProps, type ReportBuilderSort, type ReportBuilderState, ReportDetail, type ReportDetailProps, ReportTable, SINGLE_TENANT, SQLEditor, type SQLEditorProps, SaveReport, SchemaListComponent, type SelectColumnComponentProps, type SelectComponentProps, type SetReportBuilderInput, type SetReportChartAxesInput, type SetReportTableColumnSidebarPatch, type SidebarComponentProps, type SidebarHeadingComponentProps, type SortPopoverComponentProps, StaticChart, type StaticChartProps, StringOperator, Table, type TableColumnListItem, type TableColumnsController, type TableColumnsControllerItem, type TableComponentProps, type TableProps, type TabsComponentProps, type TextComponentProps, type TextInputComponentProps, ThemeContext, type UseDashboardReload, type UseFormAxisConfig, areQueryBuilderFilterDraftsDirty, countFilterRules, downloadCSV, quillFormat as format, isQueryBuilderDisplayGroup, isQueryBuilderDisplayRule, normalizeRelativeDateRules, prepareQueryBuilderFiltersForSet, stripQueryBuilderTransientFields, tableColumnFormatFromUiSelection, useAllReports, useAskQuill, useDashboard, useDashboardInternal, useDashboardReport, useDashboardReports, useDashboards, useExport, useMemoizedRows, useQuill, useReport, useReportBuilder, useReports, useTenants, useVirtualTables };
package/dist/index.js CHANGED
@@ -27765,7 +27765,8 @@ var useDashboard = (dashboardName, config) => {
27765
27765
  filters,
27766
27766
  applyFilters,
27767
27767
  lastUpdated,
27768
- forceCacheRefresh
27768
+ forceCacheRefresh,
27769
+ reload
27769
27770
  };
27770
27771
  };
27771
27772
  var useDashboardReportInternal = (reportId, config) => {
@@ -59001,7 +59002,12 @@ function createUseFormPivotTableDataRefreshQueryKey(input) {
59001
59002
  ];
59002
59003
  }
59003
59004
  function createUseFormReportNameQueryKey(input) {
59004
- return ["useReport", "report-name", input.reportId, input.clientHash];
59005
+ return [
59006
+ "useReport",
59007
+ "report-name",
59008
+ input.reportId,
59009
+ input.clientHash
59010
+ ];
59005
59011
  }
59006
59012
  function createUseFormQueryFn(loader) {
59007
59013
  return async () => loader();
@@ -66427,12 +66433,6 @@ function useReport(reportIdArg, options = {}) {
66427
66433
  tenants,
66428
66434
  draftSessionId: draftSessionId || void 0
66429
66435
  });
66430
- const savedId = String(
66431
- resp?.id ?? resp?._id ?? effectiveReportId ?? ""
66432
- ).trim();
66433
- if (resp && resp.name !== "error" && !resp.error && savedId) {
66434
- setDraftSessionId(generateDraftSessionId());
66435
- }
66436
66436
  return resp;
66437
66437
  }, [
66438
66438
  chartType,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.33",
3
+ "version": "2.16.34",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {