@openmrs/esm-form-entry-app 12.3.5-pre.11703 → 12.3.5-pre.11712

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.
@@ -8,18 +8,18 @@ opera 131, opera 127, opera 126
8
8
  ✔ Copying assets complete.
9
9
 
10
10
  Initial chunk files  | Names  |  Raw size | Estimated transfer size
11
- main.c9fedbf76d90aec0.css, main.7dd43bb2fb212850.js | main  |  77.44 kB |  21.43 kB
12
- styles.c9fedbf76d90aec0.css  | styles  |  20.75 kB |  3.21 kB
13
- openmrs-esm-form-entry-app.js  | @openmrs/esm-form-entry-app |  9.59 kB |  4.16 kB
11
+ main.b0649060fc7181fe.css, main.f875c574f920d294.js | main  |  77.50 kB |  21.45 kB
12
+ styles.b0649060fc7181fe.css  | styles  |  20.80 kB |  3.25 kB
13
+ openmrs-esm-form-entry-app.js  | @openmrs/esm-form-entry-app |  9.59 kB |  4.17 kB
14
14
 
15
-    | Initial total  | 107.78 kB |  28.80 kB
15
+    | Initial total  | 107.89 kB |  28.87 kB
16
16
 
17
17
  Lazy chunk files  | Names  |  Raw size | Estimated transfer size
18
- 8512.d54b59c3024a7a42.js  | bootstrap  |  1.85 MB |  411.46 kB
18
+ 8512.dc8639357e94dc8d.js  | bootstrap  |  1.85 MB |  412.41 kB
19
19
  8888.8eaa57053e0eb219.js  | -  |  1.61 MB |  332.70 kB
20
20
  7239.2d755fb0d9cd6598.js  | html2canvas  | 200.30 kB |  37.54 kB
21
21
  3390.59bda41efc1a93b9.js  | canvg  | 157.28 kB |  44.90 kB
22
- 739.c9fedbf76d90aec0.css, 739.512463b1dc6013ef.js  | -  |  75.36 kB |  19.77 kB
22
+ 739.b0649060fc7181fe.css, 739.512463b1dc6013ef.js  | -  |  75.42 kB |  19.80 kB
23
23
  627.ba7de7f608c0c7e5.js  | dompurify  |  27.68 kB |  9.36 kB
24
24
  4171.68a0c7b72d8a57e2.js  | -  |  18.86 kB |  6.06 kB
25
25
  986.24447da07ef5af3c.js  | -  |  8.51 kB |  1.49 kB
@@ -65,9 +65,9 @@ opera 131, opera 127, opera 126
65
65
  890.aed0da1bd90649d7.js  | -  |  2.75 kB |  975 bytes
66
66
  9895.cfb49e32de686175.js  | -  |  2.75 kB |  973 bytes
67
67
 
68
- Build at: 2026-07-17T10:47:56.002Z - Hash: d1758e32d7493685 - Time: 175305ms
68
+ Build at: 2026-07-17T22:06:24.653Z - Hash: 6ba79e850bf4a888 - Time: 231567ms
69
69
  
70
- Warning: /home/runner/work/openmrs-esm-patient-chart/openmrs-esm-patient-chart/node_modules/@carbon/react/es/components/Accordion/AccordionItem.js depends on 'prop-types'. CommonJS or AMD dependencies can cause optimization bailouts.
70
+ Warning: /home/runner/work/openmrs-esm-patient-chart/openmrs-esm-patient-chart/node_modules/@carbon/react/es/components/Accordion/Accordion.js depends on 'prop-types'. CommonJS or AMD dependencies can cause optimization bailouts.
71
71
  For more info see: https://angular.dev/tools/cli/build#configuring-commonjs-dependencies
72
72
 
73
73
  Warning: /home/runner/work/openmrs-esm-patient-chart/openmrs-esm-patient-chart/node_modules/@carbon/react/es/components/CodeSnippet/CodeSnippet.js depends on 'copy-to-clipboard'. CommonJS or AMD dependencies can cause optimization bailouts.
package/README.md CHANGED
@@ -1,7 +1,119 @@
1
- # esm-form-entry-app
1
+ # @openmrs/esm-form-entry-app
2
2
 
