diff --git a/src/client/components/perspectives/sampo/Perspective2.js b/src/client/components/perspectives/sampo/Perspective2.js index 51c224ae7e2d39af1c7b5affeeaa9af4ab49cb45..6e04ed192ceab4a713558f1b04a559892484ed15 100644 --- a/src/client/components/perspectives/sampo/Perspective2.js +++ b/src/client/components/perspectives/sampo/Perspective2.js @@ -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 diff --git a/src/client/components/perspectives/sampo/Perspective3.js b/src/client/components/perspectives/sampo/Perspective3.js index 1af0387b12e26ce6d7fa7b8e4c8389ed2ce7f9a8..1fd21321b810dd72c255eae708ccf9763a1dc6f4 100644 --- a/src/client/components/perspectives/sampo/Perspective3.js +++ b/src/client/components/perspectives/sampo/Perspective3.js @@ -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 diff --git a/src/client/components/perspectives/sampo/client_fs/ClientFSPerspective.js b/src/client/components/perspectives/sampo/client_fs/ClientFSPerspective.js index 565f3cfe610c8a045ef65eaf7ccb96708f3c7afe..993f711e3c9f2faaaa19e89b5b48a941706d674c 100644 --- a/src/client/components/perspectives/sampo/client_fs/ClientFSPerspective.js +++ b/src/client/components/perspectives/sampo/client_fs/ClientFSPerspective.js @@ -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}