@bahmni/appointments-app 0.0.1-dev.282 → 0.0.1-dev.284

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 x } from "react/jsx-runtime";
2
- import { u as G, a as W, h as Y, K as J, w as X, m as Z, c as ee, n as te } from "./index-D5Gdi7BY.js";
2
+ import { u as G, a as W, h as Y, K as J, w as X, m as Z, c as ee, n as te } from "./index-DKzu78Jr.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as _, useEffect as N, 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,5 +1,5 @@
1
1
  import { jsx as s, jsxs as X, Fragment as Z } from "react/jsx-runtime";
2
- import { a as ee, u as re, E as ae, q as oe, U as te, W as se, j as ne, t as de, _ as R, m as ie, w as me, c as q, O as ue, L as le, n as ce, Y as fe, P as ye } from "./index-D5Gdi7BY.js";
2
+ import { a as ee, u as re, E as ae, q as oe, U as te, W as se, j as ne, t as de, _ as R, m as ie, w as me, c as q, O as ue, L as le, n as ce, Y as fe, P as ye } from "./index-DKzu78Jr.js";
3
3
  import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
4
4
  import { useState as S, useMemo as d, useCallback as y } from "react";
5
5
  const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-Cqa2qcSd.js";
2
- import { ah as d, ai as f, aj as e } from "./index-D5Gdi7BY.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-KadJzzn-.js";
2
+ import { ah as d, ai as f, aj as e } from "./index-DKzu78Jr.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-Cqa2qcSd.js";
2
- import { ah as h, ai as v, aj as e } from "./index-D5Gdi7BY.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-KadJzzn-.js";
2
+ import { ah as h, ai as v, aj as e } from "./index-DKzu78Jr.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 N, jsx as u } from "react/jsx-runtime";
2
- import { u as U, h as K, a as S, B as Q, F as q, t as k, e as w, b as z, r as x, z as G, c as J, X as j, M as F, Q as P, V as X, J as Y, N as W, I as Z, C as ee } from "./index-D5Gdi7BY.js";
2
+ import { u as U, h as K, a as S, B as Q, F as q, t as k, e as w, b as z, r as x, z as G, c as J, X as j, M as F, Q as P, V as X, J as Y, N as W, I as Z, C as ee } from "./index-DKzu78Jr.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
4
  import { useRef as se, useEffect as $, useMemo as R } from "react";
