@gen-epix/ui-client-casedb 4.0.0 → 4.0.2

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 (393) hide show
  1. package/dist/@types/mui.d.ts +1 -1
  2. package/dist/@types/{ui-casedb.d.ts → ui-client-casedb.d.ts} +1 -1
  3. package/dist/_chunks/AddCasesToEventDialog.js +74 -74
  4. package/dist/_chunks/AddCasesToEventDialog.js.map +1 -1
  5. package/dist/_chunks/CaseContentForm.js +2 -2
  6. package/dist/_chunks/CaseContentForm.js.map +1 -1
  7. package/dist/_chunks/CaseDbDownloadUtil.js +40 -35
  8. package/dist/_chunks/CaseDbDownloadUtil.js.map +1 -1
  9. package/dist/_chunks/CaseInfoDialog.js +195 -195
  10. package/dist/_chunks/CaseInfoDialog.js.map +1 -1
  11. package/dist/_chunks/CaseSetInfoDialog.js +131 -131
  12. package/dist/_chunks/CaseSetInfoDialog.js.map +1 -1
  13. package/dist/_chunks/CaseTypeInfoDialog.js +63 -61
  14. package/dist/_chunks/CaseTypeInfoDialog.js.map +1 -1
  15. package/dist/_chunks/CasesAlreadyInCaseSetWarning.js +6 -6
  16. package/dist/_chunks/CasesAlreadyInCaseSetWarning.js.map +1 -1
  17. package/dist/_chunks/CompletCaseTypeLoader.js +3 -3
  18. package/dist/_chunks/CompletCaseTypeLoader.js.map +1 -1
  19. package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js +1 -1
  20. package/dist/_chunks/CreateEventDialogSuccessNotificationMessage.js.map +1 -1
  21. package/dist/_chunks/CustomTabPanel.js.map +1 -1
  22. package/dist/_chunks/Dashboard.js +399 -386
  23. package/dist/_chunks/Dashboard.js.map +1 -1
  24. package/dist/_chunks/DashboardStoreLoader.js +5 -5
  25. package/dist/_chunks/DashboardStoreLoader.js.map +1 -1
  26. package/dist/_chunks/DataCollectionAccessInfo.js +21 -21
  27. package/dist/_chunks/DataCollectionAccessInfo.js.map +1 -1
  28. package/dist/_chunks/EpiCurveUtil.js +4 -4
  29. package/dist/_chunks/EpiCurveUtil.js.map +1 -1
  30. package/dist/_chunks/EpiCurveWidget.js +189 -183
  31. package/dist/_chunks/EpiCurveWidget.js.map +1 -1
  32. package/dist/_chunks/FilterUtil.js +103 -101
  33. package/dist/_chunks/FilterUtil.js.map +1 -1
  34. package/dist/_chunks/FindSimilarCasesDialog.js +16 -16
  35. package/dist/_chunks/FindSimilarCasesDialog.js.map +1 -1
  36. package/dist/_chunks/FindSimilarCasesUtil.js +9 -9
  37. package/dist/_chunks/FindSimilarCasesUtil.js.map +1 -1
  38. package/dist/_chunks/HomePageTrends.js +8 -8
  39. package/dist/_chunks/HomePageTrends.js.map +1 -1
  40. package/dist/_chunks/LegendaItem.js +3 -3
  41. package/dist/_chunks/LegendaItem.js.map +1 -1
  42. package/dist/_chunks/LineListWidget.js +23 -21
  43. package/dist/_chunks/LineListWidget.js.map +1 -1
  44. package/dist/_chunks/PanelSeparator.js +374 -384
  45. package/dist/_chunks/PanelSeparator.js.map +1 -1
  46. package/dist/_chunks/Upload.js +222 -207
  47. package/dist/_chunks/Upload.js.map +1 -1
  48. package/dist/_chunks/UploadUtil.js +1970 -841
  49. package/dist/_chunks/UploadUtil.js.map +1 -1
  50. package/dist/_chunks/UserRightsDialog.js +12 -12
  51. package/dist/_chunks/UserRightsDialog.js.map +1 -1
  52. package/dist/_chunks/_MapCache.js +2 -2
  53. package/dist/_chunks/_baseGet.js +1 -1
  54. package/dist/_chunks/_baseGet.js.map +1 -1
  55. package/dist/_chunks/_baseIteratee.js +1 -1
  56. package/dist/_chunks/_baseIteratee.js.map +1 -1
  57. package/dist/_chunks/_setToString.js.map +1 -1
  58. package/dist/_chunks/{chunk-KS7C4IRE.js → chunk-BV7QT456.js} +330 -495
  59. package/dist/_chunks/chunk-BV7QT456.js.map +1 -0
  60. package/dist/_chunks/cloneDeep.js +11 -9
  61. package/dist/_chunks/cloneDeep.js.map +1 -1
  62. package/dist/_chunks/dashboardStore.js +259 -261
  63. package/dist/_chunks/dashboardStore.js.map +1 -1
  64. package/dist/_chunks/esm.js +2900 -2868
  65. package/dist/_chunks/esm.js.map +1 -1
  66. package/dist/_chunks/format.js +8 -8
  67. package/dist/_chunks/format.js.map +1 -1
  68. package/dist/_chunks/index.esm.js +919 -796
  69. package/dist/_chunks/index.esm.js.map +1 -1
  70. package/dist/_chunks/index.module.js +1 -1
  71. package/dist/_chunks/index.module.js.map +1 -1
  72. package/dist/_chunks/protectedTokens.js +79 -81
  73. package/dist/_chunks/protectedTokens.js.map +1 -1
  74. package/dist/_chunks/react.js +1 -1
  75. package/dist/_chunks/react.js.map +1 -1
  76. package/dist/_chunks/round.js +1 -1
  77. package/dist/_chunks/round.js.map +1 -1
  78. package/dist/_chunks/shallow.js +2 -2
  79. package/dist/_chunks/shallow.js.map +1 -1
  80. package/dist/_chunks/sync.js +198 -161
  81. package/dist/_chunks/sync.js.map +1 -1
  82. package/dist/_chunks/toDate.js +1 -1
  83. package/dist/_chunks/toDate.js.map +1 -1
  84. package/dist/_chunks/toString.js +1 -1
  85. package/dist/_chunks/toString.js.map +1 -1
  86. package/dist/_chunks/useUnit.js.map +1 -1
  87. package/dist/_chunks/vanilla.js +1 -1
  88. package/dist/_chunks/vanilla.js.map +1 -1
  89. package/dist/_chunks/yup.js +5 -5
  90. package/dist/_chunks/yup.js.map +1 -1
  91. package/dist/classes/filters/SelectionFilter.d.ts +2 -2
  92. package/dist/classes/filters/TreeFilter.d.ts +2 -2
  93. package/dist/classes/services/DataService/index.js +3 -3
  94. package/dist/classes/services/DataService/index.js.map +1 -1
  95. package/dist/classes/services/EventBusService/EventBusService.d.ts +1 -1
  96. package/dist/classes/services/EventBusService/index.js.map +1 -1
  97. package/dist/classes/services/LineListService/LineListServiceAbstract/index.js +1 -1
  98. package/dist/classes/services/LineListService/LineListServiceAbstract/index.js.map +1 -1
  99. package/dist/components/app/CaseDbApp/index.js +8 -5
  100. package/dist/components/app/CaseDbApp/index.js.map +1 -1
  101. package/dist/components/form/fields/ArrangementEditor/index.js +83 -83
  102. package/dist/components/form/fields/ArrangementEditor/index.js.map +1 -1
  103. package/dist/components/ui/AddCasesToEventDialog/AddCasesToEventDialog.d.ts +2 -2
  104. package/dist/components/ui/CaseContentFormDialog/CaseContentFormDialog.d.ts +2 -2
  105. package/dist/components/ui/CaseContentFormDialog/index.js +1 -1
  106. package/dist/components/ui/CaseContentFormDialog/index.js.map +1 -1
  107. package/dist/components/ui/CaseInfoDialog/CaseInfoDialog.d.ts +2 -2
  108. package/dist/components/ui/CaseSetInfoDialog/CaseSetInfoDialog.d.ts +2 -2
  109. package/dist/components/ui/CaseSummary/index.js +1 -1
  110. package/dist/components/ui/CaseSummary/index.js.map +1 -1
  111. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialog.d.ts +2 -2
  112. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogContent.d.ts +1 -1
  113. package/dist/components/ui/CaseTypeInfoDialog/CaseTypeInfoDialogWithLoader.d.ts +2 -2
  114. package/dist/components/ui/ContextMenu/index.js.map +1 -1
  115. package/dist/components/ui/CreateEventDialog/CreateEventDialog.d.ts +2 -2
  116. package/dist/components/ui/CreateEventDialog/index.js +9 -9
  117. package/dist/components/ui/CreateEventDialog/index.js.map +1 -1
  118. package/dist/components/ui/Dashboard/DashboardDownloadSidebarItem.d.ts +1 -1
  119. package/dist/components/ui/Dashboard/DashboardSettingsSidebarItem.d.ts +1 -1
  120. package/dist/components/ui/Dashboard/DashboardWidget.d.ts +1 -1
  121. package/dist/components/ui/DashboardEditCases/index.js +1 -1
  122. package/dist/components/ui/DashboardEditCases/index.js.map +1 -1
  123. package/dist/components/ui/FileSelector/index.js +46 -46
  124. package/dist/components/ui/FileSelector/index.js.map +1 -1
  125. package/dist/components/ui/FindSimilarCasesDialog/FindSimilarCasesDialog.d.ts +2 -2
  126. package/dist/components/ui/Grouping/index.js +50 -50
  127. package/dist/components/ui/Grouping/index.js.map +1 -1
  128. package/dist/components/ui/HistogramWidget/index.js +1 -1
  129. package/dist/components/ui/HistogramWidget/index.js.map +1 -1
  130. package/dist/components/ui/MapWidget/index.js +7 -3
  131. package/dist/components/ui/MapWidget/index.js.map +1 -1
  132. package/dist/components/ui/RemoveCasesFromEventDialog/RemoveCasesFromEventDialog.d.ts +2 -2
  133. package/dist/components/ui/RemoveCasesFromEventDialog/index.js +6 -6
  134. package/dist/components/ui/RemoveCasesFromEventDialog/index.js.map +1 -1
  135. package/dist/components/ui/RemoveFindSimilarCasesResultDialog/RemoveFindSimilarCasesResultDialog.d.ts +2 -2
  136. package/dist/components/ui/SequenceDownloadDialog/SequenceDownloadDialog.d.ts +2 -2
  137. package/dist/components/ui/SequenceDownloadDialog/index.js +22 -22
  138. package/dist/components/ui/SequenceDownloadDialog/index.js.map +1 -1
  139. package/dist/components/ui/TreeDescription/index.js.map +1 -1
  140. package/dist/components/ui/TreeWidget/index.js +11 -11
  141. package/dist/components/ui/TreeWidget/index.js.map +1 -1
  142. package/dist/components/ui/Upload/UploadCaseResultTable.d.ts +2 -2
  143. package/dist/components/ui/Upload/UploadEditColumnValuesDialog.d.ts +2 -2
  144. package/dist/components/ui/UserRightsDialog/UserRightsDialog.d.ts +2 -2
  145. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/UsersEffectiveRightsDetailsDialog.d.ts +2 -2
  146. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js +25 -11
  147. package/dist/components/ui/UsersEffectiveRightsDetailsDialog/index.js.map +1 -1
  148. package/dist/components/ui/Warning/index.js.map +1 -1
  149. package/dist/components/ui/WidgetHeaderIconButton/index.js.map +1 -1
  150. package/dist/components/ui/WidgetMenu/WidgetMenu.d.ts +1 -1
  151. package/dist/components/ui/WidgetMenu/index.js +2 -2
  152. package/dist/components/ui/WidgetMenu/index.js.map +1 -1
  153. package/dist/components/ui/WidgetUnavailable/index.js.map +1 -1
  154. package/dist/constants/query.d.ts +1 -1
  155. package/dist/constants/query.js +1 -1
  156. package/dist/constants/query.js.map +1 -1
  157. package/dist/context/caseAbac/CaseAbacContext.d.ts +1 -1
  158. package/dist/dataHooks/useAssemblyProtocolsQuery/index.js +3 -3
  159. package/dist/dataHooks/useAssemblyProtocolsQuery/index.js.map +1 -1
  160. package/dist/dataHooks/useAssemblyProtocolsQuery/useAssemblyProtocolsQuery.d.ts +1 -1
  161. package/dist/dataHooks/useCaseRightsQuery/index.js +2 -2
  162. package/dist/dataHooks/useCaseRightsQuery/index.js.map +1 -1
  163. package/dist/dataHooks/useCaseSetCategoriesQuery/index.js +3 -3
  164. package/dist/dataHooks/useCaseSetCategoriesQuery/index.js.map +1 -1
  165. package/dist/dataHooks/useCaseSetCategoriesQuery/useCaseSetCategoriesQuery.d.ts +1 -1
  166. package/dist/dataHooks/useCaseSetRightsQuery/index.js +2 -2
  167. package/dist/dataHooks/useCaseSetRightsQuery/index.js.map +1 -1
  168. package/dist/dataHooks/useCaseSetStatsQuery/index.js +3 -3
  169. package/dist/dataHooks/useCaseSetStatsQuery/index.js.map +1 -1
  170. package/dist/dataHooks/useCaseSetStatsQuery/useCaseSetStatsQuery.d.ts +1 -1
  171. package/dist/dataHooks/useCaseSetStatusesQuery/index.js +3 -3
  172. package/dist/dataHooks/useCaseSetStatusesQuery/index.js.map +1 -1
  173. package/dist/dataHooks/useCaseSetStatusesQuery/useCaseSetStatusesQuery.d.ts +1 -1
  174. package/dist/dataHooks/useCaseSetsQuery/index.js +3 -3
  175. package/dist/dataHooks/useCaseSetsQuery/index.js.map +1 -1
  176. package/dist/dataHooks/useCaseSetsQuery/useCaseSetsQuery.d.ts +1 -1
  177. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js +3 -3
  178. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/index.js.map +1 -1
  179. package/dist/dataHooks/useCaseTypeSetCategoriesQuery/useCaseTypeSetCategoriesQuery.d.ts +1 -1
  180. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/index.js.map +1 -1
  181. package/dist/dataHooks/useCaseTypeSetCategoryPurposeQuery/useCaseTypeSetCategoryPurposeQuery.d.ts +1 -1
  182. package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js +2 -2
  183. package/dist/dataHooks/useCaseTypeSetMembersQuery/index.js.map +1 -1
  184. package/dist/dataHooks/useCaseTypeSetsQuery/index.js +3 -3
  185. package/dist/dataHooks/useCaseTypeSetsQuery/index.js.map +1 -1
  186. package/dist/dataHooks/useCaseTypeSetsQuery/useCaseTypeSetsQuery.d.ts +1 -1
  187. package/dist/dataHooks/useCaseTypeStatsQuery/index.js +2 -2
  188. package/dist/dataHooks/useCaseTypeStatsQuery/index.js.map +1 -1
  189. package/dist/dataHooks/useCaseTypesQuery/index.js +3 -3
  190. package/dist/dataHooks/useCaseTypesQuery/index.js.map +1 -1
  191. package/dist/dataHooks/useCaseTypesQuery/useCaseTypesQuery.d.ts +1 -1
  192. package/dist/dataHooks/useColSetMembersQuery/index.js +2 -2
  193. package/dist/dataHooks/useColSetMembersQuery/index.js.map +1 -1
  194. package/dist/dataHooks/useColSetsQuery/index.js +3 -3
  195. package/dist/dataHooks/useColSetsQuery/index.js.map +1 -1
  196. package/dist/dataHooks/useColSetsQuery/useColSetsQuery.d.ts +1 -1
  197. package/dist/dataHooks/useColTypesQuery/index.js.map +1 -1
  198. package/dist/dataHooks/useColTypesQuery/useColTypesQuery.d.ts +1 -1
  199. package/dist/dataHooks/useColsQuery/index.js +3 -3
  200. package/dist/dataHooks/useColsQuery/index.js.map +1 -1
  201. package/dist/dataHooks/useColsQuery/useColsQuery.d.ts +1 -1
  202. package/dist/dataHooks/useConceptQuery/index.js +3 -3
  203. package/dist/dataHooks/useConceptQuery/index.js.map +1 -1
  204. package/dist/dataHooks/useConceptQuery/useConceptQuery.d.ts +1 -1
  205. package/dist/dataHooks/useConceptRelationTypeQuery/index.js.map +1 -1
  206. package/dist/dataHooks/useConceptRelationTypeQuery/useConceptRelationTypeQuery.d.ts +1 -1
  207. package/dist/dataHooks/useConceptSetTypeQuery/index.js.map +1 -1
  208. package/dist/dataHooks/useConceptSetTypeQuery/useConceptSetTypeQuery.d.ts +1 -1
  209. package/dist/dataHooks/useConceptSetsQuery/index.js +3 -3
  210. package/dist/dataHooks/useConceptSetsQuery/index.js.map +1 -1
  211. package/dist/dataHooks/useConceptSetsQuery/useConceptSetsQuery.d.ts +1 -1
  212. package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js +2 -2
  213. package/dist/dataHooks/useDataCollectionSetMembersQuery/index.js.map +1 -1
  214. package/dist/dataHooks/useDataCollectionsQuery/index.js +3 -3
  215. package/dist/dataHooks/useDataCollectionsQuery/index.js.map +1 -1
  216. package/dist/dataHooks/useDataCollectionsQuery/useDataCollectionsQuery.d.ts +1 -1
  217. package/dist/dataHooks/useDimTypesQuery/index.js.map +1 -1
  218. package/dist/dataHooks/useDimTypesQuery/useDimTypesQuery.d.ts +1 -1
  219. package/dist/dataHooks/useDimsQuery/index.js +3 -3
  220. package/dist/dataHooks/useDimsQuery/index.js.map +1 -1
  221. package/dist/dataHooks/useDimsQuery/useDimsQuery.d.ts +1 -1
  222. package/dist/dataHooks/useDiseasesQuery/index.js +3 -3
  223. package/dist/dataHooks/useDiseasesQuery/index.js.map +1 -1
  224. package/dist/dataHooks/useDiseasesQuery/useDiseasesQuery.d.ts +1 -1
  225. package/dist/dataHooks/useEtiologicalAgentsQuery/index.js +3 -3
  226. package/dist/dataHooks/useEtiologicalAgentsQuery/index.js.map +1 -1
  227. package/dist/dataHooks/useEtiologicalAgentsQuery/useEtiologicalAgentsQuery.d.ts +1 -1
  228. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js +3 -3
  229. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/index.js.map +1 -1
  230. package/dist/dataHooks/useGeneticDistanceProtocolsQuery/useGeneticDistanceProtocolsQuery.d.ts +1 -1
  231. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js +2 -2
  232. package/dist/dataHooks/useOrganizationAccessCasePoliciesQuery/index.js.map +1 -1
  233. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js +2 -2
  234. package/dist/dataHooks/useOrganizationShareCasePoliciesQuery/index.js.map +1 -1
  235. package/dist/dataHooks/useRefColsQuery/index.js +3 -3
  236. package/dist/dataHooks/useRefColsQuery/index.js.map +1 -1
  237. package/dist/dataHooks/useRefColsQuery/useRefColsQuery.d.ts +1 -1
  238. package/dist/dataHooks/useRefColsValidationRulesQuery/index.js +2 -2
  239. package/dist/dataHooks/useRefColsValidationRulesQuery/index.js.map +1 -1
  240. package/dist/dataHooks/useRefDimsQuery/index.js +3 -3
  241. package/dist/dataHooks/useRefDimsQuery/index.js.map +1 -1
  242. package/dist/dataHooks/useRefDimsQuery/useRefDimsQuery.d.ts +1 -1
  243. package/dist/dataHooks/useRegionQuery/index.js +3 -3
  244. package/dist/dataHooks/useRegionQuery/index.js.map +1 -1
  245. package/dist/dataHooks/useRegionQuery/useRegionQuery.d.ts +1 -1
  246. package/dist/dataHooks/useRegionRelationTypeQuery/index.js.map +1 -1
  247. package/dist/dataHooks/useRegionRelationTypeQuery/useRegionRelationTypeQuery.d.ts +1 -1
  248. package/dist/dataHooks/useRegionSetsQuery/index.js +3 -3
  249. package/dist/dataHooks/useRegionSetsQuery/index.js.map +1 -1
  250. package/dist/dataHooks/useRegionSetsQuery/useRegionSetsQuery.d.ts +1 -1
  251. package/dist/dataHooks/useSequencingProtocolsQuery/index.js +3 -3
  252. package/dist/dataHooks/useSequencingProtocolsQuery/index.js.map +1 -1
  253. package/dist/dataHooks/useSequencingProtocolsQuery/useSequencingProtocolsQuery.d.ts +1 -1
  254. package/dist/dataHooks/useTreeAlgorithmCodesQuery/index.js.map +1 -1
  255. package/dist/dataHooks/useTreeAlgorithmCodesQuery/useTreeAlgorithmCodesQuery.d.ts +1 -1
  256. package/dist/dataHooks/useUnitQuery/useUnit.d.ts +1 -1
  257. package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js +2 -2
  258. package/dist/dataHooks/useUserAccessCasePoliciesQuery/index.js.map +1 -1
  259. package/dist/dataHooks/useUserEffectiveRightsQuery/index.js +3 -3
  260. package/dist/dataHooks/useUserEffectiveRightsQuery/index.js.map +1 -1
  261. package/dist/dataHooks/useUserEffectiveRightsQuery/useUserEffectiveRightsQuery.d.ts +1 -1
  262. package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js +2 -2
  263. package/dist/dataHooks/useUserShareCasePoliciesQuery/index.js.map +1 -1
  264. package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js +2 -2
  265. package/dist/hooks/useOrganizationCasePolicyNameFactory/index.js.map +1 -1
  266. package/dist/hooks/useOrganizationCasePolicyNameFactory/useOrganizationCasePolicyNameFactory.d.ts +1 -1
  267. package/dist/hooks/useUserCasePolicyNameFactory/index.js +3 -3
  268. package/dist/hooks/useUserCasePolicyNameFactory/index.js.map +1 -1
  269. package/dist/hooks/useUserCasePolicyNameFactory/useUserCasePolicyNameFactory.d.ts +1 -1
  270. package/dist/locale/nl.json +1 -1
  271. package/dist/models/config.d.ts +1 -1
  272. package/dist/models/dashboard.d.ts +1 -1
  273. package/dist/models/dashboard.js.map +1 -1
  274. package/dist/models/theme.d.ts +2 -2
  275. package/dist/pages/CaseDbUsersAdminPage/index.js +5 -5
  276. package/dist/pages/CaseDbUsersAdminPage/index.js.map +1 -1
  277. package/dist/pages/CaseSetCategoryAdminPage/index.js +4 -4
  278. package/dist/pages/CaseSetCategoryAdminPage/index.js.map +1 -1
  279. package/dist/pages/CaseSetStatusAdminPage/index.js +4 -4
  280. package/dist/pages/CaseSetStatusAdminPage/index.js.map +1 -1
  281. package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js +4 -4
  282. package/dist/pages/CaseTypeSetCategoriesAdminPage/index.js.map +1 -1
  283. package/dist/pages/CaseTypeSetsAdminPage/index.js +6 -6
  284. package/dist/pages/CaseTypeSetsAdminPage/index.js.map +1 -1
  285. package/dist/pages/CaseTypesAdminPage/index.js +5 -5
  286. package/dist/pages/CaseTypesAdminPage/index.js.map +1 -1
  287. package/dist/pages/CasesDetailPage/index.js +5 -5
  288. package/dist/pages/CasesDetailPage/index.js.map +1 -1
  289. package/dist/pages/CasesPage/index.js +10 -10
  290. package/dist/pages/CasesPage/index.js.map +1 -1
  291. package/dist/pages/ColSetsAdminPage/index.js +6 -6
  292. package/dist/pages/ColSetsAdminPage/index.js.map +1 -1
  293. package/dist/pages/ColsAdminPage/index.js +5 -5
  294. package/dist/pages/ColsAdminPage/index.js.map +1 -1
  295. package/dist/pages/ConceptRelationsAdminPage/index.js +19 -19
  296. package/dist/pages/ConceptRelationsAdminPage/index.js.map +1 -1
  297. package/dist/pages/ConceptSetsAdminPage/index.js +5 -5
  298. package/dist/pages/ConceptSetsAdminPage/index.js.map +1 -1
  299. package/dist/pages/ConceptsAdminPage/index.js +5 -5
  300. package/dist/pages/ConceptsAdminPage/index.js.map +1 -1
  301. package/dist/pages/DataCollectionSetsAdminPage/index.js +12 -12
  302. package/dist/pages/DataCollectionSetsAdminPage/index.js.map +1 -1
  303. package/dist/pages/DataCollectionVisualizationPage/index.js +4 -4
  304. package/dist/pages/DataCollectionVisualizationPage/index.js.map +1 -1
  305. package/dist/pages/DataCollectionsAdminPage/index.js +4 -4
  306. package/dist/pages/DataCollectionsAdminPage/index.js.map +1 -1
  307. package/dist/pages/DimsAdminPage/index.js +6 -6
  308. package/dist/pages/DimsAdminPage/index.js.map +1 -1
  309. package/dist/pages/DiseasesAdminPage/index.js +4 -4
  310. package/dist/pages/DiseasesAdminPage/index.js.map +1 -1
  311. package/dist/pages/EtiologicalAgentsAdminPage/index.js +4 -4
  312. package/dist/pages/EtiologicalAgentsAdminPage/index.js.map +1 -1
  313. package/dist/pages/EtiologiesAdminPage/index.js +3 -3
  314. package/dist/pages/EtiologiesAdminPage/index.js.map +1 -1
  315. package/dist/pages/EventsDetailPage/index.js +5 -5
  316. package/dist/pages/EventsDetailPage/index.js.map +1 -1
  317. package/dist/pages/EventsPage/index.js +11 -11
  318. package/dist/pages/EventsPage/index.js.map +1 -1
  319. package/dist/pages/HomePage/index.js +2 -2
  320. package/dist/pages/HomePage/index.js.map +1 -1
  321. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js +4 -4
  322. package/dist/pages/OrganizationAccessCasePoliciesAdminPage/index.js.map +1 -1
  323. package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js +4 -4
  324. package/dist/pages/OrganizationShareCasePoliciesAdminPage/index.js.map +1 -1
  325. package/dist/pages/RefColsAdminPage/index.js +7 -7
  326. package/dist/pages/RefColsAdminPage/index.js.map +1 -1
  327. package/dist/pages/RefDimsAdminPage/index.js +5 -5
  328. package/dist/pages/RefDimsAdminPage/index.js.map +1 -1
  329. package/dist/pages/RegionRelationsAdminPage/index.js +3 -3
  330. package/dist/pages/RegionRelationsAdminPage/index.js.map +1 -1
  331. package/dist/pages/RegionSetShapesAdminPage/index.js +4 -4
  332. package/dist/pages/RegionSetShapesAdminPage/index.js.map +1 -1
  333. package/dist/pages/RegionSetsAdminPage/index.js +5 -5
  334. package/dist/pages/RegionSetsAdminPage/index.js.map +1 -1
  335. package/dist/pages/RegionsAdminPage/index.js +5 -5
  336. package/dist/pages/RegionsAdminPage/index.js.map +1 -1
  337. package/dist/pages/TrendsPage/index.js +1 -1
  338. package/dist/pages/TrendsPage/index.js.map +1 -1
  339. package/dist/pages/UploadPage/index.js +1 -1
  340. package/dist/pages/UploadPage/index.js.map +1 -1
  341. package/dist/pages/UserAccessCasePoliciesAdminPage/index.js +4 -4
  342. package/dist/pages/UserAccessCasePoliciesAdminPage/index.js.map +1 -1
  343. package/dist/pages/UserEffectiveRightsAdminPage/index.js +12 -12
  344. package/dist/pages/UserEffectiveRightsAdminPage/index.js.map +1 -1
  345. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js +8 -8
  346. package/dist/pages/UserEffectiveRightsTesterAdminPage/index.js.map +1 -1
  347. package/dist/pages/UserShareCasePoliciesAdminPage/index.js +4 -4
  348. package/dist/pages/UserShareCasePoliciesAdminPage/index.js.map +1 -1
  349. package/dist/routes/adminRoutes.d.ts +1 -1
  350. package/dist/routes/index.js +11 -8
  351. package/dist/routes/index.js.map +1 -1
  352. package/dist/routes/routes.d.ts +1 -1
  353. package/dist/setup/setup.js +5 -5
  354. package/dist/setup/setup.js.map +1 -1
  355. package/dist/stores/dashboardStore/dashboardStore.d.ts +1 -1
  356. package/dist/stores/uploadStore/index.js +2 -2
  357. package/dist/stores/uploadStore/index.js.map +1 -1
  358. package/dist/stores/uploadStore/uploadStore.d.ts +1 -1
  359. package/dist/stores/userProfileStore/index.js +2 -2
  360. package/dist/stores/userProfileStore/index.js.map +1 -1
  361. package/dist/theme/demoTheme/index.js +2 -2
  362. package/dist/theme/demoTheme/index.js.map +1 -1
  363. package/dist/utils/CaseDbDataUtil/CaseDbDataUtil.d.ts +1 -1
  364. package/dist/utils/CaseDbDataUtil/index.js +1 -1
  365. package/dist/utils/CaseDbDataUtil/index.js.map +1 -1
  366. package/dist/utils/CaseDbStandardConfigUtil/index.js +2488 -1408
  367. package/dist/utils/CaseDbStandardConfigUtil/index.js.map +1 -1
  368. package/dist/utils/CaseDbTableUtil/CaseDbTableUtil.d.ts +1 -1
  369. package/dist/utils/CaseDbTableUtil/index.js +1 -1
  370. package/dist/utils/CaseDbTableUtil/index.js.map +1 -1
  371. package/dist/utils/CaseSelectionUtil/index.js.map +1 -1
  372. package/dist/utils/CaseTypeFormUtil/CaseTypeFormUtil.d.ts +1 -1
  373. package/dist/utils/CaseTypeFormUtil/index.js +7 -10
  374. package/dist/utils/CaseTypeFormUtil/index.js.map +1 -1
  375. package/dist/utils/CaseTypeUtil/index.js +1 -1
  376. package/dist/utils/CaseTypeUtil/index.js.map +1 -1
  377. package/dist/utils/CaseUtil/index.js +3 -3
  378. package/dist/utils/CaseUtil/index.js.map +1 -1
  379. package/dist/utils/DashboardUtil/index.js +1 -1
  380. package/dist/utils/DashboardUtil/index.js.map +1 -1
  381. package/dist/utils/DataSetUtil/index.js.map +1 -1
  382. package/dist/utils/FileUtil/index.js +1 -1
  383. package/dist/utils/FileUtil/index.js.map +1 -1
  384. package/dist/utils/FilterUtil/FilterUtil.d.ts +2 -2
  385. package/dist/utils/HistogramUtil/index.js +1 -1
  386. package/dist/utils/HistogramUtil/index.js.map +1 -1
  387. package/dist/utils/MapUtil/index.js +1 -1
  388. package/dist/utils/MapUtil/index.js.map +1 -1
  389. package/dist/utils/StratificationUtil/index.js +3 -2
  390. package/dist/utils/StratificationUtil/index.js.map +1 -1
  391. package/dist/utils/UploadUtil/UploadUtil.d.ts +1 -1
  392. package/package.json +19 -11
  393. package/dist/_chunks/chunk-KS7C4IRE.js.map +0 -1