3
- This widget encapsulates the form entry capabilities of the AMPATH form engine. It's essentially a wrapper around an Angular application that renders JSON schemas built using the AMPATH form engine as HTML forms. The user can fill and submit forms and receive success or error notifications upon submission. Read the docs [here](https://ampath-forms.vercel.app).
3
+ `esm-form-entry-app` is an O3 patient chart widget that loads clinical forms
4
+ defined using the
5
+ [O3 form schema](https://github.com/openmrs/openmrs-contrib-json-schemas/blob/main/form.schema.json),
6
+ renders and processes them with the
7
+ [Angular Form Engine (`@openmrs/ngx-formentry`)](https://github.com/openmrs/openmrs-ngx-formentry),
8
+ and submits the resulting data to OpenMRS.
9
+
10
+ ## Status and availability
11
+
12
+ The O3 Reference Application ships the
13
+ [React Form Engine (`@openmrs/esm-form-engine-lib`)](https://github.com/openmrs/openmrs-esm-form-engine-lib)
14
+ by default through `@openmrs/esm-form-engine-app`.
15
+
16
+ This Angular-based form entry app is retained for implementations that still
17
+ depend on the Angular Form Engine and have not yet migrated to the React Form
18
+ Engine. It is not included in the
19
+ [default Reference Application SPA assembly](https://github.com/openmrs/openmrs-distro-referenceapplication/blob/main/frontend/spa-assemble-config.json).
20
+
21
+ Implementations using this app must include `@openmrs/esm-form-entry-app` in
22
+ their SPA assembly configuration. The Angular and React integrations both
23
+ register a form renderer in `form-widget-slot` and should not be enabled
24
+ together.
25
+
26
+ In a Reference Application-based distribution, use the Angular integration by
27
+ replacing the React integration in `spa-assemble-config.json`:
28
+
29
+ ```diff
30
+ - "@openmrs/esm-form-engine-app": "next",
31
+ + "@openmrs/esm-form-entry-app": "next",
32
+ ```
33
+
34
+ Use a version or release tag compatible with the rest of the implementation's
35
+ O3 frontend dependencies.
36
+
37
+ To migrate to the React Form Engine, replace `@openmrs/esm-form-entry-app` with
38
+ `@openmrs/esm-form-engine-app`. See the
39
+ [React Form Engine migration guidance](https://github.com/openmrs/openmrs-esm-form-engine-lib#production).
40
+
41
+ ## Responsibilities
42
+
43
+ The widget:
44
+
45
+ - Retrieves an O3 form definition and its associated OpenMRS form metadata.
46
+ - Supplies patient, patient identifier, visit, provider, location, previous
47
+ encounter, and previous observation data to the form.
48
+ - Renders the form and supports its validation, conditional rendering,
49
+ calculations, and other form logic.
50
+ - Supports creating new encounters and editing existing encounters.
51
+ - Converts completed forms into OpenMRS payloads, including observations,
52
+ diagnoses, and orders when specified by the form.
53
+ - Submits encounter data and, when applicable, person attribute and patient
54
+ identifier updates.
55
+ - Reports loading, validation, and submission results to the surrounding O3
56
+ workspace.
57
+
58
+ The fields displayed and payloads produced depend on the form definition.
59
+
60
+ ## How it fits into O3
61
+
62
+ This package is the O3 integration layer for the Angular Form Engine. It
63
+ connects the engine to the patient chart, OpenMRS REST APIs, patient and visit
64
+ context, workspace lifecycle, configuration, localization, and offline
65
+ framework.
66
+
67
+ It registers the `form-widget` extension in `form-widget-slot`. The surrounding
68
+ patient form workspace supplies the patient, form UUID, visit, and optional
69
+ encounter context.
70
+
71
+ This widget handles forms that conform to the O3 form schema. Legacy HTML Form
72
+ Entry forms are handled separately by the patient forms application.
73
+
74
+ ## Form definitions
75
+
76
+ O3 form definitions are JSON documents that conform to the
77
+ [O3 form schema](https://github.com/openmrs/openmrs-contrib-json-schemas/blob/main/form.schema.json).
78
+
79
+ This package renders and processes those definitions. It does not provide form
80
+ authoring functionality. Forms can be authored using the
81
+ [O3 Form Builder](https://github.com/openmrs/openmrs-esm-form-builder).
82
+
83
+ ## Backend requirements
84
+
85
+ The widget requires:
86
+
87
+ - OpenMRS REST Web Services 2.2.0 or later
88
+ - The O3 Forms backend module
89
+
90
+ ## Development
91
+
92
+ From this package directory, start the development server with:
93
+
94
+ ```sh
95
+ yarn start
96
+ ```
97
+
98
+ Other useful commands:
99
+
100
+ ```sh
101
+ yarn build
102
+ yarn test
103
+ yarn lint
104
+ ```
4
105
 
5
106
  ## Angular version policy
6
107
 
7
- This app is the Angular part of an otherwise React codebase. It moves together with [openmrs-ngx-formentry](https://github.com/openmrs/openmrs-ngx-formentry) and [openmrs-ngx-file-uploader](https://github.com/openmrs/openmrs-ngx-file-uploader): all three must use the same Angular major version, and that version must still be supported by Angular through the next RefApp release. Before proposing or reviewing an Angular major version bump, read the [Angular version support policy](https://o3-docs.openmrs.org/en-US/docs/frontend-modules/angular-version-policy). It explains when to migrate, how to pick the target version, and which toolchain packages must be ready first.
108
+ This app is the Angular part of an otherwise React codebase. It moves together
109
+ with
110
+ [`openmrs-ngx-formentry`](https://github.com/openmrs/openmrs-ngx-formentry)
111
+ and
112
+ [`openmrs-ngx-file-uploader`](https://github.com/openmrs/openmrs-ngx-file-uploader).
113
+ All three must use the same Angular major version, and that version must remain
114
+ supported by Angular through the next Reference Application release.
115
+
116
+ Before proposing or reviewing an Angular major version bump, read the
117
+ [Angular version support policy](https://o3-docs.openmrs.org/en-US/docs/frontend-modules/angular-version-policy).
118
+ It explains when to migrate, how to select the target version, and which
119
+ toolchain packages must be ready first.
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  .ng-select .ng-select-container {
69
- align-items: baseline;
69
+ align-items: center;
70
70
  min-height: 2.5rem;
71
71
  padding: 0 1rem;
72
72
  }
@@ -86,8 +86,7 @@
86
86
  }
87
87
 
88
88
  .ng-select .ng-select-container .ng-value-container {
89
- align-items: stretch;
90
- border-top: 0.84375em solid transparent;
89
+ align-items: center;
91
90
  }
92
91
 
93
92
  .ng-select .ng-select-container .ng-value-container .ng-placeholder {
@@ -128,7 +127,9 @@
128
127
  border-radius: 2px;
129
128
  color: #fff;
130
129
  padding: 2px 5px;
131
- margin: 0 0.4375em 0.4375em 0;
130
+ /* Vertical margin is split evenly so chips sit centered in the field while
131
+ wrapped rows keep the same 0.4375em rhythm. */
132
+ margin: 0.21875em 0.4375em 0.21875em 0;
132
133
  }
133
134
 
134
135
  [dir='rtl']
@@ -136,7 +137,7 @@
136
137
  .ng-select-container
137
138
  .ng-value-container
138
139
  .ng-value {
139
- margin: 0 0 0.4375em 0.4375em;
140
+ margin: 0.21875em 0 0.21875em 0.4375em;
140
141
  }
141
142
 
142
143
  .ng-select.ng-select-multiple
@@ -197,7 +198,7 @@
197
198
  .ng-select.ng-select-multiple
198
199
  .ng-select-container.ng-has-value
199
200
  .ng-value-container {
200
- padding-bottom: 0;
201
+ padding-bottom: 0.1875em;
201
202
  padding-top: 0.1875em;
202
203
  }
203
204
 
@@ -207,7 +208,7 @@
207
208
  .ng-select.ng-select-multiple
208
209
  .ng-select-container.ng-has-value
209
210
  .ng-arrow-wrapper {
210
- border-top: 0.84375em solid transparent;
211
+ align-self: center;
211
212
  }
212
213
 
213
214
  .ng-select .ng-clear-wrapper {
@@ -247,13 +248,13 @@
247
248
  }
248
249
 
249
250
  .ng-dropdown-panel.ng-select-bottom {
250
- top: calc(100% - 1.25em);
251
+ top: 100%;
251
252
  box-shadow: 0 5px 5px -3px rgba(0, 0, 0, 0.2),
252
253
  0 8px 10px 1px rgba(0, 0, 0, 0.14), 0 3px 14px 2px rgba(0, 0, 0, 0.12);
253
254
  }
254
255
 
255
256
  .ng-dropdown-panel.ng-select-top {
256
- bottom: calc(100% - 0.84375em);
257
+ bottom: 100%;
257
258
  box-shadow: 0 -5px 5px -3px rgba(0, 0, 0, 0.2),
258
259
  0 -8px 10px 1px rgba(0, 0, 0, 0.14), 0 -3px 14px 2px rgba(0, 0, 0, 0.12);
259
260
  }