@bahmni/home-app 0.0.1-dev.353 → 0.0.1-dev.354

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 h, Fragment as Q } from "react/jsx-runtime";
2
- import { m as x, u as W, a as Y, H as J, r as X, g as Z, e as ee, d as te } from "./index-CTEATaQn.js";
2
+ import { m as x, u as W, a as Y, H as J, r as X, g as Z, e as ee, d as te } from "./index-D1v7VBdz.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", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,45 +1,45 @@
1
1
  import { jsx as i, jsxs as x, Fragment as he } from "react/jsx-runtime";
2
- import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P, r as Me, e as Q, f as Ce, i as Re, d as Be, W as Le, I as Ue } from "./index-CTEATaQn.js";
3
- import { useQueryClient as ke, useQuery as b } from "@tanstack/react-query";
2
+ import { u as ge, m as pe, w as Ne, x as Oe, h as be, V as Ie, X as Te, y as Ae, k as Ee, J as _e, A as ve, N as Fe, o as z, g as Se, b as K, c as P, r as Ce, e as Q, f as Re, i as Be, d as Le, W as Me, I as Ue } from "./index-D1v7VBdz.js";
3
+ import { useQueryClient as De, useQuery as b } from "@tanstack/react-query";
4
4
  import { useState as X, useMemo as d, useCallback as l } from "react";
5
- const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", I = {
6
- formsTableBody: De,
5
+ const ke = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_modalHeading__wnTmA", qe = "FormsTable-module_customAccordianItem__isszs", I = {
6
+ formsTableBody: ke,
7
7
  modalHeading: we,
8
8
  customAccordianItem: qe
