synapse-react-client 4.0.33 → 4.0.34

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (87) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts +5 -1
  3. package/dist/components/AccessRequirementList/AccessRequirementList.d.ts.map +1 -1
  4. package/dist/components/AccessRequirementList/AccessRequirementList.js +152 -85
  5. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  6. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js +1 -0
  7. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/CancelRequestDataAccess.js.map +1 -1
  8. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts +1 -0
  9. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.d.ts.map +1 -1
  10. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js +49 -42
  11. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
  12. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts +6 -0
  13. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.d.ts.map +1 -1
  14. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js +161 -155
  15. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.js.map +1 -1
  16. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts +21 -0
  17. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.d.ts.map +1 -0
  18. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js +163 -0
  19. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/EDucPreviewStep/EDucPreviewStep.js.map +1 -0
  20. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts +22 -0
  21. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.d.ts.map +1 -0
  22. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js +264 -0
  23. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ManualUploadDucStep/ManualUploadDucStep.js.map +1 -0
  24. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js +1 -0
  25. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/RequestDataAccessSuccess.js.map +1 -1
  26. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.d.ts.map +1 -1
  27. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js +105 -96
  28. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ResearchProjectForm/ResearchProjectForm.js.map +1 -1
  29. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts +13 -0
  30. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.d.ts.map +1 -0
  31. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js +122 -0
  32. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewCollaboratorsAndSigningOfficialAccordion.js.map +1 -0
  33. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts +17 -0
  34. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.d.ts.map +1 -0
  35. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js +112 -0
  36. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/ReviewDucStep/ReviewDucStep.js.map +1 -0
  37. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts +22 -0
  38. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.d.ts.map +1 -0
  39. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js +193 -0
  40. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/SignatureStatusStep/SignatureStatusStep.js.map +1 -0
  41. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts +1 -0
  42. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.d.ts.map +1 -1
  43. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js +7 -7
  44. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/UploadDocumentField.js.map +1 -1
  45. package/dist/components/FilePreview/PdfPreview.d.ts.map +1 -1
  46. package/dist/components/FilePreview/PdfPreview.js +23 -20
  47. package/dist/components/FilePreview/PdfPreview.js.map +1 -1
  48. package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
  49. package/dist/components/GenericCard/SynapseCardLabel.js +100 -99
  50. package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
  51. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
  52. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js +4 -1
  53. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  54. package/dist/components/StorybookComponentWrapper.d.ts.map +1 -1
  55. package/dist/components/StorybookComponentWrapper.js +1 -3
  56. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  57. package/dist/components/dataaccess/AccessRequirementDashboard.d.ts.map +1 -1
  58. package/dist/components/dataaccess/AccessRequirementDashboard.js +55 -55
  59. package/dist/components/dataaccess/AccessRequirementDashboard.js.map +1 -1
  60. package/dist/components/dataaccess/EDucTemplateTable.d.ts +3 -0
  61. package/dist/components/dataaccess/EDucTemplateTable.d.ts.map +1 -0
  62. package/dist/components/dataaccess/EDucTemplateTable.js +213 -0
  63. package/dist/components/dataaccess/EDucTemplateTable.js.map +1 -0
  64. package/dist/components/dataaccess/ReviewerDashboard.d.ts.map +1 -1
  65. package/dist/components/dataaccess/ReviewerDashboard.js +44 -34
  66. package/dist/components/dataaccess/ReviewerDashboard.js.map +1 -1
  67. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts +2 -0
  68. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  69. package/dist/components/widgets/facet-nav/FacetNavPanel.js +35 -40
  70. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  71. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.d.ts.map +1 -1
  72. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js +48 -23
  73. package/dist/mocks/msw/handlers/dataAccessRequestHandlers.js.map +1 -1
  74. package/dist/mocks/msw/handlers/eDucTemplateHandlers.d.ts.map +1 -1
  75. package/dist/mocks/msw/handlers/eDucTemplateHandlers.js +9 -9
  76. package/dist/mocks/msw/handlers/eDucTemplateHandlers.js.map +1 -1
  77. package/dist/style/components/facet_nav/_facet-nav-panel.scss +0 -6
  78. package/dist/tsconfig.build.tsbuildinfo +1 -1
  79. package/dist/utils/APIConstants.d.ts +5 -0
  80. package/dist/utils/APIConstants.d.ts.map +1 -1
  81. package/dist/utils/APIConstants.js +2 -2
  82. package/dist/utils/APIConstants.js.map +1 -1
  83. package/dist/utils/hooks/useFetchBlobUrl.d.ts +9 -0
  84. package/dist/utils/hooks/useFetchBlobUrl.d.ts.map +1 -0
  85. package/dist/utils/hooks/useFetchBlobUrl.js +19 -0
  86. package/dist/utils/hooks/useFetchBlobUrl.js.map +1 -0
  87. package/package.json +2 -2
