@bahmni/registration-app 0.0.1-dev.190 → 0.0.1-dev.192

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