synapse-react-client 4.0.9 → 4.0.10

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 (543) hide show
  1. package/dist/SWC.index.d.ts +1 -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/aridhia-queries/aridhiaTokenExchange.js.map +1 -1
  6. package/dist/aridhia-queries/useGetAridhiaRequests.js.map +1 -1
  7. package/dist/assets/icons/TasksIcon.d.ts.map +1 -1
  8. package/dist/assets/icons/TasksIcon.js +6 -10
  9. package/dist/assets/icons/TasksIcon.js.map +1 -1
  10. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.d.ts.map +1 -1
  11. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js +69 -63
  12. package/dist/components/AccessRequirementAclEditor/AccessRequirementAclEditor.js.map +1 -1
  13. package/dist/components/AccessRequirementList/AccessApprovalCheckMark.js.map +1 -1
  14. package/dist/components/AccessRequirementList/AccessRequirementList.js.map +1 -1
  15. package/dist/components/AccessRequirementList/AccessRequirementListUtils.js.map +1 -1
  16. package/dist/components/AccessRequirementList/ManagedACTAccessRequirementRequestFlow/DataAccessRequestAccessorsEditor.js.map +1 -1
  17. package/dist/components/AccessRequirementList/RequirementItem/SelfSignAccessRequirementItem.js.map +1 -1
  18. package/dist/components/AccessRequirementRelatedProjectsList/AccessRequirementRelatedProjectsList.js.map +1 -1
  19. package/dist/components/AccessTokenPage/AccessTokenCard/AccessTokenCard.js.map +1 -1
  20. package/dist/components/AcknowledgementsPage/StudyAcknowledgements.js.map +1 -1
  21. package/dist/components/AclEditor/PermissionLevelMenu.js.map +1 -1
  22. package/dist/components/AclEditor/ResourceAccessAndUserGroupHeader.js.map +1 -1
  23. package/dist/components/AclEditor/useSortResourceAccessList.js.map +1 -1
  24. package/dist/components/AclEditor/useUpdateAcl.js.map +1 -1
  25. package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
  26. package/dist/components/Authentication/AuthenticationMethodSelection.d.ts.map +1 -1
  27. package/dist/components/Authentication/AuthenticationMethodSelection.js +38 -37
  28. package/dist/components/Authentication/AuthenticationMethodSelection.js.map +1 -1
  29. package/dist/components/Authentication/Constants.d.ts +1 -0
  30. package/dist/components/Authentication/Constants.d.ts.map +1 -1
  31. package/dist/components/Authentication/Constants.js +2 -2
  32. package/dist/components/Authentication/Constants.js.map +1 -1
  33. package/dist/components/Authentication/LastLoginInfo.js.map +1 -1
  34. package/dist/components/Authentication/RecoveryCodeForm.js.map +1 -1
  35. package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
  36. package/dist/components/Authentication/RegenerateBackupCodesWarning.js.map +1 -1
  37. package/dist/components/Authentication/Reset2FAWarning.js.map +1 -1
  38. package/dist/components/Authentication/StandaloneLoginForm.js +1 -1
  39. package/dist/components/Authentication/TwoFactorBackupCodes.js.map +1 -1
  40. package/dist/components/Authentication/TwoFactorEnrollmentForm.d.ts.map +1 -1
  41. package/dist/components/Authentication/TwoFactorEnrollmentForm.js +2 -1
  42. package/dist/components/Authentication/TwoFactorEnrollmentForm.js.map +1 -1
  43. package/dist/components/BasePortalCard/ColorfulPortalCardWithChips/ColorfulPortalCardWithChips.js.map +1 -1
  44. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  45. package/dist/components/CardDeck/CardDeck.Mobile.js.map +1 -1
  46. package/dist/components/CardDeck/TableQueryCardDeck.js.map +1 -1
  47. package/dist/components/CertificationQuiz/CertificationQuiz.js.map +1 -1
  48. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js.map +1 -1
  49. package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
  50. package/dist/components/ChallengeSubmission/ChallengeSubmissionStepper.js.map +1 -1
  51. package/dist/components/ChallengeSubmission/EvaluationQueueCurrentRoundInfo.js.map +1 -1
  52. package/dist/components/ChallengeSubmission/EvaluationQueueList.js.map +1 -1
  53. package/dist/components/ChallengeSubmission/SubmissionDirectoryList.js.map +1 -1
  54. package/dist/components/ChallengeTeamWizard/ChallengeTeamWizard.js.map +1 -1
  55. package/dist/components/ChallengeTeamWizard/CreateChallengeTeam.js.map +1 -1
  56. package/dist/components/ChangePassword/ChangePassword.js.map +1 -1
  57. package/dist/components/ChangePassword/ChangePasswordWithToken.js.map +1 -1
  58. package/dist/components/ChangePassword/useChangePasswordFormState.js +1 -1
  59. package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
  60. package/dist/components/CitationPopover/CitationPopoverContent.js.map +1 -1
  61. package/dist/components/ColumnFilter/ColumnFilter.js.map +1 -1
  62. package/dist/components/ComponentCollapse.js.map +1 -1
  63. package/dist/components/CookiesNotification/CookiesNotification.js.map +1 -1
  64. package/dist/components/CreateProjectModal/CreateProjectModal.js.map +1 -1
  65. package/dist/components/CreateTableViewWizard/CreateTableViewWizardUtils.js.map +1 -1
  66. package/dist/components/DataGrid/DataGrid.d.ts +0 -1
  67. package/dist/components/DataGrid/DataGrid.d.ts.map +1 -1
  68. package/dist/components/DataGrid/DataGrid.js +72 -72
  69. package/dist/components/DataGrid/DataGrid.js.map +1 -1
  70. package/dist/components/DataGrid/DataGridWebSocket.d.ts +4 -0
  71. package/dist/components/DataGrid/DataGridWebSocket.d.ts.map +1 -1
  72. package/dist/components/DataGrid/DataGridWebSocket.js +9 -8
  73. package/dist/components/DataGrid/DataGridWebSocket.js.map +1 -1
  74. package/dist/components/DataGrid/SynapseGrid.d.ts.map +1 -1
  75. package/dist/components/DataGrid/SynapseGrid.js +326 -268
  76. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  77. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts +2 -0
  78. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts.map +1 -1
  79. package/dist/components/DataGrid/columns/AutocompleteColumn.js +113 -67
  80. package/dist/components/DataGrid/columns/AutocompleteColumn.js.map +1 -1
  81. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.d.ts +2 -1
  82. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.d.ts.map +1 -1
  83. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js +126 -122
  84. package/dist/components/DataGrid/columns/AutocompleteMultipleEnumColumn.js.map +1 -1
  85. package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts +58 -0
  86. package/dist/components/DataGrid/columns/useGridAutocompleteState.d.ts.map +1 -0
  87. package/dist/components/DataGrid/columns/useGridAutocompleteState.js +52 -0
  88. package/dist/components/DataGrid/columns/useGridAutocompleteState.js.map +1 -0
  89. package/dist/components/DataGrid/components/ValidationAlert.d.ts +5 -2
  90. package/dist/components/DataGrid/components/ValidationAlert.d.ts.map +1 -1
  91. package/dist/components/DataGrid/components/ValidationAlert.js +429 -24
  92. package/dist/components/DataGrid/components/ValidationAlert.js.map +1 -1
  93. package/dist/components/DataGrid/hooks/useColumnResizeHandles.js.map +1 -1
  94. package/dist/components/DataGrid/hooks/useGetSchemaForGrid.js.map +1 -1
  95. package/dist/components/DataGrid/hooks/useGridUndoRedo.js.map +1 -1
  96. package/dist/components/DataGrid/hooks/useStack.js.map +1 -1
  97. package/dist/components/DataGrid/useCRDTModelView.js.map +1 -1
  98. package/dist/components/DataGrid/useDataGridWebsocket.d.ts +7 -0
  99. package/dist/components/DataGrid/useDataGridWebsocket.d.ts.map +1 -1
  100. package/dist/components/DataGrid/useDataGridWebsocket.js +16 -2
  101. package/dist/components/DataGrid/useDataGridWebsocket.js.map +1 -1
  102. package/dist/components/DataGrid/useInitializeGridConnection.js.map +1 -1
  103. package/dist/components/DataGrid/useMergeGridWithRecordSet.js.map +1 -1
  104. package/dist/components/DataGrid/useMergeGridWithSource.js.map +1 -1
  105. package/dist/components/DataGrid/useMergeGridWithTable.js.map +1 -1
  106. package/dist/components/DataGrid/utils/DataGridUtils.js.map +1 -1
  107. package/dist/components/DataGrid/utils/applyModelChange.js.map +1 -1
  108. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  109. package/dist/components/DataGrid/utils/computeReplicaSelectionModel.js.map +1 -1
  110. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js.map +1 -1
  111. package/dist/components/DataGrid/utils/getCellClassName.d.ts.map +1 -1
  112. package/dist/components/DataGrid/utils/getCellClassName.js +8 -8
  113. package/dist/components/DataGrid/utils/getCellClassName.js.map +1 -1
  114. package/dist/components/DataGrid/utils/json-rx/JsonRx.js.map +1 -1
  115. package/dist/components/DataGrid/utils/modelRowsToGrid.js.map +1 -1
  116. package/dist/components/DataGrid/utils/parseFreeTextUsingJsonSchemaType.js.map +1 -1
  117. package/dist/components/DataGrid/utils/splitPatch.js.map +1 -1
  118. package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
  119. package/dist/components/DirectDownload/DirectDownload.js.map +1 -1
  120. package/dist/components/DirectDownloadButton.js.map +1 -1
  121. package/dist/components/DownloadCart/CreatePackageV2.js.map +1 -1
  122. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
  123. package/dist/components/DownloadCart/DownloadListActionsRequired.js.map +1 -1
  124. package/dist/components/DownloadCart/DownloadListTable.js.map +1 -1
  125. package/dist/components/DownloadCart/fileNameUtils.js.map +1 -1
  126. package/dist/components/DraggableDialog/DraggableDialog.js.map +1 -1
  127. package/dist/components/DynamicForm/DynamicFormModal.js.map +1 -1
  128. package/dist/components/Ecosystem/TableQueryEcosystem.js.map +1 -1
  129. package/dist/components/EntityAclEditor/EntityAclEditor.d.ts.map +1 -1
  130. package/dist/components/EntityAclEditor/EntityAclEditor.js +103 -103
  131. package/dist/components/EntityAclEditor/EntityAclEditor.js.map +1 -1
  132. package/dist/components/EntityAclEditor/useNotifyNewACLUsers.js.map +1 -1
  133. package/dist/components/EntityBadgeIcons/EntityBadgeIcons.js.map +1 -1
  134. package/dist/components/EntityCitation/EntityCitation.js.map +1 -1
  135. package/dist/components/EntityDownloadButton/EntityDownloadButton.js.map +1 -1
  136. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.d.ts.map +1 -1
  137. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js +36 -30
  138. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  139. package/dist/components/EntityFinder/EntityFinder.js.map +1 -1
  140. package/dist/components/EntityFinder/VersionSelectionType.js.map +1 -1
  141. package/dist/components/EntityFinder/details/configurations/EntityChildrenDetails.js.map +1 -1
  142. package/dist/components/EntityFinder/details/configurations/FavoritesDetails.js.map +1 -1
  143. package/dist/components/EntityFinder/details/configurations/ProjectListDetails.js.map +1 -1
  144. package/dist/components/EntityFinder/details/view/DetailsView.js.map +1 -1
  145. package/dist/components/EntityFinder/tree/EntityTree.js.map +1 -1
  146. package/dist/components/EntityFinder/tree/VirtualizedTree.js.map +1 -1
  147. package/dist/components/EntityFinder/useEntitySelection.js.map +1 -1
  148. package/dist/components/EntityForm/EntityForm.js.map +1 -1
  149. package/dist/components/EntityHeaderTable/EntityHeaderTable.js.map +1 -1
  150. package/dist/components/EntityHeaderTable/Filter.js.map +1 -1
  151. package/dist/components/EntityHeaderTable/useEntityHeaderTableState.js.map +1 -1
  152. package/dist/components/EntitySubjectsSelector/EntitySubjectsSelector.js.map +1 -1
  153. package/dist/components/EntityTreeTable/components/IdColumnHeader.js.map +1 -1
  154. package/dist/components/EntityTreeTable/hooks/useEntityTreeState.js.map +1 -1
  155. package/dist/components/EntityTreeTable/hooks/useTableColumns.js.map +1 -1
  156. package/dist/components/EntityTreeTable/hooks/useTableData.js.map +1 -1
  157. package/dist/components/EntityTreeTable/hooks/useTreeOperationsWithDirectFetch.js.map +1 -1
  158. package/dist/components/EntityUpload/EntityUpload.js.map +1 -1
  159. package/dist/components/ExperimentalMode/ExperimentalMode.js.map +1 -1
  160. package/dist/components/ExternalFileHandleLink/ExternalFileHandleLink.js.map +1 -1
  161. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  162. package/dist/components/FeaturedDataTabs/QueryPerFacetPlotsCard.js.map +1 -1
  163. package/dist/components/FeaturedDataTabs/SingleQueryFacetPlotsCards.js.map +1 -1
  164. package/dist/components/FeaturedResearch/FeaturedResearch.js.map +1 -1
  165. package/dist/components/FeaturedToolsList/FeaturedToolsList.js.map +1 -1
  166. package/dist/components/FilePreview/FileHandleContentRenderer.js.map +1 -1
  167. package/dist/components/FilePreview/HtmlPreview/HtmlPreview.js.map +1 -1
  168. package/dist/components/FilePreview/PreviewRendererType.js.map +1 -1
  169. package/dist/components/Forum/DiscussionReply.js.map +1 -1
  170. package/dist/components/Forum/DiscussionSearchResult.js.map +1 -1
  171. package/dist/components/Forum/ForumTable.js.map +1 -1
  172. package/dist/components/Forum/ForumThreadEditor.js.map +1 -1
  173. package/dist/components/FullTextSearch/FullTextSearchUtils.js.map +1 -1
  174. package/dist/components/GenericCard/GenericCard.d.ts.map +1 -1
  175. package/dist/components/GenericCard/GenericCard.js +12 -7
  176. package/dist/components/GenericCard/GenericCard.js.map +1 -1
  177. package/dist/components/GenericCard/Linkify.js.map +1 -1
  178. package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
  179. package/dist/components/GenericCard/TableRowGenericCard.js +105 -105
  180. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  181. package/dist/components/Goals/Goals.Mobile.js.map +1 -1
  182. package/dist/components/Goals/Goals.js.map +1 -1
  183. package/dist/components/GoalsV2/GoalsV2.Mobile.js.map +1 -1
  184. package/dist/components/GoalsV2/GoalsV2.js.map +1 -1
  185. package/dist/components/GoalsV3/GoalsV3.Mobile.js.map +1 -1
  186. package/dist/components/GoalsV3/GoalsV3.js.map +1 -1
  187. package/dist/components/GoogleMap/SynapseUserMarker.js.map +1 -1
  188. package/dist/components/HasAccess/AccessIcon.js.map +1 -1
  189. package/dist/components/HasAccess/useHasAccess.js.map +1 -1
  190. package/dist/components/HeaderCard/HeaderCardV2.js.map +1 -1
  191. package/dist/components/HeaderCard.d.ts +6 -1
  192. package/dist/components/HeaderCard.d.ts.map +1 -1
  193. package/dist/components/HeaderCard.js +107 -76
  194. package/dist/components/HeaderCard.js.map +1 -1
  195. package/dist/components/HexGrid/HexGrid.js.map +1 -1
  196. package/dist/components/IconList.js.map +1 -1
  197. package/dist/components/ImageCardGridWithLinks/ImageCardGridWithLinks.js.map +1 -1
  198. package/dist/components/ImageFromSynapseTable.js.map +1 -1
  199. package/dist/components/JSONArrayEditor/useParseCsv.js.map +1 -1
  200. package/dist/components/JsonSchemaForm/templates/ArrayFieldDescriptionTemplate.js.map +1 -1
  201. package/dist/components/JsonSchemaForm/templates/ArrayFieldItemTemplate.js.map +1 -1
  202. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js.map +1 -1
  203. package/dist/components/JsonSchemaForm/templates/FieldTemplate.js.map +1 -1
  204. package/dist/components/JsonSchemaForm/templates/RJSFInputLabel.js.map +1 -1
  205. package/dist/components/Markdown/MarkdownGithub.js.map +1 -1
  206. package/dist/components/Markdown/MarkdownSynapse.js.map +1 -1
  207. package/dist/components/Markdown/MarkdownUtils.js.map +1 -1
  208. package/dist/components/Markdown/SynapseWikiContext.js.map +1 -1
  209. package/dist/components/Markdown/UserMentionModal.js.map +1 -1
  210. package/dist/components/Markdown/widget/MarkdownProvenanceGraph.js.map +1 -1
  211. package/dist/components/MissingQueryResultsWarning/MissingQueryResultsWarning.js.map +1 -1
  212. package/dist/components/ModalDownload/ModalDownload.js.map +1 -1
  213. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.d.ts.map +1 -1
  214. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js +45 -39
  215. package/dist/components/OAuthClientAclEditor/OAuthClientAclEditor.js.map +1 -1
  216. package/dist/components/OAuthClientManagement/OAuthManagement.js.map +1 -1
  217. package/dist/components/PageProgress/PageProgress.js.map +1 -1
  218. package/dist/components/Plot/DotPlot.js.map +1 -1
  219. package/dist/components/Plot/Plot.js.map +1 -1
  220. package/dist/components/Plot/SynapsePlot.js.map +1 -1
  221. package/dist/components/Plot/ThemesPlot.js.map +1 -1
  222. package/dist/components/Plot/UpsetPlot.js.map +1 -1
  223. package/dist/components/PortalAclEditor/PortalAclEditor.d.ts.map +1 -1
  224. package/dist/components/PortalAclEditor/PortalAclEditor.js +43 -41
  225. package/dist/components/PortalAclEditor/PortalAclEditor.js.map +1 -1
  226. package/dist/components/PortalFeaturedPartners/PortalFeaturedPartners.js.map +1 -1
  227. package/dist/components/PortalList/CreatePortalModal.js.map +1 -1
  228. package/dist/components/ProgrammaticInstructionsModal/ProgrammaticInstructionsModal.js.map +1 -1
  229. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js.map +1 -1
  230. package/dist/components/Programs/Programs.Mobile.js.map +1 -1
  231. package/dist/components/Programs/Programs.js.map +1 -1
  232. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js.map +1 -1
  233. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  234. package/dist/components/ProvenanceGraph/ProvenanceGraphUtils.js.map +1 -1
  235. package/dist/components/ProvenanceGraph/ProvenanceUtils.js.map +1 -1
  236. package/dist/components/QueryCount/QueryCount.js.map +1 -1
  237. package/dist/components/QueryCountButton/QueryCountButton.js.map +1 -1
  238. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  239. package/dist/components/QueryWrapper/QueryWrapper.js.map +1 -1
  240. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js.map +1 -1
  241. package/dist/components/QueryWrapper/TableRowSelectionState.js.map +1 -1
  242. package/dist/components/QueryWrapper/generateEncodedPathAndQueryForSelectedFacetURL.js.map +1 -1
  243. package/dist/components/QueryWrapper/useGetQueryMetadata.js.map +1 -1
  244. package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
  245. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  246. package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
  247. package/dist/components/RecentPublicationsGrid/RecentPublicationsGrid.js.map +1 -1
  248. package/dist/components/ReleaseCard/ReleaseCardUtils.js.map +1 -1
  249. package/dist/components/ResizableContainer/hooks/useResizable.js.map +1 -1
  250. package/dist/components/Resources/Resources.Mobile.js.map +1 -1
  251. package/dist/components/Resources/Resources.js.map +1 -1
  252. package/dist/components/RowDataTable/RowDataTableWithQuery.js.map +1 -1
  253. package/dist/components/SageResourcesPopover/SageResourcesPopover.js.map +1 -1
  254. package/dist/components/SchemaDrivenAnnotationEditor/AnnotationEditorUtils.js.map +1 -1
  255. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  256. package/dist/components/SetManagedAccessRequirementFields/SetManagedAccessRequirementFields.js.map +1 -1
  257. package/dist/components/SmartLink/SmartButton.js.map +1 -1
  258. package/dist/components/SmartLink/SmartLink.js.map +1 -1
  259. package/dist/components/SourceAppImage.js.map +1 -1
  260. package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.js.map +1 -1
  261. package/dist/components/StatisticsPlot.js.map +1 -1
  262. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  263. package/dist/components/SubsectionRowRenderer/SubsectionRowRenderer.js.map +1 -1
  264. package/dist/components/SustainabilityScorecard/SustainabilityScorecard.js.map +1 -1
  265. package/dist/components/SynapseChat/GridAgentChat.js.map +1 -1
  266. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  267. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  268. package/dist/components/SynapseChat/extractMessageFromTraceEvent.js.map +1 -1
  269. package/dist/components/SynapseForm/StepsSideNav.js.map +1 -1
  270. package/dist/components/SynapseForm/SummaryTable.js.map +1 -1
  271. package/dist/components/SynapseForm/SynapseForm.js +4 -2
  272. package/dist/components/SynapseForm/SynapseForm.js.map +1 -1
  273. package/dist/components/SynapseForm/SynapseFormWrapper.js.map +1 -1
  274. package/dist/components/SynapseHomepageV2/SynapseByTheNumbersItem.js.map +1 -1
  275. package/dist/components/SynapseHomepageV2/SynapseFeatureItem.js.map +1 -1
  276. package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js.map +1 -1
  277. package/dist/components/SynapseHomepageV2/SynapseHomepageSearch.js.map +1 -1
  278. package/dist/components/SynapseHomepageV2/SynapseInActionItem.js.map +1 -1
  279. package/dist/components/SynapseHomepageV2/SynapsePlans.js.map +1 -1
  280. package/dist/components/SynapseHomepageV2/SynapseTrendingProjects.js.map +1 -1
  281. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts +8 -7
  282. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts.map +1 -1
  283. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js +173 -164
  284. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js.map +1 -1
  285. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  286. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanel.js.map +1 -1
  287. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js.map +1 -1
  288. package/dist/components/SynapseSearchPageResults/SynapseSearchPageResults.js.map +1 -1
  289. package/dist/components/SynapseTable/EntityIDColumnCopyIcon.js.map +1 -1
  290. package/dist/components/SynapseTable/NoContentPlaceholderType.js.map +1 -1
  291. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
  292. package/dist/components/SynapseTable/SynapseTableCell/SynapseTableCell.js.map +1 -1
  293. package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
  294. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  295. package/dist/components/SynapseTable/table-top/ColumnSelection.js.map +1 -1
  296. package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
  297. package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
  298. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  299. package/dist/components/TableColumnSchemaEditor/ColumnModelFormFields/DefaultValueField.js.map +1 -1
  300. package/dist/components/TableColumnSchemaEditor/ImportTableColumnsButton.js.map +1 -1
  301. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts +1 -1
  302. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.d.ts.map +1 -1
  303. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js.map +1 -1
  304. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  305. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaFormReducer.js.map +1 -1
  306. package/dist/components/TableColumnSchemaEditor/Validators/ColumnModelValidator.js.map +1 -1
  307. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js.map +1 -1
  308. package/dist/components/TanStackTable/ColumnHeader.d.ts +1 -0
  309. package/dist/components/TanStackTable/ColumnHeader.d.ts.map +1 -1
  310. package/dist/components/TanStackTable/ColumnHeader.js +8 -8
  311. package/dist/components/TanStackTable/ColumnHeader.js.map +1 -1
  312. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js.map +1 -1
  313. package/dist/components/TanStackTable/TableBody.js.map +1 -1
  314. package/dist/components/TeamSubjectsSelector/TeamSubjectsSelector.js.map +1 -1
  315. package/dist/components/TextField/TextField.js.map +1 -1
  316. package/dist/components/TimelinePlot/TimelinePhase.js.map +1 -1
  317. package/dist/components/TimelinePlot/TimelinePlot.js.map +1 -1
  318. package/dist/components/TimelinePlot/TimelinePlotSpeciesSelector.js.map +1 -1
  319. package/dist/components/UserCard/Avatar.js.map +1 -1
  320. package/dist/components/UserCardList/UserCardList.js.map +1 -1
  321. package/dist/components/UserCardList/UserCardListGroups/UserCardListGroups.Mobile.js.map +1 -1
  322. package/dist/components/UserCardList/UserCardListRotate.js.map +1 -1
  323. package/dist/components/UserOrTeamBadge/useUserOrTeam.js.map +1 -1
  324. package/dist/components/UserProfileLinks/UserProjects.js.map +1 -1
  325. package/dist/components/UserSearchBox/UserSearchBox.js.map +1 -1
  326. package/dist/components/Webhook/WebhookDashboard.js.map +1 -1
  327. package/dist/components/WikiMarkdownEditor/WikiMarkdownEditor.js.map +1 -1
  328. package/dist/components/WikiMarkdownEditorButton/WikiMarkdownEditorButton.js.map +1 -1
  329. package/dist/components/dataaccess/AccessApprovalsTable.js.map +1 -1
  330. package/dist/components/dataaccess/AccessRequestSubmissionTable.js.map +1 -1
  331. package/dist/components/dataaccess/SubmissionPage/SubmissionPage.js.map +1 -1
  332. package/dist/components/dataaccess/UseAccessRequirementTable.js.map +1 -1
  333. package/dist/components/dataaccess/UserAccessRequestHistory/UserAccessRequestHistoryTable.js.map +1 -1
  334. package/dist/components/doi/CreateOrUpdateDoiModal.js.map +1 -1
  335. package/dist/components/entity/page/CreatedByModifiedBy.js.map +1 -1
  336. package/dist/components/entity/page/action_menu/EntityActionMenu.js.map +1 -1
  337. package/dist/components/entity/page/title_bar/useDataCiteUsage.js.map +1 -1
  338. package/dist/components/entity/page/title_bar/useGetMentions.js.map +1 -1
  339. package/dist/components/error/ErrorPage.js.map +1 -1
  340. package/dist/components/favorites/FavoritesPage.js.map +1 -1
  341. package/dist/components/file/upload/BasicFileHandleUpload.js.map +1 -1
  342. package/dist/components/layout/SWCHeader.d.ts +9 -0
  343. package/dist/components/layout/SWCHeader.d.ts.map +1 -0
  344. package/dist/components/layout/SWCHeader.js +19 -0
  345. package/dist/components/layout/SWCHeader.js.map +1 -0
  346. package/dist/components/layout/SWCPageLayout.d.ts +9 -0
  347. package/dist/components/layout/SWCPageLayout.d.ts.map +1 -0
  348. package/dist/components/layout/SWCPageLayout.js +14 -0
  349. package/dist/components/layout/SWCPageLayout.js.map +1 -0
  350. package/dist/components/menu/ComplexMenu.js.map +1 -1
  351. package/dist/components/row_renderers/utils/ChipContainer.js.map +1 -1
  352. package/dist/components/styled/StyledPopover.js.map +1 -1
  353. package/dist/components/table/CsvPreview/CsvPreview.js +2 -1
  354. package/dist/components/table/CsvPreview/CsvPreview.js.map +1 -1
  355. package/dist/components/table/CsvPreview/CsvPreviewDialog.js.map +1 -1
  356. package/dist/components/trash/TrashCanList.js.map +1 -1
  357. package/dist/components/widgets/FileHandleLink.js.map +1 -1
  358. package/dist/components/widgets/RangeSlider/RangeSlider.js.map +1 -1
  359. package/dist/components/widgets/SynapseVideo.js.map +1 -1
  360. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  361. package/dist/components/widgets/facet-nav/PlotsContainer.js.map +1 -1
  362. package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js.map +1 -1
  363. package/dist/components/widgets/facet-nav/useFacetPlots.js.map +1 -1
  364. package/dist/components/widgets/query-filter/CombinedRangeFacetFilter.js.map +1 -1
  365. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  366. package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
  367. package/dist/components/widgets/query-filter/RangeFacetFilter.js.map +1 -1
  368. package/dist/components/widgets/query-filter/RangeFacetFilterUI.js.map +1 -1
  369. package/dist/features/curator/GridPage/components/GridPageTitle.d.ts.map +1 -1
  370. package/dist/features/curator/GridPage/components/GridPageTitle.js +23 -30
  371. package/dist/features/curator/GridPage/components/GridPageTitle.js.map +1 -1
  372. package/dist/features/curator/dashboard/CuratorDashboard.d.ts +2 -0
  373. package/dist/features/curator/dashboard/CuratorDashboard.d.ts.map +1 -0
  374. package/dist/features/curator/dashboard/CuratorDashboard.js +45 -0
  375. package/dist/features/curator/dashboard/CuratorDashboard.js.map +1 -0
  376. package/dist/features/curator/dashboard/components/CurationTaskCard.css +1 -0
  377. package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts +9 -0
  378. package/dist/features/curator/dashboard/components/CurationTaskCard.d.ts.map +1 -0
  379. package/dist/features/curator/dashboard/components/CurationTaskCard.js +106 -0
  380. package/dist/features/curator/dashboard/components/CurationTaskCard.js.map +1 -0
  381. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js +12 -0
  382. package/dist/features/curator/dashboard/components/CurationTaskCard.module.js.map +1 -0
  383. package/dist/features/curator/dashboard/components/CurationTaskCard.module.scss +52 -0
  384. package/dist/features/curator/dashboard/components/NextStepButton.css +1 -0
  385. package/dist/features/curator/dashboard/components/NextStepButton.d.ts +14 -0
  386. package/dist/features/curator/dashboard/components/NextStepButton.d.ts.map +1 -0
  387. package/dist/features/curator/dashboard/components/NextStepButton.js +35 -0
  388. package/dist/features/curator/dashboard/components/NextStepButton.js.map +1 -0
  389. package/dist/features/curator/dashboard/components/NextStepButton.module.js +11 -0
  390. package/dist/features/curator/dashboard/components/NextStepButton.module.js.map +1 -0
  391. package/dist/features/curator/dashboard/components/NextStepButton.module.scss +57 -0
  392. package/dist/features/curator/dashboard/components/UserOrTeamChip.css +1 -1
  393. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js +1 -1
  394. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.js.map +1 -1
  395. package/dist/features/curator/dashboard/components/UserOrTeamChip.module.scss +5 -5
  396. package/dist/features/curator/dashboard/components/shared.css +1 -0
  397. package/dist/features/curator/dashboard/components/shared.module.js +5 -0
  398. package/dist/features/curator/dashboard/components/shared.module.js.map +1 -0
  399. package/dist/features/curator/dashboard/components/shared.module.scss +8 -0
  400. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts +0 -2
  401. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.d.ts.map +1 -1
  402. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js +16 -34
  403. package/dist/features/entity/metadata-task/components/MetadataTaskTableActionCell.js.map +1 -1
  404. package/dist/features/entity/metadata-task/components/MetadataTasksTableAssigneeCell.js.map +1 -1
  405. package/dist/features/entity/metadata-task/hooks/useGetOrCreateGridSessionForSource.js.map +1 -1
  406. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask.js.map +1 -1
  407. package/dist/features/entity/metadata-task/hooks/useGridSessionForCurationTask_legacy.js.map +1 -1
  408. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js +1 -1
  409. package/dist/features/entity/metadata-task/hooks/useMetadataTaskTable.js.map +1 -1
  410. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts +10 -0
  411. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.d.ts.map +1 -0
  412. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js +37 -0
  413. package/dist/features/entity/metadata-task/hooks/useOpenCuratorButton.js.map +1 -0
  414. package/dist/features/entity/metadata-task/utils/constants.d.ts +5 -0
  415. package/dist/features/entity/metadata-task/utils/constants.d.ts.map +1 -0
  416. package/dist/features/entity/metadata-task/utils/constants.js +6 -0
  417. package/dist/features/entity/metadata-task/utils/constants.js.map +1 -0
  418. package/dist/mocks/challenge/mockChallenge.js.map +1 -1
  419. package/dist/mocks/entity/mockDataset.js.map +1 -1
  420. package/dist/mocks/entity/mockDatasetCollection.js.map +1 -1
  421. package/dist/mocks/entity/mockFileEntity.js.map +1 -1
  422. package/dist/mocks/entity/mockFileView.js.map +1 -1
  423. package/dist/mocks/entity/mockGeneratedEntityData.js.map +1 -1
  424. package/dist/mocks/entity/mockProject.js.map +1 -1
  425. package/dist/mocks/entity/mockProjectView.js.map +1 -1
  426. package/dist/mocks/entity/mockRootEntity.js.map +1 -1
  427. package/dist/mocks/entity/mockTableEntity.js.map +1 -1
  428. package/dist/mocks/mockWiki.js.map +1 -1
  429. package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
  430. package/dist/mocks/msw/handlers/challengeHandlers.js.map +1 -1
  431. package/dist/mocks/msw/handlers/changePasswordHandlers.js.map +1 -1
  432. package/dist/mocks/msw/handlers/discussionHandlers.js.map +1 -1
  433. package/dist/mocks/msw/handlers/entityHandlers.js.map +1 -1
  434. package/dist/mocks/msw/handlers/fileHandlers.js.map +1 -1
  435. package/dist/mocks/msw/handlers/gridHandlers.js.map +1 -1
  436. package/dist/mocks/msw/handlers/personalAccessTokenHandlers.js.map +1 -1
  437. package/dist/mocks/msw/handlers/subscriptionHandlers.js.map +1 -1
  438. package/dist/mocks/msw/handlers/teamHandlers.js.map +1 -1
  439. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  440. package/dist/mocks/msw/handlers/wikiHandlers.js.map +1 -1
  441. package/dist/mocks/provenance/mockActivity.js.map +1 -1
  442. package/dist/mocks/query/mockReleaseCardsTableQueryResultBundle.js.map +1 -1
  443. package/dist/ror-client/index.js.map +1 -1
  444. package/dist/style/components/_cards.scss +4 -0
  445. package/dist/style/components/_data-grid-extra.css +1 -1
  446. package/dist/style/components/_data-grid-extra.scss +2 -0
  447. package/dist/style/main.css +1 -1
  448. package/dist/synapse-client/HttpClient.js.map +1 -1
  449. package/dist/synapse-client/SynapseClient.js.map +1 -1
  450. package/dist/synapse-queries/QueryMatching.test-utils.js.map +1 -1
  451. package/dist/synapse-queries/auth/useTwoFactorEnrollment.js.map +1 -1
  452. package/dist/synapse-queries/curation/task/useCurationTask.d.ts +1 -1
  453. package/dist/synapse-queries/curation/task/useCurationTask.d.ts.map +1 -1
  454. package/dist/synapse-queries/curation/task/useCurationTask.js +1 -1
  455. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  456. package/dist/synapse-queries/dataaccess/useRestrictionInformation.js.map +1 -1
  457. package/dist/synapse-queries/doi/useDOI.js.map +1 -1
  458. package/dist/synapse-queries/download/useDownloadList.js.map +1 -1
  459. package/dist/synapse-queries/entity/useEntity.js.map +1 -1
  460. package/dist/synapse-queries/entity/useEntityBundle.js.map +1 -1
  461. package/dist/synapse-queries/entity/useExportTableQueryToAnalysisPlatform.js.map +1 -1
  462. package/dist/synapse-queries/entity/useExportToTerra.js.map +1 -1
  463. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  464. package/dist/synapse-queries/entity/useSchema.js.map +1 -1
  465. package/dist/synapse-queries/file/UploadToS3.js.map +1 -1
  466. package/dist/synapse-queries/file/useDirectUploadToS3.js.map +1 -1
  467. package/dist/synapse-queries/file/useFiles.js.map +1 -1
  468. package/dist/synapse-queries/forum/useReply.js.map +1 -1
  469. package/dist/synapse-queries/forum/useThread.js.map +1 -1
  470. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts +2 -0
  471. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.d.ts.map +1 -1
  472. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  473. package/dist/synapse-queries/grid/useExportGrid.js.map +1 -1
  474. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  475. package/dist/synapse-queries/grid/useImportCsvIntoGrid.js.map +1 -1
  476. package/dist/synapse-queries/subscription/useSubscription.js.map +1 -1
  477. package/dist/synapse-queries/table/useGetCsvPreview.js.map +1 -1
  478. package/dist/synapse-queries/table/useTableUpdateTransaction.js.map +1 -1
  479. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  480. package/dist/synapse-queries/user/useGetUserChallenges.js.map +1 -1
  481. package/dist/synapse-queries/user/useUserBundle.js.map +1 -1
  482. package/dist/synapse-queries/user/useUserGroupHeader.js.map +1 -1
  483. package/dist/testutils/ReactQueryMockUtils.js.map +1 -1
  484. package/dist/theme/ThemeProvider.js.map +1 -1
  485. package/dist/tsconfig.build.tsbuildinfo +1 -1
  486. package/dist/utils/AppUtils/session/SynapseSessionManager.js.map +1 -1
  487. package/dist/utils/AppUtils/session/useSessionManager.js.map +1 -1
  488. package/dist/utils/PermissionLevelToAccessType.js.map +1 -1
  489. package/dist/utils/challenge/evaluation/EvaluationUtils.js.map +1 -1
  490. package/dist/utils/context/SynapseContext.js.map +1 -1
  491. package/dist/utils/functions/AccessControlListUtils.d.ts +4 -0
  492. package/dist/utils/functions/AccessControlListUtils.d.ts.map +1 -1
  493. package/dist/utils/functions/AccessControlListUtils.js +12 -1
  494. package/dist/utils/functions/AccessControlListUtils.js.map +1 -1
  495. package/dist/utils/functions/GridApiUtils.js.map +1 -1
  496. package/dist/utils/functions/QueryFilterUtils.js.map +1 -1
  497. package/dist/utils/functions/RealmUtils.d.ts +4 -0
  498. package/dist/utils/functions/RealmUtils.d.ts.map +1 -1
  499. package/dist/utils/functions/RealmUtils.js +9 -3
  500. package/dist/utils/functions/RealmUtils.js.map +1 -1
  501. package/dist/utils/functions/SanitizeHtmlUtils.js.map +1 -1
  502. package/dist/utils/functions/SanitizeHtmlUtils.test-utils.js.map +1 -1
  503. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  504. package/dist/utils/functions/StringUtils.js.map +1 -1
  505. package/dist/utils/functions/deepLinkingUtils.js.map +1 -1
  506. package/dist/utils/functions/getDataFromFromStorage.js.map +1 -1
  507. package/dist/utils/functions/getEndpoint.js.map +1 -1
  508. package/dist/utils/functions/getUserData.js.map +1 -1
  509. package/dist/utils/functions/queryUtils.js.map +1 -1
  510. package/dist/utils/functions/testDownloadSpeed.js.map +1 -1
  511. package/dist/utils/hooks/useConfirmItems.js.map +1 -1
  512. package/dist/utils/hooks/useCookiePreferences.js.map +1 -1
  513. package/dist/utils/hooks/useCreateShortUrl.js.map +1 -1
  514. package/dist/utils/hooks/useDetectSSOCode.js.map +1 -1
  515. package/dist/utils/hooks/useDirectDownloadHandler.js.map +1 -1
  516. package/dist/utils/hooks/useGetGoalData.js.map +1 -1
  517. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  518. package/dist/utils/hooks/useImageUrlUtils.js.map +1 -1
  519. package/dist/utils/hooks/useImmutableTableQuery/useImmutableTableQuery.js.map +1 -1
  520. package/dist/utils/hooks/useImmutableTableQuery/useTableQueryReducer.js.map +1 -1
  521. package/dist/utils/hooks/useIsBot.js.map +1 -1
  522. package/dist/utils/hooks/useListState.js.map +1 -1
  523. package/dist/utils/hooks/useLogin.d.ts.map +1 -1
  524. package/dist/utils/hooks/useLogin.js +53 -52
  525. package/dist/utils/hooks/useLogin.js.map +1 -1
  526. package/dist/utils/hooks/useMutuallyExclusiveState.js.map +1 -1
  527. package/dist/utils/hooks/useOverlay.js.map +1 -1
  528. package/dist/utils/hooks/usePreFetchResource.js.map +1 -1
  529. package/dist/utils/hooks/useQuerySearchParam.js.map +1 -1
  530. package/dist/utils/hooks/useScrollFadeTransition.js.map +1 -1
  531. package/dist/utils/hooks/useSet.js.map +1 -1
  532. package/dist/utils/hooks/useSourceAppConfigs.js.map +1 -1
  533. package/dist/utils/hooks/useTableImageUrl.js.map +1 -1
  534. package/dist/utils/hooks/useUploadFileEntity/useCreatePathsAndGetParentId.js.map +1 -1
  535. package/dist/utils/hooks/useUploadFileEntity/useLinkFileEntityToURL.js.map +1 -1
  536. package/dist/utils/hooks/useUploadFileEntity/usePrepareFileEntityUpload.js.map +1 -1
  537. package/dist/utils/hooks/useUploadFileEntity/useTrackFileUploads.js.map +1 -1
  538. package/dist/utils/hooks/useUploadFileEntity/useUploadFileEntities.js.map +1 -1
  539. package/dist/utils/hooks/useUploadFileEntity/useUploadFiles.js.map +1 -1
  540. package/dist/utils/hooks/useUploadFileEntity/willUploadsExceedStorageLimit.js.map +1 -1
  541. package/dist/utils/html/TargetEnum.js.map +1 -1
  542. package/dist/utils/jsonschema/SchemaAnnotationUtils.js.map +1 -1
  543. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"GoalsV3.js","names":[],"sources":["../../../src/components/GoalsV3/GoalsV3.tsx"],"sourcesContent":["import React from 'react'\nimport useGetQueryResultBundle from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { SynapseConstants } from '@/utils'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport useGetGoalData from '@/utils/hooks/useGetGoalData'\nimport useShowDesktop from '@/utils/hooks/useShowDesktop'\nimport { Box } from '@mui/material'\nimport { QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { ErrorBanner } from '../error'\nimport GoalsV3Desktop from './GoalsV3.Desktop'\nimport GoalsV3Mobile from './GoalsV3.Mobile'\n\nexport type GoalsV3Props = {\n entityId: string\n svgComponentMap: Record<string, React.FC<React.SVGProps<SVGSVGElement>>>\n}\n\nexport type GoalsV3CardProps = {\n countSql?: string\n title: string\n summary: string\n link: string\n svgIconComponent?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nenum ExpectedColumns {\n TABLEID = 'TableId',\n COUNT_SQL = 'CountSql',\n TITLE = 'Title',\n SUMMARY = 'Summary',\n LINK = 'Link',\n ICON_KEY = 'iconKey',\n}\n\n// PORTALS-2367\nconst GOALSV2_DESKTOP_MIN_BREAKPOINT = 1200\n\nconst GoalsV3 = ({\n entityId,\n svgComponentMap,\n}: GoalsV3Props): React.ReactNode => {\n const showDesktop = useShowDesktop(GOALSV2_DESKTOP_MIN_BREAKPOINT)\n const queryBundleRequest: QueryBundleRequest = {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId,\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n query: {\n sql: `select *\n from ${entityId}\n order by ItemOrder`,\n },\n }\n const { data: queryResultBundle } =\n useGetQueryResultBundle(queryBundleRequest)\n\n const { error } = useGetGoalData(entityId, queryResultBundle)\n\n const tableIdColumnIndex = getFieldIndex(\n ExpectedColumns.TABLEID,\n queryResultBundle,\n )\n const countSqlColumnIndex = getFieldIndex(\n ExpectedColumns.COUNT_SQL,\n queryResultBundle,\n )\n\n const titleColumnIndex = getFieldIndex(\n ExpectedColumns.TITLE,\n queryResultBundle,\n )\n const summaryColumnIndex = getFieldIndex(\n ExpectedColumns.SUMMARY,\n queryResultBundle,\n )\n const linkColumnIndex = getFieldIndex(ExpectedColumns.LINK, queryResultBundle)\n\n const iconKeyColumnIndex = getFieldIndex(\n ExpectedColumns.ICON_KEY,\n queryResultBundle,\n )\n\n const goalsDataArray: GoalsV3CardProps[] =\n queryResultBundle?.queryResult!.queryResults.rows.map(el => {\n const values = el.values as string[]\n if (values.some(value => value === null)) {\n console.warn('Row has null value(s) when no nulls expected')\n }\n const tableId =\n tableIdColumnIndex > -1 ? values[tableIdColumnIndex] : undefined\n let countSql\n if (countSqlColumnIndex > -1 && values[countSqlColumnIndex] !== null) {\n countSql = values[countSqlColumnIndex]\n } else if (tableId) {\n countSql = `SELECT * FROM ${tableId}`\n }\n const title = values[titleColumnIndex]\n const summary = values[summaryColumnIndex]\n const link = values[linkColumnIndex]\n const iconKey = values[iconKeyColumnIndex]\n\n const svgIconComponent = iconKey\n ? svgComponentMap?.[iconKey.toLowerCase().replace(/\\s+/g, '_')]\n : undefined\n\n return {\n countSql,\n title,\n summary,\n link,\n svgIconComponent,\n }\n }) ?? []\n\n const ContentComponent = showDesktop ? GoalsV3Desktop : GoalsV3Mobile\n\n return (\n <Box>\n {error && <ErrorBanner error={error} />}\n <div className={`Goals`}>\n <Box\n sx={{\n display: 'flex',\n gap: showDesktop ? '10px' : '0',\n flexDirection: showDesktop ? 'row' : 'column',\n justifyContent: 'center',\n }}\n >\n {goalsDataArray.map((row, index) => (\n <ContentComponent key={index} {...row} />\n ))}\n </Box>\n </div>\n </Box>\n )\n}\n\nexport default GoalsV3\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAK,IAAL,yBAAA,GAAA;QACE,EAAA,UAAA,WACA,EAAA,YAAA,YACA,EAAA,QAAA,SACA,EAAA,UAAA,WACA,EAAA,OAAA,QACA,EAAA,WAAA;EANG,KAAA,EAAA,CAOJ,EAGK,IAAiC,MAEjC,KAAW,EACf,aACA,yBACmC;CACnC,IAAM,IAAc,EAAe,EAA+B,EAa5D,EAAE,MAAM,MACZ,EAb6C;EAC7C,cAAc;EACd;EACA,UACE;EAEF,OAAO,EACL,KAAK;uBACY,EAAS;qCAE3B;EACF,CAE4C,EAEvC,EAAE,aAAU,EAAe,GAAU,EAAkB,EAEvD,IAAqB,EACzB,EAAgB,SAChB,EACD,EACK,IAAsB,EAC1B,EAAgB,WAChB,EACD,EAEK,IAAmB,EACvB,EAAgB,OAChB,EACD,EACK,IAAqB,EACzB,EAAgB,SAChB,EACD,EACK,IAAkB,EAAc,EAAgB,MAAM,EAAkB,EAExE,IAAqB,EACzB,EAAgB,UAChB,EACD,EAEK,IACJ,GAAmB,YAAa,aAAa,KAAK,KAAI,MAAM;EAC1D,IAAM,IAAS,EAAG;AAClB,EAAI,EAAO,MAAK,MAAS,MAAU,KAAK,IACtC,QAAQ,KAAK,+CAA+C;EAE9D,IAAM,IACJ,IAAqB,KAAK,EAAO,KAAsB,KAAA,GACrD;AACJ,EAAI,IAAsB,MAAM,EAAO,OAAyB,OAC9D,IAAW,EAAO,KACT,MACT,IAAW,iBAAiB;EAE9B,IAAM,IAAQ,EAAO,IACf,IAAU,EAAO,IACjB,IAAO,EAAO,IACd,IAAU,EAAO,IAEjB,IAAmB,IACrB,IAAkB,EAAQ,aAAa,CAAC,QAAQ,QAAQ,IAAI,IAC5D,KAAA;AAEJ,SAAO;GACL;GACA;GACA;GACA;GACA;GACD;GACD,IAAI,EAAE,EAEJ,IAAmB,IAAc,IAAiB;AAExD,QACE,kBAAC,GAAD,EAAA,UAAA,CACG,KAAS,kBAAC,GAAD,EAAoB,UAAS,CAAA,EACvC,kBAAC,OAAD;EAAK,WAAW;YACd,kBAAC,GAAD;GACE,IAAI;IACF,SAAS;IACT,KAAK,IAAc,SAAS;IAC5B,eAAe,IAAc,QAAQ;IACrC,gBAAgB;IACjB;aAEA,EAAe,KAAK,GAAK,MACxB,kBAAC,GAAD,EAA8B,GAAI,GAAO,EAAlB,EAAkB,CACzC;GACE,CAAA;EACF,CAAA,CACF,EAAA,CAAA"}
