Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 16 compatibility #27

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
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
10 changes: 5 additions & 5 deletions lib/components/AppBar.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/AppBar.js';var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');var _uranium2=_interopRequireDefault(_uranium);
Expand Down Expand Up @@ -65,18 +65,18 @@ styles.base,
!navIcon&&styles.baseWithoutNavIcon,
(0,_uranium.animate)(_index.Elevation.dp0,_index.Elevation.dp4,this._elevateAV)]},

otherWithoutAppBarProps),
otherWithoutAppBarProps,{__source:{fileName:_jsxFileName,lineNumber:62}}),
navIcon&&
_react2.default.createElement(_index.IconToggle,{
name:navIcon,
style:styles.icon,
iconStyle:styles.iconIcon,
rippleColor:_index.Colors.white,
onPress:onNavIconPress}),
onPress:onNavIconPress,__source:{fileName:_jsxFileName,lineNumber:70}}),

_react2.default.createElement(_reactNative.View,{style:styles.title},
_react2.default.createElement(_reactNative.View,{style:styles.title,__source:{fileName:_jsxFileName,lineNumber:77}},
typeof title==='string'?
_react2.default.createElement(_index.Title,{style:styles.titleText},title):
_react2.default.createElement(_index.Title,{style:styles.titleText,__source:{fileName:_jsxFileName,lineNumber:79}},title):
title),


Expand Down
4 changes: 2 additions & 2 deletions lib/components/BottomNavigation.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/BottomNavigation.js';var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _index=require('../index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var
Expand Down Expand Up @@ -52,7 +52,7 @@ BottomNavigation=function(_Component){_inherits(BottomNavigation,_Component);fun
{var
children=this.props.children;
return(
_react2.default.createElement(_reactNative.View,{style:styles.base},
_react2.default.createElement(_reactNative.View,{style:styles.base,__source:{fileName:_jsxFileName,lineNumber:55}},
children));


Expand Down
10 changes: 5 additions & 5 deletions lib/components/BottomNavigationIcon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/BottomNavigationIcon.js';var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');
Expand Down Expand Up @@ -36,17 +36,17 @@ _react2.default.createElement(_index.TouchableRipple,_extends({
rippleCentered:true,
rippleSpread:0.3,
rippleColor:theme.colors.primary},
other),
other,{__source:{fileName:_jsxFileName,lineNumber:35}}),
_react2.default.createElement(_reactNative.Animated.View,{
style:[
styles.base,
(0,_uranium.animate)(styles.base,styles.active,this._activateAV)]},
(0,_uranium.animate)(styles.base,styles.active,this._activateAV)],__source:{fileName:_jsxFileName,lineNumber:40}},

_react2.default.createElement(AnimatedIcon,{
name:name,
style:(0,_uranium.animate)(styles.icon,styles.iconActive,this._activateAV)}),
style:(0,_uranium.animate)(styles.icon,styles.iconActive,this._activateAV),__source:{fileName:_jsxFileName,lineNumber:45}}),
_react2.default.createElement(AnimatedBody1,{
style:(0,_uranium.animate)(styles.text,styles.textActive,this._activateAV)},
style:(0,_uranium.animate)(styles.text,styles.textActive,this._activateAV),__source:{fileName:_jsxFileName,lineNumber:48}},
text))));


Expand Down
4 changes: 2 additions & 2 deletions lib/components/Card/Card.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/Card/Card.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');var _uranium2=_interopRequireDefault(_uranium);
Expand Down Expand Up @@ -37,7 +37,7 @@ css:[
styles.root,
style]},

other),
other,{__source:{fileName:_jsxFileName,lineNumber:35}}),
children));};


