synapse-react-client 4.0.1 → 4.0.3-b

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 (289) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/assets/icons/AwardScroll.d.ts +5 -0
  3. package/dist/assets/icons/AwardScroll.d.ts.map +1 -0
  4. package/dist/assets/icons/AwardScroll.js +78 -0
  5. package/dist/assets/icons/AwardScroll.js.map +1 -0
  6. package/dist/assets/icons/Baseline.d.ts +5 -0
  7. package/dist/assets/icons/Baseline.d.ts.map +1 -0
  8. package/dist/assets/icons/Baseline.js +43 -0
  9. package/dist/assets/icons/Baseline.js.map +1 -0
  10. package/dist/assets/icons/Challenge.svg +13 -0
  11. package/dist/assets/icons/Challenge.svg.js +7 -0
  12. package/dist/assets/icons/Challenge.svg.js.map +1 -0
  13. package/dist/assets/icons/ClappingHands.d.ts +5 -0
  14. package/dist/assets/icons/ClappingHands.d.ts.map +1 -0
  15. package/dist/assets/icons/ClappingHands.js +106 -0
  16. package/dist/assets/icons/ClappingHands.js.map +1 -0
  17. package/dist/assets/icons/DNA_Two.svg +0 -0
  18. package/dist/assets/icons/Data2.svg +0 -0
  19. package/dist/assets/icons/HandWithMoney.d.ts +5 -0
  20. package/dist/assets/icons/HandWithMoney.d.ts.map +1 -0
  21. package/dist/assets/icons/HandWithMoney.js +15 -0
  22. package/dist/assets/icons/HandWithMoney.js.map +1 -0
  23. package/dist/assets/icons/MultiFile.d.ts +5 -0
  24. package/dist/assets/icons/MultiFile.d.ts.map +1 -0
  25. package/dist/assets/icons/MultiFile.js +8 -0
  26. package/dist/assets/icons/MultiFile.js.map +1 -0
  27. package/dist/assets/icons/MultiFile.svg +4 -0
  28. package/dist/assets/icons/MultiFile.svg.js +7 -0
  29. package/dist/assets/icons/MultiFile.svg.js.map +1 -0
  30. package/dist/assets/icons/OpenBook.d.ts +5 -0
  31. package/dist/assets/icons/OpenBook.d.ts.map +1 -0
  32. package/dist/assets/icons/OpenBook.js +99 -0
  33. package/dist/assets/icons/OpenBook.js.map +1 -0
  34. package/dist/assets/icons/Podium.d.ts +5 -0
  35. package/dist/assets/icons/Podium.d.ts.map +1 -0
  36. package/dist/assets/icons/Podium.js +36 -0
  37. package/dist/assets/icons/Podium.js.map +1 -0
  38. package/dist/assets/icons/RosetteRibbon.d.ts +5 -0
  39. package/dist/assets/icons/RosetteRibbon.d.ts.map +1 -0
  40. package/dist/assets/icons/RosetteRibbon.js +36 -0
  41. package/dist/assets/icons/RosetteRibbon.js.map +1 -0
  42. package/dist/assets/icons/StarTrophy.d.ts +5 -0
  43. package/dist/assets/icons/StarTrophy.d.ts.map +1 -0
  44. package/dist/assets/icons/StarTrophy.js +99 -0
  45. package/dist/assets/icons/StarTrophy.js.map +1 -0
  46. package/dist/assets/icons/ThreeStars.d.ts +5 -0
  47. package/dist/assets/icons/ThreeStars.d.ts.map +1 -0
  48. package/dist/assets/icons/ThreeStars.js +71 -0
  49. package/dist/assets/icons/ThreeStars.js.map +1 -0
  50. package/dist/assets/icons/UnpackagableFile.d.ts +5 -0
  51. package/dist/assets/icons/UnpackagableFile.d.ts.map +1 -0
  52. package/dist/assets/icons/UnpackagableFile.js +8 -0
  53. package/dist/assets/icons/UnpackagableFile.js.map +1 -0
  54. package/dist/assets/icons/UnpackagableFile.svg +4 -0
  55. package/dist/assets/icons/UnpackagableFile.svg.js +7 -0
  56. package/dist/assets/icons/UnpackagableFile.svg.js.map +1 -0
  57. package/dist/assets/mui_components/PackagableFile.d.ts.map +1 -1
  58. package/dist/assets/mui_components/PackagableFile.js +5 -4
  59. package/dist/assets/mui_components/PackagableFile.js.map +1 -1
  60. package/dist/assets/mui_components/PackagableFile.svg +3 -0
  61. package/dist/assets/mui_components/PackagableFile.svg.js +7 -0
  62. package/dist/assets/mui_components/PackagableFile.svg.js.map +1 -0
  63. package/dist/assets/themed_icons/index.d.ts +1 -2
  64. package/dist/assets/themed_icons/index.d.ts.map +1 -1
  65. package/dist/assets/themed_icons/index.js +8 -10
  66. package/dist/assets/themed_icons/index.js.map +1 -1
  67. package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js +4 -4
  68. package/dist/components/AcknowledgementsPage/AcknowledgementsPage.js.map +1 -1
  69. package/dist/components/AddToDownloadListV2.js +10 -10
  70. package/dist/components/AddToDownloadListV2.js.map +1 -1
  71. package/dist/components/BasePortalCard/BasePortalCard.css +1 -1
  72. package/dist/components/BasePortalCard/BasePortalCard.d.ts +1 -2
  73. package/dist/components/BasePortalCard/BasePortalCard.d.ts.map +1 -1
  74. package/dist/components/BasePortalCard/BasePortalCard.js +21 -28
  75. package/dist/components/BasePortalCard/BasePortalCard.js.map +1 -1
  76. package/dist/components/BasePortalCard/BasePortalCard.module.scss +7 -1
  77. package/dist/components/BasePortalCard/BasePortalCard.module.scss.js +11 -11
  78. package/dist/components/BasePortalCard/ColorfulPortalCardWithChips/ColorfulPortalCardWithChips.d.ts.map +1 -1
  79. package/dist/components/BasePortalCard/ColorfulPortalCardWithChips/ColorfulPortalCardWithChips.js +24 -24
  80. package/dist/components/BasePortalCard/ColorfulPortalCardWithChips/ColorfulPortalCardWithChips.js.map +1 -1
  81. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts +5 -1
  82. package/dist/components/CardContainerLogic/CardContainerLogic.d.ts.map +1 -1
  83. package/dist/components/CardContainerLogic/CardContainerLogic.js.map +1 -1
  84. package/dist/components/CardContainerLogic/index.d.ts +1 -1
  85. package/dist/components/CardContainerLogic/index.d.ts.map +1 -1
  86. package/dist/components/CardDeck/TableQueryCardDeck.js +12 -9
  87. package/dist/components/CardDeck/TableQueryCardDeck.js.map +1 -1
  88. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js +33 -33
  89. package/dist/components/ChallengeDataDownload/ChallengeDataDownload.js.map +1 -1
  90. package/dist/components/ChangePassword/useChangePasswordFormState.js +5 -2
  91. package/dist/components/ChangePassword/useChangePasswordFormState.js.map +1 -1
  92. package/dist/components/ComponentCollapse.d.ts +6 -10
  93. package/dist/components/ComponentCollapse.d.ts.map +1 -1
  94. package/dist/components/ComponentCollapse.js +31 -35
  95. package/dist/components/ComponentCollapse.js.map +1 -1
  96. package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js +12 -9
  97. package/dist/components/CreateOrUpdateAccessRequirementWizard/CreateOrUpdateAccessRequirementWizard.js.map +1 -1
  98. package/dist/components/DataGrid/MergeGridWithSourceTableButton.js +8 -3
  99. package/dist/components/DataGrid/MergeGridWithSourceTableButton.js.map +1 -1
  100. package/dist/components/DataGrid/SynapseGrid.js +8 -3
  101. package/dist/components/DataGrid/SynapseGrid.js.map +1 -1
  102. package/dist/components/DataGrid/components/UploadCsvToGridDialog.js +8 -3
  103. package/dist/components/DataGrid/components/UploadCsvToGridDialog.js.map +1 -1
  104. package/dist/components/DirectDownload/DirectDownload.d.ts.map +1 -1
  105. package/dist/components/DirectDownload/DirectDownload.js +23 -23
  106. package/dist/components/DirectDownload/DirectDownload.js.map +1 -1
  107. package/dist/components/DownloadCart/AvailableForDownloadTable.d.ts +6 -2
  108. package/dist/components/DownloadCart/AvailableForDownloadTable.d.ts.map +1 -1
  109. package/dist/components/DownloadCart/AvailableForDownloadTable.js +10 -8
  110. package/dist/components/DownloadCart/AvailableForDownloadTable.js.map +1 -1
  111. package/dist/components/DownloadCart/CreatePackageV2.css +1 -0
  112. package/dist/components/DownloadCart/CreatePackageV2.d.ts.map +1 -1
  113. package/dist/components/DownloadCart/CreatePackageV2.js +50 -46
  114. package/dist/components/DownloadCart/CreatePackageV2.js.map +1 -1
  115. package/dist/components/DownloadCart/CreatePackageV2.module.scss +38 -0
  116. package/dist/components/DownloadCart/CreatePackageV2.module.scss.js +14 -0
  117. package/dist/components/DownloadCart/CreatePackageV2.module.scss.js.map +1 -0
  118. package/dist/components/DownloadCart/DownloadCartPage.css +1 -0
  119. package/dist/components/DownloadCart/DownloadCartPage.d.ts.map +1 -1
  120. package/dist/components/DownloadCart/DownloadCartPage.js +316 -186
  121. package/dist/components/DownloadCart/DownloadCartPage.js.map +1 -1
  122. package/dist/components/DownloadCart/DownloadCartPage.module.scss +217 -0
  123. package/dist/components/DownloadCart/DownloadCartPage.module.scss.js +48 -0
  124. package/dist/components/DownloadCart/DownloadCartPage.module.scss.js.map +1 -0
  125. package/dist/components/DownloadCart/DownloadDetails.js +1 -1
  126. package/dist/components/DownloadCart/DownloadDetails.js.map +1 -1
  127. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +33 -33
  128. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
  129. package/dist/components/DownloadCart/DownloadListTable.d.ts +4 -1
  130. package/dist/components/DownloadCart/DownloadListTable.d.ts.map +1 -1
  131. package/dist/components/DownloadCart/DownloadListTable.js +156 -236
  132. package/dist/components/DownloadCart/DownloadListTable.js.map +1 -1
  133. package/dist/components/DownloadCart/ShowDownloadV2.js +5 -5
  134. package/dist/components/DownloadCart/ShowDownloadV2.js.map +1 -1
  135. package/dist/components/Ecosystem/EcosystemSkeleton.js +8 -3
  136. package/dist/components/Ecosystem/EcosystemSkeleton.js.map +1 -1
  137. package/dist/components/EntityDownloadButton/EntityDownloadButton.d.ts +3 -0
  138. package/dist/components/EntityDownloadButton/EntityDownloadButton.d.ts.map +1 -1
  139. package/dist/components/EntityDownloadButton/EntityDownloadButton.js +113 -119
  140. package/dist/components/EntityDownloadButton/EntityDownloadButton.js.map +1 -1
  141. package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.js +3 -3
  142. package/dist/components/EntityFinder/details/view/table/AddToDownloadListCell.js.map +1 -1
  143. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +6 -2
  144. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  145. package/dist/components/FeaturedDataTabs/FeaturedDataTabs.js +11 -8
  146. package/dist/components/FeaturedDataTabs/FeaturedDataTabs.js.map +1 -1
  147. package/dist/components/FullWidthAlert/FullWidthAlert.d.ts +2 -2
  148. package/dist/components/FullWidthAlert/FullWidthAlert.js.map +1 -1
  149. package/dist/components/GenericCard/GenericCard.d.ts +5 -5
  150. package/dist/components/GenericCard/GenericCard.d.ts.map +1 -1
  151. package/dist/components/GenericCard/GenericCard.js +117 -103
  152. package/dist/components/GenericCard/GenericCard.js.map +1 -1
  153. package/dist/components/GenericCard/LabelMaybeWithIcon.d.ts +10 -0
  154. package/dist/components/GenericCard/LabelMaybeWithIcon.d.ts.map +1 -0
  155. package/dist/components/GenericCard/LabelMaybeWithIcon.js +33 -0
  156. package/dist/components/GenericCard/LabelMaybeWithIcon.js.map +1 -0
  157. package/dist/components/GenericCard/SynapseCardLabel.d.ts +2 -1
  158. package/dist/components/GenericCard/SynapseCardLabel.d.ts.map +1 -1
  159. package/dist/components/GenericCard/SynapseCardLabel.js +86 -81
  160. package/dist/components/GenericCard/SynapseCardLabel.js.map +1 -1
  161. package/dist/components/GenericCard/TableRowGenericCard.d.ts +7 -1
  162. package/dist/components/GenericCard/TableRowGenericCard.d.ts.map +1 -1
  163. package/dist/components/GenericCard/TableRowGenericCard.js +239 -202
  164. package/dist/components/GenericCard/TableRowGenericCard.js.map +1 -1
  165. package/dist/components/HeaderCard.js +17 -13
  166. package/dist/components/HeaderCard.js.map +1 -1
  167. package/dist/components/Icon/Icon.js +52 -52
  168. package/dist/components/Icon/Icon.js.map +1 -1
  169. package/dist/components/IconSvg/IconSvg.d.ts +1 -1
  170. package/dist/components/IconSvg/IconSvg.d.ts.map +1 -1
  171. package/dist/components/IconSvg/IconSvg.js +215 -171
  172. package/dist/components/IconSvg/IconSvg.js.map +1 -1
  173. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +1 -0
  174. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
  175. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +103 -102
  176. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  177. package/dist/components/StorybookComponentWrapper.js +6 -3
  178. package/dist/components/StorybookComponentWrapper.js.map +1 -1
  179. package/dist/components/SynapseChat/SynapseChat.d.ts +7 -1
  180. package/dist/components/SynapseChat/SynapseChat.d.ts.map +1 -1
  181. package/dist/components/SynapseChat/SynapseChat.js +76 -67
  182. package/dist/components/SynapseChat/SynapseChat.js.map +1 -1
  183. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts +2 -1
  184. package/dist/components/SynapseChat/SynapseChatInteraction.d.ts.map +1 -1
  185. package/dist/components/SynapseChat/SynapseChatInteraction.js +83 -58
  186. package/dist/components/SynapseChat/SynapseChatInteraction.js.map +1 -1
  187. package/dist/components/SynapseChat/SynapseChatMessage.d.ts +1 -0
  188. package/dist/components/SynapseChat/SynapseChatMessage.d.ts.map +1 -1
  189. package/dist/components/SynapseChat/SynapseChatMessage.js +16 -15
  190. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  191. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts +12 -0
  192. package/dist/components/SynapseChat/SynapsePortalChatDialog.d.ts.map +1 -0
  193. package/dist/components/SynapseChat/SynapsePortalChatDialog.js +30 -0
  194. package/dist/components/SynapseChat/SynapsePortalChatDialog.js.map +1 -0
  195. package/dist/components/SynapseChat/extractMessageFromTraceEvent.d.ts.map +1 -1
  196. package/dist/components/SynapseChat/extractMessageFromTraceEvent.js +22 -16
  197. package/dist/components/SynapseChat/extractMessageFromTraceEvent.js.map +1 -1
  198. package/dist/components/SynapseChat/index.d.ts +2 -0
  199. package/dist/components/SynapseChat/index.d.ts.map +1 -1
  200. package/dist/components/SynapseChat/index.js +5 -3
  201. package/dist/components/SynapseChat/index.js.map +1 -1
  202. package/dist/components/SynapseChat/useChatState.d.ts +1 -1
  203. package/dist/components/SynapseChat/useChatState.d.ts.map +1 -1
  204. package/dist/components/SynapseChat/useChatState.js +10 -7
  205. package/dist/components/SynapseChat/useChatState.js.map +1 -1
  206. package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.d.ts.map +1 -1
  207. package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js +30 -32
  208. package/dist/components/SynapseHomepageV2/SynapseHomepageChatSearch.js.map +1 -1
  209. package/dist/components/SynapseHomepageV2/SynapseHomepageSearch.d.ts.map +1 -1
  210. package/dist/components/SynapseHomepageV2/SynapseHomepageSearch.js +27 -30
  211. package/dist/components/SynapseHomepageV2/SynapseHomepageSearch.js.map +1 -1
  212. package/dist/components/SynapseHomepageV2/SynapseSearchChips.d.ts.map +1 -1
  213. package/dist/components/SynapseHomepageV2/SynapseSearchChips.js +14 -17
  214. package/dist/components/SynapseHomepageV2/SynapseSearchChips.js.map +1 -1
  215. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.d.ts.map +1 -1
  216. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js +114 -115
  217. package/dist/components/SynapseNavDrawer/SynapseNavDrawer.js.map +1 -1
  218. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.d.ts.map +1 -1
  219. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js +39 -39
  220. package/dist/components/SynapsePortalBanners/SynapsePortalBanners.js.map +1 -1
  221. package/dist/components/SynapseSearchPageResults/SearchPagePortalBanners.js +18 -18
  222. package/dist/components/SynapseSearchPageResults/SearchPagePortalBanners.js.map +1 -1
  223. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.d.ts.map +1 -1
  224. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js +66 -64
  225. package/dist/components/SynapseSearchPageResults/SynapseSearchResultsCard.js.map +1 -1
  226. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +13 -13
  227. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
  228. package/dist/components/SynapseTable/TopLevelControls/TopLevelControlsUtils.js +9 -9
  229. package/dist/components/SynapseTable/TopLevelControls/TopLevelControlsUtils.js.map +1 -1
  230. package/dist/components/TextToComponentCollapse.d.ts +16 -0
  231. package/dist/components/TextToComponentCollapse.d.ts.map +1 -0
  232. package/dist/components/TextToComponentCollapse.js +29 -0
  233. package/dist/components/TextToComponentCollapse.js.map +1 -0
  234. package/dist/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert.js +8 -3
  235. package/dist/components/download_list/AddToDownloadListConfirmationAlert/AddToDownloadListConfirmationAlert.js.map +1 -1
  236. package/dist/components/download_list/DownloadConfirmationUI.d.ts +1 -1
  237. package/dist/components/download_list/DownloadConfirmationUI.js +22 -22
  238. package/dist/components/download_list/DownloadConfirmationUI.js.map +1 -1
  239. package/dist/components/download_list/DownloadConfirmationUtils.js +4 -4
  240. package/dist/components/download_list/DownloadConfirmationUtils.js.map +1 -1
  241. package/dist/components/index.js +85 -83
  242. package/dist/components/index.js.map +1 -1
  243. package/dist/components/row_renderers/ObservationCard.js +12 -11
  244. package/dist/components/row_renderers/ObservationCard.js.map +1 -1
  245. package/dist/components/row_renderers/utils/CardFooter.d.ts +1 -3
  246. package/dist/components/row_renderers/utils/CardFooter.d.ts.map +1 -1
  247. package/dist/components/row_renderers/utils/CardFooter.js +31 -45
  248. package/dist/components/row_renderers/utils/CardFooter.js.map +1 -1
  249. package/dist/components/table/CsvPreview/CsvPreview.js +8 -3
  250. package/dist/components/table/CsvPreview/CsvPreview.js.map +1 -1
  251. package/dist/components/table/CsvPreview/CsvPreviewDialog.js +8 -3
  252. package/dist/components/table/CsvPreview/CsvPreviewDialog.js.map +1 -1
  253. package/dist/features/curator/GridPage/GridPage.js +8 -3
  254. package/dist/features/curator/GridPage/GridPage.js.map +1 -1
  255. package/dist/features/curator/GridPage/components/GridPageTitle.js +8 -3
  256. package/dist/features/curator/GridPage/components/GridPageTitle.js.map +1 -1
  257. package/dist/index.js +137 -135
  258. package/dist/index.js.map +1 -1
  259. package/dist/style/abstracts/_functions.scss +0 -0
  260. package/dist/style/abstracts/_mixins.scss +0 -0
  261. package/dist/style/abstracts/_variables.scss +0 -0
  262. package/dist/style/base/_base.scss +0 -0
  263. package/dist/style/base/_fonts.scss +0 -0
  264. package/dist/style/base/_helpers.scss +0 -0
  265. package/dist/style/components/_all.scss +0 -1
  266. package/dist/style/components/_cards.scss +22 -0
  267. package/dist/style/components/_download-list-v2.scss +1 -1
  268. package/dist/style/components/_query-wrapper-plot-nav.scss +13 -0
  269. package/dist/style/main.css +1 -1
  270. package/dist/style/main.scss +0 -0
  271. package/dist/style/vendors/_normalize.scss +0 -0
  272. package/dist/tsconfig.build.tsbuildinfo +1 -1
  273. package/dist/utils/AppUtils/session/ApplicationSessionManager.d.ts.map +1 -1
  274. package/dist/utils/AppUtils/session/ApplicationSessionManager.js.map +1 -1
  275. package/dist/utils/context/FullContextProvider.js +9 -9
  276. package/dist/utils/context/FullContextProvider.js.map +1 -1
  277. package/dist/utils/context/SynapseContext.d.ts.map +1 -1
  278. package/dist/utils/context/SynapseContext.js +1 -0
  279. package/dist/utils/context/SynapseContext.js.map +1 -1
  280. package/dist/utils/functions/SqlFunctions.d.ts +4 -0
  281. package/dist/utils/functions/SqlFunctions.d.ts.map +1 -1
  282. package/dist/utils/functions/SqlFunctions.js +25 -23
  283. package/dist/utils/functions/SqlFunctions.js.map +1 -1
  284. package/package.json +25 -24
  285. package/dist/assets/themed_icons/Challenge.d.ts +0 -3
  286. package/dist/assets/themed_icons/Challenge.d.ts.map +0 -1
  287. package/dist/assets/themed_icons/Challenge.js +0 -25
  288. package/dist/assets/themed_icons/Challenge.js.map +0 -1
  289. package/dist/style/components/_download-cart-page.scss +0 -204
