@openmrs/esm-report-builder 0.1.1-pre.89 → 0.1.1-pre.92

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.
@@ -86,9 +86,9 @@
86
86
  "initial": false,
87
87
  "entry": false,
88
88
  "recorded": false,
89
- "size": 4016454,
89
+ "size": 4016444,
90
90
  "sizes": {
91
- "javascript": 4016454
91
+ "javascript": 4016444
92
92
  },
93
93
  "names": [],
94
94
  "idHints": [],
@@ -102,7 +102,7 @@
102
102
  "auxiliaryFiles": [
103
103
  "253.js.map"
104
104
  ],
105
- "hash": "f8f4d54cdfbc5318",
105
+ "hash": "7e72b814b58ccc18",
106
106
  "childrenByOrder": {}
107
107
  },
108
108
  {
package/dist/routes.json CHANGED
@@ -1 +1 @@
1
- {"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"component":"root","route":"report-builder","online":true,"offline":false,"order":1}],"extensions":[{"name":"system-administration-report-builder-card-link","slot":"system-admin-page-card-link-slot","component":"reportBuilderAdminLink","online":true,"offline":false,"privileges":"Task: reportbuilder.report.view"},{"component":"confirmModal","name":"confirm-modal","online":true,"offline":true}],"version":"0.1.1-pre.89"}
1
+ {"$schema":"https://json.openmrs.org/routes.schema.json","pages":[{"component":"root","route":"report-builder","online":true,"offline":false,"order":1}],"extensions":[{"name":"system-administration-report-builder-card-link","slot":"system-admin-page-card-link-slot","component":"reportBuilderAdminLink","online":true,"offline":false,"privileges":"Task: reportbuilder.report.view"},{"component":"confirmModal","name":"confirm-modal","online":true,"offline":true}],"version":"0.1.1-pre.92"}
@@ -10,7 +10,7 @@ export class ETLSourcesPage {
10
10
  }
11
11
 
12
12
  async expectLoaded() {
13
- await expect(this.page.getByRole('heading', { name: 'ETL Sources' })).toBeVisible();
13
+ await expect(this.page.getByRole('heading', { name: 'ETL Sources', exact: true })).toBeVisible();
14
14
  }
15
15
 
16
16
  async clickNew() {
@@ -18,12 +18,12 @@ export class ETLSourcesPage {
18
18
  }
19
19
 
20
20
  async fillForm(data: { name: string; code?: string; schemaName?: string; sourceType?: string; description?: string; tablePatterns?: string }) {
21
- await this.page.locator('[data-testid="etl-source-name"] input').fill(data.name);
22
- if (data.code !== undefined) await this.page.locator('[data-testid="etl-source-code"] input').fill(data.code);
23
- if (data.schemaName !== undefined) await this.page.locator('[data-testid="etl-source-schema"] input').fill(data.schemaName);
24
- if (data.sourceType !== undefined) await this.page.locator('[data-testid="etl-source-type"] input').fill(data.sourceType);
25
- if (data.description !== undefined) await this.page.locator('[data-testid="etl-source-description"] textarea').fill(data.description);
26
- if (data.tablePatterns !== undefined) await this.page.locator('[data-testid="etl-source-table-patterns"] textarea').fill(data.tablePatterns);
21
+ await this.page.getByTestId('etl-source-name').fill(data.name);
22
+ if (data.code !== undefined) await this.page.getByTestId('etl-source-code').fill(data.code);
23
+ if (data.schemaName !== undefined) await this.page.getByTestId('etl-source-schema').fill(data.schemaName);
24
+ if (data.sourceType !== undefined) await this.page.getByTestId('etl-source-type').fill(data.sourceType);
25
+ if (data.description !== undefined) await this.page.getByTestId('etl-source-description').fill(data.description);
26
+ if (data.tablePatterns !== undefined) await this.page.getByTestId('etl-source-table-patterns').fill(data.tablePatterns);
27
27
  }
28
28
 
29
29
  async save() {
@@ -10,12 +10,12 @@ export class ReportSectionsPage {
10
10
  }
11
11
 
12
12
  async expectLoaded() {
13
- await expect(this.page.getByRole('heading', { name: 'Sections' })).toBeVisible();
13
+ await expect(this.page.getByRole('heading', { name: 'Sections', exact: true })).toBeVisible();
14
14
  }
15
15
 
16
16
  async openPreviewFor(sectionName: string) {
17
17
  const row = this.page.getByTestId(`section-row-${sectionName.replace(/\s+/g, '-')}`);
18
- await row.getByLabel('Actions').click();
18
+ await row.getByRole('button').click();
19
19
  await this.page.getByText('Preview', { exact: true }).click();
20
20
  }
21
21
  }
@@ -9,10 +9,10 @@ export class SectionPreviewModal {
9
9
  }
10
10
 
11
11
  async fillPreviewRequest(data: { startDate: string; endDate: string; indicatorUuid?: string; maxRows?: number }) {
12
- await this.page.locator('[data-testid="section-preview-startdate"] input').fill(data.startDate);
13
- await this.page.locator('[data-testid="section-preview-enddate"] input').fill(data.endDate);
14
- if (data.indicatorUuid !== undefined) await this.page.locator('[data-testid="section-preview-indicatoruuid"] input').fill(data.indicatorUuid);
15
- if (data.maxRows !== undefined) await this.page.locator('[data-testid="section-preview-maxrows"] input').fill(String(data.maxRows));
12
+ await this.page.getByTestId('section-preview-startdate').fill(data.startDate);
13
+ await this.page.getByTestId('section-preview-enddate').fill(data.endDate);
14
+ if (data.indicatorUuid !== undefined) await this.page.getByTestId('section-preview-indicatoruuid').fill(data.indicatorUuid);
15
+ if (data.maxRows !== undefined) await this.page.getByTestId('section-preview-maxrows').fill(String(data.maxRows));
16
16
  }
17
17
 
18
18
  async run() {
@@ -89,6 +89,6 @@ test.describe('section preview', () => {
89
89
  });
90
90
  await sectionPreviewModal.run();
91
91
  await sectionPreviewModal.expectMatrixVisible();
92
- await expect(page.getByText('HTS TST')).toBeVisible();
92
+ await expect(page.getByRole('cell', { name: 'HTS TST' })).toBeVisible();
93
93
  });
94
94
  });
