@bahmni/reports-app 0.0.1-dev.456 → 0.0.1-dev.457
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-CIA5vIKF-CVrLUp5Y.js → DocumentsTable-BY19cMyH-C_hDo9LW.js} +61 -61
- package/dist/{FormsTable-CNZ9uLEn-DyvUJx9E.js → FormsTable-D04JNgYd-DHkJQESF.js} +62 -62
- package/dist/{LNWAZHJI-BV9OuY8B.js → LNWAZHJI-Dp9-DjTn.js} +2 -2
- package/dist/{MWZ6AO7Z-DZrPc2nb.js → MWZ6AO7Z-DCN3dl79.js} +2 -2
- package/dist/{Observations-DrtP4xat-BdOHJEk6.js → Observations-B0V1ebXI-M-Exclxs.js} +20 -20
- package/dist/{ReportsPage-COf6FbtZ.js → ReportsPage-DHGuOQY_.js} +39 -39
- package/dist/{YPM2AS64-CFVt--4j.js → YPM2AS64-Dx-EiwQF.js} +1 -1
- package/dist/{index-DlwV4zZm.js → index-D-SD6TFa.js} +17393 -17380
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as r, jsxs as S, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { F as de, G as me, L as Se, O as fe, Q as Oe, V as ge, a0 as Pe, a1 as Ae, a2 as he, a3 as Re, a4 as Le, u as w, z as ce, a5 as De, a6 as q, a7 as Q, a8 as j, a9 as Ce, aa as be, ab as Ne, ac as J, ad as Z, Z as ye, ae as Ie, af as Me, ag as ee, ah as Fe, ai as te, aj as Be, ak as Ue, al as ve, am as He, an as ae, ao as Ye, ap as ne, aq as we, ar as xe } from "./index-D-SD6TFa.js";
|
|
3
3
|
import qe, { useCallback as V, useState as A, useEffect as _e, useMemo as x } from "react";
|
|
4
4
|
import { useQuery as ue } from "@tanstack/react-query";
|
|
5
5
|
import { useLocation as Qe, useNavigate as Ge } from "react-router-dom";
|
|
6
|
-
const $e = "http://json-schema.org/draft-07/schema#",
|
|
6
|
+
const $e = "http://json-schema.org/draft-07/schema#", Xe = "Reports App Configuration", je = "object", ke = { config: { type: "object", properties: { supportedFormats: { type: "array", items: { type: "string" }, description: "List of supported report formats" }, paperSize: { type: "string", description: "Default paper size for generated reports (e.g., A4)" }, enableReportQueue: { type: "boolean", description: "Whether reports can be queued (run asynchronously) in addition to running immediately" } }, additionalProperties: !0 } }, ze = !0, Ve = {
|
|
7
7
|
$schema: $e,
|
|
8
|
-
title:
|
|
9
|
-
type:
|
|
10
|
-
properties:
|
|
8
|
+
title: Xe,
|
|
9
|
+
type: je,
|
|
10
|
+
properties: ke,
|
|
11
11
|
additionalProperties: ze
|
|
12
12
|
}, We = {
|
|
13
13
|
PDF: "REPORTS_FORMAT_PDF",
|
|
@@ -128,7 +128,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
128
128
|
default:
|
|
129
129
|
return [new Date(t), new Date(t)];
|
|
130
130
|
}
|
|
131
|
-
}, Ee = (e) => (t) => t ? e(We[t]) : "",
|
|
131
|
+
}, Ee = (e) => (t) => t ? e(We[t]) : "", k = (e, t) => t ?? e.config?.macroTemplatePath ?? null, St = (e, t) => {
|
|
132
132
|
const {
|
|
133
133
|
report: a,
|
|
134
134
|
requiresDateRange: l,
|
|
@@ -137,7 +137,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
137
137
|
endDate: _,
|
|
138
138
|
templateLocation: E
|
|
139
139
|
} = e;
|
|
140
|
-
return o ? o === "CUSTOM EXCEL" && !
|
|
140
|
+
return o ? o === "CUSTOM EXCEL" && !k(a, E) ? {
|
|
141
141
|
field: "format",
|
|
142
142
|
message: t("REPORTS_MISSING_TEMPLATE_ERROR", {
|
|
143
143
|
reportName: a.name
|
|
@@ -178,7 +178,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
178
178
|
if (!e?.username)
|
|
179
179
|
return console.error("Error queueing report: no current user"), !1;
|
|
180
180
|
try {
|
|
181
|
-
return await
|
|
181
|
+
return await he({
|
|
182
182
|
reportName: a.name,
|
|
183
183
|
reportFormat: l,
|
|
184
184
|
userName: e.username,
|
|
@@ -199,7 +199,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
199
199
|
}, gt = () => ({ runReport: V(
|
|
200
200
|
(t, a, l, o, s, _) => {
|
|
201
201
|
try {
|
|
202
|
-
const E =
|
|
202
|
+
const E = Le(
|
|
203
203
|
t.name,
|
|
204
204
|
a,
|
|
205
205
|
l,
|
|
@@ -218,17 +218,17 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
218
218
|
},
|
|
219
219
|
[]
|
|
220
220
|
) }), Pt = (e, t, a, l) => {
|
|
221
|
-
const { t: o } = w(), { addNotification: s } = ce(), { runReport: _ } = gt(), { queueReport: E } = Ot(), [p,
|
|
221
|
+
const { t: o } = w(), { addNotification: s } = ce(), { runReport: _ } = gt(), { queueReport: E } = Ot(), [p, h] = A({}), [D, c] = A({}), [u, P] = A(null), [b, N] = A(null), [L, R] = A(
|
|
222
222
|
null
|
|
223
223
|
);
|
|
224
224
|
_e(() => {
|
|
225
|
-
|
|
225
|
+
h({}), c({});
|
|
226
226
|
}, [t.version]);
|
|
227
227
|
const m = (n) => p[n] ?? {
|
|
228
228
|
startDate: t.startDate,
|
|
229
229
|
endDate: t.endDate,
|
|
230
230
|
format: t.format
|
|
231
|
-
}, f = (n, i) =>
|
|
231
|
+
}, f = (n, i) => h((d) => ({
|
|
232
232
|
...d,
|
|
233
233
|
[n]: { ...m(n), ...i }
|
|
234
234
|
})), C = (n, i) => c((d) => {
|
|
@@ -289,7 +289,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
289
289
|
errors: (n) => D[n],
|
|
290
290
|
isRunning: (n) => u === n,
|
|
291
291
|
isQueuing: (n) => b === n,
|
|
292
|
-
isUploadingTemplate: (n) =>
|
|
292
|
+
isUploadingTemplate: (n) => L === n,
|
|
293
293
|
updateRow: f,
|
|
294
294
|
clearRowFieldError: C,
|
|
295
295
|
handleRunReport: (n) => {
|
|
@@ -301,7 +301,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
301
301
|
i.startDate,
|
|
302
302
|
i.endDate,
|
|
303
303
|
l,
|
|
304
|
-
|
|
304
|
+
k(n, i.templateLocation)
|
|
305
305
|
)) {
|
|
306
306
|
P(null), s({
|
|
307
307
|
title: o("REPORTS_ERROR_TITLE"),
|
|
@@ -324,7 +324,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
324
324
|
i.startDate,
|
|
325
325
|
i.endDate,
|
|
326
326
|
l,
|
|
327
|
-
|
|
327
|
+
k(n, i.templateLocation)
|
|
328
328
|
);
|
|
329
329
|
if (N((T) => T === n.id ? null : T), !d) {
|
|
330
330
|
s({
|
|
@@ -358,10 +358,10 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
}, At = "ReportsTable-module_tableContainer__-0YY7",
|
|
361
|
+
}, At = "ReportsTable-module_tableContainer__-0YY7", ht = "ReportsTable-module_table__4ySYm", Lt = "ReportsTable-module_actionsColumn__Haj2L", Dt = "ReportsTable-module_nameColumn__BXFAo", Ct = "ReportsTable-module_dateColumn__zPT-K", bt = "ReportsTable-module_formatColumn__J0nQX", Nt = "ReportsTable-module_nameColumnWide__9NELB", yt = "ReportsTable-module_preconfiguredTemplateLabel__caPze", It = "ReportsTable-module_emptyState__nMhOo", O = {
|
|
362
362
|
tableContainer: At,
|
|
363
|
-
table:
|
|
364
|
-
actionsColumn:
|
|
363
|
+
table: ht,
|
|
364
|
+
actionsColumn: Lt,
|
|
365
365
|
nameColumn: Dt,
|
|
366
366
|
dateColumn: Ct,
|
|
367
367
|
formatColumn: bt,
|
|
@@ -380,7 +380,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
380
380
|
rowFilters: _,
|
|
381
381
|
errors: E,
|
|
382
382
|
isRunning: p,
|
|
383
|
-
isQueuing:
|
|
383
|
+
isQueuing: h,
|
|
384
384
|
isUploadingTemplate: D,
|
|
385
385
|
updateRow: c,
|
|
386
386
|
clearRowFieldError: u,
|
|
@@ -395,7 +395,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
395
395
|
);
|
|
396
396
|
if (e.length === 0)
|
|
397
397
|
return /* @__PURE__ */ r("div", { className: O.emptyState, "data-testid": "reports-table-empty", children: s("REPORTS_NO_REPORTS_IN_SECTION") });
|
|
398
|
-
const
|
|
398
|
+
const L = e.some(Y);
|
|
399
399
|
return /* @__PURE__ */ r("div", { className: O.tableContainer, children: /* @__PURE__ */ S(
|
|
400
400
|
"table",
|
|
401
401
|
{
|
|
@@ -407,11 +407,11 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
407
407
|
/* @__PURE__ */ r(
|
|
408
408
|
"th",
|
|
409
409
|
{
|
|
410
|
-
className:
|
|
410
|
+
className: L ? O.nameColumn : O.nameColumnWide,
|
|
411
411
|
children: s("REPORTS_NAME_HEADER")
|
|
412
412
|
}
|
|
413
413
|
),
|
|
414
|
-
|
|
414
|
+
L && /* @__PURE__ */ S(K, { children: [
|
|
415
415
|
/* @__PURE__ */ r("th", { className: O.dateColumn, children: s("REPORTS_START_DATE_LABEL") }),
|
|
416
416
|
/* @__PURE__ */ r("th", { className: O.dateColumn, children: s("REPORTS_END_DATE_LABEL") })
|
|
417
417
|
] }),
|
|
@@ -419,17 +419,17 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
419
419
|
/* @__PURE__ */ r("th", { className: O.actionsColumn, children: s("REPORTS_ACTIONS_HEADER") })
|
|
420
420
|
] }) }),
|
|
421
421
|
/* @__PURE__ */ r("tbody", { children: e.map((R) => {
|
|
422
|
-
const m = _(R.id), f = E(R.id), C = Y(R), y = p(R.id), v =
|
|
422
|
+
const m = _(R.id), f = E(R.id), C = Y(R), y = p(R.id), v = h(R.id), I = m.format === "CUSTOM EXCEL", M = !!R.config?.macroTemplatePath;
|
|
423
423
|
let F = "edit";
|
|
424
424
|
return D(R.id) ? F = "uploading" : m.templateLocation && (F = "complete"), /* @__PURE__ */ S("tr", { children: [
|
|
425
425
|
/* @__PURE__ */ r(
|
|
426
426
|
"td",
|
|
427
427
|
{
|
|
428
|
-
className:
|
|
428
|
+
className: L ? O.nameColumn : O.nameColumnWide,
|
|
429
429
|
children: R.name
|
|
430
430
|
}
|
|
431
431
|
),
|
|
432
|
-
|
|
432
|
+
L && /* @__PURE__ */ S(K, { children: [
|
|
433
433
|
/* @__PURE__ */ r("td", { children: C && /* @__PURE__ */ r(
|
|
434
434
|
q,
|
|
435
435
|
{
|
|
@@ -482,7 +482,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
482
482
|
] }),
|
|
483
483
|
/* @__PURE__ */ S("td", { children: [
|
|
484
484
|
/* @__PURE__ */ r(
|
|
485
|
-
|
|
485
|
+
j,
|
|
486
486
|
{
|
|
487
487
|
id: `row-format-${R.id}`,
|
|
488
488
|
titleText: s("REPORTS_FORMAT_LABEL"),
|
|
@@ -583,7 +583,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
583
583
|
onEndDateChange: _,
|
|
584
584
|
onFormatChange: E,
|
|
585
585
|
onPresetChange: p,
|
|
586
|
-
onReset:
|
|
586
|
+
onReset: h,
|
|
587
587
|
onApply: D
|
|
588
588
|
}) => {
|
|
589
589
|
const { t: c } = w();
|
|
@@ -591,7 +591,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
591
591
|
/* @__PURE__ */ r("h2", { className: H.filtersTitle, children: c("REPORTS_FILTERS_LABEL") }),
|
|
592
592
|
/* @__PURE__ */ S("div", { className: H.filtersRow, children: [
|
|
593
593
|
/* @__PURE__ */ r(
|
|
594
|
-
|
|
594
|
+
j,
|
|
595
595
|
{
|
|
596
596
|
id: "date-range-preset",
|
|
597
597
|
titleText: c("REPORTS_SELECT_DATE_RANGE"),
|
|
@@ -647,7 +647,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
647
647
|
),
|
|
648
648
|
/* @__PURE__ */ r("span", { className: H.divider, "aria-hidden": "true" }),
|
|
649
649
|
/* @__PURE__ */ r(
|
|
650
|
-
|
|
650
|
+
j,
|
|
651
651
|
{
|
|
652
652
|
id: "filter-format",
|
|
653
653
|
titleText: c("REPORTS_FORMAT_LABEL"),
|
|
@@ -660,7 +660,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
660
660
|
)
|
|
661
661
|
] }),
|
|
662
662
|
/* @__PURE__ */ S("div", { className: H.buttonsRow, children: [
|
|
663
|
-
/* @__PURE__ */ r(Z, { kind: "tertiary", onClick:
|
|
663
|
+
/* @__PURE__ */ r(Z, { kind: "tertiary", onClick: h, children: c("REPORTS_RESET_BUTTON") }),
|
|
664
664
|
/* @__PURE__ */ r(Z, { kind: "primary", onClick: D, children: c("REPORTS_APPLY_BUTTON") })
|
|
665
665
|
] })
|
|
666
666
|
] });
|
|
@@ -682,7 +682,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
682
682
|
type: "error"
|
|
683
683
|
});
|
|
684
684
|
}, [_, l, e]);
|
|
685
|
-
const [p,
|
|
685
|
+
const [p, h] = A(null), [D, c] = A(null), [u, P] = A(null), [b, N] = A(null), [L, R] = A(ie), m = x(() => o ? Tt(
|
|
686
686
|
ft(o),
|
|
687
687
|
t
|
|
688
688
|
) : [], [o, t]), f = x(
|
|
@@ -699,7 +699,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
699
699
|
version: g.version + 1
|
|
700
700
|
}));
|
|
701
701
|
}, F = () => {
|
|
702
|
-
|
|
702
|
+
h(null), c(null), P(null), N(null), R((g) => ({ ...ie, version: g.version + 1 }));
|
|
703
703
|
};
|
|
704
704
|
return s || a ? /* @__PURE__ */ r(
|
|
705
705
|
Ie,
|
|
@@ -732,7 +732,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
732
732
|
format: u,
|
|
733
733
|
selectedPreset: b,
|
|
734
734
|
availableFormats: f,
|
|
735
|
-
onStartDateChange:
|
|
735
|
+
onStartDateChange: h,
|
|
736
736
|
onEndDateChange: c,
|
|
737
737
|
onFormatChange: P,
|
|
738
738
|
onPresetChange: N,
|
|
@@ -751,7 +751,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
751
751
|
z,
|
|
752
752
|
{
|
|
753
753
|
reports: v,
|
|
754
|
-
appliedFilters:
|
|
754
|
+
appliedFilters: L,
|
|
755
755
|
availableFormats: f,
|
|
756
756
|
defaultPaperSize: C,
|
|
757
757
|
enableReportQueue: y
|
|
@@ -769,7 +769,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
769
769
|
z,
|
|
770
770
|
{
|
|
771
771
|
reports: I,
|
|
772
|
-
appliedFilters:
|
|
772
|
+
appliedFilters: L,
|
|
773
773
|
availableFormats: f,
|
|
774
774
|
defaultPaperSize: C,
|
|
775
775
|
enableReportQueue: y
|
|
@@ -781,7 +781,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
781
781
|
]
|
|
782
782
|
}
|
|
783
783
|
);
|
|
784
|
-
}, Qt = "ReportsPage-module_page__ewRXe", Gt = "ReportsPage-module_panel__HFBCt",
|
|
784
|
+
}, Qt = "ReportsPage-module_page__ewRXe", Gt = "ReportsPage-module_panel__HFBCt", X = {
|
|
785
785
|
page: Qt,
|
|
786
786
|
panel: Gt
|
|
787
787
|
}, le = 1, $t = 0, Wt = () => {
|
|
@@ -823,7 +823,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
823
823
|
id: "reports-page",
|
|
824
824
|
"data-testid": "reports-page-test-id",
|
|
825
825
|
"aria-label": "Reports Page",
|
|
826
|
-
className:
|
|
826
|
+
className: X.page,
|
|
827
827
|
children: /* @__PURE__ */ S(ve, { selectedIndex: o, onChange: s, children: [
|
|
828
828
|
/* @__PURE__ */ S(
|
|
829
829
|
He,
|
|
@@ -860,7 +860,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
860
860
|
id: "reports-tab-panel",
|
|
861
861
|
"data-testid": "reports-tab-panel-test-id",
|
|
862
862
|
"aria-label": e("REPORTS_TAB_LABEL"),
|
|
863
|
-
className:
|
|
863
|
+
className: X.panel,
|
|
864
864
|
children: /* @__PURE__ */ r(qt, {})
|
|
865
865
|
}
|
|
866
866
|
),
|
|
@@ -870,7 +870,7 @@ const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
870
870
|
id: "my-reports-tab-panel",
|
|
871
871
|
"data-testid": "my-reports-tab-panel-test-id",
|
|
872
872
|
"aria-label": e("REPORTS_MY_REPORTS_TAB_LABEL"),
|
|
873
|
-
className:
|
|
873
|
+
className: X.panel,
|
|
874
874
|
children: /* @__PURE__ */ r("p", { children: e("REPORTS_MY_REPORTS_TAB_PLACEHOLDER") })
|
|
875
875
|
}
|
|
876
876
|
)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { av as we, aw as z, ax as xt, ay as B, at as q, au as y, az as Ro, aA as ye, aB as R, aC as _, aD as k, aE as N, aF as A, aG as bs, aH as ir, aI as $e, aJ as U, aK as Hn, aL as Vn, aM as dt, aN as D, aO as xs, aP as cn, aQ as Be, aR as ws, aS as qt, aT as zt, aU as $s, aV as Cs, aW as $n, aX as Ss, aY as Nr, aZ as Bt, a_ as zo, a$ as ks, b0 as Es, b1 as j, b2 as Ur, b3 as Ms, b4 as Ds, b5 as sr, b6 as As, b7 as Ts, b8 as zn, b9 as Fs, ba as Is, bb as Z, bc as Ps, bd as Ls } from "./index-
|
|
1
|
+
import { av as we, aw as z, ax as xt, ay as B, at as q, au as y, az as Ro, aA as ye, aB as R, aC as _, aD as k, aE as N, aF as A, aG as bs, aH as ir, aI as $e, aJ as U, aK as Hn, aL as Vn, aM as dt, aN as D, aO as xs, aP as cn, aQ as Be, aR as ws, aS as qt, aT as zt, aU as $s, aV as Cs, aW as $n, aX as Ss, aY as Nr, aZ as Bt, a_ as zo, a$ as ks, b0 as Es, b1 as j, b2 as Ur, b3 as Ms, b4 as Ds, b5 as sr, b6 as As, b7 as Ts, b8 as zn, b9 as Fs, ba as Is, bb as Z, bc as Ps, bd as Ls } from "./index-D-SD6TFa.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|