@@ -5,35 +5,36 @@ import { useSubmitDataAccessRequest as n } from "../../../../synapse-queries/dat
5
5
  import { useGetDataAccessRequestForUpdate as r, useUpdateDataAccessRequest as i } from "../../../../synapse-queries/dataaccess/useAccessRequirements.js";
6
6
  import { useGetCurrentUserProfile as ee } from "../../../../synapse-queries/user/useUserBundle.js";
7
7
  import "../../../../synapse-queries/index.js";
8
- import a from "../../../IconSvg/IconSvg.js";
9
- import { longFieldLabelSx as o } from "../styles.js";
10
- import te from "../DataAccessRequestAccessorsEditor.js";
11
- import ne from "../DocumentTemplate.js";
12
- import re from "../ManagedACTAccessRequirementFormWikiWrapper.js";
13
- import { UploadDocumentField as s } from "../UploadDocumentField.js";
14
- import { useEffect as c, useState as l } from "react";
15
- import { Alert as ie, Box as u, Button as d, DialogActions as ae, DialogContent as oe, DialogTitle as f, Divider as p, IconButton as m, Link as h, Stack as se, TextField as g, Typography as _ } from "@mui/material";
16
- import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
17
- import { AccessType as x, FileHandleAssociateType as S } from "@sage-bionetworks/synapse-types";
18
- import C from "lodash-es/isEmpty";
19
- import { NewReleasesOutlined as w } from "@mui/icons-material";
20
- import { deepEquals as T } from "@rjsf/utils";
8
+ import te from "../../../IconSvg/IconSvg.js";
9
+ import { longFieldLabelSx as a } from "../styles.js";
10
+ import ne from "../DataAccessRequestAccessorsEditor.js";
11
+ import re from "../DocumentTemplate.js";
12
+ import ie from "../ManagedACTAccessRequirementFormWikiWrapper.js";
13
+ import { UploadDocumentField as o } from "../UploadDocumentField.js";
14
+ import { useEffect as s, useRef as ae, useState as c } from "react";
15
+ import { Alert as oe, Box as l, Button as u, DialogActions as se, DialogContent as ce, DialogTitle as le, Divider as d, IconButton as ue, Link as f, Stack as de, TextField as p, Typography as m } from "@mui/material";
16
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
17
+ import { AccessType as v, FileHandleAssociateType as y } from "@sage-bionetworks/synapse-types";
18
+ import b from "lodash-es/isEmpty";
19
+ import { NewReleasesOutlined as x } from "@mui/icons-material";
20
+ import { deepEquals as fe } from "@rjsf/utils";
21
21
  //#region src/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsFilesForm/DataAccessRequestAccessorsFilesForm.tsx
