@gen-epix/ui-client-common 4.3.2 → 4.4.1

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 (361) hide show
  1. package/README.md +9 -10
  2. package/dist/@types/mui.d.ts +1 -1
  3. package/dist/_chunks/ApplicationFooter.js +49 -49
  4. package/dist/_chunks/ApplicationFooter.js.map +1 -1
  5. package/dist/_chunks/Breadcrumbs.js +23 -22
  6. package/dist/_chunks/Breadcrumbs.js.map +1 -1
  7. package/dist/_chunks/CrudPage.js +211 -210
  8. package/dist/_chunks/CrudPage.js.map +1 -1
  9. package/dist/_chunks/GeoFilter.js.map +1 -1
  10. package/dist/_chunks/Notifications.js +67 -66
  11. package/dist/_chunks/Notifications.js.map +1 -1
  12. package/dist/_chunks/OutageList.js +30 -30
  13. package/dist/_chunks/OutageList.js.map +1 -1
  14. package/dist/_chunks/OutageUtil.js +2 -2
  15. package/dist/_chunks/OutageUtil.js.map +1 -1
  16. package/dist/_chunks/QueryClientProvider.js +1 -1
  17. package/dist/_chunks/QueryClientProvider.js.map +1 -1
  18. package/dist/_chunks/QueryClientService.js +405 -115
  19. package/dist/_chunks/QueryClientService.js.map +1 -1
  20. package/dist/_chunks/Reflect.js +642 -0
  21. package/dist/_chunks/Reflect.js.map +1 -0
  22. package/dist/_chunks/Table.js +572 -574
  23. package/dist/_chunks/Table.js.map +1 -1
  24. package/dist/_chunks/TableUtil.js +5 -5
  25. package/dist/_chunks/TableUtil.js.map +1 -1
  26. package/dist/_chunks/TextFilter.js +1 -1
  27. package/dist/_chunks/TextFilter.js.map +1 -1
  28. package/dist/_chunks/UserInvitationsAdminPage.js +109 -107
  29. package/dist/_chunks/UserInvitationsAdminPage.js.map +1 -1
  30. package/dist/_chunks/UserManagerUtil.js +7 -15
  31. package/dist/_chunks/UserManagerUtil.js.map +1 -1
  32. package/dist/_chunks/_baseAssignValue.js.map +1 -1
  33. package/dist/_chunks/_baseFlatten.js +8 -8
  34. package/dist/_chunks/_baseFlatten.js.map +1 -1
  35. package/dist/_chunks/_baseUnset.js +299 -22
  36. package/dist/_chunks/_baseUnset.js.map +1 -1
  37. package/dist/_chunks/_cacheHas.js.map +1 -1
  38. package/dist/_chunks/_setToString.js.map +1 -1
  39. package/dist/_chunks/decorate.js +9 -0
  40. package/dist/_chunks/decorateParam.js +8 -0
  41. package/dist/_chunks/format.js.map +1 -1
  42. package/dist/_chunks/isArrayLike.js.map +1 -1
  43. package/dist/_chunks/isObject.js.map +1 -1
  44. package/dist/_chunks/isSymbol.js.map +1 -1
  45. package/dist/_chunks/middleware.js +1 -1
  46. package/dist/_chunks/middleware.js.map +1 -1
  47. package/dist/_chunks/omit.js +39 -40
  48. package/dist/_chunks/omit.js.map +1 -1
  49. package/dist/_chunks/query.js +13 -17
  50. package/dist/_chunks/query.js.map +1 -1
  51. package/dist/_chunks/react.js +1 -1
  52. package/dist/_chunks/react.js.map +1 -1
  53. package/dist/_chunks/tableStore.js +40 -54
  54. package/dist/_chunks/tableStore.js.map +1 -1
  55. package/dist/_chunks/toDate.js.map +1 -1
  56. package/dist/_chunks/useColumnsMenu.js +2 -2
  57. package/dist/_chunks/useColumnsMenu.js.map +1 -1
  58. package/dist/_chunks/useMutation.js +31 -30
  59. package/dist/_chunks/useMutation.js.map +1 -1
  60. package/dist/_chunks/useQueryMemo.js +5 -5
  61. package/dist/_chunks/useQueryMemo.js.map +1 -1
  62. package/dist/_chunks/vanilla.js +1 -1
  63. package/dist/_chunks/vanilla.js.map +1 -1
  64. package/dist/_chunks/yup.js +2 -2
  65. package/dist/_chunks/yup.js.map +1 -1
  66. package/dist/classes/TableEventBus/TableEventBus.d.ts +1 -1
  67. package/dist/classes/TableEventBus/index.js.map +1 -1
  68. package/dist/classes/abstracts/FilterAbstract/index.js.map +1 -1
  69. package/dist/classes/filters/BooleanFilter.d.ts +1 -1
  70. package/dist/classes/filters/DateFilter.d.ts +2 -2
  71. package/dist/classes/filters/GeoFilter.d.ts +2 -2
  72. package/dist/classes/filters/MultiSelectFilter.d.ts +2 -2
  73. package/dist/classes/filters/NumberRangeFilter.d.ts +1 -1
  74. package/dist/classes/filters/TextFilter.d.ts +1 -1
  75. package/dist/classes/services/AuthenticationService/AuthenticationService.d.ts +5 -3
  76. package/dist/classes/services/AuthenticationService/index.js +34 -661
  77. package/dist/classes/services/AuthenticationService/index.js.map +1 -1
  78. package/dist/classes/services/AuthorizationService/AuthorizationService.d.ts +4 -4
  79. package/dist/classes/services/AuthorizationService/index.js +12 -10
  80. package/dist/classes/services/AuthorizationService/index.js.map +1 -1
  81. package/dist/classes/services/BackendVersionService/BackendVersionService.d.ts +0 -3
  82. package/dist/classes/services/BackendVersionService/index.js +5 -8
  83. package/dist/classes/services/BackendVersionService/index.js.map +1 -1
  84. package/dist/classes/services/BreadcrumbService/BreadcrumbService.d.ts +1 -3
  85. package/dist/classes/services/BreadcrumbService/index.js +19 -21
  86. package/dist/classes/services/BreadcrumbService/index.js.map +1 -1
  87. package/dist/classes/services/EmotionCacheService/EmotionCacheService.d.ts +4 -4
  88. package/dist/classes/services/EmotionCacheService/index.js +17 -14
  89. package/dist/classes/services/EmotionCacheService/index.js.map +1 -1
  90. package/dist/classes/services/FeatureFlagsService/FeatureFlagsService.d.ts +0 -3
  91. package/dist/classes/services/FeatureFlagsService/index.js +5 -8
  92. package/dist/classes/services/FeatureFlagsService/index.js.map +1 -1
  93. package/dist/classes/services/I18nService/I18nService.d.ts +3 -3
  94. package/dist/classes/services/I18nService/index.js +25 -29
  95. package/dist/classes/services/I18nService/index.js.map +1 -1
  96. package/dist/classes/services/InactivityService/InactivityService.d.ts +6 -3
  97. package/dist/classes/services/InactivityService/index.js +42 -36
  98. package/dist/classes/services/InactivityService/index.js.map +1 -1
  99. package/dist/classes/services/LogService/LogService.d.ts +7 -4
  100. package/dist/classes/services/LogService/index.js +39 -32
  101. package/dist/classes/services/LogService/index.js.map +1 -1
  102. package/dist/classes/services/NavigationHistoryService/NavigationHistoryService.d.ts +0 -3
  103. package/dist/classes/services/NavigationHistoryService/index.js +5 -8
  104. package/dist/classes/services/NavigationHistoryService/index.js.map +1 -1
  105. package/dist/classes/services/NotificationService/NotificationService.d.ts +4 -4
  106. package/dist/classes/services/NotificationService/index.js +21 -21
  107. package/dist/classes/services/NotificationService/index.js.map +1 -1
  108. package/dist/classes/services/PageEventBusService/PageEventBusService.d.ts +4 -3
  109. package/dist/classes/services/PageEventBusService/index.js +18 -15
  110. package/dist/classes/services/PageEventBusService/index.js.map +1 -1
  111. package/dist/classes/services/QueryClientService/QueryClientService.d.ts +6 -7
  112. package/dist/classes/services/QueryClientService/index.js +1 -2
  113. package/dist/classes/services/RouterService/RouterService.d.ts +6 -9
  114. package/dist/classes/services/RouterService/index.js +8 -12
  115. package/dist/classes/services/RouterService/index.js.map +1 -1
  116. package/dist/classes/services/UserSettingsService/UserSettingsService.d.ts +0 -3
  117. package/dist/classes/services/UserSettingsService/index.js +5 -8
  118. package/dist/classes/services/UserSettingsService/index.js.map +1 -1
  119. package/dist/components/app/App/App.d.ts +5 -1
  120. package/dist/components/app/App/index.js +31 -37
  121. package/dist/components/app/App/index.js.map +1 -1
  122. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js +50 -49
  123. package/dist/components/app/ApplicationBootstrapWithAuthentication/index.js.map +1 -1
  124. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js +42 -41
  125. package/dist/components/app/ApplicationBootstrapWithoutAuthorization/index.js.map +1 -1
  126. package/dist/components/app/AuthenticationWrapper/index.js +68 -67
  127. package/dist/components/app/AuthenticationWrapper/index.js.map +1 -1
  128. package/dist/components/app/AuthorizationWrapper/index.js +33 -32
  129. package/dist/components/app/AuthorizationWrapper/index.js.map +1 -1
  130. package/dist/components/app/RouterRoot/index.js +62 -61
  131. package/dist/components/app/RouterRoot/index.js.map +1 -1
  132. package/dist/components/epi/EpiContactDetailsDialog/index.js +38 -37
  133. package/dist/components/epi/EpiContactDetailsDialog/index.js.map +1 -1
  134. package/dist/components/filters/BooleanFilterField/index.js +5 -5
  135. package/dist/components/filters/BooleanFilterField/index.js.map +1 -1
  136. package/dist/components/filters/DateFilterField/index.js +3 -3
  137. package/dist/components/filters/DateFilterField/index.js.map +1 -1
  138. package/dist/components/filters/GeoFilterField/index.js +4 -4
  139. package/dist/components/filters/GeoFilterField/index.js.map +1 -1
  140. package/dist/components/filters/MultiSelectFilterField/index.js +4 -4
  141. package/dist/components/filters/MultiSelectFilterField/index.js.map +1 -1
  142. package/dist/components/filters/NumberRangeFilterField/index.js +3 -3
  143. package/dist/components/filters/NumberRangeFilterField/index.js.map +1 -1
  144. package/dist/components/filters/TextFilterField/index.js +3 -3
  145. package/dist/components/filters/TextFilterField/index.js.map +1 -1
  146. package/dist/components/ui/ApplicationBar/index.js +242 -241
  147. package/dist/components/ui/ApplicationBar/index.js.map +1 -1
  148. package/dist/components/ui/ApplicationFooter/index.js +1 -2
  149. package/dist/components/ui/Breadcrumbs/Breadcrumb.d.ts +1 -1
  150. package/dist/components/ui/Breadcrumbs/index.js +1 -2
  151. package/dist/components/ui/ConsentDialog/index.js +11 -6
  152. package/dist/components/ui/ConsentDialog/index.js.map +1 -1
  153. package/dist/components/ui/GenericErrorMessage/index.js +51 -50
  154. package/dist/components/ui/GenericErrorMessage/index.js.map +1 -1
  155. package/dist/components/ui/LicensesDialog/index.js +66 -69
  156. package/dist/components/ui/LicensesDialog/index.js.map +1 -1
  157. package/dist/components/ui/MyPermissionsDialog/index.js +26 -25
  158. package/dist/components/ui/MyPermissionsDialog/index.js.map +1 -1
  159. package/dist/components/ui/NavLink/index.js +6 -6
  160. package/dist/components/ui/NavLink/index.js.map +1 -1
  161. package/dist/components/ui/Notifications/NotificationItem.d.ts +1 -1
  162. package/dist/components/ui/Notifications/index.js +1 -2
  163. package/dist/components/ui/OrganizationSwitcherDialog/index.js +69 -76
  164. package/dist/components/ui/OrganizationSwitcherDialog/index.js.map +1 -1
  165. package/dist/components/ui/OutageList/index.js +1 -2
  166. package/dist/components/ui/OutagesDialog/index.js.map +1 -1
  167. package/dist/components/ui/PageContainer/PageContainer.d.ts +1 -1
  168. package/dist/components/ui/PageContainer/index.js +57 -52
  169. package/dist/components/ui/PageContainer/index.js.map +1 -1
  170. package/dist/components/ui/ResponseHandler/ResponseHandler.d.ts +1 -1
  171. package/dist/components/ui/ResponseHandler/index.js.map +1 -1
  172. package/dist/components/ui/Sidebar/SidebarItem.d.ts +1 -1
  173. package/dist/components/ui/Sidebar/SidebarMenuItem.d.ts +1 -1
  174. package/dist/components/ui/Sidebar/index.js +45 -45
  175. package/dist/components/ui/Sidebar/index.js.map +1 -1
  176. package/dist/components/ui/Table/Table.d.ts +1 -1
  177. package/dist/components/ui/Table/TableActionsCell.d.ts +1 -1
  178. package/dist/components/ui/Table/TableCell.d.ts +1 -1
  179. package/dist/components/ui/Table/TableCheckboxCell.d.ts +1 -1
  180. package/dist/components/ui/Table/TableCheckboxHeader.d.ts +1 -1
  181. package/dist/components/ui/Table/TableColumnsEditorDialog.d.ts +1 -1
  182. package/dist/components/ui/Table/TableFilter.d.ts +2 -2
  183. package/dist/components/ui/Table/TableHeaderCell.d.ts +1 -1
  184. package/dist/components/ui/Table/TableHeaderFilter.d.ts +2 -2
  185. package/dist/components/ui/Table/TableReadableIndexCell.d.ts +1 -1
  186. package/dist/components/ui/Table/index.js +1 -2
  187. package/dist/components/ui/UserFeedbackDialog/index.js +65 -64
  188. package/dist/components/ui/UserFeedbackDialog/index.js.map +1 -1
  189. package/dist/components/ui/UserInactivityConfirmation/index.js +26 -25
  190. package/dist/components/ui/UserInactivityConfirmation/index.js.map +1 -1
  191. package/dist/constants/api.constants.d.ts +8 -0
  192. package/dist/constants/api.constants.js +6 -0
  193. package/dist/constants/api.constants.js.map +1 -0
  194. package/dist/constants/config.constants.d.ts +5 -0
  195. package/dist/constants/config.constants.js +6 -0
  196. package/dist/constants/config.constants.js.map +1 -0
  197. package/dist/constants/{query.js → query.constants.js} +2 -2
  198. package/dist/constants/query.constants.js.map +1 -0
  199. package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContext.d.ts +6 -2
  200. package/dist/context/uiClientCommonConfigContext/UiClientCommonConfigContextProvider.d.ts +2 -2
  201. package/dist/context/uiClientCommonConfigContext/index.js +28 -12
  202. package/dist/context/uiClientCommonConfigContext/index.js.map +1 -1
  203. package/dist/context/uiClientCommonConfigContext/useUiClientCommonConfigContext.d.ts +2 -1
  204. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js +17 -16
  205. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/index.js.map +1 -1
  206. package/dist/dataHooks/useIdentifierIssuerOwnOrganizationQuery/useIdentifierIssuerOwnOrganizationQuery.d.ts +1 -1
  207. package/dist/dataHooks/useIdentifierIssuerQuery/index.js +18 -17
  208. package/dist/dataHooks/useIdentifierIssuerQuery/index.js.map +1 -1
  209. package/dist/dataHooks/useIdentifierIssuerQuery/useIdentifierIssuerQuery.d.ts +1 -1
  210. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js +11 -10
  211. package/dist/dataHooks/useInviteUserConstraintsQuery/index.js.map +1 -1
  212. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js +22 -21
  213. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/index.js.map +1 -1
  214. package/dist/dataHooks/useOrganizationAdminPoliciesQuery/useOrganizationAdminPoliciesQuery.d.ts +1 -1
  215. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js +8 -7
  216. package/dist/dataHooks/useOrganizationIdentifierIssuerLinksQuery/index.js.map +1 -1
  217. package/dist/dataHooks/useOrganizationsQuery/index.js +17 -16
  218. package/dist/dataHooks/useOrganizationsQuery/index.js.map +1 -1
  219. package/dist/dataHooks/useOrganizationsQuery/useOrganizationsQuery.d.ts +1 -1
  220. package/dist/dataHooks/useUsersQuery/index.js +18 -17
  221. package/dist/dataHooks/useUsersQuery/index.js.map +1 -1
  222. package/dist/dataHooks/useUsersQuery/useUsersQuery.d.ts +1 -1
  223. package/dist/hoc/withPermissions/index.js +12 -11
  224. package/dist/hoc/withPermissions/index.js.map +1 -1
  225. package/dist/hooks/useColumnsMenu/index.js +1 -2
  226. package/dist/hooks/useColumnsMenu/useColumnsMenu.d.ts +2 -2
  227. package/dist/hooks/useConfig/index.d.ts +1 -0
  228. package/dist/hooks/useConfig/index.js +7 -0
  229. package/dist/hooks/useConfig/index.js.map +1 -0
  230. package/dist/hooks/useConfig/useConfig.d.ts +2 -0
  231. package/dist/hooks/useCreateMutation/index.js +25 -24
  232. package/dist/hooks/useCreateMutation/index.js.map +1 -1
  233. package/dist/hooks/useCreateMutation/useCreateMutation.d.ts +1 -1
  234. package/dist/hooks/useDeleteMutation/index.js +24 -23
  235. package/dist/hooks/useDeleteMutation/index.js.map +1 -1
  236. package/dist/hooks/useDeleteMutation/useDeleteMutation.d.ts +1 -1
  237. package/dist/hooks/useEditMutation/index.js +33 -32
  238. package/dist/hooks/useEditMutation/index.js.map +1 -1
  239. package/dist/hooks/useEditMutation/useEditMutation.d.ts +1 -1
  240. package/dist/hooks/useInitializeTableStore/index.js.map +1 -1
  241. package/dist/hooks/useInitializeTableStore/useInitializeTableStore.d.ts +1 -1
  242. package/dist/hooks/useItemQuery/index.js +36 -35
  243. package/dist/hooks/useItemQuery/index.js.map +1 -1
  244. package/dist/hooks/useItemQuery/useItemQuery.d.ts +1 -1
  245. package/dist/hooks/useQueryMemo/index.js +1 -2
  246. package/dist/hooks/useUpdateBreadcrumb/index.js +10 -9
  247. package/dist/hooks/useUpdateBreadcrumb/index.js.map +1 -1
  248. package/dist/hooks/useUpdateDocumentTitle/index.js +4 -3
  249. package/dist/hooks/useUpdateDocumentTitle/index.js.map +1 -1
  250. package/dist/models/{admin.js → admin.models.js} +2 -2
  251. package/dist/models/admin.models.js.map +1 -0
  252. package/dist/models/{dataHooks.d.ts → data-hooks.models.d.ts} +1 -1
  253. package/dist/models/{table.d.ts → table.models.d.ts} +2 -2
  254. package/dist/models/{table.js → table.models.js} +2 -2
  255. package/dist/models/table.models.js.map +1 -0
  256. package/dist/pages/AcceptInvitationPage/index.js +40 -39
  257. package/dist/pages/AcceptInvitationPage/index.js.map +1 -1
  258. package/dist/pages/AdminPage/index.js +39 -38
  259. package/dist/pages/AdminPage/index.js.map +1 -1
  260. package/dist/pages/ChooseIdentityProviderPage/ChooseIdentityProviderPage.d.ts +1 -1
  261. package/dist/pages/ChooseIdentityProviderPage/index.js +38 -37
  262. package/dist/pages/ChooseIdentityProviderPage/index.js.map +1 -1
  263. package/dist/pages/CrudPage/CrudPage.d.ts +6 -6
  264. package/dist/pages/CrudPage/CrudPageDeleteDialog.d.ts +1 -1
  265. package/dist/pages/CrudPage/CrudPageEditDialog.d.ts +2 -2
  266. package/dist/pages/CrudPage/index.js +1 -2
  267. package/dist/pages/ErrorPage/index.js.map +1 -1
  268. package/dist/pages/IdentifierIssuersAdminPage/index.js +41 -40
  269. package/dist/pages/IdentifierIssuersAdminPage/index.js.map +1 -1
  270. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js +58 -57
  271. package/dist/pages/OrganizationAdminPoliciesAdminPage/index.js.map +1 -1
  272. package/dist/pages/OrganizationContactsAdminPage/index.js +49 -48
  273. package/dist/pages/OrganizationContactsAdminPage/index.js.map +1 -1
  274. package/dist/pages/OrganizationSitesAdminPage/index.js +44 -43
  275. package/dist/pages/OrganizationSitesAdminPage/index.js.map +1 -1
  276. package/dist/pages/OrganizationsAdminPage/index.js +57 -56
  277. package/dist/pages/OrganizationsAdminPage/index.js.map +1 -1
  278. package/dist/pages/OutagesAdminPage/index.js +63 -62
  279. package/dist/pages/OutagesAdminPage/index.js.map +1 -1
  280. package/dist/pages/PostLoginPage/index.js +14 -13
  281. package/dist/pages/PostLoginPage/index.js.map +1 -1
  282. package/dist/pages/PostLogoutPage/index.js +19 -18
  283. package/dist/pages/PostLogoutPage/index.js.map +1 -1
  284. package/dist/pages/RouterErrorPage/index.js.map +1 -1
  285. package/dist/pages/UserInvitationsAdminPage/index.js +1 -2
  286. package/dist/pages/UsersAdminPage/UsersAdminPage.d.ts +1 -1
  287. package/dist/pages/UsersAdminPage/index.js +110 -109
  288. package/dist/pages/UsersAdminPage/index.js.map +1 -1
  289. package/dist/routes/adminRoutes.d.ts +1 -1
  290. package/dist/routes/index.js +1 -1
  291. package/dist/routes/index.js.map +1 -1
  292. package/dist/routes/routes.d.ts +1 -1
  293. package/dist/setup/setup.js.map +1 -1
  294. package/dist/stores/oidcStore/index.js.map +1 -1
  295. package/dist/stores/outagesStore/index.js.map +1 -1
  296. package/dist/stores/outagesStore/outagesStore.d.ts +1 -1
  297. package/dist/stores/tableStore/index.js +1 -2
  298. package/dist/stores/tableStore/tableStore.d.ts +2 -2
  299. package/dist/theme/demoTheme/index.js.map +1 -1
  300. package/dist/utils/AxiosUtil/index.js.map +1 -1
  301. package/dist/utils/DataHookUtil/DataHookUtil.d.ts +1 -1
  302. package/dist/utils/DataHookUtil/index.js.map +1 -1
  303. package/dist/utils/DependencyContainerUtil/DependencyContainerUtil.d.ts +6 -0
  304. package/dist/utils/DependencyContainerUtil/index.d.ts +1 -0
  305. package/dist/utils/DependencyContainerUtil/index.js +22 -0
  306. package/dist/utils/DependencyContainerUtil/index.js.map +1 -0
  307. package/dist/utils/LoadableUtil/LoadableUtil.d.ts +1 -1
  308. package/dist/utils/LoadableUtil/index.js.map +1 -1
  309. package/dist/utils/MenuDataUtil/MenuDataUtil.d.ts +1 -1
  310. package/dist/utils/MenuDataUtil/index.js.map +1 -1
  311. package/dist/utils/NotificationUtil/index.js.map +1 -1
  312. package/dist/utils/OutageUtil/OutageUtil.d.ts +1 -1
  313. package/dist/utils/OutageUtil/index.js +1 -2
  314. package/dist/utils/StandardConfigUtil/StandardConfigUtil.d.ts +1 -1
  315. package/dist/utils/StandardConfigUtil/index.js.map +1 -1
  316. package/dist/utils/TableUtil/TableUtil.d.ts +4 -4
  317. package/dist/utils/TableUtil/index.js +1 -2
  318. package/dist/utils/TimeUtil/index.js.map +1 -1
  319. package/dist/utils/UserManagerUtil/index.js +1 -2
  320. package/dist/utils/UserUtil/index.js.map +1 -1
  321. package/package.json +96 -86
  322. package/dist/_chunks/_baseGet.js +0 -280
  323. package/dist/_chunks/_baseGet.js.map +0 -1
  324. package/dist/_chunks/_baseIteratee.js +0 -274
  325. package/dist/_chunks/_baseIteratee.js.map +0 -1
  326. package/dist/_chunks/last.js +0 -13
  327. package/dist/_chunks/last.js.map +0 -1
  328. package/dist/_chunks/uniq.js +0 -44
  329. package/dist/_chunks/uniq.js.map +0 -1
  330. package/dist/classes/services/ApiService/ApiService.d.ts +0 -19
  331. package/dist/classes/services/ApiService/index.d.ts +0 -1
  332. package/dist/classes/services/ApiService/index.js +0 -21
  333. package/dist/classes/services/ApiService/index.js.map +0 -1
  334. package/dist/classes/services/ConfigService/ConfigService.d.ts +0 -9
  335. package/dist/classes/services/ConfigService/index.d.ts +0 -1
  336. package/dist/classes/services/ConfigService/index.js +0 -21
  337. package/dist/classes/services/ConfigService/index.js.map +0 -1
  338. package/dist/constants/query.js.map +0 -1
  339. package/dist/models/admin.js.map +0 -1
  340. package/dist/models/table.js.map +0 -1
  341. /package/dist/constants/{query.d.ts → query.constants.d.ts} +0 -0
  342. /package/dist/models/{admin.d.ts → admin.models.d.ts} +0 -0
  343. /package/dist/models/{api.d.ts → api.models.d.ts} +0 -0
  344. /package/dist/models/{api.js → api.models.js} +0 -0
  345. /package/dist/models/{auth.d.ts → auth.models.d.ts} +0 -0
  346. /package/dist/models/{auth.js → auth.models.js} +0 -0
  347. /package/dist/models/{config.d.ts → config.models.d.ts} +0 -0
  348. /package/dist/models/{config.js → config.models.js} +0 -0
  349. /package/dist/models/{data.js → data-hooks.models.js} +0 -0
  350. /package/dist/models/{data.d.ts → data.models.d.ts} +0 -0
  351. /package/dist/models/{dataHooks.js → data.models.js} +0 -0
  352. /package/dist/models/{filter.d.ts → filter.models.d.ts} +0 -0
  353. /package/dist/models/{filter.js → filter.models.js} +0 -0
  354. /package/dist/models/{notification.d.ts → notification.models.d.ts} +0 -0
  355. /package/dist/models/{notification.js → notification.models.js} +0 -0
  356. /package/dist/models/{outage.d.ts → outage.models.d.ts} +0 -0
  357. /package/dist/models/{outage.js → outage.models.js} +0 -0
  358. /package/dist/models/{reactRouter.d.ts → react-router.models.d.ts} +0 -0
  359. /package/dist/models/{reactRouter.js → react-router.models.js} +0 -0
  360. /package/dist/models/{theme.d.ts → theme.models.d.ts} +0 -0
  361. /package/dist/models/{theme.js → theme.models.js} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport type { CommonDbExternalLogItem } from '@gen-epix/api-commondb';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\n\nimport { AuthenticationService } from '../AuthenticationService';\nimport { ConfigService } from '../ConfigService';\nimport { ApiService } from '../ApiService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\nexport class LogService {\n private static __instance: LogService;\n\n protected readonly requestMap: Map<string, number>;\n\n private logItems: CommonDbExternalLogItem[] = [];\n\n private constructor() {\n this.requestMap = new Map<string, number>();\n setInterval(() => {\n this.sendLog();\n }, ConfigService.getInstance().config.log.LOG_INTERVAL_MS);\n }\n\n public static getInstance(): LogService {\n LogService.__instance = HmrUtil.getHmrSingleton('logService', LogService.__instance, () => new LogService());\n return LogService.__instance;\n }\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = ConfigService.getInstance().config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail ? JSON.stringify(item.detail) : null,\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n if (AxiosUtil.isAxiosCanceledError(error)) {\n return;\n }\n const requestId = error?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n this.log([{\n detail: {\n requestParams: error.config.params as unknown,\n responseData: error.response.data as unknown,\n status: error.response.status,\n url: error.config.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !AuthenticationService.getInstance()?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n ApiService.getInstance().systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch(() => 0);\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;AAsBA,IAAa,IAAb,MAAa,EAAW;CACtB,OAAe;CAEf;CAEA,WAA8C,CAAC;CAE/C,cAAsB;EAEpB,AADA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAG,EAAc,YAAY,CAAC,CAAC,OAAO,IAAI,eAAe;CAC3D;CAEA,OAAc,cAA0B;EAEtC,OADA,EAAW,aAAa,EAAQ,gBAAgB,cAAc,EAAW,kBAAkB,IAAI,EAAW,CAAC,GACpG,EAAW;CACpB;CAEA,WAAwB;EACtB,KAAK,QAAQ;CACf;CAEA,IAAW,GAA+B;EACxC,IAAM,qBAAY,IAAI,KAAK,EAAA,CAAE,YAAY,GACnC,IAAmB,EAAc,YAAY,CAAC,CAAC,OAAO,mBAAmB;EAC/E,KAAK,SAAS,KAAK,GAAG,EAAM,KAA6B,OAChD;GACL,YAAY,EAAW,WAAW;GAClC,QAAQ,EAAK,SAAS,KAAK,UAAU,EAAK,MAAM,IAAI;GACpD,UAAU,EAAK,YAAY;GAC3B,OAAO,EAAK;GACZ;GACA;GACA,OAAO,EAAK,SAAS;EACvB,EACD,CAAC;CACJ;CAEA,UAAiB,GAAiE;EAChF,IAAI,EAAQ,QAAQ,IAAI,cAAc,GACpC,OAAO;EAET,IAAM,IAAY,EAAW,WAAW;EAcxC,OAbA,EAAQ,QAAQ,IAAI,gBAAgB,CAAS,GAC7C,KAAK,WAAW,IAAI,oBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,CAAC,GAEnD,KAAK,IAAI,CAAC;GACR,QAAQ;IACN,aAAa,EAAQ;IACrB,eAAe,EAAQ;IACvB,KAAK,EAAQ;GACf;GACA,OAAO,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC,GAEK;CACT;CAEA,oBAA2B,GAAwC;EACjE,IAAI,EAAS,OAAO,QAAQ,IAAI,cAAc,GAC5C,OAAO;EAGT,IAAM,IAAY,GAAU,QAAQ,QAAQ,IAAI,cAAc,GACxD,qBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,IAAI,KAAK,WAAW,IAAI,CAAS;EAarE,OAXA,KAAK,IAAI,CAAC;GACR,QAAQ;IACN,aAAa,EAAS,OAAO;IAC7B,eAAe,EAAS,OAAO;IAC/B,KAAK,EAAS,OAAO;GACvB;GACA;GACA,OAAO,EAAS,UAAU,OAAO,EAAS,SAAS,MAAM,EAAiB,QAAQ,EAAiB;GACnG,OAAO;EACT,CAAC,CAAC,GAEK;CACT;CAEA,mBAA0B,GAAsB;EAC9C,IAAI,EAAa,CAAK,GAAG;GACvB,IAAI,EAAU,qBAAqB,CAAK,GACtC;GAEF,IAAM,IAAY,GAAO,QAAQ,QAAQ,IAAI,cAAc,GACrD,qBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,IAAI,KAAK,WAAW,IAAI,CAAS;GACrE,KAAK,IAAI,CAAC;IACR,QAAQ;KACN,eAAe,EAAM,OAAO;KAC5B,cAAc,EAAM,SAAS;KAC7B,QAAQ,EAAM,SAAS;KACvB,KAAK,EAAM,OAAO;IACpB;IACA;IACA,OAAO,EAAiB;IACxB,OAAO;GACT,CAAC,CAAC;EACJ,OACE,KAAK,IAAI,CAAC;GACR,QAAQ,EACN,SACF;GACA,OAAO,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC;CAEN;CAEA,UAAwB;EAClB,AAAC,KAAK,SAAS,UAAW,EAAsB,YAAY,CAAC,EAAE,kBAAkB,oBAGjF,SAAS,SAAS,KAAK,SAAS,mBAAmB,MAGvD,EAAW,YAAY,CAAC,CAAC,UAAU,IAAI,EACrC,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,YAAY,CAAC,GAChB,KAAK,WAAW,CAAC;CACnB;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","__decorateParam","LogService","config","authenticationService","systemApi","timestamp","software_version","items","StringUtil","item","request","requestId","CommonDbLogLevel","response","duration","isAxiosError","error","AxiosUtil","singleton","inject","CONFIG_TOKEN","AuthenticationService","API_SYSTEM_TOKEN"],"sources":["../../../../src/classes/services/LogService/LogService.ts"],"sourcesContent":["import { isAxiosError } from 'axios';\nimport type {\n AxiosResponse,\n InternalAxiosRequestConfig,\n} from 'axios';\nimport type {\n CommonDbExternalLogItem,\n CommonDbSystemApi,\n} from '@gen-epix/api-commondb';\nimport { CommonDbLogLevel } from '@gen-epix/api-commondb';\nimport { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport { API_SYSTEM_TOKEN } from '../../../constants/api.constants';\nimport { AuthenticationService } from '../AuthenticationService';\nimport { AxiosUtil } from '../../../utils/AxiosUtil';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\ntype LogServiceItem = {\n detail?: unknown;\n duration?: number;\n level: CommonDbLogLevel;\n topic: string;\n};\n\n@singleton()\nexport class LogService {\n protected readonly requestMap: Map<string, number>;\n\n private readonly authenticationService: AuthenticationService;\n private readonly config: Pick<ConfigBase, 'getSoftwareVersion' | 'log'>;\n private logItems: CommonDbExternalLogItem[] = [];\n private readonly systemApi: CommonDbSystemApi;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(AuthenticationService) authenticationService: AuthenticationService,\n @inject(API_SYSTEM_TOKEN) systemApi: CommonDbSystemApi,\n ) {\n this.requestMap = new Map<string, number>();\n this.config = config;\n this.authenticationService = authenticationService;\n this.systemApi = systemApi;\n setInterval(() => {\n this.sendLog();\n }, config.log.LOG_INTERVAL_MS);\n }\n\n\n public flushLog(): void {\n this.sendLog();\n }\n\n public log(items: LogServiceItem[]): void {\n const timestamp = new Date().toISOString();\n const software_version = this.config.getSoftwareVersion();\n this.logItems.push(...items.map<CommonDbExternalLogItem>(item => {\n return {\n command_id: StringUtil.createUuid(),\n detail: item.detail ? JSON.stringify(item.detail) : null,\n duration: item.duration ?? null,\n level: item.level,\n software_version,\n timestamp,\n topic: item.topic ?? null,\n };\n }));\n }\n\n public onRequest(request: InternalAxiosRequestConfig): InternalAxiosRequestConfig {\n if (request.headers.has('X-IGNORE-LOG')) {\n return request;\n }\n const requestId = StringUtil.createUuid();\n request.headers.set('X-REQUEST-ID', requestId);\n this.requestMap.set(requestId, new Date().getTime());\n\n this.log([{\n detail: {\n requestData: request.data as unknown,\n requestParams: request.params as unknown,\n url: request.url,\n },\n level: CommonDbLogLevel.TRACE,\n topic: 'REQUEST',\n }]);\n\n return request;\n }\n\n public onResponseFulfilled(response: AxiosResponse): AxiosResponse {\n if (response.config.headers.has('X-IGNORE-LOG')) {\n return response;\n }\n\n const requestId = response?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n\n this.log([{\n detail: {\n requestData: response.config.data as unknown,\n requestParams: response.config.params as unknown,\n url: response.config.url,\n },\n duration,\n level: response.status >= 200 && response.status < 300 ? CommonDbLogLevel.TRACE : CommonDbLogLevel.ERROR,\n topic: 'RESPONSE',\n }]);\n\n return response;\n }\n\n public onResponseRejected(error: unknown): void {\n if (isAxiosError(error)) {\n if (AxiosUtil.isAxiosCanceledError(error)) {\n return;\n }\n const requestId = error?.config?.headers.get('X-REQUEST-ID') as string;\n const duration = new Date().getTime() - this.requestMap.get(requestId);\n this.log([{\n detail: {\n requestParams: error.config.params as unknown,\n responseData: error.response.data as unknown,\n status: error.response.status,\n url: error.config.url,\n },\n duration,\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n } else {\n this.log([{\n detail: {\n error,\n },\n level: CommonDbLogLevel.ERROR,\n topic: 'RESPONSE_ERROR',\n }]);\n }\n }\n\n private sendLog(): void {\n if (!this.logItems.length || !this.authenticationService?.authContextProps?.isAuthenticated) {\n return;\n }\n if (document.location.href.includes('accept-invitation')) {\n return;\n }\n this.systemApi.log({\n log_items: this.logItems,\n }, {\n headers: {\n 'X-IGNORE-LOG': '1',\n },\n }).catch(() => 0);\n this.logItems = [];\n }\n}\n"],"mappings":";;;;;;;;;;;AA8BO,IAAMI,IAAN,MAAiB;CACtB;CAEA;CACA;CACA,WAA8C,CAAC;CAC/C;CAEA,YACE,GACA,GACA,GACA;EAKA,AAJA,KAAK,6BAAa,IAAI,IAAoB,GAC1C,KAAK,SAASC,GACd,KAAK,wBAAwBC,GAC7B,KAAK,YAAYC,GACjB,kBAAkB;GAChB,KAAK,QAAQ;EACf,GAAGF,EAAO,IAAI,eAAe;CAC/B;CAGA,WAAwB;EACtB,KAAK,QAAQ;CACf;CAEA,IAAW,GAA+B;EACxC,IAAMG,qBAAY,IAAI,KAAK,EAAA,CAAE,YAAY,GACnCC,IAAmB,KAAK,OAAO,mBAAmB;EACxD,KAAK,SAAS,KAAK,GAAGC,EAAM,KAA6B,OAChD;GACL,YAAYC,EAAW,WAAW;GAClC,QAAQC,EAAK,SAAS,KAAK,UAAUA,EAAK,MAAM,IAAI;GACpD,UAAUA,EAAK,YAAY;GAC3B,OAAOA,EAAK;GACZ;GACA;GACA,OAAOA,EAAK,SAAS;EACvB,EACD,CAAC;CACJ;CAEA,UAAiB,GAAiE;EAChF,IAAIC,EAAQ,QAAQ,IAAI,cAAc,GACpC,OAAOA;EAET,IAAMC,IAAYH,EAAW,WAAW;EAcxC,OAbAE,EAAQ,QAAQ,IAAI,gBAAgBC,CAAS,GAC7C,KAAK,WAAW,IAAIA,oBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,CAAC,GAEnD,KAAK,IAAI,CAAC;GACR,QAAQ;IACN,aAAaD,EAAQ;IACrB,eAAeA,EAAQ;IACvB,KAAKA,EAAQ;GACf;GACA,OAAOE,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC,GAEKF;CACT;CAEA,oBAA2B,GAAwC;EACjE,IAAIG,EAAS,OAAO,QAAQ,IAAI,cAAc,GAC5C,OAAOA;EAGT,IAAMF,IAAYE,GAAU,QAAQ,QAAQ,IAAI,cAAc,GACxDC,qBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,IAAI,KAAK,WAAW,IAAIH,CAAS;EAarE,OAXA,KAAK,IAAI,CAAC;GACR,QAAQ;IACN,aAAaE,EAAS,OAAO;IAC7B,eAAeA,EAAS,OAAO;IAC/B,KAAKA,EAAS,OAAO;GACvB;GACA;GACA,OAAOA,EAAS,UAAU,OAAOA,EAAS,SAAS,MAAMD,EAAiB,QAAQA,EAAiB;GACnG,OAAO;EACT,CAAC,CAAC,GAEKC;CACT;CAEA,mBAA0B,GAAsB;EAC9C,IAAIE,EAAaC,CAAK,GAAG;GACvB,IAAIC,EAAU,qBAAqBD,CAAK,GACtC;GAEF,IAAML,IAAYK,GAAO,QAAQ,QAAQ,IAAI,cAAc,GACrDF,qBAAW,IAAI,KAAK,EAAA,CAAE,QAAQ,IAAI,KAAK,WAAW,IAAIH,CAAS;GACrE,KAAK,IAAI,CAAC;IACR,QAAQ;KACN,eAAeK,EAAM,OAAO;KAC5B,cAAcA,EAAM,SAAS;KAC7B,QAAQA,EAAM,SAAS;KACvB,KAAKA,EAAM,OAAO;IACpB;IACA;IACA,OAAOJ,EAAiB;IACxB,OAAO;GACT,CAAC,CAAC;EACJ,OACE,KAAK,IAAI,CAAC;GACR,QAAQ,EACN,SACF;GACA,OAAOA,EAAiB;GACxB,OAAO;EACT,CAAC,CAAC;CAEN;CAEA,UAAwB;EACtB,AAAK,KAAK,SAAS,UAAW,KAAK,uBAAuB,kBAAkB,oBAGxE,SAAS,SAAS,KAAK,SAAS,mBAAmB,MAGvD,KAAK,UAAU,IAAI,EACjB,WAAW,KAAK,SAClB,GAAG,EACD,SAAS,EACP,gBAAgB,IAClB,EACF,CAAC,CAAC,CAAC,YAAY,CAAC,GAChB,KAAK,WAAW,CAAC;CACnB;AACF;;CApICM,EAAU;CAUNpB,EAAA,GAAAqB,EAAOC,CAAY,CAAA;CACnBtB,EAAA,GAAAqB,EAAOE,CAAqB,CAAA;CAC5BvB,EAAA,GAAAqB,EAAOG,CAAgB,CAAA"}
