synapse-react-client 4.0.29 → 4.0.31

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 (231) hide show
  1. package/dist/SWC.index.d.ts +4 -0
  2. package/dist/SWC.index.d.ts.map +1 -1
  3. package/dist/SWC.index.js +2 -1
  4. package/dist/SWC.index.js.map +1 -1
  5. package/dist/assets/illustrations/curie_avatar.svg +52 -0
  6. package/dist/assets/illustrations/curie_avatar_head.js +91 -0
  7. package/dist/assets/illustrations/curie_avatar_head.js.map +1 -0
  8. package/dist/assets/illustrations/curie_avatar_head.svg +21 -0
  9. package/dist/assets/illustrations/discussions_illustration2.js +96 -0
  10. package/dist/assets/illustrations/discussions_illustration2.js.map +1 -0
  11. package/dist/assets/illustrations/discussions_illustration2.svg +17 -0
  12. package/dist/assets/illustrations/index.d.ts +3 -0
  13. package/dist/assets/illustrations/index.d.ts.map +1 -1
  14. package/dist/assets/illustrations/index.js +34 -32
  15. package/dist/assets/illustrations/index.js.map +1 -1
  16. package/dist/assets/mui_components/CurieAvatarHead.d.ts +5 -0
  17. package/dist/assets/mui_components/CurieAvatarHead.d.ts.map +1 -0
  18. package/dist/assets/mui_components/CurieAvatarHead.js +17 -0
  19. package/dist/assets/mui_components/CurieAvatarHead.js.map +1 -0
  20. package/dist/assets/themed_icons/Model.d.ts +3 -0
  21. package/dist/assets/themed_icons/Model.d.ts.map +1 -0
  22. package/dist/assets/themed_icons/Model.js +31 -0
  23. package/dist/assets/themed_icons/Model.js.map +1 -0
  24. package/dist/assets/themed_icons/index.d.ts +2 -1
  25. package/dist/assets/themed_icons/index.d.ts.map +1 -1
  26. package/dist/assets/themed_icons/index.js +19 -18
  27. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.d.ts.map +1 -1
  28. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js +49 -39
  29. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js.map +1 -1
  30. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  31. package/dist/components/DataGrid/SynapseGrid.js +46 -45
  32. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  33. package/dist/components/DataGrid/utils/DataGridUtils.js +1 -1
  34. package/dist/components/DataGrid/utils/DataGridUtils.js.map +1 -1
  35. package/dist/components/EntityFinder/EntityFinder.js +127 -127
  36. package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
  37. package/dist/components/EntityFinder/details/view/DetailsView.js +53 -53
  38. package/dist/components/EntitySidebar/EntitySidebar.css +1 -1
  39. package/dist/components/EntitySidebar/EntitySidebar.module.js +11 -11
  40. package/dist/components/EntitySidebar/EntitySidebar.module.js.map +1 -1
  41. package/dist/components/EntitySidebar/EntitySidebar.module.scss +2 -2
  42. package/dist/components/EntityTreeTable/EntityTreeTable.d.ts +7 -0
  43. package/dist/components/EntityTreeTable/EntityTreeTable.d.ts.map +1 -1
  44. package/dist/components/EntityTreeTable/EntityTreeTable.js +24 -20
  45. package/dist/components/EntityTreeTable/EntityTreeTable.js.map +1 -1
  46. package/dist/components/EntityTreeTable/components/CheckboxCell.d.ts +4 -0
  47. package/dist/components/EntityTreeTable/components/CheckboxCell.d.ts.map +1 -0
  48. package/dist/components/EntityTreeTable/components/CheckboxCell.js +43 -0
  49. package/dist/components/EntityTreeTable/components/CheckboxCell.js.map +1 -0
  50. package/dist/components/EntityTreeTable/components/EntityNameCell.d.ts.map +1 -1
  51. package/dist/components/EntityTreeTable/components/EntityNameCell.js +10 -9
  52. package/dist/components/EntityTreeTable/components/EntityNameCell.js.map +1 -1
  53. package/dist/components/EntityTreeTable/components/EntityTreeTableContext.d.ts +6 -0
  54. package/dist/components/EntityTreeTable/components/EntityTreeTableContext.d.ts.map +1 -1
  55. package/dist/components/EntityTreeTable/components/EntityTreeTableContext.js.map +1 -1
  56. package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts +1 -1
  57. package/dist/components/EntityTreeTable/hooks/useTableColumns.d.ts.map +1 -1
  58. package/dist/components/EntityTreeTable/hooks/useTableColumns.js +49 -39
  59. package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
  60. package/dist/components/EntityUpload/EntityUpload.js +6 -6
  61. package/dist/components/Forum/DiscussionEmpty.css +1 -0
  62. package/dist/components/Forum/DiscussionEmpty.d.ts +6 -0
  63. package/dist/components/Forum/DiscussionEmpty.d.ts.map +1 -0
  64. package/dist/components/Forum/DiscussionEmpty.js +30 -0
  65. package/dist/components/Forum/DiscussionEmpty.js.map +1 -0
  66. package/dist/components/Forum/DiscussionEmpty.module.js +10 -0
  67. package/dist/components/Forum/DiscussionEmpty.module.js.map +1 -0
  68. package/dist/components/Forum/DiscussionEmpty.module.scss +37 -0
  69. package/dist/components/Icon/Icon.d.ts.map +1 -1
  70. package/dist/components/Icon/Icon.js +82 -80
  71. package/dist/components/Icon/Icon.js.map +1 -1
  72. package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
  73. package/dist/components/ProvenanceGraph/ProvenanceGraph.js +39 -41
  74. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  75. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  76. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +27 -20
  77. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  78. package/dist/components/SynapseChat/AccessLevelMenu.d.ts.map +1 -1
  79. package/dist/components/SynapseChat/AccessLevelMenu.js +1 -0
  80. package/dist/components/SynapseChat/AccessLevelMenu.js.map +1 -1
  81. package/dist/components/SynapseChat/GridAgentChat.d.ts.map +1 -1
  82. package/dist/components/SynapseChat/GridAgentChat.js +34 -25
  83. package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
  84. package/dist/components/SynapseChat/SynapseChat.d.ts +10 -12
  85. package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
  86. package/dist/components/SynapseChat/SynapseChat.js +106 -103
  87. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  88. package/dist/components/SynapseChat/SynapseChatInteraction.css +1 -0
  89. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +22 -1
  90. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
  91. package/dist/components/SynapseChat/SynapseChatInteraction.js +123 -94
  92. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  93. package/dist/components/SynapseChat/SynapseChatInteraction.module.js +8 -0
  94. package/dist/components/SynapseChat/SynapseChatInteraction.module.js.map +1 -0
  95. package/dist/components/SynapseChat/SynapseChatInteraction.module.scss +25 -0
  96. package/dist/components/SynapseChat/SynapseChatMessage.d.ts +16 -1
  97. package/dist/components/SynapseChat/SynapseChatMessage.d.ts.map +1 -1
  98. package/dist/components/SynapseChat/SynapseChatMessage.js +25 -11
  99. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  100. package/dist/components/SynapseChat/components/AddFilesDialog/AddFilesDialog.d.ts +27 -0
  101. package/dist/components/SynapseChat/components/AddFilesDialog/AddFilesDialog.d.ts.map +1 -0
  102. package/dist/components/SynapseChat/components/AddFilesDialog/AddFilesDialog.js +79 -0
  103. package/dist/components/SynapseChat/components/AddFilesDialog/AddFilesDialog.js.map +1 -0
  104. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.css +1 -0
  105. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.d.ts +33 -0
  106. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.d.ts.map +1 -0
  107. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.js +77 -0
  108. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.js.map +1 -0
  109. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.js +8 -0
  110. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.js.map +1 -0
  111. package/dist/components/SynapseChat/components/AttachmentChip/AttachmentChip.module.scss +16 -0
  112. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.css +1 -0
  113. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.d.ts +23 -0
  114. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.d.ts.map +1 -0
  115. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.js +24 -0
  116. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.js.map +1 -0
  117. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.js +9 -0
  118. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.js.map +1 -0
  119. package/dist/components/SynapseChat/components/ChatAttachmentStrip/ChatAttachmentStrip.module.scss +19 -0
  120. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.css +1 -0
  121. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.d.ts +22 -0
  122. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.d.ts.map +1 -0
  123. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js +80 -0
  124. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.js.map +1 -0
  125. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.module.js +9 -0
  126. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.module.js.map +1 -0
  127. package/dist/components/SynapseChat/components/ChatInputArea/ChatInputArea.module.scss +39 -0
  128. package/dist/components/SynapseChat/useChatState.d.ts +12 -4
  129. package/dist/components/SynapseChat/useChatState.d.ts.map +1 -1
  130. package/dist/components/SynapseChat/useChatState.js +38 -20
  131. package/dist/components/SynapseChat/useChatState.js.map +1 -1
  132. package/dist/components/SynapseChat/utils/constants.d.ts +8 -0
  133. package/dist/components/SynapseChat/utils/constants.d.ts.map +1 -0
  134. package/dist/components/SynapseChat/utils/constants.js +12 -0
  135. package/dist/components/SynapseChat/utils/constants.js.map +1 -0
  136. package/dist/components/SynapseChat/utils/types.d.ts +13 -0
  137. package/dist/components/SynapseChat/utils/types.d.ts.map +1 -0
  138. package/dist/components/SynapseChat/utils/types.js +0 -0
  139. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js +101 -101
  140. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  141. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts +1 -0
  142. package/dist/components/entity/page/action_menu/EntityActionMenu.d.ts.map +1 -1
  143. package/dist/components/entity/page/action_menu/EntityActionMenu.js +8 -0
  144. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  145. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js +1 -1
  146. package/dist/components/entity/page/breadcrumbs/EntityPageBreadcrumbs.js.map +1 -1
  147. package/dist/components/file/upload/BasicFileHandleUpload.d.ts +35 -4
  148. package/dist/components/file/upload/BasicFileHandleUpload.d.ts.map +1 -1
  149. package/dist/components/file/upload/BasicFileHandleUpload.js +22 -16
  150. package/dist/components/file/upload/BasicFileHandleUpload.js.map +1 -1
  151. package/dist/components/file/upload/MultiFileUploadProgress.js +6 -6
  152. package/dist/components/file/upload/UploadFilePanel.d.ts +32 -0
  153. package/dist/components/file/upload/UploadFilePanel.d.ts.map +1 -1
  154. package/dist/components/file/upload/UploadFilePanel.js +58 -42
  155. package/dist/components/file/upload/UploadFilePanel.js.map +1 -1
  156. package/dist/components/file/upload/validateFileSelection.d.ts +25 -0
  157. package/dist/components/file/upload/validateFileSelection.d.ts.map +1 -0
  158. package/dist/components/file/upload/validateFileSelection.js +18 -0
  159. package/dist/components/file/upload/validateFileSelection.js.map +1 -0
  160. package/dist/components/menu/DropdownMenu.d.ts +3 -0
  161. package/dist/components/menu/DropdownMenu.d.ts.map +1 -1
  162. package/dist/components/menu/DropdownMenu.js +108 -83
  163. package/dist/components/menu/DropdownMenu.js.map +1 -1
  164. package/dist/features/curator/dashboard/CuratorDashboard.d.ts.map +1 -1
  165. package/dist/features/curator/dashboard/CuratorDashboard.js +22 -23
  166. package/dist/features/curator/dashboard/CuratorDashboard.js.map +1 -1
  167. package/dist/features/curator/dashboard/components/CurationTaskCard.css +1 -1
  168. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js +13 -13
  169. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js.map +1 -1
  170. package/dist/features/curator/dashboard/components/CurationTaskCard.module.scss +2 -1
  171. package/dist/features/curator/dashboard/components/CurationTaskCardLayout.d.ts.map +1 -1
  172. package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js +35 -27
  173. package/dist/features/curator/dashboard/components/CurationTaskCardLayout.js.map +1 -1
  174. package/dist/features/curator/dashboard/components/FilteredByTaskIdsBanner.d.ts +10 -0
  175. package/dist/features/curator/dashboard/components/FilteredByTaskIdsBanner.d.ts.map +1 -0
  176. package/dist/features/curator/dashboard/components/FilteredByTaskIdsBanner.js +19 -0
  177. package/dist/features/curator/dashboard/components/FilteredByTaskIdsBanner.js.map +1 -0
  178. package/dist/features/entity/metadata-task/components/MetadataTasksPage.d.ts.map +1 -1
  179. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js +50 -47
  180. package/dist/features/entity/metadata-task/components/MetadataTasksPage.js.map +1 -1
  181. package/dist/mocks/chat/mockChat.d.ts +13 -1
  182. package/dist/mocks/chat/mockChat.d.ts.map +1 -1
  183. package/dist/mocks/chat/mockChat.js +34 -9
  184. package/dist/mocks/chat/mockChat.js.map +1 -1
  185. package/dist/mocks/msw/handlers/chatHandlers.d.ts +1 -1
  186. package/dist/mocks/msw/handlers/chatHandlers.d.ts.map +1 -1
  187. package/dist/mocks/msw/handlers/chatHandlers.js +21 -7
  188. package/dist/mocks/msw/handlers/chatHandlers.js.map +1 -1
  189. package/dist/synapse-client/SynapseClient.d.ts +2 -2
  190. package/dist/synapse-client/SynapseClient.d.ts.map +1 -1
  191. package/dist/synapse-client/SynapseClient.js.map +1 -1
  192. package/dist/synapse-queries/KeyFactory.d.ts +10 -1
  193. package/dist/synapse-queries/KeyFactory.d.ts.map +1 -1
  194. package/dist/synapse-queries/KeyFactory.js +29 -2
  195. package/dist/synapse-queries/KeyFactory.js.map +1 -1
  196. package/dist/synapse-queries/asynchronous/usePollAsynchronousJob.d.ts +2 -2
  197. package/dist/synapse-queries/asynchronous/usePollAsynchronousJob.d.ts.map +1 -1
  198. package/dist/synapse-queries/asynchronous/usePollAsynchronousJob.js +2 -1
  199. package/dist/synapse-queries/asynchronous/usePollAsynchronousJob.js.map +1 -1
  200. package/dist/synapse-queries/chat/useChat.d.ts +3 -2
  201. package/dist/synapse-queries/chat/useChat.d.ts.map +1 -1
  202. package/dist/synapse-queries/chat/useChat.js +7 -6
  203. package/dist/synapse-queries/chat/useChat.js.map +1 -1
  204. package/dist/synapse-queries/dataaccess/index.d.ts +1 -0
  205. package/dist/synapse-queries/dataaccess/index.d.ts.map +1 -1
  206. package/dist/synapse-queries/dataaccess/index.js +4 -3
  207. package/dist/synapse-queries/dataaccess/useEDuc.d.ts +44 -0
  208. package/dist/synapse-queries/dataaccess/useEDuc.d.ts.map +1 -0
  209. package/dist/synapse-queries/dataaccess/useEDuc.js +75 -0
  210. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -0
  211. package/dist/synapse-queries/featureflags/useGetFeatureFlag.d.ts.map +1 -1
  212. package/dist/synapse-queries/featureflags/useGetFeatureFlag.js +1 -1
  213. package/dist/synapse-queries/featureflags/useGetFeatureFlag.js.map +1 -1
  214. package/dist/synapse-queries/file/useDirectUploadToS3.js +6 -6
  215. package/dist/synapse-queries/index.js +181 -172
  216. package/dist/tsconfig.build.tsbuildinfo +1 -1
  217. package/dist/utils/SynapseConstants.d.ts +3 -0
  218. package/dist/utils/SynapseConstants.d.ts.map +1 -1
  219. package/dist/utils/SynapseConstants.js +122 -119
  220. package/dist/utils/SynapseConstants.js.map +1 -1
  221. package/dist/utils/featureflag/FeatureFlags.d.ts +3 -1
  222. package/dist/utils/featureflag/FeatureFlags.d.ts.map +1 -1
  223. package/dist/utils/featureflag/FeatureFlags.js +1 -1
  224. package/dist/utils/featureflag/FeatureFlags.js.map +1 -1
  225. package/dist/utils/hooks/useCurationTaskListFilters.d.ts +36 -0
  226. package/dist/utils/hooks/useCurationTaskListFilters.d.ts.map +1 -0
  227. package/dist/utils/hooks/useCurationTaskListFilters.js +42 -0
  228. package/dist/utils/hooks/useCurationTaskListFilters.js.map +1 -0
  229. package/dist/utils/hooks/useUploadFileEntity/useUploadFileEntities.js +5 -5
  230. package/dist/utils/hooks/useUploadFileEntity/useUploadFiles.js +14 -14
  231. package/package.json +4 -4
@@ -22,6 +22,9 @@ export type DropdownMenuProps = {
22
22
  variant?: ButtonProps['variant'];
23
23
  convertSingleItemToButton?: boolean;
24
24
  renderMenuIfNoItems?: boolean;
25
+ paperSx?: SxProps;
26
+ elevation?: number;
27
+ showFileAccessRequestNotice?: boolean;
25
28
  };
26
29
  /**
27
30
  * The DropdownMenu component provides a generic way to compose a MUI dropdown menu.
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAUX,OAAO,EAGR,MAAM,eAAe,CAAA;AACtB,OAAO,EAEL,UAAU,EAKX,MAAM,OAAO,CAAA;AACd,OAAgB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAEtD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAE7B,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAEjC,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAE9B,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAA;IAE3B,kBAAkB,EAAE,MAAM,CAAA;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAEhC,yBAAyB,CAAC,EAAE,OAAO,CAAA;IAEnC,mBAAmB,CAAC,EAAE,OAAO,CAAA;CAC9B,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,kDA4MpD"}
1
+ {"version":3,"file":"DropdownMenu.d.ts","sourceRoot":"","sources":["../../../src/components/menu/DropdownMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,WAAW,EAUX,OAAO,EAIR,MAAM,eAAe,CAAA;AACtB,OAAO,EAEL,UAAU,EAKX,MAAM,OAAO,CAAA;AACd,OAAgB,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAiCtD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAE7B,IAAI,EAAE,MAAM,CAAA;IAEZ,IAAI,CAAC,EAAE,QAAQ,CAAA;IAEf,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,UAAU,KAAK,IAAI,CAAA;IAEjC,IAAI,CAAC,EAAE,MAAM,CAAA;IAEb,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,iBAAiB,GAAG;IAE9B,KAAK,EAAE,gBAAgB,EAAE,EAAE,CAAA;IAE3B,kBAAkB,EAAE,MAAM,CAAA;IAE1B,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB,WAAW,CAAC,EAAE,WAAW,CAAA;IAEzB,OAAO,CAAC,EAAE,WAAW,CAAC,SAAS,CAAC,CAAA;IAEhC,yBAAyB,CAAC,EAAE,OAAO,CAAA;IAEnC,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;IAElB,2BAA2B,CAAC,EAAE,OAAO,CAAA;CACtC,CAAA;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,kDAuNpD"}
@@ -1,121 +1,146 @@
1
1
  import e from "../IconSvg/IconSvg.js";
2
2
  import { useId as t, useRef as n, useState as r } from "react";
3
- import { Button as i, ClickAwayListener as a, Divider as o, Fade as s, ListItemIcon as c, ListItemText as l, MenuItem as u, MenuList as d, Paper as f, Popper as p, Tooltip as m, Typography as h } from "@mui/material";
4
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
3
+ import { Box as i, Button as a, ClickAwayListener as o, Divider as s, Fade as c, ListItemIcon as l, ListItemText as u, MenuItem as d, MenuList as f, Paper as p, Popper as m, Tooltip as h, Typography as g } from "@mui/material";
4
+ import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
5
5
  //#region src/components/menu/DropdownMenu.tsx
6
- function y(y) {
7
- let { buttonTooltip: b, dropdownButtonText: x, items: S = [], convertSingleItemToButton: C = !0, renderMenuIfNoItems: w = !1, buttonProps: T = {}, variant: E = "outlined" } = y, D = t(), [O, k] = r(!1), A = n(null), j = S.flat().length;
8
- if (!w && j === 0) return null;
9
- if (C && j === 1) {
10
- let t = S.flat()[0];
11
- return /* @__PURE__ */ _(i, {
6
+ var b = /* @__PURE__ */ v(i, {
7
+ sx: {
8
+ backgroundColor: "#EAF0F5",
9
+ color: "#3B4046",
10
+ padding: "6px 8px",
11
+ borderRadius: "3px",
12
+ marginTop: "8px"
13
+ },
14
+ children: /* @__PURE__ */ y(g, {
15
+ sx: {
16
+ fontSize: "14px",
17
+ fontWeight: "440",
18
+ lineHeight: "20px",
19
+ letterSpacing: "-0.07px"
20
+ },
21
+ children: [/* @__PURE__ */ y("span", {
22
+ style: { fontWeight: "700" },
23
+ children: ["Note:", " "]
24
+ }), "You can add this file to your download list, but you must make an access request before downloading."]
25
+ })
26
+ });
27
+ function x(x) {
28
+ let { buttonTooltip: S, dropdownButtonText: C, items: w = [], convertSingleItemToButton: T = !0, renderMenuIfNoItems: E = !1, buttonProps: D = {}, variant: O = "outlined", paperSx: k, elevation: A, showFileAccessRequestNotice: j = !1 } = x, M = t(), [N, P] = r(!1), F = n(null), I = w.flat().length;
29
+ if (!E && I === 0) return null;
30
+ if (T && I === 1) {
31
+ let t = w.flat()[0];
32
+ return /* @__PURE__ */ v(a, {
12
33
  component: "href" in t ? "a" : "button",
13
34
  title: t.tooltipText,
14
- variant: E,
35
+ variant: O,
15
36
  href: "href" in t ? t.href : void 0,
16
37
  rel: "href" in t ? "noopener noreferrer" : void 0,
17
38
  onClick: "onClick" in t ? t.onClick : void 0,
18
39
  disabled: t.disabled,
19
- endIcon: t.icon && /* @__PURE__ */ _(e, {
40
+ endIcon: t.icon && /* @__PURE__ */ v(e, {
20
41
  icon: t.icon,
21
42
  wrap: !1
22
43
  }),
23
- children: /* @__PURE__ */ _(h, {
44
+ children: /* @__PURE__ */ v(g, {
24
45
  variant: "buttonLink",
25
46
  children: t.text
26
47
  })
27
48
  });
28
49
  }
29
- let M = () => {
30
- k((e) => !e);
31
- }, N = (e) => {
32
- A.current && A.current.contains(e.target) || k(!1);
50
+ let L = () => {
51
+ P((e) => !e);
52
+ }, R = (e) => {
53
+ F.current && F.current.contains(e.target) || P(!1);
33
54
  };
34
- function P(e) {
35
- e.key === "Tab" ? (e.preventDefault(), k(!1)) : e.key === "Escape" && k(!1);
55
+ function z(e) {
56
+ e.key === "Tab" ? (e.preventDefault(), P(!1)) : e.key === "Escape" && P(!1);
36
57
  }
37
- return /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(m, {
38
- title: b ? /* @__PURE__ */ _("div", {
58
+ return /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(h, {
59
+ title: S ? /* @__PURE__ */ v("div", {
39
60
  style: { whiteSpace: "pre-line" },
40
- children: b
61
+ children: S
41
62
  }) : void 0,
42
63
  placement: "top",
43
- children: /* @__PURE__ */ _("span", { children: /* @__PURE__ */ _(i, {
44
- variant: E,
45
- ref: A,
46
- id: `composition-button-${D}`,
47
- "aria-controls": O ? `composition-menu-${D}` : void 0,
48
- "aria-expanded": O ? "true" : void 0,
64
+ children: /* @__PURE__ */ v("span", { children: /* @__PURE__ */ v(a, {
65
+ variant: O,
66
+ ref: F,
67
+ id: `composition-button-${M}`,
68
+ "aria-controls": N ? `composition-menu-${M}` : void 0,
69
+ "aria-expanded": N ? "true" : void 0,
49
70
  "aria-haspopup": "true",
50
- onClick: M,
51
- ...T,
52
- children: /* @__PURE__ */ _(h, {
71
+ onClick: L,
72
+ ...D,
73
+ children: /* @__PURE__ */ v(g, {
53
74
  variant: "buttonLink",
54
- children: x
75
+ children: C
55
76
  })
56
77
  }) })
57
- }), /* @__PURE__ */ _(p, {
58
- open: O,
59
- anchorEl: A.current,
78
+ }), /* @__PURE__ */ v(m, {
79
+ open: N,
80
+ anchorEl: F.current,
60
81
  role: void 0,
61
82
  placement: "bottom-end",
62
83
  transition: !0,
63
84
  style: { zIndex: 10 },
64
- children: ({ TransitionProps: t }) => /* @__PURE__ */ _(s, {
85
+ children: ({ TransitionProps: t }) => /* @__PURE__ */ v(c, {
65
86
  ...t,
66
- children: /* @__PURE__ */ _(f, { children: /* @__PURE__ */ _(a, {
67
- onClickAway: N,
68
- children: /* @__PURE__ */ _(d, {
69
- autoFocusItem: O,
70
- id: `composition-menu-${D}`,
71
- "aria-labelledby": `composition-button-${D}`,
72
- onKeyDown: P,
73
- children: S.map((t, n, r) => [t.map((t) => /* @__PURE__ */ _(m, {
74
- title: t.tooltipText,
75
- placement: "left",
76
- children: /* @__PURE__ */ v(u, {
77
- component: "a",
78
- sx: {
79
- "&:hover": { color: "unset" },
80
- "&:focus": {
81
- color: "unset",
82
- textDecoration: "unset"
83
- }
84
- },
85
- disabled: t.disabled,
86
- href: "href" in t ? t.href : void 0,
87
- rel: "href" in t ? "noopener noreferrer" : void 0,
88
- style: { pointerEvents: "auto" },
89
- onClick: (e) => {
90
- !t.disabled && "onClick" in t && t.onClick && (k(!1), t.onClick(e));
91
- },
92
- children: [/* @__PURE__ */ _(c, {
93
- style: { minWidth: "30px" },
94
- children: t.icon && /* @__PURE__ */ _(e, {
95
- icon: t.icon,
96
- sx: {
97
- width: "17px",
98
- height: "17px",
99
- ...t.iconSx
100
- },
101
- wrap: !1
102
- })
103
- }), /* @__PURE__ */ _(l, {
104
- sx: { marginTop: 0 },
105
- slotProps: { primary: {
106
- variant: "smallText1",
107
- sx: t.textSx
108
- } },
109
- children: t.text
110
- })]
111
- })
112
- }, t.text)), n < r.length - 1 && /* @__PURE__ */ _(o, {})])
87
+ children: /* @__PURE__ */ v(p, {
88
+ elevation: A,
89
+ sx: { ...k },
90
+ children: /* @__PURE__ */ v(o, {
91
+ onClickAway: R,
92
+ children: /* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(f, {
93
+ autoFocusItem: N,
94
+ id: `composition-menu-${M}`,
95
+ "aria-labelledby": `composition-button-${M}`,
96
+ onKeyDown: z,
97
+ children: w.map((t, n, r) => [t.map((t) => /* @__PURE__ */ v(h, {
98
+ title: t.tooltipText,
99
+ placement: "left",
100
+ children: /* @__PURE__ */ y(d, {
101
+ component: "a",
102
+ sx: {
103
+ "&:hover": { color: "unset" },
104
+ "&:focus": {
105
+ color: "unset",
106
+ textDecoration: "unset"
107
+ }
108
+ },
109
+ disabled: t.disabled,
110
+ href: "href" in t ? t.href : void 0,
111
+ rel: "href" in t ? "noopener noreferrer" : void 0,
112
+ style: { pointerEvents: "auto" },
113
+ onClick: (e) => {
114
+ !t.disabled && "onClick" in t && t.onClick && (P(!1), t.onClick(e));
115
+ },
116
+ children: [t.icon && /* @__PURE__ */ v(l, {
117
+ style: { minWidth: "30px" },
118
+ children: /* @__PURE__ */ v(e, {
119
+ icon: t.icon,
120
+ sx: {
121
+ width: "17px",
122
+ height: "17px",
123
+ ...t.iconSx
124
+ },
125
+ wrap: !1
126
+ })
127
+ }), /* @__PURE__ */ v(u, {
128
+ sx: { marginTop: 0 },
129
+ slotProps: { primary: {
130
+ variant: "smallText1",
131
+ sx: t.textSx
132
+ } },
133
+ children: t.text
134
+ })]
135
+ })
136
+ }, t.text)), n < r.length - 1 && /* @__PURE__ */ v(s, {})])
137
+ }), j && /* @__PURE__ */ y(_, { children: [I > 0 && /* @__PURE__ */ v(s, {}), b] })] })
113
138
  })
114
- }) })
139
+ })
115
140
  })
116
141
  })] });
117
142
  }
118
143
  //#endregion
119
- export { y as DropdownMenu };
144
+ export { x as DropdownMenu };
120
145
 
121
146
  //# sourceMappingURL=DropdownMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","names":[],"sources":["../../../src/components/menu/DropdownMenu.tsx"],"sourcesContent":["import {\n Button,\n ButtonProps,\n ClickAwayListener,\n Divider,\n Fade,\n ListItemIcon,\n ListItemText,\n MenuItem,\n MenuList,\n Paper,\n Popper,\n SxProps,\n Tooltip,\n Typography,\n} from '@mui/material'\nimport {\n KeyboardEvent,\n MouseEvent,\n SyntheticEvent,\n useId,\n useRef,\n useState,\n} from 'react'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\n/**\n * Defines a configuration for a particular dropdown menu item\n */\nexport type DropdownMenuItem = {\n /* The text to show on the menu item. */\n text: string\n /* The icon to show for this item in the menu. */\n icon?: IconName\n /* A function invoked upon clicking the item, assuming `disabled` is falsy */\n onClick?: (e: MouseEvent) => void\n /* A link that the item should point to. */\n href?: string\n /* The optional tooltipText to show for this item. Compatible with the `disabled` prop. */\n tooltipText?: string\n /* Whether the item should be disabled from selection. */\n disabled?: boolean\n /* Additional MUI SxProps to pass to the text component */\n textSx?: SxProps\n /* Additional MUI SxProps to pass to the icon component */\n iconSx?: SxProps\n}\n\nexport type DropdownMenuProps = {\n /* Groups of menu items. Each group will be split with a divider. See DropdownMenuItem for per-item configuration */\n items: DropdownMenuItem[][]\n /* The text to show on the dropdown menu button. */\n dropdownButtonText: string\n /* The optional tooltip text for the dropdown menu button. */\n buttonTooltip?: string\n /* Any additional props to pass to the dropdown menu button. */\n buttonProps?: ButtonProps\n /* Optional MUI button variant for the dropdown button (and the single-item button). Default 'outlined'. */\n variant?: ButtonProps['variant']\n /* If true, will render a single action as a standalone button. Default true. */\n convertSingleItemToButton?: boolean\n /* If true, nothing will be rendered if no actions are passed. Default false. */\n renderMenuIfNoItems?: boolean\n}\n\n/**\n * The DropdownMenu component provides a generic way to compose a MUI dropdown menu.\n */\nexport function DropdownMenu(props: DropdownMenuProps) {\n const {\n buttonTooltip,\n dropdownButtonText,\n items = [] as DropdownMenuItem[][],\n convertSingleItemToButton = true,\n renderMenuIfNoItems = false,\n buttonProps = {},\n variant = 'outlined',\n } = props\n\n const dropdownMenuId = useId()\n const [open, setOpen] = useState(false)\n const anchorRef = useRef<HTMLButtonElement>(null)\n\n const numberOfMenuItems = items.flat().length\n\n if (!renderMenuIfNoItems && numberOfMenuItems === 0) {\n // Hide menu if no actions will be in the menu\n return null\n }\n\n if (convertSingleItemToButton && numberOfMenuItems === 1) {\n // If one action is in the menu, show it as a button\n const menuItem = items.flat()[0]\n return (\n <Button\n component={'href' in menuItem ? 'a' : 'button'}\n title={menuItem.tooltipText}\n variant={variant}\n href={'href' in menuItem ? menuItem.href : undefined}\n rel={'href' in menuItem ? 'noopener noreferrer' : undefined}\n onClick={'onClick' in menuItem ? menuItem.onClick : undefined}\n disabled={menuItem.disabled}\n endIcon={menuItem.icon && <IconSvg icon={menuItem.icon} wrap={false} />}\n >\n <Typography variant={'buttonLink'}>{menuItem.text}</Typography>\n </Button>\n )\n }\n\n const handleToggle = () => {\n setOpen(prevOpen => !prevOpen)\n }\n\n const handleClose = (event: Event | SyntheticEvent) => {\n if (\n anchorRef.current &&\n anchorRef.current.contains(event.target as HTMLElement)\n ) {\n return\n }\n\n setOpen(false)\n }\n\n function handleListKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n event.preventDefault()\n setOpen(false)\n } else if (event.key === 'Escape') {\n setOpen(false)\n }\n }\n\n return (\n <>\n <Tooltip\n title={\n buttonTooltip ? (\n <div style={{ whiteSpace: 'pre-line' }}>{buttonTooltip}</div>\n ) : undefined\n }\n placement={'top'}\n >\n <span>\n <Button\n variant={variant}\n ref={anchorRef}\n id={`composition-button-${dropdownMenuId}`}\n aria-controls={\n open ? `composition-menu-${dropdownMenuId}` : undefined\n }\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup=\"true\"\n onClick={handleToggle}\n {...buttonProps}\n >\n <Typography variant={'buttonLink'}>{dropdownButtonText}</Typography>\n </Button>\n </span>\n </Tooltip>\n <Popper\n open={open}\n anchorEl={anchorRef.current}\n role={undefined}\n placement=\"bottom-end\"\n transition\n style={{\n // Fixes issue where react-flow (provenance) would appear above the menu\n zIndex: 10,\n }}\n >\n {({ TransitionProps }) => (\n <Fade {...TransitionProps}>\n <Paper>\n <ClickAwayListener onClickAway={handleClose}>\n <MenuList\n autoFocusItem={open}\n id={`composition-menu-${dropdownMenuId}`}\n aria-labelledby={`composition-button-${dropdownMenuId}`}\n onKeyDown={handleListKeyDown}\n >\n {items.map((itemGroup, index, array) => {\n return [\n itemGroup.map(item => {\n return (\n <Tooltip\n key={item.text}\n title={item.tooltipText}\n placement={'left'}\n >\n <MenuItem\n // Always make the component an anchor in case href is defined.\n component=\"a\"\n sx={{\n // Override the anchor-specific state styles, we don't want it to look like an anchor\n '&:hover': {\n color: 'unset',\n },\n '&:focus': {\n color: 'unset',\n textDecoration: 'unset',\n },\n }}\n disabled={item.disabled}\n href={'href' in item ? item.href : undefined}\n rel={\n 'href' in item\n ? 'noopener noreferrer'\n : undefined\n }\n // Allow pointer events on disabled item so tooltip works.\n style={{ pointerEvents: 'auto' }}\n onClick={(e: MouseEvent) => {\n /*\n * Must check if the item is disabled because we set\n * `pointer-events: 'auto'`\n */\n if (\n !item.disabled &&\n 'onClick' in item &&\n item.onClick\n ) {\n setOpen(false)\n item.onClick(e)\n }\n }}\n >\n <ListItemIcon\n style={{\n // MUI has specified a more specific minWidth for ListItemIcon inside a MenuList than\n // we can create with sx, so apply an inline style for this property only.\n minWidth: '30px',\n }}\n >\n {item.icon && (\n <IconSvg\n icon={item.icon}\n sx={{\n width: '17px',\n height: '17px',\n ...item.iconSx,\n }}\n wrap={false}\n />\n )}\n </ListItemIcon>\n <ListItemText\n sx={{ marginTop: 0 }}\n slotProps={{\n primary: {\n variant: 'smallText1',\n sx: item.textSx,\n },\n }}\n >\n {item.text}\n </ListItemText>\n </MenuItem>\n </Tooltip>\n )\n }),\n index < array.length - 1 && <Divider />,\n ]\n })}\n </MenuList>\n </ClickAwayListener>\n </Paper>\n </Fade>\n )}\n </Popper>\n </>\n )\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"DropdownMenu.js","names":[],"sources":["../../../src/components/menu/DropdownMenu.tsx"],"sourcesContent":["import {\n Button,\n ButtonProps,\n ClickAwayListener,\n Divider,\n Fade,\n ListItemIcon,\n ListItemText,\n MenuItem,\n MenuList,\n Paper,\n Popper,\n SxProps,\n Tooltip,\n Typography,\n Box,\n} from '@mui/material'\nimport {\n KeyboardEvent,\n MouseEvent,\n SyntheticEvent,\n useId,\n useRef,\n useState,\n} from 'react'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\nconst fileAccessRequestNotice = (\n <Box\n sx={{\n backgroundColor: '#EAF0F5',\n color: '#3B4046',\n padding: '6px 8px',\n borderRadius: '3px',\n marginTop: '8px',\n }}\n >\n <Typography\n sx={{\n fontSize: '14px',\n fontWeight: '440',\n lineHeight: '20px',\n letterSpacing: '-0.07px',\n }}\n >\n <span\n style={{\n fontWeight: '700',\n }}\n >\n Note:{' '}\n </span>\n You can add this file to your download list, but you must make an access\n request before downloading.\n </Typography>\n </Box>\n)\n\n/**\n * Defines a configuration for a particular dropdown menu item\n */\nexport type DropdownMenuItem = {\n /* The text to show on the menu item. */\n text: string\n /* The icon to show for this item in the menu. */\n icon?: IconName\n /* A function invoked upon clicking the item, assuming `disabled` is falsy */\n onClick?: (e: MouseEvent) => void\n /* A link that the item should point to. */\n href?: string\n /* The optional tooltipText to show for this item. Compatible with the `disabled` prop. */\n tooltipText?: string\n /* Whether the item should be disabled from selection. */\n disabled?: boolean\n /* Additional MUI SxProps to pass to the text component */\n textSx?: SxProps\n /* Additional MUI SxProps to pass to the icon component */\n iconSx?: SxProps\n}\n\nexport type DropdownMenuProps = {\n /* Groups of menu items. Each group will be split with a divider. See DropdownMenuItem for per-item configuration */\n items: DropdownMenuItem[][]\n /* The text to show on the dropdown menu button. */\n dropdownButtonText: string\n /* The optional tooltip text for the dropdown menu button. */\n buttonTooltip?: string\n /* Any additional props to pass to the dropdown menu button. */\n buttonProps?: ButtonProps\n /* Optional MUI button variant for the dropdown button (and the single-item button). Default 'outlined'. */\n variant?: ButtonProps['variant']\n /* If true, will render a single action as a standalone button. Default true. */\n convertSingleItemToButton?: boolean\n /* If true, nothing will be rendered if no actions are passed. Default false. */\n renderMenuIfNoItems?: boolean\n paperSx?: SxProps\n elevation?: number\n /* If true, shows the file access request notice at the bottom of the menu. Default false. */\n showFileAccessRequestNotice?: boolean\n}\n\n/**\n * The DropdownMenu component provides a generic way to compose a MUI dropdown menu.\n */\nexport function DropdownMenu(props: DropdownMenuProps) {\n const {\n buttonTooltip,\n dropdownButtonText,\n items = [] as DropdownMenuItem[][],\n convertSingleItemToButton = true,\n renderMenuIfNoItems = false,\n buttonProps = {},\n variant = 'outlined',\n paperSx,\n elevation,\n showFileAccessRequestNotice = false,\n } = props\n\n const dropdownMenuId = useId()\n const [open, setOpen] = useState(false)\n const anchorRef = useRef<HTMLButtonElement>(null)\n\n const numberOfMenuItems = items.flat().length\n\n if (!renderMenuIfNoItems && numberOfMenuItems === 0) {\n // Hide menu if no actions will be in the menu\n return null\n }\n\n if (convertSingleItemToButton && numberOfMenuItems === 1) {\n // If one action is in the menu, show it as a button\n const menuItem = items.flat()[0]\n return (\n <Button\n component={'href' in menuItem ? 'a' : 'button'}\n title={menuItem.tooltipText}\n variant={variant}\n href={'href' in menuItem ? menuItem.href : undefined}\n rel={'href' in menuItem ? 'noopener noreferrer' : undefined}\n onClick={'onClick' in menuItem ? menuItem.onClick : undefined}\n disabled={menuItem.disabled}\n endIcon={menuItem.icon && <IconSvg icon={menuItem.icon} wrap={false} />}\n >\n <Typography variant={'buttonLink'}>{menuItem.text}</Typography>\n </Button>\n )\n }\n\n const handleToggle = () => {\n setOpen(prevOpen => !prevOpen)\n }\n\n const handleClose = (event: Event | SyntheticEvent) => {\n if (\n anchorRef.current &&\n anchorRef.current.contains(event.target as HTMLElement)\n ) {\n return\n }\n\n setOpen(false)\n }\n\n function handleListKeyDown(event: KeyboardEvent) {\n if (event.key === 'Tab') {\n event.preventDefault()\n setOpen(false)\n } else if (event.key === 'Escape') {\n setOpen(false)\n }\n }\n\n return (\n <>\n <Tooltip\n title={\n buttonTooltip ? (\n <div style={{ whiteSpace: 'pre-line' }}>{buttonTooltip}</div>\n ) : undefined\n }\n placement={'top'}\n >\n <span>\n <Button\n variant={variant}\n ref={anchorRef}\n id={`composition-button-${dropdownMenuId}`}\n aria-controls={\n open ? `composition-menu-${dropdownMenuId}` : undefined\n }\n aria-expanded={open ? 'true' : undefined}\n aria-haspopup=\"true\"\n onClick={handleToggle}\n {...buttonProps}\n >\n <Typography variant={'buttonLink'}>{dropdownButtonText}</Typography>\n </Button>\n </span>\n </Tooltip>\n <Popper\n open={open}\n anchorEl={anchorRef.current}\n role={undefined}\n placement=\"bottom-end\"\n transition\n style={{\n // Fixes issue where react-flow (provenance) would appear above the menu\n zIndex: 10,\n }}\n >\n {({ TransitionProps }) => (\n <Fade {...TransitionProps}>\n <Paper elevation={elevation} sx={{ ...paperSx }}>\n <ClickAwayListener onClickAway={handleClose}>\n <Box>\n <MenuList\n autoFocusItem={open}\n id={`composition-menu-${dropdownMenuId}`}\n aria-labelledby={`composition-button-${dropdownMenuId}`}\n onKeyDown={handleListKeyDown}\n >\n {items.map((itemGroup, index, array) => {\n return [\n itemGroup.map(item => {\n return (\n <Tooltip\n key={item.text}\n title={item.tooltipText}\n placement={'left'}\n >\n <MenuItem\n // Always make the component an anchor in case href is defined.\n component=\"a\"\n sx={{\n // Override the anchor-specific state styles, we don't want it to look like an anchor\n '&:hover': {\n color: 'unset',\n },\n '&:focus': {\n color: 'unset',\n textDecoration: 'unset',\n },\n }}\n disabled={item.disabled}\n href={'href' in item ? item.href : undefined}\n rel={\n 'href' in item\n ? 'noopener noreferrer'\n : undefined\n }\n // Allow pointer events on disabled item so tooltip works.\n style={{ pointerEvents: 'auto' }}\n onClick={(e: MouseEvent) => {\n /*\n * Must check if the item is disabled because we set\n * `pointer-events: 'auto'`\n */\n if (\n !item.disabled &&\n 'onClick' in item &&\n item.onClick\n ) {\n setOpen(false)\n item.onClick(e)\n }\n }}\n >\n {item.icon && (\n <ListItemIcon\n style={{\n // MUI has specified a more specific minWidth for ListItemIcon inside a MenuList than\n // we can create with sx, so apply an inline style for this property only.\n minWidth: '30px',\n }}\n >\n <IconSvg\n icon={item.icon}\n sx={{\n width: '17px',\n height: '17px',\n ...item.iconSx,\n }}\n wrap={false}\n />\n </ListItemIcon>\n )}\n <ListItemText\n sx={{ marginTop: 0 }}\n slotProps={{\n primary: {\n variant: 'smallText1',\n sx: item.textSx,\n },\n }}\n >\n {item.text}\n </ListItemText>\n </MenuItem>\n </Tooltip>\n )\n }),\n index < array.length - 1 && <Divider />,\n ]\n })}\n </MenuList>\n {showFileAccessRequestNotice && (\n <>\n {numberOfMenuItems > 0 && <Divider />}\n {fileAccessRequestNotice}\n </>\n )}\n </Box>\n </ClickAwayListener>\n </Paper>\n </Fade>\n )}\n </Popper>\n </>\n )\n}\n"],"mappings":";;;;;AA2BA,IAAM,IACJ,kBAAC,GAAD;CACE,IAAI;EACF,iBAAiB;EACjB,OAAO;EACP,SAAS;EACT,cAAc;EACd,WAAW;CACb;WAEA,kBAAC,GAAD;EACE,IAAI;GACF,UAAU;GACV,YAAY;GACZ,YAAY;GACZ,eAAe;EACjB;YANF,CAQE,kBAAC,QAAD;GACE,OAAO,EACL,YAAY,MACd;aAHF,CAIC,SACO,GACF;MAAC,sGAGG;;AACT,CAAA;AAiDP,SAAgB,EAAa,GAA0B;CACrD,IAAM,EACJ,kBACA,uBACA,WAAQ,CAAC,GACT,+BAA4B,IAC5B,yBAAsB,IACtB,iBAAc,CAAC,GACf,aAAU,YACV,YACA,cACA,iCAA8B,OAC5B,GAEE,IAAiB,EAAM,GACvB,CAAC,GAAM,KAAW,EAAS,EAAK,GAChC,IAAY,EAA0B,IAAI,GAE1C,IAAoB,EAAM,KAAK,EAAE;CAEvC,IAAI,CAAC,KAAuB,MAAsB,GAEhD,OAAO;CAGT,IAAI,KAA6B,MAAsB,GAAG;EAExD,IAAM,IAAW,EAAM,KAAK,EAAE;EAC9B,OACE,kBAAC,GAAD;GACE,WAAW,UAAU,IAAW,MAAM;GACtC,OAAO,EAAS;GACP;GACT,MAAM,UAAU,IAAW,EAAS,OAAO,KAAA;GAC3C,KAAK,UAAU,IAAW,wBAAwB,KAAA;GAClD,SAAS,aAAa,IAAW,EAAS,UAAU,KAAA;GACpD,UAAU,EAAS;GACnB,SAAS,EAAS,QAAQ,kBAAC,GAAD;IAAS,MAAM,EAAS;IAAM,MAAM;GAAQ,CAAA;aAEtE,kBAAC,GAAD;IAAY,SAAS;cAAe,EAAS;GAAiB,CAAA;EACxD,CAAA;CAEZ;CAEA,IAAM,UAAqB;EACzB,GAAQ,MAAY,CAAC,CAAQ;CAC/B,GAEM,KAAe,MAAkC;EAEnD,EAAU,WACV,EAAU,QAAQ,SAAS,EAAM,MAAqB,KAKxD,EAAQ,EAAK;CACf;CAEA,SAAS,EAAkB,GAAsB;EAC/C,AAAI,EAAM,QAAQ,SAChB,EAAM,eAAe,GACrB,EAAQ,EAAK,KACJ,EAAM,QAAQ,YACvB,EAAQ,EAAK;CAEjB;CAEA,OACE,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACE,OACE,IACE,kBAAC,OAAD;GAAK,OAAO,EAAE,YAAY,WAAW;aAAI;EAAmB,CAAA,IAC1D,KAAA;EAEN,WAAW;YAEX,kBAAC,QAAD,EAAA,UACE,kBAAC,GAAD;GACW;GACT,KAAK;GACL,IAAI,sBAAsB;GAC1B,iBACE,IAAO,oBAAoB,MAAmB,KAAA;GAEhD,iBAAe,IAAO,SAAS,KAAA;GAC/B,iBAAc;GACd,SAAS;GACT,GAAI;aAEJ,kBAAC,GAAD;IAAY,SAAS;cAAe;GAA+B,CAAA;EAC7D,CAAA,EACJ,CAAA;CACC,CAAA,GACT,kBAAC,GAAD;EACQ;EACN,UAAU,EAAU;EACpB,MAAM,KAAA;EACN,WAAU;EACV,YAAA;EACA,OAAO,EAEL,QAAQ,GACV;aAEE,EAAE,yBACF,kBAAC,GAAD;GAAM,GAAI;aACR,kBAAC,GAAD;IAAkB;IAAW,IAAI,EAAE,GAAG,EAAQ;cAC5C,kBAAC,GAAD;KAAmB,aAAa;eAC9B,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,GAAD;MACE,eAAe;MACf,IAAI,oBAAoB;MACxB,mBAAiB,sBAAsB;MACvC,WAAW;gBAEV,EAAM,KAAK,GAAW,GAAO,MACrB,CACL,EAAU,KAAI,MAEV,kBAAC,GAAD;OAEE,OAAO,EAAK;OACZ,WAAW;iBAEX,kBAAC,GAAD;QAEE,WAAU;QACV,IAAI;SAEF,WAAW,EACT,OAAO,QACT;SACA,WAAW;UACT,OAAO;UACP,gBAAgB;SAClB;QACF;QACA,UAAU,EAAK;QACf,MAAM,UAAU,IAAO,EAAK,OAAO,KAAA;QACnC,KACE,UAAU,IACN,wBACA,KAAA;QAGN,OAAO,EAAE,eAAe,OAAO;QAC/B,UAAU,MAAkB;SAK1B,AACE,CAAC,EAAK,YACN,aAAa,KACb,EAAK,YAEL,EAAQ,EAAK,GACb,EAAK,QAAQ,CAAC;QAElB;kBAnCF,CAqCG,EAAK,QACJ,kBAAC,GAAD;SACE,OAAO,EAGL,UAAU,OACZ;mBAEA,kBAAC,GAAD;UACE,MAAM,EAAK;UACX,IAAI;WACF,OAAO;WACP,QAAQ;WACR,GAAG,EAAK;UACV;UACA,MAAM;SACP,CAAA;QACW,CAAA,GAEhB,kBAAC,GAAD;SACE,IAAI,EAAE,WAAW,EAAE;SACnB,WAAW,EACT,SAAS;UACP,SAAS;UACT,IAAI,EAAK;SACX,EACF;mBAEC,EAAK;QACM,CAAA,CACN;;MACH,GAxEF,EAAK,IAwEH,CAEZ,GACD,IAAQ,EAAM,SAAS,KAAK,kBAAC,GAAD,CAAU,CAAA,CACxC,CACD;KACO,CAAA,GACT,KACC,kBAAA,GAAA,EAAA,UAAA,CACG,IAAoB,KAAK,kBAAC,GAAD,CAAU,CAAA,GACnC,CACD,EAAA,CAAA,CAED,EAAA,CAAA;IACY,CAAA;GACd,CAAA;EACH,CAAA;CAEF,CAAA,CACR,EAAA,CAAA;AAEN"}
@@ -1 +1 @@
1
- {"version":3,"file":"CuratorDashboard.d.ts","sourceRoot":"","sources":["../../../../src/features/curator/dashboard/CuratorDashboard.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,uBAAuB,4CAmD9C"}
1
+ {"version":3,"file":"CuratorDashboard.d.ts","sourceRoot":"","sources":["../../../../src/features/curator/dashboard/CuratorDashboard.tsx"],"names":[],"mappings":"AAWA,MAAM,CAAC,OAAO,UAAU,uBAAuB,4CA0C9C"}
@@ -1,40 +1,39 @@
1
- import { GRID_PAGE_TASK_ID_QUERY_PARAM as e } from "../../../utils/SynapseConstants.js";
2
- import t from "../../../components/layout/InfiniteTableLayout.js";
1
+ import e from "../../../components/layout/InfiniteTableLayout.js";
2
+ import { useCurationTaskListFilters as t } from "../../../utils/hooks/useCurationTaskListFilters.js";
3
3
  import { useGetCurationTasksInfinite as n } from "../../../synapse-queries/curation/task/useCurationTask.js";
4
4
  import r from "../../team/invitation/components/OpenInvitationsToUserCard.js";
5
5
  import i from "./components/shared.module.js";
6
6
  import a from "./components/CurationTaskCard.js";
7
- import { useMemo as o } from "react";
8
- import { Typography as s } from "@mui/material";
9
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
10
- import { useSearchParams as u } from "react-router";
7
+ import o from "./components/FilteredByTaskIdsBanner.js";
8
+ import { useMemo as s } from "react";
9
+ import { Typography as c } from "@mui/material";
10
+ import { jsx as l, jsxs as u } from "react/jsx-runtime";
11
11
  import d from "@mui/material/Stack";
12
12
  //#region src/features/curator/dashboard/CuratorDashboard.tsx
13
13
  function f() {
14
- let [f] = u(), p = f.get(e), { data: m, isLoading: h, hasNextPage: g, isFetchingNextPage: _, fetchNextPage: v } = n({
15
- assignedToMe: !0,
16
- taskIds: o(() => {
17
- if (p) return p.split(",").map((e) => parseInt(e, 10)).filter((e) => !isNaN(e));
18
- }, [p])
19
- }), y = o(() => m?.pages.flatMap((e) => e.bundlePage ?? []) ?? [], [m]);
20
- return /* @__PURE__ */ l(d, {
14
+ let { request: f, taskIds: p, clearTaskIdsFilter: m } = t({ defaultAssignedToMe: !0 }), { data: h, isLoading: g, hasNextPage: _, isFetchingNextPage: v, fetchNextPage: y } = n(f), b = s(() => h?.pages.flatMap((e) => e.bundlePage ?? []) ?? [], [h]);
15
+ return /* @__PURE__ */ u(d, {
21
16
  gap: 4,
22
17
  children: [
23
- /* @__PURE__ */ c(s, {
18
+ /* @__PURE__ */ l(c, {
24
19
  variant: "headline1",
25
20
  children: "On Your Radar"
26
21
  }),
27
- /* @__PURE__ */ c(r, { cardProps: { className: i.card } }),
28
- /* @__PURE__ */ c(t, {
29
- table: /* @__PURE__ */ c(d, {
22
+ /* @__PURE__ */ l(r, { cardProps: { className: i.card } }),
23
+ /* @__PURE__ */ l(o, {
24
+ taskIds: p,
25
+ onClear: m
26
+ }),
27
+ /* @__PURE__ */ l(e, {
28
+ table: /* @__PURE__ */ l(d, {
30
29
  gap: 3,
31
- children: y.map((e) => /* @__PURE__ */ c(a, { taskBundle: e }, e.task?.taskId))
30
+ children: b.map((e) => /* @__PURE__ */ l(a, { taskBundle: e }, e.task?.taskId))
32
31
  }),
33
- isLoading: h,
34
- isEmpty: y.length === 0,
35
- hasNextPage: g,
36
- isFetchingNextPage: _,
37
- onFetchNextPageClicked: () => void v(),
32
+ isLoading: g,
33
+ isEmpty: b.length === 0,
34
+ hasNextPage: _,
35
+ isFetchingNextPage: v,
36
+ onFetchNextPageClicked: () => void y(),
38
37
  noResults: "There are currently no curation tasks assigned to you."
39
38
  })
40
39
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"CuratorDashboard.js","names":[],"sources":["../../../../src/features/curator/dashboard/CuratorDashboard.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport OpenInvitationsToUserCard from '@/features/team/invitation/components/OpenInvitationsToUserCard'\nimport { useGetCurationTasksInfinite } from '@/synapse-queries/curation/task/useCurationTask'\nimport { Typography } from '@mui/material'\nimport Stack from '@mui/material/Stack'\nimport { useMemo } from 'react'\nimport CurationTaskCard from './components/CurationTaskCard'\nimport sharedStyles from './components/shared.module.scss'\nimport { useSearchParams } from 'react-router'\nimport { GRID_PAGE_TASK_ID_QUERY_PARAM } from '@/utils/SynapseConstants'\n\nexport default function CuratorDashboardContent() {\n const [searchParams] = useSearchParams()\n const taskIdParam = searchParams.get(GRID_PAGE_TASK_ID_QUERY_PARAM)\n\n const taskIds = useMemo(() => {\n if (!taskIdParam) return undefined\n return taskIdParam\n .split(',')\n .map(id => parseInt(id, 10))\n .filter(id => !isNaN(id))\n }, [taskIdParam])\n\n const {\n data: curationTasks,\n isLoading,\n hasNextPage,\n isFetchingNextPage,\n fetchNextPage,\n } = useGetCurationTasksInfinite({\n assignedToMe: true,\n taskIds,\n })\n\n const tasks = useMemo(() => {\n return curationTasks?.pages.flatMap(page => page.bundlePage ?? []) ?? []\n }, [curationTasks])\n\n return (\n <Stack gap={4}>\n <Typography variant=\"headline1\">On Your Radar</Typography>\n <OpenInvitationsToUserCard cardProps={{ className: sharedStyles.card }} />\n <InfiniteTableLayout\n table={\n <Stack gap={3}>\n {tasks.map(taskBundle => (\n <CurationTaskCard\n key={taskBundle.task?.taskId}\n taskBundle={taskBundle}\n />\n ))}\n </Stack>\n }\n isLoading={isLoading}\n isEmpty={tasks.length === 0}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n onFetchNextPageClicked={() => void fetchNextPage()}\n noResults={'There are currently no curation tasks assigned to you.'}\n ></InfiniteTableLayout>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAwB,IAA0B;CAChD,IAAM,CAAC,KAAgB,EAAgB,GACjC,IAAc,EAAa,IAAI,CAA6B,GAU5D,EACJ,MAAM,GACN,cACA,gBACA,uBACA,qBACE,EAA4B;EAC9B,cAAc;EACd,SAhBc,QAAc;GACvB,OACL,OAAO,EACJ,MAAM,GAAG,EACT,KAAI,MAAM,SAAS,GAAI,EAAE,CAAC,EAC1B,QAAO,MAAM,CAAC,MAAM,CAAE,CAAC;EAC5B,GAAG,CAAC,CAAW,CAUb;CACF,CAAC,GAEK,IAAQ,QACL,GAAe,MAAM,SAAQ,MAAQ,EAAK,cAAc,CAAC,CAAC,KAAK,CAAC,GACtE,CAAC,CAAa,CAAC;CAElB,OACE,kBAAC,GAAD;EAAO,KAAK;YAAZ;GACE,kBAAC,GAAD;IAAY,SAAQ;cAAY;GAAyB,CAAA;GACzD,kBAAC,GAAD,EAA2B,WAAW,EAAE,WAAW,EAAa,KAAK,EAAI,CAAA;GACzE,kBAAC,GAAD;IACE,OACE,kBAAC,GAAD;KAAO,KAAK;eACT,EAAM,KAAI,MACT,kBAAC,GAAD,EAEc,cACb,GAFM,EAAW,MAAM,MAEvB,CACF;IACI,CAAA;IAEE;IACX,SAAS,EAAM,WAAW;IACb;IACO;IACpB,8BAA8B,KAAK,EAAc;IACjD,WAAW;GACS,CAAA;EACjB;;AAEX"}
1
+ {"version":3,"file":"CuratorDashboard.js","names":[],"sources":["../../../../src/features/curator/dashboard/CuratorDashboard.tsx"],"sourcesContent":["import InfiniteTableLayout from '@/components/layout/InfiniteTableLayout'\nimport OpenInvitationsToUserCard from '@/features/team/invitation/components/OpenInvitationsToUserCard'\nimport { useGetCurationTasksInfinite } from '@/synapse-queries/curation/task/useCurationTask'\nimport { useCurationTaskListFilters } from '@/utils/hooks/useCurationTaskListFilters'\nimport { Typography } from '@mui/material'\nimport Stack from '@mui/material/Stack'\nimport { useMemo } from 'react'\nimport CurationTaskCard from './components/CurationTaskCard'\nimport FilteredByTaskIdsBanner from './components/FilteredByTaskIdsBanner'\nimport sharedStyles from './components/shared.module.scss'\n\nexport default function CuratorDashboardContent() {\n const { request, taskIds, clearTaskIdsFilter } = useCurationTaskListFilters({\n defaultAssignedToMe: true,\n })\n\n const {\n data: curationTasks,\n isLoading,\n hasNextPage,\n isFetchingNextPage,\n fetchNextPage,\n } = useGetCurationTasksInfinite(request)\n\n const tasks = useMemo(() => {\n return curationTasks?.pages.flatMap(page => page.bundlePage ?? []) ?? []\n }, [curationTasks])\n\n return (\n <Stack gap={4}>\n <Typography variant=\"headline1\">On Your Radar</Typography>\n <OpenInvitationsToUserCard cardProps={{ className: sharedStyles.card }} />\n <FilteredByTaskIdsBanner taskIds={taskIds} onClear={clearTaskIdsFilter} />\n <InfiniteTableLayout\n table={\n <Stack gap={3}>\n {tasks.map(taskBundle => (\n <CurationTaskCard\n key={taskBundle.task?.taskId}\n taskBundle={taskBundle}\n />\n ))}\n </Stack>\n }\n isLoading={isLoading}\n isEmpty={tasks.length === 0}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n onFetchNextPageClicked={() => void fetchNextPage()}\n noResults={'There are currently no curation tasks assigned to you.'}\n ></InfiniteTableLayout>\n </Stack>\n )\n}\n"],"mappings":";;;;;;;;;;;;AAWA,SAAwB,IAA0B;CAChD,IAAM,EAAE,YAAS,YAAS,0BAAuB,EAA2B,EAC1E,qBAAqB,GACvB,CAAC,GAEK,EACJ,MAAM,GACN,cACA,gBACA,uBACA,qBACE,EAA4B,CAAO,GAEjC,IAAQ,QACL,GAAe,MAAM,SAAQ,MAAQ,EAAK,cAAc,CAAC,CAAC,KAAK,CAAC,GACtE,CAAC,CAAa,CAAC;CAElB,OACE,kBAAC,GAAD;EAAO,KAAK;YAAZ;GACE,kBAAC,GAAD;IAAY,SAAQ;cAAY;GAAyB,CAAA;GACzD,kBAAC,GAAD,EAA2B,WAAW,EAAE,WAAW,EAAa,KAAK,EAAI,CAAA;GACzE,kBAAC,GAAD;IAAkC;IAAS,SAAS;GAAqB,CAAA;GACzE,kBAAC,GAAD;IACE,OACE,kBAAC,GAAD;KAAO,KAAK;eACT,EAAM,KAAI,MACT,kBAAC,GAAD,EAEc,cACb,GAFM,EAAW,MAAM,MAEvB,CACF;IACI,CAAA;IAEE;IACX,SAAS,EAAM,WAAW;IACb;IACO;IACpB,8BAA8B,KAAK,EAAc;IACjD,WAAW;GACS,CAAA;EACjB;;AAEX"}
@@ -1 +1 @@
1
- ._card_1btsm_1.MuiCard-root{background-color:#f5f8fa}._cardContent_1btsm_5{flex-direction:row;align-items:stretch;gap:24px;margin-bottom:16px;display:flex}@media (width<=768px){._cardContent_1btsm_5{flex-direction:column}}._mainContent_1btsm_18{flex-direction:column;flex:1;gap:16px;display:flex}._titleChipContainer_1btsm_26{flex-direction:row;align-items:center;gap:16px;display:flex}@media (width<=768px){._titleChipContainer_1btsm_26{flex-direction:column;align-items:flex-start}}._title_1btsm_26{cursor:pointer}._title_1btsm_26:hover{text-decoration:underline}._entityInfo_1btsm_47{gap:16px;display:flex}._statusContainer_1btsm_52{flex-direction:column;align-items:flex-start;gap:8px;display:flex}._expandedContent_1btsm_59{background-color:#fff;border-radius:4px;flex-direction:column;gap:16px;margin:16px;padding:16px;display:flex}._expandedTopRow_1btsm_69{flex-direction:row;align-items:flex-start;gap:16px;display:flex}._helpLink_1btsm_76{white-space:nowrap;align-items:center;gap:4px;margin-left:auto;font-size:14px;display:inline-flex}._helpIcon_1btsm_85{font-size:16px!important}._userChipContainer_1btsm_89{flex-flow:wrap;align-items:center;gap:16px;display:flex}._buttonContainer_1btsm_97{flex-grow:0;flex-shrink:0;margin-left:auto;display:flex}@media (width<=768px){._buttonContainer_1btsm_97{margin-left:0}}
1
+ ._card_15ur0_1.MuiCard-root{background-color:#f5f8fa}._cardContent_15ur0_5{flex-direction:row;align-items:stretch;gap:24px;margin-bottom:16px;display:flex}@media (width<=768px){._cardContent_15ur0_5{flex-direction:column}}._mainContent_15ur0_18{flex-direction:column;flex:1;gap:16px;display:flex}._titleChipContainer_15ur0_26{flex-direction:row;align-items:center;gap:16px;display:flex}@media (width<=768px){._titleChipContainer_15ur0_26{flex-direction:column;align-items:flex-start}}._title_15ur0_26{cursor:pointer}._title_15ur0_26:hover{text-decoration:underline}._entityInfo_15ur0_47{gap:8px;display:flex}._statusContainer_15ur0_52{flex-direction:column;justify-content:center;align-items:flex-start;gap:8px;display:flex}._expandedContent_15ur0_60{background-color:#fff;border-radius:4px;flex-direction:column;gap:16px;margin:16px;padding:16px;display:flex}._expandedTopRow_15ur0_70{flex-direction:row;align-items:flex-start;gap:16px;display:flex}._helpLink_15ur0_77{white-space:nowrap;align-items:center;gap:4px;margin-left:auto;font-size:14px;display:inline-flex}._helpIcon_15ur0_86{font-size:16px!important}._userChipContainer_15ur0_90{flex-flow:wrap;align-items:center;gap:16px;display:flex}._buttonContainer_15ur0_98{flex-grow:0;flex-shrink:0;margin-left:auto;display:flex}@media (width<=768px){._buttonContainer_15ur0_98{margin-left:0}}
@@ -1,17 +1,17 @@
1
1
  import './CurationTaskCard.css';var e = {
2
- card: "_card_1btsm_1",
3
- cardContent: "_cardContent_1btsm_5",
4
- mainContent: "_mainContent_1btsm_18",
5
- titleChipContainer: "_titleChipContainer_1btsm_26",
6
- title: "_title_1btsm_26",
7
- entityInfo: "_entityInfo_1btsm_47",
8
- statusContainer: "_statusContainer_1btsm_52",
9
- expandedContent: "_expandedContent_1btsm_59",
10
- expandedTopRow: "_expandedTopRow_1btsm_69",
11
- helpLink: "_helpLink_1btsm_76",
12
- helpIcon: "_helpIcon_1btsm_85",
13
- userChipContainer: "_userChipContainer_1btsm_89",
14
- buttonContainer: "_buttonContainer_1btsm_97"
2
+ card: "_card_15ur0_1",
3
+ cardContent: "_cardContent_15ur0_5",
4
+ mainContent: "_mainContent_15ur0_18",
5
+ titleChipContainer: "_titleChipContainer_15ur0_26",
6
+ title: "_title_15ur0_26",
7
+ entityInfo: "_entityInfo_15ur0_47",
8
+ statusContainer: "_statusContainer_15ur0_52",
9
+ expandedContent: "_expandedContent_15ur0_60",
10
+ expandedTopRow: "_expandedTopRow_15ur0_70",
11
+ helpLink: "_helpLink_15ur0_77",
12
+ helpIcon: "_helpIcon_15ur0_86",
13
+ userChipContainer: "_userChipContainer_15ur0_90",
14
+ buttonContainer: "_buttonContainer_15ur0_98"
15
15
  };
16
16
  //#endregion
17
17
  export { e as default };
@@ -1 +1 @@
1
- {"version":3,"file":"CurationTaskCard.module.js","names":[],"sources":["../../../../../src/features/curator/dashboard/components/CurationTaskCard.module.scss"],"sourcesContent":[".card:global(.MuiCard-root) {\n background-color: #f5f8fa;\n}\n\n.cardContent {\n display: flex;\n flex-direction: row;\n margin-bottom: 16px;\n gap: 24px;\n align-items: stretch;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n}\n\n.mainContent {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex-grow: 1;\n flex: 1;\n}\n\n.titleChipContainer {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n align-items: center;\n @media (max-width: 768px) {\n flex-direction: column;\n align-items: flex-start;\n }\n}\n\n.title {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n.entityInfo {\n display: flex;\n gap: 16px;\n}\n\n.statusContainer {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n gap: 8px;\n}\n\n.expandedContent {\n background-color: #fff;\n padding: 16px;\n margin: 16px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.expandedTopRow {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 16px;\n}\n\n.helpLink {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-left: auto;\n white-space: nowrap;\n font-size: 14px;\n}\n\n.helpIcon {\n font-size: 16px !important;\n}\n\n.userChipContainer {\n display: flex;\n flex-direction: row;\n gap: 16px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.buttonContainer {\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n margin-left: auto;\n @media (max-width: 768px) {\n margin-left: 0;\n }\n}\n"],"mappings":""}
1
+ {"version":3,"file":"CurationTaskCard.module.js","names":[],"sources":["../../../../../src/features/curator/dashboard/components/CurationTaskCard.module.scss"],"sourcesContent":[".card:global(.MuiCard-root) {\n background-color: #f5f8fa;\n}\n\n.cardContent {\n display: flex;\n flex-direction: row;\n margin-bottom: 16px;\n gap: 24px;\n align-items: stretch;\n\n @media (max-width: 768px) {\n flex-direction: column;\n }\n}\n\n.mainContent {\n display: flex;\n flex-direction: column;\n gap: 16px;\n flex-grow: 1;\n flex: 1;\n}\n\n.titleChipContainer {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 16px;\n align-items: center;\n @media (max-width: 768px) {\n flex-direction: column;\n align-items: flex-start;\n }\n}\n\n.title {\n cursor: pointer;\n\n &:hover {\n text-decoration: underline;\n }\n}\n\n.entityInfo {\n display: flex;\n gap: 8px;\n}\n\n.statusContainer {\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n gap: 8px;\n}\n\n.expandedContent {\n background-color: #fff;\n padding: 16px;\n margin: 16px;\n border-radius: 4px;\n display: flex;\n flex-direction: column;\n gap: 16px;\n}\n\n.expandedTopRow {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n gap: 16px;\n}\n\n.helpLink {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n margin-left: auto;\n white-space: nowrap;\n font-size: 14px;\n}\n\n.helpIcon {\n font-size: 16px !important;\n}\n\n.userChipContainer {\n display: flex;\n flex-direction: row;\n gap: 16px;\n align-items: center;\n flex-wrap: wrap;\n}\n\n.buttonContainer {\n display: flex;\n flex-grow: 0;\n flex-shrink: 0;\n margin-left: auto;\n @media (max-width: 768px) {\n margin-left: 0;\n }\n}\n"],"mappings":""}
@@ -44,13 +44,14 @@
44
44
 
45
45
  .entityInfo {
46
46
  display: flex;
47
- gap: 16px;
47
+ gap: 8px;
48
48
  }
49
49
 
50
50
  .statusContainer {
51
51
  display: flex;
52
52
  flex-direction: column;
53
53
  align-items: flex-start;
54
+ justify-content: center;
54
55
  gap: 8px;
55
56
  }
56
57
 
@@ -1 +1 @@
1
- {"version":3,"file":"CurationTaskCardLayout.d.ts","sourceRoot":"","sources":["../../../../../src/features/curator/dashboard/components/CurationTaskCardLayout.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,UAAU,EAEX,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AA+D3C,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,iGAAiG;IACjG,kBAAkB,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAA;CAChE,CAAA;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;;;;EAMxD;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,EAAE,2BAA2B,2CAmGnC"}
1
+ {"version":3,"file":"CurationTaskCardLayout.d.ts","sourceRoot":"","sources":["../../../../../src/features/curator/dashboard/components/CurationTaskCardLayout.tsx"],"names":[],"mappings":"AAWA,OAAO,EACL,UAAU,EAEX,MAAM,kCAAkC,CAAA;AAEzC,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAA;AAuE3C,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,YAAY,EAAE,MAAM,EAAE,CAAA;IACtB,iGAAiG;IACjG,kBAAkB,EAAE,CAAC,KAAK,EAAE;QAAE,QAAQ,EAAE,OAAO,CAAA;KAAE,KAAK,SAAS,CAAA;CAChE,CAAA;AAED,uFAAuF;AACvF,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;;;;EAMxD;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAC5C,KAAK,EAAE,2BAA2B,2CAsGnC"}
@@ -7,15 +7,16 @@ import a from "./UserOrTeamChip.js";
7
7
  import { useState as o } from "react";
8
8
  import { Card as s, Chip as c, Collapse as l, Divider as u, IconButton as d, Link as f, Skeleton as p, Typography as m } from "@mui/material";
9
9
  import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
10
- import { useNavigate as v } from "react-router";
11
- import y from "dayjs";
12
- import b from "dayjs/plugin/utc";
13
- import x from "@mui/icons-material/HelpOutline";
14
- import S from "classnames";
15
- import C from "@mui/icons-material/SettingsOutlined";
10
+ import { TaskStatusStateEnum as v } from "@sage-bionetworks/synapse-client";
11
+ import { useNavigate as y } from "react-router";
12
+ import b from "dayjs";
13
+ import x from "dayjs/plugin/utc";
14
+ import S from "@mui/icons-material/HelpOutline";
15
+ import C from "classnames";
16
+ import w from "@mui/icons-material/SettingsOutlined";
16
17
  //#region src/features/curator/dashboard/components/CurationTaskCardLayout.tsx
17
- y.extend(b);
18
- function w(e) {
18
+ b.extend(x);
19
+ function T(e) {
19
20
  let { label: t } = e;
20
21
  return /* @__PURE__ */ g(c, {
21
22
  sx: {
@@ -25,7 +26,7 @@ function w(e) {
25
26
  label: t
26
27
  });
27
28
  }
28
- function T(e) {
29
+ function E(e) {
29
30
  let { state: n } = e;
30
31
  if (!n) return null;
31
32
  let { label: r, backgroundColor: i } = t[n];
@@ -38,33 +39,37 @@ function T(e) {
38
39
  label: r
39
40
  });
40
41
  }
41
- function E(e) {
42
- let { dueDate: t } = e, r = n(t);
43
- if (!r) return null;
44
- let i = r.diff(y.utc().startOf("day"), "day"), a = r.format("MM/DD/YY"), o = "#E0E0E0";
45
- return i < 0 ? o = "#FFCDD2" : i < 30 && (o = "#FFF9C4"), /* @__PURE__ */ g(c, {
42
+ function D(e) {
43
+ let { dueDate: t, taskState: r } = e, i = n(t);
44
+ if (!i) return null;
45
+ let a = i.format("MM/DD/YY"), o = r === v.COMPLETED || r === v.CANCELED, s = "#E0E0E0";
46
+ if (!o) {
47
+ let e = i.diff(b.utc().startOf("day"), "day");
48
+ e < 0 ? s = "#FFCDD2" : e < 30 && (s = "#FFF9C4");
49
+ }
50
+ return /* @__PURE__ */ g(c, {
46
51
  size: "small",
47
52
  sx: {
48
53
  fontWeight: 600,
49
- backgroundColor: o
54
+ backgroundColor: s
50
55
  },
51
56
  label: `Due ${a}`
52
57
  });
53
58
  }
54
- function D(e) {
59
+ function O(e) {
55
60
  return {
56
61
  title: e?.dataType ?? "",
57
62
  description: e?.instructions ?? "",
58
63
  principalIds: e?.assigneePrincipalId ? [e.assigneePrincipalId] : []
59
64
  };
60
65
  }
61
- function O(t) {
62
- let { taskBundle: n, title: c, description: y, taskType: b, principalIds: D, renderActionButton: O } = t, k = v(), [A, j] = o(!1), M = n.task?.taskId, N = n.task?.projectId, { data: P } = e(N, void 0, {
66
+ function k(t) {
67
+ let { taskBundle: n, title: c, description: v, taskType: b, principalIds: x, renderActionButton: O } = t, k = y(), [A, j] = o(!1), M = n.task?.taskId, N = n.task?.projectId, { data: P } = e(N, void 0, {
63
68
  includeEntity: !0,
64
69
  includePermissions: !0
65
70
  }), F = P?.permissions?.canEdit ?? !1;
66
71
  return /* @__PURE__ */ _(s, {
67
- className: S(i.card, r.card),
72
+ className: C(i.card, r.card),
68
73
  children: [/* @__PURE__ */ _("div", {
69
74
  className: r.cardContent,
70
75
  children: [
@@ -80,11 +85,11 @@ function O(t) {
80
85
  onClick: () => j(!A),
81
86
  children: c
82
87
  }),
83
- b && /* @__PURE__ */ g(w, { label: b }),
88
+ b && /* @__PURE__ */ g(T, { label: b }),
84
89
  F && /* @__PURE__ */ g(d, {
85
90
  onClick: () => void k(`edit/${M}`),
86
91
  "aria-label": "Task settings",
87
- children: /* @__PURE__ */ g(C, {})
92
+ children: /* @__PURE__ */ g(w, {})
88
93
  })
89
94
  ]
90
95
  }),
@@ -100,13 +105,16 @@ function O(t) {
100
105
  }),
101
106
  /* @__PURE__ */ g("div", {
102
107
  className: r.userChipContainer,
103
- children: D.map((e) => /* @__PURE__ */ g(a, { principalId: e }, e))
108
+ children: x.map((e) => /* @__PURE__ */ g(a, { principalId: e }, e))
104
109
  })
105
110
  ]
106
111
  }),
107
112
  /* @__PURE__ */ _("div", {
108
113
  className: r.statusContainer,
109
- children: [/* @__PURE__ */ g(T, { state: n.status?.state }), /* @__PURE__ */ g(E, { dueDate: n.status?.dueDate })]
114
+ children: [/* @__PURE__ */ g(E, { state: n.status?.state }), /* @__PURE__ */ g(D, {
115
+ dueDate: n.status?.dueDate,
116
+ taskState: n.status?.state
117
+ })]
110
118
  }),
111
119
  !A && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g(u, {
112
120
  orientation: "vertical",
@@ -123,9 +131,9 @@ function O(t) {
123
131
  className: r.expandedContent,
124
132
  children: [/* @__PURE__ */ _("div", {
125
133
  className: r.expandedTopRow,
126
- children: [y && /* @__PURE__ */ g(m, {
134
+ children: [v && /* @__PURE__ */ g(m, {
127
135
  variant: "body1",
128
- children: y
136
+ children: v
129
137
  }), /* @__PURE__ */ _(f, {
130
138
  href: "https://docs.synapse.org/synapse-docs/managing-metadata-with-curator",
131
139
  target: "_blank",
@@ -134,7 +142,7 @@ function O(t) {
134
142
  underline: "hover",
135
143
  className: r.helpLink,
136
144
  sx: { fontWeight: 400 },
137
- children: [/* @__PURE__ */ g(x, { className: r.helpIcon }), "Have questions or need help?"]
145
+ children: [/* @__PURE__ */ g(S, { className: r.helpIcon }), "Have questions or need help?"]
138
146
  })]
139
147
  }), O({ expanded: !0 })]
140
148
  })
@@ -142,6 +150,6 @@ function O(t) {
142
150
  });
143
151
  }
144
152
  //#endregion
145
- export { O as default, D as deriveCardFields };
153
+ export { k as default, O as deriveCardFields };
146
154
 
147
155
  //# sourceMappingURL=CurationTaskCardLayout.js.map