-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
OpenConceptLab/ocl_issues#1459 | Concept cascade dialog extracted
- Loading branch information
1 parent
09e8771
commit f6d74a5
Showing
3 changed files
with
85 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React from 'react'; | ||
import { | ||
Dialog, DialogContent, DialogTitle, | ||
DialogActions, Button, Slide, IconButton | ||
} from '@mui/material'; | ||
import { | ||
Close as CloseIcon, | ||
} from '@mui/icons-material' | ||
import { get } from 'lodash'; | ||
import ConceptHierarchyTree from './ConceptHierarchyTree'; | ||
import HierarchyTreeFilters from './HierarchyTreeFilters'; | ||
import ResourceTextBreadcrumbs from '../common/ResourceTextBreadcrumbs'; | ||
|
||
const Transition = React.forwardRef(function Transition(props, ref) { | ||
return <Slide direction="up" ref={ref} {...props} />; | ||
}); | ||
|
||
const ConceptCascadeVisualizeDialog = ({concept, open, onClose, filters, onFilterChange, onCascadeFilterChange, source, sourceVersion, hierarchyMeaning, parent}) => { | ||
return ( | ||
<Dialog fullScreen open={open} onClose={onClose} TransitionComponent={Transition}> | ||
<DialogTitle> | ||
<div className='col-xs-12 no-side-padding'> | ||
<div className='col-xs-11 no-side-padding'> | ||
<ResourceTextBreadcrumbs resource={concept} includeSelf style={{marginLeft: '-15px', marginBottom: '10px'}} /> | ||
<div className='col-xs-12 no-side-padding'> | ||
<span>Associations</span> | ||
{ | ||
filters !== false && | ||
<span style={{marginLeft: '20px'}}> | ||
<HierarchyTreeFilters | ||
filters={filters} | ||
onChange={onCascadeFilterChange} | ||
onFilterChange={onFilterChange} | ||
size='medium' | ||
/> | ||
</span> | ||
} | ||
</div> | ||
</div> | ||
<div className='col-xs-1 no-side-padding'> | ||
<span style={{float: 'right'}}> | ||
<IconButton | ||
edge="end" | ||
color="inherit" | ||
onClick={onClose} | ||
> | ||
<CloseIcon /> | ||
</IconButton> | ||
</span> | ||
</div> | ||
</div> | ||
</DialogTitle> | ||
<DialogContent> | ||
<div className='col-xs-12' style={{padding: '10px'}}> | ||
<ConceptHierarchyTree concept={concept} fontSize='14' dx={80} hierarchyMeaning={hierarchyMeaning} filters={filters} sourceVersion={sourceVersion} source={source} parent={parent} reverse={get(filters, 'reverse', false)} /> | ||
</div> | ||
</DialogContent> | ||
<DialogActions> | ||
<Button onClick={onClose}>Close</Button> | ||
</DialogActions> | ||
</Dialog> | ||
) | ||
} | ||
|
||
export default ConceptCascadeVisualizeDialog; |
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