@bahmni/widgets 0.0.1-dev.122 → 0.0.1-dev.124

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/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { z as t, x as s, h as r, i as o, j as n, G as g, k as l, M as c, N as P, t as d, P as v, s as T, R as b, n as W, w as f, r as u, T as A, Q as C, E as h, I as m, O as p, B as y, W as I, y as N, f as R, u as S, v as U } from "./index-CQcHNtl1.js";
1
+ import { y as t, w as s, A as r, C as o, D as n, G as g, n as l, M as c, N as P, t as d, P as v, s as T, R as b, q as W, U as A, r as f, T as u, Q as C, B as U, E as m, O as p, z as y, W as D, x as N, i as R, u as S, v as h } from "./index-BWeanlvf.js";
2
2
  import "react";
3
3
  export {
4
4
  t as ActivePractitionerContext,
@@ -15,17 +15,17 @@ export {
15
15
  T as PatientProgramsTable,
16
16
  b as RadiologyInvestigationTable,
17
17
  W as SearchPatient,
18
- f as UserPrivilegeProvider,
19
- u as VitalFlowSheet,
20
- A as getAllWidgetConfigs,
18
+ A as UserPrivilegeProvider,
19
+ f as VitalFlowSheet,
20
+ u as getAllWidgetConfigs,
21
21
  C as getAllWidgetTypes,
22
- h as getWidget,
22
+ U as getWidget,
23
23
  m as getWidgetConfig,
24
24
  p as hasWidget,
25
25
  y as registerWidget,
26
- I as resetWidgetRegistry,
26
+ D as resetWidgetRegistry,
27
27
  N as useActivePractitioner,
28
28
  R as useNotification,
29
29
  S as usePatientUUID,
30
- U as useUserPrivilege
30
+ h as useUserPrivilege
31
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA+BhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA0L3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"LabInvestigation.d.ts","sourceRoot":"","sources":["../../src/labinvestigation/LabInvestigation.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAuC,MAAM,OAAO,CAAC;AAI5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AA+BhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwM3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MedicationsTable.d.ts","sourceRoot":"","sources":["../../src/medications/MedicationsTable.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkDhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA+S3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"MedicationsTable.d.ts","sourceRoot":"","sources":["../../src/medications/MedicationsTable.tsx"],"names":[],"mappings":"AA6BA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAkDhD,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAkT3C,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Observations.d.ts","sourceRoot":"","sources":["../../src/observations/Observations.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,qCACjB,CAAC;AAExC,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,cAAc,MAAM,EAAE,mDACoC,CAAC;AAE7D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA6HvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"Observations.d.ts","sourceRoot":"","sources":["../../src/observations/Observations.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAShD,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB,GAAI,aAAa,MAAM,qCACjB,CAAC;AAExC,eAAO,MAAM,qBAAqB,GAChC,aAAa,MAAM,EACnB,cAAc,MAAM,EAAE,mDACoC,CAAC;AAE7D,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAuIvC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -2,6 +2,7 @@ import { default as React } from 'react';
2
2
  import { ObservationsByEncounter } from '../models';
3
3
  export interface ObsByEncounterProps {
4
4
  groupedData: ObservationsByEncounter[];
5
+ title?: string;
5
6
  }
6
7
  export declare const ObsByEncounter: React.FC<ObsByEncounterProps>;
7
8
  export default ObsByEncounter;
@@ -1 +1 @@
1
- {"version":3,"file":"ObsByEncounter.d.ts","sourceRoot":"","sources":["../../../src/observations/components/ObsByEncounter.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,uBAAuB,EACxB,MAAM,WAAW,CAAC;AAGnB,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,uBAAuB,EAAE,CAAC;CACxC;AA6DD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAsCxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"ObsByEncounter.d.ts","sourceRoot":"","sources":["../../../src/observations/components/ObsByEncounter.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,uBAAuB,EACxB,MAAM,WAAW,CAAC;AAGnB,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,uBAAuB,EAAE,CAAC;IACvC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAqED,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+CxD,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PatientProgramsTable.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/PatientProgramsTable.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAUvC,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,mBAAmB,MAAM,EAAE,4CAC6B,CAAC;AAU3D,UAAU,yBAAyB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoH7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
1
+ {"version":3,"file":"PatientProgramsTable.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/PatientProgramsTable.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAUvC,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,mBAAmB,MAAM,EAAE,4CAC6B,CAAC;AAU3D,UAAU,yBAAyB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAqH7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAiBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CA2QtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
1
+ {"version":3,"file":"RadiologyInvestigationTable.d.ts","sourceRoot":"","sources":["../../src/radiologyInvestigation/RadiologyInvestigationTable.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAA6B,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAUhD,eAAO,MAAM,+BAA+B,GAAI,aAAa,MAAM,gDACjB,CAAC;AAiBnD;;;GAGG;AACH,QAAA,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAwRtD,CAAC;AAEF,eAAe,2BAA2B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"VitalFlowSheet.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheet/VitalFlowSheet.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AA0BD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6NjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"VitalFlowSheet.d.ts","sourceRoot":"","sources":["../../src/vitalFlowSheet/VitalFlowSheet.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,mBAAmB;IAC3B,MAAM,EAAE,oBAAoB,CAAC;CAC9B;AA0BD,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8NjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.122",
3
+ "version": "0.0.1-dev.124",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -1,320 +0,0 @@
1
- import { jsxs as _, jsx as t, Fragment as Q } from "react/jsx-runtime";
2
- import { c as h, u as Y, C as W, F as Z, q as ee, U as re, D as oe, J as te, l as ae, K as $, a as ne, m as se, p as ce, X as de, b as U, o as me } from "./index-CQcHNtl1.js";
3
- import { useQuery as g } from "@tanstack/react-query";
4
- import { useState as q, useMemo as b, useCallback as N } from "react";
5
- import { createPortal as le } from "react-dom";
6
- import { useTranslation as ie } from "react-i18next";
7
- const ue = "_formsTableBody_1pd36_1", pe = "_customAccordianItem_1pd36_6", _e = "_formContent_1pd36_18", be = "_formDetailsContainer_1pd36_25", fe = "_observation_1pd36_30", ge = "_groupContainer_1pd36_39", Ne = "_rowContainer_1pd36_43", he = "_groupLabel_1pd36_48", ye = "_rowLabel_1pd36_58", Me = "_rowValue_1pd36_67", Le = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Oe = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Re = "_abnormalValue_1pd36_102", Ce = "_commentSection_1pd36_110", Fe = "_commentText_1pd36_116", Te = "_nestedGroup_1pd36_125", ve = "_nestedGroupLabel_1pd36_132", Ee = "_nestedGroupMembers_1pd36_141", r = {
8
- formsTableBody: ue,
9
- customAccordianItem: pe,
10
- formContent: _e,
11
- formDetailsContainer: be,
12
- observation: fe,
13
- groupContainer: ge,
14
- rowContainer: Ne,
15
- groupLabel: he,
16
- rowLabel: ye,
17
- rowValue: Me,
18
- groupMembers: Le,
19
- memberRow: Ae,
20
- memberLabel: Oe,
21
- memberValue: De,
22
- abnormalValue: Re,
23
- commentSection: Ce,
24
- commentText: Fe,
25
- nestedGroup: Te,
26
- nestedGroupLabel: ve,
27
- nestedGroupMembers: Ee
28
- }, we = "ABNORMAL", x = (e) => {
29
- const s = e.concept?.units, c = e.concept?.lowNormal, o = e.concept?.hiNormal, l = c != null, i = o != null, p = l && i ? ` (${c} - ${o})` : l ? ` (>${c})` : i ? ` (<${o})` : "", a = e.interpretation && e.interpretation.toUpperCase() === we;
30
- return { units: s, rangeString: p, isAbnormal: a };
31
- }, k = ({
32
- member: e,
33
- depth: s = 0
34
- }) => {
35
- const c = e.groupMembers && e.groupMembers.length > 0, o = e.conceptNameToDisplay ?? e.concept?.shortName ?? e.concept?.name;
36
- if (c)
37
- return /* @__PURE__ */ _("div", { className: r.nestedGroup, children: [
38
- /* @__PURE__ */ t(
39
- "div",
40
- {
41
- className: r.nestedGroupLabel,
42
- style: { paddingLeft: `${s * 16}px` },
43
- children: o
44
- }
45
- ),
46
- /* @__PURE__ */ t("div", { className: r.nestedGroupMembers, children: e.groupMembers?.map((a) => /* @__PURE__ */ t(
47
- k,
48
- {
49
- member: a,
50
- depth: s + 1
51
- },
52
- `${a.concept.uuid}`
53
- )) })
54
- ] });
55
- const { units: l, rangeString: i, isAbnormal: p } = x(e);
56
- return /* @__PURE__ */ _(
57
- "div",
58
- {
59
- className: r.memberRow,
60
- style: { paddingLeft: `${s * 16}px` },
61
- children: [
62
- /* @__PURE__ */ _(
63
- "p",
64
- {
65
- className: h(
66
- r.memberLabel,
67
- p ? r.abnormalValue : ""
68
- ),
69
- children: [
70
- o,
71
- i
72
- ]
73
- }
74
- ),
75
- /* @__PURE__ */ _(
76
- "p",
77
- {
78
- className: h(
79
- r.memberValue,
80
- p ? r.abnormalValue : ""
81
- ),
82
- children: [
83
- e.valueAsString,
84
- l && ` ${l}`
85
- ]
86
- }
87
- )
88
- ]
89
- }
90
- );
91
- }, Be = ({
92
- observation: e,
93
- index: s
94
- }) => {
95
- const c = e.groupMembers && e.groupMembers.length > 0, { units: o, rangeString: l, isAbnormal: i } = x(e);
96
- return /* @__PURE__ */ _(
97
- "div",
98
- {
99
- className: r.observation,
100
- children: [
101
- /* @__PURE__ */ _(
102
- "div",
103
- {
104
- className: c ? r.groupContainer : r.rowContainer,
105
- children: [
106
- /* @__PURE__ */ _(
107
- "p",
108
- {
109
- className: h(
110
- c ? r.groupLabel : r.rowLabel,
111
- !c && i ? r.abnormalValue : ""
112
- ),
113
- children: [
114
- e.conceptNameToDisplay,
115
- !c && l && /* @__PURE__ */ t("span", { className: r.rangeInfo, children: l })
116
- ]
117
- }
118
- ),
119
- c ? /* @__PURE__ */ t("div", { className: r.groupMembers, children: e.groupMembers?.map((p) => /* @__PURE__ */ t(
120
- k,
121
- {
122
- member: p,
123
- depth: 0
124
- },
125
- `${p.concept.uuid}`
126
- )) }) : /* @__PURE__ */ _(
127
- "p",
128
- {
129
- className: h(
130
- r.rowValue,
131
- i ? r.abnormalValue : ""
132
- ),
133
- children: [
134
- e.valueAsString,
135
- o && ` ${o}`
136
- ]
137
- }
138
- )
139
- ]
140
- }
141
- ),
142
- e.comment && /* @__PURE__ */ t("div", { className: r.commentSection, children: /* @__PURE__ */ _("span", { className: r.commentText, children: [
143
- e.comment,
144
- e.providers?.[0]?.name && ` - by ${e.providers[0].name}`
145
- ] }) })
146
- ]
147
- },
148
- `${e.concept.uuid}-${s}`
149
- );
150
- }, xe = ({
151
- episodeOfCareUuids: e,
152
- encounterUuids: s,
153
- config: c
154
- }) => {
155
- const { t: o } = ie(), l = Y(), [i, p] = q(!1), [a, O] = q(null), H = c?.numberOfVisits, D = W(
156
- e,
157
- s
158
- ), {
159
- data: y = [],
160
- isLoading: R,
161
- isError: C,
162
- error: K
163
- } = g({
164
- queryKey: ["forms", l, e],
165
- queryFn: () => Z(l, void 0, H),
166
- enabled: !!l && !D
167
- }), F = b(() => !s || s.length === 0 ? y : y.filter(
168
- (n) => s.includes(n.encounterUuid)
169
- ), [y, s]), { data: T = [] } = g({
170
- queryKey: ["observationForms"],
171
- queryFn: ee
172
- }), v = N(
173
- (n) => T.find((d) => d.name === n)?.uuid,
174
- [T]
175
- ), M = b(() => {
176
- if (a)
177
- return v(a.formName);
178
- }, [a, v]), {
179
- data: Ie,
180
- isLoading: P,
181
- error: E
182
- } = g({
183
- queryKey: ["formMetadata", M],
184
- queryFn: () => re(M),
185
- enabled: !!M && i
186
- }), {
187
- data: L,
188
- isLoading: j,
189
- error: w
190
- } = g({
191
- queryKey: ["formsEncounter", a?.encounterUuid],
192
- queryFn: () => oe(a.encounterUuid, !0),
193
- enabled: !!a?.encounterUuid && i
194
- }), B = b(() => !L?.observations || !a?.formName ? [] : L.observations.filter(
195
- (u) => "formFieldPath" in u && typeof u.formFieldPath == "string" && u.formFieldPath.includes(a.formName)
196
- ), [L?.observations, a?.formName]), I = b(
197
- () => [
198
- { key: "recordedOn", header: o("FORM_RECORDED_ON") },
199
- { key: "recordedBy", header: o("FORM_RECORDED_BY") }
200
- ],
201
- [o]
202
- ), J = b(
203
- () => [
204
- { key: "recordedOn", sortable: !0 },
205
- { key: "recordedBy", sortable: !0 }
206
- ],
207
- []
208
- ), V = b(() => {
209
- const n = F.reduce(
210
- (d, m) => {
211
- const f = m.formName;
212
- d[f] ??= [];
213
- const A = m.providers.map((z) => z.providerName).filter(Boolean).join(", ");
214
- return d[f].push({
215
- id: m.encounterUuid,
216
- formName: m.formName,
217
- recordedOn: te(m.encounterDateTime, o, me).formattedResult,
218
- recordedBy: A ?? "--",
219
- encounterDateTime: m.encounterDateTime,
220
- encounterUuid: m.encounterUuid
221
- }), d;
222
- },
223
- {}
224
- );
225
- return Object.entries(n).map(
226
- ([d, m]) => ({
227
- formName: d,
228
- records: m.sort(
229
- (f, A) => A.encounterDateTime - f.encounterDateTime
230
- )
231
- })
232
- ).sort((d, m) => d.formName.localeCompare(m.formName));
233
- }, [F, o]), S = N((n) => {
234
- O(n), p(!0);
235
- }, []), X = N(() => {
236
- p(!1), O(null);
237
- }, []), G = N(
238
- (n, u) => {
239
- switch (u) {
240
- case "recordedOn":
241
- return /* @__PURE__ */ t(ae, { onClick: () => S(n), children: n.recordedOn });
242
- case "recordedBy":
243
- return n.recordedBy;
244
- default:
245
- return null;
246
- }
247
- },
248
- [S]
249
- );
250
- return /* @__PURE__ */ _(Q, { children: [
251
- /* @__PURE__ */ t("div", { "data-testid": "forms-table", children: R || C || V.length === 0 || D ? /* @__PURE__ */ t(
252
- $,
253
- {
254
- headers: I,
255
- ariaLabel: o("FORMS_HEADING"),
256
- rows: [],
257
- loading: R,
258
- errorStateMessage: C ? K?.message : void 0,
259
- emptyStateMessage: o("FORMS_UNAVAILABLE"),
260
- renderCell: G,
261
- className: r.formsTableBody,
262
- "data-testid": "sortable-data-table"
263
- }
264
- ) : /* @__PURE__ */ t(ne, { align: "start", children: V.map((n, u) => {
265
- const { formName: d, records: m } = n;
266
- return /* @__PURE__ */ t(
267
- se,
268
- {
269
- title: d,
270
- className: r.customAccordianItem,
271
- testId: `accordian-title-${d}`,
272
- open: u === 0,
273
- children: /* @__PURE__ */ t(
274
- $,
275
- {
276
- headers: I,
277
- ariaLabel: o("FORMS_HEADING"),
278
- rows: m,
279
- loading: !1,
280
- errorStateMessage: "",
281
- sortable: J,
282
- emptyStateMessage: o("FORMS_UNAVAILABLE"),
283
- renderCell: G,
284
- className: r.formsTableBody,
285
- "data-testid": "forms-data-table"
286
- }
287
- )
288
- },
289
- d
290
- );
291
- }) }) }),
292
- i && a && le(
293
- /* @__PURE__ */ t(
294
- ce,
295
- {
296
- id: "formDetailsModal",
297
- open: i,
298
- onRequestClose: X,
299
- modalHeading: a.formName,
300
- modalLabel: `${a.recordedOn} | ${a.recordedBy}`,
301
- passiveModal: !0,
302
- size: "md",
303
- testId: "form-details-modal",
304
- children: /* @__PURE__ */ t("div", { className: r.formContent, children: P || j ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : E ? /* @__PURE__ */ t("div", { children: U(E).message ?? o("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: U(w).message ?? o("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ t("div", { className: r.formDetailsContainer, children: B.map((n, u) => /* @__PURE__ */ t(
305
- Be,
306
- {
307
- observation: n,
308
- index: u
309
- },
310
- `${n.concept.uuid}`
311
- )) }) : /* @__PURE__ */ t("div", { children: o("NO_FORM_DATA_AVAILABLE") }) })
312
- }
313
- ),
314
- document.getElementById("actionAreaLayout") ?? document.body
315
- )
316
- ] });
317
- };
318
- export {
319
- xe as default
320
- };