@bahmni/widgets 0.0.1-dev.180 → 0.0.1-dev.182

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.
@@ -1,5 +1,5 @@
1
1
  import { jsxs as A, jsx as v, Fragment as $5 } from "react/jsx-runtime";
2
- import { P as h, u as S5, a as W5, J as P5, k as k5, t as F5, m as U5, i as j5 } from "./index-CQhvLeWL.js";
2
+ import { P as h, u as S5, a as W5, J as P5, k as k5, E as F5, _ as U5, i as j5 } from "./index-ByTTSt4p.js";
3
3
  import { useQuery as q5 } from "@tanstack/react-query";
4
4
  import e, { useState as N, useCallback as _, useEffect as K5, useMemo as x } from "react";
5
5
  import { useTranslation as Q5 } from "react-i18next";
@@ -1,78 +1,78 @@
1
- import { jsxs as b, jsx as d, Fragment as P } from "react/jsx-runtime";
2
- import { c as M, Q as te, N as re, $ as ae, e as oe, Y as se, u as ne, A as de, M as ie, L as le, b as ce, O as me, K as ue, k as pe, d as be, t as k, H as fe, C as _e, m as $e, o as ye, T as x, i as ge } from "./index-CQhvLeWL.js";
3
- import { useQueryClient as he, useQuery as L } from "@tanstack/react-query";
4
- import { useState as H, useMemo as h, useCallback as F } from "react";
5
- import { useTranslation as ve } from "react-i18next";
6
- const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Fe = "_formDetailsContainer_1pd36_25", Me = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", Re = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", De = "_rowValue_1pd36_67", Ve = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ie = "_memberLabel_1pd36_86", Ee = "_memberValue_1pd36_94", Be = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", Ge = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", ke = "_nestedGroupMembers_1pd36_141", o = {
7
- formsTableBody: Ne,
8
- customAccordianItem: Oe,
9
- formContent: Le,
10
- formDetailsContainer: Fe,
11
- observation: Me,
1
+ import { jsxs as b, jsx as n, Fragment as H } from "react/jsx-runtime";
2
+ import { c as M, Q as re, G as te, b as ae, Y as oe, e as se, d as ne, u as de, A as ie, M as le, L as ce, f as me, O as ue, K as pe, k as be, D as fe, E as U, I as _e, B as he, _ as $e, x as ye, T as k, i as ge } from "./index-ByTTSt4p.js";
3
+ import { useQueryClient as ve, useQuery as L } from "@tanstack/react-query";
4
+ import { useState as P, useMemo as g, useCallback as F } from "react";
5
+ import { useTranslation as Ne } from "react-i18next";
6
+ const Oe = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Fe = "_formContent_1pd36_18", Me = "_formDetailsContainer_1pd36_25", Re = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", De = "_rowContainer_1pd36_43", we = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Ve = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Ae = "_memberRow_1pd36_81", Ee = "_memberLabel_1pd36_86", Be = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", xe = "_commentText_1pd36_116", qe = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", ke = "_nestedGroupMembers_1pd36_141", o = {
7
+ formsTableBody: Oe,
8
+ customAccordianItem: Le,
9
+ formContent: Fe,
10
+ formDetailsContainer: Me,
11
+ observation: Re,
12
12
  groupContainer: Ce,
13
- rowContainer: Re,
13
+ rowContainer: De,
14
14
  groupLabel: we,
15
15
  rowLabel: Te,
16
- rowValue: De,
17
- groupMembers: Ve,
16
+ rowValue: Ve,
17
+ groupMembers: Ie,
18
18
  memberRow: Ae,
19
- memberLabel: Ie,
20
- memberValue: Ee,
21
- abnormalValue: Be,
19
+ memberLabel: Ee,
20
+ memberValue: Be,
21
+ abnormalValue: Ge,
22
22
  commentSection: Se,
23
- commentText: Ge,
23
+ commentText: xe,
24
24
  nestedGroup: qe,
25
25
  nestedGroupLabel: Ue,
26
26
  nestedGroupMembers: ke
27
27
  }, K = (e) => {
28
- const t = te(e);
29
- return t === "Image" ? /* @__PURE__ */ d(
30
- re,
28
+ const r = re(e);
29
+ return r === "Image" ? /* @__PURE__ */ n(
30
+ te,
31
31
  {
32
32
  imageSrc: e,
33
33
  alt: e,
34
34
  id: `${e}-img`
35
35
  }
36
- ) : t === "Video" ? /* @__PURE__ */ d(ae, { id: `${e}-video`, videoSrc: e }) : e;
36
+ ) : r === "Video" ? /* @__PURE__ */ n(ae, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ n(oe, { id: `${e}-pdf`, src: e }) : e;
37
37
  }, Q = (e) => {
38
- const t = e.observationValue?.unit, a = e.observationValue?.referenceRange?.low?.value, n = e.observationValue?.referenceRange?.high?.value, s = a != null, c = n != null, i = s && c ? ` (${a} - ${n})` : s ? ` (>${a})` : c ? ` (<${n})` : "", r = e.observationValue?.isAbnormal === !0;
39
- return { units: t, rangeString: i, isAbnormal: r };
38
+ const r = e.observationValue?.unit, a = e.observationValue?.referenceRange?.low?.value, d = e.observationValue?.referenceRange?.high?.value, s = a != null, c = d != null, i = s && c ? ` (${a} - ${d})` : s ? ` (>${a})` : c ? ` (<${d})` : "", t = e.observationValue?.isAbnormal === !0;
39
+ return { units: r, rangeString: i, isAbnormal: t };
40
40
  }, j = ({
41
41
  member: e,
42
- depth: t = 0,
42
+ depth: r = 0,
43
43
  memberIndex: a = 0,
44
- formName: n = "",
44
+ formName: d = "",
45
45
  comment: s
46
46
  }) => {
47
- const c = e.members && e.members.length > 0, i = e.display, r = n ? `${n}-` : "";
47
+ const c = e.members && e.members.length > 0, i = e.display, t = d ? `${d}-` : "";
48
48
  if (c)
49
49
  return /* @__PURE__ */ b(
50
50
  "div",
51
51
  {
52
52
  className: o.nestedGroup,
53
- "data-testid": `${r}obs-nested-group-${i}-${a}`,
53
+ "data-testid": `${t}obs-nested-group-${i}-${a}`,
54
54
  children: [
55
- /* @__PURE__ */ d(
55
+ /* @__PURE__ */ n(
56
56
  "div",
57
57
  {
58
58
  className: o.nestedGroupLabel,
59
- "data-testid": `${r}obs-nested-group-label-${i}-${a}`,
60
- style: { paddingLeft: `${t * 16}px` },
59
+ "data-testid": `${t}obs-nested-group-label-${i}-${a}`,
60
+ style: { paddingLeft: `${r * 16}px` },
61
61
  children: i
62
62
  }
63
63
  ),
64
- /* @__PURE__ */ d(
64
+ /* @__PURE__ */ n(
65
65
  "div",
66
66
  {
67
67
  className: o.nestedGroupMembers,
68
- "data-testid": `${r}obs-nested-group-members-${i}-${a}`,
69
- children: e.members?.map((v, N) => /* @__PURE__ */ d(
68
+ "data-testid": `${t}obs-nested-group-members-${i}-${a}`,
69
+ children: e.members?.map((v, N) => /* @__PURE__ */ n(
70
70
  j,
71
71
  {
72
72
  member: v,
73
- depth: t + 1,
73
+ depth: r + 1,
74
74
  memberIndex: N,
75
- formName: n
75
+ formName: d
76
76
  },
77
77
  `${v.id}`
78
78
  ))
@@ -81,14 +81,14 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
81
81
  ]
82
82
  }
83
83
  );
84
- const { units: p, rangeString: g, isAbnormal: f } = Q(e), _ = e.observationValue?.value?.toString(), $ = _ ? K(_) : null;
85
- return /* @__PURE__ */ b(P, { children: [
84
+ const { units: p, rangeString: y, isAbnormal: f } = Q(e), _ = e.observationValue?.value?.toString(), h = _ ? K(_) : null;
85
+ return /* @__PURE__ */ b(H, { children: [
86
86
  /* @__PURE__ */ b(
87
87
  "div",
88
88
  {
89
89
  className: o.memberRow,
90
- "data-testid": `${r}obs-member-row-${i}-${a}`,
91
- style: { paddingLeft: `${t * 16}px` },
90
+ "data-testid": `${t}obs-member-row-${i}-${a}`,
91
+ style: { paddingLeft: `${r * 16}px` },
92
92
  children: [
93
93
  /* @__PURE__ */ b(
94
94
  "p",
@@ -97,10 +97,10 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
97
97
  o.memberLabel,
98
98
  f ? o.abnormalValue : ""
99
99
  ),
100
- "data-testid": `${r}obs-member-label-${i}-${a}`,
100
+ "data-testid": `${t}obs-member-label-${i}-${a}`,
101
101
  children: [
102
102
  i,
103
- g
103
+ y
104
104
  ]
105
105
  }
106
106
  ),
@@ -111,9 +111,9 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
111
111
  o.memberValue,
112
112
  f ? o.abnormalValue : ""
113
113
  ),
114
- "data-testid": `${r}obs-member-value-${i}-${a}`,
114
+ "data-testid": `${t}obs-member-value-${i}-${a}`,
115
115
  children: [
116
- $,
116
+ h,
117
117
  p && ` ${p}`
118
118
  ]
119
119
  }
@@ -121,12 +121,12 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
121
121
  ]
122
122
  }
123
123
  ),
124
- s && /* @__PURE__ */ d(
124
+ s && /* @__PURE__ */ n(
125
125
  "div",
126
126
  {
127
127
  className: o.commentSection,
128
- "data-testid": `${r}obs-member-comment-${i}-${a}`,
129
- style: { paddingLeft: `${t * 16}px` },
128
+ "data-testid": `${t}obs-member-comment-${i}-${a}`,
129
+ style: { paddingLeft: `${r * 16}px` },
130
130
  children: /* @__PURE__ */ b("span", { className: o.commentText, children: [
131
131
  s,
132
132
  e.encounter?.provider && ` - by ${e.encounter.provider}`
@@ -134,50 +134,50 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
134
134
  }
135
135
  )
136
136
  ] });
137
- }, xe = ({
137
+ }, Pe = ({
138
138
  observation: e,
139
- index: t,
139
+ index: r,
140
140
  formName: a = "",
141
- comment: n
141
+ comment: d
142
142
  }) => {
143
- const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: r } = Q(e), p = a ? `${a}-` : "", g = e.observationValue?.value?.toString(), f = g ? K(g) : null;
143
+ const s = e.members && e.members.length > 0, { units: c, rangeString: i, isAbnormal: t } = Q(e), p = a ? `${a}-` : "", y = e.observationValue?.value?.toString(), f = y ? K(y) : null;
144
144
  return /* @__PURE__ */ b(
145
145
  "div",
146
146
  {
147
147
  className: o.observation,
148
- "data-testid": `${p}observation-item-${e.display}-${t}`,
148
+ "data-testid": `${p}observation-item-${e.display}-${r}`,
149
149
  children: [
150
150
  /* @__PURE__ */ b(
151
151
  "div",
152
152
  {
153
153
  className: s ? o.groupContainer : o.rowContainer,
154
- "data-testid": `${p}observation-container-${e.display}-${t}`,
154
+ "data-testid": `${p}observation-container-${e.display}-${r}`,
155
155
  children: [
156
156
  /* @__PURE__ */ b(
157
157
  "p",
158
158
  {
159
159
  className: M(
160
160
  s ? o.groupLabel : o.rowLabel,
161
- !s && r ? o.abnormalValue : ""
161
+ !s && t ? o.abnormalValue : ""
162
162
  ),
163
- "data-testid": `${p}observation-label-${e.display}-${t}`,
163
+ "data-testid": `${p}observation-label-${e.display}-${r}`,
164
164
  children: [
165
165
  e.display,
166
- !s && i && /* @__PURE__ */ d("span", { className: o.rangeInfo, children: i })
166
+ !s && i && /* @__PURE__ */ n("span", { className: o.rangeInfo, children: i })
167
167
  ]
168
168
  }
169
169
  ),
170
- s ? /* @__PURE__ */ d(
170
+ s ? /* @__PURE__ */ n(
171
171
  "div",
172
172
  {
173
173
  className: o.groupMembers,
174
- "data-testid": `${p}observation-group-members-${e.display}-${t}`,
175
- children: e.members?.map((_, $) => /* @__PURE__ */ d(
174
+ "data-testid": `${p}observation-group-members-${e.display}-${r}`,
175
+ children: e.members?.map((_, h) => /* @__PURE__ */ n(
176
176
  j,
177
177
  {
178
178
  member: _,
179
179
  depth: 0,
180
- memberIndex: $,
180
+ memberIndex: h,
181
181
  formName: a
182
182
  },
183
183
  `${_.id}`
@@ -188,9 +188,9 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
188
188
  {
189
189
  className: M(
190
190
  o.rowValue,
191
- r ? o.abnormalValue : ""
191
+ t ? o.abnormalValue : ""
192
192
  ),
193
- "data-testid": `${p}observation-value-${e.display}-${t}`,
193
+ "data-testid": `${p}observation-value-${e.display}-${r}`,
194
194
  children: [
195
195
  f,
196
196
  c && ` ${c}`
@@ -200,128 +200,128 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
200
200
  ]
201
201
  }
202
202
  ),
203
- n && /* @__PURE__ */ d(
203
+ d && /* @__PURE__ */ n(
204
204
  "div",
205
205
  {
206
206
  className: o.commentSection,
207
- "data-testid": `${p}observation-comment-${e.display}-${t}`,
207
+ "data-testid": `${p}observation-comment-${e.display}-${r}`,
208
208
  children: /* @__PURE__ */ b("span", { className: o.commentText, children: [
209
- n,
209
+ d,
210
210
  e.encounter?.provider && ` - by ${e.encounter.provider}`
211
211
  ] })
212
212
  }
213
213
  )
214
214
  ]
215
215
  },
216
- `${e.id}-${t}`
216
+ `${e.id}-${r}`
217
217
  );
218
218
  }, He = (e) => e ? e.extension?.find(
219
- (a) => a.url === se
220
- )?.valueString : void 0, Pe = (e) => {
219
+ (a) => a.url === ne
220
+ )?.valueString : void 0, Ke = (e) => {
221
221
  if (e)
222
222
  return e.note?.[0]?.text;
223
- }, Ke = (e, t) => e.entry?.find((a) => a.resource?.id === t)?.resource, T = (e, t) => {
224
- const a = Ke(e, t);
223
+ }, Qe = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, w = (e, r) => {
224
+ const a = Qe(e, r);
225
225
  return a ? {
226
226
  formFieldPath: He(a),
227
- comment: Pe(a)
227
+ comment: Ke(a)
228
228
  } : {};
229
- }, Qe = (e, t) => {
230
- if (!e?.entry || !t)
229
+ }, je = (e, r) => {
230
+ if (!e?.entry || !r)
231
231
  return [];
232
- const a = oe(e);
232
+ const a = se(e);
233
233
  return [
234
234
  ...a.observations.map((s) => {
235
- const { formFieldPath: c, comment: i } = T(
235
+ const { formFieldPath: c, comment: i } = w(
236
236
  e,
237
237
  s.id
238
238
  );
239
239
  return { obs: s, formFieldPath: c, comment: i };
240
240
  }),
241
241
  ...a.groupedObservations.flatMap((s) => {
242
- const { formFieldPath: c } = T(e, s.id);
242
+ const { formFieldPath: c } = w(e, s.id);
243
243
  return (s.members ?? []).map((i) => {
244
- const { comment: r } = T(e, i.id);
245
- return { obs: i, formFieldPath: c, comment: r };
244
+ const { comment: t } = w(e, i.id);
245
+ return { obs: i, formFieldPath: c, comment: t };
246
246
  });
247
247
  })
248
248
  ].filter(
249
- ({ formFieldPath: s }) => !s || s.includes(t)
249
+ ({ formFieldPath: s }) => !s || s.includes(r)
250
250
  );
251
- }, Xe = ({
251
+ }, Ze = ({
252
252
  episodeOfCareUuids: e,
253
- encounterUuids: t,
253
+ encounterUuids: r,
254
254
  config: a
255
255
  }) => {
256
- const { t: n } = ve(), s = ne(), [c, i] = H(!1), [r, p] = H(null), g = a?.numberOfVisits, f = de(
256
+ const { t: d } = Ne(), s = de(), [c, i] = P(!1), [t, p] = P(null), y = a?.numberOfVisits, f = ie(
257
257
  e,
258
- t
259
- ), _ = he(), {
260
- data: $ = [],
258
+ r
259
+ ), _ = ve(), {
260
+ data: h = [],
261
261
  isLoading: v,
262
262
  isError: N,
263
263
  error: Y,
264
264
  refetch: z
265
265
  } = L({
266
266
  queryKey: ["forms", s, e],
267
- queryFn: () => ie(s, void 0, g),
267
+ queryFn: () => le(s, void 0, y),
268
268
  enabled: !!s && !f
269
- }), D = h(() => !t || t.length === 0 ? $ : $.filter(
270
- (l) => t.includes(l.encounterUuid)
271
- ), [$, t]), { data: V = [] } = L({
269
+ }), T = g(() => !r || r.length === 0 ? h : h.filter(
270
+ (l) => r.includes(l.encounterUuid)
271
+ ), [h, r]), { data: V = [] } = L({
272
272
  queryKey: ["observationForms"],
273
- queryFn: () => le()
274
- }), A = F(
273
+ queryFn: () => ce()
274
+ }), I = F(
275
275
  (l) => V.find((m) => m.name === l)?.uuid,
276
276
  [V]
277
- ), C = h(() => {
278
- if (r)
279
- return A(r.formName);
280
- }, [r, A]), { isLoading: W, error: I } = L({
281
- queryKey: ["formMetadata", C],
282
- queryFn: () => ce(C),
283
- enabled: !!C && c
277
+ ), R = g(() => {
278
+ if (t)
279
+ return I(t.formName);
280
+ }, [t, I]), { isLoading: J, error: A } = L({
281
+ queryKey: ["formMetadata", R],
282
+ queryFn: () => me(R),
283
+ enabled: !!R && c
284
284
  }), {
285
- data: R,
286
- isLoading: J,
285
+ data: C,
286
+ isLoading: W,
287
287
  error: E
288
288
  } = L({
289
- queryKey: ["formsEncounterFHIR", r?.encounterUuid],
290
- queryFn: () => me(r.encounterUuid),
291
- enabled: !!r?.encounterUuid && c
289
+ queryKey: ["formsEncounterFHIR", t?.encounterUuid],
290
+ queryFn: () => ue(t.encounterUuid),
291
+ enabled: !!t?.encounterUuid && c
292
292
  });
293
- ue(
293
+ pe(
294
294
  (l) => {
295
295
  l.patientUUID === s && l.updatedConcepts.size > 0 && (z(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
296
296
  },
297
297
  [s]
298
298
  );
299
- const B = h(() => !R || !r?.formName ? [] : Qe(
300
- R,
301
- r.formName
302
- ), [R, r?.formName]), S = h(
299
+ const B = g(() => !C || !t?.formName ? [] : je(
300
+ C,
301
+ t.formName
302
+ ), [C, t?.formName]), G = g(
303
303
  () => [
304
- { key: "recordedOn", header: n("FORM_RECORDED_ON") },
305
- { key: "recordedBy", header: n("FORM_RECORDED_BY") }
304
+ { key: "recordedOn", header: d("FORM_RECORDED_ON") },
305
+ { key: "recordedBy", header: d("FORM_RECORDED_BY") }
306
306
  ],
307
- [n]
308
- ), X = h(
307
+ [d]
308
+ ), X = g(
309
309
  () => [
310
310
  { key: "recordedOn", sortable: !0 },
311
311
  { key: "recordedBy", sortable: !0 }
312
312
  ],
313
313
  []
314
- ), G = h(() => {
315
- const l = D.reduce(
314
+ ), S = g(() => {
315
+ const l = T.reduce(
316
316
  (m, u) => {
317
317
  const O = u.formName;
318
318
  m[O] ??= [];
319
- const w = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
319
+ const D = u.providers.map((ee) => ee.providerName).filter(Boolean).join(", ");
320
320
  return m[O].push({
321
321
  id: u.encounterUuid,
322
322
  formName: u.formName,
323
- recordedOn: pe(u.encounterDateTime, n, ge).formattedResult,
324
- recordedBy: w ?? "--",
323
+ recordedOn: be(u.encounterDateTime, d, ge).formattedResult,
324
+ recordedBy: D ?? "--",
325
325
  encounterDateTime: u.encounterDateTime,
326
326
  encounterUuid: u.encounterUuid
327
327
  }), m;
@@ -332,61 +332,61 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
332
332
  ([m, u]) => ({
333
333
  formName: m,
334
334
  records: u.sort(
335
- (O, w) => w.encounterDateTime - O.encounterDateTime
335
+ (O, D) => D.encounterDateTime - O.encounterDateTime
336
336
  )
337
337
  })
338
338
  ).sort((m, u) => m.formName.localeCompare(u.formName));
339
- }, [D, n]), q = F((l) => {
339
+ }, [T, d]), x = F((l) => {
340
340
  p(l), i(!0);
341
341
  }, []), Z = F(() => {
342
342
  i(!1), p(null);
343
- }, []), U = F(
344
- (l, y) => {
345
- switch (y) {
343
+ }, []), q = F(
344
+ (l, $) => {
345
+ switch ($) {
346
346
  case "recordedOn":
347
- return /* @__PURE__ */ d(be, { onClick: () => q(l), children: l.recordedOn });
347
+ return /* @__PURE__ */ n(fe, { onClick: () => x(l), children: l.recordedOn });
348
348
  case "recordedBy":
349
349
  return l.recordedBy;
350
350
  default:
351
351
  return null;
352
352
  }
353
353
  },
354
- [q]
354
+ [x]
355
355
  );
356
- return /* @__PURE__ */ b(P, { children: [
357
- /* @__PURE__ */ d("div", { "data-testid": "forms-table", children: v || N || G.length === 0 || f ? /* @__PURE__ */ d(
358
- k,
356
+ return /* @__PURE__ */ b(H, { children: [
357
+ /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: v || N || S.length === 0 || f ? /* @__PURE__ */ n(
358
+ U,
359
359
  {
360
- headers: S,
361
- ariaLabel: n("FORMS_HEADING"),
360
+ headers: G,
361
+ ariaLabel: d("FORMS_HEADING"),
362
362
  rows: [],
363
363
  loading: v,
364
364
  errorStateMessage: N ? Y?.message : void 0,
365
- emptyStateMessage: n("FORMS_UNAVAILABLE"),
366
- renderCell: U,
365
+ emptyStateMessage: d("FORMS_UNAVAILABLE"),
366
+ renderCell: q,
367
367
  className: o.formsTableBody,
368
368
  dataTestId: "forms-table"
369
369
  }
370
- ) : /* @__PURE__ */ d(fe, { align: "start", children: G.map((l, y) => {
370
+ ) : /* @__PURE__ */ n(_e, { align: "start", children: S.map((l, $) => {
371
371
  const { formName: m, records: u } = l;
372
- return /* @__PURE__ */ d(
373
- _e,
372
+ return /* @__PURE__ */ n(
373
+ he,
374
374
  {
375
375
  title: m,
376
376
  className: o.customAccordianItem,
377
377
  testId: `accordian-title-${m}`,
378
- open: y === 0,
379
- children: /* @__PURE__ */ d(
380
- k,
378
+ open: $ === 0,
379
+ children: /* @__PURE__ */ n(
380
+ U,
381
381
  {
382
- headers: S,
383
- ariaLabel: n("FORMS_HEADING"),
382
+ headers: G,
383
+ ariaLabel: d("FORMS_HEADING"),
384
384
  rows: u,
385
385
  loading: !1,
386
386
  errorStateMessage: "",
387
387
  sortable: X,
388
- emptyStateMessage: n("FORMS_UNAVAILABLE"),
389
- renderCell: U,
388
+ emptyStateMessage: d("FORMS_UNAVAILABLE"),
389
+ renderCell: q,
390
390
  className: o.formsTableBody,
391
391
  dataTestId: `forms-table-${m}`
392
392
  }
@@ -395,32 +395,32 @@ const Ne = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
395
395
  m
396
396
  );
397
397
  }) }) }),
398
- c && r && /* @__PURE__ */ d(
398
+ c && t && /* @__PURE__ */ n(
399
399
  $e,
400
400
  {
401
401
  id: "modalIdForActionAreaLayout",
402
402
  portalId: "main-display-area",
403
403
  open: c,
404
404
  onRequestClose: Z,
405
- modalHeading: r.formName,
406
- modalLabel: `${r.recordedOn} | ${r.recordedBy}`,
405
+ modalHeading: t.formName,
406
+ modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
407
407
  passiveModal: !0,
408
408
  size: "md",
409
409
  testId: "form-details-modal",
410
- children: /* @__PURE__ */ d("div", { className: o.formContent, children: W || J ? /* @__PURE__ */ d(ye, { width: "100%", lineCount: 3 }) : I ? /* @__PURE__ */ d("div", { children: x(I).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ d("div", { children: x(E).message ?? n("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ d("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: y }, m) => /* @__PURE__ */ d(
411
- xe,
410
+ children: /* @__PURE__ */ n("div", { className: o.formContent, children: J || W ? /* @__PURE__ */ n(ye, { width: "100%", lineCount: 3 }) : A ? /* @__PURE__ */ n("div", { children: k(A).message ?? d("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ n("div", { children: k(E).message ?? d("ERROR_FETCHING_FORM_DATA") }) : B.length > 0 ? /* @__PURE__ */ n("div", { className: o.formDetailsContainer, children: B.map(({ obs: l, comment: $ }, m) => /* @__PURE__ */ n(
411
+ Pe,
412
412
  {
413
413
  observation: l,
414
414
  index: m,
415
- formName: r.formName,
416
- comment: y
415
+ formName: t.formName,
416
+ comment: $
417
417
  },
418
418
  `${l.id}`
419
- )) }) : /* @__PURE__ */ d("div", { children: n("NO_FORM_DATA_AVAILABLE") }) })
419
+ )) }) : /* @__PURE__ */ n("div", { children: d("NO_FORM_DATA_AVAILABLE") }) })
420
420
  }
421
421
  )
422
422
  ] });
423
423
  };
424
424
  export {
425
- Xe as default
425
+ Ze as default
426
426
  };