synapse-react-client 4.0.35 → 4.0.37
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.
- package/dist/SWC.index.js +1 -1
- package/dist/aridhia-queries/AridhiaKeyFactory.d.ts +24 -0
- package/dist/aridhia-queries/AridhiaKeyFactory.d.ts.map +1 -0
- package/dist/aridhia-queries/AridhiaKeyFactory.js +49 -0
- package/dist/aridhia-queries/AridhiaKeyFactory.js.map +1 -0
- package/dist/aridhia-queries/FairFormPayload.d.ts +45 -0
- package/dist/aridhia-queries/FairFormPayload.d.ts.map +1 -0
- package/dist/aridhia-queries/FairFormPayload.js +0 -0
- package/dist/aridhia-queries/TransferType.d.ts +10 -0
- package/dist/aridhia-queries/TransferType.d.ts.map +1 -0
- package/dist/aridhia-queries/TransferType.js +0 -0
- package/dist/aridhia-queries/aridhiaTokenExchange.js +6 -6
- package/dist/aridhia-queries/index.d.ts +12 -0
- package/dist/aridhia-queries/index.d.ts.map +1 -1
- package/dist/aridhia-queries/index.js +12 -2
- package/dist/aridhia-queries/useAridhiaQuery.d.ts +38 -0
- package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -0
- package/dist/aridhia-queries/useAridhiaQuery.js +78 -0
- package/dist/aridhia-queries/useAridhiaQuery.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.d.ts +6 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.js +13 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetCatalogue.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetSettings.d.ts +6 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetSettings.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetSettings.js +13 -0
- package/dist/aridhia-queries/useGetAridhiaDatasetSettings.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDictionaries.d.ts +6 -0
- package/dist/aridhia-queries/useGetAridhiaDictionaries.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaDictionaries.js +13 -0
- package/dist/aridhia-queries/useGetAridhiaDictionaries.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaRequests.d.ts +5 -4
- package/dist/aridhia-queries/useGetAridhiaRequests.d.ts.map +1 -1
- package/dist/aridhia-queries/useGetAridhiaRequests.js +11 -18
- package/dist/aridhia-queries/useGetAridhiaRequests.js.map +1 -1
- package/dist/aridhia-queries/useGetAridhiaWorkflow.d.ts +13 -0
- package/dist/aridhia-queries/useGetAridhiaWorkflow.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkflow.js +19 -0
- package/dist/aridhia-queries/useGetAridhiaWorkflow.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.d.ts +6 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.js +13 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceLocations.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.d.ts +19 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.js +17 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaceRequestForm.js.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaces.d.ts +6 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaces.d.ts.map +1 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaces.js +19 -0
- package/dist/aridhia-queries/useGetAridhiaWorkspaces.js.map +1 -0
- package/dist/aridhia-queries/useSubmitAridhiaDar.d.ts +27 -0
- package/dist/aridhia-queries/useSubmitAridhiaDar.d.ts.map +1 -0
- package/dist/aridhia-queries/useSubmitAridhiaDar.js +38 -0
- package/dist/aridhia-queries/useSubmitAridhiaDar.js.map +1 -0
- package/dist/assets/icons/emailWithNotification.js +15 -15
- package/dist/assets/icons/emailWithNotification.js.map +1 -1
- package/dist/assets/icons/emailWithNotification.svg +13 -13
- package/dist/components/AccessRequirement/EntityActionsRequired.d.ts +0 -1
- package/dist/components/AccessRequirement/EntityActionsRequired.d.ts.map +1 -1
- package/dist/components/AccessRequirement/EntityActionsRequired.js +3 -6
- package/dist/components/AccessRequirement/EntityActionsRequired.js.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/AccessRequirementList.js +65 -57
- package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +67 -57
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -1
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +33 -32
- package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
- package/dist/components/Aridhia/AridhiaAccessStatus.js +39 -18
- package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts +32 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js +285 -0
- package/dist/components/Aridhia/DarWizard/AridhiaDarWizard.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.d.ts +4 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.js +17 -0
- package/dist/components/Aridhia/DarWizard/DarAboutStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.d.ts +27 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.js +96 -0
- package/dist/components/Aridhia/DarWizard/DarCompleteStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.d.ts +28 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.js +128 -0
- package/dist/components/Aridhia/DarWizard/DarDestinationStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.d.ts +4 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.js +17 -0
- package/dist/components/Aridhia/DarWizard/DarProjectStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts +13 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js +23 -0
- package/dist/components/Aridhia/DarWizard/DarSectionForm.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts +11 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js +47 -0
- package/dist/components/Aridhia/DarWizard/DarSubmittedPanel.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.d.ts +16 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.js +33 -0
- package/dist/components/Aridhia/DarWizard/DarWorkspaceStep.js.map +1 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.d.ts +32 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.d.ts.map +1 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.js +44 -0
- package/dist/components/Aridhia/DarWizard/useDarDraft.js.map +1 -0
- package/dist/components/Aridhia/FairLabelField.d.ts +8 -0
- package/dist/components/Aridhia/FairLabelField.d.ts.map +1 -0
- package/dist/components/Aridhia/FairLabelField.js +13 -0
- package/dist/components/Aridhia/FairLabelField.js.map +1 -0
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts +3 -3
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts.map +1 -1
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +1 -1
- package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
- package/dist/components/Aridhia/fairFormToRjsf.d.ts +36 -0
- package/dist/components/Aridhia/fairFormToRjsf.d.ts.map +1 -0
- package/dist/components/Aridhia/fairFormToRjsf.js +137 -0
- package/dist/components/Aridhia/fairFormToRjsf.js.map +1 -0
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.d.ts.map +1 -1
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js +2 -2
- package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js.map +1 -1
- package/dist/components/CardContainer/CardConfiguration.d.ts +8 -0
- package/dist/components/CardContainer/CardConfiguration.d.ts.map +1 -1
- package/dist/components/CardContainer/CardContainer.d.ts.map +1 -1
- package/dist/components/CardContainer/CardContainer.js +1 -1
- package/dist/components/CardContainer/CardContainer.js.map +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmission.d.ts.map +1 -1
- package/dist/components/ChallengeSubmission/ChallengeSubmission.js +2 -2
- package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.d.ts.map +1 -1
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js +3 -3
- package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js.map +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +1 -1
- package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
- package/dist/components/ChangePassword/ChangePasswordWithToken.d.ts.map +1 -1
- package/dist/components/ChangePassword/ChangePasswordWithToken.js +58 -23
- package/dist/components/ChangePassword/ChangePasswordWithToken.js.map +1 -1
- package/dist/components/ChangePassword/useChangePasswordFormState.d.ts.map +1 -1
- package/dist/components/ChangePassword/useChangePasswordFormState.js +13 -3
- package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
- package/dist/components/CreateTableViewWizard/CreateTableViewWizard.js +2 -2
- package/dist/components/CreateTableViewWizard/CreateTableViewWizard.js.map +1 -1
- package/dist/components/CreateTableViewWizard/TableNameForm.d.ts.map +1 -1
- package/dist/components/CreateTableViewWizard/TableNameForm.js +11 -14
- package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
- package/dist/components/DataGrid/SynapseGrid.js +121 -117
- package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.d.ts.map +1 -1
- package/dist/components/DataGrid/SyncGridWithSourceButton.js +55 -61
- package/dist/components/DataGrid/SyncGridWithSourceButton.js.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts +21 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.d.ts.map +1 -1
- package/dist/components/DataGrid/columns/DateTimeColumn.js +73 -29
- package/dist/components/DataGrid/columns/DateTimeColumn.js.map +1 -1
- package/dist/components/DataGrid/columns/NumberColumn.d.ts +31 -0
- package/dist/components/DataGrid/columns/NumberColumn.d.ts.map +1 -0
- package/dist/components/DataGrid/columns/NumberColumn.js +27 -0
- package/dist/components/DataGrid/columns/NumberColumn.js.map +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts +1 -0
- package/dist/components/DataGrid/components/ReorderColumnsButton.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsButton.js +17 -16
- package/dist/components/DataGrid/components/ReorderColumnsButton.js.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts +2 -0
- package/dist/components/DataGrid/components/ReorderColumnsDialog.d.ts.map +1 -1
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js +104 -65
- package/dist/components/DataGrid/components/ReorderColumnsDialog.js.map +1 -1
- package/dist/components/DataGrid/components/contextMenu.d.ts.map +1 -1
- package/dist/components/DataGrid/components/contextMenu.js +15 -15
- package/dist/components/DataGrid/components/contextMenu.js.map +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js +1 -1
- package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
- package/dist/components/DataGrid/useMergeGridWithSource.d.ts +1 -5
- package/dist/components/DataGrid/useMergeGridWithSource.d.ts.map +1 -1
- package/dist/components/DataGrid/useMergeGridWithSource.js +21 -28
- package/dist/components/DataGrid/useMergeGridWithSource.js.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/columnFactory.js +55 -51
- package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.d.ts.map +1 -1
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js +9 -8
- package/dist/components/DataGrid/utils/computeDefaultColumnOrder.js.map +1 -1
- package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts +40 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.js +124 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.js.map +1 -0
- package/dist/components/DatasetHosting/DatasetHosting.d.ts +97 -0
- package/dist/components/DatasetHosting/DatasetHosting.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetHosting.js +64 -0
- package/dist/components/DatasetHosting/DatasetHosting.js.map +1 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.d.ts +15 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.js +23 -0
- package/dist/components/DatasetHosting/DatasetHostingAdornment.js.map +1 -0
- package/dist/components/DatasetHosting/index.d.ts +7 -0
- package/dist/components/DatasetHosting/index.d.ts.map +1 -0
- package/dist/components/DatasetHosting/index.js +4 -0
- package/dist/components/DownloadCart/ActionRequiredListItem.d.ts +0 -2
- package/dist/components/DownloadCart/ActionRequiredListItem.d.ts.map +1 -1
- package/dist/components/DownloadCart/ActionRequiredListItem.js +2 -3
- package/dist/components/DownloadCart/ActionRequiredListItem.js.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.d.ts +1 -2
- package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadCartPage.js +49 -49
- package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
- package/dist/components/DownloadCart/DownloadListActionsRequired.d.ts +1 -5
- package/dist/components/DownloadCart/DownloadListActionsRequired.d.ts.map +1 -1
- package/dist/components/DownloadCart/DownloadListActionsRequired.js +5 -6
- package/dist/components/DownloadCart/DownloadListActionsRequired.js.map +1 -1
- package/dist/components/DownloadCart/RequestDownloadCard.d.ts +0 -2
- package/dist/components/DownloadCart/RequestDownloadCard.d.ts.map +1 -1
- package/dist/components/DownloadCart/RequestDownloadCard.js +28 -32
- package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
- package/dist/components/DownloadCart/TableQueryActionsRequired.d.ts +0 -2
- package/dist/components/DownloadCart/TableQueryActionsRequired.d.ts.map +1 -1
- package/dist/components/DownloadCart/TableQueryActionsRequired.js +7 -8
- package/dist/components/DownloadCart/TableQueryActionsRequired.js.map +1 -1
- package/dist/components/DownloadCart/index.d.ts +1 -2
- package/dist/components/DownloadCart/index.d.ts.map +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.d.ts.map +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js +1 -1
- package/dist/components/DropdownSelect/DropdownSelect.js.map +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.d.ts.map +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.js +1 -1
- package/dist/components/EntityFinder/tree/EntityTree.js.map +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.js +1 -1
- package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +1 -1
- package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
- package/dist/components/GenericCard/CardActionButtonStyleContext.d.ts +10 -0
- package/dist/components/GenericCard/CardActionButtonStyleContext.d.ts.map +1 -0
- package/dist/components/GenericCard/CardActionButtonStyleContext.js +10 -0
- package/dist/components/GenericCard/CardActionButtonStyleContext.js.map +1 -0
- package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +41 -41
- package/dist/components/GenericCard/GenericCardActionButton.d.ts +5 -0
- package/dist/components/GenericCard/GenericCardActionButton.d.ts.map +1 -1
- package/dist/components/GenericCard/GenericCardActionButton.js +28 -11
- package/dist/components/GenericCard/GenericCardActionButton.js.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.d.ts +24 -0
- package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
- package/dist/components/GenericCard/TableRowGenericCard.js +158 -137
- package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
- package/dist/components/JSONArrayEditor/JSONArrayEditor.d.ts.map +1 -1
- package/dist/components/JSONArrayEditor/JSONArrayEditor.js +42 -42
- package/dist/components/JSONArrayEditor/JSONArrayEditor.js.map +1 -1
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts +9 -0
- package/dist/components/JsonSchemaForm/CustomFormContext.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.css +1 -0
- package/dist/components/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.js +15 -13
- package/dist/components/JsonSchemaForm/JsonSchemaForm.js.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js +5 -0
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.js.map +1 -0
- package/dist/components/JsonSchemaForm/JsonSchemaForm.module.scss +109 -0
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.js +1 -1
- package/dist/components/JsonSchemaForm/templates/ArrayFieldTemplate.js.map +1 -1
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.js +6 -6
- package/dist/components/JsonSchemaForm/templates/FieldTemplate.js.map +1 -1
- package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts +9 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.d.ts.map +1 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.js +23 -0
- package/dist/components/JsonSchemaForm/widgets/DateWidget.js.map +1 -0
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.css +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts +3 -2
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.d.ts.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js +10 -12
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.js +8 -7
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.js.map +1 -1
- package/dist/components/MailchimpSubscribeSection/MailchimpSubscribeSection.module.scss +12 -2
- package/dist/components/Markdown/MarkdownEditor.js +1 -1
- package/dist/components/Markdown/MarkdownEditor.js.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js +46 -46
- package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
- package/dist/components/QueryBuilder/QueryBuilderTypes.d.ts +39 -0
- package/dist/components/QueryBuilder/QueryBuilderTypes.d.ts.map +1 -0
- package/dist/components/QueryBuilder/QueryBuilderTypes.js +11 -0
- package/dist/components/QueryBuilder/QueryBuilderTypes.js.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +48 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.js +256 -0
- package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -0
- package/dist/components/QueryContext/QueryContext.d.ts +0 -1
- package/dist/components/QueryContext/QueryContext.d.ts.map +1 -1
- package/dist/components/QueryContext/QueryContext.js.map +1 -1
- package/dist/components/QueryWrapper/QueryWrapper.d.ts +0 -1
- package/dist/components/QueryWrapper/QueryWrapper.d.ts.map +1 -1
- package/dist/components/QueryWrapper/QueryWrapper.js +52 -53
- package/dist/components/QueryWrapper/QueryWrapper.js.map +1 -1
- package/dist/components/QueryWrapperErrorBoundary.d.ts.map +1 -1
- package/dist/components/QueryWrapperErrorBoundary.js +4 -11
- package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.js +1 -1
- package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.js.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +1 -2
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +27 -25
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.d.ts +0 -9
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js +23 -31
- package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js +126 -125
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.d.ts.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.js +6 -5
- package/dist/components/SchemaDrivenAnnotationEditor/field/SynapseAnnotationsRJSFObjectField.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +2 -0
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +18 -13
- package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.d.ts.map +1 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js +0 -1
- package/dist/components/SearchQueryWrapper/SearchQueryWrapper.js.map +1 -1
- package/dist/components/ShareThisPage/ShareThisPage.js +30 -29
- package/dist/components/ShareThisPage/ShareThisPage.js.map +1 -1
- package/dist/components/StatisticsPlot.d.ts.map +1 -1
- package/dist/components/StatisticsPlot.js +1 -1
- package/dist/components/StatisticsPlot.js.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
- package/dist/components/SynapseChat/GridAgentChat.js +29 -31
- package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
- package/dist/components/SynapseForm/SynapseFormWrapper.js +1 -1
- package/dist/components/SynapseForm/SynapseFormWrapper.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.css +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js +9 -9
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.js.map +1 -1
- package/dist/components/SynapseHomepageV2/HotdropsAndNews.module.scss +14 -0
- package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js +1 -1
- package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js.map +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPage.js +1 -1
- package/dist/components/SynapseSearchPageResults/SynapseSearchPage.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTable.js +2 -1
- package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js +1 -1
- package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts +4 -0
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +71 -69
- package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
- package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.d.ts.map +1 -1
- package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js +29 -30
- package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js.map +1 -1
- package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts +4 -0
- package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts.map +1 -1
- package/dist/components/SynapseTable/table-top/DownloadOptions.js +14 -13
- package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js +1 -1
- package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js +4 -4
- package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js.map +1 -1
- package/dist/components/TanStackTable/StyledTanStackTable.d.ts +7 -0
- package/dist/components/TanStackTable/StyledTanStackTable.d.ts.map +1 -1
- package/dist/components/TanStackTable/StyledTanStackTable.js +68 -48
- package/dist/components/TanStackTable/StyledTanStackTable.js.map +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.d.ts.map +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.js +1 -1
- package/dist/components/TanStackTable/TableCellRenderer.js.map +1 -1
- package/dist/components/TanStackTable/useSyncedTopScrollbar.d.ts +13 -0
- package/dist/components/TanStackTable/useSyncedTopScrollbar.d.ts.map +1 -0
- package/dist/components/TanStackTable/useSyncedTopScrollbar.js +32 -0
- package/dist/components/TanStackTable/useSyncedTopScrollbar.js.map +1 -0
- package/dist/components/TermsAndConditions/TermsAndConditions.js +1 -1
- package/dist/components/TermsAndConditions/TermsAndConditions.js.map +1 -1
- package/dist/components/Webhook/CreateWebhookModal.d.ts.map +1 -1
- package/dist/components/Webhook/CreateWebhookModal.js +1 -1
- package/dist/components/Webhook/CreateWebhookModal.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +172 -61
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.d.ts +3 -0
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/RouteConstants.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +11 -9
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js +74 -43
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPlace.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js +2 -2
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.d.ts.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +15 -18
- package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
- package/dist/components/entity/metadata/EntityModal.js +1 -1
- package/dist/components/entity/metadata/EntityModal.js.map +1 -1
- package/dist/components/entity/page/action_menu/EntityActionMenu.js +2 -2
- package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +144 -140
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +7 -7
- package/dist/components/menu/DropdownMenu.js.map +1 -1
- package/dist/components/row_renderers/Dataset.js +1 -1
- package/dist/components/row_renderers/Dataset.js.map +1 -1
- package/dist/components/styled/LeftRightPanel.d.ts +8 -0
- package/dist/components/styled/LeftRightPanel.d.ts.map +1 -1
- package/dist/components/styled/LeftRightPanel.js +10 -1
- package/dist/components/styled/LeftRightPanel.js.map +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js +1 -1
- package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +1 -1
- package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js +1 -1
- package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +1 -1
- package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +5 -5
- package/dist/index.js +174 -171
- package/dist/index.js.map +1 -1
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +73 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.js +119 -0
- package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -0
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +31 -27
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/entityHandlers.js +4 -4
- package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.d.ts +1 -0
- package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.js +7 -1
- package/dist/mocks/msw/handlers/resetTwoFactorAuthHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/userProfileHandlers.js +6 -2
- package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
- package/dist/mocks/msw/handlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers.js +72 -69
- package/dist/mocks/msw/handlers.js.map +1 -1
- package/dist/style/components/_all.scss +0 -1
- package/dist/style/components/_cards.scss +4 -2
- package/dist/style/components/_terms-and-conditions.scss +25 -3
- package/dist/style/main.css +1 -1
- package/dist/synapse-queries/KeyFactory.d.ts +1 -0
- package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
- package/dist/synapse-queries/KeyFactory.js +3 -0
- package/dist/synapse-queries/KeyFactory.js.map +1 -1
- package/dist/synapse-queries/dataaccess/index.js +4 -4
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts +7 -0
- package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -1
- package/dist/synapse-queries/dataaccess/useEDuc.js +11 -3
- package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
- package/dist/synapse-queries/index.js +190 -189
- package/dist/testutils/RjsfFormTestUtils.js +12 -0
- package/dist/testutils/RjsfFormTestUtils.js.map +1 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/utils/APIConstants.d.ts +1 -0
- package/dist/utils/APIConstants.d.ts.map +1 -1
- package/dist/utils/APIConstants.js +2 -2
- package/dist/utils/APIConstants.js.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.d.ts +2 -4
- package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
- package/dist/utils/featureflag/FeatureFlags.js +1 -1
- package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
- package/dist/utils/functions/QueryFilterUtils.js +1 -1
- package/dist/utils/functions/QueryFilterUtils.js.map +1 -1
- package/dist/utils/functions/RegularExpressions.d.ts +10 -0
- package/dist/utils/functions/RegularExpressions.d.ts.map +1 -1
- package/dist/utils/functions/RegularExpressions.js +7 -1
- package/dist/utils/functions/RegularExpressions.js.map +1 -1
- package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
- package/dist/utils/functions/SqlFunctions.js +20 -4
- package/dist/utils/functions/SqlFunctions.js.map +1 -1
- package/dist/utils/functions/queryUtils.js +1 -1
- package/dist/utils/functions/queryUtils.js.map +1 -1
- package/dist/utils/hooks/useDetectSSOCode.d.ts.map +1 -1
- package/dist/utils/hooks/useDetectSSOCode.js +1 -1
- package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
- package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js +1 -1
- package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js.map +1 -1
- package/dist/utils/index.js +16 -16
- package/dist/utils/jsonschema/SchemaAnnotationUtils.js +1 -1
- package/dist/utils/jsonschema/SchemaAnnotationUtils.js.map +1 -1
- package/dist/utils/jsonschema/collectTopLevelProperties.d.ts +22 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.d.ts.map +1 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.js +31 -0
- package/dist/utils/jsonschema/collectTopLevelProperties.js.map +1 -0
- package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts.map +1 -1
- package/dist/utils/jsonschema/getSchemaPropertyInfo.js +1 -1
- package/dist/utils/jsonschema/getSchemaPropertyInfo.js.map +1 -1
- package/dist/utils/types/IsType.d.ts +4 -1
- package/dist/utils/types/IsType.d.ts.map +1 -1
- package/dist/utils/types/IsType.js +4 -4
- package/dist/utils/types/IsType.js.map +1 -1
- package/dist/utils/types/index.js +2 -2
- package/package.json +5 -5
- package/dist/components/DataGrid/useMergeGridWithRecordSet.d.ts +0 -12
- package/dist/components/DataGrid/useMergeGridWithRecordSet.d.ts.map +0 -1
- package/dist/components/DataGrid/useMergeGridWithRecordSet.js +0 -25
- package/dist/components/DataGrid/useMergeGridWithRecordSet.js.map +0 -1
- package/dist/style/components/_annotations.scss +0 -110
|
@@ -1,27 +1,29 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { displayToast as e } from "../ToastMessage/ToastMessage.js";
|
|
2
|
+
import { BackendDestinationEnum as t, getEndpoint as n } from "../../utils/functions/getEndpoint.js";
|
|
3
|
+
import { storeRedirectURLForOneSageLoginAndGotoURL as r } from "../../utils/AppUtils/AppUtils.js";
|
|
4
|
+
import { useSynapseContext as i } from "../../utils/context/SynapseContext.js";
|
|
5
|
+
import { useOneSageURL as a } from "../../utils/hooks/useOneSageURL.js";
|
|
4
6
|
import "../../utils/hooks/index.js";
|
|
5
7
|
import "../../utils/index.js";
|
|
6
|
-
import { useCanShowManagedACTWikiInWizard as
|
|
7
|
-
import { useGetAccessRequirementsForEntity as
|
|
8
|
+
import { useCanShowManagedACTWikiInWizard as ee } from "./AccessRequirementListUtils.js";
|
|
9
|
+
import { useGetAccessRequirementsForEntity as te, useGetAccessRequirementsForTeam as o, useSortAccessRequirementIdsByCompletion as s } from "../../synapse-queries/dataaccess/useAccessRequirements.js";
|
|
8
10
|
import "../../synapse-queries/index.js";
|
|
9
|
-
import { DialogBaseTitle as
|
|
10
|
-
import
|
|
11
|
-
import { EntityLink as
|
|
12
|
-
import
|
|
13
|
-
import { AccessRequirementListItem as
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
11
|
+
import { DialogBaseTitle as c } from "../DialogBase.js";
|
|
12
|
+
import l from "../IconSvg/IconSvg.js";
|
|
13
|
+
import { EntityLink as u } from "../EntityLink.js";
|
|
14
|
+
import d from "../UserOrTeamBadge/index.js";
|
|
15
|
+
import { AccessRequirementListItem as ne } from "./AccessRequirementListItem.js";
|
|
16
|
+
import re from "./ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js";
|
|
17
|
+
import ie from "./ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js";
|
|
18
|
+
import ae from "./ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js";
|
|
19
|
+
import oe from "./ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js";
|
|
20
|
+
import se from "./ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js";
|
|
21
|
+
import ce from "./ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js";
|
|
22
|
+
import le from "./ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js";
|
|
23
|
+
import f from "./ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js";
|
|
24
|
+
import p from "./RequirementItem/AuthenticatedRequirement.js";
|
|
25
|
+
import m from "./RequirementItem/CertificationRequirement.js";
|
|
26
|
+
import ue from "./RequirementItem/TwoFactorAuthEnabledRequirement.js";
|
|
25
27
|
import h from "./RequirementItem/ValidationRequirement.js";
|
|
26
28
|
import { useMemo as g, useState as _ } from "react";
|
|
27
29
|
import { Button as v, Dialog as y, DialogActions as b, DialogContent as x, Typography as S, styled as C } from "@mui/material";
|
|
@@ -48,22 +50,22 @@ var F = [
|
|
|
48
50
|
return e[e.SHOW_ALL_ARS = 0] = "SHOW_ALL_ARS", e[e.UPDATE_RESEARCH_PROJECT = 1] = "UPDATE_RESEARCH_PROJECT", e[e.UPDATE_ACCESSORS_AND_FILES = 2] = "UPDATE_ACCESSORS_AND_FILES", e[e.PROMPT_CANCEL = 3] = "PROMPT_CANCEL", e[e.PROMPT_LOGIN = 4] = "PROMPT_LOGIN", e[e.COMPLETE = 5] = "COMPLETE", e[e.REVIEW_DUC = 6] = "REVIEW_DUC", e[e.EDUC_PREVIEW = 7] = "EDUC_PREVIEW", e[e.MANUAL_UPLOAD_DUC = 8] = "MANUAL_UPLOAD_DUC", e[e.SIGNATURE_STATUS = 9] = "SIGNATURE_STATUS", e;
|
|
49
51
|
}({});
|
|
50
52
|
function V(C) {
|
|
51
|
-
let { onHide: D = N, renderAsModal: O = !1, numberOfFilesAffected: M, requestObjectName: I, customDialogActions: R, onSubmissionCreated: z = N, initialWizardEntry: B } = C, V = "entityId" in C, H = "teamId" in C, U = "accessRequirementFromProps" in C, W = "subjectId" in C ? C.subjectId : V ? C.entityId : H ? C.teamId : void 0, G = "subjectType" in C ? C.subjectType : V ? A.ENTITY : H ? A.TEAM : void 0, { dialogTitle: K = "Data Access Request" } = C, { isAuthenticated:
|
|
52
|
-
enabled: !!
|
|
53
|
+
let { onHide: D = N, renderAsModal: O = !1, numberOfFilesAffected: M, requestObjectName: I, customDialogActions: R, onSubmissionCreated: z = N, initialWizardEntry: B } = C, V = "entityId" in C, H = "teamId" in C, U = "accessRequirementFromProps" in C, W = "subjectId" in C ? C.subjectId : V ? C.entityId : H ? C.teamId : void 0, G = "subjectType" in C ? C.subjectType : V ? A.ENTITY : H ? A.TEAM : void 0, { dialogTitle: K = "Data Access Request" } = C, { isAuthenticated: de } = i(), [q, fe] = _(B?.step ?? 0), pe = a(), [J, me] = _(B?.managedACTAccessRequirement), [he, ge] = _(""), [_e, ve] = _(), ye = ee(), { data: Y } = o(W, { enabled: W !== void 0 && G === A.TEAM }), { data: be } = te(W, { enabled: W !== void 0 && G === A.ENTITY }), X = (U ? C.accessRequirementFromProps : void 0) ?? be ?? Y, { data: Z } = s((X ?? []).map((e) => String(e.id)), {
|
|
54
|
+
enabled: !!X,
|
|
53
55
|
staleTime: Infinity
|
|
54
|
-
}),
|
|
55
|
-
if (
|
|
56
|
-
let e = P(
|
|
56
|
+
}), xe = g(() => {
|
|
57
|
+
if (X && Z) {
|
|
58
|
+
let e = P(X, "concreteType");
|
|
57
59
|
return F.map((t) => {
|
|
58
60
|
let n = e[t];
|
|
59
|
-
return n ?
|
|
61
|
+
return n ? Z.map((e) => n.find((t) => e === String(t.id))) : [];
|
|
60
62
|
}).flat().filter((e) => e !== void 0);
|
|
61
63
|
}
|
|
62
|
-
}, [
|
|
64
|
+
}, [X, Z]), Q = (e) => {
|
|
63
65
|
let { managedACTAccessRequirement: t, step: n, researchProjectId: r, dataAccessRequest: i } = e;
|
|
64
|
-
t &&
|
|
65
|
-
},
|
|
66
|
-
/* @__PURE__ */ T(
|
|
66
|
+
t && me(t), r && ge(r), i && ve(i), fe(n);
|
|
67
|
+
}, Se = X?.some((e) => e.concreteType === k && e.isTwoFaRequired), Ce = X?.some((e) => (e.concreteType === k || e.concreteType === j) && e.isCertifiedUserRequired), we = X?.some((e) => (e.concreteType === k || e.concreteType === j) && e.isValidatedProfileRequired), Te = g(() => I || (M ? /* @__PURE__ */ E(w, { children: [
|
|
68
|
+
/* @__PURE__ */ T(l, {
|
|
67
69
|
icon: "file",
|
|
68
70
|
sx: { width: "30px" }
|
|
69
71
|
}),
|
|
@@ -71,20 +73,20 @@ function V(C) {
|
|
|
71
73
|
M,
|
|
72
74
|
" ",
|
|
73
75
|
"File(s)"
|
|
74
|
-
] }) : W !== void 0 && G === A.ENTITY ? /* @__PURE__ */ T(
|
|
76
|
+
] }) : W !== void 0 && G === A.ENTITY ? /* @__PURE__ */ T(u, { entity: W }) : G === A.TEAM ? /* @__PURE__ */ T(d, { principalId: W }) : (console.warn(`Unhandled case for AccessRequirementList requestDetails: ${G}: ${W}`), /* @__PURE__ */ T(w, {}))), [
|
|
75
77
|
M,
|
|
76
78
|
I,
|
|
77
79
|
W,
|
|
78
80
|
G
|
|
79
|
-
]),
|
|
81
|
+
]), Ee = [
|
|
80
82
|
2,
|
|
81
83
|
1,
|
|
82
84
|
6,
|
|
83
85
|
7
|
|
84
|
-
].includes(q) &&
|
|
86
|
+
].includes(q) && ye ? "xl" : "md", $ = /* @__PURE__ */ T(w, {});
|
|
85
87
|
switch (q) {
|
|
86
88
|
case 1:
|
|
87
|
-
$ = /* @__PURE__ */ T(
|
|
89
|
+
$ = /* @__PURE__ */ T(oe, {
|
|
88
90
|
managedACTAccessRequirement: J,
|
|
89
91
|
onSave: (e) => {
|
|
90
92
|
Q({
|
|
@@ -97,8 +99,8 @@ function V(C) {
|
|
|
97
99
|
});
|
|
98
100
|
break;
|
|
99
101
|
case 2:
|
|
100
|
-
$ = /* @__PURE__ */ T(
|
|
101
|
-
researchProjectId:
|
|
102
|
+
$ = /* @__PURE__ */ T(ie, {
|
|
103
|
+
researchProjectId: he,
|
|
102
104
|
managedACTAccessRequirement: J,
|
|
103
105
|
subjectId: W ?? "",
|
|
104
106
|
subjectType: G ?? A.ENTITY,
|
|
@@ -121,7 +123,7 @@ function V(C) {
|
|
|
121
123
|
});
|
|
122
124
|
break;
|
|
123
125
|
case 6:
|
|
124
|
-
$ = /* @__PURE__ */ T(
|
|
126
|
+
$ = /* @__PURE__ */ T(se, {
|
|
125
127
|
managedACTAccessRequirement: J,
|
|
126
128
|
onHide: D,
|
|
127
129
|
onBackClicked: () => {
|
|
@@ -133,14 +135,20 @@ function V(C) {
|
|
|
133
135
|
});
|
|
134
136
|
break;
|
|
135
137
|
case 7:
|
|
136
|
-
$ = /* @__PURE__ */ T(
|
|
138
|
+
$ = /* @__PURE__ */ T(ce, {
|
|
137
139
|
managedACTAccessRequirement: J,
|
|
138
140
|
onHide: D,
|
|
139
141
|
onBackClicked: () => {
|
|
140
142
|
Q({ step: 6 });
|
|
141
143
|
},
|
|
142
144
|
onSendForSignature: () => {
|
|
143
|
-
|
|
145
|
+
e("Your DUC has been emailed to your collaborators. You can check signature progress in your access request history.", "info", {
|
|
146
|
+
primaryButtonConfig: {
|
|
147
|
+
text: "View Request History",
|
|
148
|
+
href: `${n(t.PORTAL_ENDPOINT)}RequestHistory:default`
|
|
149
|
+
},
|
|
150
|
+
dismissOnPrimaryButtonClick: !0
|
|
151
|
+
}), D();
|
|
144
152
|
},
|
|
145
153
|
onManualUpload: () => {
|
|
146
154
|
Q({ step: 8 });
|
|
@@ -148,7 +156,7 @@ function V(C) {
|
|
|
148
156
|
});
|
|
149
157
|
break;
|
|
150
158
|
case 8:
|
|
151
|
-
$ = /* @__PURE__ */ T(
|
|
159
|
+
$ = /* @__PURE__ */ T(le, {
|
|
152
160
|
managedACTAccessRequirement: J,
|
|
153
161
|
subjectId: W ?? "",
|
|
154
162
|
subjectType: G ?? A.ENTITY,
|
|
@@ -162,13 +170,13 @@ function V(C) {
|
|
|
162
170
|
});
|
|
163
171
|
break;
|
|
164
172
|
case 9:
|
|
165
|
-
$ = /* @__PURE__ */ T(
|
|
173
|
+
$ = /* @__PURE__ */ T(f, {
|
|
166
174
|
managedACTAccessRequirement: J,
|
|
167
175
|
subjectId: W ?? "",
|
|
168
176
|
subjectType: G ?? A.ENTITY,
|
|
169
177
|
onHide: D,
|
|
170
|
-
onBackClicked:
|
|
171
|
-
Q({ step:
|
|
178
|
+
onBackClicked: () => {
|
|
179
|
+
Q({ step: 1 });
|
|
172
180
|
},
|
|
173
181
|
onSubmissionCreated: (e) => {
|
|
174
182
|
Q({ step: 5 }), z(e);
|
|
@@ -176,19 +184,19 @@ function V(C) {
|
|
|
176
184
|
});
|
|
177
185
|
break;
|
|
178
186
|
case 3:
|
|
179
|
-
$ = /* @__PURE__ */ T(
|
|
180
|
-
modifiedDataAccessRequest:
|
|
187
|
+
$ = /* @__PURE__ */ T(re, {
|
|
188
|
+
modifiedDataAccessRequest: _e,
|
|
181
189
|
onHide: D
|
|
182
190
|
});
|
|
183
191
|
break;
|
|
184
192
|
case 4:
|
|
185
|
-
|
|
193
|
+
r(pe.toString()), K = "Please Log In", $ = /* @__PURE__ */ T(w, {});
|
|
186
194
|
break;
|
|
187
195
|
case 5:
|
|
188
|
-
$ = /* @__PURE__ */ T(
|
|
196
|
+
$ = /* @__PURE__ */ T(ae, { onHide: D });
|
|
189
197
|
break;
|
|
190
198
|
default: $ = /* @__PURE__ */ E(w, { children: [
|
|
191
|
-
O ? /* @__PURE__ */ T(
|
|
199
|
+
O ? /* @__PURE__ */ T(c, {
|
|
192
200
|
title: K,
|
|
193
201
|
onCancel: D
|
|
194
202
|
}) : /* @__PURE__ */ T(S, {
|
|
@@ -205,17 +213,17 @@ function V(C) {
|
|
|
205
213
|
/* @__PURE__ */ T(S, {
|
|
206
214
|
variant: "body1",
|
|
207
215
|
component: "span",
|
|
208
|
-
children:
|
|
216
|
+
children: Te
|
|
209
217
|
}),
|
|
210
218
|
/* @__PURE__ */ T(L, {
|
|
211
219
|
variant: "h4",
|
|
212
220
|
children: "What do I need to do?"
|
|
213
221
|
}),
|
|
214
|
-
/* @__PURE__ */ T(
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
222
|
+
/* @__PURE__ */ T(p, {}),
|
|
223
|
+
Ce && /* @__PURE__ */ T(m, {}),
|
|
224
|
+
we && /* @__PURE__ */ T(h, {}),
|
|
225
|
+
Se && /* @__PURE__ */ T(ue, {}),
|
|
226
|
+
xe?.map((e) => /* @__PURE__ */ T(ne, {
|
|
219
227
|
accessRequirement: e,
|
|
220
228
|
subjectId: W,
|
|
221
229
|
subjectType: G,
|
|
@@ -223,7 +231,7 @@ function V(C) {
|
|
|
223
231
|
onRequestAccess: (e) => {
|
|
224
232
|
Q({
|
|
225
233
|
managedACTAccessRequirement: e,
|
|
226
|
-
step:
|
|
234
|
+
step: de ? 1 : 4
|
|
227
235
|
});
|
|
228
236
|
}
|
|
229
237
|
}, e.id))
|
|
@@ -236,7 +244,7 @@ function V(C) {
|
|
|
236
244
|
] });
|
|
237
245
|
}
|
|
238
246
|
return O ? /* @__PURE__ */ T(y, {
|
|
239
|
-
maxWidth:
|
|
247
|
+
maxWidth: Ee,
|
|
240
248
|
fullWidth: !0,
|
|
241
249
|
open: !0,
|
|
242
250
|
onClose: D,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccessRequirementList.js","names":[],"sources":["../../../src/components/AccessRequirementList/AccessRequirementList.tsx"],"sourcesContent":["import {\n useGetAccessRequirementsForEntity,\n useGetAccessRequirementsForTeam,\n useSortAccessRequirementIdsByCompletion,\n} from '@/synapse-queries'\nimport {\n storeRedirectURLForOneSageLoginAndGotoURL,\n useSynapseContext,\n} from '@/utils'\nimport { StyledComponent } from '@emotion/styled'\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n styled,\n Typography,\n TypographyProps,\n} from '@mui/material'\nimport {\n AccessRequirement,\n ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n LOCK_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ManagedACTAccessRequirement,\n Renewal,\n Request,\n RestrictableObjectType,\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n TERMS_OF_USE_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n} from '@sage-bionetworks/synapse-types'\nimport noop from 'lodash-es/noop'\nimport groupBy from 'lodash-es/groupBy'\nimport { ReactNode, useMemo, useState } from 'react'\nimport { DialogBaseTitle } from '../DialogBase'\nimport { EntityLink } from '../EntityLink'\nimport IconSvg from '../IconSvg/IconSvg'\nimport UserOrTeamBadge from '../UserOrTeamBadge'\nimport { AccessRequirementListItem } from './AccessRequirementListItem'\nimport { useCanShowManagedACTWikiInWizard } from './AccessRequirementListUtils'\nimport CancelRequestDataAccess from './ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess'\nimport DataAccessRequestAccessorsFilesForm from './ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm'\nimport RequestDataAccessSuccess from './ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess'\nimport ResearchProjectForm from './ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm'\nimport ReviewDucStep from './ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep'\nimport EDucPreviewStep from './ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep'\nimport ManualUploadDucStep from './ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep'\nimport SignatureStatusStep from './ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep'\nimport AuthenticatedRequirement from './RequirementItem/AuthenticatedRequirement'\nimport CertificationRequirement from './RequirementItem/CertificationRequirement'\nimport TwoFactorAuthEnabledRequirement from './RequirementItem/TwoFactorAuthEnabledRequirement'\nimport ValidationRequirement from './RequirementItem/ValidationRequirement'\nimport { useOneSageURL } from '@/utils/hooks'\n\nexport type AccessRequirementListProps = {\n /* if provided, will show this instead of the entity information */\n numberOfFilesAffected?: number\n /* if provided, will show this instead of the entity information or numberOfFilesAffected */\n requestObjectName?: string\n /* If true, this component will render in its own modal */\n renderAsModal?: boolean\n /* Overrides the default dialog title. This only applies if renderAsModal is true */\n dialogTitle?: string\n /* Called when the user rejects the terms of a listed AccessRequirement. If renderAsModal is true, this is also called when the user closes the modal. */\n onHide: () => void\n /* Displays the provided list of access requirements, instead of the ones fetched using the subject ID */\n accessRequirementFromProps?: Array<AccessRequirement>\n /* If provided, displays these actions on when viewing all ARs */\n customDialogActions?: ReactNode\n /* Optional callback invoked if a submission is created via this component */\n onSubmissionCreated?: (submissionId: string) => void\n /**\n * Optionally open the wizard directly at a specific ManagedACTAccessRequirement step instead of\n * the default access requirement list. Useful for deep-link routes and for resuming an in-progress\n * eDUC signature flow (jump straight to `RequestDataStep.SIGNATURE_STATUS`).\n *\n * The `managedACTAccessRequirement` is bundled with the step because every ManagedACT wizard step\n * requires it — passing them together prevents entering a step with no AR selected.\n *\n * Does not affect the traditional-DUC (non-eDUC) flow, which is entered from the AR list.\n */\n initialWizardEntry?: {\n step: RequestDataStep\n managedACTAccessRequirement: ManagedACTAccessRequirement\n }\n} & (\n | {\n /**\n * Fetches the access requirements associated with an entity\n * @deprecated Please use `subjectId` and `subjectType`\n */\n entityId: string\n }\n | {\n /**\n * Fetches the access requirements associated with a team\n * @deprecated Please use `subjectId` and `subjectType`\n */\n teamId: string\n }\n | {\n /* The ID of the object for which access is being requested */\n subjectId?: string\n /* The type of the object for which access is being requested */\n subjectType?: RestrictableObjectType\n }\n)\n\nconst SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED: AccessRequirement['concreteType'][] =\n [\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n TERMS_OF_USE_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n LOCK_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ]\n\nconst SUPPORTED_ACCESS_REQUIREMENT_TYPES = new Set<\n AccessRequirement['concreteType']\n>(SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED)\n\nconst DialogSubsectionHeader: StyledComponent<TypographyProps> = styled(\n Typography,\n {\n label: 'DialogSubsectionHeader',\n },\n)(({ theme }) => ({\n marginTop: theme.spacing(4),\n marginBottom: theme.spacing(2),\n paddingBottom: theme.spacing(1),\n fontSize: '18px',\n fontWeight: 'bold',\n borderBottom: '1px solid',\n borderColor: theme.palette.grey['200'],\n}))\n\nexport const checkHasUnsupportedRequirement = (\n accessRequirements: Array<AccessRequirement>,\n): boolean => {\n return accessRequirements.some(isARUnsupported)\n}\n\nconst isARUnsupported = (accessRequirement: AccessRequirement) => {\n return !SUPPORTED_ACCESS_REQUIREMENT_TYPES.has(accessRequirement.concreteType)\n}\n\n/**\n * Represents a distinct screen in the wizard used to apply to a ManagedACTAccessRequirement\n */\nexport enum RequestDataStep {\n SHOW_ALL_ARS = 0,\n UPDATE_RESEARCH_PROJECT = 1,\n UPDATE_ACCESSORS_AND_FILES = 2,\n PROMPT_CANCEL = 3,\n PROMPT_LOGIN = 4,\n COMPLETE = 5,\n REVIEW_DUC = 6,\n EDUC_PREVIEW = 7,\n MANUAL_UPLOAD_DUC = 8,\n SIGNATURE_STATUS = 9,\n}\n\nexport type RequestDataStepCallbackArgs = {\n step: RequestDataStep\n managedACTAccessRequirement?: ManagedACTAccessRequirement\n researchProjectId?: string\n dataAccessRequest?: Request | Renewal\n}\n\n/**\n * The AccessRequirementListV2 component renders a set of {@link AccessRequirement}s (either pre-defined, or those applied\n * to an entity, based on provided props).\n *\n * The component shows the user the approval status of each AR and provides a workflow for accepting the terms of or\n * creating a submission for any of the Access Requirements.\n *\n * ### Wizard entry\n *\n * By default the component opens on the AR list ({@link RequestDataStep.SHOW_ALL_ARS}) and the user\n * navigates into the ManagedACT wizard by clicking Request Access on a specific AR.\n *\n * To open the wizard directly at a specific step (for example, to resume an in-progress eDUC signature\n * flow or to serve a deep-link route), pass {@link AccessRequirementListProps.initialWizardEntry} with\n * the target step and the {@link ManagedACTAccessRequirement} the wizard should operate on.\n */\nexport default function AccessRequirementList(\n props: AccessRequirementListProps,\n) {\n const {\n onHide = noop,\n renderAsModal = false,\n numberOfFilesAffected,\n requestObjectName,\n customDialogActions,\n onSubmissionCreated = noop,\n initialWizardEntry,\n } = props\n\n const isShowingRequirementsForEntity = 'entityId' in props\n const isShowingRequirementsForTeam = 'teamId' in props\n const isShowingRequirementsFromProps = 'accessRequirementFromProps' in props\n\n const subjectId =\n 'subjectId' in props\n ? props.subjectId\n : isShowingRequirementsForEntity\n ? props.entityId\n : isShowingRequirementsForTeam\n ? props.teamId\n : undefined\n\n const subjectType =\n 'subjectType' in props\n ? props.subjectType\n : isShowingRequirementsForEntity\n ? RestrictableObjectType.ENTITY\n : isShowingRequirementsForTeam\n ? RestrictableObjectType.TEAM\n : undefined\n\n let { dialogTitle = 'Data Access Request' } = props\n const { isAuthenticated } = useSynapseContext()\n const [requestDataStep, setRequestDataStep] = useState<RequestDataStep>(\n initialWizardEntry?.step ?? RequestDataStep.SHOW_ALL_ARS,\n )\n const oneSageURL = useOneSageURL()\n const [managedACTAccessRequirement, setManagedACTAccessRequirement] =\n useState<ManagedACTAccessRequirement | undefined>(\n initialWizardEntry?.managedACTAccessRequirement,\n )\n const [researchProjectId, setResearchProjectId] = useState<string>('')\n const [dataAccessRequest, setDataAccessRequest] = useState<\n Request | Renewal | undefined\n >()\n\n const canShowManagedACTWikiInWizard = useCanShowManagedACTWikiInWizard()\n\n const { data: fetchedRequirementsForTeam } = useGetAccessRequirementsForTeam(\n subjectId!,\n {\n enabled:\n subjectId !== undefined && subjectType === RestrictableObjectType.TEAM,\n },\n )\n const { data: fetchedRequirementsForEntity } =\n useGetAccessRequirementsForEntity(subjectId!, {\n enabled:\n subjectId !== undefined &&\n subjectType === RestrictableObjectType.ENTITY,\n })\n\n const requirementsFromProps = isShowingRequirementsFromProps\n ? props.accessRequirementFromProps\n : undefined\n\n const accessRequirements =\n requirementsFromProps ??\n fetchedRequirementsForEntity ??\n fetchedRequirementsForTeam\n\n /**\n * Set the initial ordering of the Access Requirements to show complete ARs first. The individual AR Item components\n * retrieve and render status independently, so this data only determines ordering. For this reason, the query data\n * should not be invalidated or updated as the user progresses through the workflow.\n */\n const { data: sortedAccessRequirementIds } =\n useSortAccessRequirementIdsByCompletion(\n (accessRequirements ?? []).map(ar => String(ar.id)),\n {\n enabled: !!accessRequirements,\n // Set the stale time to infinity because we don't want to refetch this and change the order\n staleTime: Infinity,\n },\n )\n\n const sortedGroupedAccessRequirementsByType = useMemo(() => {\n if (accessRequirements && sortedAccessRequirementIds) {\n // SWC-7218: Group by access requirement type\n const groupedAccessRequirementsByType = groupBy(\n accessRequirements,\n 'concreteType',\n )\n const sortedByTypeAndStatus =\n SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED.map(type => {\n const arsOfType = groupedAccessRequirementsByType[type]\n if (arsOfType) {\n return sortedAccessRequirementIds.map(\n id => arsOfType.find(ar => id === String(ar.id))!,\n )\n }\n return []\n })\n .flat()\n .filter((item): item is AccessRequirement => item !== undefined)\n return sortedByTypeAndStatus\n }\n return undefined\n }, [accessRequirements, sortedAccessRequirementIds])\n\n const requestDataStepCallback = (props: RequestDataStepCallbackArgs) => {\n const {\n managedACTAccessRequirement,\n step,\n researchProjectId,\n dataAccessRequest: newDataAccessRequest,\n } = props\n if (managedACTAccessRequirement) {\n // required for step 1, 2 form\n setManagedACTAccessRequirement(managedACTAccessRequirement)\n }\n if (researchProjectId) {\n setResearchProjectId(researchProjectId)\n }\n if (newDataAccessRequest) {\n setDataAccessRequest(newDataAccessRequest)\n }\n setRequestDataStep(step)\n }\n\n const anyARsRequireTwoFactorAuth = accessRequirements?.some(\n accessRequirement =>\n accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE &&\n accessRequirement.isTwoFaRequired,\n )\n\n const anyARsRequireCertification = accessRequirements?.some(\n accessRequirement =>\n (accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE ||\n accessRequirement.concreteType ===\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE) &&\n accessRequirement.isCertifiedUserRequired,\n )\n\n const anyARsRequireProfileValidation = accessRequirements?.some(\n accessRequirement =>\n (accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE ||\n accessRequirement.concreteType ===\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE) &&\n accessRequirement.isValidatedProfileRequired,\n )\n\n const requestDetails = useMemo(() => {\n // Prioritize requestObjectName, then the number of files affected, then the entity/team name\n if (requestObjectName) return requestObjectName\n if (numberOfFilesAffected)\n return (\n <>\n <IconSvg icon=\"file\" sx={{ width: '30px' }} /> {numberOfFilesAffected}{' '}\n File(s)\n </>\n )\n if (\n subjectId !== undefined &&\n subjectType === RestrictableObjectType.ENTITY\n ) {\n return <EntityLink entity={subjectId} />\n } else if (subjectType === RestrictableObjectType.TEAM) {\n return <UserOrTeamBadge principalId={subjectId} />\n } else {\n console.warn(\n `Unhandled case for AccessRequirementList requestDetails: ${subjectType}: ${subjectId}`,\n )\n return <></>\n }\n }, [numberOfFilesAffected, requestObjectName, subjectId, subjectType])\n\n const dialogWidth =\n [\n RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n RequestDataStep.UPDATE_RESEARCH_PROJECT,\n RequestDataStep.REVIEW_DUC,\n RequestDataStep.EDUC_PREVIEW,\n ].includes(requestDataStep) && canShowManagedACTWikiInWizard\n ? 'xl'\n : 'md'\n\n let renderContent = <></>\n switch (requestDataStep) {\n case RequestDataStep.UPDATE_RESEARCH_PROJECT:\n renderContent = (\n <ResearchProjectForm\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onSave={researchProject => {\n requestDataStepCallback({\n managedACTAccessRequirement,\n step: RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n researchProjectId: researchProject.id,\n })\n }}\n onHide={onHide}\n />\n )\n break\n case RequestDataStep.UPDATE_ACCESSORS_AND_FILES:\n renderContent = (\n <DataAccessRequestAccessorsFilesForm\n researchProjectId={researchProjectId}\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onCancel={dataAccessRequestInProgress => {\n requestDataStepCallback({\n step: RequestDataStep.PROMPT_CANCEL,\n dataAccessRequest: dataAccessRequestInProgress,\n })\n }}\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n onBackClicked={() => {\n requestDataStepCallback({\n step: RequestDataStep.UPDATE_RESEARCH_PROJECT,\n })\n }}\n onEDucContinue={\n managedACTAccessRequirement?.eDucTemplateId\n ? () => {\n requestDataStepCallback({\n step: RequestDataStep.REVIEW_DUC,\n })\n }\n : undefined\n }\n />\n )\n break\n case RequestDataStep.REVIEW_DUC:\n renderContent = (\n <ReviewDucStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({\n step: RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n })\n }}\n onCreateDuc={() => {\n requestDataStepCallback({ step: RequestDataStep.EDUC_PREVIEW })\n }}\n />\n )\n break\n case RequestDataStep.EDUC_PREVIEW:\n renderContent = (\n <EDucPreviewStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({ step: RequestDataStep.REVIEW_DUC })\n }}\n onSendForSignature={() => {\n requestDataStepCallback({ step: RequestDataStep.SIGNATURE_STATUS })\n }}\n onManualUpload={() => {\n requestDataStepCallback({\n step: RequestDataStep.MANUAL_UPLOAD_DUC,\n })\n }}\n />\n )\n break\n case RequestDataStep.MANUAL_UPLOAD_DUC:\n renderContent = (\n <ManualUploadDucStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({ step: RequestDataStep.EDUC_PREVIEW })\n }}\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n />\n )\n break\n case RequestDataStep.SIGNATURE_STATUS:\n renderContent = (\n <SignatureStatusStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onBackClicked={\n // When entered directly via initialWizardEntry there is no earlier wizard step to\n // return to, so omit the callback and let the step hide its Back button.\n initialWizardEntry\n ? undefined\n : () => {\n requestDataStepCallback({\n step: RequestDataStep.EDUC_PREVIEW,\n })\n }\n }\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n />\n )\n break\n case RequestDataStep.PROMPT_CANCEL:\n renderContent = (\n <CancelRequestDataAccess\n modifiedDataAccessRequest={dataAccessRequest}\n onHide={onHide} // for closing dialogs\n />\n )\n break\n case RequestDataStep.PROMPT_LOGIN:\n // Send to OneSage login page\n storeRedirectURLForOneSageLoginAndGotoURL(oneSageURL.toString())\n dialogTitle = 'Please Log In'\n renderContent = <></>\n break\n case RequestDataStep.COMPLETE:\n renderContent = <RequestDataAccessSuccess onHide={onHide} />\n break\n case RequestDataStep.SHOW_ALL_ARS:\n default:\n renderContent = (\n <>\n {renderAsModal ? (\n <DialogBaseTitle title={dialogTitle} onCancel={onHide} />\n ) : (\n <Typography variant=\"h5\" sx={{ mb: 2 }}>\n {dialogTitle}\n </Typography>\n )}\n <DialogContent>\n <DialogSubsectionHeader variant={'h4'} sx={{ mt: 0 }}>\n What is this request for?\n </DialogSubsectionHeader>\n <Typography variant={'body1'} component={'span'}>\n {requestDetails}\n </Typography>\n <DialogSubsectionHeader variant={'h4'}>\n What do I need to do?\n </DialogSubsectionHeader>\n <AuthenticatedRequirement />\n {anyARsRequireCertification && <CertificationRequirement />}\n {anyARsRequireProfileValidation && <ValidationRequirement />}\n {anyARsRequireTwoFactorAuth && <TwoFactorAuthEnabledRequirement />}\n {sortedGroupedAccessRequirementsByType?.map(accessRequirement => {\n return (\n <AccessRequirementListItem\n key={accessRequirement.id}\n accessRequirement={accessRequirement}\n subjectId={subjectId}\n subjectType={subjectType}\n onHide={onHide}\n onRequestAccess={accessRequirement => {\n const nextStep = isAuthenticated\n ? RequestDataStep.UPDATE_RESEARCH_PROJECT\n : RequestDataStep.PROMPT_LOGIN\n requestDataStepCallback({\n managedACTAccessRequirement: accessRequirement,\n step: nextStep,\n })\n }}\n />\n )\n })}\n </DialogContent>\n <DialogActions>\n {customDialogActions ? (\n customDialogActions\n ) : (\n <>\n {renderAsModal && (\n <Button variant=\"contained\" onClick={onHide}>\n Close\n </Button>\n )}\n </>\n )}\n </DialogActions>\n </>\n )\n }\n\n if (renderAsModal) {\n return (\n <Dialog maxWidth={dialogWidth} fullWidth open={true} onClose={onHide}>\n {renderContent}\n </Dialog>\n )\n }\n\n return <>{renderContent}</>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4GA,IAAM,IACJ;CACE;CACA;CACA;CACA;CACA;AACF,GAEI,IAAqC,IAAI,IAE7C,CAAyC,GAErC,IAA2D,EAC/D,GACA,EACE,OAAO,yBACT,CACF,GAAG,EAAE,gBAAa;CAChB,WAAW,EAAM,QAAQ,CAAC;CAC1B,cAAc,EAAM,QAAQ,CAAC;CAC7B,eAAe,EAAM,QAAQ,CAAC;CAC9B,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa,EAAM,QAAQ,KAAK;AAClC,EAAE,GAEW,KACX,MAEO,EAAmB,KAAK,CAAe,GAG1C,KAAmB,MAChB,CAAC,EAAmC,IAAI,EAAkB,YAAY,GAMnE,IAAL,yBAAA,GAAA;QACL,EAAA,EAAA,eAAA,KAAA,gBACA,EAAA,EAAA,0BAAA,KAAA,2BACA,EAAA,EAAA,6BAAA,KAAA,8BACA,EAAA,EAAA,gBAAA,KAAA,iBACA,EAAA,EAAA,eAAA,KAAA,gBACA,EAAA,EAAA,WAAA,KAAA,YACA,EAAA,EAAA,aAAA,KAAA,cACA,EAAA,EAAA,eAAA,KAAA,gBACA,EAAA,EAAA,oBAAA,KAAA,qBACA,EAAA,EAAA,mBAAA,KAAA;AACF,EAAA,CAAA,CAAA;AAyBA,SA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A;CAER;CAUA,OARI,IAEA,kBAAC,GAAD;EAAQ,UAAU;EAAa,WAAA;EAAU,MAAM;EAAM,SAAS;YAC3D;CACK,CAAA,IAIL,kBAAA,GAAA,EAAA,UAAG,EAAgB,CAAA;AAC5B"}
|
|
1
|
+
{"version":3,"file":"AccessRequirementList.js","names":[],"sources":["../../../src/components/AccessRequirementList/AccessRequirementList.tsx"],"sourcesContent":["import {\n useGetAccessRequirementsForEntity,\n useGetAccessRequirementsForTeam,\n useSortAccessRequirementIdsByCompletion,\n} from '@/synapse-queries'\nimport {\n storeRedirectURLForOneSageLoginAndGotoURL,\n useSynapseContext,\n} from '@/utils'\nimport { StyledComponent } from '@emotion/styled'\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n styled,\n Typography,\n TypographyProps,\n} from '@mui/material'\nimport {\n AccessRequirement,\n ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n LOCK_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ManagedACTAccessRequirement,\n Renewal,\n Request,\n RestrictableObjectType,\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n TERMS_OF_USE_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n} from '@sage-bionetworks/synapse-types'\nimport noop from 'lodash-es/noop'\nimport groupBy from 'lodash-es/groupBy'\nimport { ReactNode, useMemo, useState } from 'react'\nimport { DialogBaseTitle } from '../DialogBase'\nimport { EntityLink } from '../EntityLink'\nimport IconSvg from '../IconSvg/IconSvg'\nimport { displayToast } from '../ToastMessage/ToastMessage'\nimport UserOrTeamBadge from '../UserOrTeamBadge'\nimport { AccessRequirementListItem } from './AccessRequirementListItem'\nimport { useCanShowManagedACTWikiInWizard } from './AccessRequirementListUtils'\nimport CancelRequestDataAccess from './ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess'\nimport DataAccessRequestAccessorsFilesForm from './ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm'\nimport RequestDataAccessSuccess from './ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess'\nimport ResearchProjectForm from './ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm'\nimport ReviewDucStep from './ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep'\nimport EDucPreviewStep from './ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep'\nimport ManualUploadDucStep from './ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep'\nimport SignatureStatusStep from './ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep'\nimport AuthenticatedRequirement from './RequirementItem/AuthenticatedRequirement'\nimport CertificationRequirement from './RequirementItem/CertificationRequirement'\nimport TwoFactorAuthEnabledRequirement from './RequirementItem/TwoFactorAuthEnabledRequirement'\nimport ValidationRequirement from './RequirementItem/ValidationRequirement'\nimport { useOneSageURL } from '@/utils/hooks'\nimport {\n BackendDestinationEnum,\n getEndpoint,\n} from '@/utils/functions/getEndpoint'\n\nexport type AccessRequirementListProps = {\n /* if provided, will show this instead of the entity information */\n numberOfFilesAffected?: number\n /* if provided, will show this instead of the entity information or numberOfFilesAffected */\n requestObjectName?: string\n /* If true, this component will render in its own modal */\n renderAsModal?: boolean\n /* Overrides the default dialog title. This only applies if renderAsModal is true */\n dialogTitle?: string\n /* Called when the user rejects the terms of a listed AccessRequirement. If renderAsModal is true, this is also called when the user closes the modal. */\n onHide: () => void\n /* Displays the provided list of access requirements, instead of the ones fetched using the subject ID */\n accessRequirementFromProps?: Array<AccessRequirement>\n /* If provided, displays these actions on when viewing all ARs */\n customDialogActions?: ReactNode\n /* Optional callback invoked if a submission is created via this component */\n onSubmissionCreated?: (submissionId: string) => void\n /**\n * Optionally open the wizard directly at a specific ManagedACTAccessRequirement step instead of\n * the default access requirement list. Useful for deep-link routes and for resuming an in-progress\n * eDUC signature flow (jump straight to `RequestDataStep.SIGNATURE_STATUS`).\n *\n * The `managedACTAccessRequirement` is bundled with the step because every ManagedACT wizard step\n * requires it — passing them together prevents entering a step with no AR selected.\n *\n * Does not affect the traditional-DUC (non-eDUC) flow, which is entered from the AR list.\n */\n initialWizardEntry?: {\n step: RequestDataStep\n managedACTAccessRequirement: ManagedACTAccessRequirement\n }\n} & (\n | {\n /**\n * Fetches the access requirements associated with an entity\n * @deprecated Please use `subjectId` and `subjectType`\n */\n entityId: string\n }\n | {\n /**\n * Fetches the access requirements associated with a team\n * @deprecated Please use `subjectId` and `subjectType`\n */\n teamId: string\n }\n | {\n /* The ID of the object for which access is being requested */\n subjectId?: string\n /* The type of the object for which access is being requested */\n subjectType?: RestrictableObjectType\n }\n)\n\nconst SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED: AccessRequirement['concreteType'][] =\n [\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n TERMS_OF_USE_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n LOCK_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE,\n ]\n\nconst SUPPORTED_ACCESS_REQUIREMENT_TYPES = new Set<\n AccessRequirement['concreteType']\n>(SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED)\n\nconst DialogSubsectionHeader: StyledComponent<TypographyProps> = styled(\n Typography,\n {\n label: 'DialogSubsectionHeader',\n },\n)(({ theme }) => ({\n marginTop: theme.spacing(4),\n marginBottom: theme.spacing(2),\n paddingBottom: theme.spacing(1),\n fontSize: '18px',\n fontWeight: 'bold',\n borderBottom: '1px solid',\n borderColor: theme.palette.grey['200'],\n}))\n\nexport const checkHasUnsupportedRequirement = (\n accessRequirements: Array<AccessRequirement>,\n): boolean => {\n return accessRequirements.some(isARUnsupported)\n}\n\nconst isARUnsupported = (accessRequirement: AccessRequirement) => {\n return !SUPPORTED_ACCESS_REQUIREMENT_TYPES.has(accessRequirement.concreteType)\n}\n\n/**\n * Represents a distinct screen in the wizard used to apply to a ManagedACTAccessRequirement\n */\nexport enum RequestDataStep {\n SHOW_ALL_ARS = 0,\n UPDATE_RESEARCH_PROJECT = 1,\n UPDATE_ACCESSORS_AND_FILES = 2,\n PROMPT_CANCEL = 3,\n PROMPT_LOGIN = 4,\n COMPLETE = 5,\n REVIEW_DUC = 6,\n EDUC_PREVIEW = 7,\n MANUAL_UPLOAD_DUC = 8,\n SIGNATURE_STATUS = 9,\n}\n\nexport type RequestDataStepCallbackArgs = {\n step: RequestDataStep\n managedACTAccessRequirement?: ManagedACTAccessRequirement\n researchProjectId?: string\n dataAccessRequest?: Request | Renewal\n}\n\n/**\n * The AccessRequirementListV2 component renders a set of {@link AccessRequirement}s (either pre-defined, or those applied\n * to an entity, based on provided props).\n *\n * The component shows the user the approval status of each AR and provides a workflow for accepting the terms of or\n * creating a submission for any of the Access Requirements.\n *\n * ### Wizard entry\n *\n * By default the component opens on the AR list ({@link RequestDataStep.SHOW_ALL_ARS}) and the user\n * navigates into the ManagedACT wizard by clicking Request Access on a specific AR.\n *\n * To open the wizard directly at a specific step (for example, to resume an in-progress eDUC signature\n * flow or to serve a deep-link route), pass {@link AccessRequirementListProps.initialWizardEntry} with\n * the target step and the {@link ManagedACTAccessRequirement} the wizard should operate on.\n */\nexport default function AccessRequirementList(\n props: AccessRequirementListProps,\n) {\n const {\n onHide = noop,\n renderAsModal = false,\n numberOfFilesAffected,\n requestObjectName,\n customDialogActions,\n onSubmissionCreated = noop,\n initialWizardEntry,\n } = props\n\n const isShowingRequirementsForEntity = 'entityId' in props\n const isShowingRequirementsForTeam = 'teamId' in props\n const isShowingRequirementsFromProps = 'accessRequirementFromProps' in props\n\n const subjectId =\n 'subjectId' in props\n ? props.subjectId\n : isShowingRequirementsForEntity\n ? props.entityId\n : isShowingRequirementsForTeam\n ? props.teamId\n : undefined\n\n const subjectType =\n 'subjectType' in props\n ? props.subjectType\n : isShowingRequirementsForEntity\n ? RestrictableObjectType.ENTITY\n : isShowingRequirementsForTeam\n ? RestrictableObjectType.TEAM\n : undefined\n\n let { dialogTitle = 'Data Access Request' } = props\n const { isAuthenticated } = useSynapseContext()\n const [requestDataStep, setRequestDataStep] = useState<RequestDataStep>(\n initialWizardEntry?.step ?? RequestDataStep.SHOW_ALL_ARS,\n )\n const oneSageURL = useOneSageURL()\n const [managedACTAccessRequirement, setManagedACTAccessRequirement] =\n useState<ManagedACTAccessRequirement | undefined>(\n initialWizardEntry?.managedACTAccessRequirement,\n )\n const [researchProjectId, setResearchProjectId] = useState<string>('')\n const [dataAccessRequest, setDataAccessRequest] = useState<\n Request | Renewal | undefined\n >()\n\n const canShowManagedACTWikiInWizard = useCanShowManagedACTWikiInWizard()\n\n const { data: fetchedRequirementsForTeam } = useGetAccessRequirementsForTeam(\n subjectId!,\n {\n enabled:\n subjectId !== undefined && subjectType === RestrictableObjectType.TEAM,\n },\n )\n const { data: fetchedRequirementsForEntity } =\n useGetAccessRequirementsForEntity(subjectId!, {\n enabled:\n subjectId !== undefined &&\n subjectType === RestrictableObjectType.ENTITY,\n })\n\n const requirementsFromProps = isShowingRequirementsFromProps\n ? props.accessRequirementFromProps\n : undefined\n\n const accessRequirements =\n requirementsFromProps ??\n fetchedRequirementsForEntity ??\n fetchedRequirementsForTeam\n\n /**\n * Set the initial ordering of the Access Requirements to show complete ARs first. The individual AR Item components\n * retrieve and render status independently, so this data only determines ordering. For this reason, the query data\n * should not be invalidated or updated as the user progresses through the workflow.\n */\n const { data: sortedAccessRequirementIds } =\n useSortAccessRequirementIdsByCompletion(\n (accessRequirements ?? []).map(ar => String(ar.id)),\n {\n enabled: !!accessRequirements,\n // Set the stale time to infinity because we don't want to refetch this and change the order\n staleTime: Infinity,\n },\n )\n\n const sortedGroupedAccessRequirementsByType = useMemo(() => {\n if (accessRequirements && sortedAccessRequirementIds) {\n // SWC-7218: Group by access requirement type\n const groupedAccessRequirementsByType = groupBy(\n accessRequirements,\n 'concreteType',\n )\n const sortedByTypeAndStatus =\n SUPPORTED_ACCESS_REQUIREMENT_TYPES_SORTED.map(type => {\n const arsOfType = groupedAccessRequirementsByType[type]\n if (arsOfType) {\n return sortedAccessRequirementIds.map(\n id => arsOfType.find(ar => id === String(ar.id))!,\n )\n }\n return []\n })\n .flat()\n .filter((item): item is AccessRequirement => item !== undefined)\n return sortedByTypeAndStatus\n }\n return undefined\n }, [accessRequirements, sortedAccessRequirementIds])\n\n const requestDataStepCallback = (props: RequestDataStepCallbackArgs) => {\n const {\n managedACTAccessRequirement,\n step,\n researchProjectId,\n dataAccessRequest: newDataAccessRequest,\n } = props\n if (managedACTAccessRequirement) {\n // required for step 1, 2 form\n setManagedACTAccessRequirement(managedACTAccessRequirement)\n }\n if (researchProjectId) {\n setResearchProjectId(researchProjectId)\n }\n if (newDataAccessRequest) {\n setDataAccessRequest(newDataAccessRequest)\n }\n setRequestDataStep(step)\n }\n\n const anyARsRequireTwoFactorAuth = accessRequirements?.some(\n accessRequirement =>\n accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE &&\n accessRequirement.isTwoFaRequired,\n )\n\n const anyARsRequireCertification = accessRequirements?.some(\n accessRequirement =>\n (accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE ||\n accessRequirement.concreteType ===\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE) &&\n accessRequirement.isCertifiedUserRequired,\n )\n\n const anyARsRequireProfileValidation = accessRequirements?.some(\n accessRequirement =>\n (accessRequirement.concreteType ===\n MANAGED_ACT_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE ||\n accessRequirement.concreteType ===\n SELF_SIGN_ACCESS_REQUIREMENT_CONCRETE_TYPE_VALUE) &&\n accessRequirement.isValidatedProfileRequired,\n )\n\n const requestDetails = useMemo(() => {\n // Prioritize requestObjectName, then the number of files affected, then the entity/team name\n if (requestObjectName) return requestObjectName\n if (numberOfFilesAffected)\n return (\n <>\n <IconSvg icon=\"file\" sx={{ width: '30px' }} /> {numberOfFilesAffected}{' '}\n File(s)\n </>\n )\n if (\n subjectId !== undefined &&\n subjectType === RestrictableObjectType.ENTITY\n ) {\n return <EntityLink entity={subjectId} />\n } else if (subjectType === RestrictableObjectType.TEAM) {\n return <UserOrTeamBadge principalId={subjectId} />\n } else {\n console.warn(\n `Unhandled case for AccessRequirementList requestDetails: ${subjectType}: ${subjectId}`,\n )\n return <></>\n }\n }, [numberOfFilesAffected, requestObjectName, subjectId, subjectType])\n\n const dialogWidth =\n [\n RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n RequestDataStep.UPDATE_RESEARCH_PROJECT,\n RequestDataStep.REVIEW_DUC,\n RequestDataStep.EDUC_PREVIEW,\n ].includes(requestDataStep) && canShowManagedACTWikiInWizard\n ? 'xl'\n : 'md'\n\n let renderContent = <></>\n switch (requestDataStep) {\n case RequestDataStep.UPDATE_RESEARCH_PROJECT:\n renderContent = (\n <ResearchProjectForm\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onSave={researchProject => {\n requestDataStepCallback({\n managedACTAccessRequirement,\n step: RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n researchProjectId: researchProject.id,\n })\n }}\n onHide={onHide}\n />\n )\n break\n case RequestDataStep.UPDATE_ACCESSORS_AND_FILES:\n renderContent = (\n <DataAccessRequestAccessorsFilesForm\n researchProjectId={researchProjectId}\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onCancel={dataAccessRequestInProgress => {\n requestDataStepCallback({\n step: RequestDataStep.PROMPT_CANCEL,\n dataAccessRequest: dataAccessRequestInProgress,\n })\n }}\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n onBackClicked={() => {\n requestDataStepCallback({\n step: RequestDataStep.UPDATE_RESEARCH_PROJECT,\n })\n }}\n onEDucContinue={\n managedACTAccessRequirement?.eDucTemplateId\n ? () => {\n requestDataStepCallback({\n step: RequestDataStep.REVIEW_DUC,\n })\n }\n : undefined\n }\n />\n )\n break\n case RequestDataStep.REVIEW_DUC:\n renderContent = (\n <ReviewDucStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({\n step: RequestDataStep.UPDATE_ACCESSORS_AND_FILES,\n })\n }}\n onCreateDuc={() => {\n requestDataStepCallback({ step: RequestDataStep.EDUC_PREVIEW })\n }}\n />\n )\n break\n case RequestDataStep.EDUC_PREVIEW:\n renderContent = (\n <EDucPreviewStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({ step: RequestDataStep.REVIEW_DUC })\n }}\n onSendForSignature={() => {\n // The signature-status step isn't useful right after routing (0 signatures collected,\n // Submit necessarily disabled), so surface a toast and close the wizard. The user can\n // resume from their in-flight requests table when signatures are ready.\n displayToast(\n 'Your DUC has been emailed to your collaborators. You can check signature progress in your access request history.',\n 'info',\n {\n primaryButtonConfig: {\n text: 'View Request History',\n // Resolves to a same-origin path on synapse.org and to the absolute synapse.org URL when embedded in a portal.\n href: `${getEndpoint(BackendDestinationEnum.PORTAL_ENDPOINT)}RequestHistory:default`,\n },\n dismissOnPrimaryButtonClick: true,\n },\n )\n onHide()\n }}\n onManualUpload={() => {\n requestDataStepCallback({\n step: RequestDataStep.MANUAL_UPLOAD_DUC,\n })\n }}\n />\n )\n break\n case RequestDataStep.MANUAL_UPLOAD_DUC:\n renderContent = (\n <ManualUploadDucStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onBackClicked={() => {\n requestDataStepCallback({ step: RequestDataStep.EDUC_PREVIEW })\n }}\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n />\n )\n break\n case RequestDataStep.SIGNATURE_STATUS:\n renderContent = (\n <SignatureStatusStep\n managedACTAccessRequirement={managedACTAccessRequirement!}\n subjectId={subjectId ?? ''}\n subjectType={subjectType ?? RestrictableObjectType.ENTITY}\n onHide={onHide}\n onBackClicked={() => {\n // Back from SIGNATURE_STATUS returns to the research project step so the user can\n // modify the request. EDUC_PREVIEW is skipped because Send-for-signature toasts and\n // closes the wizard, so users only reach this step from the row-level \"Review\n // Signatures and Submit\" entry point.\n requestDataStepCallback({\n step: RequestDataStep.UPDATE_RESEARCH_PROJECT,\n })\n }}\n onSubmissionCreated={submissionId => {\n requestDataStepCallback({ step: RequestDataStep.COMPLETE })\n onSubmissionCreated(submissionId)\n }}\n />\n )\n break\n case RequestDataStep.PROMPT_CANCEL:\n renderContent = (\n <CancelRequestDataAccess\n modifiedDataAccessRequest={dataAccessRequest}\n onHide={onHide} // for closing dialogs\n />\n )\n break\n case RequestDataStep.PROMPT_LOGIN:\n // Send to OneSage login page\n storeRedirectURLForOneSageLoginAndGotoURL(oneSageURL.toString())\n dialogTitle = 'Please Log In'\n renderContent = <></>\n break\n case RequestDataStep.COMPLETE:\n renderContent = <RequestDataAccessSuccess onHide={onHide} />\n break\n case RequestDataStep.SHOW_ALL_ARS:\n default:\n renderContent = (\n <>\n {renderAsModal ? (\n <DialogBaseTitle title={dialogTitle} onCancel={onHide} />\n ) : (\n <Typography variant=\"h5\" sx={{ mb: 2 }}>\n {dialogTitle}\n </Typography>\n )}\n <DialogContent>\n <DialogSubsectionHeader variant={'h4'} sx={{ mt: 0 }}>\n What is this request for?\n </DialogSubsectionHeader>\n <Typography variant={'body1'} component={'span'}>\n {requestDetails}\n </Typography>\n <DialogSubsectionHeader variant={'h4'}>\n What do I need to do?\n </DialogSubsectionHeader>\n <AuthenticatedRequirement />\n {anyARsRequireCertification && <CertificationRequirement />}\n {anyARsRequireProfileValidation && <ValidationRequirement />}\n {anyARsRequireTwoFactorAuth && <TwoFactorAuthEnabledRequirement />}\n {sortedGroupedAccessRequirementsByType?.map(accessRequirement => {\n return (\n <AccessRequirementListItem\n key={accessRequirement.id}\n accessRequirement={accessRequirement}\n subjectId={subjectId}\n subjectType={subjectType}\n onHide={onHide}\n onRequestAccess={accessRequirement => {\n const nextStep = isAuthenticated\n ? RequestDataStep.UPDATE_RESEARCH_PROJECT\n : RequestDataStep.PROMPT_LOGIN\n requestDataStepCallback({\n managedACTAccessRequirement: accessRequirement,\n step: nextStep,\n })\n }}\n />\n )\n })}\n </DialogContent>\n <DialogActions>\n {customDialogActions ? (\n customDialogActions\n ) : (\n <>\n {renderAsModal && (\n <Button variant=\"contained\" onClick={onHide}>\n Close\n </Button>\n )}\n </>\n )}\n </DialogActions>\n </>\n )\n }\n\n if (renderAsModal) {\n return (\n <Dialog maxWidth={dialogWidth} fullWidth open={true} onClose={onHide}>\n {renderContent}\n </Dialog>\n )\n }\n\n return <>{renderContent}</>\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiHA,IAAM,IACJ;CACE;CACA;CACA;CACA;CACA;AACF,GAEI,IAAqC,IAAI,IAE7C,CAAyC,GAErC,IAA2D,EAC/D,GACA,EACE,OAAO,yBACT,CACF,GAAG,EAAE,gBAAa;CAChB,WAAW,EAAM,QAAQ,CAAC;CAC1B,cAAc,EAAM,QAAQ,CAAC;CAC7B,eAAe,EAAM,QAAQ,CAAC;CAC9B,UAAU;CACV,YAAY;CACZ,cAAc;CACd,aAAa,EAAM,QAAQ,KAAK;AAClC,EAAE,GAEW,KACX,MAEO,EAAmB,KAAK,CAAe,GAG1C,KAAmB,MAChB,CAAC,EAAmC,IAAI,EAAkB,YAAY,GAMnE,IAA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ACzD,MAAkC,kBAAC,GAAD,CAAwB,CAAA;IAC1D,MAA8B,kBAAC,IAAD,CAAkC,CAAA;IAChE,IAAuC,KAAI,MAExC,kBAAC,IAAD;KAEqB;KACR;KACE;KACL;KACR,kBAAiB,MAAqB;MAIpC,EAAwB;OACtB,6BAA6B;OAC7B,MALe,KAAA,IAAA;MAMjB,CAAC;KACH;IACD,GAdM,EAAkB,EAcxB,CAEJ;GACY,EAAA,CAAA;GACf,kBAAC,GAAD,EAAA,UACG,KAGC,kBAAA,GAAA,EAAA,UACG,KACC,kBAAC,GAAD;IAAQ,SAAQ;IAAY,SAAS;cAAQ;GAErC,CAAA,EAEV,CAAA,EAES,CAAA;EACf,EAAA,CAAA;CAER;CAUA,OARI,IAEA,kBAAC,GAAD;EAAQ,UAAU;EAAa,WAAA;EAAU,MAAM;EAAM,SAAS;YAC3D;CACK,CAAA,IAIL,kBAAA,GAAA,EAAA,UAAG,EAAgB,CAAA;AAC5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataAccessRequestAccessorsFilesForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,IAAI,aAAa,EAY5B,MAAM,eAAe,CAAA;AAItB,OAAO,EAML,2BAA2B,EAC3B,OAAO,EACP,OAAO,EACP,sBAAsB,EAGvB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAmB9D,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAiDzC,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB,WAAW,EAAE,sBAAsB,CAAA;IAEnC,2BAA2B,EAAE,2BAA2B,CAAA;IACxD,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,iBAAiB,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,MAAM,IAAI,CAAA;IAElB,QAAQ,EAAE,CAAC,yBAAyB,EAAE,OAAO,GAAG,OAAO,KAAK,IAAI,CAAA;IAChE,gEAAgE;IAChE,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,mCAAmC,CACzD,KAAK,EAAE,wCAAwC,
|
|
1
|
+
{"version":3,"file":"DataAccessRequestAccessorsFilesForm.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.tsx"],"names":[],"mappings":"AACA,OAAO,EAEL,UAAU,IAAI,aAAa,EAY5B,MAAM,eAAe,CAAA;AAItB,OAAO,EAML,2BAA2B,EAC3B,OAAO,EACP,OAAO,EACP,sBAAsB,EAGvB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAA;AAmB9D,eAAO,MAAM,uBAAuB,KAAK,CAAA;AAiDzC,MAAM,MAAM,wCAAwC,GAAG;IACrD;;OAEG;IACH,SAAS,EAAE,MAAM,CAAA;IAEjB,WAAW,EAAE,sBAAsB,CAAA;IAEnC,2BAA2B,EAAE,2BAA2B,CAAA;IACxD,mBAAmB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD,iBAAiB,EAAE,MAAM,CAAA;IACzB,MAAM,EAAE,MAAM,IAAI,CAAA;IAElB,QAAQ,EAAE,CAAC,yBAAyB,EAAE,OAAO,GAAG,OAAO,KAAK,IAAI,CAAA;IAChE,gEAAgE;IAChE,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAA;CAC5B,CAAA;AAED,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,aAAa,CAAC,UAAU,CAAC,CAAA;IAC9B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAA;CAC5B,CAAA;AAED;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,mCAAmC,CACzD,KAAK,EAAE,wCAAwC,2CAwlBhD"}
|
|
@@ -68,7 +68,7 @@ function C(f) {
|
|
|
68
68
|
userId: O.ownerId,
|
|
69
69
|
type: G ? v.RENEW_ACCESS : v.GAIN_ACCESS
|
|
70
70
|
};
|
|
71
|
-
|
|
71
|
+
U.accessorChanges?.find((e) => fe(e, t)) || (U.accessorChanges = [t, ...U.accessorChanges || []], e = !0);
|
|
72
72
|
let n = /* @__PURE__ */ new Set(), r = U.accessorChanges.filter((e) => n.has(e.userId) ? !1 : n.add(e.userId));
|
|
73
73
|
r.length !== U.accessorChanges.length && (U.accessorChanges = r, e = !0), e && (H.current = !0, J(U));
|
|
74
74
|
}
|
|
@@ -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, 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'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,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ACK,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?.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'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,IAC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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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EDucPreviewStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"EDucPreviewStep.d.ts","sourceRoot":"","sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"names":[],"mappings":"AAqBA,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,2CA4LlE"}
|