synapse-react-client 4.0.34 → 4.0.36

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 (336) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/aridhia-queries/AridhiaKeyFactory.d.ts +24 -0
  3. package/dist/aridhia-queries/AridhiaKeyFactory.d.ts.map +1 -0
  4. package/dist/aridhia-queries/AridhiaKeyFactory.js +49 -0
  5. package/dist/aridhia-queries/AridhiaKeyFactory.js.map +1 -0
  6. package/dist/aridhia-queries/FairFormPayload.d.ts +45 -0
  7. package/dist/aridhia-queries/FairFormPayload.d.ts.map +1 -0
  8. package/dist/aridhia-queries/FairFormPayload.js +0 -0
  9. package/dist/aridhia-queries/TransferType.d.ts +10 -0
  10. package/dist/aridhia-queries/TransferType.d.ts.map +1 -0
  11. package/dist/aridhia-queries/TransferType.js +0 -0
  12. package/dist/aridhia-queries/aridhiaTokenExchange.js +6 -6
  13. package/dist/aridhia-queries/index.d.ts +12 -0
  14. package/dist/aridhia-queries/index.d.ts.map +1 -1
  15. package/dist/aridhia-queries/index.js +12 -2
  16. package/dist/aridhia-queries/useAridhiaQuery.d.ts +37 -0
  17. package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -0
  18. package/dist/aridhia-queries/useAridhiaQuery.js +71 -0
  19. package/dist/aridhia-queries/useAridhiaQuery.js.map +1 -0
  20. package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.d.ts +6 -0
  21. package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.d.ts.map +1 -0
  22. package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.js +13 -0
  23. package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.js.map +1 -0
  24. package/dist/aridhia-queries/useGetAridhiaDatasetSettings.d.ts +6 -0
  25. package/dist/aridhia-queries/useGetAridhiaDatasetSettings.d.ts.map +1 -0
  26. package/dist/aridhia-queries/useGetAridhiaDatasetSettings.js +13 -0
  27. package/dist/aridhia-queries/useGetAridhiaDatasetSettings.js.map +1 -0
  28. package/dist/aridhia-queries/useGetAridhiaDictionaries.d.ts +6 -0
  29. package/dist/aridhia-queries/useGetAridhiaDictionaries.d.ts.map +1 -0
  30. package/dist/aridhia-queries/useGetAridhiaDictionaries.js +13 -0
  31. package/dist/aridhia-queries/useGetAridhiaDictionaries.js.map +1 -0
  32. package/dist/aridhia-queries/useGetAridhiaRequests.d.ts +5 -4
  33. package/dist/aridhia-queries/useGetAridhiaRequests.d.ts.map +1 -1
  34. package/dist/aridhia-queries/useGetAridhiaRequests.js +11 -18
  35. package/dist/aridhia-queries/useGetAridhiaRequests.js.map +1 -1
  36. package/dist/aridhia-queries/useGetAridhiaWorkflow.d.ts +13 -0
  37. package/dist/aridhia-queries/useGetAridhiaWorkflow.d.ts.map +1 -0
  38. package/dist/aridhia-queries/useGetAridhiaWorkflow.js +19 -0
  39. package/dist/aridhia-queries/useGetAridhiaWorkflow.js.map +1 -0
  40. package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.d.ts +6 -0
  41. package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.d.ts.map +1 -0
  42. package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.js +13 -0
  43. package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.js.map +1 -0
  44. package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.d.ts +19 -0
  45. package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.d.ts.map +1 -0
  46. package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.js +17 -0
  47. package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.js.map +1 -0
  48. package/dist/aridhia-queries/useGetAridhiaWorkspaces.d.ts +6 -0
  49. package/dist/aridhia-queries/useGetAridhiaWorkspaces.d.ts.map +1 -0
  50. package/dist/aridhia-queries/useGetAridhiaWorkspaces.js +19 -0
  51. package/dist/aridhia-queries/useGetAridhiaWorkspaces.js.map +1 -0
  52. package/dist/aridhia-queries/useSubmitAridhiaDar.d.ts +27 -0
  53. package/dist/aridhia-queries/useSubmitAridhiaDar.d.ts.map +1 -0
  54. package/dist/aridhia-queries/useSubmitAridhiaDar.js +38 -0
  55. package/dist/aridhia-queries/useSubmitAridhiaDar.js.map +1 -0
  56. package/dist/assets/icons/curie-head.svg +21 -0
  57. package/dist/components/AccessRequirement/EntityActionsRequired.d.ts +0 -1
  58. package/dist/components/AccessRequirement/EntityActionsRequired.d.ts.map +1 -1
  59. package/dist/components/AccessRequirement/EntityActionsRequired.js +3 -6
  60. package/dist/components/AccessRequirement/EntityActionsRequired.js.map +1 -1
  61. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +24 -2
  62. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
  63. package/dist/components/AccessRequirementList/AccessRequirementList.js +69 -66
  64. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  65. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
  66. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +67 -56
  67. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
  68. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
  69. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +1 -1
  70. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
  71. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +6 -1
  72. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
  73. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +55 -54
  74. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
  75. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts +3 -3
  76. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts.map +1 -1
  77. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +1 -1
  78. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
  79. package/dist/components/CardContainer/CardConfiguration.d.ts +8 -0
  80. package/dist/components/CardContainer/CardConfiguration.d.ts.map +1 -1
  81. package/dist/components/ChangePassword/ChangePasswordWithToken.d.ts.map +1 -1
  82. package/dist/components/ChangePassword/ChangePasswordWithToken.js +58 -23
  83. package/dist/components/ChangePassword/ChangePasswordWithToken.js.map +1 -1
  84. package/dist/components/ChangePassword/useChangePasswordFormState.d.ts.map +1 -1
  85. package/dist/components/ChangePassword/useChangePasswordFormState.js +13 -3
  86. package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
  87. package/dist/components/CreateTableViewWizard/TableNameForm.d.ts.map +1 -1
  88. package/dist/components/CreateTableViewWizard/TableNameForm.js +11 -14
  89. package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
  90. package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts +1 -1
  91. package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts.map +1 -1
  92. package/dist/components/DataGrid/SyncGridWithSourceButton.js +55 -61
  93. package/dist/components/DataGrid/SyncGridWithSourceButton.js.map +1 -1
  94. package/dist/components/DataGrid/components/contextMenu.d.ts.map +1 -1
  95. package/dist/components/DataGrid/components/contextMenu.js +15 -15
  96. package/dist/components/DataGrid/components/contextMenu.js.map +1 -1
  97. package/dist/components/DataGrid/useMergeGridWithSource.d.ts +1 -5
  98. package/dist/components/DataGrid/useMergeGridWithSource.d.ts.map +1 -1
  99. package/dist/components/DataGrid/useMergeGridWithSource.js +21 -28
  100. package/dist/components/DataGrid/useMergeGridWithSource.js.map +1 -1
  101. package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts +35 -0
  102. package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts.map +1 -0
  103. package/dist/components/DatasetHosting/DatasetDownloadButton.js +132 -0
  104. package/dist/components/DatasetHosting/DatasetDownloadButton.js.map +1 -0
  105. package/dist/components/DatasetHosting/DatasetHosting.d.ts +91 -0
  106. package/dist/components/DatasetHosting/DatasetHosting.d.ts.map +1 -0
  107. package/dist/components/DatasetHosting/DatasetHosting.js +58 -0
  108. package/dist/components/DatasetHosting/DatasetHosting.js.map +1 -0
  109. package/dist/components/DatasetHosting/index.d.ts +5 -0
  110. package/dist/components/DatasetHosting/index.d.ts.map +1 -0
  111. package/dist/components/DatasetHosting/index.js +3 -0
  112. package/dist/components/DownloadCart/ActionRequiredListItem.d.ts +0 -2
  113. package/dist/components/DownloadCart/ActionRequiredListItem.d.ts.map +1 -1
  114. package/dist/components/DownloadCart/ActionRequiredListItem.js +2 -3
  115. package/dist/components/DownloadCart/ActionRequiredListItem.js.map +1 -1
  116. package/dist/components/DownloadCart/DownloadCartPage.d.ts +1 -2
  117. package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
  118. package/dist/components/DownloadCart/DownloadCartPage.js +49 -49
  119. package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
  120. package/dist/components/DownloadCart/DownloadListActionsRequired.d.ts +1 -5
  121. package/dist/components/DownloadCart/DownloadListActionsRequired.d.ts.map +1 -1
  122. package/dist/components/DownloadCart/DownloadListActionsRequired.js +5 -6
  123. package/dist/components/DownloadCart/DownloadListActionsRequired.js.map +1 -1
  124. package/dist/components/DownloadCart/RequestDownloadCard.d.ts +0 -2
  125. package/dist/components/DownloadCart/RequestDownloadCard.d.ts.map +1 -1
  126. package/dist/components/DownloadCart/RequestDownloadCard.js +28 -32
  127. package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
  128. package/dist/components/DownloadCart/TableQueryActionsRequired.d.ts +0 -2
  129. package/dist/components/DownloadCart/TableQueryActionsRequired.d.ts.map +1 -1
  130. package/dist/components/DownloadCart/TableQueryActionsRequired.js +7 -8
  131. package/dist/components/DownloadCart/TableQueryActionsRequired.js.map +1 -1
  132. package/dist/components/DownloadCart/index.d.ts +1 -2
  133. package/dist/components/DownloadCart/index.d.ts.map +1 -1
  134. package/dist/components/DraggableDialog/DraggableDialog.d.ts +2 -1
  135. package/dist/components/DraggableDialog/DraggableDialog.d.ts.map +1 -1
  136. package/dist/components/DraggableDialog/DraggableDialog.js +42 -33
  137. package/dist/components/DraggableDialog/DraggableDialog.js.map +1 -1
  138. package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts.map +1 -1
  139. package/dist/components/EntityTreeTable/hooks/useTableColumns.js +12 -6
  140. package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
  141. package/dist/components/ExperimentalMode/ExperimentalMode.js +2 -1
  142. package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
  143. package/dist/components/GenericCard/CardActionButtonStyleContext.d.ts +10 -0
  144. package/dist/components/GenericCard/CardActionButtonStyleContext.d.ts.map +1 -0
  145. package/dist/components/GenericCard/CardActionButtonStyleContext.js +10 -0
  146. package/dist/components/GenericCard/CardActionButtonStyleContext.js.map +1 -0
  147. package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +41 -41
  148. package/dist/components/GenericCard/GenericCardActionButton.d.ts +5 -0
  149. package/dist/components/GenericCard/GenericCardActionButton.d.ts.map +1 -1
  150. package/dist/components/GenericCard/GenericCardActionButton.js +28 -11
  151. package/dist/components/GenericCard/GenericCardActionButton.js.map +1 -1
  152. package/dist/components/GenericCard/TableRowGenericCard.d.ts +24 -0
  153. package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
  154. package/dist/components/GenericCard/TableRowGenericCard.js +205 -190
  155. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  156. package/dist/components/JSONArrayEditor/JSONArrayEditor.d.ts.map +1 -1
  157. package/dist/components/JSONArrayEditor/JSONArrayEditor.js +42 -42
  158. package/dist/components/JSONArrayEditor/JSONArrayEditor.js.map +1 -1
  159. package/dist/components/JsonSchemaForm/JsonSchemaForm.css +1 -0
  160. package/dist/components/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
  161. package/dist/components/JsonSchemaForm/JsonSchemaForm.js +13 -12
  162. package/dist/components/JsonSchemaForm/JsonSchemaForm.js.map +1 -1
  163. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js +5 -0
  164. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js.map +1 -0
  165. package/dist/components/JsonSchemaForm/JsonSchemaForm.module.scss +109 -0
  166. package/dist/components/QueryBuilder/QueryBuilderTypes.d.ts +39 -0
  167. package/dist/components/QueryBuilder/QueryBuilderTypes.d.ts.map +1 -0
  168. package/dist/components/QueryBuilder/QueryBuilderTypes.js +11 -0
  169. package/dist/components/QueryBuilder/QueryBuilderTypes.js.map +1 -0
  170. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +48 -0
  171. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -0
  172. package/dist/components/QueryBuilder/queryBuilderTranslation.js +256 -0
  173. package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -0
  174. package/dist/components/QueryContext/QueryContext.d.ts +0 -1
  175. package/dist/components/QueryContext/QueryContext.d.ts.map +1 -1
  176. package/dist/components/QueryContext/QueryContext.js.map +1 -1
  177. package/dist/components/QueryWrapper/QueryWrapper.d.ts +0 -1
  178. package/dist/components/QueryWrapper/QueryWrapper.d.ts.map +1 -1
  179. package/dist/components/QueryWrapper/QueryWrapper.js +52 -53
  180. package/dist/components/QueryWrapper/QueryWrapper.js.map +1 -1
  181. package/dist/components/QueryWrapperErrorBoundary.d.ts.map +1 -1
  182. package/dist/components/QueryWrapperErrorBoundary.js +4 -11
  183. package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
  184. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +0 -1
  185. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
  186. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  187. package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js +123 -123
  188. package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js.map +1 -1
  189. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  190. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +64 -55
  191. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  192. package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -1
  193. package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +0 -1
  194. package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -1
  195. package/dist/components/ShareThisPage/ShareThisPage.js +30 -29
  196. package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
  197. package/dist/components/StorybookComponentWrapper.d.ts.map +1 -1
  198. package/dist/components/StorybookComponentWrapper.js +15 -10
  199. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  200. package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
  201. package/dist/components/SynapseChat/GridAgentChat.js +29 -31
  202. package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
  203. package/dist/components/SynapseChat/SynapseChat.d.ts +2 -1
  204. package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
  205. package/dist/components/SynapseChat/SynapseChat.js +118 -74
  206. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  207. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +3 -1
  208. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
  209. package/dist/components/SynapseChat/SynapseChatInteraction.js +21 -21
  210. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  211. package/dist/components/SynapseChat/SynapseChatMessage.d.ts +1 -0
  212. package/dist/components/SynapseChat/SynapseChatMessage.d.ts.map +1 -1
  213. package/dist/components/SynapseChat/SynapseChatMessage.js +9 -8
  214. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  215. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
  216. package/dist/components/SynapseChat/SynapsePortalChatDialog.js +2 -1
  217. package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
  218. package/dist/components/SynapseTable/SynapseTable.d.ts.map +1 -1
  219. package/dist/components/SynapseTable/SynapseTable.js +2 -1
  220. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  221. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.d.ts.map +1 -1
  222. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js +29 -30
  223. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js.map +1 -1
  224. package/dist/components/TanStackTable/StyledTanStackTable.d.ts +7 -0
  225. package/dist/components/TanStackTable/StyledTanStackTable.d.ts.map +1 -1
  226. package/dist/components/TanStackTable/StyledTanStackTable.js +68 -48
  227. package/dist/components/TanStackTable/StyledTanStackTable.js.map +1 -1
  228. package/dist/components/TanStackTable/TanStackTableUtils.d.ts.map +1 -1
  229. package/dist/components/TanStackTable/TanStackTableUtils.js +6 -6
  230. package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
  231. package/dist/components/TanStackTable/useSyncedTopScrollbar.d.ts +13 -0
  232. package/dist/components/TanStackTable/useSyncedTopScrollbar.d.ts.map +1 -0
  233. package/dist/components/TanStackTable/useSyncedTopScrollbar.js +32 -0
  234. package/dist/components/TanStackTable/useSyncedTopScrollbar.js.map +1 -0
  235. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +12 -0
  236. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -0
  237. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +86 -0
  238. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -0
  239. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.d.ts.map +1 -1
  240. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +20 -18
  241. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
  242. package/dist/components/doi/CreateOrUpdateDoiModal.d.ts.map +1 -1
  243. package/dist/components/doi/CreateOrUpdateDoiModal.js +10 -13
  244. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  245. package/dist/components/entity/page/CreatedByModifiedBy.d.ts.map +1 -1
  246. package/dist/components/entity/page/CreatedByModifiedBy.js +43 -61
  247. package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
  248. package/dist/components/entity/page/createdByModifiedByTooltips.d.ts +7 -0
  249. package/dist/components/entity/page/createdByModifiedByTooltips.d.ts.map +1 -0
  250. package/dist/components/entity/page/createdByModifiedByTooltips.js +36 -0
  251. package/dist/components/entity/page/createdByModifiedByTooltips.js.map +1 -0
  252. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.d.ts.map +1 -1
  253. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +130 -65
  254. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
  255. package/dist/components/index.d.ts +1 -0
  256. package/dist/components/index.d.ts.map +1 -1
  257. package/dist/components/index.js +143 -140
  258. package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
  259. package/dist/components/menu/DropdownMenu.js +6 -6
  260. package/dist/components/menu/DropdownMenu.js.map +1 -1
  261. package/dist/components/widgets/Range.js +8 -2
  262. package/dist/components/widgets/Range.js.map +1 -1
  263. package/dist/components/widgets/query-filter/RangeFacetFilter.d.ts.map +1 -1
  264. package/dist/components/widgets/query-filter/RangeFacetFilter.js +2 -1
  265. package/dist/components/widgets/query-filter/RangeFacetFilter.js.map +1 -1
  266. package/dist/components/widgets/query-filter/RangeFacetFilterUI.d.ts.map +1 -1
  267. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js +19 -19
  268. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
  269. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +5 -5
  270. package/dist/index.js +161 -159
  271. package/dist/index.js.map +1 -1
  272. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
  273. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +30 -26
  274. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
  275. package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
  276. package/dist/mocks/msw/handlers/fileHandlers.js +22 -22
  277. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  278. package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.d.ts +1 -0
  279. package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.d.ts.map +1 -1
  280. package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.js +7 -1
  281. package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.js.map +1 -1
  282. package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
  283. package/dist/mocks/msw/handlers/userProfileHandlers.js +40 -36
  284. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  285. package/dist/mocks/user/mock_user_profile.d.ts +1 -0
  286. package/dist/mocks/user/mock_user_profile.d.ts.map +1 -1
  287. package/dist/mocks/user/mock_user_profile.js +45 -45
  288. package/dist/mocks/user/mock_user_profile.js.map +1 -1
  289. package/dist/style/components/_all.scss +0 -1
  290. package/dist/style/components/_cards.scss +4 -2
  291. package/dist/style/main.css +1 -1
  292. package/dist/synapse-queries/KeyFactory.d.ts +2 -0
  293. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  294. package/dist/synapse-queries/KeyFactory.js +6 -0
  295. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  296. package/dist/synapse-queries/dataaccess/index.js +4 -4
  297. package/dist/synapse-queries/dataaccess/useEDuc.d.ts +20 -1
  298. package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
  299. package/dist/synapse-queries/dataaccess/useEDuc.js +75 -49
  300. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  301. package/dist/synapse-queries/index.js +190 -188
  302. package/dist/tsconfig.build.tsbuildinfo +1 -1
  303. package/dist/utils/APIConstants.d.ts +2 -0
  304. package/dist/utils/APIConstants.d.ts.map +1 -1
  305. package/dist/utils/APIConstants.js +2 -2
  306. package/dist/utils/APIConstants.js.map +1 -1
  307. package/dist/utils/AppUtils/session/ApplicationSessionManager.d.ts.map +1 -1
  308. package/dist/utils/AppUtils/session/ApplicationSessionManager.js +20 -19
  309. package/dist/utils/AppUtils/session/ApplicationSessionManager.js.map +1 -1
  310. package/dist/utils/featureflag/FeatureFlags.d.ts +2 -4
  311. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
  312. package/dist/utils/featureflag/FeatureFlags.js +1 -1
  313. package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
  314. package/dist/utils/functions/RegularExpressions.d.ts +17 -0
  315. package/dist/utils/functions/RegularExpressions.d.ts.map +1 -1
  316. package/dist/utils/functions/RegularExpressions.js +11 -4
  317. package/dist/utils/functions/RegularExpressions.js.map +1 -1
  318. package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
  319. package/dist/utils/functions/SqlFunctions.js +19 -3
  320. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  321. package/dist/utils/hooks/useIsHydrated.d.ts +9 -0
  322. package/dist/utils/hooks/useIsHydrated.d.ts.map +1 -0
  323. package/dist/utils/hooks/useIsHydrated.js +10 -0
  324. package/dist/utils/hooks/useIsHydrated.js.map +1 -0
  325. package/dist/utils/index.js +16 -16
  326. package/dist/utils/types/IsType.d.ts +4 -1
  327. package/dist/utils/types/IsType.d.ts.map +1 -1
  328. package/dist/utils/types/IsType.js +4 -4
  329. package/dist/utils/types/IsType.js.map +1 -1
  330. package/dist/utils/types/index.js +2 -2
  331. package/package.json +7 -7
  332. package/dist/components/DataGrid/useMergeGridWithRecordSet.d.ts +0 -12
  333. package/dist/components/DataGrid/useMergeGridWithRecordSet.d.ts.map +0 -1
  334. package/dist/components/DataGrid/useMergeGridWithRecordSet.js +0 -25
  335. package/dist/components/DataGrid/useMergeGridWithRecordSet.js.map +0 -1
  336. package/dist/style/components/_annotations.scss +0 -110
