@@ -76,7 +76,7 @@ const Sort = ({ selected, onSort, reranker }) => {
7676 )
7777}
7878
79- const CandidateList = ( { candidates, header, rowIndex, orderBy, order, onOrderChange, setShowItem, showItem, setShowHighlights, isSelectedForMap, onMap, onFetchMore, bgColor, bucketId, display, onDisplayChange, noToolbar, toolbarControl, repoVersion, alignToolbarLeft, rightControl, analysis, showAnalysis, openAnalysis, onCloseAnalysis, AIRecommendedCandidateId, locales, bridge} ) => {
79+ const CandidateList = ( { candidates, header, rowIndex, orderBy, order, onOrderChange, setShowItem, showItem, setShowHighlights, isSelectedForMap, onMap, onFetchMore, bgColor, bucketId, display, onDisplayChange, noToolbar, toolbarControl, repoVersion, alignToolbarLeft, rightControl, analysis, showAnalysis, openAnalysis, onCloseAnalysis, AIRecommendedCandidateId, locales, bridge, scispacy } ) => {
8080 const results = { total : onFetchMore ? candidates ?. length : 1 , results : candidates || [ ] }
8181
8282 const getExtraColumns = ( ) => {
@@ -149,14 +149,14 @@ const CandidateList = ({candidates, header, rowIndex, orderBy, order, onOrderCha
149149 ) :
150150 (
151151 showHeader &&
152- < ListSubheader sx = { { lineHeight : '28px' , padding : '2px 8px' , background : bgColor || 'rgb(229, 229, 229)' , display : 'inline-flex' , justifyContent : 'space-between' , width : '100%' , color : '#000' , fontSize : '12px' , borderBottom : bridge ? `1px solid ${ PRIMARY_COLORS . main } ` : undefined } } >
152+ < ListSubheader sx = { { lineHeight : '28px' , padding : '2px 8px' , background : bgColor || 'rgb(229, 229, 229)' , display : 'inline-flex' , justifyContent : 'space-between' , width : '100%' , color : '#000' , fontSize : '12px' , borderBottom : ( bridge || scispacy ) ? `1px solid ${ PRIMARY_COLORS . main } ` : undefined } } >
153153 < b > { header } </ b >
154154 < b > { count . toLocaleString ( ) } </ b >
155155 </ ListSubheader >
156156 )
157157 }
158158 title = ' '
159- renderer = { props => < Concept { ...props } key = { `${ bucketId } -${ props ?. concept ?. uuid } ` } onMap = { onMap } isSelectedForMap = { isSelectedForMap } setShowHighlights = { setShowHighlights } repoVersion = { repoVersion } isAIRecommended = { AIRecommendedCandidateId === props ?. concept ?. id } AIRecommendedCandidateId = { AIRecommendedCandidateId } locales = { locales } bridge = { bridge } /> }
159+ renderer = { props => < Concept { ...props } key = { `${ bucketId } -${ props ?. concept ?. uuid } ` } onMap = { onMap } isSelectedForMap = { isSelectedForMap } setShowHighlights = { setShowHighlights } repoVersion = { repoVersion } isAIRecommended = { AIRecommendedCandidateId === props ?. concept ?. id } AIRecommendedCandidateId = { AIRecommendedCandidateId } locales = { locales } bridge = { bridge } scispacy = { scispacy } notClickable = { Boolean ( scispacy ) } /> }
160160 display = { display }
161161 onDisplayChange = { onDisplayChange }
162162 nested
@@ -189,7 +189,7 @@ const CandidateList = ({candidates, header, rowIndex, orderBy, order, onOrderCha
189189 )
190190}
191191
192- const Candidates = ( { rowIndex, alert, setAlert, candidates, orderBy, order, onOrderChange, setShowItem, showItem, setShowHighlights, isSelectedForMap, onMap, onFetchMore, isLoading, candidatesScore, repoVersion, analysis, onFetchRecommendation, appliedFacets, setAppliedFacets, filters, facets, columns, defaultFilters, locales, bridgeCandidates, models, selectedModel, onModelChange, reranker, onRefreshClick} ) => {
192+ const Candidates = ( { rowIndex, alert, setAlert, candidates, orderBy, order, onOrderChange, setShowItem, showItem, setShowHighlights, isSelectedForMap, onMap, onFetchMore, isLoading, candidatesScore, repoVersion, analysis, onFetchRecommendation, appliedFacets, setAppliedFacets, filters, facets, columns, defaultFilters, locales, bridgeCandidates, scispacyCandidates , models, selectedModel, onModelChange, reranker, onRefreshClick} ) => {
193193 const { t } = useTranslation ( ) ;
194194 const [ sortBy , setSortBy ] = React . useState ( false )
195195 /*eslint no-undef: 0*/
@@ -202,6 +202,7 @@ const Candidates = ({rowIndex, alert, setAlert, candidates, orderBy, order, onOr
202202 const availableScore = candidatesScore ?. available
203203 const results = find ( candidates , c => c . row ?. __index === rowIndex ) ?. results
204204 const bridgeResults = find ( bridgeCandidates , c => c . row ?. __index === rowIndex ) ?. results || [ ]
205+ const scispacyResults = find ( scispacyCandidates , c => c . row ?. __index === rowIndex ) ?. results || [ ]
205206 const isNoneLoaded = results === null || results === undefined
206207 const concepts = results || [ ]
207208 const canFetchMore = concepts ?. length > 0
@@ -411,6 +412,13 @@ const Candidates = ({rowIndex, alert, setAlert, candidates, orderBy, order, onOr
411412 < CandidateList { ...props } candidates = { bridgeResults } header = { t ( 'map_project.ciel_bridge_terminology_candidates' ) } onFetchMore = { onFetchMore } bucketId = { `${ rowIndex } -bridge` } noToolbar bridge />
412413 }
413414 </ li >
415+ < li >
416+ {
417+ ( isLoading && isNoneLoaded ) ?
418+ < Skeleton height = { 60 } /> :
419+ < CandidateList { ...props } candidates = { scispacyResults } header = { t ( 'map_project.scispacy_candidates' ) } onFetchMore = { onFetchMore } bucketId = { `${ rowIndex } -scispacy` } noToolbar scispacy />
420+ }
421+ </ li >
414422 </ List >
415423 {
416424 onFetchMore && canFetchMore &&
0 commit comments