@@ -1,27 +1,27 @@
1
- import { jsx as n, jsxs as J, Fragment as So } from "react/jsx-runtime";
2
- import { getValueOrMultiValue as ko, getLinkParams as q, getFileHandleAssociation as xo } from "./CardUtils.js";
3
- import Eo from "./CroissantButton/CroissantButton.js";
4
- import { GenericCardIcon as Oo } from "./GenericCardIcon.js";
5
- import Ao from "./PortalDOI/PortalDOI.js";
6
- import { getCandidateDoiId as Bo, useShowDoiCardLabel as Fo } from "./PortalDOI/PortalDOIUtils.js";
7
- import { mapRowToRecord as Po } from "../SynapseTable/SynapseTableUtils.js";
1
+ import { jsx as n, jsxs as b, Fragment as Eo } from "react/jsx-runtime";
2
+ import { getValueOrMultiValue as Oo, getLinkParams as Q, getFileHandleAssociation as Bo } from "./CardUtils.js";
3
+ import Fo from "./CroissantButton/CroissantButton.js";
4
+ import { GenericCardIcon as Po } from "./GenericCardIcon.js";
5
+ import Ho from "./PortalDOI/PortalDOI.js";
6
+ import { getCandidateDoiId as Ro, useShowDoiCardLabel as Go } from "./PortalDOI/PortalDOIUtils.js";
7
+ import { mapRowToRecord as Mo } from "../SynapseTable/SynapseTableUtils.js";
8
8
  import "../../synapse-client/SynapseClient.js";
