@bahmni/appointments-app 0.0.1-dev.194 → 0.0.1-dev.195

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,11 +1,11 @@
1
1
  import { jsx as o, jsxs as l, Fragment as k } from "react/jsx-runtime";
2
- import { d as V, u as F, t as H, a as q, O as x, R as z, N as P, L as G, z as W } from "./index-ClooEAJt.js";
3
- import { useState as O, useCallback as T, useEffect as S, useMemo as p } from "react";
4
- const Y = "_documentsTableBody_1voj8_1", J = "_viewAttachmentsLink_1voj8_11", K = "_documentViewerContainer_1voj8_15", Q = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
2
+ import { l as V, u as x, Q as F, a as H, E as q, C as Q, x as P, T as G, b as W } from "./index-CxMx6dqh.js";
3
+ import { useState as I, useCallback as T, useEffect as L, useMemo as E } from "react";
4
+ const Y = "_documentsTableBody_1voj8_1", z = "_viewAttachmentsLink_1voj8_11", J = "_documentViewerContainer_1voj8_15", K = "_attachmentItem_1voj8_23", X = "_attachmentCounter_1voj8_27", Z = "_attachmentError_1voj8_36", ee = "_documentIframe_1voj8_44", te = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: Y,
6
- viewAttachmentsLink: J,
7
- documentViewerContainer: K,
8
- attachmentItem: Q,
6
+ viewAttachmentsLink: z,
7
+ documentViewerContainer: J,
8
+ attachmentItem: K,
9
9
  attachmentCounter: X,
10
10
  attachmentError: Z,
11
11
  documentIframe: ee,