22
- function E(e) {
22
+ var S = 97;
23
+ function pe(e) {
23
24
  let { managedACTAccessRequirement: t, isEDucEnabled: n } = e, r = "", i = "";
24
- return t.isCertifiedUserRequired && t.isValidatedProfileRequired ? (r = "https://help.synapse.org/docs/User-Types.2007072795.html", i = "All data requesters must be certified users and have a validated user profile.") : t.isCertifiedUserRequired ? (r = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers", i = "All data requesters must be a certified user.") : t.isValidatedProfileRequired && (r = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers", i = "All data requesters must have a validated user profile."), /* @__PURE__ */ b(v, { children: [
25
- t.isDUCRequired && !n ? /* @__PURE__ */ b(u, {
25
+ return t.isCertifiedUserRequired && t.isValidatedProfileRequired ? (r = "https://help.synapse.org/docs/User-Types.2007072795.html", i = "All data requesters must be certified users and have a validated user profile.") : t.isCertifiedUserRequired ? (r = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-CertifiedUsers", i = "All data requesters must be a certified user.") : t.isValidatedProfileRequired && (r = "https://help.synapse.org/docs/User-Types.2007072795.html#UserAccountTiers-ValidatedUsers", i = "All data requesters must have a validated user profile."), /* @__PURE__ */ _(h, { children: [
26
+ t.isDUCRequired && !n ? /* @__PURE__ */ _(l, {
26
27
  sx: {
27
28
  display: "flex",
28
29
  gap: 2,
29
30
  alignItems: "center",
30
31
  py: 1
31
32
  },
32
- children: [/* @__PURE__ */ y(w, { sx: { color: "error.main" } }), /* @__PURE__ */ y("div", { children: "You must list the Synapse user names of all collaborators listed in your Data Use Certificate (DUC)." })]
33
+ children: [/* @__PURE__ */ g(x, { sx: { color: "error.main" } }), /* @__PURE__ */ g("div", { children: "You must list the Synapse user names of all collaborators listed in your Data Use Certificate (DUC)." })]
33
34
  }) : "",
34
35
  i,
35
36
  " ",
36
- r && /* @__PURE__ */ y(h, {
37
+ r && /* @__PURE__ */ g(f, {
37
38
  href: r,
38
39
  target: "_blank",
39
40
  rel: "noreferrer",
@@ -41,60 +42,60 @@ function E(e) {
41
42
  })
42
43
  ] });
43
44
  }
44
- function D(h) {
45
- let { onSubmissionCreated: w, managedACTAccessRequirement: D, subjectId: ce, subjectType: le, researchProjectId: O, onCancel: ue, onBackClicked: de } = h, { isAuthenticated: k } = t(), { data: A } = ee({ enabled: k }), [j, M] = l(), N = !!D.eDucTemplateId, [P, F] = l(), [I, L] = l(), [R, z] = l(), [B, V] = l(""), [H, U] = l(""), { data: W, isLoading: fe } = r(String(D.id), {
46
- enabled: k,
45
+ function C(f) {
46
+ let { onSubmissionCreated: x, managedACTAccessRequirement: S, subjectId: C, subjectType: me, researchProjectId: w, onCancel: T, onBackClicked: he, onEDucContinue: E } = f, { isAuthenticated: D } = t(), { data: O } = ee({ enabled: D }), [k, A] = c(), j = !!S.eDucTemplateId, [M, N] = c(), [P, F] = c(), [I, L] = c(), [R, z] = c(""), [B, V] = c(""), H = ae(!1), { data: U, isLoading: W } = r(String(S.id), {
47
+ enabled: D,
47
48
  staleTime: Infinity,
48
49
  throwOnError: !0
49
- }), G = W?.concreteType === "org.sagebionetworks.repo.model.dataaccess.Renewal";
50
+ }), G = U?.concreteType === "org.sagebionetworks.repo.model.dataaccess.Renewal";
50
51
  function K(e) {
51
- console.log("RequestDataAccessStep2: Error updating form", e), M({
52
+ console.log("RequestDataAccessStep2: Error updating form", e), A({
52
53
  key: "error",
53
54
  message: Q(e.reason)
54
55
  });
55
56
  }
56
- let { mutate: pe, isPending: q } = n({
57
+ let { mutate: ge, isPending: q } = n({
57
58
  onSuccess: (e) => {
58
- w(e.submissionId);
59
+ x(e.submissionId);
59
60
  },
60
61
  onError: K
61
- }), { mutateAsync: J, isPending: me } = i({ onError: K }), Y = fe || me || q, he = q || N && (!B || !H);
62
- c(() => {
63
- if (W && A) {
62
+ }), { mutateAsync: J, isPending: _e } = i({ onError: K }), Y = W || _e || q, X = W || q, ve = q || j && (!R || !B);
63
+ s(() => {
64
+ if (U && O && !H.current) {
64
65
  let e = !1;
65
- W.researchProjectId || (W.researchProjectId = O, e = !0);
66
+ U.researchProjectId || (U.researchProjectId = w, e = !0);
66
67
  let t = {
67
- userId: A.ownerId,
68
- type: G ? x.RENEW_ACCESS : x.GAIN_ACCESS
68
+ userId: O.ownerId,
69
+ type: G ? v.RENEW_ACCESS : v.GAIN_ACCESS
69
70
  };
70
- (!W.accessorChanges || !W.accessorChanges.find((e) => T(e, t))) && (W.accessorChanges = [t, ...W.accessorChanges || []], e = !0);
71
- let n = /* @__PURE__ */ new Set(), r = W.accessorChanges.filter((e) => n.has(e.userId) ? !1 : n.add(e.userId));
72
- r.length !== W.accessorChanges.length && (W.accessorChanges = r, e = !0), e && J(W);
71
+ (!U.accessorChanges || !U.accessorChanges.find((e) => fe(e, t))) && (U.accessorChanges = [t, ...U.accessorChanges || []], e = !0);
72
+ let n = /* @__PURE__ */ new Set(), r = U.accessorChanges.filter((e) => n.has(e.userId) ? !1 : n.add(e.userId));
73
+ r.length !== U.accessorChanges.length && (U.accessorChanges = r, e = !0), e && (H.current = !0, J(U));
73
74
  }
74
75
  }, [
75
- W,
76
+ U,
76
77
  G,
77
- O,
78
+ w,
78
79
  J,
79
- A
80
- ]), c(() => {
81
- if (W && (W.accessorChanges && P == null && F(W.accessorChanges), G && W.publication && R == null && z(W.publication), G && W.summaryOfUse && I == null && L(W.summaryOfUse), N)) {
82
- let e = W.signingOfficial;
83
- C(B) && e?.name && V(e.name), C(H) && e?.institutionalEmail && U(e.institutionalEmail);
80
+ O
81
+ ]), s(() => {
82
+ if (U && (U.accessorChanges && M == null && N(U.accessorChanges), G && U.publication && I == null && L(U.publication), G && U.summaryOfUse && P == null && F(U.summaryOfUse), j)) {
83
+ let e = U.signingOfficial;
84
+ b(R) && e?.name && z(e.name), b(B) && e?.institutionalEmail && V(e.institutionalEmail);
84
85
  }
85
- }, [W]);
86
- function X() {
86
+ }, [U]);
87
+ function Z() {
87
88
  let e = {
88
- ...W,
89
- accessorChanges: P,
90
- publication: R,
91
- summaryOfUse: I
89
+ ...U,
90
+ accessorChanges: M,
91
+ publication: I,
92
+ summaryOfUse: P
92
93
  };
93
- if (N) {
94
+ if (j) {
94
95
  let t = {
95
- ...W?.signingOfficial,
96
- name: B || void 0,
97
- institutionalEmail: H || void 0
96
+ ...U?.signingOfficial,
97
+ name: R || void 0,
98
+ institutionalEmail: B || void 0
98
99
  };
99
100
  return {
100
101
  ...e,
@@ -103,60 +104,64 @@ function D(h) {
103
104
  }
104
105
  return e;
105
106
  }
106
- async function Z() {
107
- if (W) {
108
- let e = await J(X());
109
- pe({
107
+ async function ye() {
108
+ if (U) {
109
+ let e = await J(Z());
110
+ if (E) {
111
+ E();
112
+ return;
113
+ }
114
+ ge({
110
115
  request: {
111
116
  requestId: e.id,
112
117
  requestEtag: e.etag,
113
- subjectId: ce,
114
- subjectType: le
118
+ subjectId: C,
119
+ subjectType: me
115
120
  },
116
- accessRequirementId: String(D.id)
121
+ accessRequirementId: String(S.id)
117
122
  });
118
123
  }
119
124
  }
120
- let Q = (e = "") => /* @__PURE__ */ b(v, { children: [
121
- /* @__PURE__ */ y("strong", { children: "Sorry, there is an error in submitting your request." }),
122
- /* @__PURE__ */ y("br", {}),
125
+ let Q = (e = "") => /* @__PURE__ */ _(h, { children: [
126
+ /* @__PURE__ */ g("strong", { children: "Sorry, there is an error in submitting your request." }),
127
+ /* @__PURE__ */ g("br", {}),
123
128
  e
124
- ] }), ge = (e) => {
125
- F([...e(P || [])]);
126
- }, _e = (e) => {
129
+ ] }), be = (e) => {
130
+ N([...e(M || [])]);
131
+ }, xe = (e) => {
127
132
  J({
128
- ...W,
129
- attachments: W.attachments?.filter((t) => t !== e)
133
+ ...U,
134
+ attachments: U.attachments?.filter((t) => t !== e)
130
135
  });
131
136
  }, $ = (e, t) => {
132
137
  if (e.resp && e.success) {
133
138
  let n = e.resp;
134
139
  J(t === "attachments" ? {
135
- ...W,
136
- attachments: [...W.attachments || [], n.fileHandleId]
140
+ ...U,
141
+ attachments: [...U.attachments || [], n.fileHandleId]
137
142
  } : {
138
- ...W,
143
+ ...U,
139
144
  [t]: n.fileHandleId
140
145
  });
141
- } else !e.success && e.error && (console.log("RequestDataAccessStep2: Error uploading the file", e.error), M({
146
+ } else !e.success && e.error && (console.log("RequestDataAccessStep2: Error uploading the file", e.error), A({
142
147
  key: "error",
143
148
  message: Q(e.error.reason)
144
149
  }));
145
- }, ve = W?.ducFileHandleId ? [{
146
- fileHandleId: W?.ducFileHandleId,
147
- associateObjectType: S.DataAccessRequestAttachment,
148
- associateObjectId: String(W.id)
149
- }] : [], ye = W?.irbFileHandleId ? [{
150
- fileHandleId: W.irbFileHandleId,
151
- associateObjectType: S.DataAccessRequestAttachment,
152
- associateObjectId: String(W.id)
153
- }] : [], be = (W?.attachments || []).map((e) => ({
150
+ }, Se = U?.ducFileHandleId ? [{
151
+ fileHandleId: U?.ducFileHandleId,
152
+ associateObjectType: y.DataAccessRequestAttachment,
153
+ associateObjectId: String(U.id)
154
+ }] : [], Ce = U?.irbFileHandleId ? [{
155
+ fileHandleId: U.irbFileHandleId,
156
+ associateObjectType: y.DataAccessRequestAttachment,
157
+ associateObjectId: String(U.id)
158
+ }] : [], we = (U?.attachments || []).map((e) => ({
154
159
  fileHandleId: e,
155
- associateObjectType: S.DataAccessRequestAttachment,
156
- associateObjectId: String(W.id)
160
+ associateObjectType: y.DataAccessRequestAttachment,
161
+ associateObjectId: String(U.id)
157
162
  })) ?? [];
158
- return /* @__PURE__ */ b(v, { children: [
159
- /* @__PURE__ */ y(f, { children: /* @__PURE__ */ b(se, {
163
+ return /* @__PURE__ */ _(h, { children: [
164
+ /* @__PURE__ */ g(le, { children: /* @__PURE__ */ _(de, {
160
165
  direction: "row",
161
166
  sx: {
162
167
  alignItems: "center",
@@ -164,10 +169,10 @@ function D(h) {
164
169
  },
165
170
  children: [
166
171
  "Request Access",
167
- /* @__PURE__ */ y(u, { sx: { flexGrow: 1 } }),
168
- /* @__PURE__ */ y(m, {
169
- onClick: h.onHide,
170
- children: /* @__PURE__ */ y(a, {
172
+ /* @__PURE__ */ g(l, { sx: { flexGrow: 1 } }),
173
+ /* @__PURE__ */ g(ue, {
174
+ onClick: f.onHide,
175
+ children: /* @__PURE__ */ g(te, {
171
176
  icon: "close",
172
177
  wrap: !1,
173
178
  sx: { color: "grey.700" }
@@ -175,14 +180,14 @@ function D(h) {
175
180
  })
176
181
  ]
177
182
  }) }),
178
- /* @__PURE__ */ b(oe, { children: [/* @__PURE__ */ y(re, {
179
- managedACTAccessRequirementId: String(D.id),
180
- children: /* @__PURE__ */ b(u, {
183
+ /* @__PURE__ */ _(ce, { children: [/* @__PURE__ */ g(ie, {
184
+ managedACTAccessRequirementId: String(S.id),
185
+ children: /* @__PURE__ */ _(l, {
181
186
  component: "form",
182
187
  sx: { minHeight: "475px" },
183
188
  onSubmit: (e) => e.preventDefault(),
184
189
  children: [
185
- /* @__PURE__ */ y(_, {
190
+ /* @__PURE__ */ g(m, {
186
191
  variant: "body1",
187
192
  sx: {
188
193
  mb: 2,
@@ -190,68 +195,69 @@ function D(h) {
190
195
  },
191
196
  children: "Please provide the information below to submit the request for access."
192
197
  }),
193
- N && /* @__PURE__ */ b(v, { children: [
194
- /* @__PURE__ */ y(_, {
198
+ j && /* @__PURE__ */ _(h, { children: [
199
+ /* @__PURE__ */ g(m, {
195
200
  variant: "headline3",
196
201
  sx: { mb: 2 },
197
202
  children: "Signing Official"
198
203
  }),
199
- /* @__PURE__ */ y(_, {
204
+ /* @__PURE__ */ g(m, {
200
205
  variant: "body1",
201
206
  sx: {
202
- ...o,
207
+ ...a,
203
208
  mb: 2
204
209
  },
205
210
  children: "The signing official is a member of your institution with oversight authority who is NOT part of the study team (i.e., not the Project Lead, not a Data Requester or Collaborator, and not the Principal Investigator). They do not need a Synapse account but must be able to receive messages at the email address provided below."
206
211
  }),
207
- /* @__PURE__ */ y(g, {
212
+ /* @__PURE__ */ g(p, {
208
213
  id: "so-name",
209
214
  label: "First and last names of your Signing Official",
210
215
  placeholder: "First and last name of signing official, ex: John Smith",
211
216
  fullWidth: !0,
212
217
  type: "text",
213
- disabled: Y,
214
- value: B,
218
+ disabled: X,
219
+ value: R,
215
220
  required: !0,
216
- onChange: (e) => V(e.target.value),
221
+ onChange: (e) => z(e.target.value),
217
222
  sx: { mb: 2 }
218
223
  }),
219
- /* @__PURE__ */ y(g, {
224
+ /* @__PURE__ */ g(p, {
220
225
  id: "so-email",
221
226
  label: "Institutional Email of your Signing Official",
222
227
  type: "email",
223
228
  placeholder: "Individual with signing authority, e.g. jane.smith@institution.edu",
224
229
  fullWidth: !0,
225
- disabled: Y,
226
- value: H,
230
+ disabled: X,
231
+ value: B,
227
232
  required: !0,
228
- onChange: (e) => U(e.target.value),
233
+ onChange: (e) => V(e.target.value),
229
234
  sx: { mb: 2 }
230
235
  }),
231
- /* @__PURE__ */ y(p, { sx: { my: 4 } })
236
+ /* @__PURE__ */ g(d, { sx: { my: 4 } })
232
237
  ] }),
233
- W && A && /* @__PURE__ */ y(te, {
234
- accessorChanges: P || [],
235
- onChange: ge,
238
+ U && O && /* @__PURE__ */ g(ne, {
239
+ accessorChanges: M || [],
240
+ onChange: be,
236
241
  isRenewal: G,
237
- helpText: /* @__PURE__ */ y(E, {
238
- managedACTAccessRequirement: D,
239
- isEDucEnabled: N
242
+ collaboratorLimit: j ? 97 : void 0,
243
+ helpText: /* @__PURE__ */ g(pe, {
244
+ managedACTAccessRequirement: S,
245
+ isEDucEnabled: j
240
246
  })
241
247
  }),
242
- (D?.isDUCRequired && !N || D?.isIRBApprovalRequired || D?.areOtherAttachmentsRequired) && /* @__PURE__ */ y(p, { sx: { my: 4 } }),
243
- D?.isDUCRequired && !N && /* @__PURE__ */ b(v, { children: [
244
- D?.ducTemplateFileHandleId && /* @__PURE__ */ y(ne, {
248
+ (S?.isDUCRequired && !j || S?.isIRBApprovalRequired || S?.areOtherAttachmentsRequired) && /* @__PURE__ */ g(d, { sx: { my: 4 } }),
249
+ S?.isDUCRequired && !j && /* @__PURE__ */ _(h, { children: [
250
+ S?.ducTemplateFileHandleId && /* @__PURE__ */ g(re, {
245
251
  title: "Download DUC Template",
246
252
  description: "As a first step, you will need to download the most current version of the Data Use Certificate.",
247
253
  fileHandleAssociation: {
248
- fileHandleId: D.ducTemplateFileHandleId,
249
- associateObjectType: S.AccessRequirementAttachment,
250
- associateObjectId: String(D.id)
254
+ fileHandleId: S.ducTemplateFileHandleId,
255
+ associateObjectType: y.AccessRequirementAttachment,
256
+ associateObjectId: String(S.id)
251
257
  },
252
258
  downloadButtonText: "Download DUC Template"
253
259
  }),
254
- /* @__PURE__ */ y(_, {
260
+ /* @__PURE__ */ g(m, {
255
261
  variant: "headline3",
256
262
  sx: {
257
263
  mt: 4,
@@ -259,116 +265,116 @@ function D(h) {
259
265
  },
260
266
  children: "Fill out and upload a Data Use Certificate"
261
267
  }),
262
- /* @__PURE__ */ y(_, {
268
+ /* @__PURE__ */ g(m, {
263
269
  variant: "body1",
264
270
  sx: {
265
- ...o,
271
+ ...a,
266
272
  my: 2
267
273
  },
268
274
  children: "You must download and fill out a Data Use Certificate (DUC). Be sure to upload the completed DUC below once you've completed it."
269
275
  }),
270
- /* @__PURE__ */ b(_, {
276
+ /* @__PURE__ */ _(m, {
271
277
  variant: "body1",
272
278
  component: "ol",
273
- sx: o,
279
+ sx: a,
274
280
  children: [
275
- /* @__PURE__ */ y("li", { children: "Download the DUC template file." }),
276
- /* @__PURE__ */ y("li", { children: "Fill out the DUC template, following the instructions in the file." }),
277
- /* @__PURE__ */ y("li", { children: "Upload the completed certificate using the button below:" })
281
+ /* @__PURE__ */ g("li", { children: "Download the DUC template file." }),
282
+ /* @__PURE__ */ g("li", { children: "Fill out the DUC template, following the instructions in the file." }),
283
+ /* @__PURE__ */ g("li", { children: "Upload the completed certificate using the button below:" })
278
284
  ]
279
285
  }),
280
- /* @__PURE__ */ y(e, { children: /* @__PURE__ */ y(s, {
286
+ /* @__PURE__ */ g(e, { children: /* @__PURE__ */ g(o, {
281
287
  id: "duc",
282
288
  isLoading: Y,
283
289
  uploadCallback: (e) => $(e, "ducFileHandleId"),
284
290
  documentName: "Data Use Certificate",
285
- fileHandleAssociations: ve
291
+ fileHandleAssociations: Se
286
292
  }) }),
287
- (D?.isIRBApprovalRequired || D?.areOtherAttachmentsRequired) && /* @__PURE__ */ y(p, { sx: { my: 4 } })
293
+ (S?.isIRBApprovalRequired || S?.areOtherAttachmentsRequired) && /* @__PURE__ */ g(d, { sx: { my: 4 } })
288
294
  ] }),
289
- D?.isIRBApprovalRequired && /* @__PURE__ */ b(v, { children: [
290
- /* @__PURE__ */ y(_, {
295
+ S?.isIRBApprovalRequired && /* @__PURE__ */ _(h, { children: [
296
+ /* @__PURE__ */ g(m, {
291
297
  variant: "headline3",
292
298
  sx: { my: 2 },
293
299
  children: "IRB Approval"
294
300
  }),
295
- /* @__PURE__ */ y(_, {
301
+ /* @__PURE__ */ g(m, {
296
302
  variant: "body1",
297
303
  sx: {
298
- ...o,
304
+ ...a,
299
305
  my: 2
300
306
  },
301
307
  children: "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."
302
308
  }),
303
- /* @__PURE__ */ y(e, { children: /* @__PURE__ */ y(s, {
309
+ /* @__PURE__ */ g(e, { children: /* @__PURE__ */ g(o, {
304
310
  id: "irb",
305
311
  isLoading: Y,
306
312
  documentName: "IRB Approval Letter",
307
313
  uploadCallback: (e) => $(e, "irbFileHandleId"),
308
- fileHandleAssociations: ye
314
+ fileHandleAssociations: Ce
309
315
  }) }),
310
- D?.areOtherAttachmentsRequired && /* @__PURE__ */ y(p, { sx: { my: 4 } })
316
+ S?.areOtherAttachmentsRequired && /* @__PURE__ */ g(d, { sx: { my: 4 } })
311
317
  ] }),
312
- D?.areOtherAttachmentsRequired && /* @__PURE__ */ b(v, { children: [
313
- /* @__PURE__ */ y(_, {
318
+ S?.areOtherAttachmentsRequired && /* @__PURE__ */ _(h, { children: [
319
+ /* @__PURE__ */ g(m, {
314
320
  variant: "headline3",
315
321
  sx: { my: 2 },
316
322
  children: "Upload other required documents"
317
323
  }),
318
- /* @__PURE__ */ y(_, {
324
+ /* @__PURE__ */ g(m, {
319
325
  variant: "body1",
320
326
  sx: {
321
- ...o,
327
+ ...a,
322
328
  my: 2
323
329
  },
324
330
  children: "You must upload other required documents. Please review the instructions to gain data access to determine which documents must also be uploaded."
325
331
  }),
326
- /* @__PURE__ */ y(e, { children: /* @__PURE__ */ y(s, {
332
+ /* @__PURE__ */ g(e, { children: /* @__PURE__ */ g(o, {
327
333
  id: "file-attachment",
328
334
  isLoading: Y,
329
335
  documentName: "Attachment",
330
336
  uploadCallback: (e) => $(e, "attachments"),
331
337
  isMultiFileUpload: !0,
332
- fileHandleAssociations: be,
333
- onClearAttachment: _e
338
+ fileHandleAssociations: we,
339
+ onClearAttachment: xe
334
340
  }) })
335
341
  ] })
336
342
  ]
337
343
  })
338
- }), j && /* @__PURE__ */ y(ie, {
339
- severity: j.key,
340
- children: j.message
344
+ }), k && /* @__PURE__ */ g(oe, {
345
+ severity: k.key,
346
+ children: k.message
341
347
  })] }),
342
- /* @__PURE__ */ b(ae, { children: [
343
- /* @__PURE__ */ y(d, {
348
+ /* @__PURE__ */ _(se, { children: [
349
+ /* @__PURE__ */ g(u, {
344
350
  variant: "outlined",
345
351
  onClick: () => {
346
- de();
352
+ he();
347
353
  },
348
354
  children: "Back"
349
355
  }),
350
- /* @__PURE__ */ y(u, { sx: { flexGrow: 1 } }),
351
- /* @__PURE__ */ y(d, {
356
+ /* @__PURE__ */ g(l, { sx: { flexGrow: 1 } }),
357
+ /* @__PURE__ */ g(u, {
352
358
  variant: "outlined",
353
359
  disabled: q,
354
360
  onClick: () => {
355
- W && ue(X());
361
+ U && T(Z());
356
362
  },
357
363
  children: "Cancel"
358
364
  }),
359
- /* @__PURE__ */ y(d, {
365
+ /* @__PURE__ */ g(u, {
360
366
  variant: "contained",
361
367
  loading: q,
362
- disabled: he,
368
+ disabled: ve,
363
369
  onClick: () => {
364
- Z();
370
+ ye();
365
371
  },
366
- children: "Submit"
372
+ children: E ? "Continue" : "Submit"
367
373
  })
368
374
  ] })
369
375
  ] });
370
376
  }
371
377
  //#endregion
372
- export { D as default };
378
+ export { S as EDUC_COLLABORATOR_LIMIT, C as default };
373
379
 
374
380
  //# sourceMappingURL=DataAccessRequestAccessorsFilesForm.js.map