@bahmni/clinical-app 0.0.1-dev.267 → 0.0.1-dev.268

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,6 +1,6 @@
1
- import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { d as K, u as Q, a as W, b as J, c as X, m as Z, e as ee, r as te, F as ae } from "./index-BtzcJ4Ep.js";
3
- import { useState as m, useCallback as h, useEffect as f, useMemo as T } from "react";
1
+ import { jsx as r, jsxs as h, Fragment as Y } from "react/jsx-runtime";
2
+ import { u as K, a as Q, h as W, b as J, c as X, m as Z, d as ee, n as te, e as ae } from "./index-CVOSTJhz.js";
3
+ import { useState as m, useCallback as p, useEffect as f, useMemo as T } from "react";
4
4
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", me = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
6
6
  viewAttachmentsLink: oe,
@@ -32,16 +32,16 @@ const _e = [
32
32
  "uploadedOn",
33
33
  "uploadedBy",
34
34
  "action"
35
- ], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], Ee = ({ config: a, encounterUuids: g }) => {
35
+ ], 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 }] : [], Ee = ({ config: a, encounterUuids: g }) => {
36
36
  const [s, w] = m(!1), [o, L] = m(
37
37
  null
38
38
  ), [R, I] = m(
39
39
  /* @__PURE__ */ new Set()
40
- ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, k] = m($), [F, y] = m(void 0), b = h((e) => {
40
+ ), E = K(), { t: n } = Q(), { addNotification: U } = W(), $ = Number(a?.pageSize) || 5, [C, A] = m(1), [l, k] = m($), [V, y] = m(void 0), b = p((e) => {
41
41
  L(e), w(!0);
42
- }, []), V = h(() => {
42
+ }, []), F = p(() => {
43
43
  w(!1), L(null), I(/* @__PURE__ */ new Set());
44
- }, []), M = h((e) => {
44
+ }, []), M = p((e) => {
45
45
  I((t) => new Set(t).add(e));
46
46
  }, []), { data: u, isLoading: H, isError: D, error: v } = J({
47
47
  queryKey: [
@@ -88,7 +88,7 @@ const _e = [
88
88
  e.signal.aborted || I(t);
89
89
  })(), () => e.abort();
90
90
  }, [s, o]);
91
- const q = h(
91
+ const q = p(
92
92
  (e, t) => {
93
93
  t !== l ? (k(t), A(1), y(void 0)) : A(e);
94
94
  },
@@ -105,7 +105,7 @@ const _e = [
105
105
  ), _ = T(
106
106
  () => o ? B(o) : [],
107
107
  [o]
108
- ), G = h(
108
+ ), G = p(
109
109
  (e, t) => {
110
110
  switch (t) {
111
111
  case "documentIdentifier":
@@ -136,7 +136,7 @@ const _e = [
136
136
  },
137
137
  [b, n]
138
138
  );
139
- return /* @__PURE__ */ p(Y, { children: [
139
+ return /* @__PURE__ */ h(Y, { children: [
140
140
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
141
141
  ee,
142
142
  {
@@ -151,7 +151,7 @@ const _e = [
151
151
  className: d.documentsTableBody,
152
152
  dataTestId: "documents-table",
153
153
  pageSize: l,
154
- totalItems: F,
154
+ totalItems: V,
155
155
  page: C,
156
156
  onPageChange: q
157
157
  }
@@ -162,20 +162,20 @@ const _e = [
162
162
  id: "modalIdForActionAreaLayout",
163
163
  portalId: "main-display-area",
164
164
  open: s,
165
- onRequestClose: V,
165
+ onRequestClose: F,
166
166
  modalHeading: o.documentIdentifier,
167
167
  passiveModal: !0,
168
168
  size: "lg",
169
169
  testId: "document-view-modal",
170
170
  children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: _.map((e, t) => {
171
- const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), O = R.has(t);
172
- return c === "#" || O ? /* @__PURE__ */ p(
171
+ const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), O = R.has(t);
172
+ return c === "#" || O ? /* @__PURE__ */ h(
173
173
  "div",
174
174
  {
175
175
  className: d.attachmentError,
176
176
  "data-testid": `attachment-error-${t}`,
177
177
  children: [
178
- _.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
178
+ _.length > 1 && /* @__PURE__ */ h("p", { className: d.attachmentCounter, children: [
179
179
  t + 1,
180
180
  "/",
181
181
  _.length
@@ -184,13 +184,13 @@ const _e = [
184
184
  ]
185
185
  },
186
186
  `${o.id}-${e.url}`
187
- ) : /* @__PURE__ */ p(
187
+ ) : /* @__PURE__ */ h(
188
188
  "div",
189
189
  {
190
190
  className: d.attachmentItem,
191
191
  "data-testid": `attachment-item-${t}`,
192
192
  children: [
193
- _.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
193
+ _.length > 1 && /* @__PURE__ */ h("p", { className: d.attachmentCounter, children: [
194
194
  t + 1,
195
195
  "/",
196
196
  _.length
@@ -1,43 +1,43 @@
1
- import { jsx as s, jsxs as J, Fragment as W } from "react/jsx-runtime";
2
- import { u as Z, d as ee, f as re, g as ae, b as c, X as te, R as v, m as oe, c as se, e as U, A as ne, _ as de, r as ie, Y as ue, I as me, j as le, B as ce, P as fe, k as ye } from "./index-BtzcJ4Ep.js";
3
- import { useState as S, useMemo as d, useCallback as f } from "react";
4
- const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A = {
1
+ import { jsx as s, jsxs as Y, Fragment as W } from "react/jsx-runtime";
2
+ import { a as Z, u as ee, w as re, f as ae, b as c, X as te, R as v, m as oe, c as se, d as C, C as ne, T as de, n as ie, J as ue, K as me, g as le, i as ce, Q as fe, G as ye } from "./index-CVOSTJhz.js";
3
+ import { useState as U, useMemo as d, useCallback as f } from "react";
4
+ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", I = {
5
5
  formsTableBody: pe,
6
6
  customAccordianItem: be
7
7
  }, ge = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
- )?.valueString : void 0, he = ({
9
+ )?.valueString : void 0, Oe = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
- config: C
12
+ config: S
13
13
  }) => {
14
- const { t: o } = Z(), m = ee(), [l, h] = S(!1), [t, O] = S(null), { numberOfVisits: k, hideThumbnail: j = !1 } = C ?? {}, B = re(
14
+ const { t: o } = Z(), m = ee(), [l, O] = U(!1), [t, A] = U(null), { numberOfVisits: K, hideThumbnail: k = !1 } = S ?? {}, T = re(
15
15
  u,
16
16
  n
17
- ), H = ae(), {
17
+ ), w = ae(), {
18
18
  data: y = [],
19
- isLoading: _,
20
- isError: E,
21
- error: K,
22
- refetch: x
19
+ isLoading: E,
20
+ isError: B,
21
+ error: H,
22
+ refetch: Q
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
- queryFn: () => le(m, void 0, k),
26
- enabled: !!m && !B
27
- }), T = d(() => !n || n.length === 0 ? y : y.filter(
25
+ queryFn: () => le(m, void 0, K),
26
+ enabled: !!m && !T
27
+ }), R = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
- ), [y, n]), { data: R = [] } = c({
29
+ ), [y, n]), { data: _ = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
32
  }), F = f(
33
- (e) => R.find((r) => r.name === e)?.uuid,
34
- [R]
33
+ (e) => _.find((r) => r.name === e)?.uuid,
34
+ [_]
35
35
  ), p = d(() => {
36
36
  if (t)
37
37
  return F(t.formName);
38
38
  }, [t, F]), {
39
- isLoading: V,
40
- isError: $,
39
+ isLoading: j,
40
+ isError: x,
41
41
  error: b
42
42
  } = c({
43
43
  queryKey: ["formMetadata", p],
@@ -45,8 +45,8 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
45
45
  enabled: !!p && l
46
46
  }), {
47
47
  data: g,
48
- isLoading: w,
49
- isError: P,
48
+ isLoading: G,
49
+ isError: V,
50
50
  error: N
51
51
  } = c({
52
52
  queryKey: ["formsEncounterFHIR", t?.encounterUuid],
@@ -55,14 +55,14 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
55
55
  });
56
56
  te(
57
57
  (e) => {
58
- e.patientUUID === m && e.updatedConcepts.size > 0 && (x(), H.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
58
+ e.patientUUID === m && e.updatedConcepts.size > 0 && (Q(), w.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
59
59
  },
60
60
  [m]
61
61
  );
62
- const Q = d(() => !g?.entry || !t?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
62
+ const $ = d(() => !g?.entry || !t?.formName ? [] : g.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
63
63
  const r = ge(e);
64
64
  return !r || r.includes(t.formName);
65
- }), [g, t?.formName]), Y = d(() => {
65
+ }), [g, t?.formName]), J = d(() => {
66
66
  if (b)
67
67
  return v(b).message;
68
68
  if (N)
@@ -80,16 +80,16 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
80
80
  ],
81
81
  []
82
82
  ), M = d(() => {
83
- const e = T.reduce(
83
+ const e = R.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
86
86
  r[i] ??= [];
87
- const I = a.providers.map((X) => X.providerName).filter(Boolean).join(", ");
87
+ const h = a.providers.map((P) => P.providerName).filter(Boolean).join(", ");
88
88
  return r[i].push({
89
89
  id: a.encounterUuid,
90
90
  formName: a.formName,
91
91
  recordedOn: oe(a.encounterDateTime, o, !0).formattedResult,
92
- recordedBy: I ?? "--",
92
+ recordedBy: h ?? "--",
93
93
  encounterDateTime: a.encounterDateTime,
94
94
  encounterUuid: a.encounterUuid
95
95
  }), r;
@@ -100,14 +100,14 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
100
100
  ([r, a]) => ({
101
101
  formName: r,
102
102
  records: a.sort(
103
- (i, I) => I.encounterDateTime - i.encounterDateTime
103
+ (i, h) => h.encounterDateTime - i.encounterDateTime
104
104
  )
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
- }, [T, o]), D = f((e) => {
108
- O(e), h(!0);
109
- }, []), G = f(() => {
110
- h(!1), O(null);
107
+ }, [R, o]), D = f((e) => {
108
+ A(e), O(!0);
109
+ }, []), X = f(() => {
110
+ O(!1), A(null);
111
111
  }, []), q = f(
112
112
  (e, r) => {
113
113
  switch (r) {
@@ -121,18 +121,18 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
121
121
  },
122
122
  [D]
123
123
  );
124
- return /* @__PURE__ */ J(W, { children: [
125
- /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: _ || E || M.length === 0 || B ? /* @__PURE__ */ s(
126
- U,
124
+ return /* @__PURE__ */ Y(W, { children: [
125
+ /* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: E || B || M.length === 0 || T ? /* @__PURE__ */ s(
126
+ C,
127
127
  {
128
128
  headers: L,
129
129
  ariaLabel: o("FORMS_HEADING"),
130
130
  rows: [],
131
- loading: _,
132
- errorStateMessage: E ? K?.message : void 0,
131
+ loading: E,
132
+ errorStateMessage: B ? H?.message : void 0,
133
133
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
134
134
  renderCell: q,
135
- className: A.formsTableBody,
135
+ className: I.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
138
  ) : /* @__PURE__ */ s(ne, { align: "start", children: M.map((e, r) => {
@@ -141,11 +141,11 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
141
141
  de,
142
142
  {
143
143
  title: a,
144
- className: A.customAccordianItem,
144
+ className: I.customAccordianItem,
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ s(
148
- U,
148
+ C,
149
149
  {
150
150
  headers: L,
151
151
  ariaLabel: o("FORMS_HEADING"),
@@ -155,7 +155,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
155
155
  sortable: z,
156
156
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
157
157
  renderCell: q,
158
- className: A.formsTableBody,
158
+ className: I.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
161
161
  )
@@ -169,7 +169,7 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
169
169
  id: "modalIdForActionAreaLayout",
170
170
  portalId: "main-display-area",
171
171
  open: l,
172
- onRequestClose: G,
172
+ onRequestClose: X,
173
173
  modalHeading: t.formName,
174
174
  modalLabel: `${t.recordedOn} | ${t.recordedBy}`,
175
175
  passiveModal: !0,
@@ -178,13 +178,13 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
178
178
  children: /* @__PURE__ */ s(
179
179
  ue,
180
180
  {
181
- observations: Q,
182
- isLoading: V || w,
183
- isError: $ || P,
184
- errorMessage: Y,
181
+ observations: $,
182
+ isLoading: j || G,
183
+ isError: x || V,
184
+ errorMessage: J,
185
185
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
186
186
  testIdPrefix: t.formName,
187
- hideThumbnail: j
187
+ hideThumbnail: k
188
188
  }
189
189
  )
190
190
  }
@@ -192,5 +192,5 @@ const pe = "_formsTableBody_ourq9_5", be = "_customAccordianItem_ourq9_10", A =
192
192
  ] });
193
193
  };
194
194
  export {
195
- he as default
195
+ Oe as default
196
196
  };
@@ -0,0 +1,33 @@
1
+ import { c, T as l, P as m, a as v, D as u, Q as i } from "./YPM2AS64-bWTEzVUO.js";
2
+ import { r as d, t as f, v as e } from "./index-CVOSTJhz.js";
3
+ var p = (a) => {
4
+ const [r, t] = c({
5
+ prefix: "TanstackQueryDevtools"
6
+ }), n = d(), s = f(() => {
7
+ const o = r.theme_preference || l;
8
+ return o !== "system" ? o : n();
9
+ });
10
+ return e(i.Provider, {
11
+ value: a,
12
+ get children() {
13
+ return e(m, {
14
+ localStore: r,
15
+ setLocalStore: t,
16
+ get children() {
17
+ return e(v.Provider, {
18
+ value: s,
19
+ get children() {
20
+ return e(u, {
21
+ localStore: r,
22
+ setLocalStore: t
23
+ });
24
+ }
25
+ });
26
+ }
27
+ });
28
+ }
29
+ });
30
+ }, C = p;
31
+ export {
32
+ C as default
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-CVTL7vE4.js";
2
- import { n as v, o as C, p as e } from "./index-BtzcJ4Ep.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-bWTEzVUO.js";
2
+ import { r as v, t as C, v as e } from "./index-CVOSTJhz.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
- }, g = h;
39
+ }, p = h;
40
40
  export {
41
- g as default
41
+ p as default
42
42
  };
@@ -1,11 +1,11 @@
1
- import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { d as V, a as w, u as S, h as q, $ as G, b as H, X as Q, i as X, G as k, J as M, x as W, e as j, W as J, E as D, K as P, v as Y, l as Z, H as z, D as ee, N as ae, Z as te } from "./index-BtzcJ4Ep.js";
1
+ import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
+ import { u as w, h as M, a as N, j as k, W as x, b as K, X as Q, k as X, l as Y, s as j, z, d as G, o as H, _ as A, p as P, y as W, Y as J, M as Z, S as ee, A as ae, q as te } from "./index-CVOSTJhz.js";
3
3
  import { useRef as se, useEffect as f, useMemo as R } from "react";
4
- const F = (a, n, d, l, p, r) => {
5
- const t = P(a, n, p), s = t.value, i = Y(s);
4
+ const D = (a, n, d, l, b, r) => {
5
+ const t = P(a, n, b), s = t.value, i = W(s);
6
6
  let o = s;
7
7
  i === "Image" && (o = /* @__PURE__ */ u(
8
- z,
8
+ Z,
9
9
  {
10
10
  imageSrc: s,
11
11
  alt: s,
@@ -20,32 +20,32 @@ const F = (a, n, d, l, p, r) => {
20
20
  hideThumbnail: r
21
21
  }
22
22
  )), i === "PDF" && (o = /* @__PURE__ */ u(ae, { id: `${s}-pdf`, src: s }));
23
- const b = p("OBSERVATIONS_RECORDED_BY", {
23
+ const p = b("OBSERVATIONS_RECORDED_BY", {
24
24
  provider: t.provider
25
- }), m = a.display, v = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${v}-${m}-${d}-${n}` : `${v}-${m}-${d}-${n}`;
25
+ }), m = a.display, y = a.observationValue?.isAbnormal ? "abnormal-obs" : "obs", c = l ? `${l}-${y}-${m}-${d}-${n}` : `${y}-${m}-${d}-${n}`;
26
26
  return /* @__PURE__ */ u(
27
- Z,
27
+ J,
28
28
  {
29
29
  header: t.header,
30
30
  value: o,
31
- info: b,
31
+ info: p,
32
32
  id: c,
33
33
  testId: c,
34
34
  ariaLabel: c
35
35
  },
36
36
  `obs-${a.id}`
37
37
  );
38
- }, re = (a, n, d, l, p, r, t) => /* @__PURE__ */ u(
39
- D,
38
+ }, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
39
+ A,
40
40
  {
41
41
  title: a.display,
42
42
  id: `grouped-obs-${a.display}-${l}`,
43
43
  open: d,
44
44
  children: a.members?.map(
45
- (s, i) => F(
45
+ (s, i) => D(
46
46
  s,
47
47
  i,
48
- p,
48
+ b,
49
49
  r,
50
50
  n,
51
51
  t
@@ -58,19 +58,19 @@ const F = (a, n, d, l, p, r) => {
58
58
  title: n = "",
59
59
  hideThumbnail: d
60
60
  }) => {
61
- const { t: l } = S(), p = (r, t, s) => {
62
- const i = J(r.encounterDetails, l);
63
- return /* @__PURE__ */ I(
64
- D,
61
+ const { t: l } = N(), b = (r, t, s) => {
62
+ const i = H(r.encounterDetails, l);
63
+ return /* @__PURE__ */ S(
64
+ A,
65
65
  {
66
66
  title: i,
67
67
  id: `encounter-${r.encounterId}`,
68
68
  open: t,
69
69
  children: [
70
70
  r.observations.map(
71
- (o, b) => F(
71
+ (o, p) => D(
72
72
  o,
73
- b,
73
+ p,
74
74
  s,
75
75
  n,
76
76
  l,
@@ -78,11 +78,11 @@ const F = (a, n, d, l, p, r) => {
78
78
  )
79
79
  ),
80
80
  r.groupedObservations.map(
81
- (o, b) => re(
81
+ (o, p) => re(
82
82
  o,
83
83
  l,
84
84
  t,
85
- b,
85
+ p,
86
86
  s,
87
87
  n,
88
88
  d
@@ -100,46 +100,46 @@ const F = (a, n, d, l, p, r) => {
100
100
  "data-testid": "obs-by-encounter-test-id",
101
101
  "aria-label": "obs-by-encounter-aria-label",
102
102
  children: a.map(
103
- (r, t) => p(r, t === 0, t)
103
+ (r, t) => b(r, t === 0, t)
104
104
  )
105
105
  }
106
106
  );
107
- }, oe = "_observations_w45xp_1", ne = "_title_w45xp_18", N = {
107
+ }, oe = "_observations_w45xp_1", ne = "_title_w45xp_18", I = {
108
108
  observations: oe,
109
109
  title: ne
110
- }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], be = ({ config: a }) => {
110
+ }, de = (a) => ["conceptUuid", a], le = (a, n) => ["observations", a, ...n], pe = ({ config: a }) => {
111
111
  const n = a, {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
- hideThumbnail: p = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = w(), { t: i } = S(), o = q({
114
+ hideThumbnail: b = !1
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = w(), { addNotification: s } = M(), { t: i } = N(), o = k({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
- queryFn: () => G(e),
118
+ queryFn: () => x(e),
119
119
  enabled: !!e
120
120
  }))
121
121
  });
122
122
  f(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const K = d[h];
125
+ const q = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: K }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: q }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
132
132
  });
133
133
  }, [o, d]);
134
- const b = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...b, ...l])], [b, l]), v = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
134
+ const p = R(() => o.map((e) => e.data?.uuid).filter((e) => !!e), [o]), m = R(() => [.../* @__PURE__ */ new Set([...p, ...l])], [p, l]), y = R(() => d.length === 0 ? !0 : o.every((e) => !e.isLoading), [o, d.length]), {
135
135
  data: c,
136
- isLoading: A,
136
+ isLoading: F,
137
137
  isError: T,
138
138
  refetch: g
139
- } = H({
139
+ } = K({
140
140
  queryKey: le(t, m),
141
141
  queryFn: () => te(t, m),
142
- enabled: !!t && m.length > 0 && v
142
+ enabled: !!t && m.length > 0 && y
143
143
  });
144
144
  Q(
145
145
  (e) => {
@@ -155,49 +155,49 @@ const F = (a, n, d, l, p, r) => {
155
155
  type: "error"
156
156
  });
157
157
  }, [T]);
158
- const $ = R(() => {
158
+ const _ = R(() => {
159
159
  if (!c) return [];
160
- const e = X(c), h = k(e);
161
- return M(h);
160
+ const e = X(c), h = Y(e);
161
+ return j(h);
162
162
  }, [c]), L = [
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
165
165
  { key: "form", header: "form" }
166
- ], O = A || !v, _ = T && v, C = (!c || c.entry?.length === 0 || m.length === 0) && v, U = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, x = C ? i("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !O && !_, E = n.titleTranslationKey, y = E ? i(E) : "";
167
- return /* @__PURE__ */ I(
166
+ ], O = F || !y, $ = T && y, C = (!c || c.entry?.length === 0 || m.length === 0) && y, U = $ ? i("ERROR_FETCHING_OBSERVATIONS") : null, B = C ? i("NO_OBSERVATIONS_FOUND") : void 0, V = _.length > 0 && !O && !$, E = n.titleTranslationKey, v = E ? i(E) : "";
167
+ return /* @__PURE__ */ S(
168
168
  "div",
169
169
  {
170
170
  id: "observations",
171
- "data-testid": E ? `observations-${y}` : "observations",
171
+ "data-testid": E ? `observations-${v}` : "observations",
172
172
  "aria-label": "observations-aria-label",
173
- className: N.observations,
173
+ className: I.observations,
174
174
  children: [
175
175
  /* @__PURE__ */ u(
176
- W,
176
+ z,
177
177
  {
178
178
  id: "observations-title",
179
- testId: E ? `observations-title-${y}` : "observations-title",
180
- title: y,
181
- className: N.title,
182
- children: /* @__PURE__ */ u("p", { children: y })
179
+ testId: E ? `observations-title-${v}` : "observations-title",
180
+ title: v,
181
+ className: I.title,
182
+ children: /* @__PURE__ */ u("p", { children: v })
183
183
  }
184
184
  ),
185
- B ? /* @__PURE__ */ u(
185
+ V ? /* @__PURE__ */ u(
186
186
  ie,
187
187
  {
188
- groupedData: $,
189
- title: y,
190
- hideThumbnail: p
188
+ groupedData: _,
189
+ title: v,
190
+ hideThumbnail: b
191
191
  }
192
192
  ) : /* @__PURE__ */ u(
193
- j,
193
+ G,
194
194
  {
195
195
  headers: L,
196
196
  rows: [],
197
197
  ariaLabel: i("OBSERVATIONS"),
198
198
  loading: O,
199
199
  errorStateMessage: U,
200
- emptyStateMessage: x,
200
+ emptyStateMessage: B,
201
201
  dataTestId: "observations-table"
202
202
  }
203
203
  )
@@ -207,6 +207,6 @@ const F = (a, n, d, l, p, r) => {
207
207
  };
208
208
  export {
209
209
  de as conceptUuidQueryKeys,
210
- be as default,
210
+ pe as default,
211
211
  le as observationsQueryKeys
212
212
  };
@@ -1,4 +1,4 @@
1
- import { q as we, s as z, t as xt, w as B, o as q, p as y, y as Ro, z as ye, S as R, C as _, L as k, M as N, O as A, Q as bs, T as ir, U as $e, V as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-BtzcJ4Ep.js";
1
+ import { x as we, B as z, D as xt, E as B, t as q, v as y, P as Ro, F as ye, H as R, I as _, L as k, N, O as A, U as bs, V as ir, Z as $e, $ as U, a0 as Hn, a1 as Vn, a2 as dt, a3 as D, a4 as xs, a5 as cn, a6 as Be, a7 as ws, a8 as qt, a9 as zt, aa as $s, ab as Cs, ac as $n, ad as Ss, ae as Nr, af as Bt, ag as zo, ah as ks, ai as Es, aj as j, ak as Ur, al as Ms, am as Ds, an as sr, ao as As, ap as Ts, aq as zn, ar as Fs, as as Is, at as Z, au as Ps, av as Ls } from "./index-CVOSTJhz.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {