@bahmni/widgets 0.0.1-dev.375 → 0.0.1-dev.376
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-ByMt-J_k.js → DocumentsTable-D7SsafU9.js} +4 -4
- package/dist/{FormsTable-BaBa6xv8.js → FormsTable-BQrmyOQB.js} +69 -69
- package/dist/{Observations-C8HEAJY4.js → Observations-CFwo78dR.js} +24 -24
- package/dist/{index-BuzazPX_.js → index-D6eQA2wz.js} +9036 -8990
- package/dist/index.js +15 -15
- package/dist/patientPrograms/PatientProgramsTable.d.ts.map +1 -1
- package/dist/patientPrograms/constants.d.ts +1 -0
- package/dist/patientPrograms/constants.d.ts.map +1 -1
- package/dist/patientPrograms/model.d.ts +1 -0
- package/dist/patientPrograms/model.d.ts.map +1 -1
- package/dist/patientPrograms/utils.d.ts +3 -2
- package/dist/patientPrograms/utils.d.ts.map +1 -1
- package/dist/programDetails/ProgramDetails.d.ts.map +1 -1
- package/dist/programDetails/constants.d.ts +1 -0
- package/dist/programDetails/constants.d.ts.map +1 -1
- package/dist/programDetails/model.d.ts +1 -0
- package/dist/programDetails/model.d.ts.map +1 -1
- package/dist/programDetails/utils.d.ts +2 -1
- package/dist/programDetails/utils.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
-
import { u as W, a as X,
|
|
2
|
+
import { u as W, a as X, T as J, P as Z, k as x, q as ee, F as te } from "./index-D6eQA2wz.js";
|
|
3
3
|
import { useQuery as ne } from "@tanstack/react-query";
|
|
4
4
|
import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
|
|
5
5
|
import { useTranslation as ae } from "react-i18next";
|
|
@@ -39,7 +39,7 @@ const Te = [
|
|
|
39
39
|
null
|
|
40
40
|
), [P, A] = l(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), E = W(), { t: o } = ae(), { addNotification: w } = X(),
|
|
42
|
+
), E = W(), { t: o } = ae(), { addNotification: w } = X(), k = Number(n?.pageSize) || 5, [N, C] = l(1), [u, V] = l(k), [$, O] = l(void 0), v = _((e) => {
|
|
43
43
|
U(e), L(!0);
|
|
44
44
|
}, []), H = _(() => {
|
|
45
45
|
L(!1), U(null), A(/* @__PURE__ */ new Set());
|
|
@@ -92,7 +92,7 @@ const Te = [
|
|
|
92
92
|
}, [d, s]);
|
|
93
93
|
const z = _(
|
|
94
94
|
(e, t) => {
|
|
95
|
-
t !== u ? (
|
|
95
|
+
t !== u ? (V(t), C(1), O(void 0)) : C(e);
|
|
96
96
|
},
|
|
97
97
|
[u]
|
|
98
98
|
), D = p(
|
|
@@ -153,7 +153,7 @@ const Te = [
|
|
|
153
153
|
className: c.documentsTableBody,
|
|
154
154
|
dataTestId: "documents-table",
|
|
155
155
|
pageSize: u,
|
|
156
|
-
totalItems:
|
|
156
|
+
totalItems: $,
|
|
157
157
|
page: N,
|
|
158
158
|
onPageChange: z
|
|
159
159
|
}
|
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
import { jsx as i, jsxs as
|
|
2
|
-
import { u as be, b as Oe, c as Ne,
|
|
3
|
-
import { useQueryClient as
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
formsTableBody:
|
|
1
|
+
import { jsx as i, jsxs as x, Fragment as ge } from "react/jsx-runtime";
|
|
2
|
+
import { u as be, b as Oe, c as Ne, r as Ee, e as Te, Q as Fe, X as ve, L as Ie, m as _e, d as Ae, f as Re, Y as z, k as De, i as G, $ as K, P as Me, q as Q, g as Le, R as Se, F as Be, O as Ce, C as ke } from "./index-D6eQA2wz.js";
|
|
3
|
+
import { useQueryClient as Ue, useQuery as E } from "@tanstack/react-query";
|
|
4
|
+
import { useState as Y, useMemo as d, useCallback as c } from "react";
|
|
5
|
+
import { useTranslation as we } from "react-i18next";
|
|
6
|
+
const He = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", Pe = "FormsTable-module_customAccordianItem__isszs", T = {
|
|
7
|
+
formsTableBody: He,
|
|
8
8
|
modalHeading: qe,
|
|
9
9
|
customAccordianItem: Pe
|
|
10
10
|
}, Ve = "startConsultation", Ke = ({
|
|
11
11
|
episodeOfCareUuids: D,
|
|
12
12
|
encounterUuids: m,
|
|
13
|
-
config:
|
|
14
|
-
disableActions:
|
|
13
|
+
config: X,
|
|
14
|
+
disableActions: W = !1,
|
|
15
15
|
activeEncounterUuid: y = null
|
|
16
16
|
}) => {
|
|
17
|
-
const { t: n } =
|
|
18
|
-
numberOfVisits:
|
|
17
|
+
const { t: n } = we(), u = be(), [g, M] = Y(!1), [a, L] = Y(null), {
|
|
18
|
+
numberOfVisits: J,
|
|
19
19
|
hideThumbnail: Z = !1,
|
|
20
20
|
forms: b
|
|
21
|
-
} =
|
|
22
|
-
|
|
23
|
-
), { userPrivileges: O } = Ne(), F = ee && !
|
|
21
|
+
} = X ?? {}, ee = Oe(
|
|
22
|
+
ke.EDIT_OBSERVATIONS
|
|
23
|
+
), { userPrivileges: O } = Ne(), F = ee && !W && !!y, S = Ee(
|
|
24
24
|
D,
|
|
25
25
|
m
|
|
26
|
-
), re =
|
|
27
|
-
data:
|
|
28
|
-
isLoading:
|
|
29
|
-
isError:
|
|
26
|
+
), re = Ue(), {
|
|
27
|
+
data: B = [],
|
|
28
|
+
isLoading: C,
|
|
29
|
+
isError: k,
|
|
30
30
|
error: te,
|
|
31
31
|
refetch: oe
|
|
32
32
|
} = E({
|
|
33
33
|
queryKey: ["forms", u, D],
|
|
34
|
-
queryFn: () => Te(u, void 0,
|
|
35
|
-
enabled: !!u && !
|
|
36
|
-
}),
|
|
37
|
-
let e =
|
|
34
|
+
queryFn: () => Te(u, void 0, J),
|
|
35
|
+
enabled: !!u && !S
|
|
36
|
+
}), U = d(() => {
|
|
37
|
+
let e = B;
|
|
38
38
|
return m && m.length > 0 && (e = e.filter(
|
|
39
39
|
(r) => m.includes(r.encounterUuid)
|
|
40
40
|
)), Array.isArray(b) && b.length > 0 && (e = e.filter(
|
|
41
41
|
(r) => b.some((o) => o.toLowerCase() === r.formName.toLowerCase())
|
|
42
42
|
)), e;
|
|
43
|
-
}, [
|
|
43
|
+
}, [B, m, b]), { data: N = [] } = E({
|
|
44
44
|
queryKey: ["observationForms"],
|
|
45
45
|
queryFn: () => Fe()
|
|
46
|
-
}),
|
|
46
|
+
}), w = c(
|
|
47
47
|
(e) => {
|
|
48
48
|
const r = N.find((t) => t.name === e);
|
|
49
49
|
if (!r?.privileges || r.privileges.length === 0) return !0;
|
|
@@ -55,23 +55,23 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
55
55
|
},
|
|
56
56
|
[N, O]
|
|
57
57
|
), f = c(
|
|
58
|
-
(e) => !y || e.encounterUuid !== y ? !1 :
|
|
59
|
-
[y,
|
|
60
|
-
),
|
|
58
|
+
(e) => !y || e.encounterUuid !== y ? !1 : w(e.formName),
|
|
59
|
+
[y, w]
|
|
60
|
+
), H = c(
|
|
61
61
|
(e) => N.find((o) => o.name === e)?.uuid,
|
|
62
62
|
[N]
|
|
63
|
-
),
|
|
63
|
+
), v = d(() => {
|
|
64
64
|
if (a)
|
|
65
|
-
return
|
|
66
|
-
}, [a,
|
|
65
|
+
return H(a.formName);
|
|
66
|
+
}, [a, H]), {
|
|
67
67
|
data: l,
|
|
68
68
|
isLoading: se,
|
|
69
69
|
isError: ae,
|
|
70
|
-
error:
|
|
70
|
+
error: I
|
|
71
71
|
} = E({
|
|
72
|
-
queryKey: ["formMetadata",
|
|
73
|
-
queryFn: () =>
|
|
74
|
-
enabled: !!
|
|
72
|
+
queryKey: ["formMetadata", v],
|
|
73
|
+
queryFn: () => ve(v),
|
|
74
|
+
enabled: !!v && g
|
|
75
75
|
}), {
|
|
76
76
|
data: _,
|
|
77
77
|
isLoading: ne,
|
|
@@ -79,7 +79,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
79
79
|
error: A
|
|
80
80
|
} = E({
|
|
81
81
|
queryKey: ["formsEncounterFHIR", a?.encounterUuid],
|
|
82
|
-
queryFn: () =>
|
|
82
|
+
queryFn: () => Ie(a.encounterUuid),
|
|
83
83
|
enabled: !!a?.encounterUuid && g
|
|
84
84
|
});
|
|
85
85
|
_e(
|
|
@@ -104,8 +104,8 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
104
104
|
const e = {}, r = (o, t) => {
|
|
105
105
|
for (const s of o)
|
|
106
106
|
if (s.type === "section") {
|
|
107
|
-
const
|
|
108
|
-
r(s.controls ?? [],
|
|
107
|
+
const p = s.label?.value ?? "Section";
|
|
108
|
+
r(s.controls ?? [], p);
|
|
109
109
|
} else
|
|
110
110
|
s.id != null && t && (e[String(s.id)] = t), s.controls && r(s.controls, t);
|
|
111
111
|
};
|
|
@@ -125,39 +125,39 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
125
125
|
l.schema.controls ?? []
|
|
126
126
|
), Object.keys(e).length > 0 ? e : void 0;
|
|
127
127
|
}, [l]), ue = d(() => {
|
|
128
|
-
if (
|
|
129
|
-
return z(
|
|
128
|
+
if (I)
|
|
129
|
+
return z(I).message;
|
|
130
130
|
if (A)
|
|
131
131
|
return z(A).message;
|
|
132
|
-
}, [
|
|
132
|
+
}, [I, A]), h = d(
|
|
133
133
|
() => [
|
|
134
134
|
{ key: "recordedOn", header: n("RECORDED_ON") },
|
|
135
135
|
{ key: "recordedBy", header: n("RECORDED_BY") }
|
|
136
136
|
],
|
|
137
137
|
[n]
|
|
138
138
|
), q = d(
|
|
139
|
-
() => [...
|
|
140
|
-
[
|
|
139
|
+
() => [...h, { key: "actions", header: n("ACTIONS") }],
|
|
140
|
+
[h, n]
|
|
141
141
|
), fe = c(
|
|
142
|
-
(e) => F && e.some((o) => f(o)) ? q :
|
|
143
|
-
[F, f, q,
|
|
144
|
-
),
|
|
142
|
+
(e) => F && e.some((o) => f(o)) ? q : h,
|
|
143
|
+
[F, f, q, h]
|
|
144
|
+
), he = h, pe = d(
|
|
145
145
|
() => [
|
|
146
146
|
{ key: "recordedOn", sortable: !0 },
|
|
147
147
|
{ key: "recordedBy", sortable: !0 }
|
|
148
148
|
],
|
|
149
149
|
[]
|
|
150
150
|
), P = d(() => {
|
|
151
|
-
const e =
|
|
151
|
+
const e = U.reduce(
|
|
152
152
|
(o, t) => {
|
|
153
153
|
const s = t.formName;
|
|
154
154
|
o[s] ??= [];
|
|
155
|
-
const
|
|
155
|
+
const p = t.providers.map((ye) => ye.providerName).filter(Boolean).join(", ");
|
|
156
156
|
return o[s].push({
|
|
157
157
|
id: t.encounterUuid,
|
|
158
158
|
formName: t.formName,
|
|
159
159
|
recordedOn: De(t.encounterDateTime, n, !0).formattedResult,
|
|
160
|
-
recordedBy:
|
|
160
|
+
recordedBy: p ?? "--",
|
|
161
161
|
encounterDateTime: t.encounterDateTime,
|
|
162
162
|
encounterUuid: t.encounterUuid
|
|
163
163
|
}), o;
|
|
@@ -168,14 +168,14 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
168
168
|
([o, t]) => ({
|
|
169
169
|
formName: o,
|
|
170
170
|
records: t.sort(
|
|
171
|
-
(s,
|
|
171
|
+
(s, p) => p.encounterDateTime - s.encounterDateTime
|
|
172
172
|
)
|
|
173
173
|
})
|
|
174
174
|
).sort((o, t) => o.formName.localeCompare(t.formName));
|
|
175
|
-
}, [
|
|
176
|
-
|
|
177
|
-
}, []),
|
|
178
|
-
M(!1),
|
|
175
|
+
}, [U, n]), V = c((e) => {
|
|
176
|
+
L(e), M(!0);
|
|
177
|
+
}, []), $ = c(() => {
|
|
178
|
+
M(!1), L(null);
|
|
179
179
|
}, []), R = c((e) => {
|
|
180
180
|
globalThis.dispatchEvent(
|
|
181
181
|
new CustomEvent(Ve, {
|
|
@@ -188,7 +188,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
188
188
|
}
|
|
189
189
|
})
|
|
190
190
|
);
|
|
191
|
-
}, []),
|
|
191
|
+
}, []), j = c(
|
|
192
192
|
(e, r) => {
|
|
193
193
|
switch (r) {
|
|
194
194
|
case "recordedOn":
|
|
@@ -213,24 +213,24 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
213
213
|
},
|
|
214
214
|
[V, R, f, n]
|
|
215
215
|
);
|
|
216
|
-
return /* @__PURE__ */
|
|
217
|
-
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children:
|
|
216
|
+
return /* @__PURE__ */ x(ge, { children: [
|
|
217
|
+
/* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: C || k || P.length === 0 || S ? /* @__PURE__ */ i(
|
|
218
218
|
Q,
|
|
219
219
|
{
|
|
220
|
-
headers:
|
|
220
|
+
headers: he,
|
|
221
221
|
ariaLabel: n("FORMS_HEADING"),
|
|
222
222
|
rows: [],
|
|
223
|
-
loading:
|
|
224
|
-
errorStateMessage:
|
|
223
|
+
loading: C,
|
|
224
|
+
errorStateMessage: k ? te?.message : void 0,
|
|
225
225
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
226
|
-
renderCell:
|
|
226
|
+
renderCell: j,
|
|
227
227
|
className: T.formsTableBody,
|
|
228
228
|
dataTestId: "forms-table"
|
|
229
229
|
}
|
|
230
|
-
) : /* @__PURE__ */ i(
|
|
230
|
+
) : /* @__PURE__ */ i(Le, { align: "start", children: P.map((e, r) => {
|
|
231
231
|
const { formName: o, records: t } = e, s = fe(t);
|
|
232
232
|
return /* @__PURE__ */ i(
|
|
233
|
-
|
|
233
|
+
Se,
|
|
234
234
|
{
|
|
235
235
|
title: o,
|
|
236
236
|
className: T.customAccordianItem,
|
|
@@ -244,9 +244,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
244
244
|
rows: t,
|
|
245
245
|
loading: !1,
|
|
246
246
|
errorStateMessage: "",
|
|
247
|
-
sortable:
|
|
247
|
+
sortable: pe,
|
|
248
248
|
emptyStateMessage: n("FORMS_UNAVAILABLE"),
|
|
249
|
-
renderCell:
|
|
249
|
+
renderCell: j,
|
|
250
250
|
className: T.formsTableBody,
|
|
251
251
|
dataTestId: `forms-table-${o}`
|
|
252
252
|
}
|
|
@@ -256,13 +256,13 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
256
256
|
);
|
|
257
257
|
}) }) }),
|
|
258
258
|
g && a && /* @__PURE__ */ i(
|
|
259
|
-
|
|
259
|
+
Be,
|
|
260
260
|
{
|
|
261
261
|
id: "modalIdForActionAreaLayout",
|
|
262
262
|
portalId: "main-display-area",
|
|
263
263
|
open: g,
|
|
264
|
-
onRequestClose:
|
|
265
|
-
modalHeading: /* @__PURE__ */
|
|
264
|
+
onRequestClose: $,
|
|
265
|
+
modalHeading: /* @__PURE__ */ x("div", { className: T.modalHeading, children: [
|
|
266
266
|
/* @__PURE__ */ i("span", { children: a.formName }),
|
|
267
267
|
F && f(a) && /* @__PURE__ */ i(
|
|
268
268
|
G,
|
|
@@ -272,7 +272,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
272
272
|
size: "sm",
|
|
273
273
|
testId: `edit-form-modal-${a.encounterUuid}`,
|
|
274
274
|
onClick: () => {
|
|
275
|
-
|
|
275
|
+
$(), R(a);
|
|
276
276
|
},
|
|
277
277
|
children: /* @__PURE__ */ i(K, {})
|
|
278
278
|
}
|
|
@@ -283,7 +283,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
|
|
|
283
283
|
size: "md",
|
|
284
284
|
testId: "form-details-modal",
|
|
285
285
|
children: /* @__PURE__ */ i(
|
|
286
|
-
|
|
286
|
+
Ce,
|
|
287
287
|
{
|
|
288
288
|
observations: de,
|
|
289
289
|
isLoading: se || ne,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as d, jsxs as
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as d, jsxs as S } from "react/jsx-runtime";
|
|
2
|
+
import { h as K, j as N, t as V, D as q, W as Q, l as k, n as G, o as H, u as P, a as j, w as z, p as W, m as J, s as Y, v as X, x as Z, y as x, q as ee } from "./index-D6eQA2wz.js";
|
|
3
3
|
import { useQueries as te, useQuery as se } from "@tanstack/react-query";
|
|
4
4
|
import { useRef as oe, useEffect as C, useMemo as g } from "react";
|
|
5
5
|
import { useTranslation as U } from "react-i18next";
|
|
@@ -24,7 +24,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
24
24
|
)), a === "PDF" && (n = /* @__PURE__ */ d(H, { id: `${o}-pdf`, src: o }));
|
|
25
25
|
const b = u("OBSERVATIONS_RECORDED_BY", {
|
|
26
26
|
provider: s.provider
|
|
27
|
-
}),
|
|
27
|
+
}), m = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = l ? `${l}-${p}-${m}-${c}-${i}` : `${p}-${m}-${c}-${i}`;
|
|
28
28
|
return /* @__PURE__ */ d(
|
|
29
29
|
Q,
|
|
30
30
|
{
|
|
@@ -38,7 +38,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
38
38
|
`obs-${t.id}`
|
|
39
39
|
);
|
|
40
40
|
}, re = (t, i, c, l, u, r, s) => /* @__PURE__ */ d(
|
|
41
|
-
|
|
41
|
+
N,
|
|
42
42
|
{
|
|
43
43
|
title: t.display,
|
|
44
44
|
id: `grouped-obs-${t.display}-${l}`,
|
|
@@ -62,8 +62,8 @@ const B = (t, i, c, l, u, r) => {
|
|
|
62
62
|
}) => {
|
|
63
63
|
const { t: l } = U(), u = (r, s, o) => {
|
|
64
64
|
const a = K(r.encounterDetails, l);
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
65
|
+
return /* @__PURE__ */ S(
|
|
66
|
+
N,
|
|
67
67
|
{
|
|
68
68
|
title: a,
|
|
69
69
|
id: `encounter-${r.encounterId}`,
|
|
@@ -106,7 +106,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
106
106
|
)
|
|
107
107
|
}
|
|
108
108
|
);
|
|
109
|
-
}, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z",
|
|
109
|
+
}, ne = "Observations-module_observations__RKSyo", ie = "Observations-module_title__TJL3z", D = {
|
|
110
110
|
observations: ne,
|
|
111
111
|
title: ie
|
|
112
112
|
}, ce = (t) => ["conceptUuid", t], le = (t, i) => ["observations", t, ...i], ve = ({ config: t }) => {
|
|
@@ -133,20 +133,20 @@ const B = (t, i, c, l, u, r) => {
|
|
|
133
133
|
} else e.isError || r.current.delete(v);
|
|
134
134
|
});
|
|
135
135
|
}, [n, c]);
|
|
136
|
-
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]),
|
|
137
|
-
data:
|
|
136
|
+
const b = g(() => n.map((e) => e.data?.uuid).filter((e) => !!e), [n]), m = g(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), f = g(() => c.length === 0 ? !0 : n.every((e) => !e.isLoading), [n, c.length]), {
|
|
137
|
+
data: p,
|
|
138
138
|
isLoading: y,
|
|
139
139
|
isError: h,
|
|
140
140
|
refetch: T
|
|
141
141
|
} = se({
|
|
142
|
-
queryKey: le(s,
|
|
143
|
-
queryFn: () =>
|
|
144
|
-
enabled: !!s &&
|
|
142
|
+
queryKey: le(s, m),
|
|
143
|
+
queryFn: () => W(s, m),
|
|
144
|
+
enabled: !!s && m.length > 0 && f
|
|
145
145
|
});
|
|
146
|
-
|
|
146
|
+
J(
|
|
147
147
|
(e) => {
|
|
148
148
|
e.patientUUID === s && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
|
|
149
|
-
(R) =>
|
|
149
|
+
(R) => m.includes(R)
|
|
150
150
|
) && T();
|
|
151
151
|
},
|
|
152
152
|
[s, T]
|
|
@@ -157,22 +157,22 @@ const B = (t, i, c, l, u, r) => {
|
|
|
157
157
|
type: "error"
|
|
158
158
|
});
|
|
159
159
|
}, [h]);
|
|
160
|
-
const
|
|
161
|
-
if (!
|
|
162
|
-
const e = Y(
|
|
160
|
+
const _ = g(() => {
|
|
161
|
+
if (!p) return [];
|
|
162
|
+
const e = Y(p), v = X(e);
|
|
163
163
|
return Z(v);
|
|
164
|
-
}, [
|
|
164
|
+
}, [p]), A = [
|
|
165
165
|
{ key: "name", header: "name" },
|
|
166
166
|
{ key: "value", header: "value" },
|
|
167
167
|
{ key: "form", header: "form" }
|
|
168
|
-
],
|
|
169
|
-
return /* @__PURE__ */
|
|
168
|
+
], I = y || !f, $ = h && f, F = (!p || p.entry?.length === 0 || m.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, w = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
|
|
169
|
+
return /* @__PURE__ */ S(
|
|
170
170
|
"div",
|
|
171
171
|
{
|
|
172
172
|
id: "observations",
|
|
173
173
|
"data-testid": O ? `observations-${E}` : "observations",
|
|
174
174
|
"aria-label": "observations-aria-label",
|
|
175
|
-
className:
|
|
175
|
+
className: D.observations,
|
|
176
176
|
children: [
|
|
177
177
|
/* @__PURE__ */ d(
|
|
178
178
|
x,
|
|
@@ -180,14 +180,14 @@ const B = (t, i, c, l, u, r) => {
|
|
|
180
180
|
id: "observations-title",
|
|
181
181
|
testId: O ? `observations-title-${E}` : "observations-title",
|
|
182
182
|
title: E,
|
|
183
|
-
className:
|
|
183
|
+
className: D.title,
|
|
184
184
|
children: /* @__PURE__ */ d("p", { children: E })
|
|
185
185
|
}
|
|
186
186
|
),
|
|
187
187
|
w ? /* @__PURE__ */ d(
|
|
188
188
|
ae,
|
|
189
189
|
{
|
|
190
|
-
groupedData:
|
|
190
|
+
groupedData: _,
|
|
191
191
|
title: E,
|
|
192
192
|
hideThumbnail: u
|
|
193
193
|
}
|
|
@@ -197,7 +197,7 @@ const B = (t, i, c, l, u, r) => {
|
|
|
197
197
|
headers: A,
|
|
198
198
|
rows: [],
|
|
199
199
|
ariaLabel: a("OBSERVATIONS"),
|
|
200
|
-
loading:
|
|
200
|
+
loading: I,
|
|
201
201
|
errorStateMessage: L,
|
|
202
202
|
emptyStateMessage: M,
|
|
203
203
|
dataTestId: "observations-table"
|