1
+ {"version":3,"file":"GoalsV3.js","names":[],"sources":["../../../src/components/GoalsV3/GoalsV3.tsx"],"sourcesContent":["import React from 'react'\nimport useGetQueryResultBundle from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { SynapseConstants } from '@/utils'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport useGetGoalData from '@/utils/hooks/useGetGoalData'\nimport useShowDesktop from '@/utils/hooks/useShowDesktop'\nimport { Box } from '@mui/material'\nimport { QueryBundleRequest } from '@sage-bionetworks/synapse-types'\nimport { ErrorBanner } from '../error'\nimport GoalsV3Desktop from './GoalsV3.Desktop'\nimport GoalsV3Mobile from './GoalsV3.Mobile'\n\nexport type GoalsV3Props = {\n entityId: string\n svgComponentMap: Record<string, React.FC<React.SVGProps<SVGSVGElement>>>\n}\n\nexport type GoalsV3CardProps = {\n countSql?: string\n title: string\n summary: string\n link: string\n svgIconComponent?: React.FC<React.SVGProps<SVGSVGElement>>\n}\n\nenum ExpectedColumns {\n TABLEID = 'TableId',\n COUNT_SQL = 'CountSql',\n TITLE = 'Title',\n SUMMARY = 'Summary',\n LINK = 'Link',\n ICON_KEY = 'iconKey',\n}\n\n// PORTALS-2367\nconst GOALSV2_DESKTOP_MIN_BREAKPOINT = 1200\n\nconst GoalsV3 = ({\n entityId,\n svgComponentMap,\n}: GoalsV3Props): React.ReactNode => {\n const showDesktop = useShowDesktop(GOALSV2_DESKTOP_MIN_BREAKPOINT)\n const queryBundleRequest: QueryBundleRequest = {\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n entityId,\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n query: {\n sql: `select *\n from ${entityId}\n order by ItemOrder`,\n },\n }\n const { data: queryResultBundle } =\n useGetQueryResultBundle(queryBundleRequest)\n\n const { error } = useGetGoalData(entityId, queryResultBundle)\n\n const tableIdColumnIndex = getFieldIndex(\n ExpectedColumns.TABLEID,\n queryResultBundle,\n )\n const countSqlColumnIndex = getFieldIndex(\n ExpectedColumns.COUNT_SQL,\n queryResultBundle,\n )\n\n const titleColumnIndex = getFieldIndex(\n ExpectedColumns.TITLE,\n queryResultBundle,\n )\n const summaryColumnIndex = getFieldIndex(\n ExpectedColumns.SUMMARY,\n queryResultBundle,\n )\n const linkColumnIndex = getFieldIndex(ExpectedColumns.LINK, queryResultBundle)\n\n const iconKeyColumnIndex = getFieldIndex(\n ExpectedColumns.ICON_KEY,\n queryResultBundle,\n )\n\n const goalsDataArray: GoalsV3CardProps[] =\n queryResultBundle?.queryResult!.queryResults.rows.map(el => {\n const values = el.values as string[]\n if (values.some(value => value === null)) {\n console.warn('Row has null value(s) when no nulls expected')\n }\n const tableId =\n tableIdColumnIndex > -1 ? values[tableIdColumnIndex] : undefined\n let countSql\n if (countSqlColumnIndex > -1 && values[countSqlColumnIndex] !== null) {\n countSql = values[countSqlColumnIndex]\n } else if (tableId) {\n countSql = `SELECT * FROM ${tableId}`\n }\n const title = values[titleColumnIndex]\n const summary = values[summaryColumnIndex]\n const link = values[linkColumnIndex]\n const iconKey = values[iconKeyColumnIndex]\n\n const svgIconComponent = iconKey\n ? svgComponentMap?.[iconKey.toLowerCase().replace(/\\s+/g, '_')]\n : undefined\n\n return {\n countSql,\n title,\n summary,\n link,\n svgIconComponent,\n }\n }) ?? []\n\n const ContentComponent = showDesktop ? GoalsV3Desktop : GoalsV3Mobile\n\n return (\n <Box>\n {error && <ErrorBanner error={error} />}\n <div className={`Goals`}>\n <Box\n sx={{\n display: 'flex',\n gap: showDesktop ? '10px' : '0',\n flexDirection: showDesktop ? 'row' : 'column',\n justifyContent: 'center',\n }}\n >\n {goalsDataArray.map((row, index) => (\n <ContentComponent key={index} {...row} />\n ))}\n </Box>\n </div>\n </Box>\n )\n}\n\nexport default GoalsV3\n"],"mappings":";;;;;;;;;;;;;;AAyBA,IAAK,IAAL,yBAAA,GAAA;QACE,EAAA,UAAU,WACV,EAAA,YAAY,YACZ,EAAA,QAAQ,SACR,EAAA,UAAU,WACV,EAAA,OAAO,QACP,EAAA,WAAW;EANR,KAAA,EAAA,CAOJ,EAGK,IAAiC,MAEjC,KAAW,EACf,aACA,yBACmC;CACnC,IAAM,IAAc,EAAe,EAA+B,EAa5D,EAAE,MAAM,MACZ,EAAwB;EAZxB,cAAc;EACd;EACA,UACE;EAEF,OAAO,EACL,KAAK;uBACY,EAAS;qCA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seUserMarker.tsx"],"sourcesContent":["import { GeoData } from '@/synapse-client'\nimport { Divider, Typography } from '@mui/material'\nimport { InfoWindow, Marker } from '@react-google-maps/api'\nimport { Fragment, useMemo } from 'react'\nimport { UserBadge } from '../UserCard/UserBadge'\n\nconst MAP_MARKER_IMAGE_URL =\n 'https://s3.amazonaws.com/static.synapse.org/images/synapse-map-marker.png'\n\ntype SynapseUserMarkerProps = {\n /** The location and users that this point represents */\n geoData: GeoData\n /** Whether to show the list of users in a pop-up modal */\n showInfoWindow: boolean\n /** Invoked when the marker is clicked */\n onClick: () => void\n /** Invoked when the InfoWindow close button is clicked */\n onInfoWindowCloseClick: () => void\n}\n\n/**\n * A Google Maps marker that represents a particular location for one or more Synapse users.\n * @param props\n * @returns\n */\nexport function SynapseUserMarker(props: SynapseUserMarkerProps) {\n const { geoData, showInfoWindow, onClick, onInfoWindowCloseClick } = props\n const position = useMemo(\n () => ({\n lat: geoData.latLng[0],\n lng: geoData.latLng[1],\n }),\n [geoData.latLng],\n )\n\n const options = useMemo(\n () => ({\n icon: {\n url: MAP_MARKER_IMAGE_URL,\n size: new google.maps.Size(20, 32),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(0, 32),\n },\n }),\n [],\n )\n return (\n <Marker onClick={onClick} position={position} options={options}>\n {showInfoWindow && (\n <InfoWindow onCloseClick={onInfoWindowCloseClick}>\n <>\n <Typography variant=\"body1\" component={'span'}>\n {geoData.location}\n </Typography>\n <Divider />\n {geoData.userIds.map(id => (\n <Fragment key={id}>\n <br />\n <UserBadge userId={id} openLinkInNewTab={true} />\n </Fragment>\n ))}\n </>\n </InfoWindow>\n )}\n </Marker>\n )\n}\n\nexport default SynapseUserMarker\n"],"mappings":";;;;;;AAMA,IAAM,IACJ;AAkBF,SAAgB,EAAkB,GAA+B;CAC/D,IAAM,EAAE,YAAS,mBAAgB,YAAS,8BAA2B;AAoBrE,QACE,kBAAC,GAAD;EAAiB;EAAmB,UApBrB,SACR;GACL,KAAK,EAAQ,OAAO;GACpB,KAAK,EAAQ,OAAO;GACrB,GACD,CAAC,EAAQ,OAAO,CACjB;EAcwD,SAZzC,SACP,EACL,MAAM;GACJ,KAAK;GACL,MAAM,IAAI,OAAO,KAAK,KAAK,IAAI,GAAG;GAClC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAG,EAAE;GACnC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAG,GAAG;GACrC,EACF,GACD,EAAE,CACH;YAGI,KACC,kBAAC,GAAD;GAAY,cAAc;aACxB,kBAAA,GAAA,EAAA,UAAA;IACE,kBAAC,GAAD;KAAY,SAAQ;KAAQ,WAAW;eACpC,EAAQ;KACE,CAAA;IACb,kBAAC,GAAD,EAAW,CAAA;IACV,EAAQ,QAAQ,KAAI,MACnB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,MAAD,EAAM,CAAA,EACN,kBAAC,GAAD;KAAW,QAAQ;KAAI,kBAAkB;KAAQ,CAAA,CACxC,EAAA,EAHI,EAGJ,CACX;IACD,EAAA,CAAA;GACQ,CAAA;EAER,CAAA"}
1
+ {"version":3,"file":"SynapseUserMarker.js","names":[],"sources":["../../../src/components/GoogleMap/SynapseUserMarker.tsx"],"sourcesContent":["import { GeoData } from '@/synapse-client'\nimport { Divider, Typography } from '@mui/material'\nimport { InfoWindow, Marker } from '@react-google-maps/api'\nimport { Fragment, useMemo } from 'react'\nimport { UserBadge } from '../UserCard/UserBadge'\n\nconst MAP_MARKER_IMAGE_URL =\n 'https://s3.amazonaws.com/static.synapse.org/images/synapse-map-marker.png'\n\ntype SynapseUserMarkerProps = {\n /** The location and users that this point represents */\n geoData: GeoData\n /** Whether to show the list of users in a pop-up modal */\n showInfoWindow: boolean\n /** Invoked when the marker is clicked */\n onClick: () => void\n /** Invoked when the InfoWindow close button is clicked */\n onInfoWindowCloseClick: () => void\n}\n\n/**\n * A Google Maps marker that represents a particular location for one or more Synapse users.\n * @param props\n * @returns\n */\nexport function SynapseUserMarker(props: SynapseUserMarkerProps) {\n const { geoData, showInfoWindow, onClick, onInfoWindowCloseClick } = props\n const position = useMemo(\n () => ({\n lat: geoData.latLng[0],\n lng: geoData.latLng[1],\n }),\n [geoData.latLng],\n )\n\n const options = useMemo(\n () => ({\n icon: {\n url: MAP_MARKER_IMAGE_URL,\n size: new google.maps.Size(20, 32),\n origin: new google.maps.Point(0, 0),\n anchor: new google.maps.Point(0, 32),\n },\n }),\n [],\n )\n return (\n <Marker onClick={onClick} position={position} options={options}>\n {showInfoWindow && (\n <InfoWindow onCloseClick={onInfoWindowCloseClick}>\n <>\n <Typography variant=\"body1\" component={'span'}>\n {geoData.location}\n </Typography>\n <Divider />\n {geoData.userIds.map(id => (\n <Fragment key={id}>\n <br />\n <UserBadge userId={id} openLinkInNewTab={true} />\n </Fragment>\n ))}\n </>\n </InfoWindow>\n )}\n </Marker>\n )\n}\n\nexport default SynapseUserMarker\n"],"mappings":";;;;;;AAMA,IAAM,IACJ;AAkBF,SAAgB,EAAkB,GAA+B;CAC/D,IAAM,EAAE,YAAS,mBAAgB,YAAS,8BAA2B;AAoBrE,QACE,kBAAC,GAAD;EAAiB;EAAmB,UApBrB,SACR;GACL,KAAK,EAAQ,OAAO;GACpB,KAAK,EAAQ,OAAO;GACrB,GACD,CAAC,EAAQ,OAAO,CAeoB;EAAmB,SAZzC,SACP,EACL,MAAM;GACJ,KAAK;GACL,MAAM,IAAI,OAAO,KAAK,KAAK,IAAI,GAAG;GAClC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAG,EAAE;GACnC,QAAQ,IAAI,OAAO,KAAK,MAAM,GAAG,GAAG;GACrC,EACF,GACD,EAAE,CAGqD;YACpD,KACC,kBAAC,GAAD;GAAY,cAAc;aACxB,kBAAA,GAAA,EAAA,UAAA;IACE,kBAAC,GAAD;KAAY,SAAQ;KAAQ,WAAW;eACpC,EAAQ;KACE,CAAA;IACb,kBAAC,GAAD,EAAW,CAAA;IACV,EAAQ,QAAQ,KAAI,MACnB,kBAAC,GAAD,EAAA,UAAA,CACE,kBAAC,MAAD,EAAM,CAAA,EACN,kBAAC,GAAD;KAAW,QAAQ;KAAI,kBAAkB;KAAQ,CAAA,CACxC,EAAA,EAHI,EAGJ,CACX;IACD,EAAA,CAAA;GACQ,CAAA;EAER,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AccessIcon.js","names":[],"sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"sourcesContent":["import { SxProps, Theme, useTheme } from '@mui/material'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\nexport enum RestrictionUiType {\n Accessible = 'Accessible',\n AccessibleWithTerms = 'AccessibleWithTerms',\n AccessBlockedByRestriction = 'AccessBlockedByRestriction',\n AccessBlockedByRestrictionWithPendingRequest = 'AccessBlockedByRestrictionWithPendingRequest',\n AccessBlockedByRestrictionWithPendingExternalRequest = 'AccessBlockedByRestrictionWithPendingExternalRequest',\n AccessBlockedByRestrictionWithPendingRDCADAPRequest = 'AccessBlockedByRestrictionWithPendingRDCADAPRequest',\n AccessBlockedByRestrictionWithRejectedRDCADAPRequest = 'AccessBlockedByRestrictionWithRejectedRDCADAPRequest',\n AccessBlockedByACL = 'AccessBlockedByACL',\n AccessBlockedToAnonymous = 'AccessBlockedToAnonymous',\n AccessibleExternalFileHandle = 'AccessibleExternalFileHandle',\n}\n\nconst iconConfiguration: Record<\n RestrictionUiType,\n { icon: IconName; color: (theme: Theme) => string; tooltipText: string }\n> = {\n [RestrictionUiType.AccessBlockedToAnonymous]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must sign in to access this item.',\n },\n [RestrictionUiType.AccessBlockedByRestriction]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must request access to this restricted item.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRequest]: {\n icon: 'accessPending',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingExternalRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText:\n 'Your access request is pending approval from an external system.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRDCADAPRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithRejectedRDCADAPRequest]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request has been denied by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByACL]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You do not have download access for this item.',\n },\n [RestrictionUiType.AccessibleWithTerms]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'View Terms',\n },\n [RestrictionUiType.Accessible]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'You have access to this item.',\n },\n [RestrictionUiType.AccessibleExternalFileHandle]: {\n icon: 'linkOff',\n color: theme => theme.palette.grey[700],\n tooltipText: 'Access may be controlled by an external system.',\n },\n}\n\nfunction AccessIcon(props: {\n restrictionUiType: RestrictionUiType\n wrap?: boolean\n sx?: SxProps<Theme>\n}) {\n const { restrictionUiType, wrap = true, sx } = props\n const theme = useTheme()\n if (restrictionUiType) {\n const configuration = iconConfiguration[restrictionUiType]\n return (\n <IconSvg\n icon={configuration.icon}\n label={configuration.tooltipText}\n wrap={wrap}\n sx={{\n color: configuration.color(theme),\n height: '16px',\n verticalAlign: 'text-top',\n ...sx,\n }}\n />\n )\n }\n // nothing is rendered until downloadType is determined\n return <></>\n}\n\nexport default AccessIcon\n"],"mappings":";;;;AAGA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,aAAA,cACA,EAAA,sBAAA,uBACA,EAAA,6BAAA,8BACA,EAAA,+CAAA,gDACA,EAAA,uDAAA,wDACA,EAAA,sDAAA,u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;IACJ;GACD,CAAA;;AAIN,QAAO,kBAAA,GAAA,EAAK,CAAA"}
1
+ {"version":3,"file":"AccessIcon.js","names":[],"sources":["../../../src/components/HasAccess/AccessIcon.tsx"],"sourcesContent":["import { SxProps, Theme, useTheme } from '@mui/material'\nimport IconSvg, { IconName } from '../IconSvg/IconSvg'\n\nexport enum RestrictionUiType {\n Accessible = 'Accessible',\n AccessibleWithTerms = 'AccessibleWithTerms',\n AccessBlockedByRestriction = 'AccessBlockedByRestriction',\n AccessBlockedByRestrictionWithPendingRequest = 'AccessBlockedByRestrictionWithPendingRequest',\n AccessBlockedByRestrictionWithPendingExternalRequest = 'AccessBlockedByRestrictionWithPendingExternalRequest',\n AccessBlockedByRestrictionWithPendingRDCADAPRequest = 'AccessBlockedByRestrictionWithPendingRDCADAPRequest',\n AccessBlockedByRestrictionWithRejectedRDCADAPRequest = 'AccessBlockedByRestrictionWithRejectedRDCADAPRequest',\n AccessBlockedByACL = 'AccessBlockedByACL',\n AccessBlockedToAnonymous = 'AccessBlockedToAnonymous',\n AccessibleExternalFileHandle = 'AccessibleExternalFileHandle',\n}\n\nconst iconConfiguration: Record<\n RestrictionUiType,\n { icon: IconName; color: (theme: Theme) => string; tooltipText: string }\n> = {\n [RestrictionUiType.AccessBlockedToAnonymous]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must sign in to access this item.',\n },\n [RestrictionUiType.AccessBlockedByRestriction]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You must request access to this restricted item.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRequest]: {\n icon: 'accessPending',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingExternalRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText:\n 'Your access request is pending approval from an external system.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithPendingRDCADAPRequest]: {\n icon: 'accessPendingCloud',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request is pending approval by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByRestrictionWithRejectedRDCADAPRequest]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'Your access request has been denied by RDCA-DAP.',\n },\n [RestrictionUiType.AccessBlockedByACL]: {\n icon: 'accessClosed',\n color: theme => theme.palette.warning.main,\n tooltipText: 'You do not have download access for this item.',\n },\n [RestrictionUiType.AccessibleWithTerms]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'View Terms',\n },\n [RestrictionUiType.Accessible]: {\n icon: 'accessOpen',\n color: theme => theme.palette.success.main,\n tooltipText: 'You have access to this item.',\n },\n [RestrictionUiType.AccessibleExternalFileHandle]: {\n icon: 'linkOff',\n color: theme => theme.palette.grey[700],\n tooltipText: 'Access may be controlled by an external system.',\n },\n}\n\nfunction AccessIcon(props: {\n restrictionUiType: RestrictionUiType\n wrap?: boolean\n sx?: SxProps<Theme>\n}) {\n const { restrictionUiType, wrap = true, sx } = props\n const theme = useTheme()\n if (restrictionUiType) {\n const configuration = iconConfiguration[restrictionUiType]\n return (\n <IconSvg\n icon={configuration.icon}\n label={configuration.tooltipText}\n wrap={wrap}\n sx={{\n color: configuration.color(theme),\n height: '16px',\n verticalAlign: 'text-top',\n ...sx,\n }}\n />\n )\n }\n // nothing is rendered until downloadType is determined\n return <></>\n}\n\nexport default AccessIcon\n"],"mappings":";;;;AAGA,IAAY,IAAL,yBAAA,GAAA;QACL,EAAA,aAAa,cACb,EAAA,sBAAsB,uBACtB,EAAA,6BAA6B,8BAC7B,EAAA,+CAA+C,gDAC/C,EAAA,uDAAuD,wDACvD,EAAA,sDAAsD,uDACtD,EAAA,uDAAuD,wDACvD,EAAA,qBAAqB,sBACrB,EAAA,2BAA2B,4BAC3B,EAAA,+BAA+B;KAChC,EAEK,IAGF;EACD,EAAkB,2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sources":["../../../src/components/HasAccess/useHasAccess.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport AccessIcon, { RestrictionUiType } from './AccessIcon'\nimport {\n AccessRequirement,\n EntityBundle,\n FileHandle,\n RestrictableObjectType,\n RestrictionLevel,\n} from '@sage-bionetworks/synapse-types'\nimport {\n implementsExternalFileHandleInterface,\n isFileEntity,\n SynapseClientError,\n useSynapseContext,\n} from '@/utils'\nimport {\n useGetEntityBundle,\n useGetRestrictionInformation,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport AccessRequirementList, {\n checkHasUnsupportedRequirement,\n} from '../AccessRequirementList/AccessRequirementList'\nimport { BackendDestinationEnum, getEndpoint } from '@/utils/functions'\nimport { UseQueryOptions } from '@tanstack/react-query'\nimport { SxProps, Theme } from '@mui/material'\n\n/**\n * This hook determines if\n * - the entity is a FileEntity, AND\n * - the caller has permission to fetch the dataFileHandle, AND\n * - the dataFileHandle is an instance of ExternalFileHandleInterface (i.e. the file is not controlled by Synapse)\n * Note that this requires an additional API call that cannot be batched, so it should be avoided in bulk contexts if possible.\n */\nfunction useGetIsExternalFileHandle(\n entityId: string,\n options: Partial<UseQueryOptions<EntityBundle, SynapseClientError, boolean>>,\n) {\n return useGetEntityBundle(entityId, undefined, undefined, {\n ...options,\n select: bundle => {\n if (!isFileEntity(bundle.entity)) {\n return false\n }\n const fileEntity = bundle.entity\n const fileHandles = bundle.fileHandles\n const fileHandle: FileHandle | undefined = fileHandles?.find(\n fileHandle => fileHandle.id === fileEntity.dataFileHandleId,\n )\n return fileHandle && implementsExternalFileHandleInterface(fileHandle)\n },\n })\n}\n\n/**\n * Determines whether an Entity is accessible for download, or if it is blocked by the ACL or unmet Access Requirements.\n *\n * To make download available, and determine if the file is downloadable via the web, see {@link DirectDownload.tsx}\n * @param entityId\n * @returns\n */\nexport function useGetRestrictionUiType(\n entityId: string,\n useGetIsExternalFileHandleOptions: Partial<\n UseQueryOptions<EntityBundle, SynapseClientError, boolean>\n >,\n): RestrictionUiType | undefined {\n const { isAuthenticated } = useSynapseContext()\n\n const { data: restrictionInformation } = useGetRestrictionInformation({\n restrictableObjectType: RestrictableObjectType.ENTITY,\n objectId: entityId,\n })\n\n const { data: isExternalFileHandle, isLoading: isLoadingExternalFile } =\n useGetIsExternalFileHandle(entityId, {\n enabled: useGetIsExternalFileHandleOptions.enabled,\n })\n\n if (!restrictionInformation) {\n return undefined\n }\n\n // Only check for external file handle if the feature is enabled\n if (useGetIsExternalFileHandleOptions.enabled) {\n if (isLoadingExternalFile) {\n return undefined\n }\n if (isExternalFileHandle) {\n return RestrictionUiType.AccessibleExternalFileHandle\n }\n }\n\n if (restrictionInformation.hasUnmetAccessRequirement) {\n return RestrictionUiType.AccessBlockedByRestriction\n }\n if (restrictionInformation.userEntityPermissions!.canDownload) {\n if (restrictionInformation.restrictionLevel !== RestrictionLevel.OPEN) {\n // Indicate that there are requirements, but they have been met\n return RestrictionUiType.AccessibleWithTerms\n } else {\n return RestrictionUiType.Accessible\n }\n }\n\n if (isAuthenticated) {\n return RestrictionUiType.AccessBlockedByACL\n }\n return RestrictionUiType.AccessBlockedToAnonymous\n}\n\n//* Get the access level text */\nfunction getAccessText(props: RestrictionUiType | undefined) {\n switch (props) {\n case RestrictionUiType.Accessible:\n return 'Open Access'\n case RestrictionUiType.AccessibleWithTerms:\n return 'View Terms'\n case RestrictionUiType.AccessBlockedByRestriction:\n return 'Request Access'\n case RestrictionUiType.AccessBlockedByACL:\n return 'Access Denied'\n case RestrictionUiType.AccessBlockedToAnonymous:\n return 'Sign In Required'\n case RestrictionUiType.AccessibleExternalFileHandle:\n return 'External Access'\n case undefined:\n return 'Loading...'\n default:\n return ''\n }\n}\n\n// A hook that handles the logic for computing the correct access level, getting the text, and the icon\nexport function useHasAccess(\n entityId: string,\n iconWrap: boolean = false,\n iconSx?: SxProps<Theme>,\n options: { showExternalAccessIcon?: boolean } = {},\n) {\n const [displayAccessRequirement, setDisplayAccessRequirement] =\n useState(false)\n const [accessRequirements, setAccessRequirements] = useState<\n AccessRequirement[]\n >([])\n\n const { accessToken } = useSynapseContext()\n const { showExternalAccessIcon = false } = options\n\n // get access level\n const restrictionUiType = useGetRestrictionUiType(entityId, {\n enabled: showExternalAccessIcon,\n })\n\n const { data: restrictionInformation } = useGetRestrictionInformation({\n restrictableObjectType: RestrictableObjectType.ENTITY,\n objectId: entityId,\n })\n\n // get access level text\n const accessText = getAccessText(restrictionUiType)\n\n // get access level icon\n const icon = (\n <AccessIcon\n restrictionUiType={restrictionUiType!}\n wrap={iconWrap}\n sx={{ ...iconSx }}\n />\n )\n\n const handleGetAccess = useCallback(() => {\n // TODO: The fetch should really happen in the AR List component.\n // If we need to open the AR page in synapse, the logic should be in the modal and it should just close itself right away\n SynapseClient.getAllAccessRequirements(accessToken, entityId).then(\n requirements => {\n if (checkHasUnsupportedRequirement(requirements)) {\n window.open(\n `${getEndpoint(\n BackendDestinationEnum.PORTAL_ENDPOINT,\n )}AccessRequirements:ID=${entityId}&TYPE=ENTITY`,\n '_blank',\n )\n } else {\n setAccessRequirements(requirements)\n setDisplayAccessRequirement(true)\n }\n },\n )\n }, [accessToken, entityId])\n\n // Determine if this access type should show a clickable button\n const isClickable = useMemo(() => {\n if (!restrictionInformation || !restrictionUiType) {\n return false\n }\n\n const hasUnmetAccessRequirement =\n restrictionInformation.hasUnmetAccessRequirement\n const restrictionLevel = restrictionInformation.restrictionLevel\n\n // Clickable if there are unmet requirements or if there are terms to view\n return (\n hasUnmetAccessRequirement ||\n restrictionLevel !== RestrictionLevel.OPEN ||\n restrictionUiType === RestrictionUiType.AccessBlockedToAnonymous\n )\n }, [restrictionInformation, restrictionUiType])\n\n const accessRequirementDialog = displayAccessRequirement ? (\n <AccessRequirementList\n subjectId={entityId}\n subjectType={RestrictableObjectType.ENTITY}\n accessRequirementFromProps={accessRequirements}\n renderAsModal={true}\n onHide={() => {\n setDisplayAccessRequirement(false)\n }}\n />\n ) : null\n\n return {\n restrictionUiType,\n accessText,\n icon,\n handleGetAccess,\n isClickable,\n accessRequirementDialog,\n setDisplayAccessRequirement,\n }\n}\n\nexport default useHasAccess\n"],"mappings":";;;;;;;;;;;;;;;AAkCA,SAAS,EACP,GACA,GACA;AACA,QAAO,EAAmB,GAAU,KAAA,GAAW,KAAA,GAAW;EACxD,GAAG;EACH,SAAQ,MAAU;AAChB,OAAI,CAAC,EAAa,EAAO,OAAO,CAC9B,QAAO;GAET,IAAM,IAAa,EAAO,QAEpB,IADc,EAAO,aAC6B,MACtD,MAAc,EAAW,OAAO,EAAW,iBAC5C;AACD,UAAO,KAAc,EAAsC,EAAW;;EAEzE,CAAC;;AAUJ,SAAgB,EACd,GACA,GAG+B;CAC/B,IAAM,EAAE,uBAAoB,GAAmB,EAEzC,EAAE,MAAM,MAA2B,EAA6B;EACpE,wBAAwB,EAAuB;EAC/C,UAAU;EACX,CAAC,EAEI,EAAE,MAAM,GAAsB,WAAW,MAC7C,EAA2B,GAAU,EACnC,SAAS,EAAkC,SAC5C,CAAC;AAEC,QAKL;MAAI,EAAkC,SAAS;AAC7C,OAAI,EACF;AAEF,OAAI,EACF,QAAO,EAAkB;;AAmB7B,SAfI,EAAuB,4BAClB,EAAkB,6BAEvB,EAAuB,sBAAuB,cAC5C,EAAuB,qBAAqB,EAAiB,OAIxD,EAAkB,aAFlB,EAAkB,sBAMzB,IACK,EAAkB,qBAEpB,EAAkB;;;AAI3B,SAAS,EAAc,GAAsC;AAC3D,SAAQ,GAAR;EACE,KAAK,EAAkB,WACrB,QAAO;EACT,KAAK,EAAkB,oBACrB,QAAO;EACT,KAAK,EAAkB,2BACrB,QAAO;EACT,KAAK,EAAkB,mBACrB,QAAO;EACT,KAAK,EAAkB,yBACrB,QAAO;EACT,KAAK,EAAkB,6BACrB,QAAO;EACT,KAAK,KAAA,EACH,QAAO;EACT,QACE,QAAO;;;AAKb,SAAgB,EACd,GACA,IAAoB,IACpB,GACA,IAAgD,EAAE,EAClD;CACA,IAAM,CAAC,GAA0B,KAC/B,EAAS,GAAM,EACX,CAAC,GAAoB,KAAyB,EAElD,EAAE,CAAC,EAEC,EAAE,mBAAgB,GAAmB,EACrC,EAAE,4BAAyB,OAAU,GAGrC,IAAoB,EAAwB,GAAU,EAC1D,SAAS,GACV,CAAC,EAEI,EAAE,MAAM,MAA2B,EAA6B;EACpE,wBAAwB,EAAuB;EAC/C,UAAU;EACX,CAAC;AAgEF,QAAO;EACL;EACA,YA/DiB,EAAc,EAAkB;EAgEjD,MA5DA,kBAAC,GAAD;GACqB;GACnB,MAAM;GACN,IAAI,EAAE,GAAG,GAAQ;GACjB,CAAA;EAyDF,iBAtDsB,QAAkB;AAGxC,KAAc,yBAAyB,GAAa,EAAS,CAAC,MAC5D,MAAgB;AACd,IAAI,EAA+B,EAAa,GAC9C,OAAO,KACL,GAAG,EACD,EAAuB,gBACxB,CAAC,wBAAwB,EAAS,eACnC,SACD,IAED,EAAsB,EAAa,EACnC,EAA4B,GAAK;KAGtC;KACA,CAAC,GAAa,EAAS,CAAC;EAqCzB,aAlCkB,QAAc;AAChC,OAAI,CAAC,KAA0B,CAAC,EAC9B,QAAO;GAGT,IAAM,IACJ,EAAuB,2BACnB,IAAmB,EAAuB;AAGhD,UACE,KACA,MAAqB,EAAiB,QACtC,MAAsB,EAAkB;KAEzC,CAAC,GAAwB,EAAkB,CAAC;EAoB7C,yBAlB8B,IAC9B,kBAAC,GAAD;GACE,WAAW;GACX,aAAa,EAAuB;GACpC,4BAA4B;GAC5B,eAAe;GACf,cAAc;AACZ,MAA4B,GAAM;;GAEpC,CAAA,GACA;EASF;EACD"}
1
+ {"version":3,"file":"useHasAccess.js","names":[],"sources":["../../../src/components/HasAccess/useHasAccess.tsx"],"sourcesContent":["import { useCallback, useMemo, useState } from 'react'\nimport AccessIcon, { RestrictionUiType } from './AccessIcon'\nimport {\n AccessRequirement,\n EntityBundle,\n FileHandle,\n RestrictableObjectType,\n RestrictionLevel,\n} from '@sage-bionetworks/synapse-types'\nimport {\n implementsExternalFileHandleInterface,\n isFileEntity,\n SynapseClientError,\n useSynapseContext,\n} from '@/utils'\nimport {\n useGetEntityBundle,\n useGetRestrictionInformation,\n} from '@/synapse-queries'\nimport SynapseClient from '@/synapse-client'\nimport AccessRequirementList, {\n checkHasUnsupportedRequirement,\n} from '../AccessRequirementList/AccessRequirementList'\nimport { BackendDestinationEnum, getEndpoint } from '@/utils/functions'\nimport { UseQueryOptions } from '@tanstack/react-query'\nimport { SxProps, Theme } from '@mui/material'\n\n/**\n * This hook determines if\n * - the entity is a FileEntity, AND\n * - the caller has permission to fetch the dataFileHandle, AND\n * - the dataFileHandle is an instance of ExternalFileHandleInterface (i.e. the file is not controlled by Synapse)\n * Note that this requires an additional API call that cannot be batched, so it should be avoided in bulk contexts if possible.\n */\nfunction useGetIsExternalFileHandle(\n entityId: string,\n options: Partial<UseQueryOptions<EntityBundle, SynapseClientError, boolean>>,\n) {\n return useGetEntityBundle(entityId, undefined, undefined, {\n ...options,\n select: bundle => {\n if (!isFileEntity(bundle.entity)) {\n return false\n }\n const fileEntity = bundle.entity\n const fileHandles = bundle.fileHandles\n const fileHandle: FileHandle | undefined = fileHandles?.find(\n fileHandle => fileHandle.id === fileEntity.dataFileHandleId,\n )\n return fileHandle && implementsExternalFileHandleInterface(fileHandle)\n },\n })\n}\n\n/**\n * Determines whether an Entity is accessible for download, or if it is blocked by the ACL or unmet Access Requirements.\n *\n * To make download available, and determine if the file is downloadable via the web, see {@link DirectDownload.tsx}\n * @param entityId\n * @returns\n */\nexport function useGetRestrictionUiType(\n entityId: string,\n useGetIsExternalFileHandleOptions: Partial<\n UseQueryOptions<EntityBundle, SynapseClientError, boolean>\n >,\n): RestrictionUiType | undefined {\n const { isAuthenticated } = useSynapseContext()\n\n const { data: restrictionInformation } = useGetRestrictionInformation({\n restrictableObjectType: RestrictableObjectType.ENTITY,\n objectId: entityId,\n })\n\n const { data: isExternalFileHandle, isLoading: isLoadingExternalFile } =\n useGetIsExternalFileHandle(entityId, {\n enabled: useGetIsExternalFileHandleOptions.enabled,\n })\n\n if (!restrictionInformation) {\n return undefined\n }\n\n // Only check for external file handle if the feature is enabled\n if (useGetIsExternalFileHandleOptions.enabled) {\n if (isLoadingExternalFile) {\n return undefined\n }\n if (isExternalFileHandle) {\n return RestrictionUiType.AccessibleExternalFileHandle\n }\n }\n\n if (restrictionInformation.hasUnmetAccessRequirement) {\n return RestrictionUiType.AccessBlockedByRestriction\n }\n if (restrictionInformation.userEntityPermissions!.canDownload) {\n if (restrictionInformation.restrictionLevel !== RestrictionLevel.OPEN) {\n // Indicate that there are requirements, but they have been met\n return RestrictionUiType.AccessibleWithTerms\n } else {\n return RestrictionUiType.Accessible\n }\n }\n\n if (isAuthenticated) {\n return RestrictionUiType.AccessBlockedByACL\n }\n return RestrictionUiType.AccessBlockedToAnonymous\n}\n\n//* Get the access level text */\nfunction getAccessText(props: RestrictionUiType | undefined) {\n switch (props) {\n case RestrictionUiType.Accessible:\n return 'Open Access'\n case RestrictionUiType.AccessibleWithTerms:\n return 'View Terms'\n case RestrictionUiType.AccessBlockedByRestriction:\n return 'Request Access'\n case RestrictionUiType.AccessBlockedByACL:\n return 'Access Denied'\n case RestrictionUiType.AccessBlockedToAnonymous:\n return 'Sign In Required'\n case RestrictionUiType.AccessibleExternalFileHandle:\n return 'External Access'\n case undefined:\n return 'Loading...'\n default:\n return ''\n }\n}\n\n// A hook that handles the logic for computing the correct access level, getting the text, and the icon\nexport function useHasAccess(\n entityId: string,\n iconWrap: boolean = false,\n iconSx?: SxProps<Theme>,\n options: { showExternalAccessIcon?: boolean } = {},\n) {\n const [displayAccessRequirement, setDisplayAccessRequirement] =\n useState(false)\n const [accessRequirements, setAccessRequirements] = useState<\n AccessRequirement[]\n >([])\n\n const { accessToken } = useSynapseContext()\n const { showExternalAccessIcon = false } = options\n\n // get access level\n const restrictionUiType = useGetRestrictionUiType(entityId, {\n enabled: showExternalAccessIcon,\n })\n\n const { data: restrictionInformation } = useGetRestrictionInformation({\n restrictableObjectType: RestrictableObjectType.ENTITY,\n objectId: entityId,\n })\n\n // get access level text\n const accessText = getAccessText(restrictionUiType)\n\n // get access level icon\n const icon = (\n <AccessIcon\n restrictionUiType={restrictionUiType!}\n wrap={iconWrap}\n sx={{ ...iconSx }}\n />\n )\n\n const handleGetAccess = useCallback(() => {\n // TODO: The fetch should really happen in the AR List component.\n // If we need to open the AR page in synapse, the logic should be in the modal and it should just close itself right away\n SynapseClient.getAllAccessRequirements(accessToken, entityId).then(\n requirements => {\n if (checkHasUnsupportedRequirement(requirements)) {\n window.open(\n `${getEndpoint(\n BackendDestinationEnum.PORTAL_ENDPOINT,\n )}AccessRequirements:ID=${entityId}&TYPE=ENTITY`,\n '_blank',\n )\n } else {\n setAccessRequirements(requirements)\n setDisplayAccessRequirement(true)\n }\n },\n )\n }, [accessToken, entityId])\n\n // Determine if this access type should show a clickable button\n const isClickable = useMemo(() => {\n if (!restrictionInformation || !restrictionUiType) {\n return false\n }\n\n const hasUnmetAccessRequirement =\n restrictionInformation.hasUnmetAccessRequirement\n const restrictionLevel = restrictionInformation.restrictionLevel\n\n // Clickable if there are unmet requirements or if there are terms to view\n return (\n hasUnmetAccessRequirement ||\n restrictionLevel !== RestrictionLevel.OPEN ||\n restrictionUiType === RestrictionUiType.AccessBlockedToAnonymous\n )\n }, [restrictionInformation, restrictionUiType])\n\n const accessRequirementDialog = displayAccessRequirement ? (\n <AccessRequirementList\n subjectId={entityId}\n subjectType={RestrictableObjectType.ENTITY}\n accessRequirementFromProps={accessRequirements}\n renderAsModal={true}\n onHide={() => {\n setDisplayAccessRequirement(false)\n }}\n />\n ) : null\n\n return {\n restrictionUiType,\n accessText,\n icon,\n handleGetAccess,\n isClickable,\n accessRequirementDialog,\n setDisplayAccessRequirement,\n }\n}\n\nexport default useHasAccess\n"],"mappings":";;;;;;;;;;;;;;;AAkCA,SAAS,EACP,GACA,GACA;AACA,QAAO,EAAmB,GAAU,KAAA,GAAW,KAAA,GAAW;EACxD,GAAG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;EACpE,wBAAwB,EAAuB;EAC/C,UAAU;EACX,CAAC;AAgEF,QAAO;EACL;EACA,YA/DiB,EAAc,EA+D/B;EACA,MA5DA,kBAAC,GAAD;GACqB;GACnB,MAAM;GACN,IAAI,EAAE,GAAG,GAAQ;GACjB,CAwDF;EACA,iBAtDsB,QAAkB;AAGxC,KAAc,yBAAyB,GAAa,EAAS,CAAC,MAC5D,MAAgB;AACd,IAAI,EAA+B,EAAa,GAC9C,OAAO,KACL,GAAG,EACD,EAAuB,gBACxB,CAAC,wBAAwB,EAAS,eACnC,SACD,IAED,EAAsB,EAAa,EACnC,EAA4B,GAAK;KAGtC;KACA,CAAC,GAAa,EAAS,CAoCxB;EACA,aAlCkB,QAAc;AAChC,OAAI,CAAC,KAA0B,CAAC,EAC9B,QAAO;GAGT,IAAM,IACJ,EAAuB,2BACnB,IAAmB,EAAuB;AAGhD,UACE,KACA,MAAqB,EAAiB,QACtC,MAAsB,EAAkB;KAEzC,CAAC,GAAwB,EAAkB,CAmB5C;EACA,yBAlB8B,IAC9B,kBAAC,GAAD;GACE,WAAW;GACX,aAAa,EAAuB;GACpC,4BAA4B;GAC5B,eAAe;GACf,cAAc;AACZ,MAA4B,GAAM;;GAEpC,CAAA,GACA;EASF;EACD"}
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderCardV2.js","names":[],"sources":["../../../src/components/HeaderCard/HeaderCardV2.tsx"],"sourcesContent":["import { CardLabel } from '@/components/row_renderers/utils/CardFooter'\nimport React, { forwardRef, ForwardedRef } from 'react'\nimport {\n Box,\n Card,\n Typography,\n // Stack,\n // ButtonProps,\n useTheme,\n useMediaQuery,\n} from '@mui/material'\nimport { DescriptionConfig } from '../CardContainerLogic'\nimport { CollapsibleDescription } from '../GenericCard/CollapsibleDescription'\nimport { GenericCardProps } from '@/components/GenericCard/GenericCard'\nimport { useDocumentMetadata } from '@/utils/context/DocumentMetadataContext'\nimport { SmartButton } from '../SmartLink/SmartButton'\nimport { SmartLink } from '../SmartLink/SmartLink'\n\nexport type HeaderCardV2Props = {\n /** Type label displayed at the top of the card */\n type: string\n /** Main title of the card */\n title: string\n /** Optional subtitle, often used for author or additional context */\n subTitle?: string\n /** Main description text */\n description: string\n /** Maximum number of secondary labels to show before \"Show More\" */\n secondaryLabelLimit?: number\n /** Array of label-value pairs to display in the card footer */\n values?: CardLabel[]\n /** Whether to align the card to the left navigation */\n isAlignToLeftNav?: boolean\n /** Configuration for the collapsible description */\n descriptionConfig?: DescriptionConfig\n /** Character count threshold for truncating description (default 400) */\n charCountCutoff?: number\n /** Optional URL for making the title clickable */\n href?: string\n /** Target attribute for the title link */\n target?: string\n /** Icon element to display */\n icon: React.ReactNode\n /** Optional background image URL */\n backgroundImage?: string\n /** Force values section to appear below main content */\n forceStackedLayout?: boolean\n /** Optional CTA link(s) to display below description. Accepts a single config or an array. */\n ctaLinkConfig?: GenericCardProps['ctaLinkConfig']\n}\n\n/**\n * HeaderCardV2 Component OUT OF DATE COMMENTS\n *\n * A material-UI based card component for displaying detailed information with metadata.\n * This component supports responsive layouts, background images, and dynamic content\n * organization.\n *\n * Layout Structure:\n\n ```\n┌───────────────────────────────────────────────────────────────┐\n│ ┌─────┐ Type Label │\n│ │Icon │ Title │\n│ │ │ Subtitle │\n│ └─────┘ │\n│ Description Metadata │\n│ [Show More/Less] -------- │\n│ Label 1 Value 1 │\n│ [External Site Button] Label 2 Value 2 │\n└───────────────────────────────────────────────────────────────┘\n ```\n *\n * Features:\n * - Responsive layout with configurable breakpoints\n * - Optional background image with overlay\n * - Collapsible description text\n * - Right-aligned or stacked metadata section\n * - Call-to-action buttons\n * - SEO-friendly meta tags management\n *\n * Meta Tags Handling:\n * - Updates document title with card title\n * - Sets meta description from card description/subtitle\n * - Restores original meta data on component cleanup\n *\n * Layout Modes:\n * - Default: Icon + Content | Metadata (on desktop)\n * - Stacked: Full width content with metadata below\n * - Mobile: All sections stack vertically\n *\n * @component\n * @example\n * ```tsx\n * <HeaderCardV2\n * type=\"Study\"\n * title=\"Example Study\"\n * description=\"Study description\"\n * values={[['Status', 'Active'], ['Access', 'Public']]}\n * icon={<StudyIcon />}\n * ctaLinkConfig={{text: \"View Standard on External Website\", link: \"url\"}}\n * />\n * ```\n\n * Core component logic:\n * 1. Responsive Layout:\n * - Uses MUI Grid for flexible layouts\n * - Switches to stacked layout on mobile, when forceStackedLayout is true,\n *\n * 2. Meta Tags:\n * - Manages document title and meta description\n * - Preserves original values for cleanup\n *\n * 3. Content Sections:\n * - Icon: Optional, maintains aspect ratio\n * - Main Content: Type, title, subtitle, description\n * - Metadata: Right-aligned or stacked key-value pairs\n * - CTA Button: Optional button link to external site\n *\n * 4. Styling:\n * - Background image support with overlay\n * - Consistent spacing using MUI theme\n * - Responsive typography\n * - Optional left-nav alignment\n */\nconst HeaderCardV2 = forwardRef(function HeaderCardV2(\n props: HeaderCardV2Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const {\n // type,\n title,\n subTitle = '',\n description,\n values,\n // secondaryLabelLimit,\n isAlignToLeftNav,\n descriptionConfig,\n charCountCutoff,\n href,\n target,\n icon,\n backgroundImage,\n forceStackedLayout = false,\n ctaLinkConfig,\n } = props\n\n const theme = useTheme()\n const isMobile = useMediaQuery(theme.breakpoints.down('md'))\n\n let useStackedLayout = false\n if (forceStackedLayout || isMobile) {\n useStackedLayout = true\n } else {\n // useStackedLayout = metadataHeight > descriptionHeight\n // as per https://github.com/bridge2ai/b2ai-standards-registry/issues/210#issuecomment-2773706202,\n // constrain metadata to 5-line expandable block\n }\n\n const descriptionConfiguration: DescriptionConfig = {\n ...descriptionConfig,\n showFullDescriptionByDefault:\n descriptionConfig?.showFullDescriptionByDefault ?? false,\n }\n const metadataDescription = description || subTitle || undefined\n useDocumentMetadata({\n title,\n description: metadataDescription,\n priority: 100,\n })\n\n // ctaLink stuff - normalize to array\n const ctaLinkConfigs = ctaLinkConfig\n ? Array.isArray(ctaLinkConfig)\n ? ctaLinkConfig\n : [ctaLinkConfig]\n : []\n const ctaLinkBox =\n ctaLinkConfigs.length > 0 ? (\n <Box\n sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', marginTop: '22px' }}\n >\n {ctaLinkConfigs.map((config, index) => (\n <SmartButton\n key={index}\n variant=\"outlined\"\n href={config?.href}\n target={config?.target}\n size=\"large\"\n sx={{\n color: '#FFF',\n '&:hover': {\n color: '#FFF',\n textDecorationColor: '#FFF',\n border: '2px solid white',\n },\n '&:focus': { color: '#FFF' },\n textDecorationColor: '#FFF',\n padding: '6px 24px',\n border: '1px solid white',\n }}\n >\n {config?.text}\n </SmartButton>\n ))}\n </Box>\n ) : null\n\n return (\n <Card\n component={'div'}\n ref={ref}\n sx={{\n borderRadius: 0,\n boxShadow: 'none',\n position: 'relative',\n ...(backgroundImage && {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundImage: `url(${backgroundImage})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n opacity: 0.1,\n zIndex: 0,\n },\n }),\n ...(isAlignToLeftNav &&\n {\n // Add any special styles for aligned cards\n }),\n }}\n className={`SRC-portalCard SRC-portalCardHeader ${\n isAlignToLeftNav ? 'isAlignToLeftNav' : ''\n }`}\n >\n <Box\n sx={{\n marginLeft: 'auto',\n marginRight: 'auto',\n maxWidth: '1400px',\n display: 'grid',\n gridTemplateColumns: '1fr 12fr 1fr',\n '& > *': {\n gridColumn: 2,\n },\n paddingBottom: '25px',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: '64px', // Set minimum height to ensure proper centering space\n gap: 1,\n }}\n >\n {icon && (\n <Box\n sx={{\n height: '120px',\n }}\n >\n {icon}\n </Box>\n )}\n\n <Box sx={{}}>\n {/* Title */}\n <Typography\n sx={{\n mb: 1,\n fontSize: '2.5rem',\n letterSpacing: '0.1em', // Add letter spacing\n marginBottom: '0.6em',\n }}\n >\n {href ? (\n <SmartLink\n href={href}\n target={target}\n underline=\"hover\"\n color=\"inherit\"\n >\n {title}\n </SmartLink>\n ) : (\n title\n )}\n </Typography>\n {/* Subtitle */}\n {subTitle && (\n <Typography\n variant=\"body1\"\n color=\"inherit\"\n sx={{\n fontStyle: 'italic',\n fontSize: '1.5rem',\n }}\n >\n {subTitle}\n </Typography>\n )}\n </Box>\n </Box>\n\n <Box\n sx={{\n display: 'flex',\n flexDirection: useStackedLayout ? 'column' : 'row',\n flexWrap: useStackedLayout ? 'nowrap' : 'wrap',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n gap: 2,\n }}\n >\n <Box\n style={{\n flexBasis: useStackedLayout ? '100%' : 'min(65ch, 100%)',\n width: useStackedLayout ? '100%' : 'auto',\n }}\n >\n <CollapsibleDescription\n description={description}\n descriptionSubTitle=\"\"\n descriptionConfig={descriptionConfiguration}\n charCountCutoff={charCountCutoff}\n />\n {ctaLinkBox}\n </Box>\n {values && (\n <Box\n sx={{\n width: useStackedLayout ? '100%' : '30%',\n marginTop: useStackedLayout ? 2 : 0,\n alignItems: 'flex-start',\n }}\n >\n <MetadataTable data={values} />\n </Box>\n )}\n </Box>\n </Box>\n </Card>\n )\n})\n\ntype MetadataTableProps = {\n data: CardLabel[]\n}\n\nfunction MetadataTable({ data }: MetadataTableProps) {\n return (\n <table\n style={{\n width: '100%',\n borderCollapse: 'collapse',\n }}\n >\n <tbody>\n {data.map((item, index) => (\n <tr key={item.columnName || index}>\n <td\n style={{\n width: '1%',\n whiteSpace: 'nowrap',\n padding: '0px 16px 8px 0',\n verticalAlign: 'top',\n fontWeight: 'bold',\n }}\n >\n {item.columnDisplayName}\n </td>\n <td\n style={{\n width: 'auto',\n paddingBottom: '12px',\n verticalAlign: 'top',\n wordBreak: 'break-word',\n }}\n >\n {item.value}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )\n}\n\nexport default HeaderCardV2\n"],"mappings":";;;;;;;;AA6HA,IAAM,IAAe,EAAW,SAC9B,GACA,GACA;CACA,IAAM,EAEJ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C,MAAD;GACE,OAAO;IACL,OAAO;IACP,YAAY;IACZ,SAAS;IACT,eAAe;IACf,YAAY;IACb;aAEA,EAAK;GACH,CAAA,EACL,kBAAC,MAAD;GACE,OAAO;IACL,OAAO;IACP,eAAe;IACf,eAAe;IACf,WAAW;IACZ;aAEA,EAAK;GACH,CAAA,CACF,EAAA,EAtBI,EAAK,cAAc,EAsBvB,CACL,EACI,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"HeaderCardV2.js","names":[],"sources":["../../../src/components/HeaderCard/HeaderCardV2.tsx"],"sourcesContent":["import { CardLabel } from '@/components/row_renderers/utils/CardFooter'\nimport React, { forwardRef, ForwardedRef } from 'react'\nimport {\n Box,\n Card,\n Typography,\n // Stack,\n // ButtonProps,\n useTheme,\n useMediaQuery,\n} from '@mui/material'\nimport { DescriptionConfig } from '../CardContainerLogic'\nimport { CollapsibleDescription } from '../GenericCard/CollapsibleDescription'\nimport { GenericCardProps } from '@/components/GenericCard/GenericCard'\nimport { useDocumentMetadata } from '@/utils/context/DocumentMetadataContext'\nimport { SmartButton } from '../SmartLink/SmartButton'\nimport { SmartLink } from '../SmartLink/SmartLink'\n\nexport type HeaderCardV2Props = {\n /** Type label displayed at the top of the card */\n type: string\n /** Main title of the card */\n title: string\n /** Optional subtitle, often used for author or additional context */\n subTitle?: string\n /** Main description text */\n description: string\n /** Maximum number of secondary labels to show before \"Show More\" */\n secondaryLabelLimit?: number\n /** Array of label-value pairs to display in the card footer */\n values?: CardLabel[]\n /** Whether to align the card to the left navigation */\n isAlignToLeftNav?: boolean\n /** Configuration for the collapsible description */\n descriptionConfig?: DescriptionConfig\n /** Character count threshold for truncating description (default 400) */\n charCountCutoff?: number\n /** Optional URL for making the title clickable */\n href?: string\n /** Target attribute for the title link */\n target?: string\n /** Icon element to display */\n icon: React.ReactNode\n /** Optional background image URL */\n backgroundImage?: string\n /** Force values section to appear below main content */\n forceStackedLayout?: boolean\n /** Optional CTA link(s) to display below description. Accepts a single config or an array. */\n ctaLinkConfig?: GenericCardProps['ctaLinkConfig']\n}\n\n/**\n * HeaderCardV2 Component OUT OF DATE COMMENTS\n *\n * A material-UI based card component for displaying detailed information with metadata.\n * This component supports responsive layouts, background images, and dynamic content\n * organization.\n *\n * Layout Structure:\n\n ```\n┌───────────────────────────────────────────────────────────────┐\n│ ┌─────┐ Type Label │\n│ │Icon │ Title │\n│ │ │ Subtitle │\n│ └─────┘ │\n│ Description Metadata │\n│ [Show More/Less] -------- │\n│ Label 1 Value 1 │\n│ [External Site Button] Label 2 Value 2 │\n└───────────────────────────────────────────────────────────────┘\n ```\n *\n * Features:\n * - Responsive layout with configurable breakpoints\n * - Optional background image with overlay\n * - Collapsible description text\n * - Right-aligned or stacked metadata section\n * - Call-to-action buttons\n * - SEO-friendly meta tags management\n *\n * Meta Tags Handling:\n * - Updates document title with card title\n * - Sets meta description from card description/subtitle\n * - Restores original meta data on component cleanup\n *\n * Layout Modes:\n * - Default: Icon + Content | Metadata (on desktop)\n * - Stacked: Full width content with metadata below\n * - Mobile: All sections stack vertically\n *\n * @component\n * @example\n * ```tsx\n * <HeaderCardV2\n * type=\"Study\"\n * title=\"Example Study\"\n * description=\"Study description\"\n * values={[['Status', 'Active'], ['Access', 'Public']]}\n * icon={<StudyIcon />}\n * ctaLinkConfig={{text: \"View Standard on External Website\", link: \"url\"}}\n * />\n * ```\n\n * Core component logic:\n * 1. Responsive Layout:\n * - Uses MUI Grid for flexible layouts\n * - Switches to stacked layout on mobile, when forceStackedLayout is true,\n *\n * 2. Meta Tags:\n * - Manages document title and meta description\n * - Preserves original values for cleanup\n *\n * 3. Content Sections:\n * - Icon: Optional, maintains aspect ratio\n * - Main Content: Type, title, subtitle, description\n * - Metadata: Right-aligned or stacked key-value pairs\n * - CTA Button: Optional button link to external site\n *\n * 4. Styling:\n * - Background image support with overlay\n * - Consistent spacing using MUI theme\n * - Responsive typography\n * - Optional left-nav alignment\n */\nconst HeaderCardV2 = forwardRef(function HeaderCardV2(\n props: HeaderCardV2Props,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const {\n // type,\n title,\n subTitle = '',\n description,\n values,\n // secondaryLabelLimit,\n isAlignToLeftNav,\n descriptionConfig,\n charCountCutoff,\n href,\n target,\n icon,\n backgroundImage,\n forceStackedLayout = false,\n ctaLinkConfig,\n } = props\n\n const theme = useTheme()\n const isMobile = useMediaQuery(theme.breakpoints.down('md'))\n\n let useStackedLayout = false\n if (forceStackedLayout || isMobile) {\n useStackedLayout = true\n } else {\n // useStackedLayout = metadataHeight > descriptionHeight\n // as per https://github.com/bridge2ai/b2ai-standards-registry/issues/210#issuecomment-2773706202,\n // constrain metadata to 5-line expandable block\n }\n\n const descriptionConfiguration: DescriptionConfig = {\n ...descriptionConfig,\n showFullDescriptionByDefault:\n descriptionConfig?.showFullDescriptionByDefault ?? false,\n }\n const metadataDescription = description || subTitle || undefined\n useDocumentMetadata({\n title,\n description: metadataDescription,\n priority: 100,\n })\n\n // ctaLink stuff - normalize to array\n const ctaLinkConfigs = ctaLinkConfig\n ? Array.isArray(ctaLinkConfig)\n ? ctaLinkConfig\n : [ctaLinkConfig]\n : []\n const ctaLinkBox =\n ctaLinkConfigs.length > 0 ? (\n <Box\n sx={{ display: 'flex', gap: 2, flexWrap: 'wrap', marginTop: '22px' }}\n >\n {ctaLinkConfigs.map((config, index) => (\n <SmartButton\n key={index}\n variant=\"outlined\"\n href={config?.href}\n target={config?.target}\n size=\"large\"\n sx={{\n color: '#FFF',\n '&:hover': {\n color: '#FFF',\n textDecorationColor: '#FFF',\n border: '2px solid white',\n },\n '&:focus': { color: '#FFF' },\n textDecorationColor: '#FFF',\n padding: '6px 24px',\n border: '1px solid white',\n }}\n >\n {config?.text}\n </SmartButton>\n ))}\n </Box>\n ) : null\n\n return (\n <Card\n component={'div'}\n ref={ref}\n sx={{\n borderRadius: 0,\n boxShadow: 'none',\n position: 'relative',\n ...(backgroundImage && {\n '&::before': {\n content: '\"\"',\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundImage: `url(${backgroundImage})`,\n backgroundSize: 'cover',\n backgroundPosition: 'center',\n opacity: 0.1,\n zIndex: 0,\n },\n }),\n ...(isAlignToLeftNav &&\n {\n // Add any special styles for aligned cards\n }),\n }}\n className={`SRC-portalCard SRC-portalCardHeader ${\n isAlignToLeftNav ? 'isAlignToLeftNav' : ''\n }`}\n >\n <Box\n sx={{\n marginLeft: 'auto',\n marginRight: 'auto',\n maxWidth: '1400px',\n display: 'grid',\n gridTemplateColumns: '1fr 12fr 1fr',\n '& > *': {\n gridColumn: 2,\n },\n paddingBottom: '25px',\n }}\n >\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n minHeight: '64px', // Set minimum height to ensure proper centering space\n gap: 1,\n }}\n >\n {icon && (\n <Box\n sx={{\n height: '120px',\n }}\n >\n {icon}\n </Box>\n )}\n\n <Box sx={{}}>\n {/* Title */}\n <Typography\n sx={{\n mb: 1,\n fontSize: '2.5rem',\n letterSpacing: '0.1em', // Add letter spacing\n marginBottom: '0.6em',\n }}\n >\n {href ? (\n <SmartLink\n href={href}\n target={target}\n underline=\"hover\"\n color=\"inherit\"\n >\n {title}\n </SmartLink>\n ) : (\n title\n )}\n </Typography>\n {/* Subtitle */}\n {subTitle && (\n <Typography\n variant=\"body1\"\n color=\"inherit\"\n sx={{\n fontStyle: 'italic',\n fontSize: '1.5rem',\n }}\n >\n {subTitle}\n </Typography>\n )}\n </Box>\n </Box>\n\n <Box\n sx={{\n display: 'flex',\n flexDirection: useStackedLayout ? 'column' : 'row',\n flexWrap: useStackedLayout ? 'nowrap' : 'wrap',\n justifyContent: 'space-between',\n alignItems: 'flex-start',\n gap: 2,\n }}\n >\n <Box\n style={{\n flexBasis: useStackedLayout ? '100%' : 'min(65ch, 100%)',\n width: useStackedLayout ? '100%' : 'auto',\n }}\n >\n <CollapsibleDescription\n description={description}\n descriptionSubTitle=\"\"\n descriptionConfig={descriptionConfiguration}\n charCountCutoff={charCountCutoff}\n />\n {ctaLinkBox}\n </Box>\n {values && (\n <Box\n sx={{\n width: useStackedLayout ? '100%' : '30%',\n marginTop: useStackedLayout ? 2 : 0,\n alignItems: 'flex-start',\n }}\n >\n <MetadataTable data={values} />\n </Box>\n )}\n </Box>\n </Box>\n </Card>\n )\n})\n\ntype MetadataTableProps = {\n data: CardLabel[]\n}\n\nfunction MetadataTable({ data }: MetadataTableProps) {\n return (\n <table\n style={{\n width: '100%',\n borderCollapse: 'collapse',\n }}\n >\n <tbody>\n {data.map((item, index) => (\n <tr key={item.columnName || index}>\n <td\n style={{\n width: '1%',\n whiteSpace: 'nowrap',\n padding: '0px 16px 8px 0',\n verticalAlign: 'top',\n fontWeight: 'bold',\n }}\n >\n {item.columnDisplayName}\n </td>\n <td\n style={{\n width: 'auto',\n paddingBottom: '12px',\n verticalAlign: 'top',\n wordBreak: 'break-word',\n }}\n >\n {item.value}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )\n}\n\nexport default HeaderCardV2\n"],"mappings":";;;;;;;;AA6HA,IAAM,IAAe,EAAW,SAC9B,GACA,GACA;CACA,IAAM,EAEJ,UACA,cAAW,IACX,gBACA,WAEA,qBACA,sBACA,oBACA,SACA,WACA,SACA,oBACA,wBAAqB,IACrB,qBACE,GAGE,IAAW,EADH,GACiB,CAAM,YAAY,KAAK,KAAK,CAAC,EAExD,IAAmB;AACvB,EAAI,KAAsB,OACxB,IAAmB;CAOrB,IAAM,IAA8C;EAClD,GAAG;EACH,8BACE,GAAmB,gCAAgC;EACtD;AAED,GAAoB;EAClB;EACA,aAH0B,KAAe,KAAY,KAAA;EAIrD,UAAU;EACX,CAAC;CAGF,IAAM,IAAiB,IACnB,MAAM,QAAQ,EAAc,GAC1B,IACA,CAAC,EAAc,GACjB,EAAE,EACA,IACJ,EAAe,SAAS,IACtB,kBAAC,GAAD;EACE,IAAI;GAAE,SAAS;GAAQ,KAAK;GAAG,UAAU;GAAQ,WAAW;GAAQ;YAEnE,E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;OACX;gBAEA;MACU,CAAA,CAEX;OACF;OAEN,kBAAC,GAAD;IACE,IAAI;KACF,SAAS;KACT,eAAe,IAAmB,WAAW;KAC7C,UAAU,IAAmB,WAAW;KACxC,gBAAgB;KAChB,YAAY;KACZ,KAAK;KACN;cARH,CAUE,kBAAC,GAAD;KACE,OAAO;MACL,WAAW,IAAmB,SAAS;MACvC,OAAO,IAAmB,SAAS;MACpC;eAJH,CAME,kBAAC,GAAD;MACe;MACb,qBAAoB;MACpB,mBAAmB;MACF;MACjB,CAAA,EACD,EACG;QACL,KACC,kBAAC,GAAD;KACE,IAAI;MACF,OAAO,IAAmB,SAAS;MACnC,WAAW,IAAmB,IAAI;MAClC,YAAY;MACb;eAED,kBAAC,GAAD,EAAe,MAAM,GAAU,CAAA;KAC3B,CAAA,CAEJ;MACF;;EACD,CAAA;EAET;AAMF,SAAS,EAAc,EAAE,WAA4B;AACnD,QACE,kBAAC,SAAD;EACE,OAAO;GACL,OAAO;GACP,gBAAgB;GACjB;YAED,kBAAC,SAAD,EAAA,UACG,EAAK,KAAK,GAAM,MACf,kBAAC,MAAD,EAAA,UAAA,CACE,kBAAC,MAAD;GACE,OAAO;IACL,OAAO;IACP,YAAY;IACZ,SAAS;IACT,eAAe;IACf,YAAY;IACb;aAEA,EAAK;GACH,CAAA,EACL,kBAAC,MAAD;GACE,OAAO;IACL,OAAO;IACP,eAAe;IACf,eAAe;IACf,WAAW;IACZ;aAEA,EAAK;GACH,CAAA,CACF,EAAA,EAtBI,EAAK,cAAc,EAsBvB,CACL,EACI,CAAA;EACF,CAAA"}
@@ -1,7 +1,7 @@
1
1
  import { CardLabel } from '@/components/row_renderers/utils/CardFooter';
2
2
  import { SxProps } from '@mui/material';
3
- import { DescriptionConfig } from './CardContainerLogic';
4
3
  import { GenericCardProps } from '@/components/GenericCard/GenericCard';
4
+ import { DescriptionConfig } from './CardContainerLogic';
5
5
  import { SustainabilityScorecardProps } from './SustainabilityScorecard/SustainabilityScorecard';
6
6
  export type HeaderCardVariant = 'HeaderCard' | 'HeaderCardV2';
7
7
  export type HeaderCardProps = {
@@ -16,12 +16,17 @@ export type HeaderCardProps = {
16
16
  charCountCutoff?: number;
17
17
  href?: string;
18
18
  target?: string;
19
+ titleAsFileHandleLinkConfiguration?: GenericCardProps['titleAsFileHandleLinkConfiguration'];
20
+ titleAreaRightContent?: React.ReactNode;
21
+ descriptionSubTitle?: string;
19
22
  icon: React.ReactNode;
20
23
  headerCardVariant?: HeaderCardVariant;
21
24
  cardTopContent?: React.ReactNode;
22
25
  ctaLinkConfig?: GenericCardProps['ctaLinkConfig'];
23
26
  cardTopButtons?: React.ReactNode;
24
27
  sustainabilityScorecard?: SustainabilityScorecardProps;
28
+ renderedIconList?: React.ReactNode;
29
+ cardTypeAdornment?: React.ReactNode;
25
30
  doiUri?: string;
26
31
  sx?: SxProps;
27
32
  };
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderCard.d.ts","sourceRoot":"","sources":["../../src/components/HeaderCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAA;AACvE,OAAO,EAAO,OAAO,EAAE,MAAM,eAAe,CAAA;AAI5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAExD,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAEvE,OAAgC,EAC9B,4BAA4B,EAC7B,MAAM,mDAAmD,CAAA;AAG1D,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,cAAc,CAAA;AAE7D,MAAM,MAAM,eAAe,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,MAAM,CAAC,EAAE,SAAS,EAAE,CAAA;IACpB,gBAAgB,CAAC,EAAE,OAAO,CAA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CAAC,EAAE,OAAO,CAAA;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,kCAAkC,CAAC,EAAE,gBAAgB,CAAC,oCAAoC,CAAC,CAAA;IAC3F,qBAAqB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,IAAI,EAAE,KAAK,CAAC,SAAS,CAAA;IACrB,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IACrC,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,aAAa,CAAC,EAAE,gBAAgB,CAAC,eAAe,CAAC,CAAA;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAChC,uBAAuB,CAAC,EAAE,4BAA4B,CAAA;IACtD,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAClC,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACnC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,EAAE,CAAC,EAAE,OAAO,CAAA;CACb,CAAA;AA4LD,QAAA,MAAM,UAAU,4GASd,CAAA;AAEF,eAAe,UAAU,CAAA"}
@@ -2,45 +2,46 @@ import { useDocumentMetadata as e } from "../utils/context/DocumentMetadataConte
2
2
  import t from "./row_renderers/utils/CardFooter.js";
3
3
  import "./row_renderers/utils/index.js";
4
4
  import { SmartLink as n } from "./SmartLink/SmartLink.js";
5
- import { CollapsibleDescription as r } from "./GenericCard/CollapsibleDescription.js";
6
- import i from "./HeaderCard/HeaderCardV2.js";
7
- import a from "./SustainabilityScorecard/SustainabilityScorecard.js";
8
- import { forwardRef as o } from "react";
9
- import { Box as s } from "@mui/material";
10
- import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
5
+ import { FileHandleLink as r } from "./widgets/FileHandleLink.js";
6
+ import { CollapsibleDescription as i } from "./GenericCard/CollapsibleDescription.js";
7
+ import a from "./HeaderCard/HeaderCardV2.js";
8
+ import o from "./SustainabilityScorecard/SustainabilityScorecard.js";
9
+ import { forwardRef as s } from "react";
10
+ import { Box as c } from "@mui/material";
11
+ import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
11
12
  //#region src/components/HeaderCard.tsx
12
- var d = o(function(i, o) {
13
- let { type: d, title: f, subTitle: p = "", description: m, values: h, secondaryLabelLimit: g, isAlignToLeftNav: _, descriptionConfig: v, href: y, target: b, icon: x, cardTopContent: S, cardTopButtons: C, sustainabilityScorecard: w, sx: T } = i, E = !!w, D = {
14
- ...v,
15
- showFullDescriptionByDefault: v?.showFullDescriptionByDefault ?? !0
13
+ var f = s(function(a, s) {
14
+ let { type: f, title: p, subTitle: m = "", description: h, values: g, secondaryLabelLimit: _, isAlignToLeftNav: v, descriptionConfig: y, href: b, target: x, titleAsFileHandleLinkConfiguration: S, titleAreaRightContent: C, descriptionSubTitle: w = "", icon: T, cardTopContent: E, cardTopButtons: D, sustainabilityScorecard: O, renderedIconList: k, cardTypeAdornment: A, sx: j } = a, M = !!O, N = {
15
+ ...y,
16
+ showFullDescriptionByDefault: y?.showFullDescriptionByDefault ?? !0
16
17
  };
17
18
  return e({
18
- title: f,
19
- description: m || p || void 0,
19
+ title: p,
20
+ description: h || m || void 0,
20
21
  priority: 100
21
- }), /* @__PURE__ */ l(s, {
22
- ref: o,
23
- className: `SRC-portalCard SRC-portalCardHeader ${_ ? "isAlignToLeftNav" : ""}`,
24
- sx: T,
25
- children: /* @__PURE__ */ u("div", {
22
+ }), /* @__PURE__ */ u(c, {
23
+ ref: s,
24
+ className: `SRC-portalCard SRC-portalCardHeader ${v ? "isAlignToLeftNav" : ""}`,
25
+ sx: j,
26
+ children: /* @__PURE__ */ d("div", {
26
27
  className: "container-fluid container-full-width",
27
- children: [/* @__PURE__ */ l(s, {
28
+ children: [/* @__PURE__ */ u(c, {
28
29
  sx: {
29
30
  display: "flex",
30
31
  gap: "10px",
31
32
  float: "right"
32
33
  },
33
- children: C
34
- }), /* @__PURE__ */ l("div", {
34
+ children: D
35
+ }), /* @__PURE__ */ u("div", {
35
36
  className: "row",
36
- children: /* @__PURE__ */ l("div", {
37
+ children: /* @__PURE__ */ u("div", {
37
38
  className: "col-md-offset-1 col-md-10",
38
- children: /* @__PURE__ */ u("div", {
39
+ children: /* @__PURE__ */ d("div", {
39
40
  className: "SRC-portalCardMain",
40
- children: [!E && x, /* @__PURE__ */ u(s, {
41
+ children: [!M && T, /* @__PURE__ */ d(c, {
41
42
  sx: {
42
43
  width: "100%",
43
- ...E && {
44
+ ...M && {
44
45
  display: "flex",
45
46
  flexDirection: {
46
47
  xs: "column",
@@ -48,60 +49,90 @@ var d = o(function(i, o) {
48
49
  }
49
50
  }
50
51
  },
51
- children: [/* @__PURE__ */ u("div", {
52
- className: "SRC-cardContent",
53
- style: { marginLeft: "15px" },
54
- children: [
55
- /* @__PURE__ */ l("div", {
56
- className: "SRC-type",
57
- children: d
58
- }),
59
- /* @__PURE__ */ l("div", { children: /* @__PURE__ */ l("h3", {
60
- className: "SRC-boldText",
61
- style: { margin: "none" },
62
- children: y ? /* @__PURE__ */ l(n, {
63
- href: y ?? "",
64
- className: "highlight-link",
65
- target: b,
66
- children: f
67
- }) : /* @__PURE__ */ l("span", { children: f })
68
- }) }),
69
- p && /* @__PURE__ */ u("div", {
70
- className: "SRC-author",
71
- children: [
72
- " ",
73
- p,
74
- " "
75
- ]
76
- }),
77
- /* @__PURE__ */ l(r, {
78
- description: m,
79
- descriptionSubTitle: "",
80
- descriptionConfig: D
81
- }),
82
- w && /* @__PURE__ */ l(a, {
83
- metricsConfig: w.metricsConfig,
84
- searchParamKey: w.searchParamKey,
85
- filterColumn: w.filterColumn,
86
- scoreDescriptorColumnName: w.scoreDescriptorColumnName,
87
- queryRequest: w.queryRequest,
88
- sustainabilityReportLink: w.sustainabilityReportLink,
89
- sx: {
90
- background: "rgba(0, 0, 0, 0.10)",
91
- marginTop: "30px"
92
- }
93
- })
94
- ]
95
- }), (h || S) && /* @__PURE__ */ u(c, { children: [/* @__PURE__ */ l("div", { style: {
52
+ children: [/* @__PURE__ */ d(c, {
53
+ sx: {
54
+ display: "flex",
55
+ flexDirection: "row",
56
+ width: "100%"
57
+ },
58
+ children: [/* @__PURE__ */ d("div", {
59
+ className: "SRC-cardContent",
60
+ style: {
61
+ marginLeft: "15px",
62
+ flex: 1,
63
+ minWidth: 0
64
+ },
65
+ children: [
66
+ /* @__PURE__ */ d(c, {
67
+ sx: {
68
+ display: "flex",
69
+ flexDirection: "row",
70
+ alignItems: "center",
71
+ gap: "10px"
72
+ },
73
+ children: [/* @__PURE__ */ u("div", {
74
+ className: "SRC-type",
75
+ children: f
76
+ }), A]
77
+ }),
78
+ /* @__PURE__ */ u(c, {
79
+ sx: { "& .icon-list.themed path, & .icon-list.themed circle": { fill: "white" } },
80
+ children: k
81
+ }),
82
+ /* @__PURE__ */ u("div", { children: /* @__PURE__ */ u("h3", {
83
+ className: "SRC-boldText",
84
+ style: { margin: "none" },
85
+ children: S ? /* @__PURE__ */ u(r, {
86
+ fileHandleAssociation: S.fileHandleAssociation,
87
+ showDownloadIcon: S.showDownloadIcon,
88
+ displayValue: p
89
+ }) : b ? /* @__PURE__ */ u(n, {
90
+ href: b ?? "",
91
+ className: "highlight-link",
92
+ target: x,
93
+ children: p
94
+ }) : /* @__PURE__ */ u("span", { children: p })
95
+ }) }),
96
+ m && /* @__PURE__ */ d("div", {
97
+ className: "SRC-author",
98
+ children: [
99
+ " ",
100
+ m,
101
+ " "
102
+ ]
103
+ }),
104
+ /* @__PURE__ */ u(i, {
105
+ description: h,
106
+ descriptionSubTitle: w,
107
+ descriptionConfig: N
108
+ }),
109
+ O && /* @__PURE__ */ u(o, {
110
+ metricsConfig: O.metricsConfig,
111
+ searchParamKey: O.searchParamKey,
112
+ filterColumn: O.filterColumn,
113
+ scoreDescriptorColumnName: O.scoreDescriptorColumnName,
114
+ queryRequest: O.queryRequest,
115
+ sustainabilityReportLink: O.sustainabilityReportLink,
116
+ sx: {
117
+ background: "rgba(0, 0, 0, 0.10)",
118
+ marginTop: "30px"
119
+ }
120
+ })
121
+ ]
122
+ }), C && /* @__PURE__ */ u("div", {
123
+ className: "SRC-cardTitleAreaDetails",
124
+ children: C
125
+ })]
126
+ }), (g || E) && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: {
96
127
  borderTop: "1px solid rgba(26, 28, 41, 0.2)",
97
128
  marginTop: "15px",
98
129
  paddingTop: "5px"
99
- } }), /* @__PURE__ */ u("div", {
130
+ } }), /* @__PURE__ */ d("div", {
100
131
  className: "SRC-cardContent",
101
- children: [S, h && /* @__PURE__ */ l(t, {
132
+ children: [E, g && /* @__PURE__ */ u(t, {
102
133
  isHeader: !0,
103
- secondaryLabelLimit: g,
104
- values: h
134
+ secondaryLabelLimit: _,
135
+ values: g
105
136
  })]
106
137
  })] })]
107
138
  })]
@@ -110,14 +141,14 @@ var d = o(function(i, o) {
110
141
  })]
111
142
  })
112
143
  });
113
- }), f = o(function(e, t) {
144
+ }), p = s(function(e, t) {
114
145
  let { headerCardVariant: n = "HeaderCard" } = e;
115
- return l(n === "HeaderCardV2" ? i : d, {
146
+ return u(n === "HeaderCardV2" ? a : f, {
116
147
  ...e,
117
148
  ref: t
118
149
  });
119
150
  });
120
151
  //#endregion
121
- export { f as default };
152
+ export { p as default };
122
153
 
123
154
  //# sourceMappingURL=HeaderCard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HeaderCard.js","names":[],"sources":["../../src/components/HeaderCard.tsx"],"sourcesContent":["import { CardLabel } from '@/components/row_renderers/utils/CardFooter'\nimport { Box, SxProps } from '@mui/material'\nimport { SmartLink } from './SmartLink/SmartLink'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { CardFooter } from './row_renderers/utils'\nimport { DescriptionConfig } from './CardContainerLogic'\nimport { CollapsibleDescription } from './GenericCard/CollapsibleDescription'\nimport { GenericCardProps } from '@/components/GenericCard/GenericCard'\nimport HeaderCardV2 from './HeaderCard/HeaderCardV2'\nimport SustainabilityScorecard, {\n SustainabilityScorecardProps,\n} from './SustainabilityScorecard/SustainabilityScorecard'\nimport { useDocumentMetadata } from '@/utils/context/DocumentMetadataContext'\n\nexport type HeaderCardVariant = 'HeaderCard' | 'HeaderCardV2'\n\nexport type HeaderCardProps = {\n type: string\n title: string\n subTitle?: string\n description: string\n secondaryLabelLimit?: number\n values?: CardLabel[]\n isAlignToLeftNav?: boolean\n descriptionConfig?: DescriptionConfig\n charCountCutoff?: number\n href?: string\n target?: string\n icon: React.ReactNode\n headerCardVariant?: HeaderCardVariant\n cardTopContent?: React.ReactNode\n ctaLinkConfig?: GenericCardProps['ctaLinkConfig']\n cardTopButtons?: React.ReactNode\n sustainabilityScorecard?: SustainabilityScorecardProps\n doiUri?: string\n sx?: SxProps\n}\n\nconst HeaderCardClassic = forwardRef(function HeaderCardClassic(\n props: HeaderCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const {\n type,\n title,\n subTitle = '',\n description,\n values,\n secondaryLabelLimit,\n isAlignToLeftNav,\n descriptionConfig,\n href,\n target,\n icon,\n cardTopContent,\n cardTopButtons,\n sustainabilityScorecard,\n sx,\n } = props\n\n const hideIcon = Boolean(sustainabilityScorecard)\n const descriptionConfiguration: DescriptionConfig = {\n ...descriptionConfig,\n showFullDescriptionByDefault:\n descriptionConfig?.showFullDescriptionByDefault ?? true,\n }\n\n const metadataDescription = description || subTitle || undefined\n useDocumentMetadata({\n title,\n description: metadataDescription,\n priority: 100,\n })\n\n return (\n <Box\n ref={ref}\n className={`SRC-portalCard SRC-portalCardHeader ${\n isAlignToLeftNav ? 'isAlignToLeftNav' : ''\n }`}\n sx={sx}\n >\n <div className=\"container-fluid container-full-width\">\n <Box\n sx={{\n display: 'flex',\n gap: '10px',\n float: 'right',\n }}\n >\n {cardTopButtons}\n </Box>\n <div className=\"row\">\n <div className=\"col-md-offset-1 col-md-10\">\n <div className=\"SRC-portalCardMain\">\n {!hideIcon && icon}\n <Box\n sx={{\n width: '100%',\n ...(hideIcon && {\n display: 'flex',\n flexDirection: { xs: 'column', sm: 'row' },\n }),\n }}\n >\n <div className=\"SRC-cardContent\" style={{ marginLeft: '15px' }}>\n <div className=\"SRC-type\">{type}</div>\n <div>\n <h3 className=\"SRC-boldText\" style={{ margin: 'none' }}>\n {href ? (\n <SmartLink\n href={href ?? ''}\n className=\"highlight-link\"\n target={target}\n >\n {title}\n </SmartLink>\n ) : (\n <span>{title}</span>\n )}\n </h3>\n </div>\n {subTitle && <div className=\"SRC-author\"> {subTitle} </div>}\n <CollapsibleDescription\n description={description}\n descriptionSubTitle=\"\"\n descriptionConfig={descriptionConfiguration}\n />\n {sustainabilityScorecard && (\n <SustainabilityScorecard\n metricsConfig={sustainabilityScorecard.metricsConfig}\n searchParamKey={sustainabilityScorecard.searchParamKey}\n filterColumn={sustainabilityScorecard.filterColumn}\n scoreDescriptorColumnName={\n sustainabilityScorecard.scoreDescriptorColumnName\n }\n queryRequest={sustainabilityScorecard.queryRequest}\n sustainabilityReportLink={\n sustainabilityScorecard.sustainabilityReportLink\n }\n sx={{\n background: 'rgba(0, 0, 0, 0.10)',\n marginTop: '30px',\n }}\n />\n )}\n </div>\n {(values || cardTopContent) && (\n <>\n <div\n style={{\n borderTop: '1px solid rgba(26, 28, 41, 0.2)',\n marginTop: '15px',\n paddingTop: '5px',\n }}\n />\n <div className=\"SRC-cardContent\">\n {cardTopContent}\n {values && (\n <CardFooter\n isHeader={true}\n secondaryLabelLimit={secondaryLabelLimit}\n values={values}\n />\n )}\n </div>\n </>\n )}\n </Box>\n </div>\n </div>\n </div>\n </div>\n </Box>\n )\n})\n\nconst HeaderCard = forwardRef(function HeaderCard(\n props: HeaderCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { headerCardVariant = 'HeaderCard' } = props\n if (headerCardVariant === 'HeaderCardV2') {\n return <HeaderCardV2 {...props} ref={ref} />\n }\n return <HeaderCardClassic {...props} ref={ref} />\n})\n\nexport default HeaderCard\n"],"mappings":";;;;;;;;;;;AAsCA,IAAM,IAAoB,EAAW,SACnC,GACA,GACA;CACA,IAAM,EACJ,SACA,UACA,cAAW,IACX,gBACA,WACA,wBACA,qBACA,sBACA,SACA,WACA,SACA,mBACA,mBACA,4BACA,UACE,GAEE,IAAW,EAAQ,GACnB,IAA8C;EAClD,GAAG;EACH,8BACE,GAAmB,gCAAgC;EACtD;AASD,QANA,EAAoB;EAClB;EACA,aAH0B,KAAe,KAAY,KAAA;EAIrD,UAAU;EACX,CAAC,EAGA,kBAAC,GAAD;EACO;EACL,WAAW,uCACT,IAAmB,qBAAqB;EAEtC;YAEJ,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IACE,IAAI;KACF,SAAS;KACT,KAAK;KACL,OAAO;KACR;cAEA;IACG,CAAA,EACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,OAAD;KAAK,WAAU;eACb,kBAAC,OAAD;MAAK,WAAU;gBAAf,CACG,CAAC,KAAY,GACd,kBAAC,GAAD;OACE,IAAI;QACF,OAAO;QACP,GAAI,KAAY;SACd,SAAS;SACT,eAAe;UAAE,IAAI;UAAU,IAAI;UAAO;SAC3C;QACF;iBAPH,CASE,kBAAC,OAAD;QAAK,WAAU;QAAkB,OAAO,EAAE,YAAY,QAAQ;kBAA9D;SACE,kBAAC,OAAD;UAAK,WAAU;oBAAY;UAAW,CAAA;SACtC,kBAAC,OAAD,EAAA,UACE,kBAAC,MAAD;UAAI,WAAU;UAAe,OAAO,EAAE,QAAQ,QAAQ;oBACnD,IACC,kBAAC,GAAD;WACE,MAAM,KAAQ;WACd,WAAU;WACF;qBAEP;WACS,CAAA,GAEZ,kBAAC,QAAD,EAAA,UAAO,GAAa,CAAA;UAEnB,CAAA,EACD,CAAA;SACL,KAAY,kBAAC,OAAD;UAAK,WAAU;oBAAf;WAA4B;WAAE;WAAS;WAAO;;SAC3D,kBAAC,GAAD;UACe;UACb,qBAAoB;UACpB,mBAAmB;UACnB,CAAA;SACD,KACC,kBAAC,GAAD;UACE,eAAe,EAAwB;UACvC,gBAAgB,EAAwB;UACxC,cAAc,EAAwB;UACtC,2BACE,EAAwB;UAE1B,cAAc,EAAwB;UACtC,0BACE,EAAwB;UAE1B,IAAI;WACF,YAAY;WACZ,WAAW;WACZ;UACD,CAAA;SAEA;YACJ,KAAU,MACV,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,OAAD,EACE,OAAO;QACL,WAAW;QACX,WAAW;QACX,YAAY;QACb,EACD,CAAA,EACF,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,GACA,KACC,kBAAC,GAAD;SACE,UAAU;SACW;SACb;SACR,CAAA,CAEA;UACL,EAAA,CAAA,CAED;SACF;;KACF,CAAA;IACF,CAAA,CACF;;EACF,CAAA;EAER,EAEI,IAAa,EAAW,SAC5B,GACA,GACA;CACA,IAAM,EAAE,uBAAoB,iBAAiB;AAI7C,QAFS,EADL,MAAsB,iBAChB,IAEF,GAFC;EAAc,GAAI;EAAY;EAAO,CAAA;EAG9C"}
1
+ {"version":3,"file":"HeaderCard.js","names":[],"sources":["../../src/components/HeaderCard.tsx"],"sourcesContent":["import { CardLabel } from '@/components/row_renderers/utils/CardFooter'\nimport { Box, SxProps } from '@mui/material'\nimport { SmartLink } from './SmartLink/SmartLink'\nimport { ForwardedRef, forwardRef } from 'react'\nimport { FileHandleLink } from './widgets/FileHandleLink'\nimport { GenericCardProps } from '@/components/GenericCard/GenericCard'\nimport { CardFooter } from './row_renderers/utils'\nimport { DescriptionConfig } from './CardContainerLogic'\nimport { CollapsibleDescription } from './GenericCard/CollapsibleDescription'\nimport HeaderCardV2 from './HeaderCard/HeaderCardV2'\nimport SustainabilityScorecard, {\n SustainabilityScorecardProps,\n} from './SustainabilityScorecard/SustainabilityScorecard'\nimport { useDocumentMetadata } from '@/utils/context/DocumentMetadataContext'\n\nexport type HeaderCardVariant = 'HeaderCard' | 'HeaderCardV2'\n\nexport type HeaderCardProps = {\n type: string\n title: string\n subTitle?: string\n description: string\n secondaryLabelLimit?: number\n values?: CardLabel[]\n isAlignToLeftNav?: boolean\n descriptionConfig?: DescriptionConfig\n charCountCutoff?: number\n href?: string\n target?: string\n titleAsFileHandleLinkConfiguration?: GenericCardProps['titleAsFileHandleLinkConfiguration']\n titleAreaRightContent?: React.ReactNode\n descriptionSubTitle?: string\n icon: React.ReactNode\n headerCardVariant?: HeaderCardVariant\n cardTopContent?: React.ReactNode\n ctaLinkConfig?: GenericCardProps['ctaLinkConfig']\n cardTopButtons?: React.ReactNode\n sustainabilityScorecard?: SustainabilityScorecardProps\n renderedIconList?: React.ReactNode\n cardTypeAdornment?: React.ReactNode\n doiUri?: string\n sx?: SxProps\n}\n\nconst HeaderCardClassic = forwardRef(function HeaderCardClassic(\n props: HeaderCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const {\n type,\n title,\n subTitle = '',\n description,\n values,\n secondaryLabelLimit,\n isAlignToLeftNav,\n descriptionConfig,\n href,\n target,\n titleAsFileHandleLinkConfiguration,\n titleAreaRightContent,\n descriptionSubTitle = '',\n icon,\n cardTopContent,\n cardTopButtons,\n sustainabilityScorecard,\n renderedIconList,\n cardTypeAdornment,\n sx,\n } = props\n\n const hideIcon = Boolean(sustainabilityScorecard)\n const descriptionConfiguration: DescriptionConfig = {\n ...descriptionConfig,\n showFullDescriptionByDefault:\n descriptionConfig?.showFullDescriptionByDefault ?? true,\n }\n\n const metadataDescription = description || subTitle || undefined\n useDocumentMetadata({\n title,\n description: metadataDescription,\n priority: 100,\n })\n\n return (\n <Box\n ref={ref}\n className={`SRC-portalCard SRC-portalCardHeader ${\n isAlignToLeftNav ? 'isAlignToLeftNav' : ''\n }`}\n sx={sx}\n >\n <div className=\"container-fluid container-full-width\">\n <Box\n sx={{\n display: 'flex',\n gap: '10px',\n float: 'right',\n }}\n >\n {cardTopButtons}\n </Box>\n <div className=\"row\">\n <div className=\"col-md-offset-1 col-md-10\">\n <div className=\"SRC-portalCardMain\">\n {!hideIcon && icon}\n <Box\n sx={{\n width: '100%',\n ...(hideIcon && {\n display: 'flex',\n flexDirection: { xs: 'column', sm: 'row' },\n }),\n }}\n >\n <Box\n sx={{ display: 'flex', flexDirection: 'row', width: '100%' }}\n >\n <div\n className=\"SRC-cardContent\"\n style={{ marginLeft: '15px', flex: 1, minWidth: 0 }}\n >\n <Box\n sx={{\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n gap: '10px',\n }}\n >\n <div className=\"SRC-type\">{type}</div>\n {cardTypeAdornment}\n </Box>\n <Box\n sx={{\n '& .icon-list.themed path, & .icon-list.themed circle':\n {\n fill: 'white',\n },\n }}\n >\n {renderedIconList}\n </Box>\n <div>\n <h3 className=\"SRC-boldText\" style={{ margin: 'none' }}>\n {titleAsFileHandleLinkConfiguration ? (\n <FileHandleLink\n fileHandleAssociation={\n titleAsFileHandleLinkConfiguration.fileHandleAssociation\n }\n showDownloadIcon={\n titleAsFileHandleLinkConfiguration.showDownloadIcon\n }\n displayValue={title}\n />\n ) : href ? (\n <SmartLink\n href={href ?? ''}\n className=\"highlight-link\"\n target={target}\n >\n {title}\n </SmartLink>\n ) : (\n <span>{title}</span>\n )}\n </h3>\n </div>\n {subTitle && <div className=\"SRC-author\"> {subTitle} </div>}\n <CollapsibleDescription\n description={description}\n descriptionSubTitle={descriptionSubTitle}\n descriptionConfig={descriptionConfiguration}\n />\n {sustainabilityScorecard && (\n <SustainabilityScorecard\n metricsConfig={sustainabilityScorecard.metricsConfig}\n searchParamKey={sustainabilityScorecard.searchParamKey}\n filterColumn={sustainabilityScorecard.filterColumn}\n scoreDescriptorColumnName={\n sustainabilityScorecard.scoreDescriptorColumnName\n }\n queryRequest={sustainabilityScorecard.queryRequest}\n sustainabilityReportLink={\n sustainabilityScorecard.sustainabilityReportLink\n }\n sx={{\n background: 'rgba(0, 0, 0, 0.10)',\n marginTop: '30px',\n }}\n />\n )}\n </div>\n {titleAreaRightContent && (\n <div className=\"SRC-cardTitleAreaDetails\">\n {titleAreaRightContent}\n </div>\n )}\n </Box>\n {(values || cardTopContent) && (\n <>\n <div\n style={{\n borderTop: '1px solid rgba(26, 28, 41, 0.2)',\n marginTop: '15px',\n paddingTop: '5px',\n }}\n />\n <div className=\"SRC-cardContent\">\n {cardTopContent}\n {values && (\n <CardFooter\n isHeader={true}\n secondaryLabelLimit={secondaryLabelLimit}\n values={values}\n />\n )}\n </div>\n </>\n )}\n </Box>\n </div>\n </div>\n </div>\n </div>\n </Box>\n )\n})\n\nconst HeaderCard = forwardRef(function HeaderCard(\n props: HeaderCardProps,\n ref: ForwardedRef<HTMLDivElement>,\n) {\n const { headerCardVariant = 'HeaderCard' } = props\n if (headerCardVariant === 'HeaderCardV2') {\n return <HeaderCardV2 {...props} ref={ref} />\n }\n return <HeaderCardClassic {...props} ref={ref} />\n})\n\nexport default HeaderCard\n"],"mappings":";;;;;;;;;;;;AA4CA,IAAM,IAAoB,EAAW,SACnC,GACA,GACA;CACA,IAAM,EACJ,SACA,UACA,cAAW,IACX,gBACA,WACA,wBACA,qBACA,sBACA,SACA,WACA,uCACA,0BACA,yBAAsB,IACtB,SACA,mBACA,mBACA,4BACA,qBACA,sBACA,UACE,GAEE,IAAW,EAAQ,GACnB,IAA8C;EAClD,GAAG;EACH,8BACE,GAAmB,gCAAgC;EACtD;AASD,QANA,EAAoB;EAClB;EACA,aAH0B,KAAe,KAAY,KAAA;EAIrD,UAAU;EACX,CAAC,EAGA,kBAAC,GAAD;EACO;EACL,WAAW,uCACT,IAAmB,qBAAqB;EAEtC;YAEJ,kBAAC,OAAD;GAAK,WAAU;aAAf,CACE,kBAAC,GAAD;IACE,IAAI;KACF,SAAS;KACT,KAAK;KACL,OAAO;KACR;cAEA;IACG,CAAA,EACN,kBAAC,OAAD;IAAK,WAAU;cACb,kBAAC,OAAD;KAAK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;YACL,KACC,kBAAC,OAAD;SAAK,WAAU;mBACZ;SACG,CAAA,CAEJ;YACJ,KAAU,MACV,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,OAAD,EACE,OAAO;QACL,WAAW;QACX,WAAW;QACX,YAAY;QACb,EACD,CAAA,EACF,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACG,GACA,KACC,kBAAC,GAAD;SACE,UAAU;SACW;SACb;SACR,CAAA,CAEA;UACL,EAAA,CAAA,CAED;SACF;;KACF,CAAA;IACF,CAAA,CACF;;EACF,CAAA;EAER,EAEI,IAAa,EAAW,SAC5B,GACA,GACA;CACA,IAAM,EAAE,uBAAoB,iBAAiB;AAI7C,QAFS,EADL,MAAsB,iBAChB,IAEF,GAFC;EAAc,GAAI;EAAY;EAAO,CAAA;EAG9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"HexGrid.js","names":[],"sources":["../../../src/components/HexGrid/HexGrid.tsx"],"sourcesContent":["import styles from './HexGrid.module.scss'\nimport { parseEntityIdFromSqlStatement } from '@/utils/functions/SqlFunctions'\nimport {\n FileHandleAssociateType,\n QueryBundleRequest,\n} from '@sage-bionetworks/synapse-types'\nimport { SynapseConstants } from '@/utils'\nimport { useGetFullTableQueryResults } from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { ImageFileHandle } from '@/components/widgets/ImageFileHandle'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport { ButtonBase, Typography } from '@mui/material'\n\n// Column values resolved by name so consumers don't need the indices that are only known inside HexGrid.\nexport type HexRowData = {\n title: string\n imageFileHandleId: string | null\n description: string | null\n entityId: string\n}\n\ntype HexGridProps = {\n sql: string\n titleColName: string\n imageColName: string\n descriptionColName: string\n onRowClick?: (rowData: HexRowData) => void\n}\n\nfunction HexGrid({\n sql,\n titleColName,\n imageColName,\n descriptionColName,\n onRowClick,\n}: HexGridProps) {\n const entityId = parseEntityIdFromSqlStatement(sql)\n const queryBundleRequest: QueryBundleRequest = {\n entityId,\n query: { sql },\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n }\n\n const { data: queryResultBundle } =\n useGetFullTableQueryResults(queryBundleRequest)\n\n const dataRows = queryResultBundle?.queryResult?.queryResults.rows ?? []\n\n const titleColIndex = getFieldIndex(titleColName, queryResultBundle)\n\n const imageColIndex = getFieldIndex(imageColName, queryResultBundle)\n\n const descColIndex = getFieldIndex(descriptionColName, queryResultBundle)\n\n return (\n <div className={styles.hexSlat}>\n <div className={styles.gridWrapper}>\n <ul className={styles.hexGrid}>\n {dataRows.map(row => (\n <ButtonBase\n component=\"li\"\n key={row.rowId}\n className={styles.hex}\n onClick={() =>\n onRowClick?.({\n title: row.values[titleColIndex] ?? '',\n imageFileHandleId: row.values[imageColIndex] ?? null,\n description: row.values[descColIndex] ?? null,\n entityId,\n })\n }\n >\n <div className={styles.hexIn}>\n <Typography variant=\"headline3\" className={styles.hexTitle}>\n {row.values[titleColIndex]}\n </Typography>\n <ImageFileHandle\n fileHandleAssociation={{\n fileHandleId: row.values[imageColIndex] ?? '',\n associateObjectId: entityId,\n associateObjectType: FileHandleAssociateType.TableEntity,\n }}\n imgProps={{ className: styles.hexIcon }}\n />\n </div>\n </ButtonBase>\n ))}\n </ul>\n </div>\n </div>\n )\n}\n\nexport default HexGrid\n"],"mappings":";;;;;;;;;;;AA4BA,SAAS,EAAQ,EACf,QACA,iBACA,iBACA,uBACA,iBACe;CACf,IAAM,IAAW,EAA8B,EAAI,EAU7C,EAAE,MAAM,MACZ,EAV6C;EAC7C;EACA,OAAO,EAAE,QAAK;EACd,UACE;EAEF,cAAc;EACf,CAGgD,EAE3C,IAAW,GAAmB,aAAa,aAAa,QAAQ,EAAE,EAElE,IAAgB,EAAc,GAAc,EAAkB,EAE9D,IAAgB,EAAc,GAAc,EAAkB,EAE9D,IAAe,EAAc,GAAoB,EAAkB;AAEzE,QACE,kBAAC,OAAD;EAAK,WAAW,EAAO;YACrB,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,MAAD;IAAI,WAAW,EAAO;cACnB,EAAS,KAAI,MACZ,kBAAC,GAAD;KACE,WAAU;KAEV,WAAW,EAAO;KAClB,eACE,IAAa;MACX,OAAO,EAAI,OAAO,MAAkB;MACpC,mBAAmB,EAAI,OAAO,MAAkB;MAChD,aAAa,EAAI,OAAO,MAAiB;MACzC;MACD,CAAC;eAGJ,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB,CACE,kBAAC,GAAD;OAAY,SAAQ;OAAY,WAAW,EAAO;iBAC/C,EAAI,OAAO;OACD,CAAA,EACb,kBAAC,GAAD;OACE,uBAAuB;QACrB,cAAc,EAAI,OAAO,MAAkB;QAC3C,mBAAmB;QACnB,qBAAqB,EAAwB;QAC9C;OACD,UAAU,EAAE,WAAW,EAAO,SAAS;OACvC,CAAA,CACE;;KACK,EAxBN,EAAI,MAwBE,CACb;IACC,CAAA;GACD,CAAA;EACF,CAAA"}
1
+ {"version":3,"file":"HexGrid.js","names":[],"sources":["../../../src/components/HexGrid/HexGrid.tsx"],"sourcesContent":["import styles from './HexGrid.module.scss'\nimport { parseEntityIdFromSqlStatement } from '@/utils/functions/SqlFunctions'\nimport {\n FileHandleAssociateType,\n QueryBundleRequest,\n} from '@sage-bionetworks/synapse-types'\nimport { SynapseConstants } from '@/utils'\nimport { useGetFullTableQueryResults } from '@/synapse-queries/entity/useGetQueryResultBundle'\nimport { ImageFileHandle } from '@/components/widgets/ImageFileHandle'\nimport { getFieldIndex } from '@/utils/functions/queryUtils'\nimport { ButtonBase, Typography } from '@mui/material'\n\n// Column values resolved by name so consumers don't need the indices that are only known inside HexGrid.\nexport type HexRowData = {\n title: string\n imageFileHandleId: string | null\n description: string | null\n entityId: string\n}\n\ntype HexGridProps = {\n sql: string\n titleColName: string\n imageColName: string\n descriptionColName: string\n onRowClick?: (rowData: HexRowData) => void\n}\n\nfunction HexGrid({\n sql,\n titleColName,\n imageColName,\n descriptionColName,\n onRowClick,\n}: HexGridProps) {\n const entityId = parseEntityIdFromSqlStatement(sql)\n const queryBundleRequest: QueryBundleRequest = {\n entityId,\n query: { sql },\n partMask:\n SynapseConstants.BUNDLE_MASK_QUERY_SELECT_COLUMNS |\n SynapseConstants.BUNDLE_MASK_QUERY_RESULTS,\n concreteType: 'org.sagebionetworks.repo.model.table.QueryBundleRequest',\n }\n\n const { data: queryResultBundle } =\n useGetFullTableQueryResults(queryBundleRequest)\n\n const dataRows = queryResultBundle?.queryResult?.queryResults.rows ?? []\n\n const titleColIndex = getFieldIndex(titleColName, queryResultBundle)\n\n const imageColIndex = getFieldIndex(imageColName, queryResultBundle)\n\n const descColIndex = getFieldIndex(descriptionColName, queryResultBundle)\n\n return (\n <div className={styles.hexSlat}>\n <div className={styles.gridWrapper}>\n <ul className={styles.hexGrid}>\n {dataRows.map(row => (\n <ButtonBase\n component=\"li\"\n key={row.rowId}\n className={styles.hex}\n onClick={() =>\n onRowClick?.({\n title: row.values[titleColIndex] ?? '',\n imageFileHandleId: row.values[imageColIndex] ?? null,\n description: row.values[descColIndex] ?? null,\n entityId,\n })\n }\n >\n <div className={styles.hexIn}>\n <Typography variant=\"headline3\" className={styles.hexTitle}>\n {row.values[titleColIndex]}\n </Typography>\n <ImageFileHandle\n fileHandleAssociation={{\n fileHandleId: row.values[imageColIndex] ?? '',\n associateObjectId: entityId,\n associateObjectType: FileHandleAssociateType.TableEntity,\n }}\n imgProps={{ className: styles.hexIcon }}\n />\n </div>\n </ButtonBase>\n ))}\n </ul>\n </div>\n </div>\n )\n}\n\nexport default HexGrid\n"],"mappings":";;;;;;;;;;;AA4BA,SAAS,EAAQ,EACf,QACA,iBACA,iBACA,uBACA,iBACe;CACf,IAAM,IAAW,EAA8B,EAAI,EAU7C,EAAE,MAAM,MACZ,EAA4B;EAT5B;EACA,OAAO,EAAE,QAAK;EACd,UACE;EAEF,cAAc;EAIc,CAAmB,EAE3C,IAAW,GAAmB,aAAa,aAAa,QAAQ,EAAE,EAElE,IAAgB,EAAc,GAAc,EAAkB,EAE9D,IAAgB,EAAc,GAAc,EAAkB,EAE9D,IAAe,EAAc,GAAoB,EAAkB;AAEzE,QACE,kBAAC,OAAD;EAAK,WAAW,EAAO;YACrB,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,MAAD;IAAI,WAAW,EAAO;cACnB,EAAS,KAAI,MACZ,kBAAC,GAAD;KACE,WAAU;KAEV,WAAW,EAAO;KAClB,eACE,IAAa;MACX,OAAO,EAAI,OAAO,MAAkB;MACpC,mBAAmB,EAAI,OAAO,MAAkB;MAChD,aAAa,EAAI,OAAO,MAAiB;MACzC;MACD,CAAC;eAGJ,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB,CACE,kBAAC,GAAD;OAAY,SAAQ;OAAY,WAAW,EAAO;iBAC/C,EAAI,OAAO;OACD,CAAA,EACb,kBAAC,GAAD;OACE,uBAAuB;QACrB,cAAc,EAAI,OAAO,MAAkB;QAC3C,mBAAmB;QACnB,qBAAqB,EAAwB;QAC9C;OACD,UAAU,EAAE,WAAW,EAAO,SAAS;OACvC,CAAA,CACE;;KACK,EAxBN,EAAI,MAwBE,CACb;IACC,CAAA;GACD,CAAA;EACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"IconList.js","names":[],"sources":["../../src/components/IconList.tsx"],"sourcesContent":["import { UniqueFacetIdentifier } from '@/utils'\nimport { merge } from 'lodash-es'\nimport { useCallback, useMemo } from 'react'\nimport IconSvg, { IconSvgProps } from './IconSvg/IconSvg'\nimport { useQueryContext } from './QueryContext'\n\ntype IconConfigs = {\n [index: string]: IconSvgProps // if the icon option has the \"label\" set, it will show tooltip in IconSvg\n}\n\nexport type IconListProps = {\n iconConfigs: IconConfigs\n iconNames: string[]\n commonIconProps?: Omit<IconSvgProps, 'icon'>\n useTheme?: boolean\n useBackground?: boolean\n}\n\nconst defaultCommonIconProps: IconListProps['commonIconProps'] = {\n sx: { fontSize: '24px' },\n}\n\nfunction IconList(props: IconListProps) {\n const {\n iconConfigs,\n iconNames,\n commonIconProps = defaultCommonIconProps,\n useTheme,\n useBackground,\n } = props\n let noMatch: boolean = false\n const css = useTheme ? 'icon-list themed' : 'icon-list'\n const componentCss = useBackground ? `${css} bg-circle` : css\n const queryContext = useQueryContext()\n const { addValueToSelectedFacet } = queryContext\n\n const handleIconClick = useCallback(\n (dataType: 'string') => {\n const facet: UniqueFacetIdentifier = {\n columnName: 'dataType',\n }\n addValueToSelectedFacet(facet, dataType)\n },\n [addValueToSelectedFacet],\n )\n\n const mergedIconConfigs: IconConfigs = useMemo(() => {\n const mergedIconConfigs: IconConfigs = {}\n for (const [key, iconProps] of Object.entries(iconConfigs)) {\n mergedIconConfigs[key] = merge({}, commonIconProps, iconProps)\n }\n return mergedIconConfigs\n }, [iconConfigs, commonIconProps])\n\n const buildIconList = () => {\n const unique = Array.from(new Set(iconNames))\n return unique.map((el: any) => {\n const iconConfig = mergedIconConfigs[el]\n // if this data type value doesn't have a matching icon, we use the \"other\" icon\n if (!iconConfig) {\n noMatch = true\n return\n } else {\n return (\n <IconSvg\n key={el}\n {...iconConfig}\n onClick={() => handleIconClick(el)}\n />\n )\n }\n })\n }\n\n return (\n <span className={componentCss}>\n {buildIconList()}\n {noMatch && mergedIconConfigs['other'] ? (\n <IconSvg {...mergedIconConfigs['other']} />\n ) : (\n <></>\n )}\n </span>\n )\n}\n\nexport default IconList\n"],"mappings":";;;;;;;AAkBA,IAAM,IAA2D,EAC/D,IAAI,EAAE,UAAU,QAAQ,EACzB;AAED,SAAS,EAAS,GAAsB;CACtC,IAAM,EACJ,gBACA,cACA,qBAAkB,GAClB,aACA,qBACE,GACA,IAAmB,IACjB,IAAM,IAAW,qBAAqB,aACtC,IAAe,IAAgB,GAAG,EAAI,cAAc,GAEpD,EAAE,+BADa,GAAiB,EAGhC,IAAkB,GACrB,MAAuB;AAItB,IAHqC,EACnC,YAAY,YACb,EAC8B,EAAS;IAE1C,CAAC,EAAwB,CAC1B,EAEK,IAAiC,QAAc;EACnD,IAAM,IAAiC,EAAE;AACzC,OAAK,IAAM,CAAC,GAAK,MAAc,OAAO,QAAQ,EAAY,CACxD,GAAkB,KAAO,EAAM,EAAE,EAAE,GAAiB,EAAU;AAEhE,SAAO;IACN,CAAC,GAAa,EAAgB,CAAC;AAsBlC,QACE,kBAAC,QAAD;EAAM,WAAW;YAAjB,CApBe,MAAM,KAAK,IAAI,IAAI,EAAU,CAAC,CAC/B,KAAK,MAAY;GAC7B,IAAM,IAAa,EAAkB;AAErC,OAAK,EAIH,QACE,kBAAC,GAAD;IAEE,GAAI;IACJ,eAAe,EAAgB,EAAG;IAClC,EAHK,EAGL;AARJ,OAAU;IAWZ,EAMC,KAAW,EAAkB,QAC5B,kBAAC,GAAD,EAAS,GAAI,EAAkB,OAAY,CAAA,GAE3C,kBAAA,GAAA,EAAK,CAAA,CAEF"}
1
+ {"version":3,"file":"IconList.js","names":[],"sources":["../../src/components/IconList.tsx"],"sourcesContent":["import { UniqueFacetIdentifier } from '@/utils'\nimport { merge } from 'lodash-es'\nimport { useCallback, useMemo } from 'react'\nimport IconSvg, { IconSvgProps } from './IconSvg/IconSvg'\nimport { useQueryContext } from './QueryContext'\n\ntype IconConfigs = {\n [index: string]: IconSvgProps // if the icon option has the \"label\" set, it will show tooltip in IconSvg\n}\n\nexport type IconListProps = {\n iconConfigs: IconConfigs\n iconNames: string[]\n commonIconProps?: Omit<IconSvgProps, 'icon'>\n useTheme?: boolean\n useBackground?: boolean\n}\n\nconst defaultCommonIconProps: IconListProps['commonIconProps'] = {\n sx: { fontSize: '24px' },\n}\n\nfunction IconList(props: IconListProps) {\n const {\n iconConfigs,\n iconNames,\n commonIconProps = defaultCommonIconProps,\n useTheme,\n useBackground,\n } = props\n let noMatch: boolean = false\n const css = useTheme ? 'icon-list themed' : 'icon-list'\n const componentCss = useBackground ? `${css} bg-circle` : css\n const queryContext = useQueryContext()\n const { addValueToSelectedFacet } = queryContext\n\n const handleIconClick = useCallback(\n (dataType: 'string') => {\n const facet: UniqueFacetIdentifier = {\n columnName: 'dataType',\n }\n addValueToSelectedFacet(facet, dataType)\n },\n [addValueToSelectedFacet],\n )\n\n const mergedIconConfigs: IconConfigs = useMemo(() => {\n const mergedIconConfigs: IconConfigs = {}\n for (const [key, iconProps] of Object.entries(iconConfigs)) {\n mergedIconConfigs[key] = merge({}, commonIconProps, iconProps)\n }\n return mergedIconConfigs\n }, [iconConfigs, commonIconProps])\n\n const buildIconList = () => {\n const unique = Array.from(new Set(iconNames))\n return unique.map((el: any) => {\n const iconConfig = mergedIconConfigs[el]\n // if this data type value doesn't have a matching icon, we use the \"other\" icon\n if (!iconConfig) {\n noMatch = true\n return\n } else {\n return (\n <IconSvg\n key={el}\n {...iconConfig}\n onClick={() => handleIconClick(el)}\n />\n )\n }\n })\n }\n\n return (\n <span className={componentCss}>\n {buildIconList()}\n {noMatch && mergedIconConfigs['other'] ? (\n <IconSvg {...mergedIconConfigs['other']} />\n ) : (\n <></>\n )}\n </span>\n )\n}\n\nexport default IconList\n"],"mappings":";;;;;;;AAkBA,IAAM,IAA2D,EAC/D,IAAI,EAAE,UAAU,QAAQ,EACzB;AAED,SAAS,EAAS,GAAsB;CACtC,IAAM,EACJ,gBACA,cACA,qBAAkB,GAClB,aACA,qBACE,GACA,IAAmB,IACjB,IAAM,IAAW,qBAAqB,aACtC,IAAe,IAAgB,GAAG,EAAI,cAAc,GAEpD,EAAE,+BADa,GACe,EAE9B,IAAkB,GACrB,MAAuB;AAItB,IAAwB,EAFtB,YAAY,YAEU,EAAO,EAAS;IAE1C,CAAC,EAAwB,CAC1B,EAEK,IAAiC,QAAc;EACnD,IAAM,IAAiC,EAAE;AACzC,OAAK,IAAM,CAAC,GAAK,MAAc,OAAO,QAAQ,EAAY,CACxD,GAAkB,KAAO,EAAM,EAAE,EAAE,GAAiB,EAAU;AAEhE,SAAO;IACN,CAAC,GAAa,EAAgB,CAAC;AAsBlC,QACE,kBAAC,QAAD;EAAM,WAAW;YAAjB,CApBe,MAAM,KAAK,IAAI,IAAI,EAAU,CACrC,CAAO,KAAK,MAAY;GAC7B,IAAM,IAAa,EAAkB;AAErC,OAAK,EAIH,QACE,kBAAC,GAAD;IAEE,GAAI;IACJ,eAAe,EAAgB,EAAG;IAClC,EAHK,EAGL;AARJ,OAAU;IAWZ,EAMC,KAAW,EAAkB,QAC5B,kBAAC,GAAD,EAAS,GAAI,EAAkB,OAAY,CAAA,GAE3C,kBAAA,GAAA,EAAK,CAAA,CAEF"}