Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Add proptype specifications to containers

Benjamin Kingfe5d167c8fa1
diff --git a/web/js/components/animation-widget/animation-widget.js b/web/js/components/animation-widget/animation-widget.js
index d67ff3391..a5057a040 100644
--- a/web/js/components/animation-widget/animation-widget.js
+++ b/web/js/components/animation-widget/animation-widget.js
@@ -209,7 +209,8 @@ class AnimationWidget extends React.Component {
}
RangeHandle.propTypes = {
value: PropTypes.number,
- offset: PropTypes.number
+ offset: PropTypes.number,
+ dragging: PropTypes.object
};
AnimationWidget.propTypes = {
sliderSpeed: PropTypes.number,
diff --git a/web/js/components/animation-widget/gif-panel.js b/web/js/components/animation-widget/gif-panel.js
index e06768b4f..f7547336c 100644
--- a/web/js/components/animation-widget/gif-panel.js
+++ b/web/js/components/animation-widget/gif-panel.js
@@ -119,7 +119,11 @@ GifPanel.propTypes = {
resolution: PropTypes.string,
speed: PropTypes.number,
valid: PropTypes.bool,
- increment: PropTypes.string
+ increment: PropTypes.string,
+ projId: PropTypes.string,
+ lonlats: PropTypes.array,
+ startDate: PropTypes.string,
+ endDate: PropTypes.string
};
const isFileSizeValid = function(requestSize, imgHeight, imgWidth) {
return (
diff --git a/web/js/components/animation-widget/gif-post-creation.js b/web/js/components/animation-widget/gif-post-creation.js
index 8bb9e70ce..02eb5ab26 100644
--- a/web/js/components/animation-widget/gif-post-creation.js
+++ b/web/js/components/animation-widget/gif-post-creation.js
@@ -127,5 +127,11 @@ GifResults.propTypes = {
valid: PropTypes.bool,
requestSize: PropTypes.number,
fileSizeEstimate: PropTypes.number,
- increment: PropTypes.string
+ increment: PropTypes.string,
+ gifObject: PropTypes.object,
+ boundaries: PropTypes.object,
+ screenWidth: PropTypes.number,
+ screenHeight: PropTypes.number,
+ onClose: PropTypes.func,
+ startDate: PropTypes.string
};
diff --git a/web/js/components/animation-widget/play-queue.js b/web/js/components/animation-widget/play-queue.js
index 753733d63..e3f6aa51e 100644
--- a/web/js/components/animation-widget/play-queue.js
+++ b/web/js/components/animation-widget/play-queue.js
@@ -552,6 +552,24 @@ class PlayAnimation extends React.Component {
}
}
-PlayAnimation.propTypes = {};
+PlayAnimation.propTypes = {
+ queueLength: PropTypes.number.isRequired,
+ canPreloadAll: PropTypes.bool,
+ selectDate: PropTypes.func.isRequired,
+ endDate: PropTypes.object.isRequired,
+ speed: PropTypes.number.isRequired,
+ startDate: PropTypes.object.isRequired,
+ isPlaying: PropTypes.bool.isRequired,
+ interval: PropTypes.string,
+ delta: PropTypes.number,
+ togglePlaying: PropTypes.func.isRequired,
+ layers: PropTypes.array.isRequired,
+ promiseImageryForTime: PropTypes.func.isRequired,
+ onClose: PropTypes.func,
+ loop: PropTypes.bool,
+ hasCustomPalettes: PropTypes.bool,
+ maxQueueLength: PropTypes.number,
+ currentDate: PropTypes.object
+};
export default PlayAnimation;
diff --git a/web/js/containers/animation-widget.js b/web/js/containers/animation-widget.js
index 542340fee..29b3d546b 100644
--- a/web/js/containers/animation-widget.js
+++ b/web/js/containers/animation-widget.js
@@ -200,9 +200,7 @@ class AnimationWidget extends React.Component {
promiseImageryForTime={promiseImageryForTime}
onClose={onPushPause}
/>
- ) : (
- null
- )}
+ ) : null}
<div
id="wv-animation-widget"
className={
@@ -390,8 +388,14 @@ export default connect(
mapStateToProps,
mapDispatchToProps
)(AnimationWidget);
-
+RangeHandle.propTypes = {
+ value: PropTypes.number,
+ offset: PropTypes.number,
+ dragging: PropTypes.object
+};
AnimationWidget.propTypes = {
+ onUpdateStartDate: PropTypes.func,
+ onUpdateEndDate: PropTypes.func,
speed: PropTypes.number,
looping: PropTypes.bool,
startDate: PropTypes.object,
@@ -410,7 +414,21 @@ AnimationWidget.propTypes = {
maxDate: PropTypes.object,
hasSubdailyLayers: PropTypes.bool,
onClose: PropTypes.func,
- isPlaying: PropTypes.bool
+ isPlaying: PropTypes.bool,
+ isActive: PropTypes.bool,
+ interval: PropTypes.string,
+ delta: PropTypes.number,
+ layers: PropTypes.array,
+ hasCustomPalettes: PropTypes.bool,
+ promiseImageryForTime: PropTypes.func,
+ map: PropTypes.object,
+ selectDate: PropTypes.func,
+ currentDate: PropTypes.object,
+ toggleGif: PropTypes.func,
+ isGifActive: PropTypes.bool,
+ isCompareActive: PropTypes.bool,
+ customDelta: PropTypes.number,
+ customInterval: PropTypes.string
};
const getZoomObject = function(dateModel, hasSubDaily) {
diff --git a/web/js/containers/gif.js b/web/js/containers/gif.js
index 7ea8fbff2..0c28ee4e7 100644
--- a/web/js/containers/gif.js
+++ b/web/js/containers/gif.js
@@ -349,4 +349,15 @@ export default connect(
mapDispatchToProps
)(GIF);
-GIF.propTypes = {};
+GIF.propTypes = {
+ increment: PropTypes.string,
+ speed: PropTypes.number,
+ map: PropTypes.object,
+ screenWidth: PropTypes.number,
+ screenHeight: PropTypes.number,
+ proj: PropTypes.object,
+ onClose: PropTypes.func,
+ endDate: PropTypes.string,
+ startDate: PropTypes.string,
+ getImageArray: PropTypes.func
+};
diff --git a/web/js/containers/image-download.js b/web/js/containers/image-download.js
index 88b0cfd7a..3d9c2779c 100644
--- a/web/js/containers/image-download.js
+++ b/web/js/containers/image-download.js
@@ -176,5 +176,7 @@ ImageDownloadContainer.propTypes = {
url: PropTypes.string.isRequired,
onClose: PropTypes.func.isRequired,
screenWidth: PropTypes.number,
- screenHeight: PropTypes.number
+ screenHeight: PropTypes.number,
+ date: PropTypes.object,
+ getLayers: PropTypes.func
};
diff --git a/web/js/containers/info.js b/web/js/containers/info.js
index 960848d59..e834f2838 100644
--- a/web/js/containers/info.js
+++ b/web/js/containers/info.js
@@ -174,5 +174,6 @@ InfoList.propTypes = {
notificationClick: PropTypes.func,
notifications: PropTypes.object,
config: PropTypes.object,
- models: PropTypes.object
+ models: PropTypes.object,
+ startTour: PropTypes.func
};
diff --git a/web/js/containers/sidebar/data.js b/web/js/containers/sidebar/data.js
index e4aff574d..9793a8ab3 100644
--- a/web/js/containers/sidebar/data.js
+++ b/web/js/containers/sidebar/data.js
@@ -66,7 +66,8 @@ Data.propTypes = {
products: PropTypes.object,
findProductToSelect: PropTypes.func,
counts: PropTypes.object,
- selectedProduct: PropTypes.string
+ selectedProduct: PropTypes.string,
+ isActive: PropTypes.bool
};
const mapDispatchToProps = dispatch => ({
diff --git a/web/js/containers/sidebar/events.js b/web/js/containers/sidebar/events.js
index 4195e78c0..45c71c5a7 100644
--- a/web/js/containers/sidebar/events.js
+++ b/web/js/containers/sidebar/events.js
@@ -201,5 +201,6 @@ Events.propTypes = {
config: PropTypes.object,
showAll: PropTypes.bool,
isLoading: PropTypes.bool,
- selectEvent: PropTypes.func
+ selectEvent: PropTypes.func,
+ hasRequestError: PropTypes.bool
};
diff --git a/web/js/containers/sidebar/layer-list.js b/web/js/containers/sidebar/layer-list.js
index 0460ff51c..240f6bc93 100644
--- a/web/js/containers/sidebar/layer-list.js
+++ b/web/js/containers/sidebar/layer-list.js
@@ -155,7 +155,16 @@ LayerList.propTypes = {
groupId: PropTypes.string,
title: PropTypes.string,
layerGroupName: PropTypes.string,
- renderedPalettes: PropTypes.string
+ renderedPalettes: PropTypes.string,
+ runningLayers: PropTypes.object,
+ projId: PropTypes.string,
+ checkerBoardPattern: PropTypes.object,
+ getNames: PropTypes.func,
+ available: PropTypes.func,
+ zots: PropTypes.object,
+ reorderLayers: PropTypes.func,
+ layerSplit: PropTypes.number,
+ activeLayers: PropTypes.array
};
function mapStateToProps(state, ownProps) {
const {
diff --git a/web/js/containers/sidebar/layer.js b/web/js/containers/sidebar/layer.js
index 171dc94a3..50bd094de 100644
--- a/web/js/containers/sidebar/layer.js
+++ b/web/js/containers/sidebar/layer.js
@@ -268,7 +268,9 @@ Layer.propTypes = {
onRemoveClick: PropTypes.func,
toggleVisibility: PropTypes.func,
onInfoClick: PropTypes.func,
- hover: PropTypes.func
+ hover: PropTypes.func,
+ onOptionsClick: PropTypes.func,
+ hasPalette: PropTypes.bool
};
function mapStateToProps(state, ownProps) {
const {
diff --git a/web/js/containers/tour.js b/web/js/containers/tour.js
index 646718660..d52cd7d5d 100644
--- a/web/js/containers/tour.js
+++ b/web/js/containers/tour.js
@@ -18,7 +18,6 @@ import ErrorBoundary from './error-boundary';
import update from 'immutability-helper';
import { history } from '../main';
import util from '../util/util';
-import { parse } from '../parse';
const DEFAULT_STATE = {
modalStart: true,
@@ -322,19 +321,6 @@ class Tour extends React.Component {
}
}
-Tour.propTypes = {
- config: PropTypes.object.isRequired,
- stories: PropTypes.object.isRequired,
- storyOrder: PropTypes.array.isRequired,
- currentStep: PropTypes.number,
- totalSteps: PropTypes.number,
- currentStory: PropTypes.object,
- currentStoryId: PropTypes.string,
- selectTour: PropTypes.func.isRequired,
- showTourAlert: PropTypes.func.isRequired,
- hideTour: PropTypes.func.isRequired,
- showTour: PropTypes.func.isRequired
-};
const mapDispatchToProps = dispatch => ({
processStepLink: (search, config, rendered) => {
search = search.split('/?').pop();
@@ -343,6 +329,7 @@ const mapDispatchToProps = dispatch => ({
});
let parameters = util.fromQueryString(search);
let layers = [];
+ dispatch(stopAnimation());
if (
(parameters.l && hasCustomTypePalette(parameters.l)) ||
(parameters.l1 && hasCustomTypePalette(parameters.l1))
@@ -352,7 +339,7 @@ const mapDispatchToProps = dispatch => ({
layers.push(layersParse12(parameters.l1, config));
}
layers = uniqBy(layers, 'id');
- dispatch(stopAnimation());
+
preloadPalettes(layers, rendered, true).then(obj => {
dispatch({
type: BULK_PALETTE_RENDERING_SUCCESS,
@@ -361,7 +348,6 @@ const mapDispatchToProps = dispatch => ({
dispatch({ type: 'REDUX-LOCATION-POP-ACTION', payload: location });
});
} else {
- console.log('promised_none');
dispatch({ type: 'REDUX-LOCATION-POP-ACTION', payload: location });
}
},
@@ -434,3 +420,23 @@ export default connect(
mapStateToProps,
mapDispatchToProps
)(Tour);
+Tour.propTypes = {
+ config: PropTypes.object.isRequired,
+ stories: PropTypes.object.isRequired,
+ storyOrder: PropTypes.array.isRequired,
+ currentStep: PropTypes.number,
+ totalSteps: PropTypes.number,
+ currentStory: PropTypes.object,
+ currentStoryId: PropTypes.string,
+ selectTour: PropTypes.func.isRequired,
+ showTourAlert: PropTypes.func.isRequired,
+ hideTour: PropTypes.func.isRequired,
+ showTour: PropTypes.func.isRequired,
+ screenHeight: PropTypes.number,
+ screenWidth: PropTypes.number,
+ processStepLink: PropTypes.func,
+ isActive: PropTypes.bool,
+ endTour: PropTypes.func,
+ renderedPalettes: PropTypes.object,
+ startTour: PropTypes.func
+};