-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolved issue #260 with exporting data from Expert Search containing
additional columns. Resolved issue #262 where capabilities were not retained when loading a saved query. Implemented #263 adding highlighting to the results of Expert Search.
- Loading branch information
Showing
8 changed files
with
1,149 additions
and
4,721 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5,733 changes: 1,024 additions & 4,709 deletions
5,733
src/Coalesce.React/entity-search/package-lock.json
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import React from 'react'; | ||
import ExpansionPanel from '@material-ui/core/ExpansionPanel'; | ||
import ExpansionPanelSummary from '@material-ui/core/ExpansionPanelSummary'; | ||
import ExpandMoreIcon from '@material-ui/icons/ExpandMore'; | ||
import Typography from '@material-ui/core/Typography'; | ||
import List from '@material-ui/core/List'; | ||
import Parser from 'html-react-parser'; | ||
import { ListItemExpandable } from 'coalesce-components/lib/components'; | ||
|
||
export class FeedResults extends React.Component { | ||
|
||
constructor(props) { | ||
super(props); | ||
} | ||
|
||
componentWillReceiveProps(nextProps) { | ||
|
||
if (nextProps.data.key !== this.props.data.key) { | ||
this.setState(() => {return { | ||
data: nextProps.data | ||
} | ||
}) | ||
} | ||
} | ||
|
||
render() { | ||
|
||
return ( | ||
<ExpansionPanel defaultExpanded> | ||
<ExpansionPanelSummary style={{padding: '5px', height: '32px'}} expandIcon={<ExpandMoreIcon />}> | ||
<Typography variant="headline"> | ||
Query Results | ||
</Typography> | ||
</ExpansionPanelSummary> | ||
<List> | ||
{ this.props.data.hits.map(this.renderListItem, this.props.onClick) } | ||
</List> | ||
</ExpansionPanel> | ||
) | ||
|
||
} | ||
|
||
renderListItem = (hit) => { | ||
|
||
var content = hit.values[0]; | ||
var title = hit.values[1]; | ||
var secondary = ""; | ||
|
||
if (hit.values.length > 2) { | ||
secondary = hit.values.slice(1).join(' | '); | ||
} | ||
|
||
if (title && title != null) { | ||
title = Parser(title); | ||
} | ||
|
||
if (content && content != null) { | ||
content = Parser(content); | ||
} | ||
|
||
return ( | ||
<ListItemExpandable | ||
key={hit.entityKey} | ||
expanded | ||
primary={title} | ||
secondary={secondary} | ||
details={content} | ||
onClick={() => this.props.onClick(hit)} | ||
/> | ||
) | ||
} | ||
} | ||
|
||
FeedResults.defaultProps = { | ||
data: [], | ||
properties: [], | ||
editMode: true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters