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

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-RUF6Vd1d.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-RUF6Vd1d.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-RUF6Vd1d.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";