Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7,422 changes: 7,422 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 7 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,25 +41,23 @@
"eslint-plugin-react": "5.1.1",
"eslint-plugin-react-native": "1.0.2",
"mocha": "2.5.3",
"react": "^15.4.0",
"react-native": "^0.38.0"
"react": "^16.0.0",
"react-native": "^0.43.0"
},
"dependencies": {
"create-react-class": "^15.5.1",
"cubic-bezier": "^0.1.2",
"invariant": "^2.2.1",
"keymirror": "^0.1.1",
"prop-types": "^15.5.6",
"raf": "^3.2.0",
"react-addons-create-fragment": "^15.4.0",
"react-addons-perf": "^15.4.0",
"react-addons-pure-render-mixin": "^15.4.0",
"react-addons-test-utils": "^15.4.0",
"react-addons-update": "^15.4.0",
"react-dom": "^15.4.0",
"react-dom": "^16.0.0",
"react-test-renderer": "^16.0.0",
"react-timer-mixin": "^0.13.3",
"warning": "^2.1.0"
},
"peerDependencies": {
"react": "*",
"react-native": "*"
"react-native": "^0.43.0"
}
}
6 changes: 2 additions & 4 deletions src/Libraries/NavigationExperimental/NavigationPropTypes.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
class Animated {}

import React from 'react';
import PropTypes from 'prop-types';

const { PropTypes } = React;
class Animated {}

/* NavigationAction */
const action = PropTypes.shape({
Expand Down
4 changes: 1 addition & 3 deletions src/api/CameraRoll.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import invariant from 'invariant';
import React from 'react';
import PropTypes from 'prop-types';
import CameraRollManager from '../NativeModules/CameraRollManager';

const { PropTypes } = React;

const GROUP_TYPES_OPTIONS = [
'Album',
'All',
Expand Down
6 changes: 2 additions & 4 deletions src/api/LayoutAnimation.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import React from 'react';
import UIManager from '../NativeModules/UIManager';
import keyMirror from 'keymirror';

const { PropTypes } = React;
import PropTypes from 'prop-types';
import UIManager from '../NativeModules/UIManager';

const TypesEnum = {
spring: true,
Expand Down
9 changes: 4 additions & 5 deletions src/components/ActivityIndicator.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/**
* https://github.com/facebook/react-native/blob/master/Libraries/Components/ActivityIndicator/ActivityIndicator.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import NativeMethodsMixin from '../mixins/NativeMethodsMixin';
import View from './View';
import ColorPropType from '../propTypes/ColorPropType';
import View from './View';

const { PropTypes } = React;

const ActivityIndicator = React.createClass({
const ActivityIndicator = createReactClass({
propTypes: {
...View.propTypes,
/**
Expand Down
7 changes: 3 additions & 4 deletions src/components/ActivityIndicatorIOS.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
/**
* https://github.com/facebook/react-native/blob/master/Libraries/Components/ActivityIndicator/ActivityIndicatorIOS.ios.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import NativeMethodsMixin from '../mixins/NativeMethodsMixin';
import View from './View';

const { PropTypes } = React;

const ActivityIndicatorIOS = React.createClass({
const ActivityIndicatorIOS = createReactClass({
propTypes: {
...View.propTypes,
/**
Expand Down
26 changes: 13 additions & 13 deletions src/components/DrawerLayoutAndroid.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
/**
*https://github.com/facebook/react-native/blob/master/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import NativeMethodsMixin from '../mixins/NativeMethodsMixin';
import View from './View';
import UIManager from '../NativeModules/UIManager';
import ColorPropType from '../propTypes/ColorPropType';
import View from './View';

const ReactPropTypes = React.PropTypes;
const DrawerConsts = UIManager.AndroidDrawerLayout.Constants;

const DrawerLayoutAndroid = React.createClass({
const DrawerLayoutAndroid = createReactClass({

propTypes: {
...View.propTypes,
Expand All @@ -19,7 +19,7 @@ const DrawerLayoutAndroid = React.createClass({
* - 'none' (the default), drags do not dismiss the keyboard.
* - 'on-drag', the keyboard is dismissed when a drag begins.
*/
keyboardDismissMode: ReactPropTypes.oneOf([
keyboardDismissMode: PropTypes.oneOf([
'none', // default
'on-drag',
]),
Expand All @@ -38,51 +38,51 @@ const DrawerLayoutAndroid = React.createClass({
/**
* Specifies the side of the screen from which the drawer will slide in.
*/
drawerPosition: ReactPropTypes.oneOf([
drawerPosition: PropTypes.oneOf([
DrawerConsts.DrawerPosition.Left,
DrawerConsts.DrawerPosition.Right
]),
/**
* Specifies the width of the drawer, more precisely the width of the view that be pulled in
* from the edge of the window.
*/
drawerWidth: ReactPropTypes.number,
drawerWidth: PropTypes.number,
/**
* Specifies the lock mode of the drawer. The drawer can be locked in 3 states:
* - unlocked (default), meaning that the drawer will respond (open/close) to touch gestures.
* - locked-closed, meaning that the drawer will stay closed and not respond to gestures.
* - locked-open, meaning that the drawer will stay opened and not respond to gestures.
* The drawer may still be opened and closed programmatically (`openDrawer`/`closeDrawer`).
*/
drawerLockMode: ReactPropTypes.oneOf([
drawerLockMode: PropTypes.oneOf([
'unlocked',
'locked-closed',
'locked-open'
]),
/**
* Function called whenever there is an interaction with the navigation view.
*/
onDrawerSlide: ReactPropTypes.func,
onDrawerSlide: PropTypes.func,
/**
* Function called when the drawer state has changed. The drawer can be in 3 states:
* - idle, meaning there is no interaction with the navigation view happening at the time
* - dragging, meaning there is currently an interaction with the navigation view
* - settling, meaning that there was an interaction with the navigation view, and the
* navigation view is now finishing its closing or opening animation
*/
onDrawerStateChanged: ReactPropTypes.func,
onDrawerStateChanged: PropTypes.func,
/**
* Function called whenever the navigation view has been opened.
*/
onDrawerOpen: ReactPropTypes.func,
onDrawerOpen: PropTypes.func,
/**
* Function called whenever the navigation view has been closed.
*/
onDrawerClose: ReactPropTypes.func,
onDrawerClose: PropTypes.func,
/**
* The navigation view that will be rendered to the side of the screen and can be pulled in.
*/
renderNavigationView: ReactPropTypes.func.isRequired,
renderNavigationView: PropTypes.func.isRequired,

/**
* Make the drawer take the entire screen and draw the background of the
Expand Down
7 changes: 3 additions & 4 deletions src/components/Image.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
/**
* https://github.com/facebook/react-native/blob/master/Libraries/Image/Image.ios.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import styleSheetPropType from '../propTypes/StyleSheetPropType';
import NativeMethodsMixin from '../mixins/NativeMethodsMixin';
import EdgeInsetsPropType from '../propTypes/EdgeInsetsPropType';
import ImageStylePropTypes from '../propTypes/ImageStylePropTypes';
import ImageResizeMode from '../propTypes/ImageResizeMode';

const { PropTypes } = React;

const Image = React.createClass({
const Image = createReactClass({
propTypes: {
style: styleSheetPropType(ImageStylePropTypes),
/**
Expand Down
18 changes: 9 additions & 9 deletions src/components/ListView.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import React from 'react';
import ScrollResponder from '../mixins/ScrollResponder';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import TimerMixin from 'react-timer-mixin';
import ScrollView from './ScrollView';
import ScrollResponder from '../mixins/ScrollResponder';
import ListViewDataSource from '../api/ListViewDataSource';
import ScrollView from './ScrollView';

const { PropTypes } = React;
const SCROLLVIEW_REF = 'listviewscroll';


const ListView = React.createClass({
const ListView = createReactClass({
propTypes: {
...ScrollView.propTypes,

Expand Down Expand Up @@ -80,12 +80,12 @@ const ListView = React.createClass({
* A function that returns the scrollable component in which the list rows
* are rendered. Defaults to returning a ScrollView with the given props.
*/
renderScrollComponent: React.PropTypes.func.isRequired,
renderScrollComponent: PropTypes.func.isRequired,
/**
* How early to start rendering rows before they come on screen, in
* pixels.
*/
scrollRenderAheadDistance: React.PropTypes.number,
scrollRenderAheadDistance: PropTypes.number,
/**
* (visibleRows, changedRows) => void
*
Expand All @@ -95,13 +95,13 @@ const ListView = React.createClass({
* that have changed their visibility, with true indicating visible, and
* false indicating the view has moved out of view.
*/
onChangeVisibleRows: React.PropTypes.func,
onChangeVisibleRows: PropTypes.func,
/**
* A performance optimization for improving scroll perf of
* large lists, used in conjunction with overflow: 'hidden' on the row
* containers. This is enabled by default.
*/
removeClippedSubviews: React.PropTypes.bool,
removeClippedSubviews: PropTypes.bool,
/**
* An array of child indices determining which children get docked to the
* top of the screen when scrolling. For example, passing
Expand Down
7 changes: 4 additions & 3 deletions src/components/Navigator.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PropTypes } from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import createMockComponent from './createMockComponent';
import View from './View';

Expand All @@ -7,7 +8,7 @@ const NavigatorSceneConfigType = PropTypes.shape({
springFriction: PropTypes.number,
springTension: PropTypes.number,
defaultTransitionVelocity: PropTypes.number,
animationInterpolators: React.PropTypes.object,
animationInterpolators: PropTypes.object,
});

const NavigatorSceneConfigs = {
Expand All @@ -23,7 +24,7 @@ const NavigatorSceneConfigs = {
VerticalDownSwipeJump: NavigatorSceneConfigType
};

const Navigator = React.createClass({
const Navigator = createReactClass({
propTypes: {
/**
* Optional function that allows configuration about scene animations and
Expand Down
7 changes: 4 additions & 3 deletions src/components/Picker.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import createMockComponent from './createMockComponent';

const Picker = React.createClass({
const Picker = createReactClass({
propTypes: {
children: React.PropTypes.node
children: PropTypes.node
},
statics: {
Item: createMockComponent('Picker.Item')
Expand Down
8 changes: 4 additions & 4 deletions src/components/ScrollView.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import EdgeInsetsPropType from '../propTypes/EdgeInsetsPropType';
import PointPropType from '../propTypes/PointPropType';
import ScrollResponder from '../mixins/ScrollResponder';
import View from './View';
import ViewStylePropTypes from '../propTypes/ViewStylePropTypes';
import ScrollViewManager from '../NativeModules/ScrollViewManager';
import styleSheetPropType from '../propTypes/StyleSheetPropType';

const { PropTypes } = React;
import View from './View';

const SCROLLVIEW = 'ScrollView';
const INNERVIEW = 'InnerScrollView';

const ScrollView = React.createClass({
const ScrollView = createReactClass({
propTypes: {
...View.propTypes,
/**
Expand Down
18 changes: 9 additions & 9 deletions src/components/StatusBar.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
/**
* https://github.com/facebook/react-native/blob/master/Libraries/Components/StatusBar/StatusBar.js
*/
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import ColorPropType from '../propTypes/ColorPropType';


let _backgroundColor = '';
let _barStyle = {};
let _hidden = false;
let _networkActivityIndicatorVisible = false;
let _translucent = false;

const StatusBar = React.createClass({
const StatusBar = createReactClass({
propTypes: {
animated: React.PropTypes.bool,
barStyle: React.PropTypes.oneOf(['default', 'light-content']),
animated: PropTypes.bool,
barStyle: PropTypes.oneOf(['default', 'light-content']),
backgroundColor: ColorPropType,
hidden: React.PropTypes.bool,
networkActivityIndicatorVisible: React.PropTypes.bool,
showHideTransition: React.PropTypes.oneOf(['fade', 'slide']),
translucent: React.PropTypes.bool
hidden: PropTypes.bool,
networkActivityIndicatorVisible: PropTypes.bool,
showHideTransition: PropTypes.oneOf(['fade', 'slide']),
translucent: PropTypes.bool
},

statics: {
Expand Down
7 changes: 4 additions & 3 deletions src/components/TabBarIOS.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import React from 'react';
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import createMockComponent from './createMockComponent';

const TabBarIOS = React.createClass({
const TabBarIOS = createReactClass({
propTypes: {
children: React.PropTypes.node
children: PropTypes.node
},
statics: {
Item: createMockComponent('TabBarIOS.Item')
Expand Down
Loading