@palladium-ethiopia/esm-reports-app 5.4.2-pre.301 → 5.4.2-pre.302
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/.turbo/turbo-build.log +1 -1
- package/README.md +5 -20
- package/dist/256.js +1 -1
- package/dist/256.js.map +1 -1
- package/dist/612.js +1 -0
- package/dist/612.js.map +1 -0
- package/dist/esm-reports-app.js +1 -1
- package/dist/esm-reports-app.js.buildmanifest.json +31 -31
- package/dist/esm-reports-app.js.map +1 -1
- package/dist/main.js +2 -2
- package/dist/main.js.map +1 -1
- package/dist/routes.json +1 -1
- package/package.json +1 -1
- package/src/api/report-request.test.ts +132 -0
- package/src/api/report-request.ts +59 -1
- package/src/index.ts +4 -3
- package/src/report/report-results.component.tsx +17 -35
- package/src/report/report-runner.component.tsx +17 -14
- package/dist/743.js +0 -1
- package/dist/743.js.map +0 -1
- package/src/config-schema.ts +0 -272
package/.turbo/turbo-build.log
CHANGED
package/README.md
CHANGED
|
@@ -28,32 +28,17 @@ Reports returned by the backend are grouped into categories (e.g. Common, Cohort
|
|
|
28
28
|
Each report declares zero or more parameters with a name, display label, and Java type. The runner renders the appropriate Carbon input for each parameter — a `DatePicker` for any `java.util.Date`-typed parameter, and a `TextInput` for everything else. The Run and Download buttons are disabled until all parameters are filled.
|
|
29
29
|
|
|
30
30
|
### On-screen results table
|
|
31
|
-
After a report runs, each result dataset is displayed in a scrollable Carbon `DataTable`.
|
|
31
|
+
After a report runs, each result dataset is displayed in a scrollable Carbon `DataTable`. Columns are rendered in the dataset's server-declared order — the `metadata.columns` returned by `reportingrest`, i.e. the SQL `SELECT` order — so tables match the source paper layout rather than the hash order of the per-row JSON. Datasets that exist only to feed a report design template are hidden (see [Report layout](#report-layout)).
|
|
32
32
|
|
|
33
33
|
### Report design downloads
|
|
34
34
|
If a report has one or more rendering designs (e.g. an Excel template), a Download button is shown for each. Downloads are generated server-side and streamed to the browser; an `AbortController` cancels any in-flight download when the user navigates away.
|
|
35
35
|
|
|
36
|
-
##
|
|
36
|
+
## Report layout
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
The app needs **no per-report configuration** — column order and hidden datasets are both derived from data the backend already returns, so adding a report requires no frontend change.
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
| `columnOrderByUuid` | `Object` | See schema | Map of report UUID → ordered column name array. Columns are rendered in this order; columns present in the data but not listed are appended at the end. |
|
|
43
|
-
| `hiddenDatasets` | `Array<string>` | `["immRegisterExcel"]` | Dataset names that feed an Excel template only and should not appear in the on-screen table. |
|
|
44
|
-
|
|
45
|
-
Example configuration override:
|
|
46
|
-
|
|
47
|
-
```json
|
|
48
|
-
{
|
|
49
|
-
"@palladium-ethiopia/esm-reports-app": {
|
|
50
|
-
"columnOrderByUuid": {
|
|
51
|
-
"your-report-uuid-here": ["Column A", "Column B", "Column C"]
|
|
52
|
-
},
|
|
53
|
-
"hiddenDatasets": ["excelOnlyDataset"]
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
```
|
|
40
|
+
- **Column order** comes from each dataset's `metadata.columns` (the SQL `SELECT` order preserved by `reportingrest`). Any column present in the data but absent from `metadata.columns` is appended rather than dropped; if the server omits metadata entirely, the renderer falls back to the row keys.
|
|
41
|
+
- **Hidden feeder datasets** are derived from each `ReportDesign`'s `repeatingSections` (`dataset:<name>` tokens, fetched via the `v=custom:(uuid,name,properties)` representation). A dataset named there feeds a template (e.g. an Excel export) and is hidden from the on-screen tables; everything else is shown. The captured name is matched against each dataset's `definition.name`, so a report's dataset key and its `DataSetDefinition` name must agree. If the designs can't be read, nothing is hidden — a visible feeder is preferable to a broken page.
|
|
57
42
|
|
|
58
43
|
## Development
|
|
59
44
|
|