@@ -33,36 +33,36 @@ const re = [
33
33
  "uploadedBy",
34
34
  "action"
35
35
  ], oe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, v = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], ie = ({ config: a, encounterUuids: u }) => {
36
- const [s, C] = O(!1), [r, A] = O(
36
+ const [s, O] = I(!1), [r, A] = I(
37
37
  null
38
- ), [w, E] = O(
38
+ ), [w, p] = I(
39
39
  /* @__PURE__ */ new Set()
40
- ), N = V(), { t: n } = F(), { addNotification: y } = H(), D = T((e) => {
41
- A(e), C(!0);
42
- }, []), M = T(() => {
43
- C(!1), A(null), E(/* @__PURE__ */ new Set());
44
- }, []), L = T((e) => {
45
- E((t) => new Set(t).add(e));
46
- }, []), { data: b, isLoading: R, isError: f, error: g } = q({
40
+ ), N = V(), { t: n } = x(), { addNotification: y } = F(), D = T((e) => {
41
+ A(e), O(!0);
42
+ }, []), b = T(() => {
43
+ O(!1), A(null), p(/* @__PURE__ */ new Set());
44
+ }, []), S = T((e) => {
45
+ p((t) => new Set(t).add(e));
46
+ }, []), { data: M, isLoading: j, isError: f, error: g } = H({
47
47
  queryKey: ["documents", N, u],
48
48
  enabled: !!N,
49
49
  queryFn: () => W(N, u)
50
50
  });
51
- S(() => {
51
+ L(() => {
52
52
  f && y({
53
53
  title: n("ERROR_DEFAULT_TITLE"),
54
54
  message: g?.message ?? "",
55
55
  type: "error"
56
56
  });
57
- }, [f, g, y, n]), S(() => {
57
+ }, [f, g, y, n]), L(() => {
58
58
  const e = new AbortController();
59
59
  return (async () => {
60
60
  if (!s || !r) return;
61
61
  const t = /* @__PURE__ */ new Set(), c = v(r);
62
62
  for (let i = 0; i < c.length; i++) {
63
- const I = U(c[i].url);
63
+ const C = U(c[i].url);
64
64
  try {
65
- (await fetch(I, {
65
+ (await fetch(C, {
66
66
  method: "HEAD",
67
67
  signal: e.signal
68
68
  })).ok || t.add(i);
@@ -70,19 +70,19 @@ const re = [
70
70
  h instanceof Error && h.name !== "AbortError" && t.add(i);
71
71
  }
72
72
  }
73
- e.signal.aborted || E(t);
73
+ e.signal.aborted || p(t);
74
74
  })(), () => e.abort();
75
75
  }, [s, r]);
76
- const _ = p(
76
+ const _ = E(
77
77
  () => a?.fields ?? re,
78
78
  [a?.fields]
79
- ), j = p(() => ne(_, n), [_, n]), B = p(
79
+ ), B = E(() => ne(_, n), [_, n]), R = E(
80
80
  () => _.map((e) => ({
81
81
  key: e,
82
82
  sortable: e !== "action"
83
83
  })),
84
84
  [_]
85
- ), m = p(
85
+ ), m = E(
86
86
  () => r ? v(r) : [],
87
87
  [r]
88
88
  ), $ = T(
@@ -93,7 +93,7 @@ const re = [
93
93
  case "documentType":
94
94
  return e.documentType ?? n("DOCUMENTS_NOT_AVAILABLE");
95
95
  case "uploadedOn":
96
- return z(
96
+ return Q(
97
97
  e.uploadedOn,
98
98
  n,
99
99
  !0
@@ -102,7 +102,7 @@ const re = [
102
102
  return e.uploadedBy ?? n("DOCUMENTS_NOT_AVAILABLE");
103
103
  case "action":
104
104
  return e.attachments.length > 0 || e.documentUrl ? /* @__PURE__ */ o(
105
- x,
105
+ q,
106
106
  {
107
107
  onClick: () => D(e),
108
108
  className: d.viewAttachmentsLink,
@@ -120,12 +120,12 @@ const re = [
120
120
  /* @__PURE__ */ o("div", { "data-testid": "documents-table", children: /* @__PURE__ */ o(
121
121
  P,
122
122
  {
123
- headers: j,
123
+ headers: B,
124
124
  ariaLabel: n("DOCUMENTS_TABLE_HEADING"),
125
- rows: b ?? [],
126
- loading: R,
125
+ rows: M ?? [],
126
+ loading: j,
127
127
  errorStateMessage: f ? g?.message : null,
128
- sortable: B,
128
+ sortable: R,
129
129
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
130
130
  renderCell: $,
131
131
  className: d.documentsTableBody,
@@ -138,13 +138,13 @@ const re = [
138
138
  id: "modalIdForActionAreaLayout",
139
139
  portalId: "main-display-area",
140
140
  open: s,
141
- onRequestClose: M,
141
+ onRequestClose: b,
142
142
  modalHeading: r.documentIdentifier,
143
143
  passiveModal: !0,
144
144
  size: "lg",
145
145
  testId: "document-view-modal",
146
146
  children: /* @__PURE__ */ o("div", { className: d.documentViewerContainer, children: m.map((e, t) => {
147
- const c = U(e.url), i = e.contentType?.toLowerCase().includes("pdf"), I = (e.contentType?.toLowerCase().includes("image") ?? !1) || oe.test(e.url ?? ""), h = w.has(t);
147
+ const c = U(e.url), i = e.contentType?.toLowerCase().includes("pdf"), C = (e.contentType?.toLowerCase().includes("image") ?? !1) || oe.test(e.url ?? ""), h = w.has(t);
148
148
  return c === "#" || h ? /* @__PURE__ */ l(
149
149
  "div",
150
150
  {
@@ -171,13 +171,13 @@ const re = [
171
171
  "/",
172
172
  m.length
173
173
  ] }),
174
- I ? /* @__PURE__ */ o(
174
+ C ? /* @__PURE__ */ o(
175
175
  "img",
176
176
  {
177
177
  src: c,
178
178
  alt: r.documentIdentifier,
179
179
  className: d.documentImage,
180
- onError: () => L(t)
180
+ onError: () => S(t)
181
181
  }
182
182
  ) : /* @__PURE__ */ o(
183
183
  "iframe",
@@ -185,7 +185,7 @@ const re = [
185
185
  src: i ? `${c}#toolbar=0` : c,
186
186
  className: d.documentIframe,
187
187
  title: r.documentIdentifier,
188
- onError: () => L(t)
188
+ onError: () => S(t)
189
189
  }
190
190
  )
191
191
  ]
@@ -1,28 +1,28 @@
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, b 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, X as ce, I as H, V as ue, n as k, C, c as be, e as pe, r as _e, f as fe, g as $e, h as ge, i as he, x as ve, M as ye } from "./index-ClooEAJt.js";
3
- import { useState as K, useMemo as v, 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", Ve = "_groupMembers_1pd36_75", Ee = "_memberRow_1pd36_81", xe = "_memberLabel_1pd36_86", De = "_memberValue_1pd36_94", Se = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", Ue = "_nestedGroupLabel_1pd36_132", qe = "_nestedGroupMembers_1pd36_141", n = {
1
+ import { jsx as o, jsxs as p, Fragment as k } from "react/jsx-runtime";
2
+ import { u as T, l as ae, o as te, c as oe, a as A, f as ne, C as se, E as de, x as U, I as me, Z as ie, T as le, d as ce, S as H, W as ue, q as z, e as R, g as be, N as pe, A as fe, z as _e, h as $e, X as ge, Y as he, J as ve, G as ye } from "./index-CxMx6dqh.js";
3
+ import { useState as P, useMemo as v, useCallback as C } from "react";
4
+ const Ne = "_formsTableBody_1pd36_1", Ae = "_customAccordianItem_1pd36_6", Ce = "_formContent_1pd36_18", Re = "_formDetailsContainer_1pd36_25", Fe = "_observation_1pd36_30", Le = "_groupContainer_1pd36_39", Ie = "_rowContainer_1pd36_43", Oe = "_groupLabel_1pd36_48", Te = "_rowLabel_1pd36_58", Me = "_rowValue_1pd36_67", Se = "_groupMembers_1pd36_75", xe = "_memberRow_1pd36_81", De = "_memberLabel_1pd36_86", Ee = "_memberValue_1pd36_94", Ve = "_abnormalValue_1pd36_102", we = "_commentSection_1pd36_110", Be = "_commentText_1pd36_116", Ge = "_nestedGroup_1pd36_125", qe = "_nestedGroupLabel_1pd36_132", Ue = "_nestedGroupMembers_1pd36_141", n = {
5
5
  formsTableBody: Ne,
6
- customAccordianItem: Le,
7
- formContent: Re,
8
- formDetailsContainer: Ce,
9
- observation: Ae,
10
- groupContainer: Fe,
6
+ customAccordianItem: Ae,
7
+ formContent: Ce,
8
+ formDetailsContainer: Re,
9
+ observation: Fe,
10
+ groupContainer: Le,
11
11
  rowContainer: Ie,
12
- groupLabel: Me,
13
- rowLabel: Oe,
14
- rowValue: Te,
15
- groupMembers: Ve,
16
- memberRow: Ee,
17
- memberLabel: xe,
18
- memberValue: De,
19
- abnormalValue: Se,
12
+ groupLabel: Oe,
13
+ rowLabel: Te,
14
+ rowValue: Me,
15
+ groupMembers: Se,
16
+ memberRow: xe,
17
+ memberLabel: De,
18
+ memberValue: Ee,
19
+ abnormalValue: Ve,
20
20
  commentSection: we,
21
21
  commentText: Be,
22
22
  nestedGroup: Ge,
23
- nestedGroupLabel: Ue,
24
- nestedGroupMembers: qe
25
- }, j = (e) => {
23
+ nestedGroupLabel: qe,
24
+ nestedGroupMembers: Ue
25
+ }, K = (e) => {
26
26
  const r = be(e);
27
27
  return r === "Image" ? /* @__PURE__ */ o(
28
28
  pe,
@@ -31,21 +31,21 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
31
31
  alt: e,
32
32
  id: `${e}-img`
33
33
  }
34
- ) : r === "Video" ? /* @__PURE__ */ o(_e, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(fe, { id: `${e}-pdf`, src: e }) : e;
35
- }, Q = (e) => {
34
+ ) : r === "Video" ? /* @__PURE__ */ o(fe, { id: `${e}-video`, videoSrc: e }) : r === "PDF" ? /* @__PURE__ */ o(_e, { id: `${e}-pdf`, src: e }) : e;
35
+ }, j = (e) => {
36
36
  const r = e.observationValue?.referenceRange?.low?.value, s = e.observationValue?.referenceRange?.high?.value, a = r != null, l = s != null;
37
37
  let d = "";
38
38
  a && l ? d = ` (${r} - ${s})` : a ? d = ` (>${r})` : l && (d = ` (<${s})`);
39
39
  const b = e.observationValue?.isAbnormal === !0;
40
40
  return { rangeString: d, isAbnormal: b };
41
- }, z = ({
41
+ }, Q = ({
42
42
  member: e,
43
43
  depth: r = 0,
44
44
  memberIndex: s = 0,
45
45
  formName: a = "",
46
46
  comment: l
47
47
  }) => {
48
- const { t: d } = O(), b = e.members && e.members.length > 0, t = e.display, c = a ? `${a}-` : "";
48
+ const { t: d } = T(), b = e.members && e.members.length > 0, t = e.display, c = a ? `${a}-` : "";
49
49
  if (b)
50
50
  return /* @__PURE__ */ p(
51
51
  "div",
@@ -68,7 +68,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
68
68
  className: n.nestedGroupMembers,
69
69
  "data-testid": `${c}obs-nested-group-members-${t}-${s}`,
70
70
  children: e.members?.map((y, N) => /* @__PURE__ */ o(
71
- z,
71
+ Q,
72
72
  {
73
73
  member: y,
74
74
  depth: r + 1,
@@ -82,8 +82,8 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
82
82
  ]
83
83
  }
84
84
  );
85
- const { rangeString: g, isAbnormal: _ } = Q(e), f = k(e, d), $ = f ? j(f) : null;
86
- return /* @__PURE__ */ p(P, { children: [
85
+ const { rangeString: g, isAbnormal: f } = j(e), _ = z(e, d), $ = _ ? K(_) : null;
86
+ return /* @__PURE__ */ p(k, { children: [
87
87
  /* @__PURE__ */ p(
88
88
  "div",
89
89
  {
@@ -94,9 +94,9 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
94
94
  /* @__PURE__ */ p(
95
95
  "p",
96
96
  {
97
- className: C(
97
+ className: R(
98
98
  n.memberLabel,
99
- _ ? n.abnormalValue : ""
99
+ f ? n.abnormalValue : ""
100
100
  ),
101
101
  "data-testid": `${c}obs-member-label-${t}-${s}`,
102
102
  children: [
@@ -108,9 +108,9 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
108
108
  /* @__PURE__ */ o(
109
109
  "div",
110
110
  {
111
- className: C(
111
+ className: R(
112
112
  n.memberValue,
113
- _ ? n.abnormalValue : ""
113
+ f ? n.abnormalValue : ""
114
114
  ),
115
115
  "data-testid": `${c}obs-member-value-${t}-${s}`,
116
116
  children: $
@@ -138,7 +138,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
138
138
  formName: s = "",
139
139
  comment: a
140
140
  }) => {
141
- const { t: l } = O(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } = Q(e), c = s ? `${s}-` : "", g = k(e, l), _ = g ? j(g) : null;
141
+ const { t: l } = T(), d = e.members && e.members.length > 0, { rangeString: b, isAbnormal: t } = j(e), c = s ? `${s}-` : "", g = z(e, l), f = g ? K(g) : null;
142
142
  return /* @__PURE__ */ p(
143
143
  "div",
144
144
  {
@@ -154,7 +154,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
154
154
  /* @__PURE__ */ p(
155
155
  "p",
156
156
  {
157
- className: C(
157
+ className: R(
158
158
  d ? n.groupLabel : n.rowLabel,
159
159
  !d && t ? n.abnormalValue : ""
160
160
  ),
@@ -170,26 +170,26 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
170
170
  {
171
171
  className: n.groupMembers,
172
172
  "data-testid": `${c}observation-group-members-${e.display}-${r}`,
173
- children: e.members?.map((f, $) => /* @__PURE__ */ o(
174
- z,
173
+ children: e.members?.map((_, $) => /* @__PURE__ */ o(
174
+ Q,
175
175
  {
176
- member: f,
176
+ member: _,
177
177
  depth: 0,
178
178
  memberIndex: $,
179
179
  formName: s
180
180
  },
181
- `${f.id}`
181
+ `${_.id}`
182
182
  ))
183
183
  }
184
184
  ) : /* @__PURE__ */ o(
185
185
  "div",
186
186
  {
187
- className: C(
187
+ className: R(
188
188
  n.rowValue,
189
189
  t ? n.abnormalValue : ""
190
190
  ),
191
191
  "data-testid": `${c}observation-value-${e.display}-${r}`,
192
- children: _
192
+ children: f
193
193
  }
194
194
  )
195
195
  ]
@@ -210,104 +210,104 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
210
210
  },
211
211
  `${e.id}-${r}`
212
212
  );
213
- }, Ke = (e) => e ? e.extension?.find(
213
+ }, Pe = (e) => e ? e.extension?.find(
214
214
  (r) => r.url === $e
215
- )?.valueString : void 0, Pe = (e) => {
215
+ )?.valueString : void 0, ke = (e) => {
216
216
  if (e)
217
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);
218
+ }, ze = (e, r) => e.entry?.find((s) => s.resource?.id === r)?.resource, O = (e, r) => {
219
+ const s = ze(e, r);
220
220
  return s ? {
221
- formFieldPath: Ke(s),
222
- comment: Pe(s)
221
+ formFieldPath: Pe(s),
222
+ comment: ke(s)
223
223
  } : {};
224
- }, je = (e, r) => {
224
+ }, Ke = (e, r) => {
225
225
  if (!e?.entry || !r)
226
226
  return [];
227
227
  const s = ue(e);
228
228
  return [
229
229
  ...s.observations.map((a) => {
230
- const { formFieldPath: l, comment: d } = M(
230
+ const { formFieldPath: l, comment: d } = O(
231
231
  e,
232
232
  a.id
233
233
  );
234
234
  return { obs: a, formFieldPath: l, comment: d };
235
235
  }),
236
236
  ...s.groupedObservations.flatMap((a) => {
237
- const { formFieldPath: l } = M(e, a.id);
237
+ const { formFieldPath: l } = O(e, a.id);
238
238
  return (a.members ?? []).map((d) => {
239
- const { comment: b } = M(e, d.id);
239
+ const { comment: b } = O(e, d.id);
240
240
  return { obs: d, formFieldPath: l, comment: b };
241
241
  });
242
242
  })
243
243
  ].filter(
244
244
  ({ formFieldPath: a }) => !a || a.includes(r)
245
245
  );
246
- }, Xe = ({
246
+ }, Ye = ({
247
247
  episodeOfCareUuids: e,
248
248
  encounterUuids: r,
249
249
  config: s
250
250
  }) => {
251
- const { t: a } = O(), l = ae(), [d, b] = K(!1), [t, c] = K(null), g = s?.numberOfVisits, _ = te(
251
+ const { t: a } = T(), l = ae(), [d, b] = P(!1), [t, c] = P(null), g = s?.numberOfVisits, f = te(
252
252
  e,
253
253
  r
254
- ), f = oe(), {
254
+ ), _ = oe(), {
255
255
  data: $ = [],
256
256
  isLoading: y,
257
257
  isError: N,
258
258
  error: W,
259
- refetch: X
260
- } = L({
259
+ refetch: Y
260
+ } = A({
261
261
  queryKey: ["forms", l, e],
262
262
  queryFn: () => ge(l, void 0, g),
263
- enabled: !!l && !_
264
- }), T = v(() => !r || r.length === 0 ? $ : $.filter(
263
+ enabled: !!l && !f
264
+ }), M = v(() => !r || r.length === 0 ? $ : $.filter(
265
265
  (m) => r.includes(m.encounterUuid)
266
- ), [$, r]), { data: V = [] } = L({
266
+ ), [$, r]), { data: S = [] } = A({
267
267
  queryKey: ["observationForms"],
268
268
  queryFn: () => he()
269
- }), E = R(
270
- (m) => V.find((u) => u.name === m)?.uuid,
271
- [V]
272
- ), A = v(() => {
269
+ }), x = C(
270
+ (m) => S.find((u) => u.name === m)?.uuid,
271
+ [S]
272
+ ), F = v(() => {
273
273
  if (t)
274
- return E(t.formName);
275
- }, [t, E]), { isLoading: Y, error: x } = L({
276
- queryKey: ["formMetadata", A],
277
- queryFn: () => ve(A),
278
- enabled: !!A && d
274
+ return x(t.formName);
275
+ }, [t, x]), { isLoading: Z, error: D } = A({
276
+ queryKey: ["formMetadata", F],
277
+ queryFn: () => ve(F),
278
+ enabled: !!F && d
279
279
  }), {
280
- data: F,
281
- isLoading: Z,
282
- error: D
283
- } = L({
280
+ data: L,
281
+ isLoading: J,
282
+ error: E
283
+ } = A({
284
284
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
285
285
  queryFn: () => ye(t.encounterUuid),
286
286
  enabled: !!t?.encounterUuid && d
287
287
  });
288
288
  ne(
289
289
  (m) => {
290
- m.patientUUID === l && m.updatedConcepts.size > 0 && (X(), f.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
290
+ m.patientUUID === l && m.updatedConcepts.size > 0 && (Y(), _.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
291
291
  },
292
292
  [l]
293
293
  );
294
- const S = v(() => !F || !t?.formName ? [] : je(
295
- F,
294
+ const V = v(() => !L || !t?.formName ? [] : Ke(
295
+ L,
296
296
  t.formName
297
- ), [F, t?.formName]), w = v(
297
+ ), [L, t?.formName]), w = v(
298
298
  () => [
299
299
  { key: "recordedOn", header: a("FORM_RECORDED_ON") },
300
300
  { key: "recordedBy", header: a("FORM_RECORDED_BY") }
301
301
  ],
302
302
  [a]
303
- ), J = v(
303
+ ), X = v(
304
304
  () => [
305
305
  { key: "recordedOn", sortable: !0 },
306
306
  { key: "recordedBy", sortable: !0 }
307
307
  ],
308
308
  []
309
309
  ), B = v(() => {
310
- const m = T.reduce(
310
+ const m = M.reduce(
311
311
  (u, i) => {
312
312
  const h = i.formName;
313
313
  u[h] ??= [];
@@ -331,11 +331,11 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
331
331
  )
332
332
  })
333
333
  ).sort((u, i) => u.formName.localeCompare(i.formName));
334
- }, [T, a]), G = R((m) => {
334
+ }, [M, a]), G = C((m) => {
335
335
  c(m), b(!0);
336
- }, []), ee = R(() => {
336
+ }, []), ee = C(() => {
337
337
  b(!1), c(null);
338
- }, []), U = R(
338
+ }, []), q = C(
339
339
  (m, u) => {
340
340
  switch (u) {
341
341
  case "recordedOn":
@@ -348,9 +348,9 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
348
348
  },
349
349
  [G]
350
350
  );
351
- return /* @__PURE__ */ p(P, { children: [
352
- /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 || _ ? /* @__PURE__ */ o(
353
- q,
351
+ return /* @__PURE__ */ p(k, { children: [
352
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: y || N || B.length === 0 || f ? /* @__PURE__ */ o(
353
+ U,
354
354
  {
355
355
  headers: w,
356
356
  ariaLabel: a("FORMS_HEADING"),
@@ -358,7 +358,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
358
358
  loading: y,
359
359
  errorStateMessage: N ? W?.message : void 0,
360
360
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
361
- renderCell: U,
361
+ renderCell: q,
362
362
  className: n.formsTableBody,
363
363
  dataTestId: "forms-table"
364
364
  }
@@ -372,16 +372,16 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
372
372
  testId: `accordian-title-${i}`,
373
373
  open: u === 0,
374
374
  children: /* @__PURE__ */ o(
375
- q,
375
+ U,
376
376
  {
377
377
  headers: w,
378
378
  ariaLabel: a("FORMS_HEADING"),
379
379
  rows: h,
380
380
  loading: !1,
381
381
  errorStateMessage: "",
382
- sortable: J,
382
+ sortable: X,
383
383
  emptyStateMessage: a("FORMS_UNAVAILABLE"),
384
- renderCell: U,
384
+ renderCell: q,
385
385
  className: n.formsTableBody,
386
386
  dataTestId: `forms-table-${i}`
387
387
  }
@@ -402,7 +402,7 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
402
402
  passiveModal: !0,
403
403
  size: "md",
404
404
  testId: "form-details-modal",
405
- children: /* @__PURE__ */ o("div", { className: n.formContent, children: Y || Z ? /* @__PURE__ */ o(ce, { width: "100%", lineCount: 3 }) : x ? /* @__PURE__ */ o("div", { children: H(x).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_DATA") }) : S.length > 0 ? /* @__PURE__ */ o("div", { className: n.formDetailsContainer, children: S.map(({ obs: m, comment: u }, i) => /* @__PURE__ */ o(
405
+ children: /* @__PURE__ */ o("div", { className: n.formContent, children: Z || J ? /* @__PURE__ */ o(ce, { width: "100%", lineCount: 3 }) : D ? /* @__PURE__ */ o("div", { children: H(D).message ?? a("ERROR_FETCHING_FORM_METADATA") }) : E ? /* @__PURE__ */ o("div", { children: H(E).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
406
  He,
407
407
  {
408
408
  observation: m,
@@ -417,5 +417,5 @@ const Ne = "_formsTableBody_1pd36_1", Le = "_customAccordianItem_1pd36_6", Re =
417
417
  ] });
418
418
  };
419
419
  export {
420
- Xe as default
420
+ Ye as default
421
421
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DqqyN0CG.js";
2
- import { B as d, D as f, F as e } from "./index-ClooEAJt.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BuPQnfdo.js";
2
+ import { H as d, L as f, M as e } from "./index-CxMx6dqh.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-DqqyN0CG.js";
2
- import { B as v, D as C, F as e } from "./index-ClooEAJt.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-BuPQnfdo.js";
2
+ import { H as v, L as C, M as e } from "./index-CxMx6dqh.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"