@@ -7,6 +7,6 @@ declare module '@mui/material/styles' {
7
7
  interface Theme extends GenEpixCaseDbUiTheme { }
8
8
  // allow configuration using `createTheme()`
9
9
  interface ThemeOptions {
10
- 'gen-epix-ui-casedb'?: GenEpixCaseDbUiTheme['gen-epix-ui-casedb'];
10
+ 'gen-epix-ui-client-casedb'?: GenEpixCaseDbUiTheme['gen-epix-ui-client-casedb'];
11
11
  }
12
12
  }
@@ -1,3 +1,3 @@
1
1
  /* eslint-disable import-x/unambiguous */
2
2
  /// <reference types="./mui" />
3
- /// <reference types="@gen-epix/ui/types" />
3
+ /// <reference types="@gen-epix/ui-client-common/types" />
@@ -11,25 +11,25 @@ import { useCaseSetOptionsQuery as o, useCaseSetsMapQuery as ae } from "../dataH
11
11
  import { t as oe } from "./CasesAlreadyInCaseSetWarning.js";
12
12
  import { t as s } from "i18next";
13
13
  import { CaseDbCaseApi as c } from "@gen-epix/api-casedb";
14
- import { QueryClientService as l } from "@gen-epix/ui/classes/services/QueryClientService";
14
+ import { QueryClientService as l } from "@gen-epix/ui-client-common/classes/services/QueryClientService";
15
15
  import { Alert as u, AlertTitle as d, Box as f, Link as p } from "@mui/material";
