@bahmni/appointments-app 0.0.1-dev.314 → 0.0.1-dev.316

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
- import { jsx as r, jsxs as h, Fragment as x } from "react/jsx-runtime";
2
- import { n as G, u as W, o as Y, U as J, a as X, g as Z, O as ee, h as te } from "./index-Z_FLt8Y9.js";
1
+ import { jsx as r, jsxs as h, Fragment as G } from "react/jsx-runtime";
2
+ import { n as Q, u as Y, o as W, U as J, a as X, g as Z, O as ee, h as te } from "./index-wWZTiEer.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 = {
@@ -38,7 +38,7 @@ const Te = [
38
38
  null
39
39
  ), [$, D] = l(
40
40
  /* @__PURE__ */ new Set()
41
- ), E = G(), { t: n } = W(), { addNotification: M } = Y(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
41
+ ), E = Q(), { t: n } = Y(), { addNotification: M } = W(), k = Number(a?.pageSize) || 5, [I, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), L = _((e) => {
42
42
  w(e), U(!0);
43
43
  }, []), H = _(() => {
44
44
  U(!1), w(null), D(/* @__PURE__ */ new Set());
@@ -106,7 +106,7 @@ const Te = [
106
106
  ), T = p(
107
107
  () => o ? B(o) : [],
108
108
  [o]
109
- ), Q = _(
109
+ ), x = _(
110
110
  (e, t) => {
111
111
  switch (t) {
112
112
  case "documentIdentifier":
@@ -137,7 +137,7 @@ const Te = [
137
137
  },
138
138
  [L, n]
139
139
  );
140
- return /* @__PURE__ */ h(x, { children: [
140
+ return /* @__PURE__ */ h(G, { children: [
141
141
  /* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
142
142
  ee,
143
143
  {
@@ -148,7 +148,7 @@ const Te = [
148
148
  errorStateMessage: b ? y?.message : null,
149
149
  sortable: K,
150
150
  emptyStateMessage: n("DOCUMENTS_NO_RECORDS"),
151
- renderCell: Q,
151
+ renderCell: x,
152
152
  className: d.documentsTableBody,
153
153
  dataTestId: "documents-table",
154
154
  pageSize: u,
@@ -1,30 +1,30 @@
1
- import { jsx as i, jsxs as re, Fragment as ae } from "react/jsx-runtime";
2
- import { u as te, n as oe, x as se, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as k, w as fe, v as ye, h as he, Q as be, k as pe } from "./index-Z_FLt8Y9.js";
3
- import { useQueryClient as ge, useQuery as h } from "@tanstack/react-query";
4
- import { useState as j, useMemo as d, useCallback as b } from "react";
1
+ import { jsx as i, jsxs as re, Fragment as oe } from "react/jsx-runtime";
2
+ import { u as ae, n as se, x as te, j as ne, B as de, F as ie, P as le, b as ue, D as q, g as me, a as ce, O as j, w as fe, v as ye, h as he, Q as be, $ as ge } from "./index-wWZTiEer.js";
3
+ import { useQueryClient as pe, useQuery as h } from "@tanstack/react-query";
4
+ import { useState as w, useMemo as d, useCallback as b } from "react";
5
5
  const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_customAccordianItem__isszs", M = {
6
6
  formsTableBody: Ne,
7
7
  customAccordianItem: Oe
8
8
  }, Ae = (m) => m ? m.extension?.find(
9
- (l) => l.url === pe
9
+ (l) => l.url === ge
10
10
  )?.valueString : void 0, Ie = ({
11
11
  episodeOfCareUuids: m,
12
12
  encounterUuids: l,
13
- config: w
13
+ config: k
14
14
  }) => {
15
- const { t: n } = te(), c = oe(), [f, T] = j(!1), [o, v] = j(null), {
15
+ const { t: n } = ae(), c = se(), [f, T] = w(!1), [s, v] = w(null), {
16
16
  numberOfVisits: x,
17
- hideThumbnail: K = !1,
17
+ hideThumbnail: $ = !1,
18
18
  forms: y
19
- } = w ?? {}, F = se(
19
+ } = k ?? {}, F = te(
20
20
  m,
21
21
  l
22
- ), Q = ge(), {
22
+ ), K = pe(), {
23
23
  data: I = [],
24
24
  isLoading: B,
25
25
  isError: E,
26
- error: V,
27
- refetch: H
26
+ error: Q,
27
+ refetch: V
28
28
  } = h({
29
29
  queryKey: ["forms", c, m],
30
30
  queryFn: () => ne(c, void 0, x),
@@ -34,7 +34,7 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
34
34
  return l && l.length > 0 && (e = e.filter(
35
35
  (r) => l.includes(r.encounterUuid)
36
36
  )), Array.isArray(y) && y.length > 0 && (e = e.filter(
37
- (r) => y.some((a) => a.toLowerCase() === r.formName.toLowerCase())
37
+ (r) => y.some((o) => o.toLowerCase() === r.formName.toLowerCase())
38
38
  )), e;
39
39
  }, [I, l, y]), { data: D = [] } = h({
40
40
  queryKey: ["observationForms"],
@@ -42,43 +42,43 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
42
42
  }), S = b(
43
43
  (e) => D.find((r) => r.name === e)?.uuid,
44
44
  [D]
45
- ), p = d(() => {
46
- if (o)
47
- return S(o.formName);
48
- }, [o, S]), {
45
+ ), g = d(() => {
46
+ if (s)
47
+ return S(s.formName);
48
+ }, [s, S]), {
49
49
  data: u,
50
- isLoading: $,
50
+ isLoading: H,
51
51
  isError: z,
52
- error: g
52
+ error: p
53
53
  } = h({
54
- queryKey: ["formMetadata", p],
55
- queryFn: () => ie(p),
56
- enabled: !!p && f
54
+ queryKey: ["formMetadata", g],
55
+ queryFn: () => ie(g),
56
+ enabled: !!g && f
57
57
  }), {
58
58
  data: N,
59
59
  isLoading: G,
60
60
  isError: P,
61
61
  error: O
62
62
  } = h({
63
- queryKey: ["formsEncounterFHIR", o?.encounterUuid],
64
- queryFn: () => le(o.encounterUuid),
65
- enabled: !!o?.encounterUuid && f
63
+ queryKey: ["formsEncounterFHIR", s?.encounterUuid],
64
+ queryFn: () => le(s.encounterUuid),
65
+ enabled: !!s?.encounterUuid && f
66
66
  });
67
67
  ue(
68
68
  (e) => {
69
- e.patientUUID === c && e.updatedConcepts.size > 0 && (H(), Q.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
69
+ e.patientUUID === c && e.updatedConcepts.size > 0 && (V(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
70
70
  },
71
71
  [c]
72
72
  );
73
- const Y = d(() => !N?.entry || !o?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
73
+ const Y = d(() => !N?.entry || !s?.formName ? [] : N.entry.filter((e) => e.resource?.resourceType === "Observation").map((e) => e.resource).filter((e) => {
74
74
  const r = Ae(e);
75
- return !r || r.includes(o.formName);
76
- }), [N, o?.formName]), J = d(() => {
75
+ return !r || r.includes(s.formName);
76
+ }), [N, s?.formName]), J = d(() => {
77
77
  if (!u?.schema) return;
78
- const e = [], r = (a) => {
79
- (a ?? []).forEach((s) => {
80
- const t = s;
81
- t.id != null && e.push(String(t.id)), t.controls && r(t.controls);
78
+ const e = [], r = (o) => {
79
+ (o ?? []).forEach((t) => {
80
+ const a = t;
81
+ a.id != null && e.push(String(a.id)), a.controls && r(a.controls);
82
82
  });
83
83
  };
84
84
  return r(
@@ -86,24 +86,24 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
86
86
  ), e.length > 0 ? e : void 0;
87
87
  }, [u]), W = d(() => {
88
88
  if (!u?.schema) return;
89
- const e = {}, r = (a, s) => {
90
- for (const t of a)
91
- if (t.type === "section") {
92
- const A = t.label?.value ?? "Section";
93
- r(t.controls ?? [], A);
89
+ const e = {}, r = (o, t) => {
90
+ for (const a of o)
91
+ if (a.type === "section") {
92
+ const A = a.label?.value ?? "Section";
93
+ r(a.controls ?? [], A);
94
94
  } else
95
- t.id != null && s && (e[String(t.id)] = s), t.controls && r(t.controls, s);
95
+ a.id != null && t && (e[String(a.id)] = t), a.controls && r(a.controls, t);
96
96
  };
97
97
  return r(
98
98
  u.schema.controls ?? [],
99
99
  null
100
100
  ), Object.keys(e).length > 0 ? e : void 0;
101
101
  }, [u]), X = d(() => {
102
- if (g)
103
- return q(g).message;
102
+ if (p)
103
+ return q(p).message;
104
104
  if (O)
105
105
  return q(O).message;
106
- }, [g, O]), _ = d(
106
+ }, [p, O]), _ = d(
107
107
  () => [
108
108
  { key: "recordedOn", header: n("RECORDED_ON") },
109
109
  { key: "recordedBy", header: n("RECORDED_BY") }
@@ -117,29 +117,29 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
117
117
  []
118
118
  ), C = d(() => {
119
119
  const e = L.reduce(
120
- (r, a) => {
121
- const s = a.formName;
122
- r[s] ??= [];
123
- const t = a.providers.map((A) => A.providerName).filter(Boolean).join(", ");
124
- return r[s].push({
125
- id: a.encounterUuid,
126
- formName: a.formName,
127
- recordedOn: me(a.encounterDateTime, n, !0).formattedResult,
128
- recordedBy: t ?? "--",
129
- encounterDateTime: a.encounterDateTime,
130
- encounterUuid: a.encounterUuid
120
+ (r, o) => {
121
+ const t = o.formName;
122
+ r[t] ??= [];
123
+ const a = o.providers.map((A) => A.providerName).filter(Boolean).join(", ");
124
+ return r[t].push({
125
+ id: o.encounterUuid,
126
+ formName: o.formName,
127
+ recordedOn: me(o.encounterDateTime, n, !0).formattedResult,
128
+ recordedBy: a ?? "--",
129
+ encounterDateTime: o.encounterDateTime,
130
+ encounterUuid: o.encounterUuid
131
131
  }), r;
132
132
  },
133
133
  {}
134
134
  );
135
135
  return Object.entries(e).map(
136
- ([r, a]) => ({
136
+ ([r, o]) => ({
137
137
  formName: r,
138
- records: a.sort(
139
- (s, t) => t.encounterDateTime - s.encounterDateTime
138
+ records: o.sort(
139
+ (t, a) => a.encounterDateTime - t.encounterDateTime
140
140
  )
141
141
  })
142
- ).sort((r, a) => r.formName.localeCompare(a.formName));
142
+ ).sort((r, o) => r.formName.localeCompare(o.formName));
143
143
  }, [L, n]), R = b((e) => {
144
144
  v(e), T(!0);
145
145
  }, []), ee = b(() => {
@@ -157,57 +157,57 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
157
157
  },
158
158
  [R]
159
159
  );
160
- return /* @__PURE__ */ re(ae, { children: [
160
+ return /* @__PURE__ */ re(oe, { children: [
161
161
  /* @__PURE__ */ i("div", { id: "forms-table", "data-testid": "forms-table", children: B || E || C.length === 0 || F ? /* @__PURE__ */ i(
162
- k,
162
+ j,
163
163
  {
164
164
  headers: _,
165
165
  ariaLabel: n("FORMS_HEADING"),
166
166
  rows: [],
167
167
  loading: B,
168
- errorStateMessage: E ? V?.message : void 0,
168
+ errorStateMessage: E ? Q?.message : void 0,
169
169
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
170
170
  renderCell: U,
171
171
  className: M.formsTableBody,
172
172
  dataTestId: "forms-table"
173
173
  }
174
174
  ) : /* @__PURE__ */ i(fe, { align: "start", children: C.map((e, r) => {
175
- const { formName: a, records: s } = e;
175
+ const { formName: o, records: t } = e;
176
176
  return /* @__PURE__ */ i(
177
177
  ye,
178
178
  {
179
- title: a,
179
+ title: o,
180
180
  className: M.customAccordianItem,
181
- testId: `accordian-title-${a}`,
181
+ testId: `accordian-title-${o}`,
182
182
  open: r === 0,
183
183
  children: /* @__PURE__ */ i(
184
- k,
184
+ j,
185
185
  {
186
186
  headers: _,
187
187
  ariaLabel: n("FORMS_HEADING"),
188
- rows: s,
188
+ rows: t,
189
189
  loading: !1,
190
190
  errorStateMessage: "",
191
191
  sortable: Z,
192
192
  emptyStateMessage: n("FORMS_UNAVAILABLE"),
193
193
  renderCell: U,
194
194
  className: M.formsTableBody,
195
- dataTestId: `forms-table-${a}`
195
+ dataTestId: `forms-table-${o}`
196
196
  }
197
197
  )
198
198
  },
199
- a
199
+ o
200
200
  );
201
201
  }) }) }),
202
- f && o && /* @__PURE__ */ i(
202
+ f && s && /* @__PURE__ */ i(
203
203
  he,
204
204
  {
205
205
  id: "modalIdForActionAreaLayout",
206
206
  portalId: "main-display-area",
207
207
  open: f,
208
208
  onRequestClose: ee,
209
- modalHeading: o.formName,
210
- modalLabel: `${o.recordedOn} | ${o.recordedBy}`,
209
+ modalHeading: s.formName,
210
+ modalLabel: `${s.recordedOn} | ${s.recordedBy}`,
211
211
  passiveModal: !0,
212
212
  size: "md",
213
213
  testId: "form-details-modal",
@@ -215,12 +215,12 @@ const Ne = "FormsTable-module_formsTableBody__SvGha", Oe = "FormsTable-module_cu
215
215
  be,
216
216
  {
217
217
  observations: Y,
218
- isLoading: $ || G,
218
+ isLoading: H || G,
219
219
  isError: z || P,
220
220
  errorMessage: X,
221
221
  emptyStateMessage: n("NO_FORM_DATA_AVAILABLE"),
222
- testIdPrefix: o.formName,
223
- hideThumbnail: K,
222
+ testIdPrefix: s.formName,
223
+ hideThumbnail: $,
224
224
  controlOrder: J,
225
225
  sectionMap: W
226
226
  }
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-DlxIiUTN.js";
2
- import { ah as d, ai as f, aj as e } from "./index-Z_FLt8Y9.js";
1
+ import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-weDYMuWi.js";
2
+ import { ah as d, ai as f, aj as e } from "./index-wWZTiEer.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-DlxIiUTN.js";
2
- import { ah as h, ai as v, aj as e } from "./index-Z_FLt8Y9.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-weDYMuWi.js";
2
+ import { ah as h, ai as v, aj as e } from "./index-wWZTiEer.js";
3
3
  var C = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,7 +1,7 @@
1
1
  import { jsxs as I, jsx as u } from "react/jsx-runtime";
2
- import { n as K, o as q, u as N, $ as G, Z as Q, b as k, J as w, X as x, c as z, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-Z_FLt8Y9.js";
2
+ import { n as k, o as K, u as N, k as Q, Z as q, b as G, J as x, X as z, c as w, d as H, O as J, G as Y, E as M, Y as j, e as P, f as X, M as Z, S as W, z as ee } from "./index-wWZTiEer.js";
3
3
  import { useQueries as te, useQuery as ae } from "@tanstack/react-query";
4
- import { useRef as se, useEffect as _, useMemo as O } from "react";
4
+ import { useRef as se, useEffect as $, useMemo as O } from "react";
5
5
  const D = (t, n, d, l, b, r) => {
6
6
  const a = j(t, n, b), s = a.value, o = P(s);
7
7
  let i = s;
@@ -113,14 +113,14 @@ const D = (t, n, d, l, b, r) => {
113
113
  conceptNames: d = [],
114
114
  conceptUuid: l = [],
115
115
  hideThumbnail: b = !1
116
- } = n, r = se(/* @__PURE__ */ new Set()), a = K(), { addNotification: s } = q(), { t: o } = N(), i = te({
116
+ } = n, r = se(/* @__PURE__ */ new Set()), a = k(), { addNotification: s } = K(), { t: o } = N(), i = te({
117
117
  queries: d.map((e) => ({
118
118
  queryKey: de(e),
119
- queryFn: () => G(e),
119
+ queryFn: () => Q(e),
120
120
  enabled: !!e
121
121
  }))
122
122
  });
123
- _(() => {
123
+ $(() => {
124
124
  i.forEach((e, h) => {
125
125
  if (e.isError && !r.current.has(h)) {
126
126
  const V = d[h];
@@ -139,32 +139,32 @@ const D = (t, n, d, l, b, r) => {
139
139
  refetch: T
140
140
  } = ae({
141
141
  queryKey: le(a, p),
142
- queryFn: () => Q(a, p),
142
+ queryFn: () => q(a, p),
143
143
  enabled: !!a && p.length > 0 && y
144
144
  });
145
- k(
145
+ G(
146
146
  (e) => {
147
147
  e.patientUUID === a && e.updatedConcepts.size > 0 && [...e.updatedConcepts.keys()].some(
148
148
  (h) => p.includes(h)
149
149
  ) && T();
150
150
  },
151
151
  [a, T]
152
- ), _(() => {
152
+ ), $(() => {
153
153
  R && s({
154
154
  title: o("ERROR_DEFAULT_TITLE"),
155
155
  message: o("ERROR_FETCHING_OBSERVATIONS"),
156
156
  type: "error"
157
157
  });
158
158
  }, [R]);
159
- const $ = O(() => {
159
+ const f = O(() => {
160
160
  if (!c) return [];
161
- const e = w(c), h = x(e);
162
- return z(h);
161
+ const e = x(c), h = z(e);
162
+ return w(h);
163
163
  }, [c]), L = [
164
164
  { key: "name", header: "name" },
165
165
  { key: "value", header: "value" },
166
166
  { key: "form", header: "form" }
167
- ], f = F || !y, g = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = g ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = $.length > 0 && !f && !g, E = n.titleTranslationKey, v = E ? o(E) : "";
167
+ ], g = F || !y, _ = R && y, A = (!c || c.entry?.length === 0 || p.length === 0) && y, C = _ ? o("ERROR_FETCHING_OBSERVATIONS") : null, U = A ? o("NO_OBSERVATIONS_FOUND") : void 0, B = f.length > 0 && !g && !_, E = n.titleTranslationKey, v = E ? o(E) : "";
168
168
  return /* @__PURE__ */ I(
169
169
  "div",
170
170
  {
@@ -186,7 +186,7 @@ const D = (t, n, d, l, b, r) => {
186
186
  B ? /* @__PURE__ */ u(
187
187
  oe,
188
188
  {
189
- groupedData: $,
189
+ groupedData: f,
190
190
  title: v,
191
191
  hideThumbnail: b
192
192
  }
@@ -196,7 +196,7 @@ const D = (t, n, d, l, b, r) => {
196
196
  headers: L,
197
197
  rows: [],
198
198
  ariaLabel: o("OBSERVATIONS"),
199
- loading: f,
199
+ loading: g,
200
200
  errorStateMessage: C,
201
201
  emptyStateMessage: U,
202
202
  dataTestId: "observations-table"
@@ -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-Z_FLt8Y9.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-wWZTiEer.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 r, jsxs as b } from "react/jsx-runtime";
2
- import { I as f, K as B, L as O, R as V, T as Z, V as ee, W as te, a0 as ie, m as ae, a1 as ne, u 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 $, l as oe, o as de, t as H, ad as ce, p as me, ae as Ae, af as Ie, ag as ue, r as _e, y as Te } from "./index-Z_FLt8Y9.js";
2
+ import { L as f, N as B, R as O, T as V, V as Z, W as ee, _ as te, a0 as ie, q as ae, a1 as ne, u as j, 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 x, ab as k, ac as H, m as oe, o as de, p as $, ad as ce, r as me, ae as Ae, af as Ie, ag as ue, y as _e, C as Te } from "./index-wWZTiEer.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", w = "Appointment Location", be = () => {
@@ -137,7 +137,7 @@ 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", Pe = "UnavailabilityForm-module_formField__8he7o", Be = "UnavailabilityForm-module_loading__IDEY6", Oe = "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", Pe = "UnavailabilityForm-module_formField__8he7o", Be = "UnavailabilityForm-module_loading__IDEY6", Oe = "UnavailabilityForm-module_error__jDeOm", Ve = "UnavailabilityForm-module_grid__t6NKR", Fe = "UnavailabilityForm-module_column__QFdnQ", Ce = "UnavailabilityForm-module_dateTimeColumn__6bi0F", Ye = "UnavailabilityForm-module_datePicker__6HgbO", xe = "UnavailabilityForm-module_timePicker__DHNpK", d = {
141
141
  formContent: Se,
142
142
  formField: Pe,
143
143
  loading: Be,
@@ -146,13 +146,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
146
146
  column: Fe,
147
147
  dateTimeColumn: Ce,
148
148
  datePicker: Ye,
149
- timePicker: ke
150
- }, xe = ({
149
+ timePicker: xe
150
+ }, ke = ({
151
151
  errors: e,
152
152
  formDataRef: a,
153
153
  onClearErrors: n
154
154
  }) => {
155
- const { t } = Q(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
155
+ const { t } = j(), { loginLocations: o, services: c, providers: A, isLoading: L, isError: m } = he(), [l, s] = g({
156
156
  locationUuid: "",
157
157
  selectedServiceItems: [],
158
158
  selectedProviderItems: [],
@@ -327,7 +327,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
327
327
  }
328
328
  ),
329
329
  /* @__PURE__ */ r(
330
- k,
330
+ x,
331
331
  {
332
332
  id: "start-time",
333
333
  "data-testid": "start-time-input",
@@ -342,7 +342,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
342
342
  use24HourFormat: !1,
343
343
  className: d.timePicker,
344
344
  children: /* @__PURE__ */ b(
345
- x,
345
+ k,
346
346
  {
347
347
  id: "start-time-period",
348
348
  "data-testid": "start-time-period-select",
@@ -402,7 +402,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
402
402
  }
403
403
  ),
404
404
  /* @__PURE__ */ r(
405
- k,
405
+ x,
406
406
  {
407
407
  id: "end-time",
408
408
  "data-testid": "end-time-input",
@@ -417,7 +417,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
417
417
  use24HourFormat: !1,
418
418
  className: d.timePicker,
419
419
  children: /* @__PURE__ */ b(
420
- x,
420
+ k,
421
421
  {
422
422
  id: "end-time-period",
423
423
  "data-testid": "end-time-period-select",
@@ -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
+ H,
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
+ H,
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", He = {
505
- page: $e
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({}), _ = H(
504
+ }, He = "index-module_page__s2h2y", $e = {
505
+ page: He
506
+ }, je = () => {
507
+ const { t: e } = j(), 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 = H(n, [
510
+ ), I = $(n, [
511
511
  pe,
512
512
  q
513
513
  ]), { data: u, isLoading: v, isError: y } = M({
@@ -560,7 +560,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
560
560
  }
561
561
  },
562
562
  [t, a, e]
563
- ), j = U(async () => {
563
+ ), Q = U(async () => {
564
564
  if (!m.current) return;
565
565
  const T = Ue(m.current, e);
566
566
  s(T), !(Object.keys(T).length > 0) && await S(fe(m.current, e));
@@ -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: He.page,
589
+ className: $e.page,
590
590
  children: /* @__PURE__ */ r(
591
591
  _e,
592
592
  {
@@ -616,13 +616,13 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
616
616
  "aria-label": "appointment-unavailability-form-panel-aria-label",
617
617
  title: e("ADMIN_UNAVAILABILITY_FORM_TITLE"),
618
618
  primaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_ADD"),
619
- onPrimaryButtonClick: j,
619
+ onPrimaryButtonClick: Q,
620
620
  isPrimaryButtonDisabled: A,
621
621
  secondaryButtonText: e("ADMIN_UNAVAILABILITY_FORM_CANCEL"),
622
622
  onSecondaryButtonClick: J,
623
623
  isSecondaryButtonDisabled: A,
624
624
  content: /* @__PURE__ */ r(
625
- xe,
625
+ ke,
626
626
  {
627
627
  errors: l,
628
628
  formDataRef: m,
@@ -636,5 +636,5 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
636
636
  );
637
637
  };
638
638
  export {
639
- Qe as default
639
+ je as default
640
640
  };