@bahmni/appointments-app 0.0.1-dev.294 → 0.0.1-dev.295
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.
- package/dist/{DocumentsTable-C4oMzxsp-Cp6dv_ES.js → DocumentsTable-R1K7B1Ur-lKxvgfB8.js} +9 -9
- package/dist/{FormsTable-kg59GYSD-CPB-oLgD.js → FormsTable-BFXGLv2_-Cc5C4-6V.js} +25 -25
- package/dist/{LNWAZHJI-DunCqo4q.js → LNWAZHJI-poSj31GE.js} +2 -2
- package/dist/{MWZ6AO7Z-CBGCAHVq.js → MWZ6AO7Z-CTI0kL-Q.js} +2 -2
- package/dist/{Observations-CcNBEef4-Bm1_7ksx.js → Observations-DSZvTXSj-BmNayaUY.js} +21 -21
- package/dist/{YPM2AS64-TbcS4iMx.js → YPM2AS64-DBBakS_A.js} +1 -1
- package/dist/{index-u6x0tymW.js → index-B4xTZ4ES.js} +9 -9
- package/dist/{index-C9KJKvY5.js → index-B_wLQqCf.js} +67 -67
- package/dist/{index-BwQIIJdk.js → index-Dw7CEfWH.js} +6 -6
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -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,
|
|
2
|
+
import { u as G, a as W, h as Y, B as J, w as X, m as Z, c as ee, n as te } from "./index-B_wLQqCf.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 = {
|
|
@@ -18,7 +18,7 @@ const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTab
|
|
|
18
18
|
uploadedBy: "DOCUMENTS_UPLOADED_BY",
|
|
19
19
|
attachments: "DOCUMENTS_ATTACHMENTS"
|
|
20
20
|
};
|
|
21
|
-
function
|
|
21
|
+
function B(a) {
|
|
22
22
|
return !a || a.includes(":") ? "#" : `/openmrs/auth?requested_document=/document_images/${a}`;
|
|
23
23
|
}
|
|
24
24
|
function ie(a, g) {
|
|
@@ -33,12 +33,12 @@ const Te = [
|
|
|
33
33
|
"attachments",
|
|
34
34
|
"uploadedOn",
|
|
35
35
|
"uploadedBy"
|
|
36
|
-
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i,
|
|
36
|
+
], he = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, R = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, w] = l(!1), [o, U] = l(
|
|
38
38
|
null
|
|
39
|
-
), [
|
|
39
|
+
), [$, D] = l(
|
|
40
40
|
/* @__PURE__ */ new Set()
|
|
41
|
-
), E = G(), { t: n } = W(), { addNotification: L } = Y(),
|
|
41
|
+
), E = G(), { t: n } = W(), { addNotification: L } = Y(), k = Number(a?.pageSize) || 5, [O, C] = l(1), [u, V] = l(k), [F, A] = l(void 0), M = _((e) => {
|
|
42
42
|
U(e), w(!0);
|
|
43
43
|
}, []), H = _(() => {
|
|
44
44
|
w(!1), U(null), D(/* @__PURE__ */ new Set());
|
|
@@ -74,9 +74,9 @@ const Te = [
|
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
77
|
-
const t = /* @__PURE__ */ new Set(), m =
|
|
77
|
+
const t = /* @__PURE__ */ new Set(), m = R(o);
|
|
78
78
|
for (let c = 0; c < m.length; c++) {
|
|
79
|
-
const S =
|
|
79
|
+
const S = B(m[c].url);
|
|
80
80
|
try {
|
|
81
81
|
(await fetch(S, {
|
|
82
82
|
method: "HEAD",
|
|
@@ -104,7 +104,7 @@ const Te = [
|
|
|
104
104
|
})),
|
|
105
105
|
[f]
|
|
106
106
|
), T = p(
|
|
107
|
-
() => o ?
|
|
107
|
+
() => o ? R(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), Q = _(
|
|
110
110
|
(e, t) => {
|
|
@@ -169,7 +169,7 @@ const Te = [
|
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
171
|
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: T.map((e, t) => {
|
|
172
|
-
const m =
|
|
172
|
+
const m = B(e.url), c = e.contentType?.toLowerCase().includes("pdf"), S = (e.contentType?.toLowerCase().includes("image") ?? !1) || he.test(e.url ?? ""), I = $.has(t);
|
|
173
173
|
return m === "#" || I ? /* @__PURE__ */ h(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as X, Fragment as W } from "react/jsx-runtime";
|
|
2
|
-
import { a as ee, u as re, v as ae,
|
|
2
|
+
import { a as ee, u as re, v as ae, k as oe, I as te, Z as se, S as ne, e as de, _ as D, m as ie, w as me, c as U, O as ue, L as le, n as ce, q as fe, R as ye } from "./index-B_wLQqCf.js";
|
|
3
3
|
import { useQueryClient as be, useQuery as f } from "@tanstack/react-query";
|
|
4
4
|
import { useState as q, useMemo as d, useCallback as y } from "react";
|
|
5
5
|
const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_customAccordianItem__isszs", A = {
|
|
@@ -13,21 +13,21 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
13
13
|
config: H
|
|
14
14
|
}) => {
|
|
15
15
|
const { t } = ee(), u = re(), [l, O] = q(!1), [o, I] = q(null), {
|
|
16
|
-
numberOfVisits:
|
|
17
|
-
hideThumbnail:
|
|
16
|
+
numberOfVisits: k,
|
|
17
|
+
hideThumbnail: w = !1,
|
|
18
18
|
forms: c
|
|
19
19
|
} = H ?? {}, L = ae(
|
|
20
20
|
m,
|
|
21
21
|
n
|
|
22
|
-
),
|
|
22
|
+
), K = be(), {
|
|
23
23
|
data: T = [],
|
|
24
24
|
isLoading: F,
|
|
25
25
|
isError: _,
|
|
26
|
-
error:
|
|
27
|
-
refetch:
|
|
26
|
+
error: j,
|
|
27
|
+
refetch: x
|
|
28
28
|
} = f({
|
|
29
29
|
queryKey: ["forms", u, m],
|
|
30
|
-
queryFn: () => oe(u, void 0,
|
|
30
|
+
queryFn: () => oe(u, void 0, k),
|
|
31
31
|
enabled: !!u && !L
|
|
32
32
|
}), v = d(() => {
|
|
33
33
|
let e = T;
|
|
@@ -39,15 +39,15 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
39
39
|
}, [T, n, c]), { data: B = [] } = f({
|
|
40
40
|
queryKey: ["observationForms"],
|
|
41
41
|
queryFn: () => te()
|
|
42
|
-
}),
|
|
42
|
+
}), E = y(
|
|
43
43
|
(e) => B.find((r) => r.name === e)?.uuid,
|
|
44
44
|
[B]
|
|
45
45
|
), b = d(() => {
|
|
46
46
|
if (o)
|
|
47
|
-
return
|
|
48
|
-
}, [o,
|
|
49
|
-
isLoading:
|
|
50
|
-
isError:
|
|
47
|
+
return E(o.formName);
|
|
48
|
+
}, [o, E]), {
|
|
49
|
+
isLoading: V,
|
|
50
|
+
isError: $,
|
|
51
51
|
error: p
|
|
52
52
|
} = f({
|
|
53
53
|
queryKey: ["formMetadata", b],
|
|
@@ -65,7 +65,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
65
65
|
});
|
|
66
66
|
de(
|
|
67
67
|
(e) => {
|
|
68
|
-
e.patientUUID === u && e.updatedConcepts.size > 0 && (
|
|
68
|
+
e.patientUUID === u && e.updatedConcepts.size > 0 && (x(), K.invalidateQueries({ queryKey: ["formsEncounterFHIR"] }));
|
|
69
69
|
},
|
|
70
70
|
[u]
|
|
71
71
|
);
|
|
@@ -74,10 +74,10 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
74
74
|
return !r || r.includes(o.formName);
|
|
75
75
|
}), [g, o?.formName]), P = d(() => {
|
|
76
76
|
if (p)
|
|
77
|
-
return
|
|
77
|
+
return D(p).message;
|
|
78
78
|
if (N)
|
|
79
|
-
return
|
|
80
|
-
}, [p, N]),
|
|
79
|
+
return D(N).message;
|
|
80
|
+
}, [p, N]), M = d(
|
|
81
81
|
() => [
|
|
82
82
|
{ key: "recordedOn", header: t("RECORDED_ON") },
|
|
83
83
|
{ key: "recordedBy", header: t("RECORDED_BY") }
|
|
@@ -89,7 +89,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
89
89
|
{ key: "recordedBy", sortable: !0 }
|
|
90
90
|
],
|
|
91
91
|
[]
|
|
92
|
-
),
|
|
92
|
+
), R = d(() => {
|
|
93
93
|
const e = v.reduce(
|
|
94
94
|
(r, a) => {
|
|
95
95
|
const i = a.formName;
|
|
@@ -132,20 +132,20 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
132
132
|
[S]
|
|
133
133
|
);
|
|
134
134
|
return /* @__PURE__ */ X(W, { children: [
|
|
135
|
-
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ ||
|
|
135
|
+
/* @__PURE__ */ s("div", { id: "forms-table", "data-testid": "forms-table", children: F || _ || R.length === 0 || L ? /* @__PURE__ */ s(
|
|
136
136
|
U,
|
|
137
137
|
{
|
|
138
|
-
headers:
|
|
138
|
+
headers: M,
|
|
139
139
|
ariaLabel: t("FORMS_HEADING"),
|
|
140
140
|
rows: [],
|
|
141
141
|
loading: F,
|
|
142
|
-
errorStateMessage: _ ?
|
|
142
|
+
errorStateMessage: _ ? j?.message : void 0,
|
|
143
143
|
emptyStateMessage: t("FORMS_UNAVAILABLE"),
|
|
144
144
|
renderCell: C,
|
|
145
145
|
className: A.formsTableBody,
|
|
146
146
|
dataTestId: "forms-table"
|
|
147
147
|
}
|
|
148
|
-
) : /* @__PURE__ */ s(ue, { align: "start", children:
|
|
148
|
+
) : /* @__PURE__ */ s(ue, { align: "start", children: R.map((e, r) => {
|
|
149
149
|
const { formName: a, records: i } = e;
|
|
150
150
|
return /* @__PURE__ */ s(
|
|
151
151
|
le,
|
|
@@ -157,7 +157,7 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
157
157
|
children: /* @__PURE__ */ s(
|
|
158
158
|
U,
|
|
159
159
|
{
|
|
160
|
-
headers:
|
|
160
|
+
headers: M,
|
|
161
161
|
ariaLabel: t("FORMS_HEADING"),
|
|
162
162
|
rows: i,
|
|
163
163
|
loading: !1,
|
|
@@ -189,12 +189,12 @@ const pe = "FormsTable-module_formsTableBody__SvGha", ge = "FormsTable-module_cu
|
|
|
189
189
|
fe,
|
|
190
190
|
{
|
|
191
191
|
observations: Q,
|
|
192
|
-
isLoading:
|
|
193
|
-
isError:
|
|
192
|
+
isLoading: V || z,
|
|
193
|
+
isError: $ || G,
|
|
194
194
|
errorMessage: P,
|
|
195
195
|
emptyStateMessage: t("NO_FORM_DATA_AVAILABLE"),
|
|
196
196
|
testIdPrefix: o.formName,
|
|
197
|
-
hideThumbnail:
|
|
197
|
+
hideThumbnail: w
|
|
198
198
|
}
|
|
199
199
|
)
|
|
200
200
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-
|
|
2
|
-
import { ah as d, ai as f, aj as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as i, D as u, Q as v } from "./YPM2AS64-DBBakS_A.js";
|
|
2
|
+
import { ah as d, ai as f, aj as e } from "./index-B_wLQqCf.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-
|
|
2
|
-
import { ah as h, ai as v, aj as e } from "./index-
|
|
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-DBBakS_A.js";
|
|
2
|
+
import { ah as h, ai as v, aj as e } from "./index-B_wLQqCf.js";
|
|
3
3
|
var C = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import { u as B, h as V, a as S,
|
|
2
|
+
import { u as B, h as V, a as S, D as w, $ as G, e as k, b as z, K as Q, G as x, z as M, c as j, U as P, d as D, W, f as J, g as Y, H as X, i as Z, N as ee } from "./index-B_wLQqCf.js";
|
|
3
3
|
import { useQueries as ae, useQuery as te } from "@tanstack/react-query";
|
|
4
|
-
import { useRef as se, useEffect as
|
|
5
|
-
const
|
|
4
|
+
import { useRef as se, useEffect as _, useMemo as R } from "react";
|
|
5
|
+
const H = (a, n, d, l, b, r) => {
|
|
6
6
|
const t = W(a, n, b), s = t.value, o = J(s);
|
|
7
7
|
let i = s;
|
|
8
8
|
o === "Image" && (i = /* @__PURE__ */ u(
|
|
@@ -37,13 +37,13 @@ const D = (a, n, d, l, b, r) => {
|
|
|
37
37
|
`obs-${a.id}`
|
|
38
38
|
);
|
|
39
39
|
}, re = (a, n, d, l, b, r, t) => /* @__PURE__ */ u(
|
|
40
|
-
|
|
40
|
+
D,
|
|
41
41
|
{
|
|
42
42
|
title: a.display,
|
|
43
43
|
id: `grouped-obs-${a.display}-${l}`,
|
|
44
44
|
open: d,
|
|
45
45
|
children: a.members?.map(
|
|
46
|
-
(s, o) =>
|
|
46
|
+
(s, o) => H(
|
|
47
47
|
s,
|
|
48
48
|
o,
|
|
49
49
|
b,
|
|
@@ -62,14 +62,14 @@ const D = (a, n, d, l, b, r) => {
|
|
|
62
62
|
const { t: l } = S(), b = (r, t, s) => {
|
|
63
63
|
const o = P(r.encounterDetails, l);
|
|
64
64
|
return /* @__PURE__ */ N(
|
|
65
|
-
|
|
65
|
+
D,
|
|
66
66
|
{
|
|
67
67
|
title: o,
|
|
68
68
|
id: `encounter-${r.encounterId}`,
|
|
69
69
|
open: t,
|
|
70
70
|
children: [
|
|
71
71
|
r.observations.map(
|
|
72
|
-
(i, m) =>
|
|
72
|
+
(i, m) => H(
|
|
73
73
|
i,
|
|
74
74
|
m,
|
|
75
75
|
s,
|
|
@@ -120,7 +120,7 @@ const D = (a, n, d, l, b, r) => {
|
|
|
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 q = d[h];
|
|
@@ -132,14 +132,14 @@ const D = (a, n, d, l, b, r) => {
|
|
|
132
132
|
} else e.isError || r.current.delete(h);
|
|
133
133
|
});
|
|
134
134
|
}, [i, d]);
|
|
135
|
-
const m =
|
|
135
|
+
const m = R(() => i.map((e) => e.data?.uuid).filter((e) => !!e), [i]), p = R(() => [.../* @__PURE__ */ new Set([...m, ...l])], [m, l]), y = R(() => d.length === 0 ? !0 : i.every((e) => !e.isLoading), [i, d.length]), {
|
|
136
136
|
data: c,
|
|
137
|
-
isLoading:
|
|
137
|
+
isLoading: F,
|
|
138
138
|
isError: T,
|
|
139
139
|
refetch: g
|
|
140
140
|
} = te({
|
|
141
141
|
queryKey: le(t, p),
|
|
142
|
-
queryFn: () =>
|
|
142
|
+
queryFn: () => G(t, p),
|
|
143
143
|
enabled: !!t && p.length > 0 && y
|
|
144
144
|
});
|
|
145
145
|
k(
|
|
@@ -149,35 +149,35 @@ const D = (a, n, d, l, b, r) => {
|
|
|
149
149
|
) && g();
|
|
150
150
|
},
|
|
151
151
|
[t, g]
|
|
152
|
-
),
|
|
152
|
+
), _(() => {
|
|
153
153
|
T && s({
|
|
154
154
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
155
155
|
message: o("ERROR_FETCHING_OBSERVATIONS"),
|
|
156
156
|
type: "error"
|
|
157
157
|
});
|
|
158
158
|
}, [T]);
|
|
159
|
-
const O =
|
|
159
|
+
const O = R(() => {
|
|
160
160
|
if (!c) return [];
|
|
161
161
|
const e = z(c), h = Q(e);
|
|
162
162
|
return x(h);
|
|
163
|
-
}, [c]),
|
|
163
|
+
}, [c]), L = [
|
|
164
164
|
{ key: "name", header: "name" },
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
|
-
],
|
|
167
|
+
], $ = F || !y, f = T && y, U = (!c || c.entry?.length === 0 || p.length === 0) && y, A = f ? o("ERROR_FETCHING_OBSERVATIONS") : null, K = U ? o("NO_OBSERVATIONS_FOUND") : void 0, C = O.length > 0 && !$ && !f, E = n.titleTranslationKey, v = E ? o(E) : "";
|
|
168
168
|
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
172
|
-
"data-testid":
|
|
172
|
+
"data-testid": E ? `observations-${v}` : "observations",
|
|
173
173
|
"aria-label": "observations-aria-label",
|
|
174
174
|
className: I.observations,
|
|
175
175
|
children: [
|
|
176
176
|
/* @__PURE__ */ u(
|
|
177
|
-
|
|
177
|
+
M,
|
|
178
178
|
{
|
|
179
179
|
id: "observations-title",
|
|
180
|
-
testId:
|
|
180
|
+
testId: E ? `observations-title-${v}` : "observations-title",
|
|
181
181
|
title: v,
|
|
182
182
|
className: I.title,
|
|
183
183
|
children: /* @__PURE__ */ u("p", { children: v })
|
|
@@ -191,12 +191,12 @@ const D = (a, n, d, l, b, r) => {
|
|
|
191
191
|
hideThumbnail: b
|
|
192
192
|
}
|
|
193
193
|
) : /* @__PURE__ */ u(
|
|
194
|
-
|
|
194
|
+
j,
|
|
195
195
|
{
|
|
196
|
-
headers:
|
|
196
|
+
headers: L,
|
|
197
197
|
rows: [],
|
|
198
198
|
ariaLabel: o("OBSERVATIONS"),
|
|
199
|
-
loading:
|
|
199
|
+
loading: $,
|
|
200
200
|
errorStateMessage: A,
|
|
201
201
|
emptyStateMessage: K,
|
|
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-
|
|
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-B_wLQqCf.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 { M as f, P as B, Q as O, T as V, V as J, X as ee, Y as te, a0 as ie,
|
|
2
|
+
import { M as f, P as B, Q as O, T as V, V as J, X as ee, Y as te, a0 as ie, r 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, p as $, ad as ce, s as me, ae as Ae, af as Ie, ag as ue, y as _e, C as Te } from "./index-B_wLQqCf.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 = () => {
|
|
@@ -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",
|
|
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 = {
|
|
141
141
|
formContent: Se,
|
|
142
142
|
formField: Pe,
|
|
143
143
|
loading: Be,
|
|
@@ -146,8 +146,8 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
146
146
|
column: Fe,
|
|
147
147
|
dateTimeColumn: Ce,
|
|
148
148
|
datePicker: Ye,
|
|
149
|
-
timePicker:
|
|
150
|
-
},
|
|
149
|
+
timePicker: ke
|
|
150
|
+
}, xe = ({
|
|
151
151
|
errors: e,
|
|
152
152
|
formDataRef: a,
|
|
153
153
|
onClearErrors: n
|
|
@@ -327,7 +327,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
327
327
|
}
|
|
328
328
|
),
|
|
329
329
|
/* @__PURE__ */ r(
|
|
330
|
-
|
|
330
|
+
k,
|
|
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
|
-
|
|
345
|
+
x,
|
|
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
|
-
|
|
405
|
+
k,
|
|
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
|
-
|
|
420
|
+
x,
|
|
421
421
|
{
|
|
422
422
|
id: "end-time-period",
|
|
423
423
|
"data-testid": "end-time-period-select",
|
|
@@ -622,7 +622,7 @@ const Ne = "Available for appointments", q = "Get Appointment Unavailability", p
|
|
|
622
622
|
onSecondaryButtonClick: X,
|
|
623
623
|
isSecondaryButtonDisabled: A,
|
|
624
624
|
content: /* @__PURE__ */ r(
|
|
625
|
-
|
|
625
|
+
xe,
|
|
626
626
|
{
|
|
627
627
|
errors: l,
|
|
628
628
|
formDataRef: m,
|
|
@@ -138304,37 +138304,37 @@ const Kje = {
|
|
|
138304
138304
|
}
|
|
138305
138305
|
}
|
|
138306
138306
|
};
|
|
138307
|
-
|
|
138307
|
+
let Sf = class {
|
|
138308
138308
|
/** Formats a number value as a string, according to the locale and options provided to the constructor. */
|
|
138309
|
-
format(
|
|
138310
|
-
let
|
|
138311
|
-
if (!Rf && this.options.signDisplay != null ?
|
|
138312
|
-
var
|
|
138313
|
-
let { unit:
|
|
138314
|
-
if (!
|
|
138315
|
-
let
|
|
138316
|
-
|
|
138309
|
+
format(t) {
|
|
138310
|
+
let e = "";
|
|
138311
|
+
if (!Rf && this.options.signDisplay != null ? e = LN0(this.numberFormatter, this.options.signDisplay, t) : e = this.numberFormatter.format(t), this.options.style === "unit" && !R5) {
|
|
138312
|
+
var r;
|
|
138313
|
+
let { unit: o, unitDisplay: a = "short", locale: c } = this.resolvedOptions();
|
|
138314
|
+
if (!o) return e;
|
|
138315
|
+
let l = (r = Kje[o]) === null || r === void 0 ? void 0 : r[a];
|
|
138316
|
+
e += l[c] || l.default;
|
|
138317
138317
|
}
|
|
138318
|
-
return
|
|
138318
|
+
return e;
|
|
138319
138319
|
}
|
|
138320
138320
|
/** Formats a number to an array of parts such as separators, digits, punctuation, and more. */
|
|
138321
|
-
formatToParts(
|
|
138322
|
-
return this.numberFormatter.formatToParts(
|
|
138321
|
+
formatToParts(t) {
|
|
138322
|
+
return this.numberFormatter.formatToParts(t);
|
|
138323
138323
|
}
|
|
138324
138324
|
/** Formats a number range as a string. */
|
|
138325
|
-
formatRange(
|
|
138326
|
-
if (typeof this.numberFormatter.formatRange == "function") return this.numberFormatter.formatRange(
|
|
138327
|
-
if (
|
|
138328
|
-
return `${this.format(
|
|
138325
|
+
formatRange(t, e) {
|
|
138326
|
+
if (typeof this.numberFormatter.formatRange == "function") return this.numberFormatter.formatRange(t, e);
|
|
138327
|
+
if (e < t) throw new RangeError("End date must be >= start date");
|
|
138328
|
+
return `${this.format(t)} – ${this.format(e)}`;
|
|
138329
138329
|
}
|
|
138330
138330
|
/** Formats a number range as an array of parts. */
|
|
138331
|
-
formatRangeToParts(
|
|
138332
|
-
if (typeof this.numberFormatter.formatRangeToParts == "function") return this.numberFormatter.formatRangeToParts(
|
|
138333
|
-
if (
|
|
138334
|
-
let
|
|
138331
|
+
formatRangeToParts(t, e) {
|
|
138332
|
+
if (typeof this.numberFormatter.formatRangeToParts == "function") return this.numberFormatter.formatRangeToParts(t, e);
|
|
138333
|
+
if (e < t) throw new RangeError("End date must be >= start date");
|
|
138334
|
+
let r = this.numberFormatter.formatToParts(t), o = this.numberFormatter.formatToParts(e);
|
|
138335
138335
|
return [
|
|
138336
|
-
...
|
|
138337
|
-
...
|
|
138336
|
+
...r.map((a) => ({
|
|
138337
|
+
...a,
|
|
138338
138338
|
source: "startRange"
|
|
138339
138339
|
})),
|
|
138340
138340
|
{
|
|
@@ -138342,29 +138342,29 @@ class Sf {
|
|
|
138342
138342
|
value: " – ",
|
|
138343
138343
|
source: "shared"
|
|
138344
138344
|
},
|
|
138345
|
-
...
|
|
138346
|
-
...
|
|
138345
|
+
...o.map((a) => ({
|
|
138346
|
+
...a,
|
|
138347
138347
|
source: "endRange"
|
|
138348
138348
|
}))
|
|
138349
138349
|
];
|
|
138350
138350
|
}
|
|
138351
138351
|
/** Returns the resolved formatting options based on the values passed to the constructor. */
|
|
138352
138352
|
resolvedOptions() {
|
|
138353
|
-
let
|
|
138354
|
-
return !Rf && this.options.signDisplay != null && (
|
|
138355
|
-
...
|
|
138353
|
+
let t = this.numberFormatter.resolvedOptions();
|
|
138354
|
+
return !Rf && this.options.signDisplay != null && (t = {
|
|
138355
|
+
...t,
|
|
138356
138356
|
signDisplay: this.options.signDisplay
|
|
138357
|
-
}), !R5 && this.options.style === "unit" && (
|
|
138358
|
-
...
|
|
138357
|
+
}), !R5 && this.options.style === "unit" && (t = {
|
|
138358
|
+
...t,
|
|
138359
138359
|
style: "unit",
|
|
138360
138360
|
unit: this.options.unit,
|
|
138361
138361
|
unitDisplay: this.options.unitDisplay
|
|
138362
|
-
}),
|
|
138362
|
+
}), t;
|
|
138363
138363
|
}
|
|
138364
|
-
constructor(
|
|
138365
|
-
this.numberFormatter = NN0(
|
|
138364
|
+
constructor(t, e = {}) {
|
|
138365
|
+
this.numberFormatter = NN0(t, e), this.options = e;
|
|
138366
138366
|
}
|
|
138367
|
-
}
|
|
138367
|
+
};
|
|
138368
138368
|
function NN0(t, e = {}) {
|
|
138369
138369
|
let { numberingSystem: r } = e;
|
|
138370
138370
|
if (r && t.includes("-nu-") && (t.includes("-u-") || (t += "-u-"), t += `-nu-${r}`), e.style === "unit" && !R5) {
|
|
@@ -175581,7 +175581,7 @@ function Btt(t, e, r) {
|
|
|
175581
175581
|
return o;
|
|
175582
175582
|
};
|
|
175583
175583
|
}
|
|
175584
|
-
b0(() => Promise.resolve().then(() => CG0)), b0(() => Promise.resolve().then(() => rY0)), b0(() => Promise.resolve().then(() => TY0)), b0(() => Promise.resolve().then(() => BY0)), b0(() => import("./DocumentsTable-
|
|
175584
|
+
b0(() => Promise.resolve().then(() => CG0)), b0(() => Promise.resolve().then(() => rY0)), b0(() => Promise.resolve().then(() => TY0)), b0(() => Promise.resolve().then(() => BY0)), b0(() => import("./DocumentsTable-R1K7B1Ur-lKxvgfB8.js")), b0(() => Promise.resolve().then(() => DX0)), b0(() => import("./FormsTable-BFXGLv2_-Cc5C4-6V.js")), b0(() => Promise.resolve().then(() => wX0)), b0(() => import("./Observations-DSZvTXSj-BmNayaUY.js")), b0(
|
|
175585
175585
|
() => Promise.resolve().then(() => qX0)
|
|
175586
175586
|
), b0(
|
|
175587
175587
|
() => Promise.resolve().then(() => kQ0)
|
|
@@ -177421,7 +177421,7 @@ var drt = (t, e = !1) => {
|
|
|
177421
177421
|
const e = PWe(() => {
|
|
177422
177422
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e;
|
|
177423
177423
|
let d;
|
|
177424
|
-
return this.#l ? d = this.#l : (d = BWe(() => import("./LNWAZHJI-
|
|
177424
|
+
return this.#l ? d = this.#l : (d = BWe(() => import("./LNWAZHJI-poSj31GE.js")), this.#l = d), lKe(this.#h, this.#r), kWe(d, ZWe({
|
|
177425
177425
|
get queryFlavor() {
|
|
177426
177426
|
return r.#d;
|
|
177427
177427
|
},
|
|
@@ -177519,7 +177519,7 @@ var drt = (t, e = !1) => {
|
|
|
177519
177519
|
const e = PWe(() => {
|
|
177520
177520
|
const r = this, [o] = this.#n, [a] = this.#o, [c] = this.#a, [l] = this.#c, [i] = this.#p, [s] = this.#e, [d] = this.#l;
|
|
177521
177521
|
let u;
|
|
177522
|
-
return this.#i ? u = this.#i : (u = BWe(() => import("./MWZ6AO7Z-
|
|
177522
|
+
return this.#i ? u = this.#i : (u = BWe(() => import("./MWZ6AO7Z-CTI0kL-Q.js")), this.#i = u), lKe(this.#h, this.#r), kWe(u, ZWe({
|
|
177523
177523
|
get queryFlavor() {
|
|
177524
177524
|
return r.#d;
|
|
177525
177525
|
},
|
|
@@ -177679,11 +177679,11 @@ const Qet = {
|
|
|
177679
177679
|
}), u2t = b0(
|
|
177680
177680
|
() => import("./index-CFigb5vF.js").then((t) => ({ default: t.IndexPage }))
|
|
177681
177681
|
), h2t = b0(
|
|
177682
|
-
() => import("./index-
|
|
177682
|
+
() => import("./index-Dw7CEfWH.js").then((t) => ({
|
|
177683
177683
|
default: t.default
|
|
177684
177684
|
}))
|
|
177685
177685
|
), p2t = b0(
|
|
177686
|
-
() => import("./index-
|
|
177686
|
+
() => import("./index-B4xTZ4ES.js").then((t) => ({
|
|
177687
177687
|
default: t.default
|
|
177688
177688
|
}))
|
|
177689
177689
|
), f2t = [
|
|
@@ -177725,33 +177725,33 @@ function mrt() {
|
|
|
177725
177725
|
] }) }) }) }) : /* @__PURE__ */ d1(wm1, {});
|
|
177726
177726
|
}
|
|
177727
177727
|
export {
|
|
177728
|
-
|
|
177728
|
+
Ctt as $,
|
|
177729
177729
|
r2t as A,
|
|
177730
|
-
|
|
177731
|
-
|
|
177732
|
-
|
|
177733
|
-
|
|
177734
|
-
|
|
177735
|
-
|
|
177730
|
+
Ott as B,
|
|
177731
|
+
IY2 as C,
|
|
177732
|
+
Ntt as D,
|
|
177733
|
+
x2t as E,
|
|
177734
|
+
I52 as F,
|
|
177735
|
+
Ztt as G,
|
|
177736
177736
|
Y_0 as H,
|
|
177737
|
-
|
|
177737
|
+
_tt as I,
|
|
177738
177738
|
J0t as J,
|
|
177739
|
-
|
|
177739
|
+
ktt as K,
|
|
177740
177740
|
zi as L,
|
|
177741
177741
|
ttt as M,
|
|
177742
177742
|
e$0 as N,
|
|
177743
177743
|
Vi as O,
|
|
177744
177744
|
ntt as P,
|
|
177745
177745
|
C20 as Q,
|
|
177746
|
-
|
|
177747
|
-
|
|
177746
|
+
Ltt as R,
|
|
177747
|
+
Att as S,
|
|
177748
177748
|
ett as T,
|
|
177749
|
-
|
|
177749
|
+
Dtt as U,
|
|
177750
177750
|
m0t as V,
|
|
177751
|
-
|
|
177751
|
+
Rtt as W,
|
|
177752
177752
|
f0t as X,
|
|
177753
177753
|
att as Y,
|
|
177754
|
-
|
|
177754
|
+
$tt as Z,
|
|
177755
177755
|
Ht as _,
|
|
177756
177756
|
o0 as a,
|
|
177757
177757
|
Js as a$,
|
|
@@ -177818,33 +177818,33 @@ export {
|
|
|
177818
177818
|
Utt as ax,
|
|
177819
177819
|
Ol as ay,
|
|
177820
177820
|
urt as az,
|
|
177821
|
-
|
|
177821
|
+
Stt as b,
|
|
177822
177822
|
Z1t as b0,
|
|
177823
177823
|
nrt as b1,
|
|
177824
177824
|
x1t as b2,
|
|
177825
177825
|
mrt as b3,
|
|
177826
177826
|
V0 as c,
|
|
177827
|
-
|
|
177827
|
+
stt as d,
|
|
177828
177828
|
gn as e,
|
|
177829
|
-
|
|
177830
|
-
|
|
177829
|
+
jO0 as f,
|
|
177830
|
+
M_0 as g,
|
|
177831
177831
|
Rr as h,
|
|
177832
|
-
|
|
177833
|
-
|
|
177834
|
-
|
|
177835
|
-
|
|
177832
|
+
i$0 as i,
|
|
177833
|
+
Sv as j,
|
|
177834
|
+
Ttt as k,
|
|
177835
|
+
h0t as l,
|
|
177836
177836
|
b2 as m,
|
|
177837
177837
|
Zt as n,
|
|
177838
|
-
|
|
177839
|
-
|
|
177838
|
+
Sy as o,
|
|
177839
|
+
ctt as p,
|
|
177840
177840
|
pWe as q,
|
|
177841
|
-
|
|
177842
|
-
|
|
177843
|
-
|
|
177841
|
+
Y0t as r,
|
|
177842
|
+
n0t as s,
|
|
177843
|
+
Btt as t,
|
|
177844
177844
|
mr as u,
|
|
177845
177845
|
ud as v,
|
|
177846
177846
|
v8 as w,
|
|
177847
|
-
|
|
177848
|
-
|
|
177847
|
+
R2t as x,
|
|
177848
|
+
L2t as y,
|
|
177849
177849
|
W7 as z
|
|
177850
177850
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { t as V, A as h, a as C, j as O, l as P, h as B, o as x, p as L, r as G, s as U, x as q, y as w, C as F, E as j, F as k, J as $ } from "./index-B_wLQqCf.js";
|
|
3
3
|
import { useState as I, useMemo as _ } from "react";
|
|
4
4
|
import { useQueryClient as H, useQuery as K } from "@tanstack/react-query";
|
|
5
5
|
const Q = V(
|
|
@@ -75,7 +75,7 @@ function ae(e, a) {
|
|
|
75
75
|
}));
|
|
76
76
|
}
|
|
77
77
|
const le = () => {
|
|
78
|
-
const { t: e } = C(), a = H(), { addNotification: t } = B(), { userPrivileges: s } =
|
|
78
|
+
const { t: e } = C(), a = H(), { 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,
|
|
@@ -85,7 +85,7 @@ const le = () => {
|
|
|
85
85
|
[l]
|
|
86
86
|
), { data: A, isLoading: v, isError: D } = K({
|
|
87
87
|
queryKey: ["allAppointmentServices"],
|
|
88
|
-
queryFn:
|
|
88
|
+
queryFn: G,
|
|
89
89
|
enabled: m
|
|
90
90
|
}), R = _(
|
|
91
91
|
() => te(l, e),
|
|
@@ -96,7 +96,7 @@ const le = () => {
|
|
|
96
96
|
), g = async () => {
|
|
97
97
|
u(!0);
|
|
98
98
|
try {
|
|
99
|
-
await
|
|
99
|
+
await $(E.id), t({
|
|
100
100
|
title: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_TITLE"),
|
|
101
101
|
message: e("ADMIN_ALL_SERVICES_DELETE_SUCCESS_MESSAGE"),
|
|
102
102
|
type: "success",
|
|
@@ -112,7 +112,7 @@ const le = () => {
|
|
|
112
112
|
u(!1);
|
|
113
113
|
}
|
|
114
114
|
}, T = (r, o) => o === "actions" ? /* @__PURE__ */ n(
|
|
115
|
-
|
|
115
|
+
j,
|
|
116
116
|
{
|
|
117
117
|
id: `delete-service-${r.id}-btn`,
|
|
118
118
|
testId: `delete-service-${r.id}-btn-test-id`,
|
|
@@ -121,7 +121,7 @@ const le = () => {
|
|
|
121
121
|
label: e("ADMIN_ALL_SERVICES_DELETE_ICON_LABEL"),
|
|
122
122
|
disabled: !b,
|
|
123
123
|
onClick: () => c(r),
|
|
124
|
-
children: /* @__PURE__ */ n(
|
|
124
|
+
children: /* @__PURE__ */ n(k, {})
|
|
125
125
|
}
|
|
126
126
|
) : p.includes(o) ? r[o] ?? "-" : r.attributes[o] ?? "-", f = [
|
|
127
127
|
{ id: "home", label: e("BREADCRUMB_HOME"), href: U },
|
package/dist/index.js
CHANGED