synapse-react-client 4.0.46 → 4.0.48

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 (559) hide show
  1. package/dist/SWC.index.js +1 -1
  2. package/dist/aridhia-queries/useSubmitAridhiaDar.js +2 -2
  3. package/dist/aridhia-queries/useSubmitAridhiaDar.js.map +1 -1
  4. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js +1 -1
  5. package/dist/components/AccessTokenPage/CreateAccessTokenModal.js.map +1 -1
  6. package/dist/components/AccountLevelBadges/AccountLevelBadges.js +1 -1
  7. package/dist/components/AccountLevelBadges/AccountLevelBadges.js.map +1 -1
  8. package/dist/components/AclEditor/AclEditor.test-utils.js +3 -5
  9. package/dist/components/AclEditor/AclEditor.test-utils.js.map +1 -1
  10. package/dist/components/Aridhia/AridhiaAccessStatus.d.ts.map +1 -1
  11. package/dist/components/Aridhia/AridhiaAccessStatus.js +43 -30
  12. package/dist/components/Aridhia/AridhiaAccessStatus.js.map +1 -1
  13. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts +6 -2
  14. package/dist/components/Aridhia/AridhiaDarStatusPopover.d.ts.map +1 -1
  15. package/dist/components/Aridhia/AridhiaDarStatusPopover.js +101 -31
  16. package/dist/components/Aridhia/AridhiaDarStatusPopover.js.map +1 -1
  17. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts +11 -9
  18. package/dist/components/Aridhia/aridhiaAccessStatusUtils.d.ts.map +1 -1
  19. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js +24 -13
  20. package/dist/components/Aridhia/aridhiaAccessStatusUtils.js.map +1 -1
  21. package/dist/components/Authentication/LastLoginInfo.js +2 -2
  22. package/dist/components/Authentication/LastLoginInfo.js.map +1 -1
  23. package/dist/components/Authentication/RecoveryCodeForm.js +1 -1
  24. package/dist/components/Authentication/RecoveryCodeForm.js.map +1 -1
  25. package/dist/components/Authentication/RecoveryCodeGrid.js.map +1 -1
  26. package/dist/components/Authentication/TOTPForm.d.ts.map +1 -1
  27. package/dist/components/Authentication/TOTPForm.js +3 -3
  28. package/dist/components/Authentication/TOTPForm.js.map +1 -1
  29. package/dist/components/Authentication/index.d.ts +6 -6
  30. package/dist/components/Authentication/index.d.ts.map +1 -1
  31. package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js +1 -1
  32. package/dist/components/CannedRejectionDialog/CannedRejectionDialog.js.map +1 -1
  33. package/dist/components/CardContainer/CardContainer.js +7 -7
  34. package/dist/components/CardContainer/CardContainer.js.map +1 -1
  35. package/dist/components/ChallengeRequirementsModal/ChallengeRequirementsModal.js +1 -1
  36. package/dist/components/ChallengeRequirementsModal/ChallengeRequirementsModal.js.map +1 -1
  37. package/dist/components/ChallengeSubmission/ChallengeSubmission.d.ts.map +1 -1
  38. package/dist/components/ChallengeSubmission/ChallengeSubmission.js +1 -1
  39. package/dist/components/ChallengeSubmission/ChallengeSubmission.js.map +1 -1
  40. package/dist/components/ChallengeTeamWizard/SelectChallengeTeam.js +1 -1
  41. package/dist/components/ChallengeTeamWizard/SelectChallengeTeam.js.map +1 -1
  42. package/dist/components/CitationPopover/CitationPopoverUtils.js +2 -2
  43. package/dist/components/CitationPopover/CitationPopoverUtils.js.map +1 -1
  44. package/dist/components/CohortBuilder/CohortBuilder.css +1 -0
  45. package/dist/components/CohortBuilder/CohortBuilder.d.ts +35 -0
  46. package/dist/components/CohortBuilder/CohortBuilder.d.ts.map +1 -0
  47. package/dist/components/CohortBuilder/CohortBuilder.js +108 -0
  48. package/dist/components/CohortBuilder/CohortBuilder.js.map +1 -0
  49. package/dist/components/CohortBuilder/CohortBuilder.module.js +10 -0
  50. package/dist/components/CohortBuilder/CohortBuilder.module.js.map +1 -0
  51. package/dist/components/CohortBuilder/CohortBuilder.module.scss +20 -0
  52. package/dist/components/CohortBuilder/CohortFilesPanel.d.ts +16 -0
  53. package/dist/components/CohortBuilder/CohortFilesPanel.d.ts.map +1 -0
  54. package/dist/components/CohortBuilder/CohortFilesPanel.js +124 -0
  55. package/dist/components/CohortBuilder/CohortFilesPanel.js.map +1 -0
  56. package/dist/components/CohortBuilder/cohortHandOff.d.ts +25 -0
  57. package/dist/components/CohortBuilder/cohortHandOff.d.ts.map +1 -0
  58. package/dist/components/CohortBuilder/cohortHandOff.js +26 -0
  59. package/dist/components/CohortBuilder/cohortHandOff.js.map +1 -0
  60. package/dist/components/ColumnFilter/ColumnFilter.d.ts.map +1 -1
  61. package/dist/components/ColumnFilter/ColumnFilter.js +14 -13
  62. package/dist/components/ColumnFilter/ColumnFilter.js.map +1 -1
  63. package/dist/components/DataExplorer/DataExplorer.d.ts.map +1 -1
  64. package/dist/components/DataExplorer/DataExplorer.js.map +1 -1
  65. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts +11 -2
  66. package/dist/components/DataGrid/columns/AutocompleteColumn.d.ts.map +1 -1
  67. package/dist/components/DataGrid/columns/AutocompleteColumn.js +115 -109
  68. package/dist/components/DataGrid/columns/AutocompleteColumn.js.map +1 -1
  69. package/dist/components/DataGrid/columns/NumberColumn.js +1 -1
  70. package/dist/components/DataGrid/columns/NumberColumn.js.map +1 -1
  71. package/dist/components/DataGrid/columns/NumberOrEnumColumn.d.ts +20 -0
  72. package/dist/components/DataGrid/columns/NumberOrEnumColumn.d.ts.map +1 -0
  73. package/dist/components/DataGrid/columns/NumberOrEnumColumn.js +18 -0
  74. package/dist/components/DataGrid/columns/NumberOrEnumColumn.js.map +1 -0
  75. package/dist/components/DataGrid/components/contextMenu.js +3 -3
  76. package/dist/components/DataGrid/components/contextMenu.js.map +1 -1
  77. package/dist/components/DataGrid/hooks/useGridUndoRedo.d.ts.map +1 -1
  78. package/dist/components/DataGrid/hooks/useGridUndoRedo.js +9 -7
  79. package/dist/components/DataGrid/hooks/useGridUndoRedo.js.map +1 -1
  80. package/dist/components/DataGrid/hooks/useStack.d.ts +1 -1
  81. package/dist/components/DataGrid/hooks/useStack.js +2 -2
  82. package/dist/components/DataGrid/hooks/useStack.js.map +1 -1
  83. package/dist/components/DataGrid/utils/columnFactory.d.ts.map +1 -1
  84. package/dist/components/DataGrid/utils/columnFactory.js +47 -42
  85. package/dist/components/DataGrid/utils/columnFactory.js.map +1 -1
  86. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js +7 -7
  87. package/dist/components/DataGrid/utils/extractColumnValidationMessages.js.map +1 -1
  88. package/dist/components/DataGrid/utils/json-rx/JsonRx.js +2 -2
  89. package/dist/components/DataGrid/utils/json-rx/JsonRx.js.map +1 -1
  90. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js +1 -1
  91. package/dist/components/DownloadCart/DownloadIneligibleForPackagingFilesFromListButton.js.map +1 -1
  92. package/dist/components/DownloadCart/MeetAccessRequirementCard.js +1 -1
  93. package/dist/components/DownloadCart/MeetAccessRequirementCard.js.map +1 -1
  94. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js +5 -5
  95. package/dist/components/EntityDownloadConfirmation/EntityDownloadConfirmation.js.map +1 -1
  96. package/dist/components/EntityFinder/details/view/DetailsView.d.ts.map +1 -1
  97. package/dist/components/EntityFinder/details/view/DetailsView.js +4 -4
  98. package/dist/components/EntityFinder/details/view/DetailsView.js.map +1 -1
  99. package/dist/components/EntityHeaderTable/EntityHeaderTable.js +4 -4
  100. package/dist/components/EntityHeaderTable/Filter.d.ts.map +1 -1
  101. package/dist/components/EntityHeaderTable/Filter.js +1 -1
  102. package/dist/components/EntityHeaderTable/Filter.js.map +1 -1
  103. package/dist/components/Evaluation/EvaluationRoundEditor.js.map +1 -1
  104. package/dist/components/FeaturedDataTabs/FacetPlotsCard.d.ts.map +1 -1
  105. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js +80 -84
  106. package/dist/components/FeaturedDataTabs/FacetPlotsCard.js.map +1 -1
  107. package/dist/components/FormTemplateEditor/FormStructurePanel.js +7 -7
  108. package/dist/components/FormTemplateEditor/StepCard.js +9 -9
  109. package/dist/components/FormTemplateEditor/schemaFieldUtils.js +2 -2
  110. package/dist/components/FormTemplateEditor/schemaFieldUtils.js.map +1 -1
  111. package/dist/components/FullTextSearch/FullTextSearch.js +8 -8
  112. package/dist/components/GenericCard/CardUtils.js.map +1 -1
  113. package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js +1 -1
  114. package/dist/components/GenericCard/DuoTermTags/DuoTermTags.js.map +1 -1
  115. package/dist/components/GenericCard/DuoTermTags/duoTerms.js +1 -1
  116. package/dist/components/GenericCard/DuoTermTags/duoTerms.js.map +1 -1
  117. package/dist/components/GenericCard/TableRowGenericCard.js +37 -37
  118. package/dist/components/GoalsV3/GoalsV3.js +1 -1
  119. package/dist/components/GoalsV3/GoalsV3.js.map +1 -1
  120. package/dist/components/HexGrid/HexGrid.d.ts +3 -1
  121. package/dist/components/HexGrid/HexGrid.d.ts.map +1 -1
  122. package/dist/components/HexGrid/HexGrid.js +14 -13
  123. package/dist/components/HexGrid/HexGrid.js.map +1 -1
  124. package/dist/components/IconSvg/index.d.ts +1 -1
  125. package/dist/components/IconSvg/index.d.ts.map +1 -1
  126. package/dist/components/IconSvg/index.js.map +1 -1
  127. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.d.ts.map +1 -1
  128. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js +3 -3
  129. package/dist/components/JsonSchemaForm/templates/BaseInputTemplate.js.map +1 -1
  130. package/dist/components/Markdown/MarkdownEditor.js +1 -1
  131. package/dist/components/Markdown/MarkdownEditor.js.map +1 -1
  132. package/dist/components/Markdown/widget/index.d.ts +1 -1
  133. package/dist/components/Markdown/widget/index.d.ts.map +1 -1
  134. package/dist/components/ModalDownload/ModalDownload.d.ts.map +1 -1
  135. package/dist/components/ModalDownload/ModalDownload.js +2 -1
  136. package/dist/components/ModalDownload/ModalDownload.js.map +1 -1
  137. package/dist/components/Plot/BarPlot.js +1 -1
  138. package/dist/components/Plot/BarPlot.js.map +1 -1
  139. package/dist/components/Plot/PlotPanelHeader.d.ts +3 -2
  140. package/dist/components/Plot/PlotPanelHeader.d.ts.map +1 -1
  141. package/dist/components/Plot/PlotPanelHeader.js.map +1 -1
  142. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js +1 -1
  143. package/dist/components/ProgrammaticTableDownload/ProgrammaticTableDownload.js.map +1 -1
  144. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js +1 -1
  145. package/dist/components/ProvenanceGraph/ProvenanceExternalIcon.js.map +1 -1
  146. package/dist/components/ProvenanceGraph/ProvenanceGraph.d.ts.map +1 -1
  147. package/dist/components/ProvenanceGraph/ProvenanceGraph.js +3 -3
  148. package/dist/components/ProvenanceGraph/ProvenanceGraph.js.map +1 -1
  149. package/dist/components/QueryBuilder/FilterConditionRow.d.ts.map +1 -1
  150. package/dist/components/QueryBuilder/FilterConditionRow.js +28 -27
  151. package/dist/components/QueryBuilder/FilterConditionRow.js.map +1 -1
  152. package/dist/components/QueryBuilder/FilterGroupNode.d.ts.map +1 -1
  153. package/dist/components/QueryBuilder/FilterGroupNode.js +91 -75
  154. package/dist/components/QueryBuilder/FilterGroupNode.js.map +1 -1
  155. package/dist/components/QueryBuilder/QueryBuilderControls.css +1 -1
  156. package/dist/components/QueryBuilder/QueryBuilderControls.d.ts.map +1 -1
  157. package/dist/components/QueryBuilder/QueryBuilderControls.js +91 -79
  158. package/dist/components/QueryBuilder/QueryBuilderControls.js.map +1 -1
  159. package/dist/components/QueryBuilder/QueryBuilderControls.module.js +11 -11
  160. package/dist/components/QueryBuilder/QueryBuilderControls.module.js.map +1 -1
  161. package/dist/components/QueryBuilder/QueryBuilderControls.module.scss +2 -0
  162. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts +2 -0
  163. package/dist/components/QueryBuilder/QueryBuilderInternalContext.d.ts.map +1 -1
  164. package/dist/components/QueryBuilder/QueryBuilderInternalContext.js.map +1 -1
  165. package/dist/components/QueryBuilder/queryBuilderLimits.d.ts +18 -0
  166. package/dist/components/QueryBuilder/queryBuilderLimits.d.ts.map +1 -0
  167. package/dist/components/QueryBuilder/queryBuilderLimits.js +38 -0
  168. package/dist/components/QueryBuilder/queryBuilderLimits.js.map +1 -0
  169. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts +0 -8
  170. package/dist/components/QueryBuilder/queryBuilderMetadata.d.ts.map +1 -1
  171. package/dist/components/QueryBuilder/queryBuilderMetadata.js +6 -9
  172. package/dist/components/QueryBuilder/queryBuilderMetadata.js.map +1 -1
  173. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts +5 -4
  174. package/dist/components/QueryBuilder/queryBuilderTranslation.d.ts.map +1 -1
  175. package/dist/components/QueryBuilder/queryBuilderTranslation.js +58 -33
  176. package/dist/components/QueryBuilder/queryBuilderTranslation.js.map +1 -1
  177. package/dist/components/QueryBuilder/useQBCombinedSql.d.ts.map +1 -1
  178. package/dist/components/QueryBuilder/useQBCombinedSql.js +4 -4
  179. package/dist/components/QueryBuilder/useQBCombinedSql.js.map +1 -1
  180. package/dist/components/QueryBuilder/useQBValueDisplayName.d.ts.map +1 -1
  181. package/dist/components/QueryBuilder/useQBValueDisplayName.js +5 -5
  182. package/dist/components/QueryBuilder/useQBValueDisplayName.js.map +1 -1
  183. package/dist/components/QuerySortSelector.js +5 -5
  184. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js +21 -21
  185. package/dist/components/QueryVisualizationWrapper/QueryVisualizationWrapper.js.map +1 -1
  186. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.d.ts +20 -0
  187. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.d.ts.map +1 -0
  188. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.js +50 -0
  189. package/dist/components/QueryWrapper/AggregateQueryErrorNotice.js.map +1 -0
  190. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.d.ts +5 -3
  191. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.d.ts.map +1 -1
  192. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js +7 -3
  193. package/dist/components/QueryWrapper/TableQueryUseQueryOptions.js.map +1 -1
  194. package/dist/components/QueryWrapper/downloadListFiles.d.ts +25 -0
  195. package/dist/components/QueryWrapper/downloadListFiles.d.ts.map +1 -0
  196. package/dist/components/QueryWrapper/downloadListFiles.js +39 -0
  197. package/dist/components/QueryWrapper/downloadListFiles.js.map +1 -0
  198. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.d.ts +16 -0
  199. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.d.ts.map +1 -0
  200. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.js +50 -0
  201. package/dist/components/QueryWrapper/useAddSelectedRowsToDownloadList.js.map +1 -0
  202. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.d.ts +4 -1
  203. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.d.ts.map +1 -1
  204. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.js +15 -28
  205. package/dist/components/QueryWrapper/useGetAddToDownloadListRequestForCurrentQuery.js.map +1 -1
  206. package/dist/components/QueryWrapper/useOnQueryDataChange.d.ts.map +1 -1
  207. package/dist/components/QueryWrapper/useOnQueryDataChange.js +7 -6
  208. package/dist/components/QueryWrapper/useOnQueryDataChange.js.map +1 -1
  209. package/dist/components/QueryWrapperErrorBoundary.d.ts +3 -1
  210. package/dist/components/QueryWrapperErrorBoundary.d.ts.map +1 -1
  211. package/dist/components/QueryWrapperErrorBoundary.js +26 -21
  212. package/dist/components/QueryWrapperErrorBoundary.js.map +1 -1
  213. package/dist/components/QueryWrapperPlotNav/LastUpdatedOn.js +7 -7
  214. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts +2 -2
  215. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.d.ts.map +1 -1
  216. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js +34 -32
  217. package/dist/components/QueryWrapperPlotNav/QueryWrapperPlotNav.js.map +1 -1
  218. package/dist/components/QueryWrapperPlotNav/QueryWrapperSynapsePlot.js +7 -7
  219. package/dist/components/QueryWrapperPlotNav/UseRowSet.d.ts.map +1 -1
  220. package/dist/components/QueryWrapperPlotNav/UseRowSet.js +12 -12
  221. package/dist/components/QueryWrapperPlotNav/UseRowSet.js.map +1 -1
  222. package/dist/components/RowDataTable/CategorizedRowDataTable.css +1 -0
  223. package/dist/components/RowDataTable/CategorizedRowDataTable.d.ts +33 -0
  224. package/dist/components/RowDataTable/CategorizedRowDataTable.d.ts.map +1 -0
  225. package/dist/components/RowDataTable/CategorizedRowDataTable.js +64 -0
  226. package/dist/components/RowDataTable/CategorizedRowDataTable.js.map +1 -0
  227. package/dist/components/RowDataTable/CategorizedRowDataTable.module.js +8 -0
  228. package/dist/components/RowDataTable/CategorizedRowDataTable.module.js.map +1 -0
  229. package/dist/components/RowDataTable/CategorizedRowDataTable.module.scss +18 -0
  230. package/dist/components/RowDataTable/RowDataTable.d.ts +13 -0
  231. package/dist/components/RowDataTable/RowDataTable.d.ts.map +1 -1
  232. package/dist/components/RowDataTable/RowDataTable.js +25 -8
  233. package/dist/components/RowDataTable/RowDataTable.js.map +1 -1
  234. package/dist/components/RssFeedCards/RssFeedCards.js +1 -1
  235. package/dist/components/RssFeedCards/RssFeedCards.js.map +1 -1
  236. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.d.ts.map +1 -1
  237. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.js +2 -2
  238. package/dist/components/SchemaDrivenAnnotationEditor/field/AdditionalPropertiesSchemaField.js.map +1 -1
  239. package/dist/components/SchemaDrivenAnnotationEditor/template/ObjectFieldTemplate.js +1 -1
  240. package/dist/components/SchemaDrivenAnnotationEditor/template/ObjectFieldTemplate.js.map +1 -1
  241. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts +17 -9
  242. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.d.ts.map +1 -1
  243. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js +39 -30
  244. package/dist/components/SearchQueryWrapper/SearchQueryUseQueryOptions.js.map +1 -1
  245. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js +24 -24
  246. package/dist/components/SetAccessRequirementCommonFields/SetAccessRequirementCommonFields.js.map +1 -1
  247. package/dist/components/StandaloneQueryWrapper/StandaloneQueryWrapper.js +8 -8
  248. package/dist/components/SynapseChat/SynapseChatMessage.js +1 -1
  249. package/dist/components/SynapseChat/SynapseChatMessage.js.map +1 -1
  250. package/dist/components/SynapseForm/NavButtons.js.map +1 -1
  251. package/dist/components/SynapseForm/StepsSideNav.js.map +1 -1
  252. package/dist/components/SynapseSearchPageResults/HighlightedTypography.js +1 -1
  253. package/dist/components/SynapseSearchPageResults/HighlightedTypography.js.map +1 -1
  254. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.d.ts.map +1 -1
  255. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js +3 -3
  256. package/dist/components/SynapseSearchPageResults/SearchFacetPanel/SearchFacetPanelUtils.js.map +1 -1
  257. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.d.ts.map +1 -1
  258. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js +38 -44
  259. package/dist/components/SynapseTable/RowSelection/RowSelectionControls.js.map +1 -1
  260. package/dist/components/SynapseTable/RowSelection/RowSelectionUI.js +4 -4
  261. package/dist/components/SynapseTable/SqlEditor.js +7 -7
  262. package/dist/components/SynapseTable/SynapseTable.js +8 -8
  263. package/dist/components/SynapseTable/SynapseTable.js.map +1 -1
  264. package/dist/components/SynapseTable/SynapseTableRenderers.d.ts.map +1 -1
  265. package/dist/components/SynapseTable/SynapseTableRenderers.js +73 -72
  266. package/dist/components/SynapseTable/SynapseTableRenderers.js.map +1 -1
  267. package/dist/components/SynapseTable/SynapseTableUtils.js +1 -1
  268. package/dist/components/SynapseTable/SynapseTableUtils.js.map +1 -1
  269. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.d.ts.map +1 -1
  270. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js +44 -45
  271. package/dist/components/SynapseTable/TopLevelControls/TopLevelControls.js.map +1 -1
  272. package/dist/components/SynapseTable/datasets/DatasetEditorVersionCell.js +1 -1
  273. package/dist/components/SynapseTable/datasets/DatasetEditorVersionCell.js.map +1 -1
  274. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.d.ts.map +1 -1
  275. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js +142 -142
  276. package/dist/components/SynapseTable/datasets/DatasetItemsEditor.js.map +1 -1
  277. package/dist/components/SynapseTable/export/ExportToAnalysisPlatformDialog.js +4 -4
  278. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js +12 -12
  279. package/dist/components/SynapseTable/export/ExternalPlatformActionsRequiredPrecheck.js.map +1 -1
  280. package/dist/components/SynapseTable/table-top/ColumnSelection.js +6 -6
  281. package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts +0 -1
  282. package/dist/components/SynapseTable/table-top/DownloadOptions.d.ts.map +1 -1
  283. package/dist/components/SynapseTable/table-top/DownloadOptions.js +64 -57
  284. package/dist/components/SynapseTable/table-top/DownloadOptions.js.map +1 -1
  285. package/dist/components/SynapseTable/usePrefetchTableData.d.ts.map +1 -1
  286. package/dist/components/SynapseTable/usePrefetchTableData.js +3 -3
  287. package/dist/components/SynapseTable/usePrefetchTableData.js.map +1 -1
  288. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js +1 -1
  289. package/dist/components/TableColumnSchemaEditor/ColumnModelForm.js.map +1 -1
  290. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorTestUtils.js +1 -1
  291. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorTestUtils.js.map +1 -1
  292. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js +2 -2
  293. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaEditorUtils.js.map +1 -1
  294. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js +60 -60
  295. package/dist/components/TableColumnSchemaEditor/TableColumnSchemaForm.js.map +1 -1
  296. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js +1 -1
  297. package/dist/components/TableColumnSchemaEditor/Validators/DatetimeSchema.js.map +1 -1
  298. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js +1 -1
  299. package/dist/components/TanStackTable/ColumnHeaderEnumFilter.js.map +1 -1
  300. package/dist/components/TanStackTable/StyledTanStackTable.d.ts.map +1 -1
  301. package/dist/components/TanStackTable/StyledTanStackTable.js +1 -4
  302. package/dist/components/TanStackTable/StyledTanStackTable.js.map +1 -1
  303. package/dist/components/TermsAndConditions/TermsAndConditions.js.map +1 -1
  304. package/dist/components/TotalQueryResults.js +14 -14
  305. package/dist/components/Webhook/WebhookDashboard.d.ts.map +1 -1
  306. package/dist/components/Webhook/WebhookDashboard.js +2 -2
  307. package/dist/components/Webhook/WebhookDashboard.js.map +1 -1
  308. package/dist/components/download_list/DownloadConfirmationUtils.d.ts +5 -1
  309. package/dist/components/download_list/DownloadConfirmationUtils.d.ts.map +1 -1
  310. package/dist/components/download_list/DownloadConfirmationUtils.js +2 -2
  311. package/dist/components/download_list/DownloadConfirmationUtils.js.map +1 -1
  312. package/dist/components/error/ErrorBanner.d.ts.map +1 -1
  313. package/dist/components/error/ErrorBanner.js +49 -46
  314. package/dist/components/error/ErrorBanner.js.map +1 -1
  315. package/dist/components/file/upload/MultiFileUploadProgress.js +5 -5
  316. package/dist/components/row_renderers/Dataset.d.ts.map +1 -1
  317. package/dist/components/row_renderers/Dataset.js +6 -6
  318. package/dist/components/row_renderers/Dataset.js.map +1 -1
  319. package/dist/components/row_renderers/Funder.js +1 -1
  320. package/dist/components/row_renderers/Funder.js.map +1 -1
  321. package/dist/components/widgets/ElementWithTooltip.d.ts +6 -1
  322. package/dist/components/widgets/ElementWithTooltip.d.ts.map +1 -1
  323. package/dist/components/widgets/ElementWithTooltip.js +22 -14
  324. package/dist/components/widgets/ElementWithTooltip.js.map +1 -1
  325. package/dist/components/widgets/RangeSlider/RangeSlider.d.ts.map +1 -1
  326. package/dist/components/widgets/RangeSlider/RangeSlider.js +1 -1
  327. package/dist/components/widgets/RangeSlider/RangeSlider.js.map +1 -1
  328. package/dist/components/widgets/SynapseImage.js +1 -1
  329. package/dist/components/widgets/SynapseImage.js.map +1 -1
  330. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts +16 -5
  331. package/dist/components/widgets/facet-nav/FacetNavPanel.d.ts.map +1 -1
  332. package/dist/components/widgets/facet-nav/FacetNavPanel.js +115 -102
  333. package/dist/components/widgets/facet-nav/FacetNavPanel.js.map +1 -1
  334. package/dist/components/widgets/facet-nav/FacetPlotLegendList.d.ts.map +1 -1
  335. package/dist/components/widgets/facet-nav/FacetPlotLegendList.js +4 -2
  336. package/dist/components/widgets/facet-nav/FacetPlotLegendList.js.map +1 -1
  337. package/dist/components/widgets/facet-nav/FacetPlotLegendTable.js +1 -1
  338. package/dist/components/widgets/facet-nav/FacetPlotLegendTable.js.map +1 -1
  339. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.d.ts +2 -0
  340. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.d.ts.map +1 -1
  341. package/dist/components/widgets/facet-nav/FacetPlotLegendUtils.js.map +1 -1
  342. package/dist/components/widgets/facet-nav/PlotsContainer.d.ts +7 -0
  343. package/dist/components/widgets/facet-nav/PlotsContainer.d.ts.map +1 -1
  344. package/dist/components/widgets/facet-nav/PlotsContainer.js +47 -45
  345. package/dist/components/widgets/facet-nav/PlotsContainer.js.map +1 -1
  346. package/dist/components/widgets/facet-nav/SelectionCriteriaPills.js +4 -4
  347. package/dist/components/widgets/facet-nav/useFacetPlots.d.ts +3 -2
  348. package/dist/components/widgets/facet-nav/useFacetPlots.d.ts.map +1 -1
  349. package/dist/components/widgets/facet-nav/useFacetPlots.js +16 -15
  350. package/dist/components/widgets/facet-nav/useFacetPlots.js.map +1 -1
  351. package/dist/components/widgets/query-filter/CombinedRangeFacetFilter.js +4 -4
  352. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts +2 -2
  353. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.d.ts.map +1 -1
  354. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js +62 -60
  355. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilter.js.map +1 -1
  356. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts +2 -0
  357. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.d.ts.map +1 -1
  358. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js +10 -10
  359. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterOption.js.map +1 -1
  360. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts +1 -0
  361. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.d.ts.map +1 -1
  362. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js +2 -1
  363. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUI.js.map +1 -1
  364. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.d.ts +3 -2
  365. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.d.ts.map +1 -1
  366. package/dist/components/widgets/query-filter/EnumFacetFilter/EnumFacetFilterUtils.js.map +1 -1
  367. package/dist/components/widgets/query-filter/FacetFilterControls.d.ts +3 -2
  368. package/dist/components/widgets/query-filter/FacetFilterControls.d.ts.map +1 -1
  369. package/dist/components/widgets/query-filter/FacetFilterControls.js +63 -62
  370. package/dist/components/widgets/query-filter/FacetFilterControls.js.map +1 -1
  371. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.d.ts.map +1 -1
  372. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.js +30 -29
  373. package/dist/components/widgets/query-filter/JsonColumnFacetFilters.js.map +1 -1
  374. package/dist/components/widgets/query-filter/RangeFacetFilter.js +5 -5
  375. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.d.ts +53 -0
  376. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.d.ts.map +1 -0
  377. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.js +391 -0
  378. package/dist/mocks/cohortBuilder/cohortBuilderMockProfiles.js.map +1 -0
  379. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.d.ts +41 -0
  380. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.d.ts.map +1 -0
  381. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.js +379 -0
  382. package/dist/mocks/cohortBuilder/cohortBuilderMockQueryEngine.js.map +1 -0
  383. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.d.ts +26 -0
  384. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.d.ts.map +1 -0
  385. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.js +112 -0
  386. package/dist/mocks/cohortBuilder/cohortBuilderSyntheticData.js.map +1 -0
  387. package/dist/mocks/mockAnnotationColumns.d.ts.map +1 -1
  388. package/dist/mocks/mockAnnotationColumns.js +1 -1
  389. package/dist/mocks/mockAnnotationColumns.js.map +1 -1
  390. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts +9 -0
  391. package/dist/mocks/msw/handlers/aridhiaHandlers.d.ts.map +1 -1
  392. package/dist/mocks/msw/handlers/aridhiaHandlers.js +24 -15
  393. package/dist/mocks/msw/handlers/aridhiaHandlers.js.map +1 -1
  394. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts +21 -2
  395. package/dist/mocks/msw/handlers/asyncJobHandlers.d.ts.map +1 -1
  396. package/dist/mocks/msw/handlers/asyncJobHandlers.js +30 -22
  397. package/dist/mocks/msw/handlers/asyncJobHandlers.js.map +1 -1
  398. package/dist/mocks/msw/handlers/cohortBuilderHandlers.d.ts +27 -0
  399. package/dist/mocks/msw/handlers/cohortBuilderHandlers.d.ts.map +1 -0
  400. package/dist/mocks/msw/handlers/cohortBuilderHandlers.js +158 -0
  401. package/dist/mocks/msw/handlers/cohortBuilderHandlers.js.map +1 -0
  402. package/dist/mocks/msw/handlers/subscriptionHandlers.js +1 -1
  403. package/dist/mocks/msw/handlers/subscriptionHandlers.js.map +1 -1
  404. package/dist/mocks/msw/handlers/userProfileHandlers.d.ts.map +1 -1
  405. package/dist/mocks/msw/handlers/userProfileHandlers.js +2 -2
  406. package/dist/mocks/msw/handlers/userProfileHandlers.js.map +1 -1
  407. package/dist/mocks/query/mockColumnCategoryTable.d.ts +19 -0
  408. package/dist/mocks/query/mockColumnCategoryTable.d.ts.map +1 -0
  409. package/dist/mocks/query/mockColumnCategoryTable.js +188 -0
  410. package/dist/mocks/query/mockColumnCategoryTable.js.map +1 -0
  411. package/dist/stories/ColorPaletteInspector.d.ts.map +1 -1
  412. package/dist/stories/ColorPaletteInspector.js +2 -2
  413. package/dist/stories/ColorPaletteInspector.js.map +1 -1
  414. package/dist/style/components/facet_nav/_facet-nav-panel.scss +8 -0
  415. package/dist/style/main.css +1 -1
  416. package/dist/synapse-queries/auth/useOIDC.js +2 -2
  417. package/dist/synapse-queries/auth/useOIDC.js.map +1 -1
  418. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js +2 -2
  419. package/dist/synapse-queries/auth/useUnbindOAuthProviderIdentity.js.map +1 -1
  420. package/dist/synapse-queries/challenge/useChallenge.js +2 -2
  421. package/dist/synapse-queries/challenge/useChallenge.js.map +1 -1
  422. package/dist/synapse-queries/chat/useChat.js +8 -8
  423. package/dist/synapse-queries/chat/useChat.js.map +1 -1
  424. package/dist/synapse-queries/curation/task/useCurationTask.js +10 -10
  425. package/dist/synapse-queries/curation/task/useCurationTask.js.map +1 -1
  426. package/dist/synapse-queries/dataaccess/useAccessRequirements.js +24 -24
  427. package/dist/synapse-queries/dataaccess/useAccessRequirements.js.map +1 -1
  428. package/dist/synapse-queries/dataaccess/useDataAccessSubmission.js +4 -4
  429. package/dist/synapse-queries/dataaccess/useDataAccessSubmission.js.map +1 -1
  430. package/dist/synapse-queries/dataaccess/useEDuc.js +6 -6
  431. package/dist/synapse-queries/dataaccess/useEDuc.js.map +1 -1
  432. package/dist/synapse-queries/dataaccess/useFormTemplate.js +4 -4
  433. package/dist/synapse-queries/dataaccess/useFormTemplate.js.map +1 -1
  434. package/dist/synapse-queries/download/index.js +2 -2
  435. package/dist/synapse-queries/download/useDownloadList.d.ts +5 -0
  436. package/dist/synapse-queries/download/useDownloadList.d.ts.map +1 -1
  437. package/dist/synapse-queries/download/useDownloadList.js +14 -13
  438. package/dist/synapse-queries/download/useDownloadList.js.map +1 -1
  439. package/dist/synapse-queries/entity/useEntity.d.ts.map +1 -1
  440. package/dist/synapse-queries/entity/useEntity.js +20 -20
  441. package/dist/synapse-queries/entity/useEntity.js.map +1 -1
  442. package/dist/synapse-queries/entity/useExportToADWorkbench.d.ts.map +1 -1
  443. package/dist/synapse-queries/entity/useExportToADWorkbench.js +2 -1
  444. package/dist/synapse-queries/entity/useExportToADWorkbench.js.map +1 -1
  445. package/dist/synapse-queries/entity/useExportToCavatica.d.ts.map +1 -1
  446. package/dist/synapse-queries/entity/useExportToCavatica.js +3 -2
  447. package/dist/synapse-queries/entity/useExportToCavatica.js.map +1 -1
  448. package/dist/synapse-queries/entity/useExportToPluto.d.ts.map +1 -1
  449. package/dist/synapse-queries/entity/useExportToPluto.js +2 -1
  450. package/dist/synapse-queries/entity/useExportToPluto.js.map +1 -1
  451. package/dist/synapse-queries/entity/useGetQueryResultBundle.d.ts.map +1 -1
  452. package/dist/synapse-queries/entity/useGetQueryResultBundle.js +4 -7
  453. package/dist/synapse-queries/entity/useGetQueryResultBundle.js.map +1 -1
  454. package/dist/synapse-queries/forum/useReply.js +6 -6
  455. package/dist/synapse-queries/forum/useReply.js.map +1 -1
  456. package/dist/synapse-queries/forum/useThread.js +14 -14
  457. package/dist/synapse-queries/forum/useThread.js.map +1 -1
  458. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js +1 -1
  459. package/dist/synapse-queries/grid/useEstablishWebsocketConnection.js.map +1 -1
  460. package/dist/synapse-queries/grid/useGridSession.js +4 -4
  461. package/dist/synapse-queries/grid/useGridSession.js.map +1 -1
  462. package/dist/synapse-queries/index.js +177 -176
  463. package/dist/synapse-queries/oauth/useOAuthClient.js +9 -9
  464. package/dist/synapse-queries/oauth/useOAuthClient.js.map +1 -1
  465. package/dist/synapse-queries/portal/usePortal.js +7 -7
  466. package/dist/synapse-queries/portal/usePortal.js.map +1 -1
  467. package/dist/synapse-queries/subscription/useSubscription.js +4 -4
  468. package/dist/synapse-queries/subscription/useSubscription.js.map +1 -1
  469. package/dist/synapse-queries/table/useTableUpdateTransaction.js +2 -2
  470. package/dist/synapse-queries/table/useTableUpdateTransaction.js.map +1 -1
  471. package/dist/synapse-queries/team/useTeam.js +2 -2
  472. package/dist/synapse-queries/team/useTeam.js.map +1 -1
  473. package/dist/synapse-queries/team/useTeamList.d.ts.map +1 -1
  474. package/dist/synapse-queries/team/useTeamList.js +3 -3
  475. package/dist/synapse-queries/team/useTeamList.js.map +1 -1
  476. package/dist/synapse-queries/team/useTeamMembers.js +8 -8
  477. package/dist/synapse-queries/team/useTeamMembers.js.map +1 -1
  478. package/dist/synapse-queries/termsOfService/useTermsOfService.js +2 -2
  479. package/dist/synapse-queries/termsOfService/useTermsOfService.js.map +1 -1
  480. package/dist/synapse-queries/trash/useTrashCan.js +4 -4
  481. package/dist/synapse-queries/trash/useTrashCan.js.map +1 -1
  482. package/dist/synapse-queries/user/useCertificationQuiz.js +2 -2
  483. package/dist/synapse-queries/user/useCertificationQuiz.js.map +1 -1
  484. package/dist/synapse-queries/user/useFavorites.js +4 -4
  485. package/dist/synapse-queries/user/useFavorites.js.map +1 -1
  486. package/dist/synapse-queries/user/useRevokeCertification.js +2 -2
  487. package/dist/synapse-queries/user/useRevokeCertification.js.map +1 -1
  488. package/dist/synapse-queries/wiki/useWiki.js +10 -10
  489. package/dist/synapse-queries/wiki/useWiki.js.map +1 -1
  490. package/dist/tsconfig.build.tsbuildinfo +1 -1
  491. package/dist/utils/ContentTypeUtils.js +4 -4
  492. package/dist/utils/ContentTypeUtils.js.map +1 -1
  493. package/dist/utils/PermissionLevelToAccessType.js +1 -1
  494. package/dist/utils/PermissionLevelToAccessType.js.map +1 -1
  495. package/dist/utils/analytics/useGoogleAnalytics.js +1 -1
  496. package/dist/utils/analytics/useGoogleAnalytics.js.map +1 -1
  497. package/dist/utils/context/DocumentMetadataContext.js +1 -1
  498. package/dist/utils/context/DocumentMetadataContext.js.map +1 -1
  499. package/dist/utils/functions/AccessControlListUtils.d.ts.map +1 -1
  500. package/dist/utils/functions/AccessControlListUtils.js +3 -3
  501. package/dist/utils/functions/AccessControlListUtils.js.map +1 -1
  502. package/dist/utils/functions/ArrayUtils.js +2 -2
  503. package/dist/utils/functions/ArrayUtils.js.map +1 -1
  504. package/dist/utils/functions/FileHandleUtils.js +1 -1
  505. package/dist/utils/functions/FileHandleUtils.js.map +1 -1
  506. package/dist/utils/functions/RegularExpressions.js +1 -1
  507. package/dist/utils/functions/RegularExpressions.js.map +1 -1
  508. package/dist/utils/functions/StringUtils.d.ts.map +1 -1
  509. package/dist/utils/functions/StringUtils.js +1 -2
  510. package/dist/utils/functions/StringUtils.js.map +1 -1
  511. package/dist/utils/functions/deepLinkingUtils.js +2 -2
  512. package/dist/utils/functions/deepLinkingUtils.js.map +1 -1
  513. package/dist/utils/functions/enumerationFacet.d.ts +26 -0
  514. package/dist/utils/functions/enumerationFacet.d.ts.map +1 -0
  515. package/dist/utils/functions/enumerationFacet.js +27 -0
  516. package/dist/utils/functions/enumerationFacet.js.map +1 -0
  517. package/dist/utils/functions/facetCountUtils.d.ts +12 -0
  518. package/dist/utils/functions/facetCountUtils.d.ts.map +1 -0
  519. package/dist/utils/functions/facetCountUtils.js +9 -0
  520. package/dist/utils/functions/facetCountUtils.js.map +1 -0
  521. package/dist/utils/functions/getEndpoint.js.map +1 -1
  522. package/dist/utils/functions/getUserData.js +1 -1
  523. package/dist/utils/functions/getUserData.js.map +1 -1
  524. package/dist/utils/functions/queryUtils.d.ts +1 -1
  525. package/dist/utils/functions/queryUtils.d.ts.map +1 -1
  526. package/dist/utils/functions/queryUtils.js +26 -22
  527. package/dist/utils/functions/queryUtils.js.map +1 -1
  528. package/dist/utils/functions/testDownloadSpeed.d.ts.map +1 -1
  529. package/dist/utils/functions/testDownloadSpeed.js +17 -26
  530. package/dist/utils/functions/testDownloadSpeed.js.map +1 -1
  531. package/dist/utils/functions/unCamelCase.js +1 -1
  532. package/dist/utils/functions/unCamelCase.js.map +1 -1
  533. package/dist/utils/hooks/useGetInfoFromIds.js +5 -5
  534. package/dist/utils/hooks/useGetInfoFromIds.js.map +1 -1
  535. package/dist/utils/hooks/useImmutableTableQuery/TableQueryReducerActions.js +1 -1
  536. package/dist/utils/hooks/useImmutableTableQuery/TableQueryReducerActions.js.map +1 -1
  537. package/dist/utils/hooks/useLogin.d.ts.map +1 -1
  538. package/dist/utils/hooks/useLogin.js +5 -5
  539. package/dist/utils/hooks/useLogin.js.map +1 -1
  540. package/dist/utils/hooks/useUploadFileEntity/useCreateFolderPath.js.map +1 -1
  541. package/dist/utils/jsonschema/collectTopLevelProperties.d.ts +6 -0
  542. package/dist/utils/jsonschema/collectTopLevelProperties.d.ts.map +1 -1
  543. package/dist/utils/jsonschema/collectTopLevelProperties.js +1 -1
  544. package/dist/utils/jsonschema/collectTopLevelProperties.js.map +1 -1
  545. package/dist/utils/jsonschema/getNumberOrEnumInfo.d.ts +22 -0
  546. package/dist/utils/jsonschema/getNumberOrEnumInfo.d.ts.map +1 -0
  547. package/dist/utils/jsonschema/getNumberOrEnumInfo.js +39 -0
  548. package/dist/utils/jsonschema/getNumberOrEnumInfo.js.map +1 -0
  549. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.d.ts +1 -0
  550. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.d.ts.map +1 -1
  551. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.js +1 -1
  552. package/dist/utils/jsonschema/getOnlyNonNullOneOfOption.js.map +1 -1
  553. package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts +5 -0
  554. package/dist/utils/jsonschema/getSchemaPropertyInfo.d.ts.map +1 -1
  555. package/dist/utils/jsonschema/getSchemaPropertyInfo.js +30 -15
  556. package/dist/utils/jsonschema/getSchemaPropertyInfo.js.map +1 -1
  557. package/dist/utils/jsonschema/submissionContext.js +2 -2
  558. package/dist/utils/jsonschema/submissionContext.js.map +1 -1
  559. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"CardUtils.js","names":[],"sources":["../../../src/components/GenericCard/CardUtils.tsx"],"sourcesContent":["import { CardLink } from '@/components/CardContainer/CardLink'\nimport { isTableEntity } from '@/utils/functions/EntityTypeUtils'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport {\n convertDoiToLink,\n SYNAPSE_ENTITY_ID_REGEX,\n} from '@/utils/functions/RegularExpressions'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport { isExternalLink } from '@/utils/functions/IsExternalLink'\nimport {\n ColumnModel,\n Entity,\n FileHandleAssociateType,\n FileHandleAssociation,\n SelectColumn,\n} from '@sage-bionetworks/synapse-types'\n\nexport const getFileHandleAssociation = (\n table?: Entity,\n fileHandleId?: string,\n rowSynapseId?: string, // only applicable if this is an EntityView\n) => {\n let fileHandleAssociation: FileHandleAssociation | undefined = undefined\n if (table && fileHandleId) {\n if (isTableEntity(table)) {\n // The file handle is in the table\n fileHandleAssociation = {\n fileHandleId,\n associateObjectId: table?.id ?? '',\n associateObjectType: FileHandleAssociateType.TableEntity,\n }\n } else if (rowSynapseId) {\n // We're looking at a view, so the FileEntity (whose ID matches the row ID) gives permission to download the file handle\n fileHandleAssociation = {\n fileHandleId,\n associateObjectId: rowSynapseId,\n associateObjectType: FileHandleAssociateType.FileEntity,\n }\n }\n }\n return fileHandleAssociation\n}\nexport const getValueOrMultiValue = ({\n columnName,\n value,\n selectColumns,\n columnModels,\n}: {\n columnName?: string\n value?: string\n selectColumns?: SelectColumn[]\n columnModels?: ColumnModel[]\n}): ValueOrMultiValue => {\n if (!value) {\n return {\n str: '',\n strList: undefined,\n selectColumn: undefined,\n }\n }\n const selectedColumnOrUndefined =\n selectColumns?.find(el => el.name === columnName) ||\n columnModels?.find(el => el.name === columnName)\n const isMultiValue = selectedColumnOrUndefined?.columnType.endsWith('_LIST')\n\n if (isMultiValue) {\n let val: any = value\n let strList: any\n try {\n strList = JSON.parse(val)\n val = (strList as string[]).join(', ')\n return {\n strList,\n str: val,\n selectColumn: selectedColumnOrUndefined,\n }\n } catch (e) {\n console.error(\n 'Could not parse multivalue string ',\n val,\n ' caught err ',\n e,\n )\n }\n }\n return {\n str: value,\n selectColumn: selectedColumnOrUndefined,\n }\n}\ntype ValueOrMultiValue = {\n str: string\n strList?: string[]\n selectColumn?: SelectColumn\n}\n\nexport function getCardLinkHref(\n cardLink: CardLink | undefined,\n data: string[] | undefined,\n schema?: Record<string, number>,\n rowId?: number,\n): string | undefined {\n if (cardLink) {\n if (!data || !schema) {\n throw Error('Must specify CardLink and data for linking to work')\n }\n const { matchColumnName, overrideValueWithRowID } = cardLink\n\n // PORTALS-2088: Return the link, unless...\n // an overrideLinkURLColumnName has been set and its value is defined.\n // In this case, just use the overrideLinkURLColumnName value\n if ('overrideLinkURLColumnName' in cardLink) {\n const { overrideLinkURLColumnName, overrideLinkURLColumnTransform } =\n cardLink\n if (schema[overrideLinkURLColumnName]) {\n const indexOfOverrideLinkURLColumnName =\n schema[overrideLinkURLColumnName]\n const overrideLinkValue = data[indexOfOverrideLinkURLColumnName]\n if (overrideLinkValue && overrideLinkURLColumnTransform) {\n return overrideLinkURLColumnTransform(overrideLinkValue)\n } else if (overrideLinkValue) {\n return overrideLinkValue\n }\n }\n }\n\n const indexInData = schema[matchColumnName]\n if (indexInData === undefined) {\n console.error(\n `Could not find match for data: ${data} with columnName ${matchColumnName}`,\n )\n } else if ('baseURL' in cardLink) {\n const { baseURL, URLColumnName, urlParamStyle = 'query-param' } = cardLink\n const value = overrideValueWithRowID ? `syn${rowId}` : data[indexInData]\n if (value) {\n // value is defined!\n if (urlParamStyle === 'path-segment') {\n return `/${baseURL}/${encodeURIComponent(value)}`\n }\n return `/${baseURL}?${URLColumnName}=${encodeURIComponent(value)}`\n }\n }\n }\n return undefined\n}\n\nexport function getLinkParams(\n link: string,\n cardLinkConfig: CardLink | undefined,\n data: string[] | undefined,\n schema?: Record<string, number>,\n rowId?: number,\n) {\n link = link.trim()\n let href = link\n const doiLink = convertDoiToLink(href)\n if (link.match(SYNAPSE_ENTITY_ID_REGEX)) {\n // its a synId\n href = `${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Synapse:${link}`\n } else if (doiLink) {\n href = doiLink\n } else if (cardLinkConfig) {\n href = getCardLinkHref(cardLinkConfig, data, schema, rowId) ?? ''\n }\n\n const isExternal = Boolean(href && isExternalLink(href))\n const defaultTarget = isExternal\n ? TargetEnum.NEW_WINDOW\n : TargetEnum.CURRENT_WINDOW\n\n const target = cardLinkConfig?.target ?? defaultTarget\n return { href, target }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,KACX,GACA,GACA,MACG;CACH,IAAI;CAkBJ,OAjBI,KAAS,MACP,EAAc,CAAK,IAErB,IAAwB;EACtB;EACA,mBAAmB,GAAO,MAAM;EAChC,qBAAqB,EAAwB;CAC/C,IACS,MAET,IAAwB;EACtB;EACA,mBAAmB;EACnB,qBAAqB,EAAwB;CAC/C,KAGG;AACT,GACa,KAAwB,EACnC,eACA,UACA,kBACA,sBAMuB;CACvB,IAAI,CAAC,GACH,OAAO;EACL,KAAK;EACL,SAAS,KAAA;EACT,cAAc,KAAA;CAChB;CAEF,IAAM,IACJ,GAAe,MAAK,MAAM,EAAG,SAAS,CAAU,KAChD,GAAc,MAAK,MAAM,EAAG,SAAS,CAAU;CAGjD,IAFqB,GAA2B,WAAW,SAAS,OAAO,GAEzD;EAChB,IAAI,IAAW,GACX;EACJ,IAAI;GAGF,OAFA,IAAU,KAAK,MAAM,CAAG,GACxB,IAAO,EAAqB,KAAK,IAAI,GAC9B;IACL;IACA,KAAK;IACL,cAAc;GAChB;EACF,SAAS,GAAG;GACV,QAAQ,MACN,sCACA,GACA,gBACA,CACF;EACF;CACF;CACA,OAAO;EACL,KAAK;EACL,cAAc;CAChB;AACF;AAOA,SAAgB,EACd,GACA,GACA,GACA,GACoB;CACpB,IAAI,GAAU;EACZ,IAAI,CAAC,KAAQ,CAAC,GACZ,MAAM,MAAM,oDAAoD;EAElE,IAAM,EAAE,oBAAiB,8BAA2B;EAKpD,IAAI,+BAA+B,GAAU;GAC3C,IAAM,EAAE,8BAA2B,sCACjC;GACF,IAAI,EAAO,IAA4B;IAGrC,IAAM,IAAoB,EADxB,EAAO;IAET,IAAI,KAAqB,GACvB,OAAO,EAA+B,CAAiB;IAClD,IAAI,GACT,OAAO;GAEX;EACF;EAEA,IAAM,IAAc,EAAO;EAC3B,IAAI,MAAgB,KAAA,GAClB,QAAQ,MACN,kCAAkC,EAAK,mBAAmB,GAC5D;OACK,IAAI,aAAa,GAAU;GAChC,IAAM,EAAE,YAAS,kBAAe,mBAAgB,kBAAkB,GAC5D,IAAQ,IAAyB,MAAM,MAAU,EAAK;GAC5D,IAAI,GAKF,OAHI,MAAkB,iBACb,IAAI,EAAQ,GAAG,mBAAmB,CAAK,MAEzC,IAAI,EAAQ,GAAG,EAAc,GAAG,mBAAmB,CAAK;EAEnE;CACF;AAEF;AAEA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACA;CACA,IAAO,EAAK,KAAK;CACjB,IAAI,IAAO,GACL,IAAU,EAAiB,CAAI;CACrC,AAAI,EAAK,MAAM,CAAuB,IAEpC,IAAO,GAAG,EAA2B,OAAO,UAAU,MAC7C,IACT,IAAO,IACE,MACT,IAAO,EAAgB,GAAgB,GAAM,GAAQ,CAAK,KAAK;CAIjE,IAAM,IADqB,KAAQ,EAAe,CAAI,IAElD,EAAW,aACX,EAAW,gBAET,IAAS,GAAgB,UAAU;CACzC,OAAO;EAAE;EAAM;CAAO;AACxB"}
