@bahmni/admin-app 0.0.1-dev.455 → 0.0.1-dev.456

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 e } from "react/jsx-runtime";
2
- import { G as o, L as a, O as s, P as t } from "./index-0B8edmQt.js";
2
+ import { G as o, L as a, O as s, P as t } from "./index-BhPzl7gM.js";
3
3
  import "react";
4
4
  import "@tanstack/react-query";
5
5
  const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
@@ -1,5 +1,5 @@
1
1
  import { jsx as d, jsxs as S } from "react/jsx-runtime";
2
- import { a7 as ee, a8 as te, a9 as se, aa as K, u as ae, ab as ne, ac as re, G as ie, a3 as oe, ad as ue, ae as de, af as C, a5 as H, ag as le } from "./index-0B8edmQt.js";
2
+ import { a7 as ee, a8 as te, a9 as se, aa as K, u as ae, ab as ne, ac as re, G as ie, a3 as oe, ad as ue, ae as de, af as C, a5 as H, ag as le } from "./index-BhPzl7gM.js";
3
3
  import { useState as l, useRef as P, useEffect as V, useMemo as ce, useCallback as me } from "react";
4
4
  import { useQuery as Ee } from "@tanstack/react-query";
5
5
  const k = Symbol.for("constructDateFrom");
@@ -48,14 +48,14 @@ const Le = (e, t) => {
48
48
  // (and audit logs must always be fetched fresh). Drop entries as soon as
49
49
  // they become inactive instead of retaining them for the default gcTime.
50
50
  gcTime: 0
51
- }), I = (c, G, m, h, D, $) => {
51
+ }), I = (c, G, m, h, D, W) => {
52
52
  o.current += 1, Q({
53
53
  action: c,
54
54
  params: G,
55
55
  alwaysReplace: m,
56
56
  defaultFirstIndex: h,
57
57
  defaultLastIndex: D,
58
- emptyMessageKey: $,
58
+ emptyMessageKey: W,
59
59
  requestId: o.current
60
60
  });
61
61
  }, A = Le(e.startDate, e.startTime), X = () => {
@@ -88,7 +88,7 @@ const Le = (e, t) => {
88
88
  Y
89
89
  );
90
90
  }
