Skip to content

Commit 2809f49

Browse files
committed
fix(plugin-report): name the export format type apart from @object-ui/types; regenerate liveness counts
Claude-Session: https://claude.ai/code/session_01JQwxbYfDeaywgrS5N1PZfg Co-authored-by: Claude <noreply@anthropic.com>
1 parent 71680ec commit 2809f49

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

‎packages/spec/liveness/state-counts/report.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ committed anywhere: `check:liveness` sums the shards when it reads them.
1212

1313
| Type | live | exp | elsewhere | dead | planned | classified |
1414
|---|---|---|---|---|---|---|
15-
| `report` | 21 | 0 | 0 | 0 | 6 | 27 |
15+
| `report` | 24 | 0 | 0 | 0 | 3 | 27 |

‎ui/packages/plugin-report/src/ReportExport.tsx‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ export function PublishReportTableSnapshot({ snapshot }: { snapshot: ReportTable
8282
return null;
8383
}
8484

85-
export type ReportExportFormat = 'csv' | 'xlsx';
85+
export type ReportTableExportFormat = 'csv' | 'xlsx';
8686

87-
const REPORT_EXPORT_FORMATS: readonly ReportExportFormat[] = ['csv', 'xlsx'];
87+
const REPORT_EXPORT_FORMATS: readonly ReportTableExportFormat[] = ['csv', 'xlsx'];
8888

8989
/** The `exportOptions` shape the renderer reads (validated by `ReportSchema`). */
9090
export interface ReportExportOptionsLike {
@@ -94,13 +94,13 @@ export interface ReportExportOptionsLike {
9494
}
9595

9696
/** The formats the control offers: absent → both; `[]` → none; order as declared. */
97-
export function readReportExportFormats(options: unknown): ReportExportFormat[] {
97+
export function readReportExportFormats(options: unknown): ReportTableExportFormat[] {
9898
const formats = (options as ReportExportOptionsLike | undefined)?.formats;
9999
if (!Array.isArray(formats)) return [...REPORT_EXPORT_FORMATS];
100-
const out: ReportExportFormat[] = [];
100+
const out: ReportTableExportFormat[] = [];
101101
for (const f of formats) {
102-
if ((REPORT_EXPORT_FORMATS as readonly unknown[]).includes(f) && !out.includes(f as ReportExportFormat)) {
103-
out.push(f as ReportExportFormat);
102+
if ((REPORT_EXPORT_FORMATS as readonly unknown[]).includes(f) && !out.includes(f as ReportTableExportFormat)) {
103+
out.push(f as ReportTableExportFormat);
104104
}
105105
}
106106
return out;
@@ -191,7 +191,7 @@ export function ReportExportControl({ exportOptions, label, name, snapshot }: Re
191191
const reportLabel = pickLocalized(label, language) || name || '';
192192
const prefix = typeof options.fileNamePrefix === 'string' ? options.fileNamePrefix : undefined;
193193

194-
const run = async (format: ReportExportFormat) => {
194+
const run = async (format: ReportTableExportFormat) => {
195195
setBusy(true);
196196
setError(null);
197197
try {

0 commit comments

Comments
 (0)