@bahmni/admin-app 0.0.1-dev.425

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.
Files changed (39) hide show
  1. package/README.md +9 -0
  2. package/dist/AdminDashboard-CKp5AIY2.js +18 -0
  3. package/dist/App.d.ts +3 -0
  4. package/dist/App.d.ts.map +1 -0
  5. package/dist/CsvUpload-DDMjJOXS.js +23 -0
  6. package/dist/DocumentsTable-Dbzg_SOZ-Bo--HX5Q.js +227 -0
  7. package/dist/FormsTable-BMa68g2K-BbYGOrd9.js +272 -0
  8. package/dist/LNWAZHJI-ngL1wCVg.js +33 -0
  9. package/dist/MWZ6AO7Z-7nPYsaH0.js +42 -0
  10. package/dist/Observations-DxmGTSMO-aIGLeH7F.js +246 -0
  11. package/dist/YPM2AS64-C0KjQR2q.js +8975 -0
  12. package/dist/components/AdminLayout/AdminLayout.d.ts +7 -0
  13. package/dist/components/AdminLayout/AdminLayout.d.ts.map +1 -0
  14. package/dist/components/AdminLayout/index.d.ts +2 -0
  15. package/dist/components/AdminLayout/index.d.ts.map +1 -0
  16. package/dist/components/PrivilegeGuard/PrivilegeGuard.d.ts +34 -0
  17. package/dist/components/PrivilegeGuard/PrivilegeGuard.d.ts.map +1 -0
  18. package/dist/components/PrivilegeGuard/index.d.ts +2 -0
  19. package/dist/components/PrivilegeGuard/index.d.ts.map +1 -0
  20. package/dist/config/tanstackQuery.d.ts +3 -0
  21. package/dist/config/tanstackQuery.d.ts.map +1 -0
  22. package/dist/constants/app.d.ts +7 -0
  23. package/dist/constants/app.d.ts.map +1 -0
  24. package/dist/index-DsVrcxyU.js +199089 -0
  25. package/dist/index.css +1 -0
  26. package/dist/index.d.ts +2 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +4 -0
  29. package/dist/locales/locale_en.json +26 -0
  30. package/dist/locales/locale_es.json +26 -0
  31. package/dist/pages/AdminDashboard.d.ts +10 -0
  32. package/dist/pages/AdminDashboard.d.ts.map +1 -0
  33. package/dist/pages/CsvUpload.d.ts +3 -0
  34. package/dist/pages/CsvUpload.d.ts.map +1 -0
  35. package/dist/routes/index.d.ts +4 -0
  36. package/dist/routes/index.d.ts.map +1 -0
  37. package/dist/routes/model.d.ts +8 -0
  38. package/dist/routes/model.d.ts.map +1 -0
  39. package/package.json +31 -0
@@ -0,0 +1,7 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface AdminLayoutProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const AdminLayout: React.FC<AdminLayoutProps>;
6
+ export {};
7
+ //# sourceMappingURL=AdminLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AdminLayout.d.ts","sourceRoot":"","sources":["../../../src/components/AdminLayout/AdminLayout.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAC;AAGlD,UAAU,gBAAgB;IACxB,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA4BlD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { AdminLayout } from './AdminLayout';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/AdminLayout/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ interface PrivilegeGuardProps {
3
+ children: ReactNode;
4
+ }
5
+ /**
6
+ * Guards admin routes behind the `app:admin` privilege.
7
+ *
8
+ * `useUserPrivilege()` starts with `isLoading === false` and
9
+ * `userPrivileges === null` on first render — `isLoading` only flips to
10
+ * `true` inside the provider's mount effect, which runs after the first
11
+ * paint. So on that first frame `isLoading` is false and `userPrivileges`
12
+ * is null; `hasPrivilege` treats `null` as "no privileges", so gating on
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`.
16
+ *
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.
22
+ *
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.
31
+ */
32
+ export declare const PrivilegeGuard: React.FC<PrivilegeGuardProps>;
33
+ export {};
34
+ //# sourceMappingURL=PrivilegeGuard.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,2 @@
1
+ export { PrivilegeGuard } from './PrivilegeGuard';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PrivilegeGuard/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { QueryClientConfig } from '@tanstack/react-query';
2
+ export declare const queryClientConfig: QueryClientConfig;
3
+ //# sourceMappingURL=tanstackQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tanstackQuery.d.ts","sourceRoot":"","sources":["../../src/config/tanstackQuery.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,eAAO,MAAM,iBAAiB,EAAE,iBAe/B,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const BAHMNI_ADMIN_NAMESPACE = "admin";
2
+ export declare const ADMIN_PRIVILEGE = "app:admin";
3
+ /** Extension point the admin dashboard tiles are configured under. */
4
+ export declare const ADMIN_EXTENSION_POINT = "org.bahmni.admin.dashboard";
5
+ /** Config directory under /bahmni_config/openmrs/apps that holds those tiles. */
6
+ export declare const ADMIN_CONFIG_APP = "admin";
7
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/constants/app.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,UAAU,CAAC;AAE9C,eAAO,MAAM,eAAe,cAAc,CAAC;AAE3C,sEAAsE;AACtE,eAAO,MAAM,qBAAqB,+BAA+B,CAAC;AAElE,iFAAiF;AACjF,eAAO,MAAM,gBAAgB,UAAU,CAAC"}