@argusoft/medplat-core 1.0.31 → 1.0.32

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 (199) hide show
  1. package/dist/{AccessRights-DUgY6ewy.js → AccessRights-DBjTQA1-.js} +421 -424
  2. package/dist/AccessRights-DBjTQA1-.js.map +1 -0
  3. package/dist/{AddFeatures-D1sU8RjY.js → AddFeatures-COj4ZTIM.js} +2 -2
  4. package/dist/{AddFeatures-D1sU8RjY.js.map → AddFeatures-COj4ZTIM.js.map} +1 -1
  5. package/dist/AddMenuConfiguration-Creeib5X.js +11223 -0
  6. package/dist/AddMenuConfiguration-Creeib5X.js.map +1 -0
  7. package/dist/AddMenuConfiguration.css +1 -1
  8. package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +45 -45
  9. package/dist/{BrandsPage-DMw2vT0u-BVhvhc6J.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
  10. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js → CategoriesPage-BprQEYJw-CclreTv1.js} +43 -43
  11. package/dist/{CategoriesPage-D3ihx9Gi-CT58g0ry.js.map → CategoriesPage-BprQEYJw-CclreTv1.js.map} +1 -1
  12. package/dist/{ChangePasswordModalCore-lQ9GamH1.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
  13. package/dist/{ChangePasswordModalCore-lQ9GamH1.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
  14. package/dist/{ConditionConfig-BQBmBHaM.js → ConditionConfig-Bpm6OoV5.js} +3 -3
  15. package/dist/{ConditionConfig-BQBmBHaM.js.map → ConditionConfig-Bpm6OoV5.js.map} +1 -1
  16. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +29 -29
  17. package/dist/{DashboardPage-asr2XDRu-uOOlX9Vq.js.map → DashboardPage-CTiGSx71-CsYohJ5e.js.map} +1 -1
  18. package/dist/EntityManagement-BGwJGl9k.js +62 -0
  19. package/dist/EntityManagement-BGwJGl9k.js.map +1 -0
  20. package/dist/{EventConfigurations-CUPEN5BV.js → EventConfigurations-B-z7xHh_.js} +3 -3
  21. package/dist/{EventConfigurations-CUPEN5BV.js.map → EventConfigurations-B-z7xHh_.js.map} +1 -1
  22. package/dist/{EventsExceptionModal-BX-ArkBE.js → EventsExceptionModal-DafomIv6.js} +2 -2
  23. package/dist/{EventsExceptionModal-BX-ArkBE.js.map → EventsExceptionModal-DafomIv6.js.map} +1 -1
  24. package/dist/{EventsUi-D6O9S7BK.js → EventsUi-Dl_yckSA.js} +37 -32
  25. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  26. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
  27. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
  28. package/dist/{FeatureMenu-CHsBbw3W.js → FeatureMenu-Kc73yPHH.js} +2 -2
  29. package/dist/{FeatureMenu-CHsBbw3W.js.map → FeatureMenu-Kc73yPHH.js.map} +1 -1
  30. package/dist/{FhirServerList-iXBPkRVF.js → FhirServerList-CrIHMAxz.js} +19 -19
  31. package/dist/{FhirServerList-iXBPkRVF.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  32. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  33. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  34. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  35. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  36. package/dist/{ImmunizationConfigurationBase-aUtx0JEe.js → ImmunizationConfigurationBase-lKsJZMak.js} +1342 -1301
  37. package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
  38. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
  39. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
  40. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  41. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  42. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  43. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  44. package/dist/{ManageEventConfiguration-DqW3krT6.js → ManageEventConfiguration-DqPbn3Oi.js} +5 -5
  45. package/dist/{ManageEventConfiguration-DqW3krT6.js.map → ManageEventConfiguration-DqPbn3Oi.js.map} +1 -1
  46. package/dist/ManageRole-CyfpySt9.js +981 -0
  47. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  48. package/dist/{ManageUser-DZltBina.js → ManageUser-Dm0l833u.js} +172 -172
  49. package/dist/{ManageUser-DZltBina.js.map → ManageUser-Dm0l833u.js.map} +1 -1
  50. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +37 -37
  51. package/dist/{MemberProfileCard-D5CgkTdJ-D2NgDJl3.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
  52. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  53. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  54. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  55. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  56. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js → MobileTypeEventConfigModal-DodU3beR.js} +3 -3
  57. package/dist/{MobileTypeEventConfigModal-CMcj7Ozp.js.map → MobileTypeEventConfigModal-DodU3beR.js.map} +1 -1
  58. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  59. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  60. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  61. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  62. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +56 -56
  63. package/dist/{PaymentCreatePage-DfvSZ-kB-CckogYoe.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
  64. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +38 -38
  65. package/dist/{PaymentsPage-DMNjYWAJ-ChO9IXmk.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
  66. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  67. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  68. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
  69. package/dist/{PickupBatchLinesEditor-CE2RuyJT-BPceiJr8.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
  70. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
  71. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
  72. package/dist/{PickupsPage-D7zyioJB-bHKnARYw.js → PickupsPage-BWblMlic-CWkgeBw0.js} +122 -122
  73. package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
  74. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
  75. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
  76. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
  77. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
  78. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +29 -29
  79. package/dist/{ProductsPage-DvNHIeZt-BoOOJJtk.js.map → ProductsPage-BI22nPb4-CQBjnc-n.js.map} +1 -1
  80. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
  81. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
  82. package/dist/{PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +446 -436
  83. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
  84. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +55 -55
  85. package/dist/{PurchaseRequestsPage-DS9i4o0--TpoxA5Kd.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
  86. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +61 -61
  87. package/dist/{PurchasesPage-DgL5T6BY-DePUuE9l.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
  88. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  89. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  90. package/dist/Roles-BoNGJhtR.js +19 -0
  91. package/dist/Roles-BoNGJhtR.js.map +1 -0
  92. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +33 -33
  93. package/dist/{SaleCreatePage-CZnIOydv-DKBw-qp7.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
  94. package/dist/{SalesPage-DPIRrC_O-M8rqnK7z.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +34 -34
  95. package/dist/SalesPage-eF9Yr42z-BQ9FlXC3.js.map +1 -0
  96. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
  97. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
  98. package/dist/{StorageUnitsPage-BDRkdCjW-UF64rf7q.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +213 -190
  99. package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
  100. package/dist/{SubMenu-BdMTYtC1.js → SubMenu-OO2zhKiu.js} +2 -2
  101. package/dist/{SubMenu-BdMTYtC1.js.map → SubMenu-OO2zhKiu.js.map} +1 -1
  102. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  103. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  104. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  105. package/dist/TableList-B5tX4wII.js.map +1 -0
  106. package/dist/{TransactionsPage-CqWTMNU8-Df6eGFDW.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +185 -170
  107. package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
  108. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
  109. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
  110. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
  111. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
  112. package/dist/{TypeConfiguration-JbRCN6GR.js → TypeConfiguration-EaFiOzRE.js} +3 -3
  113. package/dist/{TypeConfiguration-JbRCN6GR.js.map → TypeConfiguration-EaFiOzRE.js.map} +1 -1
  114. package/dist/UserList-Cf5B-o_1.js +1904 -0
  115. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  116. package/dist/Users-MC7txo1V.js +43 -0
  117. package/dist/{Users-CsJ08Kjm.js.map → Users-MC7txo1V.js.map} +1 -1
  118. package/dist/VaccineEducation-T_UE57Ef.js +231 -0
  119. package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
  120. package/dist/VaccineEducation.css +1 -0
  121. package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
  122. package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
  123. package/dist/VaccineEducationConfigurator.css +4 -0
  124. package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
  125. package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
  126. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
  127. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
  128. package/dist/{constants-DpXnLsAB-D6lN5cjK.js → constants-BTpJFQe_-CYPZIqQF.js} +160 -61
  129. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  130. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  131. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  132. package/dist/index-mfoqII2U.js +524 -0
  133. package/dist/index-mfoqII2U.js.map +1 -0
  134. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  135. package/dist/index-o8Pyt1Bt.js.map +1 -0
  136. package/dist/index.css +1 -1
  137. package/dist/index.js +1 -1
  138. package/dist/{index.lib-ETRQOzvE.js → index.lib-BySa9-Z-.js} +302 -260
  139. package/dist/index.lib-BySa9-Z-.js.map +1 -0
  140. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
  141. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
  142. package/package.json +5 -1
  143. package/dist/AccessRights-DUgY6ewy.js.map +0 -1
  144. package/dist/AddMenuConfiguration-c6ZKiN0i.js +0 -8898
  145. package/dist/AddMenuConfiguration-c6ZKiN0i.js.map +0 -1
  146. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  147. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  148. package/dist/EventsUi-D6O9S7BK.js.map +0 -1
  149. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js +0 -79
  150. package/dist/FacilityPicker-DYl_PDyt-Cbwo2tAY.js.map +0 -1
  151. package/dist/ImmunizationConfigurationBase-aUtx0JEe.js.map +0 -1
  152. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js +0 -665
  153. package/dist/InventoryPage-DOotGZrj-CoPjOJEI.js.map +0 -1
  154. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  155. package/dist/ManageRole-CNZBRKGU.js +0 -776
  156. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  157. package/dist/MobileAnalytics-BLOionG_.js +0 -17301
  158. package/dist/MobileAnalytics-BLOionG_.js.map +0 -1
  159. package/dist/MobileMenuManagement-68Wijb0X.js +0 -220
  160. package/dist/MobileMenuManagement-68Wijb0X.js.map +0 -1
  161. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  162. package/dist/OtherTypeEventConfigModal-stNmuSv_.js +0 -1812
  163. package/dist/OtherTypeEventConfigModal-stNmuSv_.js.map +0 -1
  164. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  165. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js +0 -783
  166. package/dist/PickupCreatePage-B4O_-vE5-DoOo9nJO.js.map +0 -1
  167. package/dist/PickupsPage-D7zyioJB-bHKnARYw.js.map +0 -1
  168. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js +0 -599
  169. package/dist/PmGuard-BZE-y4In-D_pUm5MP.js.map +0 -1
  170. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js +0 -1305
  171. package/dist/ProductEditPage-BVlVUCtD-BR-tJ5Wb.js.map +0 -1
  172. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js +0 -675
  173. package/dist/PurchaseCreatePage-Cq_i9snz-DRtHHFWw.js.map +0 -1
  174. package/dist/PurchaseRequestDetailPage-CA9KFOfE-CtjG4Gx6.js.map +0 -1
  175. package/dist/Roles-BIyiic67.js +0 -14
  176. package/dist/Roles-BIyiic67.js.map +0 -1
  177. package/dist/SalesPage-DPIRrC_O-M8rqnK7z.js.map +0 -1
  178. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js +0 -676
  179. package/dist/SettingsPage-BC_R6Z-Q-CKNt9zRu.js.map +0 -1
  180. package/dist/StorageUnitsPage-BDRkdCjW-UF64rf7q.js.map +0 -1
  181. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  182. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  183. package/dist/TransactionsPage-CqWTMNU8-Df6eGFDW.js.map +0 -1
  184. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js +0 -315
  185. package/dist/TransferCreatePage-DF7FZaTJ-CL79V3aR.js.map +0 -1
  186. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js +0 -476
  187. package/dist/TransfersPage-CGrRFaBF-cTwBUv0o.js.map +0 -1
  188. package/dist/UserList-L41Xw0Q6.js +0 -1129
  189. package/dist/UserList-L41Xw0Q6.js.map +0 -1
  190. package/dist/Users-CsJ08Kjm.js +0 -40
  191. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js +0 -321
  192. package/dist/VialsPage-rvvXjgZG-Oqo1v6kQ.js.map +0 -1
  193. package/dist/constants-DpXnLsAB-D6lN5cjK.js.map +0 -1
  194. package/dist/dashboardLayoutUtils-CJivzaU1.js +0 -408
  195. package/dist/dashboardLayoutUtils-CJivzaU1.js.map +0 -1
  196. package/dist/index-D9YNFPn9.js.map +0 -1
  197. package/dist/index.lib-ETRQOzvE.js.map +0 -1
  198. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js +0 -36
  199. package/dist/listValueStore-BFQtDYIR-Bj0yX145.js.map +0 -1
@@ -1,75 +1,75 @@
1
- import { jsxs as T, jsx as o, Fragment as gs } from "react/jsx-runtime";
2
- import { Box as A, Autocomplete as Is, TextField as ze, Button as xs, InputAdornment as Me, IconButton as pe, Typography as ne, Accordion as Ss, AccordionSummary as Ns, Chip as bs, Tooltip as me, AccordionDetails as Cs, FormControlLabel as vs, Checkbox as ks, Menu as Os, MenuItem as Ds } from "@mui/material";
1
+ import { jsxs as R, jsx as o, Fragment as xs } from "react/jsx-runtime";
2
+ import { Box as J, Autocomplete as Ss, TextField as Me, Button as Ns, InputAdornment as $e, IconButton as me, Typography as ie, Accordion as Cs, AccordionSummary as bs, Chip as ks, Tooltip as he, AccordionDetails as vs, FormControlLabel as Os, Checkbox as Ds, Menu as Js, MenuItem as Ps } from "@mui/material";
3
3
  import x from "prop-types";
4
- import Js from "@/views/custom-components/CustomConfirmationModal";
5
- import As from "@/views/custom-components/DebouncedSearchInput";
6
- import { useState as c, useMemo as re, useEffect as ae, createElement as Ue, useRef as ie, useCallback as $e, Suspense as Ps, lazy as we } from "react";
7
- import { a as V, d as _s, b as Ce, c as Rs, p as Ts, e as Es, f as Ls } from "./Features-Dne21RWu.js";
8
- import { execute as oe, getRoleList as Fs } from "@/common/services/GlobalApis.js";
4
+ import As from "@/views/custom-components/CustomConfirmationModal";
5
+ import _s from "@/views/custom-components/DebouncedSearchInput";
6
+ import { useState as c, useMemo as ae, useEffect as le, createElement as Be, useRef as oe, useCallback as We, Suspense as Rs, lazy as Ge } from "react";
7
+ import { a as ee, d as Ts, b as ve, c as Es, p as Ls, e as Fs, f as zs } from "./Features-Dne21RWu.js";
8
+ import { execute as re, getRoleList as Us } from "@/common/services/GlobalApis.js";
9
9
  import "@/assets/scss/scrollBar.scss";
10
- import { useForm as je, Controller as zs } from "react-hook-form";
11
- import { showToast as k } from "@/common/toaster/toaster";
12
- import Ms from "@/hooks/useTrackEvent";
13
- import { useTranslateProvider as Us } from "@/common/languageTranslator/TranslationContext";
14
- import w from "@/common/fontAwesomeIcons/FontAwesomeIcons";
15
- import { execute as $s } from "@/common/services/GlobalApis";
16
- import { alpha as Bs } from "@mui/material/styles";
17
- import Ws, { VirtualListbox as ws } from "@/views/custom-components/CustomAutoComplete";
18
- import Ge from "@/hooks/useCaching";
19
- import Be from "@/common/services/util/GeneralUtil";
20
- import { A as js } from "./FeatureMenu-CHsBbw3W.js";
21
- const We = 200;
22
- function He({
23
- translate: a,
24
- onSubmit: K,
25
- roleList: j,
10
+ import { useForm as He, Controller as Ms } from "react-hook-form";
11
+ import { showToast as v } from "@/common/toaster/toaster";
12
+ import $s from "@/hooks/useTrackEvent";
13
+ import { useTranslateProvider as Bs } from "@/common/languageTranslator/TranslationContext";
14
+ import W from "@/common/fontAwesomeIcons/FontAwesomeIcons";
15
+ import { execute as Ws } from "@/common/services/GlobalApis";
16
+ import { alpha as ws } from "@mui/material/styles";
17
+ import js, { VirtualListbox as Gs } from "@/views/custom-components/CustomAutoComplete";
18
+ import Ke from "@/hooks/useCaching";
19
+ import we from "@/common/services/util/GeneralUtil";
20
+ import { A as Hs } from "./FeatureMenu-Kc73yPHH.js";
21
+ const je = 200;
22
+ function Xe({
23
+ translate: l,
24
+ onSubmit: X,
25
+ roleList: w,
26
26
  featureData: O
27
27
  }) {
28
- const [P, X] = c(""), [U, G] = c(""), [L, v] = c([]), { control: y, handleSubmit: $, reset: H } = je({}), { getCachedData: R } = Ge(), F = re(() => {
29
- const d = /* @__PURE__ */ new Set(), _ = /* @__PURE__ */ new Set();
28
+ const [P, Z] = c(""), [U, j] = c(""), [E, b] = c([]), { control: g, handleSubmit: M, reset: G } = He({}), { getCachedData: _ } = Ke(), L = ae(() => {
29
+ const d = /* @__PURE__ */ new Set(), A = /* @__PURE__ */ new Set();
30
30
  return (O || []).forEach((S) => {
31
- S != null && S.designationId && d.add(S.designationId), S != null && S.userId && _.add(S.userId);
32
- }), { roles: d, users: _ };
33
- }, [O]), ee = re(
34
- () => j.filter((d) => !F.roles.has(d == null ? void 0 : d.id)),
35
- [j, F]
31
+ S != null && S.designationId && d.add(S.designationId), S != null && S.userId && A.add(S.userId);
32
+ }), { roles: d, users: A };
33
+ }, [O]), se = ae(
34
+ () => w.filter((d) => !L.roles.has(d == null ? void 0 : d.id)),
35
+ [w, L]
36
36
  );
37
- ae(() => {
37
+ le(() => {
38
38
  const d = setTimeout(() => {
39
- G(P);
39
+ j(P);
40
40
  }, 300);
41
41
  return () => clearTimeout(d);
42
- }, [P]), ae(() => {
43
- U !== "" && B(U);
44
- }, [U]), ae(() => {
45
- B("");
42
+ }, [P]), le(() => {
43
+ U !== "" && $(U);
44
+ }, [U]), le(() => {
45
+ $("");
46
46
  }, []);
47
- const B = async (d, _ = O) => {
47
+ const $ = async (d, A = O) => {
48
48
  try {
49
- const S = async (p) => {
50
- const { data: z } = await $s({
49
+ const S = async (m) => {
50
+ const { data: F } = await Ws({
51
51
  code: "user_search_for_selectize",
52
- parameters: { searchString: p }
52
+ parameters: { searchString: m }
53
53
  });
54
- return z;
55
- }, g = d ? await S(d) : await R({
54
+ return F;
55
+ }, y = d ? await S(d) : await _({
56
56
  cacheKey: ["user_search_for_selectize", ""],
57
57
  fetchFn: () => S(""),
58
58
  staleTime: 3e5,
59
59
  cacheTime: 18e5
60
- }), b = _ === O ? F.users : new Set(
61
- (_ || []).map((p) => p == null ? void 0 : p.userId).filter(Boolean)
62
- ), I = ((g == null ? void 0 : g.result) || []).filter((p) => (p == null ? void 0 : p.id) && !b.has(p.id)).map((p) => ({
63
- ...p,
64
- displayName: `${p.firstName || ""} ${p.lastName || ""} (${p.userName || ""})`.trim()
60
+ }), C = A === O ? L.users : new Set(
61
+ (A || []).map((m) => m == null ? void 0 : m.userId).filter(Boolean)
62
+ ), I = ((y == null ? void 0 : y.result) || []).filter((m) => (m == null ? void 0 : m.id) && !C.has(m.id)).map((m) => ({
63
+ ...m,
64
+ displayName: `${m.firstName || ""} ${m.lastName || ""} (${m.userName || ""})`.trim()
65
65
  }));
66
- v(I);
66
+ b(I);
67
67
  } catch (S) {
68
68
  console.error(S);
69
69
  }
70
70
  };
71
- return /* @__PURE__ */ T(
72
- A,
71
+ return /* @__PURE__ */ R(
72
+ J,
73
73
  {
74
74
  sx: {
75
75
  display: "flex",
@@ -80,73 +80,73 @@ function He({
80
80
  minWidth: 0
81
81
  },
82
82
  children: [
83
- /* @__PURE__ */ o(A, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ o(
84
- zs,
83
+ /* @__PURE__ */ o(J, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ o(
84
+ Ms,
85
85
  {
86
86
  name: "roles",
87
87
  id: "roles",
88
- control: y,
88
+ control: g,
89
89
  defaultValue: null,
90
- render: ({ field: { onChange: d, value: _, ref: S } }) => /* @__PURE__ */ o(
91
- Is,
90
+ render: ({ field: { onChange: d, value: A, ref: S } }) => /* @__PURE__ */ o(
91
+ Ss,
92
92
  {
93
- options: L,
93
+ options: E,
94
94
  size: "small",
95
95
  slots: {
96
- listbox: L.length > We ? ws : void 0
96
+ listbox: E.length > je ? Gs : void 0
97
97
  },
98
- getOptionLabel: (g) => g.displayName || "",
99
- isOptionEqualToValue: (g, b) => g.id === (b == null ? void 0 : b.id),
100
- value: _ || null,
101
- onChange: (g, b, I) => {
102
- I === "clear" && B(""), d(b);
98
+ getOptionLabel: (y) => y.displayName || "",
99
+ isOptionEqualToValue: (y, C) => y.id === (C == null ? void 0 : C.id),
100
+ value: A || null,
101
+ onChange: (y, C, I) => {
102
+ I === "clear" && $(""), d(C);
103
103
  },
104
- onInputChange: (g, b, I) => {
105
- I === "input" && X(b);
104
+ onInputChange: (y, C, I) => {
105
+ I === "input" && Z(C);
106
106
  },
107
- renderOption: (g, b) => {
108
- const I = b.displayName || "", p = P.trim(), z = I.toLowerCase().indexOf(p.toLowerCase());
109
- if (z === -1)
110
- return /* @__PURE__ */ Ue(
107
+ renderOption: (y, C) => {
108
+ const I = C.displayName || "", m = P.trim(), F = I.toLowerCase().indexOf(m.toLowerCase());
109
+ if (F === -1)
110
+ return /* @__PURE__ */ Be(
111
111
  "li",
112
112
  {
113
- ...g,
114
- key: b.id,
113
+ ...y,
114
+ key: C.id,
115
115
  style: { lineHeight: 1.5, fontSize: "14px" }
116
116
  },
117
117
  I
118
118
  );
119
- const Z = I.substring(0, z), he = I.substring(z, z + p.length), se = I.substring(z + p.length);
120
- return /* @__PURE__ */ Ue(
119
+ const q = I.substring(0, F), ge = I.substring(F, F + m.length), te = I.substring(F + m.length);
120
+ return /* @__PURE__ */ Be(
121
121
  "li",
122
122
  {
123
- ...g,
124
- key: b.id,
123
+ ...y,
124
+ key: C.id,
125
125
  style: { lineHeight: 1.5, fontSize: "14px" }
126
126
  },
127
- /* @__PURE__ */ T("span", { children: [
128
- Z,
127
+ /* @__PURE__ */ R("span", { children: [
128
+ q,
129
129
  /* @__PURE__ */ o(
130
- A,
130
+ J,
131
131
  {
132
132
  component: "span",
133
133
  sx: {
134
134
  fontWeight: 700,
135
135
  borderRadius: "2px",
136
- backgroundColor: (le) => Bs(le.palette.primary.main, 0.18)
136
+ backgroundColor: (ce) => ws(ce.palette.primary.main, 0.18)
137
137
  },
138
- children: he
138
+ children: ge
139
139
  }
140
140
  ),
141
- se
141
+ te
142
142
  ] })
143
143
  );
144
144
  },
145
- renderInput: (g) => /* @__PURE__ */ o(
146
- ze,
145
+ renderInput: (y) => /* @__PURE__ */ o(
146
+ Me,
147
147
  {
148
- ...g,
149
- label: a("User"),
148
+ ...y,
149
+ label: l("User"),
150
150
  variant: "outlined",
151
151
  size: "small",
152
152
  inputRef: S
@@ -156,21 +156,21 @@ function He({
156
156
  )
157
157
  }
158
158
  ) }),
159
- /* @__PURE__ */ o(A, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ o(
160
- Ws,
159
+ /* @__PURE__ */ o(J, { sx: { flex: 1, minWidth: 0 }, children: /* @__PURE__ */ o(
160
+ js,
161
161
  {
162
162
  id: "selectedRoles",
163
163
  name: "selectedRoles",
164
- options: ee,
165
- control: y,
166
- isVirtualized: ee.length > We,
164
+ options: se,
165
+ control: g,
166
+ isVirtualized: se.length > je,
167
167
  getOptionLabel: (d) => d == null ? void 0 : d.name,
168
168
  dataTestId: "accessrights-select-role",
169
169
  renderInput: (d) => /* @__PURE__ */ o(
170
- ze,
170
+ Me,
171
171
  {
172
172
  ...d,
173
- label: a("Role"),
173
+ label: l("Role"),
174
174
  variant: "outlined",
175
175
  size: "small"
176
176
  }
@@ -178,25 +178,25 @@ function He({
178
178
  }
179
179
  ) }),
180
180
  /* @__PURE__ */ o(
181
- xs,
181
+ Ns,
182
182
  {
183
183
  variant: "contained",
184
184
  size: "small",
185
185
  "data-testid": "accessrights-add-button",
186
- startIcon: /* @__PURE__ */ o(w, { iconName: "faPlus" }),
186
+ startIcon: /* @__PURE__ */ o(W, { iconName: "faPlus" }),
187
187
  sx: { flexShrink: 0, alignSelf: { xs: "flex-end", md: "center" } },
188
- onClick: $((d) => {
189
- var _;
190
- K(d), B("", [...O, { userId: (_ = d.roles) == null ? void 0 : _.id }]), H();
188
+ onClick: M((d) => {
189
+ var A;
190
+ X(d), $("", [...O, { userId: (A = d.roles) == null ? void 0 : A.id }]), G();
191
191
  }),
192
- children: a("add")
192
+ children: l("Add")
193
193
  }
194
194
  )
195
195
  ]
196
196
  }
197
197
  );
198
198
  }
199
- He.propTypes = {
199
+ Xe.propTypes = {
200
200
  translate: x.any,
201
201
  permissionDetailsList: x.any,
202
202
  getPermissionDetails: x.any,
@@ -205,73 +205,73 @@ He.propTypes = {
205
205
  roleList: x.any,
206
206
  featureData: x.any
207
207
  };
208
- const Gs = we(() => import("./GrantPermissionModal-D7iNZd0M.js")), Hs = we(() => import("./PermissionsModal-CCYkcKlC.js"));
209
- function Ke({ config: a, row: K }) {
210
- var L;
211
- const [j, O] = c(null), P = !!j, X = (v) => {
212
- v.stopPropagation(), O(v.currentTarget), typeof a.menuClick == "function" && a.menuClick(K);
213
- }, U = (v) => {
214
- v && v.stopPropagation(), O(null);
215
- }, G = (v) => (y) => {
216
- y.stopPropagation(), typeof v.onClick == "function" && v.onClick(K), O(null);
208
+ const Ks = Ge(() => import("./GrantPermissionModal-D7iNZd0M.js")), Xs = Ge(() => import("./PermissionsModal-Dxbkkrqe.js"));
209
+ function Ze({ config: l, row: X }) {
210
+ var E;
211
+ const [w, O] = c(null), P = !!w, Z = (b) => {
212
+ b.stopPropagation(), O(b.currentTarget), typeof l.menuClick == "function" && l.menuClick(X);
213
+ }, U = (b) => {
214
+ b && b.stopPropagation(), O(null);
215
+ }, j = (b) => (g) => {
216
+ g.stopPropagation(), typeof b.onClick == "function" && b.onClick(X), O(null);
217
217
  };
218
- return /* @__PURE__ */ T(gs, { children: [
219
- /* @__PURE__ */ o(me, { title: a.tooltip, children: /* @__PURE__ */ o(
220
- pe,
218
+ return /* @__PURE__ */ R(xs, { children: [
219
+ /* @__PURE__ */ o(he, { title: l.tooltip, children: /* @__PURE__ */ o(
220
+ me,
221
221
  {
222
222
  size: "small",
223
- "aria-label": a.tooltip,
224
- onClick: X,
225
- "data-testid": a.dataTestId,
226
- children: a.icon
223
+ "aria-label": l.tooltip,
224
+ onClick: Z,
225
+ "data-testid": l.dataTestId,
226
+ children: l.icon
227
227
  }
228
228
  ) }),
229
229
  /* @__PURE__ */ o(
230
- Os,
230
+ Js,
231
231
  {
232
- anchorEl: j,
232
+ anchorEl: w,
233
233
  open: P,
234
234
  onClose: U,
235
235
  anchorOrigin: { vertical: "bottom", horizontal: "right" },
236
236
  transformOrigin: { vertical: "top", horizontal: "right" },
237
- children: (L = a.menuItems) == null ? void 0 : L.map((v, y) => /* @__PURE__ */ o(Ds, { onClick: G(v), children: v.label }, y))
237
+ children: (E = l.menuItems) == null ? void 0 : E.map((b, g) => /* @__PURE__ */ o(Ps, { onClick: j(b), children: b.label }, g))
238
238
  }
239
239
  )
240
240
  ] });
241
241
  }
242
- Ke.propTypes = {
242
+ Ze.propTypes = {
243
243
  config: x.any,
244
244
  row: x.any
245
245
  };
246
- function Ks({
247
- subMenuId: a,
246
+ function Zs({
247
+ subMenuId: l,
248
248
  // subMenuGroupName,
249
- subMenuFeatureVal: K,
249
+ subMenuFeatureVal: X,
250
250
  // selectedTab,
251
- parentLoading: j,
251
+ parentLoading: w,
252
252
  onNewAPIChange: O,
253
253
  rights: P
254
254
  }) {
255
- const X = ie(null), U = ie(!1), G = Ms(), L = ie(!1), { getCachedData: v } = Ge(), [y, $] = c([]), [H, R] = c([]), [F, ee] = c([]), [B, d] = c([]), [_, S] = c([]), [g, b] = c(""), [I, p] = c({}), [z, Z] = c(!1), [he, se] = c(!1), [le, Xe] = c(""), [N, Ze] = c(null), [qe, Qe] = c({}), [Ye, q] = c(!1), [Q, ve] = c(!1), [Ve, ce] = c(null), [E, es] = c([]), [ss, ye] = c(0), [de, ke] = c(""), { translate: m } = Us(), [ts, ge] = c(""), [ns, Ie] = c([]), [te, ue] = c(null), fe = Be.hasCheckRights(
255
+ const Z = oe(null), U = oe(!1), j = $s(), E = oe(!1), { getCachedData: b } = Ke(), [g, M] = c([]), [G, _] = c([]), [L, se] = c([]), [$, d] = c([]), [A, S] = c([]), [y, C] = c(""), [I, m] = c({}), [F, q] = c(!1), [ge, te] = c(!1), [ce, qe] = c(""), [N, Qe] = c(null), [Ye, Ve] = c({}), [es, Q] = c(!1), [Y, Oe] = c(!1), [ss, de] = c(null), [T, ts] = c([]), [ns, ye] = c(0), [ue, De] = c(""), { translate: h } = Bs(), [is, Ie] = c(""), [os, xe] = c([]), [ne, fe] = c(null), Se = we.hasCheckRights(
256
256
  P == null ? void 0 : P["update.manage.featurelist"],
257
257
  void 0,
258
258
  !0
259
- ), is = Be.hasCheckRights(
259
+ ), rs = we.hasCheckRights(
260
260
  P == null ? void 0 : P["delete.manage.featurelist"],
261
261
  void 0,
262
262
  !0
263
- ), Oe = re(() => {
263
+ ), Je = ae(() => {
264
264
  const e = /* @__PURE__ */ new Map();
265
- return (E || []).forEach((n) => e.set(String(n.id), n)), e;
266
- }, [E]), os = re(() => {
265
+ return (T || []).forEach((n) => e.set(String(n.id), n)), e;
266
+ }, [T]), as = ae(() => {
267
267
  const e = /* @__PURE__ */ new Map();
268
- return (y || []).forEach((n) => {
268
+ return (g || []).forEach((n) => {
269
269
  n != null && n.feature_name && e.set(n.feature_name, n.display_name);
270
270
  }), e;
271
- }, [y]), rs = () => {
271
+ }, [g]), ls = () => {
272
272
  var n;
273
- if (!E || E.length === 0) return null;
274
- const e = E.filter(
273
+ if (!T || T.length === 0) return null;
274
+ const e = T.filter(
275
275
  (i) => {
276
276
  var t;
277
277
  return (t = i == null ? void 0 : i.id) == null ? void 0 : t.startsWith("view");
@@ -287,31 +287,31 @@ function Ks({
287
287
  if (t.length > 0)
288
288
  return t[0].id;
289
289
  }
290
- return (n = E[0]) == null ? void 0 : n.id;
290
+ return (n = T[0]) == null ? void 0 : n.id;
291
291
  };
292
- ae(() => {
293
- let e = X.current;
292
+ le(() => {
293
+ let e = Z.current;
294
294
  return () => {
295
- G("conversion_event", {
295
+ j("conversion_event", {
296
296
  form: e,
297
297
  form_name: "Access Rights",
298
298
  submit: U.current
299
299
  });
300
300
  };
301
301
  }, []);
302
- const xe = (e) => {
302
+ const Ne = (e) => {
303
303
  var i;
304
304
  let n;
305
305
  return n = (i = e.userMenuItemDtos) == null ? void 0 : i.toSorted((t, s) => t.designationId !== void 0 && s.designationId !== void 0 ? t.designationId - s.designationId : t.designationId !== void 0 && s.designationId === void 0 ? -1 : t.designationId === void 0 && s.designationId !== void 0 ? 1 : t.userId !== void 0 && s.userId !== void 0 ? t.userId - s.userId : t.userId !== void 0 && s.userId === void 0 ? -1 : t.userId === void 0 && s.userId !== void 0 ? 1 : 0), n;
306
- }, Se = (e) => (e == null || e.userMenuItemDtos.forEach((n) => {
307
- n.featureJson = us(
306
+ }, Ce = (e) => (e == null || e.userMenuItemDtos.forEach((n) => {
307
+ n.featureJson = ps(
308
308
  JSON.parse(e.featureJson || "{}"),
309
309
  JSON.parse(n.featureJson || "{}")
310
310
  ), n.designationId ? (n.code = "Role", n.displayName = n.roleName) : (n.code = "User", n.displayName = n.fullName);
311
- }), e), as = async () => {
311
+ }), e), cs = async () => {
312
312
  var e, n;
313
313
  try {
314
- if (q((i) => !i), Q) {
314
+ if (Q((i) => !i), Y) {
315
315
  const i = [];
316
316
  Object.entries(JSON.parse(N == null ? void 0 : N.featureJson)).forEach(
317
317
  ([t, s]) => {
@@ -319,230 +319,230 @@ function Ks({
319
319
  }
320
320
  );
321
321
  try {
322
- await oe({
322
+ await re({
323
323
  code: "delete_permissions",
324
324
  parameters: {
325
325
  permissionList: i,
326
326
  roleId: parseInt(N == null ? void 0 : N.designationId),
327
327
  userId: parseInt(N == null ? void 0 : N.userId)
328
328
  }
329
- }), k({
329
+ }), v({
330
330
  type: "success",
331
331
  message: "Permission Deleted Successfully"
332
332
  });
333
- const { data: t } = await V(a);
334
- Y(t);
333
+ const { data: t } = await ee(l);
334
+ V(t);
335
335
  } catch {
336
- k({
336
+ v({
337
337
  type: "error",
338
338
  message: "error occurred"
339
339
  });
340
340
  }
341
341
  } else {
342
- await _s(le);
343
- let { data: i } = await Ce(a);
344
- (i == null ? void 0 : i.userMenuItemDtos.length) > 0 && (i = Se(i)), R(i.userMenuItemDtos);
342
+ await Ts(ce);
343
+ let { data: i } = await ve(l);
344
+ (i == null ? void 0 : i.userMenuItemDtos.length) > 0 && (i = Ce(i)), _(i.userMenuItemDtos);
345
345
  }
346
- Z(!1), q((i) => !i);
346
+ q(!1), Q((i) => !i);
347
347
  } catch (i) {
348
- k({
348
+ v({
349
349
  type: "error",
350
350
  message: `Error Deleting data: ${(n = (e = i == null ? void 0 : i.response) == null ? void 0 : e.data) == null ? void 0 : n.message}`
351
- }), q((t) => !t), Z(!1);
351
+ }), Q((t) => !t), q(!1);
352
352
  }
353
- }, ls = (e, n) => {
353
+ }, ds = (e, n) => {
354
354
  const i = new Set(e.map((s) => s.id)), t = [];
355
- return Object.entries(n).forEach(([s, r]) => {
356
- r === !0 && !i.has(s) && t.push({ id: s, action: "grant" });
355
+ return Object.entries(n).forEach(([s, a]) => {
356
+ a === !0 && !i.has(s) && t.push({ id: s, action: "grant" });
357
357
  }), e.forEach((s) => {
358
358
  n[s.id] || t.push({ id: s.id, action: "revoke" });
359
359
  }), t;
360
- }, { handleSubmit: cs } = je({}), De = async (e) => {
361
- var n, i, t, s, r, D;
360
+ }, { handleSubmit: us } = He({}), Pe = async (e) => {
361
+ var n, i, t, s, a, k;
362
362
  try {
363
- if (Q) {
363
+ if (Y) {
364
364
  e = { ...e, featureJson: JSON.parse(e == null ? void 0 : e.featureJson) };
365
- const l = ls(
365
+ const r = ds(
366
366
  e.permissions,
367
367
  e == null ? void 0 : e.featureJson
368
368
  );
369
- if (((n = l[0]) == null ? void 0 : n.action) === "grant")
370
- ce({
369
+ if (((n = r[0]) == null ? void 0 : n.action) === "grant")
370
+ de({
371
371
  ...e,
372
- id: (i = l[0]) == null ? void 0 : i.id
372
+ id: (i = r[0]) == null ? void 0 : i.id
373
373
  }), ye(1);
374
- else if (((t = l[0]) == null ? void 0 : t.action) === "revoke")
374
+ else if (((t = r[0]) == null ? void 0 : t.action) === "revoke")
375
375
  try {
376
- await oe({
376
+ await re({
377
377
  code: "revoke_permission",
378
378
  parameters: {
379
- featureName: (s = l[0]) == null ? void 0 : s.id,
379
+ featureName: (s = r[0]) == null ? void 0 : s.id,
380
380
  roleId: parseInt(e == null ? void 0 : e.designationId),
381
381
  userId: parseInt(e == null ? void 0 : e.userId)
382
382
  }
383
- }), k({
383
+ }), v({
384
384
  type: "success",
385
385
  message: "Permission Revoked Successfully"
386
386
  });
387
387
  } catch {
388
- k({
388
+ v({
389
389
  type: "error",
390
390
  message: "Error in revoking permission"
391
391
  });
392
392
  }
393
- const { data: u } = await V(a);
394
- Y(u);
393
+ const { data: u } = await ee(l);
394
+ V(u);
395
395
  } else
396
- await Rs(e);
397
- } catch (l) {
398
- k({
396
+ await Es(e);
397
+ } catch (r) {
398
+ v({
399
399
  type: "error",
400
- message: `Error Updating data: ${(D = (r = l == null ? void 0 : l.response) == null ? void 0 : r.data) == null ? void 0 : D.message}`
400
+ message: `Error Updating data: ${(k = (a = r == null ? void 0 : r.response) == null ? void 0 : a.data) == null ? void 0 : k.message}`
401
401
  });
402
402
  }
403
- }, ds = async (e) => {
403
+ }, fs = async (e) => {
404
404
  try {
405
405
  if (e = {
406
406
  ...e,
407
407
  featureJson: JSON.parse(e == null ? void 0 : e.featureJson)
408
408
  }, e != null && e.checkAll) {
409
409
  const i = Object.keys(e == null ? void 0 : e.featureJson).filter(
410
- (r) => (e == null ? void 0 : e.featureJson[r]) === !1
410
+ (a) => (e == null ? void 0 : e.featureJson[a]) === !1
411
411
  ), t = /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i, s = i.flatMap(
412
- (r) => t.test(r) ? [r, `${r}.candrilldown`] : [r]
412
+ (a) => t.test(a) ? [a, `${a}.candrilldown`] : [a]
413
413
  ).join(",");
414
- await oe({
414
+ await re({
415
415
  code: "grant_permission_bulk",
416
416
  parameters: {
417
417
  permission_id_list: s,
418
418
  role_id: parseInt(e == null ? void 0 : e.designationId),
419
419
  user_id: parseInt(e == null ? void 0 : e.userId)
420
420
  }
421
- }), k({
421
+ }), v({
422
422
  type: "success",
423
423
  message: "Permission granted Successfully"
424
424
  });
425
425
  }
426
- const { data: n } = await V(a);
427
- Y(n);
426
+ const { data: n } = await ee(l);
427
+ V(n);
428
428
  } catch (n) {
429
429
  console.error(n);
430
430
  }
431
- }, Je = async (e) => {
432
- var n, i, t, s;
431
+ }, Ae = async (e) => {
432
+ var n, i, t, s, a, k;
433
433
  if (!(e != null && e.roles || e != null && e.selectedRoles)) {
434
- k({
434
+ v({
435
435
  message: "Please select either user or role !!",
436
436
  type: "info"
437
437
  });
438
438
  return;
439
439
  }
440
- if (Q && y.length < 1) {
441
- k({
440
+ if (Y && g.length < 1) {
441
+ v({
442
442
  message: "Please add permissions first for this feature !!",
443
443
  type: "info"
444
444
  });
445
445
  return;
446
446
  }
447
447
  try {
448
- const r = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((h) => h == null ? void 0 : h.id)) || [], D = I != null && I.id ? H.some((h) => (h == null ? void 0 : h.userId) === (I == null ? void 0 : I.id)) : !1, l = (r == null ? void 0 : r.length) > 0 ? H.some(
449
- (h) => r.includes(h == null ? void 0 : h.designationId)
448
+ const r = ((n = e == null ? void 0 : e.selectedRoles) == null ? void 0 : n.map((f) => f == null ? void 0 : f.id)) || [], u = I != null && I.id ? G.some((f) => (f == null ? void 0 : f.userId) === (I == null ? void 0 : I.id)) : !1, H = (r == null ? void 0 : r.length) > 0 ? G.some(
449
+ (f) => r.includes(f == null ? void 0 : f.designationId)
450
450
  ) : !1;
451
- if (D || l)
452
- k({
451
+ if (u || H)
452
+ v({
453
453
  message: "Selected User Already found please select another id",
454
454
  type: "warning"
455
455
  });
456
456
  else {
457
- const h = r == null ? void 0 : r.join(","), W = {
457
+ const f = r == null ? void 0 : r.join(","), K = {
458
458
  userId: (i = e == null ? void 0 : e.roles) == null ? void 0 : i.id,
459
- designationId: h || null
460
- }, C = E.filter(
461
- (f) => {
462
- var M;
463
- return (M = f == null ? void 0 : f.id) == null ? void 0 : M.startsWith("view");
459
+ designationId: f || null
460
+ }, B = T.filter(
461
+ (p) => {
462
+ var z;
463
+ return (z = p == null ? void 0 : p.id) == null ? void 0 : z.startsWith("view");
464
464
  }
465
465
  );
466
- if (Q) {
467
- const f = (t = C.find(
468
- (J) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(J.id)
466
+ if (Y) {
467
+ const p = (t = B.find(
468
+ (D) => /^view\.report\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(D.id)
469
469
  )) == null ? void 0 : t.id;
470
- f ? ce({
471
- ...W,
472
- id: f
473
- }) : C.some((J) => J.id === "view.report") ? ce({
474
- ...W,
470
+ p ? de({
471
+ ...K,
472
+ id: p
473
+ }) : B.some((D) => D.id === "view.report") ? de({
474
+ ...K,
475
475
  id: "view.report"
476
- }) : ce({
477
- ...W,
478
- id: (C == null ? void 0 : C.filter((J) => J.id.split(".").length === 3).map((J) => J.id)[0]) || ((s = E[0]) == null ? void 0 : s.id)
476
+ }) : de({
477
+ ...K,
478
+ id: (B == null ? void 0 : B.filter((D) => D.id.split(".").length === 3).map((D) => D.id)[0]) || ((s = T[0]) == null ? void 0 : s.id)
479
479
  }), ye(1);
480
- const { data: M } = await V(a);
481
- Y(M);
480
+ const { data: z } = await ee(l);
481
+ V(z);
482
482
  } else {
483
- await Ts(a, W);
484
- let { data: f } = await Ce(a);
485
- (f == null ? void 0 : f.userMenuItemDtos.length) > 0 && (f == null ? void 0 : f.userMenuItemDtos.length) > 0 && (f = Se(f)), b(f == null ? void 0 : f.featureJson);
486
- const M = xe(f);
487
- R(M);
488
- const J = f.featureJson ? Object.keys(JSON.parse(f.featureJson)) : [];
489
- if (J.length > 0) {
490
- const { data: Ne } = await oe({
483
+ await Ls(l, K);
484
+ let { data: p } = await ve(l);
485
+ (p == null ? void 0 : p.userMenuItemDtos.length) > 0 && (p == null ? void 0 : p.userMenuItemDtos.length) > 0 && (p = Ce(p)), C(p == null ? void 0 : p.featureJson);
486
+ const z = Ne(p);
487
+ _(z);
488
+ const D = p.featureJson ? Object.keys(JSON.parse(p.featureJson)) : [];
489
+ if (D.length > 0) {
490
+ const { data: be } = await re({
491
491
  code: "retrieve_display_name_for_feature",
492
492
  parameters: {
493
- menu_id: a,
494
- feature_name_list: J
493
+ menu_id: l,
494
+ feature_name_list: D
495
495
  }
496
496
  });
497
- $(Ne.result);
497
+ M(be.result);
498
498
  } else
499
- $([]);
500
- k({
501
- message: "menu item added successfully",
499
+ M([]);
500
+ v({
501
+ message: (a = e == null ? void 0 : e.roles) != null && a.id && r.length > 0 ? "Permission granted to User and Role Successfully" : (k = e == null ? void 0 : e.roles) != null && k.id ? "Permission granted to User Successfully" : "Permission granted to Role Successfully",
502
502
  type: "success"
503
503
  });
504
504
  }
505
- U.current = !0, p({});
505
+ U.current = !0, m({});
506
506
  }
507
507
  } catch (r) {
508
- console.error(r), k({
509
- message: "cannot add menu item",
508
+ console.error(r), v({
509
+ message: "Cannot grant permission",
510
510
  type: "error"
511
511
  });
512
512
  }
513
- }, Ae = $e(
513
+ }, _e = We(
514
514
  (e) => {
515
515
  const n = (e || "").toLowerCase();
516
- if (ke(n), !n) {
517
- R(F);
516
+ if (De(n), !n) {
517
+ _(L);
518
518
  return;
519
519
  }
520
- const i = F == null ? void 0 : F.filter(
520
+ const i = L == null ? void 0 : L.filter(
521
521
  (t) => {
522
- var s, r;
523
- return t != null && t.designationId ? (s = t.roleName) == null ? void 0 : s.toLowerCase().includes(n) : (r = t.fullName) == null ? void 0 : r.toLowerCase().includes(n);
522
+ var s, a;
523
+ return t != null && t.designationId ? (s = t.roleName) == null ? void 0 : s.toLowerCase().includes(n) : (a = t.fullName) == null ? void 0 : a.toLowerCase().includes(n);
524
524
  }
525
525
  );
526
- G("search_tracking", {
526
+ j("search_tracking", {
527
527
  searchTerm: n,
528
528
  results_count: i.length,
529
529
  search_type: "Page Search"
530
- }), R(i);
530
+ }), _(i);
531
531
  },
532
- [F, G]
533
- ), us = (e, n = {}) => {
532
+ [L, j]
533
+ ), ps = (e, n = {}) => {
534
534
  const i = {};
535
535
  return Object.keys(e).forEach((t) => {
536
536
  Object.prototype.hasOwnProperty.call(n, t) ? i[t] = n[t] : i[t] = e[t];
537
537
  }), JSON.stringify(i);
538
- }, Pe = (e, n) => {
538
+ }, Re = (e, n) => {
539
539
  const i = new Set(n.map((s) => s.id)), t = {};
540
540
  return e.forEach((s) => {
541
541
  t[s.id] = i.has(s.id);
542
542
  }), JSON.stringify(t);
543
- }, Y = (e) => {
543
+ }, V = (e) => {
544
544
  e == null || e.userMenuItemDtos.forEach((t) => {
545
- t.id = (t == null ? void 0 : t.designationId) || (t == null ? void 0 : t.userId), t.featureJson = Pe(
545
+ t.id = (t == null ? void 0 : t.designationId) || (t == null ? void 0 : t.userId), t.featureJson = Re(
546
546
  e == null ? void 0 : e.permissions,
547
547
  t == null ? void 0 : t.permissions
548
548
  ), t.designationId ? (t.code = "Role", t.displayName = t.roleName) : (t.code = "User", t.displayName = t.fullName);
@@ -550,179 +550,176 @@ function Ks({
550
550
  const n = [
551
551
  ...new Set(e.permissions.map((t) => t.id))
552
552
  ];
553
- $(n), es(e == null ? void 0 : e.permissions);
554
- const i = xe(e);
555
- R(i), ee(i);
553
+ M(n), ts(e == null ? void 0 : e.permissions);
554
+ const i = Ne(e);
555
+ _(i), se(i);
556
556
  };
557
- ae(() => {
557
+ le(() => {
558
558
  (async () => {
559
559
  var n, i, t;
560
560
  try {
561
- if (a) {
562
- ue(null), _e(!1), q((u) => !u), ke("");
563
- let s, r;
564
- if (K) {
565
- if (L.current)
566
- s = (await V(a)).data;
561
+ if (l) {
562
+ fe(null), Te(!1), Q((u) => !u), De("");
563
+ let s, a;
564
+ if (X) {
565
+ if (E.current)
566
+ s = (await ee(l)).data;
567
567
  else
568
568
  try {
569
- s = (await Es(a)).data;
569
+ s = (await Fs(l)).data;
570
570
  } catch (u) {
571
- console.error("configtypesV2/summary unavailable, falling back to full bundle", u), L.current = !0, s = (await V(a)).data;
571
+ console.error("configtypesV2/summary unavailable, falling back to full bundle", u), E.current = !0, s = (await ee(l)).data;
572
572
  }
573
- r = !0, ve(!0), O({ id: a, val: !0 });
573
+ a = !0, Oe(!0), O({ id: l, val: !0 });
574
574
  } else
575
- s = (await Ce(a)).data, r = !1, ve(!1), O({ id: a, val: !1 });
576
- if (r)
577
- Y(s);
575
+ s = (await ve(l)).data, a = !1, Oe(!1), O({ id: l, val: !1 });
576
+ if (a)
577
+ V(s);
578
578
  else {
579
- (s == null ? void 0 : s.userMenuItemDtos.length) > 0 && (s = Se(s)), b(s == null ? void 0 : s.featureJson);
580
- const u = xe(s);
581
- R(u), ee(u);
579
+ (s == null ? void 0 : s.userMenuItemDtos.length) > 0 && (s = Ce(s)), C(s == null ? void 0 : s.featureJson);
580
+ const u = Ne(s);
581
+ _(u), se(u);
582
582
  }
583
- let D = _;
584
- if (!B || B.length === 0) {
585
- const u = await v({
583
+ let k = A;
584
+ if (!$ || $.length === 0) {
585
+ const u = await b({
586
586
  cacheKey: ["roleList"],
587
- fetchFn: async () => (await Fs()).data,
587
+ fetchFn: async () => (await Us()).data,
588
588
  staleTime: 3e5,
589
589
  cacheTime: 18e5
590
590
  });
591
- S(u), D = u;
591
+ S(u), k = u;
592
592
  }
593
- let l;
594
- if (r)
595
- l = s.permissions.map((u) => u.id), $(l);
596
- else if (l = s.featureJson ? Object.keys(JSON.parse(s.featureJson)) : [], l.length > 0) {
593
+ let r;
594
+ if (a)
595
+ r = s.permissions.map((u) => u.id), M(r);
596
+ else if (r = s.featureJson ? Object.keys(JSON.parse(s.featureJson)) : [], r.length > 0) {
597
597
  const [u] = await Promise.all([
598
- await oe({
598
+ await re({
599
599
  code: "retrieve_display_name_for_feature",
600
600
  parameters: {
601
- menu_id: a,
602
- feature_name_list: l
601
+ menu_id: l,
602
+ feature_name_list: r
603
603
  }
604
604
  })
605
605
  ]);
606
- $((n = u.data) == null ? void 0 : n.result);
606
+ M((n = u.data) == null ? void 0 : n.result);
607
607
  } else
608
- $([]);
609
- if (D && D.length > 0)
608
+ M([]);
609
+ if (k && k.length > 0)
610
610
  if (s.isDynamicFeature) {
611
- const h = JSON.parse(JSON.stringify(D)).filter((W) => {
612
- const C = W.roleType;
613
- return C === null || s != null && s.isMobileFeature && (s != null && s.isWebFeature) ? !0 : s.isMobileFeature ? C === "MOBILE" || C === "BOTH" : s.isWebFeature ? C === "WEB" || C === "BOTH" : !1;
611
+ const H = JSON.parse(JSON.stringify(k)).filter((pe) => {
612
+ const f = pe.roleType;
613
+ return f === null || s != null && s.isMobileFeature && (s != null && s.isWebFeature) ? !0 : s.isMobileFeature ? f === "MOBILE" || f === "BOTH" : s.isWebFeature ? f === "WEB" || f === "BOTH" : !1;
614
614
  });
615
- d(h);
615
+ d(H);
616
616
  } else
617
- d(D);
618
- q((u) => !u);
617
+ d(k);
618
+ Q((u) => !u);
619
619
  }
620
620
  } catch (s) {
621
- k({
621
+ v({
622
622
  type: "error",
623
623
  message: `Error loading initial data: ${(t = (i = s == null ? void 0 : s.response) == null ? void 0 : i.data) == null ? void 0 : t.message}`
624
- }), q((r) => !r);
624
+ }), Q((a) => !a);
625
625
  }
626
626
  })();
627
- }, [a, O]);
628
- const fs = $e(
629
- (e) => Oe.get(String(e)) || null,
630
- [Oe]
631
- ), ps = re(
632
- () => rs(),
633
- [E]
634
- ), [ms, _e] = c(!1), hs = (e) => async (n, i) => {
627
+ }, [l, O]);
628
+ const ms = We(
629
+ (e) => Je.get(String(e)) || null,
630
+ [Je]
631
+ ), hs = ae(
632
+ () => ls(),
633
+ [T]
634
+ ), [gs, Te] = c(!1), ys = (e) => async (n, i) => {
635
635
  const t = `panel${e == null ? void 0 : e.id}`;
636
- if (_e(i ? t : !1), i && Q && e && !e._permissionsLoaded && !L.current)
636
+ if (Te(i ? t : !1), i && Y && e && !e._permissionsLoaded && !E.current)
637
637
  try {
638
- const { data: s } = await Ls(a, {
638
+ const { data: s } = await zs(l, {
639
639
  userId: e.userId,
640
640
  roleId: e.designationId
641
641
  });
642
- e.permissions = s, e.featureJson = Pe(E, s), e._permissionsLoaded = !0, R((r) => [...r]);
642
+ e.permissions = s, e.featureJson = Re(T, s), e._permissionsLoaded = !0, _((a) => [...a]);
643
643
  } catch (s) {
644
- console.error(s), k({ type: "error", message: "Error loading permissions for row" });
644
+ console.error(s), v({ type: "error", message: "Error loading permissions for row" });
645
645
  }
646
- }, Re = ({
646
+ }, Ee = ({
647
647
  row: e,
648
648
  featureState: n,
649
649
  featureKey: i,
650
650
  lookupKey: t,
651
651
  index: s,
652
- withModal: r
652
+ withModal: a
653
653
  }) => {
654
- var M;
655
- const D = n[i] || !1, l = fs(t), u = (((M = l == null ? void 0 : l.child) == null ? void 0 : M.length) || 0) > 0, h = i === ps, W = !fe || h, C = (te == null ? void 0 : te.id) === (l == null ? void 0 : l.id), f = /* @__PURE__ */ o(
656
- vs,
654
+ var z;
655
+ const k = n[i] || !1, r = ms(t), u = (((z = r == null ? void 0 : r.child) == null ? void 0 : z.length) || 0) > 0, H = i === hs, pe = !Se || H, f = (ne == null ? void 0 : ne.id) === (r == null ? void 0 : r.id), K = /* @__PURE__ */ o(
656
+ Os,
657
657
  {
658
658
  sx: { mr: 0, minWidth: 0, flex: 1 },
659
659
  control: /* @__PURE__ */ o(
660
- ks,
660
+ Ds,
661
661
  {
662
662
  size: "small",
663
- disabled: W,
664
- checked: D,
663
+ disabled: pe,
664
+ checked: k,
665
665
  name: i,
666
666
  onClick: () => {
667
- const J = {
667
+ const D = {
668
668
  ...n,
669
- [i]: !D
669
+ [i]: !k
670
670
  };
671
- R(
672
- (Ne) => Ne.map(
673
- (be) => be.id === e.id ? {
674
- ...be,
675
- featureJson: JSON.stringify(J)
676
- } : be
671
+ _(
672
+ (be) => be.map(
673
+ (ke) => ke.id === e.id ? {
674
+ ...ke,
675
+ featureJson: JSON.stringify(D)
676
+ } : ke
677
677
  )
678
- ), De({
678
+ ), Pe({
679
679
  ...e,
680
- featureJson: JSON.stringify(J),
680
+ featureJson: JSON.stringify(D),
681
681
  code: e.designationId ? "Role" : "User",
682
- menuConfigId: a,
682
+ menuConfigId: l,
683
683
  displayName: e.designationId ? e.roleName : e.fullName
684
684
  });
685
685
  }
686
686
  }
687
687
  ),
688
- label: /* @__PURE__ */ o(ne, { variant: "body2", children: l ? l.name : t })
688
+ label: /* @__PURE__ */ o(ie, { variant: "body2", children: r ? r.name : t })
689
689
  }
690
- );
691
- return /* @__PURE__ */ T(
692
- A,
690
+ ), B = H ? [
691
+ r == null ? void 0 : r.desc,
692
+ h(
693
+ "This is the base right for the sub menu and cannot be changed here."
694
+ )
695
+ ].filter(Boolean).join(" — ") : (r == null ? void 0 : r.desc) || "";
696
+ return /* @__PURE__ */ R(
697
+ J,
693
698
  {
694
699
  sx: { display: "flex", alignItems: "center", gap: 0.5, minWidth: 0 },
695
700
  children: [
696
- h && fe ? /* @__PURE__ */ o(
697
- me,
698
- {
699
- title: m(
700
- "This is the base right for the sub menu and cannot be changed here."
701
- ),
702
- children: /* @__PURE__ */ o("span", { style: { display: "flex", flex: 1, minWidth: 0 }, children: f })
703
- }
704
- ) : f,
701
+ B ? /* @__PURE__ */ o(he, { title: B, children: /* @__PURE__ */ o("span", { style: { display: "flex", flex: 1, minWidth: 0 }, children: K }) }) : K,
705
702
  u && /* @__PURE__ */ o(
706
- me,
703
+ he,
707
704
  {
708
- title: m(C ? "Close Permissions" : "View Permissions"),
705
+ title: h(f ? "Close Permissions" : "View Permissions"),
709
706
  children: /* @__PURE__ */ o(
710
- pe,
707
+ me,
711
708
  {
712
709
  size: "small",
713
710
  color: "primary",
714
- "aria-label": m(C ? "Close Permissions" : "View Permissions"),
711
+ "aria-label": h(f ? "Close Permissions" : "View Permissions"),
715
712
  onClick: () => {
716
- if (C) {
717
- ue(null), r && (se(!1), ge(""), Ie([]));
713
+ if (f) {
714
+ fe(null), a && (te(!1), Ie(""), xe([]));
718
715
  return;
719
716
  }
720
- r && (ge(i), Ie(n), se(!0)), ue(l);
717
+ a && (Ie(i), xe(n), te(!0)), fe(r);
721
718
  },
722
719
  children: /* @__PURE__ */ o(
723
- w,
720
+ W,
724
721
  {
725
- iconName: C ? "faEyeSlash" : "faEye",
722
+ iconName: f ? "faEyeSlash" : "faEye",
726
723
  size: "sm"
727
724
  }
728
725
  )
@@ -734,45 +731,45 @@ function Ks({
734
731
  },
735
732
  `featureName-${s}`
736
733
  );
737
- }, ys = y.length > 0 || Object.keys(JSON.parse(g || "{}")).length > 0, Te = !!(he && te), Ee = ss === 1, Le = ie(!1), Fe = ie(!1);
738
- return Te && (Le.current = !0), Ee && (Fe.current = !0), /* @__PURE__ */ o(js, { isLoading: Ye || j, children: /* @__PURE__ */ T(A, { sx: { width: "100%" }, children: [
734
+ }, Is = g.length > 0 || Object.keys(JSON.parse(y || "{}")).length > 0, Le = !!(ge && ne), Fe = ns === 1, ze = oe(!1), Ue = oe(!1);
735
+ return Le && (ze.current = !0), Fe && (Ue.current = !0), /* @__PURE__ */ o(Hs, { isLoading: es || w, children: /* @__PURE__ */ R(J, { sx: { width: "100%" }, children: [
739
736
  /* @__PURE__ */ o(
740
- Js,
737
+ As,
741
738
  {
742
739
  description: N != null && N.displayName ? `Remove all access to this sub menu for ${N.code === "Role" ? "the role" : ""} ${N.displayName}? Every right listed below will be revoked.` : "Remove all access to this sub menu? Every right listed below will be revoked.",
743
- title: m("Remove access"),
744
- open: z && le === (N == null ? void 0 : N.id),
745
- handleClick: as,
746
- handleClose: () => Z((e) => !e),
740
+ title: h("Remove access"),
741
+ open: F && ce === (N == null ? void 0 : N.id),
742
+ handleClick: cs,
743
+ handleClose: () => q((e) => !e),
747
744
  dataTestId: "accessrights-delete-modal"
748
745
  }
749
746
  ),
750
- /* @__PURE__ */ T(Ps, { fallback: null, children: [
751
- Le.current && /* @__PURE__ */ o(
752
- Hs,
747
+ /* @__PURE__ */ R(Rs, { fallback: null, children: [
748
+ ze.current && /* @__PURE__ */ o(
749
+ Xs,
753
750
  {
754
- isOpen: Te,
751
+ isOpen: Le,
755
752
  onClose: () => {
756
- se((e) => !e), ue(null), ge(""), Ie([]);
753
+ te((e) => !e), fe(null), Ie(""), xe([]);
757
754
  },
758
- featureState: ns,
759
- featureName: ts,
760
- permissions: te
755
+ featureState: os,
756
+ featureName: is,
757
+ permissions: ne
761
758
  }
762
759
  ),
763
- Fe.current && /* @__PURE__ */ o(
764
- Gs,
760
+ Ue.current && /* @__PURE__ */ o(
761
+ Ks,
765
762
  {
766
- isOpen: Ee,
763
+ isOpen: Fe,
767
764
  onClose: () => ye(0),
768
- pendingGrant: Ve,
769
- subMenuId: a,
770
- newApiData: Y
765
+ pendingGrant: ss,
766
+ subMenuId: l,
767
+ newApiData: V
771
768
  }
772
769
  )
773
770
  ] }),
774
- /* @__PURE__ */ o("form", { ref: X, onSubmit: cs(Je), children: /* @__PURE__ */ T(
775
- A,
771
+ /* @__PURE__ */ o("form", { ref: Z, onSubmit: us(Ae), children: /* @__PURE__ */ R(
772
+ J,
776
773
  {
777
774
  sx: {
778
775
  display: "flex",
@@ -786,47 +783,47 @@ function Ks({
786
783
  },
787
784
  children: [
788
785
  /* @__PURE__ */ o(
789
- As,
786
+ _s,
790
787
  {
791
- value: de,
792
- onChange: Ae,
793
- placeholder: m("Search roles and users"),
788
+ value: ue,
789
+ onChange: _e,
790
+ placeholder: h("Search roles and users"),
794
791
  autoFocus: !1,
795
792
  "data-testid": "access-rights-textfield-search",
796
793
  sx: { width: { xs: "100%", lg: 240 }, flexShrink: 0 },
797
794
  slotProps: {
798
795
  htmlInput: {
799
- "aria-label": m("Search roles and users")
796
+ "aria-label": h("Search roles and users")
800
797
  }
801
798
  },
802
799
  inputProps: {
803
- startAdornment: /* @__PURE__ */ o(Me, { position: "start", children: /* @__PURE__ */ o(A, { sx: { color: "text.disabled", display: "flex" }, children: /* @__PURE__ */ o(w, { iconName: "faMagnifyingGlass", size: "sm" }) }) }),
804
- endAdornment: de ? /* @__PURE__ */ o(Me, { position: "end", children: /* @__PURE__ */ o(
805
- pe,
800
+ startAdornment: /* @__PURE__ */ o($e, { position: "start", children: /* @__PURE__ */ o(J, { sx: { color: "text.disabled", display: "flex" }, children: /* @__PURE__ */ o(W, { iconName: "faMagnifyingGlass", size: "sm" }) }) }),
801
+ endAdornment: ue ? /* @__PURE__ */ o($e, { position: "end", children: /* @__PURE__ */ o(
802
+ me,
806
803
  {
807
804
  size: "small",
808
- "aria-label": m("Clear search"),
809
- onClick: () => Ae(""),
810
- children: /* @__PURE__ */ o(w, { iconName: "faXmark", size: "sm" })
805
+ "aria-label": h("Clear search"),
806
+ onClick: () => _e(""),
807
+ children: /* @__PURE__ */ o(W, { iconName: "faXmark", size: "sm" })
811
808
  }
812
809
  ) }) : null
813
810
  }
814
811
  }
815
812
  ),
816
- fe && /* @__PURE__ */ o(
817
- He,
813
+ Se && /* @__PURE__ */ o(
814
+ Xe,
818
815
  {
819
- translate: m,
820
- onSubmit: Je,
821
- roleList: B,
822
- featureData: H
816
+ translate: h,
817
+ onSubmit: Ae,
818
+ roleList: $,
819
+ featureData: G
823
820
  }
824
821
  )
825
822
  ]
826
823
  }
827
824
  ) }),
828
- H.length === 0 ? /* @__PURE__ */ T(
829
- A,
825
+ G.length === 0 ? /* @__PURE__ */ R(
826
+ J,
830
827
  {
831
828
  "data-testid": "accessrights-empty-state",
832
829
  sx: {
@@ -840,22 +837,22 @@ function Ks({
840
837
  py: 6
841
838
  },
842
839
  children: [
843
- /* @__PURE__ */ o(A, { sx: { color: "text.disabled" }, children: /* @__PURE__ */ o(w, { iconName: "faUserShield", size: "2x" }) }),
844
- /* @__PURE__ */ o(ne, { variant: "subtitle1", sx: { fontWeight: 700 }, children: m(de ? "No roles or users match your search" : "No access granted yet") }),
845
- /* @__PURE__ */ o(ne, { variant: "body2", color: "text.secondary", children: m(de ? "Clear the search to see everyone with access." : "Pick a user or a role above and select Add to grant access to this sub menu.") })
840
+ /* @__PURE__ */ o(J, { sx: { color: "text.disabled" }, children: /* @__PURE__ */ o(W, { iconName: "faUserShield", size: "2x" }) }),
841
+ /* @__PURE__ */ o(ie, { variant: "subtitle1", sx: { fontWeight: 700 }, children: h(ue ? "No roles or users match your search" : "No access granted yet") }),
842
+ /* @__PURE__ */ o(ie, { variant: "body2", color: "text.secondary", children: h(ue ? "Clear the search to see everyone with access." : "Pick a user or a role above and select Add to grant access to this sub menu.") })
846
843
  ]
847
844
  }
848
- ) : /* @__PURE__ */ o(A, { children: H.map((e) => /* @__PURE__ */ T(
849
- Ss,
845
+ ) : /* @__PURE__ */ o(J, { children: G.map((e) => /* @__PURE__ */ R(
846
+ Cs,
850
847
  {
851
- expanded: ms === `panel${e == null ? void 0 : e.id}`,
852
- onChange: hs(e),
848
+ expanded: gs === `panel${e == null ? void 0 : e.id}`,
849
+ onChange: ys(e),
853
850
  slotProps: { transition: { unmountOnExit: !0 } },
854
851
  children: [
855
- /* @__PURE__ */ T(
856
- Ns,
852
+ /* @__PURE__ */ R(
853
+ bs,
857
854
  {
858
- expandIcon: /* @__PURE__ */ o(w, { iconName: "faAngleDown" }),
855
+ expandIcon: /* @__PURE__ */ o(W, { iconName: "faAngleDown" }),
859
856
  "aria-controls": `accessrights-panel-${e == null ? void 0 : e.id}-content`,
860
857
  id: `accessrights-panel-${e == null ? void 0 : e.id}-header`,
861
858
  sx: {
@@ -867,16 +864,16 @@ function Ks({
867
864
  },
868
865
  children: [
869
866
  /* @__PURE__ */ o(
870
- bs,
867
+ ks,
871
868
  {
872
869
  size: "small",
873
- label: m(e.code),
870
+ label: h(e.code),
874
871
  color: e.code === "Role" ? "primary" : "default",
875
872
  variant: "outlined"
876
873
  }
877
874
  ),
878
875
  /* @__PURE__ */ o(
879
- ne,
876
+ ie,
880
877
  {
881
878
  variant: "body2",
882
879
  noWrap: !0,
@@ -884,8 +881,8 @@ function Ks({
884
881
  children: e.displayName
885
882
  }
886
883
  ),
887
- /* @__PURE__ */ T(
888
- A,
884
+ /* @__PURE__ */ R(
885
+ J,
889
886
  {
890
887
  sx: {
891
888
  ml: "auto",
@@ -895,31 +892,31 @@ function Ks({
895
892
  gap: 0.5
896
893
  },
897
894
  children: [
898
- is && /* @__PURE__ */ o(me, { title: m("Remove access"), children: /* @__PURE__ */ o(
899
- pe,
895
+ rs && /* @__PURE__ */ o(he, { title: h("Remove access"), children: /* @__PURE__ */ o(
896
+ me,
900
897
  {
901
898
  size: "small",
902
899
  color: "error",
903
- "aria-label": `${m("Remove access")}: ${e.displayName}`,
900
+ "aria-label": `${h("Remove access")}: ${e.displayName}`,
904
901
  "data-testid": "accessrights-delete-icon",
905
902
  onClick: (n) => {
906
- n.stopPropagation(), n.preventDefault(), Z(!0), Xe(e.id), Ze(e);
903
+ n.stopPropagation(), n.preventDefault(), q(!0), qe(e.id), Qe(e);
907
904
  },
908
- children: /* @__PURE__ */ o(w, { iconName: "faTrash", size: "sm" })
905
+ children: /* @__PURE__ */ o(W, { iconName: "faTrash", size: "sm" })
909
906
  }
910
907
  ) }),
911
- fe && /* @__PURE__ */ o(
912
- Ke,
908
+ Se && /* @__PURE__ */ o(
909
+ Ze,
913
910
  {
914
911
  config: {
915
- tooltip: m("Bulk actions"),
916
- icon: /* @__PURE__ */ o(w, { iconName: "faPen", size: "sm" }),
912
+ tooltip: h("Bulk actions"),
913
+ icon: /* @__PURE__ */ o(W, { iconName: "faPen", size: "sm" }),
917
914
  dataTestId: "accessrights-edit-icon",
918
915
  menuClick: (n) => {
919
- Qe(() => ({
916
+ Ve(() => ({
920
917
  ...n,
921
918
  code: n.designationId ? "Role" : "User",
922
- menuConfigId: a,
919
+ menuConfigId: l,
923
920
  displayName: n.designationId ? n.roleName : n.fullName
924
921
  }));
925
922
  },
@@ -927,26 +924,26 @@ function Ks({
927
924
  {
928
925
  label: "Check All",
929
926
  onClick: (n) => {
930
- if (Q)
931
- ds({
927
+ if (Y)
928
+ fs({
932
929
  ...n,
933
930
  checkAll: !0
934
931
  });
935
932
  else {
936
- let i = JSON.parse(g);
937
- const t = (y == null ? void 0 : y.length) > 0 ? y.reduce(
938
- (s, { feature_name: r }) => (s[r] = !0, s),
933
+ let i = JSON.parse(y);
934
+ const t = (g == null ? void 0 : g.length) > 0 ? g.reduce(
935
+ (s, { feature_name: a }) => (s[a] = !0, s),
939
936
  {}
940
- ) : Object.keys(i).reduce((s, r) => (s[r] = !0, s), {});
941
- R(
937
+ ) : Object.keys(i).reduce((s, a) => (s[a] = !0, s), {});
938
+ _(
942
939
  (s) => s.map(
943
- (r) => r.id === n.id ? {
944
- ...r,
940
+ (a) => a.id === n.id ? {
941
+ ...a,
945
942
  featureJson: JSON.stringify(t)
946
- } : r
943
+ } : a
947
944
  )
948
- ), De({
949
- ...qe,
945
+ ), Pe({
946
+ ...Ye,
950
947
  featureJson: JSON.stringify(t)
951
948
  });
952
949
  }
@@ -963,8 +960,8 @@ function Ks({
963
960
  ]
964
961
  }
965
962
  ),
966
- /* @__PURE__ */ o(Cs, { id: `accessrights-panel-${e == null ? void 0 : e.id}-content`, children: ys ? /* @__PURE__ */ o(
967
- A,
963
+ /* @__PURE__ */ o(vs, { id: `accessrights-panel-${e == null ? void 0 : e.id}-content`, children: Is ? /* @__PURE__ */ o(
964
+ J,
968
965
  {
969
966
  sx: {
970
967
  display: "grid",
@@ -978,17 +975,17 @@ function Ks({
978
975
  },
979
976
  children: (() => {
980
977
  const n = JSON.parse(e.featureJson || "{}");
981
- return (y == null ? void 0 : y.length) > 0 ? Object.keys(n).map(
982
- (i, t) => Re({
978
+ return (g == null ? void 0 : g.length) > 0 ? Object.keys(n).map(
979
+ (i, t) => Ee({
983
980
  row: e,
984
981
  featureState: n,
985
982
  featureKey: i,
986
- lookupKey: os.get(i) || i,
983
+ lookupKey: as.get(i) || i,
987
984
  index: t,
988
985
  withModal: !0
989
986
  })
990
- ) : Object.keys(JSON.parse(g || "{}")).map(
991
- (i, t) => Re({
987
+ ) : Object.keys(JSON.parse(y || "{}")).map(
988
+ (i, t) => Ee({
992
989
  row: e,
993
990
  featureState: n,
994
991
  featureKey: i,
@@ -1000,12 +997,12 @@ function Ks({
1000
997
  })()
1001
998
  }
1002
999
  ) : /* @__PURE__ */ o(
1003
- ne,
1000
+ ie,
1004
1001
  {
1005
1002
  variant: "body2",
1006
1003
  color: "text.secondary",
1007
1004
  sx: { fontStyle: "italic", px: 1, py: 0.5 },
1008
- children: m("No rights configured for this sub menu yet")
1005
+ children: h("No rights configured for this sub menu yet")
1009
1006
  }
1010
1007
  ) })
1011
1008
  ]
@@ -1014,7 +1011,7 @@ function Ks({
1014
1011
  )) })
1015
1012
  ] }) });
1016
1013
  }
1017
- Ks.propTypes = {
1014
+ Zs.propTypes = {
1018
1015
  subMenuId: x.any,
1019
1016
  subMenuGroupName: x.any,
1020
1017
  selectedTab: x.any,
@@ -1026,6 +1023,6 @@ Ks.propTypes = {
1026
1023
  rights: x.any
1027
1024
  };
1028
1025
  export {
1029
- Ks as default
1026
+ Zs as default
1030
1027
  };
1031
- //# sourceMappingURL=AccessRights-DUgY6ewy.js.map
1028
+ //# sourceMappingURL=AccessRights-DBjTQA1-.js.map