Skip to content

Commit

Permalink
Merge pull request #9 from alterx/master
Browse files Browse the repository at this point in the history
 Applying codemod to remove React.PropTypes
  • Loading branch information
Kuldeep Saxena committed Jan 31, 2018
2 parents 9f771b0 + e640692 commit d8f6068
Show file tree
Hide file tree
Showing 10 changed files with 227 additions and 76 deletions.
142 changes: 142 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 31 additions & 30 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
"name":"react-native-form-builder",
"version":"1.0.12",
"description":"Generate Awesome Forms In an easy way",
"main":"src/index.js",
"scripts":{
"test":"echo \"Error: no test specified\" && exit 1"
"name": "react-native-form-builder",
"version": "1.0.12",
"description": "Generate Awesome Forms In an easy way",
"main": "src/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository":{
"type":"git",
"url":"git+https://github.com/bietkul/react-native-form-builder.git"
"repository": {
"type": "git",
"url": "git+https://github.com/bietkul/react-native-form-builder.git"
},
"_npmUser":{
"name":"anjuma",
"email":"kuldepsaxena@155@gmail.com"
"_npmUser": {
"name": "anjuma",
"email": "kuldepsaxena@155@gmail.com"
},
"author":"Kuldeep Saxena",
"license":"MIT",
"bugs":{
"url":"https://github.com/bietkul/react-native-form-builder/issues"
"author": "Kuldeep Saxena",
"license": "MIT",
"bugs": {
"url": "https://github.com/bietkul/react-native-form-builder/issues"
},
"homepage":"https://github.com/bietkul/react-native-form-builder#readme",
"keywords":[
"homepage": "https://github.com/bietkul/react-native-form-builder#readme",
"keywords": [
"android",
"ios",
"react",
Expand All @@ -32,21 +32,22 @@
"generator",
"builder"
],
"dependencies":{
"fs-extra":"^3.0.1",
"print-message":"^2.1.0",
"lodash":"^4.17.4",
"react-native-keyboard-aware-scroll-view":"^0.2.7",
"react-native-i18n":"^1.0.0"
"dependencies": {
"fs-extra": "^3.0.1",
"lodash": "^4.17.4",
"print-message": "^2.1.0",
"prop-types": "^15.6.0",
"react-native-i18n": "^1.0.0",
"react-native-keyboard-aware-scroll-view": "^0.2.7"
},
"devDependencies":{
"react":"15.4.2",
"react-native":"0.41.1",
"native-base":"^2.0.6"
"devDependencies": {
"native-base": "^2.0.6",
"react": "^15.5.0",
"react-native": "0.41.1"
},
"peerDependencies": {
"react-native": ">=0.41.1",
"react": ">=15.4.2-alpha.3",
"react": ">=15.5.0",
"native-base": "^2.0.6"
}
}
}
5 changes: 3 additions & 2 deletions src/components/panel/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Animated, Dimensions, View, Easing, Keyboard } from 'react-native';
import styles from './styles';

class Panel extends Component {

static propTypes = {
children: React.PropTypes.object,
children: PropTypes.object,
}

constructor(props) {
Expand Down Expand Up @@ -55,4 +56,4 @@ class Panel extends Component {
);
}
}
export default Panel;
export default Panel;
13 changes: 7 additions & 6 deletions src/fields/date/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text } from 'native-base';
import I18n from 'react-native-i18n';
Expand All @@ -9,11 +10,11 @@ export default class DatePickerField extends Component {
timeZoneOffsetInHours: (-1) * ((new Date()).getTimezoneOffset() / 60),
};
static propTypes = {
attributes: React.PropTypes.object,
updateValue: React.PropTypes.func,
timeZoneOffsetInHours: React.PropTypes.number,
theme: React.PropTypes.object,
ErrorComponent: React.PropTypes.func,
attributes: PropTypes.object,
updateValue: PropTypes.func,
timeZoneOffsetInHours: PropTypes.number,
theme: PropTypes.object,
ErrorComponent: PropTypes.func,
}
constructor(props) {
super(props);
Expand Down Expand Up @@ -204,4 +205,4 @@ export default class DatePickerField extends Component {
</View>
);
}
}
}
15 changes: 8 additions & 7 deletions src/fields/form/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text } from 'native-base';
import GenerateForm from '../../formBuilder';

export default class FormField extends Component {
static propTypes = {
attributes: React.PropTypes.object,
theme: React.PropTypes.object,
updateValue: React.PropTypes.func,
autoValidation: React.PropTypes.bool,
customValidation: React.PropTypes.func,
customComponents: React.PropTypes.object,
attributes: PropTypes.object,
theme: PropTypes.object,
updateValue: PropTypes.func,
autoValidation: PropTypes.bool,
customValidation: PropTypes.func,
customComponents: PropTypes.object,
}
constructor(props) {
super(props);
Expand Down Expand Up @@ -54,4 +55,4 @@ export default class FormField extends Component {
</View>
);
}
}
}
11 changes: 6 additions & 5 deletions src/fields/picker/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text } from 'native-base';
import { Platform, Picker, TouchableOpacity } from 'react-native';
Expand All @@ -7,10 +8,10 @@ import styles from './../../styles';
const Item = Picker.Item;
export default class PickerField extends Component {
static propTypes = {
attributes: React.PropTypes.object,
theme: React.PropTypes.object,
updateValue: React.PropTypes.func,
ErrorComponent: React.PropTypes.func,
attributes: PropTypes.object,
theme: PropTypes.object,
updateValue: PropTypes.func,
ErrorComponent: PropTypes.func,
}
handleChange(value) {
const attributes = this.props.attributes;
Expand Down Expand Up @@ -99,4 +100,4 @@ export default class PickerField extends Component {

);
}
}
}
11 changes: 6 additions & 5 deletions src/fields/select/index.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { Modal, Dimensions } from 'react-native';
import {
Expand All @@ -20,10 +21,10 @@ const deviceWidth = Dimensions.get('window').width;

export default class SelectField extends Component {
static propTypes = {
attributes: React.PropTypes.object,
updateValue: React.PropTypes.func,
theme: React.PropTypes.object,
ErrorComponent: React.PropTypes.func,
attributes: PropTypes.object,
updateValue: PropTypes.func,
theme: PropTypes.object,
ErrorComponent: PropTypes.func,
}
constructor(props) {
super(props);
Expand Down Expand Up @@ -132,4 +133,4 @@ export default class SelectField extends Component {
</View>
);
}
}
}
11 changes: 6 additions & 5 deletions src/fields/switch/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import PropTypes from 'prop-types';
import React, { Component } from 'react';
import { View, Text, Switch } from 'native-base';

export default class SwitchField extends Component {
static propTypes = {
attributes: React.PropTypes.object,
theme: React.PropTypes.object,
updateValue: React.PropTypes.func,
ErrorComponent: React.PropTypes.func,
attributes: PropTypes.object,
theme: PropTypes.object,
updateValue: PropTypes.func,
ErrorComponent: PropTypes.func,
}
handleChange(value) {
this.props.updateValue(this.props.attributes.name, value);
Expand Down Expand Up @@ -42,4 +43,4 @@ export default class SwitchField extends Component {
</View>
);
}
}
}
Loading

0 comments on commit d8f6068

Please sign in to comment.