@bahmni/appointments-app 0.0.1-dev.220 → 0.0.1-dev.222

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 { t as K, u as Q, r as W, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-CWBmCK15.js";
2
+ import { t as W, u as K, r as Q, a as J, M as X, N as Z, o as ee, s as te, b as ae } from "./index-DW8fGjlC.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,
@@ -37,7 +37,7 @@ const _e = [
37
37
  null
38
38
  ), [R, I] = l(
39
39
  /* @__PURE__ */ new Set()
40
- ), E = K(), { t: n } = Q(), { addNotification: L } = W(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
40
+ ), E = W(), { t: n } = K(), { addNotification: L } = Q(), $ = Number(a?.pageSize) || 5, [C, A] = l(1), [m, k] = l($), [V, y] = l(void 0), U = h((e) => {
41
41
  M(e), w(!0);
42
42
  }, []), F = h(() => {
43
43
  w(!1), M(null), I(/* @__PURE__ */ new Set());
@@ -1,17 +1,17 @@
1
1
  import { jsx as o, jsxs as Y, Fragment as Z } from "react/jsx-runtime";
2
- import { u as W, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as C, G as ne, J as de, s as ie, Z as ue, d as me, e as le, X as ce, f as fe, Q as ye } from "./index-CWBmCK15.js";
2
+ import { u as W, t as ee, m as re, c as ae, a as c, k as te, V as U, N as se, M as oe, o as C, G as ne, J as de, s as ie, Z as ue, d as me, e as le, X as ce, f as fe, Q as ye } from "./index-DW8fGjlC.js";
3
3
  import { useState as S, useMemo as d, useCallback as f } from "react";
4
- const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
4
+ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", O = {
5
5
  formsTableBody: be,
6
6
  customAccordianItem: Ne
7
7
  }, pe = (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
12
  config: q
13
13
  }) => {
14
- const { t: s } = W(), m = ee(), [l, O] = S(!1), [t, A] = S(null), { numberOfVisits: k, hideThumbnail: V = !1 } = q ?? {}, M = re(
14
+ const { t: s } = W(), m = ee(), [l, A] = S(!1), [t, I] = S(null), { numberOfVisits: k, hideThumbnail: V = !1 } = q ?? {}, M = re(
15
15
  u,
16
16
  n
17
17
  ), G = ae(), {
@@ -29,13 +29,13 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
29
29
  ), [y, n]), { data: _ = [] } = c({
30
30
  queryKey: ["observationForms"],
31
31
  queryFn: () => ce()
32
- }), F = f(
32
+ }), D = f(
33
33
  (e) => _.find((r) => r.name === e)?.uuid,
34
34
  [_]
35
35
  ), b = d(() => {
36
36
  if (t)
37
- return F(t.formName);
38
- }, [t, F]), {
37
+ return D(t.formName);
38
+ }, [t, D]), {
39
39
  isLoading: Q,
40
40
  isError: j,
41
41
  error: N
@@ -67,7 +67,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
67
67
  return U(N).message;
68
68
  if (g)
69
69
  return U(g).message;
70
- }, [N, g]), L = d(
70
+ }, [N, g]), F = 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", Ne = "_customAccordianItem_81hra_6", I = {
79
79
  { key: "recordedBy", sortable: !0 }
80
80
  ],
81
81
  []