1
+ {"version":3,"file":"CardUtils.js","names":[],"sources":["../../../src/components/GenericCard/CardUtils.tsx"],"sourcesContent":["import { CardLink } from '@/components/CardContainer/CardLink'\nimport { isTableEntity } from '@/utils/functions/EntityTypeUtils'\nimport { PRODUCTION_ENDPOINT_CONFIG } from '@/utils/functions/getEndpoint'\nimport {\n convertDoiToLink,\n SYNAPSE_ENTITY_ID_REGEX,\n} from '@/utils/functions/RegularExpressions'\nimport { TargetEnum } from '@/utils/html/TargetEnum'\nimport { isExternalLink } from '@/utils/functions/IsExternalLink'\nimport {\n ColumnModel,\n Entity,\n FileHandleAssociateType,\n FileHandleAssociation,\n SelectColumn,\n} from '@sage-bionetworks/synapse-types'\n\nexport const getFileHandleAssociation = (\n table?: Entity,\n fileHandleId?: string,\n rowSynapseId?: string, // only applicable if this is an EntityView\n) => {\n let fileHandleAssociation: FileHandleAssociation | undefined = undefined\n if (table && fileHandleId) {\n if (isTableEntity(table)) {\n // The file handle is in the table\n fileHandleAssociation = {\n fileHandleId,\n associateObjectId: table?.id ?? '',\n associateObjectType: FileHandleAssociateType.TableEntity,\n }\n } else if (rowSynapseId) {\n // We're looking at a view, so the FileEntity (whose ID matches the row ID) gives permission to download the file handle\n fileHandleAssociation = {\n fileHandleId,\n associateObjectId: rowSynapseId,\n associateObjectType: FileHandleAssociateType.FileEntity,\n }\n }\n }\n return fileHandleAssociation\n}\nexport const getValueOrMultiValue = ({\n columnName,\n value,\n selectColumns,\n columnModels,\n}: {\n columnName?: string\n value?: string\n selectColumns?: SelectColumn[]\n columnModels?: ColumnModel[]\n}): ValueOrMultiValue => {\n if (!value) {\n return {\n str: '',\n strList: undefined,\n selectColumn: undefined,\n }\n }\n const selectedColumnOrUndefined =\n selectColumns?.find(el => el.name === columnName) ||\n columnModels?.find(el => el.name === columnName)\n const isMultiValue = selectedColumnOrUndefined?.columnType.endsWith('_LIST')\n\n if (isMultiValue) {\n let val: any = value\n let strList: any\n try {\n strList = JSON.parse(val)\n val = (strList as string[]).join(', ')\n return {\n strList,\n str: val,\n selectColumn: selectedColumnOrUndefined,\n }\n } catch (e) {\n console.error(\n 'Could not parse multivalue string ',\n val,\n ' caught err ',\n e,\n )\n }\n }\n return {\n str: value,\n selectColumn: selectedColumnOrUndefined,\n }\n}\ntype ValueOrMultiValue = {\n str: string\n strList?: string[]\n selectColumn?: SelectColumn\n}\n\nexport function getCardLinkHref(\n cardLink: CardLink | undefined,\n data: string[] | undefined,\n schema?: Record<string, number>,\n rowId?: number,\n): string | undefined {\n if (cardLink) {\n if (!data || !schema) {\n throw new Error('Must specify CardLink and data for linking to work')\n }\n const { matchColumnName, overrideValueWithRowID } = cardLink\n\n // PORTALS-2088: Return the link, unless...\n // an overrideLinkURLColumnName has been set and its value is defined.\n // In this case, just use the overrideLinkURLColumnName value\n if ('overrideLinkURLColumnName' in cardLink) {\n const { overrideLinkURLColumnName, overrideLinkURLColumnTransform } =\n cardLink\n if (schema[overrideLinkURLColumnName]) {\n const indexOfOverrideLinkURLColumnName =\n schema[overrideLinkURLColumnName]\n const overrideLinkValue = data[indexOfOverrideLinkURLColumnName]\n if (overrideLinkValue && overrideLinkURLColumnTransform) {\n return overrideLinkURLColumnTransform(overrideLinkValue)\n } else if (overrideLinkValue) {\n return overrideLinkValue\n }\n }\n }\n\n const indexInData = schema[matchColumnName]\n if (indexInData === undefined) {\n console.error(\n `Could not find match for data: ${data} with columnName ${matchColumnName}`,\n )\n } else if ('baseURL' in cardLink) {\n const { baseURL, URLColumnName, urlParamStyle = 'query-param' } = cardLink\n const value = overrideValueWithRowID ? `syn${rowId}` : data[indexInData]\n if (value) {\n // value is defined!\n if (urlParamStyle === 'path-segment') {\n return `/${baseURL}/${encodeURIComponent(value)}`\n }\n return `/${baseURL}?${URLColumnName}=${encodeURIComponent(value)}`\n }\n }\n }\n return undefined\n}\n\nexport function getLinkParams(\n link: string,\n cardLinkConfig: CardLink | undefined,\n data: string[] | undefined,\n schema?: Record<string, number>,\n rowId?: number,\n) {\n link = link.trim()\n let href = link\n const doiLink = convertDoiToLink(href)\n if (link.match(SYNAPSE_ENTITY_ID_REGEX)) {\n // its a synId\n href = `${PRODUCTION_ENDPOINT_CONFIG.PORTAL}Synapse:${link}`\n } else if (doiLink) {\n href = doiLink\n } else if (cardLinkConfig) {\n href = getCardLinkHref(cardLinkConfig, data, schema, rowId) ?? ''\n }\n\n const isExternal = Boolean(href && isExternalLink(href))\n const defaultTarget = isExternal\n ? TargetEnum.NEW_WINDOW\n : TargetEnum.CURRENT_WINDOW\n\n const target = cardLinkConfig?.target ?? defaultTarget\n return { href, target }\n}\n"],"mappings":";;;;;;;AAiBA,IAAa,KACX,GACA,GACA,MACG;CACH,IAAI;CAkBJ,OAjBI,KAAS,MACP,EAAc,CAAK,IAErB,IAAwB;EACtB;EACA,mBAAmB,GAAO,MAAM;EAChC,qBAAqB,EAAwB;CAC/C,IACS,MAET,IAAwB;EACtB;EACA,mBAAmB;EACnB,qBAAqB,EAAwB;CAC/C,KAGG;AACT,GACa,KAAwB,EACnC,eACA,UACA,kBACA,sBAMuB;CACvB,IAAI,CAAC,GACH,OAAO;EACL,KAAK;EACL,SAAS,KAAA;EACT,cAAc,KAAA;CAChB;CAEF,IAAM,IACJ,GAAe,MAAK,MAAM,EAAG,SAAS,CAAU,KAChD,GAAc,MAAK,MAAM,EAAG,SAAS,CAAU;CAGjD,IAFqB,GAA2B,WAAW,SAAS,OAAO,GAEzD;EAChB,IAAI,IAAW,GACX;EACJ,IAAI;GAGF,OAFA,IAAU,KAAK,MAAM,CAAG,GACxB,IAAO,EAAqB,KAAK,IAAI,GAC9B;IACL;IACA,KAAK;IACL,cAAc;GAChB;EACF,SAAS,GAAG;GACV,QAAQ,MACN,sCACA,GACA,gBACA,CACF;EACF;CACF;CACA,OAAO;EACL,KAAK;EACL,cAAc;CAChB;AACF;AAOA,SAAgB,EACd,GACA,GACA,GACA,GACoB;CACpB,IAAI,GAAU;EACZ,IAAI,CAAC,KAAQ,CAAC,GACZ,MAAU,MAAM,oDAAoD;EAEtE,IAAM,EAAE,oBAAiB,8BAA2B;EAKpD,IAAI,+BAA+B,GAAU;GAC3C,IAAM,EAAE,8BAA2B,sCACjC;GACF,IAAI,EAAO,IAA4B;IAGrC,IAAM,IAAoB,EADxB,EAAO;IAET,IAAI,KAAqB,GACvB,OAAO,EAA+B,CAAiB;IAClD,IAAI,GACT,OAAO;GAEX;EACF;EAEA,IAAM,IAAc,EAAO;EAC3B,IAAI,MAAgB,KAAA,GAClB,QAAQ,MACN,kCAAkC,EAAK,mBAAmB,GAC5D;OACK,IAAI,aAAa,GAAU;GAChC,IAAM,EAAE,YAAS,kBAAe,mBAAgB,kBAAkB,GAC5D,IAAQ,IAAyB,MAAM,MAAU,EAAK;GAC5D,IAAI,GAKF,OAHI,MAAkB,iBACb,IAAI,EAAQ,GAAG,mBAAmB,CAAK,MAEzC,IAAI,EAAQ,GAAG,EAAc,GAAG,mBAAmB,CAAK;EAEnE;CACF;AAEF;AAEA,SAAgB,EACd,GACA,GACA,GACA,GACA,GACA;CACA,IAAO,EAAK,KAAK;CACjB,IAAI,IAAO,GACL,IAAU,EAAiB,CAAI;CACrC,AAAI,EAAK,MAAM,CAAuB,IAEpC,IAAO,GAAG,EAA2B,OAAO,UAAU,MAC7C,IACT,IAAO,IACE,MACT,IAAO,EAAgB,GAAgB,GAAM,GAAQ,CAAK,KAAK;CAIjE,IAAM,IADqB,KAAQ,EAAe,CAAI,IAElD,EAAW,aACX,EAAW,gBAET,IAAS,GAAgB,UAAU;CACzC,OAAO;EAAE;EAAM;CAAO;AACxB"}
@@ -88,7 +88,7 @@ function P(e) {
88
88
  minWidth: 0,
89
89
  maxWidth: "100%"
90
90
  },
