@quillsql/react 2.16.87 → 2.16.89
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 +18 -3
- package/dist/index.js +18 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -23705,10 +23705,24 @@ function hasPreformattedDateBucketLabels(report) {
|
|
|
23705
23705
|
if (report.chartType?.toLowerCase() === "table") return false;
|
|
23706
23706
|
return report.xAxisField?.trim() === pivot.rowField?.trim();
|
|
23707
23707
|
}
|
|
23708
|
+
function applySavedPivotColumnLabels(report, pivotColumns) {
|
|
23709
|
+
return pivotColumns?.map((column) => {
|
|
23710
|
+
const savedColumn = report.columns?.find(
|
|
23711
|
+
({ field }) => field === column.field
|
|
23712
|
+
);
|
|
23713
|
+
const rowLabel = column.field === report.pivot?.rowField ? report.xAxisLabel : void 0;
|
|
23714
|
+
return {
|
|
23715
|
+
...column,
|
|
23716
|
+
label: rowLabel || savedColumn?.label || column.label
|
|
23717
|
+
};
|
|
23718
|
+
});
|
|
23719
|
+
}
|
|
23708
23720
|
function prepareStaticChartReport(report, { removePagination }) {
|
|
23709
|
-
const
|
|
23721
|
+
const pivotData = report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : void 0;
|
|
23722
|
+
const config = pivotData ? {
|
|
23710
23723
|
...report,
|
|
23711
|
-
...
|
|
23724
|
+
...pivotData,
|
|
23725
|
+
columns: applySavedPivotColumnLabels(report, pivotData.columns)
|
|
23712
23726
|
} : { ...report };
|
|
23713
23727
|
if (removePagination) {
|
|
23714
23728
|
config.pagination = void 0;
|
|
@@ -71155,7 +71169,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71155
71169
|
dashboardName: resolvedDashboardName,
|
|
71156
71170
|
...isAdmin ? { adminMode: true } : {},
|
|
71157
71171
|
...hasSectionOverride ? { section: overrides.section } : {},
|
|
71158
|
-
|
|
71172
|
+
columns: isPivotTable ? chart?.columns ?? sourceReport.columns : table.columns,
|
|
71159
71173
|
...isFlatTable ? {
|
|
71160
71174
|
sort: effectiveReportBuilderState.sort?.[0] ?? null
|
|
71161
71175
|
} : {},
|
|
@@ -71198,6 +71212,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71198
71212
|
},
|
|
71199
71213
|
[
|
|
71200
71214
|
cacheCab,
|
|
71215
|
+
chart?.columns,
|
|
71201
71216
|
chartVisibility.showLegend,
|
|
71202
71217
|
client,
|
|
71203
71218
|
dashboardNameForNewReport,
|
package/dist/index.js
CHANGED
|
@@ -23687,10 +23687,24 @@ function hasPreformattedDateBucketLabels(report) {
|
|
|
23687
23687
|
if (report.chartType?.toLowerCase() === "table") return false;
|
|
23688
23688
|
return report.xAxisField?.trim() === pivot.rowField?.trim();
|
|
23689
23689
|
}
|
|
23690
|
+
function applySavedPivotColumnLabels(report, pivotColumns) {
|
|
23691
|
+
return pivotColumns?.map((column) => {
|
|
23692
|
+
const savedColumn = report.columns?.find(
|
|
23693
|
+
({ field }) => field === column.field
|
|
23694
|
+
);
|
|
23695
|
+
const rowLabel = column.field === report.pivot?.rowField ? report.xAxisLabel : void 0;
|
|
23696
|
+
return {
|
|
23697
|
+
...column,
|
|
23698
|
+
label: rowLabel || savedColumn?.label || column.label
|
|
23699
|
+
};
|
|
23700
|
+
});
|
|
23701
|
+
}
|
|
23690
23702
|
function prepareStaticChartReport(report, { removePagination }) {
|
|
23691
|
-
const
|
|
23703
|
+
const pivotData = report.pivot ? formattedPivotRowsAndColumns(report, [], { formatRows: false }) : void 0;
|
|
23704
|
+
const config = pivotData ? {
|
|
23692
23705
|
...report,
|
|
23693
|
-
...
|
|
23706
|
+
...pivotData,
|
|
23707
|
+
columns: applySavedPivotColumnLabels(report, pivotData.columns)
|
|
23694
23708
|
} : { ...report };
|
|
23695
23709
|
if (removePagination) {
|
|
23696
23710
|
config.pagination = void 0;
|
|
@@ -71363,7 +71377,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71363
71377
|
dashboardName: resolvedDashboardName,
|
|
71364
71378
|
...isAdmin ? { adminMode: true } : {},
|
|
71365
71379
|
...hasSectionOverride ? { section: overrides.section } : {},
|
|
71366
|
-
|
|
71380
|
+
columns: isPivotTable ? chart?.columns ?? sourceReport.columns : table.columns,
|
|
71367
71381
|
...isFlatTable ? {
|
|
71368
71382
|
sort: effectiveReportBuilderState.sort?.[0] ?? null
|
|
71369
71383
|
} : {},
|
|
@@ -71406,6 +71420,7 @@ function useReport(reportIdArg, options = {}) {
|
|
|
71406
71420
|
},
|
|
71407
71421
|
[
|
|
71408
71422
|
cacheCab,
|
|
71423
|
+
chart?.columns,
|
|
71409
71424
|
chartVisibility.showLegend,
|
|
71410
71425
|
client,
|
|
71411
71426
|
dashboardNameForNewReport,
|