@quillsql/react 2.16.41 → 2.16.43
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 +14 -4
- package/dist/index.js +14 -4
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -62646,6 +62646,16 @@ async function loadViaReportBuilderState({
|
|
|
62646
62646
|
const refreshedPivotData = reportBuilderInfo.pivotData;
|
|
62647
62647
|
const requestedPivotForRowData = reportBuilderState.pivot ?? null;
|
|
62648
62648
|
const basePivotForRowFallback = baseReport.pivot ?? null;
|
|
62649
|
+
const requestedPivotRowField = String(
|
|
62650
|
+
requestedPivotForRowData?.rowField ?? ""
|
|
62651
|
+
).trim();
|
|
62652
|
+
const reportPivotRows = Array.isArray(reportBuilderInfo.report.pivotRows) ? reportBuilderInfo.report.pivotRows : void 0;
|
|
62653
|
+
const reportPivotRowsMatchRequestedRowField = !requestedPivotRowField || Array.isArray(reportPivotRows) && reportPivotRows.some(
|
|
62654
|
+
(row) => row && typeof row === "object" && Object.prototype.hasOwnProperty.call(row, requestedPivotRowField)
|
|
62655
|
+
);
|
|
62656
|
+
const compatibleReportPivotRows = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotRows : void 0;
|
|
62657
|
+
const compatibleReportPivotColumns = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotColumns : void 0;
|
|
62658
|
+
const compatibleReportPivotRowCount = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotRowCount : void 0;
|
|
62649
62659
|
const canReuseBasePivotRowsAndColumns = JSON.stringify(
|
|
62650
62660
|
normalizePivotForRefreshComparison(requestedPivotForRowData)
|
|
62651
62661
|
) === JSON.stringify(normalizePivotForRefreshComparison(basePivotForRowFallback));
|
|
@@ -62655,9 +62665,9 @@ async function loadViaReportBuilderState({
|
|
|
62655
62665
|
...reportBuilderInfo.report,
|
|
62656
62666
|
reportBuilderState: normalizedReportBuilderState,
|
|
62657
62667
|
pivot: reportBuilderState.pivot,
|
|
62658
|
-
pivotRows: refreshedPivotData?.rows ??
|
|
62659
|
-
pivotColumns: refreshedPivotData?.columns ??
|
|
62660
|
-
pivotRowCount: refreshedPivotData?.rowCount ??
|
|
62668
|
+
pivotRows: refreshedPivotData?.rows ?? compatibleReportPivotRows ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotRows : []) ?? [],
|
|
62669
|
+
pivotColumns: refreshedPivotData?.columns ?? compatibleReportPivotColumns ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotColumns : []) ?? [],
|
|
62670
|
+
pivotRowCount: refreshedPivotData?.rowCount ?? compatibleReportPivotRowCount ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotRowCount : void 0) ?? 0,
|
|
62661
62671
|
uniqueStringsByTable: reportBuilderInfo.uniqueStringsByTable,
|
|
62662
62672
|
uniqueStringsByColumn: reportBuilderInfo.uniqueStringsByColumn,
|
|
62663
62673
|
columnUniqueValues: reportBuilderInfo.uniqueStringsByColumn,
|
|
@@ -64866,7 +64876,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
64866
64876
|
}
|
|
64867
64877
|
options2.push({
|
|
64868
64878
|
value: identifier,
|
|
64869
|
-
label: field,
|
|
64879
|
+
label: toTitleCaseLabel(field),
|
|
64870
64880
|
field,
|
|
64871
64881
|
tableName,
|
|
64872
64882
|
type
|
package/dist/index.js
CHANGED
|
@@ -62856,6 +62856,16 @@ async function loadViaReportBuilderState({
|
|
|
62856
62856
|
const refreshedPivotData = reportBuilderInfo.pivotData;
|
|
62857
62857
|
const requestedPivotForRowData = reportBuilderState.pivot ?? null;
|
|
62858
62858
|
const basePivotForRowFallback = baseReport.pivot ?? null;
|
|
62859
|
+
const requestedPivotRowField = String(
|
|
62860
|
+
requestedPivotForRowData?.rowField ?? ""
|
|
62861
|
+
).trim();
|
|
62862
|
+
const reportPivotRows = Array.isArray(reportBuilderInfo.report.pivotRows) ? reportBuilderInfo.report.pivotRows : void 0;
|
|
62863
|
+
const reportPivotRowsMatchRequestedRowField = !requestedPivotRowField || Array.isArray(reportPivotRows) && reportPivotRows.some(
|
|
62864
|
+
(row) => row && typeof row === "object" && Object.prototype.hasOwnProperty.call(row, requestedPivotRowField)
|
|
62865
|
+
);
|
|
62866
|
+
const compatibleReportPivotRows = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotRows : void 0;
|
|
62867
|
+
const compatibleReportPivotColumns = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotColumns : void 0;
|
|
62868
|
+
const compatibleReportPivotRowCount = reportPivotRowsMatchRequestedRowField ? reportBuilderInfo.report.pivotRowCount : void 0;
|
|
62859
62869
|
const canReuseBasePivotRowsAndColumns = JSON.stringify(
|
|
62860
62870
|
normalizePivotForRefreshComparison(requestedPivotForRowData)
|
|
62861
62871
|
) === JSON.stringify(normalizePivotForRefreshComparison(basePivotForRowFallback));
|
|
@@ -62865,9 +62875,9 @@ async function loadViaReportBuilderState({
|
|
|
62865
62875
|
...reportBuilderInfo.report,
|
|
62866
62876
|
reportBuilderState: normalizedReportBuilderState,
|
|
62867
62877
|
pivot: reportBuilderState.pivot,
|
|
62868
|
-
pivotRows: refreshedPivotData?.rows ??
|
|
62869
|
-
pivotColumns: refreshedPivotData?.columns ??
|
|
62870
|
-
pivotRowCount: refreshedPivotData?.rowCount ??
|
|
62878
|
+
pivotRows: refreshedPivotData?.rows ?? compatibleReportPivotRows ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotRows : []) ?? [],
|
|
62879
|
+
pivotColumns: refreshedPivotData?.columns ?? compatibleReportPivotColumns ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotColumns : []) ?? [],
|
|
62880
|
+
pivotRowCount: refreshedPivotData?.rowCount ?? compatibleReportPivotRowCount ?? (canReuseBasePivotRowsAndColumns ? baseReport.pivotRowCount : void 0) ?? 0,
|
|
62871
62881
|
uniqueStringsByTable: reportBuilderInfo.uniqueStringsByTable,
|
|
62872
62882
|
uniqueStringsByColumn: reportBuilderInfo.uniqueStringsByColumn,
|
|
62873
62883
|
columnUniqueValues: reportBuilderInfo.uniqueStringsByColumn,
|
|
@@ -65076,7 +65086,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
65076
65086
|
}
|
|
65077
65087
|
options2.push({
|
|
65078
65088
|
value: identifier,
|
|
65079
|
-
label: field,
|
|
65089
|
+
label: toTitleCaseLabel(field),
|
|
65080
65090
|
field,
|
|
65081
65091
|
tableName,
|
|
65082
65092
|
type
|