@bahmni/clinical-app 0.0.1-dev.191 → 0.0.1-dev.193

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