@@ -1,6 +1,3 @@
1
1
  export declare class NavigationHistoryService {
2
- private static __instance;
3
2
  readonly navigationHistory: string[];
4
- private constructor();
5
- static getInstance(): NavigationHistoryService;
6
3
  }
@@ -1,14 +1,11 @@
1
- import { HmrUtil as e } from "@gen-epix/ui-core/utils/HmrUtil";
1
+ import { t as e } from "../../../_chunks/decorate.js";
2
+ import { singleton as t } from "tsyringe";
2
3
  //#region src/classes/services/NavigationHistoryService/NavigationHistoryService.ts
3
- var t = class t {
4
- static __instance;
4
+ var n = class {
5
5
  navigationHistory = [];
6
- constructor() {}
7
- static getInstance() {
8
- return t.__instance = e.getHmrSingleton("navigationHistoryService", t.__instance, () => new t()), t.__instance;
9
- }
10
6
  };
7
+ n = e([t()], n);
11
8
  //#endregion
12
- export { t as NavigationHistoryService };
9
+ export { n as NavigationHistoryService };
13
10
 
14
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/NavigationHistoryService/NavigationHistoryService.ts"],"sourcesContent":["import { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nexport class NavigationHistoryService {\n private static __instance: NavigationHistoryService;\n\n public readonly navigationHistory: string[] = [];\n\n private constructor() {\n //\n }\n\n public static getInstance(): NavigationHistoryService {\n NavigationHistoryService.__instance = HmrUtil.getHmrSingleton('navigationHistoryService', NavigationHistoryService.__instance, () => new NavigationHistoryService());\n return NavigationHistoryService.__instance;\n }\n}\n"],"mappings":";;AAEA,IAAa,IAAb,MAAa,EAAyB;CACpC,OAAe;CAEf,oBAA8C,CAAC;CAE/C,cAAsB,CAEtB;CAEA,OAAc,cAAwC;EAEpD,OADA,EAAyB,aAAa,EAAQ,gBAAgB,4BAA4B,EAAyB,kBAAkB,IAAI,EAAyB,CAAC,GAC5J,EAAyB;CAClC;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","__decorate","NavigationHistoryService","singleton"],"sources":["../../../../src/classes/services/NavigationHistoryService/NavigationHistoryService.ts"],"sourcesContent":["import { singleton } from 'tsyringe';\n\n@singleton()\nexport class NavigationHistoryService {\n public readonly navigationHistory: string[] = [];\n\n}\n"],"mappings":";;;AAGO,IAAME,IAAN,MAA+B;CACpC,oBAA8C,CAAC;AAEjD;AAJC,IAAAF,EAAA,CAAAG,EAAU,CAAA,GAAAD,CAAA"}
@@ -1,10 +1,10 @@
1
1
  import { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';
2
- import { Notification } from '../../../models/notification';
2
+ import { Notification } from '../../../models/notification.models';
3
+ import { ConfigBase } from '../../../models/config.models';
3
4
  export declare class NotificationService extends SubscribableAbstract<Notification[]> {
4
- private static __instance;
5
+ private readonly config;
5
6
  private readonly notificationTimeouts;
6
- private constructor();
7
- static getInstance(): NotificationService;
7
+ constructor(config: ConfigBase);
8
8
  clearNotification(key: string): void;
9
9
  clearNotifications(): void;
10
10
  fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void;
@@ -1,17 +1,16 @@
1
- import { ConfigService as e } from "../ConfigService/index.js";
2
- import { StringUtil as t } from "@gen-epix/ui-core/utils/StringUtil";
3
- import { HmrUtil as n } from "@gen-epix/ui-core/utils/HmrUtil";
4
- import { Subject as r } from "@gen-epix/ui-core/classes/Subject";
5
- import { SubscribableAbstract as i } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
1
+ import { t as e } from "../../../_chunks/decorate.js";
2
+ import { CONFIG_TOKEN as t } from "../../../constants/config.constants.js";
3
+ import { t as n } from "../../../_chunks/decorateParam.js";
4
+ import { StringUtil as r } from "@gen-epix/ui-core/utils/StringUtil";
5
+ import { inject as i, singleton as a } from "tsyringe";
6
+ import { Subject as o } from "@gen-epix/ui-core/classes/Subject";
7
+ import { SubscribableAbstract as s } from "@gen-epix/ui-core/classes/abstracts/SubscribableAbstract";
6
8
  //#region src/classes/services/NotificationService/NotificationService.ts
7
- var a = class a extends i {
8
- static __instance;
9
+ var c = class extends s {
10
+ config;
9
11
  notificationTimeouts;
10
- constructor() {
11
- super(new r([])), this.notificationTimeouts = {};
12
- }
13
- static getInstance() {
14
- return a.__instance = n.getHmrSingleton("notificationService", a.__instance, () => new a()), a.__instance;
12
+ constructor(e) {
13
+ super(new o([])), this.config = e, this.notificationTimeouts = {};
15
14
  }
16
15
  clearNotification(e) {
17
16
  this.subject.next(this.subject.data.filter((t) => t.key !== e)), this.notificationTimeouts[e] && (clearTimeout(this.notificationTimeouts[e]), delete this.notificationTimeouts[e]);
@@ -41,23 +40,24 @@ var a = class a extends i {
41
40
  visible: !1
42
41
  } : t)), clearTimeout(this.notificationTimeouts[e]), delete this.notificationTimeouts[e];
43
42
  }
44
- showNotification(n) {
45
- let r = t.createUuid(), i = n.autoHideAfterMs ?? e.getInstance().config.notifications.autoHideAfterMs;
43
+ showNotification(e) {
44
+ let t = r.createUuid(), n = e.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;
46
45
  return this.subject.next([{
47
- ...n,
48
- autoHideAfterMs: i,
49
- key: r,
46
+ ...e,
47
+ autoHideAfterMs: n,
48
+ key: t,
50
49
  timestamp: (/* @__PURE__ */ new Date()).getTime(),
51
50
  visible: !0
52
- }, ...this.subject.data]), isFinite(i) && (this.notificationTimeouts[r] = setTimeout(() => {
53
- this.subject.next(this.subject.data.map((e) => e.key === r ? {
51
+ }, ...this.subject.data]), isFinite(n) && (this.notificationTimeouts[t] = setTimeout(() => {
52
+ this.subject.next(this.subject.data.map((e) => e.key === t ? {
54
53
  ...e,
55
54
  visible: !1
56
55
  } : e));
57
- }, i)), r;
56
+ }, n)), t;
58
57
  }
59
58
  };
59
+ c = e([a(), n(0, i(t))], c);
60
60
  //#endregion
61
- export { a as NotificationService };
61
+ export { c as NotificationService };
62
62
 
63
63
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/NotificationService/NotificationService.ts"],"sourcesContent":["import { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nimport { ConfigService } from '../ConfigService';\nimport type { Notification } from '../../../models/notification';\n\nexport class NotificationService extends SubscribableAbstract<Notification[]> {\n private static __instance: NotificationService;\n\n private readonly notificationTimeouts: Record<string, ReturnType<typeof setTimeout>>;\n\n private constructor() {\n super(new Subject<Notification[]>([]));\n this.notificationTimeouts = {};\n }\n\n public static getInstance(): NotificationService {\n NotificationService.__instance = HmrUtil.getHmrSingleton('notificationService', NotificationService.__instance, () => new NotificationService());\n return NotificationService.__instance;\n }\n\n public clearNotification(key: string): void {\n this.subject.next(this.subject.data.filter(x => x.key !== key));\n if (this.notificationTimeouts[key]) {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n }\n\n public clearNotifications(): void {\n this.subject.next([]);\n Object.keys(this.notificationTimeouts).forEach(key => {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n });\n }\n\n public fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n isLoading: false,\n message,\n severity,\n };\n }\n return x;\n }));\n }\n\n public hideAllNotifications(): void {\n this.subject.next(this.subject.data.map(x => ({\n ...x,\n visible: false,\n })));\n }\n\n public hideNotification(key: string): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n\n public showNotification(notification: Omit<Notification, 'key' | 'timestamp' | 'visible'>): string {\n const key = StringUtil.createUuid();\n const autoHideAfterMs = notification.autoHideAfterMs ?? ConfigService.getInstance().config.notifications.autoHideAfterMs;\n\n this.subject.next([\n {\n ...notification,\n autoHideAfterMs,\n key,\n timestamp: new Date().getTime(),\n visible: true,\n },\n ...this.subject.data,\n ]);\n\n if (isFinite(autoHideAfterMs)) {\n this.notificationTimeouts[key] = setTimeout(() => {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n }, autoHideAfterMs);\n }\n return key;\n }\n}\n"],"mappings":";;;;;;AAQA,IAAa,IAAb,MAAa,UAA4B,EAAqC;CAC5E,OAAe;CAEf;CAEA,cAAsB;EAEpB,AADA,MAAM,IAAI,EAAwB,CAAC,CAAC,CAAC,GACrC,KAAK,uBAAuB,CAAC;CAC/B;CAEA,OAAc,cAAmC;EAE/C,OADA,EAAoB,aAAa,EAAQ,gBAAgB,uBAAuB,EAAoB,kBAAkB,IAAI,EAAoB,CAAC,GACxI,EAAoB;CAC7B;CAEA,kBAAyB,GAAmB;EAE1C,AADA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,QAAO,MAAK,EAAE,QAAQ,CAAG,CAAC,GAC1D,KAAK,qBAAqB,OAC5B,aAAa,KAAK,qBAAqB,EAAI,GAC3C,OAAO,KAAK,qBAAqB;CAErC;CAEA,qBAAkC;EAEhC,AADA,KAAK,QAAQ,KAAK,CAAC,CAAC,GACpB,OAAO,KAAK,KAAK,oBAAoB,CAAC,CAAC,SAAQ,MAAO;GAEpD,AADA,aAAa,KAAK,qBAAqB,EAAI,GAC3C,OAAO,KAAK,qBAAqB;EACnC,CAAC;CACH;CAEA,oBAA2B,GAAa,GAAkC,GAA0C;EAClH,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClC,EAAE,QAAQ,IACL;GACL,GAAG;GACH,WAAW;GACX;GACA;EACF,IAEK,CACR,CAAC;CACJ;CAEA,uBAAoC;EAClC,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,OAAM;GAC5C,GAAG;GACH,SAAS;EACX,EAAE,CAAC;CACL;CAEA,iBAAwB,GAAmB;EAWzC,AAVA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClC,EAAE,QAAQ,IACL;GACL,GAAG;GACH,SAAS;EACX,IAEK,CACR,CAAC,GACF,aAAa,KAAK,qBAAqB,EAAI,GAC3C,OAAO,KAAK,qBAAqB;CACnC;CAEA,iBAAwB,GAA2E;EACjG,IAAM,IAAM,EAAW,WAAW,GAC5B,IAAkB,EAAa,mBAAmB,EAAc,YAAY,CAAC,CAAC,OAAO,cAAc;EA0BzG,OAxBA,KAAK,QAAQ,KAAK,CAChB;GACE,GAAG;GACH;GACA;GACA,4BAAW,IAAI,KAAK,EAAA,CAAE,QAAQ;GAC9B,SAAS;EACX,GACA,GAAG,KAAK,QAAQ,IAClB,CAAC,GAEG,SAAS,CAAe,MAC1B,KAAK,qBAAqB,KAAO,iBAAiB;GAChD,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClC,EAAE,QAAQ,IACL;IACL,GAAG;IACH,SAAS;GACX,IAEK,CACR,CAAC;EACJ,GAAG,CAAe,IAEb;CACT;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","__decorateParam","NotificationService","SubscribableAbstract","Subject","config","x","key","StringUtil","autoHideAfterMs","notification","singleton","inject","CONFIG_TOKEN"],"sources":["../../../../src/classes/services/NotificationService/NotificationService.ts"],"sourcesContent":["import { StringUtil } from '@gen-epix/ui-core/utils/StringUtil';\nimport { SubscribableAbstract } from '@gen-epix/ui-core/classes/abstracts/SubscribableAbstract';\nimport { Subject } from '@gen-epix/ui-core/classes/Subject';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport type { Notification } from '../../../models/notification.models';\nimport { CONFIG_TOKEN } from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\n@singleton()\nexport class NotificationService extends SubscribableAbstract<Notification[]> {\n private readonly config: Pick<ConfigBase, 'notifications'>;\n private readonly notificationTimeouts: Record<string, ReturnType<typeof setTimeout>>;\n\n public constructor(@inject(CONFIG_TOKEN) config: ConfigBase) {\n super(new Subject<Notification[]>([]));\n this.config = config;\n this.notificationTimeouts = {};\n }\n\n\n public clearNotification(key: string): void {\n this.subject.next(this.subject.data.filter(x => x.key !== key));\n if (this.notificationTimeouts[key]) {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n }\n\n public clearNotifications(): void {\n this.subject.next([]);\n Object.keys(this.notificationTimeouts).forEach(key => {\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n });\n }\n\n public fulfillNotification(key: string, message: Notification['message'], severity: Notification['severity']): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n isLoading: false,\n message,\n severity,\n };\n }\n return x;\n }));\n }\n\n public hideAllNotifications(): void {\n this.subject.next(this.subject.data.map(x => ({\n ...x,\n visible: false,\n })));\n }\n\n public hideNotification(key: string): void {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n clearTimeout(this.notificationTimeouts[key]);\n delete this.notificationTimeouts[key];\n }\n\n public showNotification(notification: Omit<Notification, 'key' | 'timestamp' | 'visible'>): string {\n const key = StringUtil.createUuid();\n const autoHideAfterMs = notification.autoHideAfterMs ?? this.config.notifications.autoHideAfterMs;\n\n this.subject.next([\n {\n ...notification,\n autoHideAfterMs,\n key,\n timestamp: new Date().getTime(),\n visible: true,\n },\n ...this.subject.data,\n ]);\n\n if (isFinite(autoHideAfterMs)) {\n this.notificationTimeouts[key] = setTimeout(() => {\n this.subject.next(this.subject.data.map(x => {\n if (x.key === key) {\n return {\n ...x,\n visible: false,\n };\n }\n return x;\n }));\n }, autoHideAfterMs);\n }\n return key;\n }\n}\n"],"mappings":";;;;;;;;AAaO,IAAMI,IAAN,cAAkCC,EAAqC;CAC5E;CACA;CAEA,YAAmB,GAA0C;EAG3D,AAFA,MAAM,IAAIC,EAAwB,CAAC,CAAC,CAAC,GACrC,KAAK,SAASC,GACd,KAAK,uBAAuB,CAAC;CAC/B;CAGA,kBAAyB,GAAmB;EAE1C,AADA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,QAAO,MAAKC,EAAE,QAAQC,CAAG,CAAC,GAC1D,KAAK,qBAAqBA,OAC5B,aAAa,KAAK,qBAAqBA,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;CAErC;CAEA,qBAAkC;EAEhC,AADA,KAAK,QAAQ,KAAK,CAAC,CAAC,GACpB,OAAO,KAAK,KAAK,oBAAoB,CAAC,CAAC,SAAQ,MAAO;GAEpD,AADA,aAAa,KAAK,qBAAqBA,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;EACnC,CAAC;CACH;CAEA,oBAA2B,GAAa,GAAkC,GAA0C;EAClH,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCD,EAAE,QAAQC,IACL;GACL,GAAGD;GACH,WAAW;GACX;GACA;EACF,IAEKA,CACR,CAAC;CACJ;CAEA,uBAAoC;EAClC,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,OAAM;GAC5C,GAAGA;GACH,SAAS;EACX,EAAE,CAAC;CACL;CAEA,iBAAwB,GAAmB;EAWzC,AAVA,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCA,EAAE,QAAQC,IACL;GACL,GAAGD;GACH,SAAS;EACX,IAEKA,CACR,CAAC,GACF,aAAa,KAAK,qBAAqBC,EAAI,GAC3C,OAAO,KAAK,qBAAqBA;CACnC;CAEA,iBAAwB,GAA2E;EACjG,IAAMA,IAAMC,EAAW,WAAW,GAC5BC,IAAkBC,EAAa,mBAAmB,KAAK,OAAO,cAAc;EA0BlF,OAxBA,KAAK,QAAQ,KAAK,CAChB;GACE,GAAGA;GACH;GACA;GACA,4BAAW,IAAI,KAAK,EAAA,CAAE,QAAQ;GAC9B,SAAS;EACX,GACA,GAAG,KAAK,QAAQ,IAClB,CAAC,GAEG,SAASD,CAAe,MAC1B,KAAK,qBAAqBF,KAAO,iBAAiB;GAChD,KAAK,QAAQ,KAAK,KAAK,QAAQ,KAAK,KAAI,MAClCD,EAAE,QAAQC,IACL;IACL,GAAGD;IACH,SAAS;GACX,IAEKA,CACR,CAAC;EACJ,GAAGG,CAAe,IAEbF;CACT;AACF;AA7FC,IAAAT,EAAA,CAAAa,EAAU,GAAAZ,EAAA,GAKWa,EAAOC,CAAY,CAAA,CAAA,GAAAX,CAAA"}
@@ -1,5 +1,7 @@
1
1
  import { CommonDbUser } from '@gen-epix/api-commondb';
