@bahmni/widgets 0.0.1-dev.234 → 0.0.1-dev.236

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
1
  import { jsx as s, jsxs as _, Fragment as Q } from "react/jsx-runtime";
2
- import { u as W, a as X, e as J, o as Z, T as x, b as ee, y as te } from "./index-DQ9o3tL5.js";
2
+ import { u as W, a as X, e as J, o as Z, T as x, b as ee, y as te } from "./index-DFebiZ-O.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as p, useEffect as N, useMemo as f } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as X, Fragment as Z } from "react/jsx-runtime";
2
- import { K as ee, u as re, P as te, q as oe, x as ae, U as se, N as ne, Q as de, O as S, T as ie, o as me, b as C, c as ce, d as le, y as ue, f as fe } from "./index-DQ9o3tL5.js";
2
+ import { K as ee, u as re, P as te, M as oe, x as ae, U as se, N as ne, Q as de, O as q, T as ie, o as me, b as C, c as ce, d as le, y as ue, f as fe } from "./index-DFebiZ-O.js";
3
3
  import { useQueryClient as ye, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as x, useMemo as d, useCallback as y } from "react";
5
5
  import { useTranslation as pe } from "react-i18next";
@@ -8,12 +8,12 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
8
8
  customAccordianItem: Ne
9
9
  }, ge = (m) => m ? m.extension?.find(
10
10
  (p) => p.url === ee
11
- )?.valueString : void 0, Ie = ({
11
+ )?.valueString : void 0, De = ({
12
12
  episodeOfCareUuids: m,
13
13
  encounterUuids: i,
14
14
  config: p
15
15
  }) => {
16
- const { t: s } = pe(), c = re(), [l, D] = x(!1), [t, I] = x(null), { numberOfVisits: w, hideThumbnail: P = !1 } = p ?? {}, M = te(
16
+ const { t: s } = pe(), c = re(), [l, M] = x(!1), [t, D] = x(null), { numberOfVisits: w, hideThumbnail: P = !1 } = p ?? {}, I = te(
17
17
  m,
18
18
  i
19
19
  ), k = ye(), {
@@ -25,7 +25,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
25
25
  } = f({
26
26
  queryKey: ["forms", c, m],
27
27
  queryFn: () => oe(c, void 0, w),
28
- enabled: !!c && !M
28
+ enabled: !!c && !I
29
29
  }), B = d(() => !i || i.length === 0 ? b : b.filter(
30
30
  (e) => i.includes(e.encounterUuid)
31
31
  ), [b, i]), { data: T = [] } = f({
@@ -66,9 +66,9 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
66
66
  return !r || r.includes(t.formName);
67
67
  }), [h, t?.formName]), G = d(() => {
68
68
  if (g)
69
- return S(g).message;
69
+ return q(g).message;
70
70
  if (O)
71
- return S(O).message;
71
+ return q(O).message;
72
72
  }, [g, O]), L = d(
73
73
  () => [
74
74
  { key: "recordedOn", header: s("RECORDED_ON") },
@@ -106,25 +106,25 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
106
106
  )
107
107
  })
108
108
  ).sort((r, o) => r.formName.localeCompare(o.formName));
109
- }, [B, s]), q = y((e) => {
110
- I(e), D(!0);
109
+ }, [B, s]), U = y((e) => {
110
+ D(e), M(!0);
111
111
  }, []), J = y(() => {
112
- D(!1), I(null);
113
- }, []), U = y(
112
+ M(!1), D(null);
113
+ }, []), S = y(
114
114
  (e, a) => {
115
115
  switch (a) {
116
116
  case "recordedOn":
117
- return /* @__PURE__ */ n(me, { onClick: () => q(e), children: e.recordedOn });
117
+ return /* @__PURE__ */ n(me, { onClick: () => U(e), children: e.recordedOn });
118
118
  case "recordedBy":
119
119
  return e.recordedBy;
120
120
  default:
121
121
  return null;
122
122
  }
123
123
  },
124
- [q]
124
+ [U]
125
125
  );