Expand Down
4 changes: 2 additions & 2 deletions lib/components/Card/CardActions.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Object.defineProperty(exports,"__esModule",{value:true});var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _jsxFileName='src/components/Card/CardActions.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');var _uranium2=_interopRequireDefault(_uranium);
var _index=require('../../index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}

var CardActions=function CardActions(_ref){var children=_ref.children,style=_ref.style;return(
_react2.default.createElement(_reactNative.View,{css:[styles.root,style]},
_react2.default.createElement(_reactNative.View,{css:[styles.root,style],__source:{fileName:_jsxFileName,lineNumber:8}},
children));};


Expand Down
6 changes: 3 additions & 3 deletions lib/components/Card/CardText.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Object.defineProperty(exports,"__esModule",{value:true});var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _jsxFileName='src/components/Card/CardText.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');var _uranium2=_interopRequireDefault(_uranium);
var _index=require('../../index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}

var CardText=function CardText(_ref){var children=_ref.children,style=_ref.style,textStyle=_ref.textStyle;return(
_react2.default.createElement(_reactNative.View,{css:[styles.root,style]},
_react2.default.createElement(_reactNative.Text,{css:[styles.text,textStyle]},
_react2.default.createElement(_reactNative.View,{css:[styles.root,style],__source:{fileName:_jsxFileName,lineNumber:8}},
_react2.default.createElement(_reactNative.Text,{css:[styles.text,textStyle],__source:{fileName:_jsxFileName,lineNumber:9}},
children)));};


Expand Down
8 changes: 4 additions & 4 deletions lib/components/Card/CardTitle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/Card/CardTitle.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');
var _uranium=require('uranium');var _uranium2=_interopRequireDefault(_uranium);
Expand All @@ -13,11 +13,11 @@ title=_ref.title,
titleStyle=_ref.titleStyle,
other=_objectWithoutProperties(_ref,['children','style','subtitle','subtitleStyle','title','titleStyle']);return(

_react2.default.createElement(_reactNative.View,_extends({},other,{css:[styles.root,style]}),
_react2.default.createElement(_reactNative.Text,{css:[subtitle?styles.title:styles.subtitle,titleStyle]},
_react2.default.createElement(_reactNative.View,_extends({},other,{css:[styles.root,style],__source:{fileName:_jsxFileName,lineNumber:16}}),
_react2.default.createElement(_reactNative.Text,{css:[subtitle?styles.title:styles.subtitle,titleStyle],__source:{fileName:_jsxFileName,lineNumber:17}},
title),

subtitle&&_react2.default.createElement(_reactNative.Text,{css:[styles.subtitle,subtitleStyle]},
subtitle&&_react2.default.createElement(_reactNative.Text,{css:[styles.subtitle,subtitleStyle],__source:{fileName:_jsxFileName,lineNumber:20}},
subtitle),

children));};
Expand Down
8 changes: 4 additions & 4 deletions lib/components/DataTable/Cell.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/DataTable/Cell.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');

var _index=require('../../index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}

var Cell=function Cell(_ref){var children=_ref.children,style=_ref.style,other=_objectWithoutProperties(_ref,['children','style']);
var defaultedChildren=typeof children==='string'?
_react2.default.createElement(_index.Body1,null,children):
_react2.default.createElement(_index.Body1,{__source:{fileName:_jsxFileName,lineNumber:9}},children):
children;
return(
_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other),
_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other,{__source:{fileName:_jsxFileName,lineNumber:12}}),
defaultedChildren));


};

Cell.propTypes={
children:_propTypes2.default.node,
style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])};exports.default=
style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])};exports.default=


Cell;
Expand Down
8 changes: 4 additions & 4 deletions lib/components/DataTable/HeaderCell.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _react=require('react');var _react2=_interopRequireDefault(_react);
Object.defineProperty(exports,"__esModule",{value:true});var _extends=Object.assign||function(target){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var key in source){if(Object.prototype.hasOwnProperty.call(source,key)){target[key]=source[key];}}}return target;};var _jsxFileName='src/components/DataTable/HeaderCell.js';var _react=require('react');var _react2=_interopRequireDefault(_react);
var _propTypes=require('prop-types');var _propTypes2=_interopRequireDefault(_propTypes);
var _reactNative=require('react-native');

var _index=require('../../index');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};}function _objectWithoutProperties(obj,keys){var target={};for(var i in obj){if(keys.indexOf(i)>=0)continue;if(!Object.prototype.hasOwnProperty.call(obj,i))continue;target[i]=obj[i];}return target;}

var HeaderCell=function HeaderCell(_ref){var children=_ref.children,style=_ref.style,other=_objectWithoutProperties(_ref,['children','style']);
var defaultedChildren=typeof children==='string'?
_react2.default.createElement(_index.Body2,{ellipsizeMode:'tail',numberOfLines:1},children):
_react2.default.createElement(_index.Body2,{ellipsizeMode:'tail',numberOfLines:1,__source:{fileName:_jsxFileName,lineNumber:9}},children):
children;
return(
_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other),
_react2.default.createElement(_reactNative.View,_extends({style:[styles.base].concat(style)},other,{__source:{fileName:_jsxFileName,lineNumber:12}}),
defaultedChildren));


};

HeaderCell.propTypes={
children:_propTypes2.default.node,
style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array])};exports.default=
style:_propTypes2.default.oneOfType([_propTypes2.default.object,_propTypes2.default.array,_propTypes2.default.number])};exports.default=


HeaderCell;
Expand Down
Loading