@bahmni/widgets 0.0.1-dev.199 → 0.0.1-dev.202
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-CBUv3up-.js → DocumentsTable-DOeNKrdl.js} +23 -23
- package/dist/{FormsTable-BPlObDZf.js → FormsTable-DnubypOq.js} +30 -30
- package/dist/{Observations-DrzS68CL.js → Observations-BjhWa-1M.js} +13 -13
- package/dist/{index-C8-cHHbW.js → index-juFovBb5.js} +11287 -11188
- package/dist/index.js +6 -6
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as s, jsxs as l, Fragment as k } from "react/jsx-runtime";
|
|
2
|
-
import { u as V, a as H,
|
|
3
|
-
import { useQuery as
|
|
4
|
-
import { useState as C, useCallback as E, useEffect as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
documentsTableBody:
|
|
2
|
+
import { u as V, a as H, v as P, F as q, W as z, c as G, y as W } from "./index-juFovBb5.js";
|
|
3
|
+
import { useQuery as Y } from "@tanstack/react-query";
|
|
4
|
+
import { useState as C, useCallback as E, useEffect as L, useMemo as f } from "react";
|
|
5
|
+
import { useTranslation as K } from "react-i18next";
|
|
6
|
+
const Q = "_documentsTableBody_1voj8_1", X = "_viewAttachmentsLink_1voj8_11", J = "_documentViewerContainer_1voj8_15", Z = "_attachmentItem_1voj8_23", x = "_attachmentCounter_1voj8_27", ee = "_attachmentError_1voj8_36", te = "_documentIframe_1voj8_44", ne = "_documentImage_1voj8_50", c = {
|
|
7
|
+
documentsTableBody: Q,
|
|
8
8
|
viewAttachmentsLink: X,
|
|
9
9
|
documentViewerContainer: J,
|
|
10
10
|
attachmentItem: Z,
|
|
@@ -19,7 +19,7 @@ const W = "_documentsTableBody_1voj8_1", X = "_viewAttachmentsLink_1voj8_11", J
|
|
|
19
19
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
20
20
|
action: "DOCUMENTS_ACTION"
|
|
21
21
|
};
|
|
22
|
-
function
|
|
22
|
+
function M(t) {
|
|
23
23
|
return !t || t.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${t}`;
|
|
24
24
|
}
|
|
25
25
|
function oe(t, u) {
|
|
@@ -34,35 +34,35 @@ const re = [
|
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy",
|
|
36
36
|
"action"
|
|
37
|
-
], se = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i,
|
|
37
|
+
], se = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, U = (t) => t.attachments.length > 0 ? t.attachments : t.documentUrl ? [{ url: t.documentUrl, contentType: t.contentType }] : [], ue = ({ config: t, encounterUuids: u }) => {
|
|
38
38
|
const [d, g] = C(!1), [a, O] = C(
|
|
39
39
|
null
|
|
40
40
|
), [w, T] = C(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), p = V(), { t: n } =
|
|
42
|
+
), p = V(), { t: n } = K(), { addNotification: y } = H(), S = E((e) => {
|
|
43
43
|
O(e), g(!0);
|
|
44
44
|
}, []), b = E(() => {
|
|
45
45
|
g(!1), O(null), T(/* @__PURE__ */ new Set());
|
|
46
|
-
}, []),
|
|
46
|
+
}, []), v = E((e) => {
|
|
47
47
|
T((o) => new Set(o).add(e));
|
|
48
|
-
}, []), { data: B, isLoading:
|
|
48
|
+
}, []), { data: B, isLoading: j, isError: I, error: A } = Y({
|
|
49
49
|
queryKey: ["documents", p, u],
|
|
50
50
|
enabled: !!p,
|
|
51
51
|
queryFn: () => P(p, u)
|
|
52
52
|
});
|
|
53
|
-
|
|
53
|
+
L(() => {
|
|
54
54
|
I && y({
|
|
55
55
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
56
56
|
message: A?.message ?? "",
|
|
57
57
|
type: "error"
|
|
58
58
|
});
|
|
59
|
-
}, [I, A, y, n]),
|
|
59
|
+
}, [I, A, y, n]), L(() => {
|
|
60
60
|
const e = new AbortController();
|
|
61
61
|
return (async () => {
|
|
62
62
|
if (!d || !a) return;
|
|
63
|
-
const r = /* @__PURE__ */ new Set(), _ =
|
|
63
|
+
const r = /* @__PURE__ */ new Set(), _ = U(a);
|
|
64
64
|
for (let m = 0; m < _.length; m++) {
|
|
65
|
-
const N =
|
|
65
|
+
const N = M(_[m].url);
|
|
66
66
|
try {
|
|
67
67
|
(await fetch(N, {
|
|
68
68
|
method: "HEAD",
|
|
@@ -78,14 +78,14 @@ const re = [
|
|
|
78
78
|
const h = f(
|
|
79
79
|
() => t?.fields ?? re,
|
|
80
80
|
[t?.fields]
|
|
81
|
-
),
|
|
81
|
+
), F = f(() => oe(h, n), [h, n]), R = f(
|
|
82
82
|
() => h.map((e) => ({
|
|
83
83
|
key: e,
|
|
84
84
|
sortable: e !== "action"
|
|
85
85
|
})),
|
|
86
86
|
[h]
|
|
87
87
|
), i = f(
|
|
88
|
-
() => a ?
|
|
88
|
+
() => a ? U(a) : [],
|
|
89
89
|
[a]
|
|
90
90
|
), $ = E(
|
|
91
91
|
(e, o) => {
|
|
@@ -122,10 +122,10 @@ const re = [
|
|
|
122
122
|
/* @__PURE__ */ s("div", { "data-testid": "documents-table", children: /* @__PURE__ */ s(
|
|
123
123
|
G,
|
|
124
124
|
{
|
|
125
|
-
headers:
|
|
125
|
+
headers: F,
|
|
126
126
|
ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
|
|
127
127
|
rows: B ?? [],
|
|
128
|
-
loading:
|
|
128
|
+
loading: j,
|
|
129
129
|
errorStateMessage: I ? A?.message : null,
|
|
130
130
|
sortable: R,
|
|
131
131
|
emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
|
|
@@ -135,7 +135,7 @@ const re = [
|
|
|
135
135
|
}
|
|
136
136
|
) }),
|
|
137
137
|
d && a && /* @__PURE__ */ s(
|
|
138
|
-
|
|
138
|
+
W,
|
|
139
139
|
{
|
|
140
140
|
id: "modalIdForActionAreaLayout",
|
|
141
141
|
portalId: "main-display-area",
|
|
@@ -146,7 +146,7 @@ const re = [
|
|
|
146
146
|
size: "lg",
|
|
147
147
|
testId: "document-view-modal",
|
|
148
148
|
children: /* @__PURE__ */ s("div", { className: c.documentViewerContainer, children: i.map((e, o) => {
|
|
149
|
-
const r =
|
|
149
|
+
const r = M(e.url), _ = e.contentType?.toLowerCase().includes("pdf"), m = (e.contentType?.toLowerCase().includes("image") ?? !1) || se.test(e.url ?? ""), N = w.has(o);
|
|
150
150
|
return r === "#" || N ? /* @__PURE__ */ l(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
@@ -179,7 +179,7 @@ const re = [
|
|
|
179
179
|
src: r,
|
|
180
180
|
alt: a.documentIdentifier,
|
|
181
181
|
className: c.documentImage,
|
|
182
|
-
onError: () =>
|
|
182
|
+
onError: () => v(o)
|
|
183
183
|
}
|
|
184
184
|
) : /* @__PURE__ */ s(
|
|
185
185
|
"iframe",
|
|
@@ -187,7 +187,7 @@ const re = [
|
|
|
187
187
|
src: _ ? `${r}#toolbar=0` : r,
|
|
188
188
|
className: c.documentIframe,
|
|
189
189
|
title: a.documentIdentifier,
|
|
190
|
-
onError: () =>
|
|
190
|
+
onError: () => v(o)
|
|
191
191
|
}
|
|
192
192
|
)
|
|
193
193
|
]
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as b, jsx as o, Fragment as j } from "react/jsx-runtime";
|
|
2
|
-
import { f as K,
|
|
3
|
-
import { useQueryClient as
|
|
2
|
+
import { f as K, b as R, d as ae, r as oe, o as se, e as ne, g as de, h as ie, u as le, J as ce, s as me, i as ue, n as pe, j as be, k as fe, W as _e, F as ye, c as P, l as he, m as $e, y as ge, D as ve, R as k } from "./index-juFovBb5.js";
|
|
3
|
+
import { useQueryClient as Ne, useQuery as O } from "@tanstack/react-query";
|
|
4
4
|
import { useState as H, useMemo as g, useCallback as L } from "react";
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Me = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", De = "_rowContainer_1pd36_43",
|
|
5
|
+
import { useTranslation as V } from "react-i18next";
|
|
6
|
+
const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Me = "_observation_1pd36_30", Ce = "_groupContainer_1pd36_39", De = "_rowContainer_1pd36_43", Te = "_groupLabel_1pd36_48", Ve = "_rowLabel_1pd36_58", we = "_rowValue_1pd36_67", Ie = "_groupMembers_1pd36_75", Ee = "_memberRow_1pd36_81", Be = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Ge = "_abnormalValue_1pd36_102", Se = "_commentSection_1pd36_110", qe = "_commentText_1pd36_116", Ue = "_nestedGroup_1pd36_125", xe = "_nestedGroupLabel_1pd36_132", Pe = "_nestedGroupMembers_1pd36_141", s = {
|
|
7
7
|
formsTableBody: Fe,
|
|
8
8
|
customAccordianItem: Oe,
|
|
9
9
|
formContent: Le,
|
|
@@ -11,8 +11,8 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
11
11
|
observation: Me,
|
|
12
12
|
groupContainer: Ce,
|
|
13
13
|
rowContainer: De,
|
|
14
|
-
groupLabel:
|
|
15
|
-
rowLabel:
|
|
14
|
+
groupLabel: Te,
|
|
15
|
+
rowLabel: Ve,
|
|
16
16
|
rowValue: we,
|
|
17
17
|
groupMembers: Ie,
|
|
18
18
|
memberRow: Ee,
|
|
@@ -40,14 +40,14 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
40
40
|
n && d ? i = ` (${r} - ${a})` : n ? i = ` (>${r})` : d && (i = ` (<${a})`);
|
|
41
41
|
const u = e.observationValue?.isAbnormal === !0;
|
|
42
42
|
return { rangeString: i, isAbnormal: u };
|
|
43
|
-
},
|
|
43
|
+
}, z = ({
|
|
44
44
|
member: e,
|
|
45
45
|
depth: r = 0,
|
|
46
46
|
memberIndex: a = 0,
|
|
47
47
|
formName: n = "",
|
|
48
48
|
comment: d
|
|
49
49
|
}) => {
|
|
50
|
-
const { t: i } =
|
|
50
|
+
const { t: i } = V(), u = e.members && e.members.length > 0, t = e.display, c = n ? `${n}-` : "";
|
|
51
51
|
if (u)
|
|
52
52
|
return /* @__PURE__ */ b(
|
|
53
53
|
"div",
|
|
@@ -69,15 +69,15 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
69
69
|
{
|
|
70
70
|
className: s.nestedGroupMembers,
|
|
71
71
|
"data-testid": `${c}obs-nested-group-members-${t}-${a}`,
|
|
72
|
-
children: e.members?.map((
|
|
73
|
-
|
|
72
|
+
children: e.members?.map((v, N) => /* @__PURE__ */ o(
|
|
73
|
+
z,
|
|
74
74
|
{
|
|
75
|
-
member:
|
|
75
|
+
member: v,
|
|
76
76
|
depth: r + 1,
|
|
77
|
-
memberIndex:
|
|
77
|
+
memberIndex: N,
|
|
78
78
|
formName: n
|
|
79
79
|
},
|
|
80
|
-
`${
|
|
80
|
+
`${v.id}`
|
|
81
81
|
))
|
|
82
82
|
}
|
|
83
83
|
)
|
|
@@ -140,7 +140,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
140
140
|
formName: a = "",
|
|
141
141
|
comment: n
|
|
142
142
|
}) => {
|
|
143
|
-
const { t: d } =
|
|
143
|
+
const { t: d } = V(), i = e.members && e.members.length > 0, { rangeString: u, isAbnormal: t } = Q(e), c = a ? `${a}-` : "", $ = K(e, d), f = $ ? W($) : null;
|
|
144
144
|
return /* @__PURE__ */ b(
|
|
145
145
|
"div",
|
|
146
146
|
{
|
|
@@ -173,7 +173,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
173
173
|
className: s.groupMembers,
|
|
174
174
|
"data-testid": `${c}observation-group-members-${e.display}-${r}`,
|
|
175
175
|
children: e.members?.map((_, y) => /* @__PURE__ */ o(
|
|
176
|
-
|
|
176
|
+
z,
|
|
177
177
|
{
|
|
178
178
|
member: _,
|
|
179
179
|
depth: 0,
|
|
@@ -217,7 +217,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
217
217
|
)?.valueString : void 0, je = (e) => {
|
|
218
218
|
if (e)
|
|
219
219
|
return e.note?.[0]?.text;
|
|
220
|
-
}, Ke = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource,
|
|
220
|
+
}, Ke = (e, r) => e.entry?.find((a) => a.resource?.id === r)?.resource, T = (e, r) => {
|
|
221
221
|
const a = Ke(e, r);
|
|
222
222
|
return a ? {
|
|
223
223
|
formFieldPath: He(a),
|
|
@@ -229,16 +229,16 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
229
229
|
const a = de(e);
|
|
230
230
|
return [
|
|
231
231
|
...a.observations.map((d) => {
|
|
232
|
-
const { formFieldPath: i, comment: u } =
|
|
232
|
+
const { formFieldPath: i, comment: u } = T(
|
|
233
233
|
e,
|
|
234
234
|
d.id
|
|
235
235
|
);
|
|
236
236
|
return { obs: d, formFieldPath: i, comment: u };
|
|
237
237
|
}),
|
|
238
238
|
...a.groupedObservations.flatMap((d) => {
|
|
239
|
-
const { formFieldPath: i } =
|
|
239
|
+
const { formFieldPath: i } = T(e, d.id);
|
|
240
240
|
return (d.members ?? []).map((u) => {
|
|
241
|
-
const { comment: t } =
|
|
241
|
+
const { comment: t } = T(e, u.id);
|
|
242
242
|
return { obs: u, formFieldPath: i, comment: t };
|
|
243
243
|
});
|
|
244
244
|
})
|
|
@@ -250,15 +250,15 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
250
250
|
encounterUuids: r,
|
|
251
251
|
config: a
|
|
252
252
|
}) => {
|
|
253
|
-
const { t: n } =
|
|
253
|
+
const { t: n } = V(), d = le(), [i, u] = H(!1), [t, c] = H(null), $ = a?.numberOfVisits, f = ce(
|
|
254
254
|
e,
|
|
255
255
|
r
|
|
256
|
-
), _ =
|
|
256
|
+
), _ = Ne(), {
|
|
257
257
|
data: y = [],
|
|
258
|
-
isLoading:
|
|
259
|
-
isError:
|
|
260
|
-
error:
|
|
261
|
-
refetch:
|
|
258
|
+
isLoading: v,
|
|
259
|
+
isError: N,
|
|
260
|
+
error: J,
|
|
261
|
+
refetch: Y
|
|
262
262
|
} = O({
|
|
263
263
|
queryKey: ["forms", d, e],
|
|
264
264
|
queryFn: () => me(d, void 0, $),
|
|
@@ -289,7 +289,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
289
289
|
});
|
|
290
290
|
fe(
|
|
291
291
|
(l) => {
|
|
292
|
-
l.patientUUID === d && l.updatedConcepts.size > 0 && (
|
|
292
|
+
l.patientUUID === d && l.updatedConcepts.size > 0 && (Y(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
293
293
|
},
|
|
294
294
|
[d]
|
|
295
295
|
);
|
|
@@ -351,14 +351,14 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
351
351
|
[U]
|
|
352
352
|
);
|
|
353
353
|
return /* @__PURE__ */ b(j, { children: [
|
|
354
|
-
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children:
|
|
354
|
+
/* @__PURE__ */ o("div", { "data-testid": "forms-table", children: v || N || q.length === 0 || f ? /* @__PURE__ */ o(
|
|
355
355
|
P,
|
|
356
356
|
{
|
|
357
357
|
headers: S,
|
|
358
358
|
ariaLabel: n("FORMS_HEADING"),
|
|
359
359
|
rows: [],
|
|
360
|
-
loading:
|
|
361
|
-
errorStateMessage:
|
|
360
|
+
loading: v,
|
|
361
|
+
errorStateMessage: N ? J?.message : void 0,
|
|
362
362
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
363
363
|
renderCell: x,
|
|
364
364
|
className: s.formsTableBody,
|
|
@@ -404,7 +404,7 @@ const Fe = "_formsTableBody_1pd36_1", Oe = "_customAccordianItem_1pd36_6", Le =
|
|
|
404
404
|
passiveModal: !0,
|
|
405
405
|
size: "md",
|
|
406
406
|
testId: "form-details-modal",
|
|
407
|
-
children: /* @__PURE__ */ o("div", { className: s.formContent, children: X || Z ? /* @__PURE__ */ o(
|
|
407
|
+
children: /* @__PURE__ */ o("div", { className: s.formContent, children: X || Z ? /* @__PURE__ */ o(ve, { width: "100%", lineCount: 3 }) : B ? /* @__PURE__ */ o("div", { children: k(B).message ?? n("ERROR_FETCHING_FORM_METADATA") }) : A ? /* @__PURE__ */ o("div", { children: k(A).message ?? n("ERROR_FETCHING_FORM_DATA") }) : G.length > 0 ? /* @__PURE__ */ o("div", { className: s.formDetailsContainer, children: G.map(({ obs: l, comment: h }, m) => /* @__PURE__ */ o(
|
|
408
408
|
ke,
|
|
409
409
|
{
|
|
410
410
|
observation: l,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
-
import { p as
|
|
2
|
+
import { p as q, q as C, t as M, d as V, w, r as G, o as K, e as Q, u as P, a as H, x as j, G as z, k as J, g as Y, z as W, A as X, B as Z, c as x } from "./index-juFovBb5.js";
|
|
3
3
|
import { useQueries as ee, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as $, useMemo as
|
|
4
|
+
import { useRef as se, useEffect as $, useMemo as h } from "react";
|
|
5
5
|
import { useTranslation as D } from "react-i18next";
|
|
6
6
|
const U = (t, c, i, l, r) => {
|
|
7
7
|
const s = M(t, c, r), o = s.value, a = V(o);
|
|
8
8
|
let n = o;
|
|
9
|
-
a === "Image" && (n = /* @__PURE__ */ d(
|
|
9
|
+
a === "Image" && (n = /* @__PURE__ */ d(G, { imageSrc: o, alt: o, id: `${o}-img` })), a === "Video" && (n = /* @__PURE__ */ d(K, { id: `${o}-video`, videoSrc: o })), a === "PDF" && (n = /* @__PURE__ */ d(Q, { id: `${o}-pdf`, src: o }));
|
|
10
10
|
const u = r("OBSERVATIONS_RECORDED_BY", {
|
|
11
11
|
provider: s.provider
|
|
12
12
|
}), b = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", f = l ? `${l}-${p}-${b}-${i}-${c}` : `${p}-${b}-${i}-${c}`;
|
|
@@ -38,7 +38,7 @@ const U = (t, c, i, l, r) => {
|
|
|
38
38
|
title: c = ""
|
|
39
39
|
}) => {
|
|
40
40
|
const { t: i } = D(), l = (r, s, o) => {
|
|
41
|
-
const a =
|
|
41
|
+
const a = q(r.encounterDetails, i);
|
|
42
42
|
return /* @__PURE__ */ S(
|
|
43
43
|
C,
|
|
44
44
|
{
|
|
@@ -98,7 +98,7 @@ const U = (t, c, i, l, r) => {
|
|
|
98
98
|
} else e.isError || r.current.delete(m);
|
|
99
99
|
});
|
|
100
100
|
}, [n, i]);
|
|
101
|
-
const u =
|
|
101
|
+
const u = h(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), b = h(() => [.../* @__PURE__ */ new Set([...u, ...l])], [u, l]), v = h(() => i.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, i.length]), {
|
|
102
102
|
data: p,
|
|
103
103
|
isLoading: f,
|
|
104
104
|
isError: g,
|
|
@@ -108,7 +108,7 @@ const U = (t, c, i, l, r) => {
|
|
|
108
108
|
queryFn: () => z(s, b),
|
|
109
109
|
enabled: !!s && b.length > 0 && v
|
|
110
110
|
});
|
|
111
|
-
|
|
111
|
+
J(
|
|
112
112
|
(e) => {
|
|
113
113
|
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
114
114
|
(O) => b.includes(O)
|
|
@@ -122,20 +122,20 @@ const U = (t, c, i, l, r) => {
|
|
|
122
122
|
type: "error"
|
|
123
123
|
});
|
|
124
124
|
}, [g]);
|
|
125
|
-
const T =
|
|
125
|
+
const T = h(() => {
|
|
126
126
|
if (!p) return [];
|
|
127
|
-
const e =
|
|
128
|
-
return
|
|
127
|
+
const e = Y(p), m = W(e);
|
|
128
|
+
return X(m);
|
|
129
129
|
}, [p]), B = [
|
|
130
130
|
{ key: "name", header: "name" },
|
|
131
131
|
{ key: "value", header: "value" },
|
|
132
132
|
{ key: "form", header: "form" }
|
|
133
|
-
], I = f || !v, _ = g && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0,
|
|
133
|
+
], I = f || !v, _ = g && v, A = (!p || p.entry?.length === 0 || b.length === 0) && v, F = _ ? a("ERROR_FETCHING_OBSERVATIONS") : null, L = A ? a("NO_OBSERVATIONS_FOUND") : void 0, k = T.length > 0 && !I && !_, E = c.titleTranslationKey, y = E ? a(E) : "";
|
|
134
134
|
return /* @__PURE__ */ S(
|
|
135
135
|
"div",
|
|
136
136
|
{
|
|
137
137
|
id: "observations",
|
|
138
|
-
"data-testid":
|
|
138
|
+
"data-testid": E ? `observations-${y}` : "observations",
|
|
139
139
|
"aria-label": "observations-aria-label",
|
|
140
140
|
className: N.observations,
|
|
141
141
|
children: [
|
|
@@ -143,13 +143,13 @@ const U = (t, c, i, l, r) => {
|
|
|
143
143
|
Z,
|
|
144
144
|
{
|
|
145
145
|
id: "observations-title",
|
|
146
|
-
testId:
|
|
146
|
+
testId: E ? `observations-title-${y}` : "observations-title",
|
|
147
147
|
title: y,
|
|
148
148
|
className: N.title,
|
|
149
149
|
children: /* @__PURE__ */ d("p", { children: y })
|
|
150
150
|
}
|
|
151
151
|
),
|
|
152
|
-
|
|
152
|
+
k ? /* @__PURE__ */ d(re, { groupedData: T, title: y }) : /* @__PURE__ */ d(
|
|
153
153
|
x,
|
|
154
154
|
{
|
|
155
155
|
headers: B,
|