@@ -23,5 +23,10 @@ RUN npm_config_legacy_peer_deps=true openmrs assemble --manifest --mode config -
23
23
 
24
24
  FROM openmrs/openmrs-reference-application-3-frontend:nightly
25
25
 
26
- RUN rm -rf /usr/share/nginx/html/*
26
+ # Keep the image's default index.html (the startup script patches it with
27
+ # SPA_PATH/API_URL at runtime); overlay the freshly assembled import map and
28
+ # modules after dropping the precompressed variants that would shadow them.
29
+ RUN rm -f /usr/share/nginx/html/importmap.json.br /usr/share/nginx/html/importmap.json.gz \
30
+ /usr/share/nginx/html/routes.registry.json.br /usr/share/nginx/html/routes.registry.json.gz
31
+
27
32
  COPY --from=build /app/spa/ /usr/share/nginx/html/
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-report-builder",
3
- "version": "0.1.1-pre.89",
3
+ "version": "0.1.1-pre.92",
4
4
  "license": "MPL-2.0",
5
5
  "description": "OpenMRS ESM Report Builder",
6
6
  "browser": "dist/openmrs-esm-report-builder.js",
@@ -236,7 +236,7 @@ export default function ReportSectionPreviewModal({ open, onClose, section }: Pr
236
236
  // eslint-disable-next-line react-hooks/exhaustive-deps
237
237
  }, [selectedTabIndex, data, section]); // generateSql and sqlData are intentionally omitted to avoid infinite loops
238
238
 
239
- const canRun = Boolean(section?.uuid) && Boolean(startDate) && Boolean(endDate) && !loading;
239
+ const canRun = Boolean(section?.uuid) && !loading;
240
240
 
241
241
  // Function to extract pre-compiled SQL from section configJson
242
242
  const generateSql = (indicatorUuid: string, section: ReportSectionDto) => {
@@ -39,7 +39,7 @@ const Header: React.FC<HeaderProps> = ({ title, subtitle, status, actions, showA
39
39
 
40
40
  <div className={styles.pageLabels}>
41
41
  <div className={styles.appName}>{t('reportBuilder', 'Report builder')}</div>
42
- <div className={styles.pageTitle}>{title}</div>
42
+ <h1 className={styles.pageTitle}>{title}</h1>
43
43
 
44
44
  {(metaLeft || metaRight) && (
45
45
  <div className={styles.metaLine}>
@@ -44,6 +44,7 @@
44
44
  @include type.type-style('heading-05');
45
45
  color: var(--cds-text-primary, #161616);
46
46
  line-height: 1.15;
47
+ margin: 0;
47
48
  }
48
49
 
49
50
  .metaLine {