91
- children: t.map(n).sort((e, t) => M[e.category] - M[t.category]).map((e, t) => /* @__PURE__ */ s(r, {
91
+ children: t.map(n).toSorted((e, t) => M[e.category] - M[t.category]).map((e, t) => /* @__PURE__ */ s(r, {
92
92
  label: e.name,
93
93
  icon: /* @__PURE__ */ s(j, { term: e }),
94
94
  tooltipTitle: N(e)
@@ -1 +1 @@
1
- {"version":3,"file":"DuoTermTags.js","names":[],"sources":["../../../../src/components/GenericCard/DuoTermTags/DuoTermTags.tsx"],"sourcesContent":["import { Box, Link } from '@mui/material'\nimport type { ComponentType, ReactNode } from 'react'\nimport GeneticsIcon from '@/assets/icons/GeneticsIcon'\nimport ScienceOutlined from '@mui/icons-material/ScienceOutlined'\nimport MedicalServicesOutlined from '@mui/icons-material/MedicalServicesOutlined'\nimport CoronavirusOutlined from '@mui/icons-material/CoronavirusOutlined'\nimport GroupsOutlined from '@mui/icons-material/GroupsOutlined'\nimport HealingOutlined from '@mui/icons-material/HealingOutlined'\nimport LockOpenOutlined from '@mui/icons-material/LockOpenOutlined'\nimport MoneyOffOutlined from '@mui/icons-material/MoneyOffOutlined'\nimport ArticleOutlined from '@mui/icons-material/ArticleOutlined'\nimport HandshakeOutlined from '@mui/icons-material/HandshakeOutlined'\nimport GavelOutlined from '@mui/icons-material/GavelOutlined'\nimport ReplayOutlined from '@mui/icons-material/ReplayOutlined'\nimport FormatQuoteOutlined from '@mui/icons-material/FormatQuoteOutlined'\nimport PersonOutlined from '@mui/icons-material/PersonOutlined'\nimport AssignmentOutlined from '@mui/icons-material/AssignmentOutlined'\nimport ApartmentOutlined from '@mui/icons-material/ApartmentOutlined'\nimport PublicOutlined from '@mui/icons-material/PublicOutlined'\nimport ScheduleOutlined from '@mui/icons-material/ScheduleOutlined'\nimport HourglassEmptyOutlined from '@mui/icons-material/HourglassEmptyOutlined'\nimport BlockOutlined from '@mui/icons-material/BlockOutlined'\nimport RuleOutlined from '@mui/icons-material/RuleOutlined'\nimport HelpOutline from '@mui/icons-material/HelpOutline'\nimport {\n DuoCategory,\n DuoTerm,\n duoRegistryUrl,\n resolveDuoTerm,\n} from './duoTerms'\nimport FacetValueChip from '@/components/widgets/facet-nav/FacetValueChip'\nimport type { RenderedFacetValueChip } from '@/components/QueryVisualizationWrapper/QueryVisualizationContext'\n\nexport type DuoTermTagsProps = {\n /** Raw `dataUseModifiers` values (ontology codes or term names). */\n terms: string[]\n}\n\n// An icon per code so the meaning reads at a glance.\nconst DUO_ICONS: Record<string, ComponentType> = {\n 'DUO:0000042': ScienceOutlined, // General Research Use\n 'DUO:0000006': MedicalServicesOutlined, // Health/Medical/Biomedical\n 'DUO:0000007': CoronavirusOutlined, // Disease Specific\n 'DUO:0000011': GroupsOutlined, // Population Origins/Ancestry\n 'DUO:0000043': HealingOutlined, // Clinical Care Use\n 'DUO:0000004': LockOpenOutlined, // No Restriction\n 'DUO:0000046': MoneyOffOutlined, // Non-Commercial Use Only\n 'DUO:0000018': MoneyOffOutlined, // Not-for-Profit, Non-Commercial\n 'DUO:0000045': MoneyOffOutlined, // Not-for-Profit Organisation\n 'DUO:0000019': ArticleOutlined, // Publication Required\n 'DUO:0000020': HandshakeOutlined, // Collaboration Required\n 'DUO:0000021': GavelOutlined, // Ethics Approval Required\n 'DUO:0000029': ReplayOutlined, // Return to Database/Resource\n DUOplus7: FormatQuoteOutlined, // Attribution Required\n 'DUO:0000026': PersonOutlined, // User Specific\n 'DUO:0000027': AssignmentOutlined, // Project Specific\n 'DUO:0000028': ApartmentOutlined, // Institution Specific\n 'DUO:0000022': PublicOutlined, // Geographical Restriction\n 'DUO:0000025': ScheduleOutlined, // Time Limit\n 'DUO:0000024': HourglassEmptyOutlined, // Publication Moratorium\n 'DUO:0000016': GeneticsIcon, // Genetic Studies Only (Material Symbols)\n 'DUO:0000015': BlockOutlined, // No General Methods Research\n 'DUO:0000044': BlockOutlined, // Population/Ancestry Prohibited\n 'DUO:0000012': RuleOutlined, // Research Specific Restrictions\n}\n\nconst TermIcon = (props: { term: DuoTerm }): ReactNode => {\n const { term } = props\n const Icon = DUO_ICONS[term.code] ?? HelpOutline\n return <Icon />\n}\n\n// Primary use first (the dataset's purpose), then the conditions that limit it.\nconst ORDER: Record<DuoCategory, number> = {\n permission: 0,\n commercial: 1,\n obligation: 2,\n limit: 3,\n}\n\n// The rich tooltip for a DUO term: full name, abbreviation, ontology code\n// (linked to the registry when available), and definition.\nfunction duoTooltipTitle(t: DuoTerm): ReactNode {\n const url = duoRegistryUrl(t)\n const hasMeta = Boolean(t.abbr || t.code)\n return (\n <>\n <strong>{t.name}</strong>\n {hasMeta && (\n <>\n <br />\n {t.abbr}\n {t.abbr && t.code ? ' · ' : ''}\n {url ? (\n <Link href={url} target=\"_blank\" rel=\"noopener\" color=\"inherit\">\n {t.code}\n </Link>\n ) : (\n t.code\n )}\n </>\n )}\n {t.definition && t.definition !== t.name && (\n <>\n <br />\n {t.definition}\n </>\n )}\n </>\n )\n}\n\n/** Renders a dataset's DUO data-use modifiers as a row of chips (used on cards). */\nexport default function DuoTermTags(props: DuoTermTagsProps) {\n const { terms } = props\n if (!terms || terms.length === 0) {\n return null\n }\n const sorted = terms\n .map(resolveDuoTerm)\n .sort((a, b) => ORDER[a.category] - ORDER[b.category])\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 0.75,\n minWidth: 0,\n maxWidth: '100%',\n }}\n >\n {sorted.map((t, i) => (\n <FacetValueChip\n key={i}\n label={t.name}\n icon={<TermIcon term={t} />}\n tooltipTitle={duoTooltipTitle(t)}\n />\n ))}\n </Box>\n )\n}\n\n/**\n * Builds a `renderFacetValue` function (for `QueryVisualizationWrapper`) that\n * returns the chip content for the given DUO column's enumeration facet values\n * — used by both the facet sidebar and the active-filter pills, which render it\n * through the shared `FacetValueChip`. Other columns fall through to text.\n *\n * Portals only need to declare the DUO column (via the card schema's\n * `dataUseModifiersColumnName`) rather than each defining their own handler.\n */\nexport function createDuoFacetValueRenderer(duoColumnName: string) {\n return (\n columnName: string,\n value: string,\n ): RenderedFacetValueChip | undefined => {\n if (columnName !== duoColumnName) {\n return undefined\n }\n const t = resolveDuoTerm(value)\n return {\n label: t.name,\n icon: <TermIcon term={t} />,\n tooltipTitle: duoTooltipTitle(t),\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAM,IAA2C;CAC/C,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,UAAU;CACV,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;AACjB,GAEM,KAAY,MAAwC;CACxD,IAAM,EAAE,YAAS;CAEjB,OAAO,kBADM,EAAU,EAAK,SAAS,GAC9B,CAAO,CAAA;AAChB,GAGM,IAAqC;CACzC,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,OAAO;AACT;AAIA,SAAS,EAAgB,GAAuB;CAC9C,IAAM,IAAM,EAAe,CAAC,GACtB,IAAU,GAAQ,EAAE,QAAQ,EAAE;CACpC,OACE,kBAAA,GAAA,EAAA,UAAA;EACE,kBAAC,UAAD,EAAA,UAAS,EAAE,KAAa,CAAA;EACvB,KACC,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,MAAD,CAAK,CAAA;GACJ,EAAE;GACF,EAAE,QAAQ,EAAE,OAAO,QAAQ;GAC3B,IACC,kBAAC,GAAD;IAAM,MAAM;IAAK,QAAO;IAAS,KAAI;IAAW,OAAM;cACnD,EAAE;GACC,CAAA,IAEN,EAAE;EAEJ,EAAA,CAAA;EAEH,EAAE,cAAc,EAAE,eAAe,EAAE,QAClC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,MAAD,CAAK,CAAA,GACJ,EAAE,UACH,EAAA,CAAA;CAEJ,EAAA,CAAA;AAEN;AAGA,SAAwB,EAAY,GAAyB;CAC3D,IAAM,EAAE,aAAU;CAQlB,OAPI,CAAC,KAAS,EAAM,WAAW,IACtB,OAOP,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,UAAU;GACV,KAAK;GACL,UAAU;GACV,UAAU;EACZ;YAZW,EACZ,IAAI,CAAc,EAClB,MAAM,GAAG,MAAM,EAAM,EAAE,YAAY,EAAM,EAAE,SAYzC,EAAO,KAAK,GAAG,MACd,kBAAC,GAAD;GAEE,OAAO,EAAE;GACT,MAAM,kBAAC,GAAD,EAAU,MAAM,EAAI,CAAA;GAC1B,cAAc,EAAgB,CAAC;EAChC,GAJM,CAIN,CACF;CACE,CAAA;AAET;AAWA,SAAgB,EAA4B,GAAuB;CACjE,QACE,GACA,MACuC;EACvC,IAAI,MAAe,GACjB;EAEF,IAAM,IAAI,EAAe,CAAK;EAC9B,OAAO;GACL,OAAO,EAAE;GACT,MAAM,kBAAC,GAAD,EAAU,MAAM,EAAI,CAAA;GAC1B,cAAc,EAAgB,CAAC;EACjC;CACF;AACF"}
1
+ {"version":3,"file":"DuoTermTags.js","names":[],"sources":["../../../../src/components/GenericCard/DuoTermTags/DuoTermTags.tsx"],"sourcesContent":["import { Box, Link } from '@mui/material'\nimport type { ComponentType, ReactNode } from 'react'\nimport GeneticsIcon from '@/assets/icons/GeneticsIcon'\nimport ScienceOutlined from '@mui/icons-material/ScienceOutlined'\nimport MedicalServicesOutlined from '@mui/icons-material/MedicalServicesOutlined'\nimport CoronavirusOutlined from '@mui/icons-material/CoronavirusOutlined'\nimport GroupsOutlined from '@mui/icons-material/GroupsOutlined'\nimport HealingOutlined from '@mui/icons-material/HealingOutlined'\nimport LockOpenOutlined from '@mui/icons-material/LockOpenOutlined'\nimport MoneyOffOutlined from '@mui/icons-material/MoneyOffOutlined'\nimport ArticleOutlined from '@mui/icons-material/ArticleOutlined'\nimport HandshakeOutlined from '@mui/icons-material/HandshakeOutlined'\nimport GavelOutlined from '@mui/icons-material/GavelOutlined'\nimport ReplayOutlined from '@mui/icons-material/ReplayOutlined'\nimport FormatQuoteOutlined from '@mui/icons-material/FormatQuoteOutlined'\nimport PersonOutlined from '@mui/icons-material/PersonOutlined'\nimport AssignmentOutlined from '@mui/icons-material/AssignmentOutlined'\nimport ApartmentOutlined from '@mui/icons-material/ApartmentOutlined'\nimport PublicOutlined from '@mui/icons-material/PublicOutlined'\nimport ScheduleOutlined from '@mui/icons-material/ScheduleOutlined'\nimport HourglassEmptyOutlined from '@mui/icons-material/HourglassEmptyOutlined'\nimport BlockOutlined from '@mui/icons-material/BlockOutlined'\nimport RuleOutlined from '@mui/icons-material/RuleOutlined'\nimport HelpOutline from '@mui/icons-material/HelpOutline'\nimport {\n DuoCategory,\n DuoTerm,\n duoRegistryUrl,\n resolveDuoTerm,\n} from './duoTerms'\nimport FacetValueChip from '@/components/widgets/facet-nav/FacetValueChip'\nimport type { RenderedFacetValueChip } from '@/components/QueryVisualizationWrapper/QueryVisualizationContext'\n\nexport type DuoTermTagsProps = {\n /** Raw `dataUseModifiers` values (ontology codes or term names). */\n terms: string[]\n}\n\n// An icon per code so the meaning reads at a glance.\nconst DUO_ICONS: Record<string, ComponentType> = {\n 'DUO:0000042': ScienceOutlined, // General Research Use\n 'DUO:0000006': MedicalServicesOutlined, // Health/Medical/Biomedical\n 'DUO:0000007': CoronavirusOutlined, // Disease Specific\n 'DUO:0000011': GroupsOutlined, // Population Origins/Ancestry\n 'DUO:0000043': HealingOutlined, // Clinical Care Use\n 'DUO:0000004': LockOpenOutlined, // No Restriction\n 'DUO:0000046': MoneyOffOutlined, // Non-Commercial Use Only\n 'DUO:0000018': MoneyOffOutlined, // Not-for-Profit, Non-Commercial\n 'DUO:0000045': MoneyOffOutlined, // Not-for-Profit Organisation\n 'DUO:0000019': ArticleOutlined, // Publication Required\n 'DUO:0000020': HandshakeOutlined, // Collaboration Required\n 'DUO:0000021': GavelOutlined, // Ethics Approval Required\n 'DUO:0000029': ReplayOutlined, // Return to Database/Resource\n DUOplus7: FormatQuoteOutlined, // Attribution Required\n 'DUO:0000026': PersonOutlined, // User Specific\n 'DUO:0000027': AssignmentOutlined, // Project Specific\n 'DUO:0000028': ApartmentOutlined, // Institution Specific\n 'DUO:0000022': PublicOutlined, // Geographical Restriction\n 'DUO:0000025': ScheduleOutlined, // Time Limit\n 'DUO:0000024': HourglassEmptyOutlined, // Publication Moratorium\n 'DUO:0000016': GeneticsIcon, // Genetic Studies Only (Material Symbols)\n 'DUO:0000015': BlockOutlined, // No General Methods Research\n 'DUO:0000044': BlockOutlined, // Population/Ancestry Prohibited\n 'DUO:0000012': RuleOutlined, // Research Specific Restrictions\n}\n\nconst TermIcon = (props: { term: DuoTerm }): ReactNode => {\n const { term } = props\n const Icon = DUO_ICONS[term.code] ?? HelpOutline\n return <Icon />\n}\n\n// Primary use first (the dataset's purpose), then the conditions that limit it.\nconst ORDER: Record<DuoCategory, number> = {\n permission: 0,\n commercial: 1,\n obligation: 2,\n limit: 3,\n}\n\n// The rich tooltip for a DUO term: full name, abbreviation, ontology code\n// (linked to the registry when available), and definition.\nfunction duoTooltipTitle(t: DuoTerm): ReactNode {\n const url = duoRegistryUrl(t)\n const hasMeta = Boolean(t.abbr || t.code)\n return (\n <>\n <strong>{t.name}</strong>\n {hasMeta && (\n <>\n <br />\n {t.abbr}\n {t.abbr && t.code ? ' · ' : ''}\n {url ? (\n <Link href={url} target=\"_blank\" rel=\"noopener\" color=\"inherit\">\n {t.code}\n </Link>\n ) : (\n t.code\n )}\n </>\n )}\n {t.definition && t.definition !== t.name && (\n <>\n <br />\n {t.definition}\n </>\n )}\n </>\n )\n}\n\n/** Renders a dataset's DUO data-use modifiers as a row of chips (used on cards). */\nexport default function DuoTermTags(props: DuoTermTagsProps) {\n const { terms } = props\n if (!terms || terms.length === 0) {\n return null\n }\n const sorted = terms\n .map(resolveDuoTerm)\n .toSorted((a, b) => ORDER[a.category] - ORDER[b.category])\n\n return (\n <Box\n sx={{\n display: 'flex',\n flexWrap: 'wrap',\n gap: 0.75,\n minWidth: 0,\n maxWidth: '100%',\n }}\n >\n {sorted.map((t, i) => (\n <FacetValueChip\n key={i}\n label={t.name}\n icon={<TermIcon term={t} />}\n tooltipTitle={duoTooltipTitle(t)}\n />\n ))}\n </Box>\n )\n}\n\n/**\n * Builds a `renderFacetValue` function (for `QueryVisualizationWrapper`) that\n * returns the chip content for the given DUO column's enumeration facet values\n * — used by both the facet sidebar and the active-filter pills, which render it\n * through the shared `FacetValueChip`. Other columns fall through to text.\n *\n * Portals only need to declare the DUO column (via the card schema's\n * `dataUseModifiersColumnName`) rather than each defining their own handler.\n */\nexport function createDuoFacetValueRenderer(duoColumnName: string) {\n return (\n columnName: string,\n value: string,\n ): RenderedFacetValueChip | undefined => {\n if (columnName !== duoColumnName) {\n return undefined\n }\n const t = resolveDuoTerm(value)\n return {\n label: t.name,\n icon: <TermIcon term={t} />,\n tooltipTitle: duoTooltipTitle(t),\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,IAAM,IAA2C;CAC/C,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,UAAU;CACV,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;CACf,eAAe;AACjB,GAEM,KAAY,MAAwC;CACxD,IAAM,EAAE,YAAS;CAEjB,OAAO,kBADM,EAAU,EAAK,SAAS,GAC9B,CAAO,CAAA;AAChB,GAGM,IAAqC;CACzC,YAAY;CACZ,YAAY;CACZ,YAAY;CACZ,OAAO;AACT;AAIA,SAAS,EAAgB,GAAuB;CAC9C,IAAM,IAAM,EAAe,CAAC,GACtB,IAAU,GAAQ,EAAE,QAAQ,EAAE;CACpC,OACE,kBAAA,GAAA,EAAA,UAAA;EACE,kBAAC,UAAD,EAAA,UAAS,EAAE,KAAa,CAAA;EACvB,KACC,kBAAA,GAAA,EAAA,UAAA;GACE,kBAAC,MAAD,CAAK,CAAA;GACJ,EAAE;GACF,EAAE,QAAQ,EAAE,OAAO,QAAQ;GAC3B,IACC,kBAAC,GAAD;IAAM,MAAM;IAAK,QAAO;IAAS,KAAI;IAAW,OAAM;cACnD,EAAE;GACC,CAAA,IAEN,EAAE;EAEJ,EAAA,CAAA;EAEH,EAAE,cAAc,EAAE,eAAe,EAAE,QAClC,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,MAAD,CAAK,CAAA,GACJ,EAAE,UACH,EAAA,CAAA;CAEJ,EAAA,CAAA;AAEN;AAGA,SAAwB,EAAY,GAAyB;CAC3D,IAAM,EAAE,aAAU;CAQlB,OAPI,CAAC,KAAS,EAAM,WAAW,IACtB,OAOP,kBAAC,GAAD;EACE,IAAI;GACF,SAAS;GACT,UAAU;GACV,KAAK;GACL,UAAU;GACV,UAAU;EACZ;YAZW,EACZ,IAAI,CAAc,EAClB,UAAU,GAAG,MAAM,EAAM,EAAE,YAAY,EAAM,EAAE,SAY7C,EAAO,KAAK,GAAG,MACd,kBAAC,GAAD;GAEE,OAAO,EAAE;GACT,MAAM,kBAAC,GAAD,EAAU,MAAM,EAAI,CAAA;GAC1B,cAAc,EAAgB,CAAC;EAChC,GAJM,CAIN,CACF;CACE,CAAA;AAET;AAWA,SAAgB,EAA4B,GAAuB;CACjE,QACE,GACA,MACuC;EACvC,IAAI,MAAe,GACjB;EAEF,IAAM,IAAI,EAAe,CAAK;EAC9B,OAAO;GACL,OAAO,EAAE;GACT,MAAM,kBAAC,GAAD,EAAU,MAAM,EAAI,CAAA;GAC1B,cAAc,EAAgB,CAAC;EACjC;CACF;AACF"}
@@ -181,7 +181,7 @@ function r(e) {
181
181
  return [e];
182
182
  }
183
183
  }
184
- var i = (e) => e.toLowerCase().replace(/[^a-z0-9]+/g, " ").trim(), a = new Map(e.map((e) => [i(e.name), e])), o = new Map(e.map((e) => [e.code.toUpperCase(), e]));
184
+ var i = (e) => e.toLowerCase().replaceAll(/[^a-z0-9]+/g, " ").trim(), a = new Map(e.map((e) => [i(e.name), e])), o = new Map(e.map((e) => [e.code.toUpperCase(), e]));
185
185
  function s(e) {
186
186
  let t = e.trim();
187
187
  return o.get(t.toUpperCase()) || a.get(i(t)) || {
@@ -1 +1 @@
1
- {"version":3,"file":"duoTerms.js","names":[],"sources":["../../../../src/components/GenericCard/DuoTermTags/duoTerms.ts"],"sourcesContent":["// Data Use Ontology (DUO) vocabulary, plus Sage's DUO-Plus extensions.\n//\n// Source of truth for codes/labels: Sage-Bionetworks/governanceDUO\n// (`metadata structure.md`), which mirrors the GA4GH DUO term set and adds\n// Sage's \"DUOplus\" modifiers. Datasets are annotated with the ontology code\n// (e.g. DUO:0000042); the displayed tag is derived from that code here, so the\n// annotation and the display can evolve independently.\n\nexport type DuoCategory = 'permission' | 'commercial' | 'obligation' | 'limit'\n\nexport type DuoTerm = {\n /** Ontology code, e.g. \"DUO:0000042\". DUO-Plus terms use a \"DUOplus#\" code. */\n code: string\n /** Short abbreviation (shown in tooltips). */\n abbr: string\n /** Full human-readable name (the visible tag label). */\n name: string\n category: DuoCategory\n definition: string\n}\n\nconst TERMS: DuoTerm[] = [\n // --- Permitted use (what research the data may be used for) ---\n {\n code: 'DUO:0000042',\n abbr: 'GRU',\n name: 'General Research Use',\n category: 'permission',\n definition:\n 'Use is allowed for any research purpose, including methods development and population/ancestry research.',\n },\n {\n code: 'DUO:0000006',\n abbr: 'HMB',\n name: 'Health or Medical or Biomedical Research',\n category: 'permission',\n definition:\n 'Use is allowed for health, medical, or biomedical research purposes.',\n },\n {\n code: 'DUO:0000007',\n abbr: 'DS',\n name: 'Disease Specific Research',\n category: 'permission',\n definition:\n 'Use is allowed for research into the specified disease or condition.',\n },\n {\n code: 'DUO:0000011',\n abbr: 'POA',\n name: 'Population Origins or Ancestry Research Only',\n category: 'permission',\n definition:\n 'Use is limited to population origins or ancestry research only.',\n },\n {\n code: 'DUO:0000043',\n abbr: 'CC',\n name: 'Clinical Care Use',\n category: 'permission',\n definition: 'Use is allowed for clinical care purposes.',\n },\n {\n code: 'DUO:0000004',\n abbr: 'NRES',\n name: 'No Restriction',\n category: 'permission',\n definition: 'No restrictions on use; data is available under open access.',\n },\n\n // --- Commercial-use restriction ---\n {\n code: 'DUO:0000046',\n abbr: 'NCU',\n name: 'Non-Commercial Use Only',\n category: 'commercial',\n definition: 'Use is limited to non-commercial purposes.',\n },\n {\n code: 'DUO:0000018',\n abbr: 'NPUNCU',\n name: 'Not-for-Profit, Non-Commercial Use Only',\n category: 'commercial',\n definition:\n 'Use is limited to not-for-profit organizations for non-commercial purposes.',\n },\n {\n code: 'DUO:0000045',\n abbr: 'NPU',\n name: 'Not-for-Profit Organisation Use Only',\n category: 'commercial',\n definition: 'Use is limited to not-for-profit organizations.',\n },\n\n // --- Obligations (things the requester must do) ---\n {\n code: 'DUO:0000019',\n abbr: 'PUB',\n name: 'Publication Required',\n category: 'obligation',\n definition:\n 'Requestor agrees to make results of studies using the data available to the larger scientific community.',\n },\n {\n code: 'DUO:0000020',\n abbr: 'COL',\n name: 'Collaboration Required',\n category: 'obligation',\n definition:\n 'Requestor agrees to collaborate with the primary study investigator(s).',\n },\n {\n code: 'DUO:0000021',\n abbr: 'IRB',\n name: 'Ethics Approval Required',\n category: 'obligation',\n definition:\n 'Requestor must provide documentation of local IRB/ethics approval.',\n },\n {\n code: 'DUO:0000029',\n abbr: 'RTN',\n name: 'Return to Database or Resource',\n category: 'obligation',\n definition:\n 'Requestor must return derived/enriched data to the database or resource.',\n },\n {\n // Sage DUO-Plus extension (no GA4GH ontology id).\n code: 'DUOplus7',\n abbr: 'ATTR',\n name: 'Attribution Required',\n category: 'obligation',\n definition:\n 'Requestor must provide the specified attribution/acknowledgement statement when using the data. (Sage DUO-Plus extension.)',\n },\n\n // --- Use limits (narrow who / where / when / what kind of research) ---\n {\n code: 'DUO:0000026',\n abbr: 'US',\n name: 'User Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to specified, approved users.',\n },\n {\n code: 'DUO:0000027',\n abbr: 'PS',\n name: 'Project Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to a specified, approved project.',\n },\n {\n code: 'DUO:0000028',\n abbr: 'IS',\n name: 'Institution Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to specified, approved institutions.',\n },\n {\n code: 'DUO:0000022',\n abbr: 'GS',\n name: 'Geographical Restriction',\n category: 'limit',\n definition: 'Use is limited to within a specified geographic region.',\n },\n {\n code: 'DUO:0000025',\n abbr: 'TS',\n name: 'Time Limit on Use',\n category: 'limit',\n definition: 'Use is approved for a specified period of time.',\n },\n {\n code: 'DUO:0000024',\n abbr: 'MOR',\n name: 'Publication Moratorium',\n category: 'limit',\n definition: 'Requestor must not publish results until a specified date.',\n },\n {\n code: 'DUO:0000016',\n abbr: 'GSO',\n name: 'Genetic Studies Only',\n category: 'limit',\n definition: 'Use is limited to genetic studies only.',\n },\n {\n code: 'DUO:0000015',\n abbr: 'NMDS',\n name: 'No General Methods Research',\n category: 'limit',\n definition: 'Use for general methods development research is prohibited.',\n },\n {\n code: 'DUO:0000044',\n abbr: 'NPOA',\n name: 'Population Origins or Ancestry Research Prohibited',\n category: 'limit',\n definition:\n 'Use for population origins or ancestry research is prohibited.',\n },\n {\n code: 'DUO:0000012',\n abbr: 'RS',\n name: 'Research Specific Restrictions',\n category: 'limit',\n definition:\n 'Use is limited to the specific research type(s) described by the data provider.',\n },\n]\n\n/** All known terms, in canonical (category) order — for demos/legends. */\nexport const ALL_DUO_TERMS: readonly DuoTerm[] = TERMS\n\n/**\n * Link to the term's definition in Bioregistry (GA4GH DUO terms only;\n * DUO-Plus extensions have no registry entry).\n */\nexport function duoRegistryUrl(term: DuoTerm): string | undefined {\n return term.code.startsWith('DUO:')\n ? `https://bioregistry.io/${term.code.toLowerCase()}`\n : undefined\n}\n\n/**\n * Parse a `dataUseModifiers` cell into a list of values. The column is a\n * STRING_LIST, returned as a JSON-array string (e.g. `[\"General Research Use\"]`\n * or, once migrated, `[\"DUO:0000042\"]`).\n */\nexport function parseDuoModifiers(raw: string | null | undefined): string[] {\n if (!raw) {\n return []\n }\n try {\n const parsed: unknown = JSON.parse(raw)\n return Array.isArray(parsed) ? parsed.map(String) : [String(raw)]\n } catch {\n return [raw]\n }\n}\n\nconst normalize = (s: string) =>\n s\n .toLowerCase()\n .replace(/[^a-z0-9]+/g, ' ')\n .trim()\n\nconst BY_NAME = new Map(TERMS.map(t => [normalize(t.name), t]))\nconst BY_CODE = new Map(TERMS.map(t => [t.code.toUpperCase(), t]))\n\n/**\n * Resolve a raw `dataUseModifiers` value (an ontology code like DUO:0000042, a\n * DUOplus# code, or a term name) to a known DuoTerm. Unknown values fall back\n * to a neutral \"limit\" tag built from the raw text so nothing is dropped.\n */\nexport function resolveDuoTerm(raw: string): DuoTerm {\n const value = raw.trim()\n const byCode = BY_CODE.get(value.toUpperCase())\n if (byCode) {\n return byCode\n }\n const match = BY_NAME.get(normalize(value))\n if (match) {\n return match\n }\n // Unknown value: present the raw text as-is. Don't fabricate an abbreviation —\n // known terms carry a hard-coded abbr in TERMS; a guessed initialism would be\n // arbitrary and potentially wrong.\n return {\n code: '',\n abbr: '',\n name: value,\n category: 'limit',\n definition: value,\n }\n}\n"],"mappings":";AAqBA,IAAM,IAAmB;CAEvB;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EAEE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;AACF,GAGa,IAAoC;AAMjD,SAAgB,EAAe,GAAmC;CAChE,OAAO,EAAK,KAAK,WAAW,MAAM,IAC9B,0BAA0B,EAAK,KAAK,YAAY,MAChD,KAAA;AACN;AAOA,SAAgB,EAAkB,GAA0C;CAC1E,IAAI,CAAC,GACH,OAAO,CAAC;CAEV,IAAI;EACF,IAAM,IAAkB,KAAK,MAAM,CAAG;EACtC,OAAO,MAAM,QAAQ,CAAM,IAAI,EAAO,IAAI,MAAM,IAAI,CAAC,OAAO,CAAG,CAAC;CAClE,QAAQ;EACN,OAAO,CAAC,CAAG;CACb;AACF;AAEA,IAAM,KAAa,MACjB,EACG,YAAY,EACZ,QAAQ,eAAe,GAAG,EAC1B,KAAK,GAEJ,IAAU,IAAI,IAAI,EAAM,KAAI,MAAK,CAAC,EAAU,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,GACxD,IAAU,IAAI,IAAI,EAAM,KAAI,MAAK,CAAC,EAAE,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC;AAOjE,SAAgB,EAAe,GAAsB;CACnD,IAAM,IAAQ,EAAI,KAAK;CAYvB,OAXe,EAAQ,IAAI,EAAM,YAAY,CACzC,KAGU,EAAQ,IAAI,EAAU,CAAK,CACrC,KAMG;EACL,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;AACF"}
1
+ {"version":3,"file":"duoTerms.js","names":[],"sources":["../../../../src/components/GenericCard/DuoTermTags/duoTerms.ts"],"sourcesContent":["// Data Use Ontology (DUO) vocabulary, plus Sage's DUO-Plus extensions.\n//\n// Source of truth for codes/labels: Sage-Bionetworks/governanceDUO\n// (`metadata structure.md`), which mirrors the GA4GH DUO term set and adds\n// Sage's \"DUOplus\" modifiers. Datasets are annotated with the ontology code\n// (e.g. DUO:0000042); the displayed tag is derived from that code here, so the\n// annotation and the display can evolve independently.\n\nexport type DuoCategory = 'permission' | 'commercial' | 'obligation' | 'limit'\n\nexport type DuoTerm = {\n /** Ontology code, e.g. \"DUO:0000042\". DUO-Plus terms use a \"DUOplus#\" code. */\n code: string\n /** Short abbreviation (shown in tooltips). */\n abbr: string\n /** Full human-readable name (the visible tag label). */\n name: string\n category: DuoCategory\n definition: string\n}\n\nconst TERMS: DuoTerm[] = [\n // --- Permitted use (what research the data may be used for) ---\n {\n code: 'DUO:0000042',\n abbr: 'GRU',\n name: 'General Research Use',\n category: 'permission',\n definition:\n 'Use is allowed for any research purpose, including methods development and population/ancestry research.',\n },\n {\n code: 'DUO:0000006',\n abbr: 'HMB',\n name: 'Health or Medical or Biomedical Research',\n category: 'permission',\n definition:\n 'Use is allowed for health, medical, or biomedical research purposes.',\n },\n {\n code: 'DUO:0000007',\n abbr: 'DS',\n name: 'Disease Specific Research',\n category: 'permission',\n definition:\n 'Use is allowed for research into the specified disease or condition.',\n },\n {\n code: 'DUO:0000011',\n abbr: 'POA',\n name: 'Population Origins or Ancestry Research Only',\n category: 'permission',\n definition:\n 'Use is limited to population origins or ancestry research only.',\n },\n {\n code: 'DUO:0000043',\n abbr: 'CC',\n name: 'Clinical Care Use',\n category: 'permission',\n definition: 'Use is allowed for clinical care purposes.',\n },\n {\n code: 'DUO:0000004',\n abbr: 'NRES',\n name: 'No Restriction',\n category: 'permission',\n definition: 'No restrictions on use; data is available under open access.',\n },\n\n // --- Commercial-use restriction ---\n {\n code: 'DUO:0000046',\n abbr: 'NCU',\n name: 'Non-Commercial Use Only',\n category: 'commercial',\n definition: 'Use is limited to non-commercial purposes.',\n },\n {\n code: 'DUO:0000018',\n abbr: 'NPUNCU',\n name: 'Not-for-Profit, Non-Commercial Use Only',\n category: 'commercial',\n definition:\n 'Use is limited to not-for-profit organizations for non-commercial purposes.',\n },\n {\n code: 'DUO:0000045',\n abbr: 'NPU',\n name: 'Not-for-Profit Organisation Use Only',\n category: 'commercial',\n definition: 'Use is limited to not-for-profit organizations.',\n },\n\n // --- Obligations (things the requester must do) ---\n {\n code: 'DUO:0000019',\n abbr: 'PUB',\n name: 'Publication Required',\n category: 'obligation',\n definition:\n 'Requestor agrees to make results of studies using the data available to the larger scientific community.',\n },\n {\n code: 'DUO:0000020',\n abbr: 'COL',\n name: 'Collaboration Required',\n category: 'obligation',\n definition:\n 'Requestor agrees to collaborate with the primary study investigator(s).',\n },\n {\n code: 'DUO:0000021',\n abbr: 'IRB',\n name: 'Ethics Approval Required',\n category: 'obligation',\n definition:\n 'Requestor must provide documentation of local IRB/ethics approval.',\n },\n {\n code: 'DUO:0000029',\n abbr: 'RTN',\n name: 'Return to Database or Resource',\n category: 'obligation',\n definition:\n 'Requestor must return derived/enriched data to the database or resource.',\n },\n {\n // Sage DUO-Plus extension (no GA4GH ontology id).\n code: 'DUOplus7',\n abbr: 'ATTR',\n name: 'Attribution Required',\n category: 'obligation',\n definition:\n 'Requestor must provide the specified attribution/acknowledgement statement when using the data. (Sage DUO-Plus extension.)',\n },\n\n // --- Use limits (narrow who / where / when / what kind of research) ---\n {\n code: 'DUO:0000026',\n abbr: 'US',\n name: 'User Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to specified, approved users.',\n },\n {\n code: 'DUO:0000027',\n abbr: 'PS',\n name: 'Project Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to a specified, approved project.',\n },\n {\n code: 'DUO:0000028',\n abbr: 'IS',\n name: 'Institution Specific Restriction',\n category: 'limit',\n definition: 'Use is limited to specified, approved institutions.',\n },\n {\n code: 'DUO:0000022',\n abbr: 'GS',\n name: 'Geographical Restriction',\n category: 'limit',\n definition: 'Use is limited to within a specified geographic region.',\n },\n {\n code: 'DUO:0000025',\n abbr: 'TS',\n name: 'Time Limit on Use',\n category: 'limit',\n definition: 'Use is approved for a specified period of time.',\n },\n {\n code: 'DUO:0000024',\n abbr: 'MOR',\n name: 'Publication Moratorium',\n category: 'limit',\n definition: 'Requestor must not publish results until a specified date.',\n },\n {\n code: 'DUO:0000016',\n abbr: 'GSO',\n name: 'Genetic Studies Only',\n category: 'limit',\n definition: 'Use is limited to genetic studies only.',\n },\n {\n code: 'DUO:0000015',\n abbr: 'NMDS',\n name: 'No General Methods Research',\n category: 'limit',\n definition: 'Use for general methods development research is prohibited.',\n },\n {\n code: 'DUO:0000044',\n abbr: 'NPOA',\n name: 'Population Origins or Ancestry Research Prohibited',\n category: 'limit',\n definition:\n 'Use for population origins or ancestry research is prohibited.',\n },\n {\n code: 'DUO:0000012',\n abbr: 'RS',\n name: 'Research Specific Restrictions',\n category: 'limit',\n definition:\n 'Use is limited to the specific research type(s) described by the data provider.',\n },\n]\n\n/** All known terms, in canonical (category) order — for demos/legends. */\nexport const ALL_DUO_TERMS: readonly DuoTerm[] = TERMS\n\n/**\n * Link to the term's definition in Bioregistry (GA4GH DUO terms only;\n * DUO-Plus extensions have no registry entry).\n */\nexport function duoRegistryUrl(term: DuoTerm): string | undefined {\n return term.code.startsWith('DUO:')\n ? `https://bioregistry.io/${term.code.toLowerCase()}`\n : undefined\n}\n\n/**\n * Parse a `dataUseModifiers` cell into a list of values. The column is a\n * STRING_LIST, returned as a JSON-array string (e.g. `[\"General Research Use\"]`\n * or, once migrated, `[\"DUO:0000042\"]`).\n */\nexport function parseDuoModifiers(raw: string | null | undefined): string[] {\n if (!raw) {\n return []\n }\n try {\n const parsed: unknown = JSON.parse(raw)\n return Array.isArray(parsed) ? parsed.map(String) : [String(raw)]\n } catch {\n return [raw]\n }\n}\n\nconst normalize = (s: string) =>\n s\n .toLowerCase()\n .replaceAll(/[^a-z0-9]+/g, ' ')\n .trim()\n\nconst BY_NAME = new Map(TERMS.map(t => [normalize(t.name), t]))\nconst BY_CODE = new Map(TERMS.map(t => [t.code.toUpperCase(), t]))\n\n/**\n * Resolve a raw `dataUseModifiers` value (an ontology code like DUO:0000042, a\n * DUOplus# code, or a term name) to a known DuoTerm. Unknown values fall back\n * to a neutral \"limit\" tag built from the raw text so nothing is dropped.\n */\nexport function resolveDuoTerm(raw: string): DuoTerm {\n const value = raw.trim()\n const byCode = BY_CODE.get(value.toUpperCase())\n if (byCode) {\n return byCode\n }\n const match = BY_NAME.get(normalize(value))\n if (match) {\n return match\n }\n // Unknown value: present the raw text as-is. Don't fabricate an abbreviation —\n // known terms carry a hard-coded abbr in TERMS; a guessed initialism would be\n // arbitrary and potentially wrong.\n return {\n code: '',\n abbr: '',\n name: value,\n category: 'limit',\n definition: value,\n }\n}\n"],"mappings":";AAqBA,IAAM,IAAmB;CAEvB;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EAEE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CAGA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;CACA;EACE,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YACE;CACJ;AACF,GAGa,IAAoC;AAMjD,SAAgB,EAAe,GAAmC;CAChE,OAAO,EAAK,KAAK,WAAW,MAAM,IAC9B,0BAA0B,EAAK,KAAK,YAAY,MAChD,KAAA;AACN;AAOA,SAAgB,EAAkB,GAA0C;CAC1E,IAAI,CAAC,GACH,OAAO,CAAC;CAEV,IAAI;EACF,IAAM,IAAkB,KAAK,MAAM,CAAG;EACtC,OAAO,MAAM,QAAQ,CAAM,IAAI,EAAO,IAAI,MAAM,IAAI,CAAC,OAAO,CAAG,CAAC;CAClE,QAAQ;EACN,OAAO,CAAC,CAAG;CACb;AACF;AAEA,IAAM,KAAa,MACjB,EACG,YAAY,EACZ,WAAW,eAAe,GAAG,EAC7B,KAAK,GAEJ,IAAU,IAAI,IAAI,EAAM,KAAI,MAAK,CAAC,EAAU,EAAE,IAAI,GAAG,CAAC,CAAC,CAAC,GACxD,IAAU,IAAI,IAAI,EAAM,KAAI,MAAK,CAAC,EAAE,KAAK,YAAY,GAAG,CAAC,CAAC,CAAC;AAOjE,SAAgB,EAAe,GAAsB;CACnD,IAAM,IAAQ,EAAI,KAAK;CAYvB,OAXe,EAAQ,IAAI,EAAM,YAAY,CACzC,KAGU,EAAQ,IAAI,EAAU,CAAK,CACrC,KAMG;EACL,MAAM;EACN,MAAM;EACN,MAAM;EACN,UAAU;EACV,YAAY;CACd;AACF"}
@@ -4,28 +4,28 @@ import { calculateFriendlyFileSize as n } from "../../utils/functions/calculateF
4
4
  import { isDatasetCollection as r, isTableEntity as i } from "../../utils/functions/EntityTypeUtils.js";
5
5
  import { extractMarkdownLinkHref as a, parseSynId as o } from "../../utils/functions/RegularExpressions.js";
6
6
  import { getColumnIndex as ee } from "../../utils/functions/SqlFunctions.js";
7
- import { useGetEntity as te } from "../../synapse-queries/entity/useEntity.js";
7
+ import { useQueryVisualizationContext as te } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
8
+ import { useGetEntity as ne } from "../../synapse-queries/entity/useEntity.js";
8
9
  import "../../synapse-queries/index.js";
9
10
  import { TargetEnum as s } from "../../utils/html/TargetEnum.js";
10
- import { getFileHandleAssociation as ne, getLinkParams as c, getValueOrMultiValue as re } from "./CardUtils.js";
11
- import { CardActionButtonStyleContext as ie } from "./CardActionButtonStyleContext.js";
12
- import ae from "./GenericCardActionButton.js";
13
- import oe from "./CroissantButton/CroissantButton.js";
14
- import { GenericCardIcon as se } from "./GenericCardIcon.js";
15
- import ce from "./PortalDOI/PortalDOI.js";
16
- import { getCandidateDoiId as le, useShowDoiCardLabel as ue } from "./PortalDOI/PortalDOIUtils.js";
17
- import { mapRowToRecord as de } from "../SynapseTable/SynapseTableUtils.js";
18
- import fe from "../CitationPopover/index.js";
19
- import { DATASET_HOSTING_CONFIG as pe, normalizeHosting as me } from "../DatasetHosting/DatasetHosting.js";
20
- import { DatasetDownloadButton as he } from "../DatasetHosting/DatasetDownloadButton.js";
21
- import { DatasetHostingAdornment as ge } from "../DatasetHosting/DatasetHostingAdornment.js";
22
- import { EntityDownloadConfirmation as _e } from "../EntityDownloadConfirmation/EntityDownloadConfirmation.js";
11
+ import { getFileHandleAssociation as re, getLinkParams as c, getValueOrMultiValue as ie } from "./CardUtils.js";
12
+ import { CardActionButtonStyleContext as ae } from "./CardActionButtonStyleContext.js";
13
+ import oe from "./GenericCardActionButton.js";
14
+ import se from "./CroissantButton/CroissantButton.js";
15
+ import { GenericCardIcon as ce } from "./GenericCardIcon.js";
16
+ import le from "./PortalDOI/PortalDOI.js";
17
+ import { getCandidateDoiId as ue, useShowDoiCardLabel as de } from "./PortalDOI/PortalDOIUtils.js";
18
+ import { mapRowToRecord as fe } from "../SynapseTable/SynapseTableUtils.js";
19
+ import pe from "../CitationPopover/index.js";
20
+ import { DATASET_HOSTING_CONFIG as me, normalizeHosting as he } from "../DatasetHosting/DatasetHosting.js";
21
+ import { DatasetDownloadButton as ge } from "../DatasetHosting/DatasetDownloadButton.js";
22
+ import { DatasetHostingAdornment as _e } from "../DatasetHosting/DatasetHostingAdornment.js";
23
+ import { EntityDownloadConfirmation as ve } from "../EntityDownloadConfirmation/EntityDownloadConfirmation.js";
23
24
  import "../EntityDownloadConfirmation/index.js";
24
- import { useQueryContext as ve } from "../QueryContext/QueryContext.js";
25
- import ye from "../IconList.js";
26
- import { parseDuoModifiers as be } from "./DuoTermTags/duoTerms.js";
27
- import xe from "./DuoTermTags/DuoTermTags.js";
28
- import { useQueryVisualizationContext as Se } from "../QueryVisualizationWrapper/QueryVisualizationContext.js";
25
+ import { useQueryContext as ye } from "../QueryContext/QueryContext.js";
26
+ import be from "../IconList.js";
27
+ import { parseDuoModifiers as xe } from "./DuoTermTags/duoTerms.js";
28
+ import Se from "./DuoTermTags/DuoTermTags.js";
29
29
  import "../QueryVisualizationWrapper/index.js";
30
30
  import Ce from "../ShareThisPage/ShareThisPage.js";
31
31
  import { GenericCard as we } from "./GenericCard.js";
@@ -52,8 +52,8 @@ function Fe(e) {
52
52
  ] });
53
53
  }
54
54
  function h(t) {
55
- let [s, h] = De(!1), [g, Ie] = De(!1), { entityId: Le, versionNumber: Re } = ve(), { getColumnDisplayName: _ } = Se(), { ref: ze, inView: Be } = Pe(), { data: v } = te(Le, Re), { schema: y, data: b, rowId: x, versionNumber: Ve, genericCardSchema: S, secondaryLabelLimit: He, sharePageLinkButtonProps: Ue, selectColumns: C, columnModels: w, iconOptions: We, useTypeColumnForIcon: T = !1, isHeader: E = !1, sustainabilityScorecard: Ge, headerCardVariant: Ke, titleLinkConfig: D, ctaLinkConfig: O, ctaLinkPosition: qe, labelLinkConfig: Je, descriptionConfig: Ye, columnIconOptions: k, CardTypeAdornment: A, charCountCutoff: Xe, actionButtonStyle: Ze = "button" } = t, { link: Qe = "", type: j, includeCitation: $e, includeShareButton: et, defaultCitationFormat: tt, citationBoilerplateText: nt, downloadCartSynId: M, portalDoiConfiguration: N } = S, P = b[y[S.title]], F = S.subTitle && b[y[S.subTitle]];
56
- F = S.subTitle && re({
55
+ let [s, h] = De(!1), [g, Ie] = De(!1), { entityId: Le, versionNumber: Re } = ye(), { getColumnDisplayName: _ } = te(), { ref: ze, inView: Be } = Pe(), { data: v } = ne(Le, Re), { schema: y, data: b, rowId: x, versionNumber: Ve, genericCardSchema: S, secondaryLabelLimit: He, sharePageLinkButtonProps: Ue, selectColumns: C, columnModels: w, iconOptions: We, useTypeColumnForIcon: T = !1, isHeader: E = !1, sustainabilityScorecard: Ge, headerCardVariant: Ke, titleLinkConfig: D, ctaLinkConfig: O, ctaLinkPosition: qe, labelLinkConfig: Je, descriptionConfig: Ye, columnIconOptions: k, CardTypeAdornment: A, charCountCutoff: Xe, actionButtonStyle: Ze = "button" } = t, { link: Qe = "", type: j, includeCitation: $e, includeShareButton: et, defaultCitationFormat: tt, citationBoilerplateText: nt, downloadCartSynId: M, portalDoiConfiguration: N } = S, P = b[y[S.title]], F = S.subTitle && b[y[S.subTitle]];
56
+ F = S.subTitle && ie({
57
57
  value: F,
58
58
  columnName: S.subTitle,
59
59
  selectColumns: C,
@@ -66,8 +66,8 @@ function h(t) {
66
66
  }, [y, b]), B = u(() => {
67
67
  let e = S.dataUseModifiersColumnName;
68
68
  if (!e) return;
69
- let t = be(b[y[e]]);
70
- if (t.length !== 0) return /* @__PURE__ */ p(xe, { terms: t });
69
+ let t = xe(b[y[e]]);
70
+ if (t.length !== 0) return /* @__PURE__ */ p(Se, { terms: t });
71
71
  }, [
72
72
  S,
73
73
  b,
@@ -127,10 +127,10 @@ function h(t) {
127
127
  let e = o(z(M) ?? "");
128
128
  U = e?.targetId, W = e?.targetVersionNumber;
129
129
  }
130
- let G = S.hostingConfig, K = G ? z(G.hostingColumn) : void 0, q = G ? K && G.hostingValueMap?.[K] || me(K) : void 0, ut = G?.repositoryColumn ? z(G.repositoryColumn) : void 0, J = G?.externalUrlColumn ? z(G.externalUrlColumn) : void 0, dt = J ? a(J) : void 0, Y = q ? pe[q].downloadable : !0, X = le({
131
- data: u(() => de(b, y), [b, y]),
130
+ let G = S.hostingConfig, K = G ? z(G.hostingColumn) : void 0, q = G ? K && G.hostingValueMap?.[K] || he(K) : void 0, ut = G?.repositoryColumn ? z(G.repositoryColumn) : void 0, J = G?.externalUrlColumn ? z(G.externalUrlColumn) : void 0, dt = J ? a(J) : void 0, Y = q ? me[q].downloadable : !0, X = ue({
131
+ data: u(() => fe(b, y), [b, y]),
132
132
  portalDoiConfiguration: N
133
- }), ft = ue({
133
+ }), ft = de({
134
134
  portalId: N?.portalId,
135
135
  resourceId: X
136
136
  }), Z = [], { secondaryLabels: pt = [] } = S, mt = S.customSecondaryLabelConfig;
@@ -140,7 +140,7 @@ function h(t) {
140
140
  value: B
141
141
  }), ft && N && X && Be && Z.push({
142
142
  columnDisplayName: "DOI",
143
- value: /* @__PURE__ */ p(ce, {
143
+ value: /* @__PURE__ */ p(le, {
144
144
  portalId: N.portalId,
145
145
  resourceId: X
146
146
  })
@@ -188,7 +188,7 @@ function h(t) {
188
188
  });
189
189
  }
190
190
  }
191
- let Q = ne(v, L || R, b[y.id]), gt = _(S.description || ""), _t = ee("doi", C, w), vt = _t === void 0 ? void 0 : b[_t], yt = (O ? Array.isArray(O) ? O : [O] : []).map((e) => {
191
+ let Q = re(v, L || R, b[y.id]), gt = _(S.description || ""), _t = ee("doi", C, w), vt = _t === void 0 ? void 0 : b[_t], yt = (O ? Array.isArray(O) ? O : [O] : []).map((e) => {
192
192
  let t = b[y[e.link]] || "";
193
193
  if (!t) return null;
194
194
  let { href: n, target: r } = c(t, void 0, b, y, x);
@@ -205,7 +205,7 @@ function h(t) {
205
205
  target: r
206
206
  };
207
207
  }).filter(Boolean), bt = /* @__PURE__ */ p(f, {});
208
- V != null && H != null && (bt = /* @__PURE__ */ p(oe, {
208
+ V != null && H != null && (bt = /* @__PURE__ */ p(se, {
209
209
  datasetId: V,
210
210
  datasetVersionNumber: H
211
211
  }));
@@ -213,14 +213,14 @@ function h(t) {
213
213
  A ? $ = /* @__PURE__ */ p(A, {
214
214
  schema: y,
215
215
  data: b
216
- }) : G && K?.trim() && q && ($ = /* @__PURE__ */ p(ge, {
216
+ }) : G && K?.trim() && q && ($ = /* @__PURE__ */ p(_e, {
217
217
  hostingType: q,
218
218
  isHeader: E
219
219
  }));
220
220
  let xt = !0;
221
221
  return E && !L && !it && (xt = !1), /* @__PURE__ */ p(we, {
222
222
  ref: ze,
223
- icon: xt ? /* @__PURE__ */ p(se, {
223
+ icon: xt ? /* @__PURE__ */ p(ce, {
224
224
  type: T ? b[y.type] : S.type,
225
225
  useTypeForIcon: T,
226
226
  thumbnailRequiresPadding: S.thumbnailRequiresPadding,
@@ -256,7 +256,7 @@ function h(t) {
256
256
  useStylesForDisplayedImage: !!L,
257
257
  cardTopContent: /* @__PURE__ */ p(f, { children: U && /* @__PURE__ */ p(ke, {
258
258
  in: s,
259
- children: /* @__PURE__ */ p(_e, {
259
+ children: /* @__PURE__ */ p(ve, {
260
260
  entityId: U,
261
261
  versionNumber: W,
262
262
  handleClose: () => h(!1),
@@ -267,7 +267,7 @@ function h(t) {
267
267
  }) }),
268
268
  renderedIconList: k?.columns?.dataType && I?.length && /* @__PURE__ */ p("div", {
269
269
  style: { marginTop: "20px" },
270
- children: /* @__PURE__ */ p(ye, {
270
+ children: /* @__PURE__ */ p(be, {
271
271
  iconConfigs: k.columns.dataType,
272
272
  iconNames: JSON.parse(I),
273
273
  commonIconProps: { sx: { fontSize: "40px" } },
@@ -275,7 +275,7 @@ function h(t) {
275
275
  useTheme: !0
276
276
  })
277
277
  }),
278
- cardTopButtons: /* @__PURE__ */ p(ie.Provider, {
278
+ cardTopButtons: /* @__PURE__ */ p(ae.Provider, {
279
279
  value: Ze,
280
280
  children: /* @__PURE__ */ m(Oe, {
281
281
  sx: {
@@ -285,7 +285,7 @@ function h(t) {
285
285
  },
286
286
  children: [
287
287
  bt,
288
- G && (U || !Y) && /* @__PURE__ */ p(he, {
288
+ G && (U || !Y) && /* @__PURE__ */ p(ge, {
289
289
  entityId: U,
290
290
  name: P,
291
291
  hosting: q,
@@ -294,14 +294,14 @@ function h(t) {
294
294
  onDownloadClick: () => h((e) => !e),
295
295
  isDownloading: g
296
296
  }),
297
- !G && U && /* @__PURE__ */ p(ae, {
297
+ !G && U && /* @__PURE__ */ p(oe, {
298
298
  onClick: () => h((e) => !e),
299
299
  variant: "outlined",
300
300
  startIcon: /* @__PURE__ */ p(Ne, { sx: { height: "12px" } }),
301
301
  loading: g,
302
302
  children: "Download"
303
303
  }),
304
- $e && vt && /* @__PURE__ */ p(fe, {
304
+ $e && vt && /* @__PURE__ */ p(pe, {
305
305
  title: P,
306
306
  doi: vt,
307
307
  boilerplateText: nt,
@@ -25,7 +25,7 @@ var u = 1200, d = ({ entityId: d, svgComponentMap: f }) => {
25
25
  t.some((e) => e === null) && console.warn("Row has null value(s) when no nulls expected");
26
26
  let n = g > -1 ? t[g] : void 0, r;
27
27
  _ > -1 && t[_] !== null ? r = t[_] : n && (r = `SELECT * FROM ${n}`);
28
- let i = t[v], a = t[y], o = t[b], s = t[x], c = s ? f?.[s.toLowerCase().replace(/\s+/g, "_")] : void 0;
28
+ let i = t[v], a = t[y], o = t[b], s = t[x], c = s ? f?.[s.toLowerCase().replaceAll(/\s+/g, "_")] : void 0;
29
29
  return {
30
30
  countSql: r,
31
31
  title: i,
@@ -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":";;;;;;;;;;;;;;AAmCA,IAAM,IAAiC,MAEjC,KAAW,EACf,aACA,yBACmC;CACnC,IAAM,IAAc,EAAe,CAA8B,GAa3D,EAAE,MAAM,MACZ,EAAwB;EAZxB,cAAc;EACd;EACA,UACE;EAEF,OAAO,EACL,KAAK;uBACY,EAAS;oCAE5B;CAGwB,CAAkB,GAEtC,EAAE,aAAU,EAAe,GAAU,CAAiB,GAEtD,IAAqB,EAAA,WAEzB,CACF,GACM,IAAsB,EAAA,YAE1B,CACF,GAEM,IAAmB,EAAA,SAEvB,CACF,GACM,IAAqB,EAAA,WAEzB,CACF,GACM,IAAkB,EAAA,QAAoC,CAAiB,GAEvE,IAAqB,EAAA,WAEzB,CACF,GAEM,IACJ,GAAmB,YAAa,aAAa,KAAK,KAAI,MAAM;EAC1D,IAAM,IAAS,EAAG;EAClB,AAAI,EAAO,MAAK,MAAS,MAAU,IAAI,KACrC,QAAQ,KAAK,8CAA8C;EAE7D,IAAM,IACJ,IAAqB,KAAK,EAAO,KAAsB,KAAA,GACrD;EACJ,AAAI,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,YAAY,EAAE,QAAQ,QAAQ,GAAG,KAC3D,KAAA;EAEJ,OAAO;GACL;GACA;GACA;GACA;GACA;EACF;CACF,CAAC,KAAK,CAAC,GAEH,IAAmB,IAAc,IAAiB;CAExD,OACE,kBAAC,GAAD,EAAA,UAAA,CACG,KAAS,kBAAC,GAAD,EAAoB,SAAQ,CAAA,GACtC,kBAAC,OAAD;EAAK,WAAW;YACd,kBAAC,GAAD;GACE,IAAI;IACF,SAAS;IACT,KAAK,IAAc,SAAS;IAC5B,eAAe,IAAc,QAAQ;IACrC,gBAAgB;GAClB;aAEC,EAAe,KAAK,GAAK,MACxB,kBAAC,GAAD,EAA8B,GAAI,EAAM,GAAjB,CAAiB,CACzC;EACE,CAAA;CACF,CAAA,CACF,EAAA,CAAA;AAET"}
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().replaceAll(/\\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":";;;;;;;;;;;;;;AAmCA,IAAM,IAAiC,MAEjC,KAAW,EACf,aACA,yBACmC;CACnC,IAAM,IAAc,EAAe,CAA8B,GAa3D,EAAE,MAAM,MACZ,EAAwB;EAZxB,cAAc;EACd;EACA,UACE;EAEF,OAAO,EACL,KAAK;uBACY,EAAS;oCAE5B;CAGwB,CAAkB,GAEtC,EAAE,aAAU,EAAe,GAAU,CAAiB,GAEtD,IAAqB,EAAA,WAEzB,CACF,GACM,IAAsB,EAAA,YAE1B,CACF,GAEM,IAAmB,EAAA,SAEvB,CACF,GACM,IAAqB,EAAA,WAEzB,CACF,GACM,IAAkB,EAAA,QAAoC,CAAiB,GAEvE,IAAqB,EAAA,WAEzB,CACF,GAEM,IACJ,GAAmB,YAAa,aAAa,KAAK,KAAI,MAAM;EAC1D,IAAM,IAAS,EAAG;EAClB,AAAI,EAAO,MAAK,MAAS,MAAU,IAAI,KACrC,QAAQ,KAAK,8CAA8C;EAE7D,IAAM,IACJ,IAAqB,KAAK,EAAO,KAAsB,KAAA,GACrD;EACJ,AAAI,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,YAAY,EAAE,WAAW,QAAQ,GAAG,KAC9D,KAAA;EAEJ,OAAO;GACL;GACA;GACA;GACA;GACA;EACF;CACF,CAAC,KAAK,CAAC,GAEH,IAAmB,IAAc,IAAiB;CAExD,OACE,kBAAC,GAAD,EAAA,UAAA,CACG,KAAS,kBAAC,GAAD,EAAoB,SAAQ,CAAA,GACtC,kBAAC,OAAD;EAAK,WAAW;YACd,kBAAC,GAAD;GACE,IAAI;IACF,SAAS;IACT,KAAK,IAAc,SAAS;IAC5B,eAAe,IAAc,QAAQ;IACrC,gBAAgB;GAClB;aAEC,EAAe,KAAK,GAAK,MACxB,kBAAC,GAAD,EAA8B,GAAI,EAAM,GAAjB,CAAiB,CACzC;EACE,CAAA;CACF,CAAA,CACF,EAAA,CAAA;AAET"}
@@ -3,6 +3,7 @@ export type HexRowData = {
3
3
  imageFileHandleId: string | null;
4
4
  description: string | null;
5
5
  entityId: string;
6
+ website: string | null;
6
7
  };
7
8
  type HexGridProps = {
8
9
  sql: string;
@@ -10,8 +11,9 @@ type HexGridProps = {
10
11
  imageColName: string;
11
12
  descriptionColName: string;
12
13
  isVisibleColName?: string;
14
+ websiteColName?: string;
13
15
  onRowClick?: (rowData: HexRowData) => void;
14
16
  };
15
- declare function HexGrid({ sql, titleColName, imageColName, descriptionColName, isVisibleColName, onRowClick, }: HexGridProps): import("react/jsx-runtime").JSX.Element;
17
+ declare function HexGrid({ sql, titleColName, imageColName, descriptionColName, isVisibleColName, websiteColName, onRowClick, }: HexGridProps): import("react/jsx-runtime").JSX.Element;
16
18
  export default HexGrid;
17
19
  //# sourceMappingURL=HexGrid.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"HexGrid.d.ts","sourceRoot":"","sources":["../../../src/components/HexGrid/HexGrid.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,iBAAS,OAAO,CAAC,EACf,GAAG,EACH,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,UAAU,GACX,EAAE,YAAY,2CAiEd;AAED,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"HexGrid.d.ts","sourceRoot":"","sources":["../../../src/components/HexGrid/HexGrid.tsx"],"names":[],"mappings":"AAaA,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAA;IACb,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;CACvB,CAAA;AAED,KAAK,YAAY,GAAG;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;IACpB,kBAAkB,EAAE,MAAM,CAAA;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,iBAAS,OAAO,CAAC,EACf,GAAG,EACH,YAAY,EACZ,YAAY,EACZ,kBAAkB,EAClB,gBAAgB,EAChB,cAAc,EACd,UAAU,GACX,EAAE,YAAY,2CAoEd;AAED,eAAe,OAAO,CAAA"}
@@ -9,38 +9,39 @@ import { ButtonBase as a, Typography as o } from "@mui/material";
9
9
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
10
10
  import { FileHandleAssociateType as l } from "@sage-bionetworks/synapse-types";
11
11
  //#region src/components/HexGrid/HexGrid.tsx
12
- function u({ sql: u, titleColName: d, imageColName: f, descriptionColName: p, isVisibleColName: m, onRowClick: h }) {
13
- let g = e(u), { data: _ } = n({
14
- entityId: g,
12
+ function u({ sql: u, titleColName: d, imageColName: f, descriptionColName: p, isVisibleColName: m, websiteColName: h, onRowClick: g }) {
13
+ let _ = e(u), { data: v } = n({
14
+ entityId: _,
15
15
  query: { sql: u },
16
16
  partMask: 5,
17
17
  concreteType: "org.sagebionetworks.repo.model.table.QueryBundleRequest"
18
- }), v = _?.queryResult?.queryResults.rows ?? [], y = t(d, _), b = t(f, _), x = t(p, _), S = t(m, _), C = m ? v.filter((e) => e.values[S] === "true") : v;
18
+ }), y = v?.queryResult?.queryResults.rows ?? [], b = t(d, v), x = t(f, v), S = t(p, v), C = t(m, v), w = t(h, v), T = m ? y.filter((e) => e.values[C] === "true") : y;
19
19
  return /* @__PURE__ */ s("div", {
20
20
  className: i.hexSlat,
21
21
  children: /* @__PURE__ */ s("div", {
22
22
  className: i.gridWrapper,
23
23
  children: /* @__PURE__ */ s("ul", {
24
24
  className: i.hexGrid,
25
- children: C.map((e) => /* @__PURE__ */ s(a, {
25
+ children: T.map((e) => /* @__PURE__ */ s(a, {
26
26
  component: "li",
27
27
  className: i.hex,
28
- onClick: () => h?.({
29
- title: e.values[y] ?? "",
30
- imageFileHandleId: e.values[b] ?? null,
31
- description: e.values[x] ?? null,
32
- entityId: g
28
+ onClick: () => g?.({
29
+ title: e.values[b] ?? "",
30
+ imageFileHandleId: e.values[x] ?? null,
31
+ description: e.values[S] ?? null,
32
+ website: e.values[w] ?? null,
33
+ entityId: _
33
34
  }),
34
35
  children: /* @__PURE__ */ c("div", {
35
36
  className: i.hexIn,
36
37
  children: [/* @__PURE__ */ s(o, {
37
38
  variant: "headline3",
38
39
  className: i.hexTitle,
39
- children: e.values[y]
40
+ children: e.values[b]
40
41
  }), /* @__PURE__ */ s(r, {
41
42
  fileHandleAssociation: {
42
- fileHandleId: e.values[b] ?? "",
43
- associateObjectId: g,
43
+ fileHandleId: e.values[x] ?? "",
44
+ associateObjectId: _,
44
45
  associateObjectType: l.TableEntity
45
46
  },
46
47
  imgProps: { className: i.hexIcon }
@@ -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 isVisibleColName?: string\n onRowClick?: (rowData: HexRowData) => void\n}\n\nfunction HexGrid({\n sql,\n titleColName,\n imageColName,\n descriptionColName,\n isVisibleColName,\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 const toShowColIndex = getFieldIndex(isVisibleColName, queryResultBundle)\n\n const filteredDataRows = isVisibleColName\n ? dataRows.filter(row => row.values[toShowColIndex] === 'true')\n : dataRows\n\n return (\n <div className={styles.hexSlat}>\n <div className={styles.gridWrapper}>\n <ul className={styles.hexGrid}>\n {filteredDataRows.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":";;;;;;;;;;;AA6BA,SAAS,EAAQ,EACf,QACA,iBACA,iBACA,uBACA,qBACA,iBACe;CACf,IAAM,IAAW,EAA8B,CAAG,GAU5C,EAAE,MAAM,MACZ,EAA4B;EAT5B;EACA,OAAO,EAAE,OAAI;EACb,UACE;EAEF,cAAc;CAIc,CAAkB,GAE1C,IAAW,GAAmB,aAAa,aAAa,QAAQ,CAAC,GAEjE,IAAgB,EAAc,GAAc,CAAiB,GAE7D,IAAgB,EAAc,GAAc,CAAiB,GAE7D,IAAe,EAAc,GAAoB,CAAiB,GAElE,IAAiB,EAAc,GAAkB,CAAiB,GAElE,IAAmB,IACrB,EAAS,QAAO,MAAO,EAAI,OAAO,OAAoB,MAAM,IAC5D;CAEJ,OACE,kBAAC,OAAD;EAAK,WAAW,EAAO;YACrB,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,MAAD;IAAI,WAAW,EAAO;cACnB,EAAiB,KAAI,MACpB,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;KACF,CAAC;eAGH,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB,CACE,kBAAC,GAAD;OAAY,SAAQ;OAAY,WAAW,EAAO;iBAC/C,EAAI,OAAO;MACF,CAAA,GACZ,kBAAC,GAAD;OACE,uBAAuB;QACrB,cAAc,EAAI,OAAO,MAAkB;QAC3C,mBAAmB;QACnB,qBAAqB,EAAwB;OAC/C;OACA,UAAU,EAAE,WAAW,EAAO,QAAQ;MACvC,CAAA,CACE;;IACK,GAxBL,EAAI,KAwBC,CACb;GACC,CAAA;EACD,CAAA;CACF,CAAA;AAET"}
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 website: string | null\n}\n\ntype HexGridProps = {\n sql: string\n titleColName: string\n imageColName: string\n descriptionColName: string\n isVisibleColName?: string\n websiteColName?: string\n onRowClick?: (rowData: HexRowData) => void\n}\n\nfunction HexGrid({\n sql,\n titleColName,\n imageColName,\n descriptionColName,\n isVisibleColName,\n websiteColName,\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 const toShowColIndex = getFieldIndex(isVisibleColName, queryResultBundle)\n\n const websiteColIndex = getFieldIndex(websiteColName, queryResultBundle)\n\n const filteredDataRows = isVisibleColName\n ? dataRows.filter(row => row.values[toShowColIndex] === 'true')\n : dataRows\n\n return (\n <div className={styles.hexSlat}>\n <div className={styles.gridWrapper}>\n <ul className={styles.hexGrid}>\n {filteredDataRows.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 website: row.values[websiteColIndex] ?? 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":";;;;;;;;;;;AA+BA,SAAS,EAAQ,EACf,QACA,iBACA,iBACA,uBACA,qBACA,mBACA,iBACe;CACf,IAAM,IAAW,EAA8B,CAAG,GAU5C,EAAE,MAAM,MACZ,EAA4B;EAT5B;EACA,OAAO,EAAE,OAAI;EACb,UACE;EAEF,cAAc;CAIc,CAAkB,GAE1C,IAAW,GAAmB,aAAa,aAAa,QAAQ,CAAC,GAEjE,IAAgB,EAAc,GAAc,CAAiB,GAE7D,IAAgB,EAAc,GAAc,CAAiB,GAE7D,IAAe,EAAc,GAAoB,CAAiB,GAElE,IAAiB,EAAc,GAAkB,CAAiB,GAElE,IAAkB,EAAc,GAAgB,CAAiB,GAEjE,IAAmB,IACrB,EAAS,QAAO,MAAO,EAAI,OAAO,OAAoB,MAAM,IAC5D;CAEJ,OACE,kBAAC,OAAD;EAAK,WAAW,EAAO;YACrB,kBAAC,OAAD;GAAK,WAAW,EAAO;aACrB,kBAAC,MAAD;IAAI,WAAW,EAAO;cACnB,EAAiB,KAAI,MACpB,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,SAAS,EAAI,OAAO,MAAoB;MACxC;KACF,CAAC;eAGH,kBAAC,OAAD;MAAK,WAAW,EAAO;gBAAvB,CACE,kBAAC,GAAD;OAAY,SAAQ;OAAY,WAAW,EAAO;iBAC/C,EAAI,OAAO;MACF,CAAA,GACZ,kBAAC,GAAD;OACE,uBAAuB;QACrB,cAAc,EAAI,OAAO,MAAkB;QAC3C,mBAAmB;QACnB,qBAAqB,EAAwB;OAC/C;OACA,UAAU,EAAE,WAAW,EAAO,QAAQ;MACvC,CAAA,CACE;;IACK,GAzBL,EAAI,KAyBC,CACb;GACC,CAAA;EACD,CAAA;CACF,CAAA;AAET"}
@@ -1,4 +1,4 @@
1
- import { default as IconSvg } from './IconSvg';
1
+ import IconSvg from './IconSvg';
2
2
  import type { IconName, IconSvgProps } from './IconSvg';
3
3
  export { IconSvg, IconName, IconSvgProps };
4
4
  export default IconSvg;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconSvg/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,WAAW,CAAA;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;AAC1C,eAAe,OAAO,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/IconSvg/index.ts"],"names":[],"mappings":"AAAA,OAAO,OAAO,MAAM,WAAW,CAAA;AAC/B,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAA;AAC1C,eAAe,OAAO,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/IconSvg/index.ts"],"sourcesContent":["import { default as IconSvg } from './IconSvg'\nimport type { IconName, IconSvgProps } from './IconSvg'\nexport { IconSvg, IconName, IconSvgProps }\nexport default IconSvg\n"],"mappings":";;AAGA,IAAA,IAAe"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/components/IconSvg/index.ts"],"sourcesContent":["import IconSvg from './IconSvg'\nimport type { IconName, IconSvgProps } from './IconSvg'\nexport { IconSvg, IconName, IconSvgProps }\nexport default IconSvg\n"],"mappings":";;AAGA,IAAA,IAAe"}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInputTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/JsonSchemaForm/templates/BaseInputTemplate.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,sBAAsB,EAItB,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAA;AAIpB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAyGvC"}
1
+ {"version":3,"file":"BaseInputTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/JsonSchemaForm/templates/BaseInputTemplate.tsx"],"names":[],"mappings":"AAGA,OAAO,EAEL,sBAAsB,EAItB,eAAe,EACf,UAAU,EACV,gBAAgB,EACjB,MAAM,aAAa,CAAA;AASpB;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,CAAC,GAAG,GAAG,EACP,CAAC,SAAS,gBAAgB,GAAG,UAAU,EACvC,CAAC,SAAS,eAAe,GAAG,GAAG,EAC/B,KAAK,EAAE,sBAAsB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,2CAyGvC"}
@@ -2,12 +2,12 @@ import { Fragment as e, jsx as t, jsxs as n } from "react/jsx-runtime";
2
2
  import { ariaDescribedByIds as r, examplesId as i, getInputProps as a, labelValue as o } from "@rjsf/utils";
3
3
  import s from "@mui/material/TextField";
4
4
  //#region src/components/JsonSchemaForm/templates/BaseInputTemplate.tsx
5
- var c = [
5
+ var c = new Set([
6
6
  "date",
7
7
  "datetime-local",
8
8
  "file",
9
9
  "time"
10
- ];
10
+ ]);
11
11
  function l(l) {
12
12
  let { id: u, name: d, placeholder: f, required: p, readonly: m, disabled: h, type: g, label: _, hideLabel: v, hideError: y, value: b, onChange: x, onChangeOverride: S, onBlur: C, onFocus: w, autofocus: T, options: E, schema: D, uiSchema: O, rawErrors: k = [], formContext: A, registry: j, InputLabelProps: M, ...N } = l, { step: P, min: F, max: I, ...L } = a(D, g, E), R = {
13
13
  inputProps: {
@@ -17,7 +17,7 @@ function l(l) {
17
17
  ...D.examples ? { list: i(u) } : void 0
18
18
  },
19
19
  ...L
20
- }, z = ({ target: { value: e } }) => x(e === "" ? E.emptyValue : e), B = ({ target: { value: e } }) => C(u, e), V = ({ target: { value: e } }) => w(u, e), H = c.includes(g) ? {
20
+ }, z = ({ target: { value: e } }) => x(e === "" ? E.emptyValue : e), B = ({ target: { value: e } }) => C(u, e), V = ({ target: { value: e } }) => w(u, e), H = c.has(g) ? {
21
21
  ...M,
22
22
  shrink: !0
23
23
  } : M, U;
@@ -1 +1 @@
1
- {"version":3,"file":"BaseInputTemplate.js","names":[],"sources":["../../../../src/components/JsonSchemaForm/templates/BaseInputTemplate.tsx"],"sourcesContent":["import { CustomFormContext } from '@/components/JsonSchemaForm/CustomFormContext'\nimport { ChangeEvent, FocusEvent } from 'react'\nimport TextField, { TextFieldProps } from '@mui/material/TextField'\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils'\n\nconst TYPES_THAT_SHRINK_LABEL = ['date', 'datetime-local', 'file', 'time']\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n name, // remove this from textFieldProps\n placeholder: placeholderFromProps,\n required,\n readonly,\n disabled,\n type,\n label,\n hideLabel: _hideLabel,\n hideError: _hideError,\n value,\n onChange,\n onChangeOverride,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n rawErrors = [],\n formContext,\n registry,\n InputLabelProps,\n ...textFieldProps\n } = props\n const hideLabel = true\n const inputProps = getInputProps<T, S, F>(schema, type, options)\n // Now we need to pull out the step, min, max into an inner `inputProps` for material-ui\n const { step, min, max, ...rest } = inputProps\n const otherProps = {\n inputProps: {\n step,\n min,\n max,\n ...(schema.examples ? { list: examplesId<T>(id) } : undefined),\n },\n ...rest,\n }\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange(value === '' ? options.emptyValue : value)\n const _onBlur = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, value)\n const _onFocus = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, value)\n const DisplayInputLabelProps = TYPES_THAT_SHRINK_LABEL.includes(type)\n ? {\n ...InputLabelProps,\n shrink: true,\n }\n : InputLabelProps\n\n let derivedValuePlaceholder: string | undefined = undefined\n if (schema.default || schema.const) {\n derivedValuePlaceholder =\n JSON.stringify(schema.default || schema.const) + ' (derived)'\n }\n\n const placeholder = (registry.formContext as CustomFormContext)\n .showDerivedAnnotationPlaceholder\n ? derivedValuePlaceholder || placeholderFromProps\n : placeholderFromProps\n\n return (\n <>\n <TextField\n id={id}\n name={id}\n placeholder={placeholder}\n label={labelValue(label || undefined, hideLabel, false)}\n autoFocus={autofocus}\n required={false}\n disabled={disabled || readonly}\n {...otherProps}\n value={value || value === 0 ? value : ''}\n error={rawErrors.length > 0}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n {...(textFieldProps as TextFieldProps)}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n slotProps={{\n htmlInput: {\n 'aria-label': id,\n },\n\n inputLabel: DisplayInputLabelProps,\n }}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(\n schema.default && !schema.examples.includes(schema.default)\n ? ([schema.default] as string[])\n : [],\n )\n .map((example: any) => {\n return <option key={example} value={example} />\n })}\n </datalist>\n )}\n </>\n )\n}\n"],"mappings":";;;;AAcA,IAAM,IAA0B;CAAC;CAAQ;CAAkB;CAAQ;AAAM;AAQzE,SAAwB,EAItB,GAAwC;CACxC,IAAM,EACJ,OACA,SACA,aAAa,GACb,aACA,aACA,aACA,SACA,UACA,WAAW,GACX,WAAW,GACX,UACA,aACA,qBACA,WACA,YACA,cACA,YACA,WACA,aACA,eAAY,CAAC,GACb,gBACA,aACA,oBACA,GAAG,MACD,GAIE,EAAE,SAAM,QAAK,QAAK,GAAG,MAFR,EAAuB,GAAQ,GAAM,CAEpB,GAC9B,IAAa;EACjB,YAAY;GACV;GACA;GACA;GACA,GAAI,EAAO,WAAW,EAAE,MAAM,EAAc,CAAE,EAAE,IAAI,KAAA;EACtD;EACA,GAAG;CACL,GACM,KAAa,EAAE,QAAQ,EAAE,iBAC7B,EAAS,MAAU,KAAK,EAAQ,aAAa,CAAK,GAC9C,KAAW,EAAE,QAAQ,EAAE,iBAC3B,EAAO,GAAI,CAAK,GACZ,KAAY,EAAE,QAAQ,EAAE,iBAC5B,EAAQ,GAAI,CAAK,GACb,IAAyB,EAAwB,SAAS,CAAI,IAChE;EACE,GAAG;EACH,QAAQ;CACV,IACA,GAEA;CAWJ,QAVI,EAAO,WAAW,EAAO,WAC3B,IACE,KAAK,UAAU,EAAO,WAAW,EAAO,KAAK,IAAI,eASnD,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACM;EACJ,MAAM;EACO,aAVE,EAAS,YAC3B,oCACC,KACA;EAQE,OAAO,EAAW,KAAS,KAAA,GAAW,IAAW,EAAK;EACtD,WAAW;EACX,UAAU;EACV,UAAU,KAAY;EACtB,GAAI;EACJ,OAAO,KAAS,MAAU,IAAI,IAAQ;EACtC,OAAO,EAAU,SAAS;EAC1B,UAAU,KAAoB;EAC9B,QAAQ;EACR,SAAS;EACT,GAAK;EACL,oBAAkB,EAAsB,GAAI,CAAC,CAAC,EAAO,QAAQ;EAC7D,WAAW;GACT,WAAW,EACT,cAAc,EAChB;GAEA,YAAY;EACd;CACD,CAAA,GACA,MAAM,QAAQ,EAAO,QAAQ,KAC5B,kBAAC,YAAD;EAAU,IAAI,EAAc,CAAE;YAC1B,EAAO,SACN,OACC,EAAO,WAAW,CAAC,EAAO,SAAS,SAAS,EAAO,OAAO,IACrD,CAAC,EAAO,OAAO,IAChB,CAAC,CACP,EACC,KAAK,MACG,kBAAC,UAAD,EAAsB,OAAO,EAAU,GAA1B,CAA0B,CAC/C;CACK,CAAA,CAEZ,EAAA,CAAA;AAEN"}
1
+ {"version":3,"file":"BaseInputTemplate.js","names":[],"sources":["../../../../src/components/JsonSchemaForm/templates/BaseInputTemplate.tsx"],"sourcesContent":["import { CustomFormContext } from '@/components/JsonSchemaForm/CustomFormContext'\nimport { ChangeEvent, FocusEvent } from 'react'\nimport TextField, { TextFieldProps } from '@mui/material/TextField'\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils'\n\nconst TYPES_THAT_SHRINK_LABEL = new Set([\n 'date',\n 'datetime-local',\n 'file',\n 'time',\n])\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n name, // remove this from textFieldProps\n placeholder: placeholderFromProps,\n required,\n readonly,\n disabled,\n type,\n label,\n hideLabel: _hideLabel,\n hideError: _hideError,\n value,\n onChange,\n onChangeOverride,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n rawErrors = [],\n formContext,\n registry,\n InputLabelProps,\n ...textFieldProps\n } = props\n const hideLabel = true\n const inputProps = getInputProps<T, S, F>(schema, type, options)\n // Now we need to pull out the step, min, max into an inner `inputProps` for material-ui\n const { step, min, max, ...rest } = inputProps\n const otherProps = {\n inputProps: {\n step,\n min,\n max,\n ...(schema.examples ? { list: examplesId<T>(id) } : undefined),\n },\n ...rest,\n }\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange(value === '' ? options.emptyValue : value)\n const _onBlur = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>\n onBlur(id, value)\n const _onFocus = ({ target: { value } }: FocusEvent<HTMLInputElement>) =>\n onFocus(id, value)\n const DisplayInputLabelProps = TYPES_THAT_SHRINK_LABEL.has(type)\n ? {\n ...InputLabelProps,\n shrink: true,\n }\n : InputLabelProps\n\n let derivedValuePlaceholder: string | undefined = undefined\n if (schema.default || schema.const) {\n derivedValuePlaceholder =\n JSON.stringify(schema.default || schema.const) + ' (derived)'\n }\n\n const placeholder = (registry.formContext as CustomFormContext)\n .showDerivedAnnotationPlaceholder\n ? derivedValuePlaceholder || placeholderFromProps\n : placeholderFromProps\n\n return (\n <>\n <TextField\n id={id}\n name={id}\n placeholder={placeholder}\n label={labelValue(label || undefined, hideLabel, false)}\n autoFocus={autofocus}\n required={false}\n disabled={disabled || readonly}\n {...otherProps}\n value={value || value === 0 ? value : ''}\n error={rawErrors.length > 0}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n {...(textFieldProps as TextFieldProps)}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n slotProps={{\n htmlInput: {\n 'aria-label': id,\n },\n\n inputLabel: DisplayInputLabelProps,\n }}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(\n schema.default && !schema.examples.includes(schema.default)\n ? ([schema.default] as string[])\n : [],\n )\n .map((example: any) => {\n return <option key={example} value={example} />\n })}\n </datalist>\n )}\n </>\n )\n}\n"],"mappings":";;;;AAcA,IAAM,IAA0B,IAAI,IAAI;CACtC;CACA;CACA;CACA;AACF,CAAC;AAQD,SAAwB,EAItB,GAAwC;CACxC,IAAM,EACJ,OACA,SACA,aAAa,GACb,aACA,aACA,aACA,SACA,UACA,WAAW,GACX,WAAW,GACX,UACA,aACA,qBACA,WACA,YACA,cACA,YACA,WACA,aACA,eAAY,CAAC,GACb,gBACA,aACA,oBACA,GAAG,MACD,GAIE,EAAE,SAAM,QAAK,QAAK,GAAG,MAFR,EAAuB,GAAQ,GAAM,CAEpB,GAC9B,IAAa;EACjB,YAAY;GACV;GACA;GACA;GACA,GAAI,EAAO,WAAW,EAAE,MAAM,EAAc,CAAE,EAAE,IAAI,KAAA;EACtD;EACA,GAAG;CACL,GACM,KAAa,EAAE,QAAQ,EAAE,iBAC7B,EAAS,MAAU,KAAK,EAAQ,aAAa,CAAK,GAC9C,KAAW,EAAE,QAAQ,EAAE,iBAC3B,EAAO,GAAI,CAAK,GACZ,KAAY,EAAE,QAAQ,EAAE,iBAC5B,EAAQ,GAAI,CAAK,GACb,IAAyB,EAAwB,IAAI,CAAI,IAC3D;EACE,GAAG;EACH,QAAQ;CACV,IACA,GAEA;CAWJ,QAVI,EAAO,WAAW,EAAO,WAC3B,IACE,KAAK,UAAU,EAAO,WAAW,EAAO,KAAK,IAAI,eASnD,kBAAA,GAAA,EAAA,UAAA,CACE,kBAAC,GAAD;EACM;EACJ,MAAM;EACO,aAVE,EAAS,YAC3B,oCACC,KACA;EAQE,OAAO,EAAW,KAAS,KAAA,GAAW,IAAW,EAAK;EACtD,WAAW;EACX,UAAU;EACV,UAAU,KAAY;EACtB,GAAI;EACJ,OAAO,KAAS,MAAU,IAAI,IAAQ;EACtC,OAAO,EAAU,SAAS;EAC1B,UAAU,KAAoB;EAC9B,QAAQ;EACR,SAAS;EACT,GAAK;EACL,oBAAkB,EAAsB,GAAI,CAAC,CAAC,EAAO,QAAQ;EAC7D,WAAW;GACT,WAAW,EACT,cAAc,EAChB;GAEA,YAAY;EACd;CACD,CAAA,GACA,MAAM,QAAQ,EAAO,QAAQ,KAC5B,kBAAC,YAAD;EAAU,IAAI,EAAc,CAAE;YAC1B,EAAO,SACN,OACC,EAAO,WAAW,CAAC,EAAO,SAAS,SAAS,EAAO,OAAO,IACrD,CAAC,EAAO,OAAO,IAChB,CAAC,CACP,EACC,KAAK,MACG,kBAAC,UAAD,EAAsB,OAAO,EAAU,GAA1B,CAA0B,CAC/C;CACK,CAAA,CAEZ,EAAA,CAAA;AAEN"}
@@ -20,7 +20,7 @@ function v({ placeholder: v, text: y, setText: b }) {
20
20
  let t = [], n = k.current;
21
21
  if (n) {
22
22
  let r = n?.selectionStart, i = y.substring(0, r), a = y.substring(r, y.length);
23
- w(r + e.length), t.push(i, `${D ? "" : "@"}${e.replace(/\s/g, "")}`, a);
23
+ w(r + e.length), t.push(i, `${D ? "" : "@"}${e.replaceAll(/\s/g, "")}`, a);
24
24
  }
25
25
  b(t.join("")), O(!1);
26
26
  }, j = (e) => {