16
16
  import { use as se, useCallback as m, useEffect as h, useId as g, useMemo as _ } from "react";
17
17
  import { useTranslation as ce } from "react-i18next";
18
18
  import { jsx as v, jsxs as y } from "react/jsx-runtime";
19
- import { ResponseHandler as b } from "@gen-epix/ui/components/ui/ResponseHandler";
19
+ import { ResponseHandler as b } from "@gen-epix/ui-client-common/components/ui/ResponseHandler";
20
20
  import { useArray as x } from "@gen-epix/ui-core/hooks/useArray";
21
- import { useQueryMemo as S } from "@gen-epix/ui/hooks/useQueryMemo";
22
- import { Select as le } from "@gen-epix/ui-form/components/fields/Select";
23
- import { withDialog as C } from "@gen-epix/ui/hoc/withDialog";
24
- import { TestIdUtil as w } from "@gen-epix/ui-core/utils/TestIdUtil";
25
- import { FormUtil as T } from "@gen-epix/ui-form/utils/FormUtil";
26
- import { RouterService as E } from "@gen-epix/ui/classes/services/RouterService";
27
- import { useEditMutation as D } from "@gen-epix/ui/hooks/useEditMutation";
28
- import { Autocomplete as O } from "@gen-epix/ui-form/components/fields/Autocomplete";
21
+ import { useQueryMemo as S } from "@gen-epix/ui-client-common/hooks/useQueryMemo";
22
+ import { Select as le } from "@gen-epix/ui-core-form/components/fields/Select";
23
+ import { withDialog as C } from "@gen-epix/ui-core-components/hoc/withDialog";
24
+ import { TestIdUtil as ue } from "@gen-epix/ui-core/utils/TestIdUtil";
25
+ import { FormUtil as w } from "@gen-epix/ui-core-form/utils/FormUtil";
26
+ import { RouterService as T } from "@gen-epix/ui-client-common/classes/services/RouterService";
27
+ import { useEditMutation as E } from "@gen-epix/ui-client-common/hooks/useEditMutation";
28
+ import { Autocomplete as D } from "@gen-epix/ui-core-form/components/fields/Autocomplete";
29
29
  //#region src/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.tsx
