@bahmni/registration-app 0.0.1-dev.241 → 0.0.1-dev.242
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-DEXvARku-CzmO77_Y.js → DocumentsTable-DEmnzSjR-BoE9Nadz.js} +27 -27
- package/dist/{FormsTable-B1V8GAgi-Ab0g3Rc8.js → FormsTable-CXitFQpW-Ccpeoepd.js} +1 -1
- package/dist/{LNWAZHJI-DyQLcH75.js → LNWAZHJI-Dt-zg_b8.js} +2 -2
- package/dist/{MWZ6AO7Z-BnX5cB07.js → MWZ6AO7Z-DcITN03u.js} +2 -2
- package/dist/{Observations-C4_YlUV0-BrwIG9AP.js → Observations-DsQfPuhO-673kAosv.js} +6 -6
- package/dist/{YPM2AS64-2Ogg3-tj.js → YPM2AS64-3z4t25MI.js} +1 -1
- package/dist/{index-DmsNGq_D.js → index-BoFTZe4P.js} +3513 -3505
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-
|
|
1
|
+
import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
|
|
2
|
+
import { c as K, u as Q, d as W, a as J, l as X, m as Z, b as ee, w as te } from "./index-BoFTZe4P.js";
|
|
3
3
|
import { useQuery as ae } from "@tanstack/react-query";
|
|
4
|
-
import { useState as l, useCallback as h, useEffect as
|
|
4
|
+
import { useState as l, useCallback as h, useEffect as O, useMemo as T } from "react";
|
|
5
5
|
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 = {
|
|
6
6
|
documentsTableBody: ne,
|
|
7
7
|
viewAttachmentsLink: oe,
|
|
@@ -27,13 +27,13 @@ function ue(a, g) {
|
|
|
27
27
|
header: g(me[s])
|
|
28
28
|
}));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const _e = [
|
|
31
31
|
"documentIdentifier",
|
|
32
32
|
"documentType",
|
|
33
33
|
"uploadedOn",
|
|
34
34
|
"uploadedBy",
|
|
35
35
|
"action"
|
|
36
|
-
],
|
|
36
|
+
], pe = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, B = (a) => a.attachments.length > 0 ? a.attachments : a.documentUrl ? [{ url: a.documentUrl, contentType: a.contentType }] : [], fe = ({ config: a, encounterUuids: g }) => {
|
|
37
37
|
const [s, S] = l(!1), [o, L] = l(
|
|
38
38
|
null
|
|
39
39
|
), [R, I] = l(
|
|
@@ -60,17 +60,17 @@ const pe = [
|
|
|
60
60
|
C
|
|
61
61
|
)
|
|
62
62
|
});
|
|
63
|
-
|
|
63
|
+
O(() => {
|
|
64
64
|
u && y(u.total);
|
|
65
|
-
}, [u]),
|
|
65
|
+
}, [u]), O(() => {
|
|
66
66
|
A(1), y(void 0);
|
|
67
|
-
}, [E]),
|
|
67
|
+
}, [E]), O(() => {
|
|
68
68
|
D && U({
|
|
69
69
|
title: n("ERROR_DEFAULT_TITLE"),
|
|
70
70
|
message: v?.message ?? "",
|
|
71
71
|
type: "error"
|
|
72
72
|
});
|
|
73
|
-
}, [D, v, U, n]),
|
|
73
|
+
}, [D, v, U, n]), O(() => {
|
|
74
74
|
const e = new AbortController();
|
|
75
75
|
return (async () => {
|
|
76
76
|
if (!s || !o) return;
|
|
@@ -82,8 +82,8 @@ const pe = [
|
|
|
82
82
|
method: "HEAD",
|
|
83
83
|
signal: e.signal
|
|
84
84
|
})).ok || t.add(i);
|
|
85
|
-
} catch (
|
|
86
|
-
|
|
85
|
+
} catch (N) {
|
|
86
|
+
N instanceof Error && N.name !== "AbortError" && t.add(i);
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
e.signal.aborted || I(t);
|
|
@@ -94,16 +94,16 @@ const pe = [
|
|
|
94
94
|
t !== m ? (k(t), A(1), y(void 0)) : A(e);
|
|
95
95
|
},
|
|
96
96
|
[m]
|
|
97
|
-
),
|
|
98
|
-
() => a?.fields ??
|
|
97
|
+
), f = T(
|
|
98
|
+
() => a?.fields ?? _e,
|
|
99
99
|
[a?.fields]
|
|
100
|
-
), P = T(() => [...u?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [u]), z = T(() => ue(
|
|
101
|
-
() =>
|
|
100
|
+
), P = T(() => [...u?.documents ?? []].sort((e, t) => !e.uploadedOn && !t.uploadedOn ? 0 : e.uploadedOn ? t.uploadedOn ? new Date(t.uploadedOn).getTime() - new Date(e.uploadedOn).getTime() : -1 : 1), [u]), z = T(() => ue(f, n), [f, n]), x = T(
|
|
101
|
+
() => f.map((e) => ({
|
|
102
102
|
key: e,
|
|
103
103
|
sortable: e !== "action"
|
|
104
104
|
})),
|
|
105
|
-
[
|
|
106
|
-
),
|
|
105
|
+
[f]
|
|
106
|
+
), _ = T(
|
|
107
107
|
() => o ? B(o) : [],
|
|
108
108
|
[o]
|
|
109
109
|
), G = h(
|
|
@@ -137,7 +137,7 @@ const pe = [
|
|
|
137
137
|
},
|
|
138
138
|
[b, n]
|
|
139
139
|
);
|
|
140
|
-
return /* @__PURE__ */
|
|
140
|
+
return /* @__PURE__ */ p(Y, { children: [
|
|
141
141
|
/* @__PURE__ */ r("div", { "data-testid": "documents-table", children: /* @__PURE__ */ r(
|
|
142
142
|
ee,
|
|
143
143
|
{
|
|
@@ -168,33 +168,33 @@ const pe = [
|
|
|
168
168
|
passiveModal: !0,
|
|
169
169
|
size: "lg",
|
|
170
170
|
testId: "document-view-modal",
|
|
171
|
-
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children:
|
|
172
|
-
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) ||
|
|
173
|
-
return c === "#" ||
|
|
171
|
+
children: /* @__PURE__ */ r("div", { className: d.documentViewerContainer, children: _.map((e, t) => {
|
|
172
|
+
const c = j(e.url), i = e.contentType?.toLowerCase().includes("pdf"), w = (e.contentType?.toLowerCase().includes("image") ?? !1) || pe.test(e.url ?? ""), N = R.has(t);
|
|
173
|
+
return c === "#" || N ? /* @__PURE__ */ p(
|
|
174
174
|
"div",
|
|
175
175
|
{
|
|
176
176
|
className: d.attachmentError,
|
|
177
177
|
"data-testid": `attachment-error-${t}`,
|
|
178
178
|
children: [
|
|
179
|
-
|
|
179
|
+
_.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
180
180
|
t + 1,
|
|
181
181
|
"/",
|
|
182
|
-
|
|
182
|
+
_.length
|
|
183
183
|
] }),
|
|
184
184
|
/* @__PURE__ */ r("p", { children: n("DOCUMENTS_ERROR_LOADING_ATTACHMENT") })
|
|
185
185
|
]
|
|
186
186
|
},
|
|
187
187
|
`${o.id}-${e.url}`
|
|
188
|
-
) : /* @__PURE__ */
|
|
188
|
+
) : /* @__PURE__ */ p(
|
|
189
189
|
"div",
|
|
190
190
|
{
|
|
191
191
|
className: d.attachmentItem,
|
|
192
192
|
"data-testid": `attachment-item-${t}`,
|
|
193
193
|
children: [
|
|
194
|
-
|
|
194
|
+
_.length > 1 && /* @__PURE__ */ p("p", { className: d.attachmentCounter, children: [
|
|
195
195
|
t + 1,
|
|
196
196
|
"/",
|
|
197
|
-
|
|
197
|
+
_.length
|
|
198
198
|
] }),
|
|
199
199
|
w ? /* @__PURE__ */ r(
|
|
200
200
|
"img",
|
|
@@ -223,5 +223,5 @@ const pe = [
|
|
|
223
223
|
] });
|
|
224
224
|
};
|
|
225
225
|
export {
|
|
226
|
-
|
|
226
|
+
fe as default
|
|
227
227
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as s, jsxs as W, Fragment as X } from "react/jsx-runtime";
|
|
2
|
-
import { u as Z, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-
|
|
2
|
+
import { u as Z, c as ee, e as re, f as ae, s as te, g as oe, i as se, Q as ne, N as U, m as de, l as ie, b as S, x as me, h as ue, w as le, $ as ce, o as fe } from "./index-BoFTZe4P.js";
|
|
3
3
|
import { useQueryClient as ye, useQuery as c } from "@tanstack/react-query";
|
|
4
4
|
import { useState as q, useMemo as d, useCallback as f } from "react";
|
|
5
5
|
const pe = "_formsTableBody_81hra_1", be = "_customAccordianItem_81hra_6", I = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-
|
|
2
|
-
import { B as d, C as f, D as e } from "./index-
|
|
1
|
+
import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-3z4t25MI.js";
|
|
2
|
+
import { B as d, C as f, D as e } from "./index-BoFTZe4P.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-
|
|
2
|
-
import { B as C, C as v, D as e } from "./index-
|
|
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-3z4t25MI.js";
|
|
2
|
+
import { B as C, C as v, D as e } from "./index-BoFTZe4P.js";
|
|
3
3
|
var h = (t) => {
|
|
4
4
|
const [r, o] = s({
|
|
5
5
|
prefix: "TanstackQueryDevtools"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { c as B, d as Q, u as
|
|
1
|
+
import { jsxs as N, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import { c as B, d as Q, u as S, n as H, j as K, Q as w, k as M, p as j, q as x, H as G, b as X, r as z, Z as A, t as P, v as Z, R as Y, y as J, z as W, A as ee } from "./index-BoFTZe4P.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 D = (t, n, d, l, b, r) => {
|
|
@@ -59,9 +59,9 @@ const D = (t, n, d, l, b, r) => {
|
|
|
59
59
|
title: n = "",
|
|
60
60
|
hideThumbnail: d
|
|
61
61
|
}) => {
|
|
62
|
-
const { t: l } =
|
|
62
|
+
const { t: l } = S(), b = (r, a, s) => {
|
|
63
63
|
const i = z(r.encounterDetails, l);
|
|
64
|
-
return /* @__PURE__ */
|
|
64
|
+
return /* @__PURE__ */ N(
|
|
65
65
|
A,
|
|
66
66
|
{
|
|
67
67
|
title: i,
|
|
@@ -113,7 +113,7 @@ 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 = B(), { addNotification: s } = Q(), { t: i } =
|
|
116
|
+
} = n, r = se(/* @__PURE__ */ new Set()), a = B(), { addNotification: s } = Q(), { t: i } = S(), o = te({
|
|
117
117
|
queries: d.map((e) => ({
|
|
118
118
|
queryKey: de(e),
|
|
119
119
|
queryFn: () => H(e),
|
|
@@ -165,7 +165,7 @@ const D = (t, n, d, l, b, r) => {
|
|
|
165
165
|
{ key: "value", header: "value" },
|
|
166
166
|
{ key: "form", header: "form" }
|
|
167
167
|
], O = F || !y, _ = f && y, q = (!c || c.entry?.length === 0 || m.length === 0) && y, C = _ ? i("ERROR_FETCHING_OBSERVATIONS") : null, U = q ? i("NO_OBSERVATIONS_FOUND") : void 0, V = g.length > 0 && !O && !_, E = n.titleTranslationKey, v = E ? i(E) : "";
|
|
168
|
-
return /* @__PURE__ */
|
|
168
|
+
return /* @__PURE__ */ N(
|
|
169
169
|
"div",
|
|
170
170
|
{
|
|
171
171
|
id: "observations",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { E as we, F as z, G as xt, I as B, C as q, D as y, P as Ro, J as ye, S as R, K as _, L as k, M as N, O as A, T as bs, U as ir, V as $e, W as U, X as Hn, Y as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-
|
|
1
|
+
import { E as we, F as z, G as xt, I as B, C as q, D as y, P as Ro, J as ye, S as R, K as _, L as k, M as N, O as A, T as bs, U as ir, V as $e, W as U, X as Hn, Y as Vn, _ as dt, a0 as D, a1 as xs, a2 as cn, a3 as Be, a4 as ws, a5 as qt, a6 as zt, a7 as $s, a8 as Cs, a9 as $n, aa as Ss, ab as Nr, ac as Bt, ad as zo, ae as ks, af as Es, ag as j, ah as Ur, ai as Ms, aj as Ds, ak as sr, al as As, am as Ts, an as zn, ao as Fs, ap as Is, aq as Z, ar as Ps, as as Ls } from "./index-BoFTZe4P.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|