5
5
  const C = (t, n, d, l, b, r) => {
@@ -123,10 +123,10 @@ const C = (t, n, d, l, b, r) => {
123
123
  $(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
- const H = d[h];
126
+ const M = d[h];
127
127
  s({
128
128
  title: o("ERROR_DEFAULT_TITLE"),
129
- message: o("ERROR_FETCHING_CONCEPT", { conceptName: H }),
129
+ message: o("ERROR_FETCHING_CONCEPT", { conceptName: M }),
130
130
  type: "error"
131
131
  }), r.current.add(h);
132
132
  } else e.isError || r.current.delete(h);
@@ -136,7 +136,7 @@ const C = (t, n, d, l, b, r) => {
136
136
  data: c,
137
137
  isLoading: D,
138
138
  isError: T,
139
- refetch: O
139
+ refetch: g
140
140
  } = ae({
141
141
  queryKey: le(a, p),
142
142
  queryFn: () => q(a, p),
@@ -146,9 +146,9 @@ const C = (t, n, d, l, b, r) => {
146
146
  (e) => {
147
147
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
- ) && O();
149
+ ) && g();
150
150
  },
151
- [a, O]
151
+ [a, g]
152
152
  ), $(() => {
153
153
  T && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
@@ -156,7 +156,7 @@ const C = (t, n, d, l, b, r) => {
156
156
  type: "error"
157
157
  });
158
158
  }, [T]);
159
- const g = R(() => {
159
+ const O = R(() => {
160
160
  if (!c) return [];
161
161
  const e = w(c), h = z(e);
162
162
  return x(h);
@@ -164,7 +164,7 @@ const C = (t, n, d, l, b, r) => {
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], f = D || !y, _ = T && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, B = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, M = A ? o("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !f && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], f = D || !y, _ = T && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, B = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, V = A ? o("NO_OBSERVATIONS_FOUND") : void 0, H = O.length > 0 && !f && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ N(
169
169
  "div",
170
170
  {
@@ -183,10 +183,10 @@ const C = (t, n, d, l, b, r) => {
183
183
  children: /* @__PURE__ */ u("p", { children: v })
184
184
  }
185
185
  ),
186
- V ? /* @__PURE__ */ u(
186
+ H ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: g,
189
+ groupedData: O,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
@@ -198,7 +198,7 @@ const C = (t, n, d, l, b, r) => {
198
198
  ariaLabel: o("OBSERVATIONS"),
199
199
  loading: f,
200
200
  errorStateMessage: B,
201
- emptyStateMessage: M,
201
+ emptyStateMessage: V,
202
202
  dataTestId: "observations-table"
203
203
  }
204
204
  )
@@ -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-D5Gdi7BY.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-DKzu78Jr.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -1,20 +1,20 @@
1
1
  import { jsx as n, jsxs as y } from "react/jsx-runtime";
2
- import { s as V, A as O, a as C, d as h, f as P, h as B, o as x, g as L, i as G, k as U, l as q, p as w, v as k, x as F, y as K, D as $ } from "./index-D5Gdi7BY.js";
2
+ import { s as V, A as h, a as C, d as O, f as P, h as B, o as x, g as L, i as G, k as U, l as q, p as w, v as k, x as F, y as K, D as $ } from "./index-DKzu78Jr.js";
3
3
  import { useState as I, useMemo as _ } from "react";
4
4
  import { useQueryClient as j, useQuery as H } from "@tanstack/react-query";
5
5
  const Q = V(
6
- O,
6
+ h,
7
7
  "useAppointmentsConfig",
8
8
  "AppointmentsConfigProvider"
9
9
  ), W = ({
10
10
  serviceName: e,
11
- isDeleting: i,
11
+ isDeleting: a,
12
12
  onConfirm: t,
13
13
  onCancel: s
14
14
  }) => {
15
- const { t: a } = C();
15
+ const { t: i } = C();
16
16
  return /* @__PURE__ */ n(
17
- h,
17
+ O,
18
18
  {
19
19
  id: "delete-service-modal",
20
20
  testId: "delete-service-modal-test-id",
@@ -23,11 +23,11 @@ const Q = V(
23
23
  danger: !0,
24
24
  onRequestClose: s,
25
25
  onRequestSubmit: t,
26
- primaryButtonText: a("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
27
- secondaryButtonText: a("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
28
- primaryButtonDisabled: i,
29
- modalHeading: a("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
30
- children: a("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
26
+ primaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_BUTTON_LABEL"),
27
+ secondaryButtonText: i("ADMIN_ALL_SERVICES_DELETE_CANCEL"),
28
+ primaryButtonDisabled: a,
29
+ modalHeading: i("ADMIN_ALL_SERVICES_DELETE_MODAL_TITLE"),
30
+ children: i("ADMIN_ALL_SERVICES_DELETE_CONFIRM_BODY", { serviceName: e })
31
31
  }
32
32
  );
33
33
  }, p = [
@@ -42,23 +42,23 @@ const Q = V(
42
42
  table: X
43
43
  };
44
44
  function ee(e) {
45
- return e.filter((i) => !p.includes(i));
45
+ return e.filter((a) => !p.includes(a));
46
46
  }
47
- function te(e, i) {
47
+ function te(e, a) {
48
48
  return [
49
49
  ...e.map((t) => ({
50
50
  key: t,
51
- header: i(
51
+ header: a(
52
52
  `ADMIN_ALL_SERVICES_COLUMN_${P(t)}`
53
53
  )
54
54
  })),
55
55
  {
56
56
  key: "actions",
57
- header: i("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
57
+ header: a("ADMIN_ALL_SERVICES_COLUMN_ACTIONS")
58
58
  }
59
59
  ];
60
60
  }
61
- function ie(e, i) {
61
+ function ae(e, a) {
62
62
  return e.map((t) => ({
63
63
  id: t.uuid,
64
64
  name: t.name,
@@ -67,15 +67,15 @@ function ie(e, i) {
67
67
  durationMins: t.durationMins,
68
68
  description: t.description,
69
69
  attributes: Object.fromEntries(
70
- i.map((s) => [
70
+ a.map((s) => [
71
71
  s,
72
- t.attributes?.find((a) => a.attributeType === s)?.value ?? null
72
+ t.attributes?.find((i) => i.attributeType === s)?.value ?? null
73
73
  ])
74
74
  )
75
75
  }));
76
76
  }
77
77
  const le = () => {
78
- const { t: e } = C(), i = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: a } = Q(), [E, c] = I(null), [M, u] = I(!1), l = a?.serviceTableFields ?? [
78
+ const { t: e } = C(), a = j(), { addNotification: t } = B(), { userPrivileges: s } = x(), { appointmentsConfig: i } = Q(), [E, c] = I(null), [M, u] = I(!1), l = i?.serviceTableFields ?? [
79
79
  ...p
80
80
  ], m = L(s, Z), b = L(
81
81
  s,
@@ -90,10 +90,10 @@ const le = () => {
90
90
  }), R = _(
91
91
  () => te(l, e),
92
92
  [l]
93
- ), g = _(
94
- () => ie(A ?? [], S),
93
+ ), N = _(
94
+ () => ae(A ?? [], S),
95
95
  [A, S]
96
- ), N = async () => {
96
+ ), g = async () => {
97
97
  u(!0);
98
98
  try {
99
99
  await $(E.id), t({
@@ -101,7 +101,7 @@ const le = () => {
101
101
  message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
102
102
  type: "success",
103
103
  timeout: 5e3
104
- }), c(null), i.invalidateQueries({ queryKey: ["allAppointmentServices"] });
104
+ }), c(null), a.invalidateQueries({ queryKey: ["allAppointmentServices"] });
105
105
  } catch {
106
106
  t({
107
107
  title: e("ADMIN_ALL_SERVICES_DELETE_ERROR_TITLE"),
@@ -145,7 +145,7 @@ const le = () => {
145
145
  id: "all-services",
146
146
  title: e("ADMIN_ALL_SERVICES_TITLE"),
147
147
  headers: R,
148
- rows: g,
148
+ rows: N,
149
149
  ariaLabel: "all-services-table",
150
150
  loading: v,
151
151
  errorStateMessage: D ? e("ADMIN_ALL_SERVICES_ERROR_MESSAGE") : null,
@@ -159,7 +159,7 @@ const le = () => {
159
159
  {
160
160
  serviceName: E.name,
161
161
  isDeleting: M,
162
- onConfirm: N,
162
+ onConfirm: g,
163
163
  onCancel: () => c(null)
164
164
  }
165
165
  )
@@ -1,10 +1,10 @@
1
1
  import { jsx as r, jsxs as b } from "react/jsx-runtime";
2
- import { G as f, H as P, R as B, T as V, S as X, Z as ee, $ as te, a0 as ie, i as ae, a1 as ne, a as Q, a2 as R, a3 as le, a4 as re, a5 as se, a6 as E, a7 as F, a8 as C, a9 as Y, aa as k, ab as x, ac as $, o as oe, h as de, g as w, ad as ce, k as me, ae as Ae, af as Ie, ag as ue, p as _e, v as Te } from "./index-D5Gdi7BY.js";
2
+ import { G as f, H as O, R as P, T as V, S as J, Z as ee, $ as te, a0 as ie, i as ae, a1 as ne, a as Q, a2 as R, a3 as le, a4 as re, a5 as se, a6 as E, a7 as F, a8 as C, a9 as Y, aa as k, ab as x, ac as w, o as oe, h as de, g as $, ad as ce, k as me, ae as Ae, af as Ie, ag as ue, p as _e, v as Te } from "./index-DKzu78Jr.js";
3
3
  import { useState as g, useMemo as N, useEffect as h, useRef as Le, useCallback as U } from "react";
4
4
  import { useQuery as M, useQueryClient as ve } from "@tanstack/react-query";
5
5
  const Ne = "Available for appointments", q = "Get Appointment Unavailability", pe = "Add Appointment Unavailability", G = "Appointment Location", be = () => {
6
6
  try {
7
- return X().uuid;
7
+ return J().uuid;
8
8
  } catch {
9
9
  return "";
10
10
  }
@@ -39,17 +39,17 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
39
39
  }, Ee = (e, a) => ({
40
40
  locationUuid: e.locationUuid,
41
41
  startDate: f(e.startDate, a, !1, V).formattedResult,
42
- startTime: B(
42
+ startTime: P(
43
43
  `${e.startTime} ${e.startTimePeriod}`
44
44
  ),
45
45
  endDate: f(e.endDate, a, !1, V).formattedResult,
46
- endTime: B(`${e.endTime} ${e.endTimePeriod}`)
46
+ endTime: P(`${e.endTime} ${e.endTimePeriod}`)
47
47
  }), Ue = (e, a) => {
48
48
  const n = {}, t = a("ADMIN_UNAVAILABILITY_FORM_REQUIRED");
49
49
  if (e.locationUuid || (n.location = t), e.startDate || (n.startDate = t), e.startTime || (n.startTime = t), e.endDate || (n.endDate = t), e.endTime || (n.endTime = t), e.startDate && e.startTime && e.endDate && e.endTime && e.startDate.toDateString() === e.endDate.toDateString()) {
50
- const o = P(
50
+ const o = O(
51
51
  `${e.startTime} ${e.startTimePeriod}`
52
- ), c = P(
52
+ ), c = O(
53
53
  `${e.endTime} ${e.endTimePeriod}`
54
54
  );
55
55
  o !== null && c !== null && c <= o && (n.dateTime = a("ADMIN_UNAVAILABILITY_DATETIME_ERROR_MESSAGE"));
@@ -137,11 +137,11 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
137
137
  isLoading: a || o || L || s,
138
138
  isError: n || c || m || _
139
139
  };
140
- }, Se = "UnavailabilityForm-module_formContent__WmNHR", Oe = "UnavailabilityForm-module_formField__8he7o", Pe = "UnavailabilityForm-module_loading__IDEY6", Be = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
140
+ }, Se = "UnavailabilityForm-module_formContent__WmNHR", Be = "UnavailabilityForm-module_formField__8he7o", Oe = "UnavailabilityForm-module_loading__IDEY6", Pe = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", ke = "UnavailabilityForm-module_timePicker__DHNpK", d = {
141
141
  formContent: Se,
142
- formField: Oe,
143
- loading: Pe,
144
- error: Be,
142
+ formField: Be,
143
+ loading: Oe,
144
+ error: Pe,
145
145
  grid: Ve,
146
146
  column: Fe,
147
147
  dateTimeColumn: Ce,
@@ -450,7 +450,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
450
450
  lg: 8,
451
451
  className: d.column,
452
452
  children: /* @__PURE__ */ r(
453
- $,
453
+ w,
454
454
  {
455
455
  id: "service-multiselect",
456
456
  "data-testid": "service-multiselect",
@@ -478,7 +478,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
478
478
  lg: 8,
479
479
  className: d.column,
480
480
  children: /* @__PURE__ */ r(
481
- $,
481
+ w,
482
482
  {
483
483
  id: "provider-multiselect",
484
484
  "data-testid": "provider-multiselect",
@@ -501,13 +501,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
501
501
  ]
502
502
  }
503
503
  );
504
- }, $e = "index-module_page__s2h2y", we = {
505
- page: $e
504
+ }, we = "index-module_page__s2h2y", $e = {
505
+ page: we
506
506
  }, Qe = () => {
507
- const { t: e } = Q(), a = ve(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = Le(null), [l, s] = g({}), _ = w(
507
+ const { t: e } = Q(), a = ve(), { userPrivileges: n } = oe(), { addNotification: t } = de(), [o, c] = g(!1), [A, L] = g(!1), m = Le(null), [l, s] = g({}), _ = $(
508
508
  n,
509
509
  q
510
- ), I = w(n, [
510
+ ), I = $(n, [
511
511
  pe,
512
512
  q
513
513
  ]), { data: u, isLoading: v, isError: y } = M({
@@ -567,12 +567,12 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
567
567
  }, [e, S]), W = U(
568
568
  (T) => {
569
569
  s((Z) => {
570
- const O = { ...Z };
571
- return T.forEach((z) => delete O[z]), O;
570
+ const B = { ...Z };
571
+ return T.forEach((z) => delete B[z]), B;
572
572
  });
573
573
  },
574
574
  []
575
- ), J = U(() => {
575
+ ), X = U(() => {
576
576
  c(!1), m.current = null, s({});
577
577
  }, []);
578
578
  return /* @__PURE__ */ r(
@@ -586,7 +586,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
586
586
  id: "appointment-unavailability-page",
587
587
  "data-testid": "appointment-unavailability-page-test-id",
588
588
  "aria-label": "appointment-unavailability-page-aria-label",
589
- className: we.page,
589
+ className: $e.page,
590
590
  children: /* @__PURE__ */ r(
591
591
  _e,
592
592
  {
@@ -619,7 +619,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
619
619
  onPrimaryButtonClick: j,
620
620
  isPrimaryButtonDisabled: A,
621
621
  secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
622
- onSecondaryButtonClick: J,
622
+ onSecondaryButtonClick: X,
623
623
  isSecondaryButtonDisabled: A,
624
624
  content: /* @__PURE__ */ r(
625
625
  xe,