9
9
  }, He = "startConsultation", xe = ({
10
- episodeOfCareUuids: M,
10
+ episodeOfCareUuids: C,
11
11
  encounterUuids: c,
12
12
  config: J,
13
13
  disableActions: W = !1,
14
14
  activeEncounterUuid: h = null
15
15
  }) => {
16
- const { t: n } = ge(), u = pe(), [g, C] = X(!1), [s, R] = X(null), {
16
+ const { t: n } = ge(), u = pe(), [g, R] = X(!1), [s, B] = X(null), {
17
17
  numberOfVisits: Y,
18
18
  hideThumbnail: Z = !1,
19
19
  forms: p
20
20
  } = J ?? {}, ee = Ne(
21
21
  Ue.EDIT_OBSERVATIONS
22
- ), { userPrivileges: N } = Oe(), T = ee && !W && !!h, B = be(
23
- M,
22
+ ), { userPrivileges: N } = Oe(), T = ee && !W && !!h, L = be(
23
+ C,
24
24
  c
25
- ), re = ke(), {
26
- data: L = [],
25
+ ), re = De(), {
26
+ data: M = [],
27
27
  isLoading: U,
28
- isError: k,
28
+ isError: D,
29
29
  error: oe,
30
30
  refetch: ae
31
31
  } = b({
32
- queryKey: ["forms", u, M],
32
+ queryKey: ["forms", u, C],
33
33
  queryFn: () => Ie(u, void 0, Y),
34
- enabled: !!u && !B
35
- }), D = d(() => {
36
- let e = L;
34
+ enabled: !!u && !L
35
+ }), k = d(() => {
36
+ let e = M;
37
37
  return c && c.length > 0 && (e = e.filter(
38
38
  (r) => c.includes(r.encounterUuid)
39
39
  )), Array.isArray(p) && p.length > 0 && (e = e.filter(
40
40
  (r) => p.some((o) => o.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [L, c, p]), { data: O = [] } = b({
42
+ }, [M, c, p]), { data: O = [] } = b({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Te()
45
45
  }), w = l(
@@ -136,7 +136,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
136
136
  ],
137
137
  []
138
138
  ), V = d(() => {
139
- const e = D.reduce(
139
+ const e = k.reduce(
140
140
  (r, o) => {
141
141
  const a = o.formName;
142
142
  r[a] ??= [];
@@ -160,10 +160,10 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
160
160
  )
161
161
  })
162
162
  ).sort((r, o) => r.formName.localeCompare(o.formName));
163
- }, [D, n]), G = l((e) => {
164
- R(e), C(!0);
163
+ }, [k, n]), G = l((e) => {
164
+ B(e), R(!0);
165
165
  }, []), $ = l(() => {
166
- C(!1), R(null);
166
+ R(!1), B(null);
167
167
  }, []), F = l((e) => {
168
168
  globalThis.dispatchEvent(
169
169
  new CustomEvent(He, {
@@ -180,7 +180,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
180
180
  (e, r) => {
181
181
  switch (r) {
182
182
  case "recordedOn":
183
- return /* @__PURE__ */ i(Me, { onClick: () => G(e), children: e.recordedOn });
183
+ return /* @__PURE__ */ i(Ce, { onClick: () => G(e), children: e.recordedOn });
184
184
  case "recordedBy":
185
185
  return e.recordedBy;
186
186
  case "actions":
@@ -202,23 +202,23 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
202
202
  [G, F, f, n]
203
203
  );
204
204
  return /* @__PURE__ */ x(he, { children: [
205
- /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || k || V.length === 0 || B ? /* @__PURE__ */ i(
205
+ /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: U || D || V.length === 0 || L ? /* @__PURE__ */ i(
206
206
  Q,
207
207
  {
208
208
  headers: fe,
209
209
  ariaLabel: n("FORMS_HEADING"),
210
210
  rows: [],
211
211
  loading: U,
212
- errorStateMessage: k ? oe?.message : void 0,
212
+ errorStateMessage: D ? oe?.message : void 0,
213
213
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
214
214
  renderCell: j,
215
215
  className: I.formsTableBody,
216
216
  dataTestId: "forms-table"
217
217
  }
218
- ) : /* @__PURE__ */ i(Ce, { align: "start", children: V.map((e, r) => {
218
+ ) : /* @__PURE__ */ i(Re, { align: "start", children: V.map((e, r) => {
219
219
  const { formName: o, records: a } = e, t = ue(a);
220
220
  return /* @__PURE__ */ i(
221
- Re,
221
+ Be,
222
222
  {
223
223
  title: o,
224
224
  className: I.customAccordianItem,
@@ -244,7 +244,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
244
244
  );
245
245
  }) }) }),
246
246
  g && s && /* @__PURE__ */ i(
247
- Be,
247
+ Le,
248
248
  {
249
249
  id: "modalIdForActionAreaLayout",
250
250
  portalId: "main-display-area",
@@ -271,7 +271,7 @@ const De = "FormsTable-module_formsTableBody__SvGha", we = "FormsTable-module_mo
271
271
  size: "md",
272
272
  testId: "form-details-modal",
273
273
  children: /* @__PURE__ */ i(
274
- Le,
274
+ Me,
275
275
  {
276
276
  observations: de,
277
277
  isLoading: te || ne,
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BHZatYxc.js";
2
- import { a0 as d, a1 as f, a2 as e } from "./index-CTEATaQn.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-8KeafKeg.js";
2
+ import { a0 as d, a1 as f, a2 as e } from "./index-D1v7VBdz.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-BHZatYxc.js";
2
- import { a0 as v, a1 as C, a2 as e } from "./index-CTEATaQn.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-8KeafKeg.js";
2
+ import { a0 as v, a1 as C, a2 as e } from "./index-D1v7VBdz.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as u } from "react/jsx-runtime";
2
- import { m as V, a as q, u as N, v as Q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-CTEATaQn.js";
2
+ import { m as Q, a as V, u as N, v as q, E as k, J as z, T as M, O as j, L as w, F as x, e as H, C as J, Q as D, z as P, p as Y, j as W, n as X, l as Z, q as ee } from "./index-D1v7VBdz.js";
3
3
  import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as T } from "react";
5
5
  const F = (a, n, d, l, b, r) => {
@@ -113,20 +113,20 @@ const F = (a, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), t = V(), { addNotification: s } = q(), { t: o } = N(), i = ae({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), t = Q(), { addNotification: s } = V(), { t: o } = N(), i = ae({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => Q(e),
119
+ queryFn: () => q(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
123
  $(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const B = d[h];
126
+ const K = d[h];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: B }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: K }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -164,7 +164,7 @@ const F = (a, n, d, l, b, r) => {
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = G ? o("NO_OBSERVATIONS_FOUND") : void 0, U = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
167
+ ], g = L || !v, _ = O && v, G = (!c || c.entry?.length === 0 || p.length === 0) && v, A = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = G ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, y = E ? o(E) : "";
168
168
  return /* @__PURE__ */ S(
169
169
  "div",
170
170
  {
@@ -183,7 +183,7 @@ const F = (a, n, d, l, b, r) => {
183
183
  children: /* @__PURE__ */ u("p", { children: y })
184
184
  }
185
185
  ),
186
- U ? /* @__PURE__ */ u(
186
+ B ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
189
  groupedData: f,
@@ -198,7 +198,7 @@ const F = (a, n, d, l, b, r) => {
198
198
  ariaLabel: o("OBSERVATIONS"),
199
199
  loading: g,
200
200
  errorStateMessage: A,
201
- emptyStateMessage: K,
201
+ emptyStateMessage: U,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -1,4 +1,4 @@
1
- import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-CTEATaQn.js";
1
+ import { a3 as we, a4 as z, a5 as xt, a6 as B, a1 as q, a2 as y, a7 as Ro, a8 as ye, a9 as R, aa as _, ab as k, ac as N, ad as A, ae as bs, af as ir, ag as $e, ah as G, ai as Hn, aj as Vn, ak as dt, al as D, am as xs, an as cn, ao as Be, ap as ws, aq as qt, ar as zt, as as $s, at as Cs, au as $n, av as Ss, aw as Nr, ax as Bt, ay as zo, az as ks, aA as Es, aB as j, aC as Gr, aD as Ms, aE as Ds, aF as sr, aG as As, aH as Ts, aI as zn, aJ as Fs, aK as Is, aL as Z, aM as Ps, aN as Ls } from "./index-D1v7VBdz.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,5 +1,5 @@
1
1
  import { jsxs as Ne, jsx as ne, Fragment as Xi } from "react/jsx-runtime";
2
- import { u as ot, s as Qi, t as Ji, B as ec, D as tc, x as rc, G as nc, K as oc, $ as hi, M as ac, P as lc, a as ic, R as cc, S as sc, U as fc, Y as pc, Z as hc, _ as uc } from "./index-CTEATaQn.js";
2
+ import { u as ot, s as Qi, t as Ji, B as ec, D as tc, x as rc, _ as nc, G as oc, $ as hi, K as ac, M as lc, a as ic, P as cc, R as sc, S as fc, Y as pc, U as hc, Z as uc } from "./index-D1v7VBdz.js";
3
3
  import * as X from "react";
4
4
  import r, { createContext as at, useContext as $e, Children as q1, useState as pe, useLayoutEffect as V1, useEffect as ie, useMemo as lt, useCallback as Me, useRef as oe, forwardRef as y1, useReducer as dc, cloneElement as G1, isValidElement as wc } from "react";
5
5
  import { useQuery as mc } from "@tanstack/react-query";
@@ -106840,7 +106840,7 @@ $s0();
106840
106840
  const Ds0 = [];
106841
106841
  for (let t = 0; t < 256; ++t)
106842
106842
  Ds0.push((t + 256).toString(16).slice(1));
106843
- F0(() => Promise.resolve().then(() => t30)), F0(() => Promise.resolve().then(() => A30)), F0(() => Promise.resolve().then(() => l40)), F0(() => Promise.resolve().then(() => f40)), F0(() => import("./DocumentsTable-TI2cownA-DOBFDRn3.js")), F0(() => Promise.resolve().then(() => pc0)), F0(() => import("./FormsTable-DY1pz_8H-DeCQTtbq.js")), F0(() => Promise.resolve().then(() => Ka0)), F0(() => import("./Observations-a7Heef0b-C_pIdE5g.js")), F0(
106843
+ F0(() => Promise.resolve().then(() => t30)), F0(() => Promise.resolve().then(() => A30)), F0(() => Promise.resolve().then(() => l40)), F0(() => Promise.resolve().then(() => f40)), F0(() => import("./DocumentsTable-DxCeg31W-bOxGpHk8.js")), F0(() => Promise.resolve().then(() => pc0)), F0(() => import("./FormsTable-DN5qR4HZ-D70j6Xrv.js")), F0(() => Promise.resolve().then(() => Ka0)), F0(() => import("./Observations-BxVBC-Hr-BfPveXEZ.js")), F0(
106844
106844
  () => Promise.resolve().then(() => Jc0)
106845
106845
  ), F0(
106846
106846
  () => Promise.resolve().then(() => wa0)
@@ -188884,7 +188884,7 @@ var lvt = (t, e = !1) => {
188884
188884
  const e = W32(() => {
188885
188885
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t;
188886
188886
  let d;
188887
- return this.#l ? d = this.#l : (d = q32(() => import("./LNWAZHJI-CnJ31BTX.js")), this.#l = d), h42(this.#h, this.#r), j32(d, F32({
188887
+ return this.#l ? d = this.#l : (d = q32(() => import("./LNWAZHJI-DgCxnqjY.js")), this.#l = d), h42(this.#h, this.#r), j32(d, F32({
188888
188888
  get queryFlavor() {
188889
188889
  return r.#d;
188890
188890
  },
@@ -188982,7 +188982,7 @@ var lvt = (t, e = !1) => {
188982
188982
  const e = W32(() => {
188983
188983
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t, [d] = this.#l;
188984
188984
  let u;
188985
- return this.#i ? u = this.#i : (u = q32(() => import("./MWZ6AO7Z-Dh57GMlZ.js")), this.#i = u), h42(this.#h, this.#r), j32(u, F32({
188985
+ return this.#i ? u = this.#i : (u = q32(() => import("./MWZ6AO7Z-DewHsXdt.js")), this.#i = u), h42(this.#h, this.#r), j32(u, F32({
188986
188986
  get queryFlavor() {
188987
188987
  return r.#d;
188988
188988
  },
@@ -189112,7 +189112,7 @@ const nwt = {
189112
189112
  }
189113
189113
  }
189114
189114
  }, owt = "home", hvt = "/bahmni/home/index.html#/login", pvt = "/bahmni/home/index.html#/changePassword", fvt = 6, awt = F0(
189115
- () => import("./index-gsRQCQ-c.js").then((t) => ({
189115
+ () => import("./index-CjcJuQYM.js").then((t) => ({
189116
189116
  default: t.HomePage
189117
189117
  }))
189118
189118
  ), cwt = [
@@ -189149,27 +189149,27 @@ export {
189149
189149
  Ogt as D,
189150
189150
  kwt as E,
189151
189151
  nv as F,
189152
- Tgt as G,
189152
+ fvt as G,
189153
189153
  Pwt as H,
189154
189154
  Qwt as I,
189155
189155
  gr as J,
189156
- fvt as K,
189156
+ Sgt as K,
189157
189157
  Ywt as L,
189158
- Sgt as M,
189158
+ Rn0 as M,
189159
189159
  qwt as N,
189160
189160
  Gwt as O,
189161
- Rn0 as P,
189161
+ pvt as P,
189162
189162
  gwt as Q,
189163
- pvt as R,
189164
- _gt as S,
189163
+ _gt as R,
189164
+ hvt as S,
189165
189165
  Kwt as T,
189166
- hvt as U,
189166
+ Cft as U,
189167
189167
  Bwt as V,
189168
189168
  cE as W,
189169
189169
  SK2 as X,
189170
189170
  D8 as Y,
189171
- Cft as Z,
189172
- egt as _,
189171
+ egt as Z,
189172
+ Tgt as _,
189173
189173
  Br as a,
189174
189174
  uvt as a0,
189175
189175
  A0 as a1,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aO as a } from "./index-CTEATaQn.js";
1
+ import { aO as a } from "./index-D1v7VBdz.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.353",
3
+ "version": "0.0.1-dev.354",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",