@bahmni/registration-app 0.0.1-dev.150 → 0.0.1-dev.151

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 t, jsxs as p, Fragment as W } from "react/jsx-runtime";
2
- import { u as J, H as Q, w as X, W as Z, q as ee, U as re, F as ae, i as oe, C as te, A as G, Y as ne, G as se, a as me, V as de, b as U, g as ie, c as v } from "./index-O3L-Q5oy.js";
2
+ import { u as J, H as Q, w as X, K as Z, U as ee, W as re, q as ae, i as oe, C as te, A as G, Y as ne, G as se, a as me, b as de, V as U, g as ie, c as v } from "./index-D9OpcJ-A.js";
3
3
  import { useQuery as h } from "@tanstack/react-query";
4
4
  import { useState as x, useMemo as N, useCallback as y } from "react";
5
5
  const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue = "_formContent_1pd36_18", pe = "_formDetailsContainer_1pd36_25", be = "_observation_1pd36_30", _e = "_groupContainer_1pd36_39", fe = "_rowContainer_1pd36_43", Ne = "_groupLabel_1pd36_48", $e = "_rowLabel_1pd36_58", ge = "_rowValue_1pd36_67", he = "_groupMembers_1pd36_75", ye = "_memberRow_1pd36_81", ve = "_memberLabel_1pd36_86", Ae = "_memberValue_1pd36_94", Me = "_abnormalValue_1pd36_102", Te = "_commentSection_1pd36_110", Ce = "_commentText_1pd36_116", Le = "_nestedGroup_1pd36_125", De = "_nestedGroupLabel_1pd36_132", Oe = "_nestedGroupMembers_1pd36_141", o = {
@@ -218,7 +218,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
218
218
  return R(a.formName);
219
219
  }, [a, R]), {
220
220
  data: we,
221
- isLoading: j,
221
+ isLoading: K,
222
222
  error: F
223
223
  } = h({
224
224
  queryKey: ["formMetadata", A],
@@ -226,7 +226,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
226
226
  enabled: !!A && m
227
227
  }), {
228
228
  data: M,
229
- isLoading: K,
229
+ isLoading: j,
230
230
  error: w
231
231
  } = h({
232
232
  queryKey: ["formsEncounter", a?.encounterUuid],
@@ -341,7 +341,7 @@ const le = "_formsTableBody_1pd36_1", ce = "_customAccordianItem_1pd36_6", ue =
341
341
  passiveModal: !0,
342
342
  size: "md",
343
343
  testId: "form-details-modal",
344
- children: /* @__PURE__ */ t("div", { className: o.formContent, children: j || K ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: U(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: U(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
344
+ children: /* @__PURE__ */ t("div", { className: o.formContent, children: K || j ? /* @__PURE__ */ t(de, { width: "100%", lineCount: 3 }) : F ? /* @__PURE__ */ t("div", { children: U(F).message ?? r("ERROR_FETCHING_FORM_METADATA") }) : w ? /* @__PURE__ */ t("div", { children: U(w).message ?? r("ERROR_FETCHING_FORM_DATA") }) : I.length > 0 ? /* @__PURE__ */ t("div", { className: o.formDetailsContainer, children: I.map((n, l) => /* @__PURE__ */ t(
345
345
  Fe,
346
346
  {
347
347
  observation: n,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DvBT3iux.js";
2
- import { l as d, m as f, n as e } from "./index-O3L-Q5oy.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CfDIPvcn.js";
2
+ import { l as d, m as f, n as e } from "./index-D9OpcJ-A.js";
3
3
  var p = (a) => {
4
4
  const [r, t] = c({
5
5
  prefix: "TanstackQueryDevtools"
@@ -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-DvBT3iux.js";
2
- import { l as v, m as C, n as e } from "./index-O3L-Q5oy.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-CfDIPvcn.js";
2
+ import { l as v, m as C, n as e } from "./index-D9OpcJ-A.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,9 +1,9 @@
1
1
  import { jsxs as $, jsx as b } from "react/jsx-runtime";
2
- import { H as C, h as K, u as I, P as U, j as V, K as H, X as Q, Q as M, d as j, A as G, e as w, f as N, J as x, B as P, O as X, k as J, M as Y } from "./index-O3L-Q5oy.js";
2
+ import { H as C, h as U, u as I, j as V, F as H, d as Q, Q as x, e as K, f as M, A as j, J as w, k as N, X as G, P, L as X, M as J, x as Y } from "./index-D9OpcJ-A.js";
3
3
  import { useQueries as z, useQuery as W } from "@tanstack/react-query";
4
4
  import { useRef as Z, useEffect as _, useMemo as h } from "react";
5
5
  const S = (e, d, o, l, t) => {
6
- const a = x(e, d), r = a.value, s = P(r);
6
+ const a = G(e, d), r = a.value, s = P(r);
7
7
  let i = r;
8
8
  s === "Image" && (i = /* @__PURE__ */ b(J, { imageSrc: r, alt: r, id: `${r}-img` })), s === "Video" && (i = /* @__PURE__ */ b(Y, { id: `${r}-video`, videoSrc: r }));
9
9
  const c = t("OBSERVATIONS_RECORDED_BY", {
@@ -78,20 +78,20 @@ const S = (e, d, o, l, t) => {
78
78
  observations: ae,
79
79
  title: re
80
80
  }, se = (e) => ["conceptUuid", e], oe = (e, d) => ["observations", e, ...d], ue = ({ config: e }) => {
81
- const d = e, { conceptNames: o = [], conceptUuid: l = [] } = d, t = Z(/* @__PURE__ */ new Set()), a = C(), { addNotification: r } = K(), { t: s } = I(), i = z({
81
+ const d = e, { conceptNames: o = [], conceptUuid: l = [] } = d, t = Z(/* @__PURE__ */ new Set()), a = C(), { addNotification: r } = U(), { t: s } = I(), i = z({
82
82
  queries: o.map((n) => ({
83
83
  queryKey: se(n),
84
- queryFn: () => U(n),
84
+ queryFn: () => V(n),
85
85
  enabled: !!n
86
86
  }))
87
87
  });
88
88
  _(() => {
89
89
  i.forEach((n, y) => {
90
90
  if (n.isError && !t.current.has(y)) {
91
- const q = o[y];
91
+ const B = o[y];
92
92
  r({
93
93
  title: s("ERROR_DEFAULT_TITLE"),
94
- message: s("ERROR_FETCHING_CONCEPT", { conceptName: q }),
94
+ message: s("ERROR_FETCHING_CONCEPT", { conceptName: B }),
95
95
  type: "error"
96
96
  }), t.current.add(y);
97
97
  } else n.isError || t.current.delete(y);
@@ -103,7 +103,7 @@ const S = (e, d, o, l, t) => {
103
103
  isError: R
104
104
  } = W({
105
105
  queryKey: oe(a, m),
106
- queryFn: () => V(a, m),
106
+ queryFn: () => H(a, m),
107
107
  enabled: !!a && m.length > 0 && p
108
108
  });
109
109
  _(() => {
@@ -115,13 +115,13 @@ const S = (e, d, o, l, t) => {
115
115
  }, [R]);
116
116
  const g = h(() => {
117
117
  if (!u) return [];
118
- const n = H(u), y = Q(n);
119
- return M(y);
120
- }, [u]), B = [
118
+ const n = Q(u), y = x(n);
119
+ return K(y);
120
+ }, [u]), F = [
121
121
  { key: "name", header: "name" },
122
122
  { key: "value", header: "value" },
123
123
  { key: "form", header: "form" }
124
- ], O = A || !p, f = R && p, D = (!u || u.entry?.length === 0 || m.length === 0) && p, F = f ? s("ERROR_FETCHING_OBSERVATIONS") : null, L = D ? s("NO_OBSERVATIONS_FOUND") : void 0, k = g.length > 0 && !O && !f, E = d.titleTranslationKey, v = E ? s(E) : "";
124
+ ], f = A || !p, O = R && p, L = (!u || u.entry?.length === 0 || m.length === 0) && p, D = O ? s("ERROR_FETCHING_OBSERVATIONS") : null, k = L ? s("NO_OBSERVATIONS_FOUND") : void 0, q = g.length > 0 && !f && !O, E = d.titleTranslationKey, v = E ? s(E) : "";
125
125
  return /* @__PURE__ */ $(
126
126
  "div",
127
127
  {
@@ -131,7 +131,7 @@ const S = (e, d, o, l, t) => {
131
131
  className: T.observations,
132
132
  children: [
133
133
  /* @__PURE__ */ b(
134
- j,
134
+ M,
135
135
  {
136
136
  id: "observations-title",
137
137
  testId: E ? `observations-title-${v}` : "observations-title",
@@ -140,15 +140,15 @@ const S = (e, d, o, l, t) => {
140
140
  children: /* @__PURE__ */ b("p", { children: v })
141
141
  }
142
142
  ),
143
- k ? /* @__PURE__ */ b(te, { groupedData: g, title: v }) : /* @__PURE__ */ b(
144
- G,
143
+ q ? /* @__PURE__ */ b(te, { groupedData: g, title: v }) : /* @__PURE__ */ b(
144
+ j,
145
145
  {
146
- headers: B,
146
+ headers: F,
147
147
  rows: [],
148
148
  ariaLabel: s("OBSERVATIONS"),
149
- loading: O,
150
- errorStateMessage: F,
151
- emptyStateMessage: L,
149
+ loading: f,
150
+ errorStateMessage: D,
151
+ emptyStateMessage: k,
152
152
  dataTestId: "observations-table"
153
153
  }
154
154
  )