@bahmni/widgets 0.0.1-dev.453 → 0.0.1-dev.455

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,9 +1,9 @@
1
1
  import { jsx as o, jsxs as _, Fragment as Ee } from "react/jsx-runtime";
2
- import { p as fe, a as Ae, u as ge, b as Ne, c as Ce, d as De, Q as Ie, N as Le, i as Oe, v as be, X as ye, _ as X, e as Se, f as ve, x as we, W as Ue, g as Me, h as J, r as te } from "./index-ClqkhB6j.js";
2
+ import { p as fe, a as Ae, u as ge, b as Ce, c as Ne, d as De, Q as Ie, A as Le, i as Oe, M as be, e as ye, _ as J, N as Se, f as ve, x as we, W as Me, g as Ue, h as X, j as te } from "./index-DgKYjKyR.js";
3
3
  import { useQuery as Re } from "@tanstack/react-query";
4
4
  import { useState as p, useRef as Pe, useEffect as f, useMemo as A, useCallback as E } from "react";
5
5
  import { useTranslation as ke } from "react-i18next";
6
- const He = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", $e = "DocumentsTable-module_documentViewerContainer__F5m8D", Fe = "DocumentsTable-module_printContainer__rtarJ", Ve = "DocumentsTable-module_attachmentItem__17KA7", We = "DocumentsTable-module_attachmentCounter__WFiI3", ze = "DocumentsTable-module_attachmentError__RI4U2", Ye = "DocumentsTable-module_documentIframe__ptq5I", Ge = "DocumentsTable-module_attachmentContent__IaCEe", qe = "DocumentsTable-module_attachmentLoading__FAR6p", Ke = "DocumentsTable-module_hiddenWhileLoading__IxocW", Qe = "DocumentsTable-module_documentImage__KQVgS", je = "DocumentsTable-module_header__345GY", Xe = "DocumentsTable-module_documentTypeCell__uWGM8", Je = "DocumentsTable-module_printAllButton__IVYUW", Ze = "DocumentsTable-module_attachmentHeader__yI2xn", c = {
6
+ const He = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", $e = "DocumentsTable-module_documentViewerContainer__F5m8D", Fe = "DocumentsTable-module_printContainer__rtarJ", Ve = "DocumentsTable-module_attachmentItem__17KA7", We = "DocumentsTable-module_attachmentCounter__WFiI3", ze = "DocumentsTable-module_attachmentError__RI4U2", Ye = "DocumentsTable-module_documentIframe__ptq5I", Ge = "DocumentsTable-module_attachmentContent__IaCEe", qe = "DocumentsTable-module_attachmentLoading__FAR6p", Ke = "DocumentsTable-module_hiddenWhileLoading__IxocW", Qe = "DocumentsTable-module_documentImage__KQVgS", je = "DocumentsTable-module_header__345GY", Je = "DocumentsTable-module_documentTypeCell__uWGM8", Xe = "DocumentsTable-module_printAllButton__IVYUW", Ze = "DocumentsTable-module_attachmentHeader__yI2xn", c = {
7
7
  documentsTableBody: He,
8
8
  viewAttachmentsLink: Be,
9
9
  documentViewerContainer: $e,
@@ -17,8 +17,8 @@ const He = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTab
17
17
  hiddenWhileLoading: Ke,
18
18
  documentImage: Qe,
19
19
  header: je,
20
- documentTypeCell: Xe,
21
- printAllButton: Je,
20
+ documentTypeCell: Je,
21
+ printAllButton: Xe,
22
22
  attachmentHeader: Ze
