@argusoft/medplat-core 1.0.29 → 1.0.30
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/AccessRights-xrday-L1.js +1023 -0
- package/dist/AccessRights-xrday-L1.js.map +1 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js +365 -0
- package/dist/AddEditQueryBuilder-D-iQiVIe.js.map +1 -0
- package/dist/{AddFeatures-v3TmGQee.js → AddFeatures-D1sU8RjY.js} +2 -2
- package/dist/{AddFeatures-v3TmGQee.js.map → AddFeatures-D1sU8RjY.js.map} +1 -1
- package/dist/AddLabelModal-Bq-wRqv9.js +631 -0
- package/dist/AddLabelModal-Bq-wRqv9.js.map +1 -0
- package/dist/{AddMenuConfiguration-Ce91MhnU.js → AddMenuConfiguration-e5BVXhmw.js} +2 -2
- package/dist/{AddMenuConfiguration-Ce91MhnU.js.map → AddMenuConfiguration-e5BVXhmw.js.map} +1 -1
- package/dist/AppModal-CCtrQ5Tr.js +394 -0
- package/dist/AppModal-CCtrQ5Tr.js.map +1 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js +387 -0
- package/dist/BrandsPage-DmRW5bhm-Bk1szrjI.js.map +1 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js +391 -0
- package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +1 -0
- package/dist/{ChangePasswordModalCore-DutQAZOx.js → ChangePasswordModalCore-BPsJquTS.js} +1606 -1611
- package/dist/ChangePasswordModalCore-BPsJquTS.js.map +1 -0
- package/dist/{ConditionConfig-B4Ffpgj3.js → ConditionConfig-Ddz9halE.js} +2 -2
- package/dist/{ConditionConfig-B4Ffpgj3.js.map → ConditionConfig-Ddz9halE.js.map} +1 -1
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js +435 -0
- package/dist/DashboardPage-C3bKc5na-sBd9Yqbi.js.map +1 -0
- package/dist/EventConfig-BmLemzX3.js +26 -0
- package/dist/EventConfig-BmLemzX3.js.map +1 -0
- package/dist/{EventConfigurations-BJcURufo.js → EventConfigurations-Bzh1qWXU.js} +31 -30
- package/dist/{EventConfigurations-BJcURufo.js.map → EventConfigurations-Bzh1qWXU.js.map} +1 -1
- package/dist/{EventsExceptionModal-BlZtBQoR.js → EventsExceptionModal-B2SRrnB1.js} +2 -2
- package/dist/{EventsExceptionModal-BlZtBQoR.js.map → EventsExceptionModal-B2SRrnB1.js.map} +1 -1
- package/dist/EventsSkeleton-BIcPks4T.js +61 -0
- package/dist/EventsSkeleton-BIcPks4T.js.map +1 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +79 -0
- package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +1 -0
- package/dist/FeatureMenu-DYJmDt7q.js +521 -0
- package/dist/FeatureMenu-DYJmDt7q.js.map +1 -0
- package/dist/{FhirServerList-Dkq7Kbes.js → FhirServerList-DuTwnngN.js} +19 -19
- package/dist/{FhirServerList-Dkq7Kbes.js.map → FhirServerList-DuTwnngN.js.map} +1 -1
- package/dist/{FhirServerWizard-Db6Hm4bQ.js → FhirServerWizard-DZI8Olku.js} +15 -15
- package/dist/{FhirServerWizard-Db6Hm4bQ.js.map → FhirServerWizard-DZI8Olku.js.map} +1 -1
- package/dist/FlywayQuery-CQygj51V.js +179 -0
- package/dist/FlywayQuery-CQygj51V.js.map +1 -0
- package/dist/GrantPermissionModal-BDN66Atn.js +236 -0
- package/dist/GrantPermissionModal-BDN66Atn.js.map +1 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +7639 -0
- package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +1 -0
- package/dist/ImmunizationConfigurationBase.css +1 -1
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js +369 -0
- package/dist/ImmunizationConfigurationsList-TZcLDEci.js.map +1 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +665 -0
- package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +1 -0
- package/dist/LanguagesModal-B3NTebYT.js +352 -0
- package/dist/LanguagesModal-B3NTebYT.js.map +1 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js +4475 -0
- package/dist/ManageDynamicFeature-BU0I45dd.js.map +1 -0
- package/dist/{ManageEventConfiguration-BpSJszSX.js → ManageEventConfiguration-CoYcpjR9.js} +465 -397
- package/dist/ManageEventConfiguration-CoYcpjR9.js.map +1 -0
- package/dist/{ManageNotification-CfhHlfxA.js → ManageNotification-C5MhV77Q.js} +2 -2
- package/dist/{ManageNotification-CfhHlfxA.js.map → ManageNotification-C5MhV77Q.js.map} +1 -1
- package/dist/{ManageRole-4Y2PP4dQ.js → ManageRole-CNZBRKGU.js} +2 -2
- package/dist/{ManageRole-4Y2PP4dQ.js.map → ManageRole-CNZBRKGU.js.map} +1 -1
- package/dist/ManageTranslation-vRiptUAP.js +833 -0
- package/dist/ManageTranslation-vRiptUAP.js.map +1 -0
- package/dist/ManageTranslation.css +1 -1
- package/dist/{ManageUser-DDzyd9jm.js → ManageUser-DCFkUMV9.js} +131 -131
- package/dist/{ManageUser-DDzyd9jm.js.map → ManageUser-DCFkUMV9.js.map} +1 -1
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js +272 -0
- package/dist/MemberProfileCard-BdUNgHRB-VywqQdFF.js.map +1 -0
- package/dist/MobileAnalytics-pQoE8cG1.js +16888 -0
- package/dist/MobileAnalytics-pQoE8cG1.js.map +1 -0
- package/dist/{MobileTypeEventConfigModal-DUkUYACe.js → MobileTypeEventConfigModal-BeveaX0C.js} +2 -2
- package/dist/{MobileTypeEventConfigModal-DUkUYACe.js.map → MobileTypeEventConfigModal-BeveaX0C.js.map} +1 -1
- package/dist/NotificationFlywayQuery-BAHVjf6N.js +247 -0
- package/dist/NotificationFlywayQuery-BAHVjf6N.js.map +1 -0
- package/dist/{NotificationList-BMFpNUJG.js → NotificationList-DEyRZEuM.js} +2 -2
- package/dist/{NotificationList-BMFpNUJG.js.map → NotificationList-DEyRZEuM.js.map} +1 -1
- package/dist/{OtherTypeEventConfigModal-CYBfr2XE.js → OtherTypeEventConfigModal-CM6VkdmY.js} +3 -3
- package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +1 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js +482 -0
- package/dist/PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map +1 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js +157 -0
- package/dist/PaymentsPage-BvPe5Q9F-D2gfziwW.js.map +1 -0
- package/dist/PermissionsModal-CCYkcKlC.js +151 -0
- package/dist/PermissionsModal-CCYkcKlC.js.map +1 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js +119 -0
- package/dist/PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map +1 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +783 -0
- package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +1 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js +818 -0
- package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +1 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +599 -0
- package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +1 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +1302 -0
- package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +1 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js +252 -0
- package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +1 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +648 -0
- package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +1 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js +1577 -0
- package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +1 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js +279 -0
- package/dist/PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map +1 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js +293 -0
- package/dist/PurchasesPage-It1GHiXl-eH4IsF_U.js.map +1 -0
- package/dist/QueryBuilder-CXaBe6sr.js +478 -0
- package/dist/QueryBuilder-CXaBe6sr.js.map +1 -0
- package/dist/{RoleManagement-DEiBNfT8.js → RoleManagement-s8iNx2Mu.js} +145 -155
- package/dist/RoleManagement-s8iNx2Mu.js.map +1 -0
- package/dist/Roles-BIyiic67.js +14 -0
- package/dist/Roles-BIyiic67.js.map +1 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js +544 -0
- package/dist/SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map +1 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js +315 -0
- package/dist/SalesPage-D18DCseD-BxktGDRQ.js.map +1 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +747 -0
- package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +1 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js +154 -0
- package/dist/ShowFlywayQuery-D10Olk5Z.js.map +1 -0
- package/dist/{ShowFlywayQuery-DVRCd384.js → ShowFlywayQuery-D1y_4A1u.js} +161 -121
- package/dist/ShowFlywayQuery-D1y_4A1u.js.map +1 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js +313 -0
- package/dist/ShowQueryHistory-DRBKYDKk.js.map +1 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js +721 -0
- package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +1 -0
- package/dist/SubMenu-eEDhZUvh.js +317 -0
- package/dist/SubMenu-eEDhZUvh.js.map +1 -0
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js +746 -0
- package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +1 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +315 -0
- package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +1 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +476 -0
- package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +1 -0
- package/dist/{TypeConfiguration-C3xoP2Nb.js → TypeConfiguration-3O6ABrK-.js} +2 -2
- package/dist/{TypeConfiguration-C3xoP2Nb.js.map → TypeConfiguration-3O6ABrK-.js.map} +1 -1
- package/dist/{UserList-Bc8gYxRL.js → UserList-DgPxsnj2.js} +253 -236
- package/dist/{UserList-Bc8gYxRL.js.map → UserList-DgPxsnj2.js.map} +1 -1
- package/dist/Users-Bpc4Sazd.js +41 -0
- package/dist/Users-Bpc4Sazd.js.map +1 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +321 -0
- package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +1 -0
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js +434 -0
- package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +1 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js +63 -0
- package/dist/format-UOyOu75i-D0GyylyQ.js.map +1 -0
- package/dist/index.css +1 -1
- package/dist/index.js +1 -1
- package/dist/index.lib-Dn8PMkeD.js +862 -0
- package/dist/index.lib-Dn8PMkeD.js.map +1 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js +28 -0
- package/dist/useFieldErrors-hDG8ox_x-DbSAzrGo.js.map +1 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js +125 -0
- package/dist/validation-BzlHnL-r-CCJm2utQ.js.map +1 -0
- package/package.json +4 -3
- package/dist/AccessRights-Zm8Obm4N.js +0 -1284
- package/dist/AccessRights-Zm8Obm4N.js.map +0 -1
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js +0 -313
- package/dist/AddEditQueryBuilder-Brdnm6rQ.js.map +0 -1
- package/dist/AddLabelModal-DFllBVcd.js +0 -734
- package/dist/AddLabelModal-DFllBVcd.js.map +0 -1
- package/dist/AppModal-CtG2GjD_.js +0 -428
- package/dist/AppModal-CtG2GjD_.js.map +0 -1
- package/dist/ChangePasswordModalCore-DutQAZOx.js.map +0 -1
- package/dist/EventsSkeleton-DK6JDKAK.js +0 -83
- package/dist/EventsSkeleton-DK6JDKAK.js.map +0 -1
- package/dist/FeatureMenu-C3503UIX.js +0 -265
- package/dist/FeatureMenu-C3503UIX.js.map +0 -1
- package/dist/FlywayQuery-Cx2sly6g.js +0 -169
- package/dist/FlywayQuery-Cx2sly6g.js.map +0 -1
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.js +0 -5895
- package/dist/ImmunizationConfigurationBase-DLQVSNnt.js.map +0 -1
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js +0 -344
- package/dist/ImmunizationConfigurationsList-DdSZicTP.js.map +0 -1
- package/dist/LanguagesModal-D6VfaGrl.js +0 -394
- package/dist/LanguagesModal-D6VfaGrl.js.map +0 -1
- package/dist/ManageDynamicFeature-dt096fyj.js +0 -4189
- package/dist/ManageDynamicFeature-dt096fyj.js.map +0 -1
- package/dist/ManageEventConfiguration-BpSJszSX.js.map +0 -1
- package/dist/ManageTranslation-B4C9-lWD.js +0 -625
- package/dist/ManageTranslation-B4C9-lWD.js.map +0 -1
- package/dist/NotificationFlywayQuery-BY8Zzml_.js +0 -244
- package/dist/NotificationFlywayQuery-BY8Zzml_.js.map +0 -1
- package/dist/OtherTypeEventConfigModal-CYBfr2XE.js.map +0 -1
- package/dist/QueryBuilder-z7eqfd7D.js +0 -383
- package/dist/QueryBuilder-z7eqfd7D.js.map +0 -1
- package/dist/RoleManagement-DEiBNfT8.js.map +0 -1
- package/dist/ShowFlywayQuery-DVRCd384.js.map +0 -1
- package/dist/ShowFlywayQuery-tj42YQAS.js +0 -130
- package/dist/ShowFlywayQuery-tj42YQAS.js.map +0 -1
- package/dist/ShowQueryHistory-BDN0tzHg.js +0 -190
- package/dist/ShowQueryHistory-BDN0tzHg.js.map +0 -1
- package/dist/SubMenu-B072oEGb.js +0 -191
- package/dist/SubMenu-B072oEGb.js.map +0 -1
- package/dist/Users-CsJ08Kjm.js +0 -40
- package/dist/Users-CsJ08Kjm.js.map +0 -1
- package/dist/index.lib-C3fwoM3y.js +0 -820
- package/dist/index.lib-C3fwoM3y.js.map +0 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { S as P, x as q } from "./ImmunizationConfigurationBase-Di1KO3oW.js";
|
|
2
|
+
import { useState as i, useEffect as g, useMemo as z } from "react";
|
|
3
|
+
import { jsx as p, jsxs as E, Fragment as F } from "react/jsx-runtime";
|
|
4
|
+
import { Autocomplete as S, TextField as j, CircularProgress as v } from "@mui/material";
|
|
5
|
+
function $({ value: t, onChange: s, label: y = "Facility", required: x = !1, disabled: T = !1, error: O = !1, helperText: b = "", onBlur: C, size: w = "small", fullWidth: A = !0 }) {
|
|
6
|
+
let [u, c] = i(!1), [n, m] = i([]), [d, h] = i(!1), [f, I] = i(!1), [l, o] = i(null);
|
|
7
|
+
return g(() => {
|
|
8
|
+
if (!t) {
|
|
9
|
+
o(null);
|
|
10
|
+
return;
|
|
11
|
+
}
|
|
12
|
+
if ((l == null ? void 0 : l.id) === t) return;
|
|
13
|
+
let e = n.find((a) => a.id === t);
|
|
14
|
+
if (e) {
|
|
15
|
+
o(e);
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
let r = !1;
|
|
19
|
+
return (async () => {
|
|
20
|
+
try {
|
|
21
|
+
let a = await P([t]);
|
|
22
|
+
!r && a[0] && o(a[0]);
|
|
23
|
+
} catch {
|
|
24
|
+
}
|
|
25
|
+
})(), () => {
|
|
26
|
+
r = !0;
|
|
27
|
+
};
|
|
28
|
+
}, [t]), g(() => {
|
|
29
|
+
if (!u || f) return;
|
|
30
|
+
let e = !1;
|
|
31
|
+
return h(!0), (async () => {
|
|
32
|
+
try {
|
|
33
|
+
let r = await q();
|
|
34
|
+
e || m(r);
|
|
35
|
+
} catch {
|
|
36
|
+
e || m([]);
|
|
37
|
+
} finally {
|
|
38
|
+
e || (h(!1), I(!0));
|
|
39
|
+
}
|
|
40
|
+
})(), () => {
|
|
41
|
+
e = !0;
|
|
42
|
+
};
|
|
43
|
+
}, [u, f]), /* @__PURE__ */ p(S, {
|
|
44
|
+
size: w,
|
|
45
|
+
fullWidth: A,
|
|
46
|
+
disabled: T,
|
|
47
|
+
open: u,
|
|
48
|
+
onOpen: () => c(!0),
|
|
49
|
+
onClose: () => c(!1),
|
|
50
|
+
value: l,
|
|
51
|
+
isOptionEqualToValue: (e, r) => (e == null ? void 0 : e.id) === (r == null ? void 0 : r.id),
|
|
52
|
+
getOptionLabel: (e) => (e == null ? void 0 : e.name) ?? "",
|
|
53
|
+
options: z(() => !l || n.some((e) => e.id === l.id) ? n : [l, ...n], [n, l]),
|
|
54
|
+
loading: d,
|
|
55
|
+
onChange: (e, r) => {
|
|
56
|
+
o(r ?? null), s == null || s((r == null ? void 0 : r.id) ?? "");
|
|
57
|
+
},
|
|
58
|
+
noOptionsText: d ? "Loading…" : f && n.length === 0 ? "No facilities assigned to your account" : "No matches",
|
|
59
|
+
renderInput: (e) => /* @__PURE__ */ p(j, {
|
|
60
|
+
...e,
|
|
61
|
+
required: x,
|
|
62
|
+
label: y,
|
|
63
|
+
error: O,
|
|
64
|
+
helperText: b || "Only facilities assigned to your account are shown. Type to filter.",
|
|
65
|
+
onBlur: C,
|
|
66
|
+
InputProps: {
|
|
67
|
+
...e.InputProps,
|
|
68
|
+
endAdornment: /* @__PURE__ */ E(F, { children: [d ? /* @__PURE__ */ p(v, {
|
|
69
|
+
color: "inherit",
|
|
70
|
+
size: 16
|
|
71
|
+
}) : null, e.InputProps.endAdornment] })
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export {
|
|
77
|
+
$ as d
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=FacilityPicker-BiZeupmP-CyPHmj6b.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FacilityPicker-BiZeupmP-CyPHmj6b.js","sources":["../../productManagement/dist/FacilityPicker-BiZeupmP.js"],"sourcesContent":["import { P as e, v as t } from \"./settingsStore-BifOsjlB.js\";\nimport { useEffect as n, useMemo as r, useState as i } from \"react\";\nimport { Fragment as a, jsx as o, jsxs as s } from \"react/jsx-runtime\";\nimport { Autocomplete as c, CircularProgress as l, TextField as u } from \"@mui/material\";\n//#region src/components/FacilityPicker.jsx\nfunction d({ value: d, onChange: f, label: p = \"Facility\", required: m = !1, disabled: h = !1, error: g = !1, helperText: _ = \"\", onBlur: v, size: y = \"small\", fullWidth: b = !0 }) {\n\tlet [x, S] = i(!1), [C, w] = i([]), [T, E] = i(!1), [D, O] = i(!1), [k, A] = i(null);\n\treturn n(() => {\n\t\tif (!d) {\n\t\t\tA(null);\n\t\t\treturn;\n\t\t}\n\t\tif (k?.id === d) return;\n\t\tlet e = C.find((e) => e.id === d);\n\t\tif (e) {\n\t\t\tA(e);\n\t\t\treturn;\n\t\t}\n\t\tlet n = !1;\n\t\treturn (async () => {\n\t\t\ttry {\n\t\t\t\tlet e = await t([d]);\n\t\t\t\t!n && e[0] && A(e[0]);\n\t\t\t} catch {}\n\t\t})(), () => {\n\t\t\tn = !0;\n\t\t};\n\t}, [d]), n(() => {\n\t\tif (!x || D) return;\n\t\tlet t = !1;\n\t\treturn E(!0), (async () => {\n\t\t\ttry {\n\t\t\t\tlet n = await e();\n\t\t\t\tt || w(n);\n\t\t\t} catch {\n\t\t\t\tt || w([]);\n\t\t\t} finally {\n\t\t\t\tt || (E(!1), O(!0));\n\t\t\t}\n\t\t})(), () => {\n\t\t\tt = !0;\n\t\t};\n\t}, [x, D]), /* @__PURE__ */ o(c, {\n\t\tsize: y,\n\t\tfullWidth: b,\n\t\tdisabled: h,\n\t\topen: x,\n\t\tonOpen: () => S(!0),\n\t\tonClose: () => S(!1),\n\t\tvalue: k,\n\t\tisOptionEqualToValue: (e, t) => e?.id === t?.id,\n\t\tgetOptionLabel: (e) => e?.name ?? \"\",\n\t\toptions: r(() => !k || C.some((e) => e.id === k.id) ? C : [k, ...C], [C, k]),\n\t\tloading: T,\n\t\tonChange: (e, t) => {\n\t\t\tA(t ?? null), f?.(t?.id ?? \"\");\n\t\t},\n\t\tnoOptionsText: T ? \"Loading…\" : D && C.length === 0 ? \"No facilities assigned to your account\" : \"No matches\",\n\t\trenderInput: (e) => /* @__PURE__ */ o(u, {\n\t\t\t...e,\n\t\t\trequired: m,\n\t\t\tlabel: p,\n\t\t\terror: g,\n\t\t\thelperText: _ || \"Only facilities assigned to your account are shown. Type to filter.\",\n\t\t\tonBlur: v,\n\t\t\tInputProps: {\n\t\t\t\t...e.InputProps,\n\t\t\t\tendAdornment: /* @__PURE__ */ s(a, { children: [T ? /* @__PURE__ */ o(l, {\n\t\t\t\t\tcolor: \"inherit\",\n\t\t\t\t\tsize: 16\n\t\t\t\t}) : null, e.InputProps.endAdornment] })\n\t\t\t}\n\t\t})\n\t});\n}\n//#endregion\nexport { d as t };\n\n//# sourceMappingURL=FacilityPicker-BiZeupmP.js.map"],"names":["d","f","p","m","h","g","_","v","y","b","x","S","i","C","w","T","E","D","O","k","A","n","e","t","o","c","r","u","s","a","l"],"mappings":"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"}
|
|
@@ -0,0 +1,521 @@
|
|
|
1
|
+
import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import he, { useState as I, useRef as xe, useCallback as P, useMemo as v, useEffect as K, Suspense as J, startTransition as Y, lazy as ae } from "react";
|
|
3
|
+
import { useTranslateProvider as ge } from "@/common/languageTranslator/TranslationContext";
|
|
4
|
+
import { g as be } from "./Features-Dne21RWu.js";
|
|
5
|
+
import { showToast as ve } from "@/common/toaster/toaster";
|
|
6
|
+
import ye from "@/hooks/useTrackEvent";
|
|
7
|
+
import { Box as s, Paper as q, Typography as x, Button as Q } from "@mui/material";
|
|
8
|
+
import { useSelector as y, useDispatch as we } from "react-redux";
|
|
9
|
+
import { useSearchParams as Ne, useNavigate as Se } from "react-router-dom";
|
|
10
|
+
import k from "@/common/fontAwesomeIcons/FontAwesomeIcons";
|
|
11
|
+
import Ce from "@/views/custom-components/SegmentedTabs";
|
|
12
|
+
import { featureModuleIcon as ke } from "@/common/constants/FeatureModuleIcons";
|
|
13
|
+
import b from "prop-types";
|
|
14
|
+
import { getUseSkeleton as j } from "@/store/reducers/SkeletonReducer";
|
|
15
|
+
import { setSubMenuId as X, setSubMenuGroupName as Z, setSubMenuFeatureVal as ee } from "@/store/reducers/FeatureReducer";
|
|
16
|
+
import { getAssignedFeatures as $e } from "@/utils/feature";
|
|
17
|
+
import _ from "@/common/services/util/GeneralUtil";
|
|
18
|
+
import Ie from "@/hooks/useCaching";
|
|
19
|
+
const o = "bg-gray-300 animate-pulse rounded-sm", te = ({ children: n, isLoading: d }) => !y(j) || !d ? n ?? null : /* @__PURE__ */ r("div", { className: "flex flex-col gap-6", "aria-busy": "true", children: [
|
|
20
|
+
/* @__PURE__ */ r("div", { className: "flex flex-row flex-wrap justify-between gap-4", children: [
|
|
21
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2", children: [
|
|
22
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[28px] w-[220px]` }),
|
|
23
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[16px] w-[340px] max-w-full` })
|
|
24
|
+
] }),
|
|
25
|
+
/* @__PURE__ */ r("div", { className: "flex flex-row gap-2 items-start", children: [
|
|
26
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[32px] w-[150px]` }),
|
|
27
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[32px] w-[120px]` })
|
|
28
|
+
] })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ r("div", { className: "flex flex-row flex-wrap gap-2", children: [
|
|
31
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[36px] w-[85px]` }),
|
|
32
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[36px] w-[85px]` }),
|
|
33
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[36px] w-[85px]` }),
|
|
34
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[36px] w-[85px]` }),
|
|
35
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[36px] w-[85px]` })
|
|
36
|
+
] })
|
|
37
|
+
] });
|
|
38
|
+
te.propTypes = {
|
|
39
|
+
children: b.any,
|
|
40
|
+
isLoading: b.any
|
|
41
|
+
};
|
|
42
|
+
b.any, b.any;
|
|
43
|
+
const re = ({ children: n, isLoading: d }) => !y(j) || !d ? n ?? null : /* @__PURE__ */ r("div", { className: "w-full flex flex-col gap-2 p-3", "aria-busy": "true", children: [
|
|
44
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[20px] w-[140px]` }),
|
|
45
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[38px] w-full` }),
|
|
46
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1.5 pt-1", children: Array.from({ length: 7 }).map(($, N) => /* @__PURE__ */ a("div", { className: `${o} h-[36px] w-full` }, N)) })
|
|
47
|
+
] });
|
|
48
|
+
re.propTypes = {
|
|
49
|
+
children: b.any,
|
|
50
|
+
isLoading: b.any
|
|
51
|
+
};
|
|
52
|
+
const ne = ({ children: n, isLoading: d }) => !y(j) || !d ? n ?? null : /* @__PURE__ */ r("div", { className: "w-full flex flex-col gap-3 p-3", "aria-busy": "true", children: [
|
|
53
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-2 sm:flex-row sm:items-center", children: [
|
|
54
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[38px] w-full sm:w-[220px]` }),
|
|
55
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[38px] w-full sm:flex-1` }),
|
|
56
|
+
/* @__PURE__ */ a("div", { className: `${o} h-[38px] w-full sm:w-[90px]` })
|
|
57
|
+
] }),
|
|
58
|
+
/* @__PURE__ */ a("div", { className: "flex flex-col gap-1.5", children: Array.from({ length: 5 }).map(($, N) => /* @__PURE__ */ a("div", { className: `${o} h-[52px] w-full` }, N)) })
|
|
59
|
+
] });
|
|
60
|
+
ne.propTypes = {
|
|
61
|
+
children: b.any,
|
|
62
|
+
isLoading: b.any
|
|
63
|
+
};
|
|
64
|
+
const Me = ae(() => import("./AccessRights-xrday-L1.js")), Fe = ae(() => import("./SubMenu-eEDhZUvh.js")), D = (n) => n ? n.length <= 4 && !/[\s_-]/.test(n) ? n.toUpperCase() : n.split(/[\s_-]+/).map((d) => d.charAt(0).toUpperCase() + d.slice(1)).join(" ") : "";
|
|
65
|
+
function Re() {
|
|
66
|
+
const n = we(), { getCachedData: d } = Ie(), [u, $] = I([]), [N, G] = Ne(), m = y((e) => {
|
|
67
|
+
var t;
|
|
68
|
+
return (t = e == null ? void 0 : e.FeatureReducer) == null ? void 0 : t.subMenuId;
|
|
69
|
+
}), M = y(
|
|
70
|
+
(e) => {
|
|
71
|
+
var t;
|
|
72
|
+
return (t = e == null ? void 0 : e.FeatureReducer) == null ? void 0 : t.subMenuGroupName;
|
|
73
|
+
}
|
|
74
|
+
), z = y(
|
|
75
|
+
(e) => {
|
|
76
|
+
var t;
|
|
77
|
+
return (t = e == null ? void 0 : e.FeatureReducer) == null ? void 0 : t.subMenuFeatureVal;
|
|
78
|
+
}
|
|
79
|
+
), F = xe(m);
|
|
80
|
+
F.current = m;
|
|
81
|
+
const R = P(() => {
|
|
82
|
+
n(X(null)), n(Z(null)), n(ee(null));
|
|
83
|
+
}, [n]), A = Se(), { user: T } = y((e) => e.Authenticate), { translate: l } = ge(), [w, L] = I(!1), B = ye(), [O, se] = I({}), [i, oe] = I(null), U = (T == null ? void 0 : T.features) || {}, c = v(
|
|
84
|
+
() => Object.keys(U).filter((e) => e !== "mch"),
|
|
85
|
+
[U]
|
|
86
|
+
), E = N.get("module"), p = v(() => {
|
|
87
|
+
const e = c.indexOf(E);
|
|
88
|
+
return e >= 0 ? e : 0;
|
|
89
|
+
}, [c, E]), S = c[p], f = v(
|
|
90
|
+
() => (u == null ? void 0 : u.find((e) => (e == null ? void 0 : e.id) === m)) || null,
|
|
91
|
+
[u, m]
|
|
92
|
+
), W = v(
|
|
93
|
+
() => f ? [
|
|
94
|
+
D(S),
|
|
95
|
+
f.groupName,
|
|
96
|
+
f.subGroupName,
|
|
97
|
+
f.name
|
|
98
|
+
].filter(Boolean) : [],
|
|
99
|
+
[f, S]
|
|
100
|
+
), le = v(
|
|
101
|
+
() => c.map((e, t) => ({
|
|
102
|
+
value: e,
|
|
103
|
+
label: D(e),
|
|
104
|
+
icon: ke(e),
|
|
105
|
+
id: `feature-tab-${t}`,
|
|
106
|
+
dataTestId: `featuremenu-button-${t}`
|
|
107
|
+
})),
|
|
108
|
+
[c]
|
|
109
|
+
), ie = P(
|
|
110
|
+
(e, t) => {
|
|
111
|
+
t && G(
|
|
112
|
+
(h) => {
|
|
113
|
+
const g = new URLSearchParams(h);
|
|
114
|
+
return g.set("module", t), g;
|
|
115
|
+
},
|
|
116
|
+
{ replace: !0 }
|
|
117
|
+
);
|
|
118
|
+
},
|
|
119
|
+
[G]
|
|
120
|
+
), ce = P(() => {
|
|
121
|
+
B("button_click", {
|
|
122
|
+
button_name: "featuremenu-add-button",
|
|
123
|
+
button_type: "navigate",
|
|
124
|
+
button_id: "featuremenu-add-button"
|
|
125
|
+
}), A("addDynamicFeature");
|
|
126
|
+
}, [A, B]);
|
|
127
|
+
K(() => {
|
|
128
|
+
async function e() {
|
|
129
|
+
const t = await d({
|
|
130
|
+
cacheKey: ["assignedFeatures", "techo.manage.menu"],
|
|
131
|
+
fetchFn: async () => (await $e("techo.manage.menu")).data,
|
|
132
|
+
staleTime: 3e5,
|
|
133
|
+
cacheTime: 18e5
|
|
134
|
+
}), h = JSON.parse(t);
|
|
135
|
+
oe(h);
|
|
136
|
+
}
|
|
137
|
+
e();
|
|
138
|
+
}, []), K(() => {
|
|
139
|
+
(async () => {
|
|
140
|
+
var t, h;
|
|
141
|
+
if (!(!c.length || p >= c.length))
|
|
142
|
+
try {
|
|
143
|
+
L(!0);
|
|
144
|
+
const { data: g } = await be(c[p]), V = g.sort((C, fe) => {
|
|
145
|
+
var H;
|
|
146
|
+
return (H = C.name) == null ? void 0 : H.localeCompare(fe.name);
|
|
147
|
+
});
|
|
148
|
+
Y(() => {
|
|
149
|
+
$(V), F.current && !V.some((C) => (C == null ? void 0 : C.id) === F.current) && R(), L(!1);
|
|
150
|
+
});
|
|
151
|
+
} catch (g) {
|
|
152
|
+
ve({
|
|
153
|
+
message: `Error : ${(h = (t = g == null ? void 0 : g.response) == null ? void 0 : t.data) == null ? void 0 : h.message}`,
|
|
154
|
+
type: "error"
|
|
155
|
+
}), Y(() => {
|
|
156
|
+
$([]), R(), L(!1);
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
})();
|
|
160
|
+
}, [p, c, R]);
|
|
161
|
+
const de = v(
|
|
162
|
+
() => /* @__PURE__ */ a(J, { fallback: /* @__PURE__ */ a(re, { isLoading: !0 }), children: /* @__PURE__ */ a(
|
|
163
|
+
Fe,
|
|
164
|
+
{
|
|
165
|
+
"data-testid": "featuremenu-submenu",
|
|
166
|
+
data: u,
|
|
167
|
+
subMenuId: m,
|
|
168
|
+
setSubMenuId: (e) => {
|
|
169
|
+
n(X(e));
|
|
170
|
+
},
|
|
171
|
+
setSubMenuGroupName: (e) => {
|
|
172
|
+
n(Z(e));
|
|
173
|
+
},
|
|
174
|
+
setSubMenuFeatureVal: (e) => {
|
|
175
|
+
n(ee(e));
|
|
176
|
+
},
|
|
177
|
+
type: c[p],
|
|
178
|
+
isLoading: w,
|
|
179
|
+
isNewAPI: O,
|
|
180
|
+
subMenuGroupName: M,
|
|
181
|
+
rights: i
|
|
182
|
+
}
|
|
183
|
+
) }),
|
|
184
|
+
[u, m, p, w, c, O, i]
|
|
185
|
+
), ue = v(
|
|
186
|
+
() => /* @__PURE__ */ a(J, { fallback: /* @__PURE__ */ a(ne, { isLoading: !0 }), children: /* @__PURE__ */ a(
|
|
187
|
+
Me,
|
|
188
|
+
{
|
|
189
|
+
"data-testid": "featuremenu-access-rights",
|
|
190
|
+
subMenuId: m,
|
|
191
|
+
subMenuGroupName: M,
|
|
192
|
+
subMenuFeatureVal: z,
|
|
193
|
+
selectedTab: c[p],
|
|
194
|
+
parentLoading: w,
|
|
195
|
+
onNewAPIChange: se,
|
|
196
|
+
rights: i
|
|
197
|
+
}
|
|
198
|
+
) }),
|
|
199
|
+
// `selectedTab`, `subMenuGroupName` and `subMenuFeatureVal` were read but
|
|
200
|
+
// not declared, so this could hand AccessRights a menu config from one
|
|
201
|
+
// module labelled with another module's tab.
|
|
202
|
+
[
|
|
203
|
+
m,
|
|
204
|
+
M,
|
|
205
|
+
z,
|
|
206
|
+
c,
|
|
207
|
+
p,
|
|
208
|
+
w,
|
|
209
|
+
i
|
|
210
|
+
]
|
|
211
|
+
), me = _.hasCheckRights(
|
|
212
|
+
i == null ? void 0 : i["update.manage.featurelist"]
|
|
213
|
+
), pe = _.hasCheckRights(
|
|
214
|
+
i == null ? void 0 : i["create.manage.featurelist"]
|
|
215
|
+
);
|
|
216
|
+
return !w && i !== null && !_.hasCheckRights(i == null ? void 0 : i["view.manage.featurelist"]) ? /* @__PURE__ */ a(
|
|
217
|
+
s,
|
|
218
|
+
{
|
|
219
|
+
sx: {
|
|
220
|
+
display: "flex",
|
|
221
|
+
justifyContent: "center",
|
|
222
|
+
alignItems: "center",
|
|
223
|
+
width: "100%",
|
|
224
|
+
minHeight: "70vh"
|
|
225
|
+
},
|
|
226
|
+
children: /* @__PURE__ */ r(
|
|
227
|
+
q,
|
|
228
|
+
{
|
|
229
|
+
elevation: 0,
|
|
230
|
+
sx: {
|
|
231
|
+
p: { xs: 3, md: 5 },
|
|
232
|
+
maxWidth: 520,
|
|
233
|
+
textAlign: "center",
|
|
234
|
+
border: "1px solid",
|
|
235
|
+
borderColor: "divider",
|
|
236
|
+
borderRadius: (e) => `${e.shape.cardRadius}px`,
|
|
237
|
+
backgroundColor: "background.paper"
|
|
238
|
+
},
|
|
239
|
+
children: [
|
|
240
|
+
/* @__PURE__ */ a(s, { sx: { color: "text.disabled", mb: 2 }, children: /* @__PURE__ */ a(k, { iconName: "faLock", size: "2x" }) }),
|
|
241
|
+
/* @__PURE__ */ a(
|
|
242
|
+
x,
|
|
243
|
+
{
|
|
244
|
+
variant: "h6",
|
|
245
|
+
component: "h1",
|
|
246
|
+
sx: { fontWeight: 700, mb: 1, color: "text.primary" },
|
|
247
|
+
children: l("You don't have permission to view features")
|
|
248
|
+
}
|
|
249
|
+
),
|
|
250
|
+
/* @__PURE__ */ a(x, { variant: "body2", color: "text.secondary", children: l(
|
|
251
|
+
"Ask an administrator to grant you access to the feature list."
|
|
252
|
+
) })
|
|
253
|
+
]
|
|
254
|
+
}
|
|
255
|
+
)
|
|
256
|
+
}
|
|
257
|
+
) : /* @__PURE__ */ a(
|
|
258
|
+
q,
|
|
259
|
+
{
|
|
260
|
+
elevation: 0,
|
|
261
|
+
sx: {
|
|
262
|
+
p: { xs: 2.5, md: 3 },
|
|
263
|
+
mt: 2,
|
|
264
|
+
mb: 3,
|
|
265
|
+
border: "1px solid",
|
|
266
|
+
borderColor: "divider",
|
|
267
|
+
borderRadius: (e) => `${e.shape.cardRadius}px`,
|
|
268
|
+
backgroundColor: "background.paper"
|
|
269
|
+
},
|
|
270
|
+
children: /* @__PURE__ */ r(s, { sx: { display: "flex", flexDirection: "column", gap: 3 }, children: [
|
|
271
|
+
/* @__PURE__ */ a(te, { isLoading: w, children: /* @__PURE__ */ r(s, { sx: { display: "flex", flexDirection: "column", gap: 2.5 }, children: [
|
|
272
|
+
/* @__PURE__ */ r(
|
|
273
|
+
s,
|
|
274
|
+
{
|
|
275
|
+
sx: {
|
|
276
|
+
display: "flex",
|
|
277
|
+
justifyContent: "space-between",
|
|
278
|
+
alignItems: "flex-start",
|
|
279
|
+
flexWrap: "wrap",
|
|
280
|
+
gap: 2
|
|
281
|
+
},
|
|
282
|
+
children: [
|
|
283
|
+
/* @__PURE__ */ r(s, { sx: { minWidth: { xs: "100%", lg: "40%" } }, children: [
|
|
284
|
+
/* @__PURE__ */ a(
|
|
285
|
+
x,
|
|
286
|
+
{
|
|
287
|
+
variant: "h5",
|
|
288
|
+
component: "h1",
|
|
289
|
+
sx: { fontWeight: 800, color: "text.primary", mb: 0.5 },
|
|
290
|
+
children: l("Feature Access")
|
|
291
|
+
}
|
|
292
|
+
),
|
|
293
|
+
/* @__PURE__ */ a(x, { variant: "body2", color: "text.secondary", children: S ? `${l("Manage access for the")} ${D(S)} ${l("module. Choose a sub menu, then grant or revoke its rights for roles and users.")}` : l(
|
|
294
|
+
"Pick a module, choose one of its sub menus, then grant or revoke that sub menu's rights for roles and users."
|
|
295
|
+
) })
|
|
296
|
+
] }),
|
|
297
|
+
/* @__PURE__ */ r(
|
|
298
|
+
s,
|
|
299
|
+
{
|
|
300
|
+
sx: {
|
|
301
|
+
display: "flex",
|
|
302
|
+
alignItems: "center",
|
|
303
|
+
gap: 1.5,
|
|
304
|
+
flexWrap: "wrap"
|
|
305
|
+
},
|
|
306
|
+
children: [
|
|
307
|
+
me && /* @__PURE__ */ r(
|
|
308
|
+
Q,
|
|
309
|
+
{
|
|
310
|
+
size: "small",
|
|
311
|
+
variant: "outlined",
|
|
312
|
+
onClick: () => A("/ui/medplat/report/all/groups"),
|
|
313
|
+
startIcon: /* @__PURE__ */ a(k, { iconName: "faLayerGroup" }),
|
|
314
|
+
children: [
|
|
315
|
+
l("Manage"),
|
|
316
|
+
" ",
|
|
317
|
+
l("Menu"),
|
|
318
|
+
" ",
|
|
319
|
+
l("Group")
|
|
320
|
+
]
|
|
321
|
+
}
|
|
322
|
+
),
|
|
323
|
+
pe && /* @__PURE__ */ r(
|
|
324
|
+
Q,
|
|
325
|
+
{
|
|
326
|
+
size: "small",
|
|
327
|
+
"data-testid": "featuremenu-add-button",
|
|
328
|
+
variant: "contained",
|
|
329
|
+
onClick: ce,
|
|
330
|
+
startIcon: /* @__PURE__ */ a(k, { iconName: "faPlus" }),
|
|
331
|
+
children: [
|
|
332
|
+
l("Add"),
|
|
333
|
+
" ",
|
|
334
|
+
l("Feature")
|
|
335
|
+
]
|
|
336
|
+
}
|
|
337
|
+
)
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
)
|
|
341
|
+
]
|
|
342
|
+
}
|
|
343
|
+
),
|
|
344
|
+
/* @__PURE__ */ a(
|
|
345
|
+
Ce,
|
|
346
|
+
{
|
|
347
|
+
tabs: le,
|
|
348
|
+
value: S,
|
|
349
|
+
onChange: ie,
|
|
350
|
+
ariaLabel: l("Feature modules"),
|
|
351
|
+
panelId: "feature-tabpanel",
|
|
352
|
+
dataTestId: "featuremenu-tabs",
|
|
353
|
+
collapseLabels: !1,
|
|
354
|
+
sx: { flexWrap: "wrap" }
|
|
355
|
+
}
|
|
356
|
+
)
|
|
357
|
+
] }) }),
|
|
358
|
+
/* @__PURE__ */ r(
|
|
359
|
+
s,
|
|
360
|
+
{
|
|
361
|
+
role: "tabpanel",
|
|
362
|
+
id: "feature-tabpanel",
|
|
363
|
+
"aria-labelledby": `feature-tab-${p}`,
|
|
364
|
+
sx: {
|
|
365
|
+
display: "flex",
|
|
366
|
+
flexDirection: { xs: "column", md: "row" },
|
|
367
|
+
alignItems: "stretch",
|
|
368
|
+
border: "1px solid",
|
|
369
|
+
borderColor: "divider",
|
|
370
|
+
borderRadius: (e) => `${e.shape.borderRadius}px`,
|
|
371
|
+
overflow: "hidden",
|
|
372
|
+
minHeight: 420
|
|
373
|
+
},
|
|
374
|
+
children: [
|
|
375
|
+
/* @__PURE__ */ a(
|
|
376
|
+
s,
|
|
377
|
+
{
|
|
378
|
+
sx: {
|
|
379
|
+
width: { xs: "100%", md: 280, lg: 320 },
|
|
380
|
+
flexShrink: 0,
|
|
381
|
+
borderBottom: { xs: "1px solid", md: "none" },
|
|
382
|
+
borderRight: { xs: "none", md: "1px solid" },
|
|
383
|
+
borderColor: "divider",
|
|
384
|
+
display: "flex"
|
|
385
|
+
},
|
|
386
|
+
children: de
|
|
387
|
+
}
|
|
388
|
+
),
|
|
389
|
+
/* @__PURE__ */ r(
|
|
390
|
+
s,
|
|
391
|
+
{
|
|
392
|
+
sx: {
|
|
393
|
+
flex: 1,
|
|
394
|
+
minWidth: 0,
|
|
395
|
+
display: "flex",
|
|
396
|
+
flexDirection: "column"
|
|
397
|
+
},
|
|
398
|
+
children: [
|
|
399
|
+
/* @__PURE__ */ r(
|
|
400
|
+
s,
|
|
401
|
+
{
|
|
402
|
+
sx: {
|
|
403
|
+
display: "flex",
|
|
404
|
+
flexDirection: "column",
|
|
405
|
+
gap: 0.25,
|
|
406
|
+
px: 2,
|
|
407
|
+
py: 1.5,
|
|
408
|
+
borderBottom: "1px solid",
|
|
409
|
+
borderColor: "divider"
|
|
410
|
+
},
|
|
411
|
+
children: [
|
|
412
|
+
/* @__PURE__ */ r(s, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
|
|
413
|
+
/* @__PURE__ */ a(s, { sx: { color: "text.secondary", display: "flex" }, children: /* @__PURE__ */ a(k, { iconName: "faGear" }) }),
|
|
414
|
+
/* @__PURE__ */ a(x, { variant: "body2", sx: { fontWeight: 700 }, children: l("Access Rights") })
|
|
415
|
+
] }),
|
|
416
|
+
W.length > 0 && /* @__PURE__ */ r(
|
|
417
|
+
s,
|
|
418
|
+
{
|
|
419
|
+
"data-testid": "featuremenu-selected-menu-config",
|
|
420
|
+
sx: {
|
|
421
|
+
display: "flex",
|
|
422
|
+
alignItems: "center",
|
|
423
|
+
flexWrap: "wrap",
|
|
424
|
+
gap: 0.75,
|
|
425
|
+
pl: 3,
|
|
426
|
+
minWidth: 0
|
|
427
|
+
},
|
|
428
|
+
children: [
|
|
429
|
+
W.map((e, t) => {
|
|
430
|
+
const h = t === W.length - 1;
|
|
431
|
+
return /* @__PURE__ */ r(he.Fragment, { children: [
|
|
432
|
+
t > 0 && /* @__PURE__ */ a(
|
|
433
|
+
s,
|
|
434
|
+
{
|
|
435
|
+
component: "span",
|
|
436
|
+
"aria-hidden": "true",
|
|
437
|
+
sx: { color: "text.disabled", fontSize: "0.75rem" },
|
|
438
|
+
children: "›"
|
|
439
|
+
}
|
|
440
|
+
),
|
|
441
|
+
/* @__PURE__ */ a(
|
|
442
|
+
x,
|
|
443
|
+
{
|
|
444
|
+
variant: "caption",
|
|
445
|
+
sx: {
|
|
446
|
+
color: h ? "text.primary" : "text.secondary",
|
|
447
|
+
fontWeight: h ? 700 : 400,
|
|
448
|
+
// Feature names have no spaces to break on, so
|
|
449
|
+
// without this a long one overflows the trail.
|
|
450
|
+
overflowWrap: "anywhere"
|
|
451
|
+
},
|
|
452
|
+
children: e
|
|
453
|
+
}
|
|
454
|
+
)
|
|
455
|
+
] }, `${e}-${t}`);
|
|
456
|
+
}),
|
|
457
|
+
(f == null ? void 0 : f.navigationState) && /* @__PURE__ */ a(
|
|
458
|
+
x,
|
|
459
|
+
{
|
|
460
|
+
variant: "caption",
|
|
461
|
+
sx: {
|
|
462
|
+
ml: 0.5,
|
|
463
|
+
px: 0.75,
|
|
464
|
+
borderRadius: (e) => `${e.shape.chipRadius}px`,
|
|
465
|
+
backgroundColor: "action.hover",
|
|
466
|
+
color: "text.secondary",
|
|
467
|
+
fontFamily: "monospace",
|
|
468
|
+
overflowWrap: "anywhere"
|
|
469
|
+
},
|
|
470
|
+
children: f.navigationState
|
|
471
|
+
}
|
|
472
|
+
)
|
|
473
|
+
]
|
|
474
|
+
}
|
|
475
|
+
)
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
m ? ue : /* @__PURE__ */ r(
|
|
480
|
+
s,
|
|
481
|
+
{
|
|
482
|
+
"data-testid": "featuremenu-no-feature-selected",
|
|
483
|
+
sx: {
|
|
484
|
+
flex: 1,
|
|
485
|
+
display: "flex",
|
|
486
|
+
flexDirection: "column",
|
|
487
|
+
alignItems: "center",
|
|
488
|
+
justifyContent: "center",
|
|
489
|
+
textAlign: "center",
|
|
490
|
+
gap: 1,
|
|
491
|
+
p: 4
|
|
492
|
+
},
|
|
493
|
+
children: [
|
|
494
|
+
/* @__PURE__ */ a(s, { sx: { color: "text.disabled" }, children: /* @__PURE__ */ a(k, { iconName: "faListCheck", size: "2x" }) }),
|
|
495
|
+
/* @__PURE__ */ a(x, { variant: "subtitle1", sx: { fontWeight: 700 }, children: l("No sub menu selected") }),
|
|
496
|
+
/* @__PURE__ */ a(x, { variant: "body2", color: "text.secondary", children: l(
|
|
497
|
+
"Select a sub menu from the list to view and manage its access rights."
|
|
498
|
+
) })
|
|
499
|
+
]
|
|
500
|
+
}
|
|
501
|
+
)
|
|
502
|
+
]
|
|
503
|
+
}
|
|
504
|
+
)
|
|
505
|
+
]
|
|
506
|
+
}
|
|
507
|
+
)
|
|
508
|
+
] })
|
|
509
|
+
}
|
|
510
|
+
);
|
|
511
|
+
}
|
|
512
|
+
const Ye = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
513
|
+
__proto__: null,
|
|
514
|
+
default: Re
|
|
515
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
516
|
+
export {
|
|
517
|
+
ne as A,
|
|
518
|
+
Ye as F,
|
|
519
|
+
re as S
|
|
520
|
+
};
|
|
521
|
+
//# sourceMappingURL=FeatureMenu-DYJmDt7q.js.map
|