@bahmni/registration-app 0.0.1-dev.199 → 0.0.1-dev.201
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/{DocumentsTable-CFwrptgn-DtXZBkeF.js → DocumentsTable-Di3nGMxS-C7gUM98-.js} +28 -28
- package/dist/{FormsTable-CB5_nrlS-DzJri7x5.js → FormsTable-CQD6_ATv-Du5LS4NA.js} +77 -77
- package/dist/{LNWAZHJI-Bs9OkW9X.js → LNWAZHJI-UvzfrJ9x.js} +7 -7
- package/dist/{MWZ6AO7Z-DWP8ZHeN.js → MWZ6AO7Z-CYcQ23B9.js} +4 -4
- package/dist/{Observations-C7BBw4Hj-hRH1vdc_.js → Observations-BCqYbNXh--2a55jaB.js} +56 -56
- package/dist/{YPM2AS64-OWa1Ag-O.js → YPM2AS64-CJd8VmsU.js} +138 -138
- package/dist/{index-CqKlg8Y1.js → index-C3hZcbfn.js} +29576 -29152
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/pages/PatientRegister/PatientRegister.d.ts.map +1 -1
- package/dist/pages/PatientRegister/PatientRegisterSection.d.ts +3 -0
- package/dist/pages/PatientRegister/PatientRegisterSection.d.ts.map +1 -1
- package/dist/providers/registrationConfig/models.d.ts +1 -0
- package/dist/providers/registrationConfig/models.d.ts.map +1 -1
- package/dist/providers/registrationConfig/schema.json.d.ts +4 -0
- package/package.json +1 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { l as V, u as x, Q as F,
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { useState as I, useCallback as T, useEffect as
|
|
5
|
-
const
|
|
6
|
-
documentsTableBody:
|
|
7
|
-
viewAttachmentsLink:
|
|
8
|
-
documentViewerContainer:
|
|
9
|
-
attachmentItem:
|
|
2
|
+
import { l as V, u as x, Q as F, s as H, y as q, C as Q, x as P, T as G } from "./index-C3hZcbfn.js";
|
|
3
|
+
import { useQuery as Y } from "@tanstack/react-query";
|
|
4
|
+
import { useState as I, useCallback as T, useEffect as U, useMemo as p } from "react";
|
|
5
|
+
const z = "_documentsTableBody_1voj8_1", J = "_viewAttachmentsLink_1voj8_11", K = "_documentViewerContainer_1voj8_15", W = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
|
|
6
|
+
documentsTableBody: z,
|
|
7
|
+
viewAttachmentsLink: J,
|
|
8
|
+
documentViewerContainer: K,
|
|
9
|
+
attachmentItem: W,
|
|
10
10
|
attachmentCounter: X,
|
|
11
11
|
attachmentError: Z,
|
|
12
12
|
documentIframe: ee,
|
|
@@ -18,7 +18,7 @@ const Y = "_documentsTableBody_1voj8_1", z = "_viewAttachmentsLink_1voj8_11", J
|
|
|
18
18
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
19
19
|
action: "DOCUMENTS_ACTION"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function v(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
24
|
function ne(a, u) {
|
|
@@ -33,35 +33,35 @@ const re = [
|
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
], oe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i,
|
|
37
|
-
const [s,
|
|
36
|
+
], oe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, w = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], ie = ({ config: a, encounterUuids: u }) => {
|
|
37
|
+
const [s, y] = I(!1), [r, O] = I(
|
|
38
38
|
null
|
|
39
|
-
), [
|
|
39
|
+
), [L, E] = I(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), N = V(), { t: n } = x(), { addNotification:
|
|
42
|
-
|
|
41
|
+
), N = V(), { t: n } = x(), { addNotification: A } = F(), D = T((e) => {
|
|
42
|
+
O(e), y(!0);
|
|
43
43
|
}, []), M = T(() => {
|
|
44
|
-
|
|
44
|
+
y(!1), O(null), E(/* @__PURE__ */ new Set());
|
|
45
45
|
}, []), S = T((e) => {
|
|
46
|
-
|
|
47
|
-
}, []), { data: b, isLoading: j, isError: f, error: g } =
|
|
46
|
+
E((t) => new Set(t).add(e));
|
|
47
|
+
}, []), { data: b, isLoading: j, isError: f, error: g } = Y({
|
|
48
48
|
queryKey: ["documents", N, u],
|
|
49
49
|
enabled: !!N,
|
|
50
50
|
queryFn: () => H(N, u)
|
|
51
51
|
});
|
|
52
|
-
|
|
53
|
-
f &&
|
|
52
|
+
U(() => {
|
|
53
|
+
f && A({
|
|
54
54
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
55
55
|
message: g?.message ?? "",
|
|
56
56
|
type: "error"
|
|
57
57
|
});
|
|
58
|
-
}, [f, g,
|
|
58
|
+
}, [f, g, A, n]), U(() => {
|
|
59
59
|
const e = new AbortController();
|
|
60
60
|
return (async () => {
|
|
61
61
|
if (!s || !r) return;
|
|
62
|
-
const t = /* @__PURE__ */ new Set(), c =
|
|
62
|
+
const t = /* @__PURE__ */ new Set(), c = w(r);
|
|
63
63
|
for (let m = 0; m < c.length; m++) {
|
|
64
|
-
const C =
|
|
64
|
+
const C = v(c[m].url);
|
|
65
65
|
try {
|
|
66
66
|
(await fetch(C, {
|
|
67
67
|
method: "HEAD",
|
|
@@ -71,20 +71,20 @@ const re = [
|
|
|
71
71
|
h instanceof Error && h.name !== "AbortError" && t.add(m);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
e.signal.aborted ||
|
|
74
|
+
e.signal.aborted || E(t);
|
|
75
75
|
})(), () => e.abort();
|
|
76
76
|
}, [s, r]);
|
|
77
|
-
const _ =
|
|
77
|
+
const _ = p(
|
|
78
78
|
() => a?.fields ?? re,
|
|
79
79
|
[a?.fields]
|
|
80
|
-
), B =
|
|
80
|
+
), B = p(() => ne(_, n), [_, n]), R = p(
|
|
81
81
|
() => _.map((e) => ({
|
|
82
82
|
key: e,
|
|
83
83
|
sortable: e !== "action"
|
|
84
84
|
})),
|
|
85
85
|
[_]
|
|
86
|
-
), i =
|
|
87
|
-
() => r ?
|
|
86
|
+
), i = p(
|
|
87
|
+
() => r ? w(r) : [],
|
|
88
88
|
[r]
|
|
89
89
|
), $ = T(
|
|
90
90
|
(e, t) => {
|
|
@@ -145,7 +145,7 @@ const re = [
|
|
|
145
145
|
size: "lg",
|
|
146
146
|
testId: "document-view-modal",
|
|
147
147
|
children: /* @__PURE__ */ o("div", { className: d.documentViewerContainer, children: i.map((e, t) => {
|
|
148
|
-
const c =
|
|
148
|
+
const c = v(e.url), m = e.contentType?.toLowerCase().includes("pdf"), C = (e.contentType?.toLowerCase().includes("image") ?? !1) || oe.test(e.url ?? ""), h = L.has(t);
|
|
149
149
|
return c === "#" || h ? /* @__PURE__ */ l(
|
|
150
150
|
"div",
|
|
151
151
|
{
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as o, jsxs as p, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
3
|
-
import { useQueryClient as
|
|
2
|
+
import { u as M, l as ae, o as te, i as oe, a as ne, b as se, n as de, f as me, C as ie, y as le, x as q, I as ce, Z as ue, T as be, O as pe, $ as H, t as fe, U as K, c as A, d as _e, D as $e, S as ye, R as ge, e as he } from "./index-C3hZcbfn.js";
|
|
3
|
+
import { useQueryClient as ve, useQuery as R } from "@tanstack/react-query";
|
|
4
4
|
import { useState as P, useMemo as h, useCallback as C } from "react";
|
|
5
|
-
const Ne = "_formsTableBody_1pd36_1",
|
|
5
|
+
const Ne = "_formsTableBody_1pd36_1", Re = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Ae = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Me = "_rowLabel_1pd36_58", Te = "_rowValue_1pd36_67", De = "_groupMembers_1pd36_75", Se = "_memberRow_1pd36_81", xe = "_memberLabel_1pd36_86", Ve = "_memberValue_1pd36_94", we = "_abnormalValue_1pd36_102", Ee = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ue = "_nestedGroup_1pd36_125", Ge = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
|
|
6
6
|
formsTableBody: Ne,
|
|
7
|
-
customAccordianItem:
|
|
7
|
+
customAccordianItem: Re,
|
|
8
8
|
formContent: Ce,
|
|
9
|
-
formDetailsContainer:
|
|
10
|
-
observation:
|
|
11
|
-
groupContainer:
|
|
9
|
+
formDetailsContainer: Ae,
|
|
10
|
+
observation: Fe,
|
|
11
|
+
groupContainer: Le,
|
|
12
12
|
rowContainer: Ie,
|
|
13
|
-
groupLabel:
|
|
14
|
-
rowLabel:
|
|
13
|
+
groupLabel: Oe,
|
|
14
|
+
rowLabel: Me,
|
|
15
15
|
rowValue: Te,
|
|
16
|
-
groupMembers:
|
|
17
|
-
memberRow:
|
|
16
|
+
groupMembers: De,
|
|
17
|
+
memberRow: Se,
|
|
18
18
|
memberLabel: xe,
|
|
19
|
-
memberValue:
|
|
20
|
-
abnormalValue:
|
|
21
|
-
commentSection:
|
|
19
|
+
memberValue: Ve,
|
|
20
|
+
abnormalValue: we,
|
|
21
|
+
commentSection: Ee,
|
|
22
22
|
commentText: Be,
|
|
23
|
-
nestedGroup:
|
|
24
|
-
nestedGroupLabel:
|
|
25
|
-
nestedGroupMembers:
|
|
23
|
+
nestedGroup: Ue,
|
|
24
|
+
nestedGroupLabel: Ge,
|
|
25
|
+
nestedGroupMembers: qe
|
|
26
26
|
}, j = (e) => {
|
|
27
27
|
const r = _e(e);
|
|
28
28
|
return r === "Image" ? /* @__PURE__ */ o(
|
|
@@ -32,21 +32,21 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
32
32
|
alt: e,
|
|
33
33
|
id: `${e}-img`
|
|
34
34
|
}
|
|
35
|
-
) : r === "Video" ? /* @__PURE__ */ o(
|
|
36
|
-
},
|
|
35
|
+
) : r === "Video" ? /* @__PURE__ */ o(ye, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(ge, { id: `${e}-pdf`, src: e }) : e;
|
|
36
|
+
}, Q = (e) => {
|
|
37
37
|
const r = e.observationValue?.referenceRange?.low?.value, s = e.observationValue?.referenceRange?.high?.value, a = r != null, l = s != null;
|
|
38
38
|
let d = "";
|
|
39
39
|
a && l ? d = ` (${r} - ${s})` : a ? d = ` (>${r})` : l && (d = ` (<${s})`);
|
|
40
40
|
const b = e.observationValue?.isAbnormal === !0;
|
|
41
41
|
return { rangeString: d, isAbnormal: b };
|
|
42
|
-
},
|
|
42
|
+
}, Z = ({
|
|
43
43
|
member: e,
|
|
44
44
|
depth: r = 0,
|
|
45
45
|
memberIndex: s = 0,
|
|
46
46
|
formName: a = "",
|
|
47
47
|
comment: l
|
|
48
48
|
}) => {
|
|
49
|
-
const { t: d } =
|
|
49
|
+
const { t: d } = M(), b = e.members && e.members.length > 0, t = e.display, c = a ? `${a}-` : "";
|
|
50
50
|
if (b)
|
|
51
51
|
return /* @__PURE__ */ p(
|
|
52
52
|
"div",
|
|
@@ -68,22 +68,22 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
68
68
|
{
|
|
69
69
|
className: n.nestedGroupMembers,
|
|
70
70
|
"data-testid": `${c}obs-nested-group-members-${t}-${s}`,
|
|
71
|
-
children: e.members?.map((
|
|
72
|
-
|
|
71
|
+
children: e.members?.map((v, N) => /* @__PURE__ */ o(
|
|
72
|
+
Z,
|
|
73
73
|
{
|
|
74
|
-
member:
|
|
74
|
+
member: v,
|
|
75
75
|
depth: r + 1,
|
|
76
76
|
memberIndex: N,
|
|
77
77
|
formName: a
|
|
78
78
|
},
|
|
79
|
-
`${
|
|
79
|
+
`${v.id}`
|
|
80
80
|
))
|
|
81
81
|
}
|
|
82
82
|
)
|
|
83
83
|
]
|
|
84
84
|
}
|
|
85
85
|
);
|
|
86
|
-
const { rangeString:
|
|
86
|
+
const { rangeString: y, isAbnormal: f } = Q(e), _ = K(e, d), $ = _ ? j(_) : null;
|
|
87
87
|
return /* @__PURE__ */ p(k, { children: [
|
|
88
88
|
/* @__PURE__ */ p(
|
|
89
89
|
"div",
|
|
@@ -95,21 +95,21 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
95
95
|
/* @__PURE__ */ p(
|
|
96
96
|
"p",
|
|
97
97
|
{
|
|
98
|
-
className:
|
|
98
|
+
className: A(
|
|
99
99
|
n.memberLabel,
|
|
100
100
|
f ? n.abnormalValue : ""
|
|
101
101
|
),
|
|
102
102
|
"data-testid": `${c}obs-member-label-${t}-${s}`,
|
|
103
103
|
children: [
|
|
104
104
|
t,
|
|
105
|
-
|
|
105
|
+
y
|
|
106
106
|
]
|
|
107
107
|
}
|
|
108
108
|
),
|
|
109
109
|
/* @__PURE__ */ o(
|
|
110
110
|
"div",
|
|
111
111
|
{
|
|
112
|
-
className:
|
|
112
|
+
className: A(
|
|
113
113
|
n.memberValue,
|
|
114
114
|
f ? n.abnormalValue : ""
|
|
115
115
|
),
|
|
@@ -139,7 +139,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
139
139
|
formName: s = "",
|
|
140
140
|
comment: a
|
|
141
141
|
}) => {
|
|
142
|
-
const { t: l } =
|
|
142
|
+
const { t: l } = M(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } = Q(e), c = s ? `${s}-` : "", y = K(e, l), f = y ? j(y) : null;
|
|
143
143
|
return /* @__PURE__ */ p(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
@@ -155,7 +155,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
155
155
|
/* @__PURE__ */ p(
|
|
156
156
|
"p",
|
|
157
157
|
{
|
|
158
|
-
className:
|
|
158
|
+
className: A(
|
|
159
159
|
d ? n.groupLabel : n.rowLabel,
|
|
160
160
|
!d && t ? n.abnormalValue : ""
|
|
161
161
|
),
|
|
@@ -172,7 +172,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
172
172
|
className: n.groupMembers,
|
|
173
173
|
"data-testid": `${c}observation-group-members-${e.display}-${r}`,
|
|
174
174
|
children: e.members?.map((_, $) => /* @__PURE__ */ o(
|
|
175
|
-
|
|
175
|
+
Z,
|
|
176
176
|
{
|
|
177
177
|
member: _,
|
|
178
178
|
depth: 0,
|
|
@@ -185,7 +185,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
185
185
|
) : /* @__PURE__ */ o(
|
|
186
186
|
"div",
|
|
187
187
|
{
|
|
188
|
-
className:
|
|
188
|
+
className: A(
|
|
189
189
|
n.rowValue,
|
|
190
190
|
t ? n.abnormalValue : ""
|
|
191
191
|
),
|
|
@@ -216,7 +216,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
216
216
|
)?.valueString : void 0, ke = (e) => {
|
|
217
217
|
if (e)
|
|
218
218
|
return e.note?.[0]?.text;
|
|
219
|
-
}, Ke = (e, r) => e.entry?.find((s) => s.resource?.id === r)?.resource,
|
|
219
|
+
}, Ke = (e, r) => e.entry?.find((s) => s.resource?.id === r)?.resource, O = (e, r) => {
|
|
220
220
|
const s = Ke(e, r);
|
|
221
221
|
return s ? {
|
|
222
222
|
formFieldPath: Pe(s),
|
|
@@ -228,74 +228,74 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
228
228
|
const s = fe(e);
|
|
229
229
|
return [
|
|
230
230
|
...s.observations.map((a) => {
|
|
231
|
-
const { formFieldPath: l, comment: d } =
|
|
231
|
+
const { formFieldPath: l, comment: d } = O(
|
|
232
232
|
e,
|
|
233
233
|
a.id
|
|
234
234
|
);
|
|
235
235
|
return { obs: a, formFieldPath: l, comment: d };
|
|
236
236
|
}),
|
|
237
237
|
...s.groupedObservations.flatMap((a) => {
|
|
238
|
-
const { formFieldPath: l } =
|
|
238
|
+
const { formFieldPath: l } = O(e, a.id);
|
|
239
239
|
return (a.members ?? []).map((d) => {
|
|
240
|
-
const { comment: b } =
|
|
240
|
+
const { comment: b } = O(e, d.id);
|
|
241
241
|
return { obs: d, formFieldPath: l, comment: b };
|
|
242
242
|
});
|
|
243
243
|
})
|
|
244
244
|
].filter(
|
|
245
245
|
({ formFieldPath: a }) => !a || a.includes(r)
|
|
246
246
|
);
|
|
247
|
-
},
|
|
247
|
+
}, Ye = ({
|
|
248
248
|
episodeOfCareUuids: e,
|
|
249
249
|
encounterUuids: r,
|
|
250
250
|
config: s
|
|
251
251
|
}) => {
|
|
252
|
-
const { t: a } =
|
|
252
|
+
const { t: a } = M(), l = ae(), [d, b] = P(!1), [t, c] = P(null), y = s?.numberOfVisits, f = te(
|
|
253
253
|
e,
|
|
254
254
|
r
|
|
255
|
-
), _ =
|
|
255
|
+
), _ = ve(), {
|
|
256
256
|
data: $ = [],
|
|
257
|
-
isLoading:
|
|
257
|
+
isLoading: v,
|
|
258
258
|
isError: N,
|
|
259
|
-
error:
|
|
260
|
-
refetch:
|
|
261
|
-
} =
|
|
259
|
+
error: z,
|
|
260
|
+
refetch: W
|
|
261
|
+
} = R({
|
|
262
262
|
queryKey: ["forms", l, e],
|
|
263
|
-
queryFn: () => oe(l, void 0,
|
|
263
|
+
queryFn: () => oe(l, void 0, y),
|
|
264
264
|
enabled: !!l && !f
|
|
265
265
|
}), T = h(() => !r || r.length === 0 ? $ : $.filter(
|
|
266
266
|
(m) => r.includes(m.encounterUuid)
|
|
267
|
-
), [$, r]), { data:
|
|
267
|
+
), [$, r]), { data: D = [] } = R({
|
|
268
268
|
queryKey: ["observationForms"],
|
|
269
269
|
queryFn: () => ne()
|
|
270
|
-
}),
|
|
271
|
-
(m) =>
|
|
272
|
-
[
|
|
273
|
-
),
|
|
270
|
+
}), S = C(
|
|
271
|
+
(m) => D.find((u) => u.name === m)?.uuid,
|
|
272
|
+
[D]
|
|
273
|
+
), F = h(() => {
|
|
274
274
|
if (t)
|
|
275
|
-
return
|
|
276
|
-
}, [t,
|
|
277
|
-
queryKey: ["formMetadata",
|
|
278
|
-
queryFn: () => se(
|
|
279
|
-
enabled: !!
|
|
275
|
+
return S(t.formName);
|
|
276
|
+
}, [t, S]), { isLoading: Y, error: x } = R({
|
|
277
|
+
queryKey: ["formMetadata", F],
|
|
278
|
+
queryFn: () => se(F),
|
|
279
|
+
enabled: !!F && d
|
|
280
280
|
}), {
|
|
281
|
-
data:
|
|
281
|
+
data: L,
|
|
282
282
|
isLoading: J,
|
|
283
|
-
error:
|
|
284
|
-
} =
|
|
283
|
+
error: V
|
|
284
|
+
} = R({
|
|
285
285
|
queryKey: ["formsEncounterFHIR", t?.encounterUuid],
|
|
286
286
|
queryFn: () => de(t.encounterUuid),
|
|
287
287
|
enabled: !!t?.encounterUuid && d
|
|
288
288
|
});
|
|
289
289
|
me(
|
|
290
290
|
(m) => {
|
|
291
|
-
m.patientUUID === l && m.updatedConcepts.size > 0 && (
|
|
291
|
+
m.patientUUID === l && m.updatedConcepts.size > 0 && (W(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
292
292
|
},
|
|
293
293
|
[l]
|
|
294
294
|
);
|
|
295
|
-
const
|
|
296
|
-
|
|
295
|
+
const w = h(() => !L || !t?.formName ? [] : je(
|
|
296
|
+
L,
|
|
297
297
|
t.formName
|
|
298
|
-
), [
|
|
298
|
+
), [L, t?.formName]), E = h(
|
|
299
299
|
() => [
|
|
300
300
|
{ key: "recordedOn", header: a("FORM_RECORDED_ON") },
|
|
301
301
|
{ key: "recordedBy", header: a("FORM_RECORDED_BY") }
|
|
@@ -332,34 +332,34 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
332
332
|
)
|
|
333
333
|
})
|
|
334
334
|
).sort((u, i) => u.formName.localeCompare(i.formName));
|
|
335
|
-
}, [T, a]),
|
|
335
|
+
}, [T, a]), U = C((m) => {
|
|
336
336
|
c(m), b(!0);
|
|
337
337
|
}, []), ee = C(() => {
|
|
338
338
|
b(!1), c(null);
|
|
339
|
-
}, []),
|
|
339
|
+
}, []), G = C(
|
|
340
340
|
(m, u) => {
|
|
341
341
|
switch (u) {
|
|
342
342
|
case "recordedOn":
|
|
343
|
-
return /* @__PURE__ */ o(le, { onClick: () =>
|
|
343
|
+
return /* @__PURE__ */ o(le, { onClick: () => U(m), children: m.recordedOn });
|
|
344
344
|
case "recordedBy":
|
|
345
345
|
return m.recordedBy;
|
|
346
346
|
default:
|
|
347
347
|
return null;
|
|
348
348
|
}
|
|
349
349
|
},
|
|
350
|
-
[
|
|
350
|
+
[U]
|
|
351
351
|
);
|
|
352
352
|
return /* @__PURE__ */ p(k, { children: [
|
|
353
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
354
|
-
|
|
353
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: v || N || B.length === 0 || f ? /* @__PURE__ */ o(
|
|
354
|
+
q,
|
|
355
355
|
{
|
|
356
|
-
headers:
|
|
356
|
+
headers: E,
|
|
357
357
|
ariaLabel: a("FORMS_HEADING"),
|
|
358
358
|
rows: [],
|
|
359
|
-
loading:
|
|
360
|
-
errorStateMessage: N ?
|
|
359
|
+
loading: v,
|
|
360
|
+
errorStateMessage: N ? z?.message : void 0,
|
|
361
361
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
362
|
-
renderCell:
|
|
362
|
+
renderCell: G,
|
|
363
363
|
className: n.formsTableBody,
|
|
364
364
|
dataTestId: "forms-table"
|
|
365
365
|
}
|
|
@@ -373,16 +373,16 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
373
373
|
testId: `accordian-title-${i}`,
|
|
374
374
|
open: u === 0,
|
|
375
375
|
children: /* @__PURE__ */ o(
|
|
376
|
-
|
|
376
|
+
q,
|
|
377
377
|
{
|
|
378
|
-
headers:
|
|
378
|
+
headers: E,
|
|
379
379
|
ariaLabel: a("FORMS_HEADING"),
|
|
380
380
|
rows: g,
|
|
381
381
|
loading: !1,
|
|
382
382
|
errorStateMessage: "",
|
|
383
383
|
sortable: X,
|
|
384
384
|
emptyStateMessage: a("FORMS_UNAVAILABLE"),
|
|
385
|
-
renderCell:
|
|
385
|
+
renderCell: G,
|
|
386
386
|
className: n.formsTableBody,
|
|
387
387
|
dataTestId: `forms-table-${i}`
|
|
388
388
|
}
|
|
@@ -403,7 +403,7 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
403
403
|
passiveModal: !0,
|
|
404
404
|
size: "md",
|
|
405
405
|
testId: "form-details-modal",
|
|
406
|
-
children: /* @__PURE__ */ o("div", { className: n.formContent, children:
|
|
406
|
+
children: /* @__PURE__ */ o("div", { className: n.formContent, children: Y || J ? /* @__PURE__ */ o(pe, { width: "100%", lineCount: 3 }) : x ? /* @__PURE__ */ o("div", { children: H(x).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : V ? /* @__PURE__ */ o("div", { children: H(V).message ?? a("ERROR_FETCHING_FORM_DATA") }) : w.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: w.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
|
|
407
407
|
He,
|
|
408
408
|
{
|
|
409
409
|
observation: m,
|
|
@@ -418,5 +418,5 @@ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce =
|
|
|
418
418
|
] });
|
|
419
419
|
};
|
|
420
420
|
export {
|
|
421
|
-
|
|
421
|
+
Ye as default
|
|
422
422
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as
|
|
2
|
-
import {
|
|
3
|
-
var
|
|
1
|
+
import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-CJd8VmsU.js";
|
|
2
|
+
import { m as d, q as f, v as e } from "./index-C3hZcbfn.js";
|
|
3
|
+
var p = (a) => {
|
|
4
4
|
const [r, t] = c({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
6
|
-
}), n =
|
|
6
|
+
}), n = d(), s = f(() => {
|
|
7
7
|
const o = r.theme_preference || l;
|
|
8
8
|
return o !== "system" ? o : n();
|
|
9
9
|
});
|
|
@@ -14,10 +14,10 @@ var f = (a) => {
|
|
|
14
14
|
localStore: r,
|
|
15
15
|
setLocalStore: t,
|
|
16
16
|
get children() {
|
|
17
|
-
return e(
|
|
17
|
+
return e(v.Provider, {
|
|
18
18
|
value: s,
|
|
19
19
|
get children() {
|
|
20
|
-
return e(
|
|
20
|
+
return e(u, {
|
|
21
21
|
localStore: r,
|
|
22
22
|
setLocalStore: t
|
|
23
23
|
});
|
|
@@ -27,7 +27,7 @@ var f = (a) => {
|
|
|
27
27
|
});
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
|
-
}, C =
|
|
30
|
+
}, C = p;
|
|
31
31
|
export {
|
|
32
32
|
C as default
|
|
33
33
|
};
|
|
@@ -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-
|
|
2
|
-
import {
|
|
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-CJd8VmsU.js";
|
|
2
|
+
import { m as v, q as C, v as e } from "./index-C3hZcbfn.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -36,7 +36,7 @@ var h = (t) => {
|
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
-
},
|
|
39
|
+
}, p = h;
|
|
40
40
|
export {
|
|
41
|
-
|
|
41
|
+
p as default
|
|
42
42
|
};
|