9
9
  import "@sage-bionetworks/synapse-client/generated/models/ErrorResponseCode";
10
10
  import "@sage-bionetworks/synapse-client/generated/models/TwoFactorAuthErrorResponse";
11
11
  import "@sage-bionetworks/synapse-client/util/SynapseClientError";
12
- import { getColumnIndex as Ho } from "../../utils/functions/SqlFunctions.js";
13
- import { parseSynId as Ro } from "../../utils/functions/RegularExpressions.js";
14
- import { PRODUCTION_ENDPOINT_CONFIG as Go } from "../../utils/functions/getEndpoint.js";
12
+ import { getColumnIndex as zo } from "../../utils/functions/SqlFunctions.js";
13
+ import { parseSynId as Wo } from "../../utils/functions/RegularExpressions.js";
14
+ import { PRODUCTION_ENDPOINT_CONFIG as _o } from "../../utils/functions/getEndpoint.js";
15
15
  import "lodash-es";
16
16
  import "@sage-bionetworks/synapse-client/util/synapseClientFetch";
17
17
  import "@tanstack/react-query";
18
18
  import "../../utils/PermissionLevelToAccessType.js";
19
- import { EXPERIMENTAL as Mo } from "../../utils/SynapseConstants.js";
20
- import { useState as Q, useCallback as zo, useMemo as Wo } from "react";
19
+ import { EXPERIMENTAL as $o } from "../../utils/SynapseConstants.js";
20
+ import { useState as J, useCallback as jo, useMemo as U } from "react";
21
21
  import "../../utils/context/SynapseContext.js";