30
- var ue = ({ caseSet: e, numAddedCases: t }) => {
30
+ var de = ({ caseSet: e, numAddedCases: t }) => {
31
31
  let n = m(async () => {
32
- await E.getInstance().router.navigate({ pathname: r.createCaseSetLink(e) });
32
+ await T.getInstance().router.navigate({ pathname: r.createCaseSetLink(e) });
33
33
  }, [e]);
34
34
  return /* @__PURE__ */ y(f, { children: [/* @__PURE__ */ v(f, { children: s("Successfully added {{numAddedCases}} case(s) to event: {{name}}", {
35
35
  name: e.name,
@@ -42,33 +42,33 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
42
42
  children: s("View event: {{name}}", { name: e.name })
43
43
  })
44
44
  })] });
45
- }, k = C(({ onActionsChange: r, onClose: s, onTitleChange: p, openProps: C }) => {
46
- let { t: E } = ce(), k = a(), A = o(), j = ae(), M = se(ee), N = i(M, (e) => e.fetchData), P = i(M, (e) => e.completeCaseType), F = i(M, te((e) => e.findSimilarCasesResults?.flatMap((e) => e.similarCaseIds) ?? [])), I = g(), L = _(() => C.rows.map((e) => e.id).filter((e) => F.includes(e)), [C.rows, F]), R = _(() => (A.options ?? []).filter((e) => {
47
- let t = j.map.get(e.value);
48
- return !(t.case_type_id !== P.id || L.length === 0 && t?.id === C.currentCaseSet?.id);
45
+ }, O = C(({ onActionsChange: r, onClose: s, onTitleChange: p, openProps: C }) => {
46
+ let { t: T } = ce(), O = a(), k = o(), A = ae(), j = se(ee), M = i(j, (e) => e.fetchData), N = i(j, (e) => e.completeCaseType), P = i(j, te((e) => e.findSimilarCasesResults?.flatMap((e) => e.similarCaseIds) ?? [])), F = g(), I = _(() => C.rows.map((e) => e.id).filter((e) => P.includes(e)), [C.rows, P]), L = _(() => (k.options ?? []).filter((e) => {
47
+ let t = A.map.get(e.value);
48
+ return !(t.case_type_id !== N.id || I.length === 0 && t?.id === C.currentCaseSet?.id);
49
49
  }).map((e) => ({
50
50
  ...e,
51
- label: e.value === C.currentCaseSet?.id ? E("{{eventName}} (currently shown event)", { eventName: e.label }) : e.label
51
+ label: e.value === C.currentCaseSet?.id ? T("{{eventName}} (currently shown event)", { eventName: e.label }) : e.label
52
52
  })), [
53
- A.options,
54
- j.map,
55
- P.id,
53
+ k.options,
54
+ A.map,
55
+ N.id,
56
56
  C.currentCaseSet?.id,
57
- L.length,
58
- E
57
+ I.length,
58
+ T
59
+ ]), R = _(() => L.length === 1 ? L[0].value : I.length > 0 && C.currentCaseSet?.id ? C.currentCaseSet?.id : null, [
60
+ L,
61
+ C.currentCaseSet?.id,
62
+ I.length
59
63
  ]), z = ie({ values: {
60
- caseSetId: _(() => R.length === 1 ? R[0].value : L.length > 0 && C.currentCaseSet?.id ? C.currentCaseSet?.id : null, [
61
- R,
62
- C.currentCaseSet?.id,
63
- L.length
64
- ]),
64
+ caseSetId: R,
65
65
  shouldApplySharingToCases: !0
66
66
  } }), { control: B } = z, { caseSetId: V, shouldApplySharingToCases: H } = ne({ control: B }), U = _(() => ({
67
67
  invert: !1,
68
68
  key: "case_set_id",
69
69
  members: [V],
70
70
  type: "UUID_SET"
71
- }), [V]), { data: W, error: de, isLoading: G } = S({
71
+ }), [V]), { data: W, error: fe, isLoading: G } = S({
72
72
  enabled: !!V,
73
73
  queryFn: async ({ signal: e }) => (await c.getInstance().caseSetMembersPostQuery(U, null, null, { signal: e })).data,
74
74
  queryKey: l.getInstance().getGenericKey(e.CASE_SET_MEMBERS, U)
@@ -77,37 +77,37 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
77
77
  key: "case_set_id",
78
78
  members: [V],
79
79
  type: "UUID_SET"
80
- }), [V]), { data: q, error: fe, isLoading: J } = S({
80
+ }), [V]), { data: q, error: pe, isLoading: J } = S({
81
81
  enabled: !!V,
82
82
  queryFn: async ({ signal: e }) => (await c.getInstance().caseSetDataCollectionLinksPostQuery(K, null, null, { signal: e })).data,
83
83
  queryKey: l.getInstance().getGenericKey(e.CASE_SET_DATA_COLLECTION_LINKS, K)
84
- }), Y = _(() => q?.map((e) => k.map.get(e.data_collection_id)).filter((e) => !!e), [q, k.map]), X = _(() => C.rows.map((e) => e.id).filter((e) => !(W ?? []).map((e) => e.case_id).includes(e)), [W, C.rows]), pe = m(async () => {
84
+ }), Y = _(() => q?.map((e) => O.map.get(e.data_collection_id)).filter((e) => !!e), [q, O.map]), X = _(() => C.rows.map((e) => e.id).filter((e) => !(W ?? []).map((e) => e.case_id).includes(e)), [W, C.rows]), me = m(async () => {
85
85
  H && await t.applyDataCollectionLinks({
86
86
  caseIds: C.rows ? C.rows.map((e) => e.id) : void 0,
87
87
  caseSetDataCollectionIds: q?.map((e) => e.data_collection_id),
88
88
  caseSetId: V,
89
- caseTypeId: P.id
90
- }), await N(), s();
89
+ caseTypeId: N.id
90
+ }), await M(), s();
91
91
  }, [
92
92
  q,
93
93
  V,
94
- P.id,
95
- N,
94
+ N.id,
95
+ M,
96
96
  s,
97
97
  C.rows,
98
98
  H
99
- ]), me = m(async () => {
100
- await N(), s();
101
- }, [N, s]), { isMutating: Z, mutate: Q } = D({
99
+ ]), he = m(async () => {
100
+ await M(), s();
101
+ }, [M, s]), { isMutating: Z, mutate: Q } = E({
102
102
  associationQueryKeys: l.getInstance().getQueryKeyDependencies([e.CASE_SET_MEMBERS], !0),
103
- getErrorNotificationMessage: () => E("Failed add case(s) to {{caseSetName}}", { caseSetName: j.map.get(V).name }),
104
- getProgressNotificationMessage: () => E("Adding case(s) to {{caseSetName}}", { caseSetName: j.map.get(V).name }),
105
- getSuccessNotificationMessage: () => /* @__PURE__ */ v(ue, {
106
- caseSet: j.map.get(V),
103
+ getErrorNotificationMessage: () => T("Failed add case(s) to {{caseSetName}}", { caseSetName: A.map.get(V).name }),
104
+ getProgressNotificationMessage: () => T("Adding case(s) to {{caseSetName}}", { caseSetName: A.map.get(V).name }),
105
+ getSuccessNotificationMessage: () => /* @__PURE__ */ v(de, {
106
+ caseSet: A.map.get(V),
107
107
  numAddedCases: X.length
108
108
  }),
109
- onError: me,
110
- onSuccess: pe,
109
+ onError: he,
110
+ onSuccess: me,
111
111
  queryFn: async (e) => (await c.getInstance().caseSetMembersPostSome(e), e)
112
112
  }), $ = m((() => {
113
113
  Q(X.map((e) => ({
@@ -118,35 +118,35 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
118
118
  X,
119
119
  V,
120
120
  Q
121
- ]), he = m((() => {
121
+ ]), ge = m((() => {
122
122
  s();
123
123
  }), [s]);
124
124
  h(() => {
125
- let e = V ? j.map.get(V) : null;
125
+ let e = V ? A.map.get(V) : null;
126
126
  if (e) {
127
- p(E("Add {{numCases}} selected case(s) to {{eventName}}", {
127
+ p(T("Add {{numCases}} selected case(s) to {{eventName}}", {
128
128
  eventName: n.getCaseSetName(e),
129
129
  numCases: C.rows.length
130
130
  }));
131
131
  return;
132
132
  }
133
- p(E("Add {{numCases}} selected case(s) to an existing event", { numCases: C.rows.length }));
133
+ p(T("Add {{numCases}} selected case(s) to an existing event", { numCases: C.rows.length }));
134
134
  }, [
135
135
  V,
136
- j.map,
137
- P.name,
136
+ A.map,
137
+ N.name,
138
138
  p,
139
139
  C.rows.length,
140
- E
140
+ T
141
141
  ]), h(() => {
142
142
  let e = [];
143
143
  e.push({
144
- ...w.createAttributes("AddCasesToEventDialog-confirmButton"),
144
+ ...ue.createAttributes("AddCasesToEventDialog-confirmButton"),
145
145
  autoFocus: !0,
146
146
  color: "secondary",
147
147
  disabled: V && G || !V || Z || X.length < 1,
148
- form: I,
149
- label: E`Confirm`,
148
+ form: F,
149
+ label: T`Confirm`,
150
150
  loading: V && G || Z || J,
151
151
  onClick: $,
152
152
  type: "submit",
@@ -154,51 +154,51 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
154
154
  }), r(e);
155
155
  }, [
156
156
  V,
157
- I,
157
+ F,
158
158
  Z,
159
159
  G,
160
160
  r,
161
- he,
161
+ ge,
162
162
  $,
163
- E,
163
+ T,
164
164
  X.length,
165
165
  J
166
166
  ]);
167
- let ge = x([
167
+ let _e = x([
168
+ k,
168
169
  A,
169
- j,
170
- k
171
- ]), _e = _(() => T.createBooleanOptions(E), [E]), ve = m(() => {}, []);
170
+ O
171
+ ]), ve = _(() => w.createBooleanOptions(T), [T]), ye = m(() => {}, []);
172
172
  return /* @__PURE__ */ v(b, {
173
173
  isLoading: Z,
174
- loadables: ge,
174
+ loadables: _e,
175
175
  children: /* @__PURE__ */ v(re, {
176
176
  ...z,
177
177
  children: /* @__PURE__ */ y("form", {
178
178
  autoComplete: "off",
179
- onSubmit: ve,
179
+ onSubmit: ye,
180
180
  children: [/* @__PURE__ */ y(f, { children: [/* @__PURE__ */ v(f, {
181
181
  sx: { marginY: 1 },
182
- children: /* @__PURE__ */ v(O, {
183
- infoMessage: R?.length === 0 ? E`No events of the same case type available` : void 0,
184
- label: E`Select event`,
182
+ children: /* @__PURE__ */ v(D, {
183
+ infoMessage: L?.length === 0 ? T`No events of the same case type available` : void 0,
184
+ label: T`Select event`,
185
185
  name: "caseSetId",
186
- options: R
186
+ options: L
187
187
  })
188
188
  }), /* @__PURE__ */ v(f, {
189
189
  sx: { marginY: 1 },
190
190
  children: /* @__PURE__ */ v(le, {
191
191
  disabled: q?.length === 0,
192
- infoMessage: q?.length === 0 ? E`No data collections to add` : void 0,
193
- label: E`Should the selected cases be given the same access rights as the selected event?`,
192
+ infoMessage: q?.length === 0 ? T`No data collections to add` : void 0,
193
+ label: T`Should the selected cases be given the same access rights as the selected event?`,
194
194
  loading: q?.length && J,
195
195
  name: "shouldApplySharingToCases",
196
- options: _e
196
+ options: ve
197
197
  })
198
198
  })] }), V && /* @__PURE__ */ v(f, {
199
199
  sx: { marginY: 2 },
200
200
  children: /* @__PURE__ */ y(b, {
201
- error: de || fe,
201
+ error: fe || pe,
202
202
  inlineSpinner: !0,
203
203
  isLoading: G,
204
204
  shouldHideActionButtons: !0,
@@ -207,21 +207,21 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
207
207
  sx: { marginY: 2 },
208
208
  children: /* @__PURE__ */ y(u, {
209
209
  severity: "info",
210
- children: [/* @__PURE__ */ v(d, { children: E("The selected event is shared in the following data collection(s):") }), Y.map((e) => /* @__PURE__ */ v(f, { children: e.name }, e.id))]
210
+ children: [/* @__PURE__ */ v(d, { children: T("The selected event is shared in the following data collection(s):") }), Y.map((e) => /* @__PURE__ */ v(f, { children: e.name }, e.id))]
211
211
  })
212
212
  }),
213
213
  X.length > 0 && /* @__PURE__ */ v(f, {
214
214
  sx: { marginY: 2 },
215
215
  children: /* @__PURE__ */ v(u, {
216
216
  severity: "info",
217
- children: /* @__PURE__ */ y(d, { children: [E("{{numCasesToAdd}} selected case(s) will be added to selected the event.", { numCasesToAdd: X.length }), C.rows.length !== X.length && /* @__PURE__ */ v(f, { children: E("{{numCasesAlreadyInEvent}} selected case(s) are already part of the selected event.", { numCasesAlreadyInEvent: C.rows.length - X.length }) })] })
217
+ children: /* @__PURE__ */ y(d, { children: [T("{{numCasesToAdd}} selected case(s) will be added to selected the event.", { numCasesToAdd: X.length }), C.rows.length !== X.length && /* @__PURE__ */ v(f, { children: T("{{numCasesAlreadyInEvent}} selected case(s) are already part of the selected event.", { numCasesAlreadyInEvent: C.rows.length - X.length }) })] })
218
218
  })
219
219
  }),
220
220
  X.length === 0 && /* @__PURE__ */ v(f, {
221
221
  sx: { marginY: 2 },
222
222
  children: /* @__PURE__ */ v(u, {
223
223
  severity: "error",
224
- children: /* @__PURE__ */ v(d, { children: E("All selected case(s) are already part of the selected event.") })
224
+ children: /* @__PURE__ */ v(d, { children: T("All selected case(s) are already part of the selected event.") })
225
225
  })
226
226
  }),
227
227
  X.length > 0 && /* @__PURE__ */ v(f, {
@@ -241,6 +241,6 @@ var ue = ({ caseSet: e, numAddedCases: t }) => {
241
241
  testId: "AddCasesToEventDialog"
242
242
  });
243
243
  //#endregion
244
- export { k as t };
244
+ export { O as t };
245
245
 
246
246
  //# sourceMappingURL=AddCasesToEventDialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AddCasesToEventDialog.js","names":[],"sources":["../../src/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.tsx","../../src/components/ui/AddCasesToEventDialog/AddCasesToEventDialog.tsx"],"sourcesContent":["import { t } from 'i18next';\nimport {\n Box,\n Link,\n} from '@mui/material';\nimport { useCallback } from 'react';\nimport type { CaseDbCaseSet } from '@gen-epix/api-casedb';\nimport { RouterService } from '@gen-epix/ui/classes/services/RouterService';\n\nimport { CaseSetUtil } from '../../../utils/CaseSetUtil';\n\nexport type AddCasesToEventDialogSuccessNotificationMessageProps = {\n readonly caseSet: CaseDbCaseSet;\n readonly numAddedCases: number;\n};\n\nexport const AddCasesToEventDialogSuccessNotificationMessage = ({ caseSet, numAddedCases }: AddCasesToEventDialogSuccessNotificationMessageProps) => {\n\n const onLinkClick = useCallback(async () => {\n await RouterService.getInstance().router.navigate({ pathname: CaseSetUtil.createCaseSetLink(caseSet) });\n }, [caseSet]);\n\n return (\n <Box>\n <Box>\n {t('Successfully added {{numAddedCases}} case(s) to event: {{name}}', { name: caseSet.name, numAddedCases })}\n </Box>\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Link\n href={'#'}\n onClick={onLinkClick}\n >\n {t('View event: {{name}}', { name: caseSet.name })}\n </Link>\n </Box>\n </Box>\n );\n};\n","import {\n Alert,\n AlertTitle,\n Box,\n} from '@mui/material';\nimport {\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { ReactElement } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\nimport {\n FormProvider,\n useForm,\n useWatch,\n} from 'react-hook-form';\nimport { useShallow } from 'zustand/shallow';\nimport type {\n CaseDbCase,\n CaseDbCaseSet,\n CaseDbCaseSetMember,\n CaseDbTypedUuidSetFilter,\n} from '@gen-epix/api-casedb';\nimport { CaseDbCaseApi } from '@gen-epix/api-casedb';\nimport type { DialogAction } from '@gen-epix/ui/components/ui/Dialog';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '@gen-epix/ui/hoc/withDialog';\nimport { QueryClientService } from '@gen-epix/ui/classes/services/QueryClientService';\nimport { ResponseHandler } from '@gen-epix/ui/components/ui/ResponseHandler';\nimport { useEditMutation } from '@gen-epix/ui/hooks/useEditMutation';\nimport { useQueryMemo } from '@gen-epix/ui/hooks/useQueryMemo';\nimport { withDialog } from '@gen-epix/ui/hoc/withDialog';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\nimport { FormUtil } from '@gen-epix/ui-form/utils/FormUtil';\nimport { Select } from '@gen-epix/ui-form/components/fields/Select';\nimport { Autocomplete } from '@gen-epix/ui-form/components/fields/Autocomplete';\n\nimport {\n useCaseSetOptionsQuery,\n useCaseSetsMapQuery,\n} from '../../../dataHooks/useCaseSetsQuery';\nimport { useDataCollectionsMapQuery } from '../../../dataHooks/useDataCollectionsQuery';\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport { CaseUtil } from '../../../utils/CaseUtil';\nimport { CasesAlreadyInCaseSetWarning } from '../CasesAlreadyInCaseSetWarning';\nimport { CASEDB_QUERY_KEY } from '../../../constants/query';\nimport { CaseDbDataUtil } from '../../../utils/CaseDbDataUtil';\n\nimport { AddCasesToEventDialogSuccessNotificationMessage } from './AddCasesToEventDialogSuccessNotificationMessage';\n\n\nexport interface AddCasesToEventDialogOpenProps {\n currentCaseSet: CaseDbCaseSet;\n rows: CaseDbCase[];\n}\n\nexport interface AddCasesToEventDialogProps extends WithDialogRenderProps<AddCasesToEventDialogOpenProps> {\n //\n}\n\nexport type AddCasesToEventDialogRefMethods = WithDialogRefMethods<AddCasesToEventDialogProps, AddCasesToEventDialogOpenProps>;\n\ntype FormFields = {\n caseSetId: string;\n shouldApplySharingToCases: boolean;\n};\n\nexport const AddCasesToEventDialog = withDialog<AddCasesToEventDialogProps, AddCasesToEventDialogOpenProps>((\n {\n onActionsChange,\n onClose,\n onTitleChange,\n openProps,\n }: AddCasesToEventDialogProps,\n): ReactElement => {\n const { t } = useTranslation();\n\n const dataCollectionsMapQuery = useDataCollectionsMapQuery();\n const caseSetOptionsQuery = useCaseSetOptionsQuery();\n const caseSetsMapQuery = useCaseSetsMapQuery();\n const dashboardStore = use(DashboardStoreContext);\n const fetchData = useStore(dashboardStore, (state) => state.fetchData);\n const completeCaseType = useStore(dashboardStore, (state) => state.completeCaseType);\n const similarCaseIds = useStore(dashboardStore, useShallow((state) => state.findSimilarCasesResults?.flatMap(result => result.similarCaseIds) ?? []));\n const formId = useId();\n const similarCaseIdsInRows = useMemo(() => {\n return openProps.rows.map(row => row.id).filter(id => similarCaseIds.includes(id));\n }, [openProps.rows, similarCaseIds]);\n\n const filteredCaseSetOptions = useMemo(() => (caseSetOptionsQuery.options ?? []).filter(option => {\n const caseSet = caseSetsMapQuery.map.get(option.value);\n\n if (caseSet.case_type_id !== completeCaseType.id) {\n return false;\n }\n\n if (similarCaseIdsInRows.length === 0 && caseSet?.id === openProps.currentCaseSet?.id) {\n return false;\n }\n\n return true;\n }).map(option => {\n return {\n ...option,\n label: option.value === openProps.currentCaseSet?.id ? t('{{eventName}} (currently shown event)', { eventName: option.label }) : option.label,\n };\n }), [caseSetOptionsQuery.options, caseSetsMapQuery.map, completeCaseType.id, openProps.currentCaseSet?.id, similarCaseIdsInRows.length, t]);\n\n const initialSetSetId = useMemo(() => {\n if (filteredCaseSetOptions.length === 1) {\n return filteredCaseSetOptions[0].value;\n }\n if (similarCaseIdsInRows.length > 0 && openProps.currentCaseSet?.id) {\n return openProps.currentCaseSet?.id;\n }\n return null;\n }, [filteredCaseSetOptions, openProps.currentCaseSet?.id, similarCaseIdsInRows.length]);\n\n const formMethods = useForm<FormFields>({\n values: {\n caseSetId: initialSetSetId,\n shouldApplySharingToCases: true,\n },\n });\n\n const { control } = formMethods;\n const { caseSetId, shouldApplySharingToCases } = useWatch({ control });\n\n const caseSetMembersFilter = useMemo<CaseDbTypedUuidSetFilter>(() => ({\n invert: false,\n key: 'case_set_id',\n members: [caseSetId],\n type: 'UUID_SET',\n }), [caseSetId]);\n const { data: caseSetMembers, error: caseSetMembersError, isLoading: isCaseSetMembersLoading } = useQueryMemo({\n enabled: !!caseSetId,\n queryFn: async ({ signal }) => {\n const response = await CaseDbCaseApi.getInstance().caseSetMembersPostQuery(caseSetMembersFilter, null, null, { signal });\n return response.data;\n },\n queryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SET_MEMBERS, caseSetMembersFilter),\n });\n\n const caseSetDataCollectionLinksFilter = useMemo<CaseDbTypedUuidSetFilter>(() => ({\n invert: false,\n key: 'case_set_id',\n members: [caseSetId],\n type: 'UUID_SET',\n }), [caseSetId]);\n const { data: caseSetDataCollectionLinks, error: caseSetDataCollectionLinksError, isLoading: isCaseSetDataCollectionLinksLoading } = useQueryMemo({\n enabled: !!caseSetId,\n queryFn: async ({ signal }) => {\n const response = await CaseDbCaseApi.getInstance().caseSetDataCollectionLinksPostQuery(caseSetDataCollectionLinksFilter, null, null, { signal });\n return response.data;\n },\n queryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SET_DATA_COLLECTION_LINKS, caseSetDataCollectionLinksFilter),\n });\n\n const caseSetDataCollections = useMemo(() => {\n return caseSetDataCollectionLinks?.map(link => dataCollectionsMapQuery.map.get(link.data_collection_id)).filter(x => !!x);\n }, [caseSetDataCollectionLinks, dataCollectionsMapQuery.map]);\n\n const caseIdsToAdd = useMemo(() => {\n return openProps.rows.map(row => row.id).filter(caseId => !(caseSetMembers ?? []).map(x => x.case_id).includes(caseId));\n }, [caseSetMembers, openProps.rows]);\n\n const onSuccess = useCallback(async () => {\n if (shouldApplySharingToCases) {\n await CaseUtil.applyDataCollectionLinks({\n caseIds: openProps.rows ? openProps.rows.map(row => row.id) : undefined,\n caseSetDataCollectionIds: caseSetDataCollectionLinks?.map(link => link.data_collection_id),\n caseSetId,\n caseTypeId: completeCaseType.id,\n });\n }\n await fetchData();\n onClose();\n }, [caseSetDataCollectionLinks, caseSetId, completeCaseType.id, fetchData, onClose, openProps.rows, shouldApplySharingToCases]);\n\n const onError = useCallback(async () => {\n await fetchData();\n onClose();\n }, [fetchData, onClose]);\n\n const { isMutating: isMutatingItems, mutate: mutateItems } = useEditMutation<CaseDbCaseSetMember[]>({\n associationQueryKeys: QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SET_MEMBERS], true),\n getErrorNotificationMessage: () => t('Failed add case(s) to {{caseSetName}}', { caseSetName: caseSetsMapQuery.map.get(caseSetId).name }),\n getProgressNotificationMessage: () => t('Adding case(s) to {{caseSetName}}', { caseSetName: caseSetsMapQuery.map.get(caseSetId).name }),\n getSuccessNotificationMessage: () => (\n <AddCasesToEventDialogSuccessNotificationMessage\n caseSet={caseSetsMapQuery.map.get(caseSetId)}\n numAddedCases={caseIdsToAdd.length}\n />\n ),\n onError,\n onSuccess,\n queryFn: async (items: CaseDbCaseSetMember[]) => {\n await CaseDbCaseApi.getInstance().caseSetMembersPostSome(items);\n return items;\n },\n });\n\n const onConfirmButtonClick = useCallback((() => {\n mutateItems(caseIdsToAdd.map(caseId => ({\n case_id: caseId,\n case_set_id: caseSetId,\n } satisfies CaseDbCaseSetMember)));\n }), [caseIdsToAdd, caseSetId, mutateItems]);\n\n const onCancelButtonClick = useCallback((() => {\n onClose();\n }), [onClose]);\n\n useEffect(() => {\n const caseSet = caseSetId ? caseSetsMapQuery.map.get(caseSetId) : null;\n if (caseSet) {\n onTitleChange(t('Add {{numCases}} selected case(s) to {{eventName}}', { eventName: CaseDbDataUtil.getCaseSetName(caseSet), numCases: openProps.rows.length }));\n return;\n }\n onTitleChange(t('Add {{numCases}} selected case(s) to an existing event', { numCases: openProps.rows.length }));\n }, [caseSetId, caseSetsMapQuery.map, completeCaseType.name, onTitleChange, openProps.rows.length, t]);\n\n useEffect(() => {\n const actions: DialogAction[] = [];\n actions.push(\n {\n ...TestIdUtil.createAttributes('AddCasesToEventDialog-confirmButton'),\n autoFocus: true,\n color: 'secondary',\n disabled: (caseSetId && isCaseSetMembersLoading) || !caseSetId || isMutatingItems || caseIdsToAdd.length < 1,\n form: formId,\n label: t`Confirm`,\n loading: (caseSetId && isCaseSetMembersLoading) || isMutatingItems || isCaseSetDataCollectionLinksLoading,\n onClick: onConfirmButtonClick,\n type: 'submit',\n variant: 'contained',\n },\n );\n onActionsChange(actions);\n }, [caseSetId, formId, isMutatingItems, isCaseSetMembersLoading, onActionsChange, onCancelButtonClick, onConfirmButtonClick, t, caseIdsToAdd.length, isCaseSetDataCollectionLinksLoading]);\n\n const loadables = useArray([caseSetOptionsQuery, caseSetsMapQuery, dataCollectionsMapQuery]);\n\n const booleanOptions = useMemo(() => FormUtil.createBooleanOptions(t), [t]);\n\n const onSubmit = useCallback(() => {\n // noop, as the mutation is triggered by a button outside of the form\n }, []);\n\n return (\n <ResponseHandler\n isLoading={isMutatingItems}\n loadables={loadables}\n >\n <FormProvider {...formMethods}>\n <form\n autoComplete={'off'}\n onSubmit={onSubmit}\n >\n <Box>\n <Box\n sx={{\n marginY: 1,\n }}\n >\n <Autocomplete\n infoMessage={filteredCaseSetOptions?.length === 0 ? t`No events of the same case type available` : undefined}\n label={t`Select event`}\n name={'caseSetId'}\n options={filteredCaseSetOptions}\n />\n </Box>\n <Box\n sx={{\n marginY: 1,\n }}\n >\n <Select\n disabled={caseSetDataCollectionLinks?.length === 0}\n infoMessage={caseSetDataCollectionLinks?.length === 0 ? t`No data collections to add` : undefined}\n label={t`Should the selected cases be given the same access rights as the selected event?`}\n loading={caseSetDataCollectionLinks?.length && isCaseSetDataCollectionLinksLoading}\n name={'shouldApplySharingToCases'}\n options={booleanOptions}\n />\n </Box>\n </Box>\n {caseSetId && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <ResponseHandler\n error={caseSetMembersError || caseSetDataCollectionLinksError}\n inlineSpinner\n isLoading={isCaseSetMembersLoading}\n shouldHideActionButtons\n >\n {caseSetDataCollections?.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'info'}>\n <AlertTitle>\n {t('The selected event is shared in the following data collection(s):')}\n </AlertTitle>\n {caseSetDataCollections.map(dataCollection => (\n <Box key={dataCollection.id}>\n {dataCollection.name}\n </Box>\n ))}\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'info'}>\n <AlertTitle>\n {t('{{numCasesToAdd}} selected case(s) will be added to selected the event.', { numCasesToAdd: caseIdsToAdd.length })}\n {openProps.rows.length !== caseIdsToAdd.length && (\n <Box>\n {t('{{numCasesAlreadyInEvent}} selected case(s) are already part of the selected event.', { numCasesAlreadyInEvent: openProps.rows.length - caseIdsToAdd.length })}\n </Box>\n )}\n </AlertTitle>\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length === 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'error'}>\n <AlertTitle>\n {t('All selected case(s) are already part of the selected event.')}\n </AlertTitle>\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <CasesAlreadyInCaseSetWarning\n cases={openProps.rows.filter(row => caseIdsToAdd.includes(row.id))}\n />\n </Box>\n )}\n </ResponseHandler>\n </Box>\n )}\n </form>\n </FormProvider>\n </ResponseHandler>\n );\n}, {\n defaultTitle: '',\n fullWidth: true,\n maxWidth: 'md',\n testId: 'AddCasesToEventDialog',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAa,MAAmD,EAAE,YAAS,uBAA0E;CAEnJ,IAAM,IAAc,EAAY,YAAY;EAC1C,MAAM,EAAc,YAAY,CAAC,CAAC,OAAO,SAAS,EAAE,UAAU,EAAY,kBAAkB,CAAO,EAAE,CAAC;CACxG,GAAG,CAAC,CAAO,CAAC;CAEZ,OACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD,EAAA,UACG,EAAE,mEAAmE;EAAE,MAAM,EAAQ;EAAM;CAAc,CAAC,EACxG,CAAA,GACL,kBAAC,GAAD;EACE,IAAI,EACF,SAAS,EACX;YAEA,kBAAC,GAAD;GACE,MAAM;GACN,SAAS;aAER,EAAE,wBAAwB,EAAE,MAAM,EAAQ,KAAK,CAAC;EAC7C,CAAA;CACH,CA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EAClE,CAAA;OACE,CAAA;MAEQ;;IACd,CAAA,CAEH;;EACM,CAAA;CACC,CAAA;AAErB,GAAG;CACD,cAAc;CACd,WAAW;CACX,UAAU;CACV,QAAQ;AACV,CAAC"}
1
+ {"version":3,"file":"AddCasesToEventDialog.js","names":[],"sources":["../../src/components/ui/AddCasesToEventDialog/AddCasesToEventDialogSuccessNotificationMessage.tsx","../../src/components/ui/AddCasesToEventDialog/AddCasesToEventDialog.tsx"],"sourcesContent":["import { t } from 'i18next';\nimport {\n Box,\n Link,\n} from '@mui/material';\nimport { useCallback } from 'react';\nimport type { CaseDbCaseSet } from '@gen-epix/api-casedb';\nimport { RouterService } from '@gen-epix/ui-client-common/classes/services/RouterService';\n\nimport { CaseSetUtil } from '../../../utils/CaseSetUtil';\n\nexport type AddCasesToEventDialogSuccessNotificationMessageProps = {\n readonly caseSet: CaseDbCaseSet;\n readonly numAddedCases: number;\n};\n\nexport const AddCasesToEventDialogSuccessNotificationMessage = ({ caseSet, numAddedCases }: AddCasesToEventDialogSuccessNotificationMessageProps) => {\n\n const onLinkClick = useCallback(async () => {\n await RouterService.getInstance().router.navigate({ pathname: CaseSetUtil.createCaseSetLink(caseSet) });\n }, [caseSet]);\n\n return (\n <Box>\n <Box>\n {t('Successfully added {{numAddedCases}} case(s) to event: {{name}}', { name: caseSet.name, numAddedCases })}\n </Box>\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Link\n href={'#'}\n onClick={onLinkClick}\n >\n {t('View event: {{name}}', { name: caseSet.name })}\n </Link>\n </Box>\n </Box>\n );\n};\n","import {\n Alert,\n AlertTitle,\n Box,\n} from '@mui/material';\nimport {\n use,\n useCallback,\n useEffect,\n useId,\n useMemo,\n} from 'react';\nimport type { ReactElement } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { useStore } from 'zustand';\nimport {\n FormProvider,\n useForm,\n useWatch,\n} from 'react-hook-form';\nimport { useShallow } from 'zustand/shallow';\nimport type {\n CaseDbCase,\n CaseDbCaseSet,\n CaseDbCaseSetMember,\n CaseDbTypedUuidSetFilter,\n} from '@gen-epix/api-casedb';\nimport { CaseDbCaseApi } from '@gen-epix/api-casedb';\nimport type { DialogAction } from '@gen-epix/ui-core-components/components/Dialog';\nimport type {\n WithDialogRefMethods,\n WithDialogRenderProps,\n} from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { QueryClientService } from '@gen-epix/ui-client-common/classes/services/QueryClientService';\nimport { ResponseHandler } from '@gen-epix/ui-client-common/components/ui/ResponseHandler';\nimport { useEditMutation } from '@gen-epix/ui-client-common/hooks/useEditMutation';\nimport { useQueryMemo } from '@gen-epix/ui-client-common/hooks/useQueryMemo';\nimport { withDialog } from '@gen-epix/ui-core-components/hoc/withDialog';\nimport { TestIdUtil } from '@gen-epix/ui-core/utils/TestIdUtil';\nimport { useArray } from '@gen-epix/ui-core/hooks/useArray';\nimport { FormUtil } from '@gen-epix/ui-core-form/utils/FormUtil';\nimport { Select } from '@gen-epix/ui-core-form/components/fields/Select';\nimport { Autocomplete } from '@gen-epix/ui-core-form/components/fields/Autocomplete';\n\nimport {\n useCaseSetOptionsQuery,\n useCaseSetsMapQuery,\n} from '../../../dataHooks/useCaseSetsQuery';\nimport { useDataCollectionsMapQuery } from '../../../dataHooks/useDataCollectionsQuery';\nimport { DashboardStoreContext } from '../../../stores/dashboardStore';\nimport { CaseUtil } from '../../../utils/CaseUtil';\nimport { CasesAlreadyInCaseSetWarning } from '../CasesAlreadyInCaseSetWarning';\nimport { CASEDB_QUERY_KEY } from '../../../constants/query';\nimport { CaseDbDataUtil } from '../../../utils/CaseDbDataUtil';\n\nimport { AddCasesToEventDialogSuccessNotificationMessage } from './AddCasesToEventDialogSuccessNotificationMessage';\n\n\nexport interface AddCasesToEventDialogOpenProps {\n currentCaseSet: CaseDbCaseSet;\n rows: CaseDbCase[];\n}\n\nexport interface AddCasesToEventDialogProps extends WithDialogRenderProps<AddCasesToEventDialogOpenProps> {\n //\n}\n\nexport type AddCasesToEventDialogRefMethods = WithDialogRefMethods<AddCasesToEventDialogProps, AddCasesToEventDialogOpenProps>;\n\ntype FormFields = {\n caseSetId: string;\n shouldApplySharingToCases: boolean;\n};\n\nexport const AddCasesToEventDialog = withDialog<AddCasesToEventDialogProps, AddCasesToEventDialogOpenProps>((\n {\n onActionsChange,\n onClose,\n onTitleChange,\n openProps,\n }: AddCasesToEventDialogProps,\n): ReactElement => {\n const { t } = useTranslation();\n\n const dataCollectionsMapQuery = useDataCollectionsMapQuery();\n const caseSetOptionsQuery = useCaseSetOptionsQuery();\n const caseSetsMapQuery = useCaseSetsMapQuery();\n const dashboardStore = use(DashboardStoreContext);\n const fetchData = useStore(dashboardStore, (state) => state.fetchData);\n const completeCaseType = useStore(dashboardStore, (state) => state.completeCaseType);\n const similarCaseIds = useStore(dashboardStore, useShallow((state) => state.findSimilarCasesResults?.flatMap(result => result.similarCaseIds) ?? []));\n const formId = useId();\n const similarCaseIdsInRows = useMemo(() => {\n return openProps.rows.map(row => row.id).filter(id => similarCaseIds.includes(id));\n }, [openProps.rows, similarCaseIds]);\n\n const filteredCaseSetOptions = useMemo(() => (caseSetOptionsQuery.options ?? []).filter(option => {\n const caseSet = caseSetsMapQuery.map.get(option.value);\n\n if (caseSet.case_type_id !== completeCaseType.id) {\n return false;\n }\n\n if (similarCaseIdsInRows.length === 0 && caseSet?.id === openProps.currentCaseSet?.id) {\n return false;\n }\n\n return true;\n }).map(option => {\n return {\n ...option,\n label: option.value === openProps.currentCaseSet?.id ? t('{{eventName}} (currently shown event)', { eventName: option.label }) : option.label,\n };\n }), [caseSetOptionsQuery.options, caseSetsMapQuery.map, completeCaseType.id, openProps.currentCaseSet?.id, similarCaseIdsInRows.length, t]);\n\n const initialSetSetId = useMemo(() => {\n if (filteredCaseSetOptions.length === 1) {\n return filteredCaseSetOptions[0].value;\n }\n if (similarCaseIdsInRows.length > 0 && openProps.currentCaseSet?.id) {\n return openProps.currentCaseSet?.id;\n }\n return null;\n }, [filteredCaseSetOptions, openProps.currentCaseSet?.id, similarCaseIdsInRows.length]);\n\n const formMethods = useForm<FormFields>({\n values: {\n caseSetId: initialSetSetId,\n shouldApplySharingToCases: true,\n },\n });\n\n const { control } = formMethods;\n const { caseSetId, shouldApplySharingToCases } = useWatch({ control });\n\n const caseSetMembersFilter = useMemo<CaseDbTypedUuidSetFilter>(() => ({\n invert: false,\n key: 'case_set_id',\n members: [caseSetId],\n type: 'UUID_SET',\n }), [caseSetId]);\n const { data: caseSetMembers, error: caseSetMembersError, isLoading: isCaseSetMembersLoading } = useQueryMemo({\n enabled: !!caseSetId,\n queryFn: async ({ signal }) => {\n const response = await CaseDbCaseApi.getInstance().caseSetMembersPostQuery(caseSetMembersFilter, null, null, { signal });\n return response.data;\n },\n queryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SET_MEMBERS, caseSetMembersFilter),\n });\n\n const caseSetDataCollectionLinksFilter = useMemo<CaseDbTypedUuidSetFilter>(() => ({\n invert: false,\n key: 'case_set_id',\n members: [caseSetId],\n type: 'UUID_SET',\n }), [caseSetId]);\n const { data: caseSetDataCollectionLinks, error: caseSetDataCollectionLinksError, isLoading: isCaseSetDataCollectionLinksLoading } = useQueryMemo({\n enabled: !!caseSetId,\n queryFn: async ({ signal }) => {\n const response = await CaseDbCaseApi.getInstance().caseSetDataCollectionLinksPostQuery(caseSetDataCollectionLinksFilter, null, null, { signal });\n return response.data;\n },\n queryKey: QueryClientService.getInstance().getGenericKey(CASEDB_QUERY_KEY.CASE_SET_DATA_COLLECTION_LINKS, caseSetDataCollectionLinksFilter),\n });\n\n const caseSetDataCollections = useMemo(() => {\n return caseSetDataCollectionLinks?.map(link => dataCollectionsMapQuery.map.get(link.data_collection_id)).filter(x => !!x);\n }, [caseSetDataCollectionLinks, dataCollectionsMapQuery.map]);\n\n const caseIdsToAdd = useMemo(() => {\n return openProps.rows.map(row => row.id).filter(caseId => !(caseSetMembers ?? []).map(x => x.case_id).includes(caseId));\n }, [caseSetMembers, openProps.rows]);\n\n const onSuccess = useCallback(async () => {\n if (shouldApplySharingToCases) {\n await CaseUtil.applyDataCollectionLinks({\n caseIds: openProps.rows ? openProps.rows.map(row => row.id) : undefined,\n caseSetDataCollectionIds: caseSetDataCollectionLinks?.map(link => link.data_collection_id),\n caseSetId,\n caseTypeId: completeCaseType.id,\n });\n }\n await fetchData();\n onClose();\n }, [caseSetDataCollectionLinks, caseSetId, completeCaseType.id, fetchData, onClose, openProps.rows, shouldApplySharingToCases]);\n\n const onError = useCallback(async () => {\n await fetchData();\n onClose();\n }, [fetchData, onClose]);\n\n const { isMutating: isMutatingItems, mutate: mutateItems } = useEditMutation<CaseDbCaseSetMember[]>({\n associationQueryKeys: QueryClientService.getInstance().getQueryKeyDependencies([CASEDB_QUERY_KEY.CASE_SET_MEMBERS], true),\n getErrorNotificationMessage: () => t('Failed add case(s) to {{caseSetName}}', { caseSetName: caseSetsMapQuery.map.get(caseSetId).name }),\n getProgressNotificationMessage: () => t('Adding case(s) to {{caseSetName}}', { caseSetName: caseSetsMapQuery.map.get(caseSetId).name }),\n getSuccessNotificationMessage: () => (\n <AddCasesToEventDialogSuccessNotificationMessage\n caseSet={caseSetsMapQuery.map.get(caseSetId)}\n numAddedCases={caseIdsToAdd.length}\n />\n ),\n onError,\n onSuccess,\n queryFn: async (items: CaseDbCaseSetMember[]) => {\n await CaseDbCaseApi.getInstance().caseSetMembersPostSome(items);\n return items;\n },\n });\n\n const onConfirmButtonClick = useCallback((() => {\n mutateItems(caseIdsToAdd.map(caseId => ({\n case_id: caseId,\n case_set_id: caseSetId,\n } satisfies CaseDbCaseSetMember)));\n }), [caseIdsToAdd, caseSetId, mutateItems]);\n\n const onCancelButtonClick = useCallback((() => {\n onClose();\n }), [onClose]);\n\n useEffect(() => {\n const caseSet = caseSetId ? caseSetsMapQuery.map.get(caseSetId) : null;\n if (caseSet) {\n onTitleChange(t('Add {{numCases}} selected case(s) to {{eventName}}', { eventName: CaseDbDataUtil.getCaseSetName(caseSet), numCases: openProps.rows.length }));\n return;\n }\n onTitleChange(t('Add {{numCases}} selected case(s) to an existing event', { numCases: openProps.rows.length }));\n }, [caseSetId, caseSetsMapQuery.map, completeCaseType.name, onTitleChange, openProps.rows.length, t]);\n\n useEffect(() => {\n const actions: DialogAction[] = [];\n actions.push(\n {\n ...TestIdUtil.createAttributes('AddCasesToEventDialog-confirmButton'),\n autoFocus: true,\n color: 'secondary',\n disabled: (caseSetId && isCaseSetMembersLoading) || !caseSetId || isMutatingItems || caseIdsToAdd.length < 1,\n form: formId,\n label: t`Confirm`,\n loading: (caseSetId && isCaseSetMembersLoading) || isMutatingItems || isCaseSetDataCollectionLinksLoading,\n onClick: onConfirmButtonClick,\n type: 'submit',\n variant: 'contained',\n },\n );\n onActionsChange(actions);\n }, [caseSetId, formId, isMutatingItems, isCaseSetMembersLoading, onActionsChange, onCancelButtonClick, onConfirmButtonClick, t, caseIdsToAdd.length, isCaseSetDataCollectionLinksLoading]);\n\n const loadables = useArray([caseSetOptionsQuery, caseSetsMapQuery, dataCollectionsMapQuery]);\n\n const booleanOptions = useMemo(() => FormUtil.createBooleanOptions(t), [t]);\n\n const onSubmit = useCallback(() => {\n // noop, as the mutation is triggered by a button outside of the form\n }, []);\n\n return (\n <ResponseHandler\n isLoading={isMutatingItems}\n loadables={loadables}\n >\n <FormProvider {...formMethods}>\n <form\n autoComplete={'off'}\n onSubmit={onSubmit}\n >\n <Box>\n <Box\n sx={{\n marginY: 1,\n }}\n >\n <Autocomplete\n infoMessage={filteredCaseSetOptions?.length === 0 ? t`No events of the same case type available` : undefined}\n label={t`Select event`}\n name={'caseSetId'}\n options={filteredCaseSetOptions}\n />\n </Box>\n <Box\n sx={{\n marginY: 1,\n }}\n >\n <Select\n disabled={caseSetDataCollectionLinks?.length === 0}\n infoMessage={caseSetDataCollectionLinks?.length === 0 ? t`No data collections to add` : undefined}\n label={t`Should the selected cases be given the same access rights as the selected event?`}\n loading={caseSetDataCollectionLinks?.length && isCaseSetDataCollectionLinksLoading}\n name={'shouldApplySharingToCases'}\n options={booleanOptions}\n />\n </Box>\n </Box>\n {caseSetId && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <ResponseHandler\n error={caseSetMembersError || caseSetDataCollectionLinksError}\n inlineSpinner\n isLoading={isCaseSetMembersLoading}\n shouldHideActionButtons\n >\n {caseSetDataCollections?.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'info'}>\n <AlertTitle>\n {t('The selected event is shared in the following data collection(s):')}\n </AlertTitle>\n {caseSetDataCollections.map(dataCollection => (\n <Box key={dataCollection.id}>\n {dataCollection.name}\n </Box>\n ))}\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'info'}>\n <AlertTitle>\n {t('{{numCasesToAdd}} selected case(s) will be added to selected the event.', { numCasesToAdd: caseIdsToAdd.length })}\n {openProps.rows.length !== caseIdsToAdd.length && (\n <Box>\n {t('{{numCasesAlreadyInEvent}} selected case(s) are already part of the selected event.', { numCasesAlreadyInEvent: openProps.rows.length - caseIdsToAdd.length })}\n </Box>\n )}\n </AlertTitle>\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length === 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <Alert severity={'error'}>\n <AlertTitle>\n {t('All selected case(s) are already part of the selected event.')}\n </AlertTitle>\n </Alert>\n </Box>\n )}\n {caseIdsToAdd.length > 0 && (\n <Box\n sx={{\n marginY: 2,\n }}\n >\n <CasesAlreadyInCaseSetWarning\n cases={openProps.rows.filter(row => caseIdsToAdd.includes(row.id))}\n />\n </Box>\n )}\n </ResponseHandler>\n </Box>\n )}\n </form>\n </FormProvider>\n </ResponseHandler>\n );\n}, {\n defaultTitle: '',\n fullWidth: true,\n maxWidth: 'md',\n testId: 'AddCasesToEventDialog',\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,IAAa,MAAmD,E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AAE,2EAA2E,EAAE,eAAe,EAAa,OAAO,CAAC,GACnH,EAAU,KAAK,WAAW,EAAa,UACtC,kBAAC,GAAD,EAAA,UACG,EAAE,uFAAuF,EAAE,wBAAwB,EAAU,KAAK,SAAS,EAAa,OAAO,CAAC,EAC9J,CAAA,CAEG,EAAA,CAAA;QACP,CAAA;OACJ,CAAA;OAEN,EAAa,WAAW,KACvB,kBAAC,GAAD;QACE,IAAI,EACF,SAAS,EACX;QAEA,UAAA,kBAAC,GAAD;SAAO,UAAU;SACf,UAAA,kBAAC,GAAD,EAAA,UACG,EAAE,8DAA8D,EACvD,CAAA;QACP,CAAA;OACJ,CAAA;OAEN,EAAa,SAAS,KACrB,kBAAC,GAAD;QACE,IAAI,EACF,SAAS,EACX;QAEA,UAAA,kBAAC,IAAD,EACE,OAAO,EAAU,KAAK,QAAO,MAAO,EAAa,SAAS,EAAI,EAAE,CAAC,EAClE,CAAA;OACE,CAAA;MAEQ;;IACd,CAAA,CAEH;;EACM,CAAA;CACC,CAAA;AAErB,GAAG;CACD,cAAc;CACd,WAAW;CACX,UAAU;CACV,QAAQ;AACV,CAAC"}
@@ -3,8 +3,8 @@ import { o as t } from "./index.esm.js";
3
3
  import { t as n } from "./yup.js";
4
4
  import { useCallback as r, useEffect as i, useMemo as a } from "react";
5
5
  import { jsx as o } from "react/jsx-runtime";
6
- import { GenericForm as s } from "@gen-epix/ui-form/components/helpers/GenericForm";
7
- import { FormUtil as c } from "@gen-epix/ui-form/utils/FormUtil";
6
+ import { GenericForm as s } from "@gen-epix/ui-core-form/components/helpers/GenericForm";
7
+ import { FormUtil as c } from "@gen-epix/ui-core-form/utils/FormUtil";
8
8
  //#region src/components/ui/CaseContentForm/CaseContentForm.tsx
9
9
  var l = ({ caseContent: l, caseId: u, completeCaseType: d, enabledColIds: f, formId: p, onSubmit: m }) => {
10
10
  let h = a(() => e.createYupSchema({ completeCaseType: d }), [d]), g = t({ resolver: n(h) }), { handleSubmit: _, reset: v, setValue: y } = g, b = r((e) => {
@@ -1 +1 @@
1
- {"version":3,"file":"CaseContentForm.js","names":[],"sources":["../../src/components/ui/CaseContentForm/CaseContentForm.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useForm } from 'react-hook-form';\nimport type {\n CaseDbCase,\n CaseDbCompleteCaseType,\n} from '@gen-epix/api-casedb';\nimport { GenericForm } from '@gen-epix/ui-form/components/helpers/GenericForm';\nimport { FormUtil } from '@gen-epix/ui-form/utils/FormUtil';\n\nimport { CaseTypeFormUtil } from '../../../utils/CaseTypeFormUtil';\n\nexport type CaseContentFormProps = {\n readonly caseContent: CaseDbCase['content'];\n readonly caseId: string;\n readonly completeCaseType: CaseDbCompleteCaseType;\n readonly enabledColIds: string[];\n readonly formId: string;\n readonly onSubmit: (caseId: string, content: CaseDbCase['content']) => void;\n};\n\nexport const CaseContentForm = ({ caseContent, caseId, completeCaseType, enabledColIds, formId, onSubmit }: CaseContentFormProps) => {\n const schema = useMemo(() => CaseTypeFormUtil.createYupSchema({ completeCaseType }), [completeCaseType]);\n\n const formMethods = useForm<CaseDbCase['content']>({ resolver: yupResolver(schema) });\n const { handleSubmit, reset, setValue } = formMethods;\n\n const onClearGroupFields = useCallback((fieldNames: string[]) => {\n fieldNames.forEach(name => {\n setValue(name, null);\n });\n }, [setValue]);\n\n const { fieldDefinitions, groupDefinitions } = useMemo(() => {\n return CaseTypeFormUtil.createFormDefinitions({ completeCaseType, enabledColIds, onClearGroupFields });\n }, [completeCaseType, onClearGroupFields, enabledColIds]);\n\n\n const onFormSubmit = useCallback((content: { [key: string]: string }) => {\n if (caseId) {\n onSubmit(caseId, FormUtil.createStringValuesFromFormValues(fieldDefinitions, content));\n }\n }, [caseId, fieldDefinitions, onSubmit]);\n const values = useMemo<CaseDbCase['content']>(() => FormUtil.createFormValues(fieldDefinitions, caseContent), [fieldDefinitions, caseContent]);\n\n useEffect(() => {\n reset(values);\n }, [reset, values]);\n\n return (\n <GenericForm<CaseDbCase['content']>\n formFieldDefinitions={fieldDefinitions}\n formGroupDefinitions={groupDefinitions}\n formId={formId}\n formMethods={formMethods}\n onSubmit={handleSubmit(onFormSubmit)}\n schema={schema}\n />\n );\n};\n"],"mappings":";;;;;;;;AAyBA,IAAa,KAAmB,EAAE,gBAAa,WAAQ,qBAAkB,kBAAe,WAAQ,kBAAqC;CACnI,IAAM,IAAS,QAAc,EAAiB,gBAAgB,EAAE,oBAAiB,CAAC,GAAG,CAAC,CAAgB,CAAC,GAEjG,IAAc,EAA+B,EAAE,UAAU,EAAY,CAAM,EAAE,CAAC,GAC9E,EAAE,iBAAc,UAAO,gBAAa,GAEpC,IAAqB,GAAa,MAAyB;EAC/D,EAAW,SAAQ,MAAQ;GACzB,EAAS,GAAM,IAAI;EACrB,CAAC;CACH,GAAG,CAAC,CAAQ,CAAC,GAEP,EAAE,qBAAkB,wBAAqB,QACtC,EAAiB,sBAAsB;EAAE;EAAkB;EAAe;CAAmB,CAAC,GACpG;EAAC;EAAkB;EAAoB;CAAa,CAAC,GAGlD,IAAe,GAAa,MAAuC;EACvE,AAAI,KACF,EAAS,GAAQ,EAAS,iCAAiC,GAAkB,CAAO,CAAC;CAEzF,GAAG;EAAC;EAAQ;EAAkB;CAAQ,CAAC,GACjC,IAAS,QAAqC,EAAS,iBAAiB,GAAkB,CAAW,GAAG,CAAC,GAAkB,CAAW,CAAC;CAM7I,OAJA,QAAgB;EACd,EAAM,CAAM;CACd,GAAG,CAAC,GAAO,CAAM,CAAC,GAGhB,kBAAC,GAAD;EACE,sBAAsB;EACtB,sBAAsB;EACd;EACK;EACb,UAAU,EAAa,CAAY;EAC3B;CACT,CAAA;AAEL"}
1
+ {"version":3,"file":"CaseContentForm.js","names":[],"sources":["../../src/components/ui/CaseContentForm/CaseContentForm.tsx"],"sourcesContent":["import {\n useCallback,\n useEffect,\n useMemo,\n} from 'react';\nimport { yupResolver } from '@hookform/resolvers/yup';\nimport { useForm } from 'react-hook-form';\nimport type {\n CaseDbCase,\n CaseDbCompleteCaseType,\n} from '@gen-epix/api-casedb';\nimport { GenericForm } from '@gen-epix/ui-core-form/components/helpers/GenericForm';\nimport { FormUtil } from '@gen-epix/ui-core-form/utils/FormUtil';\n\nimport { CaseTypeFormUtil } from '../../../utils/CaseTypeFormUtil';\n\nexport type CaseContentFormProps = {\n readonly caseContent: CaseDbCase['content'];\n readonly caseId: string;\n readonly completeCaseType: CaseDbCompleteCaseType;\n readonly enabledColIds: string[];\n readonly formId: string;\n readonly onSubmit: (caseId: string, content: CaseDbCase['content']) => void;\n};\n\nexport const CaseContentForm = ({ caseContent, caseId, completeCaseType, enabledColIds, formId, onSubmit }: CaseContentFormProps) => {\n const schema = useMemo(() => CaseTypeFormUtil.createYupSchema({ completeCaseType }), [completeCaseType]);\n\n const formMethods = useForm<CaseDbCase['content']>({ resolver: yupResolver(schema) });\n const { handleSubmit, reset, setValue } = formMethods;\n\n const onClearGroupFields = useCallback((fieldNames: string[]) => {\n fieldNames.forEach(name => {\n setValue(name, null);\n });\n }, [setValue]);\n\n const { fieldDefinitions, groupDefinitions } = useMemo(() => {\n return CaseTypeFormUtil.createFormDefinitions({ completeCaseType, enabledColIds, onClearGroupFields });\n }, [completeCaseType, onClearGroupFields, enabledColIds]);\n\n\n const onFormSubmit = useCallback((content: { [key: string]: string }) => {\n if (caseId) {\n onSubmit(caseId, FormUtil.createStringValuesFromFormValues(fieldDefinitions, content));\n }\n }, [caseId, fieldDefinitions, onSubmit]);\n const values = useMemo<CaseDbCase['content']>(() => FormUtil.createFormValues(fieldDefinitions, caseContent), [fieldDefinitions, caseContent]);\n\n useEffect(() => {\n reset(values);\n }, [reset, values]);\n\n return (\n <GenericForm<CaseDbCase['content']>\n formFieldDefinitions={fieldDefinitions}\n formGroupDefinitions={groupDefinitions}\n formId={formId}\n formMethods={formMethods}\n onSubmit={handleSubmit(onFormSubmit)}\n schema={schema}\n />\n );\n};\n"],"mappings":";;;;;;;;AAyBA,IAAa,KAAmB,EAAE,gBAAa,WAAQ,qBAAkB,kBAAe,WAAQ,kBAAqC;CACnI,IAAM,IAAS,QAAc,EAAiB,gBAAgB,EAAE,oBAAiB,CAAC,GAAG,CAAC,CAAgB,CAAC,GAEjG,IAAc,EAA+B,EAAE,UAAU,EAAY,CAAM,EAAE,CAAC,GAC9E,EAAE,iBAAc,UAAO,gBAAa,GAEpC,IAAqB,GAAa,MAAyB;EAC/D,EAAW,SAAQ,MAAQ;GACzB,EAAS,GAAM,IAAI;EACrB,CAAC;CACH,GAAG,CAAC,CAAQ,CAAC,GAEP,EAAE,qBAAkB,wBAAqB,QACtC,EAAiB,sBAAsB;EAAE;EAAkB;EAAe;CAAmB,CAAC,GACpG;EAAC;EAAkB;EAAoB;CAAa,CAAC,GAGlD,IAAe,GAAa,MAAuC;EACvE,AAAI,KACF,EAAS,GAAQ,EAAS,iCAAiC,GAAkB,CAAO,CAAC;CAEzF,GAAG;EAAC;EAAQ;EAAkB;CAAQ,CAAC,GACjC,IAAS,QAAqC,EAAS,iBAAiB,GAAkB,CAAW,GAAG,CAAC,GAAkB,CAAW,CAAC;CAM7I,OAJA,QAAgB;EACd,EAAM,CAAM;CACd,GAAG,CAAC,GAAO,CAAM,CAAC,GAGhB,kBAAC,GAAD;EACE,sBAAsB;EACtB,sBAAsB;EACd;EACK;EACb,UAAU,EAAa,CAAY;EAC3B;CACT,CAAA;AAEL"}
@@ -4,12 +4,12 @@ import { CaseTypeUtil as i } from "../utils/CaseTypeUtil/index.js";
4
4
  import { CASEDB_QUERY_KEY as a } from "../constants/query.js";
5
5
  import { CaseUtil as o } from "../utils/CaseUtil/index.js";
6
6
  import { CaseDbCaseApi as s, CaseDbLogLevel as c } from "@gen-epix/api-casedb";
7
- import { QueryClientService as l } from "@gen-epix/ui/classes/services/QueryClientService";
7
+ import { QueryClientService as l } from "@gen-epix/ui-client-common/classes/services/QueryClientService";
8
8
  import { StringUtil as u } from "@gen-epix/ui-core/utils/StringUtil";
9
9
  import { DATE_FORMAT as d } from "@gen-epix/ui-core/constants/date";
10
- import { ConfigService as f } from "@gen-epix/ui/classes/services/ConfigService";
11
- import { NotificationService as p } from "@gen-epix/ui/classes/services/NotificationService";
12
- import { LogService as m } from "@gen-epix/ui/classes/services/LogService";
10
+ import { ConfigService as f } from "@gen-epix/ui-client-common/classes/services/ConfigService";
11
+ import { NotificationService as p } from "@gen-epix/ui-client-common/classes/services/NotificationService";
12
+ import { LogService as m } from "@gen-epix/ui-client-common/classes/services/LogService";
13
13
  import { DownloadUtil as h } from "@gen-epix/ui-core/utils/DownloadUtil";
14
14
  //#region ../../node_modules/.pnpm/write-excel-file@4.1.1/node_modules/write-excel-file/modules/zip/zipToArrayBuffer.js
15
15
  function g(e) {
@@ -330,7 +330,7 @@ function Se(e) {
330
330
  }
331
331
  //#endregion
332
332
  //#region ../../node_modules/.pnpm/write-excel-file@4.1.1/node_modules/write-excel-file/modules/xlsx/helpers/convertDateToSerialNumber.js
333
- var Ce = 25569, we = 3600 * 1e3 * 24;
333
+ var Ce = 25569, we = 864e5;
334
334
  function Te(e) {
335
335
  return e.getTime() / we + Ce;
336
336
  }
@@ -894,7 +894,7 @@ function U(e, t) {
894
894
  function Tt(e) {
895
895
  (arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}).isDefaultGenericFont;
896
896
  var t = e.fontFamily, n = e.fontSize, r = e.fontWeight, i = e.fontStyle, a = e.textDecoration, o = e.textColor, s = "<font>";
897
- return t && (s += `<name val="${j(t)}"/>`), typeof n == "number" && (s += `<sz val="${n}"/>`), s += "<family val=\"2\"/>", t || typeof n == "number" || (s += "<scheme val=\"minor\"/>"), r === "bold" && (s += "<b/>"), i === "italic" && (s += "<i/>"), a && (a.strikethrough && (s += "<strike/>"), a.underline ? s += "<u/>" : a.doubleUnderline && (s += "<u val=\"double\"/>")), o ? s += `<color rgb="${j(H(o))}"/>` : s += "<color theme=\"1\"/>", s += "</font>", s;
897
+ return t && (s += `<name val="${j(t)}"/>`), typeof n == "number" && (s += `<sz val="${n}"/>`), s += "<family val=\"2\"/>", t || typeof n == "number" || (s += "<scheme val=\"minor\"/>"), r === "bold" && (s += "<b/>"), i === "italic" && (s += "<i/>"), a && (a.strikethrough && (s += "<strike/>"), a.underline ? s += "<u/>" : a.doubleUnderline && (s += "<u val=\"double\"/>")), s += o ? `<color rgb="${j(H(o))}"/>` : "<color theme=\"1\"/>", s += "</font>", s;
898
898
  }
899
899
  //#endregion
900
900
  //#region ../../node_modules/.pnpm/write-excel-file@4.1.1/node_modules/write-excel-file/modules/xlsx/helpers/getAlignmentXml.js
@@ -1128,7 +1128,7 @@ function Rt(e) {
1128
1128
  f.closingTagStartIndex = p[0], f.closingTagEndIndex = p[1];
1129
1129
  }
1130
1130
  if (a.push(f), r) break;
1131
- f.selfClosingTag ? i.lastIndex = f.openingTagEndIndex + 1 : i.lastIndex = f.closingTagEndIndex + 1;
1131
+ i.lastIndex = f.selfClosingTag ? f.openingTagEndIndex + 1 : f.closingTagEndIndex + 1;
1132
1132
  }
1133
1133
  return a;
1134
1134
  }
@@ -1137,9 +1137,10 @@ function zt(e, t, n) {
1137
1137
  r.lastIndex = t;
1138
1138
  for (var i = 0, a; (a = r.exec(e)) !== null;) {
1139
1139
  var o = a[0];
1140
- if (a[1]) if (i > 0) i--;
1141
- else return [a.index, a.index + o.length - 1];
1142
- else i++;
1140
+ if (a[1]) {
1141
+ if (i > 0) i--;
1142
+ else return [a.index, a.index + o.length - 1];
1143
+ } else i++;
1143
1144
  }
1144
1145
  }
1145
1146
  function Bt(e) {
@@ -2108,30 +2109,34 @@ function Cr(e, t) {
2108
2109
  if (!t) throw Error(`File \`content\` not specified: ${e}`);
2109
2110
  }
2110
2111
  function wr(e, t, n) {
2111
- if (Array.isArray(e)) if (e.length === 0 || Array.isArray(e[0])) {
2112
- if (Hn(e), Array.isArray(e[0]) && e.length > 0 && Array.isArray(e[0][0])) throw Error("In order to write multiple sheets, pass an array of sheet objects");
2113
- return {
2114
- sheets: [{
2115
- data: e,
2112
+ if (Array.isArray(e)) {
2113
+ if (e.length === 0 || Array.isArray(e[0])) {
2114
+ if (Hn(e), Array.isArray(e[0]) && e.length > 0 && Array.isArray(e[0][0])) throw Error("In order to write multiple sheets, pass an array of sheet objects");
2115
+ return {
2116
+ sheets: [{
2117
+ data: e,
2118
+ options: t || {}
2119
+ }],
2120
+ options: n || {}
2121
+ };
2122
+ }
2123
+ if (B(e[0])) {
2124
+ if (B(t) && Array.isArray(t.schema)) throw Error("`schema` parameter was removed, use `columns` parameter instead");
2125
+ return B(t) && Array.isArray(t.columns) ? wr(Qn(e, t.columns), t, n) : {
2126
+ sheets: e.map(function(e) {
2127
+ var t = e.data, n = pr(e, cr);
2128
+ if (!t) throw Error("`data` property is required for each sheet");
2129
+ return Hn(t), {
2130
+ data: t,
2131
+ options: n || {}
2132
+ };
2133
+ }),
2116
2134
  options: t || {}
2117
- }],
2118
- options: n || {}
2119
- };
2120
- } else if (B(e[0])) {
2121
- if (B(t) && Array.isArray(t.schema)) throw Error("`schema` parameter was removed, use `columns` parameter instead");
2122
- return B(t) && Array.isArray(t.columns) ? wr(Qn(e, t.columns), t, n) : {
2123
- sheets: e.map(function(e) {
2124
- var t = e.data, n = pr(e, cr);
2125
- if (!t) throw Error("`data` property is required for each sheet");
2126
- return Hn(t), {
2127
- data: t,
2128
- options: n || {}
2129
- };
2130
- }),
2131
- options: t || {}
2132
- };
2133
- } else throw Error("Invalid first argument: must be either sheet data — an array of arrays — or an array of sheet objects");
2134
- else throw Error("Invalid first argument: must be an array");
2135
+ };
2136
+ }
2137
+ throw Error("Invalid first argument: must be either sheet data — an array of arrays — or an array of sheet objects");
2138
+ }
2139
+ throw Error("Invalid first argument: must be an array");
2135
2140
  }
2136
2141
  function Tr(e) {
2137
2142
  return e.map(function(e, t) {
@@ -2201,8 +2206,8 @@ function Nr(e, t, n) {
2201
2206
  //#region src/utils/CaseDbDownloadUtil/CaseDbDownloadUtil.ts
2202
2207
  var Pr = class e {
2203
2208
  static downloadAsCsv(n, r, i, a) {
2204
- let o = t([e.getColumnHeadersForExport(r, i), ...e.getRowsForExport(n, r, i)], { defaultEncoding: "utf-8" }), s = `${e.getExportFileName(a`Line list`, i, a)}.csv`;
2205
- h.createDownloadUrl(`data:text/csv;base64,${btoa(o)}`, s);
2209
+ let o = [e.getColumnHeadersForExport(r, i), ...e.getRowsForExport(n, r, i)], s = t(o, { defaultEncoding: "utf-8" }), c = `${e.getExportFileName(a`Line list`, i, a)}.csv`;
2210
+ h.createDownloadUrl(`data:text/csv;base64,${btoa(s)}`, c);
2206
2211
  }
2207
2212
  static async downloadAsExcel(t, n, r, i) {
2208
2213
  let a = e.getColumnHeadersForExport(n, r), o = e.getRowsForExport(t, n, r), s = [a.map((e) => ({