@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.
@@ -4,4 +4,4 @@
4
4
  │ 908.js (315.093 KiB)
5
5
  
6
6
 
7
- Rspack compiled with 1 warning in 19.78 s
7
+ Rspack compiled with 1 warning in 17.15 s
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`. Column order is controlled by the `columnOrderByUuid` config (see below) so that tables match the source paper layout rather than the alphabetical order that the REST API returns.
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
- ## Configuration
36
+ ## Report layout
37
37
 
38
- Configuration is managed through the O3 config system (`@openmrs/esm-framework`). The schema is defined in `src/config-schema.ts`.
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
- | Key | Type | Default | Description |
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