@@ -33,24 +33,24 @@ dl_list_file_entities = syn.get_download_list()`, E = "synapse get-download-list
33
33
  filter: "ineligibleForPackaging"
34
34
  }
35
35
  ];
36
- function O(l) {
37
- let { accessToken: O } = i(), [k, A] = _(0), [j, M] = _(0), N = D[j].filter, [P, F] = _(!1), I = g(null);
36
+ function O() {
37
+ let { accessToken: l } = i(), [O, k] = _(0), [A, j] = _(0), M = D[A].filter, [N, P] = _(!1), F = g(null);
38
38
  h(() => {
39
- P && I.current?.scrollIntoView({
39
+ N && F.current?.scrollIntoView({
40
40
  behavior: "smooth",
41
41
  block: "center"
42
42
  });
43
- }, [P]);
44
- let [L, R] = _(!1), [z, B] = _(!1), [V, H] = _(), { data: U, isLoading: W, isError: G, error: K, refetch: q } = a();
43
+ }, [N]);
44
+ let [I, L] = _(!1), [R, z] = _(!1), [B, V] = _(), { data: H, isLoading: U, isError: W, error: G, refetch: K } = a();
45
45
  h(() => {
46
- G && K && H(K);
47
- }, [G, K]);
48
- let J = (e, t) => t === void 0 ? e.numberOfFilesAvailableForDownload : t === "eligibleForPackaging" ? e.numberOfFilesAvailableForDownloadAndEligibleForPackaging : e.numberOfFilesAvailableForDownload - e.numberOfFilesAvailableForDownloadAndEligibleForPackaging;
46
+ W && G && V(G);
47
+ }, [W, G]);
48
+ let q = (e, t) => t === void 0 ? e.numberOfFilesAvailableForDownload : t === "eligibleForPackaging" ? e.numberOfFilesAvailableForDownloadAndEligibleForPackaging : e.numberOfFilesAvailableForDownload - e.numberOfFilesAvailableForDownloadAndEligibleForPackaging;
49
49
  if (h(() => {
50
- U && U.numberOfFilesRequiringAction == 0 && A(1), U && U.numberOfFilesAvailableForDownloadAndEligibleForPackaging === 0 && F(!1);
51
- }, [U]), V) return /* @__PURE__ */ S(r, { error: V });
52
- let Y = async () => {
53
- await n.clearDownloadListV2(O), q();
50
+ H && H.numberOfFilesRequiringAction == 0 && k(1), H && H.numberOfFilesAvailableForDownloadAndEligibleForPackaging === 0 && P(!1);
51
+ }, [H]), B) return /* @__PURE__ */ S(r, { error: B });
52
+ let J = async () => {
53
+ await n.clearDownloadListV2(l), K();
54
54
  };
55
55
  return /* @__PURE__ */ C("div", {
56
56
  className: s.DownloadCartPage,
@@ -70,7 +70,7 @@ function O(l) {
70
70
  placement: "right",
71
71
  children: /* @__PURE__ */ S(v, {
72
72
  onClick: () => {
73
- Y();
73
+ J();
74
74
  },
75
75
  variant: "text",
76
76
  color: "primary",
@@ -88,23 +88,23 @@ function O(l) {
88
88
  children: /* @__PURE__ */ C("ul", {
89
89
  className: s.navTabs,
90
90
  children: [/* @__PURE__ */ S("li", {
91
- className: `${s.navItem}${k == 0 ? ` ${s.active}` : ""}`,
92
- "aria-selected": k == 0,
91
+ className: `${s.navItem}${O == 0 ? ` ${s.active}` : ""}`,
92
+ "aria-selected": O == 0,
93
93
  children: /* @__PURE__ */ C("button", {
94
- onClick: () => A(0),
95
- children: ["Access Actions Required", !G && !W && U && /* @__PURE__ */ S("span", {
94
+ onClick: () => k(0),
95
+ children: ["Access Actions Required", !W && !U && H && /* @__PURE__ */ S("span", {
96
96
  className: s.fileCount,
97
- children: U.totalNumberOfFiles - U.numberOfFilesAvailableForDownload
97
+ children: H.totalNumberOfFiles - H.numberOfFilesAvailableForDownload
98
98
  })]
99
99
  })
100
100
  }), /* @__PURE__ */ S("li", {
101
- className: `${s.navItem}${k == 1 ? ` ${s.active}` : ""}`,
102
- "aria-selected": k == 1,
101
+ className: `${s.navItem}${O == 1 ? ` ${s.active}` : ""}`,
102
+ "aria-selected": O == 1,
103
103
  children: /* @__PURE__ */ C("button", {
104
- onClick: () => A(1),
105
- children: ["Download List", !G && !W && U && /* @__PURE__ */ S("span", {
104
+ onClick: () => k(1),
105
+ children: ["Download List", !W && !U && H && /* @__PURE__ */ S("span", {
106
106
  className: s.fileCount,
107
- children: U.numberOfFilesAvailableForDownload
107
+ children: H.numberOfFilesAvailableForDownload
108
108
  })]
109
109
  })
110
110
  })]
@@ -112,21 +112,21 @@ function O(l) {
112
112
  })
113
113
  }),
114
114
  /* @__PURE__ */ C("div", {
115
- className: k == 0 && !G && !W && U ? void 0 : s.hidden,
116
- children: [U?.numberOfFilesRequiringAction && U.numberOfFilesRequiringAction > 0 && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S("div", {
115
+ className: O == 0 && !W && !U && H ? void 0 : s.hidden,
116
+ children: [H?.numberOfFilesRequiringAction && H.numberOfFilesRequiringAction > 0 && /* @__PURE__ */ S("div", { children: /* @__PURE__ */ S("div", {
117
117
  className: "container",
118
- children: /* @__PURE__ */ S(p, { ...l })
119
- }) }), U?.numberOfFilesRequiringAction === 0 && /* @__PURE__ */ S("div", {
118
+ children: /* @__PURE__ */ S(p, {})
119
+ }) }), H?.numberOfFilesRequiringAction === 0 && /* @__PURE__ */ S("div", {
120
120
  className: s.placeholder,
121
121
  children: /* @__PURE__ */ S("div", { children: "No actions are currently required." })
122
122
  })]
123
123
  }),
124
- k == 1 && !G && !W && U && /* @__PURE__ */ C("div", { children: [U.numberOfFilesAvailableForDownload > 0 && /* @__PURE__ */ C("div", {
124
+ O == 1 && !W && !U && H && /* @__PURE__ */ C("div", { children: [H.numberOfFilesAvailableForDownload > 0 && /* @__PURE__ */ C("div", {
125
125
  className: `container ${s.DownloadListTabContent}`,
126
126
  children: [
127
127
  /* @__PURE__ */ C("h3", {
128
128
  className: `${s.sectionTitle} pageHeaderTitle`,
129
- children: ["Bulk Download Options", U.sumOfFileSizesAvailableForDownload != null && /* @__PURE__ */ S(y, {
129
+ children: ["Bulk Download Options", H.sumOfFileSizesAvailableForDownload != null && /* @__PURE__ */ S(y, {
130
130
  placement: "right",
131
131
  title: /* @__PURE__ */ C(x, { children: [
132
132
  "Total file size",
@@ -137,7 +137,7 @@ function O(l) {
137
137
  children: /* @__PURE__ */ C("span", {
138
138
  className: s.totalFileSize,
139
139
  children: [
140
- t(U.sumOfFileSizesAvailableForDownload),
140
+ t(H.sumOfFileSizesAvailableForDownload),
141
141
  " ",
142
142
  "total*"
143
143
  ]
@@ -159,17 +159,17 @@ function O(l) {
159
159
  })
160
160
  }), /* @__PURE__ */ C("div", {
161
161
  className: s.subSectionActions,
162
- children: [U.numberOfFilesAvailableForDownloadAndEligibleForPackaging > 0 && /* @__PURE__ */ S(v, {
162
+ children: [H.numberOfFilesAvailableForDownloadAndEligibleForPackaging > 0 && /* @__PURE__ */ S(v, {
163
163
  variant: "contained",
164
164
  onClick: () => {
165
- F(!0);
165
+ P(!0);
166
166
  },
167
167
  startIcon: /* @__PURE__ */ S(o, {
168
168
  icon: "download",
169
169
  wrap: !1
170
170
  }),
171
171
  children: "Download Packages"
172
- }), U.numberOfFilesAvailableForDownloadAndEligibleForPackaging == 0 && /* @__PURE__ */ S(y, {
172
+ }), H.numberOfFilesAvailableForDownloadAndEligibleForPackaging == 0 && /* @__PURE__ */ S(y, {
173
173
  title: "You cannot create a .zip package because there are no eligible files.",
174
174
  enterNextDelay: 300,
175
175
  placement: "top",
@@ -236,7 +236,7 @@ function O(l) {
236
236
  children: /* @__PURE__ */ S(v, {
237
237
  variant: "contained",
238
238
  onClick: () => {
239
- R(!0);
239
+ L(!0);
240
240
  },
241
241
  startIcon: /* @__PURE__ */ S(o, {
242
242
  icon: "download",
@@ -282,7 +282,7 @@ function O(l) {
282
282
  })
283
283
  })]
284
284
  }),
285
- U.numberOfFilesAvailableForDownloadAndEligibleForPackaging < U.numberOfFilesAvailableForDownload && /* @__PURE__ */ C("div", {
285
+ H.numberOfFilesAvailableForDownloadAndEligibleForPackaging < H.numberOfFilesAvailableForDownload && /* @__PURE__ */ C("div", {
286
286
  className: s.subSection,
287
287
  children: [/* @__PURE__ */ C("div", {
288
288
  className: s.subSectionHeader,
@@ -338,10 +338,10 @@ function O(l) {
338
338
  ]
339
339
  }) }),
340
340
  /* @__PURE__ */ C("div", { children: [
341
- P && /* @__PURE__ */ S("div", {
342
- ref: I,
341
+ N && /* @__PURE__ */ S("div", {
342
+ ref: F,
343
343
  children: /* @__PURE__ */ S(d, { onPackageCreation: () => {
344
- B(!0);
344
+ z(!0);
345
345
  } })
346
346
  }),
347
347
  /* @__PURE__ */ S("h3", {
@@ -356,13 +356,13 @@ function O(l) {
356
356
  className: s.navLabel,
357
357
  children: "View:"
358
358
  }), D.map((e, t) => /* @__PURE__ */ S("li", {
359
- className: `${s.navItem}${j === t ? ` ${s.active}` : ""}`,
360
- "aria-selected": j === t,
359
+ className: `${s.navItem}${A === t ? ` ${s.active}` : ""}`,
360
+ "aria-selected": A === t,
361
361
  children: /* @__PURE__ */ C("button", {
362
- onClick: () => M(t),
363
- children: [e.label, !G && !W && U && /* @__PURE__ */ S("span", {
362
+ onClick: () => j(t),
363
+ children: [e.label, !W && !U && H && /* @__PURE__ */ S("span", {
364
364
  className: s.fileCount,
365
- children: J(U, e.filter)
365
+ children: q(H, e.filter)
366
366
  })]
367
367
  })
368
368
  }, e.label))]
@@ -370,11 +370,11 @@ function O(l) {
370
370
  }),
371
371
  /* @__PURE__ */ S("div", {
372
372
  className: s.availableForDownloadTableContainer,
373
- children: /* @__PURE__ */ S(u, { filter: N }, N ?? "all")
373
+ children: /* @__PURE__ */ S(u, { filter: M }, M ?? "all")
374
374
  })
375
375
  ] })
376
376
  ]
377
- }), U.numberOfFilesAvailableForDownload === 0 && /* @__PURE__ */ S("div", {
377
+ }), H.numberOfFilesAvailableForDownload === 0 && /* @__PURE__ */ S("div", {
378
378
  className: s.placeholder,
379
379
  children: /* @__PURE__ */ S(b, {
380
380
  variant: "body1Italic",
@@ -382,18 +382,18 @@ function O(l) {
382
382
  })
383
383
  })] }),
384
384
  /* @__PURE__ */ S(e, {
385
- show: z,
385
+ show: R,
386
386
  variant: "success",
387
387
  title: "Package Created",
388
388
  description: "A package has been created with eligible files. The items contained in this .zip file have been removed from your list. If your package is over 1GB, you will need to create multiple packages.",
389
389
  autoCloseAfterDelayInSeconds: 10,
390
390
  onClose: () => {
391
- B(!1);
391
+ z(!1);
392
392
  }
393
393
  }),
394
- L && /* @__PURE__ */ S(c, {
394
+ I && /* @__PURE__ */ S(c, {
395
395
  show: !0,
396
- onClose: () => R(!1),
396
+ onClose: () => L(!1),
397
397
  title: "Download Programmatically",
398
398
  pythonCode: T,
399
399
  cliCode: E
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadCartPage.js","names":[],"sources":["../../../src/components/DownloadCart/DownloadCartPage.tsx"],"sourcesContent":["import styles from './DownloadCartPage.module.scss'\nimport SynapseClient from '@/synapse-client'\nimport { useGetDownloadListStatistics } from '@/synapse-queries/download/useDownloadList'\nimport { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { DeleteTwoTone } from '@mui/icons-material'\nimport { Button, Tooltip, Typography } from '@mui/material'\nimport {\n AvailableFilter,\n FilesStatisticsResponse,\n} from '@sage-bionetworks/synapse-types'\nimport { useEffect, useRef, useState } from 'react'\nimport { ErrorBanner } from '../error/ErrorBanner'\nimport FullWidthAlert from '../FullWidthAlert/FullWidthAlert'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { ProgrammaticInstructionsModal } from '../ProgrammaticInstructionsModal/ProgrammaticInstructionsModal'\nimport AvailableForDownloadTable from './AvailableForDownloadTable'\nimport { CreatePackageV2 } from './CreatePackageV2'\nimport { PYTHON_CLIENT_IMPORT_AND_LOGIN } from './DirectProgrammaticDownload'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport { DownloadIneligibleForPackagingFilesFromListButton } from './DownloadIneligibleForPackagingFilesFromListButton'\nimport {\n DownloadListActionsRequired,\n DownloadListActionsRequiredProps,\n} from './DownloadListActionsRequired'\nimport ComponentCollapse from '../ComponentCollapse'\n\nconst pythonDownloadCode = `${PYTHON_CLIENT_IMPORT_AND_LOGIN}\ndl_list_file_entities = syn.get_download_list()`\n\nconst cliDownloadCode = `synapse get-download-list`\n\nconst filterTabs: { label: string; filter: AvailableFilter }[] = [\n { label: 'All Files', filter: undefined },\n { label: 'Files included in ZIP', filter: 'eligibleForPackaging' },\n { label: 'Files not included in ZIP', filter: 'ineligibleForPackaging' },\n]\n\n/**\n * Show the Download Cart page.\n */\nexport function DownloadCartPage(props: DownloadListActionsRequiredProps) {\n const { accessToken } = useSynapseContext()\n const [selectedTabIndex, setSelectedTabIndex] = useState<number>(0)\n const [selectedFilterTabIndex, setSelectedFilterTabIndex] =\n useState<number>(0)\n const selectedFilter = filterTabs[selectedFilterTabIndex].filter\n const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] =\n useState<boolean>(false)\n const createPackageRef = useRef<HTMLDivElement>(null)\n // scroll to the CreatePackageV2 component when it is shown so that the user is aware of the next steps after clicking the button to create a package\n useEffect(() => {\n if (isShowingCreatePackageUI) {\n createPackageRef.current?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n })\n }\n }, [isShowingCreatePackageUI])\n const [isShowingModal, setIsShowingModal] = useState<boolean>(false)\n const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] =\n useState(false)\n const [error, setError] = useState<Error>()\n const {\n data,\n isLoading,\n isError,\n error: newError,\n refetch,\n } = useGetDownloadListStatistics()\n useEffect(() => {\n if (isError && newError) {\n setError(newError)\n }\n }, [isError, newError])\n\n const getFilterCount = (\n data: FilesStatisticsResponse,\n filter: AvailableFilter,\n ) => {\n if (filter === undefined) return data.numberOfFilesAvailableForDownload\n if (filter === 'eligibleForPackaging')\n return data.numberOfFilesAvailableForDownloadAndEligibleForPackaging\n return (\n data.numberOfFilesAvailableForDownload -\n data.numberOfFilesAvailableForDownloadAndEligibleForPackaging\n )\n }\n // SWC-5874: When arriving at the download cart when there are no ARs, the user should start in the Download list\n useEffect(() => {\n if (data && data.numberOfFilesRequiringAction == 0) {\n setSelectedTabIndex(1)\n }\n // also hide the Create Package UI if there are no files available for download\n if (\n data &&\n data.numberOfFilesAvailableForDownloadAndEligibleForPackaging === 0\n ) {\n setIsShowingCreatePackageUI(false)\n }\n }, [data])\n\n if (error) {\n return <ErrorBanner error={error} />\n }\n const clearDownloadList = async () => {\n await SynapseClient.clearDownloadListV2(accessToken)\n refetch()\n }\n return (\n <div className={styles.DownloadCartPage}>\n <div>\n <div className={`${styles.pageHeader}`}>\n <div className=\"container\">\n <div className={styles.grid}>\n <h3 className=\"pageHeaderTitle\">Your Download List</h3>\n <Tooltip\n title=\"Immediately removes all items from your download list\"\n enterNextDelay={300}\n placement=\"right\"\n >\n <Button\n onClick={() => {\n clearDownloadList()\n }}\n variant=\"text\"\n color=\"primary\"\n startIcon={<DeleteTwoTone />}\n >\n Clear Your Download List\n </Button>\n </Tooltip>\n </div>\n </div>\n </div>\n </div>\n <div className={styles.tabsContainer}>\n <div className=\"container\">\n <ul className={styles.navTabs}>\n <li\n className={`${styles.navItem}${\n selectedTabIndex == 0 ? ` ${styles.active}` : ''\n }`}\n aria-selected={selectedTabIndex == 0}\n >\n <button onClick={() => setSelectedTabIndex(0)}>\n Access Actions Required\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {data.totalNumberOfFiles -\n data.numberOfFilesAvailableForDownload}\n </span>\n )}\n </button>\n </li>\n <li\n className={`${styles.navItem}${\n selectedTabIndex == 1 ? ` ${styles.active}` : ''\n }`}\n aria-selected={selectedTabIndex == 1}\n >\n <button onClick={() => setSelectedTabIndex(1)}>\n Download List\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {data.numberOfFilesAvailableForDownload}\n </span>\n )}\n </button>\n </li>\n </ul>\n </div>\n </div>\n\n <div\n className={\n /*\n The DownloadListActionsRequired component stores actions in local state to track which actions are completed.\n\n Mount the actions required component and hide it with style to ensure actions stored in component state are persisted as the user switches tabs\n */\n !(selectedTabIndex == 0 && !isError && !isLoading && data)\n ? styles.hidden\n : undefined\n }\n >\n {data?.numberOfFilesRequiringAction &&\n data.numberOfFilesRequiringAction > 0 && (\n // Unmount instead of hiding the DownloadListActionsRequired component when there are 0 actions required\n // The DownloadListActionsRequired cannot discern between a fulfilled action and an action that is no longer required because the\n // file was removed from the download cart.\n // In the typical case where the download cart is cleared, unmounting the component ensures that the actions are cleared out.\n <div>\n <div className=\"container\">\n <DownloadListActionsRequired {...props} />\n </div>\n </div>\n )}\n {data?.numberOfFilesRequiringAction === 0 && (\n <div className={styles.placeholder}>\n <div>No actions are currently required.</div>\n </div>\n )}\n </div>\n\n {selectedTabIndex == 1 && !isError && !isLoading && data && (\n <div>\n {data.numberOfFilesAvailableForDownload > 0 && (\n <div className={`container ${styles.DownloadListTabContent}`}>\n <h3 className={`${styles.sectionTitle} pageHeaderTitle`}>\n Bulk Download Options\n {data.sumOfFileSizesAvailableForDownload != null && (\n <Tooltip\n placement=\"right\"\n title={\n <>\n Total file size\n <br />\n Does not include files hosted outside Synapse\n </>\n }\n slotProps={{ tooltip: { sx: { maxWidth: 400 } } }}\n >\n <span className={styles.totalFileSize}>\n {calculateFriendlyFileSize(\n data.sumOfFileSizesAvailableForDownload,\n )}{' '}\n total*\n </span>\n </Tooltip>\n )}\n </h3>\n <div>\n <div className={styles.subSectionOverview}>\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"packagableFile\" /> Web Download (.ZIP)\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging >\n 0 && (\n <Button\n variant=\"contained\"\n onClick={() => {\n setIsShowingCreatePackageUI(true)\n }}\n startIcon={<IconSvg icon=\"download\" wrap={false} />}\n >\n Download Packages\n </Button>\n )}\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging ==\n 0 && (\n <Tooltip\n title=\"You cannot create a .zip package because there are no eligible files.\"\n enterNextDelay={300}\n placement=\"top\"\n >\n <span>\n <Button\n variant=\"contained\"\n disabled\n startIcon={\n <IconSvg icon=\"download\" wrap={false} />\n }\n >\n Download Packages\n </Button>\n </span>\n </Tooltip>\n )}\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Only some files may be eligible for packaging as ZIP.\n Use the Individual Downloads tab, below, to download\n non-packageable files.&nbsp;\n <a\n href=\"https://help.synapse.org/docs/Downloading-Data-From-the-Synapse-UI.2004254837.html\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n More Information.\n </a>\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n <ul>\n <li>Files are bundled into .ZIPs up to 1 GB each.</li>\n <li>\n Larger selections are split into multiple packages.\n </li>\n <li>\n Includes only files stored in Synapse native\n storage.\n </li>\n <li>\n Each package contains a CSV manifest with file\n annotations and metadata.\n </li>\n </ul>\n </Typography>\n </ComponentCollapse>\n </div>\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"code\" /> Programmatic Download\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n <Button\n variant=\"contained\"\n onClick={() => {\n setIsShowingModal(true)\n }}\n startIcon={<IconSvg icon=\"download\" wrap={false} />}\n >\n Get R / Python / CLI Code\n </Button>\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Use our Python, R, or command line clients to download\n files quickly.&nbsp;\n <a\n href=\"https://help.synapse.org/docs/Downloading-Data-Programmatically.2003796248.html\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n More Information.\n </a>\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n <ul>\n <li>Requires a client (R, Python, or CLI).</li>\n <li>\n No limits on individual file size or total download\n size.\n </li>\n <li>\n Includes files stored both on and off Synapse native\n storage.\n </li>\n <li>\n Downloads include a CSV manifest with file\n annotations and metadata.\n </li>\n </ul>\n </Typography>\n </ComponentCollapse>\n </div>\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging <\n data.numberOfFilesAvailableForDownload && (\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"multiFile\" /> Multi-file Download\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n <div className={styles.ineligibleDownloadContainer}>\n <DownloadIneligibleForPackagingFilesFromListButton />\n </div>\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Files which <strong>aren't</strong> included in a\n ZIP package may be downloaded as a multi-file\n download.&nbsp;\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n Clicking “Start Multi-file Download” initiates a\n download of all files in your Download List that can’t\n be bundled into a ZIP—such as large files or external\n links—in one step. Files are saved one by one with\n clear progress updates, automatic handling of\n duplicate names, and retry support if something fails.\n You can cancel anytime.\n <br />\n <br />\n Note: in some browsers, files download individually to\n your default Downloads folder instead of a selected\n location.\n </Typography>\n </ComponentCollapse>\n </div>\n )}\n </div>\n </div>\n\n <div>\n {isShowingCreatePackageUI && (\n <div ref={createPackageRef}>\n <CreatePackageV2\n onPackageCreation={() => {\n setIsShowingDownloadSuccessAlert(true)\n }}\n />\n </div>\n )}\n <h3 className={`${styles.sectionTitle} pageHeaderTitle`}>\n Download Individual Files\n </h3>\n <div className={styles.tabsContainer}>\n <ul className={styles.navTabs}>\n <li className={styles.navLabel}>View:</li>\n {filterTabs.map((tab, index) => (\n <li\n key={tab.label}\n className={`${styles.navItem}${\n selectedFilterTabIndex === index\n ? ` ${styles.active}`\n : ''\n }`}\n aria-selected={selectedFilterTabIndex === index}\n >\n <button\n onClick={() => setSelectedFilterTabIndex(index)}\n >\n {tab.label}\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {getFilterCount(data, tab.filter)}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n\n <div className={styles.availableForDownloadTableContainer}>\n <AvailableForDownloadTable\n key={selectedFilter ?? 'all'}\n filter={selectedFilter}\n />\n </div>\n </div>\n </div>\n )}\n {data.numberOfFilesAvailableForDownload === 0 && (\n <div className={styles.placeholder}>\n <Typography variant=\"body1Italic\">\n Your Download List is currently empty.\n </Typography>\n </div>\n )}\n </div>\n )}\n <FullWidthAlert\n show={isShowingDownloadSuccessAlert}\n variant=\"success\"\n title=\"Package Created\"\n description=\"A package has been created with eligible files. The items contained in this .zip file have been removed from your list. If your package is over 1GB, you will need to create multiple packages.\"\n autoCloseAfterDelayInSeconds={10}\n onClose={() => {\n setIsShowingDownloadSuccessAlert(false)\n }}\n />\n {isShowingModal && (\n <ProgrammaticInstructionsModal\n show={true}\n onClose={() => setIsShowingModal(false)}\n title=\"Download Programmatically\"\n pythonCode={pythonDownloadCode}\n cliCode={cliDownloadCode}\n // rCode={rDownloadCode}\n />\n )}\n </div>\n )\n}\n\nexport default DownloadCartPage\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA0BA,IAAM,IAAqB,GAAG,EAA+B;kDAGvD,IAAkB,6BAElB,IAA2D;CAC/D;EAAE,OAAO;EAAa,QAAQ,KAAA;CAAU;CACxC;EAAE,OAAO;EAAyB,QAAQ;CAAuB;CACjE;EAAE,OAAO;EAA6B,QAAQ;CAAyB;AACzE;AAKA,SAAgB,EAAiB,GAAyC;CACxE,IAAM,EAAE,mBAAgB,EAAkB,GACpC,CAAC,GAAkB,KAAuB,EAAiB,CAAC,GAC5D,CAAC,GAAwB,KAC7B,EAAiB,CAAC,GACd,IAAiB,EAAW,GAAwB,QACpD,CAAC,GAA0B,KAC/B,EAAkB,EAAK,GACnB,IAAmB,EAAuB,IAAI;CAEpD,QAAgB;EACd,AAAI,KACF,EAAiB,SAAS,eAAe;GACvC,UAAU;GACV,OAAO;EACT,CAAC;CAEL,GAAG,CAAC,CAAwB,CAAC;CAC7B,IAAM,CAAC,GAAgB,KAAqB,EAAkB,EAAK,GAC7D,CAAC,GAA+B,KACpC,EAAS,EAAK,GACV,CAAC,GAAO,KAAY,EAAgB,GACpC,EACJ,SACA,cACA,YACA,OAAO,GACP,eACE,EAA6B;CACjC,QAAgB;EACd,AAAI,KAAW,KACb,EAAS,CAAQ;CAErB,GAAG,CAAC,GAAS,CAAQ,CAAC;CAEtB,IAAM,KACJ,GACA,MAEI,MAAW,KAAA,IAAkB,EAAK,oCAClC,MAAW,yBACN,EAAK,2DAEZ,EAAK,oCACL,EAAK;CAiBT,IAbA,QAAgB;EAKd,AAJI,KAAQ,EAAK,gCAAgC,KAC/C,EAAoB,CAAC,GAIrB,KACA,EAAK,6DAA6D,KAElE,EAA4B,EAAK;CAErC,GAAG,CAAC,CAAI,CAAC,GAEL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B,EAAe,GAAM,EAAI,MAAM;UAC5B,CAAA,CAEF;;QACN,GAlBG,EAAI,KAkBP,CACL,CACC;;MACD,CAAA;MAEL,kBAAC,OAAD;OAAK,WAAW,EAAO;iBACrB,kBAAC,GAAD,EAEE,QAAQ,EACT,GAFM,KAAkB,KAExB;MACE,CAAA;KACF,EAAA,CAAA;IACF;OAEN,EAAK,sCAAsC,KAC1C,kBAAC,OAAD;IAAK,WAAW,EAAO;cACrB,kBAAC,GAAD;KAAY,SAAQ;eAAc;IAEtB,CAAA;GACT,CAAA,CAEJ,EAAA,CAAA;GAEP,kBAAC,GAAD;IACE,MAAM;IACN,SAAQ;IACR,OAAM;IACN,aAAY;IACZ,8BAA8B;IAC9B,eAAe;KACb,EAAiC,EAAK;IACxC;GACD,CAAA;GACA,KACC,kBAAC,GAAD;IACE,MAAM;IACN,eAAe,EAAkB,EAAK;IACtC,OAAM;IACN,YAAY;IACZ,SAAS;GAEV,CAAA;EAEA;;AAET"}
1
+ {"version":3,"file":"DownloadCartPage.js","names":[],"sources":["../../../src/components/DownloadCart/DownloadCartPage.tsx"],"sourcesContent":["import styles from './DownloadCartPage.module.scss'\nimport SynapseClient from '@/synapse-client'\nimport { useGetDownloadListStatistics } from '@/synapse-queries/download/useDownloadList'\nimport { useSynapseContext } from '@/utils/context/SynapseContext'\nimport { DeleteTwoTone } from '@mui/icons-material'\nimport { Button, Tooltip, Typography } from '@mui/material'\nimport {\n AvailableFilter,\n FilesStatisticsResponse,\n} from '@sage-bionetworks/synapse-types'\nimport { useEffect, useRef, useState } from 'react'\nimport { ErrorBanner } from '../error/ErrorBanner'\nimport FullWidthAlert from '../FullWidthAlert/FullWidthAlert'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { ProgrammaticInstructionsModal } from '../ProgrammaticInstructionsModal/ProgrammaticInstructionsModal'\nimport AvailableForDownloadTable from './AvailableForDownloadTable'\nimport { CreatePackageV2 } from './CreatePackageV2'\nimport { PYTHON_CLIENT_IMPORT_AND_LOGIN } from './DirectProgrammaticDownload'\nimport { calculateFriendlyFileSize } from '@/utils/functions/calculateFriendlyFileSize'\nimport { DownloadIneligibleForPackagingFilesFromListButton } from './DownloadIneligibleForPackagingFilesFromListButton'\nimport { DownloadListActionsRequired } from './DownloadListActionsRequired'\nimport ComponentCollapse from '../ComponentCollapse'\n\nconst pythonDownloadCode = `${PYTHON_CLIENT_IMPORT_AND_LOGIN}\ndl_list_file_entities = syn.get_download_list()`\n\nconst cliDownloadCode = `synapse get-download-list`\n\nconst filterTabs: { label: string; filter: AvailableFilter }[] = [\n { label: 'All Files', filter: undefined },\n { label: 'Files included in ZIP', filter: 'eligibleForPackaging' },\n { label: 'Files not included in ZIP', filter: 'ineligibleForPackaging' },\n]\n\n/**\n * Show the Download Cart page.\n */\nexport function DownloadCartPage() {\n const { accessToken } = useSynapseContext()\n const [selectedTabIndex, setSelectedTabIndex] = useState<number>(0)\n const [selectedFilterTabIndex, setSelectedFilterTabIndex] =\n useState<number>(0)\n const selectedFilter = filterTabs[selectedFilterTabIndex].filter\n const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] =\n useState<boolean>(false)\n const createPackageRef = useRef<HTMLDivElement>(null)\n // scroll to the CreatePackageV2 component when it is shown so that the user is aware of the next steps after clicking the button to create a package\n useEffect(() => {\n if (isShowingCreatePackageUI) {\n createPackageRef.current?.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n })\n }\n }, [isShowingCreatePackageUI])\n const [isShowingModal, setIsShowingModal] = useState<boolean>(false)\n const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] =\n useState(false)\n const [error, setError] = useState<Error>()\n const {\n data,\n isLoading,\n isError,\n error: newError,\n refetch,\n } = useGetDownloadListStatistics()\n useEffect(() => {\n if (isError && newError) {\n setError(newError)\n }\n }, [isError, newError])\n\n const getFilterCount = (\n data: FilesStatisticsResponse,\n filter: AvailableFilter,\n ) => {\n if (filter === undefined) return data.numberOfFilesAvailableForDownload\n if (filter === 'eligibleForPackaging')\n return data.numberOfFilesAvailableForDownloadAndEligibleForPackaging\n return (\n data.numberOfFilesAvailableForDownload -\n data.numberOfFilesAvailableForDownloadAndEligibleForPackaging\n )\n }\n // SWC-5874: When arriving at the download cart when there are no ARs, the user should start in the Download list\n useEffect(() => {\n if (data && data.numberOfFilesRequiringAction == 0) {\n setSelectedTabIndex(1)\n }\n // also hide the Create Package UI if there are no files available for download\n if (\n data &&\n data.numberOfFilesAvailableForDownloadAndEligibleForPackaging === 0\n ) {\n setIsShowingCreatePackageUI(false)\n }\n }, [data])\n\n if (error) {\n return <ErrorBanner error={error} />\n }\n const clearDownloadList = async () => {\n await SynapseClient.clearDownloadListV2(accessToken)\n refetch()\n }\n return (\n <div className={styles.DownloadCartPage}>\n <div>\n <div className={`${styles.pageHeader}`}>\n <div className=\"container\">\n <div className={styles.grid}>\n <h3 className=\"pageHeaderTitle\">Your Download List</h3>\n <Tooltip\n title=\"Immediately removes all items from your download list\"\n enterNextDelay={300}\n placement=\"right\"\n >\n <Button\n onClick={() => {\n clearDownloadList()\n }}\n variant=\"text\"\n color=\"primary\"\n startIcon={<DeleteTwoTone />}\n >\n Clear Your Download List\n </Button>\n </Tooltip>\n </div>\n </div>\n </div>\n </div>\n <div className={styles.tabsContainer}>\n <div className=\"container\">\n <ul className={styles.navTabs}>\n <li\n className={`${styles.navItem}${\n selectedTabIndex == 0 ? ` ${styles.active}` : ''\n }`}\n aria-selected={selectedTabIndex == 0}\n >\n <button onClick={() => setSelectedTabIndex(0)}>\n Access Actions Required\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {data.totalNumberOfFiles -\n data.numberOfFilesAvailableForDownload}\n </span>\n )}\n </button>\n </li>\n <li\n className={`${styles.navItem}${\n selectedTabIndex == 1 ? ` ${styles.active}` : ''\n }`}\n aria-selected={selectedTabIndex == 1}\n >\n <button onClick={() => setSelectedTabIndex(1)}>\n Download List\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {data.numberOfFilesAvailableForDownload}\n </span>\n )}\n </button>\n </li>\n </ul>\n </div>\n </div>\n\n <div\n className={\n /*\n The DownloadListActionsRequired component stores actions in local state to track which actions are completed.\n\n Mount the actions required component and hide it with style to ensure actions stored in component state are persisted as the user switches tabs\n */\n !(selectedTabIndex == 0 && !isError && !isLoading && data)\n ? styles.hidden\n : undefined\n }\n >\n {data?.numberOfFilesRequiringAction &&\n data.numberOfFilesRequiringAction > 0 && (\n // Unmount instead of hiding the DownloadListActionsRequired component when there are 0 actions required\n // The DownloadListActionsRequired cannot discern between a fulfilled action and an action that is no longer required because the\n // file was removed from the download cart.\n // In the typical case where the download cart is cleared, unmounting the component ensures that the actions are cleared out.\n <div>\n <div className=\"container\">\n <DownloadListActionsRequired />\n </div>\n </div>\n )}\n {data?.numberOfFilesRequiringAction === 0 && (\n <div className={styles.placeholder}>\n <div>No actions are currently required.</div>\n </div>\n )}\n </div>\n\n {selectedTabIndex == 1 && !isError && !isLoading && data && (\n <div>\n {data.numberOfFilesAvailableForDownload > 0 && (\n <div className={`container ${styles.DownloadListTabContent}`}>\n <h3 className={`${styles.sectionTitle} pageHeaderTitle`}>\n Bulk Download Options\n {data.sumOfFileSizesAvailableForDownload != null && (\n <Tooltip\n placement=\"right\"\n title={\n <>\n Total file size\n <br />\n Does not include files hosted outside Synapse\n </>\n }\n slotProps={{ tooltip: { sx: { maxWidth: 400 } } }}\n >\n <span className={styles.totalFileSize}>\n {calculateFriendlyFileSize(\n data.sumOfFileSizesAvailableForDownload,\n )}{' '}\n total*\n </span>\n </Tooltip>\n )}\n </h3>\n <div>\n <div className={styles.subSectionOverview}>\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"packagableFile\" /> Web Download (.ZIP)\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging >\n 0 && (\n <Button\n variant=\"contained\"\n onClick={() => {\n setIsShowingCreatePackageUI(true)\n }}\n startIcon={<IconSvg icon=\"download\" wrap={false} />}\n >\n Download Packages\n </Button>\n )}\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging ==\n 0 && (\n <Tooltip\n title=\"You cannot create a .zip package because there are no eligible files.\"\n enterNextDelay={300}\n placement=\"top\"\n >\n <span>\n <Button\n variant=\"contained\"\n disabled\n startIcon={\n <IconSvg icon=\"download\" wrap={false} />\n }\n >\n Download Packages\n </Button>\n </span>\n </Tooltip>\n )}\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Only some files may be eligible for packaging as ZIP.\n Use the Individual Downloads tab, below, to download\n non-packageable files.&nbsp;\n <a\n href=\"https://help.synapse.org/docs/Downloading-Data-From-the-Synapse-UI.2004254837.html\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n More Information.\n </a>\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n <ul>\n <li>Files are bundled into .ZIPs up to 1 GB each.</li>\n <li>\n Larger selections are split into multiple packages.\n </li>\n <li>\n Includes only files stored in Synapse native\n storage.\n </li>\n <li>\n Each package contains a CSV manifest with file\n annotations and metadata.\n </li>\n </ul>\n </Typography>\n </ComponentCollapse>\n </div>\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"code\" /> Programmatic Download\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n <Button\n variant=\"contained\"\n onClick={() => {\n setIsShowingModal(true)\n }}\n startIcon={<IconSvg icon=\"download\" wrap={false} />}\n >\n Get R / Python / CLI Code\n </Button>\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Use our Python, R, or command line clients to download\n files quickly.&nbsp;\n <a\n href=\"https://help.synapse.org/docs/Downloading-Data-Programmatically.2003796248.html\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n >\n More Information.\n </a>\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n <ul>\n <li>Requires a client (R, Python, or CLI).</li>\n <li>\n No limits on individual file size or total download\n size.\n </li>\n <li>\n Includes files stored both on and off Synapse native\n storage.\n </li>\n <li>\n Downloads include a CSV manifest with file\n annotations and metadata.\n </li>\n </ul>\n </Typography>\n </ComponentCollapse>\n </div>\n {data.numberOfFilesAvailableForDownloadAndEligibleForPackaging <\n data.numberOfFilesAvailableForDownload && (\n <div className={styles.subSection}>\n <div className={styles.subSectionHeader}>\n <div className={styles.headline}>\n <Typography variant={'headline3'}>\n <IconSvg icon=\"multiFile\" /> Multi-file Download\n </Typography>\n </div>\n <div className={styles.subSectionActions}>\n <div className={styles.ineligibleDownloadContainer}>\n <DownloadIneligibleForPackagingFilesFromListButton />\n </div>\n </div>\n </div>\n <ComponentCollapse\n component={\n <Typography variant={'body1'} component={'div'}>\n Files which <strong>aren't</strong> included in a\n ZIP package may be downloaded as a multi-file\n download.&nbsp;\n </Typography>\n }\n collapseBoxSx={{\n backgroundColor: 'transparent',\n p: 0,\n mt: '15px',\n }}\n componentContainerSx={{\n backgroundColor: 'transparent',\n p: 0,\n }}\n iconSx={{ width: '25px', height: '25px' }}\n >\n <Typography\n variant={'body1'}\n component={'div'}\n sx={{ marginBottom: '15px' }}\n >\n Clicking “Start Multi-file Download” initiates a\n download of all files in your Download List that can’t\n be bundled into a ZIP—such as large files or external\n links—in one step. Files are saved one by one with\n clear progress updates, automatic handling of\n duplicate names, and retry support if something fails.\n You can cancel anytime.\n <br />\n <br />\n Note: in some browsers, files download individually to\n your default Downloads folder instead of a selected\n location.\n </Typography>\n </ComponentCollapse>\n </div>\n )}\n </div>\n </div>\n\n <div>\n {isShowingCreatePackageUI && (\n <div ref={createPackageRef}>\n <CreatePackageV2\n onPackageCreation={() => {\n setIsShowingDownloadSuccessAlert(true)\n }}\n />\n </div>\n )}\n <h3 className={`${styles.sectionTitle} pageHeaderTitle`}>\n Download Individual Files\n </h3>\n <div className={styles.tabsContainer}>\n <ul className={styles.navTabs}>\n <li className={styles.navLabel}>View:</li>\n {filterTabs.map((tab, index) => (\n <li\n key={tab.label}\n className={`${styles.navItem}${\n selectedFilterTabIndex === index\n ? ` ${styles.active}`\n : ''\n }`}\n aria-selected={selectedFilterTabIndex === index}\n >\n <button\n onClick={() => setSelectedFilterTabIndex(index)}\n >\n {tab.label}\n {!isError && !isLoading && data && (\n <span className={styles.fileCount}>\n {getFilterCount(data, tab.filter)}\n </span>\n )}\n </button>\n </li>\n ))}\n </ul>\n </div>\n\n <div className={styles.availableForDownloadTableContainer}>\n <AvailableForDownloadTable\n key={selectedFilter ?? 'all'}\n filter={selectedFilter}\n />\n </div>\n </div>\n </div>\n )}\n {data.numberOfFilesAvailableForDownload === 0 && (\n <div className={styles.placeholder}>\n <Typography variant=\"body1Italic\">\n Your Download List is currently empty.\n </Typography>\n </div>\n )}\n </div>\n )}\n <FullWidthAlert\n show={isShowingDownloadSuccessAlert}\n variant=\"success\"\n title=\"Package Created\"\n description=\"A package has been created with eligible files. The items contained in this .zip file have been removed from your list. If your package is over 1GB, you will need to create multiple packages.\"\n autoCloseAfterDelayInSeconds={10}\n onClose={() => {\n setIsShowingDownloadSuccessAlert(false)\n }}\n />\n {isShowingModal && (\n <ProgrammaticInstructionsModal\n show={true}\n onClose={() => setIsShowingModal(false)}\n title=\"Download Programmatically\"\n pythonCode={pythonDownloadCode}\n cliCode={cliDownloadCode}\n // rCode={rDownloadCode}\n />\n )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;iBACrB,kBAAC,GAAD,EAEE,QAAQ,EACT,GAFM,KAAkB,KAExB;MACE,CAAA;KACF,EAAA,CAAA;IACF;OAEN,EAAK,sCAAsC,KAC1C,kBAAC,OAAD;IAAK,WAAW,EAAO;cACrB,kBAAC,GAAD;KAAY,SAAQ;eAAc;IAEtB,CAAA;GACT,CAAA,CAEJ,EAAA,CAAA;GAEP,kBAAC,GAAD;IACE,MAAM;IACN,SAAQ;IACR,OAAM;IACN,aAAY;IACZ,8BAA8B;IAC9B,eAAe;KACb,EAAiC,EAAK;IACxC;GACD,CAAA;GACA,KACC,kBAAC,GAAD;IACE,MAAM;IACN,eAAe,EAAkB,EAAK;IACtC,OAAM;IACN,YAAY;IACZ,SAAS;GAEV,CAAA;EAEA;;AAET"}
@@ -1,6 +1,2 @@
1
- export type DownloadListActionsRequiredProps = {
2
- /** Invoked when a user clicks "View Sharing Settings" for a set of files that require the Download permission*/
3
- onViewSharingSettingsClicked?: (benefactorId: string) => void;
4
- };
5
- export declare function DownloadListActionsRequired(props: DownloadListActionsRequiredProps): import("react/jsx-runtime").JSX.Element;
1
+ export declare function DownloadListActionsRequired(): import("react/jsx-runtime").JSX.Element;
6
2
  //# sourceMappingURL=DownloadListActionsRequired.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadListActionsRequired.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/DownloadListActionsRequired.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,gCAAgC,GAAG;IAC7C,gHAAgH;IAChH,4BAA4B,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9D,CAAA;AAED,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,gCAAgC,2CA0CxC"}
1
+ {"version":3,"file":"DownloadListActionsRequired.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/DownloadListActionsRequired.tsx"],"names":[],"mappings":"AAOA,wBAAgB,2BAA2B,4CAsC1C"}
@@ -7,8 +7,8 @@ import { times as i } from "lodash-es";
7
7
  import { Box as a } from "@mui/material";
8
8
  import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
9
9
  //#region src/components/DownloadCart/DownloadListActionsRequired.tsx
10
- function l(l) {
11
- let { onViewSharingSettingsClicked: u } = l, { data: d, isLoading: f } = e({ throwOnError: !0 });
10
+ function l() {
11
+ let { data: l, isLoading: u } = e({ throwOnError: !0 });
12
12
  return /* @__PURE__ */ s(o, { children: /* @__PURE__ */ c(a, {
13
13
  sx: {
14
14
  display: "flex",
@@ -16,11 +16,10 @@ function l(l) {
16
16
  gap: 3,
17
17
  pt: 5
18
18
  },
19
- children: [t(d).map((e, t) => e ? /* @__PURE__ */ s(r, {
19
+ children: [t(l).map((e, t) => e ? /* @__PURE__ */ s(r, {
20
20
  action: e.action,
21
- count: e.count,
22
- onViewSharingSettingsClicked: u
23
- }, t) : !1), f && i(3).map((e) => /* @__PURE__ */ s(n, {}, e))]
21
+ count: e.count
22
+ }, t) : !1), u && i(3).map((e) => /* @__PURE__ */ s(n, {}, e))]
24
23
  }) });
25
24
  }
26
25
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"DownloadListActionsRequired.js","names":[],"sources":["../../../src/components/DownloadCart/DownloadListActionsRequired.tsx"],"sourcesContent":["import { useGetAllDownloadListActionsRequired } from '@/synapse-queries'\nimport useTrackTransientListItems from '@/utils/hooks/useTrackTransientListItems'\nimport { Box } from '@mui/material'\nimport { times } from 'lodash-es'\nimport { LoadingActionRequiredCard } from './ActionRequiredCard/ActionRequiredCard'\nimport { ActionRequiredListItem } from './ActionRequiredListItem'\n\nexport type DownloadListActionsRequiredProps = {\n /** Invoked when a user clicks \"View Sharing Settings\" for a set of files that require the Download permission*/\n onViewSharingSettingsClicked?: (benefactorId: string) => void\n}\n\nexport function DownloadListActionsRequired(\n props: DownloadListActionsRequiredProps,\n) {\n const { onViewSharingSettingsClicked } = props\n\n // This component will track all completed actions, based on which actions are omitted from the ActionsRequiredResponse as the user performs required tasks\n // For accurate tracking, we must make sure we have all data. So we will fetch all pages instead of one page at a time.\n const { data: currentActionsRequired, isLoading } =\n useGetAllDownloadListActionsRequired({\n throwOnError: true,\n })\n\n // PORTALS-2950 - Keep a record of actions that disappear from the server response - i.e. the 'completed' actions\n const allCompleteAndIncompleteActions = useTrackTransientListItems(\n currentActionsRequired,\n )\n\n return (\n <>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n pt: 5,\n }}\n >\n {allCompleteAndIncompleteActions.map((item, index) => {\n if (item) {\n return (\n <ActionRequiredListItem\n key={index}\n action={item.action}\n count={item.count}\n onViewSharingSettingsClicked={onViewSharingSettingsClicked}\n />\n )\n } else return false\n })}\n {isLoading && times(3).map(k => <LoadingActionRequiredCard key={k} />)}\n </Box>\n </>\n )\n}\n"],"mappings":";;;;;;;;;AAYA,SAAgB,EACd,GACA;CACA,IAAM,EAAE,oCAAiC,GAInC,EAAE,MAAM,GAAwB,iBACpC,EAAqC,EACnC,cAAc,GAChB,CAAC;CAOH,OACE,kBAAA,GAAA,EAAA,UACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,eAAe;GACf,KAAK;GACL,IAAI;EACN;YANF,CANoC,EACtC,CAaK,EAAgC,KAAK,GAAM,MACtC,IAEA,kBAAC,GAAD;GAEE,QAAQ,EAAK;GACb,OAAO,EAAK;GACkB;EAC/B,GAJM,CAIN,IAES,EACf,GACA,KAAa,EAAM,CAAC,EAAE,KAAI,MAAK,kBAAC,GAAD,CAAoC,GAAJ,CAAI,CAAC,CAClE;IACL,CAAA;AAEN"}
1
+ {"version":3,"file":"DownloadListActionsRequired.js","names":[],"sources":["../../../src/components/DownloadCart/DownloadListActionsRequired.tsx"],"sourcesContent":["import { useGetAllDownloadListActionsRequired } from '@/synapse-queries'\nimport useTrackTransientListItems from '@/utils/hooks/useTrackTransientListItems'\nimport { Box } from '@mui/material'\nimport { times } from 'lodash-es'\nimport { LoadingActionRequiredCard } from './ActionRequiredCard/ActionRequiredCard'\nimport { ActionRequiredListItem } from './ActionRequiredListItem'\n\nexport function DownloadListActionsRequired() {\n // This component will track all completed actions, based on which actions are omitted from the ActionsRequiredResponse as the user performs required tasks\n // For accurate tracking, we must make sure we have all data. So we will fetch all pages instead of one page at a time.\n const { data: currentActionsRequired, isLoading } =\n useGetAllDownloadListActionsRequired({\n throwOnError: true,\n })\n\n // PORTALS-2950 - Keep a record of actions that disappear from the server response - i.e. the 'completed' actions\n const allCompleteAndIncompleteActions = useTrackTransientListItems(\n currentActionsRequired,\n )\n\n return (\n <>\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'column',\n gap: 3,\n pt: 5,\n }}\n >\n {allCompleteAndIncompleteActions.map((item, index) => {\n if (item) {\n return (\n <ActionRequiredListItem\n key={index}\n action={item.action}\n count={item.count}\n />\n )\n } else return false\n })}\n {isLoading && times(3).map(k => <LoadingActionRequiredCard key={k} />)}\n </Box>\n </>\n )\n}\n"],"mappings":";;;;;;;;;AAOA,SAAgB,IAA8B;CAG5C,IAAM,EAAE,MAAM,GAAwB,iBACpC,EAAqC,EACnC,cAAc,GAChB,CAAC;CAOH,OACE,kBAAA,GAAA,EAAA,UACE,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,eAAe;GACf,KAAK;GACL,IAAI;EACN;YANF,CANoC,EACtC,CAaK,EAAgC,KAAK,GAAM,MACtC,IAEA,kBAAC,GAAD;GAEE,QAAQ,EAAK;GACb,OAAO,EAAK;EACb,GAHM,CAGN,IAES,EACf,GACA,KAAa,EAAM,CAAC,EAAE,KAAI,MAAK,kBAAC,GAAD,CAAoC,GAAJ,CAAI,CAAC,CAClE;IACL,CAAA;AAEN"}
@@ -1,8 +1,6 @@
1
1
  export type RequestDownloadCardProps = {
2
2
  entityId: string;
3
3
  count?: number;
4
- /** Invoked when a user clicks "View Sharing Settings" for a set of files that require the Download permission*/
5
- onViewSharingSettingsClicked?: (benefactorId: string) => void;
6
4
  };
7
5
  export declare const REQUEST_DOWNLOAD_TITLE = "Download Permission Required";
8
6
  export declare function RequestDownloadCard(props: RequestDownloadCardProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"RequestDownloadCard.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/RequestDownloadCard.tsx"],"names":[],"mappings":"AAQA,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,gHAAgH;IAChH,4BAA4B,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CAC9D,CAAA;AAQD,eAAO,MAAM,sBAAsB,iCAAiC,CAAA;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAmElE"}
1
+ {"version":3,"file":"RequestDownloadCard.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/RequestDownloadCard.tsx"],"names":[],"mappings":"AAOA,MAAM,MAAM,wBAAwB,GAAG;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,sBAAsB,iCAAiC,CAAA;AACpE,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAqDlE"}
@@ -1,36 +1,34 @@
1
1
  import { DOWNLOAD_PERMISSION_REQUIRED as e } from "../../utils/SynapseConstants.js";
2
2
  import t from "../../synapse-queries/entity/useEntityBundle.js";
3
- import { useGetFeatureFlag as n } from "../../synapse-queries/featureflags/useGetFeatureFlag.js";
4
3
  import "../../synapse-queries/index.js";
5
- import { ActionRequiredCard as r } from "./ActionRequiredCard/ActionRequiredCard.js";
6
- import { FeatureFlagEnum as i } from "../../utils/featureflag/FeatureFlags.js";
7
- import a from "../EntityAclEditor/EntityAclEditorModal.js";
8
- import { useState as o } from "react";
9
- import { Alert as s, Button as c, Typography as l } from "@mui/material";
10
- import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
4
+ import { ActionRequiredCard as n } from "./ActionRequiredCard/ActionRequiredCard.js";
5
+ import r from "../EntityAclEditor/EntityAclEditorModal.js";
6
+ import { useState as i } from "react";
7
+ import { Alert as a, Button as o, Typography as s } from "@mui/material";
8
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
11
9
  //#region src/components/DownloadCart/RequestDownloadCard.tsx
12
- var p = ((e) => window.open(`https://www.synapse.org/Synapse:${e}`, "_blank")), m = "Download Permission Required";
13
- function h(h) {
14
- let { entityId: g, count: _, onViewSharingSettingsClicked: v = p } = h, { data: y, isLoading: b, isError: x, error: S } = t(g, void 0, {
10
+ var d = "Download Permission Required";
11
+ function f(f) {
12
+ let { entityId: p, count: m } = f, { data: h, isLoading: g, isError: _, error: v } = t(p, void 0, {
15
13
  includeEntity: !0,
16
14
  includePermissions: !0
17
- }), [C, w] = o(!1), T = !!y?.permissions.canDownload, E = n(i.REACT_ENTITY_ACL_EDITOR);
18
- return x ? /* @__PURE__ */ d(s, {
15
+ }), [y, b] = i(!1), x = !!h?.permissions.canDownload;
16
+ return _ ? /* @__PURE__ */ l(a, {
19
17
  severity: "error",
20
- children: S.reason
21
- }) : /* @__PURE__ */ d(r, {
22
- isLoading: b,
23
- title: m,
24
- description: /* @__PURE__ */ f(u, { children: [
18
+ children: v.reason
19
+ }) : /* @__PURE__ */ l(n, {
20
+ isLoading: g,
21
+ title: d,
22
+ description: /* @__PURE__ */ u(c, { children: [
25
23
  "You must be granted the download permission on",
26
24
  " ",
27
- /* @__PURE__ */ d("strong", { children: y?.entity.name }),
25
+ /* @__PURE__ */ l("strong", { children: h?.entity.name }),
28
26
  " in order to download this set of files."
29
27
  ] }),
30
28
  iconType: e,
31
- count: _,
32
- actionNode: /* @__PURE__ */ f(u, { children: [
33
- /* @__PURE__ */ d(l, {
29
+ count: m,
30
+ actionNode: /* @__PURE__ */ u(c, { children: [
31
+ /* @__PURE__ */ l(s, {
34
32
  variant: "smallText1",
35
33
  sx: {
36
34
  mb: 1,
@@ -38,23 +36,21 @@ function h(h) {
38
36
  },
39
37
  children: "Contact an administrator to request download permission"
40
38
  }),
41
- /* @__PURE__ */ d(a, {
42
- entityId: g,
43
- open: C,
44
- onClose: () => w(!1)
39
+ /* @__PURE__ */ l(r, {
40
+ entityId: p,
41
+ open: y,
42
+ onClose: () => b(!1)
45
43
  }),
46
- /* @__PURE__ */ d(c, {
44
+ /* @__PURE__ */ l(o, {
47
45
  variant: "outlined",
48
- onClick: () => {
49
- E ? w(!0) : v(g);
50
- },
51
- disabled: T,
52
- children: T ? "Complete" : "View Sharing Settings"
46
+ onClick: () => b(!0),
47
+ disabled: x,
48
+ children: x ? "Complete" : "View Sharing Settings"
53
49
  })
54
50
  ] })
55
51
  });
56
52
  }
57
53
  //#endregion
58
- export { m as REQUEST_DOWNLOAD_TITLE, h as RequestDownloadCard };
54
+ export { d as REQUEST_DOWNLOAD_TITLE, f as RequestDownloadCard };
59
55
 
60
56
  //# sourceMappingURL=RequestDownloadCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RequestDownloadCard.js","names":[],"sources":["../../../src/components/DownloadCart/RequestDownloadCard.tsx"],"sourcesContent":["import { useGetEntityBundle, useGetFeatureFlag } from '@/synapse-queries'\nimport { DOWNLOAD_PERMISSION_REQUIRED } from '@/utils/SynapseConstants'\nimport { Alert, Button, Typography } from '@mui/material'\nimport { FeatureFlagEnum } from '@/utils/featureflag/FeatureFlags'\nimport { useState } from 'react'\nimport EntityAclEditorModal from '../EntityAclEditor/EntityAclEditorModal'\nimport { ActionRequiredCard } from './ActionRequiredCard/ActionRequiredCard'\n\nexport type RequestDownloadCardProps = {\n entityId: string\n count?: number\n /** Invoked when a user clicks \"View Sharing Settings\" for a set of files that require the Download permission*/\n onViewSharingSettingsClicked?: (benefactorId: string) => void\n}\n\nconst DEFAULT_ON_VIEW_SHARING_SETTINGS_CLICKED = (benefactorEntityId =>\n window.open(\n `https://www.synapse.org/Synapse:${benefactorEntityId}`,\n '_blank',\n )) satisfies RequestDownloadCardProps['onViewSharingSettingsClicked']\n\nexport const REQUEST_DOWNLOAD_TITLE = 'Download Permission Required'\nexport function RequestDownloadCard(props: RequestDownloadCardProps) {\n const {\n entityId,\n count,\n onViewSharingSettingsClicked = DEFAULT_ON_VIEW_SHARING_SETTINGS_CLICKED,\n } = props\n const {\n data: entityBundle,\n isLoading,\n isError,\n error,\n } = useGetEntityBundle(entityId, undefined, {\n includeEntity: true,\n includePermissions: true,\n })\n\n const [showSharingSettings, setShowSharingSettings] = useState(false)\n\n const hasDownloadPermission = Boolean(entityBundle?.permissions.canDownload)\n\n const useReactACLEditor = useGetFeatureFlag(\n FeatureFlagEnum.REACT_ENTITY_ACL_EDITOR,\n )\n\n if (isError) {\n return <Alert severity={'error'}>{error.reason}</Alert>\n }\n return (\n <ActionRequiredCard\n isLoading={isLoading}\n title={REQUEST_DOWNLOAD_TITLE}\n description={\n <>\n You must be granted the download permission on{' '}\n <strong>{entityBundle?.entity.name}</strong> in order to download this\n set of files.\n </>\n }\n iconType={DOWNLOAD_PERMISSION_REQUIRED}\n count={count}\n actionNode={\n <>\n <Typography variant=\"smallText1\" sx={{ mb: 1, color: 'grey.700' }}>\n Contact an administrator to request download permission\n </Typography>\n <EntityAclEditorModal\n entityId={entityId}\n open={showSharingSettings}\n onClose={() => setShowSharingSettings(false)}\n />\n <Button\n variant=\"outlined\"\n onClick={() => {\n if (useReactACLEditor) {\n setShowSharingSettings(true)\n } else {\n onViewSharingSettingsClicked(entityId)\n }\n }}\n disabled={hasDownloadPermission}\n >\n {hasDownloadPermission ? 'Complete' : 'View Sharing Settings'}\n </Button>\n </>\n }\n />\n )\n}\n"],"mappings":";;;;;;;;;;;AAeA,IAAM,MAA4C,MAChD,OAAO,KACL,mCAAmC,KACnC,QACF,IAEW,IAAyB;AACtC,SAAgB,EAAoB,GAAiC;CACnE,IAAM,EACJ,aACA,UACA,kCAA+B,MAC7B,GACE,EACJ,MAAM,GACN,cACA,YACA,aACE,EAAmB,GAAU,KAAA,GAAW;EAC1C,eAAe;EACf,oBAAoB;CACtB,CAAC,GAEK,CAAC,GAAqB,KAA0B,EAAS,EAAK,GAE9D,IAAwB,EAAQ,GAAc,YAAY,aAE1D,IAAoB,EACxB,EAAgB,uBAClB;CAKA,OAHI,IACK,kBAAC,GAAD;EAAO,UAAU;YAAU,EAAM;CAAc,CAAA,IAGtD,kBAAC,GAAD;EACa;EACX,OAAO;EACP,aACE,kBAAA,GAAA,EAAA,UAAA;GAAE;GAC+C;GAC/C,kBAAC,UAAD,EAAA,UAAS,GAAc,OAAO,KAAa,CAAA;GAAC;EAE5C,EAAA,CAAA;EAEJ,UAAU;EACH;EACP,YACE,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,GAAD;IAAY,SAAQ;IAAa,IAAI;KAAE,IAAI;KAAG,OAAO;IAAW;cAAG;GAEvD,CAAA;GACZ,kBAAC,GAAD;IACY;IACV,MAAM;IACN,eAAe,EAAuB,EAAK;GAC5C,CAAA;GACD,kBAAC,GAAD;IACE,SAAQ;IACR,eAAe;KACb,AAAI,IACF,EAAuB,EAAI,IAE3B,EAA6B,CAAQ;IAEzC;IACA,UAAU;cAET,IAAwB,aAAa;GAChC,CAAA;EACR,EAAA,CAAA;CAEL,CAAA;AAEL"}
1
+ {"version":3,"file":"RequestDownloadCard.js","names":[],"sources":["../../../src/components/DownloadCart/RequestDownloadCard.tsx"],"sourcesContent":["import { useGetEntityBundle } from '@/synapse-queries'\nimport { DOWNLOAD_PERMISSION_REQUIRED } from '@/utils/SynapseConstants'\nimport { Alert, Button, Typography } from '@mui/material'\nimport { useState } from 'react'\nimport EntityAclEditorModal from '../EntityAclEditor/EntityAclEditorModal'\nimport { ActionRequiredCard } from './ActionRequiredCard/ActionRequiredCard'\n\nexport type RequestDownloadCardProps = {\n entityId: string\n count?: number\n}\n\nexport const REQUEST_DOWNLOAD_TITLE = 'Download Permission Required'\nexport function RequestDownloadCard(props: RequestDownloadCardProps) {\n const { entityId, count } = props\n const {\n data: entityBundle,\n isLoading,\n isError,\n error,\n } = useGetEntityBundle(entityId, undefined, {\n includeEntity: true,\n includePermissions: true,\n })\n\n const [showSharingSettings, setShowSharingSettings] = useState(false)\n\n const hasDownloadPermission = Boolean(entityBundle?.permissions.canDownload)\n\n if (isError) {\n return <Alert severity={'error'}>{error.reason}</Alert>\n }\n return (\n <ActionRequiredCard\n isLoading={isLoading}\n title={REQUEST_DOWNLOAD_TITLE}\n description={\n <>\n You must be granted the download permission on{' '}\n <strong>{entityBundle?.entity.name}</strong> in order to download this\n set of files.\n </>\n }\n iconType={DOWNLOAD_PERMISSION_REQUIRED}\n count={count}\n actionNode={\n <>\n <Typography variant=\"smallText1\" sx={{ mb: 1, color: 'grey.700' }}>\n Contact an administrator to request download permission\n </Typography>\n <EntityAclEditorModal\n entityId={entityId}\n open={showSharingSettings}\n onClose={() => setShowSharingSettings(false)}\n />\n <Button\n variant=\"outlined\"\n onClick={() => setShowSharingSettings(true)}\n disabled={hasDownloadPermission}\n >\n {hasDownloadPermission ? 'Complete' : 'View Sharing Settings'}\n </Button>\n </>\n }\n />\n )\n}\n"],"mappings":";;;;;;;;;AAYA,IAAa,IAAyB;AACtC,SAAgB,EAAoB,GAAiC;CACnE,IAAM,EAAE,aAAU,aAAU,GACtB,EACJ,MAAM,GACN,cACA,YACA,aACE,EAAmB,GAAU,KAAA,GAAW;EAC1C,eAAe;EACf,oBAAoB;CACtB,CAAC,GAEK,CAAC,GAAqB,KAA0B,EAAS,EAAK,GAE9D,IAAwB,EAAQ,GAAc,YAAY;CAKhE,OAHI,IACK,kBAAC,GAAD;EAAO,UAAU;YAAU,EAAM;CAAc,CAAA,IAGtD,kBAAC,GAAD;EACa;EACX,OAAO;EACP,aACE,kBAAA,GAAA,EAAA,UAAA;GAAE;GAC+C;GAC/C,kBAAC,UAAD,EAAA,UAAS,GAAc,OAAO,KAAa,CAAA;GAAC;EAE5C,EAAA,CAAA;EAEJ,UAAU;EACH;EACP,YACE,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,GAAD;IAAY,SAAQ;IAAa,IAAI;KAAE,IAAI;KAAG,OAAO;IAAW;cAAG;GAEvD,CAAA;GACZ,kBAAC,GAAD;IACY;IACV,MAAM;IACN,eAAe,EAAuB,EAAK;GAC5C,CAAA;GACD,kBAAC,GAAD;IACE,SAAQ;IACR,eAAe,EAAuB,EAAI;IAC1C,UAAU;cAET,IAAwB,aAAa;GAChC,CAAA;EACR,EAAA,CAAA;CAEL,CAAA;AAEL"}
@@ -4,8 +4,6 @@ export type TableQueryActionsRequiredProps = {
4
4
  queryBundleRequest: QueryBundleRequest;
5
5
  /** The column models of the table */
6
6
  columnModels: ColumnModel[];
7
- /** Invoked when a user clicks "View Sharing Settings" for a set of files that require the Download permission*/
8
- onViewSharingSettingsClicked?: (benefactorId: string) => void;
9
7
  /** Invoked when the number of required actions changes. Can be used to set UI state based on if all actions have been fulfilled */
10
8
  onNumberOfRequiredActionsChanged?: (actionsRequired: number) => void;
11
9
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TableQueryActionsRequired.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/TableQueryActionsRequired.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,iCAAiC,CAAA;AAQxC,MAAM,MAAM,8BAA8B,GAAG;IAC3C,gFAAgF;IAChF,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,qCAAqC;IACrC,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,gHAAgH;IAChH,4BAA4B,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IAC7D,mIAAmI;IACnI,gCAAgC,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CACrE,CAAA;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CAuDtC"}
1
+ {"version":3,"file":"TableQueryActionsRequired.d.ts","sourceRoot":"","sources":["../../../src/components/DownloadCart/TableQueryActionsRequired.tsx"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,kBAAkB,EACnB,MAAM,iCAAiC,CAAA;AAQxC,MAAM,MAAM,8BAA8B,GAAG;IAC3C,gFAAgF;IAChF,kBAAkB,EAAE,kBAAkB,CAAA;IACtC,qCAAqC;IACrC,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,mIAAmI;IACnI,gCAAgC,CAAC,EAAE,CAAC,eAAe,EAAE,MAAM,KAAK,IAAI,CAAA;CACrE,CAAA;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,8BAA8B,2CAqDtC"}
@@ -8,17 +8,17 @@ import { Box as s, Typography as c } from "@mui/material";
8
8
  import { jsx as l, jsxs as u } from "react/jsx-runtime";
9
9
  //#region src/components/DownloadCart/TableQueryActionsRequired.tsx
10
10
  function d(d) {
11
- let { queryBundleRequest: f, columnModels: p, onNumberOfRequiredActionsChanged: m = a, onViewSharingSettingsClicked: h } = d, { data: g, isLoading: _ } = r(f, p, { throwOnError: !0 }), v = e(g);
11
+ let { queryBundleRequest: f, columnModels: p, onNumberOfRequiredActionsChanged: m = a } = d, { data: h, isLoading: g } = r(f, p, { throwOnError: !0 }), _ = e(h);
12
12
  return i(() => {
13
- g && m(g.length);
14
- }, [g, m]), /* @__PURE__ */ u(s, {
13
+ h && m(h.length);
14
+ }, [h, m]), /* @__PURE__ */ u(s, {
15
15
  sx: {
16
16
  display: "flex",
17
17
  flexDirection: "column",
18
18
  gap: 3
19
19
  },
20
20
  children: [
21
- !_ && v.length === 0 && /* @__PURE__ */ l(c, {
21
+ !g && _.length === 0 && /* @__PURE__ */ l(c, {
22
22
  variant: "body1Italic",
23
23
  sx: {
24
24
  p: 4,
@@ -27,12 +27,11 @@ function d(d) {
27
27
  },
28
28
  children: "All requirements have been met. No actions are required."
29
29
  }),
30
- v.map((e, t) => /* @__PURE__ */ l(n, {
30
+ _.map((e, t) => /* @__PURE__ */ l(n, {
31
31
  action: e.action,
32
- count: e.count,
33
- onViewSharingSettingsClicked: h
32
+ count: e.count
34
33
  }, t)),
35
- _ && o(3).map((e) => /* @__PURE__ */ l(t, {}, e))
34
+ g && o(3).map((e) => /* @__PURE__ */ l(t, {}, e))
36
35
  ]
37
36
  });
38
37
  }