synapse-react-client 4.0.35 → 4.0.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +37 -0
- package/dist/aridhia-queries/useAridhiaQuery.d.ts.map +1 -0
- package/dist/aridhia-queries/useAridhiaQuery.js +71 -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/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 +116 -115
- package/dist/components/AccessRequirementList/AccessRequirementList.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/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/CardContainer/CardConfiguration.d.ts +8 -0
- package/dist/components/CardContainer/CardConfiguration.d.ts.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/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/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/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/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/DatasetHosting/DatasetDownloadButton.d.ts +35 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.js +132 -0
- package/dist/components/DatasetHosting/DatasetDownloadButton.js.map +1 -0
- package/dist/components/DatasetHosting/DatasetHosting.d.ts +91 -0
- package/dist/components/DatasetHosting/DatasetHosting.d.ts.map +1 -0
- package/dist/components/DatasetHosting/DatasetHosting.js +58 -0
- package/dist/components/DatasetHosting/DatasetHosting.js.map +1 -0
- package/dist/components/DatasetHosting/index.d.ts +5 -0
- package/dist/components/DatasetHosting/index.d.ts.map +1 -0
- package/dist/components/DatasetHosting/index.js +3 -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/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 +205 -190
- 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/JsonSchemaForm.css +1 -0
- package/dist/components/JsonSchemaForm/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm/JsonSchemaForm.js +13 -12
- 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/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/QueryWrapperPlotNav.d.ts +0 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
- package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.js +123 -123
- package/dist/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.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/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/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/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/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/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/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.d.ts.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js +36 -34
- package/dist/components/dataaccess/UserAccessRequestHistory/InFlightEDucSignaturesTable.js.map +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js +1 -1
- package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryPage.js.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.d.ts.map +1 -1
- package/dist/components/doi/CreateOrUpdateDoiModal.js +10 -13
- package/dist/components/doi/CreateOrUpdateDoiModal.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 +143 -140
- package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/menu/DropdownMenu.js +6 -6
- package/dist/components/menu/DropdownMenu.js.map +1 -1
- package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +5 -5
- package/dist/index.js +161 -159
- package/dist/index.js.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +30 -26
- package/dist/mocks/msw/handlers/dataAccessRequestHandlers.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 +4 -0
- package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
- package/dist/style/components/_all.scss +0 -1
- package/dist/style/components/_cards.scss +4 -2
- 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/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 +1 -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/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 +19 -3
- package/dist/utils/functions/SqlFunctions.js.map +1 -1
- package/dist/utils/index.js +16 -16
- 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 +7 -7
- 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,24 +1,24 @@
|
|
|
1
1
|
import e from "../../../../synapse-client/index.js";
|
|
2
2
|
import { useGetDataAccessRequestForUpdate as t } from "../../../../synapse-queries/dataaccess/useAccessRequirements.js";
|
|
3
|
-
import { useGetDataAccessRequestPreview as n,
|
|
3
|
+
import { useGetDataAccessRequestPreview as n, useGetDataAccessRequestSignatureQuota as r, useInitiateDataAccessRequestSignature as i } from "../../../../synapse-queries/dataaccess/useEDuc.js";
|
|
4
4
|
import "../../../../synapse-queries/index.js";
|
|
5
|
-
import
|
|
6
|
-
import { longFieldLabelSx as
|
|
7
|
-
import { useFetchBlobUrl as
|
|
8
|
-
import { Alert as
|
|
9
|
-
import { Fragment as
|
|
10
|
-
import { FileHandleAssociateType as
|
|
5
|
+
import a from "../../../IconSvg/IconSvg.js";
|
|
6
|
+
import { longFieldLabelSx as o } from "../styles.js";
|
|
7
|
+
import { useFetchBlobUrl as s } from "../../../../utils/hooks/useFetchBlobUrl.js";
|
|
8
|
+
import { Alert as c, Box as l, Button as u, DialogActions as d, DialogContent as f, DialogTitle as p, Divider as m, IconButton as h, Skeleton as g, Stack as _, Tooltip as v, Typography as y } from "@mui/material";
|
|
9
|
+
import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
|
|
10
|
+
import { FileHandleAssociateType as C } from "@sage-bionetworks/synapse-types";
|
|
11
11
|
//#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
let { managedACTAccessRequirement:
|
|
12
|
+
var w = "500px";
|
|
13
|
+
function T(T) {
|
|
14
|
+
let { managedACTAccessRequirement: D, onHide: O, onBackClicked: k, onSendForSignature: A, onManualUpload: j, previewSrcOverride: M } = T, { data: N, isLoading: P } = t(String(D.id), {
|
|
15
15
|
staleTime: Infinity,
|
|
16
16
|
throwOnError: !0
|
|
17
|
-
}), { data:
|
|
18
|
-
|
|
17
|
+
}), { data: F, isLoading: I, error: L } = n(N?.id ?? "", { enabled: !!N?.id }), R = F?.fileHandleId, { blobUrl: z, error: B } = s(M || !R || !N?.id ? void 0 : e.getPortalFileHandleServletUrl(R, N.id, C.DataAccessRequestAttachment)), { mutate: V, isPending: H, error: U, reset: W } = i({ onSuccess: () => A() }), { data: G } = r(N?.id ?? "", { enabled: !!N?.id }), K = G != null && G.remaining != null && G.remaining <= 0, q = P || !!N?.id && I || !M && !!R && !z && !B, J = q || !M && !z || H, Y = () => {
|
|
18
|
+
N?.id && (W(), V(N.id));
|
|
19
19
|
};
|
|
20
|
-
return /* @__PURE__ */ b
|
|
21
|
-
/* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ S(b, { children: [
|
|
21
|
+
/* @__PURE__ */ x(p, { children: /* @__PURE__ */ S(_, {
|
|
22
22
|
direction: "row",
|
|
23
23
|
sx: {
|
|
24
24
|
alignItems: "center",
|
|
@@ -26,11 +26,11 @@ function C(C) {
|
|
|
26
26
|
},
|
|
27
27
|
children: [
|
|
28
28
|
"Request Access",
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
29
|
+
/* @__PURE__ */ x(l, { sx: { flexGrow: 1 } }),
|
|
30
|
+
/* @__PURE__ */ x(h, {
|
|
31
31
|
"aria-label": "Close",
|
|
32
|
-
onClick:
|
|
33
|
-
children: /* @__PURE__ */
|
|
32
|
+
onClick: O,
|
|
33
|
+
children: /* @__PURE__ */ x(a, {
|
|
34
34
|
icon: "close",
|
|
35
35
|
wrap: !1,
|
|
36
36
|
sx: { color: "grey.700" }
|
|
@@ -38,8 +38,8 @@ function C(C) {
|
|
|
38
38
|
})
|
|
39
39
|
]
|
|
40
40
|
}) }),
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ y
|
|
41
|
+
/* @__PURE__ */ S(f, { children: [
|
|
42
|
+
/* @__PURE__ */ x(y, {
|
|
43
43
|
variant: "body1",
|
|
44
44
|
sx: {
|
|
45
45
|
fontWeight: 700,
|
|
@@ -47,38 +47,38 @@ function C(C) {
|
|
|
47
47
|
},
|
|
48
48
|
children: "Take a minute to preview your DUC"
|
|
49
49
|
}),
|
|
50
|
-
/* @__PURE__ */ y
|
|
50
|
+
/* @__PURE__ */ x(y, {
|
|
51
51
|
variant: "body1",
|
|
52
52
|
sx: {
|
|
53
|
-
...
|
|
53
|
+
...o,
|
|
54
54
|
mb: 2
|
|
55
55
|
},
|
|
56
56
|
children: "Please ensure that all information is correct, as incorrect information will result in the rejection of your access request. Use the Back button to return to previous steps and modify any details."
|
|
57
57
|
}),
|
|
58
|
-
|
|
58
|
+
q && /* @__PURE__ */ x(g, {
|
|
59
59
|
variant: "rectangular",
|
|
60
60
|
width: "100%",
|
|
61
|
-
height:
|
|
61
|
+
height: w,
|
|
62
62
|
"data-testid": "EDucPreviewStep-loading"
|
|
63
63
|
}),
|
|
64
|
-
!
|
|
64
|
+
!q && (L || B) && /* @__PURE__ */ S(c, {
|
|
65
65
|
severity: "error",
|
|
66
66
|
children: [
|
|
67
|
-
/* @__PURE__ */
|
|
68
|
-
/* @__PURE__ */
|
|
69
|
-
|
|
67
|
+
/* @__PURE__ */ x("strong", { children: "Sorry, we couldn't load your DUC preview." }),
|
|
68
|
+
/* @__PURE__ */ x("br", {}),
|
|
69
|
+
L?.reason ?? B?.message
|
|
70
70
|
]
|
|
71
71
|
}),
|
|
72
|
-
!
|
|
72
|
+
!q && !L && !B && (M || z) && /* @__PURE__ */ x("iframe", {
|
|
73
73
|
title: "eDUC preview",
|
|
74
|
-
src:
|
|
74
|
+
src: M ?? z,
|
|
75
75
|
style: {
|
|
76
76
|
border: 0,
|
|
77
77
|
width: "100%",
|
|
78
|
-
height:
|
|
78
|
+
height: w
|
|
79
79
|
}
|
|
80
80
|
}),
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ S(l, {
|
|
82
82
|
sx: {
|
|
83
83
|
mt: 3,
|
|
84
84
|
border: "1px solid",
|
|
@@ -86,49 +86,59 @@ function C(C) {
|
|
|
86
86
|
borderRadius: 1
|
|
87
87
|
},
|
|
88
88
|
children: [
|
|
89
|
-
/* @__PURE__ */
|
|
89
|
+
/* @__PURE__ */ x(E, {
|
|
90
90
|
title: "Email DUC to Collaborators",
|
|
91
91
|
description: "Complete and sign the DUC online by emailing a secure DocuSign link to your listed collaborators. Notifications will be sent directly to the email address associated with their Synapse accounts. This is fastest way to get access.",
|
|
92
|
-
action: /* @__PURE__ */
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
92
|
+
action: /* @__PURE__ */ x(v, {
|
|
93
|
+
title: K ? `You have used all ${G?.quota ?? ""} of your electronic signature routings for this request. Please contact ACT to request a quota reset.` : "",
|
|
94
|
+
arrow: !0,
|
|
95
|
+
disableHoverListener: !K,
|
|
96
|
+
disableFocusListener: !K,
|
|
97
|
+
disableTouchListener: !K,
|
|
98
|
+
children: /* @__PURE__ */ x(l, {
|
|
99
|
+
component: "span",
|
|
100
|
+
children: /* @__PURE__ */ x(u, {
|
|
101
|
+
variant: "contained",
|
|
102
|
+
disabled: J || K,
|
|
103
|
+
onClick: Y,
|
|
104
|
+
children: H ? "Sending..." : "Send for electronic signature"
|
|
105
|
+
})
|
|
106
|
+
})
|
|
97
107
|
})
|
|
98
108
|
}),
|
|
99
|
-
/* @__PURE__ */
|
|
100
|
-
/* @__PURE__ */
|
|
109
|
+
/* @__PURE__ */ x(m, {}),
|
|
110
|
+
/* @__PURE__ */ x(E, {
|
|
101
111
|
title: "Print and upload a PDF instead",
|
|
102
112
|
description: "Download the DUC, sign it by hand, and upload the completed document.",
|
|
103
|
-
action: /* @__PURE__ */
|
|
113
|
+
action: /* @__PURE__ */ x(u, {
|
|
104
114
|
variant: "outlined",
|
|
105
|
-
disabled:
|
|
106
|
-
onClick:
|
|
115
|
+
disabled: J,
|
|
116
|
+
onClick: j,
|
|
107
117
|
children: "Manually print and upload PDF"
|
|
108
118
|
})
|
|
109
119
|
})
|
|
110
120
|
]
|
|
111
121
|
}),
|
|
112
|
-
|
|
122
|
+
U && /* @__PURE__ */ S(c, {
|
|
113
123
|
severity: "error",
|
|
114
124
|
sx: { mt: 2 },
|
|
115
125
|
children: [
|
|
116
|
-
/* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */
|
|
118
|
-
|
|
126
|
+
/* @__PURE__ */ x("strong", { children: "Sorry, we couldn't send your DUC for electronic signature." }),
|
|
127
|
+
/* @__PURE__ */ x("br", {}),
|
|
128
|
+
U.reason
|
|
119
129
|
]
|
|
120
130
|
})
|
|
121
131
|
] }),
|
|
122
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ x(d, { children: /* @__PURE__ */ x(u, {
|
|
123
133
|
variant: "outlined",
|
|
124
|
-
onClick:
|
|
134
|
+
onClick: k,
|
|
125
135
|
children: "Back"
|
|
126
136
|
}) })
|
|
127
137
|
] });
|
|
128
138
|
}
|
|
129
|
-
function
|
|
139
|
+
function E(e) {
|
|
130
140
|
let { title: t, description: n, action: r } = e;
|
|
131
|
-
return /* @__PURE__ */
|
|
141
|
+
return /* @__PURE__ */ S(_, {
|
|
132
142
|
direction: {
|
|
133
143
|
xs: "column",
|
|
134
144
|
sm: "row"
|
|
@@ -138,27 +148,27 @@ function w(e) {
|
|
|
138
148
|
gap: 2,
|
|
139
149
|
p: 2
|
|
140
150
|
},
|
|
141
|
-
children: [/* @__PURE__ */
|
|
151
|
+
children: [/* @__PURE__ */ S(l, {
|
|
142
152
|
sx: { flexGrow: 1 },
|
|
143
|
-
children: [/* @__PURE__ */ y
|
|
153
|
+
children: [/* @__PURE__ */ x(y, {
|
|
144
154
|
variant: "body1",
|
|
145
155
|
sx: {
|
|
146
156
|
fontWeight: 700,
|
|
147
157
|
mb: .5
|
|
148
158
|
},
|
|
149
159
|
children: t
|
|
150
|
-
}), /* @__PURE__ */ y
|
|
160
|
+
}), /* @__PURE__ */ x(y, {
|
|
151
161
|
variant: "body1",
|
|
152
|
-
sx:
|
|
162
|
+
sx: o,
|
|
153
163
|
children: n
|
|
154
164
|
})]
|
|
155
|
-
}), /* @__PURE__ */
|
|
165
|
+
}), /* @__PURE__ */ x(l, {
|
|
156
166
|
sx: { flexShrink: 0 },
|
|
157
167
|
children: r
|
|
158
168
|
})]
|
|
159
169
|
});
|
|
160
170
|
}
|
|
161
171
|
//#endregion
|
|
162
|
-
export {
|
|
172
|
+
export { T as default };
|
|
163
173
|
|
|
164
174
|
//# sourceMappingURL=EDucPreviewStep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EDucPreviewStep.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"sourcesContent":["import {\n useGetDataAccessRequestForUpdate,\n useGetDataAccessRequestPreview,\n useInitiateDataAccessRequestSignature,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport {\n Alert,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Skeleton,\n Stack,\n Typography,\n} from '@mui/material'\nimport {\n FileHandleAssociateType,\n ManagedACTAccessRequirement,\n} from '@sage-bionetworks/synapse-types'\nimport { ReactNode } from 'react'\nimport { useFetchBlobUrl } from '@/utils/hooks/useFetchBlobUrl'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport { longFieldLabelSx } from '../styles'\n\nconst PDF_PREVIEW_HEIGHT = '500px'\n\nexport type EDucPreviewStepProps = {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n onHide: () => void\n onBackClicked: () => void\n onSendForSignature: () => void\n onManualUpload: () => void\n /**\n * Optional iframe `src` override for demos and stories. When set, the blob fetch is skipped\n * and this URL is used directly as the iframe src. Production callers should not set this.\n */\n previewSrcOverride?: string\n}\n\n/**\n * Wizard step shown after the \"Review / Create a DUC\" step (PORTALS-4414).\n * Displays the generated eDUC document in an iframe so the user can review it\n * before sending it for electronic signature (PORTALS-4378) or manually printing and\n * uploading a signed PDF (PORTALS-4379).\n */\nexport default function EDucPreviewStep(props: EDucPreviewStepProps) {\n const {\n managedACTAccessRequirement,\n onHide,\n onBackClicked,\n onSendForSignature,\n onManualUpload,\n previewSrcOverride,\n } = props\n\n const { data: dataAccessRequest, isLoading: isLoadingDar } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n staleTime: Infinity,\n throwOnError: true,\n })\n\n const {\n data: previewFileHandle,\n isLoading: isLoadingPreview,\n error: previewError,\n } = useGetDataAccessRequestPreview(dataAccessRequest?.id ?? '', {\n enabled: Boolean(dataAccessRequest?.id),\n })\n\n const previewFileHandleId = previewFileHandle?.fileHandleId\n const { blobUrl, error: blobError } = useFetchBlobUrl(\n previewSrcOverride || !previewFileHandleId || !dataAccessRequest?.id\n ? undefined\n : SynapseClient.getPortalFileHandleServletUrl(\n previewFileHandleId,\n dataAccessRequest.id,\n FileHandleAssociateType.DataAccessRequestAttachment,\n ),\n )\n\n const {\n mutate: initiateSignature,\n isPending: isSendingForSignature,\n error: sendForSignatureError,\n reset: resetSendForSignature,\n } = useInitiateDataAccessRequestSignature({\n onSuccess: () => onSendForSignature(),\n })\n\n const isLoading =\n isLoadingDar ||\n (Boolean(dataAccessRequest?.id) && isLoadingPreview) ||\n (!previewSrcOverride && !!previewFileHandleId && !blobUrl && !blobError)\n const actionsDisabled =\n isLoading || (!previewSrcOverride && !blobUrl) || isSendingForSignature\n\n const handleSendForSignature = () => {\n if (!dataAccessRequest?.id) return\n resetSendForSignature()\n initiateSignature(dataAccessRequest.id)\n }\n\n return (\n <>\n <DialogTitle>\n <Stack direction=\"row\" sx={{ alignItems: 'center', gap: '5px' }}>\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton aria-label={'Close'} onClick={onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <Typography variant={'body1'} sx={{ fontWeight: 700, mb: 1 }}>\n Take a minute to preview your DUC\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n Please ensure that all information is correct, as incorrect\n information will result in the rejection of your access request. Use\n the Back button to return to previous steps and modify any details.\n </Typography>\n\n {isLoading && (\n <Skeleton\n variant={'rectangular'}\n width={'100%'}\n height={PDF_PREVIEW_HEIGHT}\n data-testid={'EDucPreviewStep-loading'}\n />\n )}\n {!isLoading && (previewError || blobError) && (\n <Alert severity={'error'}>\n <strong>Sorry, we couldn't load your DUC preview.</strong>\n <br />\n {previewError?.reason ?? blobError?.message}\n </Alert>\n )}\n {!isLoading &&\n !previewError &&\n !blobError &&\n (previewSrcOverride || blobUrl) && (\n <iframe\n title={'eDUC preview'}\n src={previewSrcOverride ?? blobUrl}\n style={{ border: 0, width: '100%', height: PDF_PREVIEW_HEIGHT }}\n />\n )}\n\n <Box\n sx={{\n mt: 3,\n border: '1px solid',\n borderColor: 'grey.300',\n borderRadius: 1,\n }}\n >\n <ActionRow\n title={'Email DUC to Collaborators'}\n description={\n 'Complete and sign the DUC online by emailing a secure DocuSign link to your listed collaborators. Notifications will be sent directly to the email address associated with their Synapse accounts. This is fastest way to get access.'\n }\n action={\n <Button\n variant={'contained'}\n disabled={actionsDisabled}\n onClick={handleSendForSignature}\n >\n {isSendingForSignature\n ? 'Sending...'\n : 'Send for electronic signature'}\n </Button>\n }\n />\n <Divider />\n <ActionRow\n title={'Print and upload a PDF instead'}\n description={\n 'Download the DUC, sign it by hand, and upload the completed document.'\n }\n action={\n <Button\n variant={'outlined'}\n disabled={actionsDisabled}\n onClick={onManualUpload}\n >\n Manually print and upload PDF\n </Button>\n }\n />\n </Box>\n {sendForSignatureError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>\n Sorry, we couldn't send your DUC for electronic signature.\n </strong>\n <br />\n {sendForSignatureError.reason}\n </Alert>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant={'outlined'} onClick={onBackClicked}>\n Back\n </Button>\n </DialogActions>\n </>\n )\n}\n\nfunction ActionRow(props: {\n title: string\n description: string\n action: ReactNode\n}) {\n const { title, description, action } = props\n return (\n <Stack\n direction={{ xs: 'column', sm: 'row' }}\n sx={{ alignItems: { sm: 'center' }, gap: 2, p: 2 }}\n >\n <Box sx={{ flexGrow: 1 }}>\n <Typography variant={'body1'} sx={{ fontWeight: 700, mb: 0.5 }}>\n {title}\n </Typography>\n <Typography variant={'body1'} sx={longFieldLabelSx}>\n {description}\n </Typography>\n </Box>\n <Box sx={{ flexShrink: 0 }}>{action}</Box>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;AA4BA,IAAM,IAAqB;AAqB3B,SAAwB,EAAgB,GAA6B;CACnE,IAAM,EACJ,gCACA,WACA,kBACA,uBACA,mBACA,0BACE,GAEE,EAAE,MAAM,GAAmB,WAAW,MAC1C,EAAiC,OAAO,EAA4B,EAAE,GAAG;EACvE,WAAW;EACX,cAAc;CAChB,CAAC,GAEG,EACJ,MAAM,GACN,WAAW,GACX,OAAO,MACL,EAA+B,GAAmB,MAAM,IAAI,EAC9D,SAAS,EAAQ,GAAmB,GACtC,CAAC,GAEK,IAAsB,GAAmB,cACzC,EAAE,YAAS,OAAO,MAAc,EACpC,KAAsB,CAAC,KAAuB,CAAC,GAAmB,KAC9D,KAAA,IACA,EAAc,8BACZ,GACA,EAAkB,IAClB,EAAwB,2BAC1B,CACN,GAEM,EACJ,QAAQ,GACR,WAAW,GACX,OAAO,GACP,OAAO,MACL,EAAsC,EACxC,iBAAiB,EAAmB,EACtC,CAAC,GAEK,IACJ,KACC,EAAQ,GAAmB,MAAO,KAClC,CAAC,KAAsB,CAAC,CAAC,KAAuB,CAAC,KAAW,CAAC,GAC1D,IACJ,KAAc,CAAC,KAAsB,CAAC,KAAY,GAE9C,UAA+B;EAC9B,GAAmB,OACxB,EAAsB,GACtB,EAAkB,EAAkB,EAAE;CACxC;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA;EACE,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;GAAO,WAAU;GAAM,IAAI;IAAE,YAAY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S;iBACV;MAEO,CAAA;KAEX,CAAA;IACE;;GACJ,KACC,kBAAC,GAAD;IAAO,UAAU;IAAS,IAAI,EAAE,IAAI,EAAE;cAAtC;KACE,kBAAC,UAAD,EAAA,UAAQ,6DAEA,CAAA;KACR,kBAAC,MAAD,CAAK,CAAA;KACJ,EAAsB;IAClB;;EAEI,EAAA,CAAA;EACf,kBAAC,GAAD,EAAA,UACE,kBAAC,GAAD;GAAQ,SAAS;GAAY,SAAS;aAAe;EAE7C,CAAA,EACK,CAAA;CACf,EAAA,CAAA;AAEN;AAEA,SAAS,EAAU,GAIhB;CACD,IAAM,EAAE,UAAO,gBAAa,cAAW;CACvC,OACE,kBAAC,GAAD;EACE,WAAW;GAAE,IAAI;GAAU,IAAI;EAAM;EACrC,IAAI;GAAE,YAAY,EAAE,IAAI,SAAS;GAAG,KAAK;GAAG,GAAG;EAAE;YAFnD,CAIE,kBAAC,GAAD;GAAK,IAAI,EAAE,UAAU,EAAE;aAAvB,CACE,kBAAC,GAAD;IAAY,SAAS;IAAS,IAAI;KAAE,YAAY;KAAK,IAAI;IAAI;cAC1D;GACS,CAAA,GACZ,kBAAC,GAAD;IAAY,SAAS;IAAS,IAAI;cAC/B;GACS,CAAA,CACT;MACL,kBAAC,GAAD;GAAK,IAAI,EAAE,YAAY,EAAE;aAAI;EAAY,CAAA,CACpC;;AAEX"}
|
|
1
|
+
{"version":3,"file":"EDucPreviewStep.js","names":[],"sources":["../../../../../src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.tsx"],"sourcesContent":["import {\n useGetDataAccessRequestForUpdate,\n useGetDataAccessRequestPreview,\n useGetDataAccessRequestSignatureQuota,\n useInitiateDataAccessRequestSignature,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport {\n Alert,\n Box,\n Button,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n IconButton,\n Skeleton,\n Stack,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport {\n FileHandleAssociateType,\n ManagedACTAccessRequirement,\n} from '@sage-bionetworks/synapse-types'\nimport { ReactNode } from 'react'\nimport { useFetchBlobUrl } from '@/utils/hooks/useFetchBlobUrl'\nimport IconSvg from '../../../IconSvg/IconSvg'\nimport { longFieldLabelSx } from '../styles'\n\nconst PDF_PREVIEW_HEIGHT = '500px'\n\nexport type EDucPreviewStepProps = {\n managedACTAccessRequirement: ManagedACTAccessRequirement\n onHide: () => void\n onBackClicked: () => void\n onSendForSignature: () => void\n onManualUpload: () => void\n /**\n * Optional iframe `src` override for demos and stories. When set, the blob fetch is skipped\n * and this URL is used directly as the iframe src. Production callers should not set this.\n */\n previewSrcOverride?: string\n}\n\n/**\n * Wizard step shown after the \"Review / Create a DUC\" step (PORTALS-4414).\n * Displays the generated eDUC document in an iframe so the user can review it\n * before sending it for electronic signature (PORTALS-4378) or manually printing and\n * uploading a signed PDF (PORTALS-4379).\n */\nexport default function EDucPreviewStep(props: EDucPreviewStepProps) {\n const {\n managedACTAccessRequirement,\n onHide,\n onBackClicked,\n onSendForSignature,\n onManualUpload,\n previewSrcOverride,\n } = props\n\n const { data: dataAccessRequest, isLoading: isLoadingDar } =\n useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {\n staleTime: Infinity,\n throwOnError: true,\n })\n\n const {\n data: previewFileHandle,\n isLoading: isLoadingPreview,\n error: previewError,\n } = useGetDataAccessRequestPreview(dataAccessRequest?.id ?? '', {\n enabled: Boolean(dataAccessRequest?.id),\n })\n\n const previewFileHandleId = previewFileHandle?.fileHandleId\n const { blobUrl, error: blobError } = useFetchBlobUrl(\n previewSrcOverride || !previewFileHandleId || !dataAccessRequest?.id\n ? undefined\n : SynapseClient.getPortalFileHandleServletUrl(\n previewFileHandleId,\n dataAccessRequest.id,\n FileHandleAssociateType.DataAccessRequestAttachment,\n ),\n )\n\n const {\n mutate: initiateSignature,\n isPending: isSendingForSignature,\n error: sendForSignatureError,\n reset: resetSendForSignature,\n } = useInitiateDataAccessRequestSignature({\n onSuccess: () => onSendForSignature(),\n })\n\n // Preflight the quota so we can disable the send-for-signature action when the user is at\n // or over their limit. A fetch error falls back to the current enabled behavior so a quota\n // service outage doesn't spuriously block valid requests.\n const { data: signatureQuota } = useGetDataAccessRequestSignatureQuota(\n dataAccessRequest?.id ?? '',\n { enabled: Boolean(dataAccessRequest?.id) },\n )\n const isAtOrOverQuota =\n signatureQuota != null &&\n signatureQuota.remaining != null &&\n signatureQuota.remaining <= 0\n\n const isLoading =\n isLoadingDar ||\n (Boolean(dataAccessRequest?.id) && isLoadingPreview) ||\n (!previewSrcOverride && !!previewFileHandleId && !blobUrl && !blobError)\n const actionsDisabled =\n isLoading || (!previewSrcOverride && !blobUrl) || isSendingForSignature\n\n const handleSendForSignature = () => {\n if (!dataAccessRequest?.id) return\n resetSendForSignature()\n initiateSignature(dataAccessRequest.id)\n }\n\n return (\n <>\n <DialogTitle>\n <Stack direction=\"row\" sx={{ alignItems: 'center', gap: '5px' }}>\n Request Access\n <Box sx={{ flexGrow: 1 }} />\n <IconButton aria-label={'Close'} onClick={onHide}>\n <IconSvg icon={'close'} wrap={false} sx={{ color: 'grey.700' }} />\n </IconButton>\n </Stack>\n </DialogTitle>\n <DialogContent>\n <Typography variant={'body1'} sx={{ fontWeight: 700, mb: 1 }}>\n Take a minute to preview your DUC\n </Typography>\n <Typography variant={'body1'} sx={{ ...longFieldLabelSx, mb: 2 }}>\n Please ensure that all information is correct, as incorrect\n information will result in the rejection of your access request. Use\n the Back button to return to previous steps and modify any details.\n </Typography>\n\n {isLoading && (\n <Skeleton\n variant={'rectangular'}\n width={'100%'}\n height={PDF_PREVIEW_HEIGHT}\n data-testid={'EDucPreviewStep-loading'}\n />\n )}\n {!isLoading && (previewError || blobError) && (\n <Alert severity={'error'}>\n <strong>Sorry, we couldn't load your DUC preview.</strong>\n <br />\n {previewError?.reason ?? blobError?.message}\n </Alert>\n )}\n {!isLoading &&\n !previewError &&\n !blobError &&\n (previewSrcOverride || blobUrl) && (\n <iframe\n title={'eDUC preview'}\n src={previewSrcOverride ?? blobUrl}\n style={{ border: 0, width: '100%', height: PDF_PREVIEW_HEIGHT }}\n />\n )}\n\n <Box\n sx={{\n mt: 3,\n border: '1px solid',\n borderColor: 'grey.300',\n borderRadius: 1,\n }}\n >\n <ActionRow\n title={'Email DUC to Collaborators'}\n description={\n 'Complete and sign the DUC online by emailing a secure DocuSign link to your listed collaborators. Notifications will be sent directly to the email address associated with their Synapse accounts. This is fastest way to get access.'\n }\n action={\n <Tooltip\n title={\n isAtOrOverQuota\n ? `You have used all ${signatureQuota?.quota ?? ''} of your electronic signature routings for this request. Please contact ACT to request a quota reset.`\n : ''\n }\n arrow\n disableHoverListener={!isAtOrOverQuota}\n disableFocusListener={!isAtOrOverQuota}\n disableTouchListener={!isAtOrOverQuota}\n >\n {/* Tooltip wrapper Box is needed because MUI Tooltip does not fire on disabled children directly. */}\n <Box component={'span'}>\n <Button\n variant={'contained'}\n disabled={actionsDisabled || isAtOrOverQuota}\n onClick={handleSendForSignature}\n >\n {isSendingForSignature\n ? 'Sending...'\n : 'Send for electronic signature'}\n </Button>\n </Box>\n </Tooltip>\n }\n />\n <Divider />\n <ActionRow\n title={'Print and upload a PDF instead'}\n description={\n 'Download the DUC, sign it by hand, and upload the completed document.'\n }\n action={\n <Button\n variant={'outlined'}\n disabled={actionsDisabled}\n onClick={onManualUpload}\n >\n Manually print and upload PDF\n </Button>\n }\n />\n </Box>\n {sendForSignatureError && (\n <Alert severity={'error'} sx={{ mt: 2 }}>\n <strong>\n Sorry, we couldn't send your DUC for electronic signature.\n </strong>\n <br />\n {sendForSignatureError.reason}\n </Alert>\n )}\n </DialogContent>\n <DialogActions>\n <Button variant={'outlined'} onClick={onBackClicked}>\n Back\n </Button>\n </DialogActions>\n </>\n )\n}\n\nfunction ActionRow(props: {\n title: string\n description: string\n action: ReactNode\n}) {\n const { title, description, action } = props\n return (\n <Stack\n direction={{ xs: 'column', sm: 'row' }}\n sx={{ alignItems: { sm: 'center' }, gap: 2, p: 2 }}\n >\n <Box sx={{ flexGrow: 1 }}>\n <Typography variant={'body1'} sx={{ fontWeight: 700, mb: 0.5 }}>\n {title}\n </Typography>\n <Typography variant={'body1'} sx={longFieldLabelSx}>\n {description}\n </Typography>\n </Box>\n <Box sx={{ flexShrink: 0 }}>{action}</Box>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;AA8BA,IAAM,IAAqB;AAqB3B,SAAwB,EAAgB,GAA6B;CACnE,IAAM,EACJ,gCACA,WACA,kBACA,uBACA,mBACA,0BACE,GAEE,EAAE,MAAM,GAAmB,WAAW,MAC1C,EAAiC,OAAO,EAA4B,EAAE,GAAG;EACvE,WAAW;EACX,cAAc;CAChB,CAAC,GAEG,EACJ,MAAM,GACN,WAAW,GACX,OAAO,MACL,EAA+B,GAAmB,MAAM,IAAI,EAC9D,SAAS,EAAQ,GAAmB,GACtC,CAAC,GAEK,IAAsB,GAAmB,cACzC,EAAE,YAAS,OAAO,MAAc,EACpC,KAAsB,CAAC,KAAuB,CAAC,GAAmB,KAC9D,KAAA,IACA,EAAc,8BACZ,GACA,EAAkB,IAClB,EAAwB,2BAC1B,CACN,GAEM,EACJ,QAAQ,GACR,WAAW,GACX,OAAO,GACP,OAAO,MACL,EAAsC,EACxC,iBAAiB,EAAmB,EACtC,CAAC,GAKK,EAAE,MAAM,MAAmB,EAC/B,GAAmB,MAAM,IACzB,EAAE,SAAS,EAAQ,GAAmB,GAAI,CAC5C,GACM,IACJ,KAAkB,QAClB,EAAe,aAAa,QAC5B,EAAe,aAAa,GAExB,IACJ,KACC,EAAQ,GAAmB,MAAO,KAClC,CAAC,KAAsB,CAAC,CAAC,KAAuB,CAAC,KAAW,CAAC,GAC1D,IACJ,KAAc,CAAC,KAAsB,CAAC,KAAY,GAE9C,UAA+B;EAC9B,GAAmB,OACxB,EAAsB,GACtB,EAAkB,EAAkB,EAAE;CACxC;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA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{ RequestListItem } from '@sage-bionetworks/aridhia-client/generated/models';
|
|
3
3
|
/**
|
|
4
4
|
* Maps an Aridhia request status to the appropriate RestrictionUiType for display.
|
|
5
5
|
*
|
|
6
6
|
* @param request - The Aridhia request object, or undefined if no request exists
|
|
7
7
|
* @returns The appropriate RestrictionUiType based on the request status
|
|
8
8
|
*/
|
|
9
|
-
export declare function getRestrictionUiTypeFromAridhiaRequest(request:
|
|
9
|
+
export declare function getRestrictionUiTypeFromAridhiaRequest(request: RequestListItem | undefined): RestrictionUiType;
|
|
10
10
|
/**
|
|
11
11
|
* Finds the Aridhia request for a specific dataset from a list of requests.
|
|
12
12
|
* If multiple requests match, returns the most recently updated one.
|
|
@@ -15,5 +15,5 @@ export declare function getRestrictionUiTypeFromAridhiaRequest(request: Request
|
|
|
15
15
|
* @param datasetCode - The dataset code to search for
|
|
16
16
|
* @returns The most recently updated request that contains the specified dataset, or undefined if not found
|
|
17
17
|
*/
|
|
18
|
-
export declare function findRequestForDataset(requests:
|
|
18
|
+
export declare function findRequestForDataset(requests: RequestListItem[], datasetCode: string): RequestListItem | undefined;
|
|
19
19
|
//# sourceMappingURL=aridhiaAccessStatusUtils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aridhiaAccessStatusUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Aridhia/aridhiaAccessStatusUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"aridhiaAccessStatusUtils.d.ts","sourceRoot":"","sources":["../../../src/components/Aridhia/aridhiaAccessStatusUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAA;AAEnF;;;;;GAKG;AACH,wBAAgB,sCAAsC,CACpD,OAAO,EAAE,eAAe,GAAG,SAAS,GACnC,iBAAiB,CAkBnB;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,eAAe,EAAE,EAC3B,WAAW,EAAE,MAAM,GAClB,eAAe,GAAG,SAAS,CAmB7B"}
|
|
@@ -11,7 +11,7 @@ function t(t) {
|
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
function n(e, t) {
|
|
14
|
-
let n = e.filter((e) => e.datasets?.
|
|
14
|
+
let n = e.filter((e) => e.datasets?.code === t);
|
|
15
15
|
if (n.length !== 0) return n.reduce((e, t) => e.updated_at ? t.updated_at && t.updated_at > e.updated_at ? t : e : t);
|
|
16
16
|
}
|
|
17
17
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aridhiaAccessStatusUtils.js","names":[],"sources":["../../../src/components/Aridhia/aridhiaAccessStatusUtils.ts"],"sourcesContent":["import { RestrictionUiType } from '../HasAccess/AccessIcon'\nimport {
|
|
1
|
+
{"version":3,"file":"aridhiaAccessStatusUtils.js","names":[],"sources":["../../../src/components/Aridhia/aridhiaAccessStatusUtils.ts"],"sourcesContent":["import { RestrictionUiType } from '../HasAccess/AccessIcon'\nimport { RequestListItem } from '@sage-bionetworks/aridhia-client/generated/models'\n\n/**\n * Maps an Aridhia request status to the appropriate RestrictionUiType for display.\n *\n * @param request - The Aridhia request object, or undefined if no request exists\n * @returns The appropriate RestrictionUiType based on the request status\n */\nexport function getRestrictionUiTypeFromAridhiaRequest(\n request: RequestListItem | undefined,\n): RestrictionUiType {\n if (!request) {\n // No request found - user needs to request access\n return RestrictionUiType.AccessBlockedByRestriction\n }\n\n switch (request.status) {\n case 'approved':\n return RestrictionUiType.Accessible\n case 'pending':\n return RestrictionUiType.AccessBlockedByRestrictionWithPendingRDCADAPRequest\n case 'denied':\n return RestrictionUiType.AccessBlockedByRestrictionWithRejectedRDCADAPRequest\n case 'error':\n return RestrictionUiType.AccessBlockedByACL\n default:\n return RestrictionUiType.AccessBlockedByRestriction\n }\n}\n\n/**\n * Finds the Aridhia request for a specific dataset from a list of requests.\n * If multiple requests match, returns the most recently updated one.\n *\n * @param requests - Array of Aridhia requests\n * @param datasetCode - The dataset code to search for\n * @returns The most recently updated request that contains the specified dataset, or undefined if not found\n */\nexport function findRequestForDataset(\n requests: RequestListItem[],\n datasetCode: string,\n): RequestListItem | undefined {\n const matchingRequests = requests.filter(\n request => request.datasets?.code === datasetCode,\n )\n\n if (matchingRequests.length === 0) {\n return undefined\n }\n\n // Return the most recently updated request\n return matchingRequests.reduce((mostRecent, current) => {\n if (!mostRecent.updated_at) {\n return current\n }\n if (!current.updated_at) {\n return mostRecent\n }\n return current.updated_at > mostRecent.updated_at ? current : mostRecent\n })\n}\n"],"mappings":";;AASA,SAAgB,EACd,GACmB;CACnB,IAAI,CAAC,GAEH,OAAO,EAAkB;CAG3B,QAAQ,EAAQ,QAAhB;EACE,KAAK,YACH,OAAO,EAAkB;EAC3B,KAAK,WACH,OAAO,EAAkB;EAC3B,KAAK,UACH,OAAO,EAAkB;EAC3B,KAAK,SACH,OAAO,EAAkB;EAC3B,SACE,OAAO,EAAkB;CAC7B;AACF;AAUA,SAAgB,EACd,GACA,GAC6B;CAC7B,IAAM,IAAmB,EAAS,QAChC,MAAW,EAAQ,UAAU,SAAS,CACxC;CAEI,MAAiB,WAAW,GAKhC,OAAO,EAAiB,QAAQ,GAAY,MACrC,EAAW,aAGX,EAAQ,cAGN,EAAQ,aAAa,EAAW,aAAa,IAAU,IALrD,CAMV;AACH"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CardLink } from '@/components/CardContainer/CardLink';
|
|
2
|
+
import { CardActionButtonStyle } from '@/components/GenericCard/CardActionButtonStyleContext';
|
|
2
3
|
import { ColumnIconConfigs, CTACardLink, DescriptionConfig, LabelLinkConfig } from '@/components/CardContainerLogic/CardContainerLogic';
|
|
3
4
|
import { TableToGenericCardMapping } from '@/components/GenericCard/TableRowGenericCard';
|
|
4
5
|
import { HeaderCardVariant } from '@/components/HeaderCard';
|
|
@@ -77,6 +78,13 @@ export type CommonCardProps = {
|
|
|
77
78
|
* @default 400
|
|
78
79
|
*/
|
|
79
80
|
charCountCutoff?: number;
|
|
81
|
+
/**
|
|
82
|
+
* Visual style for the card's action buttons (Download/hosting, Cite As,
|
|
83
|
+
* Croissant, Share): `'button'` (default, compact) or `'chip'` (pill-shaped,
|
|
84
|
+
* with the hosting action as a colored chip).
|
|
85
|
+
* @default 'button'
|
|
86
|
+
*/
|
|
87
|
+
actionButtonStyle?: CardActionButtonStyle;
|
|
80
88
|
};
|
|
81
89
|
export type CardConfiguration = CommonCardProps & (StandardCardTypeConfiguration | GenericCardConfiguration | ReleaseCardConfiguration | DatasetCardConfiguration);
|
|
82
90
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CardConfiguration.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainer/CardConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EAChB,MAAM,oDAAoD,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAGrD,KAAK,6BAA6B,GAAG;IACnC,iCAAiC;IACjC,IAAI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AAC,EAAE,KAAK,CAAC,aAAa,CAAC;QACtC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC9B,IAAI,EAAE,MAAM,EAAE,CAAA;KACf,CAAC,CAAA;IACF;;;OAGG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"CardConfiguration.d.ts","sourceRoot":"","sources":["../../../src/components/CardContainer/CardConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,qCAAqC,CAAA;AAC9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,uDAAuD,CAAA;AAC7F,OAAO,EACL,iBAAiB,EACjB,WAAW,EACX,iBAAiB,EACjB,eAAe,EAChB,MAAM,oDAAoD,CAAA;AAE3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AACxF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAA;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAA;AAClE,OAAO,EACL,OAAO,EACP,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACb,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAC1C,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAGrD,KAAK,6BAA6B,GAAG;IACnC,iCAAiC;IACjC,IAAI,EAAE,OAAO,MAAM,GAAG,OAAO,gBAAgB,GAAG,OAAO,gBAAgB,CAAA;CACxE,CAAA;AAED,KAAK,wBAAwB,GAAG;IAC9B,iCAAiC;IACjC,IAAI,EAAE,OAAO,YAAY,CAAA;IACzB,wDAAwD;IACxD,iBAAiB,EAAE,iBAAiB,CAAA;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rC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,qBAAqB,CAAA;CAC1C,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG,eAAe,GAC7C,CACI,6BAA6B,GAC7B,wBAAwB,GACxB,wBAAwB,GACxB,wBAAwB,CAC3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordWithToken.d.ts","sourceRoot":"","sources":["../../../src/components/ChangePassword/ChangePasswordWithToken.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;
|
|
1
|
+
{"version":3,"file":"ChangePasswordWithToken.d.ts","sourceRoot":"","sources":["../../../src/components/ChangePassword/ChangePasswordWithToken.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAA;AAM1E,KAAK,4BAA4B,GAAG;IAClC,mBAAmB,EAAE,wBAAwB,CAAA;IAC7C,SAAS,EAAE,MAAM,IAAI,CAAA;CACtB,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,uBAAuB,CAC7C,KAAK,EAAE,4BAA4B,2CAsIpC"}
|
|
@@ -1,52 +1,87 @@
|
|
|
1
1
|
import { displayToast as e } from "../ToastMessage/ToastMessage.js";
|
|
2
2
|
import { validatePassword as t } from "../../utils/functions/StringUtils.js";
|
|
3
3
|
import "../ToastMessage/index.js";
|
|
4
|
-
import n from "
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { BEGIN_RESET_2FA_BUTTON_TEXT as n } from "../Authentication/OneTimePasswordForm.js";
|
|
5
|
+
import r from "./useChangePasswordFormState.js";
|
|
6
|
+
import { useState as i } from "react";
|
|
7
|
+
import { Alert as a, Button as o, Link as s, TextField as c, Typography as l } from "@mui/material";
|
|
8
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
9
|
//#region src/components/ChangePassword/ChangePasswordWithToken.tsx
|
|
9
|
-
function
|
|
10
|
-
let { passwordChangeToken:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
function p(p) {
|
|
11
|
+
let { passwordChangeToken: m, onSuccess: h } = p, [g, _] = i(""), [v, y] = i(""), [b, x] = i(void 0), [S, C] = i(!1), { promptForTwoFactorAuth: w, TwoFactorAuthPrompt: T, isPending: E, handleChangePasswordWithResetToken: D, error: O } = r({
|
|
12
|
+
hideReset2FA: !0,
|
|
13
|
+
onChangePasswordSuccess: () => {
|
|
14
|
+
_(""), y(""), e("Password successfully changed.", "success"), h();
|
|
15
|
+
}
|
|
16
|
+
}), k = (t) => {
|
|
17
|
+
t.preventDefault(), g === v ? D(g, m) : e("Passwords do not match.", "danger");
|
|
14
18
|
};
|
|
15
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ f("div", { children: [w ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(T, {}), S ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ f(l, {
|
|
20
|
+
variant: "body1",
|
|
21
|
+
sx: { my: 2 },
|
|
22
|
+
align: "center",
|
|
23
|
+
children: [
|
|
24
|
+
"Because you're resetting your password by email, we can't verify your identity strongly enough to reset two-factor authentication here. Please contact the",
|
|
25
|
+
" ",
|
|
26
|
+
/* @__PURE__ */ d(s, {
|
|
27
|
+
target: "_blank",
|
|
28
|
+
rel: "noopener noreferrer",
|
|
29
|
+
href: "https://sagebionetworks.jira.com/servicedesk/customer/portal/9",
|
|
30
|
+
children: "Synapse Service Desk"
|
|
31
|
+
}),
|
|
32
|
+
" ",
|
|
33
|
+
"for help recovering your account."
|
|
34
|
+
]
|
|
35
|
+
}), /* @__PURE__ */ d(l, {
|
|
36
|
+
variant: "body1",
|
|
37
|
+
sx: { my: 2 },
|
|
38
|
+
align: "center",
|
|
39
|
+
children: "If you have a Google or ORCID account linked to your Synapse account, you may also be able to regain access by signing in with that account instead."
|
|
40
|
+
})] }) : /* @__PURE__ */ d(s, {
|
|
41
|
+
align: "center",
|
|
42
|
+
color: "grey.700",
|
|
43
|
+
sx: {
|
|
44
|
+
display: "block",
|
|
45
|
+
mx: "auto",
|
|
46
|
+
my: 2
|
|
47
|
+
},
|
|
48
|
+
onClick: () => C(!0),
|
|
49
|
+
children: n
|
|
50
|
+
})] }) : /* @__PURE__ */ f("form", {
|
|
16
51
|
onSubmit: (e) => {
|
|
17
|
-
|
|
52
|
+
k(e);
|
|
18
53
|
},
|
|
19
54
|
children: [
|
|
20
|
-
/* @__PURE__ */
|
|
55
|
+
/* @__PURE__ */ d(c, {
|
|
21
56
|
fullWidth: !0,
|
|
22
57
|
required: !0,
|
|
23
|
-
helperText:
|
|
58
|
+
helperText: b,
|
|
24
59
|
type: "password",
|
|
25
60
|
id: "newPassword",
|
|
26
61
|
name: "newPassword",
|
|
27
62
|
label: "New password",
|
|
28
63
|
onChange: (e) => {
|
|
29
|
-
|
|
64
|
+
x(t(e.target.value)), _(e.target.value);
|
|
30
65
|
},
|
|
31
|
-
value:
|
|
66
|
+
value: g || "",
|
|
32
67
|
sx: { mb: 2 }
|
|
33
68
|
}),
|
|
34
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ d(c, {
|
|
35
70
|
fullWidth: !0,
|
|
36
71
|
required: !0,
|
|
37
72
|
type: "password",
|
|
38
73
|
id: "confirmPassword",
|
|
39
74
|
name: "confirmPassword",
|
|
40
75
|
label: "Confirm password",
|
|
41
|
-
onChange: (e) =>
|
|
42
|
-
value:
|
|
76
|
+
onChange: (e) => y(e.target.value),
|
|
77
|
+
value: v || "",
|
|
43
78
|
sx: { mb: 2 }
|
|
44
79
|
}),
|
|
45
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ d(o, {
|
|
46
81
|
variant: "contained",
|
|
47
82
|
type: "submit",
|
|
48
83
|
fullWidth: !0,
|
|
49
|
-
disabled: !
|
|
84
|
+
disabled: !g || !v || E,
|
|
50
85
|
sx: {
|
|
51
86
|
mt: 3,
|
|
52
87
|
py: 2
|
|
@@ -54,13 +89,13 @@ function l(l) {
|
|
|
54
89
|
children: "Change Password"
|
|
55
90
|
})
|
|
56
91
|
]
|
|
57
|
-
}),
|
|
92
|
+
}), O && /* @__PURE__ */ d(a, {
|
|
58
93
|
severity: "error",
|
|
59
94
|
sx: { my: 2 },
|
|
60
|
-
children:
|
|
95
|
+
children: O.reason
|
|
61
96
|
})] });
|
|
62
97
|
}
|
|
63
98
|
//#endregion
|
|
64
|
-
export {
|
|
99
|
+
export { p as default };
|
|
65
100
|
|
|
66
101
|
//# sourceMappingURL=ChangePasswordWithToken.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChangePasswordWithToken.js","names":[],"sources":["../../../src/components/ChangePassword/ChangePasswordWithToken.tsx"],"sourcesContent":["import { validatePassword } from '@/utils/functions/StringUtils'\nimport { Alert, Button, TextField } from '@mui/material'\nimport { PasswordResetSignedToken } from '@sage-bionetworks/synapse-types'\nimport { FormEvent, useState } from 'react'\nimport { displayToast } from '../ToastMessage'\nimport useChangePasswordFormState from './useChangePasswordFormState'\n\ntype ChangePasswordWithTokenProps = {\n passwordChangeToken: PasswordResetSignedToken\n onSuccess: () => void\n}\n\nexport default function ChangePasswordWithToken(\n props: ChangePasswordWithTokenProps,\n) {\n const { passwordChangeToken, onSuccess } = props\n const [newPassword, setNewPassword] = useState<string>('')\n const [confirmPassword, setConfirmPassword] = useState<string>('')\n const [newPasswordError, setNewPasswordError] = useState<string | undefined>(\n undefined,\n )\n\n const {\n promptForTwoFactorAuth,\n TwoFactorAuthPrompt,\n isPending: changePasswordIsPending,\n handleChangePasswordWithResetToken,\n error,\n } = useChangePasswordFormState({\n onChangePasswordSuccess: () => {\n setNewPassword('')\n setConfirmPassword('')\n displayToast('Password successfully changed.', 'success')\n onSuccess()\n },\n })\n\n const handleChangePassword = (clickEvent: FormEvent<HTMLElement>) => {\n clickEvent.preventDefault()\n if (newPassword !== confirmPassword) {\n displayToast('Passwords do not match.', 'danger')\n } else {\n handleChangePasswordWithResetToken(newPassword, passwordChangeToken)\n }\n }\n\n return (\n <div>\n {promptForTwoFactorAuth ? (\n <TwoFactorAuthPrompt />\n ) : (\n <form\n onSubmit={e => {\n handleChangePassword(e)\n }}\n >\n <TextField\n fullWidth\n required\n helperText={newPasswordError}\n type=\"password\"\n id=\"newPassword\"\n name=\"newPassword\"\n label={'New password'}\n onChange={e => {\n const error = validatePassword(e.target.value)\n setNewPasswordError(error)\n setNewPassword(e.target.value)\n }}\n value={newPassword || ''}\n sx={{ mb: 2 }}\n />\n <TextField\n fullWidth\n required\n type=\"password\"\n id=\"confirmPassword\"\n name=\"confirmPassword\"\n label={'Confirm password'}\n onChange={e => setConfirmPassword(e.target.value)}\n value={confirmPassword || ''}\n sx={{ mb: 2 }}\n />\n <Button\n variant=\"contained\"\n type=\"submit\"\n fullWidth\n disabled={\n !newPassword || !confirmPassword || changePasswordIsPending\n }\n sx={{ mt: 3, py: 2 }}\n >\n Change Password\n </Button>\n </form>\n )}\n {error && (\n <Alert severity={'error'} sx={{ my: 2 }}>\n {error.reason}\n </Alert>\n )}\n </div>\n )\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChangePasswordWithToken.js","names":[],"sources":["../../../src/components/ChangePassword/ChangePasswordWithToken.tsx"],"sourcesContent":["import { validatePassword } from '@/utils/functions/StringUtils'\nimport { Alert, Button, Link, TextField, Typography } from '@mui/material'\nimport { PasswordResetSignedToken } from '@sage-bionetworks/synapse-types'\nimport { FormEvent, useState } from 'react'\nimport { BEGIN_RESET_2FA_BUTTON_TEXT } from '../Authentication/OneTimePasswordForm'\nimport { displayToast } from '../ToastMessage'\nimport useChangePasswordFormState from './useChangePasswordFormState'\n\ntype ChangePasswordWithTokenProps = {\n passwordChangeToken: PasswordResetSignedToken\n onSuccess: () => void\n}\n\nexport default function ChangePasswordWithToken(\n props: ChangePasswordWithTokenProps,\n) {\n const { passwordChangeToken, onSuccess } = props\n const [newPassword, setNewPassword] = useState<string>('')\n const [confirmPassword, setConfirmPassword] = useState<string>('')\n const [newPasswordError, setNewPasswordError] = useState<string | undefined>(\n undefined,\n )\n const [\n showTwoFactorAuthRecoveryGuidance,\n setShowTwoFactorAuthRecoveryGuidance,\n ] = useState(false)\n\n const {\n promptForTwoFactorAuth,\n TwoFactorAuthPrompt,\n isPending: changePasswordIsPending,\n handleChangePasswordWithResetToken,\n error,\n } = useChangePasswordFormState({\n // This flow authenticates via an emailed password-reset token: the user has no current\n // password, and their 2FA challenge token is scoped to PASSWORD_CHANGE, which the 2fa/reset\n // endpoint rejects (it only accepts a token from an AUTHENTICATION/login challenge, e.g. one\n // obtained by signing in with a linked SSO provider). There is no credential this flow can\n // offer to self-service reset 2FA, so we hide the interactive reset option (it would only\n // fail) and instead show guidance below.\n hideReset2FA: true,\n onChangePasswordSuccess: () => {\n setNewPassword('')\n setConfirmPassword('')\n displayToast('Password successfully changed.', 'success')\n onSuccess()\n },\n })\n\n const handleChangePassword = (clickEvent: FormEvent<HTMLElement>) => {\n clickEvent.preventDefault()\n if (newPassword !== confirmPassword) {\n displayToast('Passwords do not match.', 'danger')\n } else {\n handleChangePasswordWithResetToken(newPassword, passwordChangeToken)\n }\n }\n\n return (\n <div>\n {promptForTwoFactorAuth ? (\n <>\n <TwoFactorAuthPrompt />\n {!showTwoFactorAuthRecoveryGuidance ? (\n <Link\n align={'center'}\n color={'grey.700'}\n sx={{ display: 'block', mx: 'auto', my: 2 }}\n onClick={() => setShowTwoFactorAuthRecoveryGuidance(true)}\n >\n {BEGIN_RESET_2FA_BUTTON_TEXT}\n </Link>\n ) : (\n <>\n <Typography variant={'body1'} sx={{ my: 2 }} align={'center'}>\n Because you're resetting your password by email, we can't verify\n your identity strongly enough to reset two-factor authentication\n here. Please contact the{' '}\n <Link\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n href=\"https://sagebionetworks.jira.com/servicedesk/customer/portal/9\"\n >\n Synapse Service Desk\n </Link>{' '}\n for help recovering your account.\n </Typography>\n <Typography variant={'body1'} sx={{ my: 2 }} align={'center'}>\n If you have a Google or ORCID account linked to your Synapse\n account, you may also be able to regain access by signing in\n with that account instead.\n </Typography>\n </>\n )}\n </>\n ) : (\n <form\n onSubmit={e => {\n handleChangePassword(e)\n }}\n >\n <TextField\n fullWidth\n required\n helperText={newPasswordError}\n type=\"password\"\n id=\"newPassword\"\n name=\"newPassword\"\n label={'New password'}\n onChange={e => {\n const error = validatePassword(e.target.value)\n setNewPasswordError(error)\n setNewPassword(e.target.value)\n }}\n value={newPassword || ''}\n sx={{ mb: 2 }}\n />\n <TextField\n fullWidth\n required\n type=\"password\"\n id=\"confirmPassword\"\n name=\"confirmPassword\"\n label={'Confirm password'}\n onChange={e => setConfirmPassword(e.target.value)}\n value={confirmPassword || ''}\n sx={{ mb: 2 }}\n />\n <Button\n variant=\"contained\"\n type=\"submit\"\n fullWidth\n disabled={\n !newPassword || !confirmPassword || changePasswordIsPending\n }\n sx={{ mt: 3, py: 2 }}\n >\n Change Password\n </Button>\n </form>\n )}\n {error && (\n <Alert severity={'error'} sx={{ my: 2 }}>\n {error.reason}\n </Alert>\n )}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;AAaA,SAAwB,EACtB,GACA;CACA,IAAM,EAAE,wBAAqB,iBAAc,GACrC,CAAC,GAAa,KAAkB,EAAiB,EAAE,GACnD,CAAC,GAAiB,KAAsB,EAAiB,EAAE,GAC3D,CAAC,GAAkB,KAAuB,EAC9C,KAAA,CACF,GACM,CACJ,GACA,KACE,EAAS,EAAK,GAEZ,EACJ,2BACA,wBACA,WAAW,GACX,uCACA,aACE,EAA2B;EAO7B,cAAc;EACd,+BAA+B;GAI7B,AAHA,EAAe,EAAE,GACjB,EAAmB,EAAE,GACrB,EAAa,kCAAkC,SAAS,GACxD,EAAU;EACZ;CACF,CAAC,GAEK,KAAwB,MAAuC;EAEnE,AADA,EAAW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A;IACA,UACE,CAAC,KAAe,CAAC,KAAmB;IAEtC,IAAI;KAAE,IAAI;KAAG,IAAI;IAAE;cACpB;GAEO,CAAA;EACJ;KAEP,KACC,kBAAC,GAAD;EAAO,UAAU;EAAS,IAAI,EAAE,IAAI,EAAE;YACnC,EAAM;CACF,CAAA,CAEN,EAAA,CAAA;AAET"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useChangePasswordFormState.d.ts","sourceRoot":"","sources":["../../../src/components/ChangePassword/useChangePasswordFormState.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,wBAAwB,EAGzB,MAAM,iCAAiC,CAAA;AAQxC,eAAO,MAAM,sCAAsC,2GACuD,CAAA;AAE1G,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAA;CACrC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,OAAO,CAAC,EAAE,iCAAiC;;;;;;wDAuC9B,MAAM,mBAAmB,MAAM,eAAe,MAAM;sDAgBjD,MAAM,uBAAuB,wBAAwB;
|
|
1
|
+
{"version":3,"file":"useChangePasswordFormState.d.ts","sourceRoot":"","sources":["../../../src/components/ChangePassword/useChangePasswordFormState.tsx"],"names":[],"mappings":"AAKA,OAAO,EAIL,wBAAwB,EAGzB,MAAM,iCAAiC,CAAA;AAQxC,eAAO,MAAM,sCAAsC,2GACuD,CAAA;AAE1G,MAAM,MAAM,iCAAiC,GAAG;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAA;CACrC,CAAA;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,0BAA0B,CAChD,OAAO,CAAC,EAAE,iCAAiC;;;;;;wDAuC9B,MAAM,mBAAmB,MAAM,eAAe,MAAM;sDAgBjD,MAAM,uBAAuB,wBAAwB;EAwItE"}
|
|
@@ -37,7 +37,7 @@ function p(f) {
|
|
|
37
37
|
otpType: n,
|
|
38
38
|
otpCode: t
|
|
39
39
|
});
|
|
40
|
-
}, [w, v]), A = !!v, { mutate: j, isSuccess: M, isPending: N } = r(),
|
|
40
|
+
}, [w, v]), A = !!v, { mutate: j, isSuccess: M, isPending: N, error: P } = r(), F = a((e) => {
|
|
41
41
|
v && j({
|
|
42
42
|
userId: v.userId,
|
|
43
43
|
twoFaResetEndpoint: e,
|
|
@@ -81,7 +81,7 @@ function p(f) {
|
|
|
81
81
|
x("DISABLE_2FA_PROMPT");
|
|
82
82
|
},
|
|
83
83
|
onClickReset2FA: () => {
|
|
84
|
-
|
|
84
|
+
F(p);
|
|
85
85
|
},
|
|
86
86
|
twoFactorAuthResetIsPending: N,
|
|
87
87
|
twoFactorAuthResetIsSuccess: M
|
|
@@ -95,15 +95,25 @@ function p(f) {
|
|
|
95
95
|
severity: "warning",
|
|
96
96
|
sx: { my: 2 },
|
|
97
97
|
children: [/* @__PURE__ */ u("strong", { children: "Your password has not been changed." }), " To disable two-factor authentication, you may be required to enter your current password after clicking the link sent to your email address."]
|
|
98
|
+
}),
|
|
99
|
+
b === "DISABLE_2FA_PROMPT" && P && /* @__PURE__ */ d(s, {
|
|
100
|
+
severity: "error",
|
|
101
|
+
sx: { my: 2 },
|
|
102
|
+
children: [
|
|
103
|
+
"Failed to reset two-factor authentication:",
|
|
104
|
+
" ",
|
|
105
|
+
P.reason
|
|
106
|
+
]
|
|
98
107
|
})
|
|
99
108
|
] }) : /* @__PURE__ */ u(l, {}), [
|
|
100
|
-
|
|
109
|
+
F,
|
|
101
110
|
k,
|
|
102
111
|
T,
|
|
103
112
|
g,
|
|
104
113
|
f?.hideReset2FA,
|
|
105
114
|
b,
|
|
106
115
|
A,
|
|
116
|
+
P,
|
|
107
117
|
N,
|
|
108
118
|
M,
|
|
109
119
|
p
|