91
- }, J = () => {
91
+ }, $ = () => {
92
92
  if (!L) {
93
93
  if (!v()) {
94
94
  x();
@@ -122,7 +122,7 @@ const Le = (e, t) => {
122
122
  0,
123
123
  Te
124
124
  );
125
- }, W = () => {
125
+ }, J = () => {
126
126
  L || (t({
127
127
  startDate: null,
128
128
  startTime: "",
@@ -162,9 +162,9 @@ const Le = (e, t) => {
162
162
  hasPrevious: O,
163
163
  currentPageNumber: F,
164
164
  next: Z,
165
- prev: J,
165
+ prev: $,
166
166
  runReport: x,
167
- reset: W
167
+ reset: J
168
168
  };
169
169
  }, pe = "AuditLog-module_page__-FKzd", Ne = "AuditLog-module_filters__DA4tQ", Ae = "AuditLog-module_filterRow__x6DqE", U = {
170
170
  page: pe,
@@ -1,16 +1,16 @@
1
1
  import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
- import { u as A, z as M, V as R, _ as h, a0 as O, a1 as P, a2 as g, G as D, a3 as V, a4 as f, a5 as x, a6 as y } from "./index-0B8edmQt.js";
2
+ import { u as A, z as M, V as R, _ as h, a0 as O, a1 as P, a2 as g, G as D, a3 as V, a4 as f, a5 as x, a6 as y } from "./index-BhPzl7gM.js";
3
3
  import { useState as E, useMemo as b } from "react";
4
4
  import { useQuery as L, useMutation as v } from "@tanstack/react-query";
5
- const X = "CsvExport-module_tile__yBrLM", z = "CsvExport-module_title__epZnI", B = "CsvExport-module_form__w-cN-", G = "CsvExport-module_search__G82i7", r = {
5
+ const X = "CsvExport-module_tile__yBrLM", G = "CsvExport-module_title__epZnI", B = "CsvExport-module_form__w-cN-", z = "CsvExport-module_search__G82i7", r = {
6
6
  tile: X,
7
- title: z,
7
+ title: G,
8
8
  form: B,
9
- search: G
10
- }, U = 300, p = 2, _ = 5e3, H = "custom:(uuid,setMembers:(uuid))", q = () => {
9
+ search: z
10
+ }, H = 300, p = 2, _ = 5e3, U = "custom:(uuid,setMembers:(uuid))", q = () => {
11
11
  const { t } = A(), { addNotification: i } = M(), [S, C] = E(""), [s, c] = E(
12
12
  null
13
- ), n = R(S.trim(), U), { data: l = [] } = L({
13
+ ), n = R(S.trim(), H), { data: l = [] } = L({
14
14
  queryKey: ["csvExportConceptSearch", n],
15
15
  queryFn: () => h(n),
16
16
  enabled: n.length >= p && n !== s?.name,
@@ -22,7 +22,7 @@ const X = "CsvExport-module_tile__yBrLM", z = "CsvExport-module_title__epZnI", B
22
22
  ),
23
23
  [l]
24
24
  ), o = v({
25
- mutationFn: async (e) => (await P(e.uuid, H)).setMembers?.length ? g(e.name) : null,
25
+ mutationFn: async (e) => (await P(e.uuid, U)).setMembers?.length ? g(e.name) : null,
26
26
  onSuccess: (e, u) => {
27
27
  const m = u.name;
28
28
  if (!e || e.size === 0) {
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
- import { u as d, G as o } from "./index-0B8edmQt.js";
2
+ import { u as d, G as o } from "./index-BhPzl7gM.js";
3
3
  const t = "CsvUpload-module_page__AxMNv", i = {
4
4
  page: t
5
5
  }, n = () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as T, Fragment as Ee } from "react/jsx-runtime";
2
- import { d as ge, u as Ne, z as fe, w as Ce, A as Ae, a as be, K as ye, h as De, T as Ie, b as Le, j as Q, E as Oe, c as we, I as ve, n as Ue, e as Se, f as J, U as te, N as Me, H as Re } from "./index-0B8edmQt.js";
2
+ import { d as ge, u as Ne, z as fe, w as Ce, A as Ae, a as be, K as ye, h as De, T as Ie, b as Le, j as Q, E as Oe, c as we, I as ve, n as Ue, e as Se, f as J, U as te, N as Me, H as Re } from "./index-BhPzl7gM.js";
3
3
  import { useQuery as $e } from "@tanstack/react-query";
4
4
  import { useState as p, useRef as ke, useEffect as g, useMemo as N, useCallback as _ } from "react";
5
5
  const He = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", xe = "DocumentsTable-module_documentViewerContainer__F5m8D", ze = "DocumentsTable-module_printContainer__rtarJ", Fe = "DocumentsTable-module_attachmentItem__17KA7", Pe = "DocumentsTable-module_attachmentCounter__WFiI3", Ve = "DocumentsTable-module_attachmentError__RI4U2", We = "DocumentsTable-module_documentIframe__ptq5I", qe = "DocumentsTable-module_attachmentContent__IaCEe", Ge = "DocumentsTable-module_attachmentLoading__FAR6p", je = "DocumentsTable-module_hiddenWhileLoading__IxocW", Ke = "DocumentsTable-module_documentImage__KQVgS", Ye = "DocumentsTable-module_header__345GY", Qe = "DocumentsTable-module_documentTypeCell__uWGM8", Je = "DocumentsTable-module_printAllButton__IVYUW", Ze = "DocumentsTable-module_attachmentHeader__yI2xn", d = {
@@ -1,50 +1,50 @@
1
1
  import { jsx as n, jsxs as H, Fragment as ne } from "react/jsx-runtime";
2
- import { u as ie, d as de, w as le, Z as me, g as ue, x as ce, i as fe, p as ye, a as Ne, C as ge, k as he, R as pe, h as Te, j as V, l as K, K as Ie, I as j, q as Oe, W as be, n as Ee, M as Ae, m as _e } from "./index-0B8edmQt.js";
2
+ import { u as ie, d as de, w as le, Z as me, g as ue, x as ce, i as fe, p as ye, a as Ne, C as ge, k as he, R as pe, h as Te, j as V, l as K, K as Ie, I as j, q as Oe, W as be, n as Ee, M as Ae, m as _e } from "./index-BhPzl7gM.js";
3
3
  import { useQueryClient as Ce, useQuery as E } from "@tanstack/react-query";
4
4
  import { useState as x, useMemo as i, useCallback as d } from "react";
5
5
  const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_modalHeading__wnTmA", Le = "FormsTable-module_customAccordianItem__isszs", h = {
6
6
  formsTableBody: Re,
7
7
  modalHeading: ve,
8
8
  customAccordianItem: Le
9
- }, Be = "startConsultation", Se = ({
9
+ }, Ue = "startConsultation", Se = ({
10
10
  episodeOfCareUuids: A,
11
11
  encounterUuids: l,
12
- config: z,
13
- disableActions: $ = !1,
12
+ config: $,
13
+ disableActions: z = !1,
14
14
  activeEncounterUuid: y = null
15
15
  }) => {
16
16
  const { t: o } = ie(), m = de(), [p, _] = x(!1), [t, C] = x(null), {
17
- numberOfVisits: G,
18
- hideThumbnail: P = !1,
17
+ numberOfVisits: Q,
18
+ hideThumbnail: G = !1,
19
19
  forms: N
20
- } = z ?? {}, Q = le(
20
+ } = $ ?? {}, P = le(
21
21
  _e.EDIT_OBSERVATIONS
22
- ), { userPrivileges: g } = me(), T = Q && !$ && !!y, R = ue(
22
+ ), { userPrivileges: g } = me(), T = P && !z && !!y, R = ue(
23
23
  A,
24
24
  l
25
25
  ), W = Ce(), {
26
26
  data: v = [],
27
27
  isLoading: L,
28
- isError: B,
28
+ isError: U,
29
29
  error: Z,
30
30
  refetch: Y
31
31
  } = E({
32
32
  queryKey: ["forms", m, A],
33
- queryFn: () => ce(m, void 0, G),
33
+ queryFn: () => ce(m, void 0, Q),
34
34
  enabled: !!m && !R
35
- }), F = i(() => {
35
+ }), B = i(() => {
36
36
  let e = v;
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
- }, [v, l, N]), { data: M = [] } = E({
42
+ }, [v, l, N]), { data: F = [] } = E({
43
43
  queryKey: ["observationForms"],
44
44
  queryFn: () => fe()
45
- }), U = d(
45
+ }), M = d(
46
46
  (e) => {
47
- const r = M.find(
47
+ const r = F.find(
48
48
  (s) => s.name.toLowerCase() === e.toLowerCase()
49
49
  );
50
50
  if (!r?.privileges || r.privileges.length === 0) return !0;
@@ -54,10 +54,10 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
54
54
  (s) => a.has(s.privilegeName) && s.editable
55
55
  );
56
56
  },
57
- [M, g]
57
+ [F, g]
58
58
  ), u = d(
59
- (e) => !y || e.encounterUuid !== y ? !1 : U(e.formName),
60
- [y, U]
59
+ (e) => !y || e.encounterUuid !== y ? !1 : M(e.formName),
60
+ [y, M]
61
61
  ), {
62
62
  data: I,
63
63
  isLoading: J,
@@ -96,7 +96,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
96
96
  ],
97
97
  []
98
98
  ), S = i(() => {
99
- const e = F.reduce(
99
+ const e = B.reduce(
100
100
  (r, a) => {
101
101
  const s = a.formName;
102
102
  r[s] ??= [];
@@ -120,13 +120,13 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
120
120
  )
121
121
  })
122
122
  ).sort((r, a) => r.formName.localeCompare(a.formName));
123
- }, [F, o]), k = d((e) => {
123
+ }, [B, o]), w = d((e) => {
124
124
  C(e), _(!0);
125
- }, []), w = d(() => {
125
+ }, []), k = d(() => {
126
126
  _(!1), C(null);
127
127
  }, []), b = d((e) => {
128
128
  globalThis.dispatchEvent(
129
- new CustomEvent(Be, {
129
+ new CustomEvent(Ue, {
130
130
  detail: {
131
131
  editOnly: "observationForms",
132
132
  editTitle: "EDIT_OBSERVATION_FORM_TITLE",
@@ -140,7 +140,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
140
140
  (e, r) => {
141
141
  switch (r) {
142
142
  case "recordedOn":
143
- return /* @__PURE__ */ n(Ie, { onClick: () => k(e), children: e.recordedOn });
143
+ return /* @__PURE__ */ n(Ie, { onClick: () => w(e), children: e.recordedOn });
144
144
  case "recordedBy":
145
145
  return e.recordedBy;
146
146
  case "actions":
@@ -159,17 +159,17 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
159
159
  return null;
160
160
  }
161
161
  },
162
- [k, b, u, o]
162
+ [w, b, u, o]
163
163
  );
164
164
  return /* @__PURE__ */ H(ne, { children: [
165
- /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || B || S.length === 0 || R ? /* @__PURE__ */ n(
165
+ /* @__PURE__ */ n("div", { id: "forms-table", "data-testid": "forms-table", children: L || U || S.length === 0 || R ? /* @__PURE__ */ n(
166
166
  j,
167
167
  {
168
168
  headers: oe,
169
169
  ariaLabel: o("FORMS_HEADING"),
170
170
  rows: [],
171
171
  loading: L,
172
- errorStateMessage: B ? Z?.message : void 0,
172
+ errorStateMessage: U ? Z?.message : void 0,
173
173
  emptyStateMessage: o("FORMS_UNAVAILABLE"),
174
174
  renderCell: q,
175
175
  className: h.formsTableBody,
@@ -209,7 +209,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
209
209
  id: "modalIdForActionAreaLayout",
210
210
  portalId: "main-display-area",
211
211
  open: p,
212
- onRequestClose: w,
212
+ onRequestClose: k,
213
213
  modalHeading: /* @__PURE__ */ H("div", { className: h.modalHeading, children: [
214
214
  /* @__PURE__ */ n("span", { children: t.formName }),
215
215
  T && u(t) && /* @__PURE__ */ n(
@@ -220,7 +220,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
220
220
  size: "sm",
221
221
  testId: `edit-form-modal-${t.encounterUuid}`,
222
222
  onClick: () => {
223
- w(), b(t);
223
+ k(), b(t);
224
224
  },
225
225
  children: /* @__PURE__ */ n(K, {})
226
226
  }
@@ -239,7 +239,7 @@ const Re = "FormsTable-module_formsTableBody__SvGha", ve = "FormsTable-module_mo
239
239
  errorMessage: re,
240
240
  emptyStateMessage: o("NO_FORM_DATA_AVAILABLE"),
241
241
  testIdPrefix: t.formName,
242
- hideThumbnail: P,
242
+ hideThumbnail: G,
243
243
  formName: t.formName
244
244
  }
245
245
  )
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-DDNNDTsg.js";
2
- import { ah as d, ai as f, aj as e } from "./index-0B8edmQt.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-B31dtVSY.js";
2
+ import { ah as d, ai as f, aj as e } from "./index-BhPzl7gM.js";
3
3
  var h = (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 i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-DDNNDTsg.js";
2
- import { ah as h, ai as v, aj as e } from "./index-0B8edmQt.js";
1
+ import { c as s, T as c, P as i, a as u, b as m, C as P, Q as d } from "./YPM2AS64-B31dtVSY.js";
2
+ import { ah as h, ai as v, aj as e } from "./index-BhPzl7gM.js";
3
3
  var C = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as n } from "react/jsx-runtime";
2
- import { d as z, z as M, u as L, o as G, g as x, r as J, s as Y, a as j, t as X, v as P, $ as Z, y as W, b as ee, I as ae, D as se, B, S as te, X as re, h as ie, Q as oe, F as ne, J as de, Y as le } from "./index-0B8edmQt.js";
2
+ import { d as z, z as M, u as L, o as x, g as G, r as J, s as Y, a as j, t as X, v as P, $ as Z, y as W, b as ee, I as ae, D as se, B, S as te, X as re, h as ie, Q as oe, F as ne, J as de, Y as le } from "./index-BhPzl7gM.js";
3
3
  import { useQueries as ue, useQuery as ce } from "@tanstack/react-query";
4
4
  import { useRef as pe, useEffect as A, useMemo as g } from "react";
5
5
  const me = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
@@ -135,7 +135,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
135
135
  } = d, p = pe(/* @__PURE__ */ new Set()), i = z(), { addNotification: m } = M(), { t: u } = L(), b = ue({
136
136
  queries: c.map((a) => ({
137
137
  queryKey: Re(a),
138
- queryFn: () => G(a),
138
+ queryFn: () => x(a),
139
139
  enabled: !!a
140
140
  }))
141
141
  });
@@ -147,7 +147,7 @@ const me = "Observations-module_observations__RKSyo", be = "Observations-module_
147
147
  type: "error"
148
148
  }), p.current.add(0)) : !a && y && p.current.clear();
149
149
  }, [b, m, u]);
150
- const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = x(
150
+ const E = g(() => b.map((a) => a.data?.uuid).filter((a) => !!a), [b]), h = g(() => [.../* @__PURE__ */ new Set([...E, ...t])], [E, t]), v = g(() => c.length === 0 ? !0 : b.every((a) => !a.isLoading), [b, c.length]), R = e === "latest" || e === "latest-encounter", V = G(
151
151
  l,
152
152
  o
153
153
  ), {
@@ -1,4 +1,4 @@
1
- import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-0B8edmQt.js";
1
+ import { ak as we, al as z, am as xt, an as B, ai as q, aj as y, ao as Ro, ap as ye, aq as R, ar as _, as as k, at as N, au as A, av as bs, aw as ir, ax as $e, ay as U, az as Hn, aA as Vn, aB as dt, aC as D, aD as xs, aE as cn, aF as Be, aG as ws, aH as qt, aI as zt, aJ as $s, aK as Cs, aL as $n, aM as Ss, aN as Nr, aO as Bt, aP as zo, aQ as ks, aR as Es, aS as j, aT as Ur, aU as Ms, aV as Ds, aW as sr, aX as As, aY as Ts, aZ as zn, a_ as Fs, a$ as Is, b0 as Z, b1 as Ps, b2 as Ls } from "./index-BhPzl7gM.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {