synapse-react-client 4.0.41 → 4.0.42

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 (313) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts +7 -0
  3. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.d.ts.map +1 -0
  4. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js +30 -0
  5. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/AccessorRequirementHelpText.js.map +1 -0
  6. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
  7. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +138 -244
  8. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
  9. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts +13 -0
  10. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.d.ts.map +1 -0
  11. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js +60 -0
  12. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DucUploadSection.js.map +1 -0
  13. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +8 -2
  14. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
  15. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +179 -63
  16. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
  17. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts +2 -0
  18. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.d.ts.map +1 -1
  19. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js +13 -13
  20. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementFormWikiWrapper.js.map +1 -1
  21. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.d.ts +3 -2
  22. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.d.ts.map +1 -1
  23. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItemView.js.map +1 -1
  24. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +3 -2
  25. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
  26. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
  27. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts +12 -0
  28. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.d.ts.map +1 -0
  29. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js +50 -0
  30. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/PrincipalInvestigatorFields.js.map +1 -0
  31. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
  32. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +112 -143
  33. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
  34. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +4 -2
  35. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -1
  36. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +8 -7
  37. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -1
  38. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +3 -2
  39. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -1
  40. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +79 -47
  41. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -1
  42. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts +12 -0
  43. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.d.ts.map +1 -0
  44. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js +51 -0
  45. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.js.map +1 -0
  46. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts +12 -0
  47. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.d.ts.map +1 -0
  48. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js +24 -0
  49. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.js.map +1 -0
  50. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts +11 -0
  51. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.d.ts.map +1 -0
  52. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.js +0 -0
  53. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts +22 -0
  54. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.d.ts.map +1 -0
  55. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js +32 -0
  56. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.js.map +1 -0
  57. package/dist/components/AclEditor/AclEditor.js +20 -20
  58. package/dist/components/Authentication/TwoFactorBackupCodes.js +1 -1
  59. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  60. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  61. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +79 -69
  62. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  63. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  64. package/dist/components/DataGrid/SynapseGrid.js +244 -246
  65. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  66. package/dist/components/DataGrid/components/GridLoadingState.d.ts +23 -0
  67. package/dist/components/DataGrid/components/GridLoadingState.d.ts.map +1 -0
  68. package/dist/components/DataGrid/components/GridLoadingState.js +64 -0
  69. package/dist/components/DataGrid/components/GridLoadingState.js.map +1 -0
  70. package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
  71. package/dist/components/DataGrid/components/ReorderColumnsDialog.js +30 -29
  72. package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
  73. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +60 -6
  74. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  75. package/dist/components/DataGrid/useDataGridWebsocket.js +71 -60
  76. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  77. package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts +11 -0
  78. package/dist/components/DataGrid/utils/getNamedColumnIndices.d.ts.map +1 -0
  79. package/dist/components/DataGrid/utils/getNamedColumnIndices.js +8 -0
  80. package/dist/components/DataGrid/utils/getNamedColumnIndices.js.map +1 -0
  81. package/dist/components/FilePreview/FileHandleContentRenderer.d.ts +6 -2
  82. package/dist/components/FilePreview/FileHandleContentRenderer.d.ts.map +1 -1
  83. package/dist/components/FilePreview/FileHandleContentRenderer.js +27 -14
  84. package/dist/components/FilePreview/FileHandleContentRenderer.js.map +1 -1
  85. package/dist/components/FilePreview/PdfPreview.d.ts +1 -1
  86. package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
  87. package/dist/components/FilePreview/PdfPreview.js +15 -16
  88. package/dist/components/FilePreview/PdfPreview.js.map +1 -1
  89. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.d.ts.map +1 -1
  90. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js +71 -68
  91. package/dist/components/FormTemplateEditor/FieldDefinitionDrawer.js.map +1 -1
  92. package/dist/components/FormTemplateEditor/FieldLibrary.css +1 -0
  93. package/dist/components/FormTemplateEditor/FieldLibrary.d.ts +17 -0
  94. package/dist/components/FormTemplateEditor/FieldLibrary.d.ts.map +1 -0
  95. package/dist/components/FormTemplateEditor/FieldLibrary.js +88 -0
  96. package/dist/components/FormTemplateEditor/FieldLibrary.js.map +1 -0
  97. package/dist/components/FormTemplateEditor/FieldLibrary.module.js +5 -0
  98. package/dist/components/FormTemplateEditor/FieldLibrary.module.js.map +1 -0
  99. package/dist/components/FormTemplateEditor/FieldLibrary.module.scss +12 -0
  100. package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts +19 -0
  101. package/dist/components/FormTemplateEditor/FieldLibraryRow.d.ts.map +1 -0
  102. package/dist/components/FormTemplateEditor/FieldLibraryRow.js +115 -0
  103. package/dist/components/FormTemplateEditor/FieldLibraryRow.js.map +1 -0
  104. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.css +1 -0
  105. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts +9 -0
  106. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.d.ts.map +1 -0
  107. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js +18 -0
  108. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.js.map +1 -0
  109. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js +5 -0
  110. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.js.map +1 -0
  111. package/dist/components/FormTemplateEditor/FieldValidationErrorAlert.module.scss +4 -0
  112. package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts +21 -0
  113. package/dist/components/FormTemplateEditor/FormStructurePanel.d.ts.map +1 -0
  114. package/dist/components/FormTemplateEditor/FormStructurePanel.js +108 -0
  115. package/dist/components/FormTemplateEditor/FormStructurePanel.js.map +1 -0
  116. package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts +10 -0
  117. package/dist/components/FormTemplateEditor/FormTemplateEditor.d.ts.map +1 -0
  118. package/dist/components/FormTemplateEditor/FormTemplateEditor.js +31 -0
  119. package/dist/components/FormTemplateEditor/FormTemplateEditor.js.map +1 -0
  120. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts +15 -0
  121. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.d.ts.map +1 -0
  122. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js +234 -0
  123. package/dist/components/FormTemplateEditor/FormTemplateEditorForm.js.map +1 -0
  124. package/dist/components/FormTemplateEditor/FormTemplatePreview.d.ts.map +1 -1
  125. package/dist/components/FormTemplateEditor/FormTemplatePreview.js +1 -12
  126. package/dist/components/FormTemplateEditor/FormTemplatePreview.js.map +1 -1
  127. package/dist/components/FormTemplateEditor/StepCard.d.ts +25 -0
  128. package/dist/components/FormTemplateEditor/StepCard.d.ts.map +1 -0
  129. package/dist/components/FormTemplateEditor/StepCard.js +203 -0
  130. package/dist/components/FormTemplateEditor/StepCard.js.map +1 -0
  131. package/dist/components/FormTemplateEditor/StepFieldRow.d.ts +34 -0
  132. package/dist/components/FormTemplateEditor/StepFieldRow.d.ts.map +1 -0
  133. package/dist/components/FormTemplateEditor/StepFieldRow.js +128 -0
  134. package/dist/components/FormTemplateEditor/StepFieldRow.js.map +1 -0
  135. package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts +19 -0
  136. package/dist/components/FormTemplateEditor/TemplateFileHandleField.d.ts.map +1 -0
  137. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js +78 -0
  138. package/dist/components/FormTemplateEditor/TemplateFileHandleField.js.map +1 -0
  139. package/dist/components/FormTemplateEditor/dragHandle.css +1 -0
  140. package/dist/components/FormTemplateEditor/dragHandle.module.js +8 -0
  141. package/dist/components/FormTemplateEditor/dragHandle.module.js.map +1 -0
  142. package/dist/components/FormTemplateEditor/dragHandle.module.scss +22 -0
  143. package/dist/components/FormTemplateEditor/dropTarget.css +1 -0
  144. package/dist/components/FormTemplateEditor/dropTarget.module.js +5 -0
  145. package/dist/components/FormTemplateEditor/dropTarget.module.js.map +1 -0
  146. package/dist/components/FormTemplateEditor/dropTarget.module.scss +14 -0
  147. package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts +48 -0
  148. package/dist/components/FormTemplateEditor/formTemplateDraftState.d.ts.map +1 -0
  149. package/dist/components/FormTemplateEditor/formTemplateDraftState.js +126 -0
  150. package/dist/components/FormTemplateEditor/formTemplateDraftState.js.map +1 -0
  151. package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts +35 -0
  152. package/dist/components/FormTemplateEditor/formTemplateSchema.d.ts.map +1 -0
  153. package/dist/components/FormTemplateEditor/formTemplateSchema.js +35 -0
  154. package/dist/components/FormTemplateEditor/formTemplateSchema.js.map +1 -0
  155. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts +3 -1
  156. package/dist/components/FormTemplateEditor/schemaFieldUtils.d.ts.map +1 -1
  157. package/dist/components/FormTemplateEditor/schemaFieldUtils.js +26 -8
  158. package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -1
  159. package/dist/components/FormTemplateEditor/sortableIds.d.ts +23 -0
  160. package/dist/components/FormTemplateEditor/sortableIds.d.ts.map +1 -0
  161. package/dist/components/FormTemplateEditor/sortableIds.js +24 -0
  162. package/dist/components/FormTemplateEditor/sortableIds.js.map +1 -0
  163. package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts +33 -0
  164. package/dist/components/FormTemplateEditor/useFormTemplateDraft.d.ts.map +1 -0
  165. package/dist/components/FormTemplateEditor/useFormTemplateDraft.js +59 -0
  166. package/dist/components/FormTemplateEditor/useFormTemplateDraft.js.map +1 -0
  167. package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts +9 -0
  168. package/dist/components/FormTemplateEditor/useFormTemplateDrag.d.ts.map +1 -0
  169. package/dist/components/FormTemplateEditor/useFormTemplateDrag.js +66 -0
  170. package/dist/components/FormTemplateEditor/useFormTemplateDrag.js.map +1 -0
  171. package/dist/components/FormTemplateEditor/useSaveFormTemplate.d.ts.map +1 -1
  172. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js +34 -19
  173. package/dist/components/FormTemplateEditor/useSaveFormTemplate.js.map +1 -1
  174. package/dist/components/FormTemplateEditor/utils.d.ts +2 -2
  175. package/dist/components/FormTemplateEditor/utils.d.ts.map +1 -1
  176. package/dist/components/FormTemplateEditor/utils.js +7 -10
  177. package/dist/components/FormTemplateEditor/utils.js.map +1 -1
  178. package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts +11 -0
  179. package/dist/components/JsonSchemaForm/widgets/SelectWidget.d.ts.map +1 -1
  180. package/dist/components/JsonSchemaForm/widgets/SelectWidget.js +28 -19
  181. package/dist/components/JsonSchemaForm/widgets/SelectWidget.js.map +1 -1
  182. package/dist/components/QueryBuilder/FilterConditionRow.d.ts +1 -0
  183. package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
  184. package/dist/components/QueryBuilder/FilterConditionRow.js +102 -105
  185. package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
  186. package/dist/components/QueryBuilder/FilterGroupNode.js +6 -6
  187. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
  188. package/dist/components/QueryBuilder/QueryBuilderControls.js +88 -81
  189. package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
  190. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +7 -0
  191. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -1
  192. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -1
  193. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts +2 -1
  194. package/dist/components/QueryBuilder/qbTreeToReadable.d.ts.map +1 -1
  195. package/dist/components/QueryBuilder/qbTreeToReadable.js +24 -20
  196. package/dist/components/QueryBuilder/qbTreeToReadable.js.map +1 -1
  197. package/dist/components/QueryBuilder/queryBuilderDrag.css +1 -1
  198. package/dist/components/QueryBuilder/queryBuilderDrag.module.js +2 -2
  199. package/dist/components/QueryBuilder/queryBuilderDrag.module.js.map +1 -1
  200. package/dist/components/QueryBuilder/queryBuilderDrag.module.scss +1 -1
  201. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +16 -0
  202. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -1
  203. package/dist/components/QueryBuilder/queryBuilderMetadata.js +13 -5
  204. package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -1
  205. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts +18 -0
  206. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts.map +1 -0
  207. package/dist/components/QueryBuilder/useQBValueDisplayName.js +64 -0
  208. package/dist/components/QueryBuilder/useQBValueDisplayName.js.map +1 -0
  209. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +6 -6
  210. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts +1 -0
  211. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.d.ts.map +1 -1
  212. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js +13 -11
  213. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js.map +1 -1
  214. package/dist/components/SynapseTable/SearchV2.js +4 -4
  215. package/dist/components/ToastMessage/ToastMessage.d.ts.map +1 -1
  216. package/dist/components/ToastMessage/ToastMessage.js +25 -22
  217. package/dist/components/ToastMessage/ToastMessage.js.map +1 -1
  218. package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts +7 -0
  219. package/dist/components/dataaccess/FormTemplateEditorRoute.d.ts.map +1 -0
  220. package/dist/components/dataaccess/FormTemplateEditorRoute.js +26 -0
  221. package/dist/components/dataaccess/FormTemplateEditorRoute.js.map +1 -0
  222. package/dist/components/dataaccess/FormTemplateTable.d.ts +10 -0
  223. package/dist/components/dataaccess/FormTemplateTable.d.ts.map +1 -0
  224. package/dist/components/dataaccess/FormTemplateTable.js +124 -0
  225. package/dist/components/dataaccess/FormTemplateTable.js.map +1 -0
  226. package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
  227. package/dist/components/dataaccess/ReviewerDashboard.js +80 -50
  228. package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
  229. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
  230. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +2 -0
  231. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
  232. package/dist/components/widgets/FileHandleLink.d.ts +12 -2
  233. package/dist/components/widgets/FileHandleLink.d.ts.map +1 -1
  234. package/dist/components/widgets/FileHandleLink.js +25 -29
  235. package/dist/components/widgets/FileHandleLink.js.map +1 -1
  236. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts +2 -0
  237. package/dist/mocks/accessRequirement/mockFormTemplates.d.ts.map +1 -1
  238. package/dist/mocks/accessRequirement/mockFormTemplates.js +8 -2
  239. package/dist/mocks/accessRequirement/mockFormTemplates.js.map +1 -1
  240. package/dist/mocks/accessRequirement/mockJsonSchemas.d.ts.map +1 -1
  241. package/dist/mocks/accessRequirement/mockJsonSchemas.js +17 -31
  242. package/dist/mocks/accessRequirement/mockJsonSchemas.js.map +1 -1
  243. package/dist/mocks/msw/handlers/authHandlers.d.ts +1 -0
  244. package/dist/mocks/msw/handlers/authHandlers.d.ts.map +1 -1
  245. package/dist/mocks/msw/handlers/authHandlers.js +6 -2
  246. package/dist/mocks/msw/handlers/authHandlers.js.map +1 -1
  247. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts +2 -0
  248. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
  249. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +52 -46
  250. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
  251. package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
  252. package/dist/mocks/msw/handlers/fileHandlers.js +25 -21
  253. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  254. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts +2 -1
  255. package/dist/mocks/msw/handlers/formTemplateHandlers.d.ts.map +1 -1
  256. package/dist/mocks/msw/handlers/formTemplateHandlers.js +18 -18
  257. package/dist/mocks/msw/handlers/formTemplateHandlers.js.map +1 -1
  258. package/dist/mocks/msw/handlers/schemaHandlers.d.ts +8 -0
  259. package/dist/mocks/msw/handlers/schemaHandlers.d.ts.map +1 -1
  260. package/dist/mocks/msw/handlers/schemaHandlers.js +20 -3
  261. package/dist/mocks/msw/handlers/schemaHandlers.js.map +1 -1
  262. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.d.ts +8 -0
  263. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.d.ts.map +1 -0
  264. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js +19 -0
  265. package/dist/mocks/msw/handlers/twoFactorEnrollmentHandlers.js.map +1 -0
  266. package/dist/style/abstracts/_cssVariables.scss +13 -0
  267. package/dist/style/components/_toasts.scss +10 -1
  268. package/dist/style/main.css +1 -1
  269. package/dist/synapse-queries/KeyFactory.d.ts +8 -1
  270. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  271. package/dist/synapse-queries/KeyFactory.js +17 -4
  272. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  273. package/dist/synapse-queries/auth/index.d.ts +1 -0
  274. package/dist/synapse-queries/auth/index.d.ts.map +1 -1
  275. package/dist/synapse-queries/auth/index.js +2 -1
  276. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts +11 -0
  277. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.d.ts.map +1 -0
  278. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js +19 -0
  279. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js.map +1 -0
  280. package/dist/synapse-queries/dataaccess/index.js +5 -5
  281. package/dist/synapse-queries/dataaccess/useEDuc.d.ts +18 -0
  282. package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
  283. package/dist/synapse-queries/dataaccess/useEDuc.js +33 -1
  284. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  285. package/dist/synapse-queries/file/useDirectUploadToS3.js +6 -6
  286. package/dist/synapse-queries/file/useFileHandle.d.ts +8 -0
  287. package/dist/synapse-queries/file/useFileHandle.d.ts.map +1 -1
  288. package/dist/synapse-queries/file/useFileHandle.js +15 -6
  289. package/dist/synapse-queries/file/useFileHandle.js.map +1 -1
  290. package/dist/synapse-queries/index.js +260 -253
  291. package/dist/synapse-queries/jsonschema/index.js +2 -2
  292. package/dist/synapse-queries/jsonschema/useSchema.d.ts +5 -0
  293. package/dist/synapse-queries/jsonschema/useSchema.d.ts.map +1 -1
  294. package/dist/synapse-queries/jsonschema/useSchema.js +9 -1
  295. package/dist/synapse-queries/jsonschema/useSchema.js.map +1 -1
  296. package/dist/tsconfig.build.tsbuildinfo +1 -1
  297. package/dist/utils/APIConstants.d.ts +1 -0
  298. package/dist/utils/APIConstants.d.ts.map +1 -1
  299. package/dist/utils/APIConstants.js +2 -2
  300. package/dist/utils/APIConstants.js.map +1 -1
  301. package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
  302. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
  303. package/dist/utils/featureflag/FeatureFlags.js +1 -1
  304. package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
  305. package/dist/utils/functions/toPascalCase.d.ts +6 -0
  306. package/dist/utils/functions/toPascalCase.d.ts.map +1 -0
  307. package/dist/utils/functions/toPascalCase.js +8 -0
  308. package/dist/utils/functions/toPascalCase.js.map +1 -0
  309. package/dist/utils/jsonschema/submissionContext.d.ts +5 -0
  310. package/dist/utils/jsonschema/submissionContext.d.ts.map +1 -1
  311. package/dist/utils/jsonschema/submissionContext.js +22 -30
  312. package/dist/utils/jsonschema/submissionContext.js.map +1 -1
  313. package/package.json +10 -9
@@ -1,6 +1,7 @@
1
- import { ManagedACTAccessRequirement, RestrictableObjectType } from '@sage-bionetworks/synapse-types';
1
+ import { RestrictableObjectType } from '@sage-bionetworks/synapse-types';
2
+ import { RequestFlowAccessRequirement } from '../requestFlowTypes';
2
3
  export type SignatureStatusStepProps = {
3
- managedACTAccessRequirement: ManagedACTAccessRequirement;
4
+ managedACTAccessRequirement: RequestFlowAccessRequirement;
4
5
  subjectId: string;
5
6
  subjectType: RestrictableObjectType;
6
7
  onHide: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureStatusStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.tsx"],"names":[],"mappings":"AA8BA,OAAO,EAEL,2BAA2B,EAC3B,sBAAsB,EACvB,MAAM,iCAAiC,CAAA;AAKxC,MAAM,MAAM,wBAAwB,GAAG;IACrC,2BAA2B,EAAE,2BAA2B,CAAA;IACxD,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,sBAAsB,CAAA;IACnC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAiP1E"}
1
+ {"version":3,"file":"SignatureStatusStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.tsx"],"names":[],"mappings":"AAoCA,OAAO,EAEL,sBAAsB,EACvB,MAAM,iCAAiC,CAAA;AAKxC,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAA;AAYlE,MAAM,MAAM,wBAAwB,GAAG;IACrC,2BAA2B,EAAE,4BAA4B,CAAA;IACzD,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,sBAAsB,CAAA;IACnC,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC7B,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAkQ1E"}
@@ -2,42 +2,53 @@ import { PRODUCTION_ENDPOINT_CONFIG as e } from "../../../../utils/functions/get
2
2
  import t from "../../../../synapse-client/index.js";
