@bahmni/clinical-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,202 @@
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 P, R as j, N as G, L as W, b as Y } from "./index-CUkfEf2V.js";
3
+ import { useState as C, useCallback as T, useEffect as S, useMemo as E } from "react";
4
+ 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 = {
5
+ documentsTableBody: z,
6
+ viewAttachmentsLink: J,
7
+ documentViewerContainer: K,
8
+ attachmentItem: Q,
9
+ attachmentCounter: X,
10
+ attachmentError: Z,
11
+ documentIframe: ee,
12
+ documentImage: te
13
+ }, ae = {
14
+ documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
15
+ documentType: "DOCUMENTS_TYPE",
16
+ uploadedOn: "DOCUMENTS_UPLOADED_ON",
17
+ uploadedBy: "DOCUMENTS_UPLOADED_BY",
18
+ action: "DOCUMENTS_ACTION"
19
+ };
20
+ function U(a) {
21
+ return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
22
+ }
23
+ function ne(a, u) {
24
+ return a.map((s) => ({
25
+ key: s,
26
+ header: u(ae[s])
27
+ }));
28
+ }
29
+ const re = [
30
+ "documentIdentifier",
31
+ "documentType",
32
+ "uploadedOn",
33
+ "uploadedBy",
34
+ "action"
35
+ ], M = (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
+ null
38
+ ), [w, N] = C(
39
+ /* @__PURE__ */ new Set()
40
+ ), p = V(), { t: n } = F(), { addNotification: y } = H(), D = T((e) => {
41
+ g(e), A(!0);
42
+ }, []), b = T(() => {
43
+ A(!1), g(null), N(/* @__PURE__ */ new Set());
44
+ }, []), L = T((e) => {
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: () => Y(p, u)
50
+ });
51
+ S(() => {
52
+ f && y({
53
+ title: n("ERROR_DEFAULT_TITLE"),
54
+ message: I?.message ?? "",
55
+ type: "error"
56
+ });
57
+ }, [f, I, y, n]), S(() => {
58
+ const e = new AbortController();
59
+ return (async () => {
60
+ if (!s || !r) return;
61
+ const t = /* @__PURE__ */ new Set(), c = M(r);
62
+ for (let m = 0; m < c.length; m++) {
63
+ const O = U(c[m].url);
64
+ try {
65
+ (await fetch(O, {
66
+ method: "HEAD",
67
+ signal: e.signal
68
+ })).ok || t.add(m);
69
+ } catch (_) {
70
+ _ instanceof Error && _.name !== "AbortError" && t.add(m);
71
+ }
72
+ }
73
+ e.signal.aborted || N(t);
74
+ })(), () => e.abort();
75
+ }, [s, r]);
76
+ const h = E(
77
+ () => a?.fields ?? re,
78
+ [a?.fields]
79
+ ), B = E(() => ne(h, n), [h, n]), v = E(
80
+ () => h.map((e) => ({
81
+ key: e,
82
+ sortable: e !== "action"
83
+ })),
84
+ [h]
85
+ ), i = E(
86
+ () => r ? M(r) : [],
87
+ [r]
88
+ ), k = T(
89
+ (e, t) => {
90
+ switch (t) {
91
+ case "documentIdentifier":
92
+ return /* @__PURE__ */ o("span", { children: e.documentIdentifier });
93
+ case "documentType":
94
+ return e.documentType ?? n("DOCUMENTS_NOT_AVAILABLE");
95
+ case "uploadedOn":
96
+ return j(
97
+ e.uploadedOn,
98
+ n,
99
+ !0
100
+ ).formattedResult || n("DOCUMENTS_NOT_AVAILABLE");
101
+ case "uploadedBy":
102
+ return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
103
+ case "action":
104
+ return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ o(
105
+ P,
106
+ {
107
+ onClick: () => D(e),
108
+ className: d.viewAttachmentsLink,
109
+ "data-testid": `view-attachments-${e.id}`,
110
+ children: n("DOCUMENTS_VIEW_ATTACHMENTS")
111
+ }
112
+ ) : "--";
113
+ default:
114
+ return null;
115
+ }
116
+ },
117
+ [D, n]
118
+ );
119
+ return /* @__PURE__ */ l($, { children: [
120
+ /* @__PURE__ */ o("div", { "data-testid": "documents-table", children: /* @__PURE__ */ o(
121
+ G,
122
+ {
123
+ headers: B,
124
+ ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
125
+ rows: R ?? [],
126
+ loading: q,
127
+ errorStateMessage: f ? I?.message : null,
128
+ sortable: v,
129
+ emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
130
+ renderCell: k,
131
+ className: d.documentsTableBody,
132
+ dataTestId: "documents-table"
133
+ }
134
+ ) }),
135
+ s && r && /* @__PURE__ */ o(
136
+ W,
137
+ {
138
+ id: "modalIdForActionAreaLayout",
139
+ portalId: "main-display-area",
140
+ open: s,
141
+ onRequestClose: b,
142
+ modalHeading: r.documentIdentifier,
143
+ passiveModal: !0,
144
+ size: "lg",
145
+ testId: "document-view-modal",
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"), O = e.contentType?.toLowerCase().includes("image"), _ = w.has(t);
148
+ return c === "#" || _ ? /* @__PURE__ */ l(
149
+ "div",
150
+ {
151
+ className: d.attachmentError,
152
+ "data-testid": `attachment-error-${t}`,
153
+ children: [
154
+ i.length > 1 && /* @__PURE__ */ l("p", { className: d.attachmentCounter, children: [
155
+ t + 1,
156
+ "/",
157
+ i.length
158
+ ] }),
159
+ /* @__PURE__ */ o("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
160
+ ]
161
+ },
162
+ `${r.id}-${e.url}`
163
+ ) : /* @__PURE__ */ l(
164
+ "div",
165
+ {
166
+ className: d.attachmentItem,
167
+ "data-testid": `attachment-item-${t}`,
168
+ children: [
169
+ i.length > 1 && /* @__PURE__ */ l("p", { className: d.attachmentCounter, children: [
170
+ t + 1,
171
+ "/",
172
+ i.length
173
+ ] }),
174
+ O ? /* @__PURE__ */ o(
175
+ "img",
176
+ {
177
+ src: c,
178
+ alt: r.documentIdentifier,
179
+ className: d.documentImage,
180
+ onError: () => L(t)
181
+ }
182
+ ) : /* @__PURE__ */ o(
183
+ "iframe",
184
+ {
185
+ src: m ? `${c}#toolbar=0` : c,
186
+ className: d.documentIframe,
187
+ title: r.documentIdentifier,
188
+ onError: () => L(t)
189
+ }
190
+ )
191
+ ]
192
+ },
193
+ `${r.id}-${e.url}`
194
+ );
195
+ }) })
196
+ }
197
+ )
198
+ ] });
199
+ };
200
+ export {
201
+ ce as default
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, c 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, J as ce, I as H, y as ue, n as k, C, v as be, Q as pe, e as _e, f as fe, g as $e, x as ve, M as ye, h as ge, H as he } from "./index-CUkfEf2V.js";
3
+ import { useState as K, useMemo as g, 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", 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 = {
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: xe,
16
+ memberRow: De,
17
+ memberLabel: Ee,
18
+ memberValue: Se,
19
+ abnormalValue: Ve,
20
+ commentSection: we,
21
+ commentText: Be,
22
+ nestedGroup: Ge,
23
+ nestedGroupLabel: Ue,
24
+ nestedGroupMembers: qe
25
+ }, Q = (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
+ }, j = (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((h, N) => /* @__PURE__ */ o(
71
+ z,
72
+ {
73
+ member: h,
74
+ depth: r + 1,
75
+ memberIndex: N,
76
+ formName: a
77
+ },
78
+ `${h.id}`
79
+ ))
80
+ }
81
+ )
82
+ ]
83
+ }
84
+ );
85
+ const { rangeString: v, isAbnormal: _ } = j(e), f = k(e, d), $ = f ? Q(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
+ v
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 } = j(e), c = s ? `${s}-` : "", v = k(e, l), _ = v ? Q(v) : 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
+ }, Qe = (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
+ }, We = ({
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), v = s?.numberOfVisits, _ = te(
252
+ e,
253
+ r
254
+ ), f = oe(), {
255
+ data: $ = [],
256
+ isLoading: h,
257
+ isError: N,
258
+ error: J,
259
+ refetch: W
260
+ } = L({
261
+ queryKey: ["forms", l, e],
262
+ queryFn: () => ve(l, void 0, v),
263
+ enabled: !!l && !_
264
+ }), T = g(() => !r || r.length === 0 ? $ : $.filter(
265
+ (m) => r.includes(m.encounterUuid)
266
+ ), [$, r]), { data: x = [] } = L({
267
+ queryKey: ["observationForms"],
268
+ queryFn: () => ye()
269
+ }), D = R(
270
+ (m) => x.find((u) => u.name === m)?.uuid,
271
+ [x]
272
+ ), A = g(() => {
273
+ if (t)
274
+ return D(t.formName);
275
+ }, [t, D]), { isLoading: Y, error: E } = L({
276
+ queryKey: ["formMetadata", A],
277
+ queryFn: () => ge(A),
278
+ enabled: !!A && d
279
+ }), {
280
+ data: F,
281
+ isLoading: Z,
282
+ error: S
283
+ } = L({
284
+ queryKey: ["formsEncounterFHIR", t?.encounterUuid],
285
+ queryFn: () => he(t.encounterUuid),
286
+ enabled: !!t?.encounterUuid && d
287
+ });
288
+ ne(
289
+ (m) => {
290
+ m.patientUUID === l && m.updatedConcepts.size > 0 && (W(), f.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
291
+ },
292
+ [l]
293
+ );
294
+ const V = g(() => !F || !t?.formName ? [] : Qe(
295
+ F,
296
+ t.formName
297
+ ), [F, t?.formName]), w = g(
298
+ () => [
299
+ { key: "recordedOn", header: a("FORM_RECORDED_ON") },
300
+ { key: "recordedBy", header: a("FORM_RECORDED_BY") }
301
+ ],
302
+ [a]
303
+ ), X = g(
304
+ () => [
305
+ { key: "recordedOn", sortable: !0 },
306
+ { key: "recordedBy", sortable: !0 }
307
+ ],
308
+ []
309
+ ), B = g(() => {
310
+ const m = T.reduce(
311
+ (u, i) => {
312
+ const y = i.formName;
313
+ u[y] ??= [];
314
+ const I = i.providers.map((re) => re.providerName).filter(Boolean).join(", ");
315
+ return u[y].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
+ (y, I) => I.encounterDateTime - y.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: h || N || B.length === 0 || _ ? /* @__PURE__ */ o(
353
+ q,
354
+ {
355
+ headers: w,
356
+ ariaLabel: a("FORMS_HEADING"),
357
+ rows: [],
358
+ loading: h,
359
+ errorStateMessage: N ? J?.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: y } = 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: y,
380
+ loading: !1,
381
+ errorStateMessage: "",
382
+ sortable: X,
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 }) : 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(
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
+ We as default
421
+ };
@@ -1,25 +1,25 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-bUkej3Ae.js";
2
- import { B as d, C as f, D as e } from "./index-CQlX16AU.js";
3
- var p = (a) => {
4
- const [r, t] = c({
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BH_3NEAg.js";
2
+ import { o as p, p as d, q as e } from "./index-CUkfEf2V.js";
3
+ var f = (a) => {
4
+ const [r, o] = c({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), n = d(), s = f(() => {
7
- const o = r.theme_preference || l;
8
- return o !== "system" ? o : n();
6
+ }), n = p(), s = d(() => {
7
+ const t = r.theme_preference || l;
8
+ return t !== "system" ? t : n();
9
9
  });
10
10
  return e(i.Provider, {
11
11
  value: a,
12
12
  get children() {
13
13
  return e(m, {
14
14
  localStore: r,
15
- setLocalStore: t,
15
+ setLocalStore: o,
16
16
  get children() {
17
17
  return e(u.Provider, {
18
18
  value: s,
19
19
  get children() {
20
20
  return e(v, {
21
21
  localStore: r,
22
- setLocalStore: t
22
+ setLocalStore: o
23
23
  });
24
24
  }
25
25
  });
@@ -27,7 +27,7 @@ var p = (a) => {
27
27
  });
28
28
  }
29
29
  });
30
- }, P = p;
30
+ }, C = f;
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-bUkej3Ae.js";
2
- import { B as C, C as v, D as e } from "./index-CQlX16AU.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-BH_3NEAg.js";
2
+ import { o as v, p as C, q as e } from "./index-CUkfEf2V.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
6
- }), a = C(), l = v(() => {
6
+ }), a = v(), l = C(() => {
7
7
  const n = r.theme_preference || c;
8
8
  return n !== "system" ? n : a();
9
9
  });
@@ -36,7 +36,7 @@ var h = (t) => {
36
36
  });
37
37
  }
38
38
  });
39
- }, p = h;
39
+ }, g = h;
40
40
  export {
41
- p as default
41
+ g as default
42
42
  };