mirror of
https://github.com/status-im/react-native.git
synced 2025-02-22 14:18:23 +00:00
Deploy v0.89
Reviewed By: jbrown215 Differential Revision: D13457087 fbshipit-source-id: 9f01371ae3515990c5595f1eb2361174050066b8
This commit is contained in:
parent
ac30f64ae5
commit
24f8d4d3db
@ -97,4 +97,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.88.0
|
||||
^0.89.0
|
||||
|
@ -97,4 +97,4 @@ untyped-import
|
||||
untyped-type-import
|
||||
|
||||
[version]
|
||||
^0.88.0
|
||||
^0.89.0
|
||||
|
@ -110,10 +110,12 @@ const ActivityIndicator = (
|
||||
);
|
||||
};
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const ActivityIndicatorWithRef = React.forwardRef(ActivityIndicator);
|
||||
ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
ActivityIndicatorWithRef.defaultProps = {
|
||||
animating: true,
|
||||
color: Platform.OS === 'ios' ? GRAY : null,
|
||||
@ -136,4 +138,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
module.exports = (ActivityIndicatorWithRef: Class<NativeComponent<Props>>);
|
||||
|
@ -190,9 +190,11 @@ const styles = StyleSheet.create({
|
||||
*/
|
||||
type CheckBoxType = Class<NativeComponent<Props>>;
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const CheckBoxWithRef = React.forwardRef(function CheckBoxWithRef(props, ref) {
|
||||
return <CheckBox {...props} forwardedRef={ref} />;
|
||||
});
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (CheckBoxWithRef: CheckBoxType);
|
||||
|
@ -89,15 +89,20 @@ const ProgressBarAndroid = (
|
||||
return <AndroidProgressBar {...props} ref={forwardedRef} />;
|
||||
};
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const ProgressBarAndroidToExport = React.forwardRef(ProgressBarAndroid);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
ProgressBarAndroidToExport.defaultProps = {
|
||||
styleAttr: 'Normal',
|
||||
indeterminate: true,
|
||||
animating: true,
|
||||
};
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (ProgressBarAndroidToExport: Class<
|
||||
NativeComponent<ProgressBarAndroidProps>,
|
||||
>);
|
||||
|
@ -80,7 +80,9 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const ProgressViewIOSWithRef = React.forwardRef(ProgressViewIOS);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (ProgressViewIOSWithRef: NativeProgressViewIOS);
|
||||
|
@ -403,8 +403,8 @@ export type Props = $ReadOnly<{|
|
||||
* - `false`, deprecated, use 'never' instead
|
||||
* - `true`, deprecated, use 'always' instead
|
||||
*/
|
||||
/* $FlowFixMe(>=0.86.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.86 was deployed. To see the error, delete this comment
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
keyboardShouldPersistTaps?: ?('always' | 'never' | 'handled' | false | true),
|
||||
/**
|
||||
|
@ -127,7 +127,6 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const SegmentedControlIOSWithRef = React.forwardRef(
|
||||
(
|
||||
props: SegmentedControlIOSProps,
|
||||
@ -137,4 +136,7 @@ const SegmentedControlIOSWithRef = React.forwardRef(
|
||||
},
|
||||
);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (SegmentedControlIOSWithRef: NativeSegmentedControlIOS);
|
||||
|
@ -250,9 +250,11 @@ const Slider = (
|
||||
);
|
||||
};
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const SliderWithRef = React.forwardRef(Slider);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
SliderWithRef.defaultProps = {
|
||||
disabled: false,
|
||||
value: 0,
|
||||
@ -274,4 +276,7 @@ if (Platform.OS === 'ios') {
|
||||
});
|
||||
}
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
module.exports = (SliderWithRef: Class<ReactNative.NativeComponent<Props>>);
|
||||
|
@ -236,7 +236,6 @@ class ToolbarAndroid extends React.Component<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const ToolbarAndroidToExport = React.forwardRef(
|
||||
(
|
||||
props: ToolbarAndroidProps,
|
||||
@ -246,6 +245,9 @@ const ToolbarAndroidToExport = React.forwardRef(
|
||||
},
|
||||
);
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (ToolbarAndroidToExport: Class<
|
||||
NativeComponent<ToolbarAndroidProps>,
|
||||
>);
|
||||
|
@ -56,6 +56,9 @@ const TouchableBounce = ((createReactClass({
|
||||
mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
// The function passed takes a callback to start the animation which should
|
||||
// be run after this onPress handler is done. You can use this (for example)
|
||||
@ -86,6 +89,9 @@ const TouchableBounce = ((createReactClass({
|
||||
|
||||
getInitialState: function(): State {
|
||||
return {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
...this.touchableGetInitialState(),
|
||||
scale: new Animated.Value(1),
|
||||
};
|
||||
@ -181,13 +187,31 @@ const TouchableBounce = ((createReactClass({
|
||||
nativeID={this.props.nativeID}
|
||||
testID={this.props.testID}
|
||||
hitSlop={this.props.hitSlop}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
|
||||
onResponderTerminationRequest={
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
|
||||
* an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
this.touchableHandleResponderTerminationRequest
|
||||
}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderGrant={this.touchableHandleResponderGrant}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderMove={this.touchableHandleResponderMove}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderRelease={this.touchableHandleResponderRelease}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderTerminate={this.touchableHandleResponderTerminate}>
|
||||
{this.props.children}
|
||||
{Touchable.renderDebugView({
|
||||
|
@ -155,6 +155,9 @@ type Props = $ReadOnly<{|
|
||||
const TouchableHighlight = ((createReactClass({
|
||||
displayName: 'TouchableHighlight',
|
||||
propTypes: {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
/**
|
||||
* Determines what the opacity of the wrapped view should be when touch is
|
||||
@ -200,9 +203,15 @@ const TouchableHighlight = ((createReactClass({
|
||||
getDefaultProps: () => DEFAULT_PROPS,
|
||||
|
||||
getInitialState: function() {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this._isMounted = false;
|
||||
if (this.props.testOnly_pressed) {
|
||||
return {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
...this.touchableGetInitialState(),
|
||||
extraChildStyle: {
|
||||
opacity: this.props.activeOpacity,
|
||||
@ -213,6 +222,9 @@ const TouchableHighlight = ((createReactClass({
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
...this.touchableGetInitialState(),
|
||||
extraChildStyle: null,
|
||||
extraUnderlayStyle: null,
|
||||
@ -221,12 +233,21 @@ const TouchableHighlight = ((createReactClass({
|
||||
},
|
||||
|
||||
componentDidMount: function() {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this._isMounted = true;
|
||||
ensurePositiveDelayProps(this.props);
|
||||
},
|
||||
|
||||
componentWillUnmount: function() {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this._isMounted = false;
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
clearTimeout(this._hideTimeout);
|
||||
},
|
||||
|
||||
@ -244,13 +265,22 @@ const TouchableHighlight = ((createReactClass({
|
||||
* defined on your component.
|
||||
*/
|
||||
touchableHandleActivePressIn: function(e: PressEvent) {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
clearTimeout(this._hideTimeout);
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this._hideTimeout = null;
|
||||
this._showUnderlay();
|
||||
this.props.onPressIn && this.props.onPressIn(e);
|
||||
},
|
||||
|
||||
touchableHandleActivePressOut: function(e: PressEvent) {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
if (!this._hideTimeout) {
|
||||
this._hideUnderlay();
|
||||
}
|
||||
@ -272,9 +302,15 @@ const TouchableHighlight = ((createReactClass({
|
||||
},
|
||||
|
||||
touchableHandlePress: function(e: PressEvent) {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
clearTimeout(this._hideTimeout);
|
||||
if (!Platform.isTV) {
|
||||
this._showUnderlay();
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
this._hideTimeout = setTimeout(
|
||||
this._hideUnderlay,
|
||||
this.props.delayPressOut,
|
||||
@ -308,6 +344,9 @@ const TouchableHighlight = ((createReactClass({
|
||||
},
|
||||
|
||||
_showUnderlay: function() {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
if (!this._isMounted || !this._hasPressHandler()) {
|
||||
return;
|
||||
}
|
||||
@ -323,7 +362,13 @@ const TouchableHighlight = ((createReactClass({
|
||||
},
|
||||
|
||||
_hideUnderlay: function() {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
clearTimeout(this._hideTimeout);
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this._hideTimeout = null;
|
||||
if (this.props.testOnly_pressed) {
|
||||
return;
|
||||
@ -364,13 +409,31 @@ const TouchableHighlight = ((createReactClass({
|
||||
isTVSelectable={true}
|
||||
tvParallaxProperties={this.props.tvParallaxProperties}
|
||||
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
|
||||
onResponderTerminationRequest={
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
|
||||
* an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
this.touchableHandleResponderTerminationRequest
|
||||
}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderGrant={this.touchableHandleResponderGrant}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderMove={this.touchableHandleResponderMove}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderRelease={this.touchableHandleResponderRelease}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderTerminate={this.touchableHandleResponderTerminate}
|
||||
nativeID={this.props.nativeID}
|
||||
testID={this.props.testID}>
|
||||
|
@ -75,6 +75,9 @@ const PRESS_RETENTION_OFFSET = {top: 20, left: 20, right: 20, bottom: 30};
|
||||
const TouchableNativeFeedback = createReactClass({
|
||||
displayName: 'TouchableNativeFeedback',
|
||||
propTypes: {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the
|
||||
* error, delete this comment and run Flow. */
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
|
||||
/**
|
||||
@ -107,7 +110,10 @@ const TouchableNativeFeedback = createReactClass({
|
||||
* Creates an object that represents android theme's default background for
|
||||
* selectable elements (?android:attr/selectableItemBackground).
|
||||
*/
|
||||
SelectableBackground: function() {
|
||||
SelectableBackground: function(): {
|
||||
type: 'ThemeAttrAndroid',
|
||||
attribute: 'selectableItemBackground',
|
||||
} {
|
||||
return {type: 'ThemeAttrAndroid', attribute: 'selectableItemBackground'};
|
||||
},
|
||||
/**
|
||||
@ -115,7 +121,10 @@ const TouchableNativeFeedback = createReactClass({
|
||||
* selectable elements (?android:attr/selectableItemBackgroundBorderless).
|
||||
* Available on android API level 21+.
|
||||
*/
|
||||
SelectableBackgroundBorderless: function() {
|
||||
SelectableBackgroundBorderless: function(): {
|
||||
type: 'ThemeAttrAndroid',
|
||||
attribute: 'selectableItemBackgroundBorderless',
|
||||
} {
|
||||
return {
|
||||
type: 'ThemeAttrAndroid',
|
||||
attribute: 'selectableItemBackgroundBorderless',
|
||||
@ -131,7 +140,14 @@ const TouchableNativeFeedback = createReactClass({
|
||||
* @param color The ripple color
|
||||
* @param borderless If the ripple can render outside it's bounds
|
||||
*/
|
||||
Ripple: function(color: string, borderless: boolean) {
|
||||
Ripple: function(
|
||||
color: string,
|
||||
borderless: boolean,
|
||||
): {
|
||||
type: 'RippleAndroid',
|
||||
color: ?number,
|
||||
borderless: boolean,
|
||||
} {
|
||||
return {
|
||||
type: 'RippleAndroid',
|
||||
color: processColor(color),
|
||||
@ -139,7 +155,7 @@ const TouchableNativeFeedback = createReactClass({
|
||||
};
|
||||
},
|
||||
|
||||
canUseNativeForeground: function() {
|
||||
canUseNativeForeground: function(): boolean {
|
||||
return Platform.OS === 'android' && Platform.Version >= 23;
|
||||
},
|
||||
},
|
||||
@ -171,9 +187,18 @@ const TouchableNativeFeedback = createReactClass({
|
||||
touchableHandleActivePressIn: function(e: PressEvent) {
|
||||
this.props.onPressIn && this.props.onPressIn(e);
|
||||
this._dispatchPressedStateChange(true);
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the
|
||||
* error, delete this comment and run Flow. */
|
||||
if (this.pressInLocation) {
|
||||
this._dispatchHotspotUpdate(
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the
|
||||
* error, delete this comment and run Flow. */
|
||||
this.pressInLocation.locationX,
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment
|
||||
* suppresses an error found when Flow v0.89 was deployed. To see the
|
||||
* error, delete this comment and run Flow. */
|
||||
this.pressInLocation.locationY,
|
||||
);
|
||||
}
|
||||
|
@ -135,6 +135,9 @@ const TouchableOpacity = ((createReactClass({
|
||||
mixins: [Touchable.Mixin.withoutDefaultFocusAndBlur, NativeMethodsMixin],
|
||||
|
||||
propTypes: {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
...TouchableWithoutFeedback.propTypes,
|
||||
/**
|
||||
* Determines what the opacity of the wrapped view should be when touch is
|
||||
@ -159,7 +162,13 @@ const TouchableOpacity = ((createReactClass({
|
||||
|
||||
getInitialState: function() {
|
||||
return {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
...this.touchableGetInitialState(),
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
anim: new Animated.Value(this._getChildStyleOpacityWithDefault()),
|
||||
};
|
||||
},
|
||||
@ -257,6 +266,9 @@ const TouchableOpacity = ((createReactClass({
|
||||
},
|
||||
|
||||
_opacityInactive: function(duration: number) {
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
this.setOpacityTo(this._getChildStyleOpacityWithDefault(), duration);
|
||||
},
|
||||
|
||||
@ -281,13 +293,31 @@ const TouchableOpacity = ((createReactClass({
|
||||
hasTVPreferredFocus={this.props.hasTVPreferredFocus}
|
||||
tvParallaxProperties={this.props.tvParallaxProperties}
|
||||
hitSlop={this.props.hitSlop}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onStartShouldSetResponder={this.touchableHandleStartShouldSetResponder}
|
||||
onResponderTerminationRequest={
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses
|
||||
* an error found when Flow v0.89 was deployed. To see the error,
|
||||
* delete this comment and run Flow. */
|
||||
this.touchableHandleResponderTerminationRequest
|
||||
}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderGrant={this.touchableHandleResponderGrant}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderMove={this.touchableHandleResponderMove}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderRelease={this.touchableHandleResponderRelease}
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
onResponderTerminate={this.touchableHandleResponderTerminate}>
|
||||
{this.props.children}
|
||||
{Touchable.renderDebugView({
|
||||
|
@ -47,7 +47,6 @@ if (__DEV__) {
|
||||
</TextAncestor.Consumer>
|
||||
);
|
||||
};
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
ViewToExport = React.forwardRef(View);
|
||||
ViewToExport.displayName = 'View';
|
||||
}
|
||||
|
@ -16,6 +16,9 @@ const requireNativeComponent = require('requireNativeComponent');
|
||||
|
||||
import type {ViewProps} from 'ViewPropTypes';
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
type ViewNativeComponentType = Class<ReactNative.NativeComponent<ViewProps>>;
|
||||
|
||||
const NativeViewComponent = requireNativeComponent('RCTView');
|
||||
|
@ -258,7 +258,6 @@ let Image = (
|
||||
);
|
||||
};
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
Image = React.forwardRef(Image);
|
||||
|
||||
/**
|
||||
@ -266,6 +265,9 @@ Image = React.forwardRef(Image);
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#getsize
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.getSize = getSize;
|
||||
|
||||
/**
|
||||
@ -274,6 +276,9 @@ Image.getSize = getSize;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#prefetch
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.prefetch = prefetch;
|
||||
|
||||
/**
|
||||
@ -281,6 +286,9 @@ Image.prefetch = prefetch;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#abortprefetch
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.abortPrefetch = abortPrefetch;
|
||||
|
||||
/**
|
||||
@ -288,6 +296,9 @@ Image.abortPrefetch = abortPrefetch;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#querycache
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.queryCache = queryCache;
|
||||
|
||||
/**
|
||||
@ -295,8 +306,14 @@ Image.queryCache = queryCache;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#resolveassetsource
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.resolveAssetSource = resolveAssetSource;
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.propTypes = ImageProps;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -305,4 +322,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_android_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (Image: Class<ImageComponentType>);
|
||||
|
@ -122,7 +122,6 @@ let Image = (
|
||||
);
|
||||
};
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
Image = React.forwardRef(Image);
|
||||
|
||||
/**
|
||||
@ -130,6 +129,9 @@ Image = React.forwardRef(Image);
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#getsize
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.getSize = getSize;
|
||||
|
||||
/**
|
||||
@ -138,6 +140,9 @@ Image.getSize = getSize;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#prefetch
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.prefetch = prefetch;
|
||||
|
||||
/**
|
||||
@ -145,6 +150,9 @@ Image.prefetch = prefetch;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#querycache
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.queryCache = queryCache;
|
||||
|
||||
/**
|
||||
@ -152,8 +160,14 @@ Image.queryCache = queryCache;
|
||||
*
|
||||
* See https://facebook.github.io/react-native/docs/image.html#resolveassetsource
|
||||
*/
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.resolveAssetSource = resolveAssetSource;
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
Image.propTypes = DeprecatedImagePropType;
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
@ -162,4 +176,7 @@ const styles = StyleSheet.create({
|
||||
},
|
||||
});
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_ios_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
module.exports = (Image: Class<ImageComponentType>);
|
||||
|
@ -1732,6 +1732,9 @@ class CellRenderer extends React.Component<
|
||||
: inversionStyle;
|
||||
if (!CellRendererComponent) {
|
||||
return (
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
<View style={cellStyle} onLayout={onLayout}>
|
||||
{element}
|
||||
{itemSeparator}
|
||||
|
@ -505,6 +505,9 @@ class ItemWithSeparator extends React.Component<
|
||||
<SeparatorComponent {...this.state.separatorProps} />
|
||||
);
|
||||
return leadingSeparator || separator ? (
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete
|
||||
* this comment and run Flow. */
|
||||
<View>
|
||||
{leadingSeparator}
|
||||
{element}
|
||||
|
@ -277,11 +277,16 @@ const Text = (
|
||||
) => {
|
||||
return <TouchableText {...props} forwardedRef={forwardedRef} />;
|
||||
};
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const TextToExport = React.forwardRef(Text);
|
||||
TextToExport.displayName = 'Text';
|
||||
|
||||
// TODO: Deprecate this.
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
TextToExport.propTypes = DeprecatedTextPropTypes;
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
module.exports = (TextToExport: Class<NativeComponent<TextProps>>);
|
||||
|
@ -56,7 +56,6 @@ describe('setAndForwardRef', () => {
|
||||
}
|
||||
}
|
||||
|
||||
// $FlowFixMe - TODO T29156721 `React.forwardRef` is not defined in Flow, yet.
|
||||
const TestComponentWithRef = React.forwardRef((props, ref) => (
|
||||
<TestComponent {...props} forwardedRef={ref} />
|
||||
));
|
||||
@ -86,6 +85,9 @@ describe('setAndForwardRef', () => {
|
||||
it('should forward refs (createRef-based)', () => {
|
||||
const createdRef = React.createRef<typeof ForwardedComponent>();
|
||||
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an
|
||||
* error found when Flow v0.89 was deployed. To see the error, delete this
|
||||
* comment and run Flow. */
|
||||
ReactTestRenderer.create(<TestComponentWithRef ref={createdRef} />);
|
||||
|
||||
/* $FlowFixMe(>=0.87.0 site=react_native_fb) This comment suppresses an
|
||||
|
@ -10,13 +10,13 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
/* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This comment
|
||||
* suppresses an error when upgrading Flow's support for React. To see the
|
||||
* error delete this comment and run Flow. */
|
||||
import type React from 'react';
|
||||
|
||||
export type Example = {
|
||||
title: string,
|
||||
/* $FlowFixMe(>=0.89.0 site=react_native_fb) This comment suppresses an error
|
||||
* found when Flow v0.89 was deployed. To see the error, delete this comment
|
||||
* and run Flow. */
|
||||
render: () => ?React.Element<any>,
|
||||
description?: string,
|
||||
platform?: string,
|
||||
|
@ -214,8 +214,8 @@
|
||||
"@reactions/component": "^2.0.2",
|
||||
"async": "^2.4.0",
|
||||
"babel-eslint": "9.0.0",
|
||||
"detox": "9.0.4",
|
||||
"coveralls": "^3.0.2",
|
||||
"detox": "9.0.4",
|
||||
"eslint": "5.1.0",
|
||||
"eslint-config-fb-strict": "22.1.0",
|
||||
"eslint-config-fbjs": "2.0.1",
|
||||
@ -225,7 +225,7 @@
|
||||
"eslint-plugin-prettier": "2.6.0",
|
||||
"eslint-plugin-react": "7.8.2",
|
||||
"eslint-plugin-react-native": "3.5.0",
|
||||
"flow-bin": "^0.88.0",
|
||||
"flow-bin": "^0.89.0",
|
||||
"jest": "24.0.0-alpha.6",
|
||||
"jest-junit": "5.2.0",
|
||||
"prettier": "1.13.6",
|
||||
|
@ -67,4 +67,4 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixedInNextDeploy
|
||||
suppress_comment=\\(.\\|\n\\)*\\$FlowExpectedError
|
||||
|
||||
[version]
|
||||
^0.88.0
|
||||
^0.89.0
|
||||
|
@ -2778,10 +2778,10 @@ flat-cache@^1.2.1:
|
||||
graceful-fs "^4.1.2"
|
||||
write "^0.2.1"
|
||||
|
||||
flow-bin@^0.88.0:
|
||||
version "0.88.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.88.0.tgz#e4c7bd93da2331f6ac1733fbe484b1b0c52eb548"
|
||||
integrity sha512-SnUCuhHP0JZaXQ83w4iTthfTInAg8DIBZCo1xIqDhFmQ6XNEMYMwYhPoMQyELRrkbTpyCYmf4g93y0UQw0dibw==
|
||||
flow-bin@^0.89.0:
|
||||
version "0.89.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.89.0.tgz#6bd29c2af7e0f429797f820662f33749105c32fa"
|
||||
integrity sha512-DkO4PsXYrl53V6G5+t5HbRMC5ajYUQej2LEGPUZ+j9okTb41Sn5j9vfxsCpXMEAslYnQoysHhYu4GUZsQX/DrQ==
|
||||
|
||||
for-in@^1.0.1, for-in@^1.0.2:
|
||||
version "1.0.2"
|
||||
|
Loading…
x
Reference in New Issue
Block a user