22
22
  import "use-deep-compare-effect";
23
- import { ColumnTypeEnum as _o } from "@sage-bionetworks/synapse-types";
24
- import { Link as $o, Box as jo, Collapse as qo } from "@mui/material";
23
+ import { ColumnTypeEnum as qo } from "@sage-bionetworks/synapse-types";
24
+ import { Stack as X, Typography as Qo, Link as Jo, Box as Uo, Collapse as Xo } from "@mui/material";
25
25
  import "../../utils/hooks/useCookiePreferences.js";
26
26
  import "../../utils/hooks/useSourceAppConfigs.js";
27
27
  import "universal-cookie";
@@ -36,253 +36,290 @@ import "lodash-es/xorWith";
36
36
  import "react-router";
37
37
  import "@sage-bionetworks/synapse-client";
38
38
  import "../../utils/types/IsType.js";
39
- import { useGetEntity as Qo } from "../../synapse-queries/entity/useEntity.js";
40
- import { isTableEntity as Jo, isDatasetCollection as Uo } from "../../utils/functions/EntityTypeUtils.js";
41
- import { calculateFriendlyFileSize as Xo } from "../../utils/functions/calculateFriendlyFileSize.js";
42
- import { GetAppTwoTone as Ko } from "@mui/icons-material";
43
- import { useInView as Yo } from "react-intersection-observer";
44
- import { TargetEnum as Zo } from "../../utils/html/TargetEnum.js";
45
- import oe from "../CitationPopover/CitationPopover.js";
46
- import { EntityDownloadConfirmation as ee } from "../EntityDownloadConfirmation/EntityDownloadConfirmation.js";
47
- import te from "../IconList.js";
48
- import { useQueryContext as ne } from "../QueryContext/QueryContext.js";
49
- import { useQueryVisualizationContext as ie } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
50
- import { GenericCard as re } from "./GenericCard.js";
51
- import ae from "./GenericCardActionButton.js";
52
- import { SynapseCardLabel as se } from "./SynapseCardLabel.js";
53
- import le from "../ShareThisPage/ShareThisPage.js";
54
- import { useResolvedSynapseEntity as me } from "./useResolvedSynapseEntity.js";
55
- function de(y) {
56
- const { synapseId: I, version: l } = y;
57
- return /* @__PURE__ */ J("span", { children: [
58
- l,
39
+ import { useGetEntity as Ko } from "../../synapse-queries/entity/useEntity.js";
40
+ import { isTableEntity as Yo, isDatasetCollection as Zo } from "../../utils/functions/EntityTypeUtils.js";
41
+ import { calculateFriendlyFileSize as oe } from "../../utils/functions/calculateFriendlyFileSize.js";
42
+ import { TargetEnum as ee } from "../../utils/html/TargetEnum.js";
43
+ import { GetAppTwoTone as te } from "@mui/icons-material";
44
+ import { useInView as ne } from "react-intersection-observer";
45
+ import ie from "../CitationPopover/CitationPopover.js";
46
+ import { EntityDownloadConfirmation as re } from "../EntityDownloadConfirmation/EntityDownloadConfirmation.js";
47
+ import ae from "../IconList.js";
48
+ import { useQueryContext as se } from "../QueryContext/QueryContext.js";
49
+ import { useQueryVisualizationContext as le } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
50
+ import de from "../ShareThisPage/ShareThisPage.js";
51
+ import { GenericCard as me } from "./GenericCard.js";
52
+ import ce from "./GenericCardActionButton.js";
53
+ import { SynapseCardLabel as K } from "./SynapseCardLabel.js";
54
+ import { useResolvedSynapseEntity as pe } from "./useResolvedSynapseEntity.js";
55
+ function ue(T) {
56
+ const { synapseId: v, version: d } = T;
57
+ return /* @__PURE__ */ b("span", { children: [
58
+ d,
59
59
  "  ",
60
60
  /* @__PURE__ */ n(
61
61
  "a",
62
62
  {
63
- target: Zo.NEW_WINDOW,
63
+ target: ee.NEW_WINDOW,
64
64
  rel: "noopener noreferrer",
65
- href: `${Go.PORTAL}Synapse:${I}.${l}`,
65
+ href: `${_o.PORTAL}Synapse:${v}.${d}`,
66
66
  children: "(Show Version History on Synapse)"
67
67
  }
68
68
  )
69
69
  ] });
70
70
  }
71
- function ft(y) {
72
- const [I, l] = Q(!1), [U, X] = Q(!1), { entityId: K, versionNumber: Y } = ne(), { getColumnDisplayName: k } = ie(), { ref: Z, inView: oo } = Yo(), { data: c } = Qo(K, Y), {
73
- schema: e,
71
+ function gt(T) {
72
+ const [v, d] = J(!1), [Y, Z] = J(!1), { entityId: oo, versionNumber: eo } = se(), { getColumnDisplayName: y } = le(), { ref: to, inView: no } = ne(), { data: g } = Ko(oo, eo), {
73
+ schema: t,
74
74
  data: o,
75
- rowId: g,
76
- versionNumber: eo,
75
+ rowId: L,
76
+ versionNumber: io,
77
77
  genericCardSchema: i,
78
- secondaryLabelLimit: to,
79
- sharePageLinkButtonProps: no,
80
- selectColumns: h,
81
- columnModels: p,
82
- iconOptions: io,
83
- useTypeColumnForIcon: x = !1,
84
- isHeader: b = !1,
85
- sustainabilityScorecard: ro,
86
- headerCardVariant: ao,
78
+ secondaryLabelLimit: ro,
79
+ sharePageLinkButtonProps: ao,
80
+ selectColumns: c,
81
+ columnModels: m,
82
+ iconOptions: so,
83
+ useTypeColumnForIcon: A = !1,
84
+ isHeader: p = !1,
85
+ sustainabilityScorecard: lo,
86
+ headerCardVariant: mo,
87
87
  titleLinkConfig: E,
88
- ctaLinkConfig: u,
89
- labelLinkConfig: so,
90
- descriptionConfig: lo,
91
- columnIconOptions: T,
88
+ ctaLinkConfig: I,
89
+ labelLinkConfig: co,
90
+ descriptionConfig: po,
91
+ columnIconOptions: u,
92
92
  CardTypeAdornment: O,
93
- charCountCutoff: mo
94
- } = y, {
95
- link: co = "",
96
- type: A,
97
- includeCitation: po,
98
- includeShareButton: uo,
99
- defaultCitationFormat: fo,
100
- citationBoilerplateText: Co,
101
- downloadCartSynId: B,
102
- portalDoiConfiguration: f
103
- } = i, F = o[e[i.title]];
104
- let L = i.subTitle && o[e[i.subTitle]];
105
- L = i.subTitle && ko({
106
- value: L,
93
+ charCountCutoff: uo
94
+ } = T, {
95
+ link: fo = "",
96
+ type: B,
97
+ includeCitation: Co,
98
+ includeShareButton: yo,
99
+ defaultCitationFormat: go,
100
+ citationBoilerplateText: Io,
101
+ downloadCartSynId: F,
102
+ portalDoiConfiguration: h
103
+ } = i, P = o[t[i.title]];
104
+ let w = i.subTitle && o[t[i.subTitle]];
105
+ w = i.subTitle && Oo({
106
+ value: w,
107
107
  columnName: i.subTitle,
108
- selectColumns: h,
109
- columnModels: p
108
+ selectColumns: c,
109
+ columnModels: m
110
110
  }).str;
111
- const yo = o[e[i.description || ""]], Io = o[e[i.icon || ""]], P = o[e[i.dataTypeIconNames || ""]], v = o[e[i.imageFileHandleColumnName || ""]], go = p?.find(
112
- (t) => i.link === t.name
113
- )?.columnType, H = o[e[co]] || "", { href: ho, target: bo } = q(
114
- H,
111
+ const ho = o[t[i.description || ""]], bo = o[t[i.icon || ""]], H = o[t[i.dataTypeIconNames || ""]], D = o[t[i.imageFileHandleColumnName || ""]], To = m?.find(
112
+ (e) => i.link === e.name
113
+ )?.columnType, R = o[t[fo]] || "", { href: vo, target: Lo } = Q(
114
+ R,
115
115
  E,
116
116
  o,
117
- e,
118
- g
119
- ), To = i.synapseEntityConfig, R = zo(
120
- (t) => {
121
- if (!t)
117
+ t,
118
+ L
119
+ ), wo = i.synapseEntityConfig, G = jo(
120
+ (e) => {
121
+ if (!e)
122
122
  return;
123
- const r = e[t];
123
+ const r = t[e];
124
124
  if (r !== void 0)
125
125
  return o[r];
126
126
  },
127
- [e, o]
128
- ), {
129
- entityId: D,
127
+ [t, o]
128
+ ), Do = U(() => {
129
+ const { titleAreaDetails: e } = i;
130
+ if (!e || e.length === 0) return;
131
+ const r = e.map((a) => {
132
+ const s = o[t[a]];
133
+ return s ? { name: y(a), rawValue: s, columnName: a } : null;
134
+ }).filter(Boolean);
135
+ if (r.length !== 0)
136
+ return /* @__PURE__ */ n(X, { direction: "column", gap: "4px", children: r.map(({ name: a, rawValue: s, columnName: l }) => /* @__PURE__ */ b(X, { direction: "row", gap: "4px", alignItems: "center", children: [
137
+ /* @__PURE__ */ b(Qo, { component: "span", variant: "body1", children: [
138
+ a,
139
+ ":"
140
+ ] }),
141
+ /* @__PURE__ */ n(
142
+ K,
143
+ {
144
+ value: s,
145
+ columnName: l,
146
+ labelLink: void 0,
147
+ isHeader: p,
148
+ selectColumns: c,
149
+ columnModels: m,
150
+ rowData: o,
151
+ columnIconOptions: u
152
+ }
153
+ )
154
+ ] }, l)) });
155
+ }, [
156
+ i,
157
+ o,
158
+ t,
159
+ y,
160
+ p,
161
+ c,
162
+ m,
163
+ u
164
+ ]), {
165
+ entityId: V,
130
166
  entityVersionNumber: N
131
- } = me({
132
- synapseEntityConfig: To,
133
- getColumnValue: R,
134
- rowId: g,
135
- rowVersionNumber: eo
167
+ } = pe({
168
+ synapseEntityConfig: wo,
169
+ getColumnValue: G,
170
+ rowId: L,
171
+ rowVersionNumber: io
136
172
  });
137
- let m = D, G = N;
138
- if (B) {
139
- const t = Ro(R(B) ?? "");
140
- m = t?.targetId, G = t?.targetVersionNumber;
173
+ let f = V, M = N;
174
+ if (F) {
175
+ const e = Wo(G(F) ?? "");
176
+ f = e?.targetId, M = e?.targetVersionNumber;
141
177
  }
142
- const Lo = Wo(
143
- () => Po(o, e),
144
- [o, e]
145
- ), w = Bo({
146
- data: Lo,
147
- portalDoiConfiguration: f
148
- }), vo = Fo({
149
- portalId: f?.portalId,
150
- resourceId: w
151
- }), d = [], { secondaryLabels: M = [] } = i, z = i.customSecondaryLabelConfig;
152
- if (vo && f && w && oo && d.push({
178
+ const Vo = U(
179
+ () => Mo(o, t),
180
+ [o, t]
181
+ ), S = Ro({
182
+ data: Vo,
183
+ portalDoiConfiguration: h
184
+ }), No = Go({
185
+ portalId: h?.portalId,
186
+ resourceId: S
187
+ }), C = [], { secondaryLabels: z = [] } = i, W = i.customSecondaryLabelConfig;
188
+ if (No && h && S && no && C.push({
153
189
  columnDisplayName: "DOI",
154
190
  value: /* @__PURE__ */ n(
155
- Ao,
191
+ Ho,
156
192
  {
157
- portalId: f.portalId,
158
- resourceId: w
193
+ portalId: h.portalId,
194
+ resourceId: S
159
195
  }
160
196
  )
161
- }), z?.isVisible(e, o)) {
162
- const { key: t, value: r } = z;
163
- m ? d.push({
197
+ }), W?.isVisible(t, o)) {
198
+ const { key: e, value: r } = W;
199
+ f ? C.push({
164
200
  columnDisplayName: "HOW TO DOWNLOAD",
165
- value: /* @__PURE__ */ n($o, { onClick: () => l((a) => !a), children: "Click here to add to Synapse download cart" })
166
- }) : d.push({ columnDisplayName: t, value: r });
201
+ value: /* @__PURE__ */ n(Jo, { onClick: () => d((a) => !a), children: "Click here to add to Synapse download list" })
202
+ }) : C.push({ columnDisplayName: e, value: r });
167
203
  }
168
- const Do = c && !Jo(c);
169
- for (let t = 0; t < M.length; t += 1) {
170
- const r = M[t], a = o[e[r]];
171
- let s = a, C;
204
+ const So = g && !Yo(g);
205
+ for (let e = 0; e < z.length; e += 1) {
206
+ const r = z[e], a = o[t[r]];
207
+ let s = a, l;
172
208
  if (s) {
173
- if (Uo(c) && r === "datasetSizeInBytes")
174
- C = "Size", s = Xo(parseInt(a));
175
- else if (Do && r === "currentVersion") {
176
- const S = o[e.id];
177
- s = /* @__PURE__ */ n(de, { synapseId: S, version: a }), C = "Version";
209
+ if (Zo(g) && r === "datasetSizeInBytes")
210
+ l = "Size", s = oe(parseInt(a));
211
+ else if (So && r === "currentVersion") {
212
+ const x = o[t.id];
213
+ s = /* @__PURE__ */ n(ue, { synapseId: x, version: a }), l = "Version";
178
214
  } else {
179
- const S = so?.find(
180
- (Vo) => Vo.matchColumnName === r
215
+ const x = co?.find(
216
+ (Ao) => Ao.matchColumnName === r
181
217
  );
182
218
  s = /* @__PURE__ */ n(
183
- se,
219
+ K,
184
220
  {
185
221
  value: a,
186
222
  columnName: r,
187
- labelLink: S,
188
- isHeader: b,
189
- selectColumns: h,
190
- columnModels: p,
191
- rowData: o
223
+ labelLink: x,
224
+ isHeader: p,
225
+ selectColumns: c,
226
+ columnModels: m,
227
+ rowData: o,
228
+ columnIconOptions: u
192
229
  }
193
- ), C = k(r);
230
+ ), l = y(r);
194
231
  }
195
- d.push({ columnDisplayName: C, value: s, columnName: r });
232
+ C.push({ columnDisplayName: l, value: s, columnName: r });
196
233
  }
197
234
  }
198
- const V = xo(
199
- c,
200
- v || H,
201
- o[e.id]
202
- ), No = k(
235
+ const k = Bo(
236
+ g,
237
+ D || R,
238
+ o[t.id]
239
+ ), ko = y(
203
240
  i.description || ""
204
- ), W = Ho("doi", h, p), _ = W !== void 0 ? o[W] : void 0, $ = (u ? Array.isArray(u) ? u : [u] : []).map((t) => {
205
- const r = o[e[t.link]] || "";
241
+ ), _ = zo("doi", c, m), $ = _ !== void 0 ? o[_] : void 0, j = (I ? Array.isArray(I) ? I : [I] : []).map((e) => {
242
+ const r = o[t[e.link]] || "";
206
243
  if (!r) return null;
207
- const { href: a, target: s } = q(
244
+ const { href: a, target: s } = Q(
208
245
  r,
209
246
  void 0,
210
247
  //card link config
211
248
  o,
212
- e,
213
- g
249
+ t,
250
+ L
214
251
  );
215
252
  return {
216
- text: t.text,
253
+ text: e.text,
217
254
  href: a,
218
255
  target: s
219
256
  };
220
257
  }).filter(Boolean);
221
- let j = /* @__PURE__ */ n(So, {});
222
- D != null && N != null && (j = /* @__PURE__ */ n(
223
- Eo,
258
+ let q = /* @__PURE__ */ n(Eo, {});
259
+ V != null && N != null && (q = /* @__PURE__ */ n(
260
+ Fo,
224
261
  {
225
- datasetId: D,
262
+ datasetId: V,
226
263
  datasetVersionNumber: N
227
264
  }
228
265
  ));
229
- const wo = O ? /* @__PURE__ */ n(O, { schema: e, data: o }) : null;
266
+ const xo = O ? /* @__PURE__ */ n(O, { schema: t, data: o }) : null;
230
267
  return /* @__PURE__ */ n(
231
- re,
268
+ me,
232
269
  {
233
- ref: Z,
270
+ ref: to,
234
271
  icon: /* @__PURE__ */ n(
235
- Oo,
272
+ Po,
236
273
  {
237
- type: x ? o[e.type] : i.type,
238
- useTypeForIcon: x,
274
+ type: A ? o[t.type] : i.type,
275
+ useTypeForIcon: A,
239
276
  thumbnailRequiresPadding: i.thumbnailRequiresPadding,
240
- imageFileHandleId: v,
241
- fileHandleAssociation: V,
242
- iconOptions: io,
243
- iconValue: Io
277
+ imageFileHandleId: D,
278
+ fileHandleAssociation: k,
279
+ iconOptions: so,
280
+ iconValue: bo
244
281
  }
245
282
  ),
246
- isHeader: b,
247
- sustainabilityScorecard: ro,
248
- headerCardVariant: ao,
249
- type: A,
250
- title: F,
251
- subtitle: L,
252
- titleLinkConfiguration: { target: bo, href: ho },
253
- cardTypeAdornment: wo,
254
- titleAsFileHandleLinkConfiguration: !E && go === _o.FILEHANDLEID && V ? {
255
- fileHandleAssociation: V,
256
- showDownloadIcon: A !== Mo
283
+ isHeader: p,
284
+ sustainabilityScorecard: lo,
285
+ headerCardVariant: mo,
286
+ type: B,
287
+ title: P,
288
+ subtitle: w,
289
+ titleLinkConfiguration: { target: Lo, href: vo },
290
+ cardTypeAdornment: xo,
291
+ titleAsFileHandleLinkConfiguration: !E && To === qo.FILEHANDLEID && k ? {
292
+ fileHandleAssociation: k,
293
+ showDownloadIcon: B !== $o
257
294
  } : void 0,
258
- ctaLinkConfig: $.length > 0 ? $ : void 0,
259
- description: yo,
260
- descriptionSubTitle: No,
261
- descriptionConfig: lo,
262
- charCountCutoff: mo,
263
- labels: d,
264
- secondaryLabelLimit: to,
265
- columnIconOptions: T,
266
- useStylesForDisplayedImage: !!v,
267
- cardTopContent: m && /* @__PURE__ */ n(qo, { in: I, children: /* @__PURE__ */ n(
268
- ee,
295
+ ctaLinkConfig: j.length > 0 ? j : void 0,
296
+ titleAreaRightContent: Do,
297
+ description: ho,
298
+ descriptionSubTitle: ko,
299
+ descriptionConfig: po,
300
+ charCountCutoff: uo,
301
+ labels: C,
302
+ secondaryLabelLimit: ro,
303
+ useStylesForDisplayedImage: !!D,
304
+ cardTopContent: f && /* @__PURE__ */ n(Xo, { in: v, children: /* @__PURE__ */ n(
305
+ re,
269
306
  {
270
- entityId: m,
271
- versionNumber: G,
272
- handleClose: () => l(!1),
273
- onIsLoadingChange: (t) => {
274
- X(t);
307
+ entityId: f,
308
+ versionNumber: M,
309
+ handleClose: () => d(!1),
310
+ onIsLoadingChange: (e) => {
311
+ Z(e);
275
312
  }
276
313
  }
277
314
  ) }),
278
315
  renderedIconList: (
279
316
  // If the portal configs has columnIconOptions.columns.dataType option
280
317
  // and the column value is not null, display the card data type icons
281
- T?.columns?.dataType && P?.length && /* @__PURE__ */ n("div", { style: { marginTop: "20px" }, children: /* @__PURE__ */ n(
282
- te,
318
+ u?.columns?.dataType && H?.length && /* @__PURE__ */ n("div", { style: { marginTop: "20px" }, children: /* @__PURE__ */ n(
319
+ ae,
283
320
  {
284
- iconConfigs: T.columns.dataType,
285
- iconNames: JSON.parse(P),
321
+ iconConfigs: u.columns.dataType,
322
+ iconNames: JSON.parse(H),
286
323
  commonIconProps: {
287
324
  sx: { fontSize: "40px" }
288
325
  },
@@ -291,34 +328,34 @@ function ft(y) {
291
328
  }
292
329
  ) })
293
330
  ),
294
- cardTopButtons: /* @__PURE__ */ J(jo, { sx: { display: "flex", gap: 1 }, children: [
295
- j,
296
- m && /* @__PURE__ */ n(
297
- ae,
331
+ cardTopButtons: /* @__PURE__ */ b(Uo, { sx: { display: "flex", gap: 1 }, children: [
332
+ q,
333
+ f && /* @__PURE__ */ n(
334
+ ce,
298
335
  {
299
- onClick: () => l((t) => !t),
336
+ onClick: () => d((e) => !e),
300
337
  variant: "outlined",
301
- startIcon: /* @__PURE__ */ n(Ko, { sx: { height: "12px" } }),
302
- loading: U,
338
+ startIcon: /* @__PURE__ */ n(te, { sx: { height: "12px" } }),
339
+ loading: Y,
303
340
  children: "Download"
304
341
  }
305
342
  ),
306
- po && _ && /* @__PURE__ */ n(
307
- oe,
343
+ Co && $ && /* @__PURE__ */ n(
344
+ ie,
308
345
  {
309
- title: F,
310
- doi: _,
311
- boilerplateText: Co,
312
- defaultCitationFormat: fo
346
+ title: P,
347
+ doi: $,
348
+ boilerplateText: Io,
349
+ defaultCitationFormat: go
313
350
  }
314
351
  ),
315
- uo && b && /* @__PURE__ */ n(le, { ...no })
352
+ yo && p && /* @__PURE__ */ n(de, { ...ao })
316
353
  ] })
317
354
  }
318
355
  );
319
356
  }
320
357
  export {
321
- ft as TableRowGenericCard,
322
- ft as default
358
+ gt as TableRowGenericCard,
359
+ gt as default
323
360
  };
324
361
  //# sourceMappingURL=TableRowGenericCard.js.map