@quillsql/react 2.16.59 → 2.16.61
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 +23 -7
- package/dist/index.js +23 -7
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -26905,6 +26905,16 @@ init_dataFetcher();
|
|
|
26905
26905
|
init_tableProcessing();
|
|
26906
26906
|
init_paginationProcessing();
|
|
26907
26907
|
init_inMemoryPivotEngine();
|
|
26908
|
+
|
|
26909
|
+
// src/utils/dashboardPagination.ts
|
|
26910
|
+
function isDashboardPivotTable(report) {
|
|
26911
|
+
return String(report?.chartType ?? "").toLowerCase() === "table" && Boolean(report?.pivot);
|
|
26912
|
+
}
|
|
26913
|
+
function getDashboardReportProcessing(report, serverPagination) {
|
|
26914
|
+
return isDashboardPivotTable(report) ? {} : serverPagination;
|
|
26915
|
+
}
|
|
26916
|
+
|
|
26917
|
+
// src/hooks/useDashboard.ts
|
|
26908
26918
|
var useDashboardInternal = (dashboardName, customFilters) => {
|
|
26909
26919
|
const [dashboard] = (0, import_react2.useContext)(DashboardContext);
|
|
26910
26920
|
const {
|
|
@@ -27828,6 +27838,10 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27828
27838
|
const additionalProcessing = {
|
|
27829
27839
|
page: pagination
|
|
27830
27840
|
};
|
|
27841
|
+
const reportAdditionalProcessing = getDashboardReportProcessing(
|
|
27842
|
+
reportInfo,
|
|
27843
|
+
additionalProcessing
|
|
27844
|
+
);
|
|
27831
27845
|
const usePivotTask = !cacheEnabled && !!reportInfo.pivot;
|
|
27832
27846
|
const allFilters = dashboardFilters2.concat(customFilters).concat(customReportFiltersArray);
|
|
27833
27847
|
const applyInMemoryPivotIfNeeded = (report2) => {
|
|
@@ -27897,7 +27911,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27897
27911
|
tenants,
|
|
27898
27912
|
flags,
|
|
27899
27913
|
allFilters,
|
|
27900
|
-
|
|
27914
|
+
reportAdditionalProcessing,
|
|
27901
27915
|
reportInfo.pivot,
|
|
27902
27916
|
async () => {
|
|
27903
27917
|
const { report: report2, error: error2 } = await fetchReport({
|
|
@@ -27905,7 +27919,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27905
27919
|
client,
|
|
27906
27920
|
tenants,
|
|
27907
27921
|
flags,
|
|
27908
|
-
additionalProcessing,
|
|
27922
|
+
additionalProcessing: reportAdditionalProcessing,
|
|
27909
27923
|
filters: allFilters,
|
|
27910
27924
|
getToken,
|
|
27911
27925
|
eventTracking,
|
|
@@ -28005,7 +28019,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
28005
28019
|
client,
|
|
28006
28020
|
tenants,
|
|
28007
28021
|
flags,
|
|
28008
|
-
additionalProcessing,
|
|
28022
|
+
additionalProcessing: reportAdditionalProcessing,
|
|
28009
28023
|
filters: allFilters,
|
|
28010
28024
|
getToken,
|
|
28011
28025
|
eventTracking,
|
|
@@ -43598,12 +43612,14 @@ function StaticChart(props) {
|
|
|
43598
43612
|
direction: sort.direction
|
|
43599
43613
|
});
|
|
43600
43614
|
};
|
|
43615
|
+
const useLocalPivotTablePagination = isDashboardPivotTable(report);
|
|
43601
43616
|
const config = (0, import_react41.useMemo)(() => {
|
|
43602
43617
|
return report ? {
|
|
43603
43618
|
...report,
|
|
43619
|
+
...useLocalPivotTablePagination ? { pagination: void 0 } : {},
|
|
43604
43620
|
...report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : {}
|
|
43605
43621
|
} : void 0;
|
|
43606
|
-
}, [report]);
|
|
43622
|
+
}, [report, useLocalPivotTablePagination]);
|
|
43607
43623
|
if (error) {
|
|
43608
43624
|
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ChartError, { errorMessage: error, containerStyle: safeContainerStyle });
|
|
43609
43625
|
}
|
|
@@ -43618,9 +43634,9 @@ function StaticChart(props) {
|
|
|
43618
43634
|
className,
|
|
43619
43635
|
containerStyle: safeContainerStyle,
|
|
43620
43636
|
showLegend,
|
|
43621
|
-
onPageChange,
|
|
43622
|
-
tableRowsLoading: pageLoading,
|
|
43623
|
-
onSortChange
|
|
43637
|
+
onPageChange: useLocalPivotTablePagination ? void 0 : onPageChange,
|
|
43638
|
+
tableRowsLoading: useLocalPivotTablePagination ? false : pageLoading,
|
|
43639
|
+
onSortChange: useLocalPivotTablePagination ? void 0 : onSortChange
|
|
43624
43640
|
}
|
|
43625
43641
|
);
|
|
43626
43642
|
}
|
package/dist/index.js
CHANGED
|
@@ -26926,6 +26926,16 @@ init_dataFetcher();
|
|
|
26926
26926
|
init_tableProcessing();
|
|
26927
26927
|
init_paginationProcessing();
|
|
26928
26928
|
init_inMemoryPivotEngine();
|
|
26929
|
+
|
|
26930
|
+
// src/utils/dashboardPagination.ts
|
|
26931
|
+
function isDashboardPivotTable(report) {
|
|
26932
|
+
return String(report?.chartType ?? "").toLowerCase() === "table" && Boolean(report?.pivot);
|
|
26933
|
+
}
|
|
26934
|
+
function getDashboardReportProcessing(report, serverPagination) {
|
|
26935
|
+
return isDashboardPivotTable(report) ? {} : serverPagination;
|
|
26936
|
+
}
|
|
26937
|
+
|
|
26938
|
+
// src/hooks/useDashboard.ts
|
|
26929
26939
|
var useDashboardInternal = (dashboardName, customFilters) => {
|
|
26930
26940
|
const [dashboard] = useContext(DashboardContext);
|
|
26931
26941
|
const {
|
|
@@ -27849,6 +27859,10 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27849
27859
|
const additionalProcessing = {
|
|
27850
27860
|
page: pagination
|
|
27851
27861
|
};
|
|
27862
|
+
const reportAdditionalProcessing = getDashboardReportProcessing(
|
|
27863
|
+
reportInfo,
|
|
27864
|
+
additionalProcessing
|
|
27865
|
+
);
|
|
27852
27866
|
const usePivotTask = !cacheEnabled && !!reportInfo.pivot;
|
|
27853
27867
|
const allFilters = dashboardFilters2.concat(customFilters).concat(customReportFiltersArray);
|
|
27854
27868
|
const applyInMemoryPivotIfNeeded = (report2) => {
|
|
@@ -27918,7 +27932,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27918
27932
|
tenants,
|
|
27919
27933
|
flags,
|
|
27920
27934
|
allFilters,
|
|
27921
|
-
|
|
27935
|
+
reportAdditionalProcessing,
|
|
27922
27936
|
reportInfo.pivot,
|
|
27923
27937
|
async () => {
|
|
27924
27938
|
const { report: report2, error: error2 } = await fetchReport({
|
|
@@ -27926,7 +27940,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
27926
27940
|
client,
|
|
27927
27941
|
tenants,
|
|
27928
27942
|
flags,
|
|
27929
|
-
additionalProcessing,
|
|
27943
|
+
additionalProcessing: reportAdditionalProcessing,
|
|
27930
27944
|
filters: allFilters,
|
|
27931
27945
|
getToken,
|
|
27932
27946
|
eventTracking,
|
|
@@ -28026,7 +28040,7 @@ var useDashboard = (dashboardName, config) => {
|
|
|
28026
28040
|
client,
|
|
28027
28041
|
tenants,
|
|
28028
28042
|
flags,
|
|
28029
|
-
additionalProcessing,
|
|
28043
|
+
additionalProcessing: reportAdditionalProcessing,
|
|
28030
28044
|
filters: allFilters,
|
|
28031
28045
|
getToken,
|
|
28032
28046
|
eventTracking,
|
|
@@ -43701,12 +43715,14 @@ function StaticChart(props) {
|
|
|
43701
43715
|
direction: sort.direction
|
|
43702
43716
|
});
|
|
43703
43717
|
};
|
|
43718
|
+
const useLocalPivotTablePagination = isDashboardPivotTable(report);
|
|
43704
43719
|
const config = useMemo20(() => {
|
|
43705
43720
|
return report ? {
|
|
43706
43721
|
...report,
|
|
43722
|
+
...useLocalPivotTablePagination ? { pagination: void 0 } : {},
|
|
43707
43723
|
...report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : {}
|
|
43708
43724
|
} : void 0;
|
|
43709
|
-
}, [report]);
|
|
43725
|
+
}, [report, useLocalPivotTablePagination]);
|
|
43710
43726
|
if (error) {
|
|
43711
43727
|
return /* @__PURE__ */ jsx60(ChartError, { errorMessage: error, containerStyle: safeContainerStyle });
|
|
43712
43728
|
}
|
|
@@ -43721,9 +43737,9 @@ function StaticChart(props) {
|
|
|
43721
43737
|
className,
|
|
43722
43738
|
containerStyle: safeContainerStyle,
|
|
43723
43739
|
showLegend,
|
|
43724
|
-
onPageChange,
|
|
43725
|
-
tableRowsLoading: pageLoading,
|
|
43726
|
-
onSortChange
|
|
43740
|
+
onPageChange: useLocalPivotTablePagination ? void 0 : onPageChange,
|
|
43741
|
+
tableRowsLoading: useLocalPivotTablePagination ? false : pageLoading,
|
|
43742
|
+
onSortChange: useLocalPivotTablePagination ? void 0 : onSortChange
|
|
43727
43743
|
}
|
|
43728
43744
|
);
|
|
43729
43745
|
}
|