@bahmni/clinical-app 0.0.1-dev.350 → 0.0.1-dev.352

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.
@@ -1,5 +1,5 @@
1
- import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { m as G, u as W, o as X, R as Y, X as J, g as Z, Q as ee, a as te } from "./index-CErj4Z3U.js";
1
+ import { jsx as r, jsxs as h, Fragment as Q } from "react/jsx-runtime";
2
+ import { m as x, u as W, a as Y, V as J, r as X, g as Z, e as ee, d as te } from "./index-C2D4EgQ1.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -18,7 +18,7 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
18
18
  uploadedBy: "DOCUMENTS_UPLOADED_BY",
19
19
  attachments: "DOCUMENTS_ATTACHMENTS"
20
20
  };
21
- function v(a) {
21
+ function R(a) {
22
22
  return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
23
23
  }
24
24
  function ie(a, g) {
@@ -33,18 +33,18 @@ const Te = [
33
33
  "attachments",
34
34
  "uploadedOn",
35
35
  "uploadedBy"
36
- ], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], De = ({ config: a, encounterUuids: g }) => {
36
+ ], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ne = ({ config: a, encounterUuids: g }) => {
37
37
  const [s, w] = l(!1), [o, U] = l(
38
38
  null
39
- ), [$, O] = l(
39
+ ), [V, O] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = G(), { t: n } = W(), { addNotification: L } = X(), k = Number(a?.pageSize) || 5, [f, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
41
+ ), E = x(), { t: n } = W(), { addNotification: L } = Y(), $ = Number(a?.pageSize) || 5, [f, C] = l(1), [u, k] = l($), [F, A] = l(void 0), M = _((e) => {
42
42
  U(e), w(!0);
43
- }, []), q = _(() => {
43
+ }, []), H = _(() => {
44
44
  w(!1), U(null), O(/* @__PURE__ */ new Set());
45
- }, []), R = _((e) => {
45
+ }, []), v = _((e) => {
46
46
  O((t) => new Set(t).add(e));
47
- }, []), { data: i, isLoading: H, isError: b, error: y } = ae({
47
+ }, []), { data: i, isLoading: q, isError: b, error: y } = ae({
48
48
  queryKey: [
49
49
  "documents",
50
50
  E,
@@ -53,7 +53,7 @@ const Te = [
53
53
  u
54
54
  ],
55
55
  enabled: !!E,
56
- queryFn: () => Y(
56
+ queryFn: () => J(
57
57
  E,
58
58
  g,
59
59
  u,
@@ -76,33 +76,33 @@ const Te = [
76
76
  if (!s || !o) return;
77
77
  const t = /* @__PURE__ */ new Set(), m = B(o);
78
78
  for (let c = 0; c < m.length; c++) {
79
- const S = v(m[c].url);
79
+ const S = R(m[c].url);
80
80
  try {
81
81
  (await fetch(S, {
82
82
  method: "HEAD",
83
83
  signal: e.signal
84
84
  })).ok || t.add(c);
85
- } catch (N) {
86
- N instanceof Error && N.name !== "AbortError" && t.add(c);
85
+ } catch (D) {
86
+ D instanceof Error && D.name !== "AbortError" && t.add(c);
87
87
  }
88
88
  }
89
89
  e.signal.aborted || O(t);
90
90
  })(), () => e.abort();
91
91
  }, [s, o]);
92
- const Q = _(
92
+ const j = _(
93
93
  (e, t) => {
94
- t !== u ? (V(t), C(1), A(void 0)) : C(e);
94
+ t !== u ? (k(t), C(1), A(void 0)) : C(e);
95
95
  },
96
96
  [u]
97
- ), D = p(
97
+ ), N = p(
98
98
  () => a?.fields ?? Te,
99
99
  [a?.fields]
100
- ), j = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), P = p(() => ie(D, n), [D, n]), z = p(
101
- () => D.map((e) => ({
100
+ ), P = p(() => [...i?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [i]), z = p(() => ie(N, n), [N, n]), G = p(
101
+ () => N.map((e) => ({
102
102
  key: e,
103
103
  sortable: e !== "attachments"
104
104
  })),
105
- [D]
105
+ [N]
106
106
  ), T = p(
107
107
  () => o ? B(o) : [],
108
108
  [o]
@@ -123,7 +123,7 @@ const Te = [
123
123
  return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
124
124
  case "attachments":
125
125
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ r(
126
- J,
126
+ X,
127
127
  {
128
128
  onClick: () => M(e),
129
129
  className: d.viewAttachmentsLink,
@@ -137,16 +137,16 @@ const Te = [
137
137
  },
138
138
  [M, n]
139
139
  );
140
- return /* @__PURE__ */ h(x, { children: [
140
+ return /* @__PURE__ */ h(Q, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
144
- headers: P,
144
+ headers: z,
145
145
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
146
- rows: j,
147
- loading: H,
146
+ rows: P,
147
+ loading: q,
148
148
  errorStateMessage: b ? y?.message : null,
149
- sortable: z,
149
+ sortable: G,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
151
  renderCell: K,
152
152
  className: d.documentsTableBody,
@@ -154,7 +154,7 @@ const Te = [
154
154
  pageSize: u,
155
155
  totalItems: F,
156
156
  page: f,
157
- onPageChange: Q
157
+ onPageChange: j
158
158
  }
159
159
  ) }),
160
160
  s && o && /* @__PURE__ */ r(
@@ -163,14 +163,14 @@ const Te = [
163
163
  id: "modalIdForActionAreaLayout",
164
164
  portalId: "main-display-area",
165
165
  open: s,
166
- onRequestClose: q,
166
+ onRequestClose: H,
167
167
  modalHeading: o.documentIdentifier,
168
168
  passiveModal: !0,
169
169
  size: "lg",
170
170
  testId: "document-view-modal",
171
171
  children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
172
- const m = v(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), N = $.has(t);
173
- return m === "#" || N ? /* @__PURE__ */ h(
172
+ const m = R(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), D = V.has(t);
173
+ return m === "#" || D ? /* @__PURE__ */ h(
174
174
  "div",
175
175
  {
176
176
  className: d.attachmentError,
@@ -202,7 +202,7 @@ const Te = [
202
202
  src: m,
203
203
  alt: o.documentIdentifier,
204
204
  className: d.documentImage,
205
- onError: () => R(t)
205
+ onError: () => v(t)
206
206
  }
207
207
  ) : /* @__PURE__ */ r(
208
208
  "iframe",
@@ -210,7 +210,7 @@ const Te = [
210
210
  src: c ? `${m}#toolbar=0` : m,
211
211
  className: d.documentIframe,
212
212
  title: o.documentIdentifier,
213
- onError: () => R(t)
213
+ onError: () => v(t)
214
214
  }
215
215
  )
216
216
  ]
@@ -223,5 +223,5 @@ const Te = [
223
223
  ] });
224
224
  };
225
225
  export {
226
- De as default
226
+ Ne as default
227
227
  };
@@ -1,97 +1,97 @@
1
- import { jsx as i, jsxs as z, Fragment as ge } from "react/jsx-runtime";
2
- import { u as ye, m as be, b as pe, M as Oe, c as Ne, L as Te, v as Ee, O as Ie, l as Ae, G as ve, d as _e, k as Fe, n as G, g as Me, E as K, e as x, X as Le, Q as P, Y as Se, J as Ce, a as Re, T as Be, f as Ue } from "./index-CErj4Z3U.js";
3
- import { useQueryClient as De, useQuery as N } from "@tanstack/react-query";
4
- import { useState as Y, useMemo as d, useCallback as l } from "react";
5
- const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_modalHeading__wnTmA", we = "FormsTable-module_customAccordianItem__isszs", T = {
1
+ import { jsx as i, jsxs as x, Fragment as he } from "react/jsx-runtime";
2
+ import { u as ge, m as pe, w as Ne, x as Oe, h as be, y as Te, J as Ee, E as Ie, Z as Ae, b as _e, A as ve, _ as Fe, o as z, g as Se, H as K, c as P, r as Me, e as J, f as Ce, i as Re, d as Be, W as Le, $ as Ue } from "./index-C2D4EgQ1.js";
3
+ import { useQueryClient as De, useQuery as b } from "@tanstack/react-query";
4
+ import { useState as Q, useMemo as d, useCallback as l } from "react";
5
+ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", T = {
6
6
  formsTableBody: ke,
7
- modalHeading: qe,
8
- customAccordianItem: we
9
- }, He = "startConsultation", ze = ({
10
- episodeOfCareUuids: L,
11
- encounterUuids: u,
12
- config: X,
13
- disableActions: J = !1,
14
- activeEncounterUuid: g = null
7
+ modalHeading: we,
8
+ customAccordianItem: qe
9
+ }, He = "startConsultation", xe = ({
10
+ episodeOfCareUuids: M,
11
+ encounterUuids: c,
12
+ config: Z,
13
+ disableActions: W = !1,
14
+ activeEncounterUuid: h = null
15
15
  }) => {
16
- const { t: n } = ye(), c = be(), [y, S] = Y(!1), [s, C] = Y(null), {
17
- numberOfVisits: Z,
18
- hideThumbnail: W = !1,
19
- forms: b
20
- } = X ?? {}, ee = pe(
16
+ const { t: n } = ge(), u = pe(), [g, C] = Q(!1), [s, R] = Q(null), {
17
+ numberOfVisits: X,
18
+ hideThumbnail: Y = !1,
19
+ forms: p
20
+ } = Z ?? {}, ee = Ne(
21
21
  Ue.EDIT_OBSERVATIONS
22
- ), { userPrivileges: p } = Oe(), E = ee && !J && !!g, R = Ne(
23
- L,
24
- u
22
+ ), { userPrivileges: N } = Oe(), E = ee && !W && !!h, B = be(
23
+ M,
24
+ c
25
25
  ), re = De(), {
26
- data: B = [],
26
+ data: L = [],
27
27
  isLoading: U,
28
28
  isError: D,
29
- error: ae,
30
- refetch: oe
31
- } = N({
32
- queryKey: ["forms", c, L],
33
- queryFn: () => Te(c, void 0, Z),
34
- enabled: !!c && !R
29
+ error: oe,
30
+ refetch: ae
31
+ } = b({
32
+ queryKey: ["forms", u, M],
33
+ queryFn: () => Te(u, void 0, X),
34
+ enabled: !!u && !B
35
35
  }), k = d(() => {
36
- let e = B;
37
- return u && u.length > 0 && (e = e.filter(
38
- (r) => u.includes(r.encounterUuid)
39
- )), Array.isArray(b) && b.length > 0 && (e = e.filter(
40
- (r) => b.some((a) => a.toLowerCase() === r.formName.toLowerCase())
36
+ let e = L;
37
+ return c && c.length > 0 && (e = e.filter(
38
+ (r) => c.includes(r.encounterUuid)
39
+ )), Array.isArray(p) && p.length > 0 && (e = e.filter(
40
+ (r) => p.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [B, u, b]), { data: O = [] } = N({
42
+ }, [L, c, p]), { data: O = [] } = b({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ee()
45
- }), q = l(
45
+ }), w = l(
46
46
  (e) => {
47
- const r = O.find((o) => o.name === e);
47
+ const r = O.find((a) => a.name === e);
48
48
  if (!r?.privileges || r.privileges.length === 0) return !0;
49
- if (!p || p.length === 0) return !1;
50
- const a = new Set(p.map((o) => o.name));
49
+ if (!N || N.length === 0) return !1;
50
+ const o = new Set(N.map((a) => a.name));
51
51
  return r.privileges.some(
52
- (o) => a.has(o.privilegeName) && o.editable
52
+ (a) => o.has(a.privilegeName) && a.editable
53
53
  );
54
54
  },
55
- [O, p]
55
+ [O, N]
56
56
  ), f = l(
57
- (e) => !g || e.encounterUuid !== g ? !1 : q(e.formName),
58
- [g, q]
59
- ), w = l(
57
+ (e) => !h || e.encounterUuid !== h ? !1 : w(e.formName),
58
+ [h, w]
59
+ ), q = l(
60
60
  (e) => O.find((r) => r.name === e)?.uuid,
61
61
  [O]
62
62
  ), I = d(() => {
63
63
  if (s)
64
- return w(s.formName);
65
- }, [s, w]), {
64
+ return q(s.formName);
65
+ }, [s, q]), {
66
66
  data: m,
67
67
  isLoading: te,
68
68
  isError: se,
69
69
  error: A
70
- } = N({
70
+ } = b({
71
71
  queryKey: ["formMetadata", I],
72
72
  queryFn: () => Ie(I),
73
- enabled: !!I && y
73
+ enabled: !!I && g
74
74
  }), {
75
- data: v,
75
+ data: _,
76
76
  isLoading: ne,
77
77
  isError: ie,
78
- error: _
79
- } = N({
78
+ error: v
79
+ } = b({
80
80
  queryKey: ["formsEncounterFHIR", s?.encounterUuid],
81
81
  queryFn: () => Ae(s.encounterUuid),
82
- enabled: !!s?.encounterUuid && y
82
+ enabled: !!s?.encounterUuid && g
83
83
  });
84
- ve(
84
+ _e(
85
85
  (e) => {
86
- e.patientUUID === c && e.updatedConcepts.size > 0 && (oe(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
86
+ e.patientUUID === u && e.updatedConcepts.size > 0 && (ae(), re.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
87
87
  },
88
- [c]
88
+ [u]
89
89
  );
90
- const de = d(() => !v?.entry || !s?.formName ? [] : v.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => _e(e) ? Fe(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [v, s?.formName]), le = d(() => {
90
+ const de = d(() => !_?.entry || !s?.formName ? [] : _.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => ve(e) ? Fe(e)?.toLowerCase() === s.formName.toLowerCase() : !0), [_, s?.formName]), le = d(() => {
91
91
  if (!m?.schema) return;
92
- const e = [], r = (a) => {
93
- (a ?? []).forEach((o) => {
94
- const t = o;
92
+ const e = [], r = (o) => {
93
+ (o ?? []).forEach((a) => {
94
+ const t = a;
95
95
  t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
96
96
  });
97
97
  };
@@ -100,36 +100,36 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
100
100
  ), e.length > 0 ? e : void 0;
101
101
  }, [m]), me = d(() => {
102
102
  if (!m?.schema) return;
103
- const e = {}, r = (a, o) => {
104
- for (const t of a)
103
+ const e = {}, r = (o, a) => {
104
+ for (const t of o)
105
105
  if (t.type === "section") {
106
- const M = t.label?.value ?? "Section";
107
- r(t.controls ?? [], M);
106
+ const S = t.label?.value ?? "Section";
107
+ r(t.controls ?? [], S);
108
108
  } else
109
- t.id != null && o && (e[String(t.id)] = o), t.controls && r(t.controls, o);
109
+ t.id != null && a && (e[String(t.id)] = a), t.controls && r(t.controls, a);
110
110
  };
111
111
  return r(
112
112
  m.schema.controls ?? [],
113
113
  null
114
114
  ), Object.keys(e).length > 0 ? e : void 0;
115
- }, [m]), ue = d(() => {
115
+ }, [m]), ce = d(() => {
116
116
  if (A)
117
- return G(A).message;
118
- if (_)
119
- return G(_).message;
120
- }, [A, _]), h = d(
117
+ return z(A).message;
118
+ if (v)
119
+ return z(v).message;
120
+ }, [A, v]), y = d(
121
121
  () => [
122
122
  { key: "recordedOn", header: n("RECORDED_ON") },
123
123
  { key: "recordedBy", header: n("RECORDED_BY") }
124
124
  ],
125
125
  [n]
126
126
  ), H = d(
127
- () => [...h, { key: "actions", header: n("ACTIONS") }],
128
- [h, n]
129
- ), ce = l(
130
- (e) => E && e.some((r) => f(r)) ? H : h,
131
- [E, f, H, h]
132
- ), fe = h, he = d(
127
+ () => [...y, { key: "actions", header: n("ACTIONS") }],
128
+ [y, n]
129
+ ), ue = l(
130
+ (e) => E && e.some((r) => f(r)) ? H : y,
131
+ [E, f, H, y]
132
+ ), fe = y, ye = d(
133
133
  () => [
134
134
  { key: "recordedOn", sortable: !0 },
135
135
  { key: "recordedBy", sortable: !0 }
@@ -137,33 +137,33 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
137
137
  []
138
138
  ), V = d(() => {
139
139
  const e = k.reduce(
140
- (r, a) => {
141
- const o = a.formName;
142
- r[o] ??= [];
143
- const t = a.providers.map((M) => M.providerName).filter(Boolean).join(", ");
144
- return r[o].push({
145
- id: a.encounterUuid,
146
- formName: a.formName,
147
- recordedOn: Me(a.encounterDateTime, n, !0).formattedResult,
140
+ (r, o) => {
141
+ const a = o.formName;
142
+ r[a] ??= [];
143
+ const t = o.providers.map((S) => S.providerName).filter(Boolean).join(", ");
144
+ return r[a].push({
145
+ id: o.encounterUuid,
146
+ formName: o.formName,
147
+ recordedOn: Se(o.encounterDateTime, n, !0).formattedResult,
148
148
  recordedBy: t ?? "--",
149
- encounterDateTime: a.encounterDateTime,
150
- encounterUuid: a.encounterUuid
149
+ encounterDateTime: o.encounterDateTime,
150
+ encounterUuid: o.encounterUuid
151
151
  }), r;
152
152
  },
153
153
  {}
154
154
  );
155
155
  return Object.entries(e).map(
156
- ([r, a]) => ({
156
+ ([r, o]) => ({
157
157
  formName: r,
158
- records: a.sort(
159
- (o, t) => t.encounterDateTime - o.encounterDateTime
158
+ records: o.sort(
159
+ (a, t) => t.encounterDateTime - a.encounterDateTime
160
160
  )
161
161
  })
162
- ).sort((r, a) => r.formName.localeCompare(a.formName));
163
- }, [k, n]), Q = l((e) => {
164
- C(e), S(!0);
165
- }, []), $ = l(() => {
166
- S(!1), C(null);
162
+ ).sort((r, o) => r.formName.localeCompare(o.formName));
163
+ }, [k, n]), $ = l((e) => {
164
+ R(e), C(!0);
165
+ }, []), G = l(() => {
166
+ C(!1), R(null);
167
167
  }, []), F = l((e) => {
168
168
  globalThis.dispatchEvent(
169
169
  new CustomEvent(He, {
@@ -180,7 +180,7 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
180
180
  (e, r) => {
181
181
  switch (r) {
182
182
  case "recordedOn":
183
- return /* @__PURE__ */ i(Le, { onClick: () => Q(e), children: e.recordedOn });
183
+ return /* @__PURE__ */ i(Me, { onClick: () => $(e), children: e.recordedOn });
184
184
  case "recordedBy":
185
185
  return e.recordedBy;
186
186
  case "actions":
@@ -192,65 +192,65 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
192
192
  size: "sm",
193
193
  testId: `edit-form-${e.encounterUuid}`,
194
194
  onClick: () => F(e),
195
- children: /* @__PURE__ */ i(x, {})
195
+ children: /* @__PURE__ */ i(P, {})
196
196
  }
197
197
  ) : null;
198
198
  default:
199
199
  return null;
200
200
  }
201
201
  },
202
- [Q, F, f, n]
202
+ [$, F, f, n]
203
203
  );
204
- return /* @__PURE__ */ z(ge, { children: [
205
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || R ? /* @__PURE__ */ i(
206
- P,
204
+ return /* @__PURE__ */ x(he, { children: [
205
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || B ? /* @__PURE__ */ i(
206
+ J,
207
207
  {
208
208
  headers: fe,
209
209
  ariaLabel: n("FORMS_HEADING"),
210
210
  rows: [],
211
211
  loading: U,
212
- errorStateMessage: D ? ae?.message : void 0,
212
+ errorStateMessage: D ? oe?.message : void 0,
213
213
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
214
214
  renderCell: j,
215
215
  className: T.formsTableBody,
216
216
  dataTestId: "forms-table"
217
217
  }
218
- ) : /* @__PURE__ */ i(Se, { align: "start", children: V.map((e, r) => {
219
- const { formName: a, records: o } = e, t = ce(o);
218
+ ) : /* @__PURE__ */ i(Ce, { align: "start", children: V.map((e, r) => {
219
+ const { formName: o, records: a } = e, t = ue(a);
220
220
  return /* @__PURE__ */ i(
221
- Ce,
221
+ Re,
222
222
  {
223
- title: a,
223
+ title: o,
224
224
  className: T.customAccordianItem,
225
- testId: `accordian-title-${a}`,
225
+ testId: `accordian-title-${o}`,
226
226
  open: r === 0,
227
227
  children: /* @__PURE__ */ i(
228
- P,
228
+ J,
229
229
  {
230
230
  headers: t,
231
231
  ariaLabel: n("FORMS_HEADING"),
232
- rows: o,
232
+ rows: a,
233
233
  loading: !1,
234
234
  errorStateMessage: "",
235
- sortable: he,
235
+ sortable: ye,
236
236
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
237
237
  renderCell: j,
238
238
  className: T.formsTableBody,
239
- dataTestId: `forms-table-${a}`
239
+ dataTestId: `forms-table-${o}`
240
240
  }
241
241
  )
242
242
  },
243
- a
243
+ o
244
244
  );
245
245
  }) }) }),
246
- y && s && /* @__PURE__ */ i(
247
- Re,
246
+ g && s && /* @__PURE__ */ i(
247
+ Be,
248
248
  {
249
249
  id: "modalIdForActionAreaLayout",
250
250
  portalId: "main-display-area",
251
- open: y,
252
- onRequestClose: $,
253
- modalHeading: /* @__PURE__ */ z("div", { className: T.modalHeading, children: [
251
+ open: g,
252
+ onRequestClose: G,
253
+ modalHeading: /* @__PURE__ */ x("div", { className: T.modalHeading, children: [
254
254
  /* @__PURE__ */ i("span", { children: s.formName }),
255
255
  E && f(s) && /* @__PURE__ */ i(
256
256
  K,
@@ -260,9 +260,9 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
260
260
  size: "sm",
261
261
  testId: `edit-form-modal-${s.encounterUuid}`,
262
262
  onClick: () => {
263
- $(), F(s);
263
+ G(), F(s);
264
264
  },
265
- children: /* @__PURE__ */ i(x, {})
265
+ children: /* @__PURE__ */ i(P, {})
266
266
  }
267
267
  )
268
268
  ] }),
@@ -271,15 +271,15 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
271
271
  size: "md",
272
272
  testId: "form-details-modal",
273
273
  children: /* @__PURE__ */ i(
274
- Be,
274
+ Le,
275
275
  {
276
276
  observations: de,
277
277
  isLoading: te || ne,
278
278
  isError: se || ie,
279
- errorMessage: ue,
279
+ errorMessage: ce,
280
280
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
281
281
  testIdPrefix: s.formName,
282
- hideThumbnail: W,
282
+ hideThumbnail: Y,
283
283
  controlOrder: le,
284
284
  sectionMap: me
285
285
  }
@@ -289,5 +289,5 @@ const ke = "FormsTable-module_formsTableBody__SvGha", qe = "FormsTable-module_mo
289
289
  ] });
290
290
  };
291
291
  export {
292
- ze as default
292
+ xe as default
293
293
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-SeqWXm0n.js";
2
- import { bN as d, bO as f, bP as e } from "./index-CErj4Z3U.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CQ22u2_D.js";
2
+ import { bO as d, bP as f, bQ as e } from "./index-C2D4EgQ1.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -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-SeqWXm0n.js";
2
- import { bN as v, bO as C, bP as e } from "./index-CErj4Z3U.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-CQ22u2_D.js";
2
+ import { bO as v, bP as C, bQ as e } from "./index-C2D4EgQ1.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"