@bahmni/reports-app 0.0.1-dev.459 → 0.0.1-dev.462
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-CIFLmXxN-BYCEhhS-.js → DocumentsTable-B1OOYRCh-9utSNHDL.js} +138 -143
- package/dist/{FormsTable-VESfRLut-B_HLahb5.js → FormsTable-B4yfF96D-h7cMM_3O.js} +90 -93
- package/dist/{LNWAZHJI-COkTViOA.js → LNWAZHJI-Bmp-3dDF.js} +2 -2
- package/dist/{MWZ6AO7Z-D_8OX56z.js → MWZ6AO7Z-CtJl4sZn.js} +2 -2
- package/dist/{Observations-D8l6VsZ7-CB4s617A.js → Observations-TvRbwiDc-CW59OoNX.js} +27 -27
- package/dist/{ReportsPage-DI_wB8eD.js → ReportsPage-Cg3ZOOPD.js} +35 -35
- package/dist/{YPM2AS64-B-FqchYW.js → YPM2AS64-DUGB6Q1i.js} +1 -1
- package/dist/{index-CakdCXWR.js → index-By5r-Flz.js} +28956 -29029
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as r, jsxs as S, Fragment as K } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { X as de, Y as me, _ as Se, $ as fe, a0 as Oe, a1 as ge, a2 as Pe, a3 as Ae, a4 as he, a5 as Re, a6 as Le, a as w, z as ce, a7 as De, a8 as q, a9 as Q, aa as X, ab as Ce, ac as be, ad as Ne, ae as Z, af as J, Z as ye, ag as Ie, ah as Me, ai as ee, aj as Fe, ak as te, al as Be, am as Ue, an as ve, ao as He, ap as ae, aq as Ye, ar as ne, as as we, at as xe } from "./index-By5r-Flz.js";
|
|
3
3
|
import { useQuery as _e } from "@tanstack/react-query";
|
|
4
4
|
import qe, { useCallback as W, useState as A, useEffect as ue, useMemo as x } from "react";
|
|
5
|
-
import { useLocation as Qe, useNavigate as
|
|
6
|
-
const
|
|
7
|
-
$schema:
|
|
5
|
+
import { useLocation as Qe, useNavigate as $e } from "react-router";
|
|
6
|
+
const Ge = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configuration", Xe = "object", je = { 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, We = {
|
|
7
|
+
$schema: Ge,
|
|
8
8
|
title: ke,
|
|
9
9
|
type: Xe,
|
|
10
10
|
properties: je,
|
|
@@ -57,20 +57,20 @@ const $e = "http://json-schema.org/draft-07/schema#", ke = "Reports App Configur
|
|
|
57
57
|
queryFn: () => de(Se, st),
|
|
58
58
|
retry: !1
|
|
59
59
|
}), re = Symbol.for("constructDateFrom");
|
|
60
|
-
function
|
|
60
|
+
function $(e, t) {
|
|
61
61
|
return typeof e == "function" ? e(t) : e && typeof e == "object" && re in e ? e[re](t) : e instanceof Date ? new e.constructor(t) : new Date(t);
|
|
62
62
|
}
|
|
63
63
|
function U(e, t) {
|
|
64
|
-
return
|
|
64
|
+
return $(e, e);
|
|
65
65
|
}
|
|
66
66
|
function it(e, t, a) {
|
|
67
67
|
const l = U(e);
|
|
68
|
-
return isNaN(t) ?
|
|
68
|
+
return isNaN(t) ? $(e, NaN) : (t && l.setDate(l.getDate() + t), l);
|
|
69
69
|
}
|
|
70
70
|
function lt(e, t, a) {
|
|
71
71
|
const l = U(e);
|
|
72
|
-
if (isNaN(t)) return
|
|
73
|
-
const o = l.getDate(), s =
|
|
72
|
+
if (isNaN(t)) return $(e, NaN);
|
|
73
|
+
const o = l.getDate(), s = $(e, l.getTime());
|
|
74
74
|
s.setMonth(l.getMonth() + t + 1, 0);
|
|
75
75
|
const _ = s.getDate();
|
|
76
76
|
return o >= _ ? s : (l.setFullYear(
|
|
@@ -264,7 +264,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
264
264
|
(T, B) => o(T, { defaultValue: T, ...B })
|
|
265
265
|
);
|
|
266
266
|
return { filters: i, validationErr: d };
|
|
267
|
-
},
|
|
267
|
+
}, I = (n, i) => {
|
|
268
268
|
if (i.format === "CUSTOM EXCEL") {
|
|
269
269
|
const d = a.find((T) => T !== "CUSTOM EXCEL") ?? null;
|
|
270
270
|
f(n, {
|
|
@@ -272,7 +272,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
272
272
|
templateLocation: null
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
|
-
},
|
|
275
|
+
}, M = (n) => {
|
|
276
276
|
const { filters: i, validationErr: d } = v(n);
|
|
277
277
|
return d ? (s({
|
|
278
278
|
title: o("REPORTS_VALIDATION_ERROR_TITLE"),
|
|
@@ -293,7 +293,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
293
293
|
updateRow: f,
|
|
294
294
|
clearRowFieldError: C,
|
|
295
295
|
handleRunReport: (n) => {
|
|
296
|
-
const i =
|
|
296
|
+
const i = M(n);
|
|
297
297
|
if (!i) return;
|
|
298
298
|
if (P(n.id), !_(
|
|
299
299
|
n,
|
|
@@ -310,12 +310,12 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
310
310
|
});
|
|
311
311
|
return;
|
|
312
312
|
}
|
|
313
|
-
|
|
313
|
+
I(n.id, i), setTimeout(() => {
|
|
314
314
|
P((T) => T === n.id ? null : T);
|
|
315
315
|
}, 300);
|
|
316
316
|
},
|
|
317
317
|
handleQueueReport: async (n) => {
|
|
318
|
-
const i =
|
|
318
|
+
const i = M(n);
|
|
319
319
|
if (!i) return;
|
|
320
320
|
N(n.id);
|
|
321
321
|
const d = await E(
|
|
@@ -338,7 +338,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
338
338
|
title: o("REPORTS_QUEUE_SUCCESS_TITLE"),
|
|
339
339
|
message: o("REPORTS_QUEUE_SUCCESS_MESSAGE", { reportName: n.name }),
|
|
340
340
|
type: "success"
|
|
341
|
-
}),
|
|
341
|
+
}), I(n.id, i);
|
|
342
342
|
},
|
|
343
343
|
handleTemplateUpload: async (n, i) => {
|
|
344
344
|
R(n.id);
|
|
@@ -358,7 +358,7 @@ 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", 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",
|
|
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
363
|
table: ht,
|
|
364
364
|
actionsColumn: Lt,
|
|
@@ -367,7 +367,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
367
367
|
formatColumn: bt,
|
|
368
368
|
nameColumnWide: Nt,
|
|
369
369
|
preconfiguredTemplateLabel: yt,
|
|
370
|
-
emptyState:
|
|
370
|
+
emptyState: It
|
|
371
371
|
}, z = qe.memo(
|
|
372
372
|
({
|
|
373
373
|
reports: e,
|
|
@@ -419,7 +419,7 @@ 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 = h(R.id),
|
|
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(
|
|
@@ -498,7 +498,7 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
500
|
),
|
|
501
|
-
|
|
501
|
+
I && (M ? /* @__PURE__ */ r(
|
|
502
502
|
"p",
|
|
503
503
|
{
|
|
504
504
|
className: O.preconfiguredTemplateLabel,
|
|
@@ -563,8 +563,8 @@ const ut = (e, t) => t ? ge(e, t) : !0, Tt = (e, t) => e.filter(
|
|
|
563
563
|
}
|
|
564
564
|
);
|
|
565
565
|
z.displayName = "ReportsTable";
|
|
566
|
-
const
|
|
567
|
-
reportList:
|
|
566
|
+
const Mt = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWidth__p10hj", Bt = "ReportList-module_emptyState__0xMZ9", G = {
|
|
567
|
+
reportList: Mt,
|
|
568
568
|
fullWidth: Ft,
|
|
569
569
|
emptyState: Bt
|
|
570
570
|
}, Ut = "TableFilters-module_filtersContainer__k61FE", vt = "TableFilters-module_filtersTitle__fAhZr", Ht = "TableFilters-module_filtersRow__nM3k-", Yt = "TableFilters-module_divider__r8vOx", wt = "TableFilters-module_buttonsRow__otqUJ", H = {
|
|
@@ -688,10 +688,10 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
688
688
|
) : [], [o, t]), f = x(
|
|
689
689
|
() => pt(E?.config?.supportedFormats),
|
|
690
690
|
[E]
|
|
691
|
-
), C = E?.config?.paperSize, y = E?.config?.enableReportQueue ?? !1, { dateRangeReports: v, noDateRangeReports:
|
|
691
|
+
), C = E?.config?.paperSize, y = E?.config?.enableReportQueue ?? !1, { dateRangeReports: v, noDateRangeReports: I } = x(
|
|
692
692
|
() => Et(m),
|
|
693
693
|
[m]
|
|
694
|
-
),
|
|
694
|
+
), M = () => {
|
|
695
695
|
R((g) => ({
|
|
696
696
|
startDate: p,
|
|
697
697
|
endDate: D,
|
|
@@ -702,11 +702,11 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
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,
|
|
706
706
|
{
|
|
707
707
|
id: "reports-config-loading",
|
|
708
708
|
testId: "reports-config-loading",
|
|
709
|
-
className:
|
|
709
|
+
className: G.fullWidth,
|
|
710
710
|
type: "multi"
|
|
711
711
|
}
|
|
712
712
|
) : _ ? null : !o || m.length === 0 ? /* @__PURE__ */ r(
|
|
@@ -714,7 +714,7 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
714
714
|
{
|
|
715
715
|
id: "reports-empty-state",
|
|
716
716
|
"data-testid": "reports-empty-state",
|
|
717
|
-
className:
|
|
717
|
+
className: G.emptyState,
|
|
718
718
|
children: e("REPORTS_EMPTY_STATE_MESSAGE")
|
|
719
719
|
}
|
|
720
720
|
) : /* @__PURE__ */ S(
|
|
@@ -722,7 +722,7 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
722
722
|
{
|
|
723
723
|
id: "report-list",
|
|
724
724
|
"data-testid": "report-list",
|
|
725
|
-
className:
|
|
725
|
+
className: G.reportList,
|
|
726
726
|
children: [
|
|
727
727
|
/* @__PURE__ */ r(
|
|
728
728
|
xt,
|
|
@@ -737,10 +737,10 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
737
737
|
onFormatChange: P,
|
|
738
738
|
onPresetChange: N,
|
|
739
739
|
onReset: F,
|
|
740
|
-
onApply:
|
|
740
|
+
onApply: M
|
|
741
741
|
}
|
|
742
742
|
),
|
|
743
|
-
/* @__PURE__ */ S(
|
|
743
|
+
/* @__PURE__ */ S(Me, { align: "start", children: [
|
|
744
744
|
/* @__PURE__ */ r(
|
|
745
745
|
ee,
|
|
746
746
|
{
|
|
@@ -768,7 +768,7 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
768
768
|
children: /* @__PURE__ */ r(
|
|
769
769
|
z,
|
|
770
770
|
{
|
|
771
|
-
reports:
|
|
771
|
+
reports: I,
|
|
772
772
|
appliedFilters: L,
|
|
773
773
|
availableFormats: f,
|
|
774
774
|
defaultPaperSize: C,
|
|
@@ -781,17 +781,17 @@ const It = "ReportList-module_reportList__tPpsJ", Ft = "ReportList-module_fullWi
|
|
|
781
781
|
]
|
|
782
782
|
}
|
|
783
783
|
);
|
|
784
|
-
}, Qt = "ReportsPage-module_page__ewRXe",
|
|
784
|
+
}, Qt = "ReportsPage-module_page__ewRXe", $t = "ReportsPage-module_panel__HFBCt", k = {
|
|
785
785
|
page: Qt,
|
|
786
|
-
panel:
|
|
787
|
-
}, le = 1,
|
|
788
|
-
const { t: e } = w(), t = Qe(), a =
|
|
786
|
+
panel: $t
|
|
787
|
+
}, le = 1, Gt = 0, Vt = () => {
|
|
788
|
+
const { t: e } = w(), t = Qe(), a = $e(), l = x(
|
|
789
789
|
() => [
|
|
790
790
|
{ id: "home", label: e("REPORTS_HOME_LABEL"), href: Fe },
|
|
791
791
|
{ id: "reports", label: e("REPORTS_LABEL"), isCurrentPage: !0 }
|
|
792
792
|
],
|
|
793
793
|
[e]
|
|
794
|
-
), o = t.pathname === te ? le :
|
|
794
|
+
), o = t.pathname === te ? le : Gt, s = W(
|
|
795
795
|
({ selectedIndex: _ }) => {
|
|
796
796
|
a(
|
|
797
797
|
_ === le ? te : Be
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ax as we, ay as z, az as xt, aA as B, av as q, aw as y, aB as Ro, aC as ye, aD as R, aE as _, aF as k, aG as N, aH as A, aI as bs, aJ as ir, aK as $e, aL as U, aM as Hn, aN as Vn, aO as dt, aP as D, aQ as xs, aR as cn, aS as Be, aT as ws, aU as qt, aV as zt, aW as $s, aX as Cs, aY as $n, aZ as Ss, a_ as Nr, a$ as Bt, b0 as zo, b1 as ks, b2 as Es, b3 as j, b4 as Ur, b5 as Ms, b6 as Ds, b7 as sr, b8 as As, b9 as Ts, ba as zn, bb as Fs, bc as Is, bd as Z, be as Ps, bf as Ls } from "./index-By5r-Flz.js";
|
|
2
2
|
var Os = (e) => e != null, qs = (e) => e.filter(Os);
|
|
3
3
|
function _s(e) {
|
|
4
4
|
return (...t) => {
|