@bahmni/home-app 0.0.1-dev.418 → 0.0.1-dev.423

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 p, Fragment as Y } from "react/jsx-runtime";
2
- import { v as x, u as G, z as W, E as J, q as X, w as Z, Y as ee, p as te } from "./index-BQYW4q1k.js";
2
+ import { v as x, u as G, z as W, E as J, q as X, w as Z, Y as ee, p as te } from "./index-0gCl6Ezv.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } 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,30 +1,30 @@
1
- import { jsx as n, jsxs as P, Fragment as ge } from "react/jsx-runtime";
2
- import { u as he, v as Ne, i as Te, e as Oe, a as be, b as Ie, J as Ae, N as Ee, c as _e, m as ve, d as Fe, V as Me, y as Se, S as $, w as Be, A as K, f as j, q as Ce, Y as z, P as De, F as Le, p as Ue, h as Re, g as qe } from "./index-BQYW4q1k.js";
1
+ import { jsx as n, jsxs as P, Fragment as he } from "react/jsx-runtime";
2
+ import { u as ge, v as Ne, i as Te, e as Oe, a as be, b as Ie, J as Ae, N as Ee, c as _e, m as ve, d as Fe, V as Me, y as Se, S as K, w as Be, A as j, f as x, q as Re, Y as z, P as Ce, F as Le, p as Ue, h as De, g as qe } from "./index-0gCl6Ezv.js";
3
3
  import { useQueryClient as we, useQuery as T } from "@tanstack/react-query";
4
4
  import { useState as Q, useMemo as i, useCallback as d } from "react";
5
5
  const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_modalHeading__wnTmA", He = "FormsTable-module_customAccordianItem__isszs", O = {
6
6
  formsTableBody: Ve,
7
7
  modalHeading: ke,
8
8
  customAccordianItem: He
