@quillsql/react 2.16.20 → 2.16.22

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.d.cts CHANGED
@@ -469,6 +469,10 @@ interface InternalDashboardDateFilter extends InternalDashboardBaseFilter {
469
469
  label: string;
470
470
  value: string;
471
471
  };
472
+ initialCacheDateRange?: {
473
+ startDate?: Date;
474
+ endDate?: Date;
475
+ };
472
476
  startDate?: Date;
473
477
  endDate?: Date;
474
478
  comparisonRange?: {
@@ -1074,6 +1078,10 @@ type DashboardConfig = {
1074
1078
  allTenantFilters?: InternalDashboardTenantFilter[];
1075
1079
  tenantFilters?: InternalDashboardTenantFilter[];
1076
1080
  dateFilter?: InternalDashboardDateFilter;
1081
+ initialCacheDateRange?: {
1082
+ startDate: Date;
1083
+ endDate: Date;
1084
+ };
1077
1085
  customFiltersEnabled?: boolean;
1078
1086
  sections?: {
1079
1087
  [key: string]: QuillReport[];
@@ -1451,8 +1459,10 @@ interface ChartProps {
1451
1459
  dateBucket?: string;
1452
1460
  /** Whether to send updated data in the chart to its owning dashboard */
1453
1461
  propagateChanges?: boolean;
1462
+ /** Whether the chart is rendered in admin mode. */
1463
+ isAdmin?: boolean;
1454
1464
  }
1455
- declare function Chart({ colors, reportId, className, containerStyle, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, hideDateRangeFilter, hideFilters, mapColorsToFields, LoadingComponent, SelectComponent, MultiSelectComponent, DateRangePickerComponent, FilterContainerComponent, TableComponent, MetricComponent, filters, onClickChartElement, dateBucket, propagateChanges, }: ChartProps): react_jsx_runtime.JSX.Element;
1465
+ declare function Chart({ colors, reportId, className, containerStyle, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, hideDateRangeFilter, hideFilters, mapColorsToFields, LoadingComponent, SelectComponent, MultiSelectComponent, DateRangePickerComponent, FilterContainerComponent, TableComponent, MetricComponent, filters, onClickChartElement, dateBucket, propagateChanges, isAdmin, }: ChartProps): react_jsx_runtime.JSX.Element;
1456
1466
 
1457
1467
  /**
1458
1468
  * Props for the Quill Table component.
@@ -2541,6 +2551,8 @@ declare const useDashboardInternal: (dashboardName: string | null, customFilters
2541
2551
  filters: InternalDashboardFilter[];
2542
2552
  editedFilterLabel?: string;
2543
2553
  refetchReports?: boolean;
2554
+ }, options?: {
2555
+ preserveExistingDateFilter?: boolean;
2544
2556
  }) => Promise<void>;
2545
2557
  setSectionOrder: (sectionOrder: {
2546
2558
  section: string;
@@ -2581,18 +2593,25 @@ declare const useDashboards: () => {
2581
2593
  dashboardOwners: string[];
2582
2594
  dateFilter?: InternalDashboardFilter;
2583
2595
  }) => Promise<void>;
2584
- updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, }: {
2596
+ updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, initialCacheDateRange, }: {
2585
2597
  newName: string;
2586
2598
  filters: InternalDashboardFilter[];
2587
2599
  tenantFilters?: InternalDashboardTenantFilter[];
2588
2600
  dateFilter?: InternalDashboardFilter;
2589
2601
  customFilters?: InternalFilter[];
2590
2602
  tenantKeys?: string[];
2603
+ initialCacheDateRange?: {
2604
+ startDate: Date;
2605
+ endDate: Date;
2606
+ };
2591
2607
  }) => Promise<void>;
2592
2608
  deleteDashboard: (name: string) => Promise<void>;
2593
2609
  };
2594
2610
  declare const useDashboard: (dashboardName: string, config?: {
2595
2611
  pageSize?: number;
2612
+ cacheEnabled?: boolean;
2613
+ cacheType?: "memory" | "idb";
2614
+ showCacheLogs?: boolean;
2596
2615
  }) => {
2597
2616
  isLoading: boolean;
2598
2617
  sections: Record<string, QuillReport[]> | null;
@@ -2604,6 +2623,8 @@ declare const useDashboard: (dashboardName: string, config?: {
2604
2623
  endDate?: Date;
2605
2624
  };
2606
2625
  } | Filter>) => void;
2626
+ lastUpdated: number;
2627
+ forceCacheRefresh: () => void;
2607
2628
  };
2608
2629
  declare const useDashboardReport: (reportId: string, config?: {
2609
2630
  initialFilters?: Filter[];
package/dist/index.d.ts CHANGED
@@ -469,6 +469,10 @@ interface InternalDashboardDateFilter extends InternalDashboardBaseFilter {
469
469
  label: string;
470
470
  value: string;
471
471
  };
472
+ initialCacheDateRange?: {
473
+ startDate?: Date;
474
+ endDate?: Date;
475
+ };
472
476
  startDate?: Date;
473
477
  endDate?: Date;
474
478
  comparisonRange?: {
@@ -1074,6 +1078,10 @@ type DashboardConfig = {
1074
1078
  allTenantFilters?: InternalDashboardTenantFilter[];
1075
1079
  tenantFilters?: InternalDashboardTenantFilter[];
1076
1080
  dateFilter?: InternalDashboardDateFilter;
1081
+ initialCacheDateRange?: {
1082
+ startDate: Date;
1083
+ endDate: Date;
1084
+ };
1077
1085
  customFiltersEnabled?: boolean;
1078
1086
  sections?: {
1079
1087
  [key: string]: QuillReport[];
@@ -1451,8 +1459,10 @@ interface ChartProps {
1451
1459
  dateBucket?: string;
1452
1460
  /** Whether to send updated data in the chart to its owning dashboard */
1453
1461
  propagateChanges?: boolean;
1462
+ /** Whether the chart is rendered in admin mode. */
1463
+ isAdmin?: boolean;
1454
1464
  }
1455
- declare function Chart({ colors, reportId, className, containerStyle, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, hideDateRangeFilter, hideFilters, mapColorsToFields, LoadingComponent, SelectComponent, MultiSelectComponent, DateRangePickerComponent, FilterContainerComponent, TableComponent, MetricComponent, filters, onClickChartElement, dateBucket, propagateChanges, }: ChartProps): react_jsx_runtime.JSX.Element;
1465
+ declare function Chart({ colors, reportId, className, containerStyle, isAnimationActive, hideXAxis, hideYAxis, hideCartesianGrid, hideHorizontalCartesianGrid, hideVerticalCartesianGrid, hideSubsequentXAxisTicks, cartesianGridLineStyle, cartesianGridLineColor, comparisonLineStyle, hideDateRangeFilter, hideFilters, mapColorsToFields, LoadingComponent, SelectComponent, MultiSelectComponent, DateRangePickerComponent, FilterContainerComponent, TableComponent, MetricComponent, filters, onClickChartElement, dateBucket, propagateChanges, isAdmin, }: ChartProps): react_jsx_runtime.JSX.Element;
1456
1466
 
1457
1467
  /**
1458
1468
  * Props for the Quill Table component.
@@ -2541,6 +2551,8 @@ declare const useDashboardInternal: (dashboardName: string | null, customFilters
2541
2551
  filters: InternalDashboardFilter[];
2542
2552
  editedFilterLabel?: string;
2543
2553
  refetchReports?: boolean;
2554
+ }, options?: {
2555
+ preserveExistingDateFilter?: boolean;
2544
2556
  }) => Promise<void>;
2545
2557
  setSectionOrder: (sectionOrder: {
2546
2558
  section: string;
@@ -2581,18 +2593,25 @@ declare const useDashboards: () => {
2581
2593
  dashboardOwners: string[];
2582
2594
  dateFilter?: InternalDashboardFilter;
2583
2595
  }) => Promise<void>;
2584
- updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, }: {
2596
+ updateDashboard: (name: string, { newName, filters, tenantFilters, dateFilter, customFilters, tenantKeys, initialCacheDateRange, }: {
2585
2597
  newName: string;
2586
2598
  filters: InternalDashboardFilter[];
2587
2599
  tenantFilters?: InternalDashboardTenantFilter[];
2588
2600
  dateFilter?: InternalDashboardFilter;
2589
2601
  customFilters?: InternalFilter[];
2590
2602
  tenantKeys?: string[];
2603
+ initialCacheDateRange?: {
2604
+ startDate: Date;
2605
+ endDate: Date;
2606
+ };
2591
2607
  }) => Promise<void>;
2592
2608
  deleteDashboard: (name: string) => Promise<void>;
2593
2609
  };
2594
2610
  declare const useDashboard: (dashboardName: string, config?: {
2595
2611
  pageSize?: number;
2612
+ cacheEnabled?: boolean;
2613
+ cacheType?: "memory" | "idb";
2614
+ showCacheLogs?: boolean;
2596
2615
  }) => {
2597
2616
  isLoading: boolean;
2598
2617
  sections: Record<string, QuillReport[]> | null;
@@ -2604,6 +2623,8 @@ declare const useDashboard: (dashboardName: string, config?: {
2604
2623
  endDate?: Date;
2605
2624
  };
2606
2625
  } | Filter>) => void;
2626
+ lastUpdated: number;
2627
+ forceCacheRefresh: () => void;
2607
2628
  };
2608
2629
  declare const useDashboardReport: (reportId: string, config?: {
2609
2630
  initialFilters?: Filter[];