@bahmni/home-app 0.0.1-dev.440 → 0.0.1-dev.441

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 d, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-CbgMMwYD.js";
2
+ import { d as G, u as W, z as Y, P as J, s as X, h as Z, $ as ee, a as te } from "./index-DYyyP-AF.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as I, useMemo as p } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", de = "DocumentsTable-module_documentViewerContainer__F5m8D", re = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", r = {
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as q, Fragment as ne } from "react/jsx-runtime";
2
- import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-CbgMMwYD.js";
2
+ import { u as de, d as ie, v as le, k as me, H as ue, B as ce, b as fe, D as ye, w as Ne, N as he, c as ge, R as Te, h as pe, L as V, e as $, s as Oe, $ as K, W as be, q as Ie, a as Ee, f as _e, g as Ae } from "./index-DYyyP-AF.js";
3
3
  import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
4
  import { useState as j, useMemo as d, useCallback as i } from "react";
5
- const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_modalHeading__wnTmA", Be = "FormsTable-module_customAccordianItem__isszs", g = {
6
- formsTableBody: Le,
7
- modalHeading: Re,
8
- customAccordianItem: Be
5
+ const Be = "FormsTable-module_formsTableBody__SvGha", Le = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", g = {
6
+ formsTableBody: Be,
7
+ modalHeading: Le,
8
+ customAccordianItem: Re
9
9
  }, Ce = "startConsultation", Me = ({
10
10
  episodeOfCareUuids: _,
11
11
  encounterUuids: l,
@@ -19,27 +19,27 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
19
19
  forms: N
20
20
  } = x ?? {}, W = le(
21
21
  Ae.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = me(), p = W && !z && !!y, L = ue(
22
+ ), { userPrivileges: h } = me(), p = W && !z && !!y, B = ue(
23
23
  _,
24
24
  l
25
25
  ), P = ve(), {
26
- data: R = [],
27
- isLoading: B,
26
+ data: L = [],
27
+ isLoading: R,
28
28
  isError: C,
29
29
  error: Y,
30
30
  refetch: J
31
31
  } = E({
32
32
  queryKey: ["forms", m, _],
33
33
  queryFn: () => ce(m, void 0, Q),
34
- enabled: !!m && !L
34
+ enabled: !!m && !B
35
35
  }), F = d(() => {
36
- let e = R;
36
+ let e = L;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
39
  )), Array.isArray(N) && N.length > 0 && (e = e.filter(
40
40
  (r) => N.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [R, l, N]), { data: D = [] } = E({
42
+ }, [L, l, N]), { data: D = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
45
  }), U = i(
@@ -120,9 +120,9 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
120
120
  )
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
- }, [F, o]), w = i((e) => {
123
+ }, [F, o]), k = i((e) => {
124
124
  v(e), A(!0);
125
- }, []), k = i(() => {
125
+ }, []), w = i(() => {
126
126
  A(!1), v(null);
127
127
  }, []), I = i((e) => {
128
128
  globalThis.dispatchEvent(
@@ -140,7 +140,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
140
140
  (e, r) => {
141
141
  switch (r) {
142
142
  case "recordedOn":
143
- return /* @__PURE__ */ n(Oe, { onClick: () => w(e), children: e.recordedOn });
143
+ return /* @__PURE__ */ n(Oe, { onClick: () => k(e), children: e.recordedOn });
144
144
  case "recordedBy":
145
145
  return e.recordedBy;
146
146
  case "actions":
@@ -159,16 +159,16 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
159
159
  return null;
160
160
  }
161
161
  },
162
- [w, I, u, o]
162
+ [k, I, u, o]
163
163
  );
164
164
  return /* @__PURE__ */ q(ne, { children: [
165
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: B || C || M.length === 0 || L ? /* @__PURE__ */ n(
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: R || C || M.length === 0 || B ? /* @__PURE__ */ n(
166
166
  K,
167
167
  {
168
168
  headers: oe,
169
169
  ariaLabel: o("FORMS_HEADING"),
170
170
  rows: [],
171
- loading: B,
171
+ loading: R,
172
172
  errorStateMessage: C ? Y?.message : void 0,
173
173
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
174
  renderCell: H,
@@ -209,7 +209,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
209
209
  id: "modalIdForActionAreaLayout",
210
210
  portalId: "main-display-area",
211
211
  open: T,
212
- onRequestClose: k,
212
+ onRequestClose: w,
213
213
  modalHeading: /* @__PURE__ */ q("div", { className: g.modalHeading, children: [
214
214
  /* @__PURE__ */ n("span", { children: t.formName }),
215
215
  p && u(t) && /* @__PURE__ */ n(
@@ -220,7 +220,7 @@ const Le = "FormsTable-module_formsTableBody__SvGha", Re = "FormsTable-module_mo
220
220
  size: "sm",
221
221
  testId: `edit-form-modal-${t.encounterUuid}`,
222
222
  onClick: () => {
223
- k(), I(t);
223
+ w(), I(t);
224
224
  },
225
225
  children: /* @__PURE__ */ n($, {})
226
226
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BdcV3i_Y.js";
2
- import { C as d, M as f, O as e } from "./index-CbgMMwYD.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-COhKfDHz.js";
2
+ import { C as d, M as f, O as e } from "./index-DYyyP-AF.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-BdcV3i_Y.js";
2
- import { C, M as v, O as e } from "./index-CbgMMwYD.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-COhKfDHz.js";
2
+ import { C, M as v, O as e } from "./index-DYyyP-AF.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,13 +1,13 @@
1
1
  import { jsxs as I, jsx as o } from "react/jsx-runtime";
2
- import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-CbgMMwYD.js";
2
+ import { d as G, z as H, u as F, I as j, H as J, i as M, Z as Y, w as x, Y as P, Q as X, J as Z, X as W, j as ee, $ as ae, G as se, E as U, K as te, l as re, h as ie, m as ne, n as oe, o as de, F as le } from "./index-DYyyP-AF.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
- import { useRef as me, useEffect as L, useMemo as g } from "react";
4
+ import { useRef as me, useEffect as D, useMemo as g } from "react";
5
5
  const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
6
6
  observations: pe,
7
7
  title: be,
8
8
  wrapper: he,
9
9
  secondary: ve
10
- }, V = (s, l, n, d, c, t) => {
10
+ }, w = (s, l, n, d, c, t) => {
11
11
  const r = te(s, l, c), e = r.value, m = re(e);
12
12
  let i = e;
13
13
  m === "Image" && (i = /* @__PURE__ */ o(
@@ -54,7 +54,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
54
54
  id: `grouped-obs-${s.display}-${d}`,
55
55
  open: n,
56
56
  children: s.members?.map(
57
- (e, m) => V(
57
+ (e, m) => w(
58
58
  e,
59
59
  m,
60
60
  c,
@@ -80,7 +80,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
80
80
  open: r,
81
81
  children: [
82
82
  t.observations.map(
83
- (i, p) => V(
83
+ (i, p) => w(
84
84
  i,
85
85
  p,
86
86
  e,
@@ -139,7 +139,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
139
139
  enabled: !!a
140
140
  }))
141
141
  });
142
- L(() => {
142
+ D(() => {
143
143
  const a = b.some((z) => z.isError), y = m.current.size > 0;
144
144
  a && !y ? (p({
145
145
  title: u("ERROR_DEFAULT_TITLE"),
@@ -152,9 +152,9 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
152
152
  n
153
153
  ), {
154
154
  data: _,
155
- isLoading: w,
155
+ isLoading: V,
156
156
  isError: S,
157
- refetch: N
157
+ refetch: $
158
158
  } = ce({
159
159
  queryKey: _e(
160
160
  i,
@@ -177,17 +177,17 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
177
177
  (a) => {
178
178
  a.patientUUID === i && a.updatedConcepts.size > 0 && [...a.updatedConcepts.keys()].some(
179
179
  (y) => h.includes(y)
180
- ) && N();
180
+ ) && $();
181
181
  },
182
- [i, N]
183
- ), L(() => {
182
+ [i, $]
183
+ ), D(() => {
184
184
  S && p({
185
185
  title: u("ERROR_DEFAULT_TITLE"),
186
186
  message: u("ERROR_FETCHING_OBSERVATIONS"),
187
187
  type: "error"
188
188
  });
189
189
  }, [S]);
190
- const $ = g(() => {
190
+ const N = g(() => {
191
191
  if (!_) return [];
192
192
  let a = P(_);
193
193
  e === "latest-encounter" && (a = X(a));
@@ -197,7 +197,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
197
197
  { key: "name", header: "name" },
198
198
  { key: "value", header: "value" },
199
199
  { key: "form", header: "form" }
200
- ], A = w || !v, D = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = D ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = $.length > 0 && !A && !D, T = d.titleTranslationKey, f = T ? u(T) : "";
200
+ ], A = V || !v, L = S && v, k = (!_ || _.entry?.length === 0 || h.length === 0) && v, C = L ? u("ERROR_FETCHING_OBSERVATIONS") : null, Q = k ? u("NO_OBSERVATIONS_FOUND") : void 0, q = N.length > 0 && !A && !L, T = d.titleTranslationKey, f = T ? u(T) : "";
201
201
  return /* @__PURE__ */ I(
202
202
  "div",
203
203
  {
@@ -219,7 +219,7 @@ const pe = "Observations-module_observations__RKSyo", be = "Observations-module_
219
219
  q ? /* @__PURE__ */ o(
220
220
  Oe,
221
221
  {
222
- groupedData: $,
222
+ groupedData: N,
223
223
  title: f,
224
224
  hideThumbnail: r
225
225
  }
@@ -1,4 +1,4 @@
1
- import { S as we, T as z, U as xt, V as B, M as q, O as y, _ as Ro, a0 as ye, a1 as R, a2 as _, a3 as k, a4 as N, a5 as A, a6 as bs, a7 as ir, a8 as $e, a9 as U, aa as Hn, ab as Vn, ac as dt, ad as D, ae as xs, af as cn, ag as Be, ah as ws, ai as qt, aj as zt, ak as $s, al as Cs, am as $n, an as Ss, ao as Nr, ap as Bt, aq as zo, ar as ks, as as Es, at as j, au as Ur, av as Ms, aw as Ds, ax as sr, ay as As, az as Ts, aA as zn, aB as Fs, aC as Is, aD as Z, aE as Ps, aF as Os } from "./index-CbgMMwYD.js";
1
+ import { S as we, T as z, U as xt, V as B, M as q, O as y, _ as Ro, a0 as ye, a1 as R, a2 as _, a3 as k, a4 as N, a5 as A, a6 as bs, a7 as ir, a8 as $e, a9 as U, aa as Hn, ab as Vn, ac as dt, ad as D, ae as xs, af as cn, ag as Be, ah as ws, ai as qt, aj as zt, ak as $s, al as Cs, am as $n, an as Ss, ao as Nr, ap as Bt, aq as zo, ar as ks, as as Es, at as j, au as Ur, av as Ms, aw as Ds, ax as sr, ay as As, az as Ts, aA as zn, aB as Fs, aC as Is, aD as Z, aE as Ps, aF as Os } from "./index-DYyyP-AF.js";
2
2
  var Ls = (e) => e != null, qs = (e) => e.filter(Ls);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -114700,7 +114700,7 @@ lt2({
114700
114700
  key: "commonSearch",
114701
114701
  component: hH0
114702
114702
  });
114703
- P0(() => Promise.resolve().then(() => Td0)), P0(() => Promise.resolve().then(() => au0)), P0(() => Promise.resolve().then(() => Zu0)), P0(() => Promise.resolve().then(() => qu0)), P0(() => import("./DocumentsTable-CirHKvw9-DO8oBOw8.js")), P0(() => Promise.resolve().then(() => Yw0)), P0(() => import("./FormsTable-CqUGhZ65-DFznUw7Y.js")), P0(() => Promise.resolve().then(() => Fm0)), P0(() => import("./Observations-BhAU90jX-De0WJ4Pk.js")), P0(
114703
+ P0(() => Promise.resolve().then(() => Td0)), P0(() => Promise.resolve().then(() => au0)), P0(() => Promise.resolve().then(() => Zu0)), P0(() => Promise.resolve().then(() => qu0)), P0(() => import("./DocumentsTable-BCWUH3WY-e_vmrUFW.js")), P0(() => Promise.resolve().then(() => Yw0)), P0(() => import("./FormsTable-Bb-cDsSI-BjdIAVdL.js")), P0(() => Promise.resolve().then(() => Fm0)), P0(() => import("./Observations-B5TN5tfi-N9c3ZgXZ.js")), P0(
114704
114704
  () => Promise.resolve().then(() => kg0)
114705
114705
  ), P0(
114706
114706
  () => Promise.resolve().then(() => um0)
@@ -199675,7 +199675,7 @@ var VZt = (t, e = !1) => {
199675
199675
  const e = B82(() => {
199676
199676
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t;
199677
199677
  let d;
199678
- return this.#l ? d = this.#l : (d = k82(() => import("./LNWAZHJI-CMhDPkR8.js")), this.#l = d), c92(this.#h, this.#r), S82(d, Z82({
199678
+ return this.#l ? d = this.#l : (d = k82(() => import("./LNWAZHJI-DuhIAy4r.js")), this.#l = d), c92(this.#h, this.#r), S82(d, Z82({
199679
199679
  get queryFlavor() {
199680
199680
  return r.#d;
199681
199681
  },
@@ -199773,7 +199773,7 @@ var VZt = (t, e = !1) => {
199773
199773
  const e = B82(() => {
199774
199774
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t, [d] = this.#l;
199775
199775
  let u;
199776
- return this.#i ? u = this.#i : (u = k82(() => import("./MWZ6AO7Z-Dj59jaj5.js")), this.#i = u), c92(this.#h, this.#r), S82(u, Z82({
199776
+ return this.#i ? u = this.#i : (u = k82(() => import("./MWZ6AO7Z-CsR3kh6J.js")), this.#i = u), c92(this.#h, this.#r), S82(u, Z82({
199777
199777
  get queryFlavor() {
199778
199778
  return r.#d;
199779
199779
  },
@@ -199903,7 +199903,7 @@ const HRt = {
199903
199903
  }
199904
199904
  }
199905
199905
  }, zRt = "home", bZt = "org.bahmni.home.dashboard", NZt = 5e3, xRt = P0(
199906
- () => import("./index-CrVVjhth.js").then((t) => ({
199906
+ () => import("./index-DguJpooo.js").then((t) => ({
199907
199907
  default: t.HomePage
199908
199908
  }))
199909
199909
  ), bRt = [
@@ -1,5 +1,5 @@
1
1
  import { jsx as e, jsxs as d, Fragment as _ } from "react/jsx-runtime";
2
- import { p as E, r as f, u as m, t as u, x as O, y as g, z as h, A as H } from "./index-CbgMMwYD.js";
2
+ import { p as E, r as f, u as m, t as u, x as O, y as g, z as h, A as H } from "./index-DYyyP-AF.js";
3
3
  import { useRef as N, useEffect as S } from "react";
4
4
  import "@tanstack/react-query";
5
5
  import { useNavigate as p, useLocation as M } from "react-router-dom";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aG as a } from "./index-CbgMMwYD.js";
1
+ import { aG as a } from "./index-DYyyP-AF.js";
2
2
  export {
3
3
  a as HomeApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/home-app",
3
- "version": "0.0.1-dev.440",
3
+ "version": "0.0.1-dev.441",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",