Skip to content
Snippets Groups Projects
Commit ef1a147c authored by esikkala's avatar esikkala
Browse files

Add propTypes

parent 7d2ad800
No related branches found
No related tags found
No related merge requests found
......@@ -51,26 +51,98 @@ const Perspective2 = props => {
}
Perspective2.propTypes = {
facetResults: PropTypes.object.isRequired,
placesResults: PropTypes.object.isRequired,
leafletMapLayers: PropTypes.object.isRequired,
facetData: PropTypes.object.isRequired,
/**
* Faceted search configs and results of this perspective.
*/
perspectiveState: PropTypes.object.isRequired,
/**
* Faceted search configs and results of places related to this perspective.
*/
placesState: PropTypes.object.isRequired,
/**
* Facet configs and values.
*/
facetState: PropTypes.object.isRequired,
/**
* Facet values where facets constrain themselves, used for statistics.
*/
facetConstrainSelfState: PropTypes.object.isRequired,
/**
* Leaflet map config and external layers.
*/
leafletMapState: PropTypes.object.isRequired,
/**
* Redux action for fetching paginated results.
*/
fetchPaginatedResults: PropTypes.func.isRequired,
/**
* Redux action for fetching all results.
*/
fetchResults: PropTypes.func.isRequired,
/**
* Redux action for fetching facet values for statistics.
*/
fetchFacetConstrainSelf: PropTypes.func.isRequired,
/**
* Redux action for loading external GeoJSON layers.
*/
fetchGeoJSONLayers: PropTypes.func.isRequired,
/**
* Redux action for loading external GeoJSON layers via backend.
*/
fetchGeoJSONLayersBackend: PropTypes.func.isRequired,
fetchPaginatedResults: PropTypes.func.isRequired,
/**
* Redux action for clearing external GeoJSON layers.
*/
clearGeoJSONLayers: PropTypes.func.isRequired,
/**
* Redux action for fetching information about a single entity.
*/
fetchByURI: PropTypes.func.isRequired,
/**
* Redux action for updating the page of paginated results.
*/
updatePage: PropTypes.func.isRequired,
/**
* Redux action for updating the rows per page of paginated results.
*/
updateRowsPerPage: PropTypes.func.isRequired,
/**
* Redux action for sorting the paginated results.
*/
sortResults: PropTypes.func.isRequired,
routeProps: PropTypes.object.isRequired,
/**
* Redux action for updating the active selection or config of a facet.
*/
showError: PropTypes.func.isRequired,
/**
* Redux action for showing an error
*/
updateFacetOption: PropTypes.func.isRequired,
/**
* Routing information from React Router.
*/
routeProps: PropTypes.object.isRequired,
/**
* Perspective config.
*/
perspective: PropTypes.object.isRequired,
/**
* State of the animation, used by TemporalMap.
*/
animationValue: PropTypes.array.isRequired,
/**
* Redux action for animating TemporalMap.
*/
animateMap: PropTypes.func.isRequired,
/**
* Current screen size.
*/
screenSize: PropTypes.string.isRequired,
rootUrl: PropTypes.string.isRequired,
showError: PropTypes.func.isRequired
/**
* Root url of the application.
*/
rootUrl: PropTypes.string.isRequired
}
export default Perspective2
......@@ -89,27 +89,98 @@ const Perspective3 = props => {
}
Perspective3.propTypes = {
facetResults: PropTypes.object.isRequired,
placesResults: PropTypes.object.isRequired,
leafletMapLayers: PropTypes.object.isRequired,
facetData: PropTypes.object.isRequired,
/**
* Faceted search configs and results of this perspective.
*/
perspectiveState: PropTypes.object.isRequired,
/**
* Faceted search configs and results of places related to this perspective.
*/
placesState: PropTypes.object.isRequired,
/**
* Facet configs and values.
*/
facetState: PropTypes.object.isRequired,
/**
* Facet values where facets constrain themselves, used for statistics.
*/
facetConstrainSelfState: PropTypes.object.isRequired,
/**
* Leaflet map config and external layers.
*/
leafletMapState: PropTypes.object.isRequired,
/**
* Redux action for fetching paginated results.
*/
fetchPaginatedResults: PropTypes.func.isRequired,
/**
* Redux action for fetching all results.
*/
fetchResults: PropTypes.func.isRequired,
/**
* Redux action for fetching facet values for statistics.
*/
fetchFacetConstrainSelf: PropTypes.func.isRequired,
/**
* Redux action for loading external GeoJSON layers.
*/
fetchGeoJSONLayers: PropTypes.func.isRequired,
/**
* Redux action for loading external GeoJSON layers via backend.
*/
fetchGeoJSONLayersBackend: PropTypes.func.isRequired,
/**
* Redux action for clearing external GeoJSON layers.
*/
clearGeoJSONLayers: PropTypes.func.isRequired,
fetchPaginatedResults: PropTypes.func.isRequired,
/**
* Redux action for fetching information about a single entity.
*/
fetchByURI: PropTypes.func.isRequired,
/**
* Redux action for updating the page of paginated results.
*/
updatePage: PropTypes.func.isRequired,
/**
* Redux action for updating the rows per page of paginated results.
*/
updateRowsPerPage: PropTypes.func.isRequired,
/**
* Redux action for sorting the paginated results.
*/
sortResults: PropTypes.func.isRequired,
routeProps: PropTypes.object.isRequired,
/**
* Redux action for updating the active selection or config of a facet.
*/
showError: PropTypes.func.isRequired,
/**
* Redux action for showing an error
*/
updateFacetOption: PropTypes.func.isRequired,
/**
* Routing information from React Router.
*/
routeProps: PropTypes.object.isRequired,
/**
* Perspective config.
*/
perspective: PropTypes.object.isRequired,
/**
* State of the animation, used by TemporalMap.
*/
animationValue: PropTypes.array.isRequired,
/**
* Redux action for animating TemporalMap.
*/
animateMap: PropTypes.func.isRequired,
/**
* Current screen size.
*/
screenSize: PropTypes.string.isRequired,
rootUrl: PropTypes.string.isRequired,
showError: PropTypes.func.isRequired
/**
* Root url of the application.
*/
rootUrl: PropTypes.string.isRequired
}
export default Perspective3
......@@ -45,7 +45,7 @@ const ClientFSPerspective = props => {
center={[65.184809, 27.314050]}
zoom={5}
results={props.clientFSResults}
layers={props.leafletMap}
leafletMapState={props.leafletMap}
pageType='clientFSResults'
mapMode='cluster'
createPopUpContent={createPopUpContentNameSampo}
......@@ -73,7 +73,7 @@ const ClientFSPerspective = props => {
center={[65.184809, 27.314050]}
zoom={5}
results={props.clientFSResults}
layers={props.leafletMap}
leafletMapState={props.leafletMap}
pageType='clientFSResults'
mapMode='marker'
createPopUpContent={createPopUpContentNameSampo}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment