synapse-react-client 4.0.17 → 4.0.18

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 (225) hide show
  1. package/README.md +5 -3
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +1 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/assets/homepage/BlinkingLiveIcon.d.ts +1 -1
  6. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
  7. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
  8. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  9. package/dist/components/AccessRequirementList/RequirementItem/CertificationRequirement.js.map +1 -1
  10. package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
  11. package/dist/components/AccessRequirementList/RequirementItem/UnmanagedACTAccessRequirementItem.js.map +1 -1
  12. package/dist/components/AccessRequirementList/RequirementItem/ValidationRequirement.js.map +1 -1
  13. package/dist/components/AccessTokenPage/CreateAccessTokenModal.d.ts.map +1 -1
  14. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +56 -54
  15. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
  16. package/dist/components/Authentication/PasswordField.d.ts +1 -1
  17. package/dist/components/Authentication/PasswordField.d.ts.map +1 -1
  18. package/dist/components/Authentication/PasswordField.js.map +1 -1
  19. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  20. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +1 -2
  21. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  22. package/dist/components/Authentication/UsernamePasswordForm.d.ts.map +1 -1
  23. package/dist/components/Authentication/UsernamePasswordForm.js +32 -29
  24. package/dist/components/Authentication/UsernamePasswordForm.js.map +1 -1
  25. package/dist/components/CardContainer/CardLink.d.ts +2 -2
  26. package/dist/components/CardContainer/CardLink.d.ts.map +1 -1
  27. package/dist/components/CardDeck/CardDeckCardProps.d.ts.map +1 -1
  28. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  29. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.d.ts.map +1 -1
  30. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js +106 -103
  31. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
  32. package/dist/components/ChallengeTeamWizard/MembershipRequestForm.d.ts.map +1 -1
  33. package/dist/components/ChallengeTeamWizard/MembershipRequestForm.js.map +1 -1
  34. package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.d.ts.map +1 -1
  35. package/dist/components/ChallengeTeamWizard/useCreateAndRegisterChallengeTeam.js.map +1 -1
  36. package/dist/components/CreateProjectModal/CreateProjectModal.d.ts.map +1 -1
  37. package/dist/components/CreateProjectModal/CreateProjectModal.js +4 -4
  38. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  39. package/dist/components/CreateTableViewWizard/TableNameForm.js +6 -6
  40. package/dist/components/CreateTableViewWizard/TableNameForm.js.map +1 -1
  41. package/dist/components/CrispChat/CrispChat.js +4 -4
  42. package/dist/components/CrispChat/CrispChat.js.map +1 -1
  43. package/dist/components/DataGrid/utils/json-rx/JsonRxResponseComplete.js.map +1 -1
  44. package/dist/components/DownloadCart/RequestDownloadCard.js +14 -14
  45. package/dist/components/DownloadCart/RequestDownloadCard.js.map +1 -1
  46. package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
  47. package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
  48. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.d.ts.map +1 -1
  49. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
  50. package/dist/components/EntityCitation/EntityCitationUtils.js.map +1 -1
  51. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  52. package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
  53. package/dist/components/EntityFinder/EntityIdTextField.d.ts +17 -0
  54. package/dist/components/EntityFinder/EntityIdTextField.d.ts.map +1 -0
  55. package/dist/components/EntityFinder/EntityIdTextField.js +35 -0
  56. package/dist/components/EntityFinder/EntityIdTextField.js.map +1 -0
  57. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.d.ts.map +1 -1
  58. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js +22 -16
  59. package/dist/components/Evaluation/round_limits/EvaluationRoundLimitOptions.js.map +1 -1
  60. package/dist/components/FeaturedDataTabs/FacetPlotsCardGrid.js.map +1 -1
  61. package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
  62. package/dist/components/FullWidthAlert/FullWidthAlert.d.ts.map +1 -1
  63. package/dist/components/FullWidthAlert/FullWidthAlert.js.map +1 -1
  64. package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.d.ts.map +1 -1
  65. package/dist/components/GenericCard/PortalDOI/PortalDOIUtils.js.map +1 -1
  66. package/dist/components/Markdown/widget/MarkdownSynapsePlot.js.map +1 -1
  67. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
  68. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
  69. package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
  70. package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
  71. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts +1 -1
  72. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.d.ts.map +1 -1
  73. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js +1 -1
  74. package/dist/components/PortalHomePageHeader/PortalHomePageHeader.js.map +1 -1
  75. package/dist/components/PortalList/CreatePortalModal.d.ts.map +1 -1
  76. package/dist/components/PortalList/CreatePortalModal.js +34 -33
  77. package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
  78. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.d.ts.map +1 -1
  79. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  80. package/dist/components/QueryWrapperPlotNav/RowSetView.d.ts.map +1 -1
  81. package/dist/components/QueryWrapperPlotNav/RowSetView.js.map +1 -1
  82. package/dist/components/Resources/Resources.Desktop.js.map +1 -1
  83. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  84. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.d.ts.map +1 -1
  85. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  86. package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.d.ts.map +1 -1
  87. package/dist/components/SetBasicAccessRequirementFields/SetBasicAccessRequirementFields.js.map +1 -1
  88. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.d.ts.map +1 -1
  89. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  90. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  91. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.d.ts.map +1 -1
  92. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +1 -1
  93. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  94. package/dist/components/SynapseTable/SearchV2.js.map +1 -1
  95. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  96. package/dist/components/SynapseTable/SynapseTableUtils.d.ts.map +1 -1
  97. package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
  98. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  99. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  100. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.d.ts.map +1 -1
  101. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  102. package/dist/components/TanStackTable/TanStackTableUtils.js.map +1 -1
  103. package/dist/components/TextField/TextField.css +1 -1
  104. package/dist/components/TextField/TextField.d.ts +14 -3
  105. package/dist/components/TextField/TextField.d.ts.map +1 -1
  106. package/dist/components/TextField/TextField.js +41 -43
  107. package/dist/components/TextField/TextField.js.map +1 -1
  108. package/dist/components/TextField/TextField.module.js +3 -4
  109. package/dist/components/TextField/TextField.module.js.map +1 -1
  110. package/dist/components/TextField/TextField.module.scss +18 -10
  111. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.d.ts.map +1 -1
  112. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js +20 -16
  113. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
  114. package/dist/components/UserCardList/UserCardList.d.ts.map +1 -1
  115. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  116. package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Desktop.js.map +1 -1
  117. package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
  118. package/dist/components/UserSearchBox/UserSearchBox.d.ts.map +1 -1
  119. package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
  120. package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
  121. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
  122. package/dist/components/doi/CreateOrUpdateDoiModal.js +13 -13
  123. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  124. package/dist/components/entity/page/title_bar/TitleBarProperties.js +23 -23
  125. package/dist/components/entity/page/title_bar/TitleBarProperties.js.map +1 -1
  126. package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
  127. package/dist/components/index.js +17 -17
  128. package/dist/components/styled/StyledFormControl.d.ts +15 -0
  129. package/dist/components/styled/StyledFormControl.d.ts.map +1 -1
  130. package/dist/components/styled/StyledFormControl.js +1 -0
  131. package/dist/components/styled/StyledFormControl.js.map +1 -1
  132. package/dist/components/styled/index.js +3 -3
  133. package/dist/components/utils/ConditionalWrapper.d.ts.map +1 -1
  134. package/dist/components/utils/ConditionalWrapper.js.map +1 -1
  135. package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
  136. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  137. package/dist/components/widgets/facet-nav/FacetNavPanel.js +69 -62
  138. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  139. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +1 -0
  140. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
  141. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +27 -26
  142. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  143. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts +1 -0
  144. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.d.ts.map +1 -1
  145. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js +2 -1
  146. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterDropdown.js.map +1 -1
  147. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
  148. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
  149. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +44 -43
  150. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
  151. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts +13 -0
  152. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.d.ts.map +1 -0
  153. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js +398 -0
  154. package/dist/features/entity/metadata-task/components/CreateOrUpdateCurationTaskDialog.js.map +1 -0
  155. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  156. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +49 -19
  157. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  158. package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
  159. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +46 -25
  160. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  161. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts +0 -1
  162. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.d.ts.map +1 -1
  163. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js +20 -22
  164. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  165. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -1
  166. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +25 -27
  167. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -1
  168. package/dist/features/entity/metadata-task/utils/constants.d.ts +26 -0
  169. package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -1
  170. package/dist/features/entity/metadata-task/utils/constants.js +2 -2
  171. package/dist/features/entity/metadata-task/utils/constants.js.map +1 -1
  172. package/dist/index.js +17 -17
  173. package/dist/mockServiceWorker.js +6 -8
  174. package/dist/mocks/curation/mockCurationTask.d.ts +2 -2
  175. package/dist/mocks/curation/mockCurationTask.d.ts.map +1 -1
  176. package/dist/mocks/curation/mockCurationTask.js +9 -5
  177. package/dist/mocks/curation/mockCurationTask.js.map +1 -1
  178. package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts +1 -1
  179. package/dist/mocks/msw/handlers/featureFlagHandlers.d.ts.map +1 -1
  180. package/dist/mocks/msw/handlers/featureFlagHandlers.js +1 -1
  181. package/dist/mocks/msw/handlers/featureFlagHandlers.js.map +1 -1
  182. package/dist/style/components/_cards.scss +0 -3
  183. package/dist/style/components/_data-grid-extra.scss +2 -2
  184. package/dist/style/components/_login.scss +6 -2
  185. package/dist/style/main.css +1 -1
  186. package/dist/synapse-client/SynapseClient.d.ts +2 -1
  187. package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
  188. package/dist/synapse-client/SynapseClient.js.map +1 -1
  189. package/dist/synapse-queries/QueryFilterUtils.js.map +1 -1
  190. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -0
  191. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  192. package/dist/synapse-queries/curation/task/useCurationTask.js +16 -6
  193. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  194. package/dist/synapse-queries/dataaccess/useAccessRequirements.d.ts.map +1 -1
  195. package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
  196. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  197. package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts +1 -1
  198. package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts.map +1 -1
  199. package/dist/synapse-queries/featureflags/useGetFeatureFlag.js.map +1 -1
  200. package/dist/synapse-queries/file/useFiles.d.ts.map +1 -1
  201. package/dist/synapse-queries/file/useFiles.js.map +1 -1
  202. package/dist/synapse-queries/termsOfService/useTermsOfService.d.ts.map +1 -1
  203. package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
  204. package/dist/synapse-queries/user/useGetUserChallenges.d.ts.map +1 -1
  205. package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
  206. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  207. package/dist/theme/palette/Palettes.d.ts +2 -2
  208. package/dist/theme/palette/Palettes.d.ts.map +1 -1
  209. package/dist/theme/palette/Palettes.js +2 -2
  210. package/dist/theme/palette/Palettes.js.map +1 -1
  211. package/dist/tsconfig.build.tsbuildinfo +1 -1
  212. package/dist/types/ThemeTypes.d.ts +5 -6
  213. package/dist/utils/AppUtils/session/SynapseSessionManager.d.ts.map +1 -1
  214. package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
  215. package/dist/utils/featureflag/FeatureFlags.d.ts +12 -0
  216. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -0
  217. package/dist/utils/featureflag/FeatureFlags.js +8 -0
  218. package/dist/utils/featureflag/FeatureFlags.js.map +1 -0
  219. package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
  220. package/dist/utils/functions/queryUtils.js.map +1 -1
  221. package/dist/utils/hooks/useGetInfoFromIds.d.ts.map +1 -1
  222. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  223. package/dist/utils/slots/SlotUtils.d.ts.map +1 -1
  224. package/dist/utils/slots/SlotUtils.js.map +1 -1
  225. package/package.json +7 -8
@@ -1,45 +1,66 @@
1
- import e from "../../../../components/TanStackTable/StyledTanStackTable.js";
2
- import t from "../../../../components/layout/InfiniteTableLayout.js";
3
- import { useMetadataTaskTable as n } from "../hooks/useMetadataTaskTable.js";
4
- import { useState as r } from "react";
5
- import { FormControlLabel as i, Stack as a, Switch as o } from "@mui/material";
6
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
1
+ import { displayToast as e } from "../../../../components/ToastMessage/ToastMessage.js";
2
+ import { useGlobalIsEditingContext as t } from "../../../../utils/context/GlobalIsEditingContext.js";
3
+ import { useGetEntityPermissions as n } from "../../../../synapse-queries/entity/useEntity.js";
4
+ import r from "../../../../components/TanStackTable/StyledTanStackTable.js";
5
+ import i from "../../../../components/layout/InfiniteTableLayout.js";
6
+ import a from "./CreateOrUpdateCurationTaskDialog.js";
7
+ import { useMetadataTaskTable as o } from "../hooks/useMetadataTaskTable.js";
8
+ import { useState as s } from "react";
9
+ import { Button as c, FormControlLabel as l, Stack as u, Switch as d } from "@mui/material";
10
+ import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
11
+ import { AddCircleTwoTone as h } from "@mui/icons-material";
7
12
  //#region src/features/entity/metadata-task/components/MetadataTasksPage.tsx
