@bahmni/widgets 0.0.1-dev.351 → 0.0.1-dev.352

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 r, jsxs as T, Fragment as Y } from "react/jsx-runtime";
2
- import { u as W, a as X, y as J, B as Z, D as x, q as ee, F as te } from "./index-_K1cix3h.js";
2
+ import { u as W, a as X, y as J, B as Z, D as x, q as ee, F as te } from "./index-C1aiHQqT.js";
3
3
  import { useQuery as ne } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  import { useTranslation as ae } from "react-i18next";
@@ -1,5 +1,5 @@
1
1
  import { jsx as i, jsxs as x, Fragment as be } from "react/jsx-runtime";
2
- import { u as ye, b as pe, c as Oe, Q as Ne, W as Te, Y as Ee, G as Fe, P as Ie, d as ve, e as _e, f as Ae, g as z, D as Re, l as j, $ as K, B as De, q as Q, T as Me, R as Be, F as Ce, O as Le, C as Se } from "./index-_K1cix3h.js";
2
+ import { u as ye, b as pe, c as Oe, Q as Ne, W as Te, Y as Ee, G as Fe, $ as Ie, d as ve, e as _e, f as Ae, g as z, D as Re, l as j, h as K, B as De, q as Q, T as Me, R as Be, F as Ce, O as Le, C as Se } from "./index-C1aiHQqT.js";
3
3
  import { useQueryClient as Ue, useQuery as T } from "@tanstack/react-query";
4
4
  import { useState as Y, useMemo as d, useCallback as l } from "react";
5
5
  import { useTranslation as we } from "react-i18next";
@@ -104,8 +104,8 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
104
104
  const e = {}, r = (o, t) => {
105
105
  for (const s of o)
106
106
  if (s.type === "section") {
107
- const h = s.label?.value ?? "Section";
108
- r(s.controls ?? [], h);
107
+ const g = s.label?.value ?? "Section";
108
+ r(s.controls ?? [], g);
109
109
  } else
110
110
  s.id != null && t && (e[String(s.id)] = t), s.controls && r(s.controls, t);
111
111
  };
@@ -118,19 +118,19 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
118
118
  return z(v).message;
119
119
  if (A)
120
120
  return z(A).message;
