react-native-wheel-pick 1.1.9 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -20,8 +20,8 @@ This is not original but inspired by [react-native-wheel-datepicker](https://git
20
20
  React Native >= 0.60+
21
21
  ```
22
22
  npm install react-native-wheel-pick --save --legacy-peer-deps
23
- npm install @react-native-picker/picker --save
24
- npm install @react-native-community/datetimepicker --save
23
+ npm install @react-native-picker/picker --save --legacy-peer-deps
24
+ npm install @react-native-community/datetimepicker --save --legacy-peer-deps
25
25
  npx pod-install
26
26
 
27
27
  npx react-native run-ios // re-build native-code
@@ -123,7 +123,8 @@ import { Picker, DatePicker } from 'react-native-wheel-pick';
123
123
  ```
124
124
  ## Release Note
125
125
 
126
- ### 1.1.9 (July 3 2022)
126
+ ### 1.2.0 (July 3 2022)
127
+ - Remove `deprecated-react-native-prop-types`
127
128
  - Support for peer dependencies React 18 by `--legacy-peer-deps`
128
129
 
129
130
  ### 1.1.7 (June 21 2022)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wheel-pick",
3
- "version": "1.1.9",
3
+ "version": "1.2.0",
4
4
  "description": "React native wheel picker iOS style with android.",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -22,10 +22,12 @@
22
22
  "url": "https://github.com/TronNatthakorn/react-native-wheel-pick/issues"
23
23
  },
24
24
  "homepage": "https://github.com/TronNatthakorn/react-native-wheel-pick#readme",
25
+ "dependencies": {
26
+ "moment": "^2.19.1"
27
+ },
25
28
  "peerDependencies": {
26
29
  "moment": ">=2.0.0",
27
30
  "prop-types": "*",
28
- "deprecated-react-native-prop-types": ">=2.3.0",
29
31
  "@react-native-community/datetimepicker": ">=6.1.3",
30
32
  "@react-native-picker/picker": ">=2.4.1"
31
33
  }
@@ -1,9 +1,9 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { requireNativeComponent, View } from 'react-native';
3
- import { ColorPropType, ViewPropTypes as RNViewPropTypes, } from 'deprecated-react-native-prop-types'
3
+ // import { ColorPropType, ViewPropTypes as RNViewPropTypes, } from 'deprecated-react-native-prop-types'
4
4
  import PropTypes from 'prop-types';
5
5
 
6
- const ViewPropTypes = RNViewPropTypes || View.propTypes;
6
+ // const ViewPropTypes = RNViewPropTypes || View.propTypes;
7
7
  let firstTimeOnChange = true
8
8
 
9
9
  const stateFromProps = (props) => {
@@ -22,9 +22,9 @@ const stateFromProps = (props) => {
22
22
 
23
23
  class WheelCurvedPicker extends PureComponent {
24
24
  static propTypes = {
25
- ...ViewPropTypes,
25
+ // ...ViewPropTypes,
26
26
  data: PropTypes.array,
27
- textColor: ColorPropType,
27
+ // textColor: ColorPropType,
28
28
  textSize: PropTypes.number,
29
29
  onValueChange: PropTypes.func.isRequired,
30
30
  selectedValue: PropTypes.any,
@@ -1,11 +1,11 @@
1
1
  import React, { PureComponent } from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
- import { ColorPropType, ViewPropTypes as RNViewPropTypes } from 'deprecated-react-native-prop-types'
3
+ // import { ColorPropType, ViewPropTypes as RNViewPropTypes } from 'deprecated-react-native-prop-types'
4
4
  import PropTypes from 'prop-types';
5
5
  import moment from 'moment';
6
6
  import Picker from './picker';
7
7
 
8
- const ViewPropTypes = RNViewPropTypes || View.propTypes;
8
+ // const ViewPropTypes = RNViewPropTypes || View.propTypes;
9
9
  const firstTimeOnChange = {
10
10
  year: true,
11
11
  month: true,
@@ -42,8 +42,8 @@ export default class DatePicker extends PureComponent {
42
42
  minimumDate: PropTypes.instanceOf(Date),
43
43
  mode: PropTypes.oneOf(['date', 'time', 'datetime']),
44
44
  onDateChange: PropTypes.func.isRequired,
45
- style: ViewPropTypes.style,
46
- textColor: ColorPropType,
45
+ // style: ViewPropTypes.style,
46
+ // textColor: ColorPropType,
47
47
  textSize: PropTypes.number,
48
48
  };
49
49
 
package/src/picker.js CHANGED
@@ -1,11 +1,10 @@
1
1
  import React, { Component } from 'react';
2
2
  import { StyleSheet, View, Text, Platform } from 'react-native';
3
- import { ColorPropType, ViewPropTypes as RNViewPropTypes, } from 'deprecated-react-native-prop-types'
3
+ // import { ColorPropType, ViewPropTypes as RNViewPropTypes, } from 'deprecated-react-native-prop-types'
4
4
  import PropTypes from 'prop-types';
5
5
  import WheelCurvedPicker from './WheelCurvedPicker';
6
6
 
7
- const ViewPropTypes = RNViewPropTypes || View.propTypes;
8
-
7
+ // const ViewPropTypes = RNViewPropTypes || View.propTypes;
9
8
  const PickerItem = WheelCurvedPicker.Item;
10
9
 
11
10
  const styles = StyleSheet.create({
@@ -18,12 +17,12 @@ const styles = StyleSheet.create({
18
17
 
19
18
  export default class Picker extends Component {
20
19
  static propTypes = {
21
- textColor: ColorPropType,
20
+ // textColor: ColorPropType,
22
21
  textSize: PropTypes.number,
23
- itemStyle: ViewPropTypes.style,
22
+ // itemStyle: ViewPropTypes.style,
24
23
  onValueChange: PropTypes.func.isRequired,
25
24
  pickerData: PropTypes.array.isRequired,
26
- style: ViewPropTypes.style,
25
+ // style: ViewPropTypes.style,
27
26
  selectedValue: PropTypes.any,
28
27
  };
29
28