Skip to content

SideBar ​

Aims to provide a sidebar for searching capability for SPARC portal.

Props ​

NameDescriptionTypeRequiredDefault
tabs-arrayfalse[ { title: 'Dataset Explorer', id: 1, type: 'datasetExplorer', closable: false }, { title: 'Connectivity Explorer', id: 2, type: 'connectivityExplorer', closable: false }, { title: 'Annotation', id: 3, type: 'annotation', closable: true }, ]
visibleThe option to show side bar.booleanfalsefalse
envVarsThe environment variables object with API_LOCATION, ALGOLIA_KEY, ALGOLIA_ID, ALGOLIA_INDEX, PENNSIEVE_API_LOCATION, BL_SERVER_URL, ROOT_URLobjectfalse() => {}
openAtStartThe option to show or hide sidebar on page load.booleanfalsefalse
connectivityEntryThe connectivity info data to show in sidebar.arrayfalse[]
annotationEntryThe annotation data to show in sidebar.arrayfalse[]
createData-objectfalse{ toBeConfirmed: false, points: [], shape: '', x: 0, y: 0 }
connectivityKnowledge-arrayfalse[]
filterOptions-arrayfalse[]
showVisibilityFilter-booleanfalsefalse
showLongLabel-booleanfalsefalse

Events ​

Event NameDescriptionParameters
annotation-submitted--
confirm-create--
cancel-create--
confirm-delete--
filter-visibility--
connectivity-collapse-change--
connectivity-item-close--
hover-changed--
show-connectivity--
show-reference-connectivities--
connectivity-hovered--
search-changed--
tabClicked--
tabClosed--
trackEvent--
actionClickThis event is emitted when the image is clicked on or the button below the image is clicked on.payLoad
number-of-datasets-for-anatomiesThis emits a object with keys as anatomy and values as number of datasets for that anatomy.payload
anatomy-in-datasetsThis emits a lis of datasets, with the anatomy for each one. Used by flatmap for markerspayload
contextUpdateThis event is emitted when the context card is updated. Example, context card update on first load.payload
datalink-clickedThis event is emitted when the dataset button or dataset image thumbnail from the gallery component is clicked.payload
connectivity-source-change--
show-connectivity-graph--

Methods ​

MethodDescriptionParameters
closeThe function to close sidebar.-
toggleDrawerThe function to toggle (open and close) sidebar.-
addFilterThe function to add filters to sidebar search.filter
getStateThis function returns the current state of the sidebar to store in the map state.-
setStateThis function restores the state of the sidebar from the provided state object.state
trackEventTrack an event for analyticsdata