From c9970f2d285cec1d7fd3e13e8ead072c00e421c4 Mon Sep 17 00:00:00 2001 From: Julian Kingman Date: Tue, 19 Sep 2017 08:46:41 -0400 Subject: [PATCH 1/4] updated deps and converted to prop-types --- components/DropDownMenu/DropDownModal.js | 21 ++++++++------- components/GridRow.js | 3 ++- components/HorizontalPager/HorizontalPager.js | 2 +- components/HorizontalPager/Page.js | 9 ++++--- components/ImageGallery/ImageGalleryBase.js | 3 ++- components/ImageGalleryOverlay.js | 7 ++--- components/ImagePreview.js | 2 +- components/InlineGallery.js | 7 ++--- components/ListView.js | 25 ++++++++--------- components/NavigationBar/NavigationBar.js | 10 +++---- components/PageIndicators.js | 2 +- components/RichMedia.js | 3 ++- components/ScrollView/ScrollDriverProvider.js | 5 ++-- components/ScrollView/ScrollView.js | 3 ++- components/ShareButton.js | 3 ++- components/Spinner.js | 3 ++- components/Switch.js | 3 ++- components/TextInput.js | 3 ++- components/Touchable.js | 3 ++- components/TouchableNativeFeedback.js | 3 ++- components/Video/Video.js | 5 ++-- components/View.js | 3 ++- examples/RestaurantsApp/app/App.js | 7 ++--- .../RestaurantsApp/app/RestaurantDetails.js | 3 ++- .../RestaurantsApp/app/RestaurantsList.js | 3 ++- examples/components/Stage.js | 5 ++-- html/Html.js | 19 ++++++------- html/components/Gallery.js | 3 ++- html/components/Image.js | 5 ++-- html/elements/A.js | 5 ++-- html/elements/Inline.js | 5 ++-- html/elements/Video.js | 7 ++--- html/elements/list/Li.js | 3 ++- html/elements/list/Ol.js | 5 ++-- html/elements/list/Ul.js | 3 ++- navigation/CardStack.js | 21 ++++++++------- navigation/NavigationBar.js | 11 ++++---- navigation/NavigationBarView.js | 25 ++++++++--------- navigation/SceneProvider.js | 7 ++--- package.json | 27 ++++++++++--------- 40 files changed, 163 insertions(+), 129 deletions(-) diff --git a/components/DropDownMenu/DropDownModal.js b/components/DropDownMenu/DropDownModal.js index 49f3cdcb..b3d89dc3 100644 --- a/components/DropDownMenu/DropDownModal.js +++ b/components/DropDownMenu/DropDownModal.js @@ -7,6 +7,7 @@ import { LayoutAnimation, Dimensions, } from 'react-native'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { Button } from '../Button'; @@ -31,45 +32,45 @@ class DropDownModal extends Component { /** * Callback that is called when dropdown option is selected */ - onOptionSelected: React.PropTypes.func, + onOptionSelected: PropTypes.func, /** * Collection of objects which will be shown as options in DropDownMenu */ - options: React.PropTypes.array.isRequired, + options: PropTypes.array.isRequired, /** * Selected option that will be shown. */ - selectedOption: React.PropTypes.any.isRequired, + selectedOption: PropTypes.any.isRequired, /** * Key name that represents option's string value, * and it will be displayed to the user in the UI */ - titleProperty: React.PropTypes.string.isRequired, + titleProperty: PropTypes.string.isRequired, /** * Key name that represents option's value */ - valueProperty: React.PropTypes.string.isRequired, + valueProperty: PropTypes.string.isRequired, /** * Number of options shown without scroll. * Can be set trough DropDown style.visibleOptions. * Prop definition overrides style. */ - visibleOptions: React.PropTypes.number, + visibleOptions: PropTypes.number, /** * Optional render function, for every item in the list. * Input parameter should be shaped as one of the items from the * options object */ - renderOption: React.PropTypes.func, + renderOption: PropTypes.func, /** * Visibility flag, controling the modal visibility */ - visible: React.PropTypes.bool, + visible: PropTypes.bool, /** * Callback that is called when modal should be closed */ - onClose: React.PropTypes.func, - style: React.PropTypes.object, + onClose: PropTypes.func, + style: PropTypes.object, }; static defaultProps = { diff --git a/components/GridRow.js b/components/GridRow.js index e8dc8067..d7e34338 100644 --- a/components/GridRow.js +++ b/components/GridRow.js @@ -1,5 +1,6 @@ import React, { Children } from 'react'; import { View as RNView } from 'react-native'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { View } from './View'; @@ -35,7 +36,7 @@ class GridRow extends React.Component { } GridRow.propTypes = { - columns: React.PropTypes.number.isRequired, + columns: PropTypes.number.isRequired, ...RNView.propTypes, }; diff --git a/components/HorizontalPager/HorizontalPager.js b/components/HorizontalPager/HorizontalPager.js index a56fea65..ea0c703e 100644 --- a/components/HorizontalPager/HorizontalPager.js +++ b/components/HorizontalPager/HorizontalPager.js @@ -1,7 +1,7 @@ import React, { Component, - PropTypes, } from 'react'; +import { PropTypes } from 'prop-types'; import { ScrollView, diff --git a/components/HorizontalPager/Page.js b/components/HorizontalPager/Page.js index c331b28e..43f17e2e 100644 --- a/components/HorizontalPager/Page.js +++ b/components/HorizontalPager/Page.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { View } from '../../index'; @@ -9,10 +10,10 @@ import { View } from '../../index'; */ export class Page extends Component { static propTypes = { - isActive: React.PropTypes.bool.isRequired, - width: React.PropTypes.number.isRequired, - style: React.PropTypes.object, - children: React.PropTypes.node, + isActive: PropTypes.bool.isRequired, + width: PropTypes.number.isRequired, + style: PropTypes.object, + children: PropTypes.node, }; shouldComponentUpdate(nextProps) { diff --git a/components/ImageGallery/ImageGalleryBase.js b/components/ImageGallery/ImageGalleryBase.js index 006d2e44..df51e90e 100644 --- a/components/ImageGallery/ImageGalleryBase.js +++ b/components/ImageGallery/ImageGalleryBase.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; diff --git a/components/ImageGalleryOverlay.js b/components/ImageGalleryOverlay.js index 92cd5e67..ced632f0 100644 --- a/components/ImageGalleryOverlay.js +++ b/components/ImageGalleryOverlay.js @@ -2,6 +2,7 @@ import React, { Component } from 'react'; import { ScrollView, } from 'react-native'; +import { PropTypes } from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { connectAnimation } from '@shoutem/animation'; @@ -23,9 +24,9 @@ const DESCRIPTION_LENGTH_TRIM_LIMIT = 90; */ class ImageGalleryOverlay extends Component { static propTypes = { - title: React.PropTypes.string, - description: React.PropTypes.string, - style: React.PropTypes.object, + title: PropTypes.string, + description: PropTypes.string, + style: PropTypes.object, }; constructor(props) { diff --git a/components/ImagePreview.js b/components/ImagePreview.js index 2f1a140c..74ce0130 100644 --- a/components/ImagePreview.js +++ b/components/ImagePreview.js @@ -1,5 +1,4 @@ import React, { - PropTypes, Component, } from 'react'; import { @@ -8,6 +7,7 @@ import { Image, TouchableOpacity, } from 'react-native'; +import { PropTypes } from 'prop-types'; import Icon from 'react-native-vector-icons/MaterialIcons'; diff --git a/components/InlineGallery.js b/components/InlineGallery.js index bee3748e..82f00eee 100644 --- a/components/InlineGallery.js +++ b/components/InlineGallery.js @@ -1,4 +1,5 @@ -import React, { Component, PropTypes } from 'react'; +import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { connectStyle } from '@shoutem/theme'; @@ -14,8 +15,8 @@ class InlineGallery extends Component { // Array containing objects with image data (shape defined below) data: PropTypes.arrayOf( PropTypes.shape({ - source: React.PropTypes.shape({ - uri: React.PropTypes.string, + source: PropTypes.shape({ + uri: PropTypes.string, }), }), ).isRequired, diff --git a/components/ListView.js b/components/ListView.js index 86a1454d..77c618c9 100644 --- a/components/ListView.js +++ b/components/ListView.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { View, ListView as RNListView, @@ -65,18 +66,18 @@ class ListDataSource { class ListView extends React.Component { static propTypes = { - autoHideHeader: React.PropTypes.bool, - style: React.PropTypes.object, - data: React.PropTypes.array, - loading: React.PropTypes.bool, - onLoadMore: React.PropTypes.func, - onRefresh: React.PropTypes.func, - getSectionId: React.PropTypes.func, - renderRow: React.PropTypes.func, - renderHeader: React.PropTypes.func, - renderFooter: React.PropTypes.func, - renderSectionHeader: React.PropTypes.func, - scrollDriver: React.PropTypes.object, + autoHideHeader: PropTypes.bool, + style: PropTypes.object, + data: PropTypes.array, + loading: PropTypes.bool, + onLoadMore: PropTypes.func, + onRefresh: PropTypes.func, + getSectionId: PropTypes.func, + renderRow: PropTypes.func, + renderHeader: PropTypes.func, + renderFooter: PropTypes.func, + renderSectionHeader: PropTypes.func, + scrollDriver: PropTypes.object, // TODO(Braco) - add render separator }; diff --git a/components/NavigationBar/NavigationBar.js b/components/NavigationBar/NavigationBar.js index f6cbb660..7fb31624 100644 --- a/components/NavigationBar/NavigationBar.js +++ b/components/NavigationBar/NavigationBar.js @@ -55,11 +55,11 @@ function setStatusBarStyle(backgroundColor) { // eslint-disable-next-line react/prefer-stateless-function class NavigationBar extends Component { static propTypes = { - leftComponent: React.PropTypes.node, - centerComponent: React.PropTypes.node, - rightComponent: React.PropTypes.node, - style: React.PropTypes.object, - id: React.PropTypes.string, + leftComponent: PropTypes.node, + centerComponent: PropTypes.node, + rightComponent: PropTypes.node, + style: PropTypes.object, + id: PropTypes.string, }; static defaultProps = { diff --git a/components/PageIndicators.js b/components/PageIndicators.js index 9c3a21da..51a7925b 100644 --- a/components/PageIndicators.js +++ b/components/PageIndicators.js @@ -1,7 +1,7 @@ import React, { Component, - PropTypes, } from 'react'; +import { PropTypes } from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { View } from './View'; diff --git a/components/RichMedia.js b/components/RichMedia.js index e31c64f8..57f75538 100644 --- a/components/RichMedia.js +++ b/components/RichMedia.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { Html } from '../html'; export default function RichMedia({ body }) { @@ -7,5 +8,5 @@ export default function RichMedia({ body }) { } RichMedia.propTypes = { - body: React.PropTypes.string.isRequired, + body: PropTypes.string.isRequired, }; diff --git a/components/ScrollView/ScrollDriverProvider.js b/components/ScrollView/ScrollDriverProvider.js index d1b67188..cd5ba49c 100644 --- a/components/ScrollView/ScrollDriverProvider.js +++ b/components/ScrollView/ScrollDriverProvider.js @@ -1,4 +1,5 @@ import React, { Component, Children } from 'react'; +import { PropTypes } from 'prop-types'; import { DriverShape, ScrollDriver } from '@shoutem/animation'; import * as _ from 'lodash'; /** @@ -9,7 +10,7 @@ import * as _ from 'lodash'; */ export class ScrollDriverProvider extends Component { static childContextTypes = { - driverProvider: React.PropTypes.object, + driverProvider: PropTypes.object, animationDriver: DriverShape, }; @@ -18,7 +19,7 @@ export class ScrollDriverProvider extends Component { }; static propTypes = { - children: React.PropTypes.node, + children: PropTypes.node, driver: DriverShape, }; diff --git a/components/ScrollView/ScrollView.js b/components/ScrollView/ScrollView.js index 9d19de44..3acf7099 100644 --- a/components/ScrollView/ScrollView.js +++ b/components/ScrollView/ScrollView.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { Animated } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; @@ -14,7 +15,7 @@ class ScrollView extends Component { static contextTypes = { animationDriver: DriverShape, - driverProvider: React.PropTypes.object, + driverProvider: PropTypes.object, }; static childContextTypes = { diff --git a/components/ShareButton.js b/components/ShareButton.js index 0f2d945c..49b8dcb4 100644 --- a/components/ShareButton.js +++ b/components/ShareButton.js @@ -1,6 +1,7 @@ import React, { Component, } from 'react'; +import { PropTypes } from 'prop-types'; import { Alert } from 'react-native'; @@ -13,7 +14,7 @@ import { Icon } from './Icon'; const USER_CANCELLED_ERROR = 'User did not share'; -const { func, string } = React.PropTypes; +const { func, string } = PropTypes; const showErrorMessage = (error) => { if (error.error === USER_CANCELLED_ERROR) { diff --git a/components/Spinner.js b/components/Spinner.js index 21c09aed..2623bd65 100644 --- a/components/Spinner.js +++ b/components/Spinner.js @@ -2,6 +2,7 @@ import React from 'react'; import { ActivityIndicator, } from 'react-native'; +import { PropTypes } from 'prop-types'; import { connectStyle } from '@shoutem/theme'; @@ -24,7 +25,7 @@ class Spinner extends React.Component { } Spinner.propTypes = { - style: React.PropTypes.object, + style: PropTypes.object, }; const StyledSpinner = connectStyle('shoutem.ui.Spinner', { diff --git a/components/Switch.js b/components/Switch.js index 9d86b25c..5b24743a 100644 --- a/components/Switch.js +++ b/components/Switch.js @@ -1,6 +1,7 @@ import React, { Component, } from 'react'; +import { PropTypes } from 'prop-types'; import { TouchableWithoutFeedback } from 'react-native'; @@ -9,7 +10,7 @@ import { View } from '@shoutem/ui'; import { connectStyle } from '@shoutem/theme'; import { connectAnimation, TimingDriver } from '@shoutem/animation'; -const { bool, func, object, shape } = React.PropTypes; +const { bool, func, object, shape } = PropTypes; class Switch extends Component { static propTypes = { diff --git a/components/TextInput.js b/components/TextInput.js index 28ecd2b3..707f0bf7 100644 --- a/components/TextInput.js +++ b/components/TextInput.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import { TextInput as RNTextInput } from 'react-native'; +import { PropTypes } from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { connectAnimation } from '@shoutem/animation'; @@ -28,7 +29,7 @@ class TextInput extends Component { TextInput.propTypes = { ...RNTextInput.propTypes, - style: React.PropTypes.object, + style: PropTypes.object, }; const AnimatedTextInput = connectAnimation(TextInput); diff --git a/components/Touchable.js b/components/Touchable.js index e40134c6..a43a0673 100644 --- a/components/Touchable.js +++ b/components/Touchable.js @@ -1,5 +1,6 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; import { Platform } from 'react-native'; +import { PropTypes } from 'prop-types'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/TouchableNativeFeedback.js b/components/TouchableNativeFeedback.js index efb72403..b0b8f2b8 100644 --- a/components/TouchableNativeFeedback.js +++ b/components/TouchableNativeFeedback.js @@ -1,4 +1,5 @@ -import React, { PropTypes } from 'react'; +import React from 'react'; +import { PropTypes } from 'prop-types'; import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/Video/Video.js b/components/Video/Video.js index 068adc3c..185a4e7e 100644 --- a/components/Video/Video.js +++ b/components/Video/Video.js @@ -1,6 +1,5 @@ -import React, { - PropTypes, -} from 'react'; +import React from 'react'; +import { PropTypes } from 'prop-types'; import { View, diff --git a/components/View.js b/components/View.js index 5590db44..358df63b 100644 --- a/components/View.js +++ b/components/View.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { View as RNView } from 'react-native'; import { connectStyle } from '@shoutem/theme'; @@ -35,7 +36,7 @@ class View extends Component { View.propTypes = { ...RNView.propTypes, - style: React.PropTypes.object, + style: PropTypes.object, }; const AnimatedView = connectAnimation(View); diff --git a/examples/RestaurantsApp/app/App.js b/examples/RestaurantsApp/app/App.js index 4538e657..a259a86c 100644 --- a/examples/RestaurantsApp/app/App.js +++ b/examples/RestaurantsApp/app/App.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { connect } from 'react-redux'; import { @@ -12,9 +13,9 @@ import RestaurantDetails from './RestaurantDetails'; class App extends Component { static propTypes = { - onNavigateBack: React.PropTypes.func.isRequired, - navigationState: React.PropTypes.object, - scene: React.PropTypes.object, + onNavigateBack: PropTypes.func.isRequired, + navigationState: PropTypes.object, + scene: PropTypes.object, }; constructor(props) { diff --git a/examples/RestaurantsApp/app/RestaurantDetails.js b/examples/RestaurantsApp/app/RestaurantDetails.js index 4368f65c..8941d4b0 100644 --- a/examples/RestaurantsApp/app/RestaurantDetails.js +++ b/examples/RestaurantsApp/app/RestaurantDetails.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { ScrollView, Icon, @@ -19,7 +20,7 @@ import { export default class RestaurantDetails extends Component { static propTypes = { - restaurant: React.PropTypes.object, + restaurant: PropTypes.object, }; render() { diff --git a/examples/RestaurantsApp/app/RestaurantsList.js b/examples/RestaurantsApp/app/RestaurantsList.js index 5faa248a..cef71549 100644 --- a/examples/RestaurantsApp/app/RestaurantsList.js +++ b/examples/RestaurantsApp/app/RestaurantsList.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { Image, ListView, @@ -19,7 +20,7 @@ import { navigatePush } from './redux'; class RestaurantsList extends Component { static propTypes = { - onButtonPress: React.PropTypes.func, + onButtonPress: PropTypes.func, }; constructor(props) { diff --git a/examples/components/Stage.js b/examples/components/Stage.js index f11dd9a6..de4e2533 100644 --- a/examples/components/Stage.js +++ b/examples/components/Stage.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { View, Text } from 'react-native'; @@ -14,8 +15,8 @@ function Stage({ title, children }) { } Stage.propTypes = { - title: React.PropTypes.string, - children: React.PropTypes.node, + title: PropTypes.string, + children: PropTypes.node, }; const styles = { diff --git a/html/Html.js b/html/Html.js index 04e3953e..fed61d58 100644 --- a/html/Html.js +++ b/html/Html.js @@ -1,5 +1,6 @@ import React, { Component } from 'react'; import { Platform, InteractionManager } from 'react-native'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { View, Spinner } from '@shoutem/ui'; @@ -20,9 +21,9 @@ const defaultElementSettings = { class Html extends Component { static propTypes = { - body: React.PropTypes.string.isRequired, - renderElement: React.PropTypes.func, - style: React.PropTypes.object, + body: PropTypes.string.isRequired, + renderElement: PropTypes.func, + style: PropTypes.object, }; /** @@ -152,12 +153,12 @@ class Html extends Component { } export const ElementPropTypes = { - childElements: React.PropTypes.array, - renderElement: React.PropTypes.func, - inlineStyle: React.PropTypes.string, - children: React.PropTypes.oneOfType([ - React.PropTypes.arrayOf(React.PropTypes.node), - React.PropTypes.node, + childElements: PropTypes.array, + renderElement: PropTypes.func, + inlineStyle: PropTypes.string, + children: PropTypes.oneOfType([ + PropTypes.arrayOf(PropTypes.node), + PropTypes.node, ]), }; diff --git a/html/components/Gallery.js b/html/components/Gallery.js index 4f361dd3..53c964bf 100644 --- a/html/components/Gallery.js +++ b/html/components/Gallery.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { InlineGallery } from '../../components/InlineGallery'; @@ -9,7 +10,7 @@ import { InlineGallery } from '../../components/InlineGallery'; export default class Gallery extends Component { static propTypes = { ...InlineGallery.propTypes, - handlePhotoPress: React.PropTypes.func, + handlePhotoPress: PropTypes.func, }; constructor(props) { diff --git a/html/components/Image.js b/html/components/Image.js index 85d0abf8..33a0eb9f 100644 --- a/html/components/Image.js +++ b/html/components/Image.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import { Image as RNImage } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; @@ -15,8 +16,8 @@ import { Lightbox } from '../../components/Lightbox'; export default class HtmlImage extends Component { static propTypes = { ...RNImage.propTypes, - lightbox: React.PropTypes.bool, - allowUpscale: React.PropTypes.bool, + lightbox: PropTypes.bool, + allowUpscale: PropTypes.bool, }; static defaultProps = { diff --git a/html/elements/A.js b/html/elements/A.js index 2853798e..de63f8f8 100644 --- a/html/elements/A.js +++ b/html/elements/A.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { Linking } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; @@ -10,8 +11,8 @@ import { Inline } from './Inline'; class A extends React.Component { static propTypes = { ...ElementPropTypes, - handleLinkPress: React.PropTypes.func, - href: React.PropTypes.string, + handleLinkPress: PropTypes.func, + href: PropTypes.string, }; constructor(props, context) { diff --git a/html/elements/Inline.js b/html/elements/Inline.js index 7218e8be..5021fe50 100644 --- a/html/elements/Inline.js +++ b/html/elements/Inline.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { View } from '../../components/View'; @@ -135,8 +136,8 @@ export class Inline extends React.Component { static propTypes = { ...ElementPropTypes, - onPress: React.PropTypes.func, - onLineBreak: React.PropTypes.func, + onPress: PropTypes.func, + onLineBreak: PropTypes.func, }; static defaultProps = { diff --git a/html/elements/Video.js b/html/elements/Video.js index 70ef30e2..d1dfb46e 100644 --- a/html/elements/Video.js +++ b/html/elements/Video.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { View } from '../../components/View'; import { Video as UIVideo } from '../../components/Video'; import Image from '../components/Image'; @@ -24,9 +25,9 @@ function Video({ src, thumbnailUrl, style }) { } Video.propTypes = { - src: React.PropTypes.string, - thumbnail_url: React.PropTypes.string, - style: React.PropTypes.object, + src: PropTypes.string, + thumbnail_url: PropTypes.string, + style: PropTypes.object, }; Video.defaultProps = { diff --git a/html/elements/list/Li.js b/html/elements/list/Li.js index 5a8df646..6761a332 100644 --- a/html/elements/list/Li.js +++ b/html/elements/list/Li.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { View } from '../../../components/View'; import { ElementPropTypes } from '../../Html'; @@ -27,7 +28,7 @@ function Li({ element, renderElement, style }) { Li.propTypes = { ...ElementPropTypes, - prefix: React.PropTypes.element, + prefix: PropTypes.element, }; export default Li; diff --git a/html/elements/list/Ol.js b/html/elements/list/Ol.js index 2f6388e2..bb3ba961 100644 --- a/html/elements/list/Ol.js +++ b/html/elements/list/Ol.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { View } from '../../../components/View'; import { Text } from '../../../components/Text'; @@ -27,8 +28,8 @@ export function Ol({ style, childElements, type, renderElement }) { Ol.propTypes = { ...ElementPropTypes, - style: React.PropTypes.object, - type: React.PropTypes.string, + style: PropTypes.object, + type: PropTypes.string, }; export default combineMappers(mapElementProps)(Ol); diff --git a/html/elements/list/Ul.js b/html/elements/list/Ul.js index 04fbf0f0..d8f29170 100644 --- a/html/elements/list/Ul.js +++ b/html/elements/list/Ul.js @@ -1,4 +1,5 @@ import React from 'react'; +import { PropTypes } from 'prop-types'; import { Text } from '@shoutem/ui'; import { View } from '../../../components/View'; @@ -25,7 +26,7 @@ export function Ul({ style, childElements, renderElement }) { Ul.propTypes = { ...ElementPropTypes, - style: React.PropTypes.object, + style: PropTypes.object, }; export default combineMappers(mapElementProps)(Ul); diff --git a/navigation/CardStack.js b/navigation/CardStack.js index e82c6098..5bdba633 100644 --- a/navigation/CardStack.js +++ b/navigation/CardStack.js @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react'; +import { PropTypes } from 'prop-types'; import { InteractionManager, } from 'react-native'; @@ -23,17 +24,17 @@ import { RNCardStack } from './RNCardStack'; class CardStack extends PureComponent { static propTypes = { ...RNCardStack.propTypes, - renderNavBar: React.PropTypes.func, + renderNavBar: PropTypes.func, // Controls whether native animation driver will be used // for screen transitions or not. - useNativeAnimations: React.PropTypes.bool, + useNativeAnimations: PropTypes.bool, // Controls whether the navigation bar should be rendered, // together with the screen, or should it be global for the // entire app. - inlineNavigationBar: React.PropTypes.bool, - style: React.PropTypes.shape({ + inlineNavigationBar: PropTypes.bool, + style: PropTypes.shape({ cardStack: RNCardStack.propTypes.style, - card: React.PropTypes.any, + card: PropTypes.any, }), }; @@ -43,14 +44,14 @@ class CardStack extends PureComponent { }; static contextTypes = { - getNavBarProps: React.PropTypes.func, - getScene: React.PropTypes.func, + getNavBarProps: PropTypes.func, + getScene: PropTypes.func, }; static childContextTypes = { - setNavBarProps: React.PropTypes.func, - getNavBarProps: React.PropTypes.func, - clearNavBarProps: React.PropTypes.func, + setNavBarProps: PropTypes.func, + getNavBarProps: PropTypes.func, + clearNavBarProps: PropTypes.func, }; constructor(props, context) { diff --git a/navigation/NavigationBar.js b/navigation/NavigationBar.js index c96c2691..ef023e7e 100644 --- a/navigation/NavigationBar.js +++ b/navigation/NavigationBar.js @@ -1,4 +1,5 @@ import React, { Component } from 'react'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import { DriverShape } from '@shoutem/animation'; import { connectStyle } from '@shoutem/theme'; @@ -18,21 +19,21 @@ class NavigationBar extends Component { /** * If `true`, the navigation bar will not be rendered. */ - hidden: React.PropTypes.bool, + hidden: PropTypes.bool, /** * Use the child navigation bar instead, if `true` * the parent navigation bar will be hidden, and * the navigation bar props will be merged with the * props of the child navigation bar instead. */ - child: React.PropTypes.bool, + child: PropTypes.bool, }; static contextTypes = { animationDriver: DriverShape, - getScene: React.PropTypes.func.isRequired, - setNavBarProps: React.PropTypes.func.isRequired, - clearNavBarProps: React.PropTypes.func.isRequired, + getScene: PropTypes.func.isRequired, + setNavBarProps: PropTypes.func.isRequired, + clearNavBarProps: PropTypes.func.isRequired, }; constructor(props, context) { diff --git a/navigation/NavigationBarView.js b/navigation/NavigationBarView.js index 760f7964..d675101e 100644 --- a/navigation/NavigationBarView.js +++ b/navigation/NavigationBarView.js @@ -1,4 +1,5 @@ import React, { PureComponent } from 'react'; +import { PropTypes } from 'prop-types'; import _ from 'lodash'; import tinyColor from 'tinycolor2'; @@ -63,24 +64,24 @@ class NavigationBarView extends PureComponent { /** * The title to display in the navigation bar. */ - title: React.PropTypes.string, + title: PropTypes.string, /** * If this prop exists, and has a valid link, * a share control will be rendered as the right * component of the navigation bar. */ - share: React.PropTypes.shape({ - title: React.PropTypes.string, - text: React.PropTypes.string, - link: React.PropTypes.string, + share: PropTypes.shape({ + title: PropTypes.string, + text: PropTypes.string, + link: PropTypes.string, }), - style: React.PropTypes.object, - useNativeAnimations: React.PropTypes.bool, + style: PropTypes.object, + useNativeAnimations: PropTypes.bool, // Whether the navigation bar is rendered inline // with the screen. - inline: React.PropTypes.bool, - hidden: React.PropTypes.bool, - child: React.PropTypes.bool, + inline: PropTypes.bool, + hidden: PropTypes.bool, + child: PropTypes.bool, }; static defaultProps = { @@ -91,8 +92,8 @@ class NavigationBarView extends PureComponent { }; static contextTypes = { - transformProps: React.PropTypes.func.isRequired, - getNavBarProps: React.PropTypes.func.isRequired, + transformProps: PropTypes.func.isRequired, + getNavBarProps: PropTypes.func.isRequired, }; componentWillReceiveProps(nextProps) { diff --git a/navigation/SceneProvider.js b/navigation/SceneProvider.js index 02312145..275cea77 100644 --- a/navigation/SceneProvider.js +++ b/navigation/SceneProvider.js @@ -1,16 +1,17 @@ import React, { Children, Component } from 'react'; +import { PropTypes } from 'prop-types'; /** * Provides the current navigation scene to child components. */ export class SceneProvider extends Component { static propTypes = { - children: React.PropTypes.node, - scene: React.PropTypes.object.isRequired, + children: PropTypes.node, + scene: PropTypes.object.isRequired, }; static childContextTypes = { - getScene: React.PropTypes.func.isRequired, + getScene: PropTypes.func.isRequired, }; constructor(props, context) { diff --git a/package.json b/package.json index 37e4017e..1714c997 100644 --- a/package.json +++ b/package.json @@ -6,21 +6,22 @@ "@shoutem/animation": "~0.11.0", "@shoutem/theme": "~0.10.0", "babel-plugin-transform-decorators-legacy": "~1.3.4", - "buffer": "~4.5.1", - "events": "1.1.0", + "buffer": "^5.0.7", + "events": "^1.1.1", "html-entities": "~1.2.0", "htmlparser2": "~3.9.0", - "lodash": "~4.15.0", - "qs": "~4.0.0", + "lodash": "^4.17.4", + "prop-types": "^15.5.10", + "qs": "^6.5.1", "react-native-lightbox": "shoutem/react-native-lightbox#4e58b9b1aca166142d69b161ff511efc3358ff9f", - "react-native-linear-gradient": "~2.0.0", + "react-native-linear-gradient": "^2.3.0", + "react-native-navigation-experimental-compat": "1.0.0", + "react-native-photo-view": "^1.4.0", "react-native-share": "~1.0.19", "react-native-transformable-image": "shoutem/react-native-transformable-image#7d15395ec3857571711a12bc08f24f3a96ff1cde", - "react-native-vector-icons": "~4.0.0", - "react-native-photo-view": "~1.2.0", - "react-native-navigation-experimental-compat": "1.0.0", + "react-native-vector-icons": "^4.4.0", "stream": "0.0.2", - "tinycolor2": "~1.3.0" + "tinycolor2": "^1.4.1" }, "peerDependencies": { "react": "^15.0.0", @@ -28,14 +29,14 @@ }, "devDependencies": { "babel": "^6.3.26", - "babel-preset-react-native": "^1.9.0", - "chai": "^3.4.1", + "babel-preset-react-native": "^4.0.0", + "chai": "^4.1.2", "deep-freeze": "0.0.1", "enzyme": "^2.0.0-rc1", - "mocha": "^2.3.4", + "mocha": "^3.5.3", "react-addons-test-utils": "^15.3.1", "react-dom": "^15.3.1", - "react-native-mock": "^0.2.5" + "react-native-mock": "^0.3.1" }, "scripts": { "test": "mocha -R spec --require test-utils/setup.js --require react-native-mock/mock.js --compilers js:babel-core/register $(find . -name '*.spec.js' ! -ipath '*node_modules*')" From 67f9f7c7bc22287c078e86ee502fc5266aead7a6 Mon Sep 17 00:00:00 2001 From: Julian Kingman Date: Tue, 19 Sep 2017 08:51:01 -0400 Subject: [PATCH 2/4] default import --- components/DropDownMenu/DropDownModal.js | 2 +- components/GridRow.js | 2 +- components/HorizontalPager/HorizontalPager.js | 2 +- components/HorizontalPager/Page.js | 2 +- components/ImageGallery/ImageGalleryBase.js | 2 +- components/ImageGalleryOverlay.js | 2 +- components/ImagePreview.js | 2 +- components/InlineGallery.js | 2 +- components/ListView.js | 2 +- components/PageIndicators.js | 2 +- components/RichMedia.js | 2 +- components/ScrollView/ScrollDriverProvider.js | 2 +- components/ScrollView/ScrollView.js | 2 +- components/ShareButton.js | 2 +- components/Spinner.js | 2 +- components/Switch.js | 2 +- components/TextInput.js | 2 +- components/Touchable.js | 2 +- components/TouchableNativeFeedback.js | 2 +- components/Video/Video.js | 2 +- components/View.js | 2 +- examples/RestaurantsApp/app/App.js | 2 +- examples/RestaurantsApp/app/RestaurantDetails.js | 2 +- examples/RestaurantsApp/app/RestaurantsList.js | 2 +- examples/components/Stage.js | 2 +- html/Html.js | 2 +- html/components/Gallery.js | 2 +- html/components/Image.js | 2 +- html/elements/A.js | 2 +- html/elements/Inline.js | 2 +- html/elements/Video.js | 2 +- html/elements/list/Li.js | 2 +- html/elements/list/Ol.js | 2 +- html/elements/list/Ul.js | 2 +- navigation/CardStack.js | 2 +- navigation/NavigationBar.js | 2 +- navigation/NavigationBarView.js | 2 +- navigation/SceneProvider.js | 2 +- 38 files changed, 38 insertions(+), 38 deletions(-) diff --git a/components/DropDownMenu/DropDownModal.js b/components/DropDownMenu/DropDownModal.js index b3d89dc3..bf3ae6e4 100644 --- a/components/DropDownMenu/DropDownModal.js +++ b/components/DropDownMenu/DropDownModal.js @@ -7,7 +7,7 @@ import { LayoutAnimation, Dimensions, } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { Button } from '../Button'; diff --git a/components/GridRow.js b/components/GridRow.js index d7e34338..a3ec3208 100644 --- a/components/GridRow.js +++ b/components/GridRow.js @@ -1,6 +1,6 @@ import React, { Children } from 'react'; import { View as RNView } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { View } from './View'; diff --git a/components/HorizontalPager/HorizontalPager.js b/components/HorizontalPager/HorizontalPager.js index ea0c703e..9ae16fd1 100644 --- a/components/HorizontalPager/HorizontalPager.js +++ b/components/HorizontalPager/HorizontalPager.js @@ -1,7 +1,7 @@ import React, { Component, } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { ScrollView, diff --git a/components/HorizontalPager/Page.js b/components/HorizontalPager/Page.js index 43f17e2e..dfe37981 100644 --- a/components/HorizontalPager/Page.js +++ b/components/HorizontalPager/Page.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View } from '../../index'; diff --git a/components/ImageGallery/ImageGalleryBase.js b/components/ImageGallery/ImageGalleryBase.js index df51e90e..f5ed7826 100644 --- a/components/ImageGallery/ImageGalleryBase.js +++ b/components/ImageGallery/ImageGalleryBase.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; diff --git a/components/ImageGalleryOverlay.js b/components/ImageGalleryOverlay.js index ced632f0..2c55e6dd 100644 --- a/components/ImageGalleryOverlay.js +++ b/components/ImageGalleryOverlay.js @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import { ScrollView, } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { connectAnimation } from '@shoutem/animation'; diff --git a/components/ImagePreview.js b/components/ImagePreview.js index 74ce0130..2c86c8e6 100644 --- a/components/ImagePreview.js +++ b/components/ImagePreview.js @@ -7,7 +7,7 @@ import { Image, TouchableOpacity, } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import Icon from 'react-native-vector-icons/MaterialIcons'; diff --git a/components/InlineGallery.js b/components/InlineGallery.js index 82f00eee..161df25c 100644 --- a/components/InlineGallery.js +++ b/components/InlineGallery.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/ListView.js b/components/ListView.js index 77c618c9..59678d79 100644 --- a/components/ListView.js +++ b/components/ListView.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View, ListView as RNListView, diff --git a/components/PageIndicators.js b/components/PageIndicators.js index 51a7925b..42a78e1f 100644 --- a/components/PageIndicators.js +++ b/components/PageIndicators.js @@ -1,7 +1,7 @@ import React, { Component, } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { View } from './View'; diff --git a/components/RichMedia.js b/components/RichMedia.js index 57f75538..c48d7597 100644 --- a/components/RichMedia.js +++ b/components/RichMedia.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Html } from '../html'; export default function RichMedia({ body }) { diff --git a/components/ScrollView/ScrollDriverProvider.js b/components/ScrollView/ScrollDriverProvider.js index cd5ba49c..15c2493e 100644 --- a/components/ScrollView/ScrollDriverProvider.js +++ b/components/ScrollView/ScrollDriverProvider.js @@ -1,5 +1,5 @@ import React, { Component, Children } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { DriverShape, ScrollDriver } from '@shoutem/animation'; import * as _ from 'lodash'; /** diff --git a/components/ScrollView/ScrollView.js b/components/ScrollView/ScrollView.js index 3acf7099..e5ac70bb 100644 --- a/components/ScrollView/ScrollView.js +++ b/components/ScrollView/ScrollView.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Animated } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; diff --git a/components/ShareButton.js b/components/ShareButton.js index 49b8dcb4..51b99c4c 100644 --- a/components/ShareButton.js +++ b/components/ShareButton.js @@ -1,7 +1,7 @@ import React, { Component, } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Alert } from 'react-native'; diff --git a/components/Spinner.js b/components/Spinner.js index 2623bd65..ad3f49c5 100644 --- a/components/Spinner.js +++ b/components/Spinner.js @@ -2,7 +2,7 @@ import React from 'react'; import { ActivityIndicator, } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/Switch.js b/components/Switch.js index 5b24743a..adae1581 100644 --- a/components/Switch.js +++ b/components/Switch.js @@ -1,7 +1,7 @@ import React, { Component, } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { TouchableWithoutFeedback } from 'react-native'; diff --git a/components/TextInput.js b/components/TextInput.js index 707f0bf7..b885c1aa 100644 --- a/components/TextInput.js +++ b/components/TextInput.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { TextInput as RNTextInput } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connectStyle } from '@shoutem/theme'; import { connectAnimation } from '@shoutem/animation'; diff --git a/components/Touchable.js b/components/Touchable.js index a43a0673..2a634599 100644 --- a/components/Touchable.js +++ b/components/Touchable.js @@ -1,6 +1,6 @@ import React from 'react'; import { Platform } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/TouchableNativeFeedback.js b/components/TouchableNativeFeedback.js index b0b8f2b8..46dd6ea0 100644 --- a/components/TouchableNativeFeedback.js +++ b/components/TouchableNativeFeedback.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native'; import { connectStyle } from '@shoutem/theme'; diff --git a/components/Video/Video.js b/components/Video/Video.js index 185a4e7e..ffc248a8 100644 --- a/components/Video/Video.js +++ b/components/Video/Video.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View, diff --git a/components/View.js b/components/View.js index 358df63b..81985202 100644 --- a/components/View.js +++ b/components/View.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View as RNView } from 'react-native'; import { connectStyle } from '@shoutem/theme'; diff --git a/examples/RestaurantsApp/app/App.js b/examples/RestaurantsApp/app/App.js index a259a86c..607b17d0 100644 --- a/examples/RestaurantsApp/app/App.js +++ b/examples/RestaurantsApp/app/App.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { connect } from 'react-redux'; import { diff --git a/examples/RestaurantsApp/app/RestaurantDetails.js b/examples/RestaurantsApp/app/RestaurantDetails.js index 8941d4b0..bef1b96b 100644 --- a/examples/RestaurantsApp/app/RestaurantDetails.js +++ b/examples/RestaurantsApp/app/RestaurantDetails.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { ScrollView, Icon, diff --git a/examples/RestaurantsApp/app/RestaurantsList.js b/examples/RestaurantsApp/app/RestaurantsList.js index cef71549..7b02f33c 100644 --- a/examples/RestaurantsApp/app/RestaurantsList.js +++ b/examples/RestaurantsApp/app/RestaurantsList.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Image, ListView, diff --git a/examples/components/Stage.js b/examples/components/Stage.js index de4e2533..39ba1a85 100644 --- a/examples/components/Stage.js +++ b/examples/components/Stage.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View, Text } from 'react-native'; diff --git a/html/Html.js b/html/Html.js index fed61d58..64876623 100644 --- a/html/Html.js +++ b/html/Html.js @@ -1,6 +1,6 @@ import React, { Component } from 'react'; import { Platform, InteractionManager } from 'react-native'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { View, Spinner } from '@shoutem/ui'; diff --git a/html/components/Gallery.js b/html/components/Gallery.js index 53c964bf..65b7dcfc 100644 --- a/html/components/Gallery.js +++ b/html/components/Gallery.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { InlineGallery } from '../../components/InlineGallery'; diff --git a/html/components/Image.js b/html/components/Image.js index 33a0eb9f..832fa94f 100644 --- a/html/components/Image.js +++ b/html/components/Image.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Image as RNImage } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; diff --git a/html/elements/A.js b/html/elements/A.js index de63f8f8..4910a307 100644 --- a/html/elements/A.js +++ b/html/elements/A.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Linking } from 'react-native'; import { connectStyle } from '@shoutem/theme'; import _ from 'lodash'; diff --git a/html/elements/Inline.js b/html/elements/Inline.js index 5021fe50..f1ae34bb 100644 --- a/html/elements/Inline.js +++ b/html/elements/Inline.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { View } from '../../components/View'; diff --git a/html/elements/Video.js b/html/elements/Video.js index d1dfb46e..d400a7a4 100644 --- a/html/elements/Video.js +++ b/html/elements/Video.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View } from '../../components/View'; import { Video as UIVideo } from '../../components/Video'; import Image from '../components/Image'; diff --git a/html/elements/list/Li.js b/html/elements/list/Li.js index 6761a332..aba1b546 100644 --- a/html/elements/list/Li.js +++ b/html/elements/list/Li.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View } from '../../../components/View'; import { ElementPropTypes } from '../../Html'; diff --git a/html/elements/list/Ol.js b/html/elements/list/Ol.js index bb3ba961..c8cb8c7b 100644 --- a/html/elements/list/Ol.js +++ b/html/elements/list/Ol.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { View } from '../../../components/View'; import { Text } from '../../../components/Text'; diff --git a/html/elements/list/Ul.js b/html/elements/list/Ul.js index d8f29170..984df39c 100644 --- a/html/elements/list/Ul.js +++ b/html/elements/list/Ul.js @@ -1,5 +1,5 @@ import React from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { Text } from '@shoutem/ui'; import { View } from '../../../components/View'; diff --git a/navigation/CardStack.js b/navigation/CardStack.js index 5bdba633..cc84e06b 100644 --- a/navigation/CardStack.js +++ b/navigation/CardStack.js @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import { InteractionManager, } from 'react-native'; diff --git a/navigation/NavigationBar.js b/navigation/NavigationBar.js index ef023e7e..e3b50ea8 100644 --- a/navigation/NavigationBar.js +++ b/navigation/NavigationBar.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import { DriverShape } from '@shoutem/animation'; import { connectStyle } from '@shoutem/theme'; diff --git a/navigation/NavigationBarView.js b/navigation/NavigationBarView.js index d675101e..c2801277 100644 --- a/navigation/NavigationBarView.js +++ b/navigation/NavigationBarView.js @@ -1,5 +1,5 @@ import React, { PureComponent } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; import _ from 'lodash'; import tinyColor from 'tinycolor2'; diff --git a/navigation/SceneProvider.js b/navigation/SceneProvider.js index 275cea77..fd29083f 100644 --- a/navigation/SceneProvider.js +++ b/navigation/SceneProvider.js @@ -1,5 +1,5 @@ import React, { Children, Component } from 'react'; -import { PropTypes } from 'prop-types'; +import PropTypes from 'prop-types'; /** * Provides the current navigation scene to child components. From ae5c2d46194dab57a14d1be8678a7abc659c3175 Mon Sep 17 00:00:00 2001 From: Julian Kingman Date: Tue, 19 Sep 2017 08:54:24 -0400 Subject: [PATCH 3/4] proptypes for NavigationBar --- components/NavigationBar/NavigationBar.js | 1 + 1 file changed, 1 insertion(+) diff --git a/components/NavigationBar/NavigationBar.js b/components/NavigationBar/NavigationBar.js index 7fb31624..d42719cc 100644 --- a/components/NavigationBar/NavigationBar.js +++ b/components/NavigationBar/NavigationBar.js @@ -5,6 +5,7 @@ import { Platform, View, } from 'react-native'; +import PropTypes from 'prop-types'; import _ from 'lodash'; From 9163e243f5f8f444b2872e4514da0b0ef5ea9803 Mon Sep 17 00:00:00 2001 From: Julian Kingman Date: Fri, 8 Dec 2017 10:04:23 -0500 Subject: [PATCH 4/4] merge conflict --- package.json | 9 --------- 1 file changed, 9 deletions(-) diff --git a/package.json b/package.json index 4bf1d971..a03e7a1e 100644 --- a/package.json +++ b/package.json @@ -14,20 +14,11 @@ "prop-types": "^15.5.10", "qs": "^6.5.1", "react-native-lightbox": "shoutem/react-native-lightbox#4e58b9b1aca166142d69b161ff511efc3358ff9f", -<<<<<<< HEAD - "react-native-linear-gradient": "^2.3.0", - "react-native-navigation-experimental-compat": "1.0.0", - "react-native-photo-view": "^1.4.0", - "react-native-share": "~1.0.19", - "react-native-transformable-image": "shoutem/react-native-transformable-image#7d15395ec3857571711a12bc08f24f3a96ff1cde", - "react-native-vector-icons": "^4.4.0", -======= "react-native-linear-gradient": "~2.2.0", "react-native-transformable-image": "shoutem/react-native-transformable-image#7d15395ec3857571711a12bc08f24f3a96ff1cde", "react-native-vector-icons": "~4.3.0", "react-native-photo-view": "~1.4.0", "react-native-navigation-experimental-compat": "1.0.0", ->>>>>>> upstream/develop "stream": "0.0.2", "tinycolor2": "^1.4.1" },