@quillsql/react 2.16.55 → 2.16.56

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
@@ -65982,8 +65982,9 @@ function useReport(reportIdArg, options = {}) {
65982
65982
  return {
65983
65983
  ...previousReport,
65984
65984
  ...report,
65985
+ // Keep chart axis metadata from the pivot load; detail fetch is flat
65986
+ // (`pivot: null`) and must supply wide `columns` for the detail table.
65985
65987
  xAxisFormat: previousReport.xAxisFormat,
65986
- columns: previousReport.columns,
65987
65988
  yAxisFields: previousReport.yAxisFields,
65988
65989
  pivot: previousReport.pivot,
65989
65990
  pivotRows: previousReport.pivotRows,
@@ -67912,6 +67913,7 @@ function useReport(reportIdArg, options = {}) {
67912
67913
  adminMode: _omitAdminMode,
67913
67914
  ...sourceRest
67914
67915
  } = sourceReport;
67916
+ const isFlatTable = String(resolvedChartType).toLowerCase() === "table" && !effectiveReportBuilderState.pivot;
67915
67917
  const resp = await saveReport({
67916
67918
  report: {
67917
67919
  ...EMPTY_INTERNAL_REPORT,
@@ -67922,6 +67924,10 @@ function useReport(reportIdArg, options = {}) {
67922
67924
  // Match chart rendering (`chartData`): form `chartType` wins over stale `sourceReport`.
67923
67925
  chartType: resolvedChartType,
67924
67926
  dashboardName: dashboardNameForNewReport,
67927
+ ...isFlatTable ? {
67928
+ columns: table.columns,
67929
+ sort: effectiveReportBuilderState.sort?.[0] ?? null
67930
+ } : {},
67925
67931
  reportBuilderState: effectiveReportBuilderState,
67926
67932
  pivot: effectiveReportBuilderState.pivot ?? null,
67927
67933
  // Axis control state (measures / aggregation fields). Do not use
@@ -67956,6 +67962,7 @@ function useReport(reportIdArg, options = {}) {
67956
67962
  resolvedYAxisFields,
67957
67963
  sourceReport,
67958
67964
  setDraftSessionId,
67965
+ table.columns,
67959
67966
  tenants
67960
67967
  ]);
67961
67968
  return {
package/dist/index.js CHANGED
@@ -66194,8 +66194,9 @@ function useReport(reportIdArg, options = {}) {
66194
66194
  return {
66195
66195
  ...previousReport,
66196
66196
  ...report,
66197
+ // Keep chart axis metadata from the pivot load; detail fetch is flat
66198
+ // (`pivot: null`) and must supply wide `columns` for the detail table.
66197
66199
  xAxisFormat: previousReport.xAxisFormat,
66198
- columns: previousReport.columns,
66199
66200
  yAxisFields: previousReport.yAxisFields,
66200
66201
  pivot: previousReport.pivot,
66201
66202
  pivotRows: previousReport.pivotRows,
@@ -68124,6 +68125,7 @@ function useReport(reportIdArg, options = {}) {
68124
68125
  adminMode: _omitAdminMode,
68125
68126
  ...sourceRest
68126
68127
  } = sourceReport;
68128
+ const isFlatTable = String(resolvedChartType).toLowerCase() === "table" && !effectiveReportBuilderState.pivot;
68127
68129
  const resp = await saveReport({
68128
68130
  report: {
68129
68131
  ...EMPTY_INTERNAL_REPORT,
@@ -68134,6 +68136,10 @@ function useReport(reportIdArg, options = {}) {
68134
68136
  // Match chart rendering (`chartData`): form `chartType` wins over stale `sourceReport`.
68135
68137
  chartType: resolvedChartType,
68136
68138
  dashboardName: dashboardNameForNewReport,
68139
+ ...isFlatTable ? {
68140
+ columns: table.columns,
68141
+ sort: effectiveReportBuilderState.sort?.[0] ?? null
68142
+ } : {},
68137
68143
  reportBuilderState: effectiveReportBuilderState,
68138
68144
  pivot: effectiveReportBuilderState.pivot ?? null,
68139
68145
  // Axis control state (measures / aggregation fields). Do not use
@@ -68168,6 +68174,7 @@ function useReport(reportIdArg, options = {}) {
68168
68174
  resolvedYAxisFields,
68169
68175
  sourceReport,
68170
68176
  setDraftSessionId,
68177
+ table.columns,
68171
68178
  tenants
68172
68179
  ]);
68173
68180
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quillsql/react",
3
- "version": "2.16.55",
3
+ "version": "2.16.56",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {