synapse-react-client 4.0.38 → 4.0.41

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 (350) hide show
  1. package/dist/SWC.index.d.ts +1 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/aridhia-queries/useAridhiaQuery.d.ts +6 -2
  6. package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -1
  7. package/dist/aridhia-queries/useAridhiaQuery.js +3 -0
  8. package/dist/aridhia-queries/useAridhiaQuery.js.map +1 -1
  9. package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts +1 -0
  10. package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.d.ts.map +1 -1
  11. package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js +12 -12
  12. package/dist/components/AccessRequirement/ImposeRestrictionDialog/ImposeRestrictionDialog.js.map +1 -1
  13. package/dist/components/Aridhia/AridhiaAccessStatus.d.ts +2 -1
  14. package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
  15. package/dist/components/Aridhia/AridhiaAccessStatus.js +57 -31
  16. package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
  17. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts +12 -0
  18. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts.map +1 -0
  19. package/dist/components/Aridhia/AridhiaDarStatusPopover.js +56 -0
  20. package/dist/components/Aridhia/AridhiaDarStatusPopover.js.map +1 -0
  21. package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts.map +1 -1
  22. package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js +38 -30
  23. package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js.map +1 -1
  24. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +15 -14
  25. package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -1
  26. package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts +11 -0
  27. package/dist/components/Aridhia/RdcaDapEligibilityDialog.d.ts.map +1 -0
  28. package/dist/components/Aridhia/RdcaDapEligibilityDialog.js +37 -0
  29. package/dist/components/Aridhia/RdcaDapEligibilityDialog.js.map +1 -0
  30. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +2 -2
  31. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
  32. package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts +10 -0
  33. package/dist/components/Aridhia/aridhiaFairPortalUrls.d.ts.map +1 -0
  34. package/dist/components/Aridhia/aridhiaFairPortalUrls.js +11 -0
  35. package/dist/components/Aridhia/aridhiaFairPortalUrls.js.map +1 -0
  36. package/dist/components/Aridhia/rdcaDapConstants.d.ts +3 -0
  37. package/dist/components/Aridhia/rdcaDapConstants.d.ts.map +1 -0
  38. package/dist/components/Aridhia/rdcaDapConstants.js +6 -0
  39. package/dist/components/Aridhia/rdcaDapConstants.js.map +1 -0
  40. package/dist/components/Authentication/Constants.d.ts +4 -0
  41. package/dist/components/Authentication/Constants.d.ts.map +1 -1
  42. package/dist/components/Authentication/Constants.js +5 -2
  43. package/dist/components/Authentication/Constants.js.map +1 -1
  44. package/dist/components/Authentication/RecoveryCodeGrid.d.ts.map +1 -1
  45. package/dist/components/Authentication/RecoveryCodeGrid.js +8 -1
  46. package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
  47. package/dist/components/Authentication/RegenerateBackupCodesWarning.js +4 -1
  48. package/dist/components/Authentication/RegenerateBackupCodesWarning.js.map +1 -1
  49. package/dist/components/Authentication/TOTPForm.d.ts.map +1 -1
  50. package/dist/components/Authentication/TOTPForm.js +20 -18
  51. package/dist/components/Authentication/TOTPForm.js.map +1 -1
  52. package/dist/components/Authentication/TwoFactorBackupCodes.d.ts.map +1 -1
  53. package/dist/components/Authentication/TwoFactorBackupCodes.js +41 -12
  54. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  55. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  56. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +74 -71
  57. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  58. package/dist/components/DataExplorer/DataExplorer.css +1 -1
  59. package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
  60. package/dist/components/DataExplorer/DataExplorer.js +50 -50
  61. package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
  62. package/dist/components/DataExplorer/DataExplorer.module.js +16 -16
  63. package/dist/components/DataExplorer/DataExplorer.module.js.map +1 -1
  64. package/dist/components/DataExplorer/DataExplorer.module.scss +29 -6
  65. package/dist/components/DataGrid/columns/DateTimeColumn.d.ts +16 -7
  66. package/dist/components/DataGrid/columns/DateTimeColumn.d.ts.map +1 -1
  67. package/dist/components/DataGrid/columns/DateTimeColumn.js +79 -57
  68. package/dist/components/DataGrid/columns/DateTimeColumn.js.map +1 -1
  69. package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
  70. package/dist/components/DataGrid/components/ReorderColumnsDialog.js +43 -46
  71. package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
  72. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  73. package/dist/components/DataGrid/utils/columnFactory.js +11 -8
  74. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  75. package/dist/components/DatePicker/DatePicker.d.ts +10 -0
  76. package/dist/components/DatePicker/DatePicker.d.ts.map +1 -0
  77. package/dist/components/DatePicker/DatePicker.js +18 -0
  78. package/dist/components/DatePicker/DatePicker.js.map +1 -0
  79. package/dist/components/EntityCitation/EntityCitation.d.ts.map +1 -1
  80. package/dist/components/EntityCitation/EntityCitation.js +8 -5
  81. package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
  82. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts +11 -0
  83. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.d.ts.map +1 -0
  84. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js +61 -0
  85. package/dist/components/FormTemplateEditor/ChoiceOptionsEditor.js.map +1 -0
  86. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts +33 -0
  87. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -0
  88. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +187 -0
  89. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -0
  90. package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts +14 -0
  91. package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts.map +1 -0
  92. package/dist/components/FormTemplateEditor/FormTemplatePreview.js +83 -0
  93. package/dist/components/FormTemplateEditor/FormTemplatePreview.js.map +1 -0
  94. package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.d.ts +13 -0
  95. package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.d.ts.map +1 -0
  96. package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.js +33 -0
  97. package/dist/components/FormTemplateEditor/JsonSchemaBodyEditor.js.map +1 -0
  98. package/dist/components/FormTemplateEditor/formTemplateValidation.d.ts +32 -0
  99. package/dist/components/FormTemplateEditor/formTemplateValidation.d.ts.map +1 -0
  100. package/dist/components/FormTemplateEditor/formTemplateValidation.js +75 -0
  101. package/dist/components/FormTemplateEditor/formTemplateValidation.js.map +1 -0
  102. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts +25 -0
  103. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts.map +1 -0
  104. package/dist/components/FormTemplateEditor/schemaFieldUtils.js +66 -0
  105. package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -0
  106. package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts +28 -0
  107. package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -0
  108. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js +39 -0
  109. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -0
  110. package/dist/components/FormTemplateEditor/utils.d.ts +21 -0
  111. package/dist/components/FormTemplateEditor/utils.d.ts.map +1 -0
  112. package/dist/components/FormTemplateEditor/utils.js +27 -0
  113. package/dist/components/FormTemplateEditor/utils.js.map +1 -0
  114. package/dist/components/HasAccess/AccessIcon.d.ts +3 -1
  115. package/dist/components/HasAccess/AccessIcon.d.ts.map +1 -1
  116. package/dist/components/HasAccess/AccessIcon.js +11 -1
  117. package/dist/components/HasAccess/AccessIcon.js.map +1 -1
  118. package/dist/components/JsonSchemaForm/CustomFormContext.d.ts +1 -1
  119. package/dist/components/JsonSchemaForm/CustomFormContext.d.ts.map +1 -1
  120. package/dist/components/JsonSchemaForm/JsonSchemaForm.css +1 -1
  121. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js +1 -1
  122. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js.map +1 -1
  123. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.scss +6 -1
  124. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.d.ts.map +1 -1
  125. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js +4 -0
  126. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
  127. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +2 -1
  128. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
  129. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +81 -53
  130. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
  131. package/dist/components/ProjectInfo/ProjectInfo.d.ts.map +1 -1
  132. package/dist/components/ProjectInfo/ProjectInfo.js +3 -2
  133. package/dist/components/ProjectInfo/ProjectInfo.js.map +1 -1
  134. package/dist/components/QueryBuilder/FilterConditionRow.css +1 -0
  135. package/dist/components/QueryBuilder/FilterConditionRow.d.ts +8 -0
  136. package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -0
  137. package/dist/components/QueryBuilder/FilterConditionRow.js +260 -0
  138. package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -0
  139. package/dist/components/QueryBuilder/FilterConditionRow.module.js +16 -0
  140. package/dist/components/QueryBuilder/FilterConditionRow.module.js.map +1 -0
  141. package/dist/components/QueryBuilder/FilterConditionRow.module.scss +101 -0
  142. package/dist/components/QueryBuilder/FilterGroupNode.css +1 -0
  143. package/dist/components/QueryBuilder/FilterGroupNode.d.ts +11 -0
  144. package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -0
  145. package/dist/components/QueryBuilder/FilterGroupNode.js +134 -0
  146. package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -0
  147. package/dist/components/QueryBuilder/FilterGroupNode.module.js +16 -0
  148. package/dist/components/QueryBuilder/FilterGroupNode.module.js.map +1 -0
  149. package/dist/components/QueryBuilder/FilterGroupNode.module.scss +92 -0
  150. package/dist/components/QueryBuilder/QBDragHandle.d.ts +10 -0
  151. package/dist/components/QueryBuilder/QBDragHandle.d.ts.map +1 -0
  152. package/dist/components/QueryBuilder/QBDragHandle.js +22 -0
  153. package/dist/components/QueryBuilder/QBDragHandle.js.map +1 -0
  154. package/dist/components/QueryBuilder/QueryBuilderControls.css +1 -0
  155. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts +21 -0
  156. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -0
  157. package/dist/components/QueryBuilder/QueryBuilderControls.js +143 -0
  158. package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -0
  159. package/dist/components/QueryBuilder/QueryBuilderControls.module.js +17 -0
  160. package/dist/components/QueryBuilder/QueryBuilderControls.module.js.map +1 -0
  161. package/dist/components/QueryBuilder/QueryBuilderControls.module.scss +79 -0
  162. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +39 -0
  163. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -0
  164. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js +19 -0
  165. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -0
  166. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +14 -0
  167. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -0
  168. package/dist/components/QueryBuilder/qbTreeToReadable.js +89 -0
  169. package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -0
  170. package/dist/components/QueryBuilder/queryBuilderDnd.d.ts +27 -0
  171. package/dist/components/QueryBuilder/queryBuilderDnd.d.ts.map +1 -0
  172. package/dist/components/QueryBuilder/queryBuilderDnd.js +41 -0
  173. package/dist/components/QueryBuilder/queryBuilderDnd.js.map +1 -0
  174. package/dist/components/QueryBuilder/queryBuilderDrag.css +1 -0
  175. package/dist/components/QueryBuilder/queryBuilderDrag.module.js +8 -0
  176. package/dist/components/QueryBuilder/queryBuilderDrag.module.js.map +1 -0
  177. package/dist/components/QueryBuilder/queryBuilderDrag.module.scss +12 -0
  178. package/dist/components/QueryBuilder/queryBuilderId.d.ts +2 -0
  179. package/dist/components/QueryBuilder/queryBuilderId.d.ts.map +1 -0
  180. package/dist/components/QueryBuilder/queryBuilderId.js +9 -0
  181. package/dist/components/QueryBuilder/queryBuilderId.js.map +1 -0
  182. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +24 -0
  183. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -0
  184. package/dist/components/QueryBuilder/queryBuilderMetadata.js +91 -0
  185. package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -0
  186. package/dist/components/QueryBuilder/queryBuilderOperations.d.ts +71 -0
  187. package/dist/components/QueryBuilder/queryBuilderOperations.d.ts.map +1 -0
  188. package/dist/components/QueryBuilder/queryBuilderOperations.js +203 -0
  189. package/dist/components/QueryBuilder/queryBuilderOperations.js.map +1 -0
  190. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +3 -2
  191. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -1
  192. package/dist/components/QueryBuilder/queryBuilderTranslation.js +82 -84
  193. package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
  194. package/dist/components/QueryBuilder/useQBCombinedSql.d.ts +11 -0
  195. package/dist/components/QueryBuilder/useQBCombinedSql.d.ts.map +1 -0
  196. package/dist/components/QueryBuilder/useQBCombinedSql.js +29 -0
  197. package/dist/components/QueryBuilder/useQBCombinedSql.js.map +1 -0
  198. package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts +18 -0
  199. package/dist/components/QueryBuilder/useQBFacetSourceMetadata.d.ts.map +1 -0
  200. package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js +27 -0
  201. package/dist/components/QueryBuilder/useQBFacetSourceMetadata.js.map +1 -0
  202. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +14 -1
  203. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
  204. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +183 -119
  205. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  206. package/dist/components/RssFeedCards/RssFeedCards.d.ts +1 -0
  207. package/dist/components/RssFeedCards/RssFeedCards.d.ts.map +1 -1
  208. package/dist/components/RssFeedCards/RssFeedCards.js +11 -11
  209. package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
  210. package/dist/components/SynapseChat/SynapseChat.d.ts +7 -1
  211. package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
  212. package/dist/components/SynapseChat/SynapseChat.js +76 -71
  213. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  214. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts +3 -1
  215. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
  216. package/dist/components/SynapseChat/SynapsePortalChatDialog.js +24 -13
  217. package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
  218. package/dist/components/SynapseChat/portalChatSessionStorage.d.ts +23 -0
  219. package/dist/components/SynapseChat/portalChatSessionStorage.d.ts.map +1 -0
  220. package/dist/components/SynapseChat/portalChatSessionStorage.js +29 -0
  221. package/dist/components/SynapseChat/portalChatSessionStorage.js.map +1 -0
  222. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts +6 -0
  223. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
  224. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +92 -79
  225. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
  226. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +3 -4
  227. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
  228. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +2 -2
  229. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
  230. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +1 -1
  231. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
  232. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
  233. package/dist/components/entity/page/action_menu/EntityActionMenu.js +9 -2
  234. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  235. package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts +0 -1
  236. package/dist/components/entity/page/title_bar/EntityPageTitleBar.d.ts.map +1 -1
  237. package/dist/components/entity/page/title_bar/EntityPageTitleBar.js +36 -37
  238. package/dist/components/entity/page/title_bar/EntityPageTitleBar.js.map +1 -1
  239. package/dist/components/menu/ComplexMenu.js +1 -1
  240. package/dist/components/menu/ComplexMenu.js.map +1 -1
  241. package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
  242. package/dist/components/menu/DropdownMenu.js +4 -0
  243. package/dist/components/menu/DropdownMenu.js.map +1 -1
  244. package/dist/components/styled/LeftRightPanel.d.ts.map +1 -1
  245. package/dist/components/styled/LeftRightPanel.js +19 -2
  246. package/dist/components/styled/LeftRightPanel.js.map +1 -1
  247. package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts +10 -0
  248. package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.d.ts.map +1 -0
  249. package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js +20 -0
  250. package/dist/features/entity/metadata-task/hooks/useMarkCurationTaskInProgress.js.map +1 -0
  251. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
  252. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +29 -20
  253. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
  254. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +16 -0
  255. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -0
  256. package/dist/mocks/accessRequirement/mockFormTemplates.js +63 -0
  257. package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -0
  258. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts +7 -0
  259. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.d.ts.map +1 -0
  260. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js +47 -0
  261. package/dist/mocks/accessRequirement/mockJsonSchemaAccessRequirements.js.map +1 -0
  262. package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts +27 -0
  263. package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -0
  264. package/dist/mocks/accessRequirement/mockJsonSchemas.js +83 -0
  265. package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -0
  266. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +18 -1
  267. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
  268. package/dist/mocks/msw/handlers/aridhiaHandlers.js +39 -33
  269. package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -1
  270. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts +41 -14
  271. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts.map +1 -1
  272. package/dist/mocks/msw/handlers/asyncJobHandlers.js +53 -44
  273. package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
  274. package/dist/mocks/msw/handlers/chatHandlers.d.ts.map +1 -1
  275. package/dist/mocks/msw/handlers/chatHandlers.js +19 -13
  276. package/dist/mocks/msw/handlers/chatHandlers.js.map +1 -1
  277. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts +5 -0
  278. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -0
  279. package/dist/mocks/msw/handlers/formTemplateHandlers.js +65 -0
  280. package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -0
  281. package/dist/mocks/msw/handlers/schemaHandlers.d.ts +2 -1
  282. package/dist/mocks/msw/handlers/schemaHandlers.d.ts.map +1 -1
  283. package/dist/mocks/msw/handlers/schemaHandlers.js +13 -7
  284. package/dist/mocks/msw/handlers/schemaHandlers.js.map +1 -1
  285. package/dist/mocks/msw/handlers/searchQueryHandlers.d.ts.map +1 -1
  286. package/dist/mocks/msw/handlers/searchQueryHandlers.js +24 -18
  287. package/dist/mocks/msw/handlers/searchQueryHandlers.js.map +1 -1
  288. package/dist/mocks/msw/handlers/tableQueryHandlers.d.ts.map +1 -1
  289. package/dist/mocks/msw/handlers/tableQueryHandlers.js +35 -16
  290. package/dist/mocks/msw/handlers/tableQueryHandlers.js.map +1 -1
  291. package/dist/mocks/msw/handlers.d.ts.map +1 -1
  292. package/dist/mocks/msw/handlers.js +49 -47
  293. package/dist/mocks/msw/handlers.js.map +1 -1
  294. package/dist/style/abstracts/_cssVariables.scss +7 -0
  295. package/dist/style/components/_query-wrapper-plot-nav.scss +9 -0
  296. package/dist/style/main.css +1 -1
  297. package/dist/synapse-queries/KeyFactory.d.ts +5 -1
  298. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  299. package/dist/synapse-queries/KeyFactory.js +14 -2
  300. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  301. package/dist/synapse-queries/chat/useChat.d.ts.map +1 -1
  302. package/dist/synapse-queries/chat/useChat.js +2 -4
  303. package/dist/synapse-queries/chat/useChat.js.map +1 -1
  304. package/dist/synapse-queries/dataaccess/index.d.ts +1 -0
  305. package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
  306. package/dist/synapse-queries/dataaccess/index.js +4 -3
  307. package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts +41 -0
  308. package/dist/synapse-queries/dataaccess/useFormTemplate.d.ts.map +1 -0
  309. package/dist/synapse-queries/dataaccess/useFormTemplate.js +63 -0
  310. package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -0
  311. package/dist/synapse-queries/index.js +186 -180
  312. package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts +9 -0
  313. package/dist/synapse-queries/jsonschema/useCreateJsonSchema.d.ts.map +1 -0
  314. package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js +22 -0
  315. package/dist/synapse-queries/jsonschema/useCreateJsonSchema.js.map +1 -0
  316. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  317. package/dist/testutils/vitest.setup.js +18 -9
  318. package/dist/testutils/vitest.setup.js.map +1 -1
  319. package/dist/tsconfig.build.tsbuildinfo +1 -1
  320. package/dist/utils/APIConstants.d.ts +1 -0
  321. package/dist/utils/APIConstants.d.ts.map +1 -1
  322. package/dist/utils/APIConstants.js +2 -2
  323. package/dist/utils/APIConstants.js.map +1 -1
  324. package/dist/utils/appendFinalQueryParamKey.d.ts.map +1 -1
  325. package/dist/utils/appendFinalQueryParamKey.js +4 -1
  326. package/dist/utils/appendFinalQueryParamKey.js.map +1 -1
  327. package/dist/utils/functions/ArrayUtils.d.ts +3 -0
  328. package/dist/utils/functions/ArrayUtils.d.ts.map +1 -1
  329. package/dist/utils/functions/ArrayUtils.js +7 -1
  330. package/dist/utils/functions/ArrayUtils.js.map +1 -1
  331. package/dist/utils/jsonschema/generateDataAccessSchema.d.ts +26 -0
  332. package/dist/utils/jsonschema/generateDataAccessSchema.d.ts.map +1 -0
  333. package/dist/utils/jsonschema/generateDataAccessSchema.js +28 -0
  334. package/dist/utils/jsonschema/generateDataAccessSchema.js.map +1 -0
  335. package/dist/utils/jsonschema/getType.d.ts.map +1 -1
  336. package/dist/utils/jsonschema/getType.js +4 -1
  337. package/dist/utils/jsonschema/getType.js.map +1 -1
  338. package/dist/utils/jsonschema/submissionContext.d.ts +86 -0
  339. package/dist/utils/jsonschema/submissionContext.d.ts.map +1 -0
  340. package/dist/utils/jsonschema/submissionContext.js +186 -0
  341. package/dist/utils/jsonschema/submissionContext.js.map +1 -0
  342. package/package.json +10 -8
  343. package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts +0 -6
  344. package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.d.ts.map +0 -1
  345. package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js +0 -32
  346. package/dist/components/AccessRequirement/AddConditionsForUseButton/AddConditionsForUseButton.js.map +0 -1
  347. package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts +0 -9
  348. package/dist/components/entity/page/title_bar/TitleBarProperties.d.ts.map +0 -1
  349. package/dist/components/entity/page/title_bar/TitleBarProperties.js +0 -24
  350. package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"TopLevelControls.js","names":[],"sources":["../../../../src/components/SynapseTable/TopLevelControls/TopLevelControls.tsx"],"sourcesContent":["import React from 'react'\nimport { useGetEntity } from '@/synapse-queries'\nimport { SQL_EDITOR } from '@/utils/SynapseConstants'\nimport { Button, Divider, Tooltip, Typography } from '@mui/material'\nimport {\n QueryBundleRequest,\n QueryResultBundle,\n Row,\n Table,\n} from '@sage-bionetworks/synapse-types'\nimport { useAtomValue } from 'jotai'\nimport { cloneDeep } from 'lodash-es'\nimport { ReactNode, useState } from 'react'\nimport IconSvg from '../../IconSvg'\nimport MissingQueryResultsWarning from '../../MissingQueryResultsWarning/MissingQueryResultsWarning'\nimport { useQueryContext } from '../../QueryContext'\nimport { useQueryVisualizationContext } from '../../QueryVisualizationWrapper'\nimport {\n isRowSelectionVisibleAtom,\n useHasSelectedRowsAtomValue,\n useSelectedRowsAtomValue,\n} from '../../QueryWrapper/TableRowSelectionState'\nimport { useGetQueryMetadata } from '../../QueryWrapper/useGetQueryMetadata'\nimport { ElementWithTooltip } from '../../widgets/ElementWithTooltip'\nimport ExportToAnalysisPlatformDialog from '../export/ExportToAnalysisPlatformDialog'\nimport { RowSelectionControls } from '../RowSelection/RowSelectionControls'\nimport { ColumnSelection, DownloadOptions } from '../table-top'\nimport {\n getNumberOfResultsToInvokeAction,\n getNumberOfResultsToInvokeActionCopy,\n} from './TopLevelControlsUtils'\nimport { copyStringToClipboard } from '@/utils/functions/StringUtils'\nimport { CustomControlButton } from '../CustomControls/CustomControlButton'\nimport { useSynapseContext } from '@/utils'\nimport { SignInRequiredModal } from '@/components/SignInRequiredModal/SignInRequiredModal'\nimport { SEND_TO_ANALYSIS_PLATFORM_SIGN_IN_MESSAGE } from '../SynapseTableUtils'\n\nconst SEND_TO_ANALYSIS_PLATFORM_BUTTON_ID =\n 'SendToAnalysisPlatformTopLevelControlButton'\n\nexport type TopLevelControlsProps = {\n name?: string\n hideDownload?: boolean\n /** If true, the \"Add ... files to Download List\" option in the Download menu will be hidden */\n hideAddToDownloadListMenuItem?: boolean\n /** If true, the \"Programmatic Options\" option in the Download menu will be hidden */\n hideProgrammaticOptionsMenuItem?: boolean\n hideVisualizationsControl?: boolean\n hideFacetFilterControl?: boolean\n hideQueryCount?: boolean\n hideSqlEditorControl?: boolean\n customControls?: CustomControl[]\n showColumnSelection?: boolean\n cavaticaConnectAccountURL?: string\n remount?: () => void\n}\n\nexport type Control = {\n key: string\n icon: string\n tooltipText: string\n}\n\nexport type CustomControlCallbackData = {\n tableId: string\n queryMetadata: Omit<QueryResultBundle, 'queryResult'> | undefined\n selectedRows: Row[] | undefined\n refresh: () => void\n request?: QueryBundleRequest\n}\n\n// note, all custom controls should check for selected rows in the event (to support row selection)\nexport type CustomControl = {\n buttonText: string\n onClick: (event: CustomControlCallbackData) => void\n classNames?: string\n icon?: ReactNode\n buttonID?: string // optionally set the ID property of the element\n title?: string // optionally set the title for the custom control\n description?: string // optionally set the description for the custom control\n}\n\nconst TopLevelControls = (props: TopLevelControlsProps): React.ReactNode => {\n const [showLoginModal, setShowLoginModal] = useState(false)\n const { isAuthenticated } = useSynapseContext()\n\n const {\n name,\n showColumnSelection = false,\n hideDownload = false,\n hideAddToDownloadListMenuItem,\n hideProgrammaticOptionsMenuItem,\n hideVisualizationsControl = false,\n hideFacetFilterControl = false,\n hideQueryCount = false,\n hideSqlEditorControl = true,\n customControls,\n cavaticaConnectAccountURL,\n remount,\n } = props\n\n const {\n entityId,\n versionNumber,\n getCurrentQueryRequest,\n hasResettableFilters,\n } = useQueryContext()\n const { data: entity } = useGetEntity<Table>(entityId, versionNumber)\n const { data: queryMetadata } = useGetQueryMetadata()\n const isRowSelectionVisible = useAtomValue(isRowSelectionVisibleAtom)\n const selectedRows = useSelectedRowsAtomValue()\n const hasSelectedRows = useHasSelectedRowsAtomValue()\n\n const {\n setShowSearchBar,\n columnsToShowInTable,\n setColumnsToShowInTable,\n enabledExternalAnalysisPlatforms,\n setIsShowingExportToAnalysisPlatformModal,\n unitDescription,\n setShowDownloadConfirmation,\n showCopyToClipboard,\n hideSearchBarControl,\n setShowPlots,\n setShowSqlEditor,\n showFacetFilter,\n setShowFacetFilter,\n } = useQueryVisualizationContext()\n\n const showExportToAnalysisPlatformButton =\n enabledExternalAnalysisPlatforms.length > 0\n\n const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] =\n useState(false)\n\n /**\n * Handles the toggle of a column select, this will cause the table to\n * either show the column or hide depending on the prior state of the column\n */\n const toggleColumnSelection = (columnName: string) => {\n let columnsToShowInTableCopy = cloneDeep(columnsToShowInTable)\n if (columnsToShowInTableCopy.includes(columnName)) {\n columnsToShowInTableCopy = columnsToShowInTableCopy.filter(\n el => el !== columnName,\n )\n } else {\n columnsToShowInTableCopy.push(columnName)\n }\n setColumnsToShowInTable(columnsToShowInTableCopy)\n }\n\n const numberOfResultsToInvokeAction = getNumberOfResultsToInvokeAction(\n hasSelectedRows,\n selectedRows,\n queryMetadata?.queryCount,\n )\n const numberOfResultsToInvokeActionAsText =\n getNumberOfResultsToInvokeActionCopy(\n hasResettableFilters,\n hasSelectedRows,\n selectedRows,\n queryMetadata?.queryCount,\n unitDescription,\n )\n\n const queryCountDisplay =\n !hideQueryCount && queryMetadata?.queryCount !== undefined\n ? `(${queryMetadata.queryCount.toLocaleString()})`\n : null\n\n return (\n <div className={`TopLevelControls`} data-testid=\"TopLevelControls\">\n <div>\n <div className=\"TopLevelControls__querycount\">\n {name && (\n <>\n <Typography variant=\"sectionTitle\" role=\"heading\">\n {name} {queryCountDisplay}\n </Typography>\n {!hideQueryCount && entity && (\n <MissingQueryResultsWarning entity={entity} />\n )}\n </>\n )}\n {!hideFacetFilterControl && (\n <Button\n variant={'text'}\n onClick={() => setShowFacetFilter(value => !value)}\n startIcon={\n <IconSvg\n icon={showFacetFilter ? 'close' : 'filter'}\n wrap={false}\n />\n }\n sx={{\n ml: 2,\n fontWeight: 400,\n fontSize: '14px',\n textDecoration: 'none !important',\n }}\n >\n {showFacetFilter ? 'Hide' : 'Show'} filters\n </Button>\n )}\n </div>\n <div className=\"TopLevelControls__actions\">\n {showExportToAnalysisPlatformButton && (\n <>\n <Tooltip\n title={\n <>\n This action will send a reference to{' '}\n {hasSelectedRows\n ? 'each selected file'\n : 'every file in the current table'}{' '}\n to a chosen external analysis platform.{' '}\n {!hasSelectedRows && showFacetFilter && (\n <>\n You can change what is sent by applying filters using\n the controls in the sidebar.\n </>\n )}\n {hasSelectedRows && (\n <>\n You can change what is sent by selecting a different set\n of files.\n </>\n )}\n </>\n }\n >\n <Button\n variant=\"text\"\n disabled={!numberOfResultsToInvokeAction}\n onClick={() => {\n return isAuthenticated\n ? setIsShowingExportToAnalysisPlatformModal(true)\n : setShowLoginModal(true)\n }}\n id={SEND_TO_ANALYSIS_PLATFORM_BUTTON_ID}\n >\n Send {numberOfResultsToInvokeActionAsText} to Analysis\n Platform\n </Button>\n </Tooltip>\n <Divider orientation=\"vertical\" variant=\"middle\" flexItem />\n </>\n )}\n {showLoginModal && (\n <SignInRequiredModal\n onHide={() => setShowLoginModal(false)}\n content={SEND_TO_ANALYSIS_PLATFORM_SIGN_IN_MESSAGE}\n />\n )}\n {!hideSearchBarControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide Search Bar'}\n callbackFn={() => setShowSearchBar(value => !value)}\n darkTheme={true}\n icon={'search'}\n />\n )}\n {showCopyToClipboard && (\n <ElementWithTooltip\n tooltipText={\n hasRecentlyCopiedToClipboard\n ? 'Copied to clipboard'\n : 'Copy this search to the clipboard'\n }\n callbackFn={() => {\n copyStringToClipboard(window.location.href).then(() => {\n setHasRecentlyCopiedToClipboard(true)\n setTimeout(() => {\n setHasRecentlyCopiedToClipboard(false)\n }, 3000)\n })\n }}\n darkTheme={true}\n icon={'clipboard'}\n />\n )}\n {!hideVisualizationsControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide Visualizations'}\n callbackFn={() => setShowPlots(value => !value)}\n darkTheme={true}\n icon={'chart'}\n />\n )}\n {!hideDownload && (\n <DownloadOptions\n darkTheme={true}\n onDownloadFiles={() => setShowDownloadConfirmation(true)}\n hideAddToDownloadListMenuItem={hideAddToDownloadListMenuItem}\n hideProgrammaticOptionsMenuItem={hideProgrammaticOptionsMenuItem}\n />\n )}\n\n {!hideSqlEditorControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide the Advanced Query Editor'}\n callbackFn={() => setShowSqlEditor(value => !value)}\n darkTheme={true}\n icon={SQL_EDITOR}\n />\n )}\n\n {isRowSelectionVisible && (\n <RowSelectionControls\n customControls={customControls}\n remount={remount}\n />\n )}\n {!isRowSelectionVisible &&\n customControls &&\n customControls.length > 0 && (\n <>\n {customControls.map(customControl => {\n return (\n <CustomControlButton\n key={customControl.buttonText}\n variant=\"text\"\n callbackData={{\n tableId: entityId!,\n queryMetadata: queryMetadata,\n selectedRows,\n refresh: () => {\n if (remount) {\n remount()\n }\n },\n request: getCurrentQueryRequest(),\n }}\n control={customControl}\n startIcon={customControl.icon}\n />\n )\n })}\n </>\n )}\n {showColumnSelection && (\n <ColumnSelection\n headers={queryMetadata?.selectColumns}\n isColumnSelected={columnsToShowInTable}\n toggleColumnSelection={toggleColumnSelection}\n darkTheme={true}\n />\n )}\n <ExportToAnalysisPlatformDialog\n platformInstructionProps={{\n cavaticaConnectAccountURL: cavaticaConnectAccountURL,\n }}\n />\n </div>\n </div>\n </div>\n )\n}\n\nexport default TopLevelControls\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAM,IACJ,+CA4CI,KAAoB,MAAkD;CAC1E,IAAM,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,EAAE,uBAAoB,EAAkB,GAExC,EACJ,SACA,yBAAsB,IACtB,kBAAe,IACf,kCACA,oCACA,+BAA4B,IAC5B,4BAAyB,IACzB,oBAAiB,IACjB,0BAAuB,IACvB,mBACA,8BACA,eACE,GAEE,EACJ,aACA,mBACA,2BACA,4BACE,GAAgB,GACd,EAAE,MAAM,MAAW,EAAoB,GAAU,EAAa,GAC9D,EAAE,MAAM,MAAkB,EAAoB,GAC9C,IAAwB,EAAa,CAAyB,GAC9D,IAAe,EAAyB,GACxC,IAAkB,EAA4B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Ae,KAAI,MAEhB,kBAAC,GAAD;KAEE,SAAQ;KACR,cAAc;MACZ,SAAS;MACM;MACf;MACA,eAAe;OACb,AAAI,KACF,EAAQ;MAEZ;MACA,SAAS,EAAuB;KAClC;KACA,SAAS;KACT,WAAW,EAAc;IAC1B,GAfM,EAAc,UAepB,CAEJ,EACD,CAAA;IAEL,KACC,kBAAC,GAAD;KACE,SAAS,GAAe;KACxB,kBAAkB;KACK;KACvB,WAAW;IACZ,CAAA;IAEH,kBAAC,GAAD,EACE,0BAA0B,EACG,6BAC7B,EACD,CAAA;GACE;IACF,EAAA,CAAA;CACF,CAAA;AAET"}
1
+ {"version":3,"file":"TopLevelControls.js","names":[],"sources":["../../../../src/components/SynapseTable/TopLevelControls/TopLevelControls.tsx"],"sourcesContent":["import React from 'react'\nimport { useGetEntity } from '@/synapse-queries'\nimport { SQL_EDITOR } from '@/utils/SynapseConstants'\nimport { Button, Divider, Tooltip, Typography } from '@mui/material'\nimport {\n QueryBundleRequest,\n QueryResultBundle,\n Row,\n Table,\n} from '@sage-bionetworks/synapse-types'\nimport { useAtomValue } from 'jotai'\nimport { cloneDeep } from 'lodash-es'\nimport { ReactNode, useState } from 'react'\nimport IconSvg from '../../IconSvg'\nimport MissingQueryResultsWarning from '../../MissingQueryResultsWarning/MissingQueryResultsWarning'\nimport { useQueryContext } from '../../QueryContext'\nimport { useQueryVisualizationContext } from '../../QueryVisualizationWrapper'\nimport {\n isRowSelectionVisibleAtom,\n useHasSelectedRowsAtomValue,\n useSelectedRowsAtomValue,\n} from '../../QueryWrapper/TableRowSelectionState'\nimport { useGetQueryMetadata } from '../../QueryWrapper/useGetQueryMetadata'\nimport { ElementWithTooltip } from '../../widgets/ElementWithTooltip'\nimport ExportToAnalysisPlatformDialog from '../export/ExportToAnalysisPlatformDialog'\nimport { RowSelectionControls } from '../RowSelection/RowSelectionControls'\nimport { ColumnSelection, DownloadOptions } from '../table-top'\nimport {\n getNumberOfResultsToInvokeAction,\n getNumberOfResultsToInvokeActionCopy,\n} from './TopLevelControlsUtils'\nimport { copyStringToClipboard } from '@/utils/functions/StringUtils'\nimport { CustomControlButton } from '../CustomControls/CustomControlButton'\nimport { useSynapseContext } from '@/utils'\nimport { SignInRequiredModal } from '@/components/SignInRequiredModal/SignInRequiredModal'\nimport { SEND_TO_ANALYSIS_PLATFORM_SIGN_IN_MESSAGE } from '../SynapseTableUtils'\n\nconst SEND_TO_ANALYSIS_PLATFORM_BUTTON_ID =\n 'SendToAnalysisPlatformTopLevelControlButton'\n\nconst FILTER_TOGGLE_BUTTON_SX = {\n ml: 2,\n fontWeight: 400,\n fontSize: '14px',\n textDecoration: 'none !important',\n} as const\n\nexport type TopLevelControlsProps = {\n name?: string\n hideDownload?: boolean\n /** If true, the \"Add ... files to Download List\" option in the Download menu will be hidden */\n hideAddToDownloadListMenuItem?: boolean\n /** If true, the \"Programmatic Options\" option in the Download menu will be hidden */\n hideProgrammaticOptionsMenuItem?: boolean\n hideVisualizationsControl?: boolean\n hideFacetFilterControl?: boolean\n hideQueryCount?: boolean\n hideSqlEditorControl?: boolean\n /** When true, shows a `Show / Hide Query Builder` toggle. */\n showQueryBuilderControl?: boolean\n /** Current QB visibility, driven by the parent. Required when `showQueryBuilderControl` is true. */\n showQueryBuilder?: boolean\n /** Callback invoked when the QB toggle is clicked. Required when `showQueryBuilderControl` is true. */\n onToggleQueryBuilder?: () => void\n customControls?: CustomControl[]\n showColumnSelection?: boolean\n cavaticaConnectAccountURL?: string\n remount?: () => void\n}\n\nexport type Control = {\n key: string\n icon: string\n tooltipText: string\n}\n\nexport type CustomControlCallbackData = {\n tableId: string\n queryMetadata: Omit<QueryResultBundle, 'queryResult'> | undefined\n selectedRows: Row[] | undefined\n refresh: () => void\n request?: QueryBundleRequest\n}\n\n// note, all custom controls should check for selected rows in the event (to support row selection)\nexport type CustomControl = {\n buttonText: string\n onClick: (event: CustomControlCallbackData) => void\n classNames?: string\n icon?: ReactNode\n buttonID?: string // optionally set the ID property of the element\n title?: string // optionally set the title for the custom control\n description?: string // optionally set the description for the custom control\n}\n\nconst TopLevelControls = (props: TopLevelControlsProps): React.ReactNode => {\n const [showLoginModal, setShowLoginModal] = useState(false)\n const { isAuthenticated } = useSynapseContext()\n\n const {\n name,\n showColumnSelection = false,\n hideDownload = false,\n hideAddToDownloadListMenuItem,\n hideProgrammaticOptionsMenuItem,\n hideVisualizationsControl = false,\n hideFacetFilterControl = false,\n hideQueryCount = false,\n hideSqlEditorControl = true,\n showQueryBuilderControl = false,\n showQueryBuilder = false,\n onToggleQueryBuilder,\n customControls,\n cavaticaConnectAccountURL,\n remount,\n } = props\n\n const {\n entityId,\n versionNumber,\n getCurrentQueryRequest,\n hasResettableFilters,\n } = useQueryContext()\n const { data: entity } = useGetEntity<Table>(entityId, versionNumber)\n const { data: queryMetadata } = useGetQueryMetadata()\n const isRowSelectionVisible = useAtomValue(isRowSelectionVisibleAtom)\n const selectedRows = useSelectedRowsAtomValue()\n const hasSelectedRows = useHasSelectedRowsAtomValue()\n\n const {\n setShowSearchBar,\n columnsToShowInTable,\n setColumnsToShowInTable,\n enabledExternalAnalysisPlatforms,\n setIsShowingExportToAnalysisPlatformModal,\n unitDescription,\n setShowDownloadConfirmation,\n showCopyToClipboard,\n hideSearchBarControl,\n setShowPlots,\n setShowSqlEditor,\n showFacetFilter,\n setShowFacetFilter,\n } = useQueryVisualizationContext()\n\n const showExportToAnalysisPlatformButton =\n enabledExternalAnalysisPlatforms.length > 0\n\n const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] =\n useState(false)\n\n /**\n * Handles the toggle of a column select, this will cause the table to\n * either show the column or hide depending on the prior state of the column\n */\n const toggleColumnSelection = (columnName: string) => {\n let columnsToShowInTableCopy = cloneDeep(columnsToShowInTable)\n if (columnsToShowInTableCopy.includes(columnName)) {\n columnsToShowInTableCopy = columnsToShowInTableCopy.filter(\n el => el !== columnName,\n )\n } else {\n columnsToShowInTableCopy.push(columnName)\n }\n setColumnsToShowInTable(columnsToShowInTableCopy)\n }\n\n const numberOfResultsToInvokeAction = getNumberOfResultsToInvokeAction(\n hasSelectedRows,\n selectedRows,\n queryMetadata?.queryCount,\n )\n const numberOfResultsToInvokeActionAsText =\n getNumberOfResultsToInvokeActionCopy(\n hasResettableFilters,\n hasSelectedRows,\n selectedRows,\n queryMetadata?.queryCount,\n unitDescription,\n )\n\n const queryCountDisplay =\n !hideQueryCount && queryMetadata?.queryCount !== undefined\n ? `(${queryMetadata.queryCount.toLocaleString()})`\n : null\n\n return (\n <div className={`TopLevelControls`} data-testid=\"TopLevelControls\">\n <div>\n <div className=\"TopLevelControls__querycount\">\n {name && (\n <>\n <Typography variant=\"sectionTitle\" role=\"heading\">\n {name} {queryCountDisplay}\n </Typography>\n {!hideQueryCount && entity && (\n <MissingQueryResultsWarning entity={entity} />\n )}\n </>\n )}\n {!hideFacetFilterControl && (\n <Button\n variant={'text'}\n onClick={() => setShowFacetFilter(value => !value)}\n startIcon={\n <IconSvg\n icon={showFacetFilter ? 'close' : 'filter'}\n wrap={false}\n />\n }\n sx={FILTER_TOGGLE_BUTTON_SX}\n >\n {showFacetFilter ? 'Hide' : 'Show'} filters\n </Button>\n )}\n {showQueryBuilderControl && onToggleQueryBuilder && (\n <Button\n variant={'text'}\n onClick={onToggleQueryBuilder}\n startIcon={\n <IconSvg\n icon={showQueryBuilder ? 'close' : 'filter'}\n wrap={false}\n />\n }\n sx={FILTER_TOGGLE_BUTTON_SX}\n >\n {showQueryBuilder ? 'Hide' : 'Show'} Query Builder\n </Button>\n )}\n </div>\n <div className=\"TopLevelControls__actions\">\n {showExportToAnalysisPlatformButton && (\n <>\n <Tooltip\n title={\n <>\n This action will send a reference to{' '}\n {hasSelectedRows\n ? 'each selected file'\n : 'every file in the current table'}{' '}\n to a chosen external analysis platform.{' '}\n {!hasSelectedRows && showFacetFilter && (\n <>\n You can change what is sent by applying filters using\n the controls in the sidebar.\n </>\n )}\n {hasSelectedRows && (\n <>\n You can change what is sent by selecting a different set\n of files.\n </>\n )}\n </>\n }\n >\n <Button\n variant=\"text\"\n disabled={!numberOfResultsToInvokeAction}\n onClick={() => {\n return isAuthenticated\n ? setIsShowingExportToAnalysisPlatformModal(true)\n : setShowLoginModal(true)\n }}\n id={SEND_TO_ANALYSIS_PLATFORM_BUTTON_ID}\n >\n Send {numberOfResultsToInvokeActionAsText} to Analysis\n Platform\n </Button>\n </Tooltip>\n <Divider orientation=\"vertical\" variant=\"middle\" flexItem />\n </>\n )}\n {showLoginModal && (\n <SignInRequiredModal\n onHide={() => setShowLoginModal(false)}\n content={SEND_TO_ANALYSIS_PLATFORM_SIGN_IN_MESSAGE}\n />\n )}\n {!hideSearchBarControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide Search Bar'}\n callbackFn={() => setShowSearchBar(value => !value)}\n darkTheme={true}\n icon={'search'}\n />\n )}\n {showCopyToClipboard && (\n <ElementWithTooltip\n tooltipText={\n hasRecentlyCopiedToClipboard\n ? 'Copied to clipboard'\n : 'Copy this search to the clipboard'\n }\n callbackFn={() => {\n copyStringToClipboard(window.location.href).then(() => {\n setHasRecentlyCopiedToClipboard(true)\n setTimeout(() => {\n setHasRecentlyCopiedToClipboard(false)\n }, 3000)\n })\n }}\n darkTheme={true}\n icon={'clipboard'}\n />\n )}\n {!hideVisualizationsControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide Visualizations'}\n callbackFn={() => setShowPlots(value => !value)}\n darkTheme={true}\n icon={'chart'}\n />\n )}\n {!hideDownload && (\n <DownloadOptions\n darkTheme={true}\n onDownloadFiles={() => setShowDownloadConfirmation(true)}\n hideAddToDownloadListMenuItem={hideAddToDownloadListMenuItem}\n hideProgrammaticOptionsMenuItem={hideProgrammaticOptionsMenuItem}\n />\n )}\n\n {!hideSqlEditorControl && (\n <ElementWithTooltip\n tooltipText={'Show / Hide the Advanced Query Editor'}\n callbackFn={() => setShowSqlEditor(value => !value)}\n darkTheme={true}\n icon={SQL_EDITOR}\n />\n )}\n\n {isRowSelectionVisible && (\n <RowSelectionControls\n customControls={customControls}\n remount={remount}\n />\n )}\n {!isRowSelectionVisible &&\n customControls &&\n customControls.length > 0 && (\n <>\n {customControls.map(customControl => {\n return (\n <CustomControlButton\n key={customControl.buttonText}\n variant=\"text\"\n callbackData={{\n tableId: entityId!,\n queryMetadata: queryMetadata,\n selectedRows,\n refresh: () => {\n if (remount) {\n remount()\n }\n },\n request: getCurrentQueryRequest(),\n }}\n control={customControl}\n startIcon={customControl.icon}\n />\n )\n })}\n </>\n )}\n {showColumnSelection && (\n <ColumnSelection\n headers={queryMetadata?.selectColumns}\n isColumnSelected={columnsToShowInTable}\n toggleColumnSelection={toggleColumnSelection}\n darkTheme={true}\n />\n )}\n <ExportToAnalysisPlatformDialog\n platformInstructionProps={{\n cavaticaConnectAccountURL: cavaticaConnectAccountURL,\n }}\n />\n </div>\n </div>\n </div>\n )\n}\n\nexport default TopLevelControls\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,IAAM,IACJ,+CAEI,IAA0B;CAC9B,IAAI;CACJ,YAAY;CACZ,UAAU;CACV,gBAAgB;AAClB,GAkDM,KAAoB,MAAkD;CAC1E,IAAM,CAAC,GAAgB,KAAqB,EAAS,EAAK,GACpD,EAAE,uBAAoB,EAAkB,GAExC,EACJ,SACA,yBAAsB,IACtB,kBAAe,IACf,kCACA,oCACA,+BAA4B,IAC5B,4BAAyB,IACzB,oBAAiB,IACjB,0BAAuB,IACvB,6BAA0B,IAC1B,sBAAmB,IACnB,yBACA,mBACA,8BACA,eACE,GAEE,EACJ,aACA,mBACA,2BACA,4BACE,GAAgB,GACd,EAAE,MAAM,MAAW,EAAoB,GAAU,EAAa,GAC9D,EAAE,MAAM,MAAkB,GAAoB,GAC9C,IAAwB,EAAa,EAAyB,GAC9D,IAAe,EAAyB,GACxC,IAAkB,EAA4B,GAE9C,EACJ,sBACA,yBACA,6BACA,sCACA,+CACA,qBACA,iCACA,yBACA,0BACA,kBACA,sBACA,oBAC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AS,KACtB,kBAAA,GAAA,EAAA,UACG,EAAe,KAAI,MAEhB,kBAAC,GAAD;KAEE,SAAQ;KACR,cAAc;MACZ,SAAS;MACM;MACf;MACA,eAAe;OACb,AAAI,KACF,EAAQ;MAEZ;MACA,SAAS,EAAuB;KAClC;KACA,SAAS;KACT,WAAW,EAAc;IAC1B,GAfM,EAAc,UAepB,CAEJ,EACD,CAAA;IAEL,KACC,kBAAC,GAAD;KACE,SAAS,GAAe;KACxB,kBAAkB;KACK;KACvB,WAAW;IACZ,CAAA;IAEH,kBAAC,GAAD,EACE,0BAA0B,EACG,6BAC7B,EACD,CAAA;GACE;IACF,EAAA,CAAA;CACF,CAAA;AAET"}
@@ -1,10 +1,9 @@
1
1
  /**
2
2
  * Lists the requester's active eDUC signatures (routed / signed but not yet submitted).
3
3
  *
4
- * The underlying query walks every page of `POST /dataAccessRequest/list` inside its `queryFn`
5
- * because filtering is done client-side pending PLFM-9907 (which will add an `isEDuc` server-side
6
- * filter). Once server-side filtering ships, callers can switch back to a per-page infinite query
7
- * with a "Show More" button.
4
+ * The underlying query walks every page of `POST /dataAccessRequest/list` inside its `queryFn`,
5
+ * pushing the `isEDuc: true` filter to the server so the walk skips non-eDUC requests. Status is
6
+ * still filtered client-side because the list endpoint has no server-side status filter.
8
7
  *
9
8
  * Renders nothing when the fully-loaded, filtered list is empty.
10
9
  */
@@ -1 +1 @@
1
- {"version":3,"file":"InFlightEDucSignaturesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.tsx"],"names":[],"mappings":"AA8IA;;;;;;;;;GASG;AACH,wBAAgB,2BAA2B,mDA8J1C"}
1
+ {"version":3,"file":"InFlightEDucSignaturesTable.d.ts","sourceRoot":"","sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.tsx"],"names":[],"mappings":"AA8IA;;;;;;;;GAQG;AACH,wBAAgB,2BAA2B,mDA6J1C"}
@@ -104,7 +104,7 @@ function F(e) {
104
104
  ];
105
105
  }
106
106
  function I() {
107
- let { data: c, isLoading: l, error: u } = n(), [S, D] = p(), [O, M] = p(), { data: N, isFetching: P, error: I } = t(S ?? "", {
107
+ let { data: c, isLoading: l, error: u } = n({ isEDuc: !0 }), [S, D] = p(), [O, M] = p(), { data: N, isFetching: P, error: I } = t(S ?? "", {
108
108
  enabled: !!S,
109
109
  staleTime: Infinity
110
110
  });
@@ -124,7 +124,7 @@ function I() {
124
124
  },
125
125
  onCancel: (e) => M(e),
126
126
  modifyLoadingArId: z
127
- }), [z]), V = f(() => (c ?? []).filter((e) => e.isEDuc === !0 && e.status !== void 0 && j.includes(e.status)), [c]), H = A({
127
+ }), [z]), V = f(() => (c ?? []).filter((e) => e.status !== void 0 && j.includes(e.status)), [c]), H = A({
128
128
  data: V,
129
129
  columns: B,
130
130
  getCoreRowModel: k(),
@@ -1 +1 @@
1
- {"version":3,"file":"InFlightEDucSignaturesTable.js","names":[],"sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.tsx"],"sourcesContent":["import AccessRequirementList, {\n RequestDataStep,\n} from '@/components/AccessRequirementList/AccessRequirementList'\nimport { SkeletonTable } from '@/components/Skeleton'\nimport ColumnHeader from '@/components/TanStackTable/ColumnHeader'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { displayToast } from '@/components/ToastMessage/ToastMessage'\nimport {\n useListAllUserDataAccessRequests,\n useVoidDataAccessRequestSignature,\n} from '@/synapse-queries'\nimport { useGetAccessRequirements } from '@/synapse-queries/dataaccess/useAccessRequirements'\nimport {\n Alert,\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Link as MuiLink,\n Stack,\n Typography,\n} from '@mui/material'\nimport {\n AccessRequestSummary,\n AccessRequestSummaryStatusEnum,\n} from '@sage-bionetworks/synapse-client'\nimport { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types'\nimport {\n createColumnHelper,\n getCoreRowModel,\n useReactTable,\n} from '@tanstack/react-table'\nimport { useEffect, useMemo, useState } from 'react'\nimport { Link as RouterLink } from 'react-router'\nimport {\n USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH,\n USER_ACCESS_HISTORY_REQUEST_SUBPATH,\n} from './RouteConstants'\n\nconst IN_FLIGHT_STATUSES: readonly AccessRequestSummaryStatusEnum[] = [\n 'sent',\n 'delivered',\n 'completed',\n] as const\n\nconst STATUS_DISPLAY: Record<string, string> = {\n sent: 'Signatures pending',\n delivered: 'Signatures pending',\n completed: 'Ready to submit',\n}\n\nconst signatureDeepLink = (requestId: string) =>\n `/${USER_ACCESS_HISTORY_REQUEST_SUBPATH}/${requestId}/${USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH}`\n\nconst columnHelper = createColumnHelper<AccessRequestSummary>()\n\ntype ActionCallbacks = {\n onModify: (summary: AccessRequestSummary) => void\n onCancel: (summary: AccessRequestSummary) => void\n modifyLoadingArId: string | undefined\n}\n\nfunction buildColumns(actions: ActionCallbacks) {\n return [\n columnHelper.accessor('accessRequirementName', {\n header: props => <ColumnHeader {...props} title={'Request type'} />,\n enableSorting: false,\n enableColumnFilter: false,\n }),\n columnHelper.display({\n id: 'signatureProgress',\n header: props => <ColumnHeader {...props} title={'Signature progress'} />,\n enableSorting: false,\n cell: ctx => {\n const acquired = ctx.row.original.signaturesAcquired ?? 0\n const requested = ctx.row.original.signaturesRequested ?? 0\n return `${acquired} of ${requested}`\n },\n enableColumnFilter: false,\n size: 150,\n }),\n columnHelper.accessor('status', {\n header: props => <ColumnHeader {...props} title={'Current status'} />,\n enableSorting: false,\n cell: ctx => {\n const status = ctx.getValue()\n return status ? (STATUS_DISPLAY[status] ?? status) : ''\n },\n enableColumnFilter: false,\n size: 150,\n }),\n columnHelper.display({\n id: 'actions',\n header: props => <ColumnHeader {...props} title={'Actions'} />,\n enableSorting: false,\n enableColumnFilter: false,\n cell: ctx => {\n const summary = ctx.row.original\n const requestId = summary.requestId\n if (!requestId) return null\n const isModifyLoading =\n actions.modifyLoadingArId !== undefined &&\n actions.modifyLoadingArId === summary.accessRequirementId\n return (\n <Stack\n direction={'column'}\n sx={{ alignItems: 'flex-start', gap: 0.5 }}\n >\n <MuiLink component={RouterLink} to={signatureDeepLink(requestId)}>\n Review Signatures and Submit\n </MuiLink>\n <MuiLink\n component={'button'}\n type={'button'}\n onClick={() => actions.onModify(summary)}\n disabled={\n !summary.accessRequirementId ||\n actions.modifyLoadingArId !== undefined\n }\n sx={{ textAlign: 'left' }}\n >\n {isModifyLoading ? 'Loading…' : 'Modify Request'}\n </MuiLink>\n <MuiLink\n component={'button'}\n type={'button'}\n onClick={() => actions.onCancel(summary)}\n sx={{ textAlign: 'left' }}\n >\n Cancel Request\n </MuiLink>\n </Stack>\n )\n },\n size: 220,\n }),\n ]\n}\n\n/**\n * Lists the requester's active eDUC signatures (routed / signed but not yet submitted).\n *\n * The underlying query walks every page of `POST /dataAccessRequest/list` inside its `queryFn`\n * because filtering is done client-side pending PLFM-9907 (which will add an `isEDuc` server-side\n * filter). Once server-side filtering ships, callers can switch back to a per-page infinite query\n * with a \"Show More\" button.\n *\n * Renders nothing when the fully-loaded, filtered list is empty.\n */\nexport function InFlightEDucSignaturesTable() {\n const {\n data: summaries,\n isLoading,\n error,\n } = useListAllUserDataAccessRequests()\n\n const [modifyingArId, setModifyingArId] = useState<string | undefined>()\n const [cancellingSummary, setCancellingSummary] = useState<\n AccessRequestSummary | undefined\n >()\n\n const {\n data: modifyAccessRequirement,\n isFetching: isFetchingModifyAr,\n error: modifyArError,\n } = useGetAccessRequirements<ManagedACTAccessRequirement>(\n modifyingArId ?? '',\n { enabled: Boolean(modifyingArId), staleTime: Infinity },\n )\n\n // Bail out of the Modify flow if the AR fetch fails so the user isn't stuck on a disabled button.\n useEffect(() => {\n if (modifyArError && modifyingArId) {\n displayToast(\n `Sorry, we couldn't load your request. ${modifyArError.reason ?? ''}`.trim(),\n 'danger',\n )\n setModifyingArId(undefined)\n }\n }, [modifyArError, modifyingArId])\n\n const { mutate: voidSignature, isPending: isVoiding } =\n useVoidDataAccessRequestSignature({\n onSuccess: () => {\n displayToast('Your access request has been cancelled.', 'success')\n setCancellingSummary(undefined)\n },\n onError: e => {\n displayToast(\n `Sorry, we couldn't cancel your request. ${e.reason ?? ''}`.trim(),\n 'danger',\n )\n },\n })\n\n const modifyLoadingArId = isFetchingModifyAr ? modifyingArId : undefined\n\n const columns = useMemo(\n () =>\n buildColumns({\n onModify: summary => {\n if (summary.accessRequirementId) {\n setModifyingArId(summary.accessRequirementId)\n }\n },\n onCancel: summary => setCancellingSummary(summary),\n modifyLoadingArId,\n }),\n [modifyLoadingArId],\n )\n\n const rows = useMemo(\n () =>\n (summaries ?? []).filter(\n summary =>\n summary.isEDuc === true &&\n summary.status !== undefined &&\n (IN_FLIGHT_STATUSES as readonly string[]).includes(summary.status),\n ),\n [summaries],\n )\n\n const table = useReactTable({\n data: rows,\n columns,\n getCoreRowModel: getCoreRowModel(),\n columnResizeMode: 'onChange',\n })\n\n if (error) {\n return (\n <Alert severity={'error'}>\n <strong>\n Sorry, we couldn&apos;t load your in-flight eDUC signatures.\n </strong>\n <br />\n {error.reason}\n </Alert>\n )\n }\n\n if (isLoading) {\n return <SkeletonTable numCols={columns.length} fullWidthCells />\n }\n\n if (rows.length === 0) {\n return null\n }\n\n return (\n <Box>\n <Stack sx={{ gap: 2 }}>\n <Typography variant=\"headline1\" gutterBottom>\n In-flight eDUC signatures\n </Typography>\n <StyledTanStackTable table={table} fullWidth={true} />\n </Stack>\n {modifyAccessRequirement && (\n <AccessRequirementList\n renderAsModal\n onHide={() => setModifyingArId(undefined)}\n initialWizardEntry={{\n step: RequestDataStep.UPDATE_RESEARCH_PROJECT,\n managedACTAccessRequirement: modifyAccessRequirement,\n }}\n />\n )}\n <Dialog\n open={Boolean(cancellingSummary)}\n onClose={() => setCancellingSummary(undefined)}\n >\n <DialogTitle>Cancel request?</DialogTitle>\n <DialogContent>\n <DialogContentText>\n Cancelling this request will void the electronic signature envelope\n for{' '}\n <strong>\n {cancellingSummary?.accessRequirementName ?? 'this request'}\n </strong>\n . Any signatures already collected will be discarded. You can start\n a new request at any time. This action cannot be undone.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n variant={'outlined'}\n onClick={() => setCancellingSummary(undefined)}\n disabled={isVoiding}\n >\n Keep Request\n </Button>\n <Button\n variant={'contained'}\n color={'error'}\n loading={isVoiding}\n onClick={() => {\n if (cancellingSummary?.requestId) {\n voidSignature(cancellingSummary.requestId)\n }\n }}\n >\n Cancel Request\n </Button>\n </DialogActions>\n </Dialog>\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,IAAM,IAAgE;CACpE;CACA;CACA;AACF,GAEM,IAAyC;CAC7C,MAAM;CACN,WAAW;CACX,WAAW;AACb,GAEM,KAAqB,MACzB,IAAI,EAAoC,GAAG,EAAU,GAAG,KAEpD,IAAe,EAAyC;AAQ9D,SAAS,EAAa,GAA0B;CAC9C,OAAO;EACL,EAAa,SAAS,yBAAyB;GAC7C,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAiB,CAAA;GAClE,eAAe;GACf,oBAAoB;EACtB,CAAC;EACD,EAAa,QAAQ;GACnB,IAAI;GACJ,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAuB,CAAA;GACxE,eAAe;GACf,OAAM,MAGG,GAFU,EAAI,IAAI,SAAS,sBAAsB,EAErC,MADD,EAAI,IAAI,SAAS,uBAAuB;GAG5D,oBAAoB;GACpB,MAAM;EACR,CAAC;EACD,EAAa,SAAS,UAAU;GAC9B,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAmB,CAAA;GACpE,eAAe;GACf,OAAM,MAAO;IACX,IAAM,IAAS,EAAI,SAAS;IAC5B,OAAO,IAAU,EAAe,MAAW,IAAU;GAC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BAAC,GAAD;GACE,MAAM,EAAQ;GACd,eAAe,EAAqB,KAAA,CAAS;aAF/C;IAIE,kBAAC,GAAD,EAAA,UAAa,kBAA4B,CAAA;IACzC,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA;KAAmB;KAEb;KACJ,kBAAC,UAAD,EAAA,UACG,GAAmB,yBAAyB,eACvC,CAAA;KAAC;IAGQ,EAAA,CAAA,EACN,CAAA;IACf,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KACE,SAAS;KACT,eAAe,EAAqB,KAAA,CAAS;KAC7C,UAAU;eACX;IAEO,CAAA,GACR,kBAAC,GAAD;KACE,SAAS;KACT,OAAO;KACP,SAAS;KACT,eAAe;MACb,AAAI,GAAmB,aACrB,EAAc,EAAkB,SAAS;KAE7C;eACD;IAEO,CAAA,CACK,EAAA,CAAA;GACT;;CACL,EAAA,CAAA;AAET"}
1
+ {"version":3,"file":"InFlightEDucSignaturesTable.js","names":[],"sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.tsx"],"sourcesContent":["import AccessRequirementList, {\n RequestDataStep,\n} from '@/components/AccessRequirementList/AccessRequirementList'\nimport { SkeletonTable } from '@/components/Skeleton'\nimport ColumnHeader from '@/components/TanStackTable/ColumnHeader'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { displayToast } from '@/components/ToastMessage/ToastMessage'\nimport {\n useListAllUserDataAccessRequests,\n useVoidDataAccessRequestSignature,\n} from '@/synapse-queries'\nimport { useGetAccessRequirements } from '@/synapse-queries/dataaccess/useAccessRequirements'\nimport {\n Alert,\n Box,\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n DialogContentText,\n DialogTitle,\n Link as MuiLink,\n Stack,\n Typography,\n} from '@mui/material'\nimport {\n AccessRequestSummary,\n AccessRequestSummaryStatusEnum,\n} from '@sage-bionetworks/synapse-client'\nimport { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types'\nimport {\n createColumnHelper,\n getCoreRowModel,\n useReactTable,\n} from '@tanstack/react-table'\nimport { useEffect, useMemo, useState } from 'react'\nimport { Link as RouterLink } from 'react-router'\nimport {\n USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH,\n USER_ACCESS_HISTORY_REQUEST_SUBPATH,\n} from './RouteConstants'\n\nconst IN_FLIGHT_STATUSES: readonly AccessRequestSummaryStatusEnum[] = [\n 'sent',\n 'delivered',\n 'completed',\n] as const\n\nconst STATUS_DISPLAY: Record<string, string> = {\n sent: 'Signatures pending',\n delivered: 'Signatures pending',\n completed: 'Ready to submit',\n}\n\nconst signatureDeepLink = (requestId: string) =>\n `/${USER_ACCESS_HISTORY_REQUEST_SUBPATH}/${requestId}/${USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH}`\n\nconst columnHelper = createColumnHelper<AccessRequestSummary>()\n\ntype ActionCallbacks = {\n onModify: (summary: AccessRequestSummary) => void\n onCancel: (summary: AccessRequestSummary) => void\n modifyLoadingArId: string | undefined\n}\n\nfunction buildColumns(actions: ActionCallbacks) {\n return [\n columnHelper.accessor('accessRequirementName', {\n header: props => <ColumnHeader {...props} title={'Request type'} />,\n enableSorting: false,\n enableColumnFilter: false,\n }),\n columnHelper.display({\n id: 'signatureProgress',\n header: props => <ColumnHeader {...props} title={'Signature progress'} />,\n enableSorting: false,\n cell: ctx => {\n const acquired = ctx.row.original.signaturesAcquired ?? 0\n const requested = ctx.row.original.signaturesRequested ?? 0\n return `${acquired} of ${requested}`\n },\n enableColumnFilter: false,\n size: 150,\n }),\n columnHelper.accessor('status', {\n header: props => <ColumnHeader {...props} title={'Current status'} />,\n enableSorting: false,\n cell: ctx => {\n const status = ctx.getValue()\n return status ? (STATUS_DISPLAY[status] ?? status) : ''\n },\n enableColumnFilter: false,\n size: 150,\n }),\n columnHelper.display({\n id: 'actions',\n header: props => <ColumnHeader {...props} title={'Actions'} />,\n enableSorting: false,\n enableColumnFilter: false,\n cell: ctx => {\n const summary = ctx.row.original\n const requestId = summary.requestId\n if (!requestId) return null\n const isModifyLoading =\n actions.modifyLoadingArId !== undefined &&\n actions.modifyLoadingArId === summary.accessRequirementId\n return (\n <Stack\n direction={'column'}\n sx={{ alignItems: 'flex-start', gap: 0.5 }}\n >\n <MuiLink component={RouterLink} to={signatureDeepLink(requestId)}>\n Review Signatures and Submit\n </MuiLink>\n <MuiLink\n component={'button'}\n type={'button'}\n onClick={() => actions.onModify(summary)}\n disabled={\n !summary.accessRequirementId ||\n actions.modifyLoadingArId !== undefined\n }\n sx={{ textAlign: 'left' }}\n >\n {isModifyLoading ? 'Loading…' : 'Modify Request'}\n </MuiLink>\n <MuiLink\n component={'button'}\n type={'button'}\n onClick={() => actions.onCancel(summary)}\n sx={{ textAlign: 'left' }}\n >\n Cancel Request\n </MuiLink>\n </Stack>\n )\n },\n size: 220,\n }),\n ]\n}\n\n/**\n * Lists the requester's active eDUC signatures (routed / signed but not yet submitted).\n *\n * The underlying query walks every page of `POST /dataAccessRequest/list` inside its `queryFn`,\n * pushing the `isEDuc: true` filter to the server so the walk skips non-eDUC requests. Status is\n * still filtered client-side because the list endpoint has no server-side status filter.\n *\n * Renders nothing when the fully-loaded, filtered list is empty.\n */\nexport function InFlightEDucSignaturesTable() {\n const {\n data: summaries,\n isLoading,\n error,\n } = useListAllUserDataAccessRequests({ isEDuc: true })\n\n const [modifyingArId, setModifyingArId] = useState<string | undefined>()\n const [cancellingSummary, setCancellingSummary] = useState<\n AccessRequestSummary | undefined\n >()\n\n const {\n data: modifyAccessRequirement,\n isFetching: isFetchingModifyAr,\n error: modifyArError,\n } = useGetAccessRequirements<ManagedACTAccessRequirement>(\n modifyingArId ?? '',\n { enabled: Boolean(modifyingArId), staleTime: Infinity },\n )\n\n // Bail out of the Modify flow if the AR fetch fails so the user isn't stuck on a disabled button.\n useEffect(() => {\n if (modifyArError && modifyingArId) {\n displayToast(\n `Sorry, we couldn't load your request. ${modifyArError.reason ?? ''}`.trim(),\n 'danger',\n )\n setModifyingArId(undefined)\n }\n }, [modifyArError, modifyingArId])\n\n const { mutate: voidSignature, isPending: isVoiding } =\n useVoidDataAccessRequestSignature({\n onSuccess: () => {\n displayToast('Your access request has been cancelled.', 'success')\n setCancellingSummary(undefined)\n },\n onError: e => {\n displayToast(\n `Sorry, we couldn't cancel your request. ${e.reason ?? ''}`.trim(),\n 'danger',\n )\n },\n })\n\n const modifyLoadingArId = isFetchingModifyAr ? modifyingArId : undefined\n\n const columns = useMemo(\n () =>\n buildColumns({\n onModify: summary => {\n if (summary.accessRequirementId) {\n setModifyingArId(summary.accessRequirementId)\n }\n },\n onCancel: summary => setCancellingSummary(summary),\n modifyLoadingArId,\n }),\n [modifyLoadingArId],\n )\n\n const rows = useMemo(\n () =>\n (summaries ?? []).filter(\n summary =>\n summary.status !== undefined &&\n (IN_FLIGHT_STATUSES as readonly string[]).includes(summary.status),\n ),\n [summaries],\n )\n\n const table = useReactTable({\n data: rows,\n columns,\n getCoreRowModel: getCoreRowModel(),\n columnResizeMode: 'onChange',\n })\n\n if (error) {\n return (\n <Alert severity={'error'}>\n <strong>\n Sorry, we couldn&apos;t load your in-flight eDUC signatures.\n </strong>\n <br />\n {error.reason}\n </Alert>\n )\n }\n\n if (isLoading) {\n return <SkeletonTable numCols={columns.length} fullWidthCells />\n }\n\n if (rows.length === 0) {\n return null\n }\n\n return (\n <Box>\n <Stack sx={{ gap: 2 }}>\n <Typography variant=\"headline1\" gutterBottom>\n In-flight eDUC signatures\n </Typography>\n <StyledTanStackTable table={table} fullWidth={true} />\n </Stack>\n {modifyAccessRequirement && (\n <AccessRequirementList\n renderAsModal\n onHide={() => setModifyingArId(undefined)}\n initialWizardEntry={{\n step: RequestDataStep.UPDATE_RESEARCH_PROJECT,\n managedACTAccessRequirement: modifyAccessRequirement,\n }}\n />\n )}\n <Dialog\n open={Boolean(cancellingSummary)}\n onClose={() => setCancellingSummary(undefined)}\n >\n <DialogTitle>Cancel request?</DialogTitle>\n <DialogContent>\n <DialogContentText>\n Cancelling this request will void the electronic signature envelope\n for{' '}\n <strong>\n {cancellingSummary?.accessRequirementName ?? 'this request'}\n </strong>\n . Any signatures already collected will be discarded. You can start\n a new request at any time. This action cannot be undone.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button\n variant={'outlined'}\n onClick={() => setCancellingSummary(undefined)}\n disabled={isVoiding}\n >\n Keep Request\n </Button>\n <Button\n variant={'contained'}\n color={'error'}\n loading={isVoiding}\n onClick={() => {\n if (cancellingSummary?.requestId) {\n voidSignature(cancellingSummary.requestId)\n }\n }}\n >\n Cancel Request\n </Button>\n </DialogActions>\n </Dialog>\n </Box>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,IAAM,IAAgE;CACpE;CACA;CACA;AACF,GAEM,IAAyC;CAC7C,MAAM;CACN,WAAW;CACX,WAAW;AACb,GAEM,KAAqB,MACzB,IAAI,EAAoC,GAAG,EAAU,GAAG,KAEpD,IAAe,EAAyC;AAQ9D,SAAS,EAAa,GAA0B;CAC9C,OAAO;EACL,EAAa,SAAS,yBAAyB;GAC7C,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAiB,CAAA;GAClE,eAAe;GACf,oBAAoB;EACtB,CAAC;EACD,EAAa,QAAQ;GACnB,IAAI;GACJ,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAuB,CAAA;GACxE,eAAe;GACf,OAAM,MAGG,GAFU,EAAI,IAAI,SAAS,sBAAsB,EAErC,MADD,EAAI,IAAI,SAAS,uBAAuB;GAG5D,oBAAoB;GACpB,MAAM;EACR,CAAC;EACD,EAAa,SAAS,UAAU;GAC9B,SAAQ,MAAS,kBAAC,GAAD;IAAc,GAAI;IAAO,OAAO;GAAmB,CAAA;GACpE,eAAe;GACf,OAAM,MAAO;IACX,IAAM,IAAS,EAAI,SAAS;IAC5B,OAAO,IAAU,EAAe,MAAW,IAAU;GACvD;GACA,oBAAoB;G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GACE,MAAM,EAAQ;GACd,eAAe,EAAqB,KAAA,CAAS;aAF/C;IAIE,kBAAC,GAAD,EAAA,UAAa,kBAA4B,CAAA;IACzC,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,EAAA,UAAA;KAAmB;KAEb;KACJ,kBAAC,UAAD,EAAA,UACG,GAAmB,yBAAyB,eACvC,CAAA;KAAC;IAGQ,EAAA,CAAA,EACN,CAAA;IACf,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;KACE,SAAS;KACT,eAAe,EAAqB,KAAA,CAAS;KAC7C,UAAU;eACX;IAEO,CAAA,GACR,kBAAC,GAAD;KACE,SAAS;KACT,OAAO;KACP,SAAS;KACT,eAAe;MACb,AAAI,GAAmB,aACrB,EAAc,EAAkB,SAAS;KAE7C;eACD;IAEO,CAAA,CACK,EAAA,CAAA;GACT;;CACL,EAAA,CAAA;AAET"}
@@ -22,7 +22,7 @@ function D() {
22
22
  }) : /* @__PURE__ */ g(v, { to: "/" });
23
23
  }
