@bahmni/home-app 0.0.1-dev.419 → 0.0.1-dev.424
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-Cik3MQZO-Dm3XUZhh.js → DocumentsTable-UkcrH_C6-CEksDvZc.js} +15 -15
- package/dist/{FormsTable-BdcB_G8V-CdGCQGYS.js → FormsTable-DLTsXZ-p-B49_weN4.js} +54 -54
- package/dist/{LNWAZHJI-DiSuY7mL.js → LNWAZHJI-BFXKiH3d.js} +2 -2
- package/dist/{MWZ6AO7Z-CS4Dl9G-.js → MWZ6AO7Z-Bd8YYnc0.js} +2 -2
- package/dist/{Observations-f5ZvMmFn-CnAmTCcB.js → Observations-DLpjVw7J-_1qWqTqk.js} +40 -40
- package/dist/{YPM2AS64-slby2TrG.js → YPM2AS64-Mok3T3yn.js} +1 -1
- package/dist/{index-DoAb9JBc.js → index-BvDaGccW.js} +42432 -41840
- package/dist/index-tkFUyD6K.js +111 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/index-C1oXXeT2.js +0 -111
package/dist/index-C1oXXeT2.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as e, Fragment as b } from "react/jsx-runtime";
|
|
2
|
-
import { u as m, W as p, D as y, G as H, H as N, e as E, I as P, K as v, M as G, Q as f, U as L, X as O, Z as S } from "./index-DoAb9JBc.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { useQuery as T } from "@tanstack/react-query";
|
|
5
|
-
const C = "AppTile-module_tile__-CBFh", B = "AppTile-module_label__6vslD", M = "AppTile-module_bottom__lcJiG", d = {
|
|
6
|
-
tile: C,
|
|
7
|
-
label: B,
|
|
8
|
-
bottom: M
|
|
9
|
-
}, A = ({ id: r, label: n, icon: s, url: l }) => {
|
|
10
|
-
const { t } = m(), i = t(n);
|
|
11
|
-
return /* @__PURE__ */ c(
|
|
12
|
-
p,
|
|
13
|
-
{
|
|
14
|
-
href: l,
|
|
15
|
-
className: d.tile,
|
|
16
|
-
"aria-label": i,
|
|
17
|
-
testId: `app-tile-${r}`,
|
|
18
|
-
children: [
|
|
19
|
-
/* @__PURE__ */ e("h2", { className: d.label, "aria-hidden": "true", children: i }),
|
|
20
|
-
/* @__PURE__ */ c("div", { className: d.bottom, children: [
|
|
21
|
-
/* @__PURE__ */ e(y, { name: s, id: r, size: H.X2, "aria-hidden": "true" }),
|
|
22
|
-
/* @__PURE__ */ e(N, { size: 20, "aria-hidden": "true" })
|
|
23
|
-
] })
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
}, K = "HomePageGrid-module_container__Kxfim", k = "HomePageGrid-module_tileGrid__X6-Bm", x = "HomePageGrid-module_skeletonTile__U-1vu", F = "HomePageGrid-module_emptyState__xEwoK", I = "HomePageGrid-module_errorContainer__IKR3E", o = {
|
|
28
|
-
container: K,
|
|
29
|
-
tileGrid: k,
|
|
30
|
-
skeletonTile: x,
|
|
31
|
-
emptyState: F,
|
|
32
|
-
errorContainer: I
|
|
33
|
-
}, D = () => {
|
|
34
|
-
const { t: r } = m(), {
|
|
35
|
-
userPrivileges: n,
|
|
36
|
-
isLoading: s,
|
|
37
|
-
error: l
|
|
38
|
-
} = E(), t = n?.map((a) => a.name) ?? null, {
|
|
39
|
-
data: i = [],
|
|
40
|
-
isLoading: _,
|
|
41
|
-
isError: u,
|
|
42
|
-
refetch: h
|
|
43
|
-
} = T({
|
|
44
|
-
queryKey: ["home-modules", t],
|
|
45
|
-
queryFn: () => P("org.bahmni.home.dashboard", t),
|
|
46
|
-
enabled: !s && l === null && t !== null
|
|
47
|
-
});
|
|
48
|
-
return s || _ || t === null && !l ? /* @__PURE__ */ e(
|
|
49
|
-
"div",
|
|
50
|
-
{
|
|
51
|
-
className: o.container,
|
|
52
|
-
role: "status",
|
|
53
|
-
"aria-label": r("HOME_LOADING_MODULES"),
|
|
54
|
-
"aria-busy": "true",
|
|
55
|
-
children: /* @__PURE__ */ e("div", { className: o.tileGrid, children: Array.from(
|
|
56
|
-
{ length: v },
|
|
57
|
-
(a, g) => `skeleton-${g}`
|
|
58
|
-
).map((a) => /* @__PURE__ */ e(G, { className: o.skeletonTile }, a)) })
|
|
59
|
-
}
|
|
60
|
-
) : l || u ? /* @__PURE__ */ e(
|
|
61
|
-
"div",
|
|
62
|
-
{
|
|
63
|
-
className: o.errorContainer,
|
|
64
|
-
"data-testid": "home-error",
|
|
65
|
-
role: "alert",
|
|
66
|
-
children: /* @__PURE__ */ e(
|
|
67
|
-
f,
|
|
68
|
-
{
|
|
69
|
-
kind: "error",
|
|
70
|
-
lowContrast: !0,
|
|
71
|
-
subtitle: r("HOME_ERROR_FETCH_CONFIG"),
|
|
72
|
-
hideCloseButton: !1,
|
|
73
|
-
onClose: () => void h()
|
|
74
|
-
}
|
|
75
|
-
)
|
|
76
|
-
}
|
|
77
|
-
) : i.length === 0 ? /* @__PURE__ */ e("div", { className: o.emptyState, role: "status", children: r("HOME_NO_MODULES") }) : /* @__PURE__ */ e("div", { className: o.container, children: /* @__PURE__ */ e("div", { className: o.tileGrid, children: i.map((a) => /* @__PURE__ */ e(
|
|
78
|
-
A,
|
|
79
|
-
{
|
|
80
|
-
id: a.id,
|
|
81
|
-
label: a.translationKey ?? a.label,
|
|
82
|
-
icon: a.icon,
|
|
83
|
-
url: a.url
|
|
84
|
-
},
|
|
85
|
-
a.id
|
|
86
|
-
)) }) });
|
|
87
|
-
}, R = "HomePageHeader-module_locationSelector__foYmn", U = {
|
|
88
|
-
locationSelector: R
|
|
89
|
-
}, $ = () => {
|
|
90
|
-
const { t: r } = m();
|
|
91
|
-
return /* @__PURE__ */ e(
|
|
92
|
-
L,
|
|
93
|
-
{
|
|
94
|
-
ariaLabel: "Bahmni",
|
|
95
|
-
brandPrefix: r("HOME_LABEL"),
|
|
96
|
-
brandHref: "/",
|
|
97
|
-
globalFeatures: [
|
|
98
|
-
/* @__PURE__ */ e("div", { className: U.locationSelector, children: /* @__PURE__ */ e(S, {}) }, "location")
|
|
99
|
-
],
|
|
100
|
-
userMenu: /* @__PURE__ */ e(O, {})
|
|
101
|
-
}
|
|
102
|
-
);
|
|
103
|
-
}, q = "HomePage-module_homePageBody__0qtrS", j = {
|
|
104
|
-
homePageBody: q
|
|
105
|
-
}, W = () => /* @__PURE__ */ c(b, { children: [
|
|
106
|
-
/* @__PURE__ */ e($, {}),
|
|
107
|
-
/* @__PURE__ */ e("main", { className: j.homePageBody, children: /* @__PURE__ */ e(D, {}) })
|
|
108
|
-
] });
|
|
109
|
-
export {
|
|
110
|
-
W as HomePage
|
|
111
|
-
};
|