82
- ), D = d(() => {
82
+ ), L = d(() => {
83
83
  const e = E.reduce(
84
84
  (r, a) => {
85
85
  const i = a.formName;
@@ -105,9 +105,9 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
105
105
  })
106
106
  ).sort((r, a) => r.formName.localeCompare(a.formName));
107
107
  }, [E, 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
  }, []), v = f(
112
112
  (e, r) => {
113
113
  switch (r) {
@@ -122,32 +122,32 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
122
122
  [R]
123
123
  );
124
124
  return /* @__PURE__ */ Y(Z, { children: [
125
- /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || D.length === 0 || M ? /* @__PURE__ */ o(
125
+ /* @__PURE__ */ o("div", { "data-testid": "forms-table", children: T || B || L.length === 0 || M ? /* @__PURE__ */ o(
126
126
  C,
127
127
  {
128
- headers: L,
128
+ headers: F,
129
129
  ariaLabel: s("FORMS_HEADING"),
130
130
  rows: [],
131
131
  loading: T,
132
132
  errorStateMessage: B ? H?.message : void 0,
133
133
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
134
134
  renderCell: v,
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: L.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
148
  C,
149
149
  {
150
- headers: L,
150
+ headers: F,
151
151
  ariaLabel: s("FORMS_HEADING"),
152
152
  rows: i,
153
153
  loading: !1,
@@ -155,7 +155,7 @@ const be = "_formsTableBody_81hra_1", Ne = "_customAccordianItem_81hra_6", I = {
155
155
  sortable: J,
156
156
  emptyStateMessage: s("FORMS_UNAVAILABLE"),
157
157
  renderCell: v,
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", Ne = "_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-CD6oYRfl.js";
2
- import { T as d, U as f, _ as e } from "./index-CWBmCK15.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-CXnY7jGB.js";
2
+ import { T as d, U as f, _ as e } from "./index-DW8fGjlC.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-CD6oYRfl.js";
2
- import { T as v, U as C, _ as e } from "./index-CWBmCK15.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-CXnY7jGB.js";
2
+ import { T as v, U as C, _ as e } from "./index-DW8fGjlC.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 B, r as K, u as S, g as G, Y as w, a as x, k as M, h as Q, l as j, i as H, j as Y, o as P, n as z, O as U, p as J, q as W, I as X, v as Z, w as ee, x as ae, y as te } from "./index-CWBmCK15.js";
2
+ import { t as K, r as V, u as S, g as G, Y as w, a as x, k as M, h as Q, l as j, i as H, j as Y, o as P, n as z, O as U, p as J, q as W, I as X, v as Z, w as ee, x as ae, y as te } from "./index-DW8fGjlC.js";
3
3
  import { useRef as se, useEffect as $, useMemo as R } from "react";
4
4
  const D = (a, n, d, l, b, r) => {
5
5
  const t = J(a, n, b), s = t.value, i = W(s);
@@ -112,7 +112,7 @@ const D = (a, n, d, l, b, r) => {
112
112
  conceptNames: d = [],
113
113
  conceptUuid: l = [],
114
114
  hideThumbnail: b = !1
115
- } = n, r = se(/* @__PURE__ */ new Set()), t = B(), { addNotification: s } = K(), { t: i } = S(), o = G({
115
+ } = n, r = se(/* @__PURE__ */ new Set()), t = K(), { addNotification: s } = V(), { t: i } = S(), o = G({
116
116
  queries: d.map((e) => ({
117
117
  queryKey: de(e),
118
118
  queryFn: () => w(e),
@@ -122,10 +122,10 @@ const D = (a, n, d, l, b, r) => {
122
122
  $(() => {
123
123
  o.forEach((e, h) => {
124
124
  if (e.isError && !r.current.has(h)) {
125
- const V = d[h];
125
+ const B = d[h];
126
126
  s({
127
127
  title: i("ERROR_DEFAULT_TITLE"),
128
- message: i("ERROR_FETCHING_CONCEPT", { conceptName: V }),
128
+ message: i("ERROR_FETCHING_CONCEPT", { conceptName: B }),
129
129
  type: "error"
130
130
  }), r.current.add(h);
131
131
  } else e.isError || r.current.delete(h);
@@ -1,4 +1,4 @@
1
- import { $ as we, a0 as z, a1 as xt, a2 as B, U as q, _ 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 U, 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 Ur, 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-CWBmCK15.js";
1
+ import { $ as we, a0 as z, a1 as xt, a2 as B, U as q, _ 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 U, 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 Ur, 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-DW8fGjlC.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 { jsx as n, jsxs as f } from "react/jsx-runtime";
2
- import { z as V, A as h, u as I, B as O, C as P, c as B, r as G, W as x, D as L, a as U, E as q, F, H as W, K as $, L as k, P as H, R as K, S as j } from "./index-CWBmCK15.js";
2
+ import { z as V, A as h, u as I, B as O, C as P, c as B, r as G, W as x, P as L, a as U, D as q, E as F, F as W, H as $, K as k, L as H, R as K, S as j } from "./index-DW8fGjlC.js";
3
3
  import { useState as C, useMemo as _ } from "react";
4
4
  const Q = V(
5
5
  h,
@@ -82,17 +82,17 @@ const re = () => {
82
82
  ), m = _(
83
83
  () => ee(l),
84
84
  [l]
85
- ), { data: A, isLoading: D, isError: N } = U({
85
+ ), { data: A, isLoading: D, isError: R } = U({
86
86
  queryKey: ["allAppointmentServices"],
87
87
  queryFn: j,
88
88
  enabled: u
89
- }), R = _(
89
+ }), b = _(
90
90
  () => te(l, e),
91
91
  [l]
92
- ), b = _(
92
+ ), g = _(
93
93
  () => ae(A ?? [], m),
94
94
  [A, m]
95
- ), g = async () => {
95
+ ), N = async () => {
96
96
  S(!0);
97
97
  try {
98
98
  await K(E.id), t({
@@ -143,11 +143,11 @@ const re = () => {
143
143
  {
144
144
  id: "all-services",
145
145
  title: e("ADMIN_ALL_SERVICES_TITLE"),
146
- headers: R,
147
- rows: b,
146
+ headers: b,
147
+ rows: g,
148
148
  ariaLabel: "all-services-table",
149
149
  loading: D,
150
- errorStateMessage: N ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
150
+ errorStateMessage: R ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
151
151
  emptyStateMessage: e("ADMIN_ALL_SERVICES_EMPTY_MESSAGE"),
152
152
  renderCell: T,
153
153
  className: d.table
@@ -158,7 +158,7 @@ const re = () => {
158
158
  {
159
159
  serviceName: E.name,
160
160
  isDeleting: v,
161
- onConfirm: g,
161
+ onConfirm: N,
162
162
  onCancel: () => c(null)
163
163
  }
164
164
  )
@@ -159082,7 +159082,7 @@ function Dx0(t, e, r) {
159082
159082
  return o;
159083
159083
  };
159084
159084
  }
159085
- z0(() => Promise.resolve().then(() => Gg0)), z0(() => Promise.resolve().then(() => VE0)), z0(() => Promise.resolve().then(() => XE0)), z0(() => Promise.resolve().then(() => cM0)), z0(() => import("./DocumentsTable-CJ7fZ08M-CcE8Wuie.js")), z0(() => Promise.resolve().then(() => Sz0)), z0(() => import("./FormsTable-B5bhuwKx-DNNkNDYo.js")), z0(() => Promise.resolve().then(() => Ez0)), z0(() => import("./Observations-DkQGjP2q-D29nvKTz.js")), z0(
159085
+ z0(() => Promise.resolve().then(() => Gg0)), z0(() => Promise.resolve().then(() => VE0)), z0(() => Promise.resolve().then(() => XE0)), z0(() => Promise.resolve().then(() => cM0)), z0(() => import("./DocumentsTable-CxTI1Hgb-C93c9iFc.js")), z0(() => Promise.resolve().then(() => Sz0)), z0(() => import("./FormsTable-DvLskkhx-U-DwiEgx.js")), z0(() => Promise.resolve().then(() => Ez0)), z0(() => import("./Observations-BU9Xc30t-87zPVYrT.js")), z0(
159086
159086
  () => Promise.resolve().then(() => Wz0)
159087
159087
  ), z0(
159088
159088
  () => Promise.resolve().then(() => By0)
@@ -160921,7 +160921,7 @@ var aN0 = (t, e = !1) => {
160921
160921
  const e = uAe(() => {
160922
160922
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t;
160923
160923
  let d;
160924
- return this.#i ? d = this.#i : (d = sAe(() => import("./LNWAZHJI-DRTpsX-W.js")), this.#i = d), AAe(this.#l, this.#c), lAe(d, iAe({
160924
+ return this.#i ? d = this.#i : (d = sAe(() => import("./LNWAZHJI-wEmwNIjW.js")), this.#i = d), AAe(this.#l, this.#c), lAe(d, iAe({
160925
160925
  get queryFlavor() {
160926
160926
  return r.#r;
160927
160927
  },
@@ -161019,7 +161019,7 @@ var aN0 = (t, e = !1) => {
161019
161019
  const e = uAe(() => {
161020
161020
  const r = this, [o] = this.#a, [a] = this.#h, [c] = this.#d, [l] = this.#u, [i] = this.#p, [s] = this.#t, [d] = this.#i;
161021
161021
  let u;
161022
- return this.#s ? u = this.#s : (u = sAe(() => import("./MWZ6AO7Z-D_n75aW4.js")), this.#s = u), AAe(this.#l, this.#c), lAe(u, iAe({
161022
+ return this.#s ? u = this.#s : (u = sAe(() => import("./MWZ6AO7Z-BOb53LRj.js")), this.#s = u), AAe(this.#l, this.#c), lAe(u, iAe({
161023
161023
  get queryFlavor() {
161024
161024
  return r.#r;
161025
161025
  },
@@ -161179,7 +161179,7 @@ const XH0 = {
161179
161179
  }), hb0 = z0(
161180
161180
  () => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
161181
161181
  ), pb0 = z0(
161182
- () => import("./index-B9QiJKC7.js").then((t) => ({
161182
+ () => import("./index-11dEj8IC.js").then((t) => ({
161183
161183
  default: t.default
161184
161184
  }))
161185
161185
  ), fb0 = [
@@ -161220,19 +161220,19 @@ export {
161220
161220
  nb0 as A,
161221
161221
  yw as B,
161222
161222
  ex0 as C,
161223
- nx0 as D,
161224
- Xb0 as E,
161225
- bb0 as F,
161223
+ Xb0 as D,
161224
+ bb0 as E,
161225
+ Hb0 as F,
161226
161226
  il as G,
161227
- Hb0 as H,
161227
+ m$2 as H,
161228
161228
  Od0 as I,
161229
161229
  sl as J,
161230
- m$2 as K,
161231
- Vb0 as L,
161230
+ Vb0 as K,
161231
+ a12 as L,
161232
161232
  Wi as M,
161233
161233
  A2 as N,
161234
161234
  ax0 as O,
161235
- a12 as P,
161235
+ nx0 as P,
161236
161236
  bx0 as Q,
161237
161237
  rx0 as R,
161238
161238
  tx0 as S,
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { aK as t } from "./index-CWBmCK15.js";
1
+ import { aK as t } from "./index-DW8fGjlC.js";
2
2
  export {
3
3
  t as AppointmentsApp
4
4
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/appointments-app",
3
- "version": "0.0.1-dev.220",
3
+ "version": "0.0.1-dev.222",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",