24
24
  function O() {
25
- let { requestId: e } = T(), a = w(), { data: o, isLoading: s } = n(), c = o?.find((t) => t.requestId === e), l = c?.accessRequirementId, { data: u, isLoading: d } = t(l ?? "", {
25
+ let { requestId: e } = T(), a = w(), { data: o, isLoading: s } = n({ isEDuc: !0 }), c = o?.find((t) => t.requestId === e), l = c?.accessRequirementId, { data: u, isLoading: d } = t(l ?? "", {
26
26
  enabled: !!l,
27
27
  staleTime: Infinity
28
28
  });
@@ -1 +1 @@
1
- {"version":3,"file":"UserAccessRequestHistoryPlace.js","names":[],"sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.tsx"],"sourcesContent":["import {\n BreadcrumbItem,\n Breadcrumbs,\n} from '@/components/Breadcrumbs/Breadcrumbs'\nimport { useListAllUserDataAccessRequests } from '@/synapse-queries'\nimport { useGetAccessRequirements } from '@/synapse-queries/dataaccess/useAccessRequirements'\nimport { AuthenticationGuard } from '@/utils/AppUtils'\nimport { Box } from '@mui/material'\nimport { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types'\nimport { useMemo } from 'react'\nimport {\n createBrowserRouter,\n createMemoryRouter,\n Navigate,\n Outlet,\n RouteObject,\n RouterProvider,\n useLocation,\n useNavigate,\n useParams,\n} from 'react-router'\nimport { RouterProvider as DOMRouterProvider } from 'react-router/dom'\nimport AccessRequirementList, {\n RequestDataStep,\n} from '../../AccessRequirementList/AccessRequirementList'\nimport SubmissionPage from '../SubmissionPage/SubmissionPage'\nimport {\n REQUEST_ID_PARAM,\n SUBMISSION_ID_PARAM,\n USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH,\n USER_ACCESS_HISTORY_REQUEST_SUBPATH,\n USER_ACCESS_HISTORY_SUBMISSION_SUBPATH,\n} from './RouteConstants'\nimport { UserAccessRequestHistoryPage } from './UserAccessRequestHistoryPage'\n\ntype ReviewerDashboardProps = {\n /** Used to determine the base path for the component. Default is RequestHistory:default */\n routerBaseName?: string\n /** If true use a MemoryRouter, which prevents the browser URL from updating. For demo/test purposes only. */\n useMemoryRouter?: boolean\n}\n\nfunction UserSubmissionPageRouteRenderer() {\n const { submissionId } = useParams<{ [SUBMISSION_ID_PARAM]: string }>()\n if (!submissionId) {\n return <Navigate to=\"/\" />\n }\n return <SubmissionPage submissionId={submissionId} isReviewer={false} />\n}\n\n/**\n * Deep-link route element for `/request/:requestId/signature`. Rendered inside\n * `UserAccessRequestHistoryPage`'s `<Outlet />` so the page stays mounted while the dialog is open.\n * Looks up the request in the user's own access-request list, then mounts the signature-status\n * wizard step for the AR. Requests that don't belong to the user (or don't exist) redirect back\n * to the history index. The surrounding `AuthenticationGuard` handles unauthenticated visitors.\n */\nfunction RequestSignatureRouteRenderer() {\n const { requestId } = useParams<{ [REQUEST_ID_PARAM]: string }>()\n const navigate = useNavigate()\n\n const { data: summaries, isLoading: isLoadingSummaries } =\n useListAllUserDataAccessRequests()\n const summary = summaries?.find(s => s.requestId === requestId)\n const accessRequirementId = summary?.accessRequirementId\n\n const { data: accessRequirement, isLoading: isLoadingAr } =\n useGetAccessRequirements<ManagedACTAccessRequirement>(\n accessRequirementId ?? '',\n { enabled: Boolean(accessRequirementId), staleTime: Infinity },\n )\n\n // Wait for the summary + AR to load before mounting the dialog. `UserAccessRequestHistoryPage`\n // renders its own skeletons in the meantime, so no visible spinner is needed here.\n if (isLoadingSummaries || (accessRequirementId && isLoadingAr)) {\n return null\n }\n\n // Summary not found in the user's own requests, or its access requirement failed to load.\n if (!summary || !accessRequirementId || !accessRequirement) {\n return <Navigate to=\"/\" replace />\n }\n\n return (\n <AccessRequirementList\n renderAsModal\n onHide={() => {\n void navigate('/')\n }}\n initialWizardEntry={{\n step: RequestDataStep.SIGNATURE_STATUS,\n managedACTAccessRequirement: accessRequirement,\n }}\n />\n )\n}\n\n/**\n * Layout for UserAccessRequestHistory pages. Includes header with title.\n * @constructor\n */\nfunction UserAccessRequestHistoryPageLayout() {\n return (\n <>\n <div className=\"pageHeader\">\n <div className=\"grid\">\n <h3 className=\"pageHeaderTitle\">Access Requests</h3>\n </div>\n </div>\n <Box sx={{ px: 5, py: 3 }}>\n <Outlet />\n </Box>\n </>\n )\n}\n\n/**\n * Breadcrumb layout for UserAccessRequestHistory pages. Displays breadcrumbs for navigation.\n */\nfunction UserAccessRequestHistoryBreadcrumbLayout() {\n const { submissionId } = useParams<{ [SUBMISSION_ID_PARAM]: string }>()\n const location = useLocation()\n\n const breadcrumbItems: BreadcrumbItem[] = [\n {\n text: 'Access Request History',\n to: '/',\n current: location.pathname === '/',\n },\n ]\n if (submissionId) {\n const submissionPath = `/${USER_ACCESS_HISTORY_SUBMISSION_SUBPATH}/${submissionId}`\n breadcrumbItems.push({\n text: `Request #${submissionId}`,\n to: submissionPath,\n current: location.pathname === submissionPath,\n })\n }\n\n return (\n <>\n <Breadcrumbs\n items={breadcrumbItems}\n sx={{\n mt: 2,\n mb: 4,\n ['& .MuiLink-root']: {\n color: 'text.secondary',\n letterSpacing: 0,\n '&:visited': {\n color: 'text.secondary',\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'grey.500',\n },\n }}\n />\n <Outlet />\n </>\n )\n}\n\nconst routes: RouteObject[] = [\n {\n element: <UserAccessRequestHistoryPageLayout />,\n children: [\n {\n path: '/',\n children: [\n {\n // Keep the history page mounted across the index ↔ signature-deep-link transition.\n element: <UserAccessRequestHistoryPage />,\n children: [\n { index: true, element: null },\n {\n path: `${USER_ACCESS_HISTORY_REQUEST_SUBPATH}/:${REQUEST_ID_PARAM}/${USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH}`,\n element: (\n <AuthenticationGuard>\n <RequestSignatureRouteRenderer />\n </AuthenticationGuard>\n ),\n },\n ],\n },\n {\n // Do not display the breadcrumbs on the `index` page\n element: <UserAccessRequestHistoryBreadcrumbLayout />,\n children: [\n {\n path: `${USER_ACCESS_HISTORY_SUBMISSION_SUBPATH}`,\n children: [\n {\n path: `:${SUBMISSION_ID_PARAM}`,\n element: <UserSubmissionPageRouteRenderer />,\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n },\n]\n\n/**\n * Component that renders User Access Request history table & submission page. Handles routing internally.\n */\nexport function UserAccessRequestHistoryPlace(props: ReviewerDashboardProps) {\n const {\n routerBaseName = '/RequestHistory:default',\n useMemoryRouter = false,\n } = props\n\n const router = useMemo(() => {\n if (useMemoryRouter) {\n return createMemoryRouter(routes, {\n basename: routerBaseName,\n })\n } else {\n return createBrowserRouter(routes, {\n basename: routerBaseName,\n })\n }\n }, [useMemoryRouter, routerBaseName])\n\n if (useMemoryRouter) {\n return <RouterProvider router={router} />\n }\n\n return <DOMRouterProvider router={router} />\n}\n\nexport default UserAccessRequestHistoryPlace\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,SAAS,IAAkC;CACzC,IAAM,EAAE,oBAAiB,EAA6C;CAItE,OAHK,IAGE,kBAAC,GAAD;EAA8B;EAAc,YAAY;CAAQ,CAAA,IAF9D,kBAAC,GAAD,EA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C,GAAD;EACE,OAAO;EACP,IAAI;GACF,IAAI;GACJ,IAAI;GACH,mBAAoB;IACnB,OAAO;IACP,eAAe;IACf,aAAa,EACX,OAAO,iBACT;GACF;GACA,sBAAsB,EACpB,OAAO,WACT;EACF;CACD,CAAA,GACD,kBAAC,GAAD,CAAS,CAAA,CACT,EAAA,CAAA;AAEN;AAEA,IAAM,IAAwB,CAC5B;CACE,SAAS,kBAAC,GAAD,CAAqC,CAAA;CAC9C,UAAU,CACR;EACE,MAAM;EACN,UAAU,CACR;GAEE,SAAS,kBAAC,GAAD,CAA+B,CAAA;GACxC,UAAU,CACR;IAAE,OAAO;IAAM,SAAS;GAAK,GAC7B;IACE,MAAM,GAAG,EAAoC,IAAI,EAAiB,GAAG;IACrE,SACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,CAAgC,CAAA,EACb,CAAA;GAEzB,CACF;EACF,GACA;GAEE,SAAS,kBAAC,GAAD,CAA2C,CAAA;GACpD,UAAU,CACR;IACE,MAAM,GAAG;IACT,UAAU,CACR;KACE,MAAM,IAAI;KACV,SAAS,kBAAC,GAAD,CAAkC,CAAA;IAC7C,CACF;GACF,CACF;EACF,CACF;CACF,CACF;AACF,CACF;AAKA,SAAgB,EAA8B,GAA+B;CAC3E,IAAM,EACJ,oBAAiB,2BACjB,qBAAkB,OAChB,GAEE,IAAS,QACT,IACK,EAAmB,GAAQ,EAChC,UAAU,EACZ,CAAC,IAEM,EAAoB,GAAQ,EACjC,UAAU,EACZ,CAAC,GAEF,CAAC,GAAiB,CAAc,CAAC;CAMpC,OAHS,EADL,IACM,IAGF,GAHC,EAAwB,UAAS,CAAA;AAI5C"}
1
+ {"version":3,"file":"UserAccessRequestHistoryPlace.js","names":[],"sources":["../../../../src/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.tsx"],"sourcesContent":["import {\n BreadcrumbItem,\n Breadcrumbs,\n} from '@/components/Breadcrumbs/Breadcrumbs'\nimport { useListAllUserDataAccessRequests } from '@/synapse-queries'\nimport { useGetAccessRequirements } from '@/synapse-queries/dataaccess/useAccessRequirements'\nimport { AuthenticationGuard } from '@/utils/AppUtils'\nimport { Box } from '@mui/material'\nimport { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types'\nimport { useMemo } from 'react'\nimport {\n createBrowserRouter,\n createMemoryRouter,\n Navigate,\n Outlet,\n RouteObject,\n RouterProvider,\n useLocation,\n useNavigate,\n useParams,\n} from 'react-router'\nimport { RouterProvider as DOMRouterProvider } from 'react-router/dom'\nimport AccessRequirementList, {\n RequestDataStep,\n} from '../../AccessRequirementList/AccessRequirementList'\nimport SubmissionPage from '../SubmissionPage/SubmissionPage'\nimport {\n REQUEST_ID_PARAM,\n SUBMISSION_ID_PARAM,\n USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH,\n USER_ACCESS_HISTORY_REQUEST_SUBPATH,\n USER_ACCESS_HISTORY_SUBMISSION_SUBPATH,\n} from './RouteConstants'\nimport { UserAccessRequestHistoryPage } from './UserAccessRequestHistoryPage'\n\ntype ReviewerDashboardProps = {\n /** Used to determine the base path for the component. Default is RequestHistory:default */\n routerBaseName?: string\n /** If true use a MemoryRouter, which prevents the browser URL from updating. For demo/test purposes only. */\n useMemoryRouter?: boolean\n}\n\nfunction UserSubmissionPageRouteRenderer() {\n const { submissionId } = useParams<{ [SUBMISSION_ID_PARAM]: string }>()\n if (!submissionId) {\n return <Navigate to=\"/\" />\n }\n return <SubmissionPage submissionId={submissionId} isReviewer={false} />\n}\n\n/**\n * Deep-link route element for `/request/:requestId/signature`. Rendered inside\n * `UserAccessRequestHistoryPage`'s `<Outlet />` so the page stays mounted while the dialog is open.\n * Looks up the request in the user's own access-request list, then mounts the signature-status\n * wizard step for the AR. Requests that don't belong to the user (or don't exist) redirect back\n * to the history index. The surrounding `AuthenticationGuard` handles unauthenticated visitors.\n */\nfunction RequestSignatureRouteRenderer() {\n const { requestId } = useParams<{ [REQUEST_ID_PARAM]: string }>()\n const navigate = useNavigate()\n\n const { data: summaries, isLoading: isLoadingSummaries } =\n useListAllUserDataAccessRequests({ isEDuc: true })\n const summary = summaries?.find(s => s.requestId === requestId)\n const accessRequirementId = summary?.accessRequirementId\n\n const { data: accessRequirement, isLoading: isLoadingAr } =\n useGetAccessRequirements<ManagedACTAccessRequirement>(\n accessRequirementId ?? '',\n { enabled: Boolean(accessRequirementId), staleTime: Infinity },\n )\n\n // Wait for the summary + AR to load before mounting the dialog. `UserAccessRequestHistoryPage`\n // renders its own skeletons in the meantime, so no visible spinner is needed here.\n if (isLoadingSummaries || (accessRequirementId && isLoadingAr)) {\n return null\n }\n\n // Summary not found in the user's own requests, or its access requirement failed to load.\n if (!summary || !accessRequirementId || !accessRequirement) {\n return <Navigate to=\"/\" replace />\n }\n\n return (\n <AccessRequirementList\n renderAsModal\n onHide={() => {\n void navigate('/')\n }}\n initialWizardEntry={{\n step: RequestDataStep.SIGNATURE_STATUS,\n managedACTAccessRequirement: accessRequirement,\n }}\n />\n )\n}\n\n/**\n * Layout for UserAccessRequestHistory pages. Includes header with title.\n * @constructor\n */\nfunction UserAccessRequestHistoryPageLayout() {\n return (\n <>\n <div className=\"pageHeader\">\n <div className=\"grid\">\n <h3 className=\"pageHeaderTitle\">Access Requests</h3>\n </div>\n </div>\n <Box sx={{ px: 5, py: 3 }}>\n <Outlet />\n </Box>\n </>\n )\n}\n\n/**\n * Breadcrumb layout for UserAccessRequestHistory pages. Displays breadcrumbs for navigation.\n */\nfunction UserAccessRequestHistoryBreadcrumbLayout() {\n const { submissionId } = useParams<{ [SUBMISSION_ID_PARAM]: string }>()\n const location = useLocation()\n\n const breadcrumbItems: BreadcrumbItem[] = [\n {\n text: 'Access Request History',\n to: '/',\n current: location.pathname === '/',\n },\n ]\n if (submissionId) {\n const submissionPath = `/${USER_ACCESS_HISTORY_SUBMISSION_SUBPATH}/${submissionId}`\n breadcrumbItems.push({\n text: `Request #${submissionId}`,\n to: submissionPath,\n current: location.pathname === submissionPath,\n })\n }\n\n return (\n <>\n <Breadcrumbs\n items={breadcrumbItems}\n sx={{\n mt: 2,\n mb: 4,\n ['& .MuiLink-root']: {\n color: 'text.secondary',\n letterSpacing: 0,\n '&:visited': {\n color: 'text.secondary',\n },\n },\n '& .MuiSvgIcon-root': {\n color: 'grey.500',\n },\n }}\n />\n <Outlet />\n </>\n )\n}\n\nconst routes: RouteObject[] = [\n {\n element: <UserAccessRequestHistoryPageLayout />,\n children: [\n {\n path: '/',\n children: [\n {\n // Keep the history page mounted across the index ↔ signature-deep-link transition.\n element: <UserAccessRequestHistoryPage />,\n children: [\n { index: true, element: null },\n {\n path: `${USER_ACCESS_HISTORY_REQUEST_SUBPATH}/:${REQUEST_ID_PARAM}/${USER_ACCESS_HISTORY_REQUEST_SIGNATURE_SUBPATH}`,\n element: (\n <AuthenticationGuard>\n <RequestSignatureRouteRenderer />\n </AuthenticationGuard>\n ),\n },\n ],\n },\n {\n // Do not display the breadcrumbs on the `index` page\n element: <UserAccessRequestHistoryBreadcrumbLayout />,\n children: [\n {\n path: `${USER_ACCESS_HISTORY_SUBMISSION_SUBPATH}`,\n children: [\n {\n path: `:${SUBMISSION_ID_PARAM}`,\n element: <UserSubmissionPageRouteRenderer />,\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n },\n]\n\n/**\n * Component that renders User Access Request history table & submission page. Handles routing internally.\n */\nexport function UserAccessRequestHistoryPlace(props: ReviewerDashboardProps) {\n const {\n routerBaseName = '/RequestHistory:default',\n useMemoryRouter = false,\n } = props\n\n const router = useMemo(() => {\n if (useMemoryRouter) {\n return createMemoryRouter(routes, {\n basename: routerBaseName,\n })\n } else {\n return createBrowserRouter(routes, {\n basename: routerBaseName,\n })\n }\n }, [useMemoryRouter, routerBaseName])\n\n if (useMemoryRouter) {\n return <RouterProvider router={router} />\n }\n\n return <DOMRouterProvider router={router} />\n}\n\nexport default UserAccessRequestHistoryPlace\n"],"mappings":";;;;;;;;;;;;;;;;AA0CA,SAAS,IAAkC;CACzC,IAAM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ACrE,EAAgB,KAAK;GACnB,MAAM,YAAY;GAClB,IAAI;GACJ,SAAS,EAAS,aAAa;EACjC,CAAC;CACH;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,OAAO;EACP,IAAI;GACF,IAAI;GACJ,IAAI;GACH,mBAAoB;IACnB,OAAO;IACP,eAAe;IACf,aAAa,EACX,OAAO,iBACT;GACF;GACA,sBAAsB,EACpB,OAAO,WACT;EACF;CACD,CAAA,GACD,kBAAC,GAAD,CAAS,CAAA,CACT,EAAA,CAAA;AAEN;AAEA,IAAM,IAAwB,CAC5B;CACE,SAAS,kBAAC,GAAD,CAAqC,CAAA;CAC9C,UAAU,CACR;EACE,MAAM;EACN,UAAU,CACR;GAEE,SAAS,kBAAC,GAAD,CAA+B,CAAA;GACxC,UAAU,CACR;IAAE,OAAO;IAAM,SAAS;GAAK,GAC7B;IACE,MAAM,GAAG,EAAoC,IAAI,EAAiB,GAAG;IACrE,SACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD,CAAgC,CAAA,EACb,CAAA;GAEzB,CACF;EACF,GACA;GAEE,SAAS,kBAAC,GAAD,CAA2C,CAAA;GACpD,UAAU,CACR;IACE,MAAM,GAAG;IACT,UAAU,CACR;KACE,MAAM,IAAI;KACV,SAAS,kBAAC,GAAD,CAAkC,CAAA;IAC7C,CACF;GACF,CACF;EACF,CACF;CACF,CACF;AACF,CACF;AAKA,SAAgB,EAA8B,GAA+B;CAC3E,IAAM,EACJ,oBAAiB,2BACjB,qBAAkB,OAChB,GAEE,IAAS,QACT,IACK,EAAmB,GAAQ,EAChC,UAAU,EACZ,CAAC,IAEM,EAAoB,GAAQ,EACjC,UAAU,EACZ,CAAC,GAEF,CAAC,GAAiB,CAAc,CAAC;CAMpC,OAHS,EADL,IACM,IAGF,GAHC,EAAwB,UAAS,CAAA;AAI5C"}
@@ -1 +1 @@
1
- {"version":3,"file":"EntityActionMenu.d.ts","sourceRoot":"","sources":["../../../../../src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,MAAM,MAAM,sBAAsB,GAAG;IACnC,aAAa,EAAE,eAAe,EAAE,CAAA;IAChC,mBAAmB,EAAE,eAAe,EAAE,EAAE,CAAA;IACxC,kBAAkB,EAAE,eAAe,EAAE,EAAE,CAAA;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAElC,mBAAmB,EAAE,sBAAsB,CAAA;IAE3C,iBAAiB,EAAE,oBAAoB,CAAA;IAEvC,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAA;AAMD,iBAAS,kBAAkB,CACzB,mBAAmB,EAAE,sBAAsB,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAmBxB;AAED;;;;;GAKG;AACH,iBAAS,4BAA4B,CACnC,KAAK,EAAE,eAAe,EAAE,EACxB,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,CAqBpB;AAED;;;;;;GAMG;AACH,iBAAS,sBAAsB,CAC7B,WAAW,EAAE,eAAe,EAAE,EAAE,EAChC,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,EAAE,CAYtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CA6IpE;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA"}
1
+ {"version":3,"file":"EntityActionMenu.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,WAAW,EAAE,OAAO,EAAE,K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,EAAE,EAAE,CAAA;IACxC,kBAAkB,EAAE,eAAe,EAAE,EAAE,CAAA;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,kBAAkB,EAAE,QAAQ,CAAA;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAA;IAC9B,YAAY,CAAC,EAAE,iBAAiB,CAAC,KAAK,CAAC,CAAA;IACvC,mBAAmB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAC5C,kBAAkB,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;CAC5C,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG;IAElC,mBAAmB,EAAE,sBAAsB,CAAA;IAE3C,iBAAiB,EAAE,oBAAoB,CAAA;IAEvC,MAAM,EAAE,sBAAsB,CAAA;CAC/B,CAAA;AAMD,iBAAS,kBAAkB,CACzB,mBAAmB,EAAE,sBAAsB,EAC3C,MAAM,EAAE,sBAAsB,GAC7B,sBAAsB,CAmBxB;AAED;;;;;GAKG;AACH,iBAAS,4BAA4B,CACnC,KAAK,EAAE,eAAe,EAAE,EACxB,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,CAqBpB;AAED;;;;;;GAMG;AACH,iBAAS,sBAAsB,CAC7B,WAAW,EAAE,eAAe,EAAE,EAAE,EAChC,mBAAmB,EAAE,sBAAsB,GAC1C,gBAAgB,EAAE,EAAE,CAYtB;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,2CAqJpE;AAED,eAAO,MAAM,yBAAyB;;;;CAIrC,CAAA"}
@@ -92,7 +92,9 @@ function c(o) {
92
92
  "& .MuiButton-root": {
93
93
  borderRadius: "6px",
94
94
  fontWeight: 540,
95
- padding: "10px 12px"
95
+ padding: "8px",
96
+ height: "28px",
97
+ "& svg": { fontSize: "16px" }
96
98
  },
97
99
  "& .MuiButton-outlined": {
98
100
  ...h,
@@ -110,7 +112,12 @@ function c(o) {
110
112
  textDecoration: "none"
111
113
  }
112
114
  },
113
- "& .MuiButton-root .MuiTypography-root": { fontWeight: 540 }
115
+ "& .MuiButton-root .MuiTypography-root": {
116
+ fontWeight: 540,
117
+ fontSize: "12px",
118
+ lineHeight: "12px",
119
+ letterSpacing: "-0.24px"
120
+ }
114
121
  },
115
122
  children: /* @__PURE__ */ r(t, {
116
123
  iconButtons: f,
@@ -1 +1 @@
1
- {"version":3,"file":"EntityActionMenu.js","names":[],"sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"sourcesContent":["import { Box, ButtonProps, SxProps, Theme } from '@mui/material'\nimport { ComplexMenu, ComplexMenuButtonProps } from '../../../menu/ComplexMenu'\nimport IconSvg, { IconName } from '../../../IconSvg/IconSvg'\nimport { DropdownMenuItem, DropdownMenuProps } from '../../../menu/DropdownMenu'\nimport { MouseEvent } from 'react'\nimport { SystemStyleObject } from '@mui/system'\n\nconst outlinedButtonHoverBackgroundColor = 'rgba(0, 0, 0, 0.01)'\n\n// Represents the two types of dropdown menus that will be displayed on the entity page\ntype EntityActionMenuDropdownMenuType = 'DOWNLOAD' | 'PRIMARY'\n\ntype EntityActionMenuDropdownMenuConfiguration = {\n visible: boolean\n tooltipText?: string\n disabled?: boolean\n showFileAccessRequestNotice?: boolean\n}\n\nexport type ActionConfiguration = {\n visible: boolean\n text: string\n disabled?: boolean\n tooltipText?: string\n onClick?: (e: MouseEvent) => void\n href?: string\n}\n\nexport type ActionConfigurationMap = Record<string, ActionConfiguration>\n\nexport type MenuConfigurationMap = Record<\n EntityActionMenuDropdownMenuType,\n EntityActionMenuDropdownMenuConfiguration\n>\n\nexport type ActionViewProps = {\n action: string\n icon?: IconName\n textSx?: SxProps\n iconSx?: SxProps\n variant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuLayout = {\n buttonActions: ActionViewProps[]\n downloadMenuActions: ActionViewProps[][]\n primaryMenuActions: ActionViewProps[][]\n primaryMenuText: string\n primaryMenuEndIcon: IconName\n primaryMenuEndIconSx?: SxProps\n menuButtonSx?: SystemStyleObject<Theme>\n downloadMenuVariant?: ButtonProps['variant']\n primaryMenuVariant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuProps = {\n /* Maps a unique action string to a dynamic configuration for that particular action */\n actionConfiguration: ActionConfigurationMap\n /* Maps each dropdown menu to a dynamic configuration for that particular menu */\n menuConfiguration: MenuConfigurationMap\n /* Defines the layout of the actions. Typically depends on just the entity type and area. */\n layout: EntityActionMenuLayout\n}\n\n/*\n * All visible actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\nfunction getUnmappedActions(\n actionConfiguration: ActionConfigurationMap,\n layout: EntityActionMenuLayout,\n): ActionConfigurationMap {\n return Object.fromEntries(\n Object.entries(actionConfiguration).filter(([action, config]) => {\n // We don't care about actions that are not configured or should not be visible\n if (!config || !config.visible) {\n return false\n }\n\n const allLayoutActions: ActionViewProps[] = [\n ...layout.buttonActions,\n ...layout.primaryMenuActions.flat(),\n ...layout.downloadMenuActions.flat(),\n ]\n // Action is unmapped if it's visible and the layout doesn't have it\n return !allLayoutActions.some(\n layoutAction => layoutAction.action === action,\n )\n }),\n )\n}\n\n/**\n * Given a group of dropdown menu items and an action configuration,\n * return a list of dropdown menu items with non-visible and non-configured actions removed.\n * @param group\n * @param actionConfiguration\n */\nfunction mapAndFilterItemsInMenuGroup(\n group: ActionViewProps[],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[] {\n return group.reduce(\n (itemAcc: DropdownMenuItem[], actionViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[actionViewProps.action]\n // Only show the item if it's configured + visible\n if (configForAction?.visible) {\n itemAcc.push({\n text: configForAction.text ?? actionViewProps.action,\n onClick: configForAction.onClick,\n href: configForAction.href,\n tooltipText: configForAction.tooltipText,\n disabled: configForAction.disabled,\n icon: actionViewProps.icon,\n textSx: actionViewProps.textSx,\n iconSx: actionViewProps.iconSx,\n })\n }\n return itemAcc\n },\n [],\n )\n}\n\n/**\n * Given a list of groups of dropdown menu actions, returns a list of dropdown menu item\n * groups where non-visible actions have been removed, and groups with no visible actions\n * have been removed.\n * @param menuActions\n * @param actionConfiguration\n */\nfunction mapAndFilterMenuGroups(\n menuActions: ActionViewProps[][],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[][] {\n return menuActions.reduce(\n (groupAcc: DropdownMenuItem[][], group: ActionViewProps[]) => {\n const itemGroup = mapAndFilterItemsInMenuGroup(group, actionConfiguration)\n // Only show the group if it contains visible items\n if (itemGroup.length > 0) {\n groupAcc.push(itemGroup)\n }\n return groupAcc\n },\n [],\n )\n}\n\n/**\n * The EntityActionMenu renders a menu that displays the actions that can be invoked on an Entity page.\n */\nexport default function EntityActionMenu(props: EntityActionMenuProps) {\n const { actionConfiguration, menuConfiguration, layout } = props\n\n /*\n * All actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\n const unmappedActions = getUnmappedActions(actionConfiguration, layout)\n // Warn if unmapped actions were found and push them on to the layout.\n if (Object.entries(unmappedActions).length > 0) {\n console.warn(\n 'Actions are visible but have not been configured in the layout:',\n Object.entries(unmappedActions).map(entry => entry[0]),\n )\n // Modify the layout: put the unmapped actions in their own group at the top of the menu\n layout.primaryMenuActions.unshift(\n Object.entries(unmappedActions).map(\n (entry): ActionViewProps => ({\n action: entry[0],\n }),\n ),\n )\n }\n\n // Map button actions to a button configuration and omit non-visible actions\n const iconButtonConfigs: ComplexMenuButtonProps[] =\n layout.buttonActions.reduce(\n (acc: ComplexMenuButtonProps[], buttonViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[buttonViewProps.action]\n if (configForAction?.visible) {\n let onClick = configForAction.onClick\n if (onClick == null && !configForAction.href) {\n console.warn(`No handler registered for ${buttonViewProps.action}`)\n onClick = () => {\n console.warn(\n `No handler registered for ${buttonViewProps.action}`,\n )\n }\n }\n acc.push({\n icon: buttonViewProps.icon as IconName,\n onClick: onClick,\n tooltipText: configForAction.text,\n text: configForAction.text,\n variant: buttonViewProps.variant,\n iconSx: buttonViewProps.iconSx,\n disabled: configForAction.disabled,\n href: configForAction.href,\n })\n }\n return acc\n },\n [],\n )\n\n const downloadMenuConfig: DropdownMenuProps = {\n dropdownButtonText: 'Download Options',\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.downloadMenuVariant,\n showFileAccessRequestNotice:\n menuConfiguration.DOWNLOAD.showFileAccessRequestNotice ?? false,\n paperSx: {\n borderRadius: '5px',\n border: '1px solid #E2E4EA',\n width: '279px',\n padding: '12px 16px',\n },\n elevation: 3,\n buttonTooltip: menuConfiguration.DOWNLOAD.tooltipText,\n buttonProps: {\n disabled: menuConfiguration.DOWNLOAD.disabled,\n endIcon: <IconSvg icon={'expandMore'} wrap={false} />,\n },\n items: mapAndFilterMenuGroups(\n layout.downloadMenuActions,\n actionConfiguration,\n ),\n }\n\n const primaryMenuConfig: DropdownMenuProps = {\n dropdownButtonText: layout.primaryMenuText,\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.primaryMenuVariant,\n buttonProps: {\n endIcon: (\n <IconSvg\n icon={layout.primaryMenuEndIcon}\n wrap={false}\n sx={layout.primaryMenuEndIconSx}\n />\n ),\n },\n items: mapAndFilterMenuGroups(\n layout.primaryMenuActions,\n actionConfiguration,\n ),\n }\n\n const menuButtonSx = layout.menuButtonSx ?? {}\n\n return (\n <Box\n sx={{\n '& .MuiButton-root': {\n borderRadius: '6px',\n fontWeight: 540,\n padding: '10px 12px',\n },\n // Optional per-layout overrides (e.g. background/border color for entity\n // menu buttons).\n '& .MuiButton-outlined': {\n ...menuButtonSx,\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n },\n },\n '& .MuiButton-text': {\n ...menuButtonSx,\n backgroundColor: 'transparent',\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n textDecoration: 'none',\n },\n },\n '& .MuiButton-root .MuiTypography-root': {\n fontWeight: 540,\n },\n }}\n >\n <ComplexMenu\n iconButtons={iconButtonConfigs}\n dropdownMenus={[primaryMenuConfig, downloadMenuConfig]}\n />\n </Box>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = {\n getUnmappedActions,\n mapAndFilterItemsInMenuGroup,\n mapAndFilterMenuGroups,\n}\n"],"mappings":";;;;;AAOA,IAAM,IAAqC;AA6D3C,SAAS,EACP,GACA,GACwB;CACxB,OAAO,OAAO,YACZ,OAAO,QAAQ,CAAmB,EAAE,QAAQ,CAAC,GAAQ,OAE/C,CAAC,KAAU,CAAC,EAAO,UACd,KASF,CAAC;EALN,GAAG,EAAO;EACV,GAAG,EAAO,mBAAmB,KAAK;EAClC,GAAG,EAAO,oBAAoB,KAAK;CAG7B,EAAiB,MACvB,MAAgB,EAAa,WAAW,CAC1C,CACD,CACH;AACF;AAQA,SAAS,EACP,GACA,GACoB;CACpB,OAAO,EAAM,QACV,GAA6B,MAAqC;EACjE,IAAM,IAAkB,EAAoB,EAAgB;EAc5D,OAZI,GAAiB,WACnB,EAAQ,KAAK;GACX,MAAM,EAAgB,QAAQ,EAAgB;GAC9C,SAAS,EAAgB;GACzB,MAAM,EAAgB;GACtB,aAAa,EAAgB;GAC7B,UAAU,EAAgB;GAC1B,MAAM,EAAgB;GACtB,QAAQ,EAAgB;GACxB,QAAQ,EAAgB;EAC1B,CAAC,GAEI;CACT,GACA,CAAC,CACH;AACF;AASA,SAAS,EACP,GACA,GACsB;CACtB,OAAO,EAAY,QAChB,GAAgC,MAA6B;EAC5D,IAAM,IAAY,EAA6B,GAAO,CAAmB;EAKzE,OAHI,EAAU,SAAS,KACrB,EAAS,KAAK,CAAS,GAElB;CACT,GACA,CAAC,CACH;AACF;AAKA,SAAwB,EAAiB,GAA8B;CACrE,IAAM,EAAE,wBAAqB,sBAAmB,cAAW,GAMrD,IAAkB,EAAmB,GAAqB,CAAM;CAEtE,AAAI,OAAO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AO,EACL,EAAO,oBACP,CACF;CACF,GAEM,IAAe,EAAO,gBAAgB,CAAC;CAE7C,OACE,kBAAC,GAAD;EACE,IAAI;GACF,qBAAqB;IACnB,cAAc;IACd,YAAY;IACZ,SAAS;GACX;GAGA,yBAAyB;IACvB,GAAG;IAEH,WAAW;KACT,GAAG;KACH,iBAAiB;IACnB;GACF;GACA,qBAAqB;IACnB,GAAG;IACH,iBAAiB;IAEjB,WAAW;KACT,GAAG;KACH,iBAAiB;KACjB,gBAAgB;IAClB;GACF;GACA,yCAAyC,EACvC,YAAY,IACd;EACF;YAEA,kBAAC,GAAD;GACE,aAAa;GACb,eAAe,CAAC,GAAmB,CAAkB;EACtD,CAAA;CACE,CAAA;AAET;AAEA,IAAa,IAA4B;CACvC;CACA;CACA;AACF"}
1
+ {"version":3,"file":"EntityActionMenu.js","names":[],"sources":["../../../../../src/components/entity/page/action_menu/EntityActionMenu.tsx"],"sourcesContent":["import { Box, ButtonProps, SxProps, Theme } from '@mui/material'\nimport { ComplexMenu, ComplexMenuButtonProps } from '../../../menu/ComplexMenu'\nimport IconSvg, { IconName } from '../../../IconSvg/IconSvg'\nimport { DropdownMenuItem, DropdownMenuProps } from '../../../menu/DropdownMenu'\nimport { MouseEvent } from 'react'\nimport { SystemStyleObject } from '@mui/system'\n\nconst outlinedButtonHoverBackgroundColor = 'rgba(0, 0, 0, 0.01)'\n\n// Represents the two types of dropdown menus that will be displayed on the entity page\ntype EntityActionMenuDropdownMenuType = 'DOWNLOAD' | 'PRIMARY'\n\ntype EntityActionMenuDropdownMenuConfiguration = {\n visible: boolean\n tooltipText?: string\n disabled?: boolean\n showFileAccessRequestNotice?: boolean\n}\n\nexport type ActionConfiguration = {\n visible: boolean\n text: string\n disabled?: boolean\n tooltipText?: string\n onClick?: (e: MouseEvent) => void\n href?: string\n}\n\nexport type ActionConfigurationMap = Record<string, ActionConfiguration>\n\nexport type MenuConfigurationMap = Record<\n EntityActionMenuDropdownMenuType,\n EntityActionMenuDropdownMenuConfiguration\n>\n\nexport type ActionViewProps = {\n action: string\n icon?: IconName\n textSx?: SxProps\n iconSx?: SxProps\n variant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuLayout = {\n buttonActions: ActionViewProps[]\n downloadMenuActions: ActionViewProps[][]\n primaryMenuActions: ActionViewProps[][]\n primaryMenuText: string\n primaryMenuEndIcon: IconName\n primaryMenuEndIconSx?: SxProps\n menuButtonSx?: SystemStyleObject<Theme>\n downloadMenuVariant?: ButtonProps['variant']\n primaryMenuVariant?: ButtonProps['variant']\n}\n\nexport type EntityActionMenuProps = {\n /* Maps a unique action string to a dynamic configuration for that particular action */\n actionConfiguration: ActionConfigurationMap\n /* Maps each dropdown menu to a dynamic configuration for that particular menu */\n menuConfiguration: MenuConfigurationMap\n /* Defines the layout of the actions. Typically depends on just the entity type and area. */\n layout: EntityActionMenuLayout\n}\n\n/*\n * All visible actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\nfunction getUnmappedActions(\n actionConfiguration: ActionConfigurationMap,\n layout: EntityActionMenuLayout,\n): ActionConfigurationMap {\n return Object.fromEntries(\n Object.entries(actionConfiguration).filter(([action, config]) => {\n // We don't care about actions that are not configured or should not be visible\n if (!config || !config.visible) {\n return false\n }\n\n const allLayoutActions: ActionViewProps[] = [\n ...layout.buttonActions,\n ...layout.primaryMenuActions.flat(),\n ...layout.downloadMenuActions.flat(),\n ]\n // Action is unmapped if it's visible and the layout doesn't have it\n return !allLayoutActions.some(\n layoutAction => layoutAction.action === action,\n )\n }),\n )\n}\n\n/**\n * Given a group of dropdown menu items and an action configuration,\n * return a list of dropdown menu items with non-visible and non-configured actions removed.\n * @param group\n * @param actionConfiguration\n */\nfunction mapAndFilterItemsInMenuGroup(\n group: ActionViewProps[],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[] {\n return group.reduce(\n (itemAcc: DropdownMenuItem[], actionViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[actionViewProps.action]\n // Only show the item if it's configured + visible\n if (configForAction?.visible) {\n itemAcc.push({\n text: configForAction.text ?? actionViewProps.action,\n onClick: configForAction.onClick,\n href: configForAction.href,\n tooltipText: configForAction.tooltipText,\n disabled: configForAction.disabled,\n icon: actionViewProps.icon,\n textSx: actionViewProps.textSx,\n iconSx: actionViewProps.iconSx,\n })\n }\n return itemAcc\n },\n [],\n )\n}\n\n/**\n * Given a list of groups of dropdown menu actions, returns a list of dropdown menu item\n * groups where non-visible actions have been removed, and groups with no visible actions\n * have been removed.\n * @param menuActions\n * @param actionConfiguration\n */\nfunction mapAndFilterMenuGroups(\n menuActions: ActionViewProps[][],\n actionConfiguration: ActionConfigurationMap,\n): DropdownMenuItem[][] {\n return menuActions.reduce(\n (groupAcc: DropdownMenuItem[][], group: ActionViewProps[]) => {\n const itemGroup = mapAndFilterItemsInMenuGroup(group, actionConfiguration)\n // Only show the group if it contains visible items\n if (itemGroup.length > 0) {\n groupAcc.push(itemGroup)\n }\n return groupAcc\n },\n [],\n )\n}\n\n/**\n * The EntityActionMenu renders a menu that displays the actions that can be invoked on an Entity page.\n */\nexport default function EntityActionMenu(props: EntityActionMenuProps) {\n const { actionConfiguration, menuConfiguration, layout } = props\n\n /*\n * All actions should be specified in the layout, but this is not guaranteed at compile time.\n * Find all visible actions in the action configuration that are not in the layout.\n */\n const unmappedActions = getUnmappedActions(actionConfiguration, layout)\n // Warn if unmapped actions were found and push them on to the layout.\n if (Object.entries(unmappedActions).length > 0) {\n console.warn(\n 'Actions are visible but have not been configured in the layout:',\n Object.entries(unmappedActions).map(entry => entry[0]),\n )\n // Modify the layout: put the unmapped actions in their own group at the top of the menu\n layout.primaryMenuActions.unshift(\n Object.entries(unmappedActions).map(\n (entry): ActionViewProps => ({\n action: entry[0],\n }),\n ),\n )\n }\n\n // Map button actions to a button configuration and omit non-visible actions\n const iconButtonConfigs: ComplexMenuButtonProps[] =\n layout.buttonActions.reduce(\n (acc: ComplexMenuButtonProps[], buttonViewProps: ActionViewProps) => {\n const configForAction = actionConfiguration[buttonViewProps.action]\n if (configForAction?.visible) {\n let onClick = configForAction.onClick\n if (onClick == null && !configForAction.href) {\n console.warn(`No handler registered for ${buttonViewProps.action}`)\n onClick = () => {\n console.warn(\n `No handler registered for ${buttonViewProps.action}`,\n )\n }\n }\n acc.push({\n icon: buttonViewProps.icon as IconName,\n onClick: onClick,\n tooltipText: configForAction.text,\n text: configForAction.text,\n variant: buttonViewProps.variant,\n iconSx: buttonViewProps.iconSx,\n disabled: configForAction.disabled,\n href: configForAction.href,\n })\n }\n return acc\n },\n [],\n )\n\n const downloadMenuConfig: DropdownMenuProps = {\n dropdownButtonText: 'Download Options',\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.downloadMenuVariant,\n showFileAccessRequestNotice:\n menuConfiguration.DOWNLOAD.showFileAccessRequestNotice ?? false,\n paperSx: {\n borderRadius: '5px',\n border: '1px solid #E2E4EA',\n width: '279px',\n padding: '12px 16px',\n },\n elevation: 3,\n buttonTooltip: menuConfiguration.DOWNLOAD.tooltipText,\n buttonProps: {\n disabled: menuConfiguration.DOWNLOAD.disabled,\n endIcon: <IconSvg icon={'expandMore'} wrap={false} />,\n },\n items: mapAndFilterMenuGroups(\n layout.downloadMenuActions,\n actionConfiguration,\n ),\n }\n\n const primaryMenuConfig: DropdownMenuProps = {\n dropdownButtonText: layout.primaryMenuText,\n convertSingleItemToButton: true,\n renderMenuIfNoItems: false,\n variant: layout.primaryMenuVariant,\n buttonProps: {\n endIcon: (\n <IconSvg\n icon={layout.primaryMenuEndIcon}\n wrap={false}\n sx={layout.primaryMenuEndIconSx}\n />\n ),\n },\n items: mapAndFilterMenuGroups(\n layout.primaryMenuActions,\n actionConfiguration,\n ),\n }\n\n const menuButtonSx = layout.menuButtonSx ?? {}\n\n return (\n <Box\n sx={{\n '& .MuiButton-root': {\n borderRadius: '6px',\n fontWeight: 540,\n padding: '8px',\n height: '28px',\n\n '& svg': {\n fontSize: '16px',\n },\n },\n // Optional per-layout overrides (e.g. background/border color for entity\n // menu buttons).\n '& .MuiButton-outlined': {\n ...menuButtonSx,\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n },\n },\n '& .MuiButton-text': {\n ...menuButtonSx,\n backgroundColor: 'transparent',\n\n '&:hover': {\n ...menuButtonSx,\n backgroundColor: outlinedButtonHoverBackgroundColor,\n textDecoration: 'none',\n },\n },\n '& .MuiButton-root .MuiTypography-root': {\n fontWeight: 540,\n fontSize: '12px',\n lineHeight: '12px',\n letterSpacing: '-0.24px',\n },\n }}\n >\n <ComplexMenu\n iconButtons={iconButtonConfigs}\n dropdownMenus={[primaryMenuConfig, downloadMenuConfig]}\n />\n </Box>\n )\n}\n\nexport const EXPORTED_FOR_UNIT_TESTING = {\n getUnmappedActions,\n mapAndFilterItemsInMenuGroup,\n mapAndFilterMenuGroups,\n}\n"],"mappings":";;;;;AAOA,IAAM,IAAqC;AA6D3C,SAAS,EACP,GACA,GACwB;CACxB,OAAO,OAAO,YACZ,OAAO,QAAQ,CAAmB,EAAE,QAAQ,CAAC,GAAQ,OAE/C,CAAC,KAAU,CAAC,EAAO,UACd,KASF,CAAC;EALN,GAAG,EAAO;EACV,GAAG,EAAO,mBAAmB,KAAK;EAClC,GAAG,EAAO,oBAAoB,KAAK;CAG7B,EAAiB,MACvB,MAAgB,EAAa,WAAW,CAC1C,CACD,CACH;AACF;AAQA,SAAS,EACP,GACA,GACoB;CACpB,OAAO,EAAM,QACV,GAA6B,MAAqC;EACjE,IAAM,IAAkB,EAAoB,EAAgB;EAc5D,OAZI,GAAiB,WACnB,EAAQ,KAAK;GACX,MAAM,EAAgB,QAAQ,EAAgB;GAC9C,SAAS,EAAgB;GACzB,MAAM,EAAgB;GACtB,aAAa,EAAgB;GAC7B,UAAU,EAAgB;GAC1B,MAAM,EAAgB;GACtB,QAAQ,EAAgB;GACxB,QAAQ,EAAgB;EAC1B,CAAC,GAEI;CACT,GACA,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Aa;GACX,UAAU,EAAkB,SAAS;GACrC,SAAS,kBAAC,GAAD;IAAS,MAAM;IAAc,MAAM;GAAQ,CAAA;EACtD;EACA,OAAO,EACL,EAAO,qBACP,CACF;CACF,GAEM,IAAuC;EAC3C,oBAAoB,EAAO;EAC3B,2BAA2B;EAC3B,qBAAqB;EACrB,SAAS,EAAO;EAChB,aAAa,EACX,SACE,kBAAC,GAAD;GACE,MAAM,EAAO;GACb,MAAM;GACN,IAAI,EAAO;EACZ,CAAA,EAEL;EACA,OAAO,EACL,EAAO,oBACP,CACF;CACF,GAEM,IAAe,EAAO,gBAAgB,CAAC;CAE7C,OACE,kBAAC,GAAD;EACE,IAAI;GACF,qBAAqB;IACnB,cAAc;IACd,YAAY;IACZ,SAAS;IACT,QAAQ;IAER,SAAS,EACP,UAAU,OACZ;GACF;GAGA,yBAAyB;IACvB,GAAG;IAEH,WAAW;KACT,GAAG;KACH,iBAAiB;IACnB;GACF;GACA,qBAAqB;IACnB,GAAG;IACH,iBAAiB;IAEjB,WAAW;KACT,GAAG;KACH,iBAAiB;KACjB,gBAAgB;IAClB;GACF;GACA,yCAAyC;IACvC,YAAY;IACZ,UAAU;IACV,YAAY;IACZ,eAAe;GACjB;EACF;YAEA,kBAAC,GAAD;GACE,aAAa;GACb,eAAe,CAAC,GAAmB,CAAkB;EACtD,CAAA;CACE,CAAA;AAET;AAEA,IAAa,IAA4B;CACvC;CACA;CACA;AACF"}
@@ -3,7 +3,6 @@ export type EntityPageTitleBarProps = {
3
3
  entityId: string;
4
4
  versionNumber?: number;
5
5
  entityActionMenuProps?: EntityActionMenuProps;
6
- onActMemberClickAddConditionsForUse: () => void;
7
6
  };
8
7
  /**
9
8
  * The EntityPageTitleBar component is shown on every Entity page in Synapse, and shows an Entity's metadata and
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageTitleBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"names":[],"mappings":"AAMA,OAAyB,EACvB,qBAAqB,EACtB,MAAM,iCAAiC,CAAA;AAKxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;IAE7C,mCAAmC,EAAE,MAAM,IAAI,CAAA;CAChD,CAAA;AAKD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAuHxE"}
1
+ {"version":3,"file":"EntityPageTitleBar.d.ts","sourceRoot":"","sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"names":[],"mappings":"AAMA,OAAyB,EACvB,qBAAqB,EACtB,MAAM,iCAAiC,CAAA;AAIxC,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,qBAAqB,CAAC,EAAE,qBAAqB,CAAA;CAC9C,CAAA;AAKD;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,KAAK,EAAE,uBAAuB,2CAsHxE"}
@@ -6,21 +6,20 @@ import i from "../../../utils/ConditionalWrapper.js";
6
6
  import a from "../../../favorites/FavoriteButton.js";
7
7
  import o from "../action_menu/EntityActionMenu.js";
8
8
  import { EntityTitleBarVersionInfo as s } from "./EntityTitleBarVersionInfo.js";
9
- import c from "./TitleBarProperties.js";
10
- import { CopyToClipboardString as l } from "../../../CopyToClipboardString/CopyToClipboardString.js";
11
- import { Avatar as u, Box as d, Skeleton as f, Stack as p, Typography as m } from "@mui/material";
12
- import { jsx as h, jsxs as g } from "react/jsx-runtime";
9
+ import { CopyToClipboardString as c } from "../../../CopyToClipboardString/CopyToClipboardString.js";
10
+ import { Avatar as l, Box as u, Skeleton as d, Stack as f, Typography as p } from "@mui/material";
11
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
13
12
  //#region src/components/entity/page/title_bar/EntityPageTitleBar.tsx
14
- var _ = "#EAF0F5", v = "#497097";
15
- function y(y) {
16
- let { entityId: b, versionNumber: x, entityActionMenuProps: S } = y, C = S?.actionConfiguration.SHOW_VERSION_HISTORY?.onClick, { data: w, isLoading: T } = t(b, x), E = w?.entity && e(w.entity) ? w.entity.repositoryName : w?.entity?.name;
17
- return /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h(d, {
13
+ var g = "#EAF0F5", _ = "#497097";
14
+ function v(v) {
15
+ let { entityId: y, versionNumber: b, entityActionMenuProps: x } = v, S = x?.actionConfiguration.SHOW_VERSION_HISTORY?.onClick, { data: C, isLoading: w } = t(y, b), T = C?.entity && e(C.entity) ? C.entity.repositoryName : C?.entity?.name;
16
+ return /* @__PURE__ */ m("div", { children: /* @__PURE__ */ m(u, {
18
17
  sx: {
19
- padding: "20px 40px",
20
- backgroundColor: _,
18
+ padding: "10px 16px",
19
+ backgroundColor: g,
21
20
  borderRadius: "5px"
22
21
  },
23
- children: /* @__PURE__ */ g(p, {
22
+ children: /* @__PURE__ */ h(f, {
24
23
  sx: {
25
24
  flexDirection: {
26
25
  xs: "column",
@@ -28,19 +27,19 @@ function y(y) {
28
27
  },
29
28
  alignItems: "center"
30
29
  },
31
- children: [/* @__PURE__ */ g(p, {
30
+ children: [/* @__PURE__ */ h(f, {
32
31
  direction: "row",
33
32
  sx: {
34
33
  alignItems: "center",
35
34
  flexGrow: 1
36
35
  },
37
- children: [/* @__PURE__ */ h(i, {
38
- condition: T,
39
- wrapper: f,
36
+ children: [/* @__PURE__ */ m(i, {
37
+ condition: w,
38
+ wrapper: d,
40
39
  wrapperProps: { variant: "circular" },
41
- children: /* @__PURE__ */ h(u, {
40
+ children: /* @__PURE__ */ m(l, {
42
41
  sx: {
43
- bgcolor: v,
42
+ bgcolor: _,
44
43
  height: 68,
45
44
  width: 68,
46
45
  borderRadius: "3px",
@@ -50,46 +49,46 @@ function y(y) {
50
49
  }
51
50
  },
52
51
  variant: "square",
53
- children: w?.entityType && /* @__PURE__ */ h(n, {
54
- icon: w?.entityType ? r[w.entityType] : "file",
52
+ children: C?.entityType && /* @__PURE__ */ m(n, {
53
+ icon: C?.entityType ? r[C.entityType] : "file",
55
54
  wrap: !1
56
55
  })
57
56
  })
58
- }), /* @__PURE__ */ g(d, {
57
+ }), /* @__PURE__ */ h(u, {
59
58
  sx: {
60
59
  marginLeft: "10px",
61
60
  flexGrow: 1
62
61
  },
63
62
  children: [
64
- /* @__PURE__ */ g(p, {
63
+ /* @__PURE__ */ h(f, {
65
64
  direction: "row",
66
65
  sx: {
67
66
  alignItems: "center",
68
67
  gap: "3px"
69
68
  },
70
- children: [/* @__PURE__ */ h(i, {
71
- condition: T,
72
- wrapper: f,
73
- children: /* @__PURE__ */ h(m, {
69
+ children: [/* @__PURE__ */ m(i, {
70
+ condition: w,
71
+ wrapper: d,
72
+ children: /* @__PURE__ */ m(p, {
74
73
  variant: "headline2",
75
74
  sx: {
76
75
  color: "greyV2.950",
77
76
  fontWeight: 540
78
77
  },
79
- children: E ?? "Name not set"
78
+ children: T ?? "Name not set"
80
79
  })
81
- }), w?.entity?.id && /* @__PURE__ */ h(a, {
82
- entityId: w.entity.id,
80
+ }), C?.entity?.id && /* @__PURE__ */ m(a, {
81
+ entityId: C.entity.id,
83
82
  iconColor: "greyV2.400"
84
83
  })]
85
84
  }),
86
- /* @__PURE__ */ h(s, {
87
- entityId: b,
88
- versionNumber: x,
89
- toggleShowVersionHistory: C
85
+ /* @__PURE__ */ m(s, {
86
+ entityId: y,
87
+ versionNumber: b,
88
+ toggleShowVersionHistory: S
90
89
  }),
91
- /* @__PURE__ */ h(l, {
92
- value: b,
90
+ /* @__PURE__ */ m(c, {
91
+ value: y,
93
92
  icon: "rounded",
94
93
  sx: { "& .MuiTypography-root": {
95
94
  color: "greyV2.800",
@@ -99,11 +98,11 @@ function y(y) {
99
98
  })
100
99
  ]
101
100
  })]
102
- }), S && /* @__PURE__ */ h(o, { ...S })]
101
+ }), x && /* @__PURE__ */ m(o, { ...x })]
103
102
  })
104
- }), /* @__PURE__ */ h(c, { ...y })] });
103
+ }) });
105
104
  }
106
105
  //#endregion
107
- export { y as default };
106
+ export { v as default };
108
107
 
109
108
  //# sourceMappingURL=EntityPageTitleBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EntityPageTitleBar.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { useGetEntityBundle } from '@/synapse-queries'\nimport { isDockerRepository } from '@/utils/types/IsType'\nimport { Avatar, Box, Skeleton, Stack, Typography } from '@mui/material'\nimport FavoriteButton from '../../../favorites/FavoriteButton'\nimport IconSvg, { type2SvgIconName } from '../../../IconSvg/IconSvg'\nimport EntityActionMenu, {\n EntityActionMenuProps,\n} from '../action_menu/EntityActionMenu'\nimport { EntityTitleBarVersionInfo } from './EntityTitleBarVersionInfo'\nimport TitleBarProperties from './TitleBarProperties'\nimport CopyToClipboardString from '@/components/CopyToClipboardString/CopyToClipboardString'\n\nexport type EntityPageTitleBarProps = {\n entityId: string\n versionNumber?: number\n /* Props that will be passed through to an EntityActionMenu component */\n entityActionMenuProps?: EntityActionMenuProps\n /* Callback invoked when an ACT member clicks \"Add Conditions for Use\". */\n onActMemberClickAddConditionsForUse: () => void\n}\n\nconst TITLE_BAR_BACKGROUND_COLOR = '#EAF0F5'\nconst AVATAR_BACKGROUND_COLOR = '#497097'\n\n/**\n * The EntityPageTitleBar component is shown on every Entity page in Synapse, and shows an Entity's metadata and\n * provides controls to view and manipulate the Entity.\n */\nexport default function EntityPageTitleBar(props: EntityPageTitleBarProps) {\n const { entityId, versionNumber, entityActionMenuProps } = props\n\n const toggleShowVersionHistory =\n entityActionMenuProps?.actionConfiguration['SHOW_VERSION_HISTORY']?.onClick\n\n const { data: bundle, isLoading } = useGetEntityBundle(\n entityId,\n versionNumber,\n )\n\n const name =\n bundle?.entity && isDockerRepository(bundle.entity)\n ? bundle.entity.repositoryName\n : bundle?.entity?.name\n\n return (\n <div>\n <Box\n sx={{\n padding: '20px 40px',\n backgroundColor: TITLE_BAR_BACKGROUND_COLOR,\n borderRadius: '5px',\n }}\n >\n <Stack\n sx={{\n flexDirection: { xs: 'column', md: 'row' },\n alignItems: 'center',\n }}\n >\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n flexGrow: 1,\n }}\n >\n <ConditionalWrapper\n condition={isLoading}\n wrapper={Skeleton}\n wrapperProps={{\n variant: 'circular',\n }}\n >\n <Avatar\n sx={{\n bgcolor: AVATAR_BACKGROUND_COLOR,\n height: 68,\n width: 68,\n borderRadius: '3px',\n svg: {\n height: '36px',\n width: '36px',\n },\n }}\n variant={'square'}\n >\n {bundle?.entityType && (\n <IconSvg\n icon={\n bundle?.entityType\n ? type2SvgIconName[bundle.entityType]\n : 'file'\n }\n wrap={false}\n />\n )}\n </Avatar>\n </ConditionalWrapper>\n <Box sx={{ marginLeft: '10px', flexGrow: 1 }}>\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n gap: '3px',\n }}\n >\n <ConditionalWrapper condition={isLoading} wrapper={Skeleton}>\n <Typography\n variant={'headline2'}\n sx={{ color: 'greyV2.950', fontWeight: 540 }}\n >\n {name ?? 'Name not set'}\n </Typography>\n </ConditionalWrapper>\n {bundle?.entity?.id && (\n <FavoriteButton\n entityId={bundle.entity.id}\n iconColor={'greyV2.400'}\n />\n )}\n </Stack>\n <EntityTitleBarVersionInfo\n entityId={entityId}\n versionNumber={versionNumber}\n toggleShowVersionHistory={toggleShowVersionHistory}\n />\n <CopyToClipboardString\n value={entityId}\n icon=\"rounded\"\n sx={{\n '& .MuiTypography-root': {\n color: 'greyV2.800',\n fontWeight: 440,\n lineHeight: '20px',\n },\n }}\n />\n </Box>\n </Stack>\n {entityActionMenuProps && (\n <EntityActionMenu {...entityActionMenuProps} />\n )}\n </Stack>\n </Box>\n <TitleBarProperties {...props}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AC,GAAD;QACE,UAAU,EAAO,OAAO;QACxB,WAAW;OACZ,CAAA,CAEE;;MACP,kBAAC,GAAD;OACY;OACK;OACW;MAC3B,CAAA;MACD,kBAAC,GAAD;OACE,OAAO;OACP,MAAK;OACL,IAAI,EACF,yBAAyB;QACvB,OAAO;QACP,YAAY;QACZ,YAAY;OACd,EACF;MACD,CAAA;KACE;MACA;OACN,KACC,kBAAC,GAAD,EAAkB,GAAI,EAAwB,CAAA,CAE3C;;CACJ,CAAA,GACL,kBAAC,GAAD,EAAoB,GAAI,EAAQ,CAAA,CAC7B,EAAA,CAAA;AAET"}
1
+ {"version":3,"file":"EntityPageTitleBar.js","names":[],"sources":["../../../../../src/components/entity/page/title_bar/EntityPageTitleBar.tsx"],"sourcesContent":["import ConditionalWrapper from '@/components/utils/ConditionalWrapper'\nimport { useGetEntityBundle } from '@/synapse-queries'\nimport { isDockerRepository } from '@/utils/types/IsType'\nimport { Avatar, Box, Skeleton, Stack, Typography } from '@mui/material'\nimport FavoriteButton from '../../../favorites/FavoriteButton'\nimport IconSvg, { type2SvgIconName } from '../../../IconSvg/IconSvg'\nimport EntityActionMenu, {\n EntityActionMenuProps,\n} from '../action_menu/EntityActionMenu'\nimport { EntityTitleBarVersionInfo } from './EntityTitleBarVersionInfo'\nimport CopyToClipboardString from '@/components/CopyToClipboardString/CopyToClipboardString'\n\nexport type EntityPageTitleBarProps = {\n entityId: string\n versionNumber?: number\n /* Props that will be passed through to an EntityActionMenu component */\n entityActionMenuProps?: EntityActionMenuProps\n}\n\nconst TITLE_BAR_BACKGROUND_COLOR = '#EAF0F5'\nconst AVATAR_BACKGROUND_COLOR = '#497097'\n\n/**\n * The EntityPageTitleBar component is shown on every Entity page in Synapse, and shows an Entity's metadata and\n * provides controls to view and manipulate the Entity.\n */\nexport default function EntityPageTitleBar(props: EntityPageTitleBarProps) {\n const { entityId, versionNumber, entityActionMenuProps } = props\n\n const toggleShowVersionHistory =\n entityActionMenuProps?.actionConfiguration['SHOW_VERSION_HISTORY']?.onClick\n\n const { data: bundle, isLoading } = useGetEntityBundle(\n entityId,\n versionNumber,\n )\n\n const name =\n bundle?.entity && isDockerRepository(bundle.entity)\n ? bundle.entity.repositoryName\n : bundle?.entity?.name\n\n return (\n <div>\n <Box\n sx={{\n padding: '10px 16px',\n backgroundColor: TITLE_BAR_BACKGROUND_COLOR,\n borderRadius: '5px',\n }}\n >\n <Stack\n sx={{\n flexDirection: { xs: 'column', md: 'row' },\n alignItems: 'center',\n }}\n >\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n flexGrow: 1,\n }}\n >\n <ConditionalWrapper\n condition={isLoading}\n wrapper={Skeleton}\n wrapperProps={{\n variant: 'circular',\n }}\n >\n <Avatar\n sx={{\n bgcolor: AVATAR_BACKGROUND_COLOR,\n height: 68,\n width: 68,\n borderRadius: '3px',\n svg: {\n height: '36px',\n width: '36px',\n },\n }}\n variant={'square'}\n >\n {bundle?.entityType && (\n <IconSvg\n icon={\n bundle?.entityType\n ? type2SvgIconName[bundle.entityType]\n : 'file'\n }\n wrap={false}\n />\n )}\n </Avatar>\n </ConditionalWrapper>\n <Box sx={{ marginLeft: '10px', flexGrow: 1 }}>\n <Stack\n direction={'row'}\n sx={{\n alignItems: 'center',\n gap: '3px',\n }}\n >\n <ConditionalWrapper condition={isLoading} wrapper={Skeleton}>\n <Typography\n variant={'headline2'}\n sx={{ color: 'greyV2.950', fontWeight: 540 }}\n >\n {name ?? 'Name not set'}\n </Typography>\n </ConditionalWrapper>\n {bundle?.entity?.id && (\n <FavoriteButton\n entityId={bundle.entity.id}\n iconColor={'greyV2.400'}\n />\n )}\n </Stack>\n <EntityTitleBarVersionInfo\n entityId={entityId}\n versionNumber={versionNumber}\n toggleShowVersionHistory={toggleShowVersionHistory}\n />\n <CopyToClipboardString\n value={entityId}\n icon=\"rounded\"\n sx={{\n '& .MuiTypography-root': {\n color: 'greyV2.800',\n fontWeight: 440,\n lineHeight: '20px',\n },\n }}\n />\n </Box>\n </Stack>\n {entityActionMenuProps && (\n <EntityActionMenu {...entityActionMenuProps} />\n )}\n </Stack>\n </Box>\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAmBA,IAAM,IAA6B,WAC7B,IAA0B;AAMhC,SAAwB,EAAmB,GAAgC;CACzE,IAAM,EAAE,aAAU,kBAAe,6BAA0B,GAErD,IACJ,GAAuB,oBAAoB,sBAAyB,SAEhE,EAAE,MAAM,GAAQ,iBAAc,EAClC,GACA,CACF,GAEM,IACJ,GAAQ,UAAU,EAAmB,EAAO,MAAM,IAC9C,EAAO,OAAO,iBACd,GAAQ,QAAQ;CAEtB,OACE,kBAAC,OAAD,EAAA,UACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,iBAAiB;GACjB,cAAc;EAChB;YAEA,kBAAC,GAAD;GACE,IAAI;IACF,eAAe;KAAE,IAAI;KAAU,IAAI;IAAM;IACzC,YAAY;GACd;aAJF,CAME,kBAAC,GAAD;IACE,WAAW;IACX,IAAI;KACF,YAAY;KACZ,UAAU;IACZ;cALF,CAOE,kBAAC,GAAD;KACE,WAAW;KACX,SAAS;KACT,cAAc,EACZ,SAAS,WACX;eAEA,kBAAC,GAAD;MACE,IAAI;OACF,SAAS;OACT,QAAQ;OACR,OAAO;OACP,cAAc;OACd,KAAK;QACH,QAAQ;QACR,OAAO;OACT;MACF;MACA,SAAS;gBAER,GAAQ,cACP,kBAAC,GAAD;OACE,MACE,GAAQ,aACJ,EAAiB,EAAO,cACxB;OAEN,MAAM;MACP,CAAA;KAEG,CAAA;IACU,CAAA,GACpB,kBAAC,GAAD;KAAK,IAAI;MAAE,YAAY;MAAQ,UAAU;KAAE;eAA3C;MACE,kBAAC,GAAD;OACE,WAAW;OACX,IAAI;QACF,YAAY;QACZ,KAAK;OACP;iBALF,CAOE,kBAAC,GAAD;QAAoB,WAAW;QAAW,SAAS;kBACjD,kBAAC,GAAD;SACE,SAAS;SACT,IAAI;UAAE,OAAO;UAAc,YAAY;SAAI;mBAE1C,KAAQ;QACC,CAAA;OACM,CAAA,GACnB,GAAQ,QAAQ,MACf,kBAAC,GAAD;QACE,UAAU,EAAO,OAAO;QACxB,WAAW;OACZ,CAAA,CAEE;;MACP,kBAAC,GAAD;OACY;OACK;OACW;MAC3B,CAAA;MACD,kBAAC,GAAD;OACE,OAAO;OACP,MAAK;OACL,IAAI,EACF,yBAAyB;QACvB,OAAO;QACP,YAAY;QACZ,YAAY;OACd,EACF;MACD,CAAA;KACE;MACA;OACN,KACC,kBAAC,GAAD,EAAkB,GAAI,EAAwB,CAAA,CAE3C;;CACJ,CAAA,EACF,CAAA;AAET"}
@@ -10,7 +10,7 @@ function u(u) {
10
10
  sx: (e) => ({
11
11
  display: "flex",
12
12
  alignItems: "center",
13
- gap: "10px",
13
+ gap: "6px",
14
14
  flexWrap: "wrap",
15
15
  justifyContent: "flex-end",
16
16
  [e.breakpoints.down("md")]: { flexDirection: "column" }
@@ -1 +1 @@
1
- {"version":3,"file":"ComplexMenu.js","names":[],"sources":["../../../src/components/menu/ComplexMenu.tsx"],"sourcesContent":["import {\n Box,\n Button,\n ButtonProps,\n SxProps,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material'\nimport { DropdownMenu, DropdownMenuProps } from './DropdownMenu'\nimport { IconSvgButton, IconSvgButtonProps } from '../IconSvgButton'\nimport IconSvg from '../IconSvg'\n\nexport type ComplexMenuButtonProps = Omit<IconSvgButtonProps, 'icon'> & {\n icon?: IconSvgButtonProps['icon']\n variant?: ButtonProps['variant']\n text?: string\n iconSx?: SxProps\n}\n\nexport type ComplexMenuProps = {\n /*\n * Configuration for buttons. Each entry corresponds to one button.\n * See the ComplexMenuButtonProps type for more info.\n */\n iconButtons?: ComplexMenuButtonProps[]\n /*\n * Configuration for DropdownMenus. Each entry corresponds to one dropdown menu button, which\n * itself can contain multiple groups of items.\n * See the DropdownMenuProps type for more info.\n */\n dropdownMenus?: DropdownMenuProps[]\n}\n\n/**\n * The ComplexMenu component allows you to create a generic menu with\n * icon buttons and multiple dropdown menus that contain groups of items.\n */\nexport function ComplexMenu(props: ComplexMenuProps) {\n const { iconButtons = [], dropdownMenus = [] } = props\n const theme = useTheme()\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'))\n\n return (\n <Box\n sx={theme => ({\n display: 'flex',\n alignItems: 'center',\n gap: '10px',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n [theme.breakpoints.down('md')]: {\n flexDirection: 'column',\n },\n })}\n >\n {iconButtons.map(iconButton => {\n if (iconButton.variant != null) {\n const label = iconButton.text ?? iconButton.tooltipText\n return (\n <Box\n key={label}\n sx={theme => ({\n [theme.breakpoints.down('md')]: {\n width: '100%',\n '.MuiButton-root': { width: '100%' },\n },\n })}\n >\n <Button\n variant={iconButton.variant}\n startIcon={\n iconButton.icon ? (\n <IconSvg\n icon={iconButton.icon}\n wrap={false}\n fontSize={'inherit'}\n sx={iconButton.iconSx}\n />\n ) : undefined\n }\n onClick={iconButton.onClick}\n href={iconButton.href}\n disabled={iconButton.disabled}\n >\n <Typography variant=\"buttonLink\">{label}</Typography>\n </Button>\n </Box>\n )\n }\n return isSmallScreen && iconButton.tooltipText ? (\n <Box\n sx={{\n width: '100%',\n textAlign: 'center',\n }}\n >\n <Button\n variant=\"text\"\n startIcon={\n <IconSvg\n key={iconButton.tooltipText}\n icon={iconButton.icon!}\n wrap={false}\n fontSize={'inherit'}\n />\n }\n onClick={iconButton.onClick}\n sx={{\n padding: '6px 12px',\n minWidth: 'unset',\n }}\n >\n <Typography variant=\"buttonLink\">\n {iconButton.tooltipText}\n </Typography>\n </Button>\n </Box>\n ) : (\n <IconSvgButton\n key={iconButton.tooltipText}\n {...iconButton}\n icon={iconButton.icon!}\n />\n )\n })}\n {dropdownMenus.map(\n (menuProps, index) =>\n menuProps.items &&\n menuProps.items.length > 0 && (\n <Box\n sx={theme => ({\n [theme.breakpoints.down('md')]: {\n width: '100%',\n '.MuiButton-root': { width: '100%' },\n },\n })}\n >\n <Drop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AAA,IAEL,kBAAC,GAAD;IAEE,GAAI;IACJ,MAAM,EAAW;GAClB,GAHM,EAAW,WAGjB;EAEL,CAAC,GACA,EAAc,KACZ,GAAW,MACV,EAAU,SACV,EAAU,MAAM,SAAS,KACvB,kBAAC,GAAD;GACE,KAAI,OAAU,GACX,EAAM,YAAY,KAAK,IAAI,IAAI;IAC9B,OAAO;IACP,mBAAmB,EAAE,OAAO,OAAO;GACrC,EACF;aAEA,kBAAC,GAAD,EAA0B,GAAI,EAAY,GAAvB,CAAuB;EACvC,CAAA,CAEX,CACG;;AAET"}
1
+ {"version":3,"file":"ComplexMenu.js","names":[],"sources":["../../../src/components/menu/ComplexMenu.tsx"],"sourcesContent":["import {\n Box,\n Button,\n ButtonProps,\n SxProps,\n Typography,\n useMediaQuery,\n useTheme,\n} from '@mui/material'\nimport { DropdownMenu, DropdownMenuProps } from './DropdownMenu'\nimport { IconSvgButton, IconSvgButtonProps } from '../IconSvgButton'\nimport IconSvg from '../IconSvg'\n\nexport type ComplexMenuButtonProps = Omit<IconSvgButtonProps, 'icon'> & {\n icon?: IconSvgButtonProps['icon']\n variant?: ButtonProps['variant']\n text?: string\n iconSx?: SxProps\n}\n\nexport type ComplexMenuProps = {\n /*\n * Configuration for buttons. Each entry corresponds to one button.\n * See the ComplexMenuButtonProps type for more info.\n */\n iconButtons?: ComplexMenuButtonProps[]\n /*\n * Configuration for DropdownMenus. Each entry corresponds to one dropdown menu button, which\n * itself can contain multiple groups of items.\n * See the DropdownMenuProps type for more info.\n */\n dropdownMenus?: DropdownMenuProps[]\n}\n\n/**\n * The ComplexMenu component allows you to create a generic menu with\n * icon buttons and multiple dropdown menus that contain groups of items.\n */\nexport function ComplexMenu(props: ComplexMenuProps) {\n const { iconButtons = [], dropdownMenus = [] } = props\n const theme = useTheme()\n const isSmallScreen = useMediaQuery(theme.breakpoints.down('sm'))\n\n return (\n <Box\n sx={theme => ({\n display: 'flex',\n alignItems: 'center',\n gap: '6px',\n flexWrap: 'wrap',\n justifyContent: 'flex-end',\n [theme.breakpoints.down('md')]: {\n flexDirection: 'column',\n },\n })}\n >\n {iconButtons.map(iconButton => {\n if (iconButton.variant != null) {\n const label = iconButton.text ?? iconButton.tooltipText\n return (\n <Box\n key={label}\n sx={theme => ({\n [theme.breakpoints.down('md')]: {\n width: '100%',\n '.MuiButton-root': { width: '100%' },\n },\n })}\n >\n <Button\n variant={iconButton.variant}\n startIcon={\n iconButton.icon ? (\n <IconSvg\n icon={iconButton.icon}\n wrap={false}\n fontSize={'inherit'}\n sx={iconButton.iconSx}\n />\n ) : undefined\n }\n onClick={iconButton.onClick}\n href={iconButton.href}\n disabled={iconButton.disabled}\n >\n <Typography variant=\"buttonLink\">{label}</Typography>\n </Button>\n </Box>\n )\n }\n return isSmallScreen && iconButton.tooltipText ? (\n <Box\n sx={{\n width: '100%',\n textAlign: 'center',\n }}\n >\n <Button\n variant=\"text\"\n startIcon={\n <IconSvg\n key={iconButton.tooltipText}\n icon={iconButton.icon!}\n wrap={false}\n fontSize={'inherit'}\n />\n }\n onClick={iconButton.onClick}\n sx={{\n padding: '6px 12px',\n minWidth: 'unset',\n }}\n >\n <Typography variant=\"buttonLink\">\n {iconButton.tooltipText}\n </Typography>\n </Button>\n </Box>\n ) : (\n <IconSvgButton\n key={iconButton.tooltipText}\n {...iconButton}\n icon={iconButton.icon!}\n />\n )\n })}\n {dropdownMenus.map(\n (menuProps, index) =>\n menuProps.items &&\n menuProps.items.length > 0 && (\n <Box\n sx={theme => ({\n [theme.breakpoints.down('md')]: {\n width: '100%',\n '.MuiButton-root': { width: '100%' },\n },\n })}\n >\n <DropdownMenu key={index} {...menuProps} />\n </Box>\n ),\n )}\n </Box>\n )\n}\n"],"mappings":";;;;;;AAsCA,SAAgB,EAAY,GAAyB;CACnD,IAAM,EAAE,iBAAc,CAAC,GAAG,mBAAgB,CAAC,MAAM,GAE3C,IAAgB,EADR,EACsB,EAAM,YAAY,KAAK,IAAI,CAAC;CAEhE,OACE,kBAAC,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