126
126
  return /* @__PURE__ */ X(Z, { children: [
127
- /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: v || A || _.length === 0 || M ? /* @__PURE__ */ n(
127
+ /* @__PURE__ */ n("div", { "data-testid": "forms-table", children: v || A || _.length === 0 || I ? /* @__PURE__ */ n(
128
128
  C,
129
129
  {
130
130
  headers: L,
@@ -133,7 +133,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
133
133
  loading: v,
134
134
  errorStateMessage: A ? K?.message : void 0,
135
135
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
136
- renderCell: U,
136
+ renderCell: S,
137
137
  className: E.formsTableBody,
138
138
  dataTestId: "forms-table"
139
139
  }
@@ -156,7 +156,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
156
156
  errorStateMessage: "",
157
157
  sortable: Y,
158
158
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
159
- renderCell: U,
159
+ renderCell: S,
160
160
  className: E.formsTableBody,
161
161
  dataTestId: `forms-table-${r}`
162
162
  }
@@ -194,5 +194,5 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", E = {
194
194
  ] });
195
195
  };
196
196
  export {
197
- Ie as default
197
+ De as default
198
198
  };
@@ -1,5 +1,5 @@
1
1
  import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
- import { g as k, E as D, t as w, C as M, l as q, V as K, L as H, H as G, u as P, a as j, h as z, i as Y, Q as J, j as W, k as X, s as Z, m as x, b as ee } from "./index-DQ9o3tL5.js";
2
+ import { g as k, E as D, t as w, C as M, l as q, V as K, L as H, H as G, u as P, a as j, h as z, i as Y, Q as J, j as W, k as X, s as Z, m as x, b as ee } from "./index-DFebiZ-O.js";
3
3
  import { useQueries as te, useQuery as se } from "@tanstack/react-query";
4
4
  import { useRef as oe, useEffect as C, useMemo as g } from "react";
5
5
  import { useTranslation as U } from "react-i18next";
@@ -80572,7 +80572,7 @@ const D0t = [
80572
80572
  },
80573
80573
  {
80574
80574
  type: "patientDocuments",
80575
- component: Lr(() => import("./DocumentsTable-Dvzl2asn.js"))
80575
+ component: Lr(() => import("./DocumentsTable-CgjldoJ1.js"))
80576
80576
  },
80577
80577
  {
80578
80578
  type: "flowSheet",
@@ -80580,7 +80580,7 @@ const D0t = [
80580
80580
  },
80581
80581
  {
80582
80582
  type: "forms",
80583
- component: Lr(() => import("./FormsTable-C4lSdS8d.js"))
80583
+ component: Lr(() => import("./FormsTable-DvuAj8Gz.js"))
80584
80584
  },
80585
80585
  {
80586
80586
  type: "labOrders",
@@ -80588,7 +80588,7 @@ const D0t = [
80588
80588
  },
80589
80589
  {
80590
80590
  type: "observations",
80591
- component: Lr(() => import("./Observations-BTWVV1zU.js"))
80591
+ component: Lr(() => import("./Observations-DFQO-uWz.js"))
80592
80592
  },
80593
80593
  {
80594
80594
  type: "ordersControl",
@@ -80677,7 +80677,7 @@ export {
80677
80677
  yet as J,
80678
80678
  s2t as K,
80679
80679
  _Ue as L,
80680
- Ort as M,
80680
+ h2t as M,
80681
80681
  c2t as N,
80682
80682
  Vr as O,
80683
80683
  gs as P,
@@ -80720,8 +80720,8 @@ export {
80720
80720
  f2t as n,
80721
80721
  xa as o,
80722
80722
  ltt as p,
80723
- h2t as q,
80724
- Itt as r,
80723
+ Itt as q,
80724
+ Ort as r,
80725
80725
  y2t as s,
80726
80726
  g2t as t,
80727
80727
  t1 as u,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a2 as s, a0 as t, A as o, $ as r, p as n, _ as g, r as l, D as P, G as v, I as d, w as c, M as b, J as A, W as T, f as p, n as f, B as C, F as I, v as m, R as u, S as R, Z as W, z as S, a4 as D, a3 as y, aa as N, a9 as U, a6 as h, a7 as x, a8 as G, a5 as H, ab as L, a1 as O, Y as _, a as w, u as z, X as E } from "./index-DQ9o3tL5.js";
1
+ import { a2 as s, a0 as t, A as o, $ as r, p as n, _ as g, q as l, D as P, G as v, I as d, w as c, r as b, J as A, W as T, f as p, n as f, B as C, F as I, v as m, R as u, S as R, Z as W, z as S, a4 as D, a3 as y, aa as N, a9 as U, a6 as h, a7 as x, a8 as G, a5 as H, ab as L, a1 as O, Y as _, a as q, u as w, X as z } from "./index-DFebiZ-O.js";
2
2
  import "react";
3
3
  export {
4
4
  s as ActivePractitionerContext,
@@ -35,7 +35,7 @@ export {
35
35
  L as resetWidgetRegistry,
36
36
  O as useActivePractitioner,
37
37
  _ as useHasPrivilege,
38
- w as useNotification,
39
- z as usePatientUUID,
40
- E as useUserPrivilege
38
+ q as useNotification,
39
+ w as usePatientUUID,
40
+ z as useUserPrivilege
41
41
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/widgets",
3
- "version": "0.0.1-dev.234",
3
+ "version": "0.0.1-dev.236",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",