@quillsql/react 2.16.58 → 2.16.60

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
@@ -35,7 +35,8 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
35
35
 
36
36
  // src/utils/textProcessing.ts
37
37
  function capitalize(text) {
38
- return text.charAt(0).toUpperCase() + text.slice(1);
38
+ const capitalized = text.charAt(0).toUpperCase() + text.slice(1);
39
+ return text.charAt(1) === "/" ? capitalized.slice(0, 2) + capitalized.charAt(2).toUpperCase() + capitalized.slice(3) : capitalized;
39
40
  }
40
41
  function matchCasing(text, template) {
41
42
  if (!text || !template) {
@@ -27827,6 +27828,8 @@ var useDashboard = (dashboardName, config) => {
27827
27828
  const additionalProcessing = {
27828
27829
  page: pagination
27829
27830
  };
27831
+ const useLocalPivotTablePagination = String(reportInfo.chartType ?? "").toLowerCase() === "table" && Boolean(reportInfo.pivot);
27832
+ const reportAdditionalProcessing = useLocalPivotTablePagination ? void 0 : additionalProcessing;
27830
27833
  const usePivotTask = !cacheEnabled && !!reportInfo.pivot;
27831
27834
  const allFilters = dashboardFilters2.concat(customFilters).concat(customReportFiltersArray);
27832
27835
  const applyInMemoryPivotIfNeeded = (report2) => {
@@ -27896,7 +27899,7 @@ var useDashboard = (dashboardName, config) => {
27896
27899
  tenants,
27897
27900
  flags,
27898
27901
  allFilters,
27899
- additionalProcessing,
27902
+ reportAdditionalProcessing,
27900
27903
  reportInfo.pivot,
27901
27904
  async () => {
27902
27905
  const { report: report2, error: error2 } = await fetchReport({
@@ -27904,7 +27907,7 @@ var useDashboard = (dashboardName, config) => {
27904
27907
  client,
27905
27908
  tenants,
27906
27909
  flags,
27907
- additionalProcessing,
27910
+ additionalProcessing: reportAdditionalProcessing,
27908
27911
  filters: allFilters,
27909
27912
  getToken,
27910
27913
  eventTracking,
@@ -28004,7 +28007,7 @@ var useDashboard = (dashboardName, config) => {
28004
28007
  client,
28005
28008
  tenants,
28006
28009
  flags,
28007
- additionalProcessing,
28010
+ additionalProcessing: reportAdditionalProcessing,
28008
28011
  filters: allFilters,
28009
28012
  getToken,
28010
28013
  eventTracking,
@@ -43597,12 +43600,14 @@ function StaticChart(props) {
43597
43600
  direction: sort.direction
43598
43601
  });
43599
43602
  };
43603
+ const useLocalPivotTablePagination = String(report?.chartType ?? "").toLowerCase() === "table" && Boolean(report?.pivot);
43600
43604
  const config = (0, import_react41.useMemo)(() => {
43601
43605
  return report ? {
43602
43606
  ...report,
43607
+ ...useLocalPivotTablePagination ? { pagination: void 0 } : {},
43603
43608
  ...report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : {}
43604
43609
  } : void 0;
43605
- }, [report]);
43610
+ }, [report, useLocalPivotTablePagination]);
43606
43611
  if (error) {
43607
43612
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ChartError, { errorMessage: error, containerStyle: safeContainerStyle });
43608
43613
  }
@@ -43617,9 +43622,9 @@ function StaticChart(props) {
43617
43622
  className,
43618
43623
  containerStyle: safeContainerStyle,
43619
43624
  showLegend,
43620
- onPageChange,
43621
- tableRowsLoading: pageLoading,
43622
- onSortChange
43625
+ onPageChange: useLocalPivotTablePagination ? void 0 : onPageChange,
43626
+ tableRowsLoading: useLocalPivotTablePagination ? false : pageLoading,
43627
+ onSortChange: useLocalPivotTablePagination ? void 0 : onSortChange
43623
43628
  }
43624
43629
  );
43625
43630
  }
@@ -62155,7 +62160,9 @@ function moveArrayItem(items, oldIndex, newIndex) {
62155
62160
  var CHART_TYPES2 = [
62156
62161
  "column",
62157
62162
  "stacked",
62163
+ "stacked bar",
62158
62164
  "line",
62165
+ "radar",
62159
62166
  "table",
62160
62167
  "metric",
62161
62168
  "gauge",
package/dist/index.d.cts CHANGED
@@ -2982,7 +2982,7 @@ type FilterFieldOptions = {
2982
2982
  type SetFiltersInput = QueryBuilderRuleGroup | ((prev: QueryBuilderRuleGroup) => QueryBuilderRuleGroup);
2983
2983
  /** Maps table column format dropdown values to persisted report column `format` (used by `columnActions.update`). */
2984
2984
  declare function tableColumnFormatFromUiSelection(raw: string): string;
2985
- declare const CHART_TYPES: readonly ["column", "stacked", "line", "table", "metric", "gauge", "bar", "pie", "US map", "World map"];
2985
+ declare const CHART_TYPES: readonly ["column", "stacked", "stacked bar", "line", "radar", "table", "metric", "gauge", "bar", "pie", "US map", "World map"];
2986
2986
  type ChartType = (typeof CHART_TYPES)[number];
2987
2987
  type ChartTypeOption = {
2988
2988
  label: string;
@@ -3216,7 +3216,7 @@ declare function useReport(reportIdArg?: string, options?: UseReportOptions): {
3216
3216
  label: string;
3217
3217
  value: string;
3218
3218
  }[];
3219
- chartType: "table" | "column" | "metric" | "gauge" | "stacked" | "line" | "bar" | "pie" | "US map" | "World map";
3219
+ chartType: "table" | "column" | "metric" | "gauge" | "stacked" | "stacked bar" | "line" | "bar" | "pie" | "radar" | "US map" | "World map";
3220
3220
  chartTypeOptions: ChartTypeOption[];
3221
3221
  /** Selected tabular columns in display order. */
3222
3222
  columns: ReportColumnValue[];
package/dist/index.d.ts CHANGED
@@ -2982,7 +2982,7 @@ type FilterFieldOptions = {
2982
2982
  type SetFiltersInput = QueryBuilderRuleGroup | ((prev: QueryBuilderRuleGroup) => QueryBuilderRuleGroup);
2983
2983
  /** Maps table column format dropdown values to persisted report column `format` (used by `columnActions.update`). */
2984
2984
  declare function tableColumnFormatFromUiSelection(raw: string): string;
2985
- declare const CHART_TYPES: readonly ["column", "stacked", "line", "table", "metric", "gauge", "bar", "pie", "US map", "World map"];
2985
+ declare const CHART_TYPES: readonly ["column", "stacked", "stacked bar", "line", "radar", "table", "metric", "gauge", "bar", "pie", "US map", "World map"];
2986
2986
  type ChartType = (typeof CHART_TYPES)[number];
2987
2987
  type ChartTypeOption = {
2988
2988
  label: string;
@@ -3216,7 +3216,7 @@ declare function useReport(reportIdArg?: string, options?: UseReportOptions): {
3216
3216
  label: string;
3217
3217
  value: string;
3218
3218
  }[];
3219
- chartType: "table" | "column" | "metric" | "gauge" | "stacked" | "line" | "bar" | "pie" | "US map" | "World map";
3219
+ chartType: "table" | "column" | "metric" | "gauge" | "stacked" | "stacked bar" | "line" | "bar" | "pie" | "radar" | "US map" | "World map";
3220
3220
  chartTypeOptions: ChartTypeOption[];
3221
3221
  /** Selected tabular columns in display order. */
3222
3222
  columns: ReportColumnValue[];
package/dist/index.js CHANGED
@@ -39,7 +39,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
39
39
 
40
40
  // src/utils/textProcessing.ts
41
41
  function capitalize(text) {
42
- return text.charAt(0).toUpperCase() + text.slice(1);
42
+ const capitalized = text.charAt(0).toUpperCase() + text.slice(1);
43
+ return text.charAt(1) === "/" ? capitalized.slice(0, 2) + capitalized.charAt(2).toUpperCase() + capitalized.slice(3) : capitalized;
43
44
  }
44
45
  function matchCasing(text, template) {
45
46
  if (!text || !template) {
@@ -27848,6 +27849,8 @@ var useDashboard = (dashboardName, config) => {
27848
27849
  const additionalProcessing = {
27849
27850
  page: pagination
27850
27851
  };
27852
+ const useLocalPivotTablePagination = String(reportInfo.chartType ?? "").toLowerCase() === "table" && Boolean(reportInfo.pivot);
27853
+ const reportAdditionalProcessing = useLocalPivotTablePagination ? void 0 : additionalProcessing;
27851
27854
  const usePivotTask = !cacheEnabled && !!reportInfo.pivot;
27852
27855
  const allFilters = dashboardFilters2.concat(customFilters).concat(customReportFiltersArray);
27853
27856
  const applyInMemoryPivotIfNeeded = (report2) => {
@@ -27917,7 +27920,7 @@ var useDashboard = (dashboardName, config) => {
27917
27920
  tenants,
27918
27921
  flags,
27919
27922
  allFilters,
27920
- additionalProcessing,
27923
+ reportAdditionalProcessing,
27921
27924
  reportInfo.pivot,
27922
27925
  async () => {
27923
27926
  const { report: report2, error: error2 } = await fetchReport({
@@ -27925,7 +27928,7 @@ var useDashboard = (dashboardName, config) => {
27925
27928
  client,
27926
27929
  tenants,
27927
27930
  flags,
27928
- additionalProcessing,
27931
+ additionalProcessing: reportAdditionalProcessing,
27929
27932
  filters: allFilters,
27930
27933
  getToken,
27931
27934
  eventTracking,
@@ -28025,7 +28028,7 @@ var useDashboard = (dashboardName, config) => {
28025
28028
  client,
28026
28029
  tenants,
28027
28030
  flags,
28028
- additionalProcessing,
28031
+ additionalProcessing: reportAdditionalProcessing,
28029
28032
  filters: allFilters,
28030
28033
  getToken,
28031
28034
  eventTracking,
@@ -43700,12 +43703,14 @@ function StaticChart(props) {
43700
43703
  direction: sort.direction
43701
43704
  });
43702
43705
  };
43706
+ const useLocalPivotTablePagination = String(report?.chartType ?? "").toLowerCase() === "table" && Boolean(report?.pivot);
43703
43707
  const config = useMemo20(() => {
43704
43708
  return report ? {
43705
43709
  ...report,
43710
+ ...useLocalPivotTablePagination ? { pagination: void 0 } : {},
43706
43711
  ...report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : {}
43707
43712
  } : void 0;
43708
- }, [report]);
43713
+ }, [report, useLocalPivotTablePagination]);
43709
43714
  if (error) {
43710
43715
  return /* @__PURE__ */ jsx60(ChartError, { errorMessage: error, containerStyle: safeContainerStyle });
43711
43716
  }
@@ -43720,9 +43725,9 @@ function StaticChart(props) {
43720
43725
  className,
43721
43726
  containerStyle: safeContainerStyle,
43722
43727
  showLegend,
43723
- onPageChange,
43724
- tableRowsLoading: pageLoading,
43725
- onSortChange
43728
+ onPageChange: useLocalPivotTablePagination ? void 0 : onPageChange,
43729
+ tableRowsLoading: useLocalPivotTablePagination ? false : pageLoading,
43730
+ onSortChange: useLocalPivotTablePagination ? void 0 : onSortChange
43726
43731
  }
43727
43732
  );
43728
43733
  }
@@ -62367,7 +62372,9 @@ function moveArrayItem(items, oldIndex, newIndex) {
62367
62372
  var CHART_TYPES2 = [
62368
62373
  "column",
62369
62374
  "stacked",
62375
+ "stacked bar",
62370
62376
  "line",
62377
+ "radar",
62371
62378
  "table",
62372
62379
  "metric",
62373
62380
  "gauge",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.58",
3
+ "version": "2.16.60",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {