@argusoft/medplat-core 1.0.30 → 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 (226) hide show
  1. package/dist/{AccessRights-xrday-L1.js → AccessRights-DBjTQA1-.js} +395 -390
  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-DmRW5bhm-Bk1szrjI.js → BrandsPage-CdcAvaml-ZtVTX6vX.js} +43 -43
  9. package/dist/{BrandsPage-DmRW5bhm-Bk1szrjI.js.map → BrandsPage-CdcAvaml-ZtVTX6vX.js.map} +1 -1
  10. package/dist/{CategoriesPage-BsS5IQh3-B03lWRY5.js → CategoriesPage-BprQEYJw-CclreTv1.js} +109 -102
  11. package/dist/CategoriesPage-BprQEYJw-CclreTv1.js.map +1 -0
  12. package/dist/{ChangePasswordModalCore-BPsJquTS.js → ChangePasswordModalCore-DZGOkbRY.js} +3 -3
  13. package/dist/{ChangePasswordModalCore-BPsJquTS.js.map → ChangePasswordModalCore-DZGOkbRY.js.map} +1 -1
  14. package/dist/ConditionConfig-Bpm6OoV5.js +408 -0
  15. package/dist/ConditionConfig-Bpm6OoV5.js.map +1 -0
  16. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.js → DashboardPage-CTiGSx71-CsYohJ5e.js} +32 -32
  17. package/dist/{DashboardPage-C3bKc5na-sBd9Yqbi.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/EventConfig-BY2cgGyx.js +27 -0
  21. package/dist/{EventConfig-BmLemzX3.js.map → EventConfig-BY2cgGyx.js.map} +1 -1
  22. package/dist/EventConfigurations-B-z7xHh_.js +544 -0
  23. package/dist/EventConfigurations-B-z7xHh_.js.map +1 -0
  24. package/dist/EventConfigurations.css +1 -1
  25. package/dist/EventsExceptionModal-DafomIv6.js +188 -0
  26. package/dist/EventsExceptionModal-DafomIv6.js.map +1 -0
  27. package/dist/EventsUi-Dl_yckSA.js +263 -0
  28. package/dist/EventsUi-Dl_yckSA.js.map +1 -0
  29. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js +112 -0
  30. package/dist/FacilityPicker-BXa2VF7i-Dab_Jwa5.js.map +1 -0
  31. package/dist/{FeatureMenu-DYJmDt7q.js → FeatureMenu-Kc73yPHH.js} +9 -5
  32. package/dist/FeatureMenu-Kc73yPHH.js.map +1 -0
  33. package/dist/{FhirServerList-DuTwnngN.js → FhirServerList-CrIHMAxz.js} +16 -16
  34. package/dist/{FhirServerList-DuTwnngN.js.map → FhirServerList-CrIHMAxz.js.map} +1 -1
  35. package/dist/{FhirServerProfile-CUOwC6Wb.js → FhirServerProfile-D3aYcpwY.js} +8 -8
  36. package/dist/{FhirServerProfile-CUOwC6Wb.js.map → FhirServerProfile-D3aYcpwY.js.map} +1 -1
  37. package/dist/{FhirServerWizard-DZI8Olku.js → FhirServerWizard-Db6Hm4bQ.js} +15 -15
  38. package/dist/{FhirServerWizard-DZI8Olku.js.map → FhirServerWizard-Db6Hm4bQ.js.map} +1 -1
  39. package/dist/{GrantPermissionModal-BDN66Atn.js → GrantPermissionModal-D7iNZd0M.js} +54 -51
  40. package/dist/GrantPermissionModal-D7iNZd0M.js.map +1 -0
  41. package/dist/ImmunizationConfigurationBase-lKsJZMak.js +8060 -0
  42. package/dist/ImmunizationConfigurationBase-lKsJZMak.js.map +1 -0
  43. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js +1017 -0
  44. package/dist/InventoryPage-JadYMCzU-CzJQfQ2A.js.map +1 -0
  45. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js +1344 -0
  46. package/dist/LocationWiseExpectedTargetPage-CjKk1aTF.js.map +1 -0
  47. package/dist/{ManageDynamicFeature-BU0I45dd.js → ManageDynamicFeature-CuyYfx_P.js} +104 -97
  48. package/dist/ManageDynamicFeature-CuyYfx_P.js.map +1 -0
  49. package/dist/ManageEventConfiguration-DqPbn3Oi.js +1216 -0
  50. package/dist/ManageEventConfiguration-DqPbn3Oi.js.map +1 -0
  51. package/dist/ManageEventConfiguration.css +1 -1
  52. package/dist/ManageRole-CyfpySt9.js +981 -0
  53. package/dist/ManageRole-CyfpySt9.js.map +1 -0
  54. package/dist/{ManageUser-DCFkUMV9.js → ManageUser-Dm0l833u.js} +286 -286
  55. package/dist/{ManageUser-DCFkUMV9.js.map → ManageUser-Dm0l833u.js.map} +1 -1
  56. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js → MemberProfileCard-01d_jz3w-DYHtbgMX.js} +46 -46
  57. package/dist/{MemberProfileCard-BdUNgHRB-VywqQdFF.js.map → MemberProfileCard-01d_jz3w-DYHtbgMX.js.map} +1 -1
  58. package/dist/MobileAnalytics-C9oc2yAo.js +18399 -0
  59. package/dist/MobileAnalytics-C9oc2yAo.js.map +1 -0
  60. package/dist/MobileMenuManagement-BmzTPXy7.js +231 -0
  61. package/dist/MobileMenuManagement-BmzTPXy7.js.map +1 -0
  62. package/dist/MobileTypeEventConfigModal-DodU3beR.js +752 -0
  63. package/dist/MobileTypeEventConfigModal-DodU3beR.js.map +1 -0
  64. package/dist/{NewServerManagement-Cxe0dV0O.js → NewServerManagement-BdayO78D.js} +368 -352
  65. package/dist/NewServerManagement-BdayO78D.js.map +1 -0
  66. package/dist/OtherTypeEventConfigModal-D_9S50aI.js +1414 -0
  67. package/dist/OtherTypeEventConfigModal-D_9S50aI.js.map +1 -0
  68. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js} +58 -58
  69. package/dist/{PaymentCreatePage-CIVe0P0p-25BQVpOX.js.map → PaymentCreatePage-D6NZBUC3-DxXf2kvH.js.map} +1 -1
  70. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js → PaymentsPage-CHieGNrn-BnYCtqHd.js} +37 -37
  71. package/dist/{PaymentsPage-BvPe5Q9F-D2gfziwW.js.map → PaymentsPage-CHieGNrn-BnYCtqHd.js.map} +1 -1
  72. package/dist/{PermissionsModal-CCYkcKlC.js → PermissionsModal-Dxbkkrqe.js} +18 -18
  73. package/dist/PermissionsModal-Dxbkkrqe.js.map +1 -0
  74. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js} +2 -2
  75. package/dist/{PickupBatchLinesEditor-DHmcAG23-DL2p6IKJ.js.map → PickupBatchLinesEditor-QPaqFtUO-CY7BShYh.js.map} +1 -1
  76. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js +801 -0
  77. package/dist/PickupCreatePage-C7_67u_u-OId8-e2a.js.map +1 -0
  78. package/dist/{PickupsPage-Ctpghavs-CUp4uIZq.js → PickupsPage-BWblMlic-CWkgeBw0.js} +132 -132
  79. package/dist/PickupsPage-BWblMlic-CWkgeBw0.js.map +1 -0
  80. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js +641 -0
  81. package/dist/PmGuard-BvUUbU80-BpYNaDzl.js.map +1 -0
  82. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js +1523 -0
  83. package/dist/ProductEditPage-Dbq4vUAA-BoBmTPPL.js.map +1 -0
  84. package/dist/{ProductsPage-CupVmOD4-D45a_hf-.js → ProductsPage-BI22nPb4-CQBjnc-n.js} +44 -43
  85. package/dist/ProductsPage-BI22nPb4-CQBjnc-n.js.map +1 -0
  86. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js +724 -0
  87. package/dist/PurchaseCreatePage-C0EK9z4w-BQMTsjE7.js.map +1 -0
  88. package/dist/{PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js → PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js} +428 -418
  89. package/dist/PurchaseRequestDetailPage-DhBuOGHZ-CWZPqzt9.js.map +1 -0
  90. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js} +65 -65
  91. package/dist/{PurchaseRequestsPage-DPAPzpmm-mDH2IrTl.js.map → PurchaseRequestsPage-Bj9HUMxb-B7-AxT8m.js.map} +1 -1
  92. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js → PurchasesPage-Djl1AqD_-DXeYFMrX.js} +55 -55
  93. package/dist/{PurchasesPage-It1GHiXl-eH4IsF_U.js.map → PurchasesPage-Djl1AqD_-DXeYFMrX.js.map} +1 -1
  94. package/dist/{RoleManagement-s8iNx2Mu.js → RoleManagement-DVYufwy-.js} +3 -3
  95. package/dist/{RoleManagement-s8iNx2Mu.js.map → RoleManagement-DVYufwy-.js.map} +1 -1
  96. package/dist/Roles-BoNGJhtR.js +19 -0
  97. package/dist/Roles-BoNGJhtR.js.map +1 -0
  98. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js → SaleCreatePage-DHBLmlBr-BlgjVsq6.js} +39 -39
  99. package/dist/{SaleCreatePage-C9kFmTvm-B3Y0o4CX.js.map → SaleCreatePage-DHBLmlBr-BlgjVsq6.js.map} +1 -1
  100. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js → SalesPage-eF9Yr42z-BQ9FlXC3.js} +61 -61
  101. package/dist/{SalesPage-D18DCseD-BxktGDRQ.js.map → SalesPage-eF9Yr42z-BQ9FlXC3.js.map} +1 -1
  102. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js +741 -0
  103. package/dist/SettingsPage-Cre-UE3r-9ntnLYsQ.js.map +1 -0
  104. package/dist/{ShowFlywayQuery-D1y_4A1u.js → ShowFlywayQuery-DIOUdYfG.js} +26 -19
  105. package/dist/{ShowFlywayQuery-D1y_4A1u.js.map → ShowFlywayQuery-DIOUdYfG.js.map} +1 -1
  106. package/dist/{StorageUnitsPage-7EqwuMOI-BwUso1Th.js → StorageUnitsPage-CTEVuemZ-B4osG74N.js} +253 -223
  107. package/dist/StorageUnitsPage-CTEVuemZ-B4osG74N.js.map +1 -0
  108. package/dist/{SubMenu-eEDhZUvh.js → SubMenu-OO2zhKiu.js} +5 -3
  109. package/dist/SubMenu-OO2zhKiu.js.map +1 -0
  110. package/dist/{TableDetails-BtafRxXb.js → TableDetails-Cc40dEUs.js} +272 -267
  111. package/dist/TableDetails-Cc40dEUs.js.map +1 -0
  112. package/dist/{TableList-Dpo6dO7S.js → TableList-B5tX4wII.js} +316 -312
  113. package/dist/TableList-B5tX4wII.js.map +1 -0
  114. package/dist/{TransactionsPage-DrH53pVS-BkhIGB6C.js → TransactionsPage-Zuu7sjID-B-ACzvd1.js} +195 -180
  115. package/dist/TransactionsPage-Zuu7sjID-B-ACzvd1.js.map +1 -0
  116. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js +635 -0
  117. package/dist/TransferCreatePage-DlT0nCDj-B2SdPgYB.js.map +1 -0
  118. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js +600 -0
  119. package/dist/TransfersPage-DqaSvHda-G2tFa5Jq.js.map +1 -0
  120. package/dist/TypeConfiguration-EaFiOzRE.js +114 -0
  121. package/dist/TypeConfiguration-EaFiOzRE.js.map +1 -0
  122. package/dist/UserList-Cf5B-o_1.js +1904 -0
  123. package/dist/UserList-Cf5B-o_1.js.map +1 -0
  124. package/dist/Users-MC7txo1V.js +43 -0
  125. package/dist/{Users-Bpc4Sazd.js.map → Users-MC7txo1V.js.map} +1 -1
  126. package/dist/VaccineEducation-T_UE57Ef.js +231 -0
  127. package/dist/VaccineEducation-T_UE57Ef.js.map +1 -0
  128. package/dist/VaccineEducation.css +1 -0
  129. package/dist/VaccineEducationConfigurator-CWc20_rv.js +50948 -0
  130. package/dist/VaccineEducationConfigurator-CWc20_rv.js.map +1 -0
  131. package/dist/VaccineEducationConfigurator.css +4 -0
  132. package/dist/VaccineEducationList-Ok7_5EFb.js +334 -0
  133. package/dist/VaccineEducationList-Ok7_5EFb.js.map +1 -0
  134. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js +457 -0
  135. package/dist/VialsPage-LoDaUqVv-DmMXbK8j.js.map +1 -0
  136. package/dist/{constants-ClZJY2x1-MkSWn6TZ.js → constants-BTpJFQe_-CYPZIqQF.js} +166 -56
  137. package/dist/constants-BTpJFQe_-CYPZIqQF.js.map +1 -0
  138. package/dist/dashboardLayoutUtils--xUnoKPa.js +615 -0
  139. package/dist/dashboardLayoutUtils--xUnoKPa.js.map +1 -0
  140. package/dist/index-mfoqII2U.js +524 -0
  141. package/dist/index-mfoqII2U.js.map +1 -0
  142. package/dist/{index-D9YNFPn9.js → index-o8Pyt1Bt.js} +445 -439
  143. package/dist/index-o8Pyt1Bt.js.map +1 -0
  144. package/dist/index.css +1 -1
  145. package/dist/index.js +1 -1
  146. package/dist/index.lib-BySa9-Z-.js +936 -0
  147. package/dist/index.lib-BySa9-Z-.js.map +1 -0
  148. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js +43 -0
  149. package/dist/listValueStore-5d4vNGQM-WclZ5nBG.js.map +1 -0
  150. package/package.json +5 -1
  151. package/dist/AccessRights-xrday-L1.js.map +0 -1
  152. package/dist/AddMenuConfiguration-e5BVXhmw.js +0 -8547
  153. package/dist/AddMenuConfiguration-e5BVXhmw.js.map +0 -1
  154. package/dist/CategoriesPage-BsS5IQh3-B03lWRY5.js.map +0 -1
  155. package/dist/ConditionConfig-Ddz9halE.js +0 -395
  156. package/dist/ConditionConfig-Ddz9halE.js.map +0 -1
  157. package/dist/ConditionConfig.css +0 -1
  158. package/dist/EntityManagement-CPQL6qBj.js +0 -50
  159. package/dist/EntityManagement-CPQL6qBj.js.map +0 -1
  160. package/dist/EventConfig-BmLemzX3.js +0 -26
  161. package/dist/EventConfigurations-Bzh1qWXU.js +0 -450
  162. package/dist/EventConfigurations-Bzh1qWXU.js.map +0 -1
  163. package/dist/EventsExceptionModal-B2SRrnB1.js +0 -200
  164. package/dist/EventsExceptionModal-B2SRrnB1.js.map +0 -1
  165. package/dist/EventsSkeleton-BIcPks4T.js +0 -61
  166. package/dist/EventsSkeleton-BIcPks4T.js.map +0 -1
  167. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js +0 -79
  168. package/dist/FacilityPicker-BiZeupmP-CyPHmj6b.js.map +0 -1
  169. package/dist/FeatureMenu-DYJmDt7q.js.map +0 -1
  170. package/dist/GrantPermissionModal-BDN66Atn.js.map +0 -1
  171. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js +0 -7639
  172. package/dist/ImmunizationConfigurationBase-Di1KO3oW.js.map +0 -1
  173. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js +0 -665
  174. package/dist/InventoryPage-C_AxSy7A-QLvlL4rE.js.map +0 -1
  175. package/dist/ManageDynamicFeature-BU0I45dd.js.map +0 -1
  176. package/dist/ManageEventConfiguration-CoYcpjR9.js +0 -1085
  177. package/dist/ManageEventConfiguration-CoYcpjR9.js.map +0 -1
  178. package/dist/ManageRole-CNZBRKGU.js +0 -776
  179. package/dist/ManageRole-CNZBRKGU.js.map +0 -1
  180. package/dist/MobileAnalytics-pQoE8cG1.js +0 -16888
  181. package/dist/MobileAnalytics-pQoE8cG1.js.map +0 -1
  182. package/dist/MobileMenuManagement-Cf8IZlla.js +0 -108
  183. package/dist/MobileMenuManagement-Cf8IZlla.js.map +0 -1
  184. package/dist/MobileTypeEventConfigModal-BeveaX0C.js +0 -783
  185. package/dist/MobileTypeEventConfigModal-BeveaX0C.js.map +0 -1
  186. package/dist/NewServerManagement-Cxe0dV0O.js.map +0 -1
  187. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js +0 -2046
  188. package/dist/OtherTypeEventConfigModal-CM6VkdmY.js.map +0 -1
  189. package/dist/PermissionsModal-CCYkcKlC.js.map +0 -1
  190. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js +0 -783
  191. package/dist/PickupCreatePage-CB0Sl0Hb-Mmj7zESG.js.map +0 -1
  192. package/dist/PickupsPage-Ctpghavs-CUp4uIZq.js.map +0 -1
  193. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js +0 -599
  194. package/dist/PmGuard-b10TGXEi-G3N0G_Wg.js.map +0 -1
  195. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js +0 -1302
  196. package/dist/ProductEditPage-C1thoKHu-URQaZ6st.js.map +0 -1
  197. package/dist/ProductsPage-CupVmOD4-D45a_hf-.js.map +0 -1
  198. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js +0 -648
  199. package/dist/PurchaseCreatePage-YD3NmhPQ-2j4etSjM.js.map +0 -1
  200. package/dist/PurchaseRequestDetailPage-Dg_MRY_N-D1bgTEAn.js.map +0 -1
  201. package/dist/Roles-BIyiic67.js +0 -14
  202. package/dist/Roles-BIyiic67.js.map +0 -1
  203. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js +0 -747
  204. package/dist/SettingsPage-VsxI-ano-DcmtUUEj.js.map +0 -1
  205. package/dist/StorageUnitsPage-7EqwuMOI-BwUso1Th.js.map +0 -1
  206. package/dist/SubMenu-eEDhZUvh.js.map +0 -1
  207. package/dist/TableDetails-BtafRxXb.js.map +0 -1
  208. package/dist/TableList-Dpo6dO7S.js.map +0 -1
  209. package/dist/TransactionsPage-DrH53pVS-BkhIGB6C.js.map +0 -1
  210. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js +0 -315
  211. package/dist/TransferCreatePage-CuvoMrYH-DTTfHjz-.js.map +0 -1
  212. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js +0 -476
  213. package/dist/TransfersPage-Cf701t8s-BBbN7cBf.js.map +0 -1
  214. package/dist/TypeConfiguration-3O6ABrK-.js +0 -117
  215. package/dist/TypeConfiguration-3O6ABrK-.js.map +0 -1
  216. package/dist/UserList-DgPxsnj2.js +0 -1129
  217. package/dist/UserList-DgPxsnj2.js.map +0 -1
  218. package/dist/Users-Bpc4Sazd.js +0 -41
  219. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js +0 -321
  220. package/dist/VialsPage-8oAc1yFv-Cl3FUXBJ.js.map +0 -1
  221. package/dist/constants-ClZJY2x1-MkSWn6TZ.js.map +0 -1
  222. package/dist/dashboardLayoutUtils-D1xCAxp3.js +0 -405
  223. package/dist/dashboardLayoutUtils-D1xCAxp3.js.map +0 -1
  224. package/dist/index-D9YNFPn9.js.map +0 -1
  225. package/dist/index.lib-Dn8PMkeD.js +0 -862
  226. package/dist/index.lib-Dn8PMkeD.js.map +0 -1
@@ -1,91 +1,91 @@
1
- import { jsxs as n, jsx as e } from "react/jsx-runtime";
2
- import { useState as f, useEffect as te, useMemo as ge } from "react";
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { useState as f, useEffect as ae, useMemo as ye } from "react";
3
3
  import { useLocation as $e } from "react-router-dom";
4
- import { Box as h, Typography as S, TextField as Z, Button as fe, IconButton as H, Tooltip as V, useTheme as Ue, alpha as O, FormControl as ze, InputLabel as Ee, Select as We, MenuItem as Q, InputAdornment as Le, Dialog as Oe, DialogTitle as Fe, DialogContent as Be, DialogActions as Pe } from "@mui/material";
5
- import { useTheme as ue, alpha as q } from "@mui/material/styles";
6
- import { execute as ye } from "@/common/services/GlobalApis";
7
- import be from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
8
- import { FontAwesomeIcon as w } from "@fortawesome/react-fontawesome";
9
- import { faSync as Ne, faUser as Ye, faEye as je, faCalendar as Ve, faSearch as me, faChartLine as He, faArrowLeft as qe, faInfo as Ge, faFilePdf as Je, faFileExcel as Ke, faFilter as Qe } from "@fortawesome/free-solid-svg-icons";
10
- import { showToast as X } from "@/common/toaster/toaster.jsx";
11
- import ve from "@/hooks/usePagination.js";
12
- import { useTranslateProvider as Se } from "@/common/languageTranslator/TranslationContext";
13
- import ee from "moment";
4
+ import { Box as g, Typography as k, TextField as te, Button as ue, IconButton as V, Tooltip as H, useTheme as Ee, alpha as W, FormControl as Ue, InputLabel as ze, Select as Oe, MenuItem as Z, InputAdornment as Le, Dialog as We, DialogTitle as Fe, DialogContent as Be, DialogActions as Pe } from "@mui/material";
5
+ import { useTheme as fe, alpha as q } from "@mui/material/styles";
6
+ import { execute as be } from "@/common/services/GlobalApis";
7
+ import Ne from "@/views/custom-components/CustomizedTable/CustomizedTableV2";
8
+ import { FontAwesomeIcon as R } from "@fortawesome/react-fontawesome";
9
+ import { faSync as ve, faUser as Ye, faEye as je, faCalendar as He, faSearch as me, faChartLine as Ve, faArrowLeft as qe, faInfo as Ge, faFilePdf as Ke, faFileExcel as Je, faFilter as Qe } from "@fortawesome/free-solid-svg-icons";
10
+ import { showToast as ee } from "@/common/toaster/toaster.jsx";
11
+ import Se from "@/hooks/usePagination.js";
12
+ import { useTranslateProvider as ke } from "@/common/languageTranslator/TranslationContext";
13
+ import re from "moment";
14
14
  import Xe from "@/views/custom-components/SideOverlay.jsx";
15
15
  import { DateRange as Ze } from "react-date-range";
16
16
  import "react-date-range/dist/styles.css";
17
17
  import "react-date-range/dist/theme/default.css";
18
- import { x as le } from "./xlsx.min-D1LFqt_b.js";
18
+ import { x as ie } from "./xlsx.min-D1LFqt_b.js";
19
19
  import j from "dayjs";
20
- import { p as ie } from "./pdfmake-Cf-381ou.js";
20
+ import { p as ce } from "./pdfmake-Cf-381ou.js";
21
21
  import et from "@/assets/fonts/vfs_fonts";
