synapse-react-client 4.0.33 → 4.0.35

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 (179) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/assets/icons/curie-head.svg +21 -0
  3. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +29 -3
  4. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
  5. package/dist/components/AccessRequirementList/AccessRequirementList.js +153 -84
  6. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  7. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js +1 -0
  8. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js.map +1 -1
  9. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts +1 -0
  10. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts.map +1 -1
  11. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js +49 -42
  12. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
  13. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts +6 -0
  14. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
  15. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +161 -155
  16. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
  17. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +21 -0
  18. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -0
  19. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +164 -0
  20. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -0
  21. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +22 -0
  22. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -0
  23. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +264 -0
  24. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -0
  25. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js +1 -0
  26. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js.map +1 -1
  27. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
  28. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +105 -96
  29. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
  30. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts +13 -0
  31. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts.map +1 -0
  32. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js +122 -0
  33. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js.map +1 -0
  34. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +17 -0
  35. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -0
  36. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +112 -0
  37. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -0
  38. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +27 -0
  39. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -0
  40. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +194 -0
  41. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -0
  42. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts +1 -0
  43. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts.map +1 -1
  44. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js +7 -7
  45. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js.map +1 -1
  46. package/dist/components/DraggableDialog/DraggableDialog.d.ts +2 -1
  47. package/dist/components/DraggableDialog/DraggableDialog.d.ts.map +1 -1
  48. package/dist/components/DraggableDialog/DraggableDialog.js +42 -33
  49. package/dist/components/DraggableDialog/DraggableDialog.js.map +1 -1
  50. package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts.map +1 -1
  51. package/dist/components/EntityTreeTable/hooks/useTableColumns.js +12 -6
  52. package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
  53. package/dist/components/ExperimentalMode/ExperimentalMode.js +2 -1
  54. package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
  55. package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
  56. package/dist/components/FilePreview/PdfPreview.js +23 -20
  57. package/dist/components/FilePreview/PdfPreview.js.map +1 -1
  58. package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
  59. package/dist/components/GenericCard/SynapseCardLabel.js +100 -99
  60. package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
  61. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  62. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +64 -55
  63. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  64. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
  65. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +4 -1
  66. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  67. package/dist/components/StorybookComponentWrapper.d.ts.map +1 -1
  68. package/dist/components/StorybookComponentWrapper.js +16 -13
  69. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  70. package/dist/components/SynapseChat/GridAgentChat.js +6 -6
  71. package/dist/components/SynapseChat/SynapseChat.d.ts +2 -1
  72. package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
  73. package/dist/components/SynapseChat/SynapseChat.js +118 -74
  74. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  75. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +3 -1
  76. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
  77. package/dist/components/SynapseChat/SynapseChatInteraction.js +21 -21
  78. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  79. package/dist/components/SynapseChat/SynapseChatMessage.d.ts +1 -0
  80. package/dist/components/SynapseChat/SynapseChatMessage.d.ts.map +1 -1
  81. package/dist/components/SynapseChat/SynapseChatMessage.js +9 -8
  82. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  83. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -1
  84. package/dist/components/SynapseChat/SynapsePortalChatDialog.js +2 -1
  85. package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -1
  86. package/dist/components/TanStackTable/TanStackTableUtils.d.ts.map +1 -1
  87. package/dist/components/TanStackTable/TanStackTableUtils.js +6 -6
  88. package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
  89. package/dist/components/dataaccess/AccessRequirementDashboard.d.ts.map +1 -1
  90. package/dist/components/dataaccess/AccessRequirementDashboard.js +55 -55
  91. package/dist/components/dataaccess/AccessRequirementDashboard.js.map +1 -1
  92. package/dist/components/dataaccess/EDucTemplateTable.d.ts +3 -0
  93. package/dist/components/dataaccess/EDucTemplateTable.d.ts.map +1 -0
  94. package/dist/components/dataaccess/EDucTemplateTable.js +213 -0
  95. package/dist/components/dataaccess/EDucTemplateTable.js.map +1 -0
  96. package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
  97. package/dist/components/dataaccess/ReviewerDashboard.js +44 -34
  98. package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
  99. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts +12 -0
  100. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -0
  101. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +84 -0
  102. package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -0
  103. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.d.ts.map +1 -1
  104. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +20 -18
  105. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
  106. package/dist/components/entity/page/CreatedByModifiedBy.d.ts.map +1 -1
  107. package/dist/components/entity/page/CreatedByModifiedBy.js +43 -61
  108. package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
  109. package/dist/components/entity/page/createdByModifiedByTooltips.d.ts +7 -0
  110. package/dist/components/entity/page/createdByModifiedByTooltips.d.ts.map +1 -0
  111. package/dist/components/entity/page/createdByModifiedByTooltips.js +36 -0
  112. package/dist/components/entity/page/createdByModifiedByTooltips.js.map +1 -0
  113. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.d.ts.map +1 -1
  114. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js +130 -65
  115. package/dist/components/entity/page/title_bar/useGetEntityTitleBarProperties.js.map +1 -1
  116. package/dist/components/widgets/Range.js +8 -2
  117. package/dist/components/widgets/Range.js.map +1 -1
  118. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts +2 -0
  119. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  120. package/dist/components/widgets/facet-nav/FacetNavPanel.js +35 -40
  121. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  122. package/dist/components/widgets/query-filter/RangeFacetFilter.d.ts.map +1 -1
  123. package/dist/components/widgets/query-filter/RangeFacetFilter.js +2 -1
  124. package/dist/components/widgets/query-filter/RangeFacetFilter.js.map +1 -1
  125. package/dist/components/widgets/query-filter/RangeFacetFilterUI.d.ts.map +1 -1
  126. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js +19 -19
  127. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
  128. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
  129. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +48 -23
  130. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
  131. package/dist/mocks/msw/handlers/eDucTemplateHandlers.d.ts.map +1 -1
  132. package/dist/mocks/msw/handlers/eDucTemplateHandlers.js +9 -9
  133. package/dist/mocks/msw/handlers/eDucTemplateHandlers.js.map +1 -1
  134. package/dist/mocks/msw/handlers/fileHandlers.d.ts.map +1 -1
  135. package/dist/mocks/msw/handlers/fileHandlers.js +22 -22
  136. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  137. package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
  138. package/dist/mocks/msw/handlers/userProfileHandlers.js +36 -36
  139. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  140. package/dist/mocks/user/mock_user_profile.d.ts +1 -0
  141. package/dist/mocks/user/mock_user_profile.d.ts.map +1 -1
  142. package/dist/mocks/user/mock_user_profile.js +45 -45
  143. package/dist/mocks/user/mock_user_profile.js.map +1 -1
  144. package/dist/style/components/facet_nav/_facet-nav-panel.scss +0 -6
  145. package/dist/synapse-queries/KeyFactory.d.ts +1 -0
  146. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  147. package/dist/synapse-queries/KeyFactory.js +3 -0
  148. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  149. package/dist/synapse-queries/dataaccess/index.js +4 -4
  150. package/dist/synapse-queries/dataaccess/useEDuc.d.ts +13 -1
  151. package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
  152. package/dist/synapse-queries/dataaccess/useEDuc.js +67 -49
  153. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  154. package/dist/synapse-queries/index.js +185 -184
  155. package/dist/tsconfig.build.tsbuildinfo +1 -1
  156. package/dist/utils/APIConstants.d.ts +6 -0
  157. package/dist/utils/APIConstants.d.ts.map +1 -1
  158. package/dist/utils/APIConstants.js +2 -2
  159. package/dist/utils/APIConstants.js.map +1 -1
  160. package/dist/utils/AppUtils/session/ApplicationSessionManager.d.ts.map +1 -1
  161. package/dist/utils/AppUtils/session/ApplicationSessionManager.js +20 -19
  162. package/dist/utils/AppUtils/session/ApplicationSessionManager.js.map +1 -1
  163. package/dist/utils/featureflag/FeatureFlags.d.ts +1 -0
  164. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
  165. package/dist/utils/featureflag/FeatureFlags.js +1 -1
  166. package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
  167. package/dist/utils/functions/RegularExpressions.d.ts +7 -0
  168. package/dist/utils/functions/RegularExpressions.d.ts.map +1 -1
  169. package/dist/utils/functions/RegularExpressions.js +5 -4
  170. package/dist/utils/functions/RegularExpressions.js.map +1 -1
  171. package/dist/utils/hooks/useFetchBlobUrl.d.ts +9 -0
  172. package/dist/utils/hooks/useFetchBlobUrl.d.ts.map +1 -0
  173. package/dist/utils/hooks/useFetchBlobUrl.js +19 -0
  174. package/dist/utils/hooks/useFetchBlobUrl.js.map +1 -0
  175. package/dist/utils/hooks/useIsHydrated.d.ts +9 -0
  176. package/dist/utils/hooks/useIsHydrated.d.ts.map +1 -0
  177. package/dist/utils/hooks/useIsHydrated.js +10 -0
  178. package/dist/utils/hooks/useIsHydrated.js.map +1 -0
  179. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"DataAccessRequestAccessorsFilesForm.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.tsx"],"sourcesContent":["import { NewReleasesOutlined } from '@mui/icons-material'\nimport {\n Alert,\n AlertProps as MuiAlertProps,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Link,\n Stack,\n TextField,\n Typography,\n} from '@mui/material'\nimport { deepEquals } from '@rjsf/utils'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport isEmpty from 'lodash-es/isEmpty'\nimport {\n AccessorChange,\n AccessType,\n FileHandleAssociateType,\n FileHandleAssociation,\n FileUploadComplete,\n ManagedACTAccessRequirement,\n Renewal,\n Request,\n RestrictableObjectType,\n SigningOfficial,\n UploadCallbackResp,\n} from '@sage-bionetworks/synapse-types'\nimport { ReactNode, useEffect, useState } from 'react'\nimport {\n useGetCurrentUserProfile,\n useGetDataAccessRequestForUpdate,\n useSubmitDataAccessRequest,\n useUpdateDataAccessRequest,\n} from '../../../../synapse-queries'\nimport { useSynapseContext } from '../../../../utils'\nimport { SynapseErrorBoundary } from '../../../error/ErrorBanner'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport DataAccessRequestAccessorsEditor, {\n DataAccessRequestAccessorsEditorProps,\n} from '../DataAccessRequestAccessorsEditor'\nimport { longFieldLabelSx } from '../styles'\nimport DocumentTemplate from '../DocumentTemplate'\nimport ManagedACTAccessRequirementFormWikiWrapper from '../ManagedACTAccessRequirementFormWikiWrapper'\nimport { UploadDocumentField } from '../UploadDocumentField'\n\nfunction AccessorRequirementHelpText(props: {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n isEDucEnabled: boolean\n}) {\n const { managedACTAccessRequirement, isEDucEnabled } = props\n let link: string = ''\n let msg: string = ''\n\n if (\n managedACTAccessRequirement.isCertifiedUserRequired &&\n managedACTAccessRequirement.isValidatedProfileRequired\n ) {\n link = 'https://help.synapse.org/docs/User-Types.2007072795.html'\n msg =\n 'All data requesters must be certified users and have a validated user profile.'\n } else if (managedACTAccessRequirement.isCertifiedUserRequired) {\n link =\n 'https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers'\n msg = 'All data requesters must be a certified user.'\n } else if (managedACTAccessRequirement.isValidatedProfileRequired) {\n link =\n 'https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers'\n msg = 'All data requesters must have a validated user profile.'\n }\n return (\n <>\n {managedACTAccessRequirement.isDUCRequired && !isEDucEnabled ? (\n <Box sx={{ display: 'flex', gap: 2, alignItems: 'center', py: 1 }}>\n <NewReleasesOutlined sx={{ color: 'error.main' }} />\n <div>\n You must list the Synapse user names of all collaborators listed in\n your Data Use Certificate (DUC).\n </div>\n </Box>\n ) : (\n ''\n )}\n {msg}{' '}\n {link && (\n <Link href={link} target={'_blank'} rel={'noreferrer'}>\n Learn more\n </Link>\n )}\n </>\n )\n}\n\nexport type DataAccessRequestAccessorsFilesFormProps = {\n /**\n * The ID of the object of interest. This corresponds to the subjectId of the {@link CreateSubmissionRequest}\n */\n subjectId: string\n /* The type of the subject */\n subjectType: RestrictableObjectType\n /* The access requirement to which the user is requesting access */\n managedACTAccessRequirement: ManagedACTAccessRequirement\n onSubmissionCreated: (submissionId: string) => void\n researchProjectId: string\n onHide: () => void\n /* Callback invoked when the user clicks cancel. The unsaved, modified dataAccessRequest is returned so the calling component may prompt the user to save this data */\n onCancel: (modifiedDataAccessRequest: Request | Renewal) => void\n /** Callback invoked when the 'Back' action button is clicked */\n onBackClicked: () => void\n}\n\nexport type AlertProps = {\n key: MuiAlertProps['severity']\n message: string | ReactNode\n}\n\n/**\n * Step 2 of the Data Access Request/Renewal flow prompts the user to\n * - Manage the list of accessors, i.e. Synapse users who will gain, renew, or lose access\n * - Download and upload documents required by the Access Requirement\n * - If a renewal, provide publications and a summary of use statement.\n *\n * The component expects a researchProjectId, which should reference complete researchProject created in Step 1.\n * The user may click a \"Submit\" button, which will save the request and issue a data access submission that references\n * the requestId created/updated in this component.\n */\nexport default function DataAccessRequestAccessorsFilesForm(\n props: DataAccessRequestAccessorsFilesFormProps,\n) {\n const {\n onSubmissionCreated,\n managedACTAccessRequirement,\n subjectId,\n subjectType,\n researchProjectId,\n onCancel,\n onBackClicked,\n } = props\n const { isAuthenticated } = useSynapseContext()\n const { data: user } = useGetCurrentUserProfile({ enabled: isAuthenticated })\n const [alert, setAlert] = useState<AlertProps | undefined>()\n const isEDucEnabled = Boolean(managedACTAccessRequirement.eDucTemplateId)\n const [accessorChanges, setAccessorChanges] = useState<\n AccessorChange[] | undefined\n >()\n const [summaryOfUse, setSummaryOfUse] = useState<string | undefined>()\n const [publication, setPublication] = useState<string | undefined>()\n const [soName, setSoName] = useState<string>('')\n const [soEmail, setSoEmail] = useState<string>('')\n\n const { data: dataAccessRequest, isLoading: isLoadingGetDataAccessRequest } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n enabled: isAuthenticated,\n // Infinite staleTime ensures this won't get re-fetched unless explicitly invalidated by the mutation\n staleTime: Infinity,\n // This call should never fail, so if we run into an error, throwing to an error boundary is acceptable\n throwOnError: true,\n })\n\n const isRenewal =\n dataAccessRequest?.concreteType ===\n 'org.sagebionetworks.repo.model.dataaccess.Renewal'\n\n function onError(e: SynapseClientError) {\n console.log('RequestDataAccessStep2: Error updating form', e)\n setAlert({\n key: 'error',\n message: getErrorMessage(e.reason),\n })\n }\n\n const { mutate: submit, isPending: submitDataAccessRequestIsPending } =\n useSubmitDataAccessRequest({\n onSuccess: submission => {\n onSubmissionCreated(submission.submissionId)\n },\n onError: onError,\n })\n\n const {\n mutateAsync: updateRequestAsync,\n isPending: updateDataAccessRequestIsPending,\n } = useUpdateDataAccessRequest({\n onError: onError,\n })\n\n const isLoading =\n isLoadingGetDataAccessRequest ||\n updateDataAccessRequestIsPending ||\n submitDataAccessRequestIsPending\n\n const disableSubmitButton =\n submitDataAccessRequestIsPending || (isEDucEnabled && (!soName || !soEmail))\n\n /**\n * This effect comprises a collection of updates we should immediately apply to a data access request.\n */\n useEffect(() => {\n if (dataAccessRequest && user) {\n let shouldUpdate = false\n\n // Attach the researchProjectId to the request\n if (!dataAccessRequest.researchProjectId) {\n dataAccessRequest.researchProjectId = researchProjectId\n shouldUpdate = true\n }\n\n // Add the current user with GAIN_ACCESS to the list of accessors\n const currentUserWithGainAccess: AccessorChange = {\n userId: user.ownerId,\n type: isRenewal ? AccessType.RENEW_ACCESS : AccessType.GAIN_ACCESS,\n }\n if (\n !dataAccessRequest.accessorChanges ||\n !dataAccessRequest.accessorChanges.find(item =>\n deepEquals(item, currentUserWithGainAccess),\n )\n ) {\n dataAccessRequest.accessorChanges = [\n currentUserWithGainAccess,\n ...(dataAccessRequest.accessorChanges || []),\n ]\n shouldUpdate = true\n }\n\n // SWC-5765: Filter out duplicate accessors\n const seen = new Set()\n const uniqueAccessorChanges = dataAccessRequest.accessorChanges.filter(\n accessorChange => {\n return seen.has(accessorChange.userId)\n ? false\n : seen.add(accessorChange.userId)\n },\n )\n if (\n uniqueAccessorChanges.length !==\n dataAccessRequest.accessorChanges.length\n ) {\n dataAccessRequest.accessorChanges = uniqueAccessorChanges\n shouldUpdate = true\n }\n\n if (shouldUpdate) {\n updateRequestAsync(dataAccessRequest)\n }\n }\n }, [\n dataAccessRequest,\n isRenewal,\n researchProjectId,\n updateRequestAsync,\n user,\n ])\n\n /**\n * Fields other than uploaded files are NOT immediately synced with the server. Set local state if these values exist in the\n * fetched object, and no value exists in local state.\n */\n useEffect(() => {\n if (dataAccessRequest) {\n if (dataAccessRequest.accessorChanges && accessorChanges == undefined) {\n setAccessorChanges(dataAccessRequest.accessorChanges)\n }\n if (\n isRenewal &&\n dataAccessRequest.publication &&\n publication == undefined\n ) {\n setPublication(dataAccessRequest.publication)\n }\n if (\n isRenewal &&\n dataAccessRequest.summaryOfUse &&\n summaryOfUse == undefined\n ) {\n setSummaryOfUse(dataAccessRequest.summaryOfUse)\n }\n if (isEDucEnabled) {\n const so = dataAccessRequest.signingOfficial\n if (isEmpty(soName) && so?.name) {\n setSoName(so.name)\n }\n if (isEmpty(soEmail) && so?.institutionalEmail) {\n setSoEmail(so.institutionalEmail)\n }\n }\n }\n // Intentionally only re-synchronize state when server state changes\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, [dataAccessRequest])\n\n function getDataAccessRequestWithLocalState(): Request | Renewal {\n const base = {\n ...dataAccessRequest,\n accessorChanges: accessorChanges,\n publication,\n summaryOfUse,\n } as Request | Renewal\n if (isEDucEnabled) {\n const nextSo: SigningOfficial = {\n ...dataAccessRequest?.signingOfficial,\n name: soName || undefined,\n institutionalEmail: soEmail || undefined,\n }\n return { ...base, signingOfficial: nextSo }\n }\n return base\n }\n\n async function handleSubmit() {\n if (dataAccessRequest) {\n // Save the request\n const requestObject = await updateRequestAsync(\n getDataAccessRequestWithLocalState(),\n )\n // Create a submission and attach the request\n submit({\n request: {\n requestId: requestObject.id,\n requestEtag: requestObject.etag,\n subjectId: subjectId,\n subjectType: subjectType,\n },\n accessRequirementId: String(managedACTAccessRequirement.id),\n })\n }\n }\n\n const getErrorMessage = (reason: string = '') => {\n return (\n <>\n <strong>Sorry, there is an error in submitting your request.</strong>\n <br />\n {reason}\n </>\n )\n }\n\n const onAccessorChange: DataAccessRequestAccessorsEditorProps['onChange'] =\n updater => {\n // Copy the array so the caller doesn't have to worry about immutability\n setAccessorChanges([...updater(accessorChanges || [])])\n }\n\n const onClearAttachment = (fid: string) => {\n updateRequestAsync({\n ...dataAccessRequest!,\n attachments: dataAccessRequest!.attachments?.filter(item => item !== fid),\n })\n }\n\n const uploadCallback = (\n data: UploadCallbackResp,\n context: keyof Pick<\n Request,\n 'attachments' | 'irbFileHandleId' | 'ducFileHandleId'\n >,\n ) => {\n if (data.resp && data.success) {\n // Files are uploaded and synced with the server immediately\n const uploadResponse: FileUploadComplete = data.resp\n if (context === 'attachments') {\n updateRequestAsync({\n ...dataAccessRequest!,\n attachments: [\n ...(dataAccessRequest!.attachments || []),\n uploadResponse.fileHandleId,\n ],\n })\n } else {\n updateRequestAsync({\n ...dataAccessRequest!,\n [context]: uploadResponse.fileHandleId,\n })\n }\n } else if (!data.success && data.error) {\n // show the error\n console.log(\n 'RequestDataAccessStep2: Error uploading the file',\n data.error,\n )\n setAlert({\n key: 'error',\n message: getErrorMessage(data.error.reason),\n })\n }\n }\n\n const ducFileHandleAssociation: FileHandleAssociation[] =\n dataAccessRequest?.ducFileHandleId\n ? [\n {\n fileHandleId: dataAccessRequest?.ducFileHandleId,\n associateObjectType:\n FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest.id),\n },\n ]\n : []\n const irbFileHandleAssociation: FileHandleAssociation[] =\n dataAccessRequest?.irbFileHandleId\n ? [\n {\n fileHandleId: dataAccessRequest.irbFileHandleId,\n associateObjectType:\n FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest.id),\n },\n ]\n : []\n\n const attachmentFileHandleAssociations: FileHandleAssociation[] =\n (dataAccessRequest?.attachments || []).map(attachmentFileHandleId => ({\n fileHandleId: attachmentFileHandleId,\n associateObjectType: FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest!.id),\n })) ?? []\n\n return (\n <>\n <DialogTitle>\n <Stack\n direction=\"row\"\n sx={{\n alignItems: 'center',\n gap: '5px',\n }}\n >\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton onClick={props.onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <ManagedACTAccessRequirementFormWikiWrapper\n managedACTAccessRequirementId={String(managedACTAccessRequirement.id)}\n >\n <Box\n component={'form'}\n sx={{\n // Must set a minHeight to ensure the user picker in the DataAccessRequestAccessorsEditor doesn't get cut off\n minHeight: '475px',\n }}\n onSubmit={e => e.preventDefault()}\n >\n <Typography variant={'body1'} sx={{ mb: 2, fontSize: '16px' }}>\n Please provide the information below to submit the request for\n access.\n </Typography>\n\n {isEDucEnabled && (\n <>\n <Typography variant={'headline3'} sx={{ mb: 2 }}>\n Signing Official\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, mb: 2 }}\n >\n The signing official is a member of your institution with\n oversight authority who is NOT part of the study team (i.e.,\n not the Project Lead, not a Data Requester or Collaborator,\n and not the Principal Investigator). They do not need a\n Synapse account but must be able to receive messages at the\n 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={isLoading}\n value={soName}\n required\n onChange={e => setSoName(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={isLoading}\n value={soEmail}\n required\n onChange={e => setSoEmail(e.target.value)}\n sx={{ mb: 2 }}\n />\n <Divider sx={{ my: 4 }} />\n </>\n )}\n\n {dataAccessRequest && user && (\n <DataAccessRequestAccessorsEditor\n accessorChanges={accessorChanges || []}\n onChange={onAccessorChange}\n isRenewal={isRenewal}\n helpText={\n <AccessorRequirementHelpText\n managedACTAccessRequirement={managedACTAccessRequirement}\n isEDucEnabled={isEDucEnabled}\n />\n }\n />\n )}\n\n {((managedACTAccessRequirement?.isDUCRequired && !isEDucEnabled) ||\n managedACTAccessRequirement?.isIRBApprovalRequired ||\n managedACTAccessRequirement?.areOtherAttachmentsRequired) && (\n <Divider sx={{ my: 4 }} />\n )}\n {/* DUC — hidden for eDUC ARs, which handle DUC via the eDUC flow */}\n {managedACTAccessRequirement?.isDUCRequired && !isEDucEnabled && (\n <>\n {managedACTAccessRequirement?.ducTemplateFileHandleId && (\n <DocumentTemplate\n title={'Download DUC Template'}\n description={\n 'As a first step, you will need to download the most current version of the Data Use Certificate.'\n }\n fileHandleAssociation={{\n fileHandleId:\n managedACTAccessRequirement.ducTemplateFileHandleId,\n associateObjectType:\n FileHandleAssociateType.AccessRequirementAttachment,\n associateObjectId: String(managedACTAccessRequirement.id),\n }}\n downloadButtonText={'Download DUC Template'}\n />\n )}\n <Typography variant={'headline3'} sx={{ mt: 4, mb: 2 }}>\n Fill out and upload a Data Use Certificate\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n You must download and fill out a Data Use Certificate (DUC).\n Be sure to upload the completed DUC below once you&apos;ve\n completed it.\n </Typography>\n <Typography\n variant={'body1'}\n component={'ol'}\n sx={longFieldLabelSx}\n >\n <li>Download the DUC template file.</li>\n <li>\n Fill out the DUC template, following the instructions in the\n file.\n </li>\n <li>\n Upload the completed certificate using the button below:\n </li>\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'duc'}\n isLoading={isLoading}\n uploadCallback={resp =>\n uploadCallback(resp, 'ducFileHandleId')\n }\n documentName={'Data Use Certificate'}\n fileHandleAssociations={ducFileHandleAssociation}\n />\n </SynapseErrorBoundary>\n {(managedACTAccessRequirement?.isIRBApprovalRequired ||\n managedACTAccessRequirement?.areOtherAttachmentsRequired) && (\n <Divider sx={{ my: 4 }} />\n )}\n </>\n )}\n\n {/* IRB */}\n {managedACTAccessRequirement?.isIRBApprovalRequired && (\n <>\n <Typography variant={'headline3'} sx={{ my: 2 }}>\n IRB Approval\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n Upload a signed IRB letter on institutional letterhead. The\n letter must include the names of all the datasets requested,\n as well as the names of the data requesters above. Use the\n button below to upload the document.\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'irb'}\n isLoading={isLoading}\n documentName={'IRB Approval Letter'}\n uploadCallback={resp =>\n uploadCallback(resp, 'irbFileHandleId')\n }\n fileHandleAssociations={irbFileHandleAssociation}\n />\n </SynapseErrorBoundary>\n {managedACTAccessRequirement?.areOtherAttachmentsRequired && (\n <Divider sx={{ my: 4 }} />\n )}\n </>\n )}\n\n {\n /* Attachments */\n managedACTAccessRequirement?.areOtherAttachmentsRequired && (\n <>\n <Typography variant={'headline3'} sx={{ my: 2 }}>\n Upload other required documents\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n You must upload other required documents. Please review the\n instructions to gain data access to determine which\n documents must also be uploaded.\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'file-attachment'}\n isLoading={isLoading}\n documentName={'Attachment'}\n uploadCallback={res => uploadCallback(res, 'attachments')}\n isMultiFileUpload={true}\n fileHandleAssociations={attachmentFileHandleAssociations}\n onClearAttachment={onClearAttachment}\n />\n </SynapseErrorBoundary>\n </>\n )\n }\n\n {\n // SWC-7319 - Per GovernanceInnovation, do not show these fields on renewal\n // Publications & Summary of Use\n // isRenewal && (\n // <>\n // <TextField\n // id={'publications'}\n // label={'Publication(s)'}\n // disabled={submitDataAccessRequestIsPending}\n // multiline\n // rows={3}\n // value={publication}\n // onChange={(e: ChangeEvent<HTMLTextAreaElement>) =>\n // setPublication(e.target.value)\n // }\n // />\n // <TextField\n // id={'summaryOfUse'}\n // label={'Summary of use'}\n // value={summaryOfUse}\n // disabled={submitDataAccessRequestIsPending}\n // multiline\n // rows={3}\n // onChange={(e: ChangeEvent<HTMLTextAreaElement>) =>\n // setSummaryOfUse(e.target.value)\n // }\n // />\n // </>\n // )\n }\n </Box>\n </ManagedACTAccessRequirementFormWikiWrapper>\n {alert && <Alert severity={alert.key}>{alert.message}</Alert>}\n </DialogContent>\n <DialogActions>\n <Button\n variant={'outlined'}\n onClick={() => {\n onBackClicked()\n }}\n >\n Back\n </Button>\n <Box sx={{ flexGrow: 1 }}>{/* spacer */}</Box>\n\n <Button\n variant=\"outlined\"\n disabled={submitDataAccessRequestIsPending}\n onClick={() => {\n if (dataAccessRequest) {\n // include the local state in the onCancel callback so the user may save their changes\n onCancel(getDataAccessRequestWithLocalState())\n }\n }}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n loading={submitDataAccessRequestIsPending}\n disabled={disableSubmitButton}\n onClick={() => {\n handleSubmit()\n }}\n >\n Submit\n </Button>\n </DialogActions>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAkDA,SAAS,EAA4B,GAGlC;CACD,IAAM,EAAE,gCAA6B,qBAAkB,GACn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AA,CAAA;IAkCH;;EACqC,CAAA,GAC3C,KAAS,kBAAC,IAAD;GAAO,UAAU,EAAM;aAAM,EAAM;EAAe,CAAA,CAC/C,EAAA,CAAA;EACf,kBAAC,IAAD,EAAA,UAAA;GACE,kBAAC,GAAD;IACE,SAAS;IACT,eAAe;KACb,GAAc;IAChB;cACD;GAEO,CAAA;GACR,kBAAC,GAAD,EAAK,IAAI,EAAE,UAAU,EAAE,EAAsB,CAAA;GAE7C,kBAAC,GAAD;IACE,SAAQ;IACR,UAAU;IACV,eAAe;KACb,AAAI,KAEF,GAAS,EAAmC,CAAC;IAEjD;cACD;GAEO,CAAA;GACR,kBAAC,GAAD;IACE,SAAQ;IACR,SAAS;IACT,UAAU;IACV,eAAe;KACb,EAAa;IACf;cACD;GAEO,CAAA;EACK,EAAA,CAAA;CACf,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"DataAccessRequestAccessorsFilesForm.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.tsx"],"sourcesContent":["import { NewReleasesOutlined } from '@mui/icons-material'\nimport {\n Alert,\n AlertProps as MuiAlertProps,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Link,\n Stack,\n TextField,\n Typography,\n} from '@mui/material'\nimport { deepEquals } from '@rjsf/utils'\nimport { SynapseClientError } from '@sage-bionetworks/synapse-client/util/SynapseClientError'\nimport isEmpty from 'lodash-es/isEmpty'\nimport {\n AccessorChange,\n AccessType,\n FileHandleAssociateType,\n FileHandleAssociation,\n FileUploadComplete,\n ManagedACTAccessRequirement,\n Renewal,\n Request,\n RestrictableObjectType,\n SigningOfficial,\n UploadCallbackResp,\n} from '@sage-bionetworks/synapse-types'\nimport { ReactNode, useEffect, useRef, useState } from 'react'\nimport {\n useGetCurrentUserProfile,\n useGetDataAccessRequestForUpdate,\n useSubmitDataAccessRequest,\n useUpdateDataAccessRequest,\n} from '../../../../synapse-queries'\nimport { useSynapseContext } from '../../../../utils'\nimport { SynapseErrorBoundary } from '../../../error/ErrorBanner'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport DataAccessRequestAccessorsEditor, {\n DataAccessRequestAccessorsEditorProps,\n} from '../DataAccessRequestAccessorsEditor'\nimport { longFieldLabelSx } from '../styles'\nimport DocumentTemplate from '../DocumentTemplate'\nimport ManagedACTAccessRequirementFormWikiWrapper from '../ManagedACTAccessRequirementFormWikiWrapper'\nimport { UploadDocumentField } from '../UploadDocumentField'\n\n// PORTALS-4376: eDUC DARs cap total accessors at 100 (submitter + PI + 97 collaborators + 1 slack).\nexport const EDUC_COLLABORATOR_LIMIT = 97\n\nfunction AccessorRequirementHelpText(props: {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n isEDucEnabled: boolean\n}) {\n const { managedACTAccessRequirement, isEDucEnabled } = props\n let link: string = ''\n let msg: string = ''\n\n if (\n managedACTAccessRequirement.isCertifiedUserRequired &&\n managedACTAccessRequirement.isValidatedProfileRequired\n ) {\n link = 'https://help.synapse.org/docs/User-Types.2007072795.html'\n msg =\n 'All data requesters must be certified users and have a validated user profile.'\n } else if (managedACTAccessRequirement.isCertifiedUserRequired) {\n link =\n 'https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers'\n msg = 'All data requesters must be a certified user.'\n } else if (managedACTAccessRequirement.isValidatedProfileRequired) {\n link =\n 'https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers'\n msg = 'All data requesters must have a validated user profile.'\n }\n return (\n <>\n {managedACTAccessRequirement.isDUCRequired && !isEDucEnabled ? (\n <Box sx={{ display: 'flex', gap: 2, alignItems: 'center', py: 1 }}>\n <NewReleasesOutlined sx={{ color: 'error.main' }} />\n <div>\n You must list the Synapse user names of all collaborators listed in\n your Data Use Certificate (DUC).\n </div>\n </Box>\n ) : (\n ''\n )}\n {msg}{' '}\n {link && (\n <Link href={link} target={'_blank'} rel={'noreferrer'}>\n Learn more\n </Link>\n )}\n </>\n )\n}\n\nexport type DataAccessRequestAccessorsFilesFormProps = {\n /**\n * The ID of the object of interest. This corresponds to the subjectId of the {@link CreateSubmissionRequest}\n */\n subjectId: string\n /* The type of the subject */\n subjectType: RestrictableObjectType\n /* The access requirement to which the user is requesting access */\n managedACTAccessRequirement: ManagedACTAccessRequirement\n onSubmissionCreated: (submissionId: string) => void\n researchProjectId: string\n onHide: () => void\n /* Callback invoked when the user clicks cancel. The unsaved, modified dataAccessRequest is returned so the calling component may prompt the user to save this data */\n onCancel: (modifiedDataAccessRequest: Request | Renewal) => void\n /** Callback invoked when the 'Back' action button is clicked */\n onBackClicked: () => void\n /**\n * When set (used for eDUC ARs), clicking the primary action saves the DAR and invokes this callback\n * instead of creating a submission. Submission happens later in the eDUC flow.\n */\n onEDucContinue?: () => void\n}\n\nexport type AlertProps = {\n key: MuiAlertProps['severity']\n message: string | ReactNode\n}\n\n/**\n * Step 2 of the Data Access Request/Renewal flow prompts the user to\n * - Manage the list of accessors, i.e. Synapse users who will gain, renew, or lose access\n * - Download and upload documents required by the Access Requirement\n * - If a renewal, provide publications and a summary of use statement.\n *\n * The component expects a researchProjectId, which should reference complete researchProject created in Step 1.\n * The user may click a \"Submit\" button, which will save the request and issue a data access submission that references\n * the requestId created/updated in this component.\n */\nexport default function DataAccessRequestAccessorsFilesForm(\n props: DataAccessRequestAccessorsFilesFormProps,\n) {\n const {\n onSubmissionCreated,\n managedACTAccessRequirement,\n subjectId,\n subjectType,\n researchProjectId,\n onCancel,\n onBackClicked,\n onEDucContinue,\n } = props\n const { isAuthenticated } = useSynapseContext()\n const { data: user } = useGetCurrentUserProfile({ enabled: isAuthenticated })\n const [alert, setAlert] = useState<AlertProps | undefined>()\n const isEDucEnabled = Boolean(managedACTAccessRequirement.eDucTemplateId)\n const [accessorChanges, setAccessorChanges] = useState<\n AccessorChange[] | undefined\n >()\n const [summaryOfUse, setSummaryOfUse] = useState<string | undefined>()\n const [publication, setPublication] = useState<string | undefined>()\n const [soName, setSoName] = useState<string>('')\n const [soEmail, setSoEmail] = useState<string>('')\n const hasAppliedImmediateUpdates = useRef(false)\n\n const { data: dataAccessRequest, isLoading: isLoadingGetDataAccessRequest } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n enabled: isAuthenticated,\n // Infinite staleTime ensures this won't get re-fetched unless explicitly invalidated by the mutation\n staleTime: Infinity,\n // This call should never fail, so if we run into an error, throwing to an error boundary is acceptable\n throwOnError: true,\n })\n\n const isRenewal =\n dataAccessRequest?.concreteType ===\n 'org.sagebionetworks.repo.model.dataaccess.Renewal'\n\n function onError(e: SynapseClientError) {\n console.log('RequestDataAccessStep2: Error updating form', e)\n setAlert({\n key: 'error',\n message: getErrorMessage(e.reason),\n })\n }\n\n const { mutate: submit, isPending: submitDataAccessRequestIsPending } =\n useSubmitDataAccessRequest({\n onSuccess: submission => {\n onSubmissionCreated(submission.submissionId)\n },\n onError: onError,\n })\n\n const {\n mutateAsync: updateRequestAsync,\n isPending: updateDataAccessRequestIsPending,\n } = useUpdateDataAccessRequest({\n onError: onError,\n })\n\n const isLoading =\n isLoadingGetDataAccessRequest ||\n updateDataAccessRequestIsPending ||\n submitDataAccessRequestIsPending\n\n /**\n * Fields backed by local state are not synced with the server until the request is submitted, so an in-flight\n * background update to the request must not block the user from editing them.\n */\n const disableLocalStateFields =\n isLoadingGetDataAccessRequest || submitDataAccessRequestIsPending\n\n const disableSubmitButton =\n submitDataAccessRequestIsPending || (isEDucEnabled && (!soName || !soEmail))\n\n /**\n * This effect comprises a collection of updates we should immediately apply to a data access request.\n */\n useEffect(() => {\n if (dataAccessRequest && user && !hasAppliedImmediateUpdates.current) {\n let shouldUpdate = false\n\n // Attach the researchProjectId to the request\n if (!dataAccessRequest.researchProjectId) {\n dataAccessRequest.researchProjectId = researchProjectId\n shouldUpdate = true\n }\n\n // Add the current user with GAIN_ACCESS to the list of accessors\n const currentUserWithGainAccess: AccessorChange = {\n userId: user.ownerId,\n type: isRenewal ? AccessType.RENEW_ACCESS : AccessType.GAIN_ACCESS,\n }\n if (\n !dataAccessRequest.accessorChanges ||\n !dataAccessRequest.accessorChanges.find(item =>\n deepEquals(item, currentUserWithGainAccess),\n )\n ) {\n dataAccessRequest.accessorChanges = [\n currentUserWithGainAccess,\n ...(dataAccessRequest.accessorChanges || []),\n ]\n shouldUpdate = true\n }\n\n // SWC-5765: Filter out duplicate accessors\n const seen = new Set()\n const uniqueAccessorChanges = dataAccessRequest.accessorChanges.filter(\n accessorChange => {\n return seen.has(accessorChange.userId)\n ? false\n : seen.add(accessorChange.userId)\n },\n )\n if (\n uniqueAccessorChanges.length !==\n dataAccessRequest.accessorChanges.length\n ) {\n dataAccessRequest.accessorChanges = uniqueAccessorChanges\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 updateRequestAsync(dataAccessRequest)\n }\n }\n }, [\n dataAccessRequest,\n isRenewal,\n researchProjectId,\n updateRequestAsync,\n user,\n ])\n\n /**\n * Fields other than uploaded files are NOT immediately synced with the server. Set local state if these values exist in the\n * fetched object, and no value exists in local state.\n */\n useEffect(() => {\n if (dataAccessRequest) {\n if (dataAccessRequest.accessorChanges && accessorChanges == undefined) {\n setAccessorChanges(dataAccessRequest.accessorChanges)\n }\n if (\n isRenewal &&\n dataAccessRequest.publication &&\n publication == undefined\n ) {\n setPublication(dataAccessRequest.publication)\n }\n if (\n isRenewal &&\n dataAccessRequest.summaryOfUse &&\n summaryOfUse == undefined\n ) {\n setSummaryOfUse(dataAccessRequest.summaryOfUse)\n }\n if (isEDucEnabled) {\n const so = dataAccessRequest.signingOfficial\n if (isEmpty(soName) && so?.name) {\n setSoName(so.name)\n }\n if (isEmpty(soEmail) && so?.institutionalEmail) {\n setSoEmail(so.institutionalEmail)\n }\n }\n }\n // Intentionally only re-synchronize state when server state changes\n // oxlint-disable-next-line react-hooks/exhaustive-deps\n }, [dataAccessRequest])\n\n function getDataAccessRequestWithLocalState(): Request | Renewal {\n const base = {\n ...dataAccessRequest,\n accessorChanges: accessorChanges,\n publication,\n summaryOfUse,\n } as Request | Renewal\n if (isEDucEnabled) {\n const nextSo: SigningOfficial = {\n ...dataAccessRequest?.signingOfficial,\n name: soName || undefined,\n institutionalEmail: soEmail || undefined,\n }\n return { ...base, signingOfficial: nextSo }\n }\n return base\n }\n\n async function handleSubmit() {\n if (dataAccessRequest) {\n // Save the request\n const requestObject = await updateRequestAsync(\n getDataAccessRequestWithLocalState(),\n )\n if (onEDucContinue) {\n onEDucContinue()\n return\n }\n // Create a submission and attach the request\n submit({\n request: {\n requestId: requestObject.id,\n requestEtag: requestObject.etag,\n subjectId: subjectId,\n subjectType: subjectType,\n },\n accessRequirementId: String(managedACTAccessRequirement.id),\n })\n }\n }\n\n const getErrorMessage = (reason: string = '') => {\n return (\n <>\n <strong>Sorry, there is an error in submitting your request.</strong>\n <br />\n {reason}\n </>\n )\n }\n\n const onAccessorChange: DataAccessRequestAccessorsEditorProps['onChange'] =\n updater => {\n // Copy the array so the caller doesn't have to worry about immutability\n setAccessorChanges([...updater(accessorChanges || [])])\n }\n\n const onClearAttachment = (fid: string) => {\n updateRequestAsync({\n ...dataAccessRequest!,\n attachments: dataAccessRequest!.attachments?.filter(item => item !== fid),\n })\n }\n\n const uploadCallback = (\n data: UploadCallbackResp,\n context: keyof Pick<\n Request,\n 'attachments' | 'irbFileHandleId' | 'ducFileHandleId'\n >,\n ) => {\n if (data.resp && data.success) {\n // Files are uploaded and synced with the server immediately\n const uploadResponse: FileUploadComplete = data.resp\n if (context === 'attachments') {\n updateRequestAsync({\n ...dataAccessRequest!,\n attachments: [\n ...(dataAccessRequest!.attachments || []),\n uploadResponse.fileHandleId,\n ],\n })\n } else {\n updateRequestAsync({\n ...dataAccessRequest!,\n [context]: uploadResponse.fileHandleId,\n })\n }\n } else if (!data.success && data.error) {\n // show the error\n console.log(\n 'RequestDataAccessStep2: Error uploading the file',\n data.error,\n )\n setAlert({\n key: 'error',\n message: getErrorMessage(data.error.reason),\n })\n }\n }\n\n const ducFileHandleAssociation: FileHandleAssociation[] =\n dataAccessRequest?.ducFileHandleId\n ? [\n {\n fileHandleId: dataAccessRequest?.ducFileHandleId,\n associateObjectType:\n FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest.id),\n },\n ]\n : []\n const irbFileHandleAssociation: FileHandleAssociation[] =\n dataAccessRequest?.irbFileHandleId\n ? [\n {\n fileHandleId: dataAccessRequest.irbFileHandleId,\n associateObjectType:\n FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest.id),\n },\n ]\n : []\n\n const attachmentFileHandleAssociations: FileHandleAssociation[] =\n (dataAccessRequest?.attachments || []).map(attachmentFileHandleId => ({\n fileHandleId: attachmentFileHandleId,\n associateObjectType: FileHandleAssociateType.DataAccessRequestAttachment,\n associateObjectId: String(dataAccessRequest!.id),\n })) ?? []\n\n return (\n <>\n <DialogTitle>\n <Stack\n direction=\"row\"\n sx={{\n alignItems: 'center',\n gap: '5px',\n }}\n >\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton onClick={props.onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <ManagedACTAccessRequirementFormWikiWrapper\n managedACTAccessRequirementId={String(managedACTAccessRequirement.id)}\n >\n <Box\n component={'form'}\n sx={{\n // Must set a minHeight to ensure the user picker in the DataAccessRequestAccessorsEditor doesn't get cut off\n minHeight: '475px',\n }}\n onSubmit={e => e.preventDefault()}\n >\n <Typography variant={'body1'} sx={{ mb: 2, fontSize: '16px' }}>\n Please provide the information below to submit the request for\n access.\n </Typography>\n\n {isEDucEnabled && (\n <>\n <Typography variant={'headline3'} sx={{ mb: 2 }}>\n Signing Official\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, mb: 2 }}\n >\n The signing official is a member of your institution with\n oversight authority who is NOT part of the study team (i.e.,\n not the Project Lead, not a Data Requester or Collaborator,\n and not the Principal Investigator). They do not need a\n Synapse account but must be able to receive messages at the\n 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={disableLocalStateFields}\n value={soName}\n required\n onChange={e => setSoName(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={disableLocalStateFields}\n value={soEmail}\n required\n onChange={e => setSoEmail(e.target.value)}\n sx={{ mb: 2 }}\n />\n <Divider sx={{ my: 4 }} />\n </>\n )}\n\n {dataAccessRequest && user && (\n <DataAccessRequestAccessorsEditor\n accessorChanges={accessorChanges || []}\n onChange={onAccessorChange}\n isRenewal={isRenewal}\n collaboratorLimit={\n isEDucEnabled ? EDUC_COLLABORATOR_LIMIT : undefined\n }\n helpText={\n <AccessorRequirementHelpText\n managedACTAccessRequirement={managedACTAccessRequirement}\n isEDucEnabled={isEDucEnabled}\n />\n }\n />\n )}\n\n {((managedACTAccessRequirement?.isDUCRequired && !isEDucEnabled) ||\n managedACTAccessRequirement?.isIRBApprovalRequired ||\n managedACTAccessRequirement?.areOtherAttachmentsRequired) && (\n <Divider sx={{ my: 4 }} />\n )}\n {/* DUC — hidden for eDUC ARs, which handle DUC via the eDUC flow */}\n {managedACTAccessRequirement?.isDUCRequired && !isEDucEnabled && (\n <>\n {managedACTAccessRequirement?.ducTemplateFileHandleId && (\n <DocumentTemplate\n title={'Download DUC Template'}\n description={\n 'As a first step, you will need to download the most current version of the Data Use Certificate.'\n }\n fileHandleAssociation={{\n fileHandleId:\n managedACTAccessRequirement.ducTemplateFileHandleId,\n associateObjectType:\n FileHandleAssociateType.AccessRequirementAttachment,\n associateObjectId: String(managedACTAccessRequirement.id),\n }}\n downloadButtonText={'Download DUC Template'}\n />\n )}\n <Typography variant={'headline3'} sx={{ mt: 4, mb: 2 }}>\n Fill out and upload a Data Use Certificate\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n You must download and fill out a Data Use Certificate (DUC).\n Be sure to upload the completed DUC below once you&apos;ve\n completed it.\n </Typography>\n <Typography\n variant={'body1'}\n component={'ol'}\n sx={longFieldLabelSx}\n >\n <li>Download the DUC template file.</li>\n <li>\n Fill out the DUC template, following the instructions in the\n file.\n </li>\n <li>\n Upload the completed certificate using the button below:\n </li>\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'duc'}\n isLoading={isLoading}\n uploadCallback={resp =>\n uploadCallback(resp, 'ducFileHandleId')\n }\n documentName={'Data Use Certificate'}\n fileHandleAssociations={ducFileHandleAssociation}\n />\n </SynapseErrorBoundary>\n {(managedACTAccessRequirement?.isIRBApprovalRequired ||\n managedACTAccessRequirement?.areOtherAttachmentsRequired) && (\n <Divider sx={{ my: 4 }} />\n )}\n </>\n )}\n\n {/* IRB */}\n {managedACTAccessRequirement?.isIRBApprovalRequired && (\n <>\n <Typography variant={'headline3'} sx={{ my: 2 }}>\n IRB Approval\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n Upload a signed IRB letter on institutional letterhead. The\n letter must include the names of all the datasets requested,\n as well as the names of the data requesters above. Use the\n button below to upload the document.\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'irb'}\n isLoading={isLoading}\n documentName={'IRB Approval Letter'}\n uploadCallback={resp =>\n uploadCallback(resp, 'irbFileHandleId')\n }\n fileHandleAssociations={irbFileHandleAssociation}\n />\n </SynapseErrorBoundary>\n {managedACTAccessRequirement?.areOtherAttachmentsRequired && (\n <Divider sx={{ my: 4 }} />\n )}\n </>\n )}\n\n {\n /* Attachments */\n managedACTAccessRequirement?.areOtherAttachmentsRequired && (\n <>\n <Typography variant={'headline3'} sx={{ my: 2 }}>\n Upload other required documents\n </Typography>\n <Typography\n variant={'body1'}\n sx={{ ...longFieldLabelSx, my: 2 }}\n >\n You must upload other required documents. Please review the\n instructions to gain data access to determine which\n documents must also be uploaded.\n </Typography>\n <SynapseErrorBoundary>\n <UploadDocumentField\n id={'file-attachment'}\n isLoading={isLoading}\n documentName={'Attachment'}\n uploadCallback={res => uploadCallback(res, 'attachments')}\n isMultiFileUpload={true}\n fileHandleAssociations={attachmentFileHandleAssociations}\n onClearAttachment={onClearAttachment}\n />\n </SynapseErrorBoundary>\n </>\n )\n }\n\n {\n // SWC-7319 - Per GovernanceInnovation, do not show these fields on renewal\n // Publications & Summary of Use\n // isRenewal && (\n // <>\n // <TextField\n // id={'publications'}\n // label={'Publication(s)'}\n // disabled={submitDataAccessRequestIsPending}\n // multiline\n // rows={3}\n // value={publication}\n // onChange={(e: ChangeEvent<HTMLTextAreaElement>) =>\n // setPublication(e.target.value)\n // }\n // />\n // <TextField\n // id={'summaryOfUse'}\n // label={'Summary of use'}\n // value={summaryOfUse}\n // disabled={submitDataAccessRequestIsPending}\n // multiline\n // rows={3}\n // onChange={(e: ChangeEvent<HTMLTextAreaElement>) =>\n // setSummaryOfUse(e.target.value)\n // }\n // />\n // </>\n // )\n }\n </Box>\n </ManagedACTAccessRequirementFormWikiWrapper>\n {alert && <Alert severity={alert.key}>{alert.message}</Alert>}\n </DialogContent>\n <DialogActions>\n <Button\n variant={'outlined'}\n onClick={() => {\n onBackClicked()\n }}\n >\n Back\n </Button>\n <Box sx={{ flexGrow: 1 }}>{/* spacer */}</Box>\n\n <Button\n variant=\"outlined\"\n disabled={submitDataAccessRequestIsPending}\n onClick={() => {\n if (dataAccessRequest) {\n // include the local state in the onCancel callback so the user may save their changes\n onCancel(getDataAccessRequestWithLocalState())\n }\n }}\n >\n Cancel\n </Button>\n <Button\n variant=\"contained\"\n loading={submitDataAccessRequestIsPending}\n disabled={disableSubmitButton}\n onClick={() => {\n handleSubmit()\n }}\n >\n {onEDucContinue ? 'Continue' : 'Submit'}\n </Button>\n </DialogActions>\n </>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAmDA,IAAa,IAA0B;AAEvC,SAAS,GAA4B,GAGlC;CACD,IAAM,EAAE,gCAA6B,qBAAkB,GACnD,IAAe,IACf,IAAc;CAkBlB,OAfE,EAA4B,2BAC5B,EAA4B,8BAE5B,IAAO,4DACP,IACE,oFACO,EAA4B,2BACrC,IACE,4FACF,IAAM,mDACG,EAA4B,+BACrC,IACE,4FACF,IAAM,4DAGN,kBAAA,GAAA,EAAA,UAAA;EACG,EAA4B,iBAAiB,CAAC,IAC7C,kBAAC,GAAD;GAAK,IAAI;IAAE,SAAS;IAAQ,KAAK;IAAG,YAAY;IAAU,IAAI;GAAE;aAAhE,CACE,kBAAC,GAAD,EAAqB,IAAI,EAAE,OAAO,aAAa,EAAI,CAAA,GACnD,kBAAC,OAAD,EAAA,UAAK,uGAGA,CAAA,CACF;OAEL;EAED;EAAK;EACL,KACC,kBAAC,GAAD;GAAM,MAAM;GAAM,QAAQ;GAAU,KAAK;aAAc;EAEjD,CAAA;CAER,EAAA,CAAA;AAEN;AAwCA,SAAwB,EACtB,GACA;CACA,IAAM,EACJ,wBACA,gCACA,cACA,iBACA,sBACA,aACA,mBACA,sBACE,GACE,EAAE,uBAAoB,EAAkB,GACxC,EAAE,MAAM,MAAS,GAAyB,EAAE,SAAS,EAAgB,CAAC,GACtE,CAAC,GAAO,KAAY,EAAiC,GACrD,IAAgB,EAAQ,EAA4B,gBACpD,CAAC,GAAiB,KAAsB,EAE5C,GACI,CAAC,GAAc,KAAmB,EAA6B,GAC/D,CAAC,GAAa,KAAkB,EAA6B,GAC7D,CAAC,GAAQ,KAAa,EAAiB,EAAE,GACzC,CAAC,GAAS,KAAc,EA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C,GAAD,EAAS,IAAI,EAAE,IAAI,EAAE,EAAI,CAAA;KAE3B,EAAA,CAAA;KAKF,GAA6B,+BAC3B,kBAAA,GAAA,EAAA,UAAA;MACE,kBAAC,GAAD;OAAY,SAAS;OAAa,IAAI,EAAE,IAAI,EAAE;iBAAG;MAErC,CAAA;MACZ,kBAAC,GAAD;OACE,SAAS;OACT,IAAI;QAAE,GAAG;QAAkB,IAAI;OAAE;iBAClC;MAIW,CAAA;MACZ,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;OACE,IAAI;OACO;OACX,cAAc;OACd,iBAAgB,MAAO,EAAe,GAAK,aAAa;OACxD,mBAAmB;OACnB,wBAAwB;OACL;MACpB,CAAA,EACmB,CAAA;KACtB,EAAA,CAAA;IAkCH;;EACqC,CAAA,GAC3C,KAAS,kBAAC,IAAD;GAAO,UAAU,EAAM;aAAM,EAAM;EAAe,CAAA,CAC/C,EAAA,CAAA;EACf,kBAAC,IAAD,EAAA,UAAA;GACE,kBAAC,GAAD;IACE,SAAS;IACT,eAAe;KACb,GAAc;IAChB;cACD;GAEO,CAAA;GACR,kBAAC,GAAD,EAAK,IAAI,EAAE,UAAU,EAAE,EAAsB,CAAA;GAE7C,kBAAC,GAAD;IACE,SAAQ;IACR,UAAU;IACV,eAAe;KACb,AAAI,KAEF,EAAS,EAAmC,CAAC;IAEjD;cACD;GAEO,CAAA;GACR,kBAAC,GAAD;IACE,SAAQ;IACR,SAAS;IACT,UAAU;IACV,eAAe;KACb,GAAa;IACf;cAEC,IAAiB,aAAa;GACzB,CAAA;EACK,EAAA,CAAA;CACf,EAAA,CAAA;AAEN"}
@@ -0,0 +1,21 @@
1
+ import { ManagedACTAccessRequirement } from '@sage-bionetworks/synapse-types';
2
+ export type EDucPreviewStepProps = {
3
+ managedACTAccessRequirement: ManagedACTAccessRequirement;
4
+ onHide: () => void;
5
+ onBackClicked: () => void;
6
+ onSendForSignature: () => void;
7
+ onManualUpload: () => void;
8
+ /**
9
+ * Optional iframe `src` override for demos and stories. When set, the blob fetch is skipped
10
+ * and this URL is used directly as the iframe src. Production callers should not set this.
11
+ */
12
+ previewSrcOverride?: string;
13
+ };
14
+ /**
15
+ * Wizard step shown after the "Review / Create a DUC" step (PORTALS-4414).
16
+ * Displays the generated eDUC document in an iframe so the user can review it
17
+ * before sending it for electronic signature (PORTALS-4378) or manually printing and
18
+ * uploading a signed PDF (PORTALS-4379).
19
+ */
20
+ export default function EDucPreviewStep(props: EDucPreviewStepProps): import("react/jsx-runtime").JSX.Element;
21
+ //# sourceMappingURL=EDucPreviewStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EDucPreviewStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iCAAiC,CAAA;AAQxC,MAAM,MAAM,oBAAoB,GAAG;IACjC,2BAA2B,EAAE,2BAA2B,CAAA;IACxD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,cAAc,EAAE,MAAM,IAAI,CAAA;IAC1B;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B,CAAA;AAED;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,eAAe,CAAC,KAAK,EAAE,oBAAoB,2CAmKlE"}
@@ -0,0 +1,164 @@
1
+ import e from "../../../../synapse-client/index.js";
2
+ import { useGetDataAccessRequestForUpdate as t } from "../../../../synapse-queries/dataaccess/useAccessRequirements.js";
3
+ import { useGetDataAccessRequestPreview as n, useInitiateDataAccessRequestSignature as r } from "../../../../synapse-queries/dataaccess/useEDuc.js";
4
+ import "../../../../synapse-queries/index.js";
5
+ import i from "../../../IconSvg/IconSvg.js";
6
+ import { longFieldLabelSx as a } from "../styles.js";
7
+ import { useFetchBlobUrl as o } from "../../../../utils/hooks/useFetchBlobUrl.js";
8
+ import { Alert as s, Box as c, Button as l, DialogActions as u, DialogContent as d, DialogTitle as f, Divider as p, IconButton as m, Skeleton as h, Stack as g, Typography as _ } from "@mui/material";
9
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
10
+ import { FileHandleAssociateType as x } from "@sage-bionetworks/synapse-types";
11
+ //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx
12
+ var S = "500px";
13
+ function C(C) {
14
+ let { managedACTAccessRequirement: T, onHide: E, onBackClicked: D, onSendForSignature: O, onManualUpload: k, previewSrcOverride: A } = C, { data: j, isLoading: M } = t(String(T.id), {
15
+ staleTime: Infinity,
16
+ throwOnError: !0
17
+ }), { data: N, isLoading: P, error: F } = n(j?.id ?? "", { enabled: !!j?.id }), I = N?.fileHandleId, { blobUrl: L, error: R } = o(A || !I || !j?.id ? void 0 : e.getPortalFileHandleServletUrl(I, j.id, x.DataAccessRequestAttachment)), { mutate: z, isPending: B, error: V, reset: H } = r({ onSuccess: () => O() }), U = M || !!j?.id && P || !A && !!I && !L && !R, W = U || !A && !L || B, G = () => {
18
+ j?.id && (H(), z(j.id));
19
+ };
20
+ return /* @__PURE__ */ b(v, { children: [
21
+ /* @__PURE__ */ y(f, { children: /* @__PURE__ */ b(g, {
22
+ direction: "row",
23
+ sx: {
24
+ alignItems: "center",
25
+ gap: "5px"
26
+ },
27
+ children: [
28
+ "Request Access",
29
+ /* @__PURE__ */ y(c, { sx: { flexGrow: 1 } }),
30
+ /* @__PURE__ */ y(m, {
31
+ "aria-label": "Close",
32
+ onClick: E,
33
+ children: /* @__PURE__ */ y(i, {
34
+ icon: "close",
35
+ wrap: !1,
36
+ sx: { color: "grey.700" }
37
+ })
38
+ })
39
+ ]
40
+ }) }),
41
+ /* @__PURE__ */ b(d, { children: [
42
+ /* @__PURE__ */ y(_, {
43
+ variant: "body1",
44
+ sx: {
45
+ fontWeight: 700,
46
+ mb: 1
47
+ },
48
+ children: "Take a minute to preview your DUC"
49
+ }),
50
+ /* @__PURE__ */ y(_, {
51
+ variant: "body1",
52
+ sx: {
53
+ ...a,
54
+ mb: 2
55
+ },
56
+ children: "Please ensure that all information is correct, as incorrect information will result in the rejection of your access request. Use the Back button to return to previous steps and modify any details."
57
+ }),
58
+ U && /* @__PURE__ */ y(h, {
59
+ variant: "rectangular",
60
+ width: "100%",
61
+ height: S,
62
+ "data-testid": "EDucPreviewStep-loading"
63
+ }),
64
+ !U && (F || R) && /* @__PURE__ */ b(s, {
65
+ severity: "error",
66
+ children: [
67
+ /* @__PURE__ */ y("strong", { children: "Sorry, we couldn't load your DUC preview." }),
68
+ /* @__PURE__ */ y("br", {}),
69
+ F?.reason ?? R?.message
70
+ ]
71
+ }),
72
+ !U && !F && !R && (A || L) && /* @__PURE__ */ y("iframe", {
73
+ title: "eDUC preview",
74
+ src: A ?? L,
75
+ style: {
76
+ border: 0,
77
+ width: "100%",
78
+ height: S
79
+ }
80
+ }),
81
+ /* @__PURE__ */ b(c, {
82
+ sx: {
83
+ mt: 3,
84
+ border: "1px solid",
85
+ borderColor: "grey.300",
86
+ borderRadius: 1
87
+ },
88
+ children: [
89
+ /* @__PURE__ */ y(w, {
90
+ title: "Email DUC to Collaborators",
91
+ description: "Complete and sign the DUC online by emailing a secure DocuSign link to your listed collaborators. Notifications will be sent directly to the email address associated with their Synapse accounts. This is fastest way to get access.",
92
+ action: /* @__PURE__ */ y(l, {
93
+ variant: "contained",
94
+ disabled: W,
95
+ onClick: G,
96
+ children: B ? "Sending..." : "Send for electronic signature"
97
+ })
98
+ }),
99
+ /* @__PURE__ */ y(p, {}),
100
+ /* @__PURE__ */ y(w, {
101
+ title: "Print and upload a PDF instead",
102
+ description: "Download the DUC, sign it by hand, and upload the completed document.",
103
+ action: /* @__PURE__ */ y(l, {
104
+ variant: "outlined",
105
+ disabled: W,
106
+ onClick: k,
107
+ children: "Manually print and upload PDF"
108
+ })
109
+ })
110
+ ]
111
+ }),
112
+ V && /* @__PURE__ */ b(s, {
113
+ severity: "error",
114
+ sx: { mt: 2 },
115
+ children: [
116
+ /* @__PURE__ */ y("strong", { children: "Sorry, we couldn't send your DUC for electronic signature." }),
117
+ /* @__PURE__ */ y("br", {}),
118
+ V.reason
119
+ ]
120
+ })
121
+ ] }),
122
+ /* @__PURE__ */ y(u, { children: /* @__PURE__ */ y(l, {
123
+ variant: "outlined",
124
+ onClick: D,
125
+ children: "Back"
126
+ }) })
127
+ ] });
128
+ }
129
+ function w(e) {
130
+ let { title: t, description: n, action: r } = e;
131
+ return /* @__PURE__ */ b(g, {
132
+ direction: {
133
+ xs: "column",
134
+ sm: "row"
135
+ },
136
+ sx: {
137
+ alignItems: { sm: "center" },
138
+ gap: 2,
139
+ p: 2
140
+ },
141
+ children: [/* @__PURE__ */ b(c, {
142
+ sx: { flexGrow: 1 },
143
+ children: [/* @__PURE__ */ y(_, {
144
+ variant: "body1",
145
+ sx: {
146
+ fontWeight: 700,
147
+ mb: .5
148
+ },
149
+ children: t
150
+ }), /* @__PURE__ */ y(_, {
151
+ variant: "body1",
152
+ sx: a,
153
+ children: n
154
+ })]
155
+ }), /* @__PURE__ */ y(c, {
156
+ sx: { flexShrink: 0 },
157
+ children: r
158
+ })]
159
+ });
160
+ }
161
+ //#endregion
162
+ export { C as default };
163
+
164
+ //# sourceMappingURL=EDucPreviewStep.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EDucPreviewStep.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"sourcesContent":["import {\n useGetDataAccessRequestForUpdate,\n useGetDataAccessRequestPreview,\n useInitiateDataAccessRequestSignature,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport {\n Alert,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Skeleton,\n Stack,\n Typography,\n} from '@mui/material'\nimport {\n FileHandleAssociateType,\n ManagedACTAccessRequirement,\n} from '@sage-bionetworks/synapse-types'\nimport { ReactNode } from 'react'\nimport { useFetchBlobUrl } from '@/utils/hooks/useFetchBlobUrl'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport { longFieldLabelSx } from '../styles'\n\nconst PDF_PREVIEW_HEIGHT = '500px'\n\nexport type EDucPreviewStepProps = {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n onHide: () => void\n onBackClicked: () => void\n onSendForSignature: () => void\n onManualUpload: () => void\n /**\n * Optional iframe `src` override for demos and stories. When set, the blob fetch is skipped\n * and this URL is used directly as the iframe src. Production callers should not set this.\n */\n previewSrcOverride?: string\n}\n\n/**\n * Wizard step shown after the \"Review / Create a DUC\" step (PORTALS-4414).\n * Displays the generated eDUC document in an iframe so the user can review it\n * before sending it for electronic signature (PORTALS-4378) or manually printing and\n * uploading a signed PDF (PORTALS-4379).\n */\nexport default function EDucPreviewStep(props: EDucPreviewStepProps) {\n const {\n managedACTAccessRequirement,\n onHide,\n onBackClicked,\n onSendForSignature,\n onManualUpload,\n previewSrcOverride,\n } = props\n\n const { data: dataAccessRequest, isLoading: isLoadingDar } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n staleTime: Infinity,\n throwOnError: true,\n })\n\n const {\n data: previewFileHandle,\n isLoading: isLoadingPreview,\n error: previewError,\n } = useGetDataAccessRequestPreview(dataAccessRequest?.id ?? '', {\n enabled: Boolean(dataAccessRequest?.id),\n })\n\n const previewFileHandleId = previewFileHandle?.fileHandleId\n const { blobUrl, error: blobError } = useFetchBlobUrl(\n previewSrcOverride || !previewFileHandleId || !dataAccessRequest?.id\n ? undefined\n : SynapseClient.getPortalFileHandleServletUrl(\n previewFileHandleId,\n dataAccessRequest.id,\n FileHandleAssociateType.DataAccessRequestAttachment,\n ),\n )\n\n const {\n mutate: initiateSignature,\n isPending: isSendingForSignature,\n error: sendForSignatureError,\n reset: resetSendForSignature,\n } = useInitiateDataAccessRequestSignature({\n onSuccess: () => onSendForSignature(),\n })\n\n const isLoading =\n isLoadingDar ||\n (Boolean(dataAccessRequest?.id) && isLoadingPreview) ||\n (!previewSrcOverride && !!previewFileHandleId && !blobUrl && !blobError)\n const actionsDisabled =\n isLoading || (!previewSrcOverride && !blobUrl) || isSendingForSignature\n\n const handleSendForSignature = () => {\n if (!dataAccessRequest?.id) return\n resetSendForSignature()\n initiateSignature(dataAccessRequest.id)\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={'body1'} sx={{ fontWeight: 700, mb: 1 }}>\n Take a minute to preview your DUC\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n Please ensure that all information is correct, as incorrect\n information will result in the rejection of your access request. Use\n the Back button to return to previous steps and modify any details.\n </Typography>\n\n {isLoading && (\n <Skeleton\n variant={'rectangular'}\n width={'100%'}\n height={PDF_PREVIEW_HEIGHT}\n data-testid={'EDucPreviewStep-loading'}\n />\n )}\n {!isLoading && (previewError || blobError) && (\n <Alert severity={'error'}>\n <strong>Sorry, we couldn&apos;t load your DUC preview.</strong>\n <br />\n {previewError?.reason ?? blobError?.message}\n </Alert>\n )}\n {!isLoading &&\n !previewError &&\n !blobError &&\n (previewSrcOverride || blobUrl) && (\n <iframe\n title={'eDUC preview'}\n src={previewSrcOverride ?? blobUrl}\n style={{ border: 0, width: '100%', height: PDF_PREVIEW_HEIGHT }}\n />\n )}\n\n <Box\n sx={{\n mt: 3,\n border: '1px solid',\n borderColor: 'grey.300',\n borderRadius: 1,\n }}\n >\n <ActionRow\n title={'Email DUC to Collaborators'}\n description={\n 'Complete and sign the DUC online by emailing a secure DocuSign link to your listed collaborators. Notifications will be sent directly to the email address associated with their Synapse accounts. This is fastest way to get access.'\n }\n action={\n <Button\n variant={'contained'}\n disabled={actionsDisabled}\n onClick={handleSendForSignature}\n >\n {isSendingForSignature\n ? 'Sending...'\n : 'Send for electronic signature'}\n </Button>\n }\n />\n <Divider />\n <ActionRow\n title={'Print and upload a PDF instead'}\n description={\n 'Download the DUC, sign it by hand, and upload the completed document.'\n }\n action={\n <Button\n variant={'outlined'}\n disabled={actionsDisabled}\n onClick={onManualUpload}\n >\n Manually print and upload PDF\n </Button>\n }\n />\n </Box>\n {sendForSignatureError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>\n Sorry, we couldn&apos;t send your DUC for electronic signature.\n </strong>\n <br />\n {sendForSignatureError.reason}\n </Alert>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant={'outlined'} onClick={onBackClicked}>\n Back\n </Button>\n </DialogActions>\n </>\n )\n}\n\nfunction ActionRow(props: {\n title: string\n description: string\n action: ReactNode\n}) {\n const { title, description, action } = props\n return (\n <Stack\n direction={{ xs: 'column', sm: 'row' }}\n sx={{ alignItems: { sm: 'center' }, gap: 2, p: 2 }}\n >\n <Box sx={{ flexGrow: 1 }}>\n <Typography variant={'body1'} sx={{ fontWeight: 700, mb: 0.5 }}>\n {title}\n </Typography>\n <Typography variant={'body1'} sx={longFieldLabelSx}>\n {description}\n </Typography>\n </Box>\n <Box sx={{ flexShrink: 0 }}>{action}</Box>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAM,IAAqB;AAqB3B,SAAwB,EAAgB,GAA6B;CACnE,IAAM,EACJ,gCACA,WACA,kBACA,uBACA,mBACA,0BACE,GAEE,EAAE,MAAM,GAAmB,WAAW,MAC1C,EAAiC,OAAO,EAA4B,EAAE,GAAG;EACvE,WAAW;EACX,cAAc;CAChB,CAAC,GAEG,EACJ,MAAM,GACN,WAAW,GACX,OAA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,IAAI,EAAE,UAAU,EAAE;aAAvB,CACE,kBAAC,GAAD;IAAY,SAAS;IAAS,IAAI;KAAE,YAAY;KAAK,IAAI;IAAI;cAC1D;GACS,CAAA,GACZ,kBAAC,GAAD;IAAY,SAAS;IAAS,IAAI;cAC/B;GACS,CAAA,CACT;MACL,kBAAC,GAAD;GAAK,IAAI,EAAE,YAAY,EAAE;aAAI;EAAY,CAAA,CACpC;;AAEX"}
@@ -0,0 +1,22 @@
1
+ import { ManagedACTAccessRequirement, RestrictableObjectType } from '@sage-bionetworks/synapse-types';
2
+ export type ManualUploadDucStepProps = {
3
+ managedACTAccessRequirement: ManagedACTAccessRequirement;
4
+ subjectId: string;
5
+ subjectType: RestrictableObjectType;
6
+ onHide: () => void;
7
+ onBackClicked: () => void;
8
+ onSubmissionCreated: (submissionId: string) => void;
9
+ /**
10
+ * Optional href override for the "Download DUC for Signatures" anchor. When set, the preview
11
+ * file handle fetch is skipped and this URL is used directly. Used by stories and tests where
12
+ * the portal servlet is not available.
13
+ */
14
+ downloadHrefOverride?: string;
15
+ };
16
+ /**
17
+ * Wizard step shown after the eDUC preview (PORTALS-4377) when the user chooses to manually
18
+ * print, sign, and upload a PDF instead of using electronic signatures. Lets the user download
19
+ * the partially-populated DUC, upload a signed copy, and submit the request.
20
+ */
21
+ export default function ManualUploadDucStep(props: ManualUploadDucStepProps): import("react/jsx-runtime").JSX.Element;
22
+ //# sourceMappingURL=ManualUploadDucStep.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManualUploadDucStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAGL,2BAA2B,EAC3B,sBAAsB,EAEvB,MAAM,iCAAiC,CAAA;AAOxC,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,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD;;;;OAIG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;CAC9B,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,2CAgS1E"}