@bahmni/appointments-app 0.0.1-dev.231 → 0.0.1-dev.236

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 _, Fragment as Y } from "react/jsx-runtime";
2
- import { t as K, u as Q, r as W, a as J, x as X, V as Z, o as ee, s as te, p as ae } from "./index-C5kAkfzb.js";
2
+ import { t as K, u as Q, r as W, a as J, x as X, V as Z, o as ee, s as te, p as ae } from "./index-DZLL6BTY.js";
3
3
  import { useState as l, useCallback as h, useEffect as f, useMemo as T } from "react";
4
4
  const ne = "_documentsTableBody_1voj8_1", oe = "_viewAttachmentsLink_1voj8_11", re = "_documentViewerContainer_1voj8_15", de = "_attachmentItem_1voj8_23", se = "_attachmentCounter_1voj8_27", ce = "_attachmentError_1voj8_36", ie = "_documentIframe_1voj8_44", le = "_documentImage_1voj8_50", d = {
5
5
  documentsTableBody: ne,
@@ -1,17 +1,17 @@
1
1
  import { jsx as o, jsxs as W, Fragment as X } from "react/jsx-runtime";
2
- import { u as Z, t as ee, g as re, b as ae, a as c, k as te, c as v, V as se, x as oe, o as q, J as ne, Q as de, s as ie, d as ue, e as me, h as le, f as ce, i as fe, j as ye } from "./index-C5kAkfzb.js";
2
+ import { u as Z, t as ee, g as re, b as ae, a as c, k as te, c as v, V as se, x as oe, o as S, J as ne, Q as de, s as ie, d as ue, e as me, h as le, f as ce, i as fe, j as ye } from "./index-DZLL6BTY.js";
3
3
  import { useState as C, useMemo as d, useCallback as f } from "react";
4
- const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
4
+ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", O = {
5
5
  formsTableBody: be,
6
6
  customAccordianItem: ge
7
7
  }, he = (u) => u ? u.extension?.find(
8
8
  (n) => n.url === me
9
- )?.valueString : void 0, Oe = ({
9
+ )?.valueString : void 0, Ae = ({
10
10
  episodeOfCareUuids: u,
11
11
  encounterUuids: n,
12
- config: S
12
+ config: k
13
13
  }) => {
14
- const { t: s } = Z(), m = ee(), [l, O] = C(!1), [t, A] = C(null), { numberOfVisits: k, hideThumbnail: V = !1 } = S ?? {}, T = re(
14
+ const { t: s } = Z(), m = ee(), [l, A] = C(!1), [t, I] = C(null), { numberOfVisits: q, hideThumbnail: V = !1 } = k ?? {}, T = re(
15
15
  u,
16
16
  n
17
17
  ), x = ae(), {
@@ -22,20 +22,20 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
22
22
  refetch: H
23
23
  } = c({
24
24
  queryKey: ["forms", m, u],
25
- queryFn: () => le(m, void 0, k),
25
+ queryFn: () => le(m, void 0, q),
26
26
  enabled: !!m && !T
27
27
  }), _ = d(() => !n || n.length === 0 ? y : y.filter(
28
28
  (e) => n.includes(e.encounterUuid)
29
- ), [y, n]), { data: F = [] } = c({
29
+ ), [y, n]), { data: D = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
- }), L = f(
33
- (e) => F.find((r) => r.name === e)?.uuid,
34
- [F]
32
+ }), F = f(
33
+ (e) => D.find((r) => r.name === e)?.uuid,
34
+ [D]
35
35
  ), b = d(() => {
36
36
  if (t)
37
- return L(t.formName);
38
- }, [t, L]), {
37
+ return F(t.formName);
38
+ }, [t, F]), {
39
39
  isLoading: K,
40
40
  isError: Q,
41
41
  error: g
@@ -67,7 +67,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
67
67
  return v(g).message;
68
68
  if (p)
69
69
  return v(p).message;
70
- }, [g, p]), M = d(
70
+ }, [g, p]), L = d(
71
71
  () => [
72
72
  { key: "recordedOn", header: s("RECORDED_ON") },
73
73
  { key: "recordedBy", header: s("RECORDED_BY") }
@@ -79,7 +79,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
79
79
  { key: "recordedBy", sortable: !0 }
80
80
  ],
81
81
  []
82
- ), D = d(() => {
82
+ ), M = d(() => {
83
83
  const e = _.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
@@ -105,9 +105,9 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
107
  }, [_, s]), R = f((e) => {
108
- A(e), O(!0);
108
+ I(e), A(!0);
109
109
  }, []), P = f(() => {
110
- O(!1), A(null);
110
+ A(!1), I(null);
111
111
  }, []), U = f(
112
112
  (e, r) => {
113
113
  switch (r) {
@@ -122,32 +122,32 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
122
122
  [R]
123
123
  );
124
124
  return /* @__PURE__ */ W(X, { children: [
125
- /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: B || E || D.length === 0 || T ? /* @__PURE__ */ o(
126
- q,
125
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: B || E || M.length === 0 || T ? /* @__PURE__ */ o(
126
+ S,
127
127
  {
128
- headers: M,
128
+ headers: L,
129
129
  ariaLabel: s("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: B,
132
132
  errorStateMessage: E ? j?.message : void 0,
133
133
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
134
134
  renderCell: U,
135
- className: I.formsTableBody,
135
+ className: O.formsTableBody,
136
136
  dataTestId: "forms-table"
137
137
  }
138
- ) : /* @__PURE__ */ o(ne, { align: "start", children: D.map((e, r) => {
138
+ ) : /* @__PURE__ */ o(ne, { align: "start", children: M.map((e, r) => {
139
139
  const { formName: a, records: i } = e;
140
140
  return /* @__PURE__ */ o(
141
141
  de,
142
142
  {
143
143
  title: a,
144
- className: I.customAccordianItem,
144
+ className: O.customAccordianItem,
145
145
  testId: `accordian-title-${a}`,
146
146
  open: r === 0,
147
147
  children: /* @__PURE__ */ o(
148
- q,
148
+ S,
149
149
  {
150
- headers: M,
150
+ headers: L,
151
151
  ariaLabel: s("FORMS_HEADING"),
152
152
  rows: i,
153
153
  loading: !1,
@@ -155,7 +155,7 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
155
155
  sortable: J,
156
156
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
157
157
  renderCell: U,
158
- className: I.formsTableBody,
158
+ className: O.formsTableBody,
159
159
  dataTestId: `forms-table-${a}`
160
160
  }
161
161
  )
@@ -192,5 +192,5 @@ const be = "_formsTableBody_81hra_1", ge = "_customAccordianItem_81hra_6", I = {
192
192
  ] });
193
193
  };
194
194
  export {
195
- Oe as default
195
+ Ae as default
196
196
  };
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DTDeILzh.js";
2
- import { X as d, Y as f, Z as e } from "./index-C5kAkfzb.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-C6XjBhfk.js";
2
+ import { X as d, Y as f, Z as e } from "./index-DZLL6BTY.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-DTDeILzh.js";
2
- import { X as v, Y as C, Z as e } from "./index-C5kAkfzb.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-C6XjBhfk.js";
2
+ import { X as v, Y as C, Z as e } from "./index-DZLL6BTY.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 N, jsx as u } from "react/jsx-runtime";
2
- import { t as k, r as w, u as S, l as K, m as M, a as P, k as Q, v as x, E as G, y as H, n as j, o as z, w as Y, P as D, q as J, z as W, B as X, A as Z, _ as ee, C as ae, D as te } from "./index-C5kAkfzb.js";
2
+ import { t as k, r as w, u as S, l as K, m as Q, a as P, k as x, v as G, E as H, y as M, n as j, o as z, w as Y, P as D, q as J, z as W, B as X, A as Z, _ as ee, C as ae, D as te } from "./index-DZLL6BTY.js";
3
3
  import { useRef as se, useEffect as $, useMemo as g } from "react";
4
4
  const U = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
@@ -115,7 +115,7 @@ const U = (a, n, d, l, b, r) => {
115
115
  } = n, r = se(/* @__PURE__ */ new Set()), t = k(), { addNotification: s } = w(), { t: i } = S(), o = K({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
- queryFn: () => M(e),
118
+ queryFn: () => Q(e),
119
119
  enabled: !!e
120
120
  }))
121
121
  });
@@ -141,7 +141,7 @@ const U = (a, n, d, l, b, r) => {
141
141
  queryFn: () => te(t, p),
142
142
  enabled: !!t && p.length > 0 && y
143
143
  });
144
- Q(
144
+ x(
145
145
  (e) => {
146
146
  e.patientUUID === t && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
147
147
  (h) => p.includes(h)
@@ -157,8 +157,8 @@ const U = (a, n, d, l, b, r) => {
157
157
  }, [R]);
158
158
  const _ = g(() => {
159
159
  if (!c) return [];
160
- const e = x(c), h = G(e);
161
- return H(h);
160
+ const e = G(c), h = H(e);
161
+ return M(h);
162
162
  }, [c]), F = [
163
163
  { key: "name", header: "name" },
164
164
  { key: "value", header: "value" },
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, Y as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-C5kAkfzb.js";
1
+ import { $ as we, a0 as z, a1 as xt, a2 as B, Y as q, Z as y, a3 as Ro, a4 as ye, a5 as R, a6 as _, a7 as k, a8 as N, a9 as A, aa as bs, ab as ir, ac as $e, ad as G, ae as Hn, af as Vn, ag as dt, ah as D, ai as xs, aj as cn, ak as Be, al as ws, am as qt, an as zt, ao as $s, ap as Cs, aq as $n, ar as Ss, as as Nr, at as Bt, au as zo, av as ks, aw as Es, ax as j, ay as Gr, az as Ms, aA as Ds, aB as sr, aC as As, aD as Ts, aE as zn, aF as Fs, aG as Is, aH as Z, aI as Ps, aJ as Ls } from "./index-DZLL6BTY.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,11 +1,11 @@
1
1
  import { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { N as V, F as O, u as C, G as h, L as P, b as B, r as G, K as U, H as A, a as x, I as q, M as F, W as k, O as K, R as $, S as H, T as W, U as j } from "./index-C5kAkfzb.js";
2
+ import { N as V, F as O, u as C, G as h, L as P, b as B, r as G, K as U, H as A, a as x, I as q, M as F, U as k, O as K, R as $, S as H, T as j, W as w } from "./index-DZLL6BTY.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
- const w = V(
4
+ const Q = V(
5
5
  O,
6
6
  "useAppointmentsConfig",
7
7
  "AppointmentsConfigProvider"
8
- ), Q = ({
8
+ ), W = ({
9
9
  serviceName: e,
10
10
  isDeleting: a,
11
11
  onConfirm: t,
@@ -74,7 +74,7 @@ function ae(e, a) {
74
74
  }));
75
75
  }
76
76
  const re = () => {
77
- const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = w(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
77
+ const { t: e } = C(), a = B(), { addNotification: t } = G(), { userPrivileges: s } = U(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [v, S] = I(!1), l = i?.serviceTableFields ?? [
78
78
  ...p
79
79
  ], u = A(s, z), M = A(
80
80
  s,
@@ -84,7 +84,7 @@ const re = () => {
84
84
  [l]
85
85
  ), { data: L, isLoading: b, isError: N } = x({
86
86
  queryKey: ["allAppointmentServices"],
87
- queryFn: j,
87
+ queryFn: w,
88
88
  enabled: u
89
89
  }), R = _(
90
90
  () => te(l, e),
@@ -95,7 +95,7 @@ const re = () => {
95
95
  ), g = async () => {
96
96
  S(!0);
97
97
  try {
98
- await W(E.id), t({
98
+ await j(E.id), t({
99
99
  title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
100
100
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
101
101
  type: "success",
@@ -154,7 +154,7 @@ const re = () => {
154
154
  }
155
155
  ),
156
156
  E && /* @__PURE__ */ n(
157
- Q,
157
+ W,
158
158
  {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,
@@ -69050,7 +69050,7 @@ const r$2 = () => {
69050
69050
  );
69051
69051
  };
69052
69052
  I2(null);
69053
- const d$2 = "_layout_69f5z_85", u$2 = "_main_69f5z_92", vh1 = {
69053
+ const d$2 = "_layout_ma379_85", u$2 = "_main_ma379_93", vh1 = {
69054
69054
  layout: d$2,
69055
69055
  main: u$2
69056
69056
  }, Bb0 = ({ header: t, main: e }) => /* @__PURE__ */ ne(
@@ -69074,7 +69074,7 @@ const d$2 = "_layout_69f5z_85", u$2 = "_main_69f5z_92", vh1 = {
69074
69074
  )
69075
69075
  ]
69076
69076
  }
69077
- ), h$2 = "_breadcrumb_dqa8m_8", p$2 = "_sideNavItems_dqa8m_20", gh1 = {
69077
+ ), h$2 = "_breadcrumb_7z10y_70", p$2 = "_sideNavItems_7z10y_82", gh1 = {
69078
69078
  breadcrumb: h$2,
69079
69079
  sideNavItems: p$2
69080
69080
  }, f$2 = (t, e = !0) => {
@@ -142222,7 +142222,7 @@ const _d0 = "_bahmniIcon_1cg5e_1", $d0 = "_paddingNone_1cg5e_1", Td0 = "_padding
142222
142222
  ...o
142223
142223
  }) => /* @__PURE__ */ i1(el, { ...o, "data-testid": t ?? e, children: r });
142224
142224
  I2(null);
142225
- const au0 = "_breadcrumb_dqa8m_8", cu0 = "_sideNavItems_dqa8m_20", W5e = {
142225
+ const au0 = "_breadcrumb_7z10y_70", cu0 = "_sideNavItems_7z10y_82", W5e = {
142226
142226
  breadcrumb: au0,
142227
142227
  sideNavItems: cu0
142228
142228
  }, lu0 = (t, e = !0) => {
@@ -142547,7 +142547,7 @@ const gc = "/openmrs/auth?requested_document=/document_images/", fu0 = "_thumbna
142547
142547
  }
142548
142548
  )
142549
142549
  ] });
142550
- }, bu0 = "_thumbnailButton_1uvcl_1", xu0 = "_hideThumbnail_1uvcl_29", Nu0 = "_videoIcon_1uvcl_35", Lu0 = "_thumbnailVideo_1uvcl_39", Cu0 = "_playIconOverlay_1uvcl_46", Au0 = "_modalVideoContainer_1uvcl_68", _u0 = "_modalVideo_1uvcl_68", o3 = {
142550
+ }, bu0 = "_thumbnailButton_1y563_1", xu0 = "_hideThumbnail_1y563_29", Nu0 = "_videoIcon_1y563_35", Lu0 = "_thumbnailVideo_1y563_39", Cu0 = "_playIconOverlay_1y563_46", Au0 = "_modalVideoContainer_1y563_68", _u0 = "_modalVideo_1y563_68", o3 = {
142551
142551
  thumbnailButton: bu0,
142552
142552
  hideThumbnail: xu0,
142553
142553
  videoIcon: Nu0,
@@ -159511,7 +159511,7 @@ function Xx0(t, e, r) {
159511
159511
  return o;
159512
159512
  };
159513
159513
  }
159514
- z0(() => Promise.resolve().then(() => uE0)), z0(() => Promise.resolve().then(() => kE0)), z0(() => Promise.resolve().then(() => fM0)), z0(() => Promise.resolve().then(() => yM0)), z0(() => import("./DocumentsTable-BIJPXmK5-D4SBtTWk.js")), z0(() => Promise.resolve().then(() => Qz0)), z0(() => import("./FormsTable-9HO9pDns-B7Izx9Xj.js")), z0(() => Promise.resolve().then(() => Oz0)), z0(() => import("./Observations-BmK9dOSk-xzS91J1E.js")), z0(
159514
+ z0(() => Promise.resolve().then(() => uE0)), z0(() => Promise.resolve().then(() => kE0)), z0(() => Promise.resolve().then(() => fM0)), z0(() => Promise.resolve().then(() => yM0)), z0(() => import("./DocumentsTable-CswucB2R-G9vVABWl.js")), z0(() => Promise.resolve().then(() => Qz0)), z0(() => import("./FormsTable-CVDEyMEn-COGhJjef.js")), z0(() => Promise.resolve().then(() => Oz0)), z0(() => import("./Observations-Q_KSYNBQ-DXmTLHbh.js")), z0(
159515
159515
  () => Promise.resolve().then(() => iV0)
159516
159516
  ), z0(
159517
159517
  () => Promise.resolve().then(() => rz0)
@@ -161350,7 +161350,7 @@ var VN0 = (t, e = !1) => {
161350
161350
  const e = hAe(() => {
161351
161351
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t;
161352
161352
  let d;
161353
- return this.#i ? d = this.#i : (d = dAe(() => import("./LNWAZHJI-CPTbqM0a.js")), this.#i = d), _Ae(this.#l, this.#c), iAe(d, sAe({
161353
+ return this.#i ? d = this.#i : (d = dAe(() => import("./LNWAZHJI-iPVFwP-a.js")), this.#i = d), _Ae(this.#l, this.#c), iAe(d, sAe({
161354
161354
  get queryFlavor() {
161355
161355
  return r.#r;
161356
161356
  },
@@ -161448,7 +161448,7 @@ var VN0 = (t, e = !1) => {
161448
161448
  const e = hAe(() => {
161449
161449
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t, [d] = this.#i;
161450
161450
  let u;
161451
- return this.#s ? u = this.#s : (u = dAe(() => import("./MWZ6AO7Z-BgXNBg5R.js")), this.#s = u), _Ae(this.#l, this.#c), iAe(u, sAe({
161451
+ return this.#s ? u = this.#s : (u = dAe(() => import("./MWZ6AO7Z-D9SUpSHX.js")), this.#s = u), _Ae(this.#l, this.#c), iAe(u, sAe({
161452
161452
  get queryFlavor() {
161453
161453
  return r.#r;
161454
161454
  },
@@ -161608,7 +161608,7 @@ const mb0 = {
161608
161608
  }), Lb0 = z0(
161609
161609
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
161610
161610
  ), Cb0 = z0(
161611
- () => import("./index-Cx7PaoXZ.js").then((t) => ({
161611
+ () => import("./index-CEFA6knI.js").then((t) => ({
161612
161612
  default: t.default
161613
161613
  }))
161614
161614
  ), Ab0 = [
@@ -161666,9 +161666,9 @@ export {
161666
161666
  Zb0 as R,
161667
161667
  c12 as S,
161668
161668
  Ex0 as T,
161669
- gx0 as U,
161669
+ Ib0 as U,
161670
161670
  A2 as V,
161671
- Ib0 as W,
161671
+ gx0 as W,
161672
161672
  NN0 as X,
161673
161673
  i0 as Y,
161674
161674
  iAe as Z,