synapse-react-client 3.1.37 → 3.1.38
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/index.d.ts +2 -1
- package/dist/index.js +216 -160
- package/dist/index.mjs +611 -555
- package/dist/umd/synapse-react-client.development.js +228 -172
- package/dist/umd/synapse-react-client.development.js.map +3 -3
- package/dist/umd/synapse-react-client.production.min.js +74 -74
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -31356,7 +31356,7 @@ __export(components_exports, {
|
|
|
31356
31356
|
});
|
|
31357
31357
|
|
|
31358
31358
|
// src/components/AccessTokenPage/AccessTokenPage.tsx
|
|
31359
|
-
import React358, { useState as
|
|
31359
|
+
import React358, { useState as useState83 } from "react";
|
|
31360
31360
|
|
|
31361
31361
|
// src/synapse-queries/user/usePersonalAccessToken.ts
|
|
31362
31362
|
import {
|
|
@@ -31470,7 +31470,7 @@ var LoadingScreen_default = loadingScreen;
|
|
|
31470
31470
|
|
|
31471
31471
|
// src/components/AccessTokenPage/AccessTokenCard.tsx
|
|
31472
31472
|
import dayjs9 from "dayjs";
|
|
31473
|
-
import React355, { useState as
|
|
31473
|
+
import React355, { useState as useState82 } from "react";
|
|
31474
31474
|
import { useErrorHandler as useErrorHandler2 } from "react-error-boundary";
|
|
31475
31475
|
import DeleteTwoToneIcon from "@mui/icons-material/DeleteTwoTone";
|
|
31476
31476
|
|
|
@@ -32570,7 +32570,7 @@ import React352 from "react";
|
|
|
32570
32570
|
import React351 from "react";
|
|
32571
32571
|
|
|
32572
32572
|
// src/components/Markdown/MarkdownPopover.tsx
|
|
32573
|
-
import React350, { useState as
|
|
32573
|
+
import React350, { useState as useState81 } from "react";
|
|
32574
32574
|
|
|
32575
32575
|
// src/components/Markdown/MarkdownSynapse.tsx
|
|
32576
32576
|
import React348 from "react";
|
|
@@ -38424,10 +38424,10 @@ import React276 from "react";
|
|
|
38424
38424
|
import React275 from "react";
|
|
38425
38425
|
|
|
38426
38426
|
// src/components/DownloadCart/MeetAccessRequirementCard.tsx
|
|
38427
|
-
import React272, { useState as
|
|
38427
|
+
import React272, { useState as useState57 } from "react";
|
|
38428
38428
|
|
|
38429
38429
|
// src/components/AccessRequirementList/AccessRequirementList.tsx
|
|
38430
|
-
import React235, { useMemo as useMemo27, useState as
|
|
38430
|
+
import React235, { useMemo as useMemo27, useState as useState56 } from "react";
|
|
38431
38431
|
|
|
38432
38432
|
// src/components/Authentication/StandaloneLoginForm.tsx
|
|
38433
38433
|
import React206 from "react";
|
|
@@ -39118,7 +39118,7 @@ function ResearchProjectForm(props) {
|
|
|
39118
39118
|
}
|
|
39119
39119
|
|
|
39120
39120
|
// src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm.tsx
|
|
39121
|
-
import React219, { useState as
|
|
39121
|
+
import React219, { useEffect as useEffect46, useState as useState51 } from "react";
|
|
39122
39122
|
|
|
39123
39123
|
// src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.tsx
|
|
39124
39124
|
import React214 from "react";
|
|
@@ -39439,6 +39439,7 @@ function DataAccessRequestAccessorsEditor(props) {
|
|
|
39439
39439
|
/* @__PURE__ */ React214.createElement(IconSvg_default, { icon: "clear" })
|
|
39440
39440
|
),
|
|
39441
39441
|
// Renewal/Revoke data access, only display if isRenewal is true
|
|
39442
|
+
// TODO: It's possible to that the accessors list is in an illegal state with no way to recover -- see PLFM-7893
|
|
39442
39443
|
isRenewal && user?.ownerId !== ac.userId && ac.type !== "GAIN_ACCESS" /* GAIN_ACCESS */ && /* @__PURE__ */ React214.createElement(React214.Fragment, null, /* @__PURE__ */ React214.createElement(
|
|
39443
39444
|
RadioGroup,
|
|
39444
39445
|
{
|
|
@@ -39471,7 +39472,8 @@ var FileUpload = (props) => {
|
|
|
39471
39472
|
id,
|
|
39472
39473
|
buttonProps = { variant: "contained" },
|
|
39473
39474
|
label = "Browse...",
|
|
39474
|
-
|
|
39475
|
+
onUploadStart,
|
|
39476
|
+
onComplete
|
|
39475
39477
|
} = props;
|
|
39476
39478
|
const { accessToken } = useSynapseContext();
|
|
39477
39479
|
const hiddenFileInput = React215.useRef(null);
|
|
@@ -39482,6 +39484,9 @@ var FileUpload = (props) => {
|
|
|
39482
39484
|
};
|
|
39483
39485
|
const changeHandler = async (e) => {
|
|
39484
39486
|
if (e.target.files && e.target.files.length > 0) {
|
|
39487
|
+
if (onUploadStart) {
|
|
39488
|
+
onUploadStart();
|
|
39489
|
+
}
|
|
39485
39490
|
const file = e.target.files[0];
|
|
39486
39491
|
try {
|
|
39487
39492
|
const resp = await uploadFile(
|
|
@@ -39489,16 +39494,16 @@ var FileUpload = (props) => {
|
|
|
39489
39494
|
file.name,
|
|
39490
39495
|
file
|
|
39491
39496
|
);
|
|
39492
|
-
if (
|
|
39493
|
-
|
|
39497
|
+
if (onComplete) {
|
|
39498
|
+
onComplete({
|
|
39494
39499
|
success: true,
|
|
39495
39500
|
resp
|
|
39496
39501
|
});
|
|
39497
39502
|
}
|
|
39498
39503
|
} catch (e2) {
|
|
39499
39504
|
console.log("FileUpload: fail to upload file", e2);
|
|
39500
|
-
if (
|
|
39501
|
-
|
|
39505
|
+
if (onComplete) {
|
|
39506
|
+
onComplete({
|
|
39502
39507
|
success: false,
|
|
39503
39508
|
error: e2
|
|
39504
39509
|
});
|
|
@@ -39534,16 +39539,12 @@ function DirectDownloadButton(props) {
|
|
|
39534
39539
|
includeFileHandles: false,
|
|
39535
39540
|
includePreviewPreSignedURLs: false
|
|
39536
39541
|
};
|
|
39537
|
-
|
|
39538
|
-
|
|
39539
|
-
|
|
39540
|
-
|
|
39541
|
-
|
|
39542
|
-
|
|
39543
|
-
window.open(preSignedURL);
|
|
39544
|
-
}
|
|
39545
|
-
} catch (e) {
|
|
39546
|
-
console.log("Fail to get file download link", e);
|
|
39542
|
+
const file = await getFiles(batchFileRequest, accessToken);
|
|
39543
|
+
const preSignedURL = file.requestedFiles[0].preSignedURL;
|
|
39544
|
+
if (!preSignedURL) {
|
|
39545
|
+
console.log("Fail to get file download link");
|
|
39546
|
+
} else {
|
|
39547
|
+
window.open(preSignedURL);
|
|
39547
39548
|
}
|
|
39548
39549
|
};
|
|
39549
39550
|
return /* @__PURE__ */ React216.createElement(
|
|
@@ -39560,7 +39561,7 @@ function DirectDownloadButton(props) {
|
|
|
39560
39561
|
var DirectDownloadButton_default = DirectDownloadButton;
|
|
39561
39562
|
|
|
39562
39563
|
// src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.tsx
|
|
39563
|
-
import React217 from "react";
|
|
39564
|
+
import React217, { useState as useState50 } from "react";
|
|
39564
39565
|
function UploadDocumentField(props) {
|
|
39565
39566
|
const {
|
|
39566
39567
|
fileHandleAssociations = [],
|
|
@@ -39568,8 +39569,10 @@ function UploadDocumentField(props) {
|
|
|
39568
39569
|
id,
|
|
39569
39570
|
documentName,
|
|
39570
39571
|
isMultiFileUpload = false,
|
|
39571
|
-
onClearAttachment
|
|
39572
|
+
onClearAttachment,
|
|
39573
|
+
isLoading = false
|
|
39572
39574
|
} = props;
|
|
39575
|
+
const [isUploading, setIsUploading] = useState50(false);
|
|
39573
39576
|
const { data: fileData } = useGetFileBatch(
|
|
39574
39577
|
{
|
|
39575
39578
|
includeFileHandles: true,
|
|
@@ -39594,9 +39597,14 @@ function UploadDocumentField(props) {
|
|
|
39594
39597
|
FileUpload_default,
|
|
39595
39598
|
{
|
|
39596
39599
|
id: `${id}-upload`,
|
|
39597
|
-
|
|
39600
|
+
onUploadStart: () => setIsUploading(true),
|
|
39601
|
+
onComplete: (res) => {
|
|
39602
|
+
setIsUploading(false);
|
|
39603
|
+
uploadCallback(res);
|
|
39604
|
+
},
|
|
39598
39605
|
label: `Upload ${documentName}`,
|
|
39599
39606
|
buttonProps: {
|
|
39607
|
+
disabled: isLoading,
|
|
39600
39608
|
variant: "outlined",
|
|
39601
39609
|
endIcon: /* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "upload", wrap: false })
|
|
39602
39610
|
}
|
|
@@ -39630,7 +39638,16 @@ function UploadDocumentField(props) {
|
|
|
39630
39638
|
},
|
|
39631
39639
|
/* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "clear" })
|
|
39632
39640
|
));
|
|
39633
|
-
})
|
|
39641
|
+
}),
|
|
39642
|
+
isUploading && /* @__PURE__ */ React217.createElement(
|
|
39643
|
+
Button_default,
|
|
39644
|
+
{
|
|
39645
|
+
disabled: true,
|
|
39646
|
+
variant: "text",
|
|
39647
|
+
endIcon: /* @__PURE__ */ React217.createElement(IconSvg_default, { icon: "download", wrap: false })
|
|
39648
|
+
},
|
|
39649
|
+
"Uploading..."
|
|
39650
|
+
)
|
|
39634
39651
|
);
|
|
39635
39652
|
}
|
|
39636
39653
|
|
|
@@ -39679,6 +39696,23 @@ function DocumentTemplate(props) {
|
|
|
39679
39696
|
}
|
|
39680
39697
|
|
|
39681
39698
|
// src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm.tsx
|
|
39699
|
+
import { deepEquals } from "@rjsf/utils";
|
|
39700
|
+
function AccessorRequirementHelpText(props) {
|
|
39701
|
+
const { managedACTAccessRequirement } = props;
|
|
39702
|
+
let link = "";
|
|
39703
|
+
let msg = "";
|
|
39704
|
+
if (managedACTAccessRequirement.isCertifiedUserRequired && managedACTAccessRequirement.isValidatedProfileRequired) {
|
|
39705
|
+
link = "https://help.synapse.org/docs/User-Types.2007072795.html";
|
|
39706
|
+
msg = "All data requesters must be certified users and have a validated user profile.";
|
|
39707
|
+
} else if (managedACTAccessRequirement.isCertifiedUserRequired) {
|
|
39708
|
+
link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers";
|
|
39709
|
+
msg = "All data requesters must be a certified user.";
|
|
39710
|
+
} else if (managedACTAccessRequirement.isValidatedProfileRequired) {
|
|
39711
|
+
link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers";
|
|
39712
|
+
msg = "All data requesters must have a validated user profile.";
|
|
39713
|
+
}
|
|
39714
|
+
return link && msg ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, managedACTAccessRequirement.isDUCRequired ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, "This list should match those listed on your DUC.", /* @__PURE__ */ React219.createElement("br", null)) : "", msg, " ", /* @__PURE__ */ React219.createElement(Link_default, { href: link, target: "_blank", rel: "noreferrer" }, "Learn more")) : /* @__PURE__ */ React219.createElement(React219.Fragment, null);
|
|
39715
|
+
}
|
|
39682
39716
|
function DataAccessRequestAccessorsFilesForm(props) {
|
|
39683
39717
|
const {
|
|
39684
39718
|
onSubmissionCreated,
|
|
@@ -39687,45 +39721,19 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39687
39721
|
researchProjectId,
|
|
39688
39722
|
onCancel
|
|
39689
39723
|
} = props;
|
|
39690
|
-
const {
|
|
39691
|
-
const
|
|
39692
|
-
const
|
|
39693
|
-
|
|
39694
|
-
|
|
39695
|
-
|
|
39724
|
+
const { accessToken } = useSynapseContext();
|
|
39725
|
+
const isLoggedIn = Boolean(accessToken);
|
|
39726
|
+
const { data: user } = useGetCurrentUserProfile({ enabled: isLoggedIn });
|
|
39727
|
+
const [alert2, setAlert] = useState51();
|
|
39728
|
+
const [accessorChanges, setAccessorChanges] = useState51();
|
|
39729
|
+
const [summaryOfUse, setSummaryOfUse] = useState51();
|
|
39730
|
+
const [publication, setPublication] = useState51();
|
|
39731
|
+
const { data: dataAccessRequest, isLoading: isLoadingGetDataAccessRequest } = useGetDataAccessRequestForUpdate(String(managedACTAccessRequirement.id), {
|
|
39732
|
+
enabled: isLoggedIn,
|
|
39696
39733
|
// Infinite staleTime ensures this won't get re-fetched unless explicitly invalidated by the mutation
|
|
39697
39734
|
staleTime: Infinity,
|
|
39698
|
-
|
|
39699
|
-
|
|
39700
|
-
const currentUserWithGainAccess = {
|
|
39701
|
-
userId: user.ownerId,
|
|
39702
|
-
type: isRenewal2 ? "RENEW_ACCESS" /* RENEW_ACCESS */ : "GAIN_ACCESS" /* GAIN_ACCESS */
|
|
39703
|
-
};
|
|
39704
|
-
if (!data.accessorChanges) {
|
|
39705
|
-
data.accessorChanges = [currentUserWithGainAccess];
|
|
39706
|
-
} else {
|
|
39707
|
-
data.accessorChanges = [
|
|
39708
|
-
currentUserWithGainAccess,
|
|
39709
|
-
...data.accessorChanges
|
|
39710
|
-
];
|
|
39711
|
-
}
|
|
39712
|
-
const seen = /* @__PURE__ */ new Set();
|
|
39713
|
-
data.accessorChanges = data.accessorChanges.filter((accessorChange) => {
|
|
39714
|
-
return seen.has(accessorChange.userId) ? false : seen.add(accessorChange.userId);
|
|
39715
|
-
});
|
|
39716
|
-
data.researchProjectId = researchProjectId;
|
|
39717
|
-
return data;
|
|
39718
|
-
},
|
|
39719
|
-
onSuccess: (data) => {
|
|
39720
|
-
setAlert(void 0);
|
|
39721
|
-
setDataAccessRequest(data);
|
|
39722
|
-
},
|
|
39723
|
-
onError: (err) => {
|
|
39724
|
-
setAlert({
|
|
39725
|
-
key: "error",
|
|
39726
|
-
message: err.reason
|
|
39727
|
-
});
|
|
39728
|
-
}
|
|
39735
|
+
// This call should never fail, so if we run into an error, throwing to an error boundary is acceptable
|
|
39736
|
+
useErrorBoundary: true
|
|
39729
39737
|
});
|
|
39730
39738
|
const isRenewal = dataAccessRequest?.concreteType === "org.sagebionetworks.repo.model.dataaccess.Renewal";
|
|
39731
39739
|
function onError(e) {
|
|
@@ -39735,18 +39743,87 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39735
39743
|
message: getErrorMessage(e.reason)
|
|
39736
39744
|
});
|
|
39737
39745
|
}
|
|
39738
|
-
const { mutate: submit } = useSubmitDataAccessRequest({
|
|
39746
|
+
const { mutate: submit, isLoading: isLoadingSubmitDataAccessRequest } = useSubmitDataAccessRequest({
|
|
39739
39747
|
onSuccess: () => {
|
|
39740
39748
|
onSubmissionCreated();
|
|
39741
39749
|
},
|
|
39742
39750
|
onError
|
|
39743
39751
|
});
|
|
39744
|
-
const {
|
|
39752
|
+
const {
|
|
39753
|
+
mutateAsync: updateRequestAsync,
|
|
39754
|
+
isLoading: isLoadingUpdateDataAccessRequest
|
|
39755
|
+
} = useUpdateDataAccessRequest({
|
|
39745
39756
|
onError
|
|
39746
39757
|
});
|
|
39758
|
+
const isLoading = isLoadingGetDataAccessRequest || isLoadingUpdateDataAccessRequest || isLoadingSubmitDataAccessRequest;
|
|
39759
|
+
useEffect46(() => {
|
|
39760
|
+
if (dataAccessRequest && user) {
|
|
39761
|
+
let shouldUpdate = false;
|
|
39762
|
+
if (!dataAccessRequest.researchProjectId) {
|
|
39763
|
+
dataAccessRequest.researchProjectId = researchProjectId;
|
|
39764
|
+
shouldUpdate = true;
|
|
39765
|
+
}
|
|
39766
|
+
const currentUserWithGainAccess = {
|
|
39767
|
+
userId: user.ownerId,
|
|
39768
|
+
type: isRenewal ? "RENEW_ACCESS" /* RENEW_ACCESS */ : "GAIN_ACCESS" /* GAIN_ACCESS */
|
|
39769
|
+
};
|
|
39770
|
+
if (!dataAccessRequest.accessorChanges || !dataAccessRequest.accessorChanges.find(
|
|
39771
|
+
(item) => deepEquals(item, currentUserWithGainAccess)
|
|
39772
|
+
)) {
|
|
39773
|
+
dataAccessRequest.accessorChanges = [
|
|
39774
|
+
currentUserWithGainAccess,
|
|
39775
|
+
...dataAccessRequest.accessorChanges || []
|
|
39776
|
+
];
|
|
39777
|
+
shouldUpdate = true;
|
|
39778
|
+
}
|
|
39779
|
+
const seen = /* @__PURE__ */ new Set();
|
|
39780
|
+
const uniqueAccessorChanges = dataAccessRequest.accessorChanges.filter(
|
|
39781
|
+
(accessorChange) => {
|
|
39782
|
+
return seen.has(accessorChange.userId) ? false : seen.add(accessorChange.userId);
|
|
39783
|
+
}
|
|
39784
|
+
);
|
|
39785
|
+
if (uniqueAccessorChanges.length !== dataAccessRequest.accessorChanges.length) {
|
|
39786
|
+
dataAccessRequest.accessorChanges = uniqueAccessorChanges;
|
|
39787
|
+
shouldUpdate = true;
|
|
39788
|
+
}
|
|
39789
|
+
if (shouldUpdate) {
|
|
39790
|
+
updateRequestAsync(dataAccessRequest);
|
|
39791
|
+
}
|
|
39792
|
+
}
|
|
39793
|
+
}, [
|
|
39794
|
+
dataAccessRequest,
|
|
39795
|
+
isRenewal,
|
|
39796
|
+
researchProjectId,
|
|
39797
|
+
updateRequestAsync,
|
|
39798
|
+
user
|
|
39799
|
+
]);
|
|
39800
|
+
useEffect46(() => {
|
|
39801
|
+
if (dataAccessRequest) {
|
|
39802
|
+
if (dataAccessRequest.accessorChanges && accessorChanges == void 0) {
|
|
39803
|
+
setAccessorChanges(dataAccessRequest.accessorChanges);
|
|
39804
|
+
}
|
|
39805
|
+
if (isRenewal && dataAccessRequest.publication && publication == void 0) {
|
|
39806
|
+
setPublication(dataAccessRequest.publication);
|
|
39807
|
+
}
|
|
39808
|
+
if (isRenewal && dataAccessRequest.summaryOfUse && summaryOfUse == void 0) {
|
|
39809
|
+
setSummaryOfUse(dataAccessRequest.summaryOfUse);
|
|
39810
|
+
}
|
|
39811
|
+
}
|
|
39812
|
+
}, [dataAccessRequest]);
|
|
39813
|
+
function getDataAccessRequestWithLocalState() {
|
|
39814
|
+
return {
|
|
39815
|
+
...dataAccessRequest,
|
|
39816
|
+
// append local state to the request
|
|
39817
|
+
accessorChanges,
|
|
39818
|
+
publication,
|
|
39819
|
+
summaryOfUse
|
|
39820
|
+
};
|
|
39821
|
+
}
|
|
39747
39822
|
async function handleSubmit() {
|
|
39748
39823
|
if (dataAccessRequest) {
|
|
39749
|
-
const requestObject = await updateRequestAsync(
|
|
39824
|
+
const requestObject = await updateRequestAsync(
|
|
39825
|
+
getDataAccessRequestWithLocalState()
|
|
39826
|
+
);
|
|
39750
39827
|
submit({
|
|
39751
39828
|
request: {
|
|
39752
39829
|
requestId: requestObject.id,
|
|
@@ -39762,41 +39839,30 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39762
39839
|
return /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement("strong", null, "Sorry, there is an error in submitting your request."), /* @__PURE__ */ React219.createElement("br", null), reason);
|
|
39763
39840
|
};
|
|
39764
39841
|
const onAccessorChange = (updater) => {
|
|
39765
|
-
|
|
39766
|
-
...req,
|
|
39767
|
-
// Copy the array so the caller doesn't have to worry about immutability
|
|
39768
|
-
accessorChanges: [...updater(req.accessorChanges || [])]
|
|
39769
|
-
}));
|
|
39842
|
+
setAccessorChanges([...updater(accessorChanges || [])]);
|
|
39770
39843
|
};
|
|
39771
39844
|
const onClearAttachment = (fid) => {
|
|
39772
|
-
|
|
39773
|
-
|
|
39774
|
-
|
|
39775
|
-
...req,
|
|
39776
|
-
attachments: req.attachments?.filter((item) => item !== fid)
|
|
39777
|
-
};
|
|
39778
|
-
}
|
|
39779
|
-
return req;
|
|
39845
|
+
updateRequestAsync({
|
|
39846
|
+
...dataAccessRequest,
|
|
39847
|
+
attachments: dataAccessRequest.attachments?.filter((item) => item !== fid)
|
|
39780
39848
|
});
|
|
39781
39849
|
};
|
|
39782
39850
|
const uploadCallback = (data, context) => {
|
|
39783
39851
|
if (data.resp && data.success) {
|
|
39784
39852
|
const uploadResponse = data.resp;
|
|
39785
39853
|
if (context === "attachments") {
|
|
39786
|
-
|
|
39787
|
-
|
|
39788
|
-
|
|
39789
|
-
attachments
|
|
39790
|
-
|
|
39791
|
-
|
|
39792
|
-
]
|
|
39793
|
-
};
|
|
39854
|
+
updateRequestAsync({
|
|
39855
|
+
...dataAccessRequest,
|
|
39856
|
+
attachments: [
|
|
39857
|
+
...dataAccessRequest.attachments || [],
|
|
39858
|
+
uploadResponse.fileHandleId
|
|
39859
|
+
]
|
|
39794
39860
|
});
|
|
39795
39861
|
} else {
|
|
39796
|
-
|
|
39797
|
-
...
|
|
39862
|
+
updateRequestAsync({
|
|
39863
|
+
...dataAccessRequest,
|
|
39798
39864
|
[context]: uploadResponse.fileHandleId
|
|
39799
|
-
})
|
|
39865
|
+
});
|
|
39800
39866
|
}
|
|
39801
39867
|
} else if (!data.success && data.error) {
|
|
39802
39868
|
console.log(
|
|
@@ -39809,46 +39875,24 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39809
39875
|
});
|
|
39810
39876
|
}
|
|
39811
39877
|
};
|
|
39812
|
-
const handleTextAreaInputChange = (e, key) => {
|
|
39813
|
-
const value = e.target.value;
|
|
39814
|
-
setDataAccessRequest((req) => ({
|
|
39815
|
-
...req,
|
|
39816
|
-
[key]: value
|
|
39817
|
-
}));
|
|
39818
|
-
};
|
|
39819
|
-
const AccessorRequirementHelpText = () => {
|
|
39820
|
-
let link = "";
|
|
39821
|
-
let msg = "";
|
|
39822
|
-
if (managedACTAccessRequirement.isCertifiedUserRequired && managedACTAccessRequirement.isValidatedProfileRequired) {
|
|
39823
|
-
link = "https://help.synapse.org/docs/User-Types.2007072795.html";
|
|
39824
|
-
msg = "All data requesters must be certified users and have a validated user profile.";
|
|
39825
|
-
} else if (managedACTAccessRequirement.isCertifiedUserRequired) {
|
|
39826
|
-
link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers";
|
|
39827
|
-
msg = "All data requesters must be a certified user.";
|
|
39828
|
-
} else if (managedACTAccessRequirement.isValidatedProfileRequired) {
|
|
39829
|
-
link = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers";
|
|
39830
|
-
msg = "All data requesters must have a validated user profile.";
|
|
39831
|
-
}
|
|
39832
|
-
return link && msg ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, managedACTAccessRequirement.isDUCRequired ? /* @__PURE__ */ React219.createElement(React219.Fragment, null, "This list should match those listed on your DUC.", /* @__PURE__ */ React219.createElement("br", null)) : "", msg, " ", /* @__PURE__ */ React219.createElement(Link_default, { href: link, target: "_blank", rel: "noreferrer" }, "Learn more")) : /* @__PURE__ */ React219.createElement(React219.Fragment, null);
|
|
39833
|
-
};
|
|
39834
39878
|
const ducFileHandleAssociation = dataAccessRequest?.ducFileHandleId ? [
|
|
39835
39879
|
{
|
|
39836
39880
|
fileHandleId: dataAccessRequest?.ducFileHandleId,
|
|
39837
|
-
associateObjectType: "
|
|
39838
|
-
associateObjectId: String(
|
|
39881
|
+
associateObjectType: "DataAccessRequestAttachment" /* DataAccessRequestAttachment */,
|
|
39882
|
+
associateObjectId: String(dataAccessRequest.id)
|
|
39839
39883
|
}
|
|
39840
39884
|
] : [];
|
|
39841
39885
|
const irbFileHandleAssociation = dataAccessRequest?.irbFileHandleId ? [
|
|
39842
39886
|
{
|
|
39843
39887
|
fileHandleId: dataAccessRequest.irbFileHandleId,
|
|
39844
|
-
associateObjectType: "
|
|
39845
|
-
associateObjectId: String(
|
|
39888
|
+
associateObjectType: "DataAccessRequestAttachment" /* DataAccessRequestAttachment */,
|
|
39889
|
+
associateObjectId: String(dataAccessRequest.id)
|
|
39846
39890
|
}
|
|
39847
39891
|
] : [];
|
|
39848
39892
|
const attachmentFileHandleAssociations = (dataAccessRequest?.attachments || []).map((attachmentFileHandleId) => ({
|
|
39849
39893
|
fileHandleId: attachmentFileHandleId,
|
|
39850
|
-
associateObjectType: "
|
|
39851
|
-
associateObjectId: String(
|
|
39894
|
+
associateObjectType: "DataAccessRequestAttachment" /* DataAccessRequestAttachment */,
|
|
39895
|
+
associateObjectId: String(dataAccessRequest.id)
|
|
39852
39896
|
})) ?? [];
|
|
39853
39897
|
return /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(DialogTitle_default, null, /* @__PURE__ */ React219.createElement(Stack_default, { direction: "row", alignItems: "center", gap: "5px" }, "Request Access", /* @__PURE__ */ React219.createElement(Box_default, { sx: { flexGrow: 1 } }), /* @__PURE__ */ React219.createElement(IconButton_default, { onClick: props.onHide }, /* @__PURE__ */ React219.createElement(IconSvg_default, { icon: "close", wrap: false, sx: { color: "grey.700" } })))), /* @__PURE__ */ React219.createElement(DialogContent_default, null, /* @__PURE__ */ React219.createElement(
|
|
39854
39898
|
ManagedACTAccessRequirementFormWikiWrapper,
|
|
@@ -39866,13 +39910,18 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39866
39910
|
onSubmit: (e) => e.preventDefault()
|
|
39867
39911
|
},
|
|
39868
39912
|
/* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { mb: 2 } }, "Please provide the information below to submit the request for access."),
|
|
39869
|
-
dataAccessRequest && /* @__PURE__ */ React219.createElement(
|
|
39913
|
+
dataAccessRequest && user && /* @__PURE__ */ React219.createElement(
|
|
39870
39914
|
DataAccessRequestAccessorsEditor,
|
|
39871
39915
|
{
|
|
39872
|
-
accessorChanges:
|
|
39916
|
+
accessorChanges: accessorChanges || [],
|
|
39873
39917
|
onChange: onAccessorChange,
|
|
39874
39918
|
isRenewal,
|
|
39875
|
-
helpText: /* @__PURE__ */ React219.createElement(
|
|
39919
|
+
helpText: /* @__PURE__ */ React219.createElement(
|
|
39920
|
+
AccessorRequirementHelpText,
|
|
39921
|
+
{
|
|
39922
|
+
managedACTAccessRequirement
|
|
39923
|
+
}
|
|
39924
|
+
)
|
|
39876
39925
|
}
|
|
39877
39926
|
),
|
|
39878
39927
|
(managedACTAccessRequirement?.isDUCRequired || managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } }),
|
|
@@ -39888,56 +39937,61 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39888
39937
|
},
|
|
39889
39938
|
downloadButtonText: "Download DUC Template"
|
|
39890
39939
|
}
|
|
39891
|
-
), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { mt: 4, mb: 2 } }, "Fill out and upload a Data Use Certificate"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must download and fill out a Data Use Certificate (DUC). Be sure to upload the completed DUC below once you've completed it."), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", component: "ol" }, /* @__PURE__ */ React219.createElement("li", null, "Download the DUC template file."), /* @__PURE__ */ React219.createElement("li", null, "Fill out the DUC template, following the instructions in the file."), /* @__PURE__ */ React219.createElement("li", null, "Upload the completed certificate using the button below:")), /* @__PURE__ */ React219.createElement(
|
|
39940
|
+
), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { mt: 4, mb: 2 } }, "Fill out and upload a Data Use Certificate"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must download and fill out a Data Use Certificate (DUC). Be sure to upload the completed DUC below once you've completed it."), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", component: "ol" }, /* @__PURE__ */ React219.createElement("li", null, "Download the DUC template file."), /* @__PURE__ */ React219.createElement("li", null, "Fill out the DUC template, following the instructions in the file."), /* @__PURE__ */ React219.createElement("li", null, "Upload the completed certificate using the button below:")), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
|
|
39892
39941
|
UploadDocumentField,
|
|
39893
39942
|
{
|
|
39894
39943
|
id: "duc",
|
|
39944
|
+
isLoading,
|
|
39895
39945
|
uploadCallback: (resp) => uploadCallback(resp, "ducFileHandleId"),
|
|
39896
39946
|
documentName: "Data Use Certificate",
|
|
39897
39947
|
fileHandleAssociations: ducFileHandleAssociation
|
|
39898
39948
|
}
|
|
39899
|
-
), (managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39900
|
-
managedACTAccessRequirement?.isIRBApprovalRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "IRB Approval"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "Upload a signed IRB letter on institutional letterhead. The letter must include the names of all the datasets requested, as well as the names of the data requesters above. Use the button below to upload the document."), /* @__PURE__ */ React219.createElement(
|
|
39949
|
+
)), (managedACTAccessRequirement?.isIRBApprovalRequired || managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39950
|
+
managedACTAccessRequirement?.isIRBApprovalRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "IRB Approval"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "Upload a signed IRB letter on institutional letterhead. The letter must include the names of all the datasets requested, as well as the names of the data requesters above. Use the button below to upload the document."), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
|
|
39901
39951
|
UploadDocumentField,
|
|
39902
39952
|
{
|
|
39903
39953
|
id: "irb",
|
|
39954
|
+
isLoading,
|
|
39904
39955
|
documentName: "IRB Approval Letter",
|
|
39905
39956
|
uploadCallback: (resp) => uploadCallback(resp, "irbFileHandleId"),
|
|
39906
39957
|
fileHandleAssociations: irbFileHandleAssociation
|
|
39907
39958
|
}
|
|
39908
|
-
), (managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39959
|
+
)), (managedACTAccessRequirement?.areOtherAttachmentsRequired || isRenewal) && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39909
39960
|
/* Attachments */
|
|
39910
|
-
managedACTAccessRequirement?.areOtherAttachmentsRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "Upload other required documents"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must upload other required documents. Please review the instructions to gain data access to determine which documents must also be uploaded."), /* @__PURE__ */ React219.createElement(
|
|
39961
|
+
managedACTAccessRequirement?.areOtherAttachmentsRequired && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(Typography_default, { variant: "headline3", sx: { my: 2 } }, "Upload other required documents"), /* @__PURE__ */ React219.createElement(Typography_default, { variant: "body1", sx: { my: 2 } }, "You must upload other required documents. Please review the instructions to gain data access to determine which documents must also be uploaded."), /* @__PURE__ */ React219.createElement(SynapseErrorBoundary, null, /* @__PURE__ */ React219.createElement(
|
|
39911
39962
|
UploadDocumentField,
|
|
39912
39963
|
{
|
|
39913
39964
|
id: "file-attachment",
|
|
39965
|
+
isLoading,
|
|
39914
39966
|
documentName: "Attachment",
|
|
39915
39967
|
uploadCallback: (res) => uploadCallback(res, "attachments"),
|
|
39916
39968
|
isMultiFileUpload: true,
|
|
39917
39969
|
fileHandleAssociations: attachmentFileHandleAssociations,
|
|
39918
39970
|
onClearAttachment
|
|
39919
39971
|
}
|
|
39920
|
-
), isRenewal && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39972
|
+
)), isRenewal && /* @__PURE__ */ React219.createElement(Divider_default, { sx: { my: 4 } })),
|
|
39921
39973
|
// Publications & Summary of Use
|
|
39922
39974
|
isRenewal && /* @__PURE__ */ React219.createElement(React219.Fragment, null, /* @__PURE__ */ React219.createElement(
|
|
39923
39975
|
TextField3,
|
|
39924
39976
|
{
|
|
39925
39977
|
id: "publications",
|
|
39926
39978
|
label: "Publication(s)",
|
|
39979
|
+
disabled: isLoadingSubmitDataAccessRequest,
|
|
39927
39980
|
multiline: true,
|
|
39928
39981
|
rows: 3,
|
|
39929
|
-
value:
|
|
39930
|
-
onChange: (e) =>
|
|
39982
|
+
value: publication,
|
|
39983
|
+
onChange: (e) => setPublication(e.target.value)
|
|
39931
39984
|
}
|
|
39932
39985
|
), /* @__PURE__ */ React219.createElement(
|
|
39933
39986
|
TextField3,
|
|
39934
39987
|
{
|
|
39935
39988
|
id: "summaryOfUse",
|
|
39936
39989
|
label: "Summary of use",
|
|
39937
|
-
value:
|
|
39990
|
+
value: summaryOfUse,
|
|
39991
|
+
disabled: isLoadingSubmitDataAccessRequest,
|
|
39938
39992
|
multiline: true,
|
|
39939
39993
|
rows: 3,
|
|
39940
|
-
onChange: (e) =>
|
|
39994
|
+
onChange: (e) => setSummaryOfUse(e.target.value)
|
|
39941
39995
|
}
|
|
39942
39996
|
))
|
|
39943
39997
|
)
|
|
@@ -39945,9 +39999,10 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39945
39999
|
Button_default,
|
|
39946
40000
|
{
|
|
39947
40001
|
variant: "outlined",
|
|
40002
|
+
disabled: isLoadingSubmitDataAccessRequest,
|
|
39948
40003
|
onClick: () => {
|
|
39949
40004
|
if (dataAccessRequest) {
|
|
39950
|
-
onCancel(
|
|
40005
|
+
onCancel(getDataAccessRequestWithLocalState());
|
|
39951
40006
|
}
|
|
39952
40007
|
}
|
|
39953
40008
|
},
|
|
@@ -39956,6 +40011,7 @@ function DataAccessRequestAccessorsFilesForm(props) {
|
|
|
39956
40011
|
Button_default,
|
|
39957
40012
|
{
|
|
39958
40013
|
variant: "contained",
|
|
40014
|
+
disabled: isLoadingSubmitDataAccessRequest,
|
|
39959
40015
|
onClick: () => {
|
|
39960
40016
|
handleSubmit();
|
|
39961
40017
|
}
|
|
@@ -40182,7 +40238,7 @@ function ValidationRequirement() {
|
|
|
40182
40238
|
import React230 from "react";
|
|
40183
40239
|
|
|
40184
40240
|
// src/components/Authentication/TwoFactorEnrollmentForm.tsx
|
|
40185
|
-
import React229, { useEffect as
|
|
40241
|
+
import React229, { useEffect as useEffect47, useRef as useRef36, useState as useState52 } from "react";
|
|
40186
40242
|
|
|
40187
40243
|
// src/components/styled/LeftRightPanel.tsx
|
|
40188
40244
|
import React227 from "react";
|
|
@@ -40330,9 +40386,9 @@ var SectionInnerGrid = styled_default(
|
|
|
40330
40386
|
var TWO_FACTOR_DOCS_LINK = "https://help.synapse.org/docs/Managing-Your-Account.2055405596.html#Adding-Two-Factor-Authentication-(2FA)-to-your-account";
|
|
40331
40387
|
function TwoFactorEnrollmentForm(props) {
|
|
40332
40388
|
const { onTwoFactorEnrollmentSuccess, onBackClicked } = props;
|
|
40333
|
-
const [totp, setTotp] =
|
|
40334
|
-
const [hasQrCode, setHasQrCode] =
|
|
40335
|
-
const [showSecretInModal, setShowSecretInModal] =
|
|
40389
|
+
const [totp, setTotp] = useState52("");
|
|
40390
|
+
const [hasQrCode, setHasQrCode] = useState52(false);
|
|
40391
|
+
const [showSecretInModal, setShowSecretInModal] = useState52(false);
|
|
40336
40392
|
const { data: currentUserEmail } = useGetNotificationEmail();
|
|
40337
40393
|
const qrCodeCanvasElement = useRef36(null);
|
|
40338
40394
|
const { mutate: start2FAEnrollment2, data: totpSecret } = useStartTwoFactorEnrollment();
|
|
@@ -40343,10 +40399,10 @@ function TwoFactorEnrollmentForm(props) {
|
|
|
40343
40399
|
} = useFinishTwoFactorEnrollment({
|
|
40344
40400
|
onSuccess: onTwoFactorEnrollmentSuccess
|
|
40345
40401
|
});
|
|
40346
|
-
|
|
40402
|
+
useEffect47(() => {
|
|
40347
40403
|
start2FAEnrollment2();
|
|
40348
40404
|
}, []);
|
|
40349
|
-
|
|
40405
|
+
useEffect47(() => {
|
|
40350
40406
|
async function createQrCode() {
|
|
40351
40407
|
if (totpSecret && currentUserEmail && qrCodeCanvasElement.current) {
|
|
40352
40408
|
await toCanvas(
|
|
@@ -40534,13 +40590,13 @@ function TwoFactorAuthEnabledRequirement() {
|
|
|
40534
40590
|
}
|
|
40535
40591
|
|
|
40536
40592
|
// src/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.tsx
|
|
40537
|
-
import React231, { useState as
|
|
40593
|
+
import React231, { useState as useState53 } from "react";
|
|
40538
40594
|
function UnmanagedACTAccessRequirementItem(props) {
|
|
40539
40595
|
const { accessRequirement, entityId, onHide } = props;
|
|
40540
40596
|
const { accessToken } = useSynapseContext();
|
|
40541
40597
|
const { data: accessRequirementStatus, isLoading: isLoadingStatus } = useGetAccessRequirementStatus(String(accessRequirement.id));
|
|
40542
40598
|
const isApproved = accessRequirementStatus?.isApproved;
|
|
40543
|
-
const [showACTContactInfoInstructions, setShowACTContactInfoInstructions] =
|
|
40599
|
+
const [showACTContactInfoInstructions, setShowACTContactInfoInstructions] = useState53(false);
|
|
40544
40600
|
let acceptButtonText = "";
|
|
40545
40601
|
if (window.location.hostname === "www.synapse.org" || window.location.hostname === "staging.synapse.org") {
|
|
40546
40602
|
acceptButtonText = "Request access";
|
|
@@ -40596,7 +40652,7 @@ function UnmanagedACTAccessRequirementItem(props) {
|
|
|
40596
40652
|
|
|
40597
40653
|
// src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManagedACTAccessRequirementItem.tsx
|
|
40598
40654
|
import React232 from "react";
|
|
40599
|
-
import { useState as
|
|
40655
|
+
import { useState as useState54 } from "react";
|
|
40600
40656
|
function ManagedACTAccessRequirementItem(props) {
|
|
40601
40657
|
const { accessRequirement, onHide, onRequestAccess } = props;
|
|
40602
40658
|
const { data: wikiPage } = useGetAccessRequirementWikiPageKey(
|
|
@@ -40614,8 +40670,8 @@ function ManagedACTAccessRequirementItem(props) {
|
|
|
40614
40670
|
});
|
|
40615
40671
|
}
|
|
40616
40672
|
});
|
|
40617
|
-
const [hideMarkdown, setHideMarkdown] =
|
|
40618
|
-
const [alert2, setAlert] =
|
|
40673
|
+
const [hideMarkdown, setHideMarkdown] = useState54(true);
|
|
40674
|
+
const [alert2, setAlert] = useState54();
|
|
40619
40675
|
const isApproved = accessRequirementStatus?.currentSubmissionStatus?.state === "APPROVED" /* APPROVED */;
|
|
40620
40676
|
let markdown = /* @__PURE__ */ React232.createElement(React232.Fragment, null);
|
|
40621
40677
|
if (wikiPage) {
|
|
@@ -40735,7 +40791,7 @@ function ManagedACTAccessRequirementItem(props) {
|
|
|
40735
40791
|
import React234 from "react";
|
|
40736
40792
|
|
|
40737
40793
|
// src/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.tsx
|
|
40738
|
-
import React233, { useState as
|
|
40794
|
+
import React233, { useState as useState55 } from "react";
|
|
40739
40795
|
function SelfSignAccessRequirementItem(props) {
|
|
40740
40796
|
const { accessRequirement, onHide } = props;
|
|
40741
40797
|
const { accessToken } = useSynapseContext();
|
|
@@ -40752,7 +40808,7 @@ function SelfSignAccessRequirementItem(props) {
|
|
|
40752
40808
|
// TermsOfUse ARs have the terms embedded in the AR, there is no Wiki.
|
|
40753
40809
|
{ enabled: !isTermsOfUse }
|
|
40754
40810
|
);
|
|
40755
|
-
const [showTerms, setShowTerms] =
|
|
40811
|
+
const [showTerms, setShowTerms] = useState55(false);
|
|
40756
40812
|
const {
|
|
40757
40813
|
mutate: createAccessApproval2,
|
|
40758
40814
|
isLoading,
|
|
@@ -40905,12 +40961,12 @@ function AccessRequirementList(props) {
|
|
|
40905
40961
|
} = props;
|
|
40906
40962
|
const { accessToken } = useSynapseContext();
|
|
40907
40963
|
const isSignedIn = !!accessToken;
|
|
40908
|
-
const [requestDataStep, setRequestDataStep] =
|
|
40964
|
+
const [requestDataStep, setRequestDataStep] = useState56(
|
|
40909
40965
|
0 /* SHOW_ALL_ARS */
|
|
40910
40966
|
);
|
|
40911
|
-
const [managedACTAccessRequirement, setManagedACTAccessRequirement] =
|
|
40912
|
-
const [researchProjectId, setResearchProjectId] =
|
|
40913
|
-
const [dataAccessRequest, setDataAccessRequest] =
|
|
40967
|
+
const [managedACTAccessRequirement, setManagedACTAccessRequirement] = useState56();
|
|
40968
|
+
const [researchProjectId, setResearchProjectId] = useState56("");
|
|
40969
|
+
const [dataAccessRequest, setDataAccessRequest] = useState56();
|
|
40914
40970
|
const entityHeaderProps = {
|
|
40915
40971
|
ids: [entityId],
|
|
40916
40972
|
type: "ENTITY_HEADER"
|
|
@@ -41879,7 +41935,7 @@ var MeetAccessRequirementCard = ({ accessRequirementId, count }) => {
|
|
|
41879
41935
|
accessRequirementId,
|
|
41880
41936
|
{ useErrorBoundary: true }
|
|
41881
41937
|
);
|
|
41882
|
-
const [isShowingAccessRequirement, setIsShowingAccessRequirement] =
|
|
41938
|
+
const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState57(false);
|
|
41883
41939
|
let title = void 0;
|
|
41884
41940
|
let iconType = "";
|
|
41885
41941
|
let description = "";
|
|
@@ -41983,7 +42039,7 @@ var RequestDownloadCard = ({
|
|
|
41983
42039
|
};
|
|
41984
42040
|
|
|
41985
42041
|
// src/components/DownloadCart/EnableTwoFaRequirementCard.tsx
|
|
41986
|
-
import React274, { useState as
|
|
42042
|
+
import React274, { useState as useState58 } from "react";
|
|
41987
42043
|
var REQUIRES_2FA_CARD_TITLE = "Requires Two-Factor Authentication";
|
|
41988
42044
|
function EnableTwoFaRequirementCard(props) {
|
|
41989
42045
|
const { accessRequirementId, count } = props;
|
|
@@ -41993,7 +42049,7 @@ function EnableTwoFaRequirementCard(props) {
|
|
|
41993
42049
|
useErrorBoundary: true
|
|
41994
42050
|
}
|
|
41995
42051
|
);
|
|
41996
|
-
const [isShowingAccessRequirement, setIsShowingAccessRequirement] =
|
|
42052
|
+
const [isShowingAccessRequirement, setIsShowingAccessRequirement] = useState58(false);
|
|
41997
42053
|
return /* @__PURE__ */ React274.createElement(React274.Fragment, null, /* @__PURE__ */ React274.createElement(
|
|
41998
42054
|
ActionRequiredCard,
|
|
41999
42055
|
{
|
|
@@ -42338,7 +42394,7 @@ var SearchV2_default = Search2;
|
|
|
42338
42394
|
|
|
42339
42395
|
// src/components/SqlEditor.tsx
|
|
42340
42396
|
import { SearchTwoTone as SearchTwoTone2 } from "@mui/icons-material";
|
|
42341
|
-
import React279, { useEffect as
|
|
42397
|
+
import React279, { useEffect as useEffect48, useRef as useRef37, useState as useState59 } from "react";
|
|
42342
42398
|
var helpMessageCopy = "The data within tables and views can be retrieved by using a SQL-like query language either from the web interface or from the programmatic clients.";
|
|
42343
42399
|
var helpLink = "https://help.synapse.org/docs/Querying-Tables,-Views,-and-Datasets.2667642897.html#QueryingTables,Views,andDatasets-UsingAdvancedSearchQueries";
|
|
42344
42400
|
var SqlEditor = ({
|
|
@@ -42349,9 +42405,9 @@ var SqlEditor = ({
|
|
|
42349
42405
|
const {
|
|
42350
42406
|
topLevelControlsState: { showSqlEditor, showFacetFilter }
|
|
42351
42407
|
} = useQueryVisualizationContext();
|
|
42352
|
-
const [sql, setSql] =
|
|
42408
|
+
const [sql, setSql] = useState59("");
|
|
42353
42409
|
const inputRef = useRef37(null);
|
|
42354
|
-
|
|
42410
|
+
useEffect48(() => {
|
|
42355
42411
|
if (showSqlEditor) {
|
|
42356
42412
|
const defaultSql = getLastQueryRequest().query.sql;
|
|
42357
42413
|
setSql(defaultSql);
|
|
@@ -42407,7 +42463,7 @@ var SqlEditor_default = SqlEditor;
|
|
|
42407
42463
|
|
|
42408
42464
|
// src/components/SynapseTable/TopLevelControls.tsx
|
|
42409
42465
|
import { cloneDeep as cloneDeep3 } from "lodash-es";
|
|
42410
|
-
import React293, { useMemo as useMemo29, useState as
|
|
42466
|
+
import React293, { useMemo as useMemo29, useState as useState63 } from "react";
|
|
42411
42467
|
|
|
42412
42468
|
// src/components/widgets/ElementWithTooltip.tsx
|
|
42413
42469
|
import React283 from "react";
|
|
@@ -42693,10 +42749,10 @@ var DownloadLoginModal = (props) => {
|
|
|
42693
42749
|
};
|
|
42694
42750
|
|
|
42695
42751
|
// src/components/ProgrammaticTableDownload/ProgrammaticTableDownload.tsx
|
|
42696
|
-
import React286, { useEffect as
|
|
42752
|
+
import React286, { useEffect as useEffect49, useMemo as useMemo28, useState as useState61 } from "react";
|
|
42697
42753
|
|
|
42698
42754
|
// src/components/ProgrammaticInstructionsModal.tsx
|
|
42699
|
-
import React285, { useState as
|
|
42755
|
+
import React285, { useState as useState60 } from "react";
|
|
42700
42756
|
var ProgrammaticInstructionsModal = ({
|
|
42701
42757
|
show,
|
|
42702
42758
|
title,
|
|
@@ -42718,7 +42774,7 @@ var ProgrammaticInstructionsModal = ({
|
|
|
42718
42774
|
} else {
|
|
42719
42775
|
defaultTab = "R" /* R */;
|
|
42720
42776
|
}
|
|
42721
|
-
const [currentTab, setCurrentTab] =
|
|
42777
|
+
const [currentTab, setCurrentTab] = useState60(defaultTab);
|
|
42722
42778
|
const installationInstructions = /* @__PURE__ */ React285.createElement(Typography_default, { variant: "body1" }, "Installation instructions are available at our", " ", /* @__PURE__ */ React285.createElement(
|
|
42723
42779
|
Link_default,
|
|
42724
42780
|
{
|
|
@@ -42794,7 +42850,7 @@ function ProgrammaticTableDownload({
|
|
|
42794
42850
|
queryBundleRequest,
|
|
42795
42851
|
onHide
|
|
42796
42852
|
}) {
|
|
42797
|
-
const [generatedSql, setGeneratedSql] =
|
|
42853
|
+
const [generatedSql, setGeneratedSql] = useState61("...");
|
|
42798
42854
|
const {
|
|
42799
42855
|
data: asyncJobStatus,
|
|
42800
42856
|
isLoading: queryIsLoading,
|
|
@@ -42811,7 +42867,7 @@ function ProgrammaticTableDownload({
|
|
|
42811
42867
|
);
|
|
42812
42868
|
const combinedSql = asyncJobStatus?.responseBody?.combinedSql;
|
|
42813
42869
|
const isLoadingNewBundle = queryIsLoading || newQueryIsFetching;
|
|
42814
|
-
|
|
42870
|
+
useEffect49(() => {
|
|
42815
42871
|
if (combinedSql && !isLoadingNewBundle) {
|
|
42816
42872
|
const indexOfFrom = combinedSql.toUpperCase().indexOf("FROM SYN");
|
|
42817
42873
|
const selectStarTransformedSql = `SELECT * ${combinedSql.substring(
|
|
@@ -42970,13 +43026,13 @@ var DownloadOptions = (props) => {
|
|
|
42970
43026
|
};
|
|
42971
43027
|
|
|
42972
43028
|
// src/components/SynapseTable/table-top/ColumnSelection.tsx
|
|
42973
|
-
import React288, { useState as
|
|
43029
|
+
import React288, { useState as useState62 } from "react";
|
|
42974
43030
|
import { Dropdown as Dropdown3 } from "react-bootstrap";
|
|
42975
43031
|
var tooltipColumnSelectionId = "addAndRemoveColumns";
|
|
42976
43032
|
var ColumnSelection = (props) => {
|
|
42977
43033
|
const { headers, isColumnSelected, toggleColumnSelection, darkTheme } = props;
|
|
42978
43034
|
const { getColumnDisplayName } = useQueryVisualizationContext();
|
|
42979
|
-
const [show, setShow] =
|
|
43035
|
+
const [show, setShow] = useState62(false);
|
|
42980
43036
|
const onDropdownClick = (_show, _event, metadata) => {
|
|
42981
43037
|
if (metadata.source === "rootClose") {
|
|
42982
43038
|
setShow(false);
|
|
@@ -43298,7 +43354,7 @@ var TopLevelControls = (props) => {
|
|
|
43298
43354
|
setColumnsToShowInTable
|
|
43299
43355
|
} = useQueryVisualizationContext();
|
|
43300
43356
|
const { showCopyToClipboard } = topLevelControlsState;
|
|
43301
|
-
const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] =
|
|
43357
|
+
const [hasRecentlyCopiedToClipboard, setHasRecentlyCopiedToClipboard] = useState63(false);
|
|
43302
43358
|
const setControlState = (control) => {
|
|
43303
43359
|
const updatedTopLevelControlsState = {
|
|
43304
43360
|
[control]: !topLevelControlsState[control]
|
|
@@ -43314,7 +43370,7 @@ var TopLevelControls = (props) => {
|
|
|
43314
43370
|
...updatedTopLevelControlsState
|
|
43315
43371
|
}));
|
|
43316
43372
|
};
|
|
43317
|
-
const [isShowingExportToCavaticaModal, setIsShowingExportToCavaticaModal] =
|
|
43373
|
+
const [isShowingExportToCavaticaModal, setIsShowingExportToCavaticaModal] = useState63(false);
|
|
43318
43374
|
const refresh = () => {
|
|
43319
43375
|
setSelectedRows([]);
|
|
43320
43376
|
executeQueryRequest(getLastQueryRequest());
|
|
@@ -43507,20 +43563,20 @@ var TopLevelControls = (props) => {
|
|
|
43507
43563
|
var TopLevelControls_default = TopLevelControls;
|
|
43508
43564
|
|
|
43509
43565
|
// src/components/widgets/facet-nav/FacetNav.tsx
|
|
43510
|
-
import React309, { useEffect as
|
|
43566
|
+
import React309, { useEffect as useEffect51, useMemo as useMemo30, useState as useState70 } from "react";
|
|
43511
43567
|
|
|
43512
43568
|
// src/components/widgets/query-filter/FacetFilterControls.tsx
|
|
43513
43569
|
import React303 from "react";
|
|
43514
43570
|
import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck2 } from "use-deep-compare-effect";
|
|
43515
43571
|
|
|
43516
43572
|
// src/components/widgets/query-filter/EnumFacetFilter.tsx
|
|
43517
|
-
import React298, { useState as
|
|
43573
|
+
import React298, { useState as useState65 } from "react";
|
|
43518
43574
|
import { Dropdown as Dropdown4 } from "react-bootstrap";
|
|
43519
43575
|
import useDeepCompareEffect4 from "use-deep-compare-effect";
|
|
43520
43576
|
|
|
43521
43577
|
// src/components/widgets/Checkbox.tsx
|
|
43522
43578
|
import { uniqueId as _uniqueId2 } from "lodash-es";
|
|
43523
|
-
import React294, { useEffect as
|
|
43579
|
+
import React294, { useEffect as useEffect50, useState as useState64 } from "react";
|
|
43524
43580
|
var Checkbox = (props) => {
|
|
43525
43581
|
const {
|
|
43526
43582
|
checked: propsChecked = false,
|
|
@@ -43528,9 +43584,9 @@ var Checkbox = (props) => {
|
|
|
43528
43584
|
isSelectAll = false,
|
|
43529
43585
|
disabled = false
|
|
43530
43586
|
} = props;
|
|
43531
|
-
const [checked, setChecked] =
|
|
43532
|
-
const [uniqueId3] =
|
|
43533
|
-
|
|
43587
|
+
const [checked, setChecked] = useState64(propsChecked);
|
|
43588
|
+
const [uniqueId3] = useState64(_uniqueId2("src-checkbox-"));
|
|
43589
|
+
useEffect50(() => {
|
|
43534
43590
|
setChecked(propsChecked);
|
|
43535
43591
|
}, [propsChecked]);
|
|
43536
43592
|
const handleCheckboxChange = (event) => {
|
|
@@ -43656,12 +43712,12 @@ var EnumFacetFilter = ({
|
|
|
43656
43712
|
dropdownType = "Icon",
|
|
43657
43713
|
collapsed = false
|
|
43658
43714
|
}) => {
|
|
43659
|
-
const [isShowAll, setIsShowAll] =
|
|
43660
|
-
const [isCollapsed, setIsCollapsed] =
|
|
43661
|
-
const [isShowDropdown, setIsShowDropdown] =
|
|
43662
|
-
const [showSearch, setShowSearch] =
|
|
43663
|
-
const [searchTerm, setSearchText] =
|
|
43664
|
-
const [filteredSet, setFilteredSet] =
|
|
43715
|
+
const [isShowAll, setIsShowAll] = useState65(false);
|
|
43716
|
+
const [isCollapsed, setIsCollapsed] = useState65(collapsed);
|
|
43717
|
+
const [isShowDropdown, setIsShowDropdown] = useState65(false);
|
|
43718
|
+
const [showSearch, setShowSearch] = useState65(false);
|
|
43719
|
+
const [searchTerm, setSearchText] = useState65("");
|
|
43720
|
+
const [filteredSet, setFilteredSet] = useState65(facetValues);
|
|
43665
43721
|
useDeepCompareEffect4(() => {
|
|
43666
43722
|
setFilteredSet(facetValues);
|
|
43667
43723
|
}, [facetValues]);
|
|
@@ -43871,7 +43927,7 @@ function EnumFacetFilterOption({
|
|
|
43871
43927
|
initialIsSelected,
|
|
43872
43928
|
onChange
|
|
43873
43929
|
}) {
|
|
43874
|
-
const [isSelected, setIsSelected] =
|
|
43930
|
+
const [isSelected, setIsSelected] = useState65(initialIsSelected);
|
|
43875
43931
|
React298.useEffect(() => {
|
|
43876
43932
|
setIsSelected(initialIsSelected);
|
|
43877
43933
|
}, [initialIsSelected]);
|
|
@@ -43927,15 +43983,15 @@ var FacetChip = ({
|
|
|
43927
43983
|
|
|
43928
43984
|
// src/components/widgets/query-filter/RangeFacetFilter.tsx
|
|
43929
43985
|
import React302 from "react";
|
|
43930
|
-
import { useState as
|
|
43986
|
+
import { useState as useState68 } from "react";
|
|
43931
43987
|
|
|
43932
43988
|
// src/components/widgets/Range.tsx
|
|
43933
|
-
import React300, { useState as
|
|
43989
|
+
import React300, { useState as useState66 } from "react";
|
|
43934
43990
|
import dayjs6 from "dayjs";
|
|
43935
43991
|
var Range = (props) => {
|
|
43936
43992
|
const errorText = "Min value should be less then max value";
|
|
43937
|
-
const [error, setError] =
|
|
43938
|
-
const [values, setValues] =
|
|
43993
|
+
const [error, setError] = useState66(false);
|
|
43994
|
+
const [values, setValues] = useState66(
|
|
43939
43995
|
() => props.type === "number" && props.initialValues ? props.initialValues : props.initialValues && {
|
|
43940
43996
|
min: dayjs6(props.initialValues.min).format("YYYY-MM-DD"),
|
|
43941
43997
|
max: dayjs6(props.initialValues.max).format("YYYY-MM-DD")
|
|
@@ -43997,7 +44053,7 @@ var Range = (props) => {
|
|
|
43997
44053
|
|
|
43998
44054
|
// src/components/widgets/RangeSlider.tsx
|
|
43999
44055
|
import React301 from "react";
|
|
44000
|
-
import { useState as
|
|
44056
|
+
import { useState as useState67 } from "react";
|
|
44001
44057
|
function ValueLabelComponent(props) {
|
|
44002
44058
|
const { children, value } = props;
|
|
44003
44059
|
return /* @__PURE__ */ React301.createElement(Tooltip_default, { enterTouchDelay: 0, placement: "top", title: value }, children);
|
|
@@ -44012,7 +44068,7 @@ function getInitialValues(initialValues, domain) {
|
|
|
44012
44068
|
function RangeSlider(props) {
|
|
44013
44069
|
const { doUpdateOnApply = true, onChange, step } = props;
|
|
44014
44070
|
const stringArrToNumArr = (inputArr) => inputArr.map((value) => Number(value));
|
|
44015
|
-
const [values, setValues] =
|
|
44071
|
+
const [values, setValues] = useState67(
|
|
44016
44072
|
() => getInitialValues(props.initialValues, props.domain)
|
|
44017
44073
|
);
|
|
44018
44074
|
const numDomain = stringArrToNumArr(props.domain);
|
|
@@ -44057,7 +44113,7 @@ var RangeFacetFilter = ({
|
|
|
44057
44113
|
onChange,
|
|
44058
44114
|
collapsed = false
|
|
44059
44115
|
}) => {
|
|
44060
|
-
const [isCollapsed, setIsCollapsed] =
|
|
44116
|
+
const [isCollapsed, setIsCollapsed] = useState68(collapsed);
|
|
44061
44117
|
const options = [
|
|
44062
44118
|
{ label: FRIENDLY_VALUE_NOT_SET, value: "org.sagebionetworks.UNDEFINED_NULL_NOTSET" /* NOT_SET */ },
|
|
44063
44119
|
{ label: "Any", value: "" /* ANY */ },
|
|
@@ -44082,7 +44138,7 @@ var RangeFacetFilter = ({
|
|
|
44082
44138
|
onChangeCallback([radioValue2, radioValue2]);
|
|
44083
44139
|
}
|
|
44084
44140
|
};
|
|
44085
|
-
const [radioValue, setRadioValue] =
|
|
44141
|
+
const [radioValue, setRadioValue] = useState68(
|
|
44086
44142
|
getRadioValue(selectedMin, hasAnyValue)
|
|
44087
44143
|
);
|
|
44088
44144
|
const result = /* @__PURE__ */ React302.createElement("div", null, /* @__PURE__ */ React302.createElement(
|
|
@@ -44335,7 +44391,7 @@ function FacetFilterControlsOrLoader(props) {
|
|
|
44335
44391
|
// src/components/widgets/facet-nav/FacetNavPanel.tsx
|
|
44336
44392
|
import { InfoOutlined as InfoOutlined2 } from "@mui/icons-material";
|
|
44337
44393
|
import Plotly2 from "plotly.js-basic-dist";
|
|
44338
|
-
import React305, { useCallback as useCallback21, useState as
|
|
44394
|
+
import React305, { useCallback as useCallback21, useState as useState69 } from "react";
|
|
44339
44395
|
import { Dropdown as Dropdown5 } from "react-bootstrap";
|
|
44340
44396
|
import createPlotlyComponent2 from "react-plotly.js/factory";
|
|
44341
44397
|
import { SizeMe } from "react-sizeme";
|
|
@@ -44794,7 +44850,7 @@ var FacetNavPanel = (props) => {
|
|
|
44794
44850
|
const { accessToken } = useSynapseContext();
|
|
44795
44851
|
const { data, isLoadingNewBundle, getLastQueryRequest } = useQueryContext();
|
|
44796
44852
|
const { getColumnDisplayName } = useQueryVisualizationContext();
|
|
44797
|
-
const [showModal, setShowModal] =
|
|
44853
|
+
const [showModal, setShowModal] = useState69(false);
|
|
44798
44854
|
const plotTitle = getColumnDisplayName(facetToPlot.columnName);
|
|
44799
44855
|
const getColumnType = useCallback21(
|
|
44800
44856
|
() => data?.columnModels?.find(
|
|
@@ -45192,11 +45248,11 @@ var FacetNav = ({
|
|
|
45192
45248
|
asyncJobStatus
|
|
45193
45249
|
} = useQueryContext();
|
|
45194
45250
|
const { topLevelControlsState } = useQueryVisualizationContext();
|
|
45195
|
-
const [facetUiStateArray, setFacetUiStateArray] =
|
|
45196
|
-
const [isFirstTime, setIsFirstTime] =
|
|
45251
|
+
const [facetUiStateArray, setFacetUiStateArray] = useState70([]);
|
|
45252
|
+
const [isFirstTime, setIsFirstTime] = useState70(true);
|
|
45197
45253
|
const { showFacetVisualization, showFacetFilter } = topLevelControlsState;
|
|
45198
45254
|
const lastQueryRequest = getLastQueryRequest();
|
|
45199
|
-
|
|
45255
|
+
useEffect51(() => {
|
|
45200
45256
|
const result = getFacets(data, facetsToPlot);
|
|
45201
45257
|
if (result.length === 0) {
|
|
45202
45258
|
return;
|
|
@@ -45350,7 +45406,7 @@ import React317 from "react";
|
|
|
45350
45406
|
import React312 from "react";
|
|
45351
45407
|
|
|
45352
45408
|
// src/components/QuerySortSelector.tsx
|
|
45353
|
-
import React311, { useState as
|
|
45409
|
+
import React311, { useState as useState71 } from "react";
|
|
45354
45410
|
import Select4, { components as components2 } from "react-select";
|
|
45355
45411
|
|
|
45356
45412
|
// src/components/SchemaDrivenAnnotationEditor/widget/SelectWidget.tsx
|
|
@@ -45454,10 +45510,10 @@ var QuerySortSelector = ({
|
|
|
45454
45510
|
const queryContext = useQueryContext();
|
|
45455
45511
|
const { getLastQueryRequest, executeQueryRequest } = queryContext;
|
|
45456
45512
|
const { getColumnDisplayName } = useQueryVisualizationContext();
|
|
45457
|
-
const [sortColumn, setSortColumn] =
|
|
45513
|
+
const [sortColumn, setSortColumn] = useState71(
|
|
45458
45514
|
defaultColumn
|
|
45459
45515
|
);
|
|
45460
|
-
const [sortDirection, setSortDirection] =
|
|
45516
|
+
const [sortDirection, setSortDirection] = useState71(defaultDirection);
|
|
45461
45517
|
const enumOptions = sortableColumns.map((sortableColumn) => {
|
|
45462
45518
|
return {
|
|
45463
45519
|
value: sortableColumn,
|
|
@@ -45548,7 +45604,7 @@ var CardContainerLogic = (props) => {
|
|
|
45548
45604
|
};
|
|
45549
45605
|
|
|
45550
45606
|
// src/components/HeaderCard.tsx
|
|
45551
|
-
import React313, { useState as
|
|
45607
|
+
import React313, { useState as useState72, useEffect as useEffect52 } from "react";
|
|
45552
45608
|
var HeaderCard = ({
|
|
45553
45609
|
type,
|
|
45554
45610
|
title,
|
|
@@ -45566,11 +45622,11 @@ var HeaderCard = ({
|
|
|
45566
45622
|
const descriptionElement = document.querySelector(
|
|
45567
45623
|
'meta[name="description"]'
|
|
45568
45624
|
);
|
|
45569
|
-
const [docTitle] =
|
|
45570
|
-
const [docDescription] =
|
|
45625
|
+
const [docTitle] = useState72(document.title);
|
|
45626
|
+
const [docDescription] = useState72(
|
|
45571
45627
|
descriptionElement ? descriptionElement.getAttribute("content") : ""
|
|
45572
45628
|
);
|
|
45573
|
-
|
|
45629
|
+
useEffect52(() => {
|
|
45574
45630
|
if (title && document.title !== title) {
|
|
45575
45631
|
document.title = title;
|
|
45576
45632
|
}
|
|
@@ -45643,7 +45699,7 @@ var IconList = (props) => {
|
|
|
45643
45699
|
var IconList_default = IconList;
|
|
45644
45700
|
|
|
45645
45701
|
// src/components/widgets/FileHandleLink.tsx
|
|
45646
|
-
import React315, { useEffect as
|
|
45702
|
+
import React315, { useEffect as useEffect53, useState as useState73 } from "react";
|
|
45647
45703
|
var FileHandleLink = (props) => {
|
|
45648
45704
|
const {
|
|
45649
45705
|
fileHandleAssociation,
|
|
@@ -45652,8 +45708,8 @@ var FileHandleLink = (props) => {
|
|
|
45652
45708
|
displayValue
|
|
45653
45709
|
} = props;
|
|
45654
45710
|
const { accessToken } = useSynapseContext();
|
|
45655
|
-
const [batchFileResult, setBatchFileResult] =
|
|
45656
|
-
|
|
45711
|
+
const [batchFileResult, setBatchFileResult] = useState73();
|
|
45712
|
+
useEffect53(() => {
|
|
45657
45713
|
if (displayValue === void 0) {
|
|
45658
45714
|
const getFiles2 = async () => {
|
|
45659
45715
|
const batchFileRequest = {
|
|
@@ -45701,7 +45757,7 @@ var FileHandleLink = (props) => {
|
|
|
45701
45757
|
};
|
|
45702
45758
|
|
|
45703
45759
|
// src/components/widgets/ImageFileHandle.tsx
|
|
45704
|
-
import React316, { useEffect as
|
|
45760
|
+
import React316, { useEffect as useEffect54, useState as useState74 } from "react";
|
|
45705
45761
|
import { useInView as useInView2 } from "react-intersection-observer";
|
|
45706
45762
|
var ImageFileHandle = (props) => {
|
|
45707
45763
|
const {
|
|
@@ -45712,12 +45768,12 @@ var ImageFileHandle = (props) => {
|
|
|
45712
45768
|
}
|
|
45713
45769
|
} = props;
|
|
45714
45770
|
const { accessToken } = useSynapseContext();
|
|
45715
|
-
const [url, setUrl] =
|
|
45771
|
+
const [url, setUrl] = useState74();
|
|
45716
45772
|
const { ref, inView } = useInView2({
|
|
45717
45773
|
triggerOnce: true,
|
|
45718
45774
|
rootMargin: "500px 0px"
|
|
45719
45775
|
});
|
|
45720
|
-
|
|
45776
|
+
useEffect54(() => {
|
|
45721
45777
|
const getData = () => {
|
|
45722
45778
|
if (fileHandleId && associateObjectId && associateObjectType && inView) {
|
|
45723
45779
|
synapse_client_default.getActualFileHandleByIdURL(
|
|
@@ -46790,7 +46846,7 @@ var AddToDownloadListV2 = (props) => {
|
|
|
46790
46846
|
var AddToDownloadListV2_default = AddToDownloadListV2;
|
|
46791
46847
|
|
|
46792
46848
|
// src/components/DirectDownload.tsx
|
|
46793
|
-
import React324, { useEffect as
|
|
46849
|
+
import React324, { useEffect as useEffect55, useState as useState75 } from "react";
|
|
46794
46850
|
import { useInView as useInView3 } from "react-intersection-observer";
|
|
46795
46851
|
import { UAParser } from "ua-parser-js";
|
|
46796
46852
|
var DirectDownload = (props) => {
|
|
@@ -46805,13 +46861,13 @@ var DirectDownload = (props) => {
|
|
|
46805
46861
|
stopPropagation = false
|
|
46806
46862
|
} = props;
|
|
46807
46863
|
const { ref, inView } = useInView3();
|
|
46808
|
-
const [isExternalFile, setIsExternalFile] =
|
|
46809
|
-
const [hasFileAccess, setHasFileAccess] =
|
|
46810
|
-
const [fileEntity, setFileEntity] =
|
|
46811
|
-
const [externalURL, setExternalURL] =
|
|
46812
|
-
const [fileName, setFileName] =
|
|
46864
|
+
const [isExternalFile, setIsExternalFile] = useState75(false);
|
|
46865
|
+
const [hasFileAccess, setHasFileAccess] = useState75(false);
|
|
46866
|
+
const [fileEntity, setFileEntity] = useState75();
|
|
46867
|
+
const [externalURL, setExternalURL] = useState75();
|
|
46868
|
+
const [fileName, setFileName] = useState75("");
|
|
46813
46869
|
let mounted = true;
|
|
46814
|
-
|
|
46870
|
+
useEffect55(() => {
|
|
46815
46871
|
if (mounted && inView) {
|
|
46816
46872
|
getFileEntityFileHandle();
|
|
46817
46873
|
}
|
|
@@ -47177,7 +47233,7 @@ import React331 from "react";
|
|
|
47177
47233
|
import dayjs7 from "dayjs";
|
|
47178
47234
|
|
|
47179
47235
|
// src/components/EntityIdList.tsx
|
|
47180
|
-
import React328, { useEffect as
|
|
47236
|
+
import React328, { useEffect as useEffect56, useState as useState76 } from "react";
|
|
47181
47237
|
import { useInView as useInView4 } from "react-intersection-observer";
|
|
47182
47238
|
|
|
47183
47239
|
// src/components/EntityLink.tsx
|
|
@@ -47280,10 +47336,10 @@ var EntityLink = (props) => {
|
|
|
47280
47336
|
var EntityIdList = (props) => {
|
|
47281
47337
|
const { accessToken } = useSynapseContext();
|
|
47282
47338
|
const { entityIdList } = props;
|
|
47283
|
-
const [entityLinkArray, setEntityLinkArray] =
|
|
47339
|
+
const [entityLinkArray, setEntityLinkArray] = useState76([/* @__PURE__ */ React328.createElement(React328.Fragment, null)]);
|
|
47284
47340
|
const { ref, inView } = useInView4();
|
|
47285
47341
|
let mounted = true;
|
|
47286
|
-
|
|
47342
|
+
useEffect56(() => {
|
|
47287
47343
|
if (inView) {
|
|
47288
47344
|
getEntityTypes();
|
|
47289
47345
|
}
|
|
@@ -47310,15 +47366,15 @@ var EntityIdList = (props) => {
|
|
|
47310
47366
|
var EntityIdList_default = EntityIdList;
|
|
47311
47367
|
|
|
47312
47368
|
// src/components/EvaluationIdRenderer.tsx
|
|
47313
|
-
import React329, { useEffect as
|
|
47369
|
+
import React329, { useEffect as useEffect57, useState as useState77 } from "react";
|
|
47314
47370
|
import { useInView as useInView5 } from "react-intersection-observer";
|
|
47315
47371
|
var EvaluationIdRenderer = (props) => {
|
|
47316
47372
|
const { accessToken } = useSynapseContext();
|
|
47317
47373
|
const { evaluationId } = props;
|
|
47318
|
-
const [evaluationName, setEvaluationName] =
|
|
47374
|
+
const [evaluationName, setEvaluationName] = useState77();
|
|
47319
47375
|
const { ref, inView } = useInView5();
|
|
47320
47376
|
let mounted = true;
|
|
47321
|
-
|
|
47377
|
+
useEffect57(() => {
|
|
47322
47378
|
if (mounted && inView) {
|
|
47323
47379
|
getEvaluationQueue();
|
|
47324
47380
|
}
|
|
@@ -47343,15 +47399,15 @@ var EvaluationIdRenderer = (props) => {
|
|
|
47343
47399
|
var EvaluationIdRenderer_default = EvaluationIdRenderer;
|
|
47344
47400
|
|
|
47345
47401
|
// src/components/UserIdList.tsx
|
|
47346
|
-
import React330, { useEffect as
|
|
47402
|
+
import React330, { useEffect as useEffect58, useState as useState78 } from "react";
|
|
47347
47403
|
import { useInView as useInView6 } from "react-intersection-observer";
|
|
47348
47404
|
var UserIdList = (props) => {
|
|
47349
47405
|
const { accessToken } = useSynapseContext();
|
|
47350
47406
|
const { userIds } = props;
|
|
47351
|
-
const [profileCards, setProfileCards] =
|
|
47407
|
+
const [profileCards, setProfileCards] = useState78();
|
|
47352
47408
|
const { ref, inView } = useInView6();
|
|
47353
47409
|
let mounted = true;
|
|
47354
|
-
|
|
47410
|
+
useEffect58(() => {
|
|
47355
47411
|
if (mounted && inView) {
|
|
47356
47412
|
getUserProfilesToRender();
|
|
47357
47413
|
}
|
|
@@ -47686,11 +47742,11 @@ var EntityIDColumnCopyIcon = () => {
|
|
|
47686
47742
|
var EntityIDColumnCopyIcon_default = EntityIDColumnCopyIcon;
|
|
47687
47743
|
|
|
47688
47744
|
// src/components/SynapseTable/ExpandableTableDataCell.tsx
|
|
47689
|
-
import React335, { useRef as useRef38, useState as
|
|
47745
|
+
import React335, { useRef as useRef38, useState as useState79 } from "react";
|
|
47690
47746
|
import useResizeObserver from "@react-hook/resize-observer";
|
|
47691
47747
|
function ExpandableTableDataCell(props) {
|
|
47692
|
-
const [isExpanded, setIsExpanded] =
|
|
47693
|
-
const [isOverflowingWhenNotExpanded, setIsOverflowingWhenNotExpanded] =
|
|
47748
|
+
const [isExpanded, setIsExpanded] = useState79(false);
|
|
47749
|
+
const [isOverflowingWhenNotExpanded, setIsOverflowingWhenNotExpanded] = useState79(false);
|
|
47694
47750
|
const tdRef = useRef38(null);
|
|
47695
47751
|
useResizeObserver(tdRef, ({ target }) => {
|
|
47696
47752
|
if (!isExpanded) {
|
|
@@ -48763,14 +48819,14 @@ import React345 from "react";
|
|
|
48763
48819
|
|
|
48764
48820
|
// src/components/widgets/SynapseVideo.tsx
|
|
48765
48821
|
import React344 from "react";
|
|
48766
|
-
import { useEffect as
|
|
48822
|
+
import { useEffect as useEffect59, useState as useState80 } from "react";
|
|
48767
48823
|
function SynapseVideo({ params }) {
|
|
48768
48824
|
const { accessToken } = useSynapseContext();
|
|
48769
|
-
const [externalVideoUrl, setExternalVideoUrl] =
|
|
48770
|
-
const [synapseVideoPresignedUrl, setSynapseVideoPresignedUrl] =
|
|
48825
|
+
const [externalVideoUrl, setExternalVideoUrl] = useState80();
|
|
48826
|
+
const [synapseVideoPresignedUrl, setSynapseVideoPresignedUrl] = useState80();
|
|
48771
48827
|
const videoWidth = params.width ?? "";
|
|
48772
48828
|
const videoHeight = params.height ?? "";
|
|
48773
|
-
|
|
48829
|
+
useEffect59(() => {
|
|
48774
48830
|
const getVideo = () => {
|
|
48775
48831
|
if (params.videoId)
|
|
48776
48832
|
setExternalVideoUrl(`https://www.youtube.com/embed/${params.videoId}`);
|
|
@@ -49383,7 +49439,7 @@ var MarkdownPopover = ({
|
|
|
49383
49439
|
maxWidth = "500px",
|
|
49384
49440
|
minWidth = "300px"
|
|
49385
49441
|
}) => {
|
|
49386
|
-
const [show, setShow] =
|
|
49442
|
+
const [show, setShow] = useState81(false);
|
|
49387
49443
|
const content2 = /* @__PURE__ */ React350.createElement(Box_default, { sx: { padding: "20px" } }, /* @__PURE__ */ React350.createElement(Typography_default, { variant: "body1", marginBottom: 2 }, /* @__PURE__ */ React350.createElement(MarkdownSynapse_default, { ...contentProps })), /* @__PURE__ */ React350.createElement(Box_default, { sx: buttonBoxSx }, actionButton && /* @__PURE__ */ React350.createElement(
|
|
49388
49444
|
Button_default,
|
|
49389
49445
|
{
|
|
@@ -49585,7 +49641,7 @@ var AccessTokenCard = ({
|
|
|
49585
49641
|
onDelete
|
|
49586
49642
|
}) => {
|
|
49587
49643
|
const { accessToken: authToken } = useSynapseContext();
|
|
49588
|
-
const [showModal, setShowModal] =
|
|
49644
|
+
const [showModal, setShowModal] = useState82(false);
|
|
49589
49645
|
const handleError = useErrorHandler2();
|
|
49590
49646
|
const isExpired = accessToken.state === "EXPIRED";
|
|
49591
49647
|
return /* @__PURE__ */ React355.createElement(
|
|
@@ -49817,7 +49873,7 @@ var AccessTokenPage = ({
|
|
|
49817
49873
|
title,
|
|
49818
49874
|
body
|
|
49819
49875
|
}) => {
|
|
49820
|
-
const [showCreateTokenModal, setShowCreateTokenModal] =
|
|
49876
|
+
const [showCreateTokenModal, setShowCreateTokenModal] = useState83(false);
|
|
49821
49877
|
const {
|
|
49822
49878
|
data: infiniteData,
|
|
49823
49879
|
isLoading,
|
|
@@ -49990,7 +50046,7 @@ function TwoFactorAuthSettingsPanel(props) {
|
|
|
49990
50046
|
}
|
|
49991
50047
|
|
|
49992
50048
|
// src/components/Authentication/TwoFactorBackupCodes.tsx
|
|
49993
|
-
import React367, { useEffect as
|
|
50049
|
+
import React367, { useEffect as useEffect61, useState as useState84 } from "react";
|
|
49994
50050
|
import { useMutation as useMutation10 } from "react-query";
|
|
49995
50051
|
|
|
49996
50052
|
// src/assets/icons/FrontHand.tsx
|
|
@@ -50101,11 +50157,11 @@ function RecoveryCodeGrid(props) {
|
|
|
50101
50157
|
}
|
|
50102
50158
|
|
|
50103
50159
|
// src/utils/hooks/useMediaPrintOnly.ts
|
|
50104
|
-
import { useEffect as
|
|
50160
|
+
import { useEffect as useEffect60 } from "react";
|
|
50105
50161
|
function useMediaPrintOnly() {
|
|
50106
50162
|
const visibleOnPrintClassName = "printable";
|
|
50107
50163
|
const hiddenOnPrintClassName = "noPrint";
|
|
50108
|
-
|
|
50164
|
+
useEffect60(() => {
|
|
50109
50165
|
const temporaryPrintStyle = document.createElement("style");
|
|
50110
50166
|
temporaryPrintStyle.innerHTML = `@media print {
|
|
50111
50167
|
* {
|
|
@@ -50145,7 +50201,7 @@ function useMediaPrintOnly() {
|
|
|
50145
50201
|
function TwoFactorBackupCodes(props) {
|
|
50146
50202
|
const { showReplaceOldCodesWarning, onClose } = props;
|
|
50147
50203
|
const theme = useTheme();
|
|
50148
|
-
const [hasConfirmedRegeneration, setHasConfirmedRegeneration] =
|
|
50204
|
+
const [hasConfirmedRegeneration, setHasConfirmedRegeneration] = useState84(
|
|
50149
50205
|
!showReplaceOldCodesWarning
|
|
50150
50206
|
);
|
|
50151
50207
|
const { accessToken } = useSynapseContext();
|
|
@@ -50159,7 +50215,7 @@ function TwoFactorBackupCodes(props) {
|
|
|
50159
50215
|
setHasConfirmedRegeneration(true);
|
|
50160
50216
|
}
|
|
50161
50217
|
});
|
|
50162
|
-
|
|
50218
|
+
useEffect61(() => {
|
|
50163
50219
|
if (!showReplaceOldCodesWarning) {
|
|
50164
50220
|
generateCodes();
|
|
50165
50221
|
}
|
|
@@ -50302,17 +50358,17 @@ function TwoFactorBackupCodes(props) {
|
|
|
50302
50358
|
}
|
|
50303
50359
|
|
|
50304
50360
|
// src/components/CertificationQuiz/CertificationQuiz.tsx
|
|
50305
|
-
import React368, { useEffect as
|
|
50361
|
+
import React368, { useEffect as useEffect62, useState as useState85 } from "react";
|
|
50306
50362
|
import { HelpOutlineTwoTone as HelpOutlineTwoTone3 } from "@mui/icons-material";
|
|
50307
50363
|
import { useErrorHandler as useErrorHandler3 } from "react-error-boundary";
|
|
50308
50364
|
var CertificationQuiz = () => {
|
|
50309
50365
|
const { accessToken } = useSynapseContext();
|
|
50310
50366
|
const handleError = useErrorHandler3();
|
|
50311
|
-
const [quiz, setQuiz] =
|
|
50312
|
-
const [questionResponse, setQuestionResponse] =
|
|
50367
|
+
const [quiz, setQuiz] = useState85();
|
|
50368
|
+
const [questionResponse, setQuestionResponse] = useState85(
|
|
50313
50369
|
[]
|
|
50314
50370
|
);
|
|
50315
|
-
const [passingRecord, setPassingRecord] =
|
|
50371
|
+
const [passingRecord, setPassingRecord] = useState85();
|
|
50316
50372
|
const formRef = React368.useRef(null);
|
|
50317
50373
|
const GETTING_STARTED_URL = "https://help.synapse.org/docs/Getting-Started.2055471150.html";
|
|
50318
50374
|
const getQuiz = async () => {
|
|
@@ -50322,7 +50378,7 @@ var CertificationQuiz = () => {
|
|
|
50322
50378
|
handleError(err);
|
|
50323
50379
|
}
|
|
50324
50380
|
};
|
|
50325
|
-
|
|
50381
|
+
useEffect62(() => {
|
|
50326
50382
|
getQuiz();
|
|
50327
50383
|
}, [accessToken]);
|
|
50328
50384
|
const onUpdateAnswer = (questionIndex, answer) => {
|
|
@@ -50469,15 +50525,15 @@ var CertificationQuiz = () => {
|
|
|
50469
50525
|
var CertificationQuiz_default = CertificationQuiz;
|
|
50470
50526
|
|
|
50471
50527
|
// src/components/ChallengeDetailPage/ChallengeDetailPage.tsx
|
|
50472
|
-
import React382, { useState as
|
|
50528
|
+
import React382, { useState as useState93 } from "react";
|
|
50473
50529
|
|
|
50474
50530
|
// src/components/ChallengeRegisterButton/ChallengeRegisterButton.tsx
|
|
50475
|
-
import React371, { useEffect as
|
|
50531
|
+
import React371, { useEffect as useEffect64, useState as useState87 } from "react";
|
|
50476
50532
|
import ExitToAppIcon from "@mui/icons-material/ExitToApp";
|
|
50477
50533
|
import { Box as Box2 } from "@mui/system";
|
|
50478
50534
|
|
|
50479
50535
|
// src/components/widgets/SpinnerButton.tsx
|
|
50480
|
-
import React370, { useEffect as
|
|
50536
|
+
import React370, { useEffect as useEffect63, useRef as useRef39, useState as useState86 } from "react";
|
|
50481
50537
|
|
|
50482
50538
|
// src/components/widgets/LoginAwareButton.tsx
|
|
50483
50539
|
import * as React369 from "react";
|
|
@@ -50508,9 +50564,9 @@ var SpinnerButton = ({
|
|
|
50508
50564
|
showSpinner = false,
|
|
50509
50565
|
...props
|
|
50510
50566
|
}) => {
|
|
50511
|
-
const [width, setWidth] =
|
|
50567
|
+
const [width, setWidth] = useState86(0);
|
|
50512
50568
|
const elementRef = useRef39(null);
|
|
50513
|
-
|
|
50569
|
+
useEffect63(() => {
|
|
50514
50570
|
if (elementRef) {
|
|
50515
50571
|
const n = elementRef.current?.offsetWidth ?? 0;
|
|
50516
50572
|
setWidth(n);
|
|
@@ -50554,13 +50610,13 @@ var ChallengeRegisterButton = ({
|
|
|
50554
50610
|
onLeaveClick
|
|
50555
50611
|
}) => {
|
|
50556
50612
|
const { accessToken } = useSynapseContext();
|
|
50557
|
-
const [challenge, setChallenge] =
|
|
50613
|
+
const [challenge, setChallenge] = useState87();
|
|
50558
50614
|
const { data: userProfile } = useGetCurrentUserProfile();
|
|
50559
|
-
const [isRegistered, setIsRegistered] =
|
|
50560
|
-
const [hasSubmissionTeam, setHasSubmissionTeam] =
|
|
50561
|
-
const [loading, setLoading] =
|
|
50562
|
-
const [requestError, setRequestError] =
|
|
50563
|
-
|
|
50615
|
+
const [isRegistered, setIsRegistered] = useState87(false);
|
|
50616
|
+
const [hasSubmissionTeam, setHasSubmissionTeam] = useState87(false);
|
|
50617
|
+
const [loading, setLoading] = useState87(true);
|
|
50618
|
+
const [requestError, setRequestError] = useState87();
|
|
50619
|
+
useEffect64(() => {
|
|
50564
50620
|
if (requestError && onChallengeError)
|
|
50565
50621
|
onChallengeError(requestError);
|
|
50566
50622
|
}, [requestError, onChallengeError]);
|
|
@@ -50659,7 +50715,7 @@ var ChallengeRegisterButton_default = ChallengeRegisterButton;
|
|
|
50659
50715
|
var ChallengeRegisterButton_default2 = ChallengeRegisterButton_default;
|
|
50660
50716
|
|
|
50661
50717
|
// src/components/ChallengeTeamWizard/ChallengeTeamWizard.tsx
|
|
50662
|
-
import React381, { useEffect as
|
|
50718
|
+
import React381, { useEffect as useEffect67, useState as useState92 } from "react";
|
|
50663
50719
|
|
|
50664
50720
|
// src/components/StepperDialog/StepperDialog.tsx
|
|
50665
50721
|
import React372 from "react";
|
|
@@ -50725,7 +50781,7 @@ var StepperDialog = ({
|
|
|
50725
50781
|
var StepperDialog_default = StepperDialog;
|
|
50726
50782
|
|
|
50727
50783
|
// src/components/ChallengeTeamWizard/CreateChallengeTeam.tsx
|
|
50728
|
-
import React373, { useState as
|
|
50784
|
+
import React373, { useState as useState88 } from "react";
|
|
50729
50785
|
|
|
50730
50786
|
// src/components/TextField/index.ts
|
|
50731
50787
|
var TextField_default2 = TextField3;
|
|
@@ -50735,7 +50791,7 @@ var CreateChallengeTeam = ({
|
|
|
50735
50791
|
onChangeTeamInfo,
|
|
50736
50792
|
onError
|
|
50737
50793
|
}) => {
|
|
50738
|
-
const [team, setTeam] =
|
|
50794
|
+
const [team, setTeam] = useState88({
|
|
50739
50795
|
name: "",
|
|
50740
50796
|
description: "",
|
|
50741
50797
|
message: "",
|
|
@@ -50807,7 +50863,7 @@ import React378 from "react";
|
|
|
50807
50863
|
import ControlPointIcon from "@mui/icons-material/ControlPoint";
|
|
50808
50864
|
|
|
50809
50865
|
// src/components/ChallengeTeamWizard/ChallengeTeamTable.tsx
|
|
50810
|
-
import React377, { useEffect as
|
|
50866
|
+
import React377, { useEffect as useEffect66, useState as useState90 } from "react";
|
|
50811
50867
|
import { DataGrid } from "@mui/x-data-grid";
|
|
50812
50868
|
import dayjs10 from "dayjs";
|
|
50813
50869
|
|
|
@@ -50863,15 +50919,15 @@ var SkeletonButton = ({
|
|
|
50863
50919
|
};
|
|
50864
50920
|
|
|
50865
50921
|
// src/components/Skeleton/SkeletonParagraph.tsx
|
|
50866
|
-
import React376, { useEffect as
|
|
50922
|
+
import React376, { useEffect as useEffect65, useState as useState89 } from "react";
|
|
50867
50923
|
import { times as times2 } from "lodash-es";
|
|
50868
50924
|
var SkeletonParagraph = ({
|
|
50869
50925
|
numRows = 5,
|
|
50870
50926
|
rowHeight,
|
|
50871
50927
|
className
|
|
50872
50928
|
}) => {
|
|
50873
|
-
const [skeletons, setSkeletons] =
|
|
50874
|
-
|
|
50929
|
+
const [skeletons, setSkeletons] = useState89([]);
|
|
50930
|
+
useEffect65(() => {
|
|
50875
50931
|
const elements = [];
|
|
50876
50932
|
times2(numRows, (i) => {
|
|
50877
50933
|
elements.push(
|
|
@@ -50914,11 +50970,11 @@ function ChallengeTeamTable({
|
|
|
50914
50970
|
challengeId,
|
|
50915
50971
|
onSelectTeam
|
|
50916
50972
|
}) {
|
|
50917
|
-
const [allRows, setAllRows] =
|
|
50918
|
-
const [teamIdList, setTeamIdList] =
|
|
50919
|
-
const [teamsById, setTeamsById] =
|
|
50973
|
+
const [allRows, setAllRows] = useState90([]);
|
|
50974
|
+
const [teamIdList, setTeamIdList] = useState90([]);
|
|
50975
|
+
const [teamsById, setTeamsById] = useState90({});
|
|
50920
50976
|
const { data: regTeams } = useGetChallengeTeamList(challengeId);
|
|
50921
|
-
const [selectedTeam, setSelectedTeam] =
|
|
50977
|
+
const [selectedTeam, setSelectedTeam] = useState90();
|
|
50922
50978
|
const { data: teamsList, isLoading } = useGetTeamList(teamIdList, {
|
|
50923
50979
|
enabled: !!teamIdList.length
|
|
50924
50980
|
});
|
|
@@ -50934,11 +50990,11 @@ function ChallengeTeamTable({
|
|
|
50934
50990
|
description: team.description
|
|
50935
50991
|
};
|
|
50936
50992
|
};
|
|
50937
|
-
|
|
50993
|
+
useEffect66(() => {
|
|
50938
50994
|
const ids = regTeams?.map((team) => team.teamId) ?? [];
|
|
50939
50995
|
setTeamIdList(ids);
|
|
50940
50996
|
}, [regTeams]);
|
|
50941
|
-
|
|
50997
|
+
useEffect66(() => {
|
|
50942
50998
|
const teams = teamsList?.list.filter((team) => team.canRequestMembership !== false) ?? [];
|
|
50943
50999
|
const row = [];
|
|
50944
51000
|
const teamRecords = {};
|
|
@@ -51090,12 +51146,12 @@ var RegistrationSuccessful = ({
|
|
|
51090
51146
|
};
|
|
51091
51147
|
|
|
51092
51148
|
// src/components/ChallengeTeamWizard/JoinRequestForm.tsx
|
|
51093
|
-
import React380, { useState as
|
|
51149
|
+
import React380, { useState as useState91 } from "react";
|
|
51094
51150
|
var JoinRequestForm = ({
|
|
51095
51151
|
team,
|
|
51096
51152
|
joinMessageChange
|
|
51097
51153
|
}) => {
|
|
51098
|
-
const [message, setMessage] =
|
|
51154
|
+
const [message, setMessage] = useState91("");
|
|
51099
51155
|
if (!team)
|
|
51100
51156
|
return null;
|
|
51101
51157
|
const handleMessageChange = (event) => {
|
|
@@ -51156,24 +51212,24 @@ var steps = {
|
|
|
51156
51212
|
var EMPTY_ID2 = "";
|
|
51157
51213
|
var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
|
|
51158
51214
|
const { accessToken, keyFactory } = useSynapseContext();
|
|
51159
|
-
const [loading, setLoading] =
|
|
51160
|
-
const [step, setStep] =
|
|
51161
|
-
const [errorMessage, setErrorMessage] =
|
|
51162
|
-
const [selectedTeam, setSelectedTeam] =
|
|
51163
|
-
const [createdNewTeam, setCreatedNewTeam] =
|
|
51164
|
-
const [confirming, setConfirming] =
|
|
51165
|
-
const [hasSubmissionTeam, setHasSubmissionTeam] =
|
|
51215
|
+
const [loading, setLoading] = useState92(true);
|
|
51216
|
+
const [step, setStep] = useState92(steps.SELECT_YOUR_CHALLENGE_TEAM);
|
|
51217
|
+
const [errorMessage, setErrorMessage] = useState92();
|
|
51218
|
+
const [selectedTeam, setSelectedTeam] = useState92();
|
|
51219
|
+
const [createdNewTeam, setCreatedNewTeam] = useState92(false);
|
|
51220
|
+
const [confirming, setConfirming] = useState92(false);
|
|
51221
|
+
const [hasSubmissionTeam, setHasSubmissionTeam] = useState92(false);
|
|
51166
51222
|
const queryClient = useQueryClient9();
|
|
51167
|
-
const [membershipStatus, setMembershipStatus] =
|
|
51168
|
-
const [inviteMembersSuccess, setInviteMembersSuccess] =
|
|
51169
|
-
const [registerChallengeSuccess, setRegisterChallengeSuccess] =
|
|
51170
|
-
const [newTeam, setNewTeam] =
|
|
51223
|
+
const [membershipStatus, setMembershipStatus] = useState92({});
|
|
51224
|
+
const [inviteMembersSuccess, setInviteMembersSuccess] = useState92(false);
|
|
51225
|
+
const [registerChallengeSuccess, setRegisterChallengeSuccess] = useState92(false);
|
|
51226
|
+
const [newTeam, setNewTeam] = useState92({
|
|
51171
51227
|
name: "",
|
|
51172
51228
|
description: "",
|
|
51173
51229
|
message: "",
|
|
51174
51230
|
invitees: ""
|
|
51175
51231
|
});
|
|
51176
|
-
const [joinMessage, setJoinMessage] =
|
|
51232
|
+
const [joinMessage, setJoinMessage] = useState92("");
|
|
51177
51233
|
const { data: userProfile } = useGetCurrentUserProfile();
|
|
51178
51234
|
const { data: challenge } = useGetEntityChallenge(projectId);
|
|
51179
51235
|
const participantTeamId = challenge ? challenge.participantTeamId : EMPTY_ID2;
|
|
@@ -51182,7 +51238,7 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
|
|
|
51182
51238
|
participantTeamId,
|
|
51183
51239
|
userId
|
|
51184
51240
|
);
|
|
51185
|
-
|
|
51241
|
+
useEffect67(() => {
|
|
51186
51242
|
if (challengeTeamMembershipStatus && !challengeTeamMembershipStatus?.isMember && accessToken) {
|
|
51187
51243
|
addTeamMemberAsAuthenticatedUserOrAdmin(
|
|
51188
51244
|
participantTeamId,
|
|
@@ -51208,7 +51264,7 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
|
|
|
51208
51264
|
keyFactory
|
|
51209
51265
|
]);
|
|
51210
51266
|
const { data: userSubmissionTeams, error: userSubmissionTeamError } = useGetUserSubmissionTeamsInfinite(challenge?.id ?? EMPTY_ID2, 1);
|
|
51211
|
-
|
|
51267
|
+
useEffect67(() => {
|
|
51212
51268
|
if (userSubmissionTeams) {
|
|
51213
51269
|
const isReg = userSubmissionTeams.results.length > 0;
|
|
51214
51270
|
if (isReg) {
|
|
@@ -51274,20 +51330,20 @@ var ChallengeTeamWizard = ({ projectId, isShowingModal = false, onClose }) => {
|
|
|
51274
51330
|
canJoin: false
|
|
51275
51331
|
};
|
|
51276
51332
|
};
|
|
51277
|
-
|
|
51333
|
+
useEffect67(() => {
|
|
51278
51334
|
const isLoggedOut = !!userProfile && userProfile.ownerId === ANONYMOUS_PRINCIPAL_ID.toString();
|
|
51279
51335
|
if (isLoggedOut) {
|
|
51280
51336
|
setLoading(false);
|
|
51281
51337
|
setErrorMessage("Please login to continue.");
|
|
51282
51338
|
}
|
|
51283
51339
|
}, [accessToken, userProfile, projectId, challenge]);
|
|
51284
|
-
|
|
51340
|
+
useEffect67(() => {
|
|
51285
51341
|
if (inviteMembersSuccess && registerChallengeSuccess) {
|
|
51286
51342
|
setConfirming(false);
|
|
51287
51343
|
handleStepChange(step.confirmStep);
|
|
51288
51344
|
}
|
|
51289
51345
|
}, [registerChallengeSuccess, inviteMembersSuccess, step]);
|
|
51290
|
-
|
|
51346
|
+
useEffect67(() => {
|
|
51291
51347
|
if (selectedTeam && selectedTeam.id in membershipStatus && step.id === "SELECT_YOUR_CHALLENGE_TEAM" /* SELECT_YOUR_CHALLENGE_TEAM */) {
|
|
51292
51348
|
const { canJoin, errorMessage: errorMessage2 } = canUserJoinTeam();
|
|
51293
51349
|
if (canJoin) {
|
|
@@ -51519,10 +51575,10 @@ var ConfirmationDialog_default = ConfirmationDialog;
|
|
|
51519
51575
|
// src/components/ChallengeDetailPage/ChallengeDetailPage.tsx
|
|
51520
51576
|
function ChallengeDetailPage({ projectId }) {
|
|
51521
51577
|
const { accessToken } = useSynapseContext();
|
|
51522
|
-
const [showWizard, setShowWizard] =
|
|
51523
|
-
const [showRequirements, setShowRequirements] =
|
|
51524
|
-
const [challenge, setChallenge] =
|
|
51525
|
-
const [showLeaveConfirm, setShowLeaveConfirm] =
|
|
51578
|
+
const [showWizard, setShowWizard] = useState93(false);
|
|
51579
|
+
const [showRequirements, setShowRequirements] = useState93(false);
|
|
51580
|
+
const [challenge, setChallenge] = useState93();
|
|
51581
|
+
const [showLeaveConfirm, setShowLeaveConfirm] = useState93(false);
|
|
51526
51582
|
const { data: userProfile } = synapse_queries_exports.useGetCurrentUserProfile();
|
|
51527
51583
|
const { data: project } = useGetEntity(projectId);
|
|
51528
51584
|
const toggleShowWizard = (b) => {
|
|
@@ -51615,7 +51671,7 @@ import { Map as Map2 } from "immutable";
|
|
|
51615
51671
|
|
|
51616
51672
|
// src/components/EntityFinder/EntityFinder.tsx
|
|
51617
51673
|
import pluralize3 from "pluralize";
|
|
51618
|
-
import React421, { useCallback as useCallback26, useEffect as
|
|
51674
|
+
import React421, { useCallback as useCallback26, useEffect as useEffect78, useMemo as useMemo35, useRef as useRef43, useState as useState106 } from "react";
|
|
51619
51675
|
import ArrowBackOutlinedIcon from "@mui/icons-material/ArrowBackOutlined";
|
|
51620
51676
|
import ClearIcon from "@mui/icons-material/Clear";
|
|
51621
51677
|
import SearchIcon2 from "@mui/icons-material/Search";
|
|
@@ -51651,23 +51707,23 @@ var Breadcrumbs = ({
|
|
|
51651
51707
|
};
|
|
51652
51708
|
|
|
51653
51709
|
// src/components/EntityFinder/details/EntityDetailsList.tsx
|
|
51654
|
-
import React417, { useState as
|
|
51710
|
+
import React417, { useState as useState102 } from "react";
|
|
51655
51711
|
import useDeepCompareEffect5 from "use-deep-compare-effect";
|
|
51656
51712
|
|
|
51657
51713
|
// src/components/EntityFinder/details/configurations/EntityChildrenDetails.tsx
|
|
51658
|
-
import React413, { useState as
|
|
51714
|
+
import React413, { useState as useState101 } from "react";
|
|
51659
51715
|
|
|
51660
51716
|
// src/components/EntityFinder/details/view/DetailsView.tsx
|
|
51661
51717
|
import BaseTable, {
|
|
51662
51718
|
AutoResizer,
|
|
51663
51719
|
Column
|
|
51664
51720
|
} from "@sage-bionetworks/react-base-table";
|
|
51665
|
-
import React412, { useCallback as useCallback23, useEffect as
|
|
51721
|
+
import React412, { useCallback as useCallback23, useEffect as useEffect74, useMemo as useMemo33, useState as useState100 } from "react";
|
|
51666
51722
|
import { useQueryClient as useQueryClient10 } from "react-query";
|
|
51667
51723
|
|
|
51668
51724
|
// src/components/EntityFinder/details/view/DetailsViewTableRenderers.tsx
|
|
51669
51725
|
import dayjs14 from "dayjs";
|
|
51670
|
-
import React410, { useEffect as
|
|
51726
|
+
import React410, { useEffect as useEffect73 } from "react";
|
|
51671
51727
|
import { Form as Form5 } from "react-bootstrap";
|
|
51672
51728
|
|
|
51673
51729
|
// src/assets/icons/Sort.tsx
|
|
@@ -51712,16 +51768,16 @@ import {
|
|
|
51712
51768
|
PublicTwoTone as PublicTwoTone2
|
|
51713
51769
|
} from "@mui/icons-material";
|
|
51714
51770
|
import { isEmpty as isEmpty8 } from "lodash-es";
|
|
51715
|
-
import React409, { useEffect as
|
|
51771
|
+
import React409, { useEffect as useEffect72, useState as useState99 } from "react";
|
|
51716
51772
|
import { useInView as useInView7 } from "react-intersection-observer";
|
|
51717
51773
|
|
|
51718
51774
|
// src/components/entity/metadata/EntityModal.tsx
|
|
51719
|
-
import React408, { useRef as useRef42, useState as
|
|
51775
|
+
import React408, { useRef as useRef42, useState as useState98 } from "react";
|
|
51720
51776
|
|
|
51721
51777
|
// src/components/SchemaDrivenAnnotationEditor/SchemaDrivenAnnotationEditor.tsx
|
|
51722
51778
|
import Form4 from "@rjsf/mui";
|
|
51723
51779
|
import isEmpty6 from "lodash-es/isEmpty";
|
|
51724
|
-
import React405, { useCallback as useCallback22, useEffect as
|
|
51780
|
+
import React405, { useCallback as useCallback22, useEffect as useEffect71, useMemo as useMemo32, useRef as useRef41 } from "react";
|
|
51725
51781
|
|
|
51726
51782
|
// src/assets/icons/AddToList.tsx
|
|
51727
51783
|
import React385 from "react";
|
|
@@ -51743,7 +51799,7 @@ var AddToList_default = AddToList;
|
|
|
51743
51799
|
|
|
51744
51800
|
// src/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.tsx
|
|
51745
51801
|
import { isEqual as isEqual3 } from "lodash-es";
|
|
51746
|
-
import React387, { useEffect as
|
|
51802
|
+
import React387, { useEffect as useEffect68, useState as useState94 } from "react";
|
|
51747
51803
|
|
|
51748
51804
|
// src/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.ts
|
|
51749
51805
|
import { flatMap, groupBy, isEmpty as isEmpty5 } from "lodash-es";
|
|
@@ -51917,11 +51973,11 @@ function AdditionalPropertiesSchemaField(props) {
|
|
|
51917
51973
|
const id = idSchema.$id;
|
|
51918
51974
|
const { ArrayField } = registry.fields;
|
|
51919
51975
|
const { SelectWidget: SelectWidget2 } = registry.widgets;
|
|
51920
|
-
const [propertyType, setPropertyType] =
|
|
51976
|
+
const [propertyType, setPropertyType] = useState94(
|
|
51921
51977
|
guessPropertyType(convertToArray(formData))
|
|
51922
51978
|
);
|
|
51923
|
-
const [nextPropertyType, setNextPropertyType] =
|
|
51924
|
-
|
|
51979
|
+
const [nextPropertyType, setNextPropertyType] = useState94(propertyType);
|
|
51980
|
+
useEffect68(() => {
|
|
51925
51981
|
function onNextPropertyTypeUpdate() {
|
|
51926
51982
|
if (Array.isArray(formData)) {
|
|
51927
51983
|
const dataIsEmpty = formData.length === 0 || formData.every((item) => item == null || item == "");
|
|
@@ -51938,7 +51994,7 @@ function AdditionalPropertiesSchemaField(props) {
|
|
|
51938
51994
|
}
|
|
51939
51995
|
onNextPropertyTypeUpdate();
|
|
51940
51996
|
}, [nextPropertyType]);
|
|
51941
|
-
|
|
51997
|
+
useEffect68(() => {
|
|
51942
51998
|
function coerceDataAndUpdateWidget() {
|
|
51943
51999
|
if (Array.isArray(formData)) {
|
|
51944
52000
|
if (formData.every((item) => item == null)) {
|
|
@@ -52051,7 +52107,7 @@ import dayjs12 from "dayjs";
|
|
|
52051
52107
|
import React390 from "react";
|
|
52052
52108
|
|
|
52053
52109
|
// src/components/Evaluation/CalendarWithIconFormGroup.tsx
|
|
52054
|
-
import React389, { useState as
|
|
52110
|
+
import React389, { useState as useState95 } from "react";
|
|
52055
52111
|
import dayjs11 from "dayjs";
|
|
52056
52112
|
import { Form as Form3, InputGroup } from "react-bootstrap";
|
|
52057
52113
|
import "react-datetime/css/react-datetime.css";
|
|
@@ -52066,7 +52122,7 @@ dayjs11.extend(utc2);
|
|
|
52066
52122
|
dayjs11.extend(timezone);
|
|
52067
52123
|
dayjs11.extend(advancedFormat);
|
|
52068
52124
|
var CalendarWithIconFormGroup = ({ value, setterCallback, label, disabled = false }) => {
|
|
52069
|
-
const [id] =
|
|
52125
|
+
const [id] = useState95(uniqueId2("calendar-with-icon-form-group-"));
|
|
52070
52126
|
return /* @__PURE__ */ React389.createElement(Form3.Group, { className: "calendar-with-icon-form-group" }, /* @__PURE__ */ React389.createElement(LocalizationProvider, { dateAdapter: AdapterDayjs }, label && /* @__PURE__ */ React389.createElement("label", { htmlFor: id }, label), /* @__PURE__ */ React389.createElement(InputGroup, null, /* @__PURE__ */ React389.createElement(
|
|
52071
52127
|
DateTimePicker,
|
|
52072
52128
|
{
|
|
@@ -52244,18 +52300,18 @@ var TextWidget_default = TextWidget;
|
|
|
52244
52300
|
import validator2 from "@rjsf/validator-ajv8";
|
|
52245
52301
|
|
|
52246
52302
|
// src/components/SchemaDrivenAnnotationEditor/field/CustomObjectField.tsx
|
|
52247
|
-
import React393, { useEffect as
|
|
52303
|
+
import React393, { useEffect as useEffect69 } from "react";
|
|
52248
52304
|
import { getDefaultRegistry } from "@rjsf/core";
|
|
52249
52305
|
import {
|
|
52250
52306
|
ADDITIONAL_PROPERTY_FLAG as ADDITIONAL_PROPERTY_FLAG2,
|
|
52251
|
-
deepEquals,
|
|
52307
|
+
deepEquals as deepEquals2,
|
|
52252
52308
|
PROPERTIES_KEY
|
|
52253
52309
|
} from "@rjsf/utils";
|
|
52254
52310
|
function CustomObjectField(props) {
|
|
52255
52311
|
const {
|
|
52256
52312
|
fields: { ObjectField }
|
|
52257
52313
|
} = getDefaultRegistry();
|
|
52258
|
-
|
|
52314
|
+
useEffect69(() => {
|
|
52259
52315
|
const { schema, formData, onChange } = props;
|
|
52260
52316
|
const newFormData = { ...formData };
|
|
52261
52317
|
if (schema[PROPERTIES_KEY]) {
|
|
@@ -52273,7 +52329,7 @@ function CustomObjectField(props) {
|
|
|
52273
52329
|
}
|
|
52274
52330
|
}
|
|
52275
52331
|
);
|
|
52276
|
-
if (!
|
|
52332
|
+
if (!deepEquals2(formData, newFormData)) {
|
|
52277
52333
|
onChange(newFormData);
|
|
52278
52334
|
}
|
|
52279
52335
|
}
|
|
@@ -52379,7 +52435,7 @@ import {
|
|
|
52379
52435
|
getTemplate as getTemplate2,
|
|
52380
52436
|
getUiOptions as getUiOptions2
|
|
52381
52437
|
} from "@rjsf/utils";
|
|
52382
|
-
import React395, { useEffect as
|
|
52438
|
+
import React395, { useEffect as useEffect70, useState as useState96 } from "react";
|
|
52383
52439
|
import { HelpOutline } from "@mui/icons-material";
|
|
52384
52440
|
function ArrayFieldTemplate(props) {
|
|
52385
52441
|
const { idSchema, uiSchema, items, registry, schema } = props;
|
|
@@ -52393,8 +52449,8 @@ function ArrayFieldTemplate(props) {
|
|
|
52393
52449
|
);
|
|
52394
52450
|
const isAdditionalProperty = !!props.schema[ADDITIONAL_PROPERTY_FLAG3];
|
|
52395
52451
|
const additionalPropertyContext = useAdditionalPropertyContext();
|
|
52396
|
-
const [showDetails, setShowDetails] =
|
|
52397
|
-
|
|
52452
|
+
const [showDetails, setShowDetails] = useState96(false);
|
|
52453
|
+
useEffect70(() => {
|
|
52398
52454
|
if (props.items.length === 0) {
|
|
52399
52455
|
props.onAddClick();
|
|
52400
52456
|
}
|
|
@@ -52497,7 +52553,7 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
52497
52553
|
}
|
|
52498
52554
|
|
|
52499
52555
|
// src/components/SchemaDrivenAnnotationEditor/template/FieldTemplate.tsx
|
|
52500
|
-
import React397, { useState as
|
|
52556
|
+
import React397, { useState as useState97 } from "react";
|
|
52501
52557
|
import {
|
|
52502
52558
|
getTemplate as getTemplate3,
|
|
52503
52559
|
getUiOptions as getUiOptions3
|
|
@@ -52520,7 +52576,7 @@ function FieldTemplate(props) {
|
|
|
52520
52576
|
} = props;
|
|
52521
52577
|
const uiOptions = getUiOptions3(uiSchema);
|
|
52522
52578
|
const WrapIfAdditionalTemplate2 = getTemplate3("WrapIfAdditionalTemplate", registry, uiOptions);
|
|
52523
|
-
const [showDetails, setShowDetails] =
|
|
52579
|
+
const [showDetails, setShowDetails] = useState97(false);
|
|
52524
52580
|
if (hidden) {
|
|
52525
52581
|
return /* @__PURE__ */ React397.createElement("div", { className: "hidden" }, children);
|
|
52526
52582
|
}
|
|
@@ -52840,7 +52896,7 @@ function SchemaDrivenAnnotationEditor(props) {
|
|
|
52840
52896
|
getTransformErrors(entityJson?.concreteType),
|
|
52841
52897
|
[entityJson?.concreteType]
|
|
52842
52898
|
);
|
|
52843
|
-
|
|
52899
|
+
useEffect71(() => {
|
|
52844
52900
|
if (annotations) {
|
|
52845
52901
|
setFormData(annotations);
|
|
52846
52902
|
}
|
|
@@ -53128,9 +53184,9 @@ function EntityModal(props) {
|
|
|
53128
53184
|
showTabs = true
|
|
53129
53185
|
} = props;
|
|
53130
53186
|
const annotationEditorFormRef = useRef42(null);
|
|
53131
|
-
const [currentTab, setCurrentTab] =
|
|
53132
|
-
const [isInEditMode, setIsInEditMode] =
|
|
53133
|
-
const [hasClickedCancel, setHasClickedCancel] =
|
|
53187
|
+
const [currentTab, setCurrentTab] = useState98(initialTab);
|
|
53188
|
+
const [isInEditMode, setIsInEditMode] = useState98(false);
|
|
53189
|
+
const [hasClickedCancel, setHasClickedCancel] = useState98(false);
|
|
53134
53190
|
const { data: entityBundle } = useEntityBundle_default(entityId, versionNumber);
|
|
53135
53191
|
const canEdit = entityBundle && entityBundle.permissions.canEdit;
|
|
53136
53192
|
const isVersionable = entityBundle && isVersionableEntityType(entityBundle.entityType);
|
|
@@ -53279,9 +53335,9 @@ var EntityBadgeIcons = (props) => {
|
|
|
53279
53335
|
// 60 seconds
|
|
53280
53336
|
}
|
|
53281
53337
|
);
|
|
53282
|
-
const [showModal, setShowModal] =
|
|
53283
|
-
const [showUnlinkConfirmModal, setShowUnlinkConfirmModal] =
|
|
53284
|
-
const [schemaConformance, setSchemaConformance] =
|
|
53338
|
+
const [showModal, setShowModal] = useState99(false);
|
|
53339
|
+
const [showUnlinkConfirmModal, setShowUnlinkConfirmModal] = useState99(false);
|
|
53340
|
+
const [schemaConformance, setSchemaConformance] = useState99(
|
|
53285
53341
|
"" /* NO_SCHEMA */
|
|
53286
53342
|
);
|
|
53287
53343
|
const { isInExperimentalMode } = useSynapseContext();
|
|
@@ -53297,7 +53353,7 @@ var EntityBadgeIcons = (props) => {
|
|
|
53297
53353
|
});
|
|
53298
53354
|
const maxAnnosToShow = 10;
|
|
53299
53355
|
const annotationsCount = bundle?.annotations && !isEmpty8(bundle.annotations.annotations) ? Object.keys(bundle.annotations.annotations).length : 0;
|
|
53300
|
-
|
|
53356
|
+
useEffect72(() => {
|
|
53301
53357
|
if (isInExperimentalMode && schemaValidationResults) {
|
|
53302
53358
|
if (schemaValidationResults.isValid) {
|
|
53303
53359
|
setSchemaConformance("Valid" /* VALID */);
|
|
@@ -53607,7 +53663,7 @@ var DetailsViewVersionRenderer = ({
|
|
|
53607
53663
|
// 60 seconds
|
|
53608
53664
|
});
|
|
53609
53665
|
const versions = versionData?.pages.flatMap((page) => page.results) ?? [];
|
|
53610
|
-
|
|
53666
|
+
useEffect73(() => {
|
|
53611
53667
|
if (isSelected && versionSelection == "REQUIRED" /* REQUIRED */ && currentSelectedVersion === NO_VERSION_NUMBER && versions.length > 0) {
|
|
53612
53668
|
toggleSelection({
|
|
53613
53669
|
targetId: id,
|
|
@@ -53711,8 +53767,8 @@ var DetailsView = ({
|
|
|
53711
53767
|
const queryClient = useQueryClient10();
|
|
53712
53768
|
const { accessToken } = useSynapseContext();
|
|
53713
53769
|
const showSelectColumn = selectColumnType !== "none";
|
|
53714
|
-
const [shouldSelectAll, setShouldSelectAll] =
|
|
53715
|
-
const [showLoadingScreen, setShowLoadingScreen] =
|
|
53770
|
+
const [shouldSelectAll, setShouldSelectAll] = useState100(false);
|
|
53771
|
+
const [showLoadingScreen, setShowLoadingScreen] = useState100(false);
|
|
53716
53772
|
const cancelQuery = () => {
|
|
53717
53773
|
queryClient.cancelQueries([
|
|
53718
53774
|
"entitychildren",
|
|
@@ -53732,7 +53788,7 @@ var DetailsView = ({
|
|
|
53732
53788
|
return "default";
|
|
53733
53789
|
}
|
|
53734
53790
|
};
|
|
53735
|
-
|
|
53791
|
+
useEffect74(() => {
|
|
53736
53792
|
async function handleSelectAll() {
|
|
53737
53793
|
if (shouldSelectAll) {
|
|
53738
53794
|
if (hasNextPage && fetchNextPage) {
|
|
@@ -54081,8 +54137,8 @@ var DetailsView = ({
|
|
|
54081
54137
|
|
|
54082
54138
|
// src/components/EntityFinder/details/configurations/EntityChildrenDetails.tsx
|
|
54083
54139
|
var EntityChildrenDetails = ({ parentContainerId, ...sharedProps }) => {
|
|
54084
|
-
const [sortBy3, setSortBy] =
|
|
54085
|
-
const [sortDirection, setSortDirection] =
|
|
54140
|
+
const [sortBy3, setSortBy] = useState101("NAME" /* NAME */);
|
|
54141
|
+
const [sortDirection, setSortDirection] = useState101("ASC" /* ASC */);
|
|
54086
54142
|
const getChildrenInfiniteRequestObject = {
|
|
54087
54143
|
parentId: parentContainerId,
|
|
54088
54144
|
includeTotalChildCount: true,
|
|
@@ -54253,7 +54309,7 @@ var SearchDetails = ({
|
|
|
54253
54309
|
|
|
54254
54310
|
// src/components/EntityFinder/details/EntityDetailsList.tsx
|
|
54255
54311
|
var EntityDetailsList = ({ configuration, ...sharedProps }) => {
|
|
54256
|
-
const [component, setComponent] =
|
|
54312
|
+
const [component, setComponent] = useState102(/* @__PURE__ */ React417.createElement(React417.Fragment, null));
|
|
54257
54313
|
useDeepCompareEffect5(() => {
|
|
54258
54314
|
const getComponentFromConfiguration = (config) => {
|
|
54259
54315
|
switch (config.type) {
|
|
@@ -54320,7 +54376,7 @@ var EntityDetailsList = ({ configuration, ...sharedProps }) => {
|
|
|
54320
54376
|
|
|
54321
54377
|
// src/components/EntityFinder/SelectionPane.tsx
|
|
54322
54378
|
import { Clear as Clear2 } from "@mui/icons-material";
|
|
54323
|
-
import React418, { useEffect as
|
|
54379
|
+
import React418, { useEffect as useEffect75, useState as useState103 } from "react";
|
|
54324
54380
|
var SelectionPane = ({
|
|
54325
54381
|
title,
|
|
54326
54382
|
selectedEntities,
|
|
@@ -54354,10 +54410,10 @@ var EntityPathDisplay = ({ entity, toggleSelection }) => {
|
|
|
54354
54410
|
entity.targetId,
|
|
54355
54411
|
entity.targetVersionNumber
|
|
54356
54412
|
);
|
|
54357
|
-
const [entityName, setEntityName] =
|
|
54358
|
-
const [fullPath, setFullPath] =
|
|
54359
|
-
const [displayedPath, setDisplayedPath] =
|
|
54360
|
-
|
|
54413
|
+
const [entityName, setEntityName] = useState103("");
|
|
54414
|
+
const [fullPath, setFullPath] = useState103("");
|
|
54415
|
+
const [displayedPath, setDisplayedPath] = useState103("");
|
|
54416
|
+
useEffect75(() => {
|
|
54361
54417
|
if (bundle?.path?.path) {
|
|
54362
54418
|
const header = bundle.path.path[bundle.path.path.length - 1];
|
|
54363
54419
|
setEntityName(header.name ?? header.id);
|
|
@@ -54396,16 +54452,16 @@ var EntityPathDisplay = ({ entity, toggleSelection }) => {
|
|
|
54396
54452
|
// src/components/EntityFinder/tree/EntityTree.tsx
|
|
54397
54453
|
import React420, {
|
|
54398
54454
|
useCallback as useCallback25,
|
|
54399
|
-
useEffect as
|
|
54455
|
+
useEffect as useEffect77,
|
|
54400
54456
|
useMemo as useMemo34,
|
|
54401
|
-
useState as
|
|
54457
|
+
useState as useState105
|
|
54402
54458
|
} from "react";
|
|
54403
54459
|
import { Dropdown as Dropdown6 } from "react-bootstrap";
|
|
54404
54460
|
|
|
54405
54461
|
// src/components/EntityFinder/tree/VirtualizedTree.tsx
|
|
54406
54462
|
import { cloneDeep as cloneDeep5 } from "lodash-es";
|
|
54407
54463
|
import dayjs15 from "dayjs";
|
|
54408
|
-
import React419, { useCallback as useCallback24, useEffect as
|
|
54464
|
+
import React419, { useCallback as useCallback24, useEffect as useEffect76, useState as useState104 } from "react";
|
|
54409
54465
|
import { useInView as useInView8 } from "react-intersection-observer";
|
|
54410
54466
|
import AutoSizer from "react-virtualized-auto-sizer";
|
|
54411
54467
|
import {
|
|
@@ -54505,13 +54561,13 @@ function Node4(props) {
|
|
|
54505
54561
|
style,
|
|
54506
54562
|
setOpen
|
|
54507
54563
|
} = props;
|
|
54508
|
-
const [isLoading, setLoading] =
|
|
54564
|
+
const [isLoading, setLoading] = useState104(false);
|
|
54509
54565
|
const nodeText = isEntityHeaderNode(node) ? /* @__PURE__ */ React419.createElement("span", null, node.name) : isRootNodeConfiguration(node) ? /* @__PURE__ */ React419.createElement("span", null, node.nodeText) : (
|
|
54510
54566
|
// Pagination node
|
|
54511
54567
|
/* @__PURE__ */ React419.createElement(Skeleton_default, { width: 100 })
|
|
54512
54568
|
);
|
|
54513
54569
|
const { ref, inView } = useInView8();
|
|
54514
|
-
|
|
54570
|
+
useEffect76(() => {
|
|
54515
54571
|
if (isPaginationNode(node) && inView) {
|
|
54516
54572
|
getNextPageOfChildren();
|
|
54517
54573
|
}
|
|
@@ -54526,7 +54582,7 @@ function Node4(props) {
|
|
|
54526
54582
|
await setOpen(!isOpen);
|
|
54527
54583
|
}
|
|
54528
54584
|
}, [getNextPageOfChildren, node, isOpen, setOpen]);
|
|
54529
|
-
|
|
54585
|
+
useEffect76(() => {
|
|
54530
54586
|
if (treeNodeType === 1 /* DUAL_PANE */ && isSelected && !isOpen) {
|
|
54531
54587
|
toggleExpand();
|
|
54532
54588
|
}
|
|
@@ -54666,10 +54722,10 @@ var VirtualizedTree = (props) => {
|
|
|
54666
54722
|
autoExpand
|
|
54667
54723
|
} = props;
|
|
54668
54724
|
const { accessToken } = useSynapseContext();
|
|
54669
|
-
const [rootNode, setRootNode] =
|
|
54725
|
+
const [rootNode, setRootNode] = useState104(
|
|
54670
54726
|
rootNodeConfiguration
|
|
54671
54727
|
);
|
|
54672
|
-
|
|
54728
|
+
useEffect76(() => {
|
|
54673
54729
|
setRootNode(rootNodeConfiguration);
|
|
54674
54730
|
}, [rootNodeConfiguration, rootNodeConfiguration.children]);
|
|
54675
54731
|
const itemSize = useCallback24(
|
|
@@ -54794,8 +54850,8 @@ function EntityTree(props) {
|
|
|
54794
54850
|
const DEFAULT_CONFIGURATION = {
|
|
54795
54851
|
type: 5 /* PROMPT */
|
|
54796
54852
|
};
|
|
54797
|
-
const [scope, setScope] =
|
|
54798
|
-
|
|
54853
|
+
const [scope, setScope] = useState105(initialScope);
|
|
54854
|
+
useEffect77(() => {
|
|
54799
54855
|
if (setDetailsViewConfiguration) {
|
|
54800
54856
|
setDetailsViewConfiguration(DEFAULT_CONFIGURATION);
|
|
54801
54857
|
}
|
|
@@ -54901,7 +54957,7 @@ function EntityTree(props) {
|
|
|
54901
54957
|
projectHeader,
|
|
54902
54958
|
scope
|
|
54903
54959
|
]);
|
|
54904
|
-
|
|
54960
|
+
useEffect77(() => {
|
|
54905
54961
|
if (setDetailsViewConfiguration || setBreadcrumbItems) {
|
|
54906
54962
|
let detailsViewConfig;
|
|
54907
54963
|
let breadcrumbItems = [];
|
|
@@ -55090,14 +55146,14 @@ var EntityFinder = ({
|
|
|
55090
55146
|
treeOnly = false
|
|
55091
55147
|
}) => {
|
|
55092
55148
|
const { accessToken } = useSynapseContext();
|
|
55093
|
-
const [searchActive, setSearchActive] =
|
|
55094
|
-
const [searchInput, setSearchInput] =
|
|
55095
|
-
const [searchTerms, setSearchTerms] =
|
|
55096
|
-
const [breadcrumbsProps, setBreadcrumbsProps] =
|
|
55149
|
+
const [searchActive, setSearchActive] = useState106(false);
|
|
55150
|
+
const [searchInput, setSearchInput] = useState106();
|
|
55151
|
+
const [searchTerms, setSearchTerms] = useState106();
|
|
55152
|
+
const [breadcrumbsProps, setBreadcrumbsProps] = useState106({
|
|
55097
55153
|
items: []
|
|
55098
55154
|
});
|
|
55099
|
-
const [searchByIdResults, setSearchByIdResults] =
|
|
55100
|
-
const [configFromTreeView, setConfigFromTreeView] =
|
|
55155
|
+
const [searchByIdResults, setSearchByIdResults] = useState106([]);
|
|
55156
|
+
const [configFromTreeView, setConfigFromTreeView] = useState106({
|
|
55101
55157
|
type: 5 /* PROMPT */
|
|
55102
55158
|
});
|
|
55103
55159
|
const searchInputRef = useRef43(null);
|
|
@@ -55109,7 +55165,7 @@ var EntityFinder = ({
|
|
|
55109
55165
|
() => [...visibleTypesInList, ...selectableTypes],
|
|
55110
55166
|
[visibleTypesInList, selectableTypes]
|
|
55111
55167
|
);
|
|
55112
|
-
const [currentContainer, setCurrentContainer] =
|
|
55168
|
+
const [currentContainer, setCurrentContainer] = useState106(initialContainer);
|
|
55113
55169
|
const handleError = useErrorHandler4();
|
|
55114
55170
|
const setBreadcrumbs = useCallback26(
|
|
55115
55171
|
(items) => {
|
|
@@ -55133,7 +55189,7 @@ var EntityFinder = ({
|
|
|
55133
55189
|
},
|
|
55134
55190
|
[selectableTypes]
|
|
55135
55191
|
);
|
|
55136
|
-
|
|
55192
|
+
useEffect78(() => {
|
|
55137
55193
|
onSelectedChange(
|
|
55138
55194
|
selectedEntities.toArray().map(([id, version]) => {
|
|
55139
55195
|
return {
|
|
@@ -55143,7 +55199,7 @@ var EntityFinder = ({
|
|
|
55143
55199
|
})
|
|
55144
55200
|
);
|
|
55145
55201
|
}, [selectedEntities, onSelectedChange]);
|
|
55146
|
-
|
|
55202
|
+
useEffect78(() => {
|
|
55147
55203
|
if (searchTerms?.length === 1) {
|
|
55148
55204
|
const searchTermReference = parseSynId(searchTerms[0]);
|
|
55149
55205
|
if (searchTermReference) {
|
|
@@ -55390,14 +55446,14 @@ function useEntitySelection(selectMultiple) {
|
|
|
55390
55446
|
}
|
|
55391
55447
|
|
|
55392
55448
|
// src/components/ChallengeDataDownload/ChallengeEntityChildrenDetails.tsx
|
|
55393
|
-
import React424, { useState as
|
|
55449
|
+
import React424, { useState as useState108 } from "react";
|
|
55394
55450
|
|
|
55395
55451
|
// src/components/ChallengeDataDownload/ChallengeDataTable.tsx
|
|
55396
55452
|
import BaseTable2, {
|
|
55397
55453
|
AutoResizer as AutoResizer2,
|
|
55398
55454
|
Column as Column2
|
|
55399
55455
|
} from "@sage-bionetworks/react-base-table";
|
|
55400
|
-
import React423, { useCallback as useCallback28, useEffect as
|
|
55456
|
+
import React423, { useCallback as useCallback28, useEffect as useEffect79, useMemo as useMemo36, useState as useState107 } from "react";
|
|
55401
55457
|
import { useQueryClient as useQueryClient11 } from "react-query";
|
|
55402
55458
|
|
|
55403
55459
|
// src/components/ChallengeDataDownload/Renderers.tsx
|
|
@@ -55453,8 +55509,8 @@ var ChallengeDataTable = ({
|
|
|
55453
55509
|
const queryClient = useQueryClient11();
|
|
55454
55510
|
const { accessToken } = useSynapseContext();
|
|
55455
55511
|
const showSelectColumn = selectColumnType !== "none";
|
|
55456
|
-
const [shouldSelectAll, setShouldSelectAll] =
|
|
55457
|
-
const [showLoadingScreen, setShowLoadingScreen] =
|
|
55512
|
+
const [shouldSelectAll, setShouldSelectAll] = useState107(false);
|
|
55513
|
+
const [showLoadingScreen, setShowLoadingScreen] = useState107(false);
|
|
55458
55514
|
const cancelQuery = () => {
|
|
55459
55515
|
queryClient.cancelQueries([
|
|
55460
55516
|
"entitychildren",
|
|
@@ -55474,7 +55530,7 @@ var ChallengeDataTable = ({
|
|
|
55474
55530
|
return "default";
|
|
55475
55531
|
}
|
|
55476
55532
|
};
|
|
55477
|
-
|
|
55533
|
+
useEffect79(() => {
|
|
55478
55534
|
async function handleSelectAll() {
|
|
55479
55535
|
if (shouldSelectAll) {
|
|
55480
55536
|
if (hasNextPage && fetchNextPage) {
|
|
@@ -55795,8 +55851,8 @@ var ChallengeDataTable = ({
|
|
|
55795
55851
|
|
|
55796
55852
|
// src/components/ChallengeDataDownload/ChallengeEntityChildrenDetails.tsx
|
|
55797
55853
|
var ChallengeEntityChildrenDetails = ({ parentContainerId, ...sharedProps }) => {
|
|
55798
|
-
const [sortBy3, setSortBy] =
|
|
55799
|
-
const [sortDirection, setSortDirection] =
|
|
55854
|
+
const [sortBy3, setSortBy] = useState108("NAME" /* NAME */);
|
|
55855
|
+
const [sortDirection, setSortDirection] = useState108("ASC" /* ASC */);
|
|
55800
55856
|
const getChildrenInfiniteRequestObject = {
|
|
55801
55857
|
parentId: parentContainerId,
|
|
55802
55858
|
includeTotalChildCount: true,
|
|
@@ -55913,26 +55969,26 @@ function ChallengeDataDownload({
|
|
|
55913
55969
|
|
|
55914
55970
|
// src/components/DownloadCart/DownloadCartPage.tsx
|
|
55915
55971
|
import React433 from "react";
|
|
55916
|
-
import { useEffect as
|
|
55972
|
+
import { useEffect as useEffect82, useState as useState112 } from "react";
|
|
55917
55973
|
|
|
55918
55974
|
// src/components/DownloadCart/AvailableForDownloadTable.tsx
|
|
55919
55975
|
import React428 from "react";
|
|
55920
55976
|
import { QueryClient as QueryClient2, QueryClientProvider as QueryClientProvider2 } from "react-query";
|
|
55921
55977
|
|
|
55922
55978
|
// src/components/DownloadCart/DownloadListTable.tsx
|
|
55923
|
-
import React427, { useState as
|
|
55979
|
+
import React427, { useState as useState110, useEffect as useEffect80 } from "react";
|
|
55924
55980
|
import { useErrorHandler as useErrorHandler5 } from "react-error-boundary";
|
|
55925
55981
|
import { Dropdown as Dropdown7, Table as Table2 } from "react-bootstrap";
|
|
55926
55982
|
import { useInView as useInView9 } from "react-intersection-observer";
|
|
55927
55983
|
import dayjs16 from "dayjs";
|
|
55928
55984
|
|
|
55929
55985
|
// src/components/DownloadCart/DirectProgrammaticDownload.tsx
|
|
55930
|
-
import React426, { useState as
|
|
55986
|
+
import React426, { useState as useState109 } from "react";
|
|
55931
55987
|
function DirectProgrammaticDownload({
|
|
55932
55988
|
entityId,
|
|
55933
55989
|
version
|
|
55934
55990
|
}) {
|
|
55935
|
-
const [isShowingModal, setIsShowingModal] =
|
|
55991
|
+
const [isShowingModal, setIsShowingModal] = useState109(false);
|
|
55936
55992
|
const rCode = `library(synapser)
|
|
55937
55993
|
synLogin('username','password')
|
|
55938
55994
|
|
|
@@ -55987,9 +56043,9 @@ function DownloadListTable(props) {
|
|
|
55987
56043
|
const { accessToken } = useSynapseContext();
|
|
55988
56044
|
const handleError = useErrorHandler5();
|
|
55989
56045
|
const { ref, inView } = useInView9();
|
|
55990
|
-
const [copyingAllSynapseIDs, setCopyingAllSynapseIDs] =
|
|
55991
|
-
const [sort, setSort] =
|
|
55992
|
-
const [filter2, setFilter] =
|
|
56046
|
+
const [copyingAllSynapseIDs, setCopyingAllSynapseIDs] = useState110(false);
|
|
56047
|
+
const [sort, setSort] = useState110(void 0);
|
|
56048
|
+
const [filter2, setFilter] = useState110(void 0);
|
|
55993
56049
|
const {
|
|
55994
56050
|
data,
|
|
55995
56051
|
status,
|
|
@@ -56001,18 +56057,18 @@ function DownloadListTable(props) {
|
|
|
56001
56057
|
error: newError,
|
|
56002
56058
|
refetch
|
|
56003
56059
|
} = useGetAvailableFilesToDownloadInfinite(sort, filter2);
|
|
56004
|
-
|
|
56060
|
+
useEffect80(() => {
|
|
56005
56061
|
if (refetch) {
|
|
56006
56062
|
refetch();
|
|
56007
56063
|
}
|
|
56008
56064
|
}, [filesStatistics, refetch]);
|
|
56009
|
-
|
|
56065
|
+
useEffect80(() => {
|
|
56010
56066
|
if (isError && newError) {
|
|
56011
56067
|
handleError(newError);
|
|
56012
56068
|
}
|
|
56013
56069
|
}, [isError, newError, handleError]);
|
|
56014
56070
|
const allRows = data?.pages.flatMap((page) => page.page) ?? [];
|
|
56015
|
-
|
|
56071
|
+
useEffect80(() => {
|
|
56016
56072
|
const copyAllSynapseIDs = () => {
|
|
56017
56073
|
const synIDs = allRows.map((item) => {
|
|
56018
56074
|
return `${item.fileEntityId}.${item.versionNumber}`;
|
|
@@ -56259,7 +56315,7 @@ function DownloadListStats(props) {
|
|
|
56259
56315
|
}
|
|
56260
56316
|
|
|
56261
56317
|
// src/components/DownloadCart/DownloadListActionsRequired.tsx
|
|
56262
|
-
import React431, { useEffect as
|
|
56318
|
+
import React431, { useEffect as useEffect81 } from "react";
|
|
56263
56319
|
import { useInView as useInView10 } from "react-intersection-observer";
|
|
56264
56320
|
var DownloadListActionsRequired = (props) => {
|
|
56265
56321
|
const { ref, inView } = useInView10();
|
|
@@ -56273,7 +56329,7 @@ var DownloadListActionsRequired = (props) => {
|
|
|
56273
56329
|
} = useGetDownloadListActionsRequiredInfinite({
|
|
56274
56330
|
useErrorBoundary: true
|
|
56275
56331
|
});
|
|
56276
|
-
|
|
56332
|
+
useEffect81(() => {
|
|
56277
56333
|
if (status === "success" && !isFetchingNextPage && hasNextPage && fetchNextPage && inView) {
|
|
56278
56334
|
fetchNextPage();
|
|
56279
56335
|
}
|
|
@@ -56296,14 +56352,14 @@ var DownloadListActionsRequired = (props) => {
|
|
|
56296
56352
|
};
|
|
56297
56353
|
|
|
56298
56354
|
// src/components/DownloadCart/CreatePackageV2.tsx
|
|
56299
|
-
import React432, { useState as
|
|
56355
|
+
import React432, { useState as useState111 } from "react";
|
|
56300
56356
|
var TEMPLATE_ERROR_FILE_NAME = "Please provide a package file name and try again.";
|
|
56301
56357
|
var CreatePackageV2 = (props) => {
|
|
56302
56358
|
const { accessToken } = useSynapseContext();
|
|
56303
|
-
const [isLoading, setIsLoading] =
|
|
56304
|
-
const [fileName, setZipFileName] =
|
|
56305
|
-
const [alert2, setAlert] =
|
|
56306
|
-
const [bulkFileDownloadResponse, setBulkFileDownloadResponse] =
|
|
56359
|
+
const [isLoading, setIsLoading] = useState111(false);
|
|
56360
|
+
const [fileName, setZipFileName] = useState111("");
|
|
56361
|
+
const [alert2, setAlert] = useState111();
|
|
56362
|
+
const [bulkFileDownloadResponse, setBulkFileDownloadResponse] = useState111(void 0);
|
|
56307
56363
|
const { onPackageCreation } = props;
|
|
56308
56364
|
const createPackageHandler = async (event) => {
|
|
56309
56365
|
event.preventDefault();
|
|
@@ -56391,11 +56447,11 @@ dl_list_file_entities = syn.get_download_list()`;
|
|
|
56391
56447
|
var cliDownloadCode = `synapse get-download-list`;
|
|
56392
56448
|
var DownloadCartPage = (props) => {
|
|
56393
56449
|
const { accessToken } = useSynapseContext();
|
|
56394
|
-
const [selectedTabIndex, setSelectedTabIndex] =
|
|
56395
|
-
const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] =
|
|
56396
|
-
const [isShowingModal, setIsShowingModal] =
|
|
56397
|
-
const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] =
|
|
56398
|
-
const [error, setError] =
|
|
56450
|
+
const [selectedTabIndex, setSelectedTabIndex] = useState112(0);
|
|
56451
|
+
const [isShowingCreatePackageUI, setIsShowingCreatePackageUI] = useState112(false);
|
|
56452
|
+
const [isShowingModal, setIsShowingModal] = useState112(false);
|
|
56453
|
+
const [isShowingDownloadSuccessAlert, setIsShowingDownloadSuccessAlert] = useState112(false);
|
|
56454
|
+
const [error, setError] = useState112();
|
|
56399
56455
|
const {
|
|
56400
56456
|
data,
|
|
56401
56457
|
isLoading,
|
|
@@ -56403,12 +56459,12 @@ var DownloadCartPage = (props) => {
|
|
|
56403
56459
|
error: newError,
|
|
56404
56460
|
refetch
|
|
56405
56461
|
} = useGetDownloadListStatistics();
|
|
56406
|
-
|
|
56462
|
+
useEffect82(() => {
|
|
56407
56463
|
if (isError && newError) {
|
|
56408
56464
|
setError(newError);
|
|
56409
56465
|
}
|
|
56410
56466
|
}, [isError, newError]);
|
|
56411
|
-
|
|
56467
|
+
useEffect82(() => {
|
|
56412
56468
|
if (data && data.numberOfFilesRequiringAction == 0) {
|
|
56413
56469
|
setSelectedTabIndex(1);
|
|
56414
56470
|
}
|
|
@@ -56563,7 +56619,7 @@ var DownloadCartPage = (props) => {
|
|
|
56563
56619
|
};
|
|
56564
56620
|
|
|
56565
56621
|
// src/components/DownloadCart/ShowDownloadV2.tsx
|
|
56566
|
-
import React434, { useEffect as
|
|
56622
|
+
import React434, { useEffect as useEffect83 } from "react";
|
|
56567
56623
|
import { useErrorHandler as useErrorHandler6 } from "react-error-boundary";
|
|
56568
56624
|
function ShowDownloadV2({ to, className = "" }) {
|
|
56569
56625
|
const { accessToken } = useSynapseContext();
|
|
@@ -56575,7 +56631,7 @@ function ShowDownloadV2({ to, className = "" }) {
|
|
|
56575
56631
|
isError,
|
|
56576
56632
|
error: newError
|
|
56577
56633
|
} = useGetDownloadListStatistics();
|
|
56578
|
-
|
|
56634
|
+
useEffect83(() => {
|
|
56579
56635
|
if (isError && newError && accessToken) {
|
|
56580
56636
|
handleError(newError);
|
|
56581
56637
|
}
|
|
@@ -56854,7 +56910,7 @@ var EntityForm = class extends React435.Component {
|
|
|
56854
56910
|
__publicField(EntityForm, "contextType", SynapseContext);
|
|
56855
56911
|
|
|
56856
56912
|
// src/components/Evaluation/EvaluationCard.tsx
|
|
56857
|
-
import React437, { useEffect as
|
|
56913
|
+
import React437, { useEffect as useEffect84, useState as useState113 } from "react";
|
|
56858
56914
|
import { Card as Card2, Col, Dropdown as Dropdown8, Row as Row5 } from "react-bootstrap";
|
|
56859
56915
|
|
|
56860
56916
|
// src/components/Evaluation/CreatedOnByUserDiv.tsx
|
|
@@ -56883,9 +56939,9 @@ var EvaluationCard = ({
|
|
|
56883
56939
|
onDeleteSuccess
|
|
56884
56940
|
}) => {
|
|
56885
56941
|
const { accessToken } = useSynapseContext();
|
|
56886
|
-
const [error, setError] =
|
|
56887
|
-
const [permissions, setPermissions] =
|
|
56888
|
-
|
|
56942
|
+
const [error, setError] = useState113();
|
|
56943
|
+
const [permissions, setPermissions] = useState113();
|
|
56944
|
+
useEffect84(() => {
|
|
56889
56945
|
setError(void 0);
|
|
56890
56946
|
getEvaluationPermissions(evaluation.id, accessToken).then((retrievedPermissions) => {
|
|
56891
56947
|
setPermissions(retrievedPermissions);
|
|
@@ -56921,7 +56977,7 @@ var EvaluationCard = ({
|
|
|
56921
56977
|
)))));
|
|
56922
56978
|
};
|
|
56923
56979
|
var EvaluationCardDropdown = ({ permissions, onEdit, onModifyAccess, onDelete }) => {
|
|
56924
|
-
const [deleteWarningShow, setDeleteWarningShow] =
|
|
56980
|
+
const [deleteWarningShow, setDeleteWarningShow] = useState113(false);
|
|
56925
56981
|
if (!(permissions.canEdit || permissions.canChangePermissions || permissions.canDelete)) {
|
|
56926
56982
|
return null;
|
|
56927
56983
|
}
|
|
@@ -56962,11 +57018,11 @@ var EvaluationCardDropdown = ({ permissions, onEdit, onModifyAccess, onDelete })
|
|
|
56962
57018
|
};
|
|
56963
57019
|
|
|
56964
57020
|
// src/components/Evaluation/EvaluationEditorPage.tsx
|
|
56965
|
-
import React444, { useState as
|
|
57021
|
+
import React444, { useState as useState118 } from "react";
|
|
56966
57022
|
|
|
56967
57023
|
// src/components/Evaluation/EvaluationEditor.tsx
|
|
56968
57024
|
import { Col as Col2, Dropdown as Dropdown9, Form as Form7, Row as Row6 } from "react-bootstrap";
|
|
56969
|
-
import React438, { useEffect as
|
|
57025
|
+
import React438, { useEffect as useEffect85, useState as useState114 } from "react";
|
|
56970
57026
|
var EvaluationEditor = ({
|
|
56971
57027
|
evaluationId,
|
|
56972
57028
|
entityId,
|
|
@@ -56977,21 +57033,21 @@ var EvaluationEditor = ({
|
|
|
56977
57033
|
throw new Error("please use either evaluationId or entityId but not both");
|
|
56978
57034
|
}
|
|
56979
57035
|
const { accessToken } = useSynapseContext();
|
|
56980
|
-
const [error, setError] =
|
|
56981
|
-
const [showSaveSuccess, setShowSaveSuccess] =
|
|
56982
|
-
|
|
57036
|
+
const [error, setError] = useState114();
|
|
57037
|
+
const [showSaveSuccess, setShowSaveSuccess] = useState114(false);
|
|
57038
|
+
useEffect85(() => {
|
|
56983
57039
|
if (error) {
|
|
56984
57040
|
setShowSaveSuccess(false);
|
|
56985
57041
|
}
|
|
56986
57042
|
}, [error]);
|
|
56987
|
-
const [name, setName] =
|
|
56988
|
-
const [description, setDescription] =
|
|
56989
|
-
const [submissionInstructionsMessage, setSubmissionInstructionsMessage] =
|
|
56990
|
-
const [submissionReceiptMessage, setSubmissionReceiptMessage] =
|
|
56991
|
-
const [evaluation, setEvaluation] =
|
|
57043
|
+
const [name, setName] = useState114("");
|
|
57044
|
+
const [description, setDescription] = useState114("");
|
|
57045
|
+
const [submissionInstructionsMessage, setSubmissionInstructionsMessage] = useState114("");
|
|
57046
|
+
const [submissionReceiptMessage, setSubmissionReceiptMessage] = useState114("");
|
|
57047
|
+
const [evaluation, setEvaluation] = useState114({
|
|
56992
57048
|
contentSource: entityId
|
|
56993
57049
|
});
|
|
56994
|
-
|
|
57050
|
+
useEffect85(() => {
|
|
56995
57051
|
setName(evaluation.name ?? "");
|
|
56996
57052
|
setDescription(evaluation.description ?? "");
|
|
56997
57053
|
setSubmissionInstructionsMessage(
|
|
@@ -56999,7 +57055,7 @@ var EvaluationEditor = ({
|
|
|
56999
57055
|
);
|
|
57000
57056
|
setSubmissionReceiptMessage(evaluation.submissionReceiptMessage ?? "");
|
|
57001
57057
|
}, [evaluation]);
|
|
57002
|
-
|
|
57058
|
+
useEffect85(() => {
|
|
57003
57059
|
if (evaluationId) {
|
|
57004
57060
|
setError(void 0);
|
|
57005
57061
|
synapse_client_default.getEvaluation(evaluationId, accessToken).then((retrievedEvaluation) => {
|
|
@@ -57091,7 +57147,7 @@ var EvaluationEditor = ({
|
|
|
57091
57147
|
)))));
|
|
57092
57148
|
};
|
|
57093
57149
|
var EvaluationEditorDropdown = ({ onClick, onDelete }) => {
|
|
57094
|
-
const [deleteWarningShow, setDeleteWarningShow] =
|
|
57150
|
+
const [deleteWarningShow, setDeleteWarningShow] = useState114(false);
|
|
57095
57151
|
return /* @__PURE__ */ React438.createElement(React438.Fragment, null, onDelete && /* @__PURE__ */ React438.createElement(
|
|
57096
57152
|
WarningDialog_default,
|
|
57097
57153
|
{
|
|
@@ -57120,15 +57176,15 @@ var EvaluationEditorDropdown = ({ onClick, onDelete }) => {
|
|
|
57120
57176
|
};
|
|
57121
57177
|
|
|
57122
57178
|
// src/components/Evaluation/EvaluationRoundEditorList.tsx
|
|
57123
|
-
import React443, { useEffect as
|
|
57179
|
+
import React443, { useEffect as useEffect88, useState as useState117 } from "react";
|
|
57124
57180
|
|
|
57125
57181
|
// src/components/Evaluation/EvaluationRoundEditor.tsx
|
|
57126
|
-
import React442, { useEffect as
|
|
57182
|
+
import React442, { useEffect as useEffect87, useState as useState116 } from "react";
|
|
57127
57183
|
import { Card as Card3, Col as Col3, Form as Form8, FormControl as FormControl4, FormGroup as FormGroup3, Row as Row7 } from "react-bootstrap";
|
|
57128
57184
|
import dayjs17 from "dayjs";
|
|
57129
57185
|
|
|
57130
57186
|
// src/components/Evaluation/round_limits/EvaluationRoundLimitOptionsList.tsx
|
|
57131
|
-
import React440, { useCallback as useCallback30, useEffect as
|
|
57187
|
+
import React440, { useCallback as useCallback30, useEffect as useEffect86 } from "react";
|
|
57132
57188
|
import { CloseTwoTone as CloseTwoTone2, AddBox } from "@mui/icons-material";
|
|
57133
57189
|
|
|
57134
57190
|
// src/components/Evaluation/round_limits/EvaluationRoundLimitOptions.tsx
|
|
@@ -57200,7 +57256,7 @@ var EvaluationRoundLimitOptionsList = ({ limitInputs, handleChange, handleDelete
|
|
|
57200
57256
|
maxSubmissionString: ""
|
|
57201
57257
|
});
|
|
57202
57258
|
}, [onAddNewLimit, selectedTypes]);
|
|
57203
|
-
|
|
57259
|
+
useEffect86(() => {
|
|
57204
57260
|
if (limitInputs.length === 0) {
|
|
57205
57261
|
addNewLimit();
|
|
57206
57262
|
}
|
|
@@ -57279,9 +57335,9 @@ var convertRoundLimitsToInput = (evaluationRoundLimits) => {
|
|
|
57279
57335
|
|
|
57280
57336
|
// src/components/Evaluation/EvaluationRoundEditorDropdown.tsx
|
|
57281
57337
|
import { Dropdown as Dropdown10 } from "react-bootstrap";
|
|
57282
|
-
import React441, { useState as
|
|
57338
|
+
import React441, { useState as useState115 } from "react";
|
|
57283
57339
|
var EvaluationRoundEditorDropdown = ({ onSave, onDelete }) => {
|
|
57284
|
-
const [deleteWarningShow, setDeleteWarningShow] =
|
|
57340
|
+
const [deleteWarningShow, setDeleteWarningShow] = useState115(false);
|
|
57285
57341
|
return /* @__PURE__ */ React441.createElement(React441.Fragment, null, /* @__PURE__ */ React441.createElement(
|
|
57286
57342
|
WarningDialog_default,
|
|
57287
57343
|
{
|
|
@@ -57376,23 +57432,23 @@ var convertInputsToEvaluationRound = (evaluationRoundInputProp, startDate, endDa
|
|
|
57376
57432
|
};
|
|
57377
57433
|
var EvaluationRoundEditor = ({ evaluationRoundInput, onSave, onDelete }) => {
|
|
57378
57434
|
const { accessToken } = useSynapseContext();
|
|
57379
|
-
const [error, setError] =
|
|
57380
|
-
const [showSaveSuccess, setShowSaveSuccess] =
|
|
57381
|
-
|
|
57435
|
+
const [error, setError] = useState116();
|
|
57436
|
+
const [showSaveSuccess, setShowSaveSuccess] = useState116(false);
|
|
57437
|
+
useEffect87(() => {
|
|
57382
57438
|
if (error) {
|
|
57383
57439
|
setShowSaveSuccess(false);
|
|
57384
57440
|
}
|
|
57385
57441
|
}, [error]);
|
|
57386
|
-
const [startDate, setStartDate] =
|
|
57442
|
+
const [startDate, setStartDate] = useState116(
|
|
57387
57443
|
dayjs17(evaluationRoundInput.roundStart)
|
|
57388
57444
|
);
|
|
57389
|
-
const [endDate, setEndDate] =
|
|
57445
|
+
const [endDate, setEndDate] = useState116(
|
|
57390
57446
|
dayjs17(evaluationRoundInput.roundEnd)
|
|
57391
57447
|
);
|
|
57392
|
-
const [totalSubmissionLimit, setTotalSubmissionLimit] =
|
|
57448
|
+
const [totalSubmissionLimit, setTotalSubmissionLimit] = useState116(
|
|
57393
57449
|
evaluationRoundInput.totalSubmissionLimit
|
|
57394
57450
|
);
|
|
57395
|
-
const [advancedMode, setAdvancedMode] =
|
|
57451
|
+
const [advancedMode, setAdvancedMode] = useState116(false);
|
|
57396
57452
|
const {
|
|
57397
57453
|
list: advancedLimits,
|
|
57398
57454
|
handleListRemove,
|
|
@@ -57551,7 +57607,7 @@ var fetchEvaluationList = (evaluationId, accessToken, setListCallback, errorHand
|
|
|
57551
57607
|
};
|
|
57552
57608
|
var EvaluationRoundEditorList = ({ evaluationId }) => {
|
|
57553
57609
|
const { accessToken } = useSynapseContext();
|
|
57554
|
-
const [error, setError] =
|
|
57610
|
+
const [error, setError] = useState117();
|
|
57555
57611
|
const {
|
|
57556
57612
|
list: evaluationRoundInputList,
|
|
57557
57613
|
appendToList: appendToEvaluationRoundInputList,
|
|
@@ -57559,7 +57615,7 @@ var EvaluationRoundEditorList = ({ evaluationId }) => {
|
|
|
57559
57615
|
handleListRemove: handleEvaluationRoundInputListRemove,
|
|
57560
57616
|
setList: setEvaluationRoundInputList
|
|
57561
57617
|
} = useListState([]);
|
|
57562
|
-
|
|
57618
|
+
useEffect88(
|
|
57563
57619
|
() => {
|
|
57564
57620
|
fetchEvaluationList(
|
|
57565
57621
|
evaluationId,
|
|
@@ -57613,7 +57669,7 @@ var EvaluationEditorPage = ({
|
|
|
57613
57669
|
entityId,
|
|
57614
57670
|
onDeleteSuccess
|
|
57615
57671
|
}) => {
|
|
57616
|
-
const [savedEvaluationId, setSavedEvaluationId] =
|
|
57672
|
+
const [savedEvaluationId, setSavedEvaluationId] = useState118(evaluationId);
|
|
57617
57673
|
return /* @__PURE__ */ React444.createElement("div", { className: "bootstrap-4-backport" }, /* @__PURE__ */ React444.createElement(
|
|
57618
57674
|
EvaluationEditor,
|
|
57619
57675
|
{
|
|
@@ -57629,7 +57685,7 @@ var EvaluationEditorPage = ({
|
|
|
57629
57685
|
)));
|
|
57630
57686
|
};
|
|
57631
57687
|
var FakeEvaluationRoundEditorList = () => {
|
|
57632
|
-
const [showEvaluationNotExistAlert, setShowEvaluationNotExistAlert] =
|
|
57688
|
+
const [showEvaluationNotExistAlert, setShowEvaluationNotExistAlert] = useState118(false);
|
|
57633
57689
|
return /* @__PURE__ */ React444.createElement("div", { "data-testid": "FakeEvaluationRoundEditorList" }, showEvaluationNotExistAlert ? /* @__PURE__ */ React444.createElement(Alert_default, { severity: "info" }, "Evaluation Rounds can be edited once the Evaluation has been created.") : /* @__PURE__ */ React444.createElement(
|
|
57634
57690
|
Button_default,
|
|
57635
57691
|
{
|
|
@@ -57646,15 +57702,15 @@ var FakeEvaluationRoundEditorList = () => {
|
|
|
57646
57702
|
|
|
57647
57703
|
// src/components/ExperimentalMode/ExperimentalMode.tsx
|
|
57648
57704
|
import React445 from "react";
|
|
57649
|
-
import { useEffect as
|
|
57705
|
+
import { useEffect as useEffect89, useState as useState119 } from "react";
|
|
57650
57706
|
import UniversalCookies2 from "universal-cookie";
|
|
57651
57707
|
import { InfoOutlined as InfoOutlined3 } from "@mui/icons-material";
|
|
57652
57708
|
var experimentalModeText = "This mode gives you early access to features that are still in development. Please note that we do not guarantee an absence of errors, and that the data created using these features may be lost during product upgrade.";
|
|
57653
57709
|
var ExperimentalMode = () => {
|
|
57654
|
-
const [isExperimentalModeOn, setIsExperimentalModeOn] =
|
|
57710
|
+
const [isExperimentalModeOn, setIsExperimentalModeOn] = useState119(false);
|
|
57655
57711
|
const cookies2 = new UniversalCookies2();
|
|
57656
57712
|
let mounted = true;
|
|
57657
|
-
|
|
57713
|
+
useEffect89(() => {
|
|
57658
57714
|
if (mounted) {
|
|
57659
57715
|
if (isInSynapseExperimentalMode()) {
|
|
57660
57716
|
setIsExperimentalModeOn(true);
|
|
@@ -57694,13 +57750,13 @@ var ExperimentalMode = () => {
|
|
|
57694
57750
|
var ExperimentalMode_default = ExperimentalMode;
|
|
57695
57751
|
|
|
57696
57752
|
// src/components/ExternalFileHandleLink/ExternalFileHandleLink.tsx
|
|
57697
|
-
import React446, { useEffect as
|
|
57753
|
+
import React446, { useEffect as useEffect90, useState as useState120 } from "react";
|
|
57698
57754
|
import { OpenInNewTwoTone as OpenInNewTwoTone2 } from "@mui/icons-material";
|
|
57699
57755
|
var ExternalFileHandleLink = (props) => {
|
|
57700
57756
|
const { accessToken } = useSynapseContext();
|
|
57701
57757
|
const { synId, className } = props;
|
|
57702
|
-
const [data, setData] =
|
|
57703
|
-
|
|
57758
|
+
const [data, setData] = useState120(void 0);
|
|
57759
|
+
useEffect90(() => {
|
|
57704
57760
|
const getEntity2 = async () => {
|
|
57705
57761
|
try {
|
|
57706
57762
|
const fileEntity2 = await synapse_client_default.getEntity(
|
|
@@ -57756,7 +57812,7 @@ var ExternalFileHandleLink = (props) => {
|
|
|
57756
57812
|
|
|
57757
57813
|
// src/components/FeaturedDataTabs/FeaturedDataTabs.tsx
|
|
57758
57814
|
import React452 from "react";
|
|
57759
|
-
import { useState as
|
|
57815
|
+
import { useState as useState122 } from "react";
|
|
57760
57816
|
|
|
57761
57817
|
// src/components/FeaturedDataTabs/FeaturedDataPlots.tsx
|
|
57762
57818
|
import React451 from "react";
|
|
@@ -57765,7 +57821,7 @@ import React451 from "react";
|
|
|
57765
57821
|
import React449 from "react";
|
|
57766
57822
|
|
|
57767
57823
|
// src/components/FeaturedDataTabs/FacetPlotsCard.tsx
|
|
57768
|
-
import React448, { useEffect as
|
|
57824
|
+
import React448, { useEffect as useEffect91, useState as useState121 } from "react";
|
|
57769
57825
|
import Plotly3 from "plotly.js-basic-dist";
|
|
57770
57826
|
import createPlotlyComponent3 from "react-plotly.js/factory";
|
|
57771
57827
|
import { SizeMe as SizeMe3 } from "react-sizeme";
|
|
@@ -58007,10 +58063,10 @@ var FacetPlotsCard = ({
|
|
|
58007
58063
|
const { accessToken } = useSynapseContext();
|
|
58008
58064
|
const { data, isLoadingNewBundle } = useQueryContext();
|
|
58009
58065
|
const { getColumnDisplayName } = useQueryVisualizationContext();
|
|
58010
|
-
const [facetPlotDataArray, setFacetPlotDataArray] =
|
|
58011
|
-
const [facetDataArray, setFacetDataArray] =
|
|
58012
|
-
const [selectedFacetValue, setSelectedFacetValue] =
|
|
58013
|
-
|
|
58066
|
+
const [facetPlotDataArray, setFacetPlotDataArray] = useState121([]);
|
|
58067
|
+
const [facetDataArray, setFacetDataArray] = useState121([]);
|
|
58068
|
+
const [selectedFacetValue, setSelectedFacetValue] = useState121("");
|
|
58069
|
+
useEffect91(() => {
|
|
58014
58070
|
if (!facetsToPlot || !data) {
|
|
58015
58071
|
return;
|
|
58016
58072
|
} else {
|
|
@@ -58274,7 +58330,7 @@ var FeaturedDataPlots_default = FeaturedDataPlots;
|
|
|
58274
58330
|
|
|
58275
58331
|
// src/components/FeaturedDataTabs/FeaturedDataTabs.tsx
|
|
58276
58332
|
var FeaturedDataTabs = (props) => {
|
|
58277
|
-
const [selectedTabIndex, setSelectedTabIndex] =
|
|
58333
|
+
const [selectedTabIndex, setSelectedTabIndex] = useState122(0);
|
|
58278
58334
|
const { configs, rgbIndex, sql } = props;
|
|
58279
58335
|
const selectedTabProps = configs[selectedTabIndex];
|
|
58280
58336
|
return /* @__PURE__ */ React452.createElement("div", { className: "FeaturedDataTabs" }, /* @__PURE__ */ React452.createElement("div", { className: "FeaturedDataTabs__tabs" }, configs.map((config, index) => {
|
|
@@ -58318,7 +58374,7 @@ var FeaturedDataTabs = (props) => {
|
|
|
58318
58374
|
var FeaturedDataTabs_default = FeaturedDataTabs;
|
|
58319
58375
|
|
|
58320
58376
|
// src/components/FeaturedToolsList/FeaturedToolsList.tsx
|
|
58321
|
-
import React454, { useState as
|
|
58377
|
+
import React454, { useState as useState123, useEffect as useEffect92 } from "react";
|
|
58322
58378
|
|
|
58323
58379
|
// src/components/FeaturedToolsList/FeaturedToolCard.tsx
|
|
58324
58380
|
import dayjs18 from "dayjs";
|
|
@@ -58365,10 +58421,10 @@ var FeaturedToolsList = ({
|
|
|
58365
58421
|
}
|
|
58366
58422
|
};
|
|
58367
58423
|
const { accessToken } = useSynapseContext();
|
|
58368
|
-
const [tools, setTools] =
|
|
58369
|
-
const [error, setError] =
|
|
58424
|
+
const [tools, setTools] = useState123([]);
|
|
58425
|
+
const [error, setError] = useState123();
|
|
58370
58426
|
const { data: queryResultBundle, error: queryError } = useGetQueryResultBundle(queryBundleRequest);
|
|
58371
|
-
|
|
58427
|
+
useEffect92(() => {
|
|
58372
58428
|
const getData = () => {
|
|
58373
58429
|
try {
|
|
58374
58430
|
const idIndex = getFieldIndex(idColumnName, queryResultBundle);
|
|
@@ -58435,7 +58491,7 @@ var FeaturedToolsList_default = FeaturedToolsList;
|
|
|
58435
58491
|
|
|
58436
58492
|
// src/components/Forum/DiscussionThread.tsx
|
|
58437
58493
|
import dayjs20 from "dayjs";
|
|
58438
|
-
import React460, { useState as
|
|
58494
|
+
import React460, { useState as useState127 } from "react";
|
|
58439
58495
|
|
|
58440
58496
|
// src/synapse-queries/forum/useReply.ts
|
|
58441
58497
|
import {
|
|
@@ -58754,14 +58810,14 @@ function useUnPinThread(options) {
|
|
|
58754
58810
|
|
|
58755
58811
|
// src/components/Forum/DiscussionReply.tsx
|
|
58756
58812
|
import dayjs19 from "dayjs";
|
|
58757
|
-
import React458, { useState as
|
|
58813
|
+
import React458, { useState as useState126 } from "react";
|
|
58758
58814
|
|
|
58759
58815
|
// src/components/Forum/ForumThreadEditor.tsx
|
|
58760
|
-
import React457, { useState as
|
|
58816
|
+
import React457, { useState as useState125 } from "react";
|
|
58761
58817
|
import { FormControl as FormControl5 } from "react-bootstrap";
|
|
58762
58818
|
|
|
58763
58819
|
// src/components/Markdown/MarkdownEditor.tsx
|
|
58764
|
-
import React456, { useRef as useRef44, useState as
|
|
58820
|
+
import React456, { useRef as useRef44, useState as useState124, useEffect as useEffect93 } from "react";
|
|
58765
58821
|
|
|
58766
58822
|
// src/components/Markdown/UserMentionModal.tsx
|
|
58767
58823
|
import React455, { useCallback as useCallback32 } from "react";
|
|
@@ -58812,18 +58868,18 @@ var MarkdownEditor = ({
|
|
|
58812
58868
|
text,
|
|
58813
58869
|
setText
|
|
58814
58870
|
}) => {
|
|
58815
|
-
const [currentTab, setCurrentTab] =
|
|
58816
|
-
const [selectionStart, setSelectionStart] =
|
|
58817
|
-
const [isShowingTagModal, setIsShowingTagModal] =
|
|
58818
|
-
const [tagModalWithKeyboard, setTagModalWithKeyboard] =
|
|
58871
|
+
const [currentTab, setCurrentTab] = useState124("WRITE");
|
|
58872
|
+
const [selectionStart, setSelectionStart] = useState124(0);
|
|
58873
|
+
const [isShowingTagModal, setIsShowingTagModal] = useState124(false);
|
|
58874
|
+
const [tagModalWithKeyboard, setTagModalWithKeyboard] = useState124(false);
|
|
58819
58875
|
const textAreaRef = useRef44(null);
|
|
58820
|
-
|
|
58876
|
+
useEffect93(() => {
|
|
58821
58877
|
const input = textAreaRef.current;
|
|
58822
58878
|
if (input) {
|
|
58823
58879
|
input.setSelectionRange(selectionStart, selectionStart);
|
|
58824
58880
|
}
|
|
58825
58881
|
}, [textAreaRef, selectionStart]);
|
|
58826
|
-
|
|
58882
|
+
useEffect93(() => {
|
|
58827
58883
|
textAreaRef.current?.focus();
|
|
58828
58884
|
}, [isShowingTagModal]);
|
|
58829
58885
|
const handleUserTag = (user) => {
|
|
@@ -58943,8 +58999,8 @@ var ForumThreadEditor = (props) => {
|
|
|
58943
58999
|
isDialog,
|
|
58944
59000
|
openDialog
|
|
58945
59001
|
} = props;
|
|
58946
|
-
const [title, setTitle] =
|
|
58947
|
-
const [text, setText] =
|
|
59002
|
+
const [title, setTitle] = useState125(initialTitle ?? "");
|
|
59003
|
+
const [text, setText] = useState125(initialText ?? "");
|
|
58948
59004
|
const { mutate: updateTitle, isLoading: isLoadingTitle } = useUpdateThreadTitle({
|
|
58949
59005
|
onSuccess: () => onClose()
|
|
58950
59006
|
});
|
|
@@ -59031,8 +59087,8 @@ var DiscussionReply = ({
|
|
|
59031
59087
|
reply,
|
|
59032
59088
|
onClickLink = () => alert("This functionality has not been implemented yet")
|
|
59033
59089
|
}) => {
|
|
59034
|
-
const [showReplyModal, setShowReplyModal] =
|
|
59035
|
-
const [showDeleteModal, setShowDeleteModal] =
|
|
59090
|
+
const [showReplyModal, setShowReplyModal] = useState126(false);
|
|
59091
|
+
const [showDeleteModal, setShowDeleteModal] = useState126(false);
|
|
59036
59092
|
const { data: currentUserProfile } = useGetCurrentUserProfile();
|
|
59037
59093
|
const { data: entityBundle } = useGetEntityBundle(reply.projectId);
|
|
59038
59094
|
const { data: message, isLoading } = useGetReply(reply);
|
|
@@ -59308,14 +59364,14 @@ var SIGN_IN_TEXT = "You will need to sign in for access to that resource";
|
|
|
59308
59364
|
var INPUT_PLACEHOLDER = "Write a reply...";
|
|
59309
59365
|
function DiscussionThread(props) {
|
|
59310
59366
|
const { threadId, limit } = props;
|
|
59311
|
-
const [orderByDatePosted, setOrderByDatePosted] =
|
|
59312
|
-
const [showThreadModal, setShowThreadModal] =
|
|
59313
|
-
const [showReplyEditor1, setShowReplyEditor1] =
|
|
59314
|
-
const [showReplyEditor2, setShowReplyEditor2] =
|
|
59315
|
-
const [showDeleteModal, setShowDeleteModal] =
|
|
59316
|
-
const [showSignInModal, setShowSignInModal] =
|
|
59317
|
-
const [showRestoreModal, setShowRestoreModal] =
|
|
59318
|
-
const [showSubscriberModal, setShowSubscriberModal] =
|
|
59367
|
+
const [orderByDatePosted, setOrderByDatePosted] = useState127(true);
|
|
59368
|
+
const [showThreadModal, setShowThreadModal] = useState127(false);
|
|
59369
|
+
const [showReplyEditor1, setShowReplyEditor1] = useState127(false);
|
|
59370
|
+
const [showReplyEditor2, setShowReplyEditor2] = useState127(false);
|
|
59371
|
+
const [showDeleteModal, setShowDeleteModal] = useState127(false);
|
|
59372
|
+
const [showSignInModal, setShowSignInModal] = useState127(false);
|
|
59373
|
+
const [showRestoreModal, setShowRestoreModal] = useState127(false);
|
|
59374
|
+
const [showSubscriberModal, setShowSubscriberModal] = useState127(false);
|
|
59319
59375
|
const { threadData, threadBody, togglePin } = useGetThread(threadId);
|
|
59320
59376
|
const { data: currentUserProfile } = useGetCurrentUserProfile();
|
|
59321
59377
|
const { data: entityBundle } = useGetEntityBundle(
|
|
@@ -59505,7 +59561,7 @@ function DiscussionThread(props) {
|
|
|
59505
59561
|
}
|
|
59506
59562
|
|
|
59507
59563
|
// src/components/Forum/ForumPage.tsx
|
|
59508
|
-
import React462, { useState as
|
|
59564
|
+
import React462, { useState as useState129 } from "react";
|
|
59509
59565
|
|
|
59510
59566
|
// src/synapse-queries/forum/useForum.ts
|
|
59511
59567
|
import {
|
|
@@ -59561,7 +59617,7 @@ function useGetForumInfinite(forumId, limit, sort, ascending, filter2, options)
|
|
|
59561
59617
|
|
|
59562
59618
|
// src/components/Forum/ForumTable.tsx
|
|
59563
59619
|
import dayjs21 from "dayjs";
|
|
59564
|
-
import React461, { useState as
|
|
59620
|
+
import React461, { useState as useState128 } from "react";
|
|
59565
59621
|
import { Table as Table3 } from "react-bootstrap";
|
|
59566
59622
|
var ForumTable = ({
|
|
59567
59623
|
forumId,
|
|
@@ -59569,10 +59625,10 @@ var ForumTable = ({
|
|
|
59569
59625
|
filter: filter2,
|
|
59570
59626
|
onClickLink
|
|
59571
59627
|
}) => {
|
|
59572
|
-
const [sort, setSort] =
|
|
59628
|
+
const [sort, setSort] = useState128(
|
|
59573
59629
|
"PINNED_AND_LAST_ACTIVITY" /* PINNED_AND_LAST_ACTIVITY */
|
|
59574
59630
|
);
|
|
59575
|
-
const [isAscending, setIsAscending] =
|
|
59631
|
+
const [isAscending, setIsAscending] = useState128(false);
|
|
59576
59632
|
const { data, hasNextPage, fetchNextPage } = useGetForumInfinite(
|
|
59577
59633
|
forumId,
|
|
59578
59634
|
limit,
|
|
@@ -59657,10 +59713,10 @@ var ForumPage = ({
|
|
|
59657
59713
|
limit,
|
|
59658
59714
|
onClickLink
|
|
59659
59715
|
}) => {
|
|
59660
|
-
const [showThreadModal, setShowThreadModal] =
|
|
59661
|
-
const [showSignInModal, setShowSignInModal] =
|
|
59662
|
-
const [showDeletedThread, setShowDeletedThread] =
|
|
59663
|
-
const [showSubscriberModal, setShowSubscriberModal] =
|
|
59716
|
+
const [showThreadModal, setShowThreadModal] = useState129(false);
|
|
59717
|
+
const [showSignInModal, setShowSignInModal] = useState129(false);
|
|
59718
|
+
const [showDeletedThread, setShowDeletedThread] = useState129(false);
|
|
59719
|
+
const [showSubscriberModal, setShowSubscriberModal] = useState129(false);
|
|
59664
59720
|
const { subscription, isLoading, toggleSubscribed } = useSubscription(
|
|
59665
59721
|
forumId,
|
|
59666
59722
|
"FORUM" /* FORUM */
|
|
@@ -59758,18 +59814,18 @@ var ForumPage = ({
|
|
|
59758
59814
|
};
|
|
59759
59815
|
|
|
59760
59816
|
// src/components/Goals/Goals.tsx
|
|
59761
|
-
import React466, { useEffect as
|
|
59817
|
+
import React466, { useEffect as useEffect94, useState as useState131 } from "react";
|
|
59762
59818
|
|
|
59763
59819
|
// src/components/Goals/Goals.Mobile.tsx
|
|
59764
59820
|
import React464 from "react";
|
|
59765
59821
|
|
|
59766
59822
|
// src/components/home_page/ExpandableContent.tsx
|
|
59767
|
-
import React463, { useState as
|
|
59823
|
+
import React463, { useState as useState130 } from "react";
|
|
59768
59824
|
function ExpandableContent({
|
|
59769
59825
|
title,
|
|
59770
59826
|
content: content2
|
|
59771
59827
|
}) {
|
|
59772
|
-
const [isExpanded, setIsExpanded] =
|
|
59828
|
+
const [isExpanded, setIsExpanded] = useState130(false);
|
|
59773
59829
|
return /* @__PURE__ */ React463.createElement("div", { className: "ExpandableContent" }, /* @__PURE__ */ React463.createElement("div", { className: "ExpandableContent__button__container" }, /* @__PURE__ */ React463.createElement(
|
|
59774
59830
|
"button",
|
|
59775
59831
|
{
|
|
@@ -59840,8 +59896,8 @@ function GoalsDesktop({
|
|
|
59840
59896
|
var Goals = (props) => {
|
|
59841
59897
|
const { entityId } = props;
|
|
59842
59898
|
const { accessToken } = useSynapseContext();
|
|
59843
|
-
const [assets, setAssets] =
|
|
59844
|
-
const [error, setError] =
|
|
59899
|
+
const [assets, setAssets] = useState131();
|
|
59900
|
+
const [error, setError] = useState131();
|
|
59845
59901
|
const showDesktop = useShowDesktop();
|
|
59846
59902
|
const queryBundleRequest = {
|
|
59847
59903
|
concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest",
|
|
@@ -59852,7 +59908,7 @@ var Goals = (props) => {
|
|
|
59852
59908
|
}
|
|
59853
59909
|
};
|
|
59854
59910
|
const { data: queryResultBundle } = useGetQueryResultBundle(queryBundleRequest);
|
|
59855
|
-
|
|
59911
|
+
useEffect94(() => {
|
|
59856
59912
|
const getData = async () => {
|
|
59857
59913
|
try {
|
|
59858
59914
|
const assetColumnIndex = getFieldIndex(
|
|
@@ -59941,7 +59997,7 @@ var Goals = (props) => {
|
|
|
59941
59997
|
|
|
59942
59998
|
// src/components/GoogleMap/GoogleMap.tsx
|
|
59943
59999
|
import { GoogleMap, LoadScript } from "@react-google-maps/api";
|
|
59944
|
-
import React468, { useCallback as useCallback34, useMemo as useMemo38, useState as
|
|
60000
|
+
import React468, { useCallback as useCallback34, useMemo as useMemo38, useState as useState132 } from "react";
|
|
59945
60001
|
import { useQuery as useQuery31 } from "react-query";
|
|
59946
60002
|
|
|
59947
60003
|
// src/components/GoogleMap/SynapseUserMarker.tsx
|
|
@@ -59984,7 +60040,7 @@ function Map3(props) {
|
|
|
59984
60040
|
const { data: apiKey } = useQuery31("googleMapsApiKey", getGoogleMapsApiKey, {
|
|
59985
60041
|
useErrorBoundary: true
|
|
59986
60042
|
});
|
|
59987
|
-
const [currentOpenGeoData, setCurrentOpenGeoData] =
|
|
60043
|
+
const [currentOpenGeoData, setCurrentOpenGeoData] = useState132(
|
|
59988
60044
|
null
|
|
59989
60045
|
);
|
|
59990
60046
|
const { data: geoData, isLoading: isLoadingGeoData } = useQuery31(
|
|
@@ -60059,12 +60115,12 @@ var GoogleMap_default = Map3;
|
|
|
60059
60115
|
var IconSvg_default2 = IconSvg_default;
|
|
60060
60116
|
|
|
60061
60117
|
// src/components/Markdown/MarkdownCollapse.tsx
|
|
60062
|
-
import React469, { useState as
|
|
60118
|
+
import React469, { useState as useState133 } from "react";
|
|
60063
60119
|
import { Collapse as Collapse4, SafeAnchor } from "react-bootstrap";
|
|
60064
60120
|
var MarkdownCollapse = (props) => {
|
|
60065
|
-
const [show, setShow] =
|
|
60066
|
-
const [wordCount, setWordCount] =
|
|
60067
|
-
const [plainText, setPlainText] =
|
|
60121
|
+
const [show, setShow] = useState133(false);
|
|
60122
|
+
const [wordCount, setWordCount] = useState133();
|
|
60123
|
+
const [plainText, setPlainText] = useState133();
|
|
60068
60124
|
const onMarkdownProcessingDone = (textContent) => {
|
|
60069
60125
|
if (textContent) {
|
|
60070
60126
|
setPlainText(textContent.trim());
|
|
@@ -60112,12 +60168,12 @@ var MarkdownCollapse = (props) => {
|
|
|
60112
60168
|
};
|
|
60113
60169
|
|
|
60114
60170
|
// src/components/OAuthClientManagement/OAuthManagement.tsx
|
|
60115
|
-
import React471, { useState as
|
|
60171
|
+
import React471, { useState as useState135 } from "react";
|
|
60116
60172
|
import { Table as Table4 } from "react-bootstrap";
|
|
60117
60173
|
import dayjs22 from "dayjs";
|
|
60118
60174
|
|
|
60119
60175
|
// src/components/OAuthClientManagement/CreateOAuthClient.tsx
|
|
60120
|
-
import React470, { useEffect as
|
|
60176
|
+
import React470, { useEffect as useEffect95, useMemo as useMemo39, useState as useState134 } from "react";
|
|
60121
60177
|
import DeleteTwoToneIcon2 from "@mui/icons-material/DeleteTwoTone";
|
|
60122
60178
|
var INPUT_CHANGE_DEBOUNCE_DELAY_MS = 500;
|
|
60123
60179
|
var GRID_NARROW = 12;
|
|
@@ -60134,16 +60190,16 @@ var CreateOAuthModal = ({
|
|
|
60134
60190
|
setIsShowingModal
|
|
60135
60191
|
}) => {
|
|
60136
60192
|
const { accessToken } = useSynapseContext();
|
|
60137
|
-
const [clientName, setClientName] =
|
|
60138
|
-
const [redirectUris, setRedirectUris] =
|
|
60139
|
-
const [policyUri, setPolicyUri] =
|
|
60140
|
-
const [clientUri, setClientUri] =
|
|
60141
|
-
const [sectorUri, setSectorUri] =
|
|
60142
|
-
const [tosUri, setTosUri] =
|
|
60143
|
-
const [warnTrigger, setWarnTrigger] =
|
|
60144
|
-
const [isDelete, setIsDelete] =
|
|
60145
|
-
const [updatedClient, setUpdatedClient] =
|
|
60146
|
-
const [error, setError] =
|
|
60193
|
+
const [clientName, setClientName] = useState134("");
|
|
60194
|
+
const [redirectUris, setRedirectUris] = useState134([{ uri: "" }]);
|
|
60195
|
+
const [policyUri, setPolicyUri] = useState134();
|
|
60196
|
+
const [clientUri, setClientUri] = useState134();
|
|
60197
|
+
const [sectorUri, setSectorUri] = useState134();
|
|
60198
|
+
const [tosUri, setTosUri] = useState134();
|
|
60199
|
+
const [warnTrigger, setWarnTrigger] = useState134(false);
|
|
60200
|
+
const [isDelete, setIsDelete] = useState134(false);
|
|
60201
|
+
const [updatedClient, setUpdatedClient] = useState134();
|
|
60202
|
+
const [error, setError] = useState134();
|
|
60147
60203
|
const warningHeader = "Are you absolutely sure?";
|
|
60148
60204
|
const warningBody = "Editing this detail will render your client invalid and will require you to resubmit verification. This action cannot be undone.";
|
|
60149
60205
|
const oAuthClient = useMemo39(() => {
|
|
@@ -60167,7 +60223,7 @@ var CreateOAuthModal = ({
|
|
|
60167
60223
|
sectorUri,
|
|
60168
60224
|
tosUri
|
|
60169
60225
|
]);
|
|
60170
|
-
|
|
60226
|
+
useEffect95(() => {
|
|
60171
60227
|
setClientName(client?.client_name ?? "");
|
|
60172
60228
|
setRedirectUris(
|
|
60173
60229
|
client?.redirect_uris.map((str) => ({ uri: str })) ?? [{ uri: "" }]
|
|
@@ -60448,14 +60504,14 @@ var CreateOAuthModal = ({
|
|
|
60448
60504
|
// src/components/OAuthClientManagement/OAuthManagement.tsx
|
|
60449
60505
|
var OAuthManagement = () => {
|
|
60450
60506
|
const { accessToken } = useSynapseContext();
|
|
60451
|
-
const [isShowingCreateClientModal, setIsShowingCreateClientModal] =
|
|
60452
|
-
const [isEdit, setIsEdit] =
|
|
60453
|
-
const [selectedClient, setSelectedClient] =
|
|
60454
|
-
const [isShowingConfirmModal, setIsShowingConfirmModal] =
|
|
60455
|
-
const [isShowingSecretWarning, setIsShowingSecretWarning] =
|
|
60456
|
-
const [isShowingSecret, setIsShowingSecret] =
|
|
60457
|
-
const [secret, setSecret] =
|
|
60458
|
-
const [isShowingVerification, setIsShowingVerification] =
|
|
60507
|
+
const [isShowingCreateClientModal, setIsShowingCreateClientModal] = useState135(false);
|
|
60508
|
+
const [isEdit, setIsEdit] = useState135(false);
|
|
60509
|
+
const [selectedClient, setSelectedClient] = useState135();
|
|
60510
|
+
const [isShowingConfirmModal, setIsShowingConfirmModal] = useState135(false);
|
|
60511
|
+
const [isShowingSecretWarning, setIsShowingSecretWarning] = useState135(false);
|
|
60512
|
+
const [isShowingSecret, setIsShowingSecret] = useState135(false);
|
|
60513
|
+
const [secret, setSecret] = useState135();
|
|
60514
|
+
const [isShowingVerification, setIsShowingVerification] = useState135(false);
|
|
60459
60515
|
const { data, hasNextPage, fetchNextPage } = useGetOAuthClientInfinite();
|
|
60460
60516
|
const oAuthClientList = data?.pages.flatMap((page) => page.results) ?? [];
|
|
60461
60517
|
const warningHeader = "Are you absolutely sure?";
|
|
@@ -60587,7 +60643,7 @@ var OAuthManagement = () => {
|
|
|
60587
60643
|
};
|
|
60588
60644
|
|
|
60589
60645
|
// src/components/Plot/ThemesPlot.tsx
|
|
60590
|
-
import React474, { useEffect as
|
|
60646
|
+
import React474, { useEffect as useEffect96, useState as useState136 } from "react";
|
|
60591
60647
|
import _7 from "lodash-es";
|
|
60592
60648
|
|
|
60593
60649
|
// src/components/Plot/DotPlot.tsx
|
|
@@ -60942,11 +60998,11 @@ function ThemesPlot({
|
|
|
60942
60998
|
dotPlotYAxisLabel = "Research Themes"
|
|
60943
60999
|
}) {
|
|
60944
61000
|
const { accessToken } = useSynapseContext();
|
|
60945
|
-
const [isLoaded, setIsLoaded] =
|
|
60946
|
-
const [dotPlotQueryData, setDotPlotQueryData] =
|
|
60947
|
-
const [topBarPlotData, setTopBarQueryData] =
|
|
60948
|
-
const [sideBarPlotData, setSideBarQueryData] =
|
|
60949
|
-
|
|
61001
|
+
const [isLoaded, setIsLoaded] = useState136(false);
|
|
61002
|
+
const [dotPlotQueryData, setDotPlotQueryData] = useState136([]);
|
|
61003
|
+
const [topBarPlotData, setTopBarQueryData] = useState136([]);
|
|
61004
|
+
const [sideBarPlotData, setSideBarQueryData] = useState136([]);
|
|
61005
|
+
useEffect96(() => {
|
|
60950
61006
|
const dotPlotData = fetchData(accessToken, dotPlot);
|
|
60951
61007
|
const topBarPlotData2 = fetchData(accessToken, topBarPlot);
|
|
60952
61008
|
const sideBarPlotData2 = fetchData(accessToken, sideBarPlot);
|
|
@@ -61099,7 +61155,7 @@ function ThemesPlot({
|
|
|
61099
61155
|
}
|
|
61100
61156
|
|
|
61101
61157
|
// src/components/Plot/UpsetPlot.tsx
|
|
61102
|
-
import React475, { useEffect as
|
|
61158
|
+
import React475, { useEffect as useEffect97, useState as useState137 } from "react";
|
|
61103
61159
|
import UpSetJS, {
|
|
61104
61160
|
extractSets,
|
|
61105
61161
|
generateCombinations
|
|
@@ -61127,15 +61183,15 @@ var UpsetPlot = ({
|
|
|
61127
61183
|
summaryLink
|
|
61128
61184
|
}) => {
|
|
61129
61185
|
const { accessToken } = useSynapseContext();
|
|
61130
|
-
const [isLoading, setIsLoading] =
|
|
61131
|
-
const [data, setData] =
|
|
61132
|
-
const [error, setError] =
|
|
61133
|
-
const [selection, setSelection] =
|
|
61186
|
+
const [isLoading, setIsLoading] = useState137();
|
|
61187
|
+
const [data, setData] = useState137();
|
|
61188
|
+
const [error, setError] = useState137();
|
|
61189
|
+
const [selection, setSelection] = useState137(null);
|
|
61134
61190
|
const { colorPalette } = ColorGradient_default(rgbIndex, 2);
|
|
61135
61191
|
const updateFontSizes = {
|
|
61136
61192
|
setLabel: "14px"
|
|
61137
61193
|
};
|
|
61138
|
-
|
|
61194
|
+
useEffect97(() => {
|
|
61139
61195
|
let isCancelled = false;
|
|
61140
61196
|
const getPlotData = async () => {
|
|
61141
61197
|
setIsLoading(true);
|
|
@@ -61241,11 +61297,11 @@ var UpsetPlot = ({
|
|
|
61241
61297
|
};
|
|
61242
61298
|
|
|
61243
61299
|
// src/components/ProjectViewCarousel/ProjectViewCarousel.tsx
|
|
61244
|
-
import React479, { useState as
|
|
61300
|
+
import React479, { useState as useState139, useEffect as useEffect98 } from "react";
|
|
61245
61301
|
|
|
61246
61302
|
// src/components/Carousel.tsx
|
|
61247
61303
|
import BrainhubCarousel from "@brainhubeu/react-carousel";
|
|
61248
|
-
import React477, { useState as
|
|
61304
|
+
import React477, { useState as useState138 } from "react";
|
|
61249
61305
|
|
|
61250
61306
|
// src/assets/icons/Arrow.tsx
|
|
61251
61307
|
import React476 from "react";
|
|
@@ -61302,7 +61358,7 @@ var Carousel = ({
|
|
|
61302
61358
|
isLoading = false
|
|
61303
61359
|
}) => {
|
|
61304
61360
|
const showDesktop = useShowDesktop();
|
|
61305
|
-
const [currentIndex, setCurrentIndex] =
|
|
61361
|
+
const [currentIndex, setCurrentIndex] = useState138(0);
|
|
61306
61362
|
const styledChildren = React477.Children.map(children, (child, index) => {
|
|
61307
61363
|
let childClass = child.props.className ?? "";
|
|
61308
61364
|
if (index === mod(currentIndex, children.length)) {
|
|
@@ -61378,14 +61434,14 @@ var ProjectViewCarousel = ({ entityId }) => {
|
|
|
61378
61434
|
}
|
|
61379
61435
|
};
|
|
61380
61436
|
const { accessToken } = useSynapseContext();
|
|
61381
|
-
const [projects, setProjects] =
|
|
61382
|
-
const [error, setError] =
|
|
61437
|
+
const [projects, setProjects] = useState139([]);
|
|
61438
|
+
const [error, setError] = useState139();
|
|
61383
61439
|
const {
|
|
61384
61440
|
data: queryResultBundle,
|
|
61385
61441
|
error: queryError,
|
|
61386
61442
|
isLoading
|
|
61387
61443
|
} = useGetQueryResultBundle(queryBundleRequest);
|
|
61388
|
-
|
|
61444
|
+
useEffect98(() => {
|
|
61389
61445
|
let isMounted = true;
|
|
61390
61446
|
const getData = async () => {
|
|
61391
61447
|
try {
|
|
@@ -61682,9 +61738,9 @@ var RenderIfInView = class extends React484.Component {
|
|
|
61682
61738
|
import React487 from "react";
|
|
61683
61739
|
|
|
61684
61740
|
// src/components/Resources/Resources.Desktop.tsx
|
|
61685
|
-
import React485, { useState as
|
|
61741
|
+
import React485, { useState as useState140 } from "react";
|
|
61686
61742
|
function ResourcesDesktop({ data }) {
|
|
61687
|
-
const [index, setIndex] =
|
|
61743
|
+
const [index, setIndex] = useState140(0);
|
|
61688
61744
|
return /* @__PURE__ */ React485.createElement("div", { className: "control-container" }, /* @__PURE__ */ React485.createElement("div", { className: "button-container" }, data?.map((el, curIndex) => {
|
|
61689
61745
|
return /* @__PURE__ */ React485.createElement(
|
|
61690
61746
|
"button",
|
|
@@ -61866,7 +61922,7 @@ var InputSizedButton = styled_default(Button_default, {
|
|
|
61866
61922
|
}));
|
|
61867
61923
|
|
|
61868
61924
|
// src/components/SubscriptionPage/SubscriptionPage.tsx
|
|
61869
|
-
import React495, { useId as useId6, useState as
|
|
61925
|
+
import React495, { useId as useId6, useState as useState142 } from "react";
|
|
61870
61926
|
|
|
61871
61927
|
// src/components/SubscriptionPage/SubscriptionItem.tsx
|
|
61872
61928
|
import React493 from "react";
|
|
@@ -61969,7 +62025,7 @@ function SubscriptionItem2(props) {
|
|
|
61969
62025
|
}
|
|
61970
62026
|
|
|
61971
62027
|
// src/components/DropdownSelect/DropdownSelect.tsx
|
|
61972
|
-
import React494, { useState as
|
|
62028
|
+
import React494, { useState as useState141 } from "react";
|
|
61973
62029
|
function DropdownSelect(props) {
|
|
61974
62030
|
const {
|
|
61975
62031
|
options,
|
|
@@ -61981,7 +62037,7 @@ function DropdownSelect(props) {
|
|
|
61981
62037
|
} = props;
|
|
61982
62038
|
const [open, setOpen] = React494.useState(false);
|
|
61983
62039
|
const anchorRef = React494.useRef(null);
|
|
61984
|
-
const [selectedIndexLocal, setSelectedIndexLocal] =
|
|
62040
|
+
const [selectedIndexLocal, setSelectedIndexLocal] = useState141(
|
|
61985
62041
|
selectedIndex ?? 0
|
|
61986
62042
|
);
|
|
61987
62043
|
const handleMenuItemClick = (event, index) => {
|
|
@@ -62068,10 +62124,10 @@ var sortOptions = [
|
|
|
62068
62124
|
{ value: "DESC", label: "Most Recent" }
|
|
62069
62125
|
];
|
|
62070
62126
|
function SubscriptionPage() {
|
|
62071
|
-
const [objectType, setObjectType] =
|
|
62127
|
+
const [objectType, setObjectType] = useState142(
|
|
62072
62128
|
"FORUM" /* FORUM */
|
|
62073
62129
|
);
|
|
62074
|
-
const [sortDirection, setSortDirection] =
|
|
62130
|
+
const [sortDirection, setSortDirection] = useState142(sortOptions[0]);
|
|
62075
62131
|
const instanceSpecificQueryKey = useId6();
|
|
62076
62132
|
const currentFilter = {
|
|
62077
62133
|
objectType,
|
|
@@ -62130,7 +62186,7 @@ function SubscriptionPage() {
|
|
|
62130
62186
|
}
|
|
62131
62187
|
|
|
62132
62188
|
// src/components/SubsectionRowRenderer/SubsectionRowRenderer.tsx
|
|
62133
|
-
import React496, { useState as
|
|
62189
|
+
import React496, { useState as useState143 } from "react";
|
|
62134
62190
|
import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck4 } from "use-deep-compare-effect";
|
|
62135
62191
|
var LIST_COLUMN_TYPES = [
|
|
62136
62192
|
"BOOLEAN_LIST" /* BOOLEAN_LIST */,
|
|
@@ -62150,8 +62206,8 @@ var SubsectionRowRenderer = ({
|
|
|
62150
62206
|
limit
|
|
62151
62207
|
}) => {
|
|
62152
62208
|
const { accessToken } = useSynapseContext();
|
|
62153
|
-
const [rowSet, setRowSet] =
|
|
62154
|
-
const [isLoading, setIsLoading] =
|
|
62209
|
+
const [rowSet, setRowSet] = useState143();
|
|
62210
|
+
const [isLoading, setIsLoading] = useState143();
|
|
62155
62211
|
let mounted = true;
|
|
62156
62212
|
useDeepCompareEffectNoCheck4(() => {
|
|
62157
62213
|
const fetchData2 = async function() {
|
|
@@ -63949,16 +64005,16 @@ var SystemUseNotification = (sxProps) => {
|
|
|
63949
64005
|
var SystemUseNotification_default = SystemUseNotification;
|
|
63950
64006
|
|
|
63951
64007
|
// src/components/TableFeedCards/TableFeedCards.tsx
|
|
63952
|
-
import React507, { useEffect as
|
|
64008
|
+
import React507, { useEffect as useEffect99, useState as useState144 } from "react";
|
|
63953
64009
|
import dayjs25 from "dayjs";
|
|
63954
64010
|
var TableFeedCards = ({
|
|
63955
64011
|
tableEntityId
|
|
63956
64012
|
}) => {
|
|
63957
64013
|
const { accessToken } = useSynapseContext();
|
|
63958
|
-
const [rowSet, setRowSet] =
|
|
63959
|
-
const [itemCountShowing, setItemCountShowing] =
|
|
64014
|
+
const [rowSet, setRowSet] = useState144();
|
|
64015
|
+
const [itemCountShowing, setItemCountShowing] = useState144(3);
|
|
63960
64016
|
let mounted = true;
|
|
63961
|
-
|
|
64017
|
+
useEffect99(() => {
|
|
63962
64018
|
const executeQuery = () => {
|
|
63963
64019
|
if (mounted) {
|
|
63964
64020
|
if (rowSet) {
|
|
@@ -64031,10 +64087,10 @@ var TableFeedCards = ({
|
|
|
64031
64087
|
var TableFeedCards_default = TableFeedCards;
|
|
64032
64088
|
|
|
64033
64089
|
// src/components/TermsAndConditions/TermsAndConditions.tsx
|
|
64034
|
-
import React518, { useEffect as
|
|
64090
|
+
import React518, { useEffect as useEffect101, useState as useState146 } from "react";
|
|
64035
64091
|
|
|
64036
64092
|
// src/components/TermsAndConditions/TermsAndConditionsItem.tsx
|
|
64037
|
-
import React509, { useEffect as
|
|
64093
|
+
import React509, { useEffect as useEffect100, useState as useState145 } from "react";
|
|
64038
64094
|
|
|
64039
64095
|
// src/assets/icons/terms/CheckIcon.tsx
|
|
64040
64096
|
import React508 from "react";
|
|
@@ -64051,10 +64107,10 @@ var CheckIcon = (props) => {
|
|
|
64051
64107
|
// src/components/TermsAndConditions/TermsAndConditionsItem.tsx
|
|
64052
64108
|
var TermsAndConditionsItem = (props) => {
|
|
64053
64109
|
const { id, item, enabled, checked, onChange } = props;
|
|
64054
|
-
const [showDesc, setShowDes] =
|
|
64055
|
-
const [isChecked, setIsChecked] =
|
|
64110
|
+
const [showDesc, setShowDes] = useState145(false);
|
|
64111
|
+
const [isChecked, setIsChecked] = useState145(false);
|
|
64056
64112
|
let mounted = true;
|
|
64057
|
-
|
|
64113
|
+
useEffect100(() => {
|
|
64058
64114
|
if (mounted) {
|
|
64059
64115
|
setIsChecked(checked);
|
|
64060
64116
|
}
|
|
@@ -64575,13 +64631,13 @@ var TermsAndConditions = ({
|
|
|
64575
64631
|
const governancePolicy = "https://help.synapse.org/docs/Synapse-Governance.2004255211.html";
|
|
64576
64632
|
const getInitialCheckboxState = () => Array.from(Array(checkboxCount).fill(false));
|
|
64577
64633
|
let mounted = true;
|
|
64578
|
-
const [checkboxChecked, setCheckboxChecked] =
|
|
64634
|
+
const [checkboxChecked, setCheckboxChecked] = useState146(
|
|
64579
64635
|
getInitialCheckboxState()
|
|
64580
64636
|
);
|
|
64581
|
-
const [checkboxEnabled, setCheckboxEnabled] =
|
|
64637
|
+
const [checkboxEnabled, setCheckboxEnabled] = useState146(
|
|
64582
64638
|
getInitialCheckboxState().fill(true, 0, 1)
|
|
64583
64639
|
);
|
|
64584
|
-
|
|
64640
|
+
useEffect101(() => {
|
|
64585
64641
|
if (mounted) {
|
|
64586
64642
|
checkFormCompleted();
|
|
64587
64643
|
}
|
|
@@ -64636,7 +64692,7 @@ var TermsAndConditions = ({
|
|
|
64636
64692
|
var TermsAndConditions_default = TermsAndConditions;
|
|
64637
64693
|
|
|
64638
64694
|
// src/components/UserCardList/UserCardListRotate.tsx
|
|
64639
|
-
import React519, { useState as
|
|
64695
|
+
import React519, { useState as useState147 } from "react";
|
|
64640
64696
|
import { useDeepCompareEffectNoCheck as useDeepCompareEffectNoCheck5 } from "use-deep-compare-effect";
|
|
64641
64697
|
var STORED_UID_KEY = "sage_rotate_uids";
|
|
64642
64698
|
var DEFAULT_DISPLAY_COUNT = 3;
|
|
@@ -64680,9 +64736,9 @@ var UserCardListRotate = ({
|
|
|
64680
64736
|
sqlOperator
|
|
64681
64737
|
}) => {
|
|
64682
64738
|
const { accessToken } = useSynapseContext();
|
|
64683
|
-
const [userIds, setUserIds] =
|
|
64684
|
-
const [queryData, setQueryData] =
|
|
64685
|
-
const [isLoading, setIsLoading] =
|
|
64739
|
+
const [userIds, setUserIds] = useState147([]);
|
|
64740
|
+
const [queryData, setQueryData] = useState147();
|
|
64741
|
+
const [isLoading, setIsLoading] = useState147();
|
|
64686
64742
|
let mounted = true;
|
|
64687
64743
|
const storageUidKey = `${STORED_UID_KEY}-${sql}-${JSON.stringify(
|
|
64688
64744
|
selectedFacets
|
|
@@ -64766,9 +64822,9 @@ function UserCardListGroupsMobile(props) {
|
|
|
64766
64822
|
}
|
|
64767
64823
|
|
|
64768
64824
|
// src/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.tsx
|
|
64769
|
-
import React521, { useState as
|
|
64825
|
+
import React521, { useState as useState148 } from "react";
|
|
64770
64826
|
function UserCardListGroupsDesktop(props) {
|
|
64771
|
-
const [selectedGroupIndex, setSelectedGroupIndex] =
|
|
64827
|
+
const [selectedGroupIndex, setSelectedGroupIndex] = useState148(0);
|
|
64772
64828
|
const { columnName, facetValues, ...rest } = props;
|
|
64773
64829
|
const selectedFacet = {
|
|
64774
64830
|
columnName,
|
|
@@ -64811,10 +64867,10 @@ function UserCardListGroups(props) {
|
|
|
64811
64867
|
}
|
|
64812
64868
|
|
|
64813
64869
|
// src/components/UserProfileLinks/UserProfileLinks.tsx
|
|
64814
|
-
import React526, { useState as
|
|
64870
|
+
import React526, { useState as useState149, useMemo as useMemo40 } from "react";
|
|
64815
64871
|
|
|
64816
64872
|
// src/components/UserProfileLinks/UserChallenges.tsx
|
|
64817
|
-
import React523, { useEffect as
|
|
64873
|
+
import React523, { useEffect as useEffect102 } from "react";
|
|
64818
64874
|
import { useErrorHandler as useErrorHandler7 } from "react-error-boundary";
|
|
64819
64875
|
import { useInView as useInView11 } from "react-intersection-observer";
|
|
64820
64876
|
function UserChallenges({ userId }) {
|
|
@@ -64830,12 +64886,12 @@ function UserChallenges({ userId }) {
|
|
|
64830
64886
|
isError,
|
|
64831
64887
|
error: newError
|
|
64832
64888
|
} = useGetUserChallengesInfinite(userId);
|
|
64833
|
-
|
|
64889
|
+
useEffect102(() => {
|
|
64834
64890
|
if (isError && newError) {
|
|
64835
64891
|
handleError(newError);
|
|
64836
64892
|
}
|
|
64837
64893
|
}, [isError, newError, handleError]);
|
|
64838
|
-
|
|
64894
|
+
useEffect102(() => {
|
|
64839
64895
|
if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
|
|
64840
64896
|
fetchNextPage();
|
|
64841
64897
|
}
|
|
@@ -64858,7 +64914,7 @@ function UserChallenges({ userId }) {
|
|
|
64858
64914
|
}
|
|
64859
64915
|
|
|
64860
64916
|
// src/components/UserProfileLinks/UserProjects.tsx
|
|
64861
|
-
import React524, { useEffect as
|
|
64917
|
+
import React524, { useEffect as useEffect103 } from "react";
|
|
64862
64918
|
import { useErrorHandler as useErrorHandler8 } from "react-error-boundary";
|
|
64863
64919
|
import { useInView as useInView12 } from "react-intersection-observer";
|
|
64864
64920
|
function UserProjects({ userId }) {
|
|
@@ -64875,12 +64931,12 @@ function UserProjects({ userId }) {
|
|
|
64875
64931
|
isError,
|
|
64876
64932
|
error: newError
|
|
64877
64933
|
} = useGetUserProjectsInfinite(userId, getProjectsParameters);
|
|
64878
|
-
|
|
64934
|
+
useEffect103(() => {
|
|
64879
64935
|
if (isError && newError) {
|
|
64880
64936
|
handleError(newError);
|
|
64881
64937
|
}
|
|
64882
64938
|
}, [isError, newError, handleError]);
|
|
64883
|
-
|
|
64939
|
+
useEffect103(() => {
|
|
64884
64940
|
if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
|
|
64885
64941
|
fetchNextPage();
|
|
64886
64942
|
}
|
|
@@ -64903,7 +64959,7 @@ function UserProjects({ userId }) {
|
|
|
64903
64959
|
}
|
|
64904
64960
|
|
|
64905
64961
|
// src/components/UserProfileLinks/UserTeams.tsx
|
|
64906
|
-
import React525, { useEffect as
|
|
64962
|
+
import React525, { useEffect as useEffect104 } from "react";
|
|
64907
64963
|
import { useErrorHandler as useErrorHandler9 } from "react-error-boundary";
|
|
64908
64964
|
import { useInView as useInView13 } from "react-intersection-observer";
|
|
64909
64965
|
function UserTeams({ userId }) {
|
|
@@ -64919,12 +64975,12 @@ function UserTeams({ userId }) {
|
|
|
64919
64975
|
isError,
|
|
64920
64976
|
error: newError
|
|
64921
64977
|
} = useGetUserTeamsInfinite(userId);
|
|
64922
|
-
|
|
64978
|
+
useEffect104(() => {
|
|
64923
64979
|
if (isError && newError) {
|
|
64924
64980
|
handleError(newError);
|
|
64925
64981
|
}
|
|
64926
64982
|
}, [isError, newError, handleError]);
|
|
64927
|
-
|
|
64983
|
+
useEffect104(() => {
|
|
64928
64984
|
if (status === "success" && !isFetching && hasNextPage && fetchNextPage && inView) {
|
|
64929
64985
|
fetchNextPage();
|
|
64930
64986
|
}
|
|
@@ -64948,7 +65004,7 @@ function UserTeams({ userId }) {
|
|
|
64948
65004
|
|
|
64949
65005
|
// src/components/UserProfileLinks/UserProfileLinks.tsx
|
|
64950
65006
|
function UserProfileLinks({ userId }) {
|
|
64951
|
-
const [currentTab, setCurrentTab] =
|
|
65007
|
+
const [currentTab, setCurrentTab] = useState149("Projects");
|
|
64952
65008
|
const { data: userProfile } = useGetUserProfile(userId);
|
|
64953
65009
|
const userProfileLinksConfig = useMemo40(
|
|
64954
65010
|
() => [
|