22
- const Ce = (i) => {
22
+ const Te = (i) => {
23
23
  if (!i) return "N/A";
24
- const p = ee(), T = ee(i), d = ee.duration(p.diff(T)), t = d.years(), m = d.months(), u = d.days(), b = d.hours(), A = d.minutes(), C = d.seconds();
24
+ const m = re(), C = re(i), p = re.duration(m.diff(C)), t = p.years(), u = p.months(), h = p.days(), N = p.hours(), _ = p.minutes(), T = p.seconds();
25
25
  if (t > 0) return `${t} year${t > 1 ? "s" : ""} ago`;
26
- if (m > 0) return `${m} month${m > 1 ? "s" : ""} ago`;
27
- if (u > 0) return `${u} day${u > 1 ? "s" : ""} ago`;
26
+ if (u > 0) return `${u} month${u > 1 ? "s" : ""} ago`;
27
+ if (h > 0) return `${h} day${h > 1 ? "s" : ""} ago`;
28
28
  let I = [];
29
- return b > 0 && I.push(`${b} hour${b > 1 ? "s" : ""}`), A > 0 && I.push(`${A} minute${A > 1 ? "s" : ""}`), C > 0 && b === 0 && I.push(`${C} second${C > 1 ? "s" : ""}`), I.length === 0 ? "Just now" : I.join(" ") + " ago";
30
- }, tt = (i) => i ? ee(i).format("DD/MM/YYYY hh:mm:ss A") : "N/A";
29
+ return N > 0 && I.push(`${N} hour${N > 1 ? "s" : ""}`), _ > 0 && I.push(`${_} minute${_ > 1 ? "s" : ""}`), T > 0 && N === 0 && I.push(`${T} second${T > 1 ? "s" : ""}`), I.length === 0 ? "Just now" : I.join(" ") + " ago";
30
+ }, tt = (i) => i ? re(i).format("DD/MM/YYYY hh:mm:ss A") : "N/A";
31
31
  function rt({ onUserSelect: i }) {
32
- const p = ue(), [T, d] = f([]), [t, m] = f(!0), [u, b] = f(!1), A = 50, { translate: C } = Se(), [I, F] = f(!1), [c, M] = f(""), $ = () => {
33
- if (!c.trim()) return;
34
- const s = parseInt(c, 10), o = T.find((D) => D.userId === s);
35
- i(s, o == null ? void 0 : o.parsedAttributes);
36
- }, z = [
32
+ const m = fe(), [C, p] = f([]), [t, u] = f(!0), [h, N] = f(!1), _ = 50, { translate: T } = ke(), [I, F] = f(!1), [d, $] = f(""), E = () => {
33
+ if (!d.trim()) return;
34
+ const l = parseInt(d, 10), o = C.find((D) => D.userId === l);
35
+ i(l, o == null ? void 0 : o.parsedAttributes);
36
+ }, U = [
37
37
  { field: "Sr. No.", label: "#", align: "left", width: "60px" },
38
38
  {
39
39
  field: "userId",
40
40
  label: "User Identity".toUpperCase(),
41
41
  align: "left",
42
- render: (s) => {
43
- var o, D, E, W, J, r, B, K;
44
- return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
45
- /* @__PURE__ */ e("div", { className: "w-6 h-6 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center", children: /* @__PURE__ */ e(w, { icon: Ye, className: "text-slate-400 text-[10px]" }) }),
42
+ render: (l) => {
43
+ var o, D, z, O, K, r, B, J;
44
+ return /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
45
+ /* @__PURE__ */ e("div", { className: "w-6 h-6 rounded-full bg-slate-100 dark:bg-slate-800 flex items-center justify-center", children: /* @__PURE__ */ e(R, { icon: Ye, className: "text-slate-400 text-[10px]" }) }),
46
46
  /* @__PURE__ */ e(
47
- V,
47
+ H,
48
48
  {
49
- title: /* @__PURE__ */ n("div", { className: "flex flex-col gap-1 text-xs", children: [
50
- /* @__PURE__ */ n("div", { children: [
49
+ title: /* @__PURE__ */ s("div", { className: "flex flex-col gap-1 text-xs", children: [
50
+ /* @__PURE__ */ s("div", { children: [
51
51
  /* @__PURE__ */ e("b", { children: "Username:" }),
52
52
  " ",
53
- ((o = s.parsedAttributes) == null ? void 0 : o.user_name) || "N/A"
53
+ ((o = l.parsedAttributes) == null ? void 0 : o.user_name) || "N/A"
54
54
  ] }),
55
- /* @__PURE__ */ n("div", { children: [
55
+ /* @__PURE__ */ s("div", { children: [
56
56
  /* @__PURE__ */ e("b", { children: "Name:" }),
57
57
  " ",
58
- ((D = s.parsedAttributes) == null ? void 0 : D.name) || "N/A"
58
+ ((D = l.parsedAttributes) == null ? void 0 : D.name) || "N/A"
59
59
  ] }),
60
- /* @__PURE__ */ n("div", { children: [
60
+ /* @__PURE__ */ s("div", { children: [
61
61
  /* @__PURE__ */ e("b", { children: "Role ID:" }),
62
62
  " ",
63
- ((E = s.parsedAttributes) == null ? void 0 : E.role_id) || "N/A"
63
+ ((z = l.parsedAttributes) == null ? void 0 : z.role_id) || "N/A"
64
64
  ] }),
65
- /* @__PURE__ */ n("div", { children: [
65
+ /* @__PURE__ */ s("div", { children: [
66
66
  /* @__PURE__ */ e("b", { children: "Role Name:" }),
67
67
  " ",
68
- ((W = s.parsedAttributes) == null ? void 0 : W.role_name) || "N/A"
68
+ ((O = l.parsedAttributes) == null ? void 0 : O.role_name) || "N/A"
69
69
  ] }),
70
- /* @__PURE__ */ n("div", { children: [
70
+ /* @__PURE__ */ s("div", { children: [
71
71
  /* @__PURE__ */ e("b", { children: "Role Code:" }),
72
72
  " ",
73
- ((J = s.parsedAttributes) == null ? void 0 : J.role_code) || "N/A"
73
+ ((K = l.parsedAttributes) == null ? void 0 : K.role_code) || "N/A"
74
74
  ] })
75
75
  ] }),
76
76
  arrow: !0,
77
77
  placement: "top",
78
- children: /* @__PURE__ */ n("div", { className: "flex flex-col cursor-pointer", children: [
79
- /* @__PURE__ */ n(S, { className: "text-sm font-black tracking-tight", sx: { color: p.palette.text.primary }, children: [
78
+ children: /* @__PURE__ */ s("div", { className: "flex flex-col cursor-pointer", children: [
79
+ /* @__PURE__ */ s(k, { className: "text-sm font-black tracking-tight", sx: { color: m.palette.text.primary }, children: [
80
80
  "User ID: ",
81
- s.userId
81
+ l.userId
82
82
  ] }),
83
- /* @__PURE__ */ n(S, { variant: "caption", className: "font-bold opacity-60 uppercase tracking-tighter", children: [
84
- ((r = s.parsedAttributes) == null ? void 0 : r.user_name) || "System User",
83
+ /* @__PURE__ */ s(k, { variant: "caption", className: "font-bold opacity-60 uppercase tracking-tighter", children: [
84
+ ((r = l.parsedAttributes) == null ? void 0 : r.user_name) || "System User",
85
85
  " ",
86
- (B = s.parsedAttributes) != null && B.name ? `• ${s.parsedAttributes.name}` : "",
86
+ (B = l.parsedAttributes) != null && B.name ? `• ${l.parsedAttributes.name}` : "",
87
87
  " ",
88
- (K = s.parsedAttributes) != null && K.role_code ? `(${s.parsedAttributes.role_code})` : ""
88
+ (J = l.parsedAttributes) != null && J.role_code ? `(${l.parsedAttributes.role_code})` : ""
89
89
  ] })
90
90
  ] })
91
91
  }
@@ -97,14 +97,14 @@ function rt({ onUserSelect: i }) {
97
97
  field: "systemInfo",
98
98
  label: "System Info".toUpperCase(),
99
99
  align: "left",
100
- render: (s) => {
101
- var o, D, E;
102
- return /* @__PURE__ */ n("div", { className: "flex flex-col max-w-[200px]", children: [
103
- /* @__PURE__ */ n(S, { variant: "caption", className: "font-bold opacity-80", sx: { color: p.palette.text.primary }, children: [
100
+ render: (l) => {
101
+ var o, D, z;
102
+ return /* @__PURE__ */ s("div", { className: "flex flex-col max-w-[200px]", children: [
103
+ /* @__PURE__ */ s(k, { variant: "caption", className: "font-bold opacity-80", sx: { color: m.palette.text.primary }, children: [
104
104
  "IP: ",
105
- ((o = s.parsedAttributes) == null ? void 0 : o.ip) || "N/A"
105
+ ((o = l.parsedAttributes) == null ? void 0 : o.ip) || "N/A"
106
106
  ] }),
107
- /* @__PURE__ */ e(V, { title: ((D = s.parsedAttributes) == null ? void 0 : D.user_agent) || "Unknown Device", arrow: !0, placement: "top", children: /* @__PURE__ */ e(S, { variant: "caption", className: "truncate font-mono opacity-60 text-[10px]", children: ((E = s.parsedAttributes) == null ? void 0 : E.user_agent) || "Unknown Device" }) })
107
+ /* @__PURE__ */ e(H, { title: ((D = l.parsedAttributes) == null ? void 0 : D.user_agent) || "Unknown Device", arrow: !0, placement: "top", children: /* @__PURE__ */ e(k, { variant: "caption", className: "truncate font-mono opacity-60 text-[10px]", children: ((z = l.parsedAttributes) == null ? void 0 : z.user_agent) || "Unknown Device" }) })
108
108
  ] });
109
109
  }
110
110
  },
@@ -112,23 +112,23 @@ function rt({ onUserSelect: i }) {
112
112
  field: "lastActivityTimestamp",
113
113
  label: "Last Active".toUpperCase(),
114
114
  align: "left",
115
- render: (s) => /* @__PURE__ */ e(V, { title: tt(s.lastActivityTimestamp), arrow: !0, placement: "top", children: /* @__PURE__ */ e(S, { className: "text-sm font-bold text-primary-main cursor-pointer", children: Ce(s.lastActivityTimestamp) }) })
115
+ render: (l) => /* @__PURE__ */ e(H, { title: tt(l.lastActivityTimestamp), arrow: !0, placement: "top", children: /* @__PURE__ */ e(k, { className: "text-sm font-bold text-primary-main cursor-pointer", children: Te(l.lastActivityTimestamp) }) })
116
116
  },
117
117
  {
118
118
  field: "ActionButtons",
119
119
  label: "Actions".toUpperCase(),
120
120
  align: "left",
121
- render: (s) => /* @__PURE__ */ e(V, { title: "View Detailed Activity History", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
122
- H,
121
+ render: (l) => /* @__PURE__ */ e(H, { title: "View Detailed Activity History", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
122
+ V,
123
123
  {
124
- onClick: () => i(s.userId, s.parsedAttributes),
124
+ onClick: () => i(l.userId, l.parsedAttributes),
125
125
  ref: (o) => {
126
126
  o && o.style.setProperty("border-radius", "50%", "important");
127
127
  },
128
128
  sx: {
129
- color: p.palette.primary.main,
130
- backgroundColor: q(p.palette.primary.main, 0.1),
131
- border: `1px solid ${p.palette.primary.main}`,
129
+ color: m.palette.primary.main,
130
+ backgroundColor: q(m.palette.primary.main, 0.1),
131
+ border: `1px solid ${m.palette.primary.main}`,
132
132
  borderRadius: "50% !important",
133
133
  width: 36,
134
134
  height: 36,
@@ -139,95 +139,95 @@ function rt({ onUserSelect: i }) {
139
139
  // Slightly raise to match symmetry with last active text
140
140
  transition: "all 0.2s ease-in-out",
141
141
  "&:hover": {
142
- backgroundColor: p.palette.primary.main,
142
+ backgroundColor: m.palette.primary.main,
143
143
  color: "white",
144
144
  transform: "scale(1.1)"
145
145
  }
146
146
  },
147
- children: /* @__PURE__ */ e(w, { icon: je, className: "text-base" })
147
+ children: /* @__PURE__ */ e(R, { icon: je, className: "text-base" })
148
148
  }
149
149
  ) })
150
150
  }
151
151
  ];
152
- async function G(s, o) {
152
+ async function G(l, o) {
153
153
  var D;
154
154
  try {
155
- o && b(!0);
156
- const E = {
157
- limit: s.limit,
158
- offset: s.offset || 0
155
+ o && N(!0);
156
+ const z = {
157
+ limit: l.limit,
158
+ offset: l.offset || 0
159
159
  // userId: manualSearchId || null
160
- }, W = await ye(
160
+ }, O = await be(
161
161
  {
162
162
  code: "LIVE_USER_ACTIVITY",
163
- parameters: E
163
+ parameters: z
164
164
  },
165
165
  { showLoader: !1 }
166
- ), r = (((D = W == null ? void 0 : W.data) == null ? void 0 : D.result) || []).map((B, K) => {
167
- let re = null;
166
+ ), r = (((D = O == null ? void 0 : O.data) == null ? void 0 : D.result) || []).map((B, J) => {
167
+ let oe = null;
168
168
  if (B.attributes)
169
169
  try {
170
- re = JSON.parse(B.attributes);
170
+ oe = JSON.parse(B.attributes);
171
171
  } catch {
172
172
  }
173
173
  return {
174
174
  ...B,
175
- parsedAttributes: re,
176
- index: (s.offset || 0) + K + 1
175
+ parsedAttributes: oe,
176
+ index: (l.offset || 0) + J + 1
177
177
  };
178
178
  });
179
- return o && b(!1), r;
179
+ return o && N(!1), r;
180
180
  } catch {
181
- return X({ message: "Failed to fetch active users", type: "error" }), b(!1), [];
181
+ return ee({ message: "Failed to fetch active users", type: "error" }), N(!1), [];
182
182
  }
183
183
  }
184
- const { data: R, fetchNextPage: x, hasNextPage: N } = ve({
184
+ const { data: w, fetchNextPage: y, hasNextPage: v } = Se({
185
185
  key: ["activeUsers", I],
186
- queryFn: ({ pageParam: s }) => {
187
- const o = !(s != null && s.offset) || (s == null ? void 0 : s.offset) === 0;
188
- return G(s, o);
186
+ queryFn: ({ pageParam: l }) => {
187
+ const o = !(l != null && l.offset) || (l == null ? void 0 : l.offset) === 0;
188
+ return G(l, o);
189
189
  },
190
- limit: A
190
+ limit: _
191
191
  });
192
- te(() => {
192
+ ae(() => {
193
193
  var o;
194
- const s = ((o = R == null ? void 0 : R.pages) == null ? void 0 : o.flat()) || [];
195
- m(N), d(s);
196
- }, [R, N]);
197
- const g = () => {
198
- F((s) => !s);
194
+ const l = ((o = w == null ? void 0 : w.pages) == null ? void 0 : o.flat()) || [];
195
+ u(v), p(l);
196
+ }, [w, v]);
197
+ const b = () => {
198
+ F((l) => !l);
199
199
  };
200
- return /* @__PURE__ */ n(h, { className: "flex flex-col h-full w-full", children: [
201
- /* @__PURE__ */ n(h, { className: "flex flex-col md:flex-row justify-between items-start md:items-center p-5 border-b border-slate-200/60 dark:border-slate-800/60 gap-4", children: [
202
- /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
203
- /* @__PURE__ */ e(S, { variant: "body2", className: "font-bold font-sans text-lg text-customBlue uppercase", children: C ? C("Live Activity") : "Live Activity" }),
204
- /* @__PURE__ */ e(S, { variant: "caption", className: "font-bold uppercase tracking-widest", sx: { color: p.palette.text.primary, opacity: 0.9 }, children: "Currently Active System Users" })
200
+ return /* @__PURE__ */ s(g, { className: "flex flex-col h-full w-full", children: [
201
+ /* @__PURE__ */ s(g, { className: "flex flex-col md:flex-row justify-between items-start md:items-center p-5 border-b border-slate-200/60 dark:border-slate-800/60 gap-4", children: [
202
+ /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
203
+ /* @__PURE__ */ e(k, { variant: "body2", className: "font-bold font-sans text-lg text-customBlue uppercase", children: T ? T("Live Activity") : "Live Activity" }),
204
+ /* @__PURE__ */ e(k, { variant: "caption", className: "font-bold uppercase tracking-widest", sx: { color: m.palette.text.primary, opacity: 0.9 }, children: "Currently Active System Users" })
205
205
  ] }),
206
- /* @__PURE__ */ n(h, { className: "flex flex-wrap items-center gap-3 w-full md:w-auto ml-auto", children: [
206
+ /* @__PURE__ */ s(g, { className: "flex flex-wrap items-center gap-3 w-full md:w-auto ml-auto", children: [
207
207
  /* @__PURE__ */ e(
208
- Z,
208
+ te,
209
209
  {
210
210
  size: "small",
211
211
  placeholder: "User ID lookup...",
212
- value: c,
213
- onChange: (s) => M(s.target.value),
214
- onKeyDown: (s) => s.key === "Enter" && $(),
212
+ value: d,
213
+ onChange: (l) => $(l.target.value),
214
+ onKeyDown: (l) => l.key === "Enter" && E(),
215
215
  sx: {
216
216
  width: { xs: "100%", md: "200px" },
217
217
  "& .MuiInputBase-root": {
218
- backgroundColor: p.palette.background.paper,
218
+ backgroundColor: m.palette.background.paper,
219
219
  borderRadius: "12px"
220
220
  }
221
221
  }
222
222
  }
223
223
  ),
224
224
  /* @__PURE__ */ e(
225
- fe,
225
+ ue,
226
226
  {
227
227
  variant: "contained",
228
228
  color: "primary",
229
229
  disableElevation: !0,
230
- onClick: $,
230
+ onClick: E,
231
231
  className: "rounded-xl font-black h-10 px-4 whitespace-nowrap",
232
232
  size: "small",
233
233
  children: "Show Activity"
@@ -235,24 +235,24 @@ function rt({ onUserSelect: i }) {
235
235
  ),
236
236
  /* @__PURE__ */ e("div", { className: "h-8 w-[1px] bg-slate-300 dark:bg-slate-700 mx-1 hidden md:block" }),
237
237
  /* @__PURE__ */ e(
238
- H,
238
+ V,
239
239
  {
240
240
  color: "primary",
241
- onClick: () => g(),
241
+ onClick: () => b(),
242
242
  className: "rounded-none border border-slate-200 dark:border-slate-800 shadow-sm",
243
243
  sx: {
244
- backgroundColor: q(p.palette.primary.main, 0.1),
244
+ backgroundColor: q(m.palette.primary.main, 0.1),
245
245
  width: 40,
246
246
  height: 40,
247
- "&:hover": { backgroundColor: p.palette.primary.main, color: "white" }
247
+ "&:hover": { backgroundColor: m.palette.primary.main, color: "white" }
248
248
  },
249
- children: /* @__PURE__ */ e(w, { icon: Ne, className: "text-sm" })
249
+ children: /* @__PURE__ */ e(R, { icon: ve, className: "text-sm" })
250
250
  }
251
251
  )
252
252
  ] })
253
253
  ] }),
254
254
  /* @__PURE__ */ e(
255
- h,
255
+ g,
256
256
  {
257
257
  className: "flex-1 overflow-hidden",
258
258
  sx: {
@@ -262,11 +262,11 @@ function rt({ onUserSelect: i }) {
262
262
  "& .MuiTableContainer-root": { height: "100% !important", maxHeight: "100% !important" }
263
263
  },
264
264
  children: /* @__PURE__ */ e(
265
- be,
265
+ Ne,
266
266
  {
267
267
  id: "active-user-list",
268
- columns: z,
269
- tableData: T,
268
+ columns: U,
269
+ tableData: C,
270
270
  actions: null,
271
271
  styleConfig: {
272
272
  cellStyle: { padding: "8px 16px", height: 40, maxLines: 1 }
@@ -274,11 +274,11 @@ function rt({ onUserSelect: i }) {
274
274
  paginationConfig: {
275
275
  pagination: !0,
276
276
  paginationType: "infinite-scroll",
277
- rowsPerPageInTable: A,
277
+ rowsPerPageInTable: _,
278
278
  hasMore: t,
279
- loadMore: () => t && x({ cancelRefetch: !1 })
279
+ loadMore: () => t && y({ cancelRefetch: !1 })
280
280
  },
281
- isLoading: u,
281
+ isLoading: h,
282
282
  emptyBoxText: "Silence... No active users found at the moment."
283
283
  }
284
284
  )
@@ -288,18 +288,18 @@ function rt({ onUserSelect: i }) {
288
288
  }
289
289
  function at({
290
290
  filter: i,
291
- onApply: p,
292
- handleOverlayState: T
291
+ onApply: m,
292
+ handleOverlayState: C
293
293
  }) {
294
- const { translate: d } = Se(), t = Ue(), m = t.palette.mode === "dark", [u, b] = f(i), [A, C] = f(!1), [I, F] = f([
294
+ const { translate: p } = ke(), t = Ee(), u = t.palette.mode === "dark", [h, N] = f(i), [_, T] = f(!1), [I, F] = f([
295
295
  {
296
296
  startDate: i.startTime ? new Date(i.startTime) : /* @__PURE__ */ new Date(),
297
297
  endDate: i.endTime ? new Date(i.endTime) : /* @__PURE__ */ new Date(),
298
298
  key: "selection"
299
299
  }
300
300
  ]);
301
- te(() => {
302
- b(i), F([
301
+ ae(() => {
302
+ N(i), F([
303
303
  {
304
304
  startDate: i.startTime ? new Date(i.startTime) : /* @__PURE__ */ new Date(),
305
305
  endDate: i.endTime ? new Date(i.endTime) : /* @__PURE__ */ new Date(),
@@ -307,28 +307,28 @@ function at({
307
307
  }
308
308
  ]);
309
309
  }, [i]);
310
- const c = (x) => {
311
- const { selection: N } = x;
312
- F([N]);
313
- const g = N.startDate ? M(N.startDate) : null, s = N.endDate ? M(N.endDate) : null;
314
- b((o) => ({
310
+ const d = (y) => {
311
+ const { selection: v } = y;
312
+ F([v]);
313
+ const b = v.startDate ? $(v.startDate) : null, l = v.endDate ? $(v.endDate) : null;
314
+ N((o) => ({
315
315
  ...o,
316
- startTime: g,
317
- endTime: s
316
+ startTime: b,
317
+ endTime: l
318
318
  }));
319
- }, M = (x) => {
320
- if (!x) return null;
321
- const N = new Date(x);
322
- return `${N.getFullYear()}-${String(N.getMonth() + 1).padStart(2, "0")}-${String(N.getDate()).padStart(2, "0")}`;
323
- }, $ = () => {
324
- if (!u.startTime && !u.endTime) return "Select date range";
325
- const x = u.startTime ? new Date(u.startTime).toLocaleDateString() : "", N = u.endTime ? new Date(u.endTime).toLocaleDateString() : "";
326
- return `${x} - ${N}`;
327
- }, z = (x, N) => {
328
- b((g) => ({ ...g, [x]: N }));
319
+ }, $ = (y) => {
320
+ if (!y) return null;
321
+ const v = new Date(y);
322
+ return `${v.getFullYear()}-${String(v.getMonth() + 1).padStart(2, "0")}-${String(v.getDate()).padStart(2, "0")}`;
323
+ }, E = () => {
324
+ if (!h.startTime && !h.endTime) return "Select date range";
325
+ const y = h.startTime ? new Date(h.startTime).toLocaleDateString() : "", v = h.endTime ? new Date(h.endTime).toLocaleDateString() : "";
326
+ return `${y} - ${v}`;
327
+ }, U = (y, v) => {
328
+ N((b) => ({ ...b, [y]: v }));
329
329
  }, G = () => {
330
- p(u);
331
- }, R = {
330
+ m(h);
331
+ }, w = {
332
332
  "& .MuiInputLabel-root": {
333
333
  color: t.palette.text.secondary,
334
334
  fontSize: "0.85rem",
@@ -337,54 +337,54 @@ function at({
337
337
  "&.Mui-focused": { color: t.palette.primary.main }
338
338
  },
339
339
  "& .MuiInputBase-root": {
340
- backgroundColor: O(t.palette.text.primary, 0.05),
340
+ backgroundColor: W(t.palette.text.primary, 0.05),
341
341
  borderRadius: "12px",
342
342
  color: t.palette.text.primary,
343
343
  marginTop: "20px",
344
344
  "& fieldset": {
345
- borderColor: O(t.palette.text.primary, 0.1),
345
+ borderColor: W(t.palette.text.primary, 0.1),
346
346
  borderRadius: "12px"
347
347
  },
348
- "&:hover fieldset": { borderColor: O(t.palette.text.primary, 0.3) },
348
+ "&:hover fieldset": { borderColor: W(t.palette.text.primary, 0.3) },
349
349
  "&.Mui-focused fieldset": { borderColor: t.palette.primary.main, borderWidth: "2px" }
350
350
  },
351
351
  "& .MuiInputBase-input": {
352
352
  padding: "10px 14px",
353
- colorScheme: m ? "dark" : "light"
353
+ colorScheme: u ? "dark" : "light"
354
354
  }
355
355
  };
356
- return /* @__PURE__ */ n(h, { className: "flex flex-col gap-6 p-6", children: [
357
- /* @__PURE__ */ n(h, { className: "flex flex-col gap-1.5 pt-1", children: [
358
- /* @__PURE__ */ e(S, { variant: "caption", sx: { color: t.palette.text.secondary, fontWeight: 500, fontSize: "0.85rem", transform: "translate(0, -1.5px)" }, children: d("Date Range") }),
359
- /* @__PURE__ */ n(
360
- h,
356
+ return /* @__PURE__ */ s(g, { className: "flex flex-col gap-6 p-6", children: [
357
+ /* @__PURE__ */ s(g, { className: "flex flex-col gap-1.5 pt-1", children: [
358
+ /* @__PURE__ */ e(k, { variant: "caption", sx: { color: t.palette.text.secondary, fontWeight: 500, fontSize: "0.85rem", transform: "translate(0, -1.5px)" }, children: p("Date Range") }),
359
+ /* @__PURE__ */ s(
360
+ g,
361
361
  {
362
- onClick: () => C(!A),
362
+ onClick: () => T(!_),
363
363
  className: "flex items-center justify-between gap-2 px-3 py-2.5 rounded-xl cursor-pointer transition-all",
364
364
  sx: {
365
- backgroundColor: O(t.palette.text.primary, 0.05),
366
- border: `1px solid ${O(t.palette.text.primary, 0.1)}`,
367
- "&:hover": { borderColor: O(t.palette.text.primary, 0.3) }
365
+ backgroundColor: W(t.palette.text.primary, 0.05),
366
+ border: `1px solid ${W(t.palette.text.primary, 0.1)}`,
367
+ "&:hover": { borderColor: W(t.palette.text.primary, 0.3) }
368
368
  },
369
369
  children: [
370
- /* @__PURE__ */ e(S, { variant: "body2", sx: { color: t.palette.text.primary, fontSize: "0.875rem" }, children: $() }),
371
- /* @__PURE__ */ e(w, { icon: Ve, className: "opacity-50 text-sm" })
370
+ /* @__PURE__ */ e(k, { variant: "body2", sx: { color: t.palette.text.primary, fontSize: "0.875rem" }, children: E() }),
371
+ /* @__PURE__ */ e(R, { icon: He, className: "opacity-50 text-sm" })
372
372
  ]
373
373
  }
374
374
  ),
375
- A && /* @__PURE__ */ e(
376
- h,
375
+ _ && /* @__PURE__ */ e(
376
+ g,
377
377
  {
378
378
  className: "mt-2 p-2 rounded-xl flex justify-center overflow-hidden border",
379
379
  sx: {
380
380
  backgroundColor: t.palette.background.paper,
381
- borderColor: O(t.palette.text.primary, 0.1),
381
+ borderColor: W(t.palette.text.primary, 0.1),
382
382
  "& .rdrCalendarWrapper": {
383
383
  backgroundColor: t.palette.background.paper,
384
384
  color: t.palette.text.primary
385
385
  },
386
386
  "& .rdrDateDisplayWrapper": {
387
- backgroundColor: O(t.palette.text.primary, 0.05)
387
+ backgroundColor: W(t.palette.text.primary, 0.05)
388
388
  },
389
389
  "& .rdrMonthAndYearWrapper": {
390
390
  color: t.palette.text.primary
@@ -398,12 +398,12 @@ function at({
398
398
  "& .rdrDayDisabled": {
399
399
  backgroundColor: "transparent",
400
400
  "& .rdrDayNumber span": {
401
- color: O(t.palette.text.primary, 0.25)
401
+ color: W(t.palette.text.primary, 0.25)
402
402
  }
403
403
  },
404
404
  "& .rdrDayPassive": {
405
405
  "& .rdrDayNumber span": {
406
- color: O(t.palette.text.primary, 0.3)
406
+ color: W(t.palette.text.primary, 0.3)
407
407
  }
408
408
  }
409
409
  },
@@ -411,7 +411,7 @@ function at({
411
411
  Ze,
412
412
  {
413
413
  editableDateInputs: !1,
414
- onChange: c,
414
+ onChange: d,
415
415
  moveRangeOnFirstSelection: !1,
416
416
  ranges: I,
417
417
  rangeColors: [t.palette.primary.main]
@@ -420,75 +420,75 @@ function at({
420
420
  }
421
421
  )
422
422
  ] }),
423
- /* @__PURE__ */ n(h, { className: "flex flex-col gap-4 pt-2", children: [
423
+ /* @__PURE__ */ s(g, { className: "flex flex-col gap-4 pt-2", children: [
424
424
  /* @__PURE__ */ e(
425
- Z,
425
+ te,
426
426
  {
427
- label: d("Session ID"),
428
- placeholder: d("e.g. E561890..."),
429
- value: u.sessionId || "",
430
- onChange: (x) => z("sessionId", x.target.value),
427
+ label: p("Session ID"),
428
+ placeholder: p("e.g. E561890..."),
429
+ value: h.sessionId || "",
430
+ onChange: (y) => U("sessionId", y.target.value),
431
431
  fullWidth: !0,
432
432
  size: "small",
433
433
  slotProps: { inputLabel: { shrink: !0 } },
434
- sx: R
434
+ sx: w
435
435
  }
436
436
  ),
437
- /* @__PURE__ */ n(ze, { fullWidth: !0, size: "small", sx: R, children: [
438
- /* @__PURE__ */ e(Ee, { shrink: !0, children: d("HTTP Method") }),
439
- /* @__PURE__ */ n(
440
- We,
437
+ /* @__PURE__ */ s(Ue, { fullWidth: !0, size: "small", sx: w, children: [
438
+ /* @__PURE__ */ e(ze, { shrink: !0, children: p("HTTP Method") }),
439
+ /* @__PURE__ */ s(
440
+ Oe,
441
441
  {
442
- value: u.httpMethod || "",
443
- onChange: (x) => z("httpMethod", x.target.value),
444
- label: d("HTTP Method"),
442
+ value: h.httpMethod || "",
443
+ onChange: (y) => U("httpMethod", y.target.value),
444
+ label: p("HTTP Method"),
445
445
  displayEmpty: !0,
446
446
  children: [
447
- /* @__PURE__ */ e(Q, { value: "", children: d("All Methods") }),
448
- /* @__PURE__ */ e(Q, { value: "GET", children: "GET" }),
449
- /* @__PURE__ */ e(Q, { value: "POST", children: "POST" }),
450
- /* @__PURE__ */ e(Q, { value: "PUT", children: "PUT" }),
451
- /* @__PURE__ */ e(Q, { value: "DELETE", children: "DELETE" }),
452
- /* @__PURE__ */ e(Q, { value: "PATCH", children: "PATCH" })
447
+ /* @__PURE__ */ e(Z, { value: "", children: p("All Methods") }),
448
+ /* @__PURE__ */ e(Z, { value: "GET", children: "GET" }),
449
+ /* @__PURE__ */ e(Z, { value: "POST", children: "POST" }),
450
+ /* @__PURE__ */ e(Z, { value: "PUT", children: "PUT" }),
451
+ /* @__PURE__ */ e(Z, { value: "DELETE", children: "DELETE" }),
452
+ /* @__PURE__ */ e(Z, { value: "PATCH", children: "PATCH" })
453
453
  ]
454
454
  }
455
455
  )
456
456
  ] }),
457
457
  /* @__PURE__ */ e(
458
- Z,
458
+ te,
459
459
  {
460
- label: d("Resource Path"),
460
+ label: p("Resource Path"),
461
461
  placeholder: "/api/v1/...",
462
- value: u.resource || "",
463
- onChange: (x) => z("resource", x.target.value),
462
+ value: h.resource || "",
463
+ onChange: (y) => U("resource", y.target.value),
464
464
  fullWidth: !0,
465
465
  size: "small",
466
466
  slotProps: { inputLabel: { shrink: !0 } },
467
- sx: R
467
+ sx: w
468
468
  }
469
469
  ),
470
470
  /* @__PURE__ */ e(
471
- Z,
471
+ te,
472
472
  {
473
- label: d("Response Code"),
473
+ label: p("Response Code"),
474
474
  placeholder: "200",
475
- value: u.responseCode || "",
476
- onChange: (x) => z("responseCode", x.target.value),
475
+ value: h.responseCode || "",
476
+ onChange: (y) => U("responseCode", y.target.value),
477
477
  fullWidth: !0,
478
478
  size: "small",
479
479
  type: "number",
480
480
  slotProps: { inputLabel: { shrink: !0 } },
481
- sx: R
481
+ sx: w
482
482
  }
483
483
  )
484
484
  ] }),
485
- /* @__PURE__ */ e(h, { className: "flex justify-stretch mt-4", children: /* @__PURE__ */ e(
486
- fe,
485
+ /* @__PURE__ */ e(g, { className: "flex justify-stretch mt-4", children: /* @__PURE__ */ e(
486
+ ue,
487
487
  {
488
488
  variant: "contained",
489
489
  onClick: G,
490
490
  fullWidth: !0,
491
- startIcon: /* @__PURE__ */ e(w, { icon: me }),
491
+ startIcon: /* @__PURE__ */ e(R, { icon: me }),
492
492
  sx: {
493
493
  backgroundColor: t.palette.primary.main,
494
494
  height: "45px",
@@ -498,59 +498,63 @@ function at({
498
498
  letterSpacing: "1px",
499
499
  "&:hover": { backgroundColor: t.palette.primary.dark }
500
500
  },
501
- children: d("Apply Filters")
501
+ children: p("Apply Filters")
502
502
  }
503
503
  ) })
504
504
  ] });
505
505
  }
506
- function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBack: d }) {
507
- const t = ue(), [m, u] = f([]), [b, A] = f(!0), [C, I] = f(!1), F = 50, [c, M] = f(i), [$, z] = f((i == null ? void 0 : i.toString()) || ""), [G, R] = f(!1), [x, N] = f(!1), [g, s] = f({
506
+ function ot({ selectedUserId: i, initialSessionId: m, initialAttributes: C, onBack: p }) {
507
+ const t = fe(), [u, h] = f([]), [N, _] = f(!0), [T, I] = f(!1), F = 50, [d, $] = f(i), [E, U] = f((i == null ? void 0 : i.toString()) || ""), [G, w] = f(!1), [y, v] = f(!1), [b, l] = f({
508
508
  sortBy: "timestamp",
509
509
  sortOrder: "desc"
510
510
  }), [o, D] = f({
511
511
  startTime: null,
512
512
  endTime: null,
513
- sessionId: p || null,
513
+ sessionId: m || null,
514
514
  httpMethod: null,
515
515
  resource: null,
516
516
  responseCode: null
517
- }), [E, W] = f(!1), J = (a) => a ? a === "/oauth/token" || a === "/api/oauth/token" ? `${a} (Login)` : a === "/user/logout" || a === "/api/user/logout" ? `${a} (Logout)` : a : "", r = ge(() => {
518
- if (T && (T.user_agent || T.userAgent || T.ip))
519
- return T;
520
- if (m && m.length > 0) {
521
- const a = m[0];
522
- if (a.attributes)
517
+ }), [z, O] = f(!1), K = (n, a) => {
518
+ if (!n) return "";
519
+ const c = n.toLowerCase(), M = c === "/oauth/token" || c === "/api/oauth/token" || c === "/oauth2/token" || c === "/api/oauth2/token", S = (a == null ? void 0 : a.event_type) === "TOKEN_REFRESH" || (a == null ? void 0 : a.eventType) === "TOKEN_REFRESH" || (a == null ? void 0 : a.query_params) && a.query_params.includes("grant_type=refresh_token");
520
+ return M && !S ? `${n} (Login)` : c === "/user/logout" || c === "/api/user/logout" ? `${n} (Logout)` : n;
521
+ }, r = ye(() => {
522
+ if (C && (C.user_agent || C.userAgent || C.ip))
523
+ return C;
524
+ if (u && u.length > 0) {
525
+ const n = u[0];
526
+ if (n.attributes)
523
527
  try {
524
- return JSON.parse(a.attributes);
528
+ return JSON.parse(n.attributes);
525
529
  } catch {
526
530
  }
527
531
  }
528
- return T || {};
529
- }, [T, m]);
530
- te(() => {
531
- M(i), z((i == null ? void 0 : i.toString()) || ""), p && D((a) => ({ ...a, sessionId: p }));
532
- }, [i, p]);
532
+ return C || {};
533
+ }, [C, u]);
534
+ ae(() => {
535
+ $(i), U((i == null ? void 0 : i.toString()) || ""), m && D((n) => ({ ...n, sessionId: m }));
536
+ }, [i, m]);
533
537
  const B = () => {
534
- if (!$.trim()) {
535
- X({ message: "Please enter a valid User ID", type: "warning" });
538
+ if (!E.trim()) {
539
+ ee({ message: "Please enter a valid User ID", type: "warning" });
536
540
  return;
537
541
  }
538
- const a = parseInt($, 10);
539
- if (isNaN(a)) {
540
- X({ message: "User ID must be a number", type: "warning" });
542
+ const n = parseInt(E, 10);
543
+ if (isNaN(n)) {
544
+ ee({ message: "User ID must be a number", type: "warning" });
541
545
  return;
542
546
  }
543
- M(a);
544
- }, K = () => {
545
- N((a) => !a);
546
- }, re = async (a) => {
547
- const l = g.sortBy === a.field && g.sortOrder === "asc" ? "desc" : "asc";
548
- s({ sortBy: a.field, sortOrder: l });
549
- }, he = (a) => {
550
- D(a), N((l) => !l), R(!1);
551
- }, ce = () => {
552
- R(!G);
553
- }, ke = () => {
547
+ $(n);
548
+ }, J = () => {
549
+ v((n) => !n);
550
+ }, oe = async (n) => {
551
+ const a = b.sortBy === n.field && b.sortOrder === "asc" ? "desc" : "asc";
552
+ l({ sortBy: n.field, sortOrder: a });
553
+ }, he = (n) => {
554
+ D(n), v((a) => !a), w(!1);
555
+ }, de = () => {
556
+ w(!G);
557
+ }, xe = () => {
554
558
  D({
555
559
  startTime: null,
556
560
  endTime: null,
@@ -558,176 +562,176 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
558
562
  httpMethod: null,
559
563
  resource: null,
560
564
  responseCode: null
561
- }), R(!1);
562
- }, Te = ge(() => {
563
- const a = [
565
+ }), w(!1);
566
+ }, Ce = ye(() => {
567
+ const n = [
564
568
  { field: "Sr. No.", label: "#", align: "left", width: "60px" },
565
569
  {
566
570
  field: "timestamp",
567
571
  label: "TIMESTAMP",
568
572
  sortable: !0,
569
- sortOrder: g.sortBy === "timestamp" ? g.sortOrder : "asc",
573
+ sortOrder: b.sortBy === "timestamp" ? b.sortOrder : "asc",
570
574
  align: "left",
571
- render: (l) => /* @__PURE__ */ e(V, { title: Ce(l.timestamp), arrow: !0, placement: "top", children: /* @__PURE__ */ n("div", { className: "inline-flex flex-col cursor-pointer", children: [
572
- /* @__PURE__ */ e(S, { className: "text-sm font-black", sx: { color: t.palette.text.primary }, children: j(l.timestamp).format("DD/MM/YYYY") }),
573
- /* @__PURE__ */ e(S, { variant: "caption", className: "font-bold text-primary-main opacity-80", children: j(l.timestamp).format("hh:mm:ss A") })
575
+ render: (a) => /* @__PURE__ */ e(H, { title: Te(a.timestamp), arrow: !0, placement: "top", children: /* @__PURE__ */ s("div", { className: "inline-flex flex-col cursor-pointer", children: [
576
+ /* @__PURE__ */ e(k, { className: "text-sm font-black", sx: { color: t.palette.text.primary }, children: j(a.timestamp).format("DD/MM/YYYY") }),
577
+ /* @__PURE__ */ e(k, { variant: "caption", className: "font-bold text-primary-main opacity-80", children: j(a.timestamp).format("hh:mm:ss A") })
574
578
  ] }) })
575
579
  }
576
580
  ];
577
- return o.sessionId || a.push({
581
+ return o.sessionId || n.push({
578
582
  field: "session_id",
579
583
  label: "SESSION ID",
580
584
  align: "left",
581
- render: (l) => /* @__PURE__ */ e(S, { variant: "caption", className: "font-mono font-bold opacity-70", children: l.session_id || "N/A" })
582
- }), a.push(
585
+ render: (a) => /* @__PURE__ */ e(k, { variant: "caption", className: "font-mono font-bold opacity-70", children: a.session_id || "N/A" })
586
+ }), n.push(
583
587
  {
584
588
  field: "http_method",
585
589
  label: "METHOD",
586
590
  sortable: !0,
587
- sortOrder: g.sortBy === "http_method" ? g.sortOrder : "asc",
591
+ sortOrder: b.sortBy === "http_method" ? b.sortOrder : "asc",
588
592
  align: "left",
589
- render: (l) => /* @__PURE__ */ e(S, { variant: "caption", className: "font-black uppercase tracking-widest", sx: { color: t.palette.text.primary }, children: l.http_method || "GET" })
593
+ render: (a) => /* @__PURE__ */ e(k, { variant: "caption", className: "font-black uppercase tracking-widest", sx: { color: t.palette.text.primary }, children: a.http_method || "GET" })
590
594
  },
591
595
  {
592
596
  field: "resource",
593
597
  label: "RESOURCE ACCESSED",
594
598
  sortable: !0,
595
- sortOrder: g.sortBy === "resource" ? g.sortOrder : "asc",
599
+ sortOrder: b.sortBy === "resource" ? b.sortOrder : "asc",
596
600
  align: "left",
597
- render: (l) => {
598
- const v = l.resource === "/oauth/token" || l.resource === "/api/oauth/token", U = l.resource === "/user/logout" || l.resource === "/api/user/logout", k = v || U, _ = v ? " (Login)" : " (Logout)", L = /* @__PURE__ */ n(h, { children: [
599
- /* @__PURE__ */ n(S, { variant: "body2", className: "font-bold", sx: { color: t.palette.text.primary }, children: [
600
- l.resource,
601
- k && /* @__PURE__ */ e("span", { className: "font-black text-primary-main ml-1", children: _ })
601
+ render: (a) => {
602
+ const c = a.resource ? a.resource.toLowerCase() : "", M = c === "/oauth/token" || c === "/api/oauth/token" || c === "/oauth2/token" || c === "/api/oauth2/token", S = a.event_type === "TOKEN_REFRESH" || a.eventType === "TOKEN_REFRESH" || a.query_params && a.query_params.includes("grant_type=refresh_token"), A = M && !S, L = A || (c === "/user/logout" || c === "/api/user/logout"), Q = A ? " (Login)" : " (Logout)", X = /* @__PURE__ */ s(g, { children: [
603
+ /* @__PURE__ */ s(k, { variant: "body2", className: "font-bold", sx: { color: t.palette.text.primary }, children: [
604
+ a.resource,
605
+ L && /* @__PURE__ */ e("span", { className: "font-black text-primary-main ml-1", children: Q })
602
606
  ] }),
603
- l.query_params && /* @__PURE__ */ e(S, { variant: "caption", className: "block font-mono opacity-50 truncate max-w-md", children: l.query_params })
607
+ a.query_params && /* @__PURE__ */ e(k, { variant: "caption", className: "block font-mono opacity-50 truncate max-w-md", children: a.query_params })
604
608
  ] });
605
- return l.query_params ? /* @__PURE__ */ e(V, { title: l.query_params, arrow: !0, placement: "top", children: L }) : L;
609
+ return a.query_params ? /* @__PURE__ */ e(H, { title: a.query_params, arrow: !0, placement: "top", children: X }) : X;
606
610
  }
607
611
  },
608
612
  {
609
613
  field: "response_code",
610
614
  label: "STATUS",
611
615
  sortable: !0,
612
- sortOrder: g.sortBy === "response_code" ? g.sortOrder : "asc",
616
+ sortOrder: b.sortBy === "response_code" ? b.sortOrder : "asc",
613
617
  align: "center",
614
- render: (l) => {
615
- const v = l.response_code || 200, U = v >= 200 && v < 300, k = U ? t.palette.success.main : t.palette.error.main;
616
- return /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ n(
617
- h,
618
+ render: (a) => {
619
+ const c = a.response_code || 200, M = c >= 200 && c < 300, S = M ? t.palette.success.main : t.palette.error.main;
620
+ return /* @__PURE__ */ e("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ s(
621
+ g,
618
622
  {
619
623
  className: "inline-flex items-center justify-center rounded-full text-[0.7rem] font-black px-3 py-1 border shadow-sm",
620
624
  sx: {
621
- backgroundColor: q(k, 0.1),
622
- color: k,
623
- borderColor: q(k, 0.2)
625
+ backgroundColor: q(S, 0.1),
626
+ color: S,
627
+ borderColor: q(S, 0.2)
624
628
  },
625
629
  children: [
626
630
  /* @__PURE__ */ e(
627
- h,
631
+ g,
628
632
  {
629
633
  component: "span",
630
- className: `w-1.5 h-1.5 rounded-full mr-2 ${U ? "bg-emerald-500 animate-pulse" : "bg-red-500"}`
634
+ className: `w-1.5 h-1.5 rounded-full mr-2 ${M ? "bg-emerald-500 animate-pulse" : "bg-red-500"}`
631
635
  }
632
636
  ),
633
- v
637
+ c
634
638
  ]
635
639
  }
636
640
  ) });
637
641
  }
638
642
  }
639
- ), i && !o.sessionId && a.push({
643
+ ), i && !o.sessionId && n.push({
640
644
  field: "Actions",
641
645
  label: "Trace Session".toUpperCase(),
642
646
  align: "center",
643
- render: (l) => /* @__PURE__ */ e(V, { title: "Filter Activity Analytics by this Session ID", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
644
- H,
647
+ render: (a) => /* @__PURE__ */ e(H, { title: "Filter Activity Analytics by this Session ID", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
648
+ V,
645
649
  {
646
- onClick: () => D((v) => ({ ...v, sessionId: l.session_id })),
650
+ onClick: () => D((c) => ({ ...c, sessionId: a.session_id })),
647
651
  sx: { color: t.palette.secondary.main },
648
- children: /* @__PURE__ */ e(w, { icon: He, className: "text-base" })
652
+ children: /* @__PURE__ */ e(R, { icon: Ve, className: "text-base" })
649
653
  }
650
654
  ) })
651
- }), a;
652
- }, [t, g, i, o.sessionId]);
653
- async function Ie(a, l) {
654
- var v;
655
+ }), n;
656
+ }, [t, b, i, o.sessionId]);
657
+ async function Ie(n, a) {
658
+ var c;
655
659
  try {
656
- if (!c && !o.sessionId) return [];
657
- l && I(!0);
658
- const U = {
659
- limit: a.limit,
660
- offset: a.offset || 0,
661
- userId: c,
660
+ if (!d && !o.sessionId) return [];
661
+ a && I(!0);
662
+ const M = {
663
+ limit: n.limit,
664
+ offset: n.offset || 0,
665
+ userId: d,
662
666
  startTime: o.startTime ? j(o.startTime).startOf("day").valueOf() : null,
663
667
  endTime: o.endTime ? j(o.endTime).endOf("day").valueOf() : null,
664
668
  sessionId: o.sessionId || null,
665
669
  httpMethod: o.httpMethod || null,
666
670
  resource: o.resource || null,
667
671
  responseCode: o.responseCode || null,
668
- sortBy: g.sortBy,
669
- sortOrder: g.sortOrder
670
- }, k = await ye(
672
+ sortBy: b.sortBy,
673
+ sortOrder: b.sortOrder
674
+ }, S = await be(
671
675
  {
672
676
  code: "GET_USER_ACTIVITY_BY_ID",
673
- parameters: U
677
+ parameters: M
674
678
  },
675
679
  { showLoader: !1 }
676
- ), L = (((v = k == null ? void 0 : k.data) == null ? void 0 : v.result) || []).map((Y, oe) => ({
677
- ...Y,
678
- index: (a.offset || 0) + oe + 1
680
+ ), Y = (((c = S == null ? void 0 : S.data) == null ? void 0 : c.result) || []).map((L, Q) => ({
681
+ ...L,
682
+ index: (n.offset || 0) + Q + 1
679
683
  }));
680
- return l && I(!1), L;
684
+ return a && I(!1), Y;
681
685
  } catch {
682
- return X({ message: "Failed to fetch user activities", type: "error" }), I(!1), [];
686
+ return ee({ message: "Failed to fetch user activities", type: "error" }), I(!1), [];
683
687
  }
684
688
  }
685
- const { data: ae, fetchNextPage: De, hasNextPage: xe } = ve({
689
+ const { data: ne, fetchNextPage: De, hasNextPage: ge } = Se({
686
690
  key: [
687
691
  "userActivity",
688
- c,
692
+ d,
689
693
  o.startTime,
690
694
  o.endTime,
691
695
  o.sessionId,
692
696
  o.httpMethod,
693
697
  o.resource,
694
698
  o.responseCode,
695
- g,
696
- x
699
+ b,
700
+ y
697
701
  ],
698
- queryFn: ({ pageParam: a }) => {
699
- const l = !(a != null && a.offset) || (a == null ? void 0 : a.offset) === 0;
700
- return Ie(a, l);
702
+ queryFn: ({ pageParam: n }) => {
703
+ const a = !(n != null && n.offset) || (n == null ? void 0 : n.offset) === 0;
704
+ return Ie(n, a);
701
705
  },
702
706
  limit: F,
703
- enabled: !!c || !!o.sessionId
707
+ enabled: !!d || !!o.sessionId
704
708
  });
705
- te(() => {
706
- var l;
707
- const a = ((l = ae == null ? void 0 : ae.pages) == null ? void 0 : l.flat()) || [];
708
- A(a.length > 0 ? xe : !1), u(a);
709
- }, [ae, xe]);
710
- const we = async () => {
709
+ ae(() => {
710
+ var a;
711
+ const n = ((a = ne == null ? void 0 : ne.pages) == null ? void 0 : a.flat()) || [];
712
+ _(n.length > 0 ? ge : !1), h(n);
713
+ }, [ne, ge]);
714
+ const Ae = async () => {
711
715
  try {
712
- if (m.length === 0) return;
713
- const a = (y) => y ? y.split("&").map((P) => {
714
- var ne;
715
- return ((ne = P.match(/.{1,15}/g)) == null ? void 0 : ne.join("​")) || P;
716
+ if (u.length === 0) return;
717
+ const n = (x) => x ? x.split("&").map((P) => {
718
+ var se;
719
+ return ((se = P.match(/.{1,15}/g)) == null ? void 0 : se.join("​")) || P;
716
720
  }).join(`
717
- `) : "N/A", l = !o.sessionId, v = ["Date", "Time"];
718
- l && v.push("Session ID"), v.push("Method", "API url", "Params", "Status");
719
- const U = m.map((y) => {
721
+ `) : "N/A", a = !o.sessionId, c = ["Date", "Time"];
722
+ a && c.push("Session ID"), c.push("Method", "API url", "Params", "Status");
723
+ const M = u.map((x) => {
720
724
  const P = {
721
- Date: j(y.timestamp).format("DD/MM/YYYY"),
722
- Time: j(y.timestamp).format("hh:mm:ss A"),
723
- Method: y.http_method || "N/A",
724
- "API url": J(y.resource),
725
- Params: a(y.query_params),
726
- Status: y.response_code || "N/A"
725
+ Date: j(x.timestamp).format("DD/MM/YYYY"),
726
+ Time: j(x.timestamp).format("hh:mm:ss A"),
727
+ Method: x.http_method || "N/A",
728
+ "API url": K(x.resource, x),
729
+ Params: n(x.query_params),
730
+ Status: x.response_code || "N/A"
727
731
  };
728
- return l && (P["Session ID"] = y.session_id || "N/A"), P;
729
- }), k = /* @__PURE__ */ new Date(), _ = `UserActivityDetail_${c || "Session"}-${k.getDate()}-${k.getMonth() + 1}-${k.getFullYear()}.pdf`, L = l ? [20, 50, 55, 90, 35, "*", 130, 30] : [20, 55, 60, 35, "*", 140, 35];
730
- ie.vfs = { ...et, ...ie.vfs }, ie.addFonts({
732
+ return a && (P["Session ID"] = x.session_id || "N/A"), P;
733
+ }), S = /* @__PURE__ */ new Date(), A = `UserActivityDetail_${d || "Session"}-${S.getDate()}-${S.getMonth() + 1}-${S.getFullYear()}.pdf`, Y = a ? [20, 50, 55, 90, 35, "*", 130, 30] : [20, 55, 60, 35, "*", 140, 35];
734
+ ce.vfs = { ...et, ...ce.vfs }, ce.addFonts({
731
735
  Roboto: {
732
736
  normal: "Roboto-Regular.ttf",
733
737
  bold: "Roboto-Medium.ttf",
@@ -741,7 +745,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
741
745
  bolditalics: "MuktaVaani-Regular.ttf"
742
746
  }
743
747
  });
744
- const Y = (y) => /[\u0A80-\u0AFF]/.test(y), oe = [
748
+ const L = (x) => /[\u0A80-\u0AFF]/.test(x), Q = [
745
749
  {
746
750
  text: "USER ACTIVITY TRACE REPORT",
747
751
  fontSize: 12,
@@ -751,7 +755,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
751
755
  font: "Roboto"
752
756
  },
753
757
  {
754
- text: `User ID: ${c || (r == null ? void 0 : r.user_id) || "N/A"} | Username: ${(r == null ? void 0 : r.user_name) || "N/A"}`,
758
+ text: `User ID: ${d || (r == null ? void 0 : r.user_id) || "N/A"} | Username: ${(r == null ? void 0 : r.user_name) || "N/A"}`,
755
759
  fontSize: 8.5,
756
760
  alignment: "center",
757
761
  margin: [0, 1],
@@ -778,53 +782,53 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
778
782
  margin: [0, 1],
779
783
  font: "Roboto"
780
784
  }
781
- ], de = ["S.No", ...v], Re = U.map((y, P) => [
785
+ ], X = ["S.No", ...c], _e = M.map((x, P) => [
782
786
  { text: P + 1, fontSize: 8 },
783
- ...v.map((ne) => {
784
- const pe = y[ne], se = (pe == null ? void 0 : pe.toString()) || "", _e = se.includes("(Login)") || se.includes("(Logout)");
787
+ ...c.map((se) => {
788
+ const pe = x[se], le = (pe == null ? void 0 : pe.toString()) || "", Me = le.includes("(Login)") || le.includes("(Logout)");
785
789
  return {
786
- text: se,
790
+ text: le,
787
791
  fontSize: 8,
788
- bold: _e ? !0 : void 0,
789
- font: Y(se) ? "MuktaVaani" : "Roboto"
792
+ bold: Me ? !0 : void 0,
793
+ font: L(le) ? "MuktaVaani" : "Roboto"
790
794
  };
791
795
  })
792
- ]), Me = {
796
+ ]), we = {
793
797
  pageOrientation: "landscape",
794
798
  content: [
795
- ...oe,
799
+ ...Q,
796
800
  {
797
801
  table: {
798
802
  headerRows: 1,
799
- widths: L,
803
+ widths: Y,
800
804
  body: [
801
- de.map((y) => ({
802
- text: y,
805
+ X.map((x) => ({
806
+ text: x,
803
807
  fillColor: "#243a50",
804
808
  color: "#ffffff",
805
809
  bold: !0,
806
810
  fontSize: 8.5
807
811
  })),
808
- ...Re
812
+ ..._e
809
813
  ]
810
814
  },
811
815
  layout: {
812
- fillColor: (y) => y === 0 ? "#243a50" : null,
816
+ fillColor: (x) => x === 0 ? "#243a50" : null,
813
817
  hLineWidth: () => 0.1,
814
818
  vLineWidth: () => 0.1
815
819
  },
816
820
  margin: [0, 8]
817
821
  }
818
822
  ],
819
- footer: (y, P) => ({
820
- text: `Page ${y} of ${P} | User Activity Trace`,
823
+ footer: (x, P) => ({
824
+ text: `Page ${x} of ${P} | User Activity Trace`,
821
825
  alignment: "left",
822
826
  margin: [14, 0],
823
827
  fontSize: 7,
824
828
  font: "Roboto"
825
829
  }),
826
830
  header: {
827
- text: `User Activity Trace (${m.length} records)`,
831
+ text: `User Activity Trace (${u.length} records)`,
828
832
  alignment: "left",
829
833
  margin: [14, 8],
830
834
  fontSize: 8,
@@ -834,17 +838,17 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
834
838
  font: "MuktaVaani"
835
839
  }
836
840
  };
837
- ie.createPdf(Me).download(_);
841
+ ce.createPdf(we).download(A);
838
842
  } catch {
839
- X({ message: "Error generating PDF", type: "error" });
843
+ ee({ message: "Error generating PDF", type: "error" });
840
844
  }
841
- }, Ae = async () => {
842
- if (m.length === 0) return;
843
- const a = !o.sessionId, l = ["Date", "Time"];
844
- a && l.push("Session ID"), l.push("Method", "Resource", "Params", "Status");
845
- const v = [
845
+ }, Re = async () => {
846
+ if (u.length === 0) return;
847
+ const n = !o.sessionId, a = ["Date", "Time"];
848
+ n && a.push("Session ID"), a.push("Method", "Resource", "Params", "Status");
849
+ const c = [
846
850
  ["USER ACTIVITY TRACE REPORT"],
847
- [`User ID: ${c || (r == null ? void 0 : r.user_id) || "N/A"}`],
851
+ [`User ID: ${d || (r == null ? void 0 : r.user_id) || "N/A"}`],
848
852
  [`Username: ${(r == null ? void 0 : r.user_name) || "N/A"}`],
849
853
  [`Name: ${(r == null ? void 0 : r.name) || "N/A"}`],
850
854
  [`Role Name: ${(r == null ? void 0 : r.role_name) || "N/A"} (Role Id: ${(r == null ? void 0 : r.role_id) || "N/A"}, Role Code: ${(r == null ? void 0 : r.role_code) || "N/A"})`],
@@ -855,53 +859,55 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
855
859
  [],
856
860
  // blank row separator
857
861
  // Table headers
858
- l
862
+ a
859
863
  ];
860
- m.forEach((_) => {
861
- const L = [
862
- j(_.timestamp).format("DD/MM/YYYY"),
863
- j(_.timestamp).format("hh:mm:ss A")
864
+ u.forEach((A) => {
865
+ const Y = [
866
+ j(A.timestamp).format("DD/MM/YYYY"),
867
+ j(A.timestamp).format("hh:mm:ss A")
864
868
  ];
865
- a && L.push(_.session_id || "N/A");
866
- const Y = J(_.resource), de = Y.includes("(Login)") || Y.includes("(Logout)") ? { v: Y, s: { font: { bold: !0 } } } : Y;
867
- L.push(
868
- _.http_method || "N/A",
869
- de,
870
- _.query_params || "N/A",
871
- _.response_code || "N/A"
872
- ), v.push(L);
869
+ n && Y.push(A.session_id || "N/A");
870
+ const L = K(A.resource, A), X = L.includes("(Login)") || L.includes("(Logout)") ? { v: L, s: { font: { bold: !0 } } } : L;
871
+ Y.push(
872
+ A.http_method || "N/A",
873
+ X,
874
+ A.query_params || "N/A",
875
+ A.response_code || "N/A"
876
+ ), c.push(Y);
873
877
  });
874
- const U = le.utils.aoa_to_sheet(v), k = le.utils.book_new();
875
- le.utils.book_append_sheet(k, U, "UserActivityAnalytics"), le.writeFile(k, `UserActivity_${c || "Session"}_${ee().format("YYYYMMDD")}.xlsx`);
878
+ const M = ie.utils.aoa_to_sheet(c), S = ie.utils.book_new();
879
+ ie.utils.book_append_sheet(S, M, "UserActivityAnalytics"), ie.writeFile(S, `UserActivity_${d || "Session"}_${re().format("YYYYMMDD")}.xlsx`);
876
880
  };
877
- return /* @__PURE__ */ n(h, { className: "flex flex-col h-full w-full", children: [
878
- /* @__PURE__ */ n(h, { className: "flex flex-col md:flex-row justify-between items-start md:items-center p-6 border-b border-slate-200/60 dark:border-slate-800/60 gap-4", children: [
879
- /* @__PURE__ */ n("div", { className: "flex items-center gap-4", children: [
881
+ return /* @__PURE__ */ s(g, { className: "flex flex-col h-full w-full", children: [
882
+ /* @__PURE__ */ s(g, { className: "flex flex-col md:flex-row justify-between items-start md:items-center p-6 border-b border-slate-200/60 dark:border-slate-800/60 gap-4", children: [
883
+ /* @__PURE__ */ s("div", { className: "flex items-center gap-4", children: [
880
884
  /* @__PURE__ */ e(
881
- H,
885
+ V,
882
886
  {
883
- onClick: d,
887
+ onClick: () => {
888
+ o.sessionId ? xe() : p();
889
+ },
884
890
  size: "medium",
885
891
  sx: {
886
892
  backgroundColor: q(t.palette.primary.main, 0.1),
887
893
  color: t.palette.primary.main,
888
894
  "&:hover": { backgroundColor: t.palette.primary.main, color: "white" }
889
895
  },
890
- children: /* @__PURE__ */ e(w, { icon: qe, className: "text-sm" })
896
+ children: /* @__PURE__ */ e(R, { icon: qe, className: "text-sm" })
891
897
  }
892
898
  ),
893
- /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
894
- /* @__PURE__ */ e(S, { variant: "body2", className: "font-bold font-sans text-lg text-customBlue uppercase", children: "USER ACTIVITY LOGS" }),
895
- /* @__PURE__ */ e("div", { className: "flex items-center mt-1.5 font-semibold text-[13px] text-slate-600 dark:text-slate-400", children: /* @__PURE__ */ n("span", { className: "flex items-center gap-1.5", children: [
899
+ /* @__PURE__ */ s("div", { className: "flex flex-col", children: [
900
+ /* @__PURE__ */ e(k, { variant: "body2", className: "font-bold font-sans text-lg text-customBlue uppercase", children: "USER ACTIVITY LOGS" }),
901
+ /* @__PURE__ */ e("div", { className: "flex items-center mt-1.5 font-semibold text-[13px] text-slate-600 dark:text-slate-400", children: /* @__PURE__ */ s("span", { className: "flex items-center gap-1.5", children: [
896
902
  "User ID: ",
897
- /* @__PURE__ */ e("span", { className: "text-primary-main font-black", children: c || r.user_id || "N/A" }),
898
- /* @__PURE__ */ e(V, { title: "View User Info Details", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
903
+ /* @__PURE__ */ e("span", { className: "text-primary-main font-black", children: d || r.user_id || "N/A" }),
904
+ /* @__PURE__ */ e(H, { title: "View User Info Details", arrow: !0, placement: "top", children: /* @__PURE__ */ e(
899
905
  "span",
900
906
  {
901
- ref: (a) => {
902
- a && a.style.setProperty("border-radius", "50%", "important");
907
+ ref: (n) => {
908
+ n && n.style.setProperty("border-radius", "50%", "important");
903
909
  },
904
- onClick: () => W(!0),
910
+ onClick: () => O(!0),
905
911
  className: "cursor-pointer inline-flex items-center justify-center",
906
912
  style: {
907
913
  width: "15px",
@@ -916,21 +922,21 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
916
922
  justifyContent: "center",
917
923
  verticalAlign: "middle"
918
924
  },
919
- children: /* @__PURE__ */ e(w, { icon: Ge })
925
+ children: /* @__PURE__ */ e(R, { icon: Ge })
920
926
  }
921
927
  ) })
922
928
  ] }) })
923
929
  ] })
924
930
  ] }),
925
- /* @__PURE__ */ n(h, { className: "flex flex-wrap items-center gap-3 ml-auto", children: [
931
+ /* @__PURE__ */ s(g, { className: "flex flex-wrap items-center gap-3 ml-auto", children: [
926
932
  /* @__PURE__ */ e(
927
- Z,
933
+ te,
928
934
  {
929
935
  size: "small",
930
936
  placeholder: "Search by User ID...",
931
- value: $,
932
- onChange: (a) => z(a.target.value),
933
- onKeyDown: (a) => a.key === "Enter" && B(),
937
+ value: E,
938
+ onChange: (n) => U(n.target.value),
939
+ onKeyDown: (n) => n.key === "Enter" && B(),
934
940
  sx: {
935
941
  width: { xs: "100%", md: "200px" },
936
942
  "& .MuiInputBase-root": {
@@ -939,41 +945,41 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
939
945
  }
940
946
  },
941
947
  InputProps: {
942
- endAdornment: /* @__PURE__ */ e(Le, { position: "end", children: /* @__PURE__ */ e(H, { size: "small", onClick: B, color: "primary", children: /* @__PURE__ */ e(w, { icon: me }) }) })
948
+ endAdornment: /* @__PURE__ */ e(Le, { position: "end", children: /* @__PURE__ */ e(V, { size: "small", onClick: B, color: "primary", children: /* @__PURE__ */ e(R, { icon: me }) }) })
943
949
  }
944
950
  }
945
951
  ),
946
- /* @__PURE__ */ n("div", { className: `flex items-center rounded-2xl p-1 shadow-sm border ${t.palette.mode === "dark" ? "bg-slate-900 border-slate-800" : "bg-white border-slate-200"}`, children: [
947
- /* @__PURE__ */ n(
952
+ /* @__PURE__ */ s("div", { className: `flex items-center rounded-2xl p-1 shadow-sm border ${t.palette.mode === "dark" ? "bg-slate-900 border-slate-800" : "bg-white border-slate-200"}`, children: [
953
+ /* @__PURE__ */ s(
948
954
  "button",
949
955
  {
950
- disabled: C,
951
- onClick: we,
956
+ disabled: T,
957
+ onClick: Ae,
952
958
  className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ${t.palette.mode === "dark" ? "text-slate-400 hover:text-slate-100 hover:bg-slate-800" : "text-slate-600 hover:text-red-600 hover:bg-slate-50"}`,
953
959
  children: [
954
- /* @__PURE__ */ e(w, { icon: Je, className: "mr-1" }),
960
+ /* @__PURE__ */ e(R, { icon: Ke, className: "mr-1" }),
955
961
  "Pdf"
956
962
  ]
957
963
  }
958
964
  ),
959
- /* @__PURE__ */ n(
965
+ /* @__PURE__ */ s(
960
966
  "button",
961
967
  {
962
- disabled: C,
963
- onClick: Ae,
968
+ disabled: T,
969
+ onClick: Re,
964
970
  className: `px-4 py-2 rounded-xl transition-all flex items-center gap-2 text-xs font-black uppercase tracking-wider ml-1 ${t.palette.mode === "dark" ? "bg-slate-800 text-slate-100 hover:bg-slate-700" : "bg-[var(--color-tableHeader)] text-white hover:bg-[var(--color-tableHeader)]"}`,
965
971
  children: [
966
- /* @__PURE__ */ e(w, { icon: Ke, className: "mr-1" }),
972
+ /* @__PURE__ */ e(R, { icon: Je, className: "mr-1" }),
967
973
  "Excel"
968
974
  ]
969
975
  }
970
976
  )
971
977
  ] }),
972
978
  /* @__PURE__ */ e(
973
- H,
979
+ V,
974
980
  {
975
981
  color: "primary",
976
- onClick: ce,
982
+ onClick: de,
977
983
  className: "rounded-xl border border-slate-200 dark:border-slate-800 shadow-sm",
978
984
  sx: {
979
985
  backgroundColor: q(t.palette.primary.main, 0.1),
@@ -981,14 +987,14 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
981
987
  height: 40,
982
988
  "&:hover": { backgroundColor: t.palette.primary.main, color: "white" }
983
989
  },
984
- children: /* @__PURE__ */ e(w, { icon: Qe, className: "text-sm" })
990
+ children: /* @__PURE__ */ e(R, { icon: Qe, className: "text-sm" })
985
991
  }
986
992
  ),
987
993
  /* @__PURE__ */ e(
988
- H,
994
+ V,
989
995
  {
990
996
  color: "primary",
991
- onClick: K,
997
+ onClick: J,
992
998
  className: "rounded-xl border border-slate-200 dark:border-slate-800 shadow-sm",
993
999
  sx: {
994
1000
  backgroundColor: q(t.palette.primary.main, 0.1),
@@ -996,13 +1002,13 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
996
1002
  height: 40,
997
1003
  "&:hover": { backgroundColor: t.palette.primary.main, color: "white" }
998
1004
  },
999
- children: /* @__PURE__ */ e(w, { icon: Ne, className: "text-sm" })
1005
+ children: /* @__PURE__ */ e(R, { icon: ve, className: "text-sm" })
1000
1006
  }
1001
1007
  )
1002
1008
  ] })
1003
1009
  ] }),
1004
1010
  /* @__PURE__ */ e(
1005
- h,
1011
+ g,
1006
1012
  {
1007
1013
  className: "flex-1 overflow-hidden relative",
1008
1014
  sx: {
@@ -1011,27 +1017,27 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1011
1017
  // Kill every curve inside this box
1012
1018
  "& .MuiTableContainer-root": { height: "100% !important", maxHeight: "100% !important" }
1013
1019
  },
1014
- children: !c && !o.sessionId ? /* @__PURE__ */ n(h, { className: "w-full h-full flex flex-col items-center justify-center space-y-4 opacity-50", children: [
1015
- /* @__PURE__ */ e(w, { icon: me, className: "text-5xl text-slate-300" }),
1016
- /* @__PURE__ */ e(S, { variant: "h6", className: "font-bold text-slate-400", children: "Search a User ID or Session to trace actions" })
1020
+ children: !d && !o.sessionId ? /* @__PURE__ */ s(g, { className: "w-full h-full flex flex-col items-center justify-center space-y-4 opacity-50", children: [
1021
+ /* @__PURE__ */ e(R, { icon: me, className: "text-5xl text-slate-300" }),
1022
+ /* @__PURE__ */ e(k, { variant: "h6", className: "font-bold text-slate-400", children: "Search a User ID or Session to trace actions" })
1017
1023
  ] }) : /* @__PURE__ */ e(
1018
- be,
1024
+ Ne,
1019
1025
  {
1020
1026
  id: "user-activity-detail-list",
1021
- columns: Te,
1022
- tableData: m,
1027
+ columns: Ce,
1028
+ tableData: u,
1023
1029
  paginationConfig: {
1024
1030
  pagination: !0,
1025
1031
  paginationType: "infinite-scroll",
1026
1032
  rowsPerPageInTable: F,
1027
- hasMore: b,
1028
- loadMore: () => b && De({ cancelRefetch: !1 })
1033
+ hasMore: N,
1034
+ loadMore: () => N && De({ cancelRefetch: !1 })
1029
1035
  },
1030
1036
  styleConfig: {
1031
1037
  cellStyle: { padding: "8px 16px", height: 40, maxLines: 1 }
1032
1038
  },
1033
- isLoading: C,
1034
- handleSort: re,
1039
+ isLoading: T,
1040
+ handleSort: oe,
1035
1041
  emptyBoxText: "Activity for this User ID doesn't exist in our logs.",
1036
1042
  getActions: () => []
1037
1043
  }
@@ -1043,9 +1049,9 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1043
1049
  {
1044
1050
  title: "Activity Filters",
1045
1051
  resetButtonLabel: "Reset",
1046
- onResetClick: ke,
1052
+ onResetClick: xe,
1047
1053
  FormBody: at,
1048
- handleOverlayState: ce,
1054
+ handleOverlayState: de,
1049
1055
  overlayOpen: G,
1050
1056
  dataTestId: "user-activity-filter",
1051
1057
  ModalProps: {
@@ -1066,15 +1072,15 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1066
1072
  formProps: {
1067
1073
  filter: o,
1068
1074
  onApply: he,
1069
- handleOverlayState: ce
1075
+ handleOverlayState: de
1070
1076
  }
1071
1077
  }
1072
1078
  ),
1073
- /* @__PURE__ */ n(
1074
- Oe,
1079
+ /* @__PURE__ */ s(
1080
+ We,
1075
1081
  {
1076
- open: E,
1077
- onClose: () => W(!1),
1082
+ open: z,
1083
+ onClose: () => O(!1),
1078
1084
  maxWidth: "sm",
1079
1085
  fullWidth: !0,
1080
1086
  PaperProps: {
@@ -1088,7 +1094,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1088
1094
  },
1089
1095
  children: [
1090
1096
  /* @__PURE__ */ e(Fe, { className: "border-b border-slate-200 dark:border-slate-800 pb-3 flex justify-between items-center", children: /* @__PURE__ */ e(
1091
- S,
1097
+ k,
1092
1098
  {
1093
1099
  variant: "h6",
1094
1100
  style: {
@@ -1098,8 +1104,8 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1098
1104
  children: "User Information"
1099
1105
  }
1100
1106
  ) }),
1101
- /* @__PURE__ */ e(Be, { className: "pt-4 pb-6", sx: { color: t.palette.text.primary }, children: /* @__PURE__ */ n("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
1102
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1107
+ /* @__PURE__ */ e(Be, { className: "pt-4 pb-6", sx: { color: t.palette.text.primary }, children: /* @__PURE__ */ s("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-4", children: [
1108
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1103
1109
  /* @__PURE__ */ e(
1104
1110
  "span",
1105
1111
  {
@@ -1121,11 +1127,11 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1121
1127
  fontWeight: 800,
1122
1128
  fontSize: "14px"
1123
1129
  },
1124
- children: c || r.user_id || "N/A"
1130
+ children: d || r.user_id || "N/A"
1125
1131
  }
1126
1132
  )
1127
1133
  ] }),
1128
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1134
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1129
1135
  /* @__PURE__ */ e(
1130
1136
  "span",
1131
1137
  {
@@ -1151,7 +1157,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1151
1157
  }
1152
1158
  )
1153
1159
  ] }),
1154
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1160
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1155
1161
  /* @__PURE__ */ e(
1156
1162
  "span",
1157
1163
  {
@@ -1177,7 +1183,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1177
1183
  }
1178
1184
  )
1179
1185
  ] }),
1180
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1186
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1181
1187
  /* @__PURE__ */ e(
1182
1188
  "span",
1183
1189
  {
@@ -1203,7 +1209,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1203
1209
  }
1204
1210
  )
1205
1211
  ] }),
1206
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1212
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1207
1213
  /* @__PURE__ */ e(
1208
1214
  "span",
1209
1215
  {
@@ -1229,7 +1235,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1229
1235
  }
1230
1236
  )
1231
1237
  ] }),
1232
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1238
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1233
1239
  /* @__PURE__ */ e(
1234
1240
  "span",
1235
1241
  {
@@ -1255,7 +1261,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1255
1261
  }
1256
1262
  )
1257
1263
  ] }),
1258
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1264
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1259
1265
  /* @__PURE__ */ e(
1260
1266
  "span",
1261
1267
  {
@@ -1281,7 +1287,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1281
1287
  }
1282
1288
  )
1283
1289
  ] }),
1284
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
1290
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5", children: [
1285
1291
  /* @__PURE__ */ e(
1286
1292
  "span",
1287
1293
  {
@@ -1307,7 +1313,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1307
1313
  }
1308
1314
  )
1309
1315
  ] }),
1310
- /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 md:col-span-2", children: [
1316
+ /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 md:col-span-2", children: [
1311
1317
  /* @__PURE__ */ e(
1312
1318
  "span",
1313
1319
  {
@@ -1333,7 +1339,7 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1333
1339
  }
1334
1340
  )
1335
1341
  ] }),
1336
- (o.sessionId || r.session_id || r.sessionId) && /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5 md:col-span-2", children: [
1342
+ (o.sessionId || r.session_id || r.sessionId) && /* @__PURE__ */ s("div", { className: "flex flex-col gap-0.5 md:col-span-2", children: [
1337
1343
  /* @__PURE__ */ e(
1338
1344
  "span",
1339
1345
  {
@@ -1361,9 +1367,9 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1361
1367
  ] })
1362
1368
  ] }) }),
1363
1369
  /* @__PURE__ */ e(Pe, { className: "border-t border-slate-200 dark:border-slate-800 px-6 py-3", children: /* @__PURE__ */ e(
1364
- fe,
1370
+ ue,
1365
1371
  {
1366
- onClick: () => W(!1),
1372
+ onClick: () => O(!1),
1367
1373
  variant: "contained",
1368
1374
  sx: {
1369
1375
  borderRadius: "8px",
@@ -1378,27 +1384,27 @@ function ot({ selectedUserId: i, initialSessionId: p, initialAttributes: T, onBa
1378
1384
  ] });
1379
1385
  }
1380
1386
  function It() {
1381
- const i = ue(), p = $e(), [T, d] = f(null), [t, m] = f(null), [u, b] = f(null), [A, C] = f("list");
1382
- te(() => {
1383
- const c = new URLSearchParams(p.search || window.location.hash.split("?")[1] || window.location.search), M = c.get("sessionId"), $ = c.get("attributes");
1384
- if (M) {
1385
- if (m(M), $)
1387
+ const i = fe(), m = $e(), [C, p] = f(null), [t, u] = f(null), [h, N] = f(null), [_, T] = f("list");
1388
+ ae(() => {
1389
+ const d = new URLSearchParams(m.search || window.location.hash.split("?")[1] || window.location.search), $ = d.get("sessionId"), E = d.get("attributes");
1390
+ if ($) {
1391
+ if (u($), E)
1386
1392
  try {
1387
- b(JSON.parse(decodeURIComponent($)));
1393
+ N(JSON.parse(decodeURIComponent(E)));
1388
1394
  } catch {
1389
1395
  }
1390
- C("detail");
1396
+ T("detail");
1391
1397
  }
1392
- }, [p.search]);
1393
- const I = (c, M = null) => {
1394
- d(c), m(null), b(M), C("detail");
1398
+ }, [m.search]);
1399
+ const I = (d, $ = null) => {
1400
+ p(d), u(null), N($), T("detail");
1395
1401
  }, F = () => {
1396
- d(null), m(null), b(null);
1397
- const c = window.location.pathname + (window.location.hash ? window.location.hash.split("?")[0] : "");
1398
- window.history.replaceState({}, "", c), C("list");
1402
+ p(null), u(null), N(null);
1403
+ const d = window.location.pathname + (window.location.hash ? window.location.hash.split("?")[0] : "");
1404
+ window.history.replaceState({}, "", d), T("list");
1399
1405
  };
1400
- return /* @__PURE__ */ n(
1401
- h,
1406
+ return /* @__PURE__ */ s(
1407
+ g,
1402
1408
  {
1403
1409
  id: "activity-analytics-root",
1404
1410
  className: "w-full h-full flex flex-col p-4 bg-[var(--color-gray4)] dark:bg-[#0f172a]",
@@ -1412,18 +1418,18 @@ function It() {
1412
1418
  }
1413
1419
  ` }),
1414
1420
  /* @__PURE__ */ e(
1415
- h,
1421
+ g,
1416
1422
  {
1417
1423
  className: "w-full h-full flex flex-col",
1418
1424
  sx: {
1419
1425
  backgroundColor: i.palette.mode === "dark" ? "#0f172a" : "var(--color-gray4)"
1420
1426
  },
1421
- children: /* @__PURE__ */ e(h, { className: "flex-1 overflow-hidden", children: A === "list" ? /* @__PURE__ */ e(rt, { onUserSelect: I }) : /* @__PURE__ */ e(
1427
+ children: /* @__PURE__ */ e(g, { className: "flex-1 overflow-hidden", children: _ === "list" ? /* @__PURE__ */ e(rt, { onUserSelect: I }) : /* @__PURE__ */ e(
1422
1428
  ot,
1423
1429
  {
1424
- selectedUserId: T,
1430
+ selectedUserId: C,
1425
1431
  initialSessionId: t,
1426
- initialAttributes: u,
1432
+ initialAttributes: h,
1427
1433
  onBack: F
1428
1434
  }
1429
1435
  ) })
@@ -1436,4 +1442,4 @@ function It() {
1436
1442
  export {
1437
1443
  It as default
1438
1444
  };
1439
- //# sourceMappingURL=index-D9YNFPn9.js.map
1445
+ //# sourceMappingURL=index-o8Pyt1Bt.js.map