@bahmni/widgets 0.0.1-dev.461 → 0.0.1-dev.463
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-CWtmCWHw.js → DocumentsTable-C9E3W4b9.js} +115 -120
- package/dist/FormsTable-B1LrOUFm.js +250 -0
- package/dist/{Observations-ByFseCbp.js → Observations-Drj4fG6y.js} +31 -31
- package/dist/allergies/AllergiesTable.d.ts.map +1 -1
- package/dist/documents/DocumentsTable.d.ts.map +1 -1
- package/dist/forms/FormsTable.d.ts.map +1 -1
- package/dist/immunizationHistory/ImmunizationHistory.d.ts.map +1 -1
- package/dist/immunizationHistory/model.d.ts +0 -6
- package/dist/immunizationHistory/model.d.ts.map +1 -1
- package/dist/{index-RIPNlc6y.js → index-CzjU0ZY5.js} +19473 -19532
- package/dist/index.js +9 -9
- package/dist/medications/MedicationsTable.d.ts.map +1 -1
- package/dist/medications/components/Actions.d.ts +0 -1
- package/dist/medications/components/Actions.d.ts.map +1 -1
- package/dist/medications/components/actionHandlers.d.ts +1 -1
- package/dist/medications/components/actionHandlers.d.ts.map +1 -1
- package/dist/medications/models.d.ts +1 -0
- package/dist/medications/models.d.ts.map +1 -1
- package/dist/medications/utils.d.ts.map +1 -1
- package/dist/tasks/actions/actionHandlers.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/FormsTable-Cdfw4nlS.js +0 -253
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import { jsx as a, jsxs as
|
|
2
|
-
import { u as
|
|
1
|
+
import { jsx as a, jsxs as h, Fragment as pe } from "react/jsx-runtime";
|
|
2
|
+
import { u as _e, a as Ae, b as Ee, s as ge, h as fe, n as Ce, c as Ie, d as S, p as De, $ as Ne, e as Le, E as be, f as ye, z as Q, A as Se, g as ve, L as Oe, W as we, i as Me, j as J, k as ee } from "./index-CzjU0ZY5.js";
|
|
3
3
|
import { useQuery as Ue } from "@tanstack/react-query";
|
|
4
|
-
import { useState as
|
|
5
|
-
import { useTranslation as
|
|
6
|
-
const
|
|
7
|
-
documentsTableBody:
|
|
8
|
-
viewAttachmentsLink:
|
|
9
|
-
documentViewerContainer:
|
|
10
|
-
printContainer:
|
|
11
|
-
attachmentItem:
|
|
12
|
-
attachmentCounter:
|
|
13
|
-
attachmentError:
|
|
4
|
+
import { useState as T, useRef as Re, useEffect as _, useMemo as A, useCallback as p } from "react";
|
|
5
|
+
import { useTranslation as ke } from "react-i18next";
|
|
6
|
+
const Pe = "DocumentsTable-module_documentsTableBody__6iR3w", Be = "DocumentsTable-module_viewAttachmentsLink__aQ1on", He = "DocumentsTable-module_documentViewerContainer__F5m8D", $e = "DocumentsTable-module_printContainer__rtarJ", ze = "DocumentsTable-module_attachmentItem__17KA7", Fe = "DocumentsTable-module_attachmentCounter__WFiI3", We = "DocumentsTable-module_attachmentError__RI4U2", Ve = "DocumentsTable-module_documentIframe__ptq5I", Ge = "DocumentsTable-module_attachmentContent__IaCEe", qe = "DocumentsTable-module_attachmentLoading__FAR6p", je = "DocumentsTable-module_hiddenWhileLoading__IxocW", Ke = "DocumentsTable-module_documentImage__KQVgS", Ye = "DocumentsTable-module_header__345GY", Qe = "DocumentsTable-module_documentTypeCell__uWGM8", Je = "DocumentsTable-module_printAllButton__IVYUW", Xe = "DocumentsTable-module_attachmentHeader__yI2xn", s = {
|
|
7
|
+
documentsTableBody: Pe,
|
|
8
|
+
viewAttachmentsLink: Be,
|
|
9
|
+
documentViewerContainer: He,
|
|
10
|
+
printContainer: $e,
|
|
11
|
+
attachmentItem: ze,
|
|
12
|
+
attachmentCounter: Fe,
|
|
13
|
+
attachmentError: We,
|
|
14
14
|
documentIframe: Ve,
|
|
15
|
-
attachmentContent:
|
|
16
|
-
attachmentLoading:
|
|
17
|
-
hiddenWhileLoading:
|
|
15
|
+
attachmentContent: Ge,
|
|
16
|
+
attachmentLoading: qe,
|
|
17
|
+
hiddenWhileLoading: je,
|
|
18
18
|
documentImage: Ke,
|
|
19
|
-
header:
|
|
20
|
-
documentTypeCell:
|
|
21
|
-
printAllButton:
|
|
22
|
-
attachmentHeader:
|
|
23
|
-
},
|
|
19
|
+
header: Ye,
|
|
20
|
+
documentTypeCell: Qe,
|
|
21
|
+
printAllButton: Je,
|
|
22
|
+
attachmentHeader: Xe
|
|
23
|
+
}, Ze = "add", X = "document-print-container", Z = () => /* @__PURE__ */ a(ee, {}), xe = /* @__PURE__ */ new Set([
|
|
24
24
|
"ArrowUp",
|
|
25
25
|
"ArrowDown",
|
|
26
26
|
"PageUp",
|
|
@@ -28,81 +28,76 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
28
28
|
"Home",
|
|
29
29
|
"End",
|
|
30
30
|
" "
|
|
31
|
-
]),
|
|
31
|
+
]), et = 15e3, tt = [
|
|
32
32
|
"documentType",
|
|
33
33
|
"documentIdentifier",
|
|
34
34
|
"attachments",
|
|
35
35
|
"uploadedOn",
|
|
36
36
|
"uploadedBy"
|
|
37
|
-
],
|
|
38
|
-
const [
|
|
37
|
+
], nt = /\.(jpg|jpeg|png|gif|webp|bmp|svg)$/i, x = (l) => l.attachments.length > 0 ? l.attachments : l.documentUrl ? [{ url: l.documentUrl, contentType: l.contentType }] : [], lt = ({ config: l, encounterUuids: B }) => {
|
|
38
|
+
const [m, H] = T(!1), [r, $] = T(
|
|
39
39
|
null
|
|
40
|
-
), [
|
|
40
|
+
), [N, v] = T(
|
|
41
41
|
/* @__PURE__ */ new Set()
|
|
42
|
-
), [L,
|
|
42
|
+
), [L, O] = T(
|
|
43
43
|
/* @__PURE__ */ new Set()
|
|
44
|
-
), C =
|
|
44
|
+
), C = Re(null), [w, z] = T(
|
|
45
45
|
null
|
|
46
46
|
), F = w !== null;
|
|
47
|
-
|
|
48
|
-
const
|
|
47
|
+
_(() => () => C.current?.abort(), []);
|
|
48
|
+
const E = _e(), { t: o } = ke(), { addNotification: b } = Ae(), g = A(
|
|
49
49
|
() => l?.actions?.find(
|
|
50
50
|
(e) => e.type === Ze
|
|
51
51
|
),
|
|
52
52
|
[l?.actions]
|
|
53
|
-
), te = Ee(
|
|
53
|
+
), te = Ee(g?.requiredPrivilege), ne = !!g && te, ae = Number(l?.pageSize) || 5, [M, U] = T(1), [I, oe] = T(ae), [se, R] = T(void 0), W = p((e) => {
|
|
54
54
|
$(e), H(!0);
|
|
55
55
|
}, []), re = p(() => {
|
|
56
|
-
C.current?.abort(),
|
|
57
|
-
}, []),
|
|
58
|
-
|
|
56
|
+
C.current?.abort(), O(/* @__PURE__ */ new Set()), H(!1), $(null), v(/* @__PURE__ */ new Set());
|
|
57
|
+
}, []), V = p((e) => {
|
|
58
|
+
O((t) => new Set(t).add(e));
|
|
59
59
|
}, []), G = p((e) => {
|
|
60
60
|
v((t) => new Set(t).add(e));
|
|
61
61
|
}, []), ce = p(() => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
...m.editTitle ? { editTitle: m.editTitle } : {}
|
|
68
|
-
}
|
|
69
|
-
})
|
|
70
|
-
);
|
|
71
|
-
}, [m]), { data: I, isLoading: le, isError: k, error: P, refetch: q } = Ue({
|
|
62
|
+
g && ge({
|
|
63
|
+
context: { encounterType: g.encounterType },
|
|
64
|
+
action: { type: "create", resourceType: "DocumentReference" }
|
|
65
|
+
});
|
|
66
|
+
}, [g]), { data: D, isLoading: le, isError: k, error: P, refetch: q } = Ue({
|
|
72
67
|
queryKey: [
|
|
73
68
|
"documents",
|
|
74
|
-
|
|
69
|
+
E,
|
|
75
70
|
B,
|
|
76
|
-
|
|
77
|
-
|
|
71
|
+
M,
|
|
72
|
+
I
|
|
78
73
|
],
|
|
79
|
-
enabled: !!
|
|
80
|
-
queryFn: () =>
|
|
81
|
-
|
|
74
|
+
enabled: !!E,
|
|
75
|
+
queryFn: () => fe(
|
|
76
|
+
E,
|
|
82
77
|
B,
|
|
83
|
-
|
|
84
|
-
|
|
78
|
+
I,
|
|
79
|
+
M
|
|
85
80
|
)
|
|
86
81
|
});
|
|
87
|
-
|
|
82
|
+
Ce(
|
|
88
83
|
(e) => {
|
|
89
|
-
e.patientUUID ===
|
|
84
|
+
e.patientUUID === E && e.updatedResources.documents && q();
|
|
90
85
|
},
|
|
91
|
-
[
|
|
92
|
-
),
|
|
93
|
-
|
|
94
|
-
}, [
|
|
95
|
-
|
|
96
|
-
}, [
|
|
86
|
+
[E, q]
|
|
87
|
+
), _(() => {
|
|
88
|
+
D && R(D.total);
|
|
89
|
+
}, [D]), _(() => {
|
|
90
|
+
U(1), R(void 0);
|
|
91
|
+
}, [E]), _(() => {
|
|
97
92
|
k && b({
|
|
98
93
|
title: o("ERROR_DEFAULT_TITLE"),
|
|
99
94
|
message: P?.message ?? "",
|
|
100
95
|
type: "error"
|
|
101
96
|
});
|
|
102
|
-
}, [k, P, b, o]),
|
|
97
|
+
}, [k, P, b, o]), _(() => {
|
|
103
98
|
const e = new AbortController();
|
|
104
99
|
return (async () => {
|
|
105
|
-
if (!
|
|
100
|
+
if (!m || !r) return;
|
|
106
101
|
const n = /* @__PURE__ */ new Set(), i = x(r);
|
|
107
102
|
for (let c = 0; c < i.length; c++) {
|
|
108
103
|
const f = S(i[c].url);
|
|
@@ -111,14 +106,14 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
111
106
|
method: "HEAD",
|
|
112
107
|
signal: e.signal
|
|
113
108
|
})).ok || n.add(c);
|
|
114
|
-
} catch (
|
|
115
|
-
|
|
109
|
+
} catch (u) {
|
|
110
|
+
u instanceof Error && u.name !== "AbortError" && n.add(c);
|
|
116
111
|
}
|
|
117
112
|
}
|
|
118
113
|
e.signal.aborted || v(n);
|
|
119
114
|
})(), () => e.abort();
|
|
120
|
-
}, [
|
|
121
|
-
if (!
|
|
115
|
+
}, [m, r]), _(() => {
|
|
116
|
+
if (!m || !r) return;
|
|
122
117
|
const e = document.querySelector(
|
|
123
118
|
'[data-testid="document-view-modal"] .cds--modal-content'
|
|
124
119
|
);
|
|
@@ -126,54 +121,54 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
126
121
|
let t = !1;
|
|
127
122
|
const n = () => {
|
|
128
123
|
t = !0;
|
|
129
|
-
}, i = (
|
|
130
|
-
|
|
131
|
-
}, c = (
|
|
132
|
-
const Te =
|
|
133
|
-
|
|
124
|
+
}, i = (u) => {
|
|
125
|
+
u.target === e && n();
|
|
126
|
+
}, c = (u) => {
|
|
127
|
+
const Te = u.target;
|
|
128
|
+
xe.has(u.key) && !Te?.closest("button, input, textarea, select, a") && n();
|
|
134
129
|
}, f = () => {
|
|
135
130
|
!t && e.scrollTop !== 0 && (e.scrollTop = 0);
|
|
136
131
|
};
|
|
137
132
|
return e.addEventListener("wheel", n, { passive: !0 }), e.addEventListener("touchmove", n, { passive: !0 }), e.addEventListener("mousedown", i), e.addEventListener("keydown", c), e.addEventListener("scroll", f), () => {
|
|
138
133
|
e.removeEventListener("wheel", n), e.removeEventListener("touchmove", n), e.removeEventListener("mousedown", i), e.removeEventListener("keydown", c), e.removeEventListener("scroll", f);
|
|
139
134
|
};
|
|
140
|
-
}, [
|
|
135
|
+
}, [m, r]);
|
|
141
136
|
const de = p(
|
|
142
137
|
(e, t) => {
|
|
143
|
-
t !==
|
|
138
|
+
t !== I ? (oe(t), U(1), R(void 0)) : U(e);
|
|
144
139
|
},
|
|
145
|
-
[
|
|
146
|
-
),
|
|
147
|
-
() => l?.fields ??
|
|
140
|
+
[I]
|
|
141
|
+
), y = A(
|
|
142
|
+
() => l?.fields ?? tt,
|
|
148
143
|
[l?.fields]
|
|
149
|
-
), ie =
|
|
150
|
-
() =>
|
|
144
|
+
), ie = A(() => [...D?.documents ?? []].sort((t, n) => !t.uploadedOn && !n.uploadedOn ? 0 : t.uploadedOn ? n.uploadedOn ? new Date(n.uploadedOn).getTime() - new Date(t.uploadedOn).getTime() : -1 : 1), [D]), me = A(() => Ie(y, o), [y, o]), ue = A(
|
|
145
|
+
() => y.map((e) => ({
|
|
151
146
|
key: e,
|
|
152
147
|
sortable: e !== "attachments"
|
|
153
148
|
})),
|
|
154
|
-
[
|
|
155
|
-
), d =
|
|
149
|
+
[y]
|
|
150
|
+
), d = A(
|
|
156
151
|
() => r ? x(r) : [],
|
|
157
152
|
[r]
|
|
158
|
-
),
|
|
159
|
-
(e, t) => L.has(t) ||
|
|
153
|
+
), j = d.every(
|
|
154
|
+
(e, t) => L.has(t) || N.has(t) || S(e.url) === "#"
|
|
160
155
|
);
|
|
161
|
-
|
|
162
|
-
if (!
|
|
156
|
+
_(() => {
|
|
157
|
+
if (!m || d.length === 0) return;
|
|
163
158
|
const e = setTimeout(
|
|
164
|
-
() =>
|
|
165
|
-
|
|
159
|
+
() => O(new Set(d.keys())),
|
|
160
|
+
et
|
|
166
161
|
);
|
|
167
162
|
return () => clearTimeout(e);
|
|
168
|
-
}, [
|
|
169
|
-
const
|
|
163
|
+
}, [m, d]);
|
|
164
|
+
const K = p(
|
|
170
165
|
async (e, t) => {
|
|
171
166
|
if (!r || C.current) return;
|
|
172
167
|
const n = new AbortController(), { signal: i } = n;
|
|
173
168
|
C.current = n, z(t);
|
|
174
169
|
const c = document.getElementById(X);
|
|
175
170
|
try {
|
|
176
|
-
await
|
|
171
|
+
await De(
|
|
177
172
|
e,
|
|
178
173
|
r.documentIdentifier,
|
|
179
174
|
{ container: c, signal: i }
|
|
@@ -189,21 +184,21 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
189
184
|
}
|
|
190
185
|
},
|
|
191
186
|
[r, b, o]
|
|
192
|
-
), Y =
|
|
187
|
+
), Y = A(
|
|
193
188
|
() => d.filter(
|
|
194
|
-
(e, t) => S(e.url) !== "#" && !
|
|
189
|
+
(e, t) => S(e.url) !== "#" && !N.has(t)
|
|
195
190
|
),
|
|
196
|
-
[d,
|
|
191
|
+
[d, N]
|
|
197
192
|
), he = p(
|
|
198
193
|
(e, t) => {
|
|
199
194
|
switch (t) {
|
|
200
195
|
case "documentIdentifier":
|
|
201
196
|
return /* @__PURE__ */ a("span", { children: e.documentIdentifier?.trim() || "-" });
|
|
202
197
|
case "documentType":
|
|
203
|
-
return /* @__PURE__ */
|
|
198
|
+
return /* @__PURE__ */ h("div", { className: s.documentTypeCell, children: [
|
|
204
199
|
/* @__PURE__ */ a("span", { children: e.documentType ?? o("DOCUMENTS_NOT_AVAILABLE") }),
|
|
205
200
|
e.description && /* @__PURE__ */ a(
|
|
206
|
-
|
|
201
|
+
be,
|
|
207
202
|
{
|
|
208
203
|
iconName: "fa-file-lines",
|
|
209
204
|
content: e.description,
|
|
@@ -213,7 +208,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
213
208
|
)
|
|
214
209
|
] });
|
|
215
210
|
case "uploadedOn":
|
|
216
|
-
return
|
|
211
|
+
return Le(
|
|
217
212
|
e.uploadedOn,
|
|
218
213
|
o,
|
|
219
214
|
!0
|
|
@@ -222,9 +217,9 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
222
217
|
return e.uploadedBy ?? o("DOCUMENTS_NOT_AVAILABLE");
|
|
223
218
|
case "attachments":
|
|
224
219
|
return e.attachments.length > 0 || !!e.documentUrl ? /* @__PURE__ */ a(
|
|
225
|
-
|
|
220
|
+
Ne,
|
|
226
221
|
{
|
|
227
|
-
onClick: () =>
|
|
222
|
+
onClick: () => W(e),
|
|
228
223
|
className: s.viewAttachmentsLink,
|
|
229
224
|
"data-testid": `view-attachments-${e.id}`,
|
|
230
225
|
children: o("DOCUMENTS_VIEW_ATTACHMENTS")
|
|
@@ -234,10 +229,10 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
234
229
|
return null;
|
|
235
230
|
}
|
|
236
231
|
},
|
|
237
|
-
[
|
|
232
|
+
[W, o]
|
|
238
233
|
);
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
ne && /* @__PURE__ */
|
|
234
|
+
return /* @__PURE__ */ h(pe, { children: [
|
|
235
|
+
ne && /* @__PURE__ */ h(ye, { className: s.header, testId: "documents-header", children: [
|
|
241
236
|
/* @__PURE__ */ a("p", { children: o("DOCUMENTS_TABLE_HEADING") }),
|
|
242
237
|
/* @__PURE__ */ a(
|
|
243
238
|
Q,
|
|
@@ -245,15 +240,15 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
245
240
|
autoAlign: !0,
|
|
246
241
|
size: "lg",
|
|
247
242
|
kind: "ghost",
|
|
248
|
-
label: o(
|
|
243
|
+
label: o(g.label),
|
|
249
244
|
testId: "documents-add-button",
|
|
250
245
|
onClick: ce,
|
|
251
|
-
children: /* @__PURE__ */ a(
|
|
246
|
+
children: /* @__PURE__ */ a(Se, { id: "documents-add-icon", name: "fa-plus", size: ve.LG })
|
|
252
247
|
}
|
|
253
248
|
)
|
|
254
249
|
] }),
|
|
255
250
|
/* @__PURE__ */ a("div", { "data-testid": "documents-table", children: /* @__PURE__ */ a(
|
|
256
|
-
|
|
251
|
+
Oe,
|
|
257
252
|
{
|
|
258
253
|
headers: me,
|
|
259
254
|
ariaLabel: o("DOCUMENTS_TABLE_HEADING"),
|
|
@@ -265,40 +260,40 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
265
260
|
renderCell: he,
|
|
266
261
|
className: s.documentsTableBody,
|
|
267
262
|
dataTestId: "documents-table",
|
|
268
|
-
pageSize:
|
|
263
|
+
pageSize: I,
|
|
269
264
|
totalItems: se,
|
|
270
|
-
page:
|
|
265
|
+
page: M,
|
|
271
266
|
onPageChange: de
|
|
272
267
|
}
|
|
273
268
|
) }),
|
|
274
|
-
|
|
275
|
-
|
|
269
|
+
m && r && /* @__PURE__ */ a(
|
|
270
|
+
we,
|
|
276
271
|
{
|
|
277
272
|
id: "modalIdForActionAreaLayout",
|
|
278
273
|
portalId: "main-display-area",
|
|
279
|
-
open:
|
|
274
|
+
open: m,
|
|
280
275
|
onRequestClose: re,
|
|
281
276
|
modalHeading: r.documentIdentifier,
|
|
282
277
|
passiveModal: !0,
|
|
283
278
|
size: "lg",
|
|
284
279
|
testId: "document-view-modal",
|
|
285
|
-
children: /* @__PURE__ */
|
|
280
|
+
children: /* @__PURE__ */ h("div", { className: s.documentViewerContainer, children: [
|
|
286
281
|
Y.length > 1 && /* @__PURE__ */ a(
|
|
287
|
-
|
|
282
|
+
Me,
|
|
288
283
|
{
|
|
289
284
|
kind: "tertiary",
|
|
290
285
|
size: "sm",
|
|
291
286
|
className: s.printAllButton,
|
|
292
287
|
renderIcon: w === "all" ? Z : J,
|
|
293
|
-
disabled: F || !
|
|
288
|
+
disabled: F || !j,
|
|
294
289
|
testId: "print-all-attachments",
|
|
295
|
-
onClick: () =>
|
|
290
|
+
onClick: () => K(Y, "all"),
|
|
296
291
|
children: o("DOCUMENTS_PRINT_ALL")
|
|
297
292
|
}
|
|
298
293
|
),
|
|
299
294
|
d.map((e, t) => {
|
|
300
|
-
const n = S(e.url), i = e.contentType?.toLowerCase().includes("pdf"), c = (e.contentType?.toLowerCase().includes("image") ?? !1) ||
|
|
301
|
-
return n === "#" || f ? /* @__PURE__ */
|
|
295
|
+
const n = S(e.url), i = e.contentType?.toLowerCase().includes("pdf"), c = (e.contentType?.toLowerCase().includes("image") ?? !1) || nt.test(e.url ?? ""), f = N.has(t);
|
|
296
|
+
return n === "#" || f ? /* @__PURE__ */ h(
|
|
302
297
|
"div",
|
|
303
298
|
{
|
|
304
299
|
className: s.attachmentError,
|
|
@@ -312,13 +307,13 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
312
307
|
]
|
|
313
308
|
},
|
|
314
309
|
`${r.id}-${e.url}`
|
|
315
|
-
) : /* @__PURE__ */
|
|
310
|
+
) : /* @__PURE__ */ h(
|
|
316
311
|
"div",
|
|
317
312
|
{
|
|
318
313
|
className: s.attachmentItem,
|
|
319
314
|
"data-testid": `attachment-item-${t}`,
|
|
320
315
|
children: [
|
|
321
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ h("div", { className: s.attachmentHeader, children: [
|
|
322
317
|
d.length > 1 ? /* @__PURE__ */ a("p", { className: s.attachmentCounter, children: o("DOCUMENTS_ATTACHMENT_COUNTER", {
|
|
323
318
|
current: t + 1,
|
|
324
319
|
total: d.length
|
|
@@ -331,14 +326,14 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
331
326
|
label: o("DOCUMENTS_PRINT_ATTACHMENT", {
|
|
332
327
|
index: t + 1
|
|
333
328
|
}),
|
|
334
|
-
disabled: F || !
|
|
329
|
+
disabled: F || !j,
|
|
335
330
|
testId: `print-attachment-${t}`,
|
|
336
|
-
onClick: () =>
|
|
331
|
+
onClick: () => K([e], t),
|
|
337
332
|
children: w === t ? /* @__PURE__ */ a(Z, {}) : /* @__PURE__ */ a(J, {})
|
|
338
333
|
}
|
|
339
334
|
)
|
|
340
335
|
] }),
|
|
341
|
-
/* @__PURE__ */
|
|
336
|
+
/* @__PURE__ */ h("div", { className: s.attachmentContent, children: [
|
|
342
337
|
!L.has(t) && /* @__PURE__ */ a(
|
|
343
338
|
"div",
|
|
344
339
|
{
|
|
@@ -358,7 +353,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
358
353
|
src: n,
|
|
359
354
|
alt: r.documentIdentifier,
|
|
360
355
|
className: `${s.documentImage} ${L.has(t) ? "" : s.hiddenWhileLoading}`,
|
|
361
|
-
onLoad: () =>
|
|
356
|
+
onLoad: () => V(t),
|
|
362
357
|
onError: () => G(t)
|
|
363
358
|
}
|
|
364
359
|
) : /* @__PURE__ */ a(
|
|
@@ -367,7 +362,7 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
367
362
|
src: i ? `${n}#toolbar=0` : n,
|
|
368
363
|
className: `${s.documentIframe} ${L.has(t) ? "" : s.hiddenWhileLoading}`,
|
|
369
364
|
title: r.documentIdentifier,
|
|
370
|
-
onLoad: () =>
|
|
365
|
+
onLoad: () => V(t),
|
|
371
366
|
onError: () => G(t)
|
|
372
367
|
}
|
|
373
368
|
)
|
|
@@ -384,5 +379,5 @@ const ke = "DocumentsTable-module_documentsTableBody__6iR3w", Pe = "DocumentsTab
|
|
|
384
379
|
] });
|
|
385
380
|
};
|
|
386
381
|
export {
|
|
387
|
-
|
|
382
|
+
lt as default
|
|
388
383
|
};
|