23
23
  }, xe = {
24
24
  documentIdentifier: "DOCUMENTS_DOCUMENT_IDENTIFIER",
@@ -89,27 +89,27 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
89
89
  ], ht = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, ee = (n) => n.attachments.length > 0 ? n.attachments : n.documentUrl ? [{ url: n.documentUrl, contentType: n.contentType }] : [], At = ({ config: n, encounterUuids: d }) => {
90
90
  const [l, D] = p(!1), [r, g] = p(
91
91
  null
92
- ), [y, U] = p(
92
+ ), [y, M] = p(
93
93
  /* @__PURE__ */ new Set()
94
- ), [S, M] = p(
94
+ ), [S, U] = p(
95
95
  /* @__PURE__ */ new Set()
96
96
  ), I = Pe(null), [R, V] = p(
97
97
  null
98
98
  ), W = R !== null;
99
99
  f(() => () => I.current?.abort(), []);
100
- const N = ge(), { t: s } = ke(), { addNotification: v } = Ne(), h = A(
100
+ const C = ge(), { t: s } = ke(), { addNotification: v } = Ce(), h = A(
101
101
  () => n?.actions?.find(
102
102
  (e) => e.type === lt
103
103
  ),
104
104
  [n?.actions]
105
- ), ae = Ce(h?.requiredPrivilege), oe = !!h && ae, se = Number(n?.pageSize) || 5, [P, k] = p(1), [L, re] = p(se), [ce, H] = p(void 0), z = E((e) => {
105
+ ), ae = Ne(h?.requiredPrivilege), oe = !!h && ae, se = Number(n?.pageSize) || 5, [P, k] = p(1), [L, re] = p(se), [ce, H] = p(void 0), z = E((e) => {
106
106
  g(e), D(!0);
107
107
  }, []), le = E(() => {
108
- I.current?.abort(), M(/* @__PURE__ */ new Set()), D(!1), g(null), U(/* @__PURE__ */ new Set());
108
+ I.current?.abort(), U(/* @__PURE__ */ new Set()), D(!1), g(null), M(/* @__PURE__ */ new Set());
109
109
  }, []), Y = E((e) => {
110
- M((t) => new Set(t).add(e));
111
- }, []), G = E((e) => {
112
110
  U((t) => new Set(t).add(e));
111
+ }, []), G = E((e) => {
112
+ M((t) => new Set(t).add(e));
113
113
  }, []), de = E(() => {
114
114
  h && globalThis.dispatchEvent(
115
115
  new CustomEvent(ct, {
@@ -123,14 +123,14 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
123
123
  }, [h]), { data: O, isLoading: ie, isError: B, error: $, refetch: q } = Re({
124
124
  queryKey: [
125
125
  "documents",
126
- N,
126
+ C,
127
127
  d,
128
128
  P,
129
129
  L
130
130
  ],
131
- enabled: !!N,
131
+ enabled: !!C,
132
132
  queryFn: () => De(
133
- N,
133
+ C,
134
134
  d,
135
135
  L,
136
136
  P
@@ -138,14 +138,14 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
138
138
  });
139
139
  Ie(
140
140
  (e) => {
141
- e.patientUUID === N && e.updatedResources.documents && q();
141
+ e.patientUUID === C && e.updatedResources.documents && q();
142
142
  },
143
- [N, q]
143
+ [C, q]
144
144
  ), f(() => {
145
145
  O && H(O.total);
146
146
  }, [O]), f(() => {
147
147
  k(1), H(void 0);
148
- }, [N]), f(() => {
148
+ }, [C]), f(() => {
149
149
  B && v({
150
150
  title: s("ERROR_DEFAULT_TITLE"),
151
151
  message: $?.message ?? "",
@@ -157,9 +157,9 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
157
157
  if (!l || !r) return;
158
158
  const a = /* @__PURE__ */ new Set(), u = ee(r);
159
159
  for (let i = 0; i < u.length; i++) {
160
- const C = b(u[i].url);
160
+ const N = b(u[i].url);
161
161
  try {
162
- (await fetch(C, {
162
+ (await fetch(N, {
163
163
  method: "HEAD",
164
164
  signal: e.signal
165
165
  })).ok || a.add(i);
@@ -167,7 +167,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
167
167
  T instanceof Error && T.name !== "AbortError" && a.add(i);
168
168
  }
169
169
  }
170
- e.signal.aborted || U(a);
170
+ e.signal.aborted || M(a);
171
171
  })(), () => e.abort();
172
172
  }, [l, r]), f(() => {
173
173
  if (!l || !r) return;
@@ -183,11 +183,11 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
183
183
  }, i = (T) => {
184
184
  const pe = T.target;
185
185
  it.has(T.key) && !pe?.closest("button, input, textarea, select, a") && a();
186
- }, C = () => {
186
+ }, N = () => {
187
187
  !t && e.scrollTop !== 0 && (e.scrollTop = 0);
188
188
  };
189
- return e.addEventListener("wheel", a, { passive: !0 }), e.addEventListener("touchmove", a, { passive: !0 }), e.addEventListener("mousedown", u), e.addEventListener("keydown", i), e.addEventListener("scroll", C), () => {
190
- e.removeEventListener("wheel", a), e.removeEventListener("touchmove", a), e.removeEventListener("mousedown", u), e.removeEventListener("keydown", i), e.removeEventListener("scroll", C);
189
+ return e.addEventListener("wheel", a, { passive: !0 }), e.addEventListener("touchmove", a, { passive: !0 }), e.addEventListener("mousedown", u), e.addEventListener("keydown", i), e.addEventListener("scroll", N), () => {
190
+ e.removeEventListener("wheel", a), e.removeEventListener("touchmove", a), e.removeEventListener("mousedown", u), e.removeEventListener("keydown", i), e.removeEventListener("scroll", N);
191
191
  };
192
192
  }, [l, r]);
193
193
  const me = E(
@@ -213,7 +213,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
213
213
  f(() => {
214
214
  if (!l || m.length === 0) return;
215
215
  const e = setTimeout(
216
- () => M(new Set(m.keys())),
216
+ () => U(new Set(m.keys())),
217
217
  mt
218
218
  );
219
219
  return () => clearTimeout(e);
@@ -292,7 +292,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
292
292
  oe && /* @__PURE__ */ _(ye, { className: c.header, testId: "documents-header", children: [
293
293
  /* @__PURE__ */ o("p", { children: s("DOCUMENTS_TABLE_HEADING") }),
294
294
  /* @__PURE__ */ o(
295
- X,
295
+ J,
296
296
  {
297
297
  autoAlign: !0,
298
298
  size: "lg",
@@ -324,7 +324,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
324
324
  }
325
325
  ) }),
326
326
  l && r && /* @__PURE__ */ o(
327
- Ue,
327
+ Me,
328
328
  {
329
329
  id: "modalIdForActionAreaLayout",
330
330
  portalId: "main-display-area",
@@ -336,12 +336,12 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
336
336
  testId: "document-view-modal",
337
337
  children: /* @__PURE__ */ _("div", { className: c.documentViewerContainer, children: [
338
338
  j.length > 1 && /* @__PURE__ */ o(
339
- Me,
339
+ Ue,
340
340
  {
341
341
  kind: "tertiary",
342
342
  size: "sm",
343
343
  className: c.printAllButton,
344
- renderIcon: R === "all" ? x : J,
344
+ renderIcon: R === "all" ? x : X,
345
345
  disabled: W || !K,
346
346
  testId: "print-all-attachments",
347
347
  onClick: () => Q(j, "all"),
@@ -349,8 +349,8 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
349
349
  }
350
350
  ),
351
351
  m.map((e, t) => {
352
- const a = b(e.url), u = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || ht.test(e.url ?? ""), C = y.has(t);
353
- return a === "#" || C ? /* @__PURE__ */ _(
352
+ const a = b(e.url), u = e.contentType?.toLowerCase().includes("pdf"), i = (e.contentType?.toLowerCase().includes("image") ?? !1) || ht.test(e.url ?? ""), N = y.has(t);
353
+ return a === "#" || N ? /* @__PURE__ */ _(
354
354
  "div",
355
355
  {
356
356
  className: c.attachmentError,
@@ -376,7 +376,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
376
376
  total: m.length
377
377
  }) }) : /* @__PURE__ */ o("span", {}),
378
378
  /* @__PURE__ */ o(
379
- X,
379
+ J,
380
380
  {
381
381
  kind: "ghost",
382
382
  size: "sm",
@@ -386,7 +386,7 @@ const ct = "startConsultation", lt = "add", dt = "documents", Z = "document-prin
386
386
  disabled: W || !K,
387
387
  testId: `print-attachment-${t}`,
388
388
  onClick: () => Q([e], t),
389
- children: R === t ? /* @__PURE__ */ o(x, {}) : /* @__PURE__ */ o(J, {})
389
+ children: R === t ? /* @__PURE__ */ o(x, {}) : /* @__PURE__ */ o(X, {})
390
390
  }
391
391
  )
392
392
  ] }),
@@ -1,27 +1,27 @@
1
1
  import { jsx as n, jsxs as x, Fragment as ie } from "react/jsx-runtime";
2
- import { u as de, c as le, j as me, C as ce, k as ue, l as fe, m as Ne, Q as be, n as he, o as ye, J as Oe, i as ge, _ as q, P as V, N as Te, x as $, q as pe, s as Ee, W as Ie, O as Fe, t as Ae } from "./index-ClqkhB6j.js";
3
- import { useQueryClient as _e, useQuery as F } from "@tanstack/react-query";
4
- import { useState as j, useMemo as i, useCallback as d } from "react";
2
+ import { u as de, c as le, k as me, C as ce, l as ue, m as fe, n as be, Q as he, o as Ne, q as ye, J as Oe, i as ge, _ as q, P as V, A as Te, x as $, r as pe, s as Ee, W as Ie, O as Ae, t as Fe } from "./index-DgKYjKyR.js";
3
+ import { useQueryClient as _e, useQuery as A } from "@tanstack/react-query";
4
+ import { useState as G, useMemo as i, useCallback as d } from "react";
5
5
  import { useTranslation as ve } from "react-i18next";
6
6
  const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_modalHeading__wnTmA", De = "FormsTable-module_customAccordianItem__isszs", y = {
7
7
  formsTableBody: Re,
8
8
  modalHeading: Ce,
9
9
  customAccordianItem: De
10
10
  }, Le = "startConsultation", ke = ({
11
- episodeOfCareUuids: A,
11
+ episodeOfCareUuids: F,
12
12
  encounterUuids: m,
13
- config: G,
14
- disableActions: Q = !1,
15
- activeEncounterUuid: N = null
13
+ config: Q,
14
+ disableActions: j = !1,
15
+ activeEncounterUuid: b = null
16
16
  }) => {
17
- const { t: o } = ve(), c = de(), [O, _] = j(!1), [a, v] = j(null), {
17
+ const { t: o } = ve(), c = de(), [O, _] = G(!1), [a, v] = G(null), {
18
18
  numberOfVisits: z,
19
19
  hideThumbnail: K = !1,
20
- forms: b
21
- } = G ?? {}, W = le(
22
- Ae.EDIT_OBSERVATIONS
23
- ), { userPrivileges: h } = me(), g = W && !Q && !!N, R = ce(
24
- A,
20
+ forms: h
21
+ } = Q ?? {}, W = le(
22
+ Fe.EDIT_OBSERVATIONS
23
+ ), { userPrivileges: N } = me(), g = W && !j && !!b, R = ce(
24
+ F,
25
25
  m
26
26
  ), J = _e(), {
27
27
  data: C = [],
@@ -29,18 +29,18 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
29
29
  isError: L,
30
30
  error: Y,
31
31
  refetch: X
32
- } = F({
33
- queryKey: ["forms", c, A],
32
+ } = A({
33
+ queryKey: ["forms", c, F],
34
34
  queryFn: () => ue(c, void 0, z),
35
35
  enabled: !!c && !R
36
36
  }), S = i(() => {
37
37
  let e = C;
38
38
  return m && m.length > 0 && (e = e.filter(
39
39
  (t) => m.includes(t.encounterUuid)
40
- )), Array.isArray(b) && b.length > 0 && (e = e.filter(
41
- (t) => b.some((s) => s.toLowerCase() === t.formName.toLowerCase())
40
+ )), Array.isArray(h) && h.length > 0 && (e = e.filter(
41
+ (t) => h.some((s) => s.toLowerCase() === t.formName.toLowerCase())
42
42
  )), e;
43
- }, [C, m, b]), { data: B = [] } = F({
43
+ }, [C, m, h]), { data: B = [] } = A({
44
44
  queryKey: ["observationForms"],
45
45
  queryFn: () => fe()
46
46
  }), M = d(
@@ -49,33 +49,33 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
49
49
  (r) => r.name.toLowerCase() === e.toLowerCase()
50
50
  );
51
51
  if (!t?.privileges || t.privileges.length === 0) return !0;
52
- if (!h || h.length === 0) return !1;
53
- const s = new Set(h.map((r) => r.name));
52
+ if (!N || N.length === 0) return !1;
53
+ const s = new Set(N.map((r) => r.name));
54
54
  return t.privileges.some(
55
55
  (r) => s.has(r.privilegeName) && r.editable
56
56
  );
57
57
  },
58
- [B, h]
58
+ [B, N]
59
59
  ), u = d(
60
- (e) => !N || e.encounterUuid !== N ? !1 : M(e.formName),
61
- [N, M]
60
+ (e) => !b || e.encounterUuid !== b ? !1 : M(e.formName),
61
+ [b, M]
62
62
  ), {
63
63
  data: T,
64
64
  isLoading: Z,
65
65
  isError: ee,
66
66
  error: p
67
- } = F({
67
+ } = A({
68
68
  queryKey: ["formsEncounterFHIR", a?.encounterUuid],
69
- queryFn: () => Ne(a.encounterUuid),
69
+ queryFn: () => be(a.encounterUuid),
70
70
  enabled: !!a?.encounterUuid && O
71
71
  });
72
- be(
72
+ he(
73
73
  (e) => {
74
74
  e.patientUUID === c && (X(), J.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
75
75
  },
76
76
  [c]
77
77
  );
78
- const re = i(() => !T?.entry || !a?.formName ? [] : T.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => he(t) ? ye(t)?.toLowerCase() === a.formName.toLowerCase() : !0), [T, a?.formName]), te = i(() => {
78
+ const re = i(() => !T?.entry || !a?.formName ? [] : T.entry.filter((t) => t.resource?.resourceType === "Observation").map((t) => t.resource).filter((t) => Ne(t) ? ye(t)?.toLowerCase() === a.formName.toLowerCase() : !0), [T, a?.formName]), te = i(() => {
79
79
  if (p)
80
80
  return Oe(p).message;
81
81
  }, [p]), f = i(
@@ -232,7 +232,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", Ce = "FormsTable-module_mo
232
232
  size: "md",
233
233
  testId: "form-details-modal",
234
234
  children: /* @__PURE__ */ n(
235
- Fe,
235
+ Ae,
236
236
  {
237
237
  observations: re,
238
238
  isLoading: Z,
@@ -1,7 +1,7 @@
1
1
  import { jsx as i, jsxs as N } from "react/jsx-runtime";
2
- import { w as q, I as F, y as x, G as z, i as H, z as P, A as j, B as X, F as J, u as W, b as Y, D as Z, C as ee, E as se, H as te, Q as re, K as ae, L as oe, M as ne, R as ie, X as ce, x as le } from "./index-ClqkhB6j.js";
2
+ import { v as q, w as F, y as x, G as z, i as H, z as P, F as j, B as J, D as W, u as Y, b as X, E as Z, C as ee, H as se, I as te, Q as re, K as ae, L as oe, R as ne, S as ie, e as ce, x as le } from "./index-DgKYjKyR.js";
3
3
  import { useQueries as de, useQuery as ue } from "@tanstack/react-query";
4
- import { useRef as pe, useEffect as C, useMemo as T } from "react";
4
+ import { useRef as pe, useEffect as C, useMemo as I } from "react";
5
5
  import { useTranslation as w } from "react-i18next";
6
6
  const be = "Observations-module_observations__RKSyo", me = "Observations-module_title__TJL3z", ve = "Observations-module_wrapper__muk2L", ye = "Observations-module_secondary__14nuS", y = {
7
7
  observations: be,
@@ -20,13 +20,13 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
20
20
  hideThumbnail: r
21
21
  }
22
22
  )), p === "Video" && (o = /* @__PURE__ */ i(
23
- X,
23
+ J,
24
24
  {
25
25
  id: `${e}-video`,
26
26
  videoSrc: e,
27
27
  hideThumbnail: r
28
28
  }
29
- )), p === "PDF" && (o = /* @__PURE__ */ i(J, { id: `${e}-pdf`, src: e }));
29
+ )), p === "PDF" && (o = /* @__PURE__ */ i(W, { id: `${e}-pdf`, src: e }));
30
30
  const b = /* @__PURE__ */ N("div", { className: y.wrapper, children: [
31
31
  /* @__PURE__ */ i("span", { children: a.header.display }),
32
32
  a.header.referenceRange && /* @__PURE__ */ i("span", { className: y.secondary, children: a.header.referenceRange })
@@ -133,7 +133,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
133
133
  conceptUuid: r = [],
134
134
  hideThumbnail: a = !1,
135
135
  scope: e = "all"
136
- } = c, p = pe(/* @__PURE__ */ new Set()), o = W(), { addNotification: b } = Y(), { t: d } = w(), m = de({
136
+ } = c, p = pe(/* @__PURE__ */ new Set()), o = Y(), { addNotification: b } = X(), { t: d } = w(), m = de({
137
137
  queries: u.map((s) => ({
138
138
  queryKey: Ee(s),
139
139
  queryFn: () => Z(s),
@@ -148,7 +148,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
148
148
  type: "error"
149
149
  }), p.current.add(0)) : !s && R && p.current.clear();
150
150
  }, [m, b, d]);
151
- const _ = T(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = T(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = T(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
151
+ const _ = I(() => m.map((s) => s.data?.uuid).filter((s) => !!s), [m]), v = I(() => [.../* @__PURE__ */ new Set([..._, ...r])], [_, r]), f = I(() => u.length === 0 ? !0 : m.every((s) => !s.isLoading), [m, u.length]), g = e === "latest" || e === "latest-encounter", O = ee(
152
152
  l,
153
153
  n
154
154
  ), {
@@ -188,22 +188,22 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
188
188
  type: "error"
189
189
  });
190
190
  }, [S]);
191
- const A = T(() => {
191
+ const A = I(() => {
192
192
  if (!E) return [];
193
193
  let s = ae(E);
194
194
  e === "latest-encounter" && (s = oe(s));
195
195
  const R = ne(s);
196
196
  return ie(R);
197
- }, [E, e]), K = [
197
+ }, [E, e]), Q = [
198
198
  { key: "name", header: "name" },
199
199
  { key: "value", header: "value" },
200
200
  { key: "form", header: "form" }
201
- ], B = V || !f, L = S && f, M = (!E || E.entry?.length === 0 || v.length === 0) && f, Q = L ? d("ERROR_FETCHING_OBSERVATIONS") : null, G = M ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !B && !L, I = c.titleTranslationKey, h = I ? d(I) : "";
201
+ ], B = V || !f, L = S && f, K = (!E || E.entry?.length === 0 || v.length === 0) && f, M = L ? d("ERROR_FETCHING_OBSERVATIONS") : null, G = K ? d("NO_OBSERVATIONS_FOUND") : void 0, k = A.length > 0 && !B && !L, T = c.titleTranslationKey, h = T ? d(T) : "";
202
202
  return /* @__PURE__ */ N(
203
203
  "div",
204
204
  {
205
205
  id: "observations",
206
- "data-testid": I ? `observations-${h}` : "observations",
206
+ "data-testid": T ? `observations-${h}` : "observations",
207
207
  "aria-label": "observations-aria-label",
208
208
  className: y.observations,
209
209
  children: [
@@ -211,7 +211,7 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
211
211
  ce,
212
212
  {
213
213
  id: "observations-title",
214
- testId: I ? `observations-title-${h}` : "observations-title",
214
+ testId: T ? `observations-title-${h}` : "observations-title",
215
215
  title: h,
216
216
  className: y.title,
217
217
  children: /* @__PURE__ */ i("p", { children: h })
@@ -227,11 +227,11 @@ const be = "Observations-module_observations__RKSyo", me = "Observations-module_
227
227
  ) : /* @__PURE__ */ i(
228
228
  le,
229
229
  {
230
- headers: K,
230
+ headers: Q,
231
231
  rows: [],
232
232
  ariaLabel: d("OBSERVATIONS"),
233
233
  loading: B,
234
- errorStateMessage: Q,
234
+ errorStateMessage: M,
235
235
  emptyStateMessage: G ?? d("NO_OBSERVATIONS_AVAILABLE"),
236
236
  dataTestId: "observations-table"
237
237
  }
@@ -107073,7 +107073,7 @@ const E$t = [
107073
107073
  },
107074
107074
  {
107075
107075
  type: "patientDocuments",
107076
- component: Xr(() => import("./DocumentsTable-BDrRTrAy.js"))
107076
+ component: Xr(() => import("./DocumentsTable-Fsfi8fF2.js"))
107077
107077
  },
107078
107078
  {
107079
107079
  type: "flowSheet",
@@ -107081,7 +107081,7 @@ const E$t = [
107081
107081
  },
107082
107082
  {
107083
107083
  type: "forms",
107084
- component: Xr(() => import("./FormsTable-BvhD5iFn.js"))
107084
+ component: Xr(() => import("./FormsTable-MQknnFSF.js"))
107085
107085
  },
107086
107086
  {
107087
107087
  type: "labOrders",
@@ -107089,7 +107089,7 @@ const E$t = [
107089
107089
  },
107090
107090
  {
107091
107091
  type: "observations",
107092
- component: Xr(() => import("./Observations-lazpTtsV.js"))
107092
+ component: Xr(() => import("./Observations-BcrQszGf.js"))
107093
107093
  },
107094
107094
  {
107095
107095
  type: "ordersControl",
@@ -107557,30 +107557,30 @@ const S_e = o.createContext(void 0), S$t = () => {
107557
107557
  };
107558
107558
  export {
107559
107559
  Lkt as $,
107560
- YHe as A,
107560
+ Kn as A,
107561
107561
  XHe as B,
107562
107562
  Ei as C,
107563
- $7t as D,
107564
- xkt as E,
107565
- JHe as F,
107563
+ JHe as D,
107564
+ $7t as E,
107565
+ YHe as F,
107566
107566
  X8e as G,
107567
- Hkt as H,
107568
- akt as I,
107567
+ xkt as H,
107568
+ Hkt as I,
107569
107569
  Rr as J,
107570
107570
  $kt as K,
107571
107571
  Pkt as L,
107572
- kkt as M,
107573
- Kn as N,
107572
+ T2 as M,
107573
+ E0 as N,
107574
107574
  M6 as O,
107575
107575
  Nc as P,
107576
107576
  w1 as Q,
107577
- Zkt as R,
107578
- i6t as S,
107579
- zkt as T,
107580
- Rkt as U,
107581
- Lme as V,
107577
+ kkt as R,
107578
+ Zkt as S,
107579
+ i6t as T,
107580
+ zkt as U,
107581
+ Rkt as V,
107582
107582
  nn as W,
107583
- ui as X,
107583
+ Lme as X,
107584
107584
  Tkt as Y,
107585
107585
  Okt as Z,
107586
107586
  jo as _,
@@ -107643,25 +107643,25 @@ export {
107643
107643
  zr as b,
107644
107644
  w6 as c,
107645
107645
  Nkt as d,
107646
- E0 as e,
107646
+ ui as e,
107647
107647
  K1 as f,
107648
107648
  An as g,
107649
107649
  Yu as h,
107650
107650
  ht as i,
107651
- Z1 as j,
107652
- Akt as k,
107653
- wAe as l,
107654
- fvt as m,
107655
- TNe as n,
107656
- tzt as o,
107651
+ q4 as j,
107652
+ Z1 as k,
107653
+ Akt as l,
107654
+ wAe as m,
107655
+ fvt as n,
107656
+ TNe as o,
107657
107657
  _kt as p,
107658
- qo as q,
107659
- q4 as r,
107658
+ tzt as q,
107659
+ qo as r,
107660
107660
  Wo as s,
107661
107661
  qkt as t,
107662
107662
  dn as u,
107663
- T2 as v,
107664
- Skt as w,
107663
+ Skt as v,
107664
+ akt as w,
107665
107665
  Ir as x,
107666
107666
  Ikt as y,
107667
107667
  e5t as z
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { au as o, as as r, a2 as n, ar as c, aP as g, a3 as l, a7 as d, t as m, aj as P, aA as u, a4 as v, S as T, a5 as C, T as p, U as A, ad as D, ag as S, aa as b, aL as L, aN as N, aO as y, aR as E, a6 as I, aQ as U, al as f, am as h, O, a1 as R, af as W, ah as _, a9 as x, a8 as F, ab as G, ae as M, aJ as V, aI as k, aq as H, ai as w, ac as K, az as j, aw as q, av as z, V as B, aS as Y, o as J, aG as Q, aF as Z, Y as $, ay as X, aC as aa, aD as ea, aE as ta, Z as sa, ax as ia, aB as oa, $ as ra, aH as na, a0 as ca, at as ga, ak as la, an as da, ap as ma, c as Pa, aM as ua, b as va, ao as Ta, u as Ca, aK as pa, j as Aa } from "./index-ClqkhB6j.js";
1
+ import { au as o, as as r, a2 as n, ar as c, aP as g, a3 as l, a7 as d, t as m, aj as P, aA as u, a4 as v, T, a5 as C, U as p, V as A, ad as D, ag as S, aa as b, aL as L, aN as N, aO as y, aR as E, a6 as I, aQ as U, al as f, am as h, O, a1 as R, af as W, ah as _, a9 as x, a8 as k, ab as F, ae as G, aJ as M, aI as V, aq as H, ai as q, ac as w, az as K, aw as z, av as B, X as Y, aS as j, q as J, aG as Q, aF as X, Y as Z, ay as $, aC as aa, aD as ea, aE as ta, Z as sa, ax as ia, aB as oa, $ as ra, aH as na, a0 as ca, at as ga, ak as la, an as da, ap as ma, c as Pa, aM as ua, b as va, ao as Ta, u as Ca, aK as pa, k as Aa } from "./index-DgKYjKyR.js";
2
2
  import "react";
3
3
  import "react/jsx-runtime";
4
4
  import "@tanstack/react-query";
@@ -34,24 +34,24 @@ export {
34
34
  W as PatientProgramsTable,
35
35
  _ as ProgramDetails,
36
36
  x as RadiologyInvestigationReport,
37
- F as RadiologyInvestigationTable,
38
- G as SearchPatient,
39
- M as TaskList,
40
- V as UserActionProvider,
41
- k as UserGlobalAction,
37
+ k as RadiologyInvestigationTable,
38
+ F as SearchPatient,
39
+ G as TaskList,
40
+ M as UserActionProvider,
41
+ V as UserGlobalAction,
42
42
  H as UserPrivilegeProvider,
43
- w as VisitsTable,
44
- K as VitalFlowSheet,
45
- j as clearSearchWidgetRegistry,
46
- q as createConfigHook,
47
- z as createConfigProvider,
48
- B as createEmptyDocumentEntry,
49
- Y as deriveFormSchemaData,
43
+ q as VisitsTable,
44
+ w as VitalFlowSheet,
45
+ K as clearSearchWidgetRegistry,
46
+ z as createConfigHook,
47
+ B as createConfigProvider,
48
+ Y as createEmptyDocumentEntry,
49
+ j as deriveFormSchemaData,
50
50
  J as extractFormName,
51
51
  Q as getAllWidgetConfigs,
52
- Z as getAllWidgetTypes,
53
- $ as getDefaultDocumentType,
54
- X as getSearchWidget,
52
+ X as getAllWidgetTypes,
53
+ Z as getDefaultDocumentType,
54
+ $ as getSearchWidget,
55
55
  aa as getWidget,
56
56
  ea as getWidgetConfig,
57
57
  ta as hasWidget,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.453",
3
+ "version": "0.0.1-dev.455",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",