8
- function l(l) {
9
- let { projectId: u } = l, [d, f] = r({
10
- projectId: u,
13
+ function g(g) {
14
+ let { projectId: _ } = g, [v, y] = s({
15
+ projectId: _,
11
16
  assignedToMe: !1
12
- }), { table: p, isLoading: m, hasNextPage: h, fetchNextPage: g, isFetchingNextPage: _ } = n({ listCurationTaskRequest: d });
13
- return /* @__PURE__ */ c(a, { children: [/* @__PURE__ */ s(a, {
17
+ }), [b, x] = s(!1), { setIsEditing: S } = t(), { data: C } = n(_), { table: w, isLoading: T, hasNextPage: E, fetchNextPage: D, isFetchingNextPage: O } = o({ listCurationTaskRequest: v });
18
+ return /* @__PURE__ */ m(u, { children: [/* @__PURE__ */ m(u, {
14
19
  direction: "row",
15
20
  justifyContent: "flex-end",
16
- children: /* @__PURE__ */ s(i, {
17
- control: /* @__PURE__ */ s(o, {
18
- checked: !!d.assignedToMe,
21
+ children: [/* @__PURE__ */ p(l, {
22
+ control: /* @__PURE__ */ p(d, {
23
+ checked: !!v.assignedToMe,
19
24
  onChange: (e, t) => {
20
- f((e) => ({
25
+ y((e) => ({
21
26
  ...e,
22
27
  assignedToMe: t
23
28
  }));
24
29
  }
25
30
  }),
26
31
  label: "View only tasks assigned to me"
27
- })
28
- }), /* @__PURE__ */ s(t, {
29
- table: /* @__PURE__ */ s(e, {
30
- table: p,
32
+ }), C?.canAddChild && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, {
33
+ projectId: _,
34
+ open: b,
35
+ onSuccess: () => {
36
+ e("Curation task created successfully", "success"), x(!1), S(!1);
37
+ },
38
+ onCancel: () => {
39
+ x(!1), S(!1);
40
+ }
41
+ }, String(b)), /* @__PURE__ */ p(c, {
42
+ variant: "outlined",
43
+ onClick: () => {
44
+ x(!0), S(!0);
45
+ },
46
+ startIcon: /* @__PURE__ */ p(h, {}),
47
+ children: "New Task"
48
+ })] })]
49
+ }), /* @__PURE__ */ p(i, {
50
+ table: /* @__PURE__ */ p(r, {
51
+ table: w,
31
52
  styledTableContainerProps: { sx: { my: 2 } }
32
53
  }),
33
- isLoading: m,
34
- isEmpty: !m && p.getRowModel().rows.length === 0,
35
- hasNextPage: h,
54
+ isLoading: T,
55
+ isEmpty: !T && w.getRowModel().rows.length === 0,
56
+ hasNextPage: E,
36
57
  onFetchNextPageClicked: () => {
37
- g();
58
+ D();
38
59
  },
39
- isFetchingNextPage: _
60
+ isFetchingNextPage: O
40
61
  })] });
41
62
  }
42
63
  //#endregion
43
- export { l as default };
64
+ export { g as default };
44
65
 
45
66
  //# sourceMappingURL=MetadataTasksPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"MetadataTasksPage.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { useMetadataTaskTable } from '@/features/entity/metadata-task/hooks/useMetadataTaskTable'\nimport { FormControlLabel, Stack, Switch } from '@mui/material'\nimport { useState } from 'react'\nimport { ListCurationTaskRequest } from '@sage-bionetworks/synapse-client'\n\nexport type MetadataTaskTableProps = {\n projectId: string\n}\n\n/**\n * Displays a list of metadata curation tasks for a particular project, with actions that can be performed on each task.\n * @param props\n * @constructor\n */\nexport default function MetadataTasksPage(props: MetadataTaskTableProps) {\n const { projectId } = props\n const [listCurationTaskRequest, setListCurationTaskRequest] =\n useState<ListCurationTaskRequest>({\n projectId,\n assignedToMe: false,\n })\n\n const { table, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage } =\n useMetadataTaskTable({\n listCurationTaskRequest,\n })\n\n return (\n <Stack>\n <Stack direction=\"row\" justifyContent=\"flex-end\">\n <FormControlLabel\n control={\n <Switch\n checked={!!listCurationTaskRequest.assignedToMe}\n onChange={(_e, checked) => {\n setListCurationTaskRequest(prev => ({\n ...prev,\n assignedToMe: checked,\n }))\n }}\n />\n }\n label=\"View only tasks assigned to me\"\n />\n </Stack>\n <InfiniteTableLayout\n table={\n <StyledTanStackTable\n table={table}\n styledTableContainerProps={{ sx: { my: 2 } }}\n />\n }\n isLoading={isLoading}\n isEmpty={!isLoading && table.getRowModel().rows.length === 0}\n hasNextPage={hasNextPage}\n onFetchNextPageClicked={() => {\n fetchNextPage()\n }}\n isFetchingNextPage={isFetchingNextPage}\n />\n </Stack>\n )\n}\n"],"mappings":";;;;;;;AAgBA,SAAwB,EAAkB,GAA+B;CACvE,IAAM,EAAE,iBAAc,GAChB,CAAC,GAAyB,KAC9B,EAAkC;EAChC;EACA,cAAc;EACf,CAAC,EAEE,EAAE,UAAO,cAAW,gBAAa,kBAAe,0BACpD,EAAqB,EACnB,4BACD,CAAC;AAEJ,QACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAO,WAAU;EAAM,gBAAe;YACpC,kBAAC,GAAD;GACE,SACE,kBAAC,GAAD;IACE,SAAS,CAAC,CAAC,EAAwB;IACnC,WAAW,GAAI,MAAY;AACzB,QAA2B,OAAS;MAClC,GAAG;MACH,cAAc;MACf,EAAE;;IAEL,CAAA;GAEJ,OAAM;GACN,CAAA;EACI,CAAA,EACR,kBAAC,GAAD;EACE,OACE,kBAAC,GAAD;GACS;GACP,2BAA2B,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE;GAC5C,CAAA;EAEO;EACX,SAAS,CAAC,KAAa,EAAM,aAAa,CAAC,KAAK,WAAW;EAC9C;EACb,8BAA8B;AAC5B,MAAe;;EAEG;EACpB,CAAA,CACI,EAAA,CAAA"}
1
+ {"version":3,"file":"MetadataTasksPage.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/components/MetadataTasksPage.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport StyledTanStackTable from '@/components/TanStackTable/StyledTanStackTable'\nimport { useMetadataTaskTable } from '@/features/entity/metadata-task/hooks/useMetadataTaskTable'\nimport { Button, FormControlLabel, Stack, Switch } from '@mui/material'\nimport { useState } from 'react'\nimport { ListCurationTaskRequest } from '@sage-bionetworks/synapse-client'\nimport CreateOrUpdateCurationTaskDialog from './CreateOrUpdateCurationTaskDialog'\nimport { displayToast } from '@/components/ToastMessage/ToastMessage'\nimport { useGetEntityPermissions } from '@/synapse-queries/entity/useEntity'\nimport { AddCircleTwoTone } from '@mui/icons-material'\nimport { useGlobalIsEditingContext } from '@/utils/context/GlobalIsEditingContext'\n\nexport type MetadataTaskTableProps = {\n projectId: string\n}\n\n/**\n * Displays a list of metadata curation tasks for a particular project, with actions that can be performed on each task.\n * @param props\n * @constructor\n */\nexport default function MetadataTasksPage(props: MetadataTaskTableProps) {\n const { projectId } = props\n const [listCurationTaskRequest, setListCurationTaskRequest] =\n useState<ListCurationTaskRequest>({\n projectId,\n assignedToMe: false,\n })\n\n const [isDialogOpen, setIsDialogOpen] = useState(false)\n const { setIsEditing } = useGlobalIsEditingContext()\n\n const { data: permissions } = useGetEntityPermissions(projectId)\n\n const { table, isLoading, hasNextPage, fetchNextPage, isFetchingNextPage } =\n useMetadataTaskTable({\n listCurationTaskRequest,\n })\n\n return (\n <Stack>\n <Stack direction=\"row\" justifyContent=\"flex-end\">\n <FormControlLabel\n control={\n <Switch\n checked={!!listCurationTaskRequest.assignedToMe}\n onChange={(_e, checked) => {\n setListCurationTaskRequest(prev => ({\n ...prev,\n assignedToMe: checked,\n }))\n }}\n />\n }\n label=\"View only tasks assigned to me\"\n />\n {permissions?.canAddChild && (\n <>\n <CreateOrUpdateCurationTaskDialog\n key={String(isDialogOpen)}\n projectId={projectId}\n open={isDialogOpen}\n onSuccess={() => {\n displayToast('Curation task created successfully', 'success')\n setIsDialogOpen(false)\n setIsEditing(false)\n }}\n onCancel={() => {\n setIsDialogOpen(false)\n setIsEditing(false)\n }}\n />\n <Button\n variant=\"outlined\"\n onClick={() => {\n setIsDialogOpen(true)\n setIsEditing(true)\n }}\n startIcon={<AddCircleTwoTone />}\n >\n New Task\n </Button>\n </>\n )}\n </Stack>\n <InfiniteTableLayout\n table={\n <StyledTanStackTable\n table={table}\n styledTableContainerProps={{ sx: { my: 2 } }}\n />\n }\n isLoading={isLoading}\n isEmpty={!isLoading && table.getRowModel().rows.length === 0}\n hasNextPage={hasNextPage}\n onFetchNextPageClicked={() => {\n fetchNextPage()\n }}\n isFetchingNextPage={isFetchingNextPage}\n />\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAqBA,SAAwB,EAAkB,GAA+B;CACvE,IAAM,EAAE,iBAAc,GAChB,CAAC,GAAyB,KAC9B,EAAkC;EAChC;EACA,cAAc;EACf,CAAC,EAEE,CAAC,GAAc,KAAmB,EAAS,GAAM,EACjD,EAAE,oBAAiB,GAA2B,EAE9C,EAAE,MAAM,MAAgB,EAAwB,EAAU,EAE1D,EAAE,UAAO,cAAW,gBAAa,kBAAe,0BACpD,EAAqB,EACnB,4BACD,CAAC;AAEJ,QACE,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;EAAO,WAAU;EAAM,gBAAe;YAAtC,CACE,kBAAC,GAAD;GACE,SACE,kBAAC,GAAD;IACE,SAAS,CAAC,CAAC,EAAwB;IACnC,WAAW,GAAI,MAAY;AACzB,QAA2B,OAAS;MAClC,GAAG;MACH,cAAc;MACf,EAAE;;IAEL,CAAA;GAEJ,OAAM;GACN,CAAA,EACD,GAAa,eACZ,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;GAEa;GACX,MAAM;GACN,iBAAiB;AAGf,IAFA,EAAa,sCAAsC,UAAU,EAC7D,EAAgB,GAAM,EACtB,EAAa,GAAM;;GAErB,gBAAgB;AAEd,IADA,EAAgB,GAAM,EACtB,EAAa,GAAM;;GAErB,EAZK,OAAO,EAAa,CAYzB,EACF,kBAAC,GAAD;GACE,SAAQ;GACR,eAAe;AAEb,IADA,EAAgB,GAAK,EACrB,EAAa,GAAK;;GAEpB,WAAW,kBAAC,GAAD,EAAoB,CAAA;aAChC;GAEQ,CAAA,CACR,EAAA,CAAA,CAEC;KACR,kBAAC,GAAD;EACE,OACE,kBAAC,GAAD;GACS;GACP,2BAA2B,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE;GAC5C,CAAA;EAEO;EACX,SAAS,CAAC,KAAa,EAAM,aAAa,CAAC,KAAK,WAAW;EAC9C;EACb,8BAA8B;AAC5B,MAAe;;EAEG;EACpB,CAAA,CACI,EAAA,CAAA"}
@@ -1,7 +1,6 @@
1
1
  import { GridSession, SynapseClientError, TaskBundle } from '@sage-bionetworks/synapse-client';
2
2
  export type UseGridSessionForCurationTaskResult = {
3
3
  gridSession: GridSession;
4
- gridSessionOwnerMatchesTaskAssignee: boolean;
5
4
  };
6
5
  /**
7
6
  * A hook to get or create a GridSession for a given CurationTask. If an appropriate GridSession exists, it will be returned.
@@ -1 +1 @@
1
- {"version":3,"file":"useGridSessionForCurationTask.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/hooks/useGridSessionForCurationTask.ts"],"names":[],"mappings":"AAOA,OAAO,EAEL,WAAW,EACX,kBAAkB,EAClB,UAAU,EACX,MAAM,kCAAkC,CAAA;AAMzC,MAAM,MAAM,mCAAmC,GAAG;IAChD,WAAW,EAAE,WAAW,CAAA;IACxB,mCAAmC,EAAE,OAAO,CAAA;CAC7C,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,oIA8FpD"}
1
+ {"version":3,"file":"useGridSessionForCurationTask.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/hooks/useGridSessionForCurationTask.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,WAAW,EAEX,kBAAkB,EAClB,UAAU,EACX,MAAM,kCAAkC,CAAA;AAKzC,MAAM,MAAM,mCAAmC,GAAG;IAChD,WAAW,EAAE,WAAW,CAAA;CACzB,CAAA;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,OAAO,UAAU,6BAA6B,oIAuGpD"}
@@ -3,9 +3,8 @@ import "../../../../utils/index.js";
3
3
  import { getGridSessionQuery as t, useCreateGridSession as n, useDeleteGridSession as r } from "../../../../synapse-queries/grid/useGridSession.js";
4
4
  import { useUpdateCurationTaskStatus as i } from "../../../../synapse-queries/curation/task/useCurationTask.js";
5
5
  import { OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE as a } from "../utils/constants.js";
6
- import o from "../utils/taskHasAssignee.js";
7
- import { getCreateGridRequestForMetadataTask as s } from "../utils/getCreateGridRequestForMetadataTask.js";
8
- import { SynapseClientError as c } from "@sage-bionetworks/synapse-client";
6
+ import { getCreateGridRequestForMetadataTask as o } from "../utils/getCreateGridRequestForMetadataTask.js";
7
+ import { AuthorizationMode as s, SynapseClientError as c } from "@sage-bionetworks/synapse-client";
9
8
  import { useMutation as l, useQueryClient as u } from "@tanstack/react-query";
10
9
  //#region src/features/entity/metadata-task/hooks/useGridSessionForCurationTask.ts
11
10
  function d() {
@@ -13,43 +12,42 @@ function d() {
13
12
  return l({ mutationFn: async (e) => {
14
13
  let { task: n, status: r } = e;
15
14
  if (!n || !r) throw Error("CurationTaskBundle is missing task or status");
16
- let i = o(n), l = r?.executionDetails?.activeSessionId;
17
- if (l) try {
18
- let e = await h.fetchQuery({
19
- ...t(l, {
15
+ let i = r?.executionDetails?.activeSessionId;
16
+ if (i) try {
17
+ return { gridSession: await h.fetchQuery({
18
+ ...t(i, {
20
19
  ...m,
21
20
  queryClient: h
22
21
  }),
23
22
  staleTime: 0
24
- });
25
- return {
26
- gridSession: e,
27
- gridSessionOwnerMatchesTaskAssignee: i && e.ownerPrincipalId == n.assigneePrincipalId
28
- };
23
+ }) };
29
24
  } catch (e) {
30
25
  if (!(e instanceof c && e.status === 404)) throw e;
31
26
  }
32
- if (n.taskProperties == null) throw Error("CurationTask is missing taskProperties");
33
- let u = (await d({
34
- ...s(n),
35
- authorizationMode: "SOURCE_BENEFACTOR"
27
+ let l = n.taskProperties;
28
+ if (l == null) throw Error("CurationTask is missing taskProperties");
29
+ let u = "suggestedAuthorizationMode" in l ? l.suggestedAuthorizationMode : void 0;
30
+ if (u == null) throw Error("CurationTask is missing suggestedAuthorizationMode in taskProperties");
31
+ let g;
32
+ u === s.SESSION_OWNER && (g = n.assigneePrincipalId);
33
+ let _ = (await d({
34
+ ...o(n),
35
+ authorizationMode: u,
36
+ ownerPrincipalId: g
36
37
  })).gridSession;
37
38
  try {
38
39
  await f({
39
40
  ...r,
40
41
  executionDetails: {
41
42
  ...r.executionDetails,
42
- activeSessionId: u.sessionId,
43
+ activeSessionId: _.sessionId,
43
44
  concreteType: "org.sagebionetworks.repo.model.curation.execution.GridExecutionDetails"
44
45
  }
45
46
  });
46
47
  } catch (e) {
47
- throw e instanceof c && e.status === 412 ? (await p(u.sessionId), Error(a)) : e;
48
+ throw e instanceof c && e.status === 412 ? (await p(_.sessionId), Error(a)) : e;
48
49
  }
49
- return {
50
- gridSession: u,
51
- gridSessionOwnerMatchesTaskAssignee: i
52
- };
50
+ return { gridSession: _ };
53
51
  } });
54
52
  }
55
53
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"useGridSessionForCurationTask.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/hooks/useGridSessionForCurationTask.ts"],"sourcesContent":["import { useUpdateCurationTaskStatus } from '@/synapse-queries/curation/task/useCurationTask'\nimport {\n getGridSessionQuery,\n useCreateGridSession,\n useDeleteGridSession,\n} from '@/synapse-queries/grid/useGridSession'\nimport { useSynapseContext } from '@/utils'\nimport {\n CreateGridRequest,\n GridSession,\n SynapseClientError,\n TaskBundle,\n} from '@sage-bionetworks/synapse-client'\nimport { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE } from '../utils/constants'\nimport { getCreateGridRequestForMetadataTask } from '../utils/getCreateGridRequestForMetadataTask'\nimport taskHasAssignee from '../utils/taskHasAssignee'\n\nexport type UseGridSessionForCurationTaskResult = {\n gridSession: GridSession\n gridSessionOwnerMatchesTaskAssignee: boolean\n}\n\n/**\n * A hook to get or create a GridSession for a given CurationTask. If an appropriate GridSession exists, it will be returned.\n * If not, a new GridSession will be created based on the CurationTask's properties.\n *\n * @returns A mutation object with a function to get or create a GridSession for a CurationTask. The response will also indicate\n * if the GridSession owner matches the task assignee (if there is one).\n * @throws SynapseClientError with status 403 if the user does not have permission to access an existing GridSession\n */\nexport default function useGridSessionForCurationTask() {\n const { mutateAsync: createGridSession } = useCreateGridSession()\n const { mutateAsync: updateCurationTaskStatus } =\n useUpdateCurationTaskStatus()\n const { mutateAsync: deleteGridSession } = useDeleteGridSession()\n\n const synapseContext = useSynapseContext()\n const queryClient = useQueryClient()\n\n return useMutation<\n UseGridSessionForCurationTaskResult,\n SynapseClientError,\n TaskBundle\n >({\n mutationFn: async curationTaskBundle => {\n const { task, status } = curationTaskBundle\n if (!task || !status) {\n throw new Error('CurationTaskBundle is missing task or status')\n }\n\n const hasAssignee = taskHasAssignee(task)\n\n const gridSessionId = status?.executionDetails?.activeSessionId\n if (gridSessionId) {\n try {\n // Verify the session is still active before returning it\n const gridSession = await queryClient.fetchQuery({\n ...getGridSessionQuery(gridSessionId, {\n ...synapseContext,\n queryClient,\n }),\n staleTime: 0,\n })\n\n const assigneeMatchesGridSessionOwner =\n hasAssignee &&\n gridSession.ownerPrincipalId == task.assigneePrincipalId\n\n return {\n gridSession,\n gridSessionOwnerMatchesTaskAssignee:\n assigneeMatchesGridSessionOwner,\n }\n } catch (e) {\n if (e instanceof SynapseClientError && e.status === 404) {\n // Session not found, will create a new one\n } else {\n throw e\n }\n }\n }\n // Create a session and link it to the task\n const taskProperties = task.taskProperties\n if (taskProperties == null) {\n throw new Error('CurationTask is missing taskProperties')\n }\n\n const createGridRequest: CreateGridRequest = {\n ...getCreateGridRequestForMetadataTask(task),\n authorizationMode: 'SOURCE_BENEFACTOR',\n }\n const createGridResponse = await createGridSession(createGridRequest)\n const gridSession = createGridResponse.gridSession!\n\n // Associate the new session with the task\n try {\n await updateCurationTaskStatus({\n ...status,\n executionDetails: {\n ...status.executionDetails,\n activeSessionId: gridSession.sessionId!,\n concreteType:\n 'org.sagebionetworks.repo.model.curation.execution.GridExecutionDetails',\n },\n })\n } catch (e) {\n if (e instanceof SynapseClientError && e.status === 412) {\n // etag mismatch -- possible race condition.\n // Delete the session we just created to avoid orphaned sessions, and throw an error to notify the user that they may need to refresh and try again.\n await deleteGridSession(gridSession.sessionId!)\n throw new Error(OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE)\n } else {\n // Rethrow any other error\n throw e\n }\n }\n\n // Since we just created the session, the user must have access, and the owner must match the assignee (if there is one).\n return {\n gridSession,\n gridSessionOwnerMatchesTaskAssignee: hasAssignee,\n }\n },\n })\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAwB,IAAgC;CACtD,IAAM,EAAE,aAAa,MAAsB,GAAsB,EAC3D,EAAE,aAAa,MACnB,GAA6B,EACzB,EAAE,aAAa,MAAsB,GAAsB,EAE3D,IAAiB,GAAmB,EACpC,IAAc,GAAgB;AAEpC,QAAO,EAIL,EACA,YAAY,OAAM,MAAsB;EACtC,IAAM,EAAE,SAAM,cAAW;AACzB,MAAI,CAAC,KAAQ,CAAC,EACZ,OAAU,MAAM,+CAA+C;EAGjE,IAAM,IAAc,EAAgB,EAAK,EAEnC,IAAgB,GAAQ,kBAAkB;AAChD,MAAI,EACF,KAAI;GAEF,IAAM,IAAc,MAAM,EAAY,WAAW;IAC/C,GAAG,EAAoB,GAAe;KACpC,GAAG;KACH;KACD,CAAC;IACF,WAAW;IACZ,CAAC;AAMF,UAAO;IACL;IACA,qCALA,KACA,EAAY,oBAAoB,EAAK;IAMtC;WACM,GAAG;AACV,OAAI,eAAa,KAAsB,EAAE,WAAW,KAGlD,OAAM;;AAMZ,MADuB,EAAK,kBACN,KACpB,OAAU,MAAM,yCAAyC;EAQ3D,IAAM,KAAc,MADa,EAAkB;GAHjD,GAAG,EAAoC,EAAK;GAC5C,mBAAmB;GAE8B,CAAkB,EAC9B;AAGvC,MAAI;AACF,SAAM,EAAyB;IAC7B,GAAG;IACH,kBAAkB;KAChB,GAAG,EAAO;KACV,iBAAiB,EAAY;KAC7B,cACE;KACH;IACF,CAAC;WACK,GAAG;AAQR,SAPE,aAAa,KAAsB,EAAE,WAAW,OAGlD,MAAM,EAAkB,EAAY,UAAW,EACrC,MAAM,EAA8C,IAGxD;;AAKV,SAAO;GACL;GACA,qCAAqC;GACtC;IAEJ,CAAC"}
1
+ {"version":3,"file":"useGridSessionForCurationTask.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/hooks/useGridSessionForCurationTask.ts"],"sourcesContent":["import { useUpdateCurationTaskStatus } from '@/synapse-queries/curation/task/useCurationTask'\nimport {\n getGridSessionQuery,\n useCreateGridSession,\n useDeleteGridSession,\n} from '@/synapse-queries/grid/useGridSession'\nimport { useSynapseContext } from '@/utils'\nimport {\n AuthorizationMode,\n CreateGridRequest,\n GridSession,\n GridSupportedTaskProperties,\n SynapseClientError,\n TaskBundle,\n} from '@sage-bionetworks/synapse-client'\nimport { useMutation, useQueryClient } from '@tanstack/react-query'\nimport { OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE } from '../utils/constants'\nimport { getCreateGridRequestForMetadataTask } from '../utils/getCreateGridRequestForMetadataTask'\n\nexport type UseGridSessionForCurationTaskResult = {\n gridSession: GridSession\n}\n\n/**\n * A hook to get or create a GridSession for a given CurationTask. If an appropriate GridSession exists, it will be returned.\n * If not, a new GridSession will be created based on the CurationTask's properties.\n *\n * @returns A mutation object with a function to get or create a GridSession for a CurationTask. The response will also indicate\n * if the GridSession owner matches the task assignee (if there is one).\n * @throws SynapseClientError with status 403 if the user does not have permission to access an existing GridSession\n */\nexport default function useGridSessionForCurationTask() {\n const { mutateAsync: createGridSession } = useCreateGridSession()\n const { mutateAsync: updateCurationTaskStatus } =\n useUpdateCurationTaskStatus()\n const { mutateAsync: deleteGridSession } = useDeleteGridSession()\n\n const synapseContext = useSynapseContext()\n const queryClient = useQueryClient()\n\n return useMutation<\n UseGridSessionForCurationTaskResult,\n SynapseClientError,\n TaskBundle\n >({\n mutationFn: async curationTaskBundle => {\n const { task, status } = curationTaskBundle\n if (!task || !status) {\n throw new Error('CurationTaskBundle is missing task or status')\n }\n\n const gridSessionId = status?.executionDetails?.activeSessionId\n if (gridSessionId) {\n try {\n // Verify the session is still active before returning it\n const gridSession = await queryClient.fetchQuery({\n ...getGridSessionQuery(gridSessionId, {\n ...synapseContext,\n queryClient,\n }),\n staleTime: 0,\n })\n\n return {\n gridSession,\n }\n } catch (e) {\n if (e instanceof SynapseClientError && e.status === 404) {\n // Session not found, will create a new one\n } else {\n throw e\n }\n }\n }\n // Create a session and link it to the task\n const taskProperties = task.taskProperties as GridSupportedTaskProperties\n if (taskProperties == null) {\n throw new Error('CurationTask is missing taskProperties')\n }\n\n const suggestedAuthorizationMode =\n 'suggestedAuthorizationMode' in taskProperties\n ? taskProperties.suggestedAuthorizationMode\n : undefined\n\n if (suggestedAuthorizationMode == null) {\n throw new Error(\n 'CurationTask is missing suggestedAuthorizationMode in taskProperties',\n )\n }\n\n let ownerPrincipalId: string | undefined = undefined\n if (suggestedAuthorizationMode === AuthorizationMode.SESSION_OWNER) {\n // TODO: Add collaboratorPrincipalIds once the server supports multiple owners.\n ownerPrincipalId = task.assigneePrincipalId\n }\n\n const createGridRequest: CreateGridRequest = {\n ...getCreateGridRequestForMetadataTask(task),\n authorizationMode: suggestedAuthorizationMode,\n ownerPrincipalId,\n }\n const createGridResponse = await createGridSession(createGridRequest)\n const gridSession = createGridResponse.gridSession!\n\n // Associate the new session with the task\n try {\n await updateCurationTaskStatus({\n ...status,\n executionDetails: {\n ...status.executionDetails,\n activeSessionId: gridSession.sessionId!,\n concreteType:\n 'org.sagebionetworks.repo.model.curation.execution.GridExecutionDetails',\n },\n })\n } catch (e) {\n if (e instanceof SynapseClientError && e.status === 412) {\n // etag mismatch -- possible race condition.\n // Delete the session we just created to avoid orphaned sessions, and throw an error to notify the user that they may need to refresh and try again.\n await deleteGridSession(gridSession.sessionId!)\n throw new Error(OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE)\n } else {\n // Rethrow any other error\n throw e\n }\n }\n\n // Since we just created the session, the user must have access, and the owner must match the assignee (if there is one).\n return {\n gridSession,\n }\n },\n })\n}\n"],"mappings":";;;;;;;;;AA+BA,SAAwB,IAAgC;CACtD,IAAM,EAAE,aAAa,MAAsB,GAAsB,EAC3D,EAAE,aAAa,MACnB,GAA6B,EACzB,EAAE,aAAa,MAAsB,GAAsB,EAE3D,IAAiB,GAAmB,EACpC,IAAc,GAAgB;AAEpC,QAAO,EAIL,EACA,YAAY,OAAM,MAAsB;EACtC,IAAM,EAAE,SAAM,cAAW;AACzB,MAAI,CAAC,KAAQ,CAAC,EACZ,OAAU,MAAM,+CAA+C;EAGjE,IAAM,IAAgB,GAAQ,kBAAkB;AAChD,MAAI,EACF,KAAI;AAUF,UAAO,EACL,aAAA,MATwB,EAAY,WAAW;IAC/C,GAAG,EAAoB,GAAe;KACpC,GAAG;KACH;KACD,CAAC;IACF,WAAW;IACZ,CAAC,EAID;WACM,GAAG;AACV,OAAI,eAAa,KAAsB,EAAE,WAAW,KAGlD,OAAM;;EAKZ,IAAM,IAAiB,EAAK;AAC5B,MAAI,KAAkB,KACpB,OAAU,MAAM,yCAAyC;EAG3D,IAAM,IACJ,gCAAgC,IAC5B,EAAe,6BACf,KAAA;AAEN,MAAI,KAA8B,KAChC,OAAU,MACR,uEACD;EAGH,IAAI;AACJ,EAAI,MAA+B,EAAkB,kBAEnD,IAAmB,EAAK;EAS1B,IAAM,KAAc,MADa,EAAkB;GAJjD,GAAG,EAAoC,EAAK;GAC5C,mBAAmB;GACnB;GAEiD,CAAkB,EAC9B;AAGvC,MAAI;AACF,SAAM,EAAyB;IAC7B,GAAG;IACH,kBAAkB;KAChB,GAAG,EAAO;KACV,iBAAiB,EAAY;KAC7B,cACE;KACH;IACF,CAAC;WACK,GAAG;AAQR,SAPE,aAAa,KAAsB,EAAE,WAAW,OAGlD,MAAM,EAAkB,EAAY,UAAW,EACrC,MAAM,EAA8C,IAGxD;;AAKV,SAAO,EACL,gBACD;IAEJ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useOpenCuratorButton.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/hooks/useOpenCuratorButton.ts"],"names":[],"mappings":"AAGA,OAAO,EAGL,UAAU,EACX,MAAM,kCAAkC,CAAA;AAYzC,KAAK,kCAAkC,GAAG;IACxC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAOD,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,UAAU,EAAE,UAAU,GACrB,kCAAkC,CA2EpC"}
1
+ {"version":3,"file":"useOpenCuratorButton.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/hooks/useOpenCuratorButton.ts"],"names":[],"mappings":"AAEA,OAAO,EAGL,UAAU,EACX,MAAM,kCAAkC,CAAA;AAWzC,KAAK,kCAAkC,GAAG;IACxC,SAAS,EAAE,OAAO,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB,CAAA;AAOD,MAAM,CAAC,OAAO,UAAU,4BAA4B,CAClD,UAAU,EAAE,UAAU,GACrB,kCAAkC,CA4EpC"}
@@ -1,46 +1,44 @@
1
1
  import { displayToast as e } from "../../../../components/ToastMessage/ToastMessage.js";
2
2
  import { useGetEntityPermissions as t } from "../../../../synapse-queries/entity/useEntity.js";
3
- import { useGetFeatureFlag as n } from "../../../../synapse-queries/featureflags/useGetFeatureFlag.js";
4
3
  import "../../../../synapse-queries/index.js";
5
4
  import "../../../../components/index.js";
6
- import { getLinkToGridSession as r } from "../../../../utils/functions/getSynapseWebClientLink.js";
7
- import { OPEN_CURATOR_ERROR_TITLE as i, OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE as a } from "../utils/constants.js";
8
- import { getGridSourceIdForTask as o } from "../utils/getGridSourceIdForTask.js";
9
- import s from "./useGridSessionForCurationTask.js";
10
- import c from "./useGridSessionForCurationTask_legacy.js";
11
- import { useCallback as l } from "react";
12
- import { FeatureFlagEnum as u } from "@sage-bionetworks/synapse-types";
13
- import { SynapseClientError as d } from "@sage-bionetworks/synapse-client";
5
+ import { getLinkToGridSession as n } from "../../../../utils/functions/getSynapseWebClientLink.js";
6
+ import { OPEN_CURATOR_ERROR_TITLE as r, OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE as i } from "../utils/constants.js";
7
+ import { getGridSourceIdForTask as a } from "../utils/getGridSourceIdForTask.js";
8
+ import o from "./useGridSessionForCurationTask.js";
9
+ import s from "./useGridSessionForCurationTask_legacy.js";
10
+ import { useCallback as c } from "react";
11
+ import { SynapseClientError as l } from "@sage-bionetworks/synapse-client";
14
12
  //#region src/features/entity/metadata-task/hooks/useOpenCuratorButton.ts
15
- function f(e, t) {
16
- let n = r(e, t);
17
- window.open(n, "_blank", "noopener");
13
+ function u(e, t) {
14
+ let r = n(e, t);
15
+ window.open(r, "_blank", "noopener");
18
16
  }
19
- function p(r) {
20
- let p = r.task, m = n(u.CURATOR_LINK_TASK_TO_GRID_SESSION) && !1, { mutateAsync: h, isPending: g } = c(), { mutateAsync: _, isPending: v } = s(), { data: y, isLoading: b } = t(o(p)), x = y?.canView, S = l(async () => {
17
+ function d(n) {
18
+ let d = n.task, f = d.taskProperties, p = (f != null && "suggestedAuthorizationMode" in f ? f.suggestedAuthorizationMode : void 0) != null, { mutateAsync: m, isPending: h } = s(), { mutateAsync: g, isPending: _ } = o(), { data: v, isLoading: y } = t(a(d)), b = v?.canView, x = c(async () => {
21
19
  let t;
22
20
  try {
23
- t = m ? (await _(r)).gridSession : await h({ curationTask: p }), f(t.sessionId, p.taskId);
21
+ t = p ? (await g(n)).gridSession : await m({ curationTask: d }), u(t.sessionId, d.taskId);
24
22
  } catch (t) {
25
- t instanceof d && t.status === 403 ? (console.error(t), e(a, "danger", { title: i })) : (console.error("Error opening Curator for curation task", t), e(t instanceof Error ? t.message : String(t), "danger", { title: i }));
23
+ t instanceof l && t.status === 403 ? (console.error(t), e(i, "danger", { title: r })) : (console.error("Error opening Curator for curation task", t), e(t instanceof Error ? t.message : String(t), "danger", { title: r }));
26
24
  }
27
25
  }, [
26
+ d,
27
+ n,
28
28
  p,
29
- r,
30
29
  m,
31
- h,
32
- _
33
- ]), C = l(() => {
34
- S();
35
- }, [S]);
30
+ g
31
+ ]), S = c(() => {
32
+ x();
33
+ }, [x]);
36
34
  return {
37
- hasPermission: x,
38
- isLoading: b,
39
- isPending: m ? v : g,
40
- onClick: C
35
+ hasPermission: b,
36
+ isLoading: y,
37
+ isPending: p ? _ : h,
38
+ onClick: S
41
39
  };
42
40
  }
43
41
  //#endregion
44
- export { p as default };
42
+ export { d as default };
45
43
 
46
44
  //# sourceMappingURL=useOpenCuratorButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useOpenCuratorButton.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/hooks/useOpenCuratorButton.ts"],"sourcesContent":["import { displayToast } from '@/components'\nimport { useGetEntityPermissions } from '@/synapse-queries'\nimport { useGetFeatureFlag } from '@/synapse-queries/featureflags/useGetFeatureFlag'\nimport {\n GridSession,\n SynapseClientError,\n TaskBundle,\n} from '@sage-bionetworks/synapse-client'\nimport { FeatureFlagEnum } from '@sage-bionetworks/synapse-types'\nimport { useCallback } from 'react'\nimport {\n OPEN_CURATOR_ERROR_TITLE,\n OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE,\n} from '../utils/constants'\nimport { getGridSourceIdForTask } from '../utils/getGridSourceIdForTask'\nimport useGridSessionForCurationTask from './useGridSessionForCurationTask'\nimport useGridSessionForCurationTask_legacy from './useGridSessionForCurationTask_legacy'\nimport { getLinkToGridSession } from '@/utils/functions/getSynapseWebClientLink'\n\ntype UseOpenCuratorFromTaskButtonReturn = {\n isLoading: boolean\n isPending: boolean\n hasPermission?: boolean\n onClick: () => void\n}\n\nfunction openGridSessionInNewWindow(gridSessionId: string, taskId: number) {\n const gridUrl = getLinkToGridSession(gridSessionId, taskId)\n window.open(gridUrl, '_blank', 'noopener')\n}\n\nexport default function useOpenCuratorFromTaskButton(\n taskBundle: TaskBundle,\n): UseOpenCuratorFromTaskButtonReturn {\n const curationTask = taskBundle.task!\n\n const isTaskLinkedSessionFlagEnabled =\n useGetFeatureFlag(FeatureFlagEnum.CURATOR_LINK_TASK_TO_GRID_SESSION) &&\n false // SWC-7835 - temporarily disable this feature flag\n // We want to add an opt-in (PLFM-9686)\n // Also the feature flag does not work because we did not bump synapse-client after adding the flag\n // FeatureFlagEnum['CURATOR_LINK_TASK_TO_GRID_SESSION'] in the old version of synapse-client returns `undefined`.\n\n const {\n mutateAsync: getOrCreateLegacyGridSessionForUnassignedTask,\n isPending: legacyOpenGridIsPending,\n } = useGridSessionForCurationTask_legacy()\n\n const {\n mutateAsync: getOrCreateTaskLinkedGridSession,\n isPending: taskLinkedOpenGridIsPending,\n } = useGridSessionForCurationTask()\n\n const gridSourceEntityId = getGridSourceIdForTask(curationTask)\n const {\n data: sourceEntityPermissions,\n isLoading: isLoadingEntityPermissions,\n } = useGetEntityPermissions(gridSourceEntityId)\n\n const hasPermission = sourceEntityPermissions?.canView\n\n const openNewOrExistingCuratorSession = useCallback(async () => {\n let gridSession: GridSession\n try {\n if (isTaskLinkedSessionFlagEnabled) {\n const result = await getOrCreateTaskLinkedGridSession(taskBundle)\n gridSession = result.gridSession\n } else {\n gridSession = await getOrCreateLegacyGridSessionForUnassignedTask({\n curationTask,\n })\n }\n openGridSessionInNewWindow(gridSession.sessionId!, curationTask.taskId!)\n } catch (error) {\n if (error instanceof SynapseClientError && error.status === 403) {\n console.error(error)\n displayToast(OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n } else {\n console.error('Error opening Curator for curation task', error)\n const errorMessage =\n error instanceof Error ? error.message : String(error)\n displayToast(errorMessage, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n }\n }\n }, [\n curationTask,\n taskBundle,\n isTaskLinkedSessionFlagEnabled,\n getOrCreateLegacyGridSessionForUnassignedTask,\n getOrCreateTaskLinkedGridSession,\n ])\n\n const handleClickOpenCurator = useCallback(() => {\n void openNewOrExistingCuratorSession()\n }, [openNewOrExistingCuratorSession])\n\n return {\n hasPermission,\n isLoading: isLoadingEntityPermissions,\n isPending: isTaskLinkedSessionFlagEnabled\n ? taskLinkedOpenGridIsPending\n : legacyOpenGridIsPending,\n onClick: handleClickOpenCurator,\n }\n}\n"],"mappings":";;;;;;;;;;;;;;AA0BA,SAAS,EAA2B,GAAuB,GAAgB;CACzE,IAAM,IAAU,EAAqB,GAAe,EAAO;AAC3D,QAAO,KAAK,GAAS,UAAU,WAAW;;AAG5C,SAAwB,EACtB,GACoC;CACpC,IAAM,IAAe,EAAW,MAE1B,IACJ,EAAkB,EAAgB,kCAAkC,IACpE,IAKI,EACJ,aAAa,GACb,WAAW,MACT,GAAsC,EAEpC,EACJ,aAAa,GACb,WAAW,MACT,GAA+B,EAG7B,EACJ,MAAM,GACN,WAAW,MACT,EAJuB,EAAuB,EAItB,CAAmB,EAEzC,IAAgB,GAAyB,SAEzC,IAAkC,EAAY,YAAY;EAC9D,IAAI;AACJ,MAAI;AASF,GARA,AAIE,IAJE,KAEY,MADO,EAAiC,EAAW,EAC5C,cAEP,MAAM,EAA8C,EAChE,iBACD,CAAC,EAEJ,EAA2B,EAAY,WAAY,EAAa,OAAQ;WACjE,GAAO;AACd,GAAI,aAAiB,KAAsB,EAAM,WAAW,OAC1D,QAAQ,MAAM,EAAM,EACpB,EAAa,GAAyC,UAAU,EAC9D,OAAO,GACR,CAAC,KAEF,QAAQ,MAAM,2CAA2C,EAAM,EAG/D,EADE,aAAiB,QAAQ,EAAM,UAAU,OAAO,EAAM,EAC7B,UAAU,EACnC,OAAO,GACR,CAAC;;IAGL;EACD;EACA;EACA;EACA;EACA;EACD,CAAC,EAEI,IAAyB,QAAkB;AAC1C,KAAiC;IACrC,CAAC,EAAgC,CAAC;AAErC,QAAO;EACL;EACA,WAAW;EACX,WAAW,IACP,IACA;EACJ,SAAS;EACV"}
1
+ {"version":3,"file":"useOpenCuratorButton.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/hooks/useOpenCuratorButton.ts"],"sourcesContent":["import { displayToast } from '@/components'\nimport { useGetEntityPermissions } from '@/synapse-queries'\nimport {\n GridSession,\n SynapseClientError,\n TaskBundle,\n} from '@sage-bionetworks/synapse-client'\nimport { useCallback } from 'react'\nimport {\n OPEN_CURATOR_ERROR_TITLE,\n OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE,\n} from '../utils/constants'\nimport { getGridSourceIdForTask } from '../utils/getGridSourceIdForTask'\nimport useGridSessionForCurationTask from './useGridSessionForCurationTask'\nimport useGridSessionForCurationTask_legacy from './useGridSessionForCurationTask_legacy'\nimport { getLinkToGridSession } from '@/utils/functions/getSynapseWebClientLink'\n\ntype UseOpenCuratorFromTaskButtonReturn = {\n isLoading: boolean\n isPending: boolean\n hasPermission?: boolean\n onClick: () => void\n}\n\nfunction openGridSessionInNewWindow(gridSessionId: string, taskId: number) {\n const gridUrl = getLinkToGridSession(gridSessionId, taskId)\n window.open(gridUrl, '_blank', 'noopener')\n}\n\nexport default function useOpenCuratorFromTaskButton(\n taskBundle: TaskBundle,\n): UseOpenCuratorFromTaskButtonReturn {\n const curationTask = taskBundle.task!\n\n const taskProperties = curationTask.taskProperties\n const suggestedAuthorizationMode =\n taskProperties != null && 'suggestedAuthorizationMode' in taskProperties\n ? taskProperties.suggestedAuthorizationMode\n : undefined\n\n const useTaskLinkedSession = suggestedAuthorizationMode != null\n\n const {\n mutateAsync: getOrCreateLegacyGridSessionForUnassignedTask,\n isPending: legacyOpenGridIsPending,\n } = useGridSessionForCurationTask_legacy()\n\n const {\n mutateAsync: getOrCreateTaskLinkedGridSession,\n isPending: taskLinkedOpenGridIsPending,\n } = useGridSessionForCurationTask()\n\n const gridSourceEntityId = getGridSourceIdForTask(curationTask)\n const {\n data: sourceEntityPermissions,\n isLoading: isLoadingEntityPermissions,\n } = useGetEntityPermissions(gridSourceEntityId)\n\n const hasPermission = sourceEntityPermissions?.canView\n\n const openNewOrExistingCuratorSession = useCallback(async () => {\n let gridSession: GridSession\n try {\n if (useTaskLinkedSession) {\n const result = await getOrCreateTaskLinkedGridSession(taskBundle)\n gridSession = result.gridSession\n } else {\n gridSession = await getOrCreateLegacyGridSessionForUnassignedTask({\n curationTask,\n })\n }\n openGridSessionInNewWindow(gridSession.sessionId!, curationTask.taskId!)\n } catch (error) {\n if (error instanceof SynapseClientError && error.status === 403) {\n console.error(error)\n displayToast(OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n } else {\n console.error('Error opening Curator for curation task', error)\n const errorMessage =\n error instanceof Error ? error.message : String(error)\n displayToast(errorMessage, 'danger', {\n title: OPEN_CURATOR_ERROR_TITLE,\n })\n }\n }\n }, [\n curationTask,\n taskBundle,\n useTaskLinkedSession,\n getOrCreateLegacyGridSessionForUnassignedTask,\n getOrCreateTaskLinkedGridSession,\n ])\n\n const handleClickOpenCurator = useCallback(() => {\n void openNewOrExistingCuratorSession()\n }, [openNewOrExistingCuratorSession])\n\n return {\n hasPermission,\n isLoading: isLoadingEntityPermissions,\n isPending: useTaskLinkedSession\n ? taskLinkedOpenGridIsPending\n : legacyOpenGridIsPending,\n onClick: handleClickOpenCurator,\n }\n}\n"],"mappings":";;;;;;;;;;;;AAwBA,SAAS,EAA2B,GAAuB,GAAgB;CACzE,IAAM,IAAU,EAAqB,GAAe,EAAO;AAC3D,QAAO,KAAK,GAAS,UAAU,WAAW;;AAG5C,SAAwB,EACtB,GACoC;CACpC,IAAM,IAAe,EAAW,MAE1B,IAAiB,EAAa,gBAM9B,KAJJ,KAAkB,QAAQ,gCAAgC,IACtD,EAAe,6BACf,KAAA,MAEqD,MAErD,EACJ,aAAa,GACb,WAAW,MACT,GAAsC,EAEpC,EACJ,aAAa,GACb,WAAW,MACT,GAA+B,EAG7B,EACJ,MAAM,GACN,WAAW,MACT,EAJuB,EAAuB,EAItB,CAAmB,EAEzC,IAAgB,GAAyB,SAEzC,IAAkC,EAAY,YAAY;EAC9D,IAAI;AACJ,MAAI;AASF,GARA,AAIE,IAJE,KAEY,MADO,EAAiC,EAAW,EAC5C,cAEP,MAAM,EAA8C,EAChE,iBACD,CAAC,EAEJ,EAA2B,EAAY,WAAY,EAAa,OAAQ;WACjE,GAAO;AACd,GAAI,aAAiB,KAAsB,EAAM,WAAW,OAC1D,QAAQ,MAAM,EAAM,EACpB,EAAa,GAAyC,UAAU,EAC9D,OAAO,GACR,CAAC,KAEF,QAAQ,MAAM,2CAA2C,EAAM,EAG/D,EADE,aAAiB,QAAQ,EAAM,UAAU,OAAO,EAAM,EAC7B,UAAU,EACnC,OAAO,GACR,CAAC;;IAGL;EACD;EACA;EACA;EACA;EACA;EACD,CAAC,EAEI,IAAyB,QAAkB;AAC1C,KAAiC;IACrC,CAAC,EAAgC,CAAC;AAErC,QAAO;EACL;EACA,WAAW;EACX,WAAW,IACP,IACA;EACJ,SAAS;EACV"}
@@ -3,4 +3,30 @@ export declare const OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE = "You don't have p
3
3
  export declare const OPEN_CURATOR_TOOLTIP_TITLE = "Open Curator to edit metadata";
4
4
  export declare const OPEN_CURATOR_NO_PERMISSION_ON_SOURCE_ERROR_MESSAGE = "You do not have permission to view the Working Copy";
5
5
  export declare const OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE = "Failed to link Grid session to Curation Task. The task was updated since it was last retrieved. Please refresh and try again.";
6
+ export declare const CREATE_CURATION_TASK_DIALOG_TITLE = "Create Curation Task";
7
+ export declare const EDIT_CURATION_TASK_DIALOG_TITLE = "Edit Curation Task";
8
+ export declare const SELECT_TASK_TYPE_DESCRIPTION = "Choose the type of data this curation task will manage. This cannot be changed after the task is created.";
9
+ export declare const FILE_BASED_TASK_TITLE = "File-Based Data";
10
+ export declare const FILE_BASED_TASK_DESCRIPTION = "Data consists of files uploaded to Synapse.\nRequirements: A schema for this data type exists in the system, the files have been uploaded to a Synapse folder, and a FileView has been created containing these files.";
11
+ export declare const FILE_BASED_UPLOAD_FOLDER_INPUT_DESCRIPTION = "Select the Synapse folder where files will be uploaded for this task.";
12
+ export declare const FILE_BASED_FILE_VIEW_INPUT_DESCRIPTION = "Select the Synapse file view that includes all files that should have curated metadata. If this task is used in Curator, this file view will determine which files are included.";
13
+ export declare const RECORD_BASED_TASK_TITLE = "Records-Based Data";
14
+ export declare const RECORD_BASED_TASK_DESCRIPTION = "Data consists of a CSV containing records as individual rows.\nRequirements: A schema for this data type exists in the system.";
15
+ export declare const RECORD_BASED_RECORD_SET_INPUT_DESCRIPTION = "Select the Synapse record set that should be used for this task.";
16
+ export declare const AUTH_MODE_NONE_TOOLTIP = "Sessions are not linked to this task \u2014 each user starts their own independent grid session. Without coordination, users may overwrite each other's annotations. Use this only to maintain existing tasks that predate session management, or if your workflow does not require collaboration.";
17
+ export declare const AUTH_MODE_SESSION_OWNER_TOOLTIP = "The grid session is owned by the task assignee (or assignee team). Only the assignee or their team members can join, and the session includes only rows that the assignee has edit access to. Best suited for File Views that span entities with varied access permissions.";
18
+ export declare const AUTH_MODE_SOURCE_BENEFACTOR_TOOLTIP = "The grid session is accessible to any user with edit access to all benefactors of the source entities. The session includes all rows that the creating user has edit access to. Best suited for tasks that manage metadata across many entities with consistent permissions, such as a project-level File View.";
19
+ export declare const TASK_NAME_INPUT_DESCRIPTION = "Specify the task name so that contributors know which task they should work on.";
20
+ export declare const TASK_INSTRUCTIONS_INPUT_DESCRIPTION = "(Optional) Provide instructions on how to complete the task.";
21
+ export declare const ASSIGNEE_TOOLTIP = "The user or team assigned to this task. If using 'Session Owner' authorization mode, the assignee is the default owner of the grid session. For team assignees in 'Session Owner' mode, any team member can access the session.";
22
+ export declare const COLLABORATORS_TOOLTIP = "Collaborators can contribute to the grid session alongside the assignee. For \"Session Owner\" authorization mode, collaborators are added as additional owners of the session.";
23
+ export declare const UNRECOGNIZED_TASK_TYPE_ERROR = "This task has an unrecognized task type and cannot be edited here.";
24
+ export declare const AUTH_MODE_CHANGED_WARNING = "Changing the Authorization Mode will clear the active session ID on this task. Any in-progress grid session linked to this task will no longer be associated with it.";
25
+ export declare const GENERIC_SAVE_ERROR_MESSAGE = "An error occurred. Please try again.";
26
+ export declare const UPLOAD_FOLDER_FINDER_TITLE = "Select Upload Folder";
27
+ export declare const UPLOAD_FOLDER_FINDER_PROMPT = "Select the folder where data files will be uploaded.";
28
+ export declare const FILE_VIEW_FINDER_TITLE = "Select File View";
29
+ export declare const FILE_VIEW_FINDER_PROMPT = "Select the FileView used to create grid sessions for this task.";
30
+ export declare const RECORD_SET_FINDER_TITLE = "Select Record Set";
31
+ export declare const RECORD_SET_FINDER_PROMPT = "Select the RecordSet used to start grid sessions for this task.";
6
32
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,mDACa,CAAA;AAClD,eAAO,MAAM,uCAAuC,gNAC2J,CAAA;AAE/M,eAAO,MAAM,0BAA0B,kCAAkC,CAAA;AACzE,eAAO,MAAM,kDAAkD,wDACR,CAAA;AACvD,eAAO,MAAM,6CAA6C,kIACuE,CAAA"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/entity/metadata-task/utils/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB,mDACa,CAAA;AAClD,eAAO,MAAM,uCAAuC,gNAC2J,CAAA;AAE/M,eAAO,MAAM,0BAA0B,kCAAkC,CAAA;AACzE,eAAO,MAAM,kDAAkD,wDACR,CAAA;AACvD,eAAO,MAAM,6CAA6C,kIACuE,CAAA;AAIjI,eAAO,MAAM,iCAAiC,yBAAyB,CAAA;AACvE,eAAO,MAAM,+BAA+B,uBAAuB,CAAA;AAEnE,eAAO,MAAM,4BAA4B,8GACoE,CAAA;AAE7G,eAAO,MAAM,qBAAqB,oBAAoB,CAAA;AACtD,eAAO,MAAM,2BAA2B,2NACkL,CAAA;AAE1N,eAAO,MAAM,0CAA0C,0EACkB,CAAA;AACzE,eAAO,MAAM,sCAAsC,qLACiI,CAAA;AAEpL,eAAO,MAAM,uBAAuB,uBAAuB,CAAA;AAC3D,eAAO,MAAM,6BAA6B,mIACwF,CAAA;AAElI,eAAO,MAAM,yCAAyC,qEACc,CAAA;AAEpE,eAAO,MAAM,sBAAsB,uSAC8P,CAAA;AACjS,eAAO,MAAM,+BAA+B,gRACmO,CAAA;AAC/Q,eAAO,MAAM,mCAAmC,oTACmQ,CAAA;AAEnT,eAAO,MAAM,2BAA2B,oFAC2C,CAAA;AACnF,eAAO,MAAM,mCAAmC,iEACgB,CAAA;AAEhE,eAAO,MAAM,gBAAgB,oOACsM,CAAA;AACnO,eAAO,MAAM,qBAAqB,oLAC+I,CAAA;AAEjL,eAAO,MAAM,4BAA4B,uEAC6B,CAAA;AACtE,eAAO,MAAM,yBAAyB,0KACmI,CAAA;AACzK,eAAO,MAAM,0BAA0B,yCAAyC,CAAA;AAEhF,eAAO,MAAM,0BAA0B,yBAAyB,CAAA;AAChE,eAAO,MAAM,2BAA2B,yDACgB,CAAA;AAExD,eAAO,MAAM,sBAAsB,qBAAqB,CAAA;AACxD,eAAO,MAAM,uBAAuB,oEAC+B,CAAA;AAEnE,eAAO,MAAM,uBAAuB,sBAAsB,CAAA;AAC1D,eAAO,MAAM,wBAAwB,oEAC8B,CAAA"}
@@ -1,6 +1,6 @@
1
1
  //#region src/features/entity/metadata-task/utils/constants.ts
2
- var e = "An error occurred while trying to open Curator", t = "You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.", n = "Open Curator to edit metadata", r = "You do not have permission to view the Working Copy", i = "Failed to link Grid session to Curation Task. The task was updated since it was last retrieved. Please refresh and try again.";
2
+ var e = "An error occurred while trying to open Curator", t = "You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.", n = "Open Curator to edit metadata", r = "You do not have permission to view the Working Copy", i = "Failed to link Grid session to Curation Task. The task was updated since it was last retrieved. Please refresh and try again.", a = "Create Curation Task", o = "Edit Curation Task", s = "Choose the type of data this curation task will manage. This cannot be changed after the task is created.", c = "File-Based Data", l = "Data consists of files uploaded to Synapse.\nRequirements: A schema for this data type exists in the system, the files have been uploaded to a Synapse folder, and a FileView has been created containing these files.", u = "Select the Synapse folder where files will be uploaded for this task.", d = "Select the Synapse file view that includes all files that should have curated metadata. If this task is used in Curator, this file view will determine which files are included.", f = "Records-Based Data", p = "Data consists of a CSV containing records as individual rows.\nRequirements: A schema for this data type exists in the system.", m = "Select the Synapse record set that should be used for this task.", h = "Sessions are not linked to this task — each user starts their own independent grid session. Without coordination, users may overwrite each other's annotations. Use this only to maintain existing tasks that predate session management, or if your workflow does not require collaboration.", g = "The grid session is owned by the task assignee (or assignee team). Only the assignee or their team members can join, and the session includes only rows that the assignee has edit access to. Best suited for File Views that span entities with varied access permissions.", _ = "The grid session is accessible to any user with edit access to all benefactors of the source entities. The session includes all rows that the creating user has edit access to. Best suited for tasks that manage metadata across many entities with consistent permissions, such as a project-level File View.", v = "Specify the task name so that contributors know which task they should work on.", y = "(Optional) Provide instructions on how to complete the task.", b = "The user or team assigned to this task. If using 'Session Owner' authorization mode, the assignee is the default owner of the grid session. For team assignees in 'Session Owner' mode, any team member can access the session.", x = "Collaborators can contribute to the grid session alongside the assignee. For \"Session Owner\" authorization mode, collaborators are added as additional owners of the session.", S = "This task has an unrecognized task type and cannot be edited here.", C = "Changing the Authorization Mode will clear the active session ID on this task. Any in-progress grid session linked to this task will no longer be associated with it.", w = "An error occurred. Please try again.", T = "Select Upload Folder", E = "Select the folder where data files will be uploaded.", D = "Select File View", O = "Select the FileView used to create grid sessions for this task.", k = "Select Record Set", A = "Select the RecordSet used to start grid sessions for this task.";
3
3
  //#endregion
4
- export { e as OPEN_CURATOR_ERROR_TITLE, i as OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE, r as OPEN_CURATOR_NO_PERMISSION_ON_SOURCE_ERROR_MESSAGE, n as OPEN_CURATOR_TOOLTIP_TITLE, t as OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE };
4
+ export { b as ASSIGNEE_TOOLTIP, C as AUTH_MODE_CHANGED_WARNING, h as AUTH_MODE_NONE_TOOLTIP, g as AUTH_MODE_SESSION_OWNER_TOOLTIP, _ as AUTH_MODE_SOURCE_BENEFACTOR_TOOLTIP, x as COLLABORATORS_TOOLTIP, a as CREATE_CURATION_TASK_DIALOG_TITLE, o as EDIT_CURATION_TASK_DIALOG_TITLE, d as FILE_BASED_FILE_VIEW_INPUT_DESCRIPTION, l as FILE_BASED_TASK_DESCRIPTION, c as FILE_BASED_TASK_TITLE, u as FILE_BASED_UPLOAD_FOLDER_INPUT_DESCRIPTION, O as FILE_VIEW_FINDER_PROMPT, D as FILE_VIEW_FINDER_TITLE, w as GENERIC_SAVE_ERROR_MESSAGE, e as OPEN_CURATOR_ERROR_TITLE, i as OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE, r as OPEN_CURATOR_NO_PERMISSION_ON_SOURCE_ERROR_MESSAGE, n as OPEN_CURATOR_TOOLTIP_TITLE, t as OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE, m as RECORD_BASED_RECORD_SET_INPUT_DESCRIPTION, p as RECORD_BASED_TASK_DESCRIPTION, f as RECORD_BASED_TASK_TITLE, A as RECORD_SET_FINDER_PROMPT, k as RECORD_SET_FINDER_TITLE, s as SELECT_TASK_TYPE_DESCRIPTION, y as TASK_INSTRUCTIONS_INPUT_DESCRIPTION, v as TASK_NAME_INPUT_DESCRIPTION, S as UNRECOGNIZED_TASK_TYPE_ERROR, E as UPLOAD_FOLDER_FINDER_PROMPT, T as UPLOAD_FOLDER_FINDER_TITLE };
5
5
 
6
6
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/utils/constants.ts"],"sourcesContent":["export const OPEN_CURATOR_ERROR_TITLE =\n 'An error occurred while trying to open Curator'\nexport const OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE =\n \"You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.\"\n\nexport const OPEN_CURATOR_TOOLTIP_TITLE = 'Open Curator to edit metadata'\nexport const OPEN_CURATOR_NO_PERMISSION_ON_SOURCE_ERROR_MESSAGE =\n 'You do not have permission to view the Working Copy'\nexport const OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE =\n 'Failed to link Grid session to Curation Task. The task was updated since it was last retrieved. Please refresh and try again.'\n"],"mappings":";AAAA,IAAa,IACX,kDACW,IACX,+MAEW,IAA6B,iCAC7B,IACX,uDACW,IACX"}
1
+ {"version":3,"file":"constants.js","names":[],"sources":["../../../../../src/features/entity/metadata-task/utils/constants.ts"],"sourcesContent":["export const OPEN_CURATOR_ERROR_TITLE =\n 'An error occurred while trying to open Curator'\nexport const OPEN_CURATOR_UNAUTHORIZED_ERROR_MESSAGE =\n \"You don't have permission to view the existing Curator session for this task. It was likely created by another data contributor. A data manager should create a new task and assign it to you or your team.\"\n\nexport const OPEN_CURATOR_TOOLTIP_TITLE = 'Open Curator to edit metadata'\nexport const OPEN_CURATOR_NO_PERMISSION_ON_SOURCE_ERROR_MESSAGE =\n 'You do not have permission to view the Working Copy'\nexport const OPEN_CURATOR_LINK_TASK_CONFLICT_ERROR_MESSAGE =\n 'Failed to link Grid session to Curation Task. The task was updated since it was last retrieved. Please refresh and try again.'\n\n// CreateOrUpdateCurationTaskDialog\n\nexport const CREATE_CURATION_TASK_DIALOG_TITLE = 'Create Curation Task'\nexport const EDIT_CURATION_TASK_DIALOG_TITLE = 'Edit Curation Task'\n\nexport const SELECT_TASK_TYPE_DESCRIPTION =\n 'Choose the type of data this curation task will manage. This cannot be changed after the task is created.'\n\nexport const FILE_BASED_TASK_TITLE = 'File-Based Data'\nexport const FILE_BASED_TASK_DESCRIPTION =\n 'Data consists of files uploaded to Synapse.\\nRequirements: A schema for this data type exists in the system, the files have been uploaded to a Synapse folder, and a FileView has been created containing these files.'\n\nexport const FILE_BASED_UPLOAD_FOLDER_INPUT_DESCRIPTION =\n 'Select the Synapse folder where files will be uploaded for this task.'\nexport const FILE_BASED_FILE_VIEW_INPUT_DESCRIPTION =\n 'Select the Synapse file view that includes all files that should have curated metadata. If this task is used in Curator, this file view will determine which files are included.'\n\nexport const RECORD_BASED_TASK_TITLE = 'Records-Based Data'\nexport const RECORD_BASED_TASK_DESCRIPTION =\n 'Data consists of a CSV containing records as individual rows.\\nRequirements: A schema for this data type exists in the system.'\n\nexport const RECORD_BASED_RECORD_SET_INPUT_DESCRIPTION =\n 'Select the Synapse record set that should be used for this task.'\n\nexport const AUTH_MODE_NONE_TOOLTIP =\n \"Sessions are not linked to this task — each user starts their own independent grid session. Without coordination, users may overwrite each other's annotations. Use this only to maintain existing tasks that predate session management, or if your workflow does not require collaboration.\"\nexport const AUTH_MODE_SESSION_OWNER_TOOLTIP =\n 'The grid session is owned by the task assignee (or assignee team). Only the assignee or their team members can join, and the session includes only rows that the assignee has edit access to. Best suited for File Views that span entities with varied access permissions.'\nexport const AUTH_MODE_SOURCE_BENEFACTOR_TOOLTIP =\n 'The grid session is accessible to any user with edit access to all benefactors of the source entities. The session includes all rows that the creating user has edit access to. Best suited for tasks that manage metadata across many entities with consistent permissions, such as a project-level File View.'\n\nexport const TASK_NAME_INPUT_DESCRIPTION =\n 'Specify the task name so that contributors know which task they should work on.'\nexport const TASK_INSTRUCTIONS_INPUT_DESCRIPTION =\n '(Optional) Provide instructions on how to complete the task.'\n\nexport const ASSIGNEE_TOOLTIP =\n \"The user or team assigned to this task. If using 'Session Owner' authorization mode, the assignee is the default owner of the grid session. For team assignees in 'Session Owner' mode, any team member can access the session.\"\nexport const COLLABORATORS_TOOLTIP =\n 'Collaborators can contribute to the grid session alongside the assignee. For \"Session Owner\" authorization mode, collaborators are added as additional owners of the session.'\n\nexport const UNRECOGNIZED_TASK_TYPE_ERROR =\n 'This task has an unrecognized task type and cannot be edited here.'\nexport const AUTH_MODE_CHANGED_WARNING =\n 'Changing the Authorization Mode will clear the active session ID on this task. Any in-progress grid session linked to this task will no longer be associated with it.'\nexport const GENERIC_SAVE_ERROR_MESSAGE = 'An error occurred. Please try again.'\n\nexport const UPLOAD_FOLDER_FINDER_TITLE = 'Select Upload Folder'\nexport const UPLOAD_FOLDER_FINDER_PROMPT =\n 'Select the folder where data files will be uploaded.'\n\nexport const FILE_VIEW_FINDER_TITLE = 'Select File View'\nexport const FILE_VIEW_FINDER_PROMPT =\n 'Select the FileView used to create grid sessions for this task.'\n\nexport const RECORD_SET_FINDER_TITLE = 'Select Record Set'\nexport const RECORD_SET_FINDER_PROMPT =\n 'Select the RecordSet used to start grid sessions for this task.'\n"],"mappings":";AAAA,IAAa,IACX,kDACW,IACX,+MAEW,IAA6B,iCAC7B,IACX,uDACW,IACX,iIAIW,IAAoC,wBACpC,IAAkC,sBAElC,IACX,6GAEW,IAAwB,mBACxB,IACX,0NAEW,IACX,yEACW,IACX,oLAEW,IAA0B,sBAC1B,IACX,kIAEW,IACX,oEAEW,IACX,iSACW,IACX,+QACW,IACX,mTAEW,IACX,mFACW,IACX,gEAEW,IACX,mOACW,IACX,mLAEW,IACX,sEACW,IACX,yKACW,IAA6B,wCAE7B,IAA6B,wBAC7B,IACX,wDAEW,IAAyB,oBACzB,IACX,mEAEW,IAA0B,qBAC1B,IACX"}
package/dist/index.js CHANGED
@@ -35,22 +35,22 @@ import { ConfirmationDialog as ye } from "./components/ConfirmationDialog/Confir
35
35
  import be, { SynapseErrorType as xe } from "./components/error/ErrorPage.js";
36
36
  import Se from "./components/SynapseTable/NoContentAvailable.js";
37
37
  import Ce from "./components/IconSvg/IconSvg.js";
38
- import { StyledFormControl as we } from "./components/styled/StyledFormControl.js";
39
- import Te from "./components/TextField/TextField.js";
40
- import { AccessTokenPage as Ee } from "./components/AccessTokenPage/AccessTokenPage.js";
41
- import { AccountLevelBadges as De } from "./components/AccountLevelBadges/AccountLevelBadges.js";
42
- import Oe, { useLastLoginInfo as ke, useLastLoginInfoState as Ae } from "./components/Authentication/LastLoginInfo.js";
43
- import je from "./components/Authentication/PasswordField.js";
44
- import Me from "./components/Authentication/OneTimePasswordForm.js";
45
- import Ne from "./components/Authentication/StandaloneLoginForm.js";
46
- import { LeftRightPanel as Pe, StyledInnerContainer as Fe, StyledOuterContainer as Ie } from "./components/styled/LeftRightPanel.js";
47
- import Le from "./components/Authentication/TwoFactorEnrollmentForm.js";
48
- import Re from "./components/Authentication/TwoFactorAuthSettingsPanel.js";
49
- import ze from "./components/Authentication/TwoFactorBackupCodes.js";
50
- import { getFileHandleAssociation as Be, getLinkParams as Ve, getValueOrMultiValue as He } from "./components/GenericCard/CardUtils.js";
51
- import { Project as Ue } from "./assets/themed_icons/Project.js";
52
- import We from "./components/Icon/Icon.js";
53
- import Ge from "./components/ShowMore/ShowMore.js";
38
+ import we from "./components/TextField/TextField.js";
39
+ import { AccessTokenPage as Te } from "./components/AccessTokenPage/AccessTokenPage.js";
40
+ import { AccountLevelBadges as Ee } from "./components/AccountLevelBadges/AccountLevelBadges.js";
41
+ import De, { useLastLoginInfo as Oe, useLastLoginInfoState as ke } from "./components/Authentication/LastLoginInfo.js";
42
+ import Ae from "./components/Authentication/PasswordField.js";
43
+ import je from "./components/Authentication/OneTimePasswordForm.js";
44
+ import Me from "./components/Authentication/StandaloneLoginForm.js";
45
+ import { LeftRightPanel as Ne, StyledInnerContainer as Pe, StyledOuterContainer as Fe } from "./components/styled/LeftRightPanel.js";
46
+ import Ie from "./components/Authentication/TwoFactorEnrollmentForm.js";
47
+ import Le from "./components/Authentication/TwoFactorAuthSettingsPanel.js";
48
+ import Re from "./components/Authentication/TwoFactorBackupCodes.js";
49
+ import { getFileHandleAssociation as ze, getLinkParams as Be, getValueOrMultiValue as Ve } from "./components/GenericCard/CardUtils.js";
50
+ import { Project as He } from "./assets/themed_icons/Project.js";
51
+ import Ue from "./components/Icon/Icon.js";
52
+ import We from "./components/ShowMore/ShowMore.js";
53
+ import { StyledFormControl as Ge } from "./components/styled/StyledFormControl.js";
54
54
  import { EntityDownloadConfirmation as Ke } from "./components/EntityDownloadConfirmation/EntityDownloadConfirmation.js";
55
55
  import { QueryContext as qe, QueryContextConsumer as Je, QueryContextProvider as Ye, useQueryContext as Xe } from "./components/QueryContext/QueryContext.js";
56
56
  import { CARD_SHORT_DESCRIPTION_CSS as Ze, LongDescription as Qe, ShortDescription as $e } from "./components/GenericCard/CollapsibleDescription.js";
@@ -176,6 +176,6 @@ var cr = {
176
176
  defaultQueryClientConfig: Q
177
177
  };
178
178
  //#endregion
179
- export { t as ACCESS_TOKEN_COOKIE_KEY, vn as AccessRequirementAclEditor, In as AccessRequirementRelatedProjectsList, Ee as AccessTokenPage, De as AccountLevelBadges, ue as AppUtils, q as ApplicationSessionContextConsumer, J as ApplicationSessionContextProvider, se as ApplicationSessionManager, ae as AuthenticationGuard, xt as AvailableEvaluationQueueList, Ze as CARD_SHORT_DESCRIPTION_CSS, Ot as CTASectionWrapper, st as CardContainer, pt as CardContainerLogic, mt as CardGridWithLinks, $ as CertificationQuiz, bt as ChallengeDataDownload, _t as ChallengeDetailPage, St as ChallengeSubmission, Ct as ChangePassword, wt as ChangePasswordWithToken, N as ClientError, Dt as ColoredBulletListItem, ye as ConfirmationDialog, Tt as CookiePreferencesDialog, Et as CookiesNotification, Xn as CreatePortalModal, zn as DatasetJsonLdScript, Ut as DiscussionThread, X as DocumentMetadataProvider, At as DownloadCartPage, kt as DownloadIneligibleForPackagingFilesFromListButton, Mt as DynamicForm, Nt as DynamicFormModal, P as EmptyFallbackComponent, yt as EntityBadgeIcons, Ke as EntityDownloadConfirmation, Pt as EntityFinder, Ft as EntityForm, Fn as EntityHeaderTable, F as ErrorBanner, I as ErrorFallbackComponent, be as ErrorPage, It as EvaluationCard, Lt as EvaluationEditorPage, Rt as ExperimentalMode, zt as ExternalFileHandleLink, Bt as FeaturedDataTabs, Wn as FeaturedResearch, Vt as FeaturedToolsList, lt as FileUpload, Wt as ForumPage, Z as FullContextProvider, ee as FullWidthAlert, et as GenericCard, Kt as Goals, Jt as GoalsV2, Yt as GoalsV3, Xt as GoogleAnalytics, dt as HasAccess, ve as HelpPopover, vt as HoverPopover, re as HttpClient, We as Icon, Ce as IconSvg, Hn as ImageCardGridWithLinks, xn as InputSizedButton, Rn as JsonLdScript, n as LAST_PLACE_LOCALSTORAGE_KEY, Oe as LastLoginInfo, Pe as LeftRightPanel, pe as LightTooltip, Qe as LongDescription, nr as MOCK_ANONYMOUS_PRINCIPAL_ID, sr as MOCK_APPLICATION_SESSION_CONTEXT, rr as MOCK_AUTHENTICATED_PRINCIPAL_ID, ir as MOCK_PUBLIC_PRINCIPAL_ID, ar as MOCK_PUBLIC_PRINCIPAL_IDS, or as MOCK_REALM_PRINCIPAL, Zt as Map, Qt as MarkdownCollapse, Ht as MarkdownEditor, $t as MarkdownGithubLatestTag, ut as ModalDownload, Ln as MuiContainer, Se as NoContentAvailable, en as OAuthClientManagement, r as ONE_SAGE_REDIRECT_COOKIE_KEY, Me as OneTimePasswordForm, tn as OrientationBanner, G as Palettes, je as PasswordField, d as PermissionLevelToAccessType, qn as PortalAclEditor, Jn as PortalAclEditorModal, Yn as PortalCard, Un as PortalFeatureHighlights, Kn as PortalFeaturedPartners, Gn as PortalHomePageHeader, Zn as PortalList, qt as PortalSectionHeader, sn as ProgrammaticTableDownload, on as Programs, ln as ProjectDataAvailability, Ue as ProjectIcon, cn as ProvenanceGraph, qe as QueryContext, Je as QueryContextConsumer, Ye as QueryContextProvider, Gt as QueryCount, it as QueryWrapper, dn as QueryWrapperPlotNav, un as QueryWrapperSynapsePlot, Vn as RecentPublicationsGrid, hn as RegisterPageLogoutPrompt, k as RegularExpressions, gn as RenderIfInView, _n as Resources, ht as RowDataTable, gt as RowDataTableWithQuery, yn as RssFeedCards, Bn as SageResourcesPopover, fn as SearchQueryWrapper, pn as SearchQueryWrapperPlotNav, ce as SessionInitializedGuard, $e as ShortDescription, jt as ShowDownloadV2, Ge as ShowMore, L as SignInPrompt, me as SkeletonButton, he as SkeletonInlineBlock, _e as SkeletonParagraph, ge as SkeletonTable, Ne as StandaloneLoginForm, bn as StandaloneQueryWrapper, we as StyledFormControl, Fe as StyledInnerContainer, Ie as StyledOuterContainer, Sn as SubscriptionPage, Cn as SubsectionRowRenderer, nt as SynapseCardLabel, En as SynapseChat, u as SynapseClient, de as SynapseClientError, ne as SynapseConstants, V as SynapseContext, H as SynapseContextConsumer, U as SynapseContextProvider, cr as SynapseContextUtils, R as SynapseErrorBoundary, xe as SynapseErrorType, Tn as SynapseFormSubmissionGrid, wn as SynapseFormWrapper, K as SynapseHookUtils, an as SynapsePlot, Dn as SynapsePortalChatDialog, fe as SynapseQueries, oe as SynapseSessionManager, ft as SynapseTable, $n as SynapseTheme, te as SynapseToastContainer, M as SynapseUtilityFunctions, On as SystemUseNotification, kn as TableFeedCards, z as TableRowFallbackComponent, An as TermsAndConditions, Te as TextField, nn as ThemesPlot, jn as TimelinePlot, Re as TwoFactorAuthSettingsPanel, ze as TwoFactorBackupCodes, Le as TwoFactorEnrollmentForm, rn as UpsetPlot, tt as UserCard, ot as UserCardList, Nn as UserCardListGroups, Mn as UserCardListRotate, ct as UserOrTeamBadge, Pn as UserProfileLinks, er as WebhookDashboard, at as WideButton, B as YOU_ARE_NOT_AUTHORIZED_MESSAGE, j as createTableUpdateTransactionRequest, Q as defaultQueryClientConfig, e as displayToast, rt as generateEncodedPathAndQueryForSelectedFacetURL, i as getCookieDomain, Be as getFileHandleAssociation, Ve as getLinkParams, He as getValueOrMultiValue, A as hex2ascii, f as implementsCloudProviderFileHandleInterface, p as implementsExternalFileHandleInterface, m as isColumnMultiValueFunctionQueryFilter, h as isColumnSingleValueQueryFilter, g as isDockerRepository, _ as isExternalFileHandle, v as isFacetColumnRangeRequest, y as isFacetColumnValuesRequest, b as isFileEntity, x as isInviteeVerificationSignedToken, S as isJoinTeamSignedToken, C as isLink, w as isMembershipInvtnSignedToken, T as isS3FileHandle, mn as isSearchQueryWrapperPlotNavProps, E as isTermsOfUseAccessRequirement, D as isTextMatchesQueryFilter, O as isTypeViaConcreteTypeFactory, tr as mockData, a as processRedirectURLInOneSage, o as restoreLastPlace, s as storeLastPlace, c as storeRedirectURLForOneSageLoginAndGotoURL, Y as useApplicationSessionContext, ie as useDocumentMetadata, l as useFramebuster, ke as useLastLoginInfo, Ae as useLastLoginInfoState, Xe as useQueryContext, le as useQuerySearchParam, W as useSynapseContext, Qn as visuallyHidden };
179
+ export { t as ACCESS_TOKEN_COOKIE_KEY, vn as AccessRequirementAclEditor, In as AccessRequirementRelatedProjectsList, Te as AccessTokenPage, Ee as AccountLevelBadges, ue as AppUtils, q as ApplicationSessionContextConsumer, J as ApplicationSessionContextProvider, se as ApplicationSessionManager, ae as AuthenticationGuard, xt as AvailableEvaluationQueueList, Ze as CARD_SHORT_DESCRIPTION_CSS, Ot as CTASectionWrapper, st as CardContainer, pt as CardContainerLogic, mt as CardGridWithLinks, $ as CertificationQuiz, bt as ChallengeDataDownload, _t as ChallengeDetailPage, St as ChallengeSubmission, Ct as ChangePassword, wt as ChangePasswordWithToken, N as ClientError, Dt as ColoredBulletListItem, ye as ConfirmationDialog, Tt as CookiePreferencesDialog, Et as CookiesNotification, Xn as CreatePortalModal, zn as DatasetJsonLdScript, Ut as DiscussionThread, X as DocumentMetadataProvider, At as DownloadCartPage, kt as DownloadIneligibleForPackagingFilesFromListButton, Mt as DynamicForm, Nt as DynamicFormModal, P as EmptyFallbackComponent, yt as EntityBadgeIcons, Ke as EntityDownloadConfirmation, Pt as EntityFinder, Ft as EntityForm, Fn as EntityHeaderTable, F as ErrorBanner, I as ErrorFallbackComponent, be as ErrorPage, It as EvaluationCard, Lt as EvaluationEditorPage, Rt as ExperimentalMode, zt as ExternalFileHandleLink, Bt as FeaturedDataTabs, Wn as FeaturedResearch, Vt as FeaturedToolsList, lt as FileUpload, Wt as ForumPage, Z as FullContextProvider, ee as FullWidthAlert, et as GenericCard, Kt as Goals, Jt as GoalsV2, Yt as GoalsV3, Xt as GoogleAnalytics, dt as HasAccess, ve as HelpPopover, vt as HoverPopover, re as HttpClient, Ue as Icon, Ce as IconSvg, Hn as ImageCardGridWithLinks, xn as InputSizedButton, Rn as JsonLdScript, n as LAST_PLACE_LOCALSTORAGE_KEY, De as LastLoginInfo, Ne as LeftRightPanel, pe as LightTooltip, Qe as LongDescription, nr as MOCK_ANONYMOUS_PRINCIPAL_ID, sr as MOCK_APPLICATION_SESSION_CONTEXT, rr as MOCK_AUTHENTICATED_PRINCIPAL_ID, ir as MOCK_PUBLIC_PRINCIPAL_ID, ar as MOCK_PUBLIC_PRINCIPAL_IDS, or as MOCK_REALM_PRINCIPAL, Zt as Map, Qt as MarkdownCollapse, Ht as MarkdownEditor, $t as MarkdownGithubLatestTag, ut as ModalDownload, Ln as MuiContainer, Se as NoContentAvailable, en as OAuthClientManagement, r as ONE_SAGE_REDIRECT_COOKIE_KEY, je as OneTimePasswordForm, tn as OrientationBanner, G as Palettes, Ae as PasswordField, d as PermissionLevelToAccessType, qn as PortalAclEditor, Jn as PortalAclEditorModal, Yn as PortalCard, Un as PortalFeatureHighlights, Kn as PortalFeaturedPartners, Gn as PortalHomePageHeader, Zn as PortalList, qt as PortalSectionHeader, sn as ProgrammaticTableDownload, on as Programs, ln as ProjectDataAvailability, He as ProjectIcon, cn as ProvenanceGraph, qe as QueryContext, Je as QueryContextConsumer, Ye as QueryContextProvider, Gt as QueryCount, it as QueryWrapper, dn as QueryWrapperPlotNav, un as QueryWrapperSynapsePlot, Vn as RecentPublicationsGrid, hn as RegisterPageLogoutPrompt, k as RegularExpressions, gn as RenderIfInView, _n as Resources, ht as RowDataTable, gt as RowDataTableWithQuery, yn as RssFeedCards, Bn as SageResourcesPopover, fn as SearchQueryWrapper, pn as SearchQueryWrapperPlotNav, ce as SessionInitializedGuard, $e as ShortDescription, jt as ShowDownloadV2, We as ShowMore, L as SignInPrompt, me as SkeletonButton, he as SkeletonInlineBlock, _e as SkeletonParagraph, ge as SkeletonTable, Me as StandaloneLoginForm, bn as StandaloneQueryWrapper, Ge as StyledFormControl, Pe as StyledInnerContainer, Fe as StyledOuterContainer, Sn as SubscriptionPage, Cn as SubsectionRowRenderer, nt as SynapseCardLabel, En as SynapseChat, u as SynapseClient, de as SynapseClientError, ne as SynapseConstants, V as SynapseContext, H as SynapseContextConsumer, U as SynapseContextProvider, cr as SynapseContextUtils, R as SynapseErrorBoundary, xe as SynapseErrorType, Tn as SynapseFormSubmissionGrid, wn as SynapseFormWrapper, K as SynapseHookUtils, an as SynapsePlot, Dn as SynapsePortalChatDialog, fe as SynapseQueries, oe as SynapseSessionManager, ft as SynapseTable, $n as SynapseTheme, te as SynapseToastContainer, M as SynapseUtilityFunctions, On as SystemUseNotification, kn as TableFeedCards, z as TableRowFallbackComponent, An as TermsAndConditions, we as TextField, nn as ThemesPlot, jn as TimelinePlot, Le as TwoFactorAuthSettingsPanel, Re as TwoFactorBackupCodes, Ie as TwoFactorEnrollmentForm, rn as UpsetPlot, tt as UserCard, ot as UserCardList, Nn as UserCardListGroups, Mn as UserCardListRotate, ct as UserOrTeamBadge, Pn as UserProfileLinks, er as WebhookDashboard, at as WideButton, B as YOU_ARE_NOT_AUTHORIZED_MESSAGE, j as createTableUpdateTransactionRequest, Q as defaultQueryClientConfig, e as displayToast, rt as generateEncodedPathAndQueryForSelectedFacetURL, i as getCookieDomain, ze as getFileHandleAssociation, Be as getLinkParams, Ve as getValueOrMultiValue, A as hex2ascii, f as implementsCloudProviderFileHandleInterface, p as implementsExternalFileHandleInterface, m as isColumnMultiValueFunctionQueryFilter, h as isColumnSingleValueQueryFilter, g as isDockerRepository, _ as isExternalFileHandle, v as isFacetColumnRangeRequest, y as isFacetColumnValuesRequest, b as isFileEntity, x as isInviteeVerificationSignedToken, S as isJoinTeamSignedToken, C as isLink, w as isMembershipInvtnSignedToken, T as isS3FileHandle, mn as isSearchQueryWrapperPlotNavProps, E as isTermsOfUseAccessRequirement, D as isTextMatchesQueryFilter, O as isTypeViaConcreteTypeFactory, tr as mockData, a as processRedirectURLInOneSage, o as restoreLastPlace, s as storeLastPlace, c as storeRedirectURLForOneSageLoginAndGotoURL, Y as useApplicationSessionContext, ie as useDocumentMetadata, l as useFramebuster, Oe as useLastLoginInfo, ke as useLastLoginInfoState, Xe as useQueryContext, le as useQuerySearchParam, W as useSynapseContext, Qn as visuallyHidden };
180
180
 
181
181
  //# sourceMappingURL=index.js.map
@@ -79,7 +79,7 @@ addEventListener('message', async function (event) {
79
79
  case 'CLIENT_CLOSED': {
80
80
  activeClientIds.delete(clientId)
81
81
 
82
- const remainingClients = allClients.filter((client) => {
82
+ const remainingClients = allClients.filter(client => {
83
83
  return client.id !== clientId
84
84
  })
85
85
 
@@ -187,11 +187,11 @@ async function resolveMainClient(event) {
187
187
  })
188
188
 
189
189
  return allClients
190
- .filter((client) => {
190
+ .filter(client => {
191
191
  // Get only those clients that are currently visible.
192
192
  return client.visibilityState === 'visible'
193
193
  })
194
- .find((client) => {
194
+ .find(client => {
195
195
  // Find the client ID that's recorded in the
196
196
  // set of clients that have registered the worker.
197
197
  return activeClientIds.has(client.id)
@@ -219,10 +219,8 @@ async function getResponse(event, client, requestId) {
219
219
  // user-defined CORS policies.
220
220
  const acceptHeader = headers.get('accept')
221
221
  if (acceptHeader) {
222
- const values = acceptHeader.split(',').map((value) => value.trim())
223
- const filteredValues = values.filter(
224
- (value) => value !== 'msw/passthrough',
225
- )
222
+ const values = acceptHeader.split(',').map(value => value.trim())
223
+ const filteredValues = values.filter(value => value !== 'msw/passthrough')
226
224
 
227
225
  if (filteredValues.length > 0) {
228
226
  headers.set('accept', filteredValues.join(', '))
@@ -284,7 +282,7 @@ function sendToClient(client, message, transferrables = []) {
284
282
  return new Promise((resolve, reject) => {
285
283
  const channel = new MessageChannel()
286
284
 
287
- channel.port1.onmessage = (event) => {
285
+ channel.port1.onmessage = event => {
288
286
  if (event.data && event.data.error) {
289
287
  return reject(event.data.error)
290
288
  }
@@ -1,4 +1,4 @@
1
- import { TaskBundle } from '@sage-bionetworks/synapse-client';
1
+ import { CurationTask, TaskBundle, TaskStatus } from '@sage-bionetworks/synapse-client';
2
2
  export declare const MOCK_CURATION_TASK_ID = 123;
3
3
  export declare const MOCK_CURATION_TASK_ASSIGNEE_PRINCIPAL_ID = "456";
4
4
  export declare const MOCK_CURATION_TASK_FILE_VIEW_ID = "syn999";
@@ -6,5 +6,5 @@ export declare const MOCK_CURATION_TASK_FILE_VIEW_ID = "syn999";
6
6
  * Creates a mock TaskBundle suitable for use in tests. Defaults to a
7
7
  * FileBasedMetadataTaskProperties task assigned to MOCK_CURATION_TASK_ASSIGNEE_PRINCIPAL_ID.
8
8
  */
9
- export declare function createMockTaskBundle(overrides?: Partial<TaskBundle>): TaskBundle;
9
+ export declare function createMockTaskBundle(taskOverrides?: Partial<CurationTask>, statusOverrides?: Partial<TaskStatus>): TaskBundle;
10
10
  //# sourceMappingURL=mockCurationTask.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"mockCurationTask.d.ts","sourceRoot":"","sources":["../../../src/mocks/curation/mockCurationTask.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAE7D,eAAO,MAAM,qBAAqB,MAAM,CAAA;AACxC,eAAO,MAAM,wCAAwC,QAAQ,CAAA;AAC7D,eAAO,MAAM,+BAA+B,WAAW,CAAA;AAEvD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,SAAS,GAAE,OAAO,CAAC,UAAU,CAAM,GAClC,UAAU,CAgBZ"}
1
+ {"version":3,"file":"mockCurationTask.d.ts","sourceRoot":"","sources":["../../../src/mocks/curation/mockCurationTask.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACX,MAAM,kCAAkC,CAAA;AAEzC,eAAO,MAAM,qBAAqB,MAAM,CAAA;AACxC,eAAO,MAAM,wCAAwC,QAAQ,CAAA;AAC7D,eAAO,MAAM,+BAA+B,WAAW,CAAA;AAEvD;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,aAAa,GAAE,OAAO,CAAC,YAAY,CAAM,EACzC,eAAe,GAAE,OAAO,CAAC,UAAU,CAAM,GACxC,UAAU,CAkBZ"}
@@ -1,17 +1,21 @@
1
1
  //#region src/mocks/curation/mockCurationTask.ts
2
2
  var e = 123, t = "456", n = "syn999";
3
- function r(e = {}) {
3
+ function r(e = {}, t = {}) {
4
4
  return {
5
5
  task: {
6
6
  taskId: 123,
7
7
  assigneePrincipalId: "456",
8
8
  taskProperties: {
9
9
  concreteType: "org.sagebionetworks.repo.model.curation.metadata.FileBasedMetadataTaskProperties",
10
- fileViewId: n
11
- }
10
+ fileViewId: n,
11
+ suggestedAuthorizationMode: "SESSION_OWNER"
12
+ },
13
+ ...e
12
14
  },
13
- status: { taskId: 123 },
14
- ...e
15
+ status: {
16
+ taskId: 123,
17
+ ...t
18
+ }
15
19
  };
16
20
  }
17
21
  //#endregion