react-native-wheel-pick 1.1.7 → 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
@@ -19,9 +19,9 @@ This is not original but inspired by [react-native-wheel-datepicker](https://git
19
19
 
20
20
  React Native >= 0.60+
21
21
  ```
22
- npm install react-native-wheel-pick
23
- npm install @react-native-picker/picker --save
24
- npm install @react-native-community/datetimepicker --save
22
+ npm install react-native-wheel-pick --save --legacy-peer-deps
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,6 +123,10 @@ import { Picker, DatePicker } from 'react-native-wheel-pick';
123
123
  ```
124
124
  ## Release Note
125
125
 
126
+ ### 1.2.0 (July 3 2022)
127
+ - Remove `deprecated-react-native-prop-types`
128
+ - Support for peer dependencies React 18 by `--legacy-peer-deps`
129
+
126
130
  ### 1.1.7 (June 21 2022)
127
131
  [Android]
128
132
  - compileSdk -> compileSdkVersion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-wheel-pick",
3
- "version": "1.1.7",
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": {
@@ -28,8 +28,6 @@
28
28
  "peerDependencies": {
29
29
  "moment": ">=2.0.0",
30
30
  "prop-types": "*",
31
- "react-native": ">=0.45.0",
32
- "deprecated-react-native-prop-types": ">=2.3.0",
33
31
  "@react-native-community/datetimepicker": ">=6.1.3",
34
32
  "@react-native-picker/picker": ">=2.4.1"
35
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