121
- }, [v, A]), g = d(
121
+ }, [v, A]), h = d(
122
122
  () => [
123
123
  { key: "recordedOn", header: n("RECORDED_ON") },
124
124
  { key: "recordedBy", header: n("RECORDED_BY") }
125
125
  ],
126
126
  [n]
127
127
  ), q = d(
128
- () => [...g, { key: "actions", header: n("ACTIONS") }],
129
- [g, n]
128
+ () => [...h, { key: "actions", header: n("ACTIONS") }],
129
+ [h, n]
130
130
  ), ue = l(
131
- (e) => F && e.some((o) => f(o)) ? q : g,
132
- [F, f, q, g]
133
- ), fe = g, ge = d(
131
+ (e) => F && e.some((o) => f(o)) ? q : h,
132
+ [F, f, q, h]
133
+ ), fe = h, he = d(
134
134
  () => [
135
135
  { key: "recordedOn", sortable: !0 },
136
136
  { key: "recordedBy", sortable: !0 }
@@ -141,12 +141,12 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
141
141
  (o, t) => {
142
142
  const s = t.formName;
143
143
  o[s] ??= [];
144
- const h = t.providers.map((he) => he.providerName).filter(Boolean).join(", ");
144
+ const g = t.providers.map((ge) => ge.providerName).filter(Boolean).join(", ");
145
145
  return o[s].push({
146
146
  id: t.encounterUuid,
147
147
  formName: t.formName,
148
148
  recordedOn: Re(t.encounterDateTime, n, !0).formattedResult,
149
- recordedBy: h ?? "--",
149
+ recordedBy: g ?? "--",
150
150
  encounterDateTime: t.encounterDateTime,
151
151
  encounterUuid: t.encounterUuid
152
152
  }), o;
@@ -157,7 +157,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
157
157
  ([o, t]) => ({
158
158
  formName: o,
159
159
  records: t.sort(
160
- (s, h) => h.encounterDateTime - s.encounterDateTime
160
+ (s, g) => g.encounterDateTime - s.encounterDateTime
161
161
  )
162
162
  })
163
163
  ).sort((o, t) => o.formName.localeCompare(t.formName));
@@ -233,7 +233,7 @@ const He = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
233
233
  rows: t,
234
234
  loading: !1,
235
235
  errorStateMessage: "",
236
- sortable: ge,
236
+ sortable: he,
237
237
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
238
238
  renderCell: G,
239
239
  className: E.formsTableBody,
@@ -1,5 +1,5 @@
1
1
  import { jsx as d, jsxs as N } from "react/jsx-runtime";
2
- import { h as Q, i as D, t as V, j as q, k as w, m as k, n as H, o as P, u as G, a as j, p as z, A as J, d as W, r as Y, s as X, v as Z, w as x, q as ee } from "./index-_K1cix3h.js";
2
+ import { i as Q, j as D, t as V, k as q, m as w, n as k, o as H, p as G, u as P, a as j, r as z, A as J, d as W, s as Y, v as X, w as Z, x, q as ee } from "./index-C1aiHQqT.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";
@@ -21,7 +21,7 @@ const A = (t, i, c, l, u, r) => {
21
21
  videoSrc: o,
22
22
  hideThumbnail: r
23
23
  }
24
- )), a === "PDF" && (n = /* @__PURE__ */ d(P, { id: `${o}-pdf`, src: o }));
24
+ )), a === "PDF" && (n = /* @__PURE__ */ d(G, { id: `${o}-pdf`, src: o }));
25
25
  const b = u("OBSERVATIONS_RECORDED_BY", {
26
26
  provider: s.provider
27
27
  }), m = t.display, p = t.observationValue?.isAbnormal ? "abnormal-obs" : "obs", y = l ? `${l}-${p}-${m}-${c}-${i}` : `${p}-${m}-${c}-${i}`;
@@ -114,7 +114,7 @@ const A = (t, i, c, l, u, r) => {
114
114
  conceptNames: c = [],
115
115
  conceptUuid: l = [],
116
116
  hideThumbnail: u = !1
117
- } = i, r = oe(/* @__PURE__ */ new Set()), s = G(), { addNotification: o } = j(), { t: a } = U(), n = te({
117
+ } = i, r = oe(/* @__PURE__ */ new Set()), s = P(), { addNotification: o } = j(), { t: a } = U(), n = te({
118
118
  queries: c.map((e) => ({
119
119
  queryKey: ce(e),
120
120
  queryFn: () => z(e),
@@ -165,7 +165,7 @@ const A = (t, i, c, l, u, r) => {
165
165
  { key: "name", header: "name" },
166
166
  { key: "value", header: "value" },
167
167
  { key: "form", header: "form" }
168
- ], I = y || !f, $ = h && f, F = (!p || p.entry?.length === 0 || m.length === 0) && f, L = $ ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, K = _.length > 0 && !I && !$, O = i.titleTranslationKey, E = O ? a(O) : "";
168
+ ], $ = y || !f, I = h && f, F = (!p || p.entry?.length === 0 || m.length === 0) && f, L = I ? a("ERROR_FETCHING_OBSERVATIONS") : null, M = F ? a("NO_OBSERVATIONS_FOUND") : void 0, K = _.length > 0 && !$ && !I, O = i.titleTranslationKey, E = O ? a(O) : "";
169
169
  return /* @__PURE__ */ N(
170
170
  "div",
171
171
  {
@@ -197,7 +197,7 @@ const A = (t, i, c, l, u, r) => {
197
197
  headers: B,
198
198
  rows: [],
199
199
  ariaLabel: a("OBSERVATIONS"),
200
- loading: I,
200
+ loading: $,
201
201
  errorStateMessage: L,
202
202
  emptyStateMessage: M,
203
203
  dataTestId: "observations-table"