@object-ui/plugin-report 16.1.0 → 17.1.0

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/CHANGELOG.md CHANGED
@@ -1,5 +1,285 @@
1
1
  # @object-ui/plugin-report
2
2
 
3
+ ## 17.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8529444: feat(report): carry a report's `order` into the dataset selection (framework#3916)
8
+
9
+ `@objectstack/spec` 17 gave reports an ordering declaration — `ReportSchema.order`
10
+ (and `blocks[].order` for a joined report): a list of `{ by, direction }` keys,
11
+ most significant first. The framework executor applies it. `DatasetReportRenderer`
12
+ built the selection it posts and never carried the declaration into it, so an
13
+ authored `order` reached no query and did nothing.
14
+
15
+ `useDatasetRows` — the single fetch choke point behind every report path — now
16
+ takes the lowered ordering, and all four call sites supply it: the grouped table,
17
+ the embedded chart, the matrix cross-tab, and each joined block.
18
+
19
+ - **Lowering.** `readOrder()` turns the authored list into
20
+ `DatasetSelection.order`, the array's element order becoming the object's key
21
+ insertion order (which is how sort significance is expressed on the wire). It
22
+ is permissive about its input, like the neighbouring `readNames()` — stored
23
+ report JSON crosses the repo boundary and may lag the schema, so an entry with
24
+ no usable `by` is dropped rather than thrown. An absent or entirely-unusable
25
+ list yields `undefined`, so the field is OMITTED and the server's own defaults
26
+ still apply: a selected time dimension comes back chronological with nothing
27
+ declared.
28
+
29
+ Kept local rather than importing spec's `reportSelectionOrder` — the pinned
30
+ `^17.0.0-rc.0` predates that export. Swap it for the import on the next bump.
31
+
32
+ - **Scoped per sub-selection.** A report's `order` is validated against its
33
+ WHOLE selection, but this renderer issues narrower queries from it: the chart
34
+ plots one dimension × one measure, and the flat-table path drops the matrix
35
+ across-dimensions. The server rejects an order key naming nothing the
36
+ selection projects (a deliberate 400), so forwarding the full list would turn
37
+ a valid report into a failed chart. Keys outside a sub-selection are dropped
38
+ at the choke point instead. Nothing is masked: the schema already validated
39
+ every key against `rows` ∪ `columns` ∪ `values`, so the only keys that can be
40
+ lost are ones the narrower query genuinely has no column for.
41
+
42
+ - **Part of the refetch key.** The ordering changes the ROWS the server returns,
43
+ not just their presentation, so it joins the `useDatasetRows` signature — an
44
+ ordering edited from asc to desc refetches instead of re-rendering the stale
45
+ grid.
46
+
47
+ - **Matrix across-axis.** `colHeaders` are collected in row-arrival order, so
48
+ ordering the rows by the across dimension is what makes the columns read
49
+ left-to-right in that order. Ordering rides on the primary query only; the
50
+ server drops it for the totals sub-queries by design.
51
+
52
+ Ordering stays server-side throughout — never a client-side re-sort, which would
53
+ order the page rather than the query and could not sort by a derived measure at
54
+ all.
55
+
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [62311b6]
59
+ - Updated dependencies [fc0272a]
60
+ - Updated dependencies [9e7349e]
61
+ - Updated dependencies [8864971]
62
+ - Updated dependencies [1cf0de7]
63
+ - Updated dependencies [752e18f]
64
+ - Updated dependencies [c785740]
65
+ - Updated dependencies [b41f401]
66
+ - Updated dependencies [5340879]
67
+ - Updated dependencies [19e9fa0]
68
+ - Updated dependencies [a149e90]
69
+ - Updated dependencies [d61efd1]
70
+ - Updated dependencies [95b7214]
71
+ - Updated dependencies [7d9734d]
72
+ - Updated dependencies [6ae818e]
73
+ - Updated dependencies [9eb932b]
74
+ - Updated dependencies [746dd00]
75
+ - Updated dependencies [aebfa4f]
76
+ - Updated dependencies [38ca8be]
77
+ - Updated dependencies [3cb9646]
78
+ - Updated dependencies [68ef584]
79
+ - Updated dependencies [4952edf]
80
+ - Updated dependencies [7f0252e]
81
+ - Updated dependencies [c4d7b20]
82
+ - Updated dependencies [c769d3d]
83
+ - Updated dependencies [7639a61]
84
+ - Updated dependencies [94e63ef]
85
+ - Updated dependencies [c735bf7]
86
+ - Updated dependencies [02aef0c]
87
+ - Updated dependencies [6f29aa5]
88
+ - Updated dependencies [d21794c]
89
+ - Updated dependencies [c4db402]
90
+ - Updated dependencies [5319bf1]
91
+ - Updated dependencies [49e5671]
92
+ - Updated dependencies [9a04d25]
93
+ - Updated dependencies [b5b97e2]
94
+ - Updated dependencies [f59f2c1]
95
+ - Updated dependencies [07de839]
96
+ - Updated dependencies [2a40b5e]
97
+ - Updated dependencies [df613fa]
98
+ - Updated dependencies [4874117]
99
+ - Updated dependencies [ad0183a]
100
+ - Updated dependencies [ce08d55]
101
+ - Updated dependencies [eb4b740]
102
+ - Updated dependencies [aecc934]
103
+ - Updated dependencies [5b084eb]
104
+ - Updated dependencies [aa1240a]
105
+ - Updated dependencies [2374a49]
106
+ - Updated dependencies [390c071]
107
+ - Updated dependencies [d10f526]
108
+ - Updated dependencies [2d5d594]
109
+ - Updated dependencies [ea7f477]
110
+ - Updated dependencies [379728f]
111
+ - Updated dependencies [7f23cd0]
112
+ - Updated dependencies [0ded602]
113
+ - Updated dependencies [24e0e0a]
114
+ - Updated dependencies [f8a95e5]
115
+ - Updated dependencies [3a6cf24]
116
+ - Updated dependencies [aa35561]
117
+ - Updated dependencies [03bd53b]
118
+ - Updated dependencies [3c1f321]
119
+ - Updated dependencies [a045a32]
120
+ - Updated dependencies [912496d]
121
+ - Updated dependencies [80edbd4]
122
+ - Updated dependencies [9867281]
123
+ - @object-ui/core@17.1.0
124
+ - @object-ui/components@17.1.0
125
+ - @object-ui/plugin-grid@17.1.0
126
+ - @object-ui/react@17.1.0
127
+ - @object-ui/types@17.1.0
128
+ - @object-ui/i18n@17.1.0
129
+ - @object-ui/fields@17.1.0
130
+
131
+ ## 17.0.0
132
+
133
+ ### Minor Changes
134
+
135
+ - 059a052: feat(report)!: drop `SpecReportColumn`/`SpecReportGrouping` re-exports + retire the legacy ReportViewer chart fallback (#3463)
136
+
137
+ Cross-repo close-out of the ADR-0021 report cleanup (framework #3463). Upstream
138
+ `@objectstack/spec` removed the dead `ReportColumnSchema` / `ReportGroupingSchema`
139
+ and the unread report `chart.groupBy`; this drops their objectui mirrors and the
140
+ now-orphaned legacy report chart path.
141
+
142
+ - **types**: removed the `SpecReportColumn` / `SpecReportColumnInput` /
143
+ `SpecReportGrouping` / `SpecReportGroupingInput` type re-exports and the
144
+ `SpecReportColumnSchema` / `SpecReportGroupingSchema` value re-exports from
145
+ `@object-ui/types` (they aliased the deleted upstream symbols). The live
146
+ report shape is dataset-bound — `SpecReport` with `dataset` + `values`
147
+ (measure names) + `rows` / `columns` (dimension names).
148
+ - **app-shell**: `ReportView` now renders every report through the spec
149
+ `ReportRenderer` dispatcher (dataset → `DatasetReportRenderer`, stored pre-9.0
150
+ JSON → presentation bridge, pre-spec `{ data, columns }` → `LegacyReportRenderer`).
151
+ Deleted the `ReportViewer` last-resort branch, the `mapReportForViewer`
152
+ spec→legacy chart-section adapter (the sole producer of `xAxisField` /
153
+ `yAxisFields`), and the now-dead data-fetch loading flag. No shipped report
154
+ metadata reached the removed branch — the Studio inspector only ever writes
155
+ the dataset-bound shape.
156
+ - **plugin-report**: removed the `ReportViewer` chart-section branch. It read
157
+ the invented `xAxisField` / `yAxisFields` (never the spec's `xAxis` / `yAxis`)
158
+ and was only fed by the deleted `mapReportForViewer`. `ReportViewer` itself is
159
+ retained — its table / summary / text sections still back the `report-viewer`
160
+ registered component and the pre-9.0 presentation bridge.
161
+
162
+ **Migration**: nothing an author writes changes. TypeScript consumers importing
163
+ `SpecReportColumn*` / `SpecReportGrouping*` from `@object-ui/types` have no
164
+ replacement type — model report columns as the dataset's measure names and
165
+ grouping as its dimension names.
166
+
167
+ ### Patch Changes
168
+
169
+ - 5b9cf96: fix(plugin-map): drop the `maplibre-gl@6` default import, and put type-check behind a CI gate that cannot be silently skipped (#2911)
170
+
171
+ `maplibre-gl@6.0.0` removed its default export (arrived via #2848, dependabot),
172
+ so `ObjectMap.tsx`'s `import maplibregl from 'maplibre-gl'` has been a TS1192
173
+ error on `main` for a day. The binding was never used — the map instance comes
174
+ from `react-map-gl/maplibre`, and the stylesheet from the side-effect import on
175
+ the next line — so the import is simply deleted rather than rewritten to
176
+ `import * as`.
177
+
178
+ Removing it is runtime-neutral, which the issue had explicitly left unverified.
179
+ `@vis.gl/react-maplibre` (what `react-map-gl/maplibre` re-exports) does
180
+ `Promise.resolve(mapLib || import('maplibre-gl'))` in `components/map.js`, so it
181
+ loads the library itself when no `mapLib` prop is passed. Verified in a browser
182
+ against the `store-locator-map` catalog schema: `maplibre-gl` is fetched as its
183
+ own lazy chunk, the WebGL canvas comes up 800x600, and all three markers mount —
184
+ byte-identical probe output with and without the static import. That also matches
185
+ what `apps/console/src/main.tsx` already intends, where the plugin is registered
186
+ lazily specifically to keep `maplibre-gl` out of the initial bundle.
187
+
188
+ **The reason it survived a day of green CI is the part worth fixing.** No
189
+ workflow ran `type-check` at all, and `turbo build` only checks types for
190
+ packages whose `build` script happens to invoke `tsc` — the 22 `vite build`
191
+ packages transpile without checking. A sweep of all 45 packages found ten with
192
+ broken types, `plugin-map` merely being the one that had a script to notice it.
193
+
194
+ Adding a `pnpm type-check` job alone would not have been a gate: **turbo silently
195
+ skips any package with no `type-check` script**, so 17 packages read as passing
196
+ because nothing ran. With `plugin-map` fixed, `pnpm type-check` reports 63/63
197
+ green while nine packages are still broken. So:
198
+
199
+ - `plugin-ai` and `plugin-report` gain the `paths` override their type-checked
200
+ peers already carry, which detaches workspace deps from sibling _source_ and
201
+ resolves them through built `.d.ts` — the sole cause of the 104-error TS6059
202
+ `rootDir` floods, and the same trick their own `vite.config.ts` already applies
203
+ to the dts program.
204
+ - Seven packages gain `"type-check": "tsc --noEmit"` (`plugin-ai`,
205
+ `plugin-report`, `plugin-dashboard`, `create-plugin`, `console`, and the two
206
+ console examples). Coverage goes 28 -> 35 of 45.
207
+ - New `scripts/check-type-check-coverage.mjs` makes the invisibility impossible:
208
+ a package with no `type-check` script must be declared, with a reason, and the
209
+ lists only shrink — gaining a script without deleting the entry fails the
210
+ guard. The nine known-broken packages are recorded there with error counts
211
+ (`@object-ui/runner` has no `tsconfig.json` at all), tracked as follow-ups.
212
+ - New `Type Check` CI job runs the coverage guard first (instant, no install),
213
+ then `pnpm type-check`.
214
+
215
+ Both halves were proven to fail before being trusted: the guard was exercised in
216
+ all four of its failure modes, and re-introducing the `maplibre-gl` import turns
217
+ the job red again, as does a fresh error injected into `plugin-ai` — a package
218
+ that had no type checking whatsoever before this change.
219
+
220
+ - Updated dependencies [7b21891]
221
+ - Updated dependencies [0b3be01]
222
+ - Updated dependencies [3c4d935]
223
+ - Updated dependencies [4b1ed7d]
224
+ - Updated dependencies [4b60d2d]
225
+ - Updated dependencies [952b978]
226
+ - Updated dependencies [de5e40c]
227
+ - Updated dependencies [1a03af6]
228
+ - Updated dependencies [3e886eb]
229
+ - Updated dependencies [cfc675e]
230
+ - Updated dependencies [20df08c]
231
+ - Updated dependencies [1767124]
232
+ - Updated dependencies [8ecf5a6]
233
+ - Updated dependencies [af705b9]
234
+ - Updated dependencies [0502a7c]
235
+ - Updated dependencies [7b35e4b]
236
+ - Updated dependencies [8fb1295]
237
+ - Updated dependencies [e16ed2d]
238
+ - Updated dependencies [c6fd752]
239
+ - Updated dependencies [f9bbddb]
240
+ - Updated dependencies [dfd3705]
241
+ - Updated dependencies [c77108c]
242
+ - Updated dependencies [2735de6]
243
+ - Updated dependencies [697cda4]
244
+ - Updated dependencies [c19ac11]
245
+ - Updated dependencies [6dee2cb]
246
+ - Updated dependencies [e05f052]
247
+ - Updated dependencies [0502a7c]
248
+ - Updated dependencies [faad45e]
249
+ - Updated dependencies [553443e]
250
+ - Updated dependencies [09c6a17]
251
+ - Updated dependencies [c7cff19]
252
+ - Updated dependencies [df6697f]
253
+ - Updated dependencies [ba73a02]
254
+ - Updated dependencies [ba45145]
255
+ - Updated dependencies [cd09a7b]
256
+ - Updated dependencies [f1abf0e]
257
+ - Updated dependencies [f05b84e]
258
+ - Updated dependencies [9b4b952]
259
+ - Updated dependencies [341bfb5]
260
+ - Updated dependencies [2f947e4]
261
+ - Updated dependencies [7d46648]
262
+ - Updated dependencies [9b53d72]
263
+ - Updated dependencies [bb4aa25]
264
+ - Updated dependencies [75f1cdf]
265
+ - Updated dependencies [662bdf9]
266
+ - Updated dependencies [059a052]
267
+ - Updated dependencies [53642d4]
268
+ - Updated dependencies [8aae006]
269
+ - Updated dependencies [c6cfdf1]
270
+ - Updated dependencies [dc7a798]
271
+ - Updated dependencies [d147a13]
272
+ - Updated dependencies [c6aaed8]
273
+ - Updated dependencies [263f885]
274
+ - Updated dependencies [dc334da]
275
+ - @object-ui/components@17.0.0
276
+ - @object-ui/i18n@17.0.0
277
+ - @object-ui/fields@17.0.0
278
+ - @object-ui/react@17.0.0
279
+ - @object-ui/plugin-grid@17.0.0
280
+ - @object-ui/types@17.0.0
281
+ - @object-ui/core@17.0.0
282
+
3
283
  ## 16.1.0
4
284
 
5
285
  ### Minor Changes
@@ -26,7 +306,7 @@
26
306
  and removes both bounds together. A new `drillUrlFilters` module owns the
27
307
  write/read serialization so both sides can't drift (round-trip tested).
28
308
 
29
- Companion to the framework analytics change (objectstack-ai/framework#3256).
309
+ Companion to the framework analytics change (objectstack-ai/objectstack#3256).
30
310
 
31
311
  ### Patch Changes
32
312
 
@@ -9,7 +9,10 @@
9
9
  * use, so the numbers (and the server-resolved dimension display labels)
10
10
  * match everywhere.
11
11
  *
12
- * - `summary` / `tabular` → one grouped table (`rows` + `values`).
12
+ * - `tabular` → the selection as a simple list (`rows` + `values`), no totals.
13
+ * - `summary` → the same table plus a SERVER-computed grand-total footer
14
+ * (`totals: { groupings: [[]] }`) — the declared type picks the branch
15
+ * (#2941), the data shape never does.
13
16
  * - `matrix` → a true cross-tab (ADR-0021 D2): `rows` down × `columns`
14
17
  * across, measures in the cells. One dataset query over all dimensions,
15
18
  * pivoted client-side. Totals (per-row subtotals, per-column subtotals,
@@ -30,6 +33,19 @@
30
33
  * the field's declared `currency` (`Intl` symbol) + numeral `format`, never
31
34
  * the raw field name or a misleading "$".
32
35
  *
36
+ * Ordering (framework#3916): a report's `order` — a list of `{ by, direction }`
37
+ * keys, most significant first — is lowered onto the dataset selection, so the
38
+ * SERVER orders the whole grid (after measure-scoped filters merge and derived
39
+ * measures evaluate) and this renderer only places the rows it is handed. It is
40
+ * never a client-side re-sort: sorting here would order the truncated page
41
+ * rather than the query, and could not sort by a derived measure at all.
42
+ *
43
+ * For a matrix that also decides the ACROSS axis: `colHeaders` are collected in
44
+ * row-arrival order, so ordering the rows by the across dimension is what makes
45
+ * the columns read left-to-right in that order. Declaring nothing still reads
46
+ * correctly — the server defaults a selected time dimension to ascending, which
47
+ * is what makes month/quarter columns chronological out of the box.
48
+ *
33
49
  * Drill-down (ADR-0021 D2): when the report's `drilldown` flag is not `false`
34
50
  * and the host supplies `onDrill`, every aggregated row / matrix cell is
35
51
  * clickable and emits `{ dataset, groupKey, runtimeFilter }`. The HOST owns
@@ -69,6 +85,16 @@ interface DatasetReportLike {
69
85
  values?: string[];
70
86
  runtimeFilter?: Record<string, unknown>;
71
87
  filter?: Record<string, unknown>;
88
+ /**
89
+ * Result ordering, most significant key first (framework#3916). Each `by`
90
+ * names a dimension the report groups by (`rows` / `columns`) or a measure it
91
+ * displays (`values`). A `joined` report carries this per BLOCK, never on the
92
+ * container.
93
+ */
94
+ order?: Array<{
95
+ by?: unknown;
96
+ direction?: unknown;
97
+ }>;
72
98
  /** Click-through to underlying records (default true). */
73
99
  drilldown?: boolean;
74
100
  /** Embedded chart visualization (ADR-0021): type + xAxis/yAxis over the dataset. */
@@ -91,5 +117,59 @@ export interface DatasetReportRendererProps {
91
117
  }
92
118
  /** `true` when this report should render through the dataset path. */
93
119
  export declare function isDatasetReport(value: unknown): value is DatasetReportLike;
120
+ /**
121
+ * Resolve a report's declared `type` — the spec's `ReportType`
122
+ * (`ui/report.zod.ts`: `tabular | summary | matrix | joined`) — to the
123
+ * presentation it renders. The DECLARED type picks the branch; it is never
124
+ * inferred from the data shape. Before this, `tabular` and `summary` shared
125
+ * one branch and the visual difference was read off whether `rows` happened
126
+ * to be non-empty — a `tabular` report that declared `rows` silently rendered
127
+ * exactly like a `summary` (#2941). An absent/out-of-spec value falls back to
128
+ * `tabular`, the spec's own declared default.
129
+ *
130
+ * Exported for the spec-parity test, which fails the moment `ReportType` and
131
+ * this dispatch drift in either direction.
132
+ */
133
+ export declare function resolveReportPresentation(type: unknown): 'tabular' | 'summary' | 'matrix' | 'joined';
134
+ /** How a report renders its embedded chart for one spec `ChartTypeSchema` value. */
135
+ export type ReportChartPlan =
136
+ /** A categorical series the generic chart component draws distinctly. */
137
+ {
138
+ kind: 'series';
139
+ chartType: string;
140
+ }
141
+ /** Single-value family — one dimensionless dataset query, shown as a number. */
142
+ | {
143
+ kind: 'single_value';
144
+ }
145
+ /** Tabular family — the grouped table beneath IS the rendering; no duplicate chart. */
146
+ | {
147
+ kind: 'tabular';
148
+ }
149
+ /** Out-of-spec value (stored dialect / typo) — surfaced, never a silent bar. */
150
+ | {
151
+ kind: 'unsupported';
152
+ type: string;
153
+ };
154
+ /**
155
+ * Classify a report chart type into its rendering plan — every value of the
156
+ * spec's `ChartTypeSchema` (`ui/chart.zod.ts`, 19 names), each on the branch
157
+ * its family demands. The old mapping collapsed 10 of the 19 to a BAR — a
158
+ * plausible wrong picture with no warning (#2941). Now:
159
+ *
160
+ * - the 12 series families reach the generic chart component verbatim
161
+ * (`column` is its documented vertical-bar alias; `horizontal-bar` stays
162
+ * horizontal instead of silently flipping vertical);
163
+ * - the single-value families (`gauge` / `solid-gauge` / `metric` / `kpi` /
164
+ * `bullet`) render the measure as a number — the spec's own comment calls
165
+ * them "honest single-value variants pending a real dial/target renderer";
166
+ * - `table` / `pivot` add no duplicate chart: the grouped table that always
167
+ * renders beneath the chart slot is exactly the tabular presentation;
168
+ * - anything else is out-of-spec and gets a visible notice.
169
+ *
170
+ * Exported for the spec-parity test, which fails the moment `ChartTypeSchema`
171
+ * and this classification drift in either direction.
172
+ */
173
+ export declare function planReportChart(t: unknown): ReportChartPlan;
94
174
  export declare const DatasetReportRenderer: React.FC<DatasetReportRendererProps>;
95
175
  export {};
@@ -1,4 +1,4 @@
1
- import { DataSource, QueryParams, ReportSchema, ReportExportFormat, ReportExportConfig, ReportSchedule } from '@object-ui/types';
1
+ import { DataSource, QueryParams, ReportComponentSchema, ReportExportFormat, ReportExportConfig, ReportScheduleConfig } from '@object-ui/types';
2
2
  /**
3
3
  * Options for live report export
4
4
  */
@@ -45,7 +45,7 @@ export interface LiveExportResult {
45
45
  /**
46
46
  * Schedule trigger callback
47
47
  */
48
- export type ScheduleTriggerCallback = (report: ReportSchema, schedule: ReportSchedule) => void;
48
+ export type ScheduleTriggerCallback = (report: ReportComponentSchema, schedule: ReportScheduleConfig) => void;
49
49
  /**
50
50
  * Export a report with live data fetched from a DataSource adapter.
51
51
  *
@@ -58,7 +58,7 @@ export type ScheduleTriggerCallback = (report: ReportSchema, schedule: ReportSch
58
58
  * });
59
59
  * ```
60
60
  */
61
- export declare function exportWithLiveData(report: ReportSchema, options: LiveExportOptions): Promise<LiveExportResult>;
61
+ export declare function exportWithLiveData(report: ReportComponentSchema, options: LiveExportOptions): Promise<LiveExportResult>;
62
62
  /**
63
63
  * Export report as Excel with formatted columns and formula support.
64
64
  *
@@ -79,7 +79,7 @@ export declare function exportWithLiveData(report: ReportSchema, options: LiveEx
79
79
  * });
80
80
  * ```
81
81
  */
82
- export declare function exportExcelWithFormulas(report: ReportSchema, data: any[], options?: {
82
+ export declare function exportExcelWithFormulas(report: ReportComponentSchema, data: any[], options?: {
83
83
  columns?: ExcelColumnConfig[];
84
84
  filename?: string;
85
85
  includeAggregationRow?: boolean;
@@ -101,4 +101,4 @@ export declare function exportExcelWithFormulas(report: ReportSchema, data: any[
101
101
  * await trigger();
102
102
  * ```
103
103
  */
104
- export declare function createScheduleTrigger(report: ReportSchema, dataSource: DataSource, resource: string, onComplete: ScheduleTriggerCallback): () => Promise<LiveExportResult[]>;
104
+ export declare function createScheduleTrigger(report: ReportComponentSchema, dataSource: DataSource, resource: string, onComplete: ScheduleTriggerCallback): () => Promise<LiveExportResult[]>;
@@ -1,4 +1,4 @@
1
- import { ReportSchema, ReportExportConfig, ReportExportFormat } from '@object-ui/types';
1
+ import { ReportComponentSchema, ReportExportConfig, ReportExportFormat } from '@object-ui/types';
2
2
  /**
3
3
  * Report Export Engine
4
4
  * Handles exporting report data to various formats using browser-native APIs.
@@ -6,24 +6,24 @@ import { ReportSchema, ReportExportConfig, ReportExportFormat } from '@object-ui
6
6
  /**
7
7
  * Export report data as CSV
8
8
  */
9
- export declare function exportAsCSV(report: ReportSchema, data: any[], config?: ReportExportConfig): void;
9
+ export declare function exportAsCSV(report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
10
10
  /**
11
11
  * Export report data as JSON
12
12
  */
13
- export declare function exportAsJSON(report: ReportSchema, data: any[], config?: ReportExportConfig): void;
13
+ export declare function exportAsJSON(report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
14
14
  /**
15
15
  * Export report as HTML (printable format)
16
16
  */
17
- export declare function exportAsHTML(report: ReportSchema, data: any[], config?: ReportExportConfig): void;
17
+ export declare function exportAsHTML(report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
18
18
  /**
19
19
  * Export report as PDF using browser print
20
20
  */
21
- export declare function exportAsPDF(report: ReportSchema, data: any[], config?: ReportExportConfig): void;
21
+ export declare function exportAsPDF(report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
22
22
  /**
23
23
  * Export report as Excel-compatible CSV (with BOM for proper UTF-8 in Excel)
24
24
  */
25
- export declare function exportAsExcel(report: ReportSchema, data: any[], config?: ReportExportConfig): void;
25
+ export declare function exportAsExcel(report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
26
26
  /**
27
27
  * Main export function - routes to correct format handler
28
28
  */
29
- export declare function exportReport(format: ReportExportFormat, report: ReportSchema, data: any[], config?: ReportExportConfig): void;
29
+ export declare function exportReport(format: ReportExportFormat, report: ReportComponentSchema, data: any[], config?: ReportExportConfig): void;
@@ -1,5 +1,14 @@
1
1
  import { default as React } from 'react';
2
2
  import { ReportViewerSchema } from '@object-ui/types';
3
+ /**
4
+ * Compute one summary value for a report column. Covers every
5
+ * `ReportAggregationType` member (`@object-ui/types/reports.ts`) — `distinct`
6
+ * used to fall into `default: return ''` and render a blank cell while the
7
+ * type accepted it (#2942). Exported for the coverage guard, whose sample
8
+ * table is `Record<ReportAggregationType, …>` so a new member fails
9
+ * type-check until it computes here.
10
+ */
11
+ export declare function computeReportAggregation(data: Record<string, any>[] | undefined, fieldName: string, aggregation?: string): string | number;
3
12
  export interface ReportViewerProps {
4
13
  schema: ReportViewerSchema;
5
14
  /** Callback to refresh data */