3
3
  import { useSubmitDataAccessRequest as n } from "../../../../synapse-queries/dataaccess/useDataAccessSubmission.js";
4
4
  import { useGetDataAccessRequestForUpdate as r, useUpdateDataAccessRequest as i } from "../../../../synapse-queries/dataaccess/useAccessRequirements.js";
5
- import { useGetDataAccessRequestPreview as a, useGetDataAccessRequestSignatureStatus as o, useGetDataAccessRequestSignedFileHandleId as s } from "../../../../synapse-queries/dataaccess/useEDuc.js";
5
+ import { useGetDataAccessRequestPreview as a, useGetDataAccessRequestSignatureStatus as ee, useGetDataAccessRequestSignatureUpdatable as te, useGetDataAccessRequestSignedFileHandleId as ne } from "../../../../synapse-queries/dataaccess/useEDuc.js";
6
6
  import "../../../../synapse-queries/index.js";
7
- import c from "../../../IconSvg/IconSvg.js";
8
- import { longFieldLabelSx as l } from "../styles.js";
9
- import { useState as u } from "react";
10
- import { Alert as d, Box as f, Button as p, DialogActions as m, DialogContent as ee, DialogTitle as te, IconButton as h, Link as g, Skeleton as _, Stack as v, Typography as y } from "@mui/material";
7
+ import o from "../../../IconSvg/IconSvg.js";
8
+ import { formatDate as s } from "../../../../utils/functions/DateFormatter.js";
9
+ import { longFieldLabelSx as c } from "../styles.js";
10
+ import { useState as l } from "react";
11
+ import { Alert as u, Box as d, Button as f, DialogActions as re, DialogContent as p, DialogTitle as m, IconButton as h, Link as g, Skeleton as _, Stack as v, Typography as y } from "@mui/material";
11
12
  import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
12
13
  import { FileHandleAssociateType as C } from "@sage-bionetworks/synapse-types";
13
- import { CheckCircleOutline as w, HourglassEmpty as T, OpenInNew as E, Refresh as D } from "@mui/icons-material";
14
+ import { EDucSignerStatusStatusEnum as w } from "@sage-bionetworks/synapse-client";
15
+ import { CheckCircleOutline as T, HourglassEmpty as ie, OpenInNew as E, Refresh as D } from "@mui/icons-material";
16
+ import O from "dayjs";
14
17
  //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.tsx