2
2
  import { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';
3
+ import { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';
4
+ import { ConfigBase } from '../../../models/config.models';
3
5
  type EpiEvent = {
4
6
  changePage: Page;
5
7
  changeUser: CommonDbUser;
@@ -16,10 +18,9 @@ type Page = {
16
18
  pageName: string;
17
19
  };
18
20
  export declare class PageEventBusService extends EventBusAbstract<EpiEvent> {
19
- private static __instance;
20
21
  private lastPageEventPayload;
21
- private constructor();
22
- static getInstance(): PageEventBusService;
22
+ private readonly windowService;
23
+ constructor(config: ConfigBase, windowService: WindowService);
23
24
  emit<TEventName extends keyof EpiEvent>(eventName: TEventName, payload?: EpiEvent[TEventName]): void;
24
25
  getPage(): Page;
25
26
  private setupClickEventListener;
@@ -1,16 +1,14 @@
1
- import { ConfigService as e } from "../ConfigService/index.js";
2
- import { WindowService as t } from "@gen-epix/ui-core/classes/services/WindowService";
3
- import { HmrUtil as n } from "@gen-epix/ui-core/utils/HmrUtil";
4
- import { EventBusAbstract as r } from "@gen-epix/ui-core/classes/abstracts/EventBusAbstract";
1
+ import { t as e } from "../../../_chunks/decorate.js";
2
+ import { CONFIG_TOKEN as t, WINDOW_SERVICE_TOKEN as n } from "../../../constants/config.constants.js";
3
+ import { t as r } from "../../../_chunks/decorateParam.js";
4
+ import { inject as i, singleton as a } from "tsyringe";
5
+ import { EventBusAbstract as o } from "@gen-epix/ui-core/classes/abstracts/EventBusAbstract";
5
6
  //#region src/classes/services/PageEventBusService/PageEventBusService.ts
6
- var i = class i extends r {
7
- static __instance;
7
+ var s = class extends o {
8
8
  lastPageEventPayload = null;
9
- constructor() {
10
- super(), this.setupClickEventListener();
11
- }
12
- static getInstance() {
13
- return i.__instance = n.getHmrSingleton("pageEventBusService", i.__instance, () => new i()), i.__instance;
9
+ windowService;
10
+ constructor(e, t) {
11
+ super(), this.windowService = t, this.setupClickEventListener(e.enablePageEvents);
14
12
  }
15
13
  emit(e, t) {
16
14
  if (e === "changePage") {
@@ -21,12 +19,12 @@ var i = class i extends r {
21
19
  }
22
20
  getPage() {
23
21
  return {
24
- location: t.getInstance().window.location,
22
+ location: this.windowService.window.location,
25
23
  pageName: document.querySelector("[data-page-container]")?.getAttribute("data-testid")
26
24
  };
27
25
  }
28
- setupClickEventListener() {
29
- e.getInstance().config.enablePageEvents && t.getInstance().window.addEventListener("click", (e) => {
26
+ setupClickEventListener(e) {
27
+ e && this.windowService.window.addEventListener("click", (e) => {
30
28
  let t = e.target.closest("button"), n = e.target.closest("a"), r = t || n;
31
29
  if (r) {
32
30
  let e = r?.closest("[data-testid]")?.getAttribute("data-testid") ?? "", n = r.getAttribute("aria-label") ?? r.getAttribute("title");
@@ -60,7 +58,12 @@ var i = class i extends r {
60
58
  return null;
61
59
  }
62
60
  };
61
+ s = e([
62
+ a(),
63
+ r(0, i(t)),
64
+ r(1, i(n))
65
+ ], s);
63
66
  //#endregion
64
- export { i as PageEventBusService };
67
+ export { s as PageEventBusService };
65
68
 
66
69
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/PageEventBusService/PageEventBusService.ts"],"sourcesContent":["import type { CommonDbUser } from '@gen-epix/api-commondb';\nimport { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\nimport { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\n\nimport { ConfigService } from '../ConfigService';\n\ntype EpiEvent = {\n changePage: Page;\n changeUser: CommonDbUser;\n click: {\n context?: string;\n label: string;\n page?: Page;\n type: 'button' | 'link' | 'table-row-index' | 'table-row';\n };\n error: Error;\n};\n\ntype Page = {\n location: Location;\n pageName: string;\n};\n\nexport class PageEventBusService extends EventBusAbstract<EpiEvent> {\n private static __instance: PageEventBusService;\n\n private lastPageEventPayload: string = null;\n\n private constructor() {\n super();\n this.setupClickEventListener();\n }\n\n public static getInstance(): PageEventBusService {\n PageEventBusService.__instance = HmrUtil.getHmrSingleton('pageEventBusService', PageEventBusService.__instance, () => new PageEventBusService());\n return PageEventBusService.__instance;\n }\n\n public emit<TEventName extends keyof EpiEvent>(eventName: TEventName, payload?: EpiEvent[TEventName]): void {\n if (eventName === 'changePage') {\n if (this.lastPageEventPayload === (payload as EpiEvent['changePage']).pageName) {\n return;\n }\n this.lastPageEventPayload = (payload as EpiEvent['changePage']).pageName;\n }\n\n if (eventName === 'click' && !(payload as EpiEvent['click']).page) {\n (payload as EpiEvent['click']).page = this.getPage();\n }\n\n super.emit(eventName, payload);\n }\n\n\n public getPage(): Page {\n return {\n location: WindowService.getInstance().window.location,\n pageName: document.querySelector('[data-page-container]')?.getAttribute('data-testid'),\n };\n }\n\n private setupClickEventListener(): void {\n if (!ConfigService.getInstance().config.enablePageEvents) {\n return;\n }\n WindowService.getInstance().window.addEventListener('click', (event: Event): void => {\n\n const closestButton = (event.target as HTMLElement).closest('button');\n const closestLink = (event.target as HTMLElement).closest('a');\n const closestElement = closestButton || closestLink;\n\n if (closestElement) {\n const context = closestElement?.closest('[data-testid]')?.getAttribute('data-testid') ?? '';\n\n const buttonTitle = closestElement.getAttribute('aria-label') ?? closestElement.getAttribute('title');\n if (buttonTitle) {\n this.emit('click', {\n context,\n label: buttonTitle,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const childTextNode = this.traverseDom(closestElement, (el) => el.nodeType === Node.TEXT_NODE);\n if (childTextNode?.nodeValue) {\n this.emit('click', {\n context,\n label: childTextNode?.nodeValue,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const nodeWithText = this.traverseDom(closestElement, (el) => !!el.innerText);\n if (nodeWithText?.innerText) {\n this.emit('click', {\n context,\n label: nodeWithText?.innerText.split('\\n')[0],\n type: closestButton ? 'button' : 'link',\n });\n }\n }\n }\n }\n });\n }\n\n private traverseDom(element: HTMLElement, predicate: (element: HTMLElement) => boolean): HTMLElement {\n if (predicate(element)) {\n return element;\n }\n for (const child of Array.from(element.childNodes)) {\n const found = this.traverseDom(child as HTMLElement, predicate);\n if (found) {\n return child as HTMLElement;\n }\n }\n return null;\n }\n}\n"],"mappings":";;;;;AAwBA,IAAa,IAAb,MAAa,UAA4B,EAA2B;CAClE,OAAe;CAEf,uBAAuC;CAEvC,cAAsB;EAEpB,AADA,MAAM,GACN,KAAK,wBAAwB;CAC/B;CAEA,OAAc,cAAmC;EAE/C,OADA,EAAoB,aAAa,EAAQ,gBAAgB,uBAAuB,EAAoB,kBAAkB,IAAI,EAAoB,CAAC,GACxI,EAAoB;CAC7B;CAEA,KAA+C,GAAuB,GAAsC;EAC1G,IAAI,MAAc,cAAc;GAC9B,IAAI,KAAK,yBAA0B,EAAmC,UACpE;GAEF,KAAK,uBAAwB,EAAmC;EAClE;EAMA,AAJI,MAAc,WAAW,CAAE,EAA8B,SAC3D,EAA+B,OAAO,KAAK,QAAQ,IAGrD,MAAM,KAAK,GAAW,CAAO;CAC/B;CAGA,UAAuB;EACrB,OAAO;GACL,UAAU,EAAc,YAAY,CAAC,CAAC,OAAO;GAC7C,UAAU,SAAS,cAAc,uBAAuB,CAAC,EAAE,aAAa,aAAa;EACvF;CACF;CAEA,0BAAwC;EACjC,EAAc,YAAY,CAAC,CAAC,OAAO,oBAGxC,EAAc,YAAY,CAAC,CAAC,OAAO,iBAAiB,UAAU,MAAuB;GAEnF,IAAM,IAAiB,EAAM,OAAuB,QAAQ,QAAQ,GAC9D,IAAe,EAAM,OAAuB,QAAQ,GAAG,GACvD,IAAiB,KAAiB;GAExC,IAAI,GAAgB;IAClB,IAAM,IAAU,GAAgB,QAAQ,eAAe,CAAC,EAAE,aAAa,aAAa,KAAK,IAEnF,IAAc,EAAe,aAAa,YAAY,KAAK,EAAe,aAAa,OAAO;IACpG,IAAI,GACF,KAAK,KAAK,SAAS;KACjB;KACA,OAAO;KACP,MAAM,IAAgB,WAAW;IACnC,CAAC;SACI;KACL,IAAM,IAAgB,KAAK,YAAY,IAAiB,MAAO,EAAG,aAAa,KAAK,SAAS;KAC7F,IAAI,GAAe,WACjB,KAAK,KAAK,SAAS;MACjB;MACA,OAAO,GAAe;MACtB,MAAM,IAAgB,WAAW;KACnC,CAAC;UACI;MACL,IAAM,IAAe,KAAK,YAAY,IAAiB,MAAO,CAAC,CAAC,EAAG,SAAS;MAC5E,AAAI,GAAc,aAChB,KAAK,KAAK,SAAS;OACjB;OACA,OAAO,GAAc,UAAU,MAAM,IAAI,CAAC,CAAC;OAC3C,MAAM,IAAgB,WAAW;MACnC,CAAC;KAEL;IACF;GACF;EACF,CAAC;CACH;CAEA,YAAoB,GAAsB,GAA2D;EACnG,IAAI,EAAU,CAAO,GACnB,OAAO;EAET,KAAK,IAAM,KAAS,MAAM,KAAK,EAAQ,UAAU,GAE/C,IADc,KAAK,YAAY,GAAsB,CACjD,GACF,OAAO;EAGX,OAAO;CACT;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","_decorateParam","__decorate","__decorateParam","PageEventBusService","EventBusAbstract","windowService","config","eventName","payload","enablePageEvents","closestButton","event","closestLink","closestElement","context","buttonTitle","childTextNode","el","nodeWithText","predicate","element","child","singleton","inject","CONFIG_TOKEN","WINDOW_SERVICE_TOKEN"],"sources":["../../../../src/classes/services/PageEventBusService/PageEventBusService.ts"],"sourcesContent":["import type { CommonDbUser } from '@gen-epix/api-commondb';\nimport { EventBusAbstract } from '@gen-epix/ui-core/classes/abstracts/EventBusAbstract';\nimport type { WindowService } from '@gen-epix/ui-core/classes/services/WindowService';\nimport {\n inject,\n singleton,\n} from 'tsyringe';\n\nimport {\n CONFIG_TOKEN,\n WINDOW_SERVICE_TOKEN,\n} from '../../../constants/config.constants';\nimport type { ConfigBase } from '../../../models/config.models';\n\ntype EpiEvent = {\n changePage: Page;\n changeUser: CommonDbUser;\n click: {\n context?: string;\n label: string;\n page?: Page;\n type: 'button' | 'link' | 'table-row-index' | 'table-row';\n };\n error: Error;\n};\n\ntype Page = {\n location: Location;\n pageName: string;\n};\n\n@singleton()\nexport class PageEventBusService extends EventBusAbstract<EpiEvent> {\n private lastPageEventPayload: string = null;\n private readonly windowService: WindowService;\n\n public constructor(\n @inject(CONFIG_TOKEN) config: ConfigBase,\n @inject(WINDOW_SERVICE_TOKEN) windowService: WindowService,\n ) {\n super();\n this.windowService = windowService;\n this.setupClickEventListener(config.enablePageEvents);\n }\n\n\n public emit<TEventName extends keyof EpiEvent>(eventName: TEventName, payload?: EpiEvent[TEventName]): void {\n if (eventName === 'changePage') {\n if (this.lastPageEventPayload === (payload as EpiEvent['changePage']).pageName) {\n return;\n }\n this.lastPageEventPayload = (payload as EpiEvent['changePage']).pageName;\n }\n\n if (eventName === 'click' && !(payload as EpiEvent['click']).page) {\n (payload as EpiEvent['click']).page = this.getPage();\n }\n\n super.emit(eventName, payload);\n }\n\n public getPage(): Page {\n return {\n location: this.windowService.window.location,\n pageName: document.querySelector('[data-page-container]')?.getAttribute('data-testid'),\n };\n }\n\n private setupClickEventListener(enablePageEvents: boolean): void {\n if (!enablePageEvents) {\n return;\n }\n this.windowService.window.addEventListener('click', (event: Event): void => {\n\n const closestButton = (event.target as HTMLElement).closest('button');\n const closestLink = (event.target as HTMLElement).closest('a');\n const closestElement = closestButton || closestLink;\n\n if (closestElement) {\n const context = closestElement?.closest('[data-testid]')?.getAttribute('data-testid') ?? '';\n\n const buttonTitle = closestElement.getAttribute('aria-label') ?? closestElement.getAttribute('title');\n if (buttonTitle) {\n this.emit('click', {\n context,\n label: buttonTitle,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const childTextNode = this.traverseDom(closestElement, (el) => el.nodeType === Node.TEXT_NODE);\n if (childTextNode?.nodeValue) {\n this.emit('click', {\n context,\n label: childTextNode?.nodeValue,\n type: closestButton ? 'button' : 'link',\n });\n } else {\n const nodeWithText = this.traverseDom(closestElement, (el) => !!el.innerText);\n if (nodeWithText?.innerText) {\n this.emit('click', {\n context,\n label: nodeWithText?.innerText.split('\\n')[0],\n type: closestButton ? 'button' : 'link',\n });\n }\n }\n }\n }\n });\n }\n\n private traverseDom(element: HTMLElement, predicate: (element: HTMLElement) => boolean): HTMLElement {\n if (predicate(element)) {\n return element;\n }\n for (const child of Array.from(element.childNodes)) {\n const found = this.traverseDom(child as HTMLElement, predicate);\n if (found) {\n return child as HTMLElement;\n }\n }\n return null;\n }\n}\n"],"mappings":";;;;;;AAgCO,IAAMI,IAAN,cAAkCC,EAA2B;CAClE,uBAAuC;CACvC;CAEA,YACE,GACA,GACA;EAGA,AAFA,MAAM,GACN,KAAK,gBAAgBC,GACrB,KAAK,wBAAwBC,EAAO,gBAAgB;CACtD;CAGA,KAA+C,GAAuB,GAAsC;EAC1G,IAAIC,MAAc,cAAc;GAC9B,IAAI,KAAK,yBAA0BC,EAAmC,UACpE;GAEF,KAAK,uBAAwBA,EAAmC;EAClE;EAMA,AAJID,MAAc,WAAW,CAAEC,EAA8B,SAC3D,EAA+B,OAAO,KAAK,QAAQ,IAGrD,MAAM,KAAKD,GAAWC,CAAO;CAC/B;CAEA,UAAuB;EACrB,OAAO;GACL,UAAU,KAAK,cAAc,OAAO;GACpC,UAAU,SAAS,cAAc,uBAAuB,CAAC,EAAE,aAAa,aAAa;EACvF;CACF;CAEA,wBAAgC,GAAiC;EAC/D,AAAKC,KAGL,KAAK,cAAc,OAAO,iBAAiB,UAAU,MAAuB;GAE1E,IAAMC,IAAiBC,EAAM,OAAuB,QAAQ,QAAQ,GAC9DC,IAAeD,EAAM,OAAuB,QAAQ,GAAG,GACvDE,IAAiBH,KAAiBE;GAExC,IAAIC,GAAgB;IAClB,IAAMC,IAAUD,GAAgB,QAAQ,eAAe,CAAC,EAAE,aAAa,aAAa,KAAK,IAEnFE,IAAcF,EAAe,aAAa,YAAY,KAAKA,EAAe,aAAa,OAAO;IACpG,IAAIE,GACF,KAAK,KAAK,SAAS;KACjB;KACA,OAAOA;KACP,MAAML,IAAgB,WAAW;IACnC,CAAC;SACI;KACL,IAAMM,IAAgB,KAAK,YAAYH,IAAiB,MAAOI,EAAG,aAAa,KAAK,SAAS;KAC7F,IAAID,GAAe,WACjB,KAAK,KAAK,SAAS;MACjB;MACA,OAAOA,GAAe;MACtB,MAAMN,IAAgB,WAAW;KACnC,CAAC;UACI;MACL,IAAMQ,IAAe,KAAK,YAAYL,IAAiB,MAAO,CAAC,CAACI,EAAG,SAAS;MAC5E,AAAIC,GAAc,aAChB,KAAK,KAAK,SAAS;OACjB;OACA,OAAOA,GAAc,UAAU,MAAM,IAAI,CAAC,CAAC;OAC3C,MAAMR,IAAgB,WAAW;MACnC,CAAC;KAEL;IACF;GACF;EACF,CAAC;CACH;CAEA,YAAoB,GAAsB,GAA2D;EACnG,IAAIS,EAAUC,CAAO,GACnB,OAAOA;EAET,KAAK,IAAMC,KAAS,MAAM,KAAKD,EAAQ,UAAU,GAE/C,IADc,KAAK,YAAYC,GAAsBF,CACjD,GACF,OAAOE;EAGX,OAAO;CACT;AACF;;CA5FCC,EAAU;CAMNtB,EAAA,GAAAuB,EAAOC,CAAY,CAAA;CACnBxB,EAAA,GAAAuB,EAAOE,CAAoB,CAAA"}
@@ -1,13 +1,15 @@
1
1
  import { MutationCache, QueryCache, QueryClient } from '@tanstack/react-query';
2
- import { GenericData } from '../../../models/data';
2
+ import { GenericData } from '../../../models/data.models';
3
+ import { ConfigBase } from '../../../models/config.models';
3
4
  export declare class QueryClientService<TQueryKey extends string = string> {
4
- private static __instance;
5
5
  mutationCache: MutationCache;
6
6
  queryCache: QueryCache;
7
7
  queryClient: QueryClient;
8
8
  queryKeyDependencies: Record<TQueryKey, TQueryKey[]>;
9
- private constructor();
10
- static getInstance<TQueryKey extends string>(): QueryClientService<TQueryKey>;
9
+ constructor(kwArgs: {
10
+ config: Pick<ConfigBase, 'queryClient'>;
11
+ queryKeyDependencies: Array<Record<TQueryKey, TQueryKey[]>>;
12
+ });
11
13
  private static mergeQueryKeyDependencies;
12
14
  cancelQueries(queryKeys: string[][]): Promise<void>;
13
15
  getGenericKey(key: TQueryKey, arg?: unknown): string[];
@@ -15,9 +17,6 @@ export declare class QueryClientService<TQueryKey extends string = string> {
15
17
  getQueryKeyDependencies(queryKeys: TQueryKey[], includeSelf?: boolean): string[][];
16
18
  getUniqueQueryKeys<T>(queryKeys: T[][]): T[][];
17
19
  getValidQueryData<T>(queryKey: string[]): T;
18
- initialize(kwArgs: {
19
- queryKeyDependencies: Array<Record<TQueryKey, TQueryKey[]>>;
20
- }): void;
21
20
  invalidateQueryKeys(queryKeys: string[][]): Promise<void>;
22
21
  removeQueries(queryKeys: string[][]): void;
23
22
  private getDirectQueryKeyDependents;
@@ -1,2 +1 @@
1
- import { t as e } from "../../../_chunks/QueryClientService.js";
2
- export { e as QueryClientService };
1
+ export { t as QueryClientService } from "../../../_chunks/QueryClientService.js";
@@ -1,28 +1,25 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { createBrowserRouter } from 'react-router-dom';
3
- import { MyNonIndexRouteObject } from '../../../models/reactRouter';
3
+ import { MyNonIndexRouteObject } from '../../../models/react-router.models';
4
4
  type HomePage = () => ReactElement;
5
5
  type RoutesFactory = () => MyNonIndexRouteObject[];
6
6
  type RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;
7
7
  export declare class RouterService {
8
- private static __instance;
9
8
  get adminRoutes(): MyNonIndexRouteObject[];
10
9
  get homePageComponent(): HomePage;
11
10
  get router(): ReturnType<typeof createBrowserRouter>;
12
11
  get routes(): MyNonIndexRouteObject[];
13
12
  private __adminRoutes;
14
- private __adminRoutesFactory;
15
- private __homePageComponent;
13
+ private readonly __adminRoutesFactory;
14
+ private readonly __homePageComponent;
16
15
  private __router;
17
16
  private __routes;
18
- private __routesFactory;
19
- private constructor();
20
- static getInstance(): RouterService;
21
- initialize(kwArgs: {
17
+ private readonly __routesFactory;
18
+ constructor(kwArgs: {
22
19
  adminRoutes: RoutesInput;
23
20
  homePageComponent: HomePage;
24
21
  routes: RoutesInput;
25
- }): void;
22
+ });
26
23
  private createRoutesFactory;
27
24
  }
28
25
  export {};
@@ -1,8 +1,8 @@
1
- import { HmrUtil as e } from "@gen-epix/ui-core/utils/HmrUtil";
2
- import { createBrowserRouter as t } from "react-router-dom";
1
+ import { t as e } from "../../../_chunks/decorate.js";
2
+ import { singleton as t } from "tsyringe";
3
+ import { createBrowserRouter as n } from "react-router-dom";
3
4
  //#region src/classes/services/RouterService/RouterService.ts
4
- var n = class n {
5
- static __instance;
5
+ var r = class {
6
6
  get adminRoutes() {
7
7
  if (!this.__adminRoutesFactory) throw Error("RouterService not initialized");
8
8
  return this.__adminRoutes ??= this.__adminRoutesFactory(), this.__adminRoutes;
@@ -12,7 +12,7 @@ var n = class n {
12
12
  return this.__homePageComponent;
13
13
  }
14
14
  get router() {
15
- return this.__router ||= t(this.routes), this.__router;
15
+ return this.__router ||= n(this.routes), this.__router;
16
16
  }
17
17
  get routes() {
18
18
  if (!this.__routesFactory) throw Error("RouterService not initialized");
@@ -24,19 +24,15 @@ var n = class n {
24
24
  __router = null;
25
25
  __routes = null;
26
26
  __routesFactory = null;
27
- constructor() {}
28
- static getInstance() {
29
- return n.__instance = e.getHmrSingleton("routerService", n.__instance, () => new n()), n.__instance;
30
- }
31
- initialize(e) {
32
- if (this.__routesFactory) throw Error("RouterService already initialized");
27
+ constructor(e) {
33
28
  this.__homePageComponent = e.homePageComponent, this.__adminRoutesFactory = this.createRoutesFactory(e.adminRoutes), this.__routesFactory = this.createRoutesFactory(e.routes);
34
29
  }
35
30
  createRoutesFactory(e) {
36
31
  return typeof e == "function" ? e : () => e;
37
32
  }
38
33
  };
34
+ r = e([t()], r);
39
35
  //#endregion
40
- export { n as RouterService };
36
+ export { r as RouterService };
41
37
 
42
38
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nimport type { MyNonIndexRouteObject } from '../../../models/reactRouter';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\nexport class RouterService {\n private static __instance: RouterService;\n\n public get adminRoutes(): MyNonIndexRouteObject[] {\n if (!this.__adminRoutesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n if (!this.__homePageComponent) {\n throw new Error('RouterService not initialized');\n }\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n if (!this.__routesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private __adminRoutesFactory: null | RoutesFactory = null;\n\n private __homePageComponent: HomePage | null = null;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private __routesFactory: null | RoutesFactory = null;\n\n private constructor() {\n }\n\n public static getInstance(): RouterService {\n RouterService.__instance = HmrUtil.getHmrSingleton('routerService', RouterService.__instance, () => new RouterService());\n return RouterService.__instance;\n }\n\n public initialize(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }): void {\n if (this.__routesFactory) {\n throw new Error('RouterService already initialized');\n }\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;AAUA,IAAa,IAAb,MAAa,EAAc;CACzB,OAAe;CAEf,IAAW,cAAuC;EAChD,IAAI,CAAC,KAAK,sBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,IAAI,CAAC,KAAK,qBACR,MAAU,MAAM,+BAA+B;EAEjD,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAW,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAC3C,IAAI,CAAC,KAAK,iBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD,uBAAqD;CAErD,sBAA+C;CAE/C,WAAkE;CAElE,WAAmD;CAEnD,kBAAgD;CAEhD,cAAsB,CACtB;CAEA,OAAc,cAA6B;EAEzC,OADA,EAAc,aAAa,EAAQ,gBAAgB,iBAAiB,EAAc,kBAAkB,IAAI,EAAc,CAAC,GAChH,EAAc;CACvB;CAEA,WAAkB,GAIT;EACP,IAAI,KAAK,iBACP,MAAU,MAAM,mCAAmC;EAIrD,AAFA,KAAK,sBAAsB,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoB,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoB,EAAO,MAAM;CAC/D;CAEA,oBAA4B,GAAoC;EAI9D,OAHI,OAAO,KAAW,aACb,UAEI;CACf;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","__decorate","RouterService","createBrowserRouter","kwArgs","routes","singleton"],"sources":["../../../../src/classes/services/RouterService/RouterService.ts"],"sourcesContent":["import type { ReactElement } from 'react';\nimport { createBrowserRouter } from 'react-router-dom';\nimport { singleton } from 'tsyringe';\n\nimport type { MyNonIndexRouteObject } from '../../../models/react-router.models';\n\ntype HomePage = () => ReactElement;\ntype RoutesFactory = () => MyNonIndexRouteObject[];\ntype RoutesInput = MyNonIndexRouteObject[] | RoutesFactory;\n\n@singleton()\nexport class RouterService {\n public get adminRoutes(): MyNonIndexRouteObject[] {\n if (!this.__adminRoutesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__adminRoutes ??= this.__adminRoutesFactory();\n return this.__adminRoutes;\n }\n public get homePageComponent(): HomePage {\n if (!this.__homePageComponent) {\n throw new Error('RouterService not initialized');\n }\n return this.__homePageComponent;\n }\n public get router(): ReturnType<typeof createBrowserRouter> {\n if (!this.__router) {\n this.__router = createBrowserRouter(this.routes);\n }\n return this.__router;\n }\n public get routes(): MyNonIndexRouteObject[] {\n if (!this.__routesFactory) {\n throw new Error('RouterService not initialized');\n }\n this.__routes ??= this.__routesFactory();\n return this.__routes;\n }\n private __adminRoutes: MyNonIndexRouteObject[] | null = null;\n private readonly __adminRoutesFactory: null | RoutesFactory = null;\n\n private readonly __homePageComponent: HomePage | null = null;\n\n private __router: null | ReturnType<typeof createBrowserRouter> = null;\n\n private __routes: MyNonIndexRouteObject[] | null = null;\n\n private readonly __routesFactory: null | RoutesFactory = null;\n\n public constructor(kwArgs: {\n adminRoutes: RoutesInput;\n homePageComponent: HomePage;\n routes: RoutesInput;\n }) {\n this.__homePageComponent = kwArgs.homePageComponent;\n this.__adminRoutesFactory = this.createRoutesFactory(kwArgs.adminRoutes);\n this.__routesFactory = this.createRoutesFactory(kwArgs.routes);\n }\n\n\n private createRoutesFactory(routes: RoutesInput): RoutesFactory {\n if (typeof routes === 'function') {\n return routes;\n }\n return () => routes;\n }\n}\n"],"mappings":";;;;AAWO,IAAME,IAAN,MAAoB;CACzB,IAAW,cAAuC;EAChD,IAAI,CAAC,KAAK,sBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,kBAAkB,KAAK,qBAAqB,GAC1C,KAAK;CACd;CACA,IAAW,oBAA8B;EACvC,IAAI,CAAC,KAAK,qBACR,MAAU,MAAM,+BAA+B;EAEjD,OAAO,KAAK;CACd;CACA,IAAW,SAAiD;EAI1D,OAHA,AACE,KAAK,aAAWC,EAAoB,KAAK,MAAM,GAE1C,KAAK;CACd;CACA,IAAW,SAAkC;EAC3C,IAAI,CAAC,KAAK,iBACR,MAAU,MAAM,+BAA+B;EAGjD,OADA,KAAK,aAAa,KAAK,gBAAgB,GAChC,KAAK;CACd;CACA,gBAAwD;CACxD,uBAA8D;CAE9D,sBAAwD;CAExD,WAAkE;CAElE,WAAmD;CAEnD,kBAAyD;CAEzD,YAAmB,GAIhB;EAGD,AAFA,KAAK,sBAAsBC,EAAO,mBAClC,KAAK,uBAAuB,KAAK,oBAAoBA,EAAO,WAAW,GACvE,KAAK,kBAAkB,KAAK,oBAAoBA,EAAO,MAAM;CAC/D;CAGA,oBAA4B,GAAoC;EAI9D,OAHI,OAAOC,KAAW,aACbA,UAEIA;CACf;AACF;AAxDC,IAAAL,EAAA,CAAAM,EAAU,CAAA,GAAAJ,CAAA"}
@@ -1,6 +1,3 @@
1
1
  export declare class UserSettingsService {
2
- private static __instance;
3
2
  showShowUserFeedbackTooltip: boolean;
4
- private constructor();
5
- static getInstance(): UserSettingsService;
6
3
  }
@@ -1,14 +1,11 @@
1
- import { HmrUtil as e } from "@gen-epix/ui-core/utils/HmrUtil";
1
+ import { t as e } from "../../../_chunks/decorate.js";
2
+ import { singleton as t } from "tsyringe";
2
3
  //#region src/classes/services/UserSettingsService/UserSettingsService.ts
3
- var t = class t {
4
- static __instance;
4
+ var n = class {
5
5
  showShowUserFeedbackTooltip = !0;
6
- constructor() {}
7
- static getInstance() {
8
- return t.__instance = e.getHmrSingleton("userSettingsService", t.__instance, () => new t()), t.__instance;
9
- }
10
6
  };
7
+ n = e([t()], n);
11
8
  //#endregion
12
- export { t as UserSettingsService };
9
+ export { n as UserSettingsService };
13
10
 
14
11
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../../src/classes/services/UserSettingsService/UserSettingsService.ts"],"sourcesContent":["import { HmrUtil } from '@gen-epix/ui-core/utils/HmrUtil';\n\nexport class UserSettingsService {\n private static __instance: UserSettingsService;\n\n public showShowUserFeedbackTooltip = true;\n\n private constructor() {\n //\n }\n\n public static getInstance(): UserSettingsService {\n UserSettingsService.__instance = HmrUtil.getHmrSingleton('userSettingsService', UserSettingsService.__instance, () => new UserSettingsService());\n return UserSettingsService.__instance;\n }\n}\n"],"mappings":";;AAEA,IAAa,IAAb,MAAa,EAAoB;CAC/B,OAAe;CAEf,8BAAqC;CAErC,cAAsB,CAEtB;CAEA,OAAc,cAAmC;EAE/C,OADA,EAAoB,aAAa,EAAQ,gBAAgB,uBAAuB,EAAoB,kBAAkB,IAAI,EAAoB,CAAC,GACxI,EAAoB;CAC7B;AACF"}
1
+ {"version":3,"file":"index.js","names":["_decorate","__decorate","UserSettingsService","singleton"],"sources":["../../../../src/classes/services/UserSettingsService/UserSettingsService.ts"],"sourcesContent":["import { singleton } from 'tsyringe';\n\n@singleton()\nexport class UserSettingsService {\n public showShowUserFeedbackTooltip = true;\n\n}\n"],"mappings":";;;AAGO,IAAME,IAAN,MAA0B;CAC/B,8BAAqC;AAEvC;AAJC,IAAAF,EAAA,CAAAG,EAAU,CAAA,GAAAD,CAAA"}
@@ -1 +1,5 @@
1
- export declare const App: () => import('react').JSX.Element;
1
+ import { DependencyContainer } from 'tsyringe';
2
+ export type AppProps = {
3
+ readonly container: DependencyContainer;
4
+ };
5
+ export declare const App: ({ container }: AppProps) => import('react').JSX.Element;
@@ -1,45 +1,39 @@
1
- import { ConfigService as e } from "../../../classes/services/ConfigService/index.js";
2
- import { RouterService as t } from "../../../classes/services/RouterService/index.js";
3
- import { AuthenticationService as n } from "../../../classes/services/AuthenticationService/index.js";
4
- import { ApiService as r } from "../../../classes/services/ApiService/index.js";
5
- import { LogService as i } from "../../../classes/services/LogService/index.js";
6
- import { t as a } from "../../../_chunks/QueryClientProvider.js";
7
- import { t as o } from "../../../_chunks/QueryClientService.js";
8
- import { ErrorPage as s } from "../../../pages/ErrorPage/index.js";
9
- import { BackendVersionService as c } from "../../../classes/services/BackendVersionService/index.js";
10
- import { ApplicationBootstrapWithoutAuthorization as l } from "../ApplicationBootstrapWithoutAuthorization/index.js";
11
- import { EmotionCacheService as u } from "../../../classes/services/EmotionCacheService/index.js";
12
- import { CssBaseline as d, ThemeProvider as f } from "@mui/material";
13
- import { useMemo as p } from "react";
14
- import { jsx as m, jsxs as h } from "react/jsx-runtime";
15
- import { RouterProvider as g } from "react-router-dom";
16
- import { UiCoreComponentsContextProvider as _ } from "@gen-epix/ui-core-components/context/uiCoreComponentsConfigContext";
1
+ import { t as e } from "../../../_chunks/QueryClientService.js";
2
+ import { t } from "../../../_chunks/QueryClientProvider.js";
3
+ import { DependencyContainerUtil as n } from "../../../utils/DependencyContainerUtil/index.js";
4
+ import { API_BASE_TOKEN as r } from "../../../constants/api.constants.js";
5
+ import { RouterService as i } from "../../../classes/services/RouterService/index.js";
6
+ import { UiClientCommonConfigContextProvider as a } from "../../../context/uiClientCommonConfigContext/index.js";
7
+ import { AuthenticationService as o } from "../../../classes/services/AuthenticationService/index.js";
8
+ import { LogService as s } from "../../../classes/services/LogService/index.js";
9
+ import { ErrorPage as c } from "../../../pages/ErrorPage/index.js";
10
+ import { BackendVersionService as l } from "../../../classes/services/BackendVersionService/index.js";
11
+ import { ApplicationBootstrapWithoutAuthorization as u } from "../ApplicationBootstrapWithoutAuthorization/index.js";
12
+ import { EmotionCacheService as d } from "../../../classes/services/EmotionCacheService/index.js";
13
+ import { container as f } from "tsyringe";
14
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
15
+ import { CssBaseline as h, ThemeProvider as g } from "@mui/material";
16
+ import { RouterProvider as _ } from "react-router-dom";
17
17
  import { CacheProvider as v } from "@emotion/react";
18
18
  import { ErrorBoundary as y } from "react-error-boundary";
19
19
  //#region src/components/app/AppRouterProvider/AppRouterProvider.tsx
20
- var b = () => /* @__PURE__ */ m(g, { router: t.getInstance().router }), x = () => {
21
- let { config: t } = e.getInstance(), g = p(() => {
22
- let { DEFAULT_CIRCULAR_PROGRESS_SIZE: e, DEFAULT_TAKING_LONGER_TIMEOUT_MS: n } = t.spinner;
23
- return { spinner: {
24
- defaultCircularProgressSize: e,
25
- defaultTakingLongerTimeoutMs: n
26
- } };
27
- }, [t.spinner]), x = n.getInstance(), S = i.getInstance(), C = t.getTouchIconUrl();
20
+ var b = () => /* @__PURE__ */ p(_, { router: f.resolve(i).router }), x = ({ container: i }) => {
21
+ let _ = n.resolveConfig(i), x = f.resolve(o), S = f.resolve(s), C = _.getTouchIconUrl();
28
22
  C && document.querySelector("link[rel=\"icon\"]")?.setAttribute("href", C);
29
- let w = r.getInstance();
30
- w.api.baseUrl = t.getAPIBaseUrl(), w.api.defaultRequestTimeout = t.defaultRequestTimeout, w.api.onRequest = [x.onRequest.bind(x), S.onRequest.bind(S)], w.api.onResponseFulfilled = [S.onResponseFulfilled.bind(S), c.getInstance().onResponseFulfilled.bind(c.getInstance())], w.api.onResponseRejected = [S.onResponseRejected.bind(S), x.onResponseRejected.bind(x)];
31
- let T = o.getInstance(), E = u.getInstance();
32
- return /* @__PURE__ */ m(_, {
33
- config: g,
34
- children: /* @__PURE__ */ m(a, {
23
+ let w = f.resolve(r);
24
+ w.baseUrl = _.getAPIBaseUrl(), w.defaultRequestTimeout = _.defaultRequestTimeout, w.onRequest = [x.onRequest.bind(x), S.onRequest.bind(S)], w.onResponseFulfilled = [S.onResponseFulfilled.bind(S), f.resolve(l).onResponseFulfilled.bind(f.resolve(l))], w.onResponseRejected = [S.onResponseRejected.bind(S), x.onResponseRejected.bind(x)];
25
+ let T = i.resolve(e), E = i.resolve(d).emotionCache;
26
+ return /* @__PURE__ */ p(a, {
27
+ container: i,
28
+ children: /* @__PURE__ */ p(t, {
35
29
  client: T.queryClient,
36
- children: /* @__PURE__ */ m(v, {
37
- value: E.emotionCache,
38
- children: /* @__PURE__ */ h(f, {
39
- theme: e.getInstance().config.theme,
40
- children: [/* @__PURE__ */ m(d, {}), /* @__PURE__ */ m(y, {
41
- FallbackComponent: s,
42
- children: /* @__PURE__ */ m(l, { children: /* @__PURE__ */ m(b, {}) })
30
+ children: /* @__PURE__ */ p(v, {
31
+ value: E,
32
+ children: /* @__PURE__ */ m(g, {
33
+ theme: _.theme,
34
+ children: [/* @__PURE__ */ p(h, {}), /* @__PURE__ */ p(y, {
35
+ FallbackComponent: c,
36
+ children: /* @__PURE__ */ p(u, { children: /* @__PURE__ */ p(b, {}) })
43
37
  })]
44
38
  })
45
39
  })