@bahmni/admin-app 0.0.1-dev.429 → 0.0.1-dev.431

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.
@@ -1,5 +1,5 @@
1
1
  import { jsx as e } from "react/jsx-runtime";
2
- import { B as o, E as a, G as s, I } from "./index-BtA9Tm0F.js";
2
+ import { B as o, E as a, G as s, I } from "./index-DAupO0TX.js";
3
3
  import "react";
4
4
  import "@tanstack/react-query";
5
5
  const i = () => /* @__PURE__ */ e(o, { children: /* @__PURE__ */ e(
package/dist/App.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAmBA,wBAAgB,GAAG,4CAyClB;AAED,eAAe,GAAG,CAAC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../src/App.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,GAAG,4CA2ClB;AAED,eAAe,GAAG,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as a, jsxs as e } from "react/jsx-runtime";
2
- import { u as d, B as o } from "./index-BtA9Tm0F.js";
2
+ import { u as d, B as o } from "./index-DAupO0TX.js";
3
3
  const t = "CsvUpload-module_page__AxMNv", i = {
4
4
  page: t
5
5
  }, n = () => {
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, jsxs as p, Fragment as Y } from "react/jsx-runtime";
2
- import { g as x, u as G, z as W, q as J, K as X, w as Z, Y as ee, p as te } from "./index-BtA9Tm0F.js";
2
+ import { g as x, u as G, z as W, q as J, K as X, w as Z, Y as ee, p as te } from "./index-DAupO0TX.js";
3
3
  import { useQuery as ae } from "@tanstack/react-query";
4
4
  import { useState as l, useCallback as h, useEffect as I, useMemo as _ } from "react";
5
5
  const ne = "DocumentsTable-module_documentsTableBody__6iR3w", oe = "DocumentsTable-module_viewAttachmentsLink__aQ1on", re = "DocumentsTable-module_documentViewerContainer__F5m8D", de = "DocumentsTable-module_attachmentItem__17KA7", se = "DocumentsTable-module_attachmentCounter__WFiI3", me = "DocumentsTable-module_attachmentError__RI4U2", ce = "DocumentsTable-module_documentIframe__ptq5I", le = "DocumentsTable-module_documentImage__KQVgS", d = {
@@ -1,5 +1,5 @@
1
1
  import { jsx as n, jsxs as V, Fragment as ne } from "react/jsx-runtime";
2
- import { u as ie, g as de, h as le, Z as me, y as ue, W as ce, e as fe, a as ye, m as ge, f as he, $ as pe, R as Ne, w as Te, C as q, H as $, K as Oe, Y as K, F as Ie, j as be, p as Ee, v as _e, d as Ae } from "./index-BtA9Tm0F.js";
2
+ import { u as ie, g as de, h as le, Z as me, y as ue, W as ce, e as fe, a as ye, m as ge, f as he, $ as pe, R as Ne, w as Te, C as q, H as $, K as Oe, Y as K, F as Ie, j as be, p as Ee, v as _e, d as Ae } from "./index-DAupO0TX.js";
3
3
  import { useQueryClient as ve, useQuery as E } from "@tanstack/react-query";
4
4
  import { useState as j, useMemo as i, useCallback as d } from "react";
5
5
  const Ce = "FormsTable-module_formsTableBody__SvGha", Fe = "FormsTable-module_modalHeading__wnTmA", Re = "FormsTable-module_customAccordianItem__isszs", p = {
@@ -1,5 +1,5 @@
1
- import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-BvuuNpyD.js";
2
- import { J as d, L as f, M as e } from "./index-BtA9Tm0F.js";
1
+ import { c, T as l, P as m, a as u, D as v, Q as i } from "./YPM2AS64-DgE_cB3c.js";
2
+ import { J as d, L as f, M as e } from "./index-DAupO0TX.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-BvuuNpyD.js";
2
- import { J as v, L as C, M as e } from "./index-BtA9Tm0F.js";
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-DgE_cB3c.js";
2
+ import { J as v, L as C, M as e } from "./index-DAupO0TX.js";
3
3
  var h = (t) => {
4
4
  const [r, o] = s({
5
5
  prefix: "TanstackQueryDevtools"
@@ -1,5 +1,5 @@
1
1
  import { jsxs as S, jsx as o } from "react/jsx-runtime";
2
- import { g as x, z as M, u as U, b as j, y as G, U as H, c as Y, m as J, t as P, o as W, r as X, n as Z, i as ee, Y as ae, Q as se, k as V, l as re, s as te, w as ie, x as ne, A as oe, S as de, D as le } from "./index-BtA9Tm0F.js";
2
+ import { g as x, z as M, u as U, b as j, y as G, U as H, c as Y, m as J, t as P, o as W, r as X, n as Z, i as ee, Y as ae, Q as se, k as V, l as re, s as te, w as ie, x as ne, A as oe, S as de, D as le } from "./index-DAupO0TX.js";
3
3
  import { useQueries as ce, useQuery as ue } from "@tanstack/react-query";
4
4
  import { useRef as me, useEffect as L, useMemo as E } from "react";
5
5
  const pe = "Observations-module_observations__RKSyo", be = "Observations-module_title__TJL3z", he = "Observations-module_wrapper__muk2L", ve = "Observations-module_secondary__14nuS", O = {
@@ -1,4 +1,4 @@
1
- import { N as we, O as z, P as xt, T as B, L as q, M as y, V as Ro, X as ye, _ as R, a0 as _, a1 as k, a2 as N, a3 as A, a4 as bs, a5 as ir, a6 as $e, a7 as U, a8 as Hn, a9 as Vn, aa as dt, ab as D, ac as xs, ad as cn, ae as Be, af as ws, ag as qt, ah as zt, ai as $s, aj as Cs, ak as $n, al as Ss, am as Nr, an as Bt, ao as zo, ap as ks, aq as Es, ar as j, as as Ur, at as Ms, au as Ds, av as sr, aw as As, ax as Ts, ay as zn, az as Fs, aA as Is, aB as Z, aC as Ps, aD as Ls } from "./index-BtA9Tm0F.js";
1
+ import { N as we, O as z, P as xt, T as B, L as q, M as y, V as Ro, X as ye, _ as R, a0 as _, a1 as k, a2 as N, a3 as A, a4 as bs, a5 as ir, a6 as $e, a7 as U, a8 as Hn, a9 as Vn, aa as dt, ab as D, ac as xs, ad as cn, ae as Be, af as ws, ag as qt, ah as zt, ai as $s, aj as Cs, ak as $n, al as Ss, am as Nr, an as Bt, ao as zo, ap as ks, aq as Es, ar as j, as as Ur, at as Ms, au as Ds, av as sr, aw as As, ax as Ts, ay as zn, az as Fs, aA as Is, aB as Z, aC as Ps, aD as Ls } from "./index-DAupO0TX.js";
2
2
  var Os = (e) => e != null, qs = (e) => e.filter(Os);
3
3
  function _s(e) {
4
4
  return (...t) => {
@@ -11,23 +11,30 @@ interface PrivilegeGuardProps {
11
11
  * paint. So on that first frame `isLoading` is false and `userPrivileges`
12
12
  * is null; `hasPrivilege` treats `null` as "no privileges", so gating on
13
13
  * `isLoading` alone would let every authorized admin hit the denial
14
- * screen for that frame. The loading branch therefore also checks
15
- * `userPrivileges === null` directly, independent of `isLoading`.
14
+ * screen for that frame. `isResolved` therefore also checks
15
+ * `userPrivileges !== null`, independent of `isLoading`.
16
16
  *
17
17
  * A failed privilege fetch (network error, 500) also leaves
18
- * `userPrivileges` `null`, but with `error` set — the `!error` clause
19
- * excludes that case from the loading branch so it falls through to the
20
- * authorization check below, which renders a distinct "couldn't verify
21
- * access" message instead of the misleading access-denied copy.
18
+ * `userPrivileges` `null`, but with `error` set — the `|| error` clause
19
+ * marks that case resolved too, so it falls through to a distinct
20
+ * "couldn't verify access" fallback instead of the misleading
21
+ * access-denied copy. That case doesn't raise a toast here:
22
+ * `UserPrivilegeProvider`'s catch block already surfaces one for the
23
+ * same failure, and stacking a second, differently-worded toast on top
24
+ * would be redundant.
22
25
  *
23
- * Denial renders in place rather than redirecting to home. Notification
24
- * state lives in each app's own `NotificationProvider`, so a message
25
- * raised here would be destroyed the moment a redirect unmounted the
26
- * admin app — leaving the user bounced with no explanation. Rendering the
27
- * message inside `AdminLayout` keeps it visible and keeps the `Home`
28
- * breadcrumb available as the way back. This mirrors the behaviour of the
29
- * legacy AngularJS admin module. Also it is consistent with the behaviour
30
- * of the appointments admin pages.
26
+ * Denial is surfaced as a top-right error toast — the same notification
27
+ * design used elsewhere in the app suite (e.g. registration's
28
+ * mandatory-field validation, clinical's dashboard load errors) — rather
29
+ * than a redirect, so the page stays mounted and the `Home` breadcrumb
30
+ * inside `AdminLayout` remains available as the way back.
31
+ *
32
+ * The toast has no timeout, so it can be dismissed manually; once it is,
33
+ * the visually-hidden fallback rendered alongside `AdminLayout` is the only
34
+ * remaining explanation. It therefore carries the full title and message
35
+ * (not just the title) and `role="status"`/`aria-live="polite"`, so it
36
+ * still functions — and gets announced to assistive tech — independent of
37
+ * whether the toast is still visible.
31
38
  */
32
39
  export declare const PrivilegeGuard: React.FC<PrivilegeGuardProps>;
33
40
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"PrivilegeGuard.d.ts","sourceRoot":"","sources":["../../../src/components/PrivilegeGuard/PrivilegeGuard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKzC,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAgDxD,CAAC"}
1
+ {"version":3,"file":"PrivilegeGuard.d.ts","sourceRoot":"","sources":["../../../src/components/PrivilegeGuard/PrivilegeGuard.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAa,MAAM,OAAO,CAAC;AAKpD,UAAU,mBAAmB;IAC3B,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8DxD,CAAC"}