15
- function O(e) {
16
- let { managedACTAccessRequirement: O, subjectId: ne, subjectType: re, onHide: ie, onBackClicked: A, onSubmissionCreated: j, viewDucHrefOverride: M } = e, { data: N, isLoading: P } = r(String(O.id), {
18
+ var k = {
19
+ mx: 0,
20
+ my: .5,
21
+ pl: 1.5,
22
+ borderLeft: "3px solid",
23
+ borderColor: "grey.300",
24
+ color: "grey.700"
25
+ };
26
+ function A(e) {
27
+ let { managedACTAccessRequirement: s, subjectId: w, subjectType: O, onHide: k, onBackClicked: A, onSubmissionCreated: j, viewDucHrefOverride: M } = e, { data: N, isLoading: oe } = r(String(s.id), {
17
28
  staleTime: Infinity,
18
29
  throwOnError: !0
19
- }), F = N?.id ?? "", { data: I, isLoading: L, isRefetching: R, error: z, refetch: B } = o(F, { enabled: !!F }), V = I?.signerStatus ?? [], H = V.filter((e) => e.status === "done").length, U = V.length, W = U > 0 && H === U, G = V.filter((e) => e.status !== "done"), { data: K } = a(F, { enabled: !!F && !M }), q = M ?? (K?.fileHandleId && F ? t.getPortalFileHandleServletUrl(K.fileHandleId, F, C.DataAccessRequestAttachment) : void 0), { data: J } = s(F, { enabled: !!F && W }), [Y, X] = u(), [Z, Q] = u(), { mutateAsync: ae, isPending: oe } = i({ onError: (e) => X(e.reason) }), { mutate: se, isPending: $ } = n({
30
+ }), P = N?.id ?? "", { data: F, isLoading: I, isRefetching: L, error: R, refetch: z } = ee(P, { enabled: !!P }), B = F?.signerStatus ?? [], V = B.filter((e) => e.status === "done").length, H = B.length, U = H > 0 && V === H, W = B.filter((e) => e.status !== "done"), { data: G } = te(P, { enabled: !!P && !U }), { data: K } = a(P, { enabled: !!P && !M }), q = M ?? (K?.fileHandleId && P ? t.getPortalFileHandleServletUrl(K.fileHandleId, P, C.DataAccessRequestAttachment) : void 0), { data: J } = ne(P, { enabled: !!P && U }), [Y, X] = l(), [Z, Q] = l(), { mutateAsync: se, isPending: ce } = i({ onError: (e) => X(e.reason) }), { mutate: le, isPending: $ } = n({
20
31
  onSuccess: (e) => j(e.submissionId),
21
32
  onError: (e) => Q(e.reason)
22
- }), ce = P || L || R || !N || !W || !J?.fileHandleId || oe || $, le = async () => {
33
+ }), ue = oe || I || L || !N || !U || !J?.fileHandleId || ce || $, de = async () => {
23
34
  if (!N || !J?.fileHandleId) return;
24
35
  X(void 0), Q(void 0);
25
- let e = await ae({
36
+ let e = await se({
26
37
  ...N,
27
38
  ducFileHandleId: J.fileHandleId
28
39
  }).catch(() => null);
29
- e && se({
40
+ e && le({
30
41
  request: {
31
42
  requestId: e.id,
32
43
  requestEtag: e.etag,
33
- subjectId: ne,
34
- subjectType: re
44
+ subjectId: w,
45
+ subjectType: O
35
46
  },
36
- accessRequirementId: String(O.id)
47
+ accessRequirementId: String(s.id)
37
48
  });
38
49
  };
39
50
  return /* @__PURE__ */ S(b, { children: [
40
- /* @__PURE__ */ x(te, { children: /* @__PURE__ */ S(v, {
51
+ /* @__PURE__ */ x(m, { children: /* @__PURE__ */ S(v, {
41
52
  direction: "row",
42
53
  sx: {
43
54
  alignItems: "center",
@@ -45,11 +56,11 @@ function O(e) {
45
56
  },
46
57
  children: [
47
58
  "Request Access",
48
- /* @__PURE__ */ x(f, { sx: { flexGrow: 1 } }),
59
+ /* @__PURE__ */ x(d, { sx: { flexGrow: 1 } }),
49
60
  /* @__PURE__ */ x(h, {
50
61
  "aria-label": "Close",
51
- onClick: ie,
52
- children: /* @__PURE__ */ x(c, {
62
+ onClick: k,
63
+ children: /* @__PURE__ */ x(o, {
53
64
  icon: "close",
54
65
  wrap: !1,
55
66
  sx: { color: "grey.700" }
@@ -57,7 +68,7 @@ function O(e) {
57
68
  })
58
69
  ]
59
70
  }) }),
60
- /* @__PURE__ */ S(ee, { children: [
71
+ /* @__PURE__ */ S(p, { children: [
61
72
  /* @__PURE__ */ x(y, {
62
73
  variant: "headline3",
63
74
  sx: { mb: 2 },
@@ -66,26 +77,39 @@ function O(e) {
66
77
  /* @__PURE__ */ x(y, {
67
78
  variant: "body1",
68
79
  sx: {
69
- ...l,
80
+ ...c,
70
81
  mb: 2
71
82
  },
72
83
  children: "Your DUC has been emailed to your Collaborators. Once all signatures (including the Signing Official) have been collected, you can submit the Data Access Request."
73
84
  }),
74
- L && /* @__PURE__ */ x(_, {
85
+ A && F && !U && G && /* @__PURE__ */ S(y, {
86
+ variant: "body1",
87
+ sx: {
88
+ ...c,
89
+ mb: 3
90
+ },
91
+ children: [
92
+ "You can update the list of Collaborators by pressing",
93
+ " ",
94
+ /* @__PURE__ */ x("strong", { children: "Back" }),
95
+ ". Your changes will be applied to this signature request, so anyone who has already signed will not need to sign again."
96
+ ]
97
+ }),
98
+ I && /* @__PURE__ */ x(_, {
75
99
  variant: "rectangular",
76
100
  width: "100%",
77
101
  height: 120,
78
102
  "data-testid": "SignatureStatusStep-loading"
79
103
  }),
80
- z && /* @__PURE__ */ S(d, {
104
+ R && /* @__PURE__ */ S(u, {
81
105
  severity: "error",
82
106
  children: [
83
107
  /* @__PURE__ */ x("strong", { children: "Sorry, we couldn't load the current signature status." }),
84
108
  /* @__PURE__ */ x("br", {}),
85
- z.reason
109
+ R.reason
86
110
  ]
87
111
  }),
88
- !L && !z && I && /* @__PURE__ */ S(b, { children: [
112
+ !I && !R && F && /* @__PURE__ */ S(b, { children: [
89
113
  /* @__PURE__ */ S(v, {
90
114
  direction: "row",
91
115
  sx: {
@@ -94,13 +118,13 @@ function O(e) {
94
118
  mb: 1
95
119
  },
96
120
  children: [
97
- W ? /* @__PURE__ */ x(w, { color: "success" }) : /* @__PURE__ */ x(T, { sx: { color: "grey.700" } }),
121
+ U ? /* @__PURE__ */ x(T, { color: "success" }) : /* @__PURE__ */ x(ie, { sx: { color: "grey.700" } }),
98
122
  /* @__PURE__ */ x(y, {
99
123
  variant: "body1",
100
124
  sx: { fontWeight: 700 },
101
- children: W ? "All signatures collected." : `${H} out of ${U} signatures collected.`
125
+ children: U ? "All signatures collected." : `${V} out of ${H} signatures collected.`
102
126
  }),
103
- /* @__PURE__ */ x(f, { sx: { flexGrow: 1 } }),
127
+ /* @__PURE__ */ x(d, { sx: { flexGrow: 1 } }),
104
128
  q && /* @__PURE__ */ S(g, {
105
129
  href: q,
106
130
  target: "_blank",
@@ -114,30 +138,30 @@ function O(e) {
114
138
  })
115
139
  ]
116
140
  }),
117
- G.length > 0 && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(y, {
141
+ W.length > 0 && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ x(y, {
118
142
  variant: "body1",
119
143
  sx: { mb: 1 },
120
144
  children: "You're still waiting for signatures from"
121
- }), /* @__PURE__ */ x(f, {
145
+ }), /* @__PURE__ */ x(d, {
122
146
  component: "ul",
123
147
  sx: {
124
148
  mt: 0,
125
149
  mb: 2,
126
150
  pl: 3
127
151
  },
128
- children: G.map((e, t) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ x(k, { signer: e }) }, e.userId ?? `${e.name}-${t}`))
152
+ children: W.map((e, t) => /* @__PURE__ */ x("li", { children: /* @__PURE__ */ x(ae, { signer: e }) }, e.userId ?? `${e.name}-${t}`))
129
153
  })] }),
130
- /* @__PURE__ */ x(p, {
154
+ /* @__PURE__ */ x(f, {
131
155
  variant: "outlined",
132
156
  startIcon: /* @__PURE__ */ x(D, {}),
133
- loading: R,
157
+ loading: L,
134
158
  onClick: () => {
135
- B();
159
+ z();
136
160
  },
137
161
  children: "Refresh"
138
162
  })
139
163
  ] }),
140
- Y && /* @__PURE__ */ S(d, {
164
+ Y && /* @__PURE__ */ S(u, {
141
165
  severity: "error",
142
166
  sx: { mt: 2 },
143
167
  children: [
@@ -146,7 +170,7 @@ function O(e) {
146
170
  Y
147
171
  ]
148
172
  }),
149
- Z && /* @__PURE__ */ S(d, {
173
+ Z && /* @__PURE__ */ S(u, {
150
174
  severity: "error",
151
175
  sx: { mt: 2 },
152
176
  children: [
@@ -156,28 +180,31 @@ function O(e) {
156
180
  ]
157
181
  })
158
182
  ] }),
159
- /* @__PURE__ */ S(m, { children: [
160
- A && /* @__PURE__ */ x(p, {
183
+ /* @__PURE__ */ S(re, { children: [
184
+ A && /* @__PURE__ */ x(f, {
161
185
  variant: "outlined",
162
186
  onClick: A,
163
187
  children: "Back"
164
188
  }),
165
- /* @__PURE__ */ x(f, { sx: { flexGrow: 1 } }),
166
- /* @__PURE__ */ x(p, {
189
+ /* @__PURE__ */ x(d, { sx: { flexGrow: 1 } }),
190
+ /* @__PURE__ */ x(f, {
167
191
  variant: "contained",
168
- disabled: ce,
192
+ disabled: ue,
169
193
  loading: $,
170
194
  onClick: () => {
171
- le();
195
+ de();
172
196
  },
173
197
  children: "Submit"
174
198
  })
175
199
  ] })
176
200
  ] });
177
201
  }
178
- function k(t) {
202
+ function j(e) {
203
+ return !e.status || e.status === w.pending || e.status === w.done ? "" : e.status === w.declined && e.declinedOn ? ` (declined ${s(O(e.declinedOn))})` : ` (${e.status})`;
204
+ }
205
+ function ae(t) {
179
206
  let { signer: n } = t, r = n.name ?? "Unnamed signer";
180
- return /* @__PURE__ */ S(y, {
207
+ return /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S(y, {
181
208
  variant: "body1",
182
209
  component: "span",
183
210
  children: [n.userId ? /* @__PURE__ */ x(g, {
@@ -185,10 +212,15 @@ function k(t) {
185
212
  target: "_blank",
186
213
  rel: "noopener",
187
214
  children: r
188
- }) : /* @__PURE__ */ x(b, { children: r }), n.status && n.status !== "pending" && n.status !== "done" ? ` (${n.status})` : ""]
189
- });
215
+ }) : /* @__PURE__ */ x(b, { children: r }), j(n)]
216
+ }), n.declinedReason && /* @__PURE__ */ x(y, {
217
+ variant: "body1",
218
+ component: "blockquote",
219
+ sx: k,
220
+ children: n.declinedReason
221
+ })] });
190
222
  }
191
223
  //#endregion
192
- export { O as default };
224
+ export { A as default };
193
225
 
194
226
  //# sourceMappingURL=SignatureStatusStep.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureStatusStep.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.tsx"],"sourcesContent":["import {\n useGetDataAccessRequestForUpdate,\n useGetDataAccessRequestPreview,\n useGetDataAccessRequestSignatureStatus,\n useGetDataAccessRequestSignedFileHandleId,\n useSubmitDataAccessRequest,\n useUpdateDataAccessRequest,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport {\n CheckCircleOutline,\n HourglassEmpty,\n OpenInNew,\n Refresh,\n} from '@mui/icons-material'\nimport {\n Alert,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Link,\n Skeleton,\n Stack,\n Typography,\n} from '@mui/material'\nimport { EDucSignerStatus } from '@sage-bionetworks/synapse-client'\nimport {\n FileHandleAssociateType,\n ManagedACTAccessRequirement,\n RestrictableObjectType,\n} from '@sage-bionetworks/synapse-types'\nimport { useState } from 'react'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport { longFieldLabelSx } from '../styles'\n\nexport type SignatureStatusStepProps = {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n subjectId: string\n subjectType: RestrictableObjectType\n onHide: () => void\n /**\n * Called when the user clicks the Back button. When omitted, the Back button is hidden —\n * used when the step is reached via direct entry (e.g. a deep-link route) rather than\n * through the wizard flow, so there is no meaningful previous step to return to.\n */\n onBackClicked?: () => void\n onSubmissionCreated: (submissionId: string) => void\n /**\n * Optional href override for the \"View DUC\" link. When set, the preview file handle fetch\n * is skipped and this URL is used directly. Used by stories and tests where the portal\n * servlet is not available.\n */\n viewDucHrefOverride?: string\n}\n\n/**\n * Wizard step shown after the user has routed the eDUC for electronic signature\n * (PORTALS-4380). Polls the DocuSign envelope status, lists the pending signers,\n * and enables submission once every signer has signed.\n */\nexport default function SignatureStatusStep(props: SignatureStatusStepProps) {\n const {\n managedACTAccessRequirement,\n subjectId,\n subjectType,\n onHide,\n onBackClicked,\n onSubmissionCreated,\n viewDucHrefOverride,\n } = props\n\n const { data: dataAccessRequest, isLoading: isLoadingDar } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n staleTime: Infinity,\n throwOnError: true,\n })\n\n const requestId = dataAccessRequest?.id ?? ''\n\n const {\n data: signatureStatus,\n isLoading: isLoadingStatus,\n isRefetching: isRefetchingStatus,\n error: statusError,\n refetch: refetchStatus,\n } = useGetDataAccessRequestSignatureStatus(requestId, {\n enabled: Boolean(requestId),\n })\n\n const signers: EDucSignerStatus[] = signatureStatus?.signerStatus ?? []\n const collectedCount = signers.filter(s => s.status === 'done').length\n const totalCount = signers.length\n const allCollected = totalCount > 0 && collectedCount === totalCount\n const outstandingSigners = signers.filter(s => s.status !== 'done')\n\n const { data: previewFileHandle } = useGetDataAccessRequestPreview(\n requestId,\n { enabled: Boolean(requestId) && !viewDucHrefOverride },\n )\n const viewDucHref =\n viewDucHrefOverride ??\n (previewFileHandle?.fileHandleId && requestId\n ? SynapseClient.getPortalFileHandleServletUrl(\n previewFileHandle.fileHandleId,\n requestId,\n FileHandleAssociateType.DataAccessRequestAttachment,\n )\n : undefined)\n\n const { data: signedFileHandle } = useGetDataAccessRequestSignedFileHandleId(\n requestId,\n { enabled: Boolean(requestId) && allCollected },\n )\n\n const [updateDarError, setUpdateDarError] = useState<string | undefined>()\n const [submitDarError, setSubmitDarError] = useState<string | undefined>()\n\n const { mutateAsync: updateDarAsync, isPending: isUpdating } =\n useUpdateDataAccessRequest({\n onError: e => setUpdateDarError(e.reason),\n })\n\n const { mutate: submit, isPending: isSubmitting } =\n useSubmitDataAccessRequest({\n onSuccess: submission => onSubmissionCreated(submission.submissionId),\n onError: e => setSubmitDarError(e.reason),\n })\n\n const isSubmitDisabled =\n isLoadingDar ||\n isLoadingStatus ||\n isRefetchingStatus ||\n !dataAccessRequest ||\n !allCollected ||\n !signedFileHandle?.fileHandleId ||\n isUpdating ||\n isSubmitting\n\n const handleSubmit = async () => {\n if (!dataAccessRequest || !signedFileHandle?.fileHandleId) return\n setUpdateDarError(undefined)\n setSubmitDarError(undefined)\n const updated = await updateDarAsync({\n ...dataAccessRequest,\n ducFileHandleId: signedFileHandle.fileHandleId,\n }).catch(() => null)\n if (!updated) return\n submit({\n request: {\n requestId: updated.id,\n requestEtag: updated.etag,\n subjectId,\n subjectType,\n },\n accessRequirementId: String(managedACTAccessRequirement.id),\n })\n }\n\n return (\n <>\n <DialogTitle>\n <Stack direction=\"row\" sx={{ alignItems: 'center', gap: '5px' }}>\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton aria-label={'Close'} onClick={onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <Typography variant={'headline3'} sx={{ mb: 2 }}>\n Sign a Data Use Certificate (DUC)\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n Your DUC has been emailed to your Collaborators. Once all signatures\n (including the Signing Official) have been collected, you can submit\n the Data Access Request.\n </Typography>\n {/* TODO: restore once the backend precheck allows editing collaborators mid-signature (PORTALS-4380 notes).\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 3 }}>\n You can update the list of Collaborators by pressing{' '}\n <strong>Back</strong>.\n </Typography>\n */}\n\n {isLoadingStatus && (\n <Skeleton\n variant={'rectangular'}\n width={'100%'}\n height={120}\n data-testid={'SignatureStatusStep-loading'}\n />\n )}\n\n {statusError && (\n <Alert severity={'error'}>\n <strong>\n Sorry, we couldn&apos;t load the current signature status.\n </strong>\n <br />\n {statusError.reason}\n </Alert>\n )}\n\n {!isLoadingStatus && !statusError && signatureStatus && (\n <>\n <Stack\n direction={'row'}\n sx={{ alignItems: 'center', gap: 1, mb: 1 }}\n >\n {allCollected ? (\n <CheckCircleOutline color={'success'} />\n ) : (\n <HourglassEmpty sx={{ color: 'grey.700' }} />\n )}\n <Typography variant={'body1'} sx={{ fontWeight: 700 }}>\n {allCollected\n ? 'All signatures collected.'\n : `${collectedCount} out of ${totalCount} signatures collected.`}\n </Typography>\n <Box sx={{ flexGrow: 1 }} />\n {viewDucHref && (\n <Link\n href={viewDucHref}\n target={'_blank'}\n rel={'noopener'}\n sx={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: 0.5,\n }}\n >\n View DUC\n <OpenInNew fontSize={'small'} />\n </Link>\n )}\n </Stack>\n\n {outstandingSigners.length > 0 && (\n <>\n <Typography variant={'body1'} sx={{ mb: 1 }}>\n You&apos;re still waiting for signatures from\n </Typography>\n <Box component={'ul'} sx={{ mt: 0, mb: 2, pl: 3 }}>\n {outstandingSigners.map((signer, index) => (\n <li key={signer.userId ?? `${signer.name}-${index}`}>\n <SignerLine signer={signer} />\n </li>\n ))}\n </Box>\n </>\n )}\n\n <Button\n variant={'outlined'}\n startIcon={<Refresh />}\n loading={isRefetchingStatus}\n onClick={() => {\n refetchStatus()\n }}\n >\n Refresh\n </Button>\n </>\n )}\n\n {updateDarError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>Sorry, we couldn&apos;t save your change.</strong>\n <br />\n {updateDarError}\n </Alert>\n )}\n {submitDarError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>Sorry, we couldn&apos;t submit your request.</strong>\n <br />\n {submitDarError}\n </Alert>\n )}\n </DialogContent>\n <DialogActions>\n {onBackClicked && (\n <Button variant={'outlined'} onClick={onBackClicked}>\n Back\n </Button>\n )}\n <Box sx={{ flexGrow: 1 }} />\n <Button\n variant={'contained'}\n disabled={isSubmitDisabled}\n loading={isSubmitting}\n onClick={() => {\n handleSubmit()\n }}\n >\n Submit\n </Button>\n </DialogActions>\n </>\n )\n}\n\nfunction SignerLine(props: { signer: EDucSignerStatus }) {\n const { signer } = props\n const displayName = signer.name ?? 'Unnamed signer'\n const nameNode = signer.userId ? (\n <Link\n href={`${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Profile:${signer.userId}`}\n target={'_blank'}\n rel={'noopener'}\n >\n {displayName}\n </Link>\n ) : (\n <>{displayName}</>\n )\n // Only surface non-pending problem states inline; pending is implied by the section header.\n const statusLabel =\n signer.status && signer.status !== 'pending' && signer.status !== 'done'\n ? ` (${signer.status})`\n : ''\n return (\n <Typography variant={'body1'} component={'span'}>\n {nameNode}\n {statusLabel}\n </Typography>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAgEA,SAAwB,EAAoB,GAAiC;CAC3E,IAAM,EACJ,gCACA,eACA,iBACA,YACA,kBACA,wBACA,2BACE,GAEE,EAAE,MAAM,GAAmB,WAAW,MAC1C,EAAiC,OAAO,EAA4B,EAAE,GAAG;EACvE,WAAW;EACX,cAAc;CAChB,CAAC,GAEG,IAAY,GAAmB,MAAM,IAErC,EACJ,MAAM,GACN,WAAW,GACX,cAAc,GACd,OAAO,GACP,SAAS,MACP,EAAuC,GAAW,EACpD,SAAS,EAAQ,EACnB,CAAC,GAEK,IAA8B,GAAiB,gBAAgB,CAAC,GAChE,IAAiB,EAAQ,QAAO,MAAK,EAAE,WAAW,MAAM,EAAE,QAC1D,IAAa,EAAQ,QACrB,IAAe,IAAa,KAAK,MAAmB,GACpD,IAAqB,EAAQ,QAAO,MAAK,EAAE,WAAW,MAAM,GAE5D,EAAE,MAAM,MAAsB,EAClC,GACA,EAAE,SAAS,EA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AO;GAC5D,QAAQ;GACR,KAAK;aAEJ;EACG,CAAA,IAEN,kBAAA,GAAA,EAAA,UAAG,EAAc,CAAA,GAIjB,EAAO,UAAU,EAAO,WAAW,aAAa,EAAO,WAAW,SAC9D,KAAK,EAAO,OAAO,KACnB,EAKQ;;AAEhB"}
1
+ {"version":3,"file":"SignatureStatusStep.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.tsx"],"sourcesContent":["import {\n useGetDataAccessRequestForUpdate,\n useGetDataAccessRequestPreview,\n useGetDataAccessRequestSignatureStatus,\n useGetDataAccessRequestSignatureUpdatable,\n useGetDataAccessRequestSignedFileHandleId,\n useSubmitDataAccessRequest,\n useUpdateDataAccessRequest,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport { formatDate } from '@/utils/functions/DateFormatter'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport {\n CheckCircleOutline,\n HourglassEmpty,\n OpenInNew,\n Refresh,\n} from '@mui/icons-material'\nimport {\n Alert,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n IconButton,\n Link,\n Skeleton,\n Stack,\n SxProps,\n Typography,\n} from '@mui/material'\nimport {\n EDucSignerStatus,\n EDucSignerStatusStatusEnum,\n} from '@sage-bionetworks/synapse-client'\nimport {\n FileHandleAssociateType,\n RestrictableObjectType,\n} from '@sage-bionetworks/synapse-types'\nimport dayjs from 'dayjs'\nimport { useState } from 'react'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport { longFieldLabelSx } from '../styles'\nimport { RequestFlowAccessRequirement } from '../requestFlowTypes'\n\n/** Browser defaults indent a blockquote far too much for a nested list item. */\nconst declinedReasonSx: SxProps = {\n mx: 0,\n my: 0.5,\n pl: 1.5,\n borderLeft: '3px solid',\n borderColor: 'grey.300',\n color: 'grey.700',\n}\n\nexport type SignatureStatusStepProps = {\n managedACTAccessRequirement: RequestFlowAccessRequirement\n subjectId: string\n subjectType: RestrictableObjectType\n onHide: () => void\n /**\n * Called when the user clicks the Back button. When omitted, the Back button is hidden —\n * used when the step is reached via direct entry (e.g. a deep-link route) rather than\n * through the wizard flow, so there is no meaningful previous step to return to.\n */\n onBackClicked?: () => void\n onSubmissionCreated: (submissionId: string) => void\n /**\n * Optional href override for the \"View DUC\" link. When set, the preview file handle fetch\n * is skipped and this URL is used directly. Used by stories and tests where the portal\n * servlet is not available.\n */\n viewDucHrefOverride?: string\n}\n\n/**\n * Wizard step shown after the user has routed the eDUC for electronic signature\n * (PORTALS-4380). Polls the DocuSign envelope status, lists the pending signers,\n * and enables submission once every signer has signed.\n */\nexport default function SignatureStatusStep(props: SignatureStatusStepProps) {\n const {\n managedACTAccessRequirement,\n subjectId,\n subjectType,\n onHide,\n onBackClicked,\n onSubmissionCreated,\n viewDucHrefOverride,\n } = props\n\n const { data: dataAccessRequest, isLoading: isLoadingDar } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n staleTime: Infinity,\n throwOnError: true,\n })\n\n const requestId = dataAccessRequest?.id ?? ''\n\n const {\n data: signatureStatus,\n isLoading: isLoadingStatus,\n isRefetching: isRefetchingStatus,\n error: statusError,\n refetch: refetchStatus,\n } = useGetDataAccessRequestSignatureStatus(requestId, {\n enabled: Boolean(requestId),\n })\n\n const signers: EDucSignerStatus[] = signatureStatus?.signerStatus ?? []\n const collectedCount = signers.filter(s => s.status === 'done').length\n const totalCount = signers.length\n const allCollected = totalCount > 0 && collectedCount === totalCount\n const outstandingSigners = signers.filter(s => s.status !== 'done')\n\n // Whether going Back could still deliver edits to this envelope is the server's call -- it knows\n // every state DocuSign will refuse to correct. Only the copy below depends on it, so a stale or\n // failed answer simply withholds the guidance rather than blocking the step.\n const { data: isEnvelopeUpdatable } =\n useGetDataAccessRequestSignatureUpdatable(requestId, {\n enabled: Boolean(requestId) && !allCollected,\n })\n\n const { data: previewFileHandle } = useGetDataAccessRequestPreview(\n requestId,\n { enabled: Boolean(requestId) && !viewDucHrefOverride },\n )\n const viewDucHref =\n viewDucHrefOverride ??\n (previewFileHandle?.fileHandleId && requestId\n ? SynapseClient.getPortalFileHandleServletUrl(\n previewFileHandle.fileHandleId,\n requestId,\n FileHandleAssociateType.DataAccessRequestAttachment,\n )\n : undefined)\n\n const { data: signedFileHandle } = useGetDataAccessRequestSignedFileHandleId(\n requestId,\n { enabled: Boolean(requestId) && allCollected },\n )\n\n const [updateDarError, setUpdateDarError] = useState<string | undefined>()\n const [submitDarError, setSubmitDarError] = useState<string | undefined>()\n\n const { mutateAsync: updateDarAsync, isPending: isUpdating } =\n useUpdateDataAccessRequest({\n onError: e => setUpdateDarError(e.reason),\n })\n\n const { mutate: submit, isPending: isSubmitting } =\n useSubmitDataAccessRequest({\n onSuccess: submission => onSubmissionCreated(submission.submissionId),\n onError: e => setSubmitDarError(e.reason),\n })\n\n const isSubmitDisabled =\n isLoadingDar ||\n isLoadingStatus ||\n isRefetchingStatus ||\n !dataAccessRequest ||\n !allCollected ||\n !signedFileHandle?.fileHandleId ||\n isUpdating ||\n isSubmitting\n\n const handleSubmit = async () => {\n if (!dataAccessRequest || !signedFileHandle?.fileHandleId) return\n setUpdateDarError(undefined)\n setSubmitDarError(undefined)\n const updated = await updateDarAsync({\n ...dataAccessRequest,\n ducFileHandleId: signedFileHandle.fileHandleId,\n }).catch(() => null)\n if (!updated) return\n submit({\n request: {\n requestId: updated.id,\n requestEtag: updated.etag,\n subjectId,\n subjectType,\n },\n accessRequirementId: String(managedACTAccessRequirement.id),\n })\n }\n\n return (\n <>\n <DialogTitle>\n <Stack direction=\"row\" sx={{ alignItems: 'center', gap: '5px' }}>\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton aria-label={'Close'} onClick={onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <Typography variant={'headline3'} sx={{ mb: 2 }}>\n Sign a Data Use Certificate (DUC)\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n Your DUC has been emailed to your Collaborators. Once all signatures\n (including the Signing Official) have been collected, you can submit\n the Data Access Request.\n </Typography>\n {/* Editing is only worth offering while signatures are still outstanding -- once every\n signer is done the user should simply submit. Withheld until both the status and the\n precheck resolve, so the copy neither appears and then vanishes nor promises that\n existing signatures carry over when the server has already ruled that out. */}\n {onBackClicked &&\n signatureStatus &&\n !allCollected &&\n isEnvelopeUpdatable && (\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 3 }}>\n You can update the list of Collaborators by pressing{' '}\n <strong>Back</strong>. Your changes will be applied to this\n signature request, so anyone who has already signed will not need\n to sign again.\n </Typography>\n )}\n\n {isLoadingStatus && (\n <Skeleton\n variant={'rectangular'}\n width={'100%'}\n height={120}\n data-testid={'SignatureStatusStep-loading'}\n />\n )}\n\n {statusError && (\n <Alert severity={'error'}>\n <strong>\n Sorry, we couldn&apos;t load the current signature status.\n </strong>\n <br />\n {statusError.reason}\n </Alert>\n )}\n\n {!isLoadingStatus && !statusError && signatureStatus && (\n <>\n <Stack\n direction={'row'}\n sx={{ alignItems: 'center', gap: 1, mb: 1 }}\n >\n {allCollected ? (\n <CheckCircleOutline color={'success'} />\n ) : (\n <HourglassEmpty sx={{ color: 'grey.700' }} />\n )}\n <Typography variant={'body1'} sx={{ fontWeight: 700 }}>\n {allCollected\n ? 'All signatures collected.'\n : `${collectedCount} out of ${totalCount} signatures collected.`}\n </Typography>\n <Box sx={{ flexGrow: 1 }} />\n {viewDucHref && (\n <Link\n href={viewDucHref}\n target={'_blank'}\n rel={'noopener'}\n sx={{\n display: 'inline-flex',\n alignItems: 'center',\n gap: 0.5,\n }}\n >\n View DUC\n <OpenInNew fontSize={'small'} />\n </Link>\n )}\n </Stack>\n\n {outstandingSigners.length > 0 && (\n <>\n <Typography variant={'body1'} sx={{ mb: 1 }}>\n You&apos;re still waiting for signatures from\n </Typography>\n <Box component={'ul'} sx={{ mt: 0, mb: 2, pl: 3 }}>\n {outstandingSigners.map((signer, index) => (\n <li key={signer.userId ?? `${signer.name}-${index}`}>\n <SignerLine signer={signer} />\n </li>\n ))}\n </Box>\n </>\n )}\n\n <Button\n variant={'outlined'}\n startIcon={<Refresh />}\n loading={isRefetchingStatus}\n onClick={() => {\n refetchStatus()\n }}\n >\n Refresh\n </Button>\n </>\n )}\n\n {updateDarError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>Sorry, we couldn&apos;t save your change.</strong>\n <br />\n {updateDarError}\n </Alert>\n )}\n {submitDarError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>Sorry, we couldn&apos;t submit your request.</strong>\n <br />\n {submitDarError}\n </Alert>\n )}\n </DialogContent>\n <DialogActions>\n {onBackClicked && (\n <Button variant={'outlined'} onClick={onBackClicked}>\n Back\n </Button>\n )}\n <Box sx={{ flexGrow: 1 }} />\n <Button\n variant={'contained'}\n disabled={isSubmitDisabled}\n loading={isSubmitting}\n onClick={() => {\n handleSubmit()\n }}\n >\n Submit\n </Button>\n </DialogActions>\n </>\n )\n}\n\n/**\n * Only surface non-pending problem states inline; pending is implied by the section header. A\n * decline carries a timestamp, which folds into the label so the row doesn't read \"(declined)\"\n * and then repeat itself underneath.\n */\nfunction getSignerStatusLabel(signer: EDucSignerStatus): string {\n if (\n !signer.status ||\n signer.status === EDucSignerStatusStatusEnum.pending ||\n signer.status === EDucSignerStatusStatusEnum.done\n ) {\n return ''\n }\n if (\n signer.status === EDucSignerStatusStatusEnum.declined &&\n signer.declinedOn\n ) {\n return ` (declined ${formatDate(dayjs(signer.declinedOn))})`\n }\n return ` (${signer.status})`\n}\n\nfunction SignerLine(props: { signer: EDucSignerStatus }) {\n const { signer } = props\n const displayName = signer.name ?? 'Unnamed signer'\n const nameNode = signer.userId ? (\n <Link\n href={`${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Profile:${signer.userId}`}\n target={'_blank'}\n rel={'noopener'}\n >\n {displayName}\n </Link>\n ) : (\n <>{displayName}</>\n )\n return (\n <>\n <Typography variant={'body1'} component={'span'}>\n {nameNode}\n {getSignerStatusLabel(signer)}\n </Typography>\n {/* The reason is the signer's own words, so it is quoted rather than restated as UI copy. */}\n {signer.declinedReason && (\n <Typography\n variant={'body1'}\n component={'blockquote'}\n sx={declinedReasonSx}\n >\n {signer.declinedReason}\n </Typography>\n )}\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+CA,IAAM,IAA4B;CAChC,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,YAAY;CACZ,aAAa;CACb,OAAO;AACT;AA2BA,SAAwB,EAAoB,GAAiC;CAC3E,IAAM,EACJ,gCACA,cACA,gBACA,WACA,kBACA,wBACA,2BACE,GAEE,EAAE,MAAM,GAAmB,WAAW,OAC1C,EAAiC,OAAO,EAA4B,EAAE,GAAG;EACvE,WAAW;EACX,cAAc;CAChB,CAAC,GAEG,IAAY,GAAmB,MAAM,IAErC,EACJ,MAAM,GACN,WAAW,GACX,cAAc,GACd,OAAO,GACP,SAAS,MACP,GAAuC,GAAW,EACpD,SAAS,EAAQ,EACnB,CAAC,GAEK,IAA8B,GAAiB,gBAAgB,CAAC,GAChE,IAAiB,EAAQ,QAAO,MAAK,EAAE,WAAW,MAAM,EAAE,QAC1D,IAAa,EAAQ,QACrB,IAAe,IAAa,KAAK,MAAmB,GACpD,IAAqB,EAAQ,QAAO,MAAK,EAAE,WAAW,MAAM,GAK5D,EAAE,MAAM,MACZ,GAA0C,GAAW,EACnD,SAAS,EAAQ,KAAc,CAAC,EAClC,CAAC,GAEG,EAAE,MAAM,MAAsB,EAClC,GACA,EAAE,SAAS,EAAQ,KAAc,CAAC,EAAoB,CACxD,GACM,IACJ,MACC,GAAmB,gBAAgB,IAChC,EAAc,8BACZ,EAAkB,cAClB,GACA,EAAwB,2BAC1B,IACA,KAAA,IAEA,EAAE,MAAM,MAAqB,GACjC,G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,CAAC,EAAE,KAErD,KAAK,EAAO,OAAO;AAC5B;AAEA,SAAS,GAAW,GAAqC;CACvD,IAAM,EAAE,cAAW,GACb,IAAc,EAAO,QAAQ;CAYnC,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EAAY,SAAS;EAAS,WAAW;YAAzC,CAba,EAAO,SACtB,kBAAC,GAAD;GACE,MAAM,GAAG,EAA2B,OAAO,UAAU,EAAO;GAC5D,QAAQ;GACR,KAAK;aAEJ;EACG,CAAA,IAEN,kBAAA,GAAA,EAAA,UAAG,EAAc,CAAA,GAMZ,EAAqB,CAAM,CAClB;KAEX,EAAO,kBACN,kBAAC,GAAD;EACE,SAAS;EACT,WAAW;EACX,IAAI;YAEH,EAAO;CACE,CAAA,CAEd,EAAA,CAAA;AAEN"}
@@ -0,0 +1,12 @@
1
+ export type SigningOfficialFieldsProps = {
2
+ name: string;
3
+ email: string;
4
+ disabled: boolean;
5
+ onNameChange: (name: string) => void;
6
+ onEmailChange: (email: string) => void;
7
+ };
8
+ /**
9
+ * Collects the signing official required to sign an eDUC.
10
+ */
11
+ export default function SigningOfficialFields(props: SigningOfficialFieldsProps): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=SigningOfficialFields.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SigningOfficialFields.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,0BAA0B,GAAG;IACvC,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;CACvC,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,OAAO,UAAU,qBAAqB,CAC3C,KAAK,EAAE,0BAA0B,2CA0ClC"}
@@ -0,0 +1,51 @@
1
+ import { longFieldLabelSx as e } from "./styles.js";
2
+ import { Divider as t, TextField as n, Typography as r } from "@mui/material";
3
+ import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
4
+ //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.tsx
5
+ function s(s) {
6
+ let { name: c, email: l, disabled: u, onNameChange: d, onEmailChange: f } = s;
7
+ return /* @__PURE__ */ o(i, { children: [
8
+ /* @__PURE__ */ a(r, {
9
+ variant: "headline3",
10
+ sx: { mb: 2 },
11
+ children: "Signing Official"
12
+ }),
13
+ /* @__PURE__ */ a(r, {
14
+ variant: "body1",
15
+ sx: {
16
+ ...e,
17
+ mb: 2
18
+ },
19
+ children: "The signing official is a member of your institution with oversight authority who is NOT part of the study team (i.e., not the Project Lead, not a Data Requester or Collaborator, and not the Principal Investigator). They do not need a Synapse account but must be able to receive messages at the email address provided below."
20
+ }),
21
+ /* @__PURE__ */ a(n, {
22
+ id: "so-name",
23
+ label: "First and last names of your Signing Official",
24
+ placeholder: "First and last name of signing official, ex: John Smith",
25
+ fullWidth: !0,
26
+ type: "text",
27
+ disabled: u,
28
+ value: c,
29
+ required: !0,
30
+ onChange: (e) => d(e.target.value),
31
+ sx: { mb: 2 }
32
+ }),
33
+ /* @__PURE__ */ a(n, {
34
+ id: "so-email",
35
+ label: "Institutional Email of your Signing Official",
36
+ type: "email",
37
+ placeholder: "Individual with signing authority, e.g. jane.smith@institution.edu",
38
+ fullWidth: !0,
39
+ disabled: u,
40
+ value: l,
41
+ required: !0,
42
+ onChange: (e) => f(e.target.value),
43
+ sx: { mb: 2 }
44
+ }),
45
+ /* @__PURE__ */ a(t, { sx: { my: 4 } })
46
+ ] });
47
+ }
48
+ //#endregion
49
+ export { s as default };
50
+
51
+ //# sourceMappingURL=SigningOfficialFields.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SigningOfficialFields.js","names":[],"sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SigningOfficialFields.tsx"],"sourcesContent":["import { Divider, TextField, Typography } from '@mui/material'\nimport { longFieldLabelSx } from './styles'\n\nexport type SigningOfficialFieldsProps = {\n name: string\n email: string\n disabled: boolean\n onNameChange: (name: string) => void\n onEmailChange: (email: string) => void\n}\n\n/**\n * Collects the signing official required to sign an eDUC.\n */\nexport default function SigningOfficialFields(\n props: SigningOfficialFieldsProps,\n) {\n const { name, email, disabled, onNameChange, onEmailChange } = props\n return (\n <>\n <Typography variant={'headline3'} sx={{ mb: 2 }}>\n Signing Official\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n The signing official is a member of your institution with oversight\n authority who is NOT part of the study team (i.e., not the Project Lead,\n not a Data Requester or Collaborator, and not the Principal\n Investigator). They do not need a Synapse account but must be able to\n receive messages at the email address provided below.\n </Typography>\n <TextField\n id=\"so-name\"\n label=\"First and last names of your Signing Official\"\n placeholder=\"First and last name of signing official, ex: John Smith\"\n fullWidth\n type=\"text\"\n disabled={disabled}\n value={name}\n required\n onChange={e => onNameChange(e.target.value)}\n sx={{ mb: 2 }}\n />\n <TextField\n id=\"so-email\"\n label=\"Institutional Email of your Signing Official\"\n type=\"email\"\n placeholder=\"Individual with signing authority, e.g. jane.smith@institution.edu\"\n fullWidth\n disabled={disabled}\n value={email}\n required\n onChange={e => onEmailChange(e.target.value)}\n sx={{ mb: 2 }}\n />\n <Divider sx={{ my: 4 }} />\n </>\n )\n}\n"],"mappings":";;;;AAcA,SAAwB,EACtB,GACA;CACA,IAAM,EAAE,SAAM,UAAO,aAAU,iBAAc,qBAAkB;CAC/D,OACE,kBAAA,GAAA,EAAA,UAAA;EACE,kBAAC,GAAD;GAAY,SAAS;GAAa,IAAI,EAAE,IAAI,EAAE;aAAG;EAErC,CAAA;EACZ,kBAAC,GAAD;GAAY,SAAS;GAAS,IAAI;IAAE,GAAG;IAAkB,IAAI;GAAE;aAAG;EAMtD,CAAA;EACZ,kBAAC,GAAD;GACE,IAAG;GACH,OAAM;GACN,aAAY;GACZ,WAAA;GACA,MAAK;GACK;GACV,OAAO;GACP,UAAA;GACA,WAAU,MAAK,EAAa,EAAE,OAAO,KAAK;GAC1C,IAAI,EAAE,IAAI,EAAE;EACb,CAAA;EACD,kBAAC,GAAD;GACE,IAAG;GACH,OAAM;GACN,MAAK;GACL,aAAY;GACZ,WAAA;GACU;GACV,OAAO;GACP,UAAA;GACA,WAAU,MAAK,EAAc,EAAE,OAAO,KAAK;GAC3C,IAAI,EAAE,IAAI,EAAE;EACb,CAAA;EACD,kBAAC,GAAD,EAAS,IAAI,EAAE,IAAI,EAAE,EAAI,CAAA;CACzB,EAAA,CAAA;AAEN"}
@@ -0,0 +1,12 @@
1
+ export declare const SIGNATURE_QUOTA_EXHAUSTED_TITLE = "Sorry, you've used all of your electronic signature requests.";
2
+ /** The ACT service desk form for requesting a signature quota reset. */
3
+ export declare const ACT_QUOTA_RESET_REQUEST_URL = "https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/491";
4
+ /**
5
+ * Explains an exhausted eDUC signature quota and points at the form that can reset it. Shown both
6
+ * as the tooltip on the disabled send action and as the body of the send error alert.
7
+ */
8
+ export declare function SignatureQuotaExhaustedMessage(props: {
9
+ /** Total routings allowed, when the quota request resolved. */
10
+ quota: number | undefined;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=eDucSignatureUtils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eDucSignatureUtils.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,+BAA+B,kEACqB,CAAA;AAEjE,wEAAwE;AACxE,eAAO,MAAM,2BAA2B,uFAC8C,CAAA;AAEtF;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE;IACpD,+DAA+D;IAC/D,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;CAC1B,2CAiBA"}
@@ -0,0 +1,24 @@
1
+ import { Link as e } from "@mui/material";
2
+ import { Fragment as t, jsx as n, jsxs as r } from "react/jsx-runtime";
3
+ //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.tsx
4
+ var i = "Sorry, you've used all of your electronic signature requests.", a = "https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/491";
5
+ function o(i) {
6
+ let { quota: o } = i;
7
+ return /* @__PURE__ */ r(t, { children: [
8
+ "You have used ",
9
+ o == null ? "all of" : `all ${o} of`,
10
+ " your electronic signature routings for this request. To request a quota reset, submit a request to the",
11
+ " ",
12
+ /* @__PURE__ */ n(e, {
13
+ href: a,
14
+ target: "_blank",
15
+ rel: "noopener",
16
+ children: "Synapse Access and Compliance Team"
17
+ }),
18
+ "."
19
+ ] });
20
+ }
21
+ //#endregion
22
+ export { a as ACT_QUOTA_RESET_REQUEST_URL, i as SIGNATURE_QUOTA_EXHAUSTED_TITLE, o as SignatureQuotaExhaustedMessage };
23
+
24
+ //# sourceMappingURL=eDucSignatureUtils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"eDucSignatureUtils.js","names":[],"sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/eDucSignatureUtils.tsx"],"sourcesContent":["import { Link } from '@mui/material'\n\nexport const SIGNATURE_QUOTA_EXHAUSTED_TITLE =\n \"Sorry, you've used all of your electronic signature requests.\"\n\n/** The ACT service desk form for requesting a signature quota reset. */\nexport const ACT_QUOTA_RESET_REQUEST_URL =\n 'https://sagebionetworks.jira.com/servicedesk/customer/portal/8/group/15/create/491'\n\n/**\n * Explains an exhausted eDUC signature quota and points at the form that can reset it. Shown both\n * as the tooltip on the disabled send action and as the body of the send error alert.\n */\nexport function SignatureQuotaExhaustedMessage(props: {\n /** Total routings allowed, when the quota request resolved. */\n quota: number | undefined\n}) {\n const { quota } = props\n return (\n <>\n You have used {quota != null ? `all ${quota} of` : 'all of'} your\n electronic signature routings for this request. To request a quota reset,\n submit a request to the{' '}\n <Link\n href={ACT_QUOTA_RESET_REQUEST_URL}\n target={'_blank'}\n rel={'noopener'}\n >\n Synapse Access and Compliance Team\n </Link>\n .\n </>\n )\n}\n"],"mappings":";;;AAEA,IAAa,IACX,iEAGW,IACX;AAMF,SAAgB,EAA+B,GAG5C;CACD,IAAM,EAAE,aAAU;CAClB,OACE,kBAAA,GAAA,EAAA,UAAA;EAAE;EACe,KAAS,OAA2B,WAApB,OAAO,EAAM;EAAgB;EAEpC;EACxB,kBAAC,GAAD;GACE,MAAM;GACN,QAAQ;GACR,KAAK;aACN;EAEK,CAAA;EAAC;CAEP,EAAA,CAAA;AAEN"}
@@ -0,0 +1,11 @@
1
+ import { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types';
2
+ /**
3
+ * The part of an access requirement that every data access request step needs. Satisfied by any access requirement
4
+ * type that supports the data access request flow.
5
+ */
6
+ export type RequestFlowAccessRequirement = Pick<ManagedACTAccessRequirement, 'id'> & Partial<Pick<ManagedACTAccessRequirement, 'eDucTemplateId'>>;
7
+ /**
8
+ * The part of an access requirement that determines how accessors are collected and which documents are requested.
9
+ */
10
+ export type AccessorStepAccessRequirement = RequestFlowAccessRequirement & Partial<Pick<ManagedACTAccessRequirement, 'isCertifiedUserRequired' | 'isValidatedProfileRequired' | 'isDUCRequired' | 'ducTemplateFileHandleId'>>;
11
+ //# sourceMappingURL=requestFlowTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"requestFlowTypes.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/requestFlowTypes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAA;AAE7E;;;GAGG;AACH,MAAM,MAAM,4BAA4B,GAAG,IAAI,CAC7C,2BAA2B,EAC3B,IAAI,CACL,GACC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,gBAAgB,CAAC,CAAC,CAAA;AAE9D;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,4BAA4B,GACtE,OAAO,CACL,IAAI,CACF,2BAA2B,EACzB,yBAAyB,GACzB,4BAA4B,GAC5B,eAAe,GACf,yBAAyB,CAC5B,CACF,CAAA"}
@@ -0,0 +1,22 @@
1
+ import { AccessorChange, Renewal, Request, UserProfile } from '@sage-bionetworks/synapse-types';
2
+ /**
3
+ * The accessors of a request after listing the current user as an accessor and removing duplicate accessors.
4
+ */
5
+ export declare function ensureCurrentUserIsAccessor(accessorChanges: AccessorChange[] | undefined, currentUserId: string, isRenewal: boolean): AccessorChange[];
6
+ type UseInitializeRequestAccessorsArgs = {
7
+ dataAccessRequest: Request | Renewal | undefined;
8
+ user: UserProfile | undefined;
9
+ isRenewal: boolean;
10
+ /** Saves the request. Must handle its own errors, e.g. a react-query `mutate` function with an `onError` handler. */
11
+ updateRequest: (request: Request | Renewal) => void;
12
+ /** When provided, is attached to a request that does not yet reference a research project. */
13
+ researchProjectId?: string;
14
+ };
15
+ /**
16
+ * Applies the updates that every request needs once it and the current user are loaded: the current user is listed as
17
+ * an accessor, duplicate accessors are removed, and (if provided) the research project is attached. The updates are
18
+ * saved at most once.
19
+ */
20
+ export declare function useInitializeRequestAccessors(args: UseInitializeRequestAccessorsArgs): void;
21
+ export {};
22
+ //# sourceMappingURL=useInitializeRequestAccessors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitializeRequestAccessors.d.ts","sourceRoot":"","sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EAEd,OAAO,EACP,OAAO,EACP,WAAW,EACZ,MAAM,iCAAiC,CAAA;AAGxC;;GAEG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,cAAc,EAAE,GAAG,SAAS,EAC7C,aAAa,EAAE,MAAM,EACrB,SAAS,EAAE,OAAO,GACjB,cAAc,EAAE,CAoBlB;AAED,KAAK,iCAAiC,GAAG;IACvC,iBAAiB,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,CAAA;IAChD,IAAI,EAAE,WAAW,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,OAAO,CAAA;IAClB,qHAAqH;IACrH,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,KAAK,IAAI,CAAA;IACnD,8FAA8F;IAC9F,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAC3B,CAAA;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,iCAAiC,QAsCxC"}
@@ -0,0 +1,32 @@
1
+ import { useEffect as e, useRef as t } from "react";
2
+ import { AccessType as n } from "@sage-bionetworks/synapse-types";
3
+ import { deepEquals as r } from "@rjsf/utils";
4
+ //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.ts
5
+ function i(e, t, i) {
6
+ let a = {
7
+ userId: t,
8
+ type: i ? n.RENEW_ACCESS : n.GAIN_ACCESS
9
+ }, o = e?.some((e) => r(e, a)) ? e : [a, ...e ?? []], s = /* @__PURE__ */ new Set();
10
+ return o.filter((e) => s.has(e.userId) ? !1 : (s.add(e.userId), !0));
11
+ }
12
+ function a(n) {
13
+ let { dataAccessRequest: a, user: o, isRenewal: s, updateRequest: c, researchProjectId: l } = n, u = t(!1);
14
+ e(() => {
15
+ if (a && o && !u.current) {
16
+ let e = !1;
17
+ l && !a.researchProjectId && (a.researchProjectId = l, e = !0);
18
+ let t = i(a.accessorChanges, o.ownerId, s);
19
+ r(t, a.accessorChanges) || (a.accessorChanges = t, e = !0), e && (u.current = !0, c(a));
20
+ }
21
+ }, [
22
+ a,
23
+ s,
24
+ l,
25
+ c,
26
+ o
27
+ ]);
28
+ }
29
+ //#endregion
30
+ export { i as ensureCurrentUserIsAccessor, a as useInitializeRequestAccessors };
31
+
32
+ //# sourceMappingURL=useInitializeRequestAccessors.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useInitializeRequestAccessors.js","names":[],"sources":["../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/useInitializeRequestAccessors.ts"],"sourcesContent":["import { deepEquals } from '@rjsf/utils'\nimport {\n AccessorChange,\n AccessType,\n Renewal,\n Request,\n UserProfile,\n} from '@sage-bionetworks/synapse-types'\nimport { useEffect, useRef } from 'react'\n\n/**\n * The accessors of a request after listing the current user as an accessor and removing duplicate accessors.\n */\nexport function ensureCurrentUserIsAccessor(\n accessorChanges: AccessorChange[] | undefined,\n currentUserId: string,\n isRenewal: boolean,\n): AccessorChange[] {\n const currentUserWithGainAccess: AccessorChange = {\n userId: currentUserId,\n type: isRenewal ? AccessType.RENEW_ACCESS : AccessType.GAIN_ACCESS,\n }\n const withCurrentUser = accessorChanges?.some(item =>\n deepEquals(item, currentUserWithGainAccess),\n )\n ? accessorChanges\n : [currentUserWithGainAccess, ...(accessorChanges ?? [])]\n\n // SWC-5765: Filter out duplicate accessors\n const seen = new Set<string>()\n return withCurrentUser.filter(accessorChange => {\n if (seen.has(accessorChange.userId)) {\n return false\n }\n seen.add(accessorChange.userId)\n return true\n })\n}\n\ntype UseInitializeRequestAccessorsArgs = {\n dataAccessRequest: Request | Renewal | undefined\n user: UserProfile | undefined\n isRenewal: boolean\n /** Saves the request. Must handle its own errors, e.g. a react-query `mutate` function with an `onError` handler. */\n updateRequest: (request: Request | Renewal) => void\n /** When provided, is attached to a request that does not yet reference a research project. */\n researchProjectId?: string\n}\n\n/**\n * Applies the updates that every request needs once it and the current user are loaded: the current user is listed as\n * an accessor, duplicate accessors are removed, and (if provided) the research project is attached. The updates are\n * saved at most once.\n */\nexport function useInitializeRequestAccessors(\n args: UseInitializeRequestAccessorsArgs,\n) {\n const {\n dataAccessRequest,\n user,\n isRenewal,\n updateRequest,\n researchProjectId,\n } = args\n const hasAppliedImmediateUpdates = useRef(false)\n\n useEffect(() => {\n if (dataAccessRequest && user && !hasAppliedImmediateUpdates.current) {\n let shouldUpdate = false\n\n if (researchProjectId && !dataAccessRequest.researchProjectId) {\n dataAccessRequest.researchProjectId = researchProjectId\n shouldUpdate = true\n }\n\n const accessorChanges = ensureCurrentUserIsAccessor(\n dataAccessRequest.accessorChanges,\n user.ownerId,\n isRenewal,\n )\n if (!deepEquals(accessorChanges, dataAccessRequest.accessorChanges)) {\n dataAccessRequest.accessorChanges = accessorChanges\n shouldUpdate = true\n }\n\n if (shouldUpdate) {\n // Only attempt these updates once. If the server does not echo back a value we applied here, retrying would\n // loop indefinitely, leaving the form perpetually in a pending state.\n hasAppliedImmediateUpdates.current = true\n updateRequest(dataAccessRequest)\n }\n }\n }, [dataAccessRequest, isRenewal, researchProjectId, updateRequest, user])\n}\n"],"mappings":";;;;AAaA,SAAgB,EACd,GACA,GACA,GACkB;CAClB,IAAM,IAA4C;EAChD,QAAQ;EACR,MAAM,IAAY,EAAW,eAAe,EAAW;CACzD,GACM,IAAkB,GAAiB,MAAK,MAC5C,EAAW,GAAM,CAAyB,CAC5C,IACI,IACA,CAAC,GAA2B,GAAI,KAAmB,CAAC,CAAE,GAGpD,oBAAO,IAAI,IAAY;CAC7B,OAAO,EAAgB,QAAO,MACxB,EAAK,IAAI,EAAe,MAAM,IACzB,MAET,EAAK,IAAI,EAAe,MAAM,GACvB,GACR;AACH;AAiBA,SAAgB,EACd,GACA;CACA,IAAM,EACJ,sBACA,SACA,cACA,kBACA,yBACE,GACE,IAA6B,EAAO,EAAK;CAE/C,QAAgB;EACd,IAAI,KAAqB,KAAQ,CAAC,EAA2B,SAAS;GACpE,IAAI,IAAe;GAEnB,AAAI,KAAqB,CAAC,EAAkB,sBAC1C,EAAkB,oBAAoB,GACtC,IAAe;GAGjB,IAAM,IAAkB,EACtB,EAAkB,iBAClB,EAAK,SACL,CACF;GAMA,AALK,EAAW,GAAiB,EAAkB,eAAe,MAChE,EAAkB,kBAAkB,GACpC,IAAe,KAGb,MAGF,EAA2B,UAAU,IACrC,EAAc,CAAiB;EAEnC;CACF,GAAG;EAAC;EAAmB;EAAW;EAAmB;EAAe;CAAI,CAAC;AAC3E"}