9
- }, xe = "startConsultation", je = ({
9
+ }, $e = "startConsultation", xe = ({
10
10
  episodeOfCareUuids: F,
11
11
  encounterUuids: l,
12
12
  config: Y,
13
13
  disableActions: J = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
- const { t } = he(), m = Ne(), [p, M] = Q(!1), [o, S] = Q(null), {
16
+ const { t } = ge(), m = Ne(), [p, M] = Q(!1), [o, S] = Q(null), {
17
17
  numberOfVisits: Z,
18
18
  hideThumbnail: X = !1,
19
- forms: g
19
+ forms: h
20
20
  } = Y ?? {}, W = Te(
21
21
  qe.EDIT_OBSERVATIONS
22
- ), { userPrivileges: h } = Oe(), b = W && !J && !!y, B = be(
22
+ ), { userPrivileges: g } = Oe(), b = W && !J && !!y, B = be(
23
23
  F,
24
24
  l
25
25
  ), ee = we(), {
26
- data: C = [],
27
- isLoading: D,
26
+ data: R = [],
27
+ isLoading: C,
28
28
  isError: L,
29
29
  error: re,
30
30
  refetch: ae
@@ -33,29 +33,29 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
33
33
  queryFn: () => Ie(m, void 0, Z),
34
34
  enabled: !!m && !B
35
35
  }), U = i(() => {
36
- let e = C;
36
+ let e = R;
37
37
  return l && l.length > 0 && (e = e.filter(
38
38
  (r) => l.includes(r.encounterUuid)
39
- )), Array.isArray(g) && g.length > 0 && (e = e.filter(
40
- (r) => g.some((a) => a.toLowerCase() === r.formName.toLowerCase())
39
+ )), Array.isArray(h) && h.length > 0 && (e = e.filter(
40
+ (r) => h.some((a) => a.toLowerCase() === r.formName.toLowerCase())
41
41
  )), e;
42
- }, [C, l, g]), { data: N = [] } = T({
42
+ }, [R, l, h]), { data: N = [] } = T({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => Ae()
45
- }), R = d(
45
+ }), D = d(
46
46
  (e) => {
47
47
  const r = N.find((s) => s.name === e);
48
48
  if (!r?.privileges || r.privileges.length === 0) return !0;
49
- if (!h || h.length === 0) return !1;
50
- const a = new Set(h.map((s) => s.name));
49
+ if (!g || g.length === 0) return !1;
50
+ const a = new Set(g.map((s) => s.name));
51
51
  return r.privileges.some(
52
52
  (s) => a.has(s.privilegeName) && s.editable
53
53
  );
54
54
  },
55
- [N, h]
55
+ [N, g]
56
56
  ), u = d(
57
- (e) => !y || e.encounterUuid !== y ? !1 : R(e.formName),
58
- [y, R]
57
+ (e) => !y || e.encounterUuid !== y ? !1 : D(e.formName),
58
+ [y, D]
59
59
  ), q = d(
60
60
  (e) => N.find((r) => r.name === e)?.uuid,
61
61
  [N]
@@ -92,9 +92,9 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
92
92
  [w]
93
93
  ), ue = i(() => {
94
94
  if (A)
95
- return $(A).message;
95
+ return K(A).message;
96
96
  if (_)
97
- return $(_).message;
97
+ return K(_).message;
98
98
  }, [A, _]), c = i(
99
99
  () => [
100
100
  { key: "recordedOn", header: t("RECORDED_ON") },
@@ -140,11 +140,11 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
140
140
  ).sort((r, a) => r.formName.localeCompare(a.formName));
141
141
  }, [U, t]), H = d((e) => {
142
142
  S(e), M(!0);
143
- }, []), x = d(() => {
143
+ }, []), $ = d(() => {
144
144
  M(!1), S(null);
145
145
  }, []), v = d((e) => {
146
146
  globalThis.dispatchEvent(
147
- new CustomEvent(xe, {
147
+ new CustomEvent($e, {
148
148
  detail: {
149
149
  editOnly: "observationForms",
150
150
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -158,19 +158,19 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
158
158
  (e, r) => {
159
159
  switch (r) {
160
160
  case "recordedOn":
161
- return /* @__PURE__ */ n(Ce, { onClick: () => H(e), children: e.recordedOn });
161
+ return /* @__PURE__ */ n(Re, { onClick: () => H(e), children: e.recordedOn });
162
162
  case "recordedBy":
163
163
  return e.recordedBy;
164
164
  case "actions":
165
165
  return u(e) ? /* @__PURE__ */ n(
166
- K,
166
+ j,
167
167
  {
168
168
  label: t("EDIT_OBSERVATION_FORM"),
169
169
  kind: "ghost",
170
170
  size: "sm",
171
171
  testId: `edit-form-${e.encounterUuid}`,
172
172
  onClick: () => v(e),
173
- children: /* @__PURE__ */ n(j, {})
173
+ children: /* @__PURE__ */ n(x, {})
174
174
  }
175
175
  ) : null;
176
176
  default:
@@ -179,21 +179,21 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
179
179
  },
180
180
  [H, v, u, t]
181
181
  );
182
- return /* @__PURE__ */ P(ge, { children: [
183
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: D || L || k.length === 0 || B ? /* @__PURE__ */ n(
182
+ return /* @__PURE__ */ P(he, { children: [
183
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: C || L || k.length === 0 || B ? /* @__PURE__ */ n(
184
184
  z,
185
185
  {
186
186
  headers: fe,
187
187
  ariaLabel: t("FORMS_HEADING"),
188
188
  rows: [],
189
- loading: D,
189
+ loading: C,
190
190
  errorStateMessage: L ? re?.message : void 0,
191
191
  emptyStateMessage: t("FORMS_UNAVAILABLE"),
192
192
  renderCell: G,
193
193
  className: O.formsTableBody,
194
194
  dataTestId: "forms-table"
195
195
  }
196
- ) : /* @__PURE__ */ n(De, { align: "start", children: k.map((e, r) => {
196
+ ) : /* @__PURE__ */ n(Ce, { align: "start", children: k.map((e, r) => {
197
197
  const { formName: a, records: s } = e, f = ce(s);
198
198
  return /* @__PURE__ */ n(
199
199
  Le,
@@ -227,20 +227,20 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
227
227
  id: "modalIdForActionAreaLayout",
228
228
  portalId: "main-display-area",
229
229
  open: p,
230
- onRequestClose: x,
230
+ onRequestClose: $,
231
231
  modalHeading: /* @__PURE__ */ P("div", { className: O.modalHeading, children: [
232
232
  /* @__PURE__ */ n("span", { children: o.formName }),
233
233
  b && u(o) && /* @__PURE__ */ n(
234
- K,
234
+ j,
235
235
  {
236
236
  label: t("EDIT_OBSERVATION_FORM"),
237
237
  kind: "ghost",
238
238
  size: "sm",
239
239
  testId: `edit-form-modal-${o.encounterUuid}`,
240
240
  onClick: () => {
241
- x(), v(o);
241
+ $(), v(o);
242
242
  },
243
- children: /* @__PURE__ */ n(j, {})
243
+ children: /* @__PURE__ */ n(x, {})
244
244
  }
245
245
  )
246
246
  ] }),
@@ -249,7 +249,7 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
249
249
  size: "md",
250
250
  testId: "form-details-modal",
251
251
  children: /* @__PURE__ */ n(
252
- Re,
252
+ De,
253
253
  {
254
254
  observations: ie,
255
255
  isLoading: oe || se,
@@ -268,5 +268,5 @@ const Ve = "FormsTable-module_formsTableBody__SvGha", ke = "FormsTable-module_mo
268
268
  ] });
269
269
  };
270
270
  export {
271
- je as default
271
+ xe as default
272
272
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CmAt8ZAq.js";
2
- import { $ as d, a0 as f, a1 as e } from "./index-BQYW4q1k.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CYiHJeWi.js";
2
+ import { $ as d, a0 as f, a1 as e } from "./index-0gCl6Ezv.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-CmAt8ZAq.js";
2
- import { $ as v, a0 as C, a1 as e } from "./index-BQYW4q1k.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-CYiHJeWi.js";
2
+ import { $ as v, a0 as C, a1 as e } from "./index-0gCl6Ezv.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 I, jsx as n } from "react/jsx-runtime";
2
- import { v as Q, z as M, u as B, j as Y, a as j, k as G, l as H, m as J, n as P, o as W, _ as X, C as Z, r as ee, Y as ae, x as se, s as U, t as re, B as te, w as ie, R as oe, T as ne, L as de, O as le } from "./index-BQYW4q1k.js";
2
+ import { v as Q, z as M, u as B, j as Y, a as j, k as G, l as H, m as J, n as P, o as W, _ as X, C as Z, r as ee, Y as ae, x as se, s as U, t as re, B as te, w as ie, R as oe, T as ne, L as de, O as le } from "./index-0gCl6Ezv.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
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", ve = "Observations-module_wrapper__muk2L", he = "Observations-module_secondary__14nuS", O = {
@@ -1,4 +1,4 @@
1
- import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-BQYW4q1k.js";
1
+ import { a2 as we, a3 as z, a4 as xt, a5 as B, a0 as q, a1 as y, a6 as Ro, a7 as ye, a8 as R, a9 as _, aa as k, ab as N, ac as A, ad as bs, ae as ir, af as $e, ag as G, ah as Hn, ai as Vn, aj as dt, ak as D, al as xs, am as cn, an as Be, ao as ws, ap as qt, aq as zt, ar as $s, as as Cs, at as $n, au as Ss, av as Nr, aw as Bt, ax as zo, ay as ks, az as Es, aA as j, aB as Gr, aC as Ms, aD as Ds, aE as sr, aF as As, aG as Ts, aH as zn, aI as Fs, aJ as Is, aK as Z, aL as Ps, aM as Ls } from "./index-0gCl6Ezv.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -113765,7 +113765,7 @@ Z02({
113765
113765
  key: "commonSearch",
113766
113766
  component: GV0
113767
113767
  });
113768
- X0(() => Promise.resolve().then(() => T70)), X0(() => Promise.resolve().then(() => ad0)), X0(() => Promise.resolve().then(() => Zd0)), X0(() => Promise.resolve().then(() => Ud0)), X0(() => import("./DocumentsTable-BFjFkIDL-CEPxRXpK.js")), X0(() => Promise.resolve().then(() => Gm0)), X0(() => import("./FormsTable-Daf5mako-Bhyinkwn.js")), X0(() => Promise.resolve().then(() => Pf0)), X0(() => import("./Observations-Du-ru99Y-BYnJFA7X.js")), X0(
113768
+ X0(() => Promise.resolve().then(() => T70)), X0(() => Promise.resolve().then(() => ad0)), X0(() => Promise.resolve().then(() => Zd0)), X0(() => Promise.resolve().then(() => Ud0)), X0(() => import("./DocumentsTable-BVnv0gpO-BW2fYzpm.js")), X0(() => Promise.resolve().then(() => Gm0)), X0(() => import("./FormsTable-BOBb-hEm-Ct7w6CRM.js")), X0(() => Promise.resolve().then(() => Pf0)), X0(() => import("./Observations-GQNCaUuo-QFOwo4Mb.js")), X0(
113769
113769
  () => Promise.resolve().then(() => Zw0)
113770
113770
  ), X0(
113771
113771
  () => Promise.resolve().then(() => df0)
@@ -198855,7 +198855,7 @@ var tSt = (t, e = !1) => {
198855
198855
  const e = H82(() => {
198856
198856
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t;
198857
198857
  let d;
198858
- return this.#l ? d = this.#l : (d = y82(() => import("./LNWAZHJI-tPeRWToE.js")), this.#l = d), F82(this.#h, this.#r), M82(d, V82({
198858
+ return this.#l ? d = this.#l : (d = y82(() => import("./LNWAZHJI-C9cjgcrw.js")), this.#l = d), F82(this.#h, this.#r), M82(d, V82({
198859
198859
  get queryFlavor() {
198860
198860
  return r.#d;
198861
198861
  },
@@ -198953,7 +198953,7 @@ var tSt = (t, e = !1) => {
198953
198953
  const e = H82(() => {
198954
198954
  const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#t, [d] = this.#l;
198955
198955
  let u;
198956
- return this.#i ? u = this.#i : (u = y82(() => import("./MWZ6AO7Z-DZ_Q6dpm.js")), this.#i = u), F82(this.#h, this.#r), M82(u, V82({
198956
+ return this.#i ? u = this.#i : (u = y82(() => import("./MWZ6AO7Z-Bi6tTEQ8.js")), this.#i = u), F82(this.#h, this.#r), M82(u, V82({
198957
198957
  get queryFlavor() {
198958
198958
  return r.#d;
198959
198959
  },
@@ -199083,7 +199083,7 @@ const J$t = {
199083
199083
  }
199084
199084
  }
199085
199085
  }, X$t = "home", cSt = 6, Q$t = X0(
199086
- () => import("./index-DZccYhuY.js").then((t) => ({
199086
+ () => import("./index-9EgfdeTj.js").then((t) => ({
199087
199087
  default: t.HomePage
199088
199088
  }))
199089
199089
  ), eDt = [
@@ -199122,24 +199122,24 @@ export {
199122
199122
  uc as F,
199123
199123
  vy as G,
199124
199124
  NRt as H,
199125
- cSt as I,
199125
+ bRt as I,
199126
199126
  M22 as J,
199127
- LRt as K,
199127
+ cSt as K,
199128
199128
  mQ2 as L,
199129
- _Rt as M,
199129
+ LRt as M,
199130
199130
  h30 as N,
199131
199131
  lQ2 as O,
199132
199132
  dc as P,
199133
- zOt as Q,
199133
+ _Rt as Q,
199134
199134
  bY2 as R,
199135
199135
  W0 as S,
199136
199136
  nQ2 as T,
199137
- sy0 as U,
199137
+ zOt as U,
199138
199138
  pp0 as V,
199139
199139
  ARt as W,
199140
- GDt as X,
199140
+ sy0 as X,
199141
199141
  q0 as Y,
199142
- bRt as Z,
199142
+ GDt as Z,
199143
199143
  FDt as _,
199144
199144
  Oi as a,
199145
199145
  O0 as a0,
@@ -1,5 +1,5 @@
1
1
  import { jsxs as c, jsx as e, Fragment as b } from "react/jsx-runtime";
2
- import { u as m, W as p, D as y, G as H, H as N, e as E, Z as P, I as G, K as v, M as f, Q as L, U as O, X as S } from "./index-BQYW4q1k.js";
2
+ import { u as m, W as p, D as y, G as H, H as N, e as E, I as P, K as v, M as G, Q as f, U as L, X as O, Z as S } from "./index-0gCl6Ezv.js";
3
3
  import "react";
4
4
  import { useQuery as T } from "@tanstack/react-query";
5
5
  const C = "AppTile-module_tile__-CBFh", B = "AppTile-module_label__6vslD", M = "AppTile-module_bottom__lcJiG", d = {
@@ -53,9 +53,9 @@ const C = "AppTile-module_tile__-CBFh", B = "AppTile-module_label__6vslD", M = "
53
53
  "aria-label": o("HOME_LOADING_MODULES"),
54
54
  "aria-busy": "true",
55
55
  children: /* @__PURE__ */ e("div", { className: r.tileGrid, children: Array.from(
56
- { length: G },
56
+ { length: v },
57
57
  (a, g) => `skeleton-${g}`
58
- ).map((a) => /* @__PURE__ */ e(v, { className: r.skeletonTile }, a)) })
58
+ ).map((a) => /* @__PURE__ */ e(G, { className: r.skeletonTile }, a)) })
59
59
  }
60
60
  ) : l || u ? /* @__PURE__ */ e(
61
61
  "div",
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aN as a } from "./index-BQYW4q1k.js";
1
+ import { aN as a } from "./index-0gCl6Ezv.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.418",
3
+ "version": "0.0.1-dev.423",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",