chore: upgrade depenendecies

This commit is contained in:
Satyajit Sahoo
2020-09-24 00:56:39 +02:00
parent f1a06e2f92
commit 3bb21e256f
65 changed files with 5393 additions and 4833 deletions

View File

@@ -14,5 +14,8 @@
"react-native-screens"
]
},
"env": { "browser": true, "node": true }
"env": { "browser": true, "node": true },
"rules": {
"import/named": "off"
}
}

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { registerRootComponent } from 'expo';
import {
Animated,

View File

@@ -7,7 +7,6 @@
"slug": "react-navigation-4-example",
"description": "Demo app to showcase various functionality of React Navigation",
"privacy": "public",
"sdkVersion": "36.0.0",
"platforms": [
"ios",
"android",

View File

@@ -8,29 +8,29 @@
"ios": "expo start --ios"
},
"dependencies": {
"@babel/runtime": "^7.8.7",
"@expo/vector-icons": "^10.0.6",
"@react-native-community/masked-view": "0.1.7",
"expo": "^36.0.0",
"expo-asset": "~8.0.0",
"expo-barcode-scanner": "^8.0.0",
"expo-blur": "~8.0.0",
"expo-constants": "~8.0.0",
"@babel/runtime": "^7.11.0",
"@expo/vector-icons": "^10.0.0",
"@react-native-community/masked-view": "0.1.10",
"expo": "^39.0.0",
"expo-asset": "~8.2.0",
"expo-barcode-scanner": "~9.0.0",
"expo-blur": "~8.2.0",
"expo-constants": "~9.2.0",
"hoist-non-react-statics": "^3.3.1",
"react": "16.9.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-36.0.1.tar.gz",
"react-native-gesture-handler": "~1.6.0",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-gesture-handler": "~1.7.0",
"react-native-iphone-x-helper": "^1.2.1",
"react-native-maps": "0.27.0",
"react-native-paper": "^3.4.0",
"react-native-reanimated": "~1.7.0",
"react-native-safe-area-context": "0.7.3",
"react-native-screens": "2.3.0",
"react-native-webview": "8.1.2",
"react-native-maps": "0.27.1",
"react-native-paper": "^4.0.1",
"react-native-reanimated": "~1.13.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"react-native-webview": "10.7.0",
"react-navigation-header-buttons": "^3.0.5"
},
"devDependencies": {
"babel-plugin-module-resolver": "^4.0.0",
"expo-cli": "^3.13.8"
"expo-cli": "^3.27.8"
}
}

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
Alert,
TouchableOpacity,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ScrollView, StyleSheet } from 'react-native';
import { BorderlessButton } from 'react-native-gesture-handler';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View, Text, StyleSheet, Dimensions } from 'react-native';
import { NavigationStackScreenComponent } from 'react-navigation-stack';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ScrollView, StyleProp, TextStyle } from 'react-native';
import { MaterialIcons } from '@expo/vector-icons';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Button, ScrollView, View, Text } from 'react-native';
import { createBottomTabNavigator } from 'react-navigation-tabs';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
Button,
Dimensions,

View File

@@ -1,6 +1,5 @@
import React from 'react';
import * as React from 'react';
import {
AccessibilityStates,
Platform,
StyleSheet,
Text,
@@ -88,11 +87,9 @@ export default class Button extends React.Component<ButtonProps> {
buttonStyles.push({ backgroundColor: color });
}
}
const accessibilityStates: AccessibilityStates[] = [];
if (disabled) {
buttonStyles.push(styles.buttonDisabled);
textStyles.push(styles.textDisabled);
accessibilityStates.push('disabled');
}
const formattedTitle =
Platform.OS === 'android' ? title.toUpperCase() : title;
@@ -100,7 +97,7 @@ export default class Button extends React.Component<ButtonProps> {
<TouchableOpacity
accessibilityLabel={accessibilityLabel}
accessibilityRole="button"
accessibilityStates={accessibilityStates}
accessibilityState={{ disabled }}
testID={testID}
disabled={disabled}
onPress={onPress}

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Platform, StyleSheet, View } from 'react-native';
import BaseButton, { ButtonProps } from './Button';

View File

@@ -23,13 +23,13 @@ class NavigationAwareScrollViewBase extends React.Component<{
componentDidMount() {
this.subscription = this.props.navigation.addListener('refocus', () => {
if (this.props.navigation.isFocused()) {
this.root.current && this.root.current.scrollTo({ x: 0, y: 0 });
this.root.current?.scrollTo({ x: 0, y: 0 });
}
});
}
componentWillUnmount() {
this.subscription && this.subscription.remove();
this.subscription?.remove();
}
setNativeProps(props: ScrollViewProperties) {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Button, ScrollView, StyleSheet, View } from 'react-native';
import {
ThemeColors,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Text, View } from 'react-native';
import { Themed } from 'react-navigation';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Text } from 'react-native';
import {
Themed,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { ScrollView, StatusBar } from 'react-native';
import { Ionicons } from '@expo/vector-icons';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
ScrollView,
StatusBar,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Button, ScrollView } from 'react-native';
import { Themed, SafeAreaView } from 'react-navigation';
import {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { MaterialIcons } from '@expo/vector-icons';
import { createDrawerNavigator } from 'react-navigation-drawer';
import SimpleTabs from './SimpleTabs';

View File

@@ -25,28 +25,28 @@
"example": "yarn --cwd example"
},
"devDependencies": {
"@babel/plugin-proposal-class-properties": "^7.8.3",
"@babel/plugin-proposal-optional-chaining": "^7.8.3",
"@babel/preset-env": "^7.8.7",
"@babel/preset-react": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@babel/runtime": "^7.8.7",
"@commitlint/config-conventional": "^8.3.4",
"@types/jest": "^25.1.4",
"babel-jest": "^25.2.3",
"commitlint": "^8.3.5",
"core-js": "^3.6.4",
"eslint": "^7.0.0",
"eslint-config-satya164": "^3.1.7",
"husky": "^4.2.1",
"jest": "^25.1.0",
"lerna": "^3.20.2",
"prettier": "^2.0.5",
"typescript": "^3.9.5"
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-optional-chaining": "^7.11.0",
"@babel/preset-env": "^7.11.0",
"@babel/preset-react": "^7.10.4",
"@babel/preset-typescript": "^7.10.4",
"@babel/runtime": "^7.11.0",
"@commitlint/config-conventional": "^11.0.0",
"@types/jest": "^26.0.8",
"babel-jest": "^26.2.2",
"commitlint": "^11.0.0",
"core-js": "^3.6.5",
"eslint": "^7.6.0",
"eslint-config-satya164": "^3.1.8",
"husky": "^4.2.5",
"jest": "^26.2.2",
"lerna": "^3.22.1",
"prettier": "^2.1.2",
"typescript": "^4.0.3"
},
"resolutions": {
"react": "~16.9.0",
"react-native": "~0.61.5"
"react": "~16.13.1",
"react-native": "~0.63.2"
},
"husky": {
"hooks": {

View File

@@ -21,15 +21,15 @@
"access": "public"
},
"devDependencies": {
"@react-native-community/bob": "0.10.0",
"@types/react": "16.9.23",
"@types/react-native": "0.61.22",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-native-reanimated": "~1.7.0",
"@react-native-community/bob": "0.16.2",
"@types/react": "16.9.49",
"@types/react-native": "0.63.20",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-reanimated": "~1.13.0",
"react-navigation": "^4.4.0",
"typescript": "^3.9.5"
"typescript": "^4.0.3"
},
"peerDependencies": {
"react": "*",

View File

@@ -37,16 +37,16 @@
"dependencies": {
"hoist-non-react-statics": "^3.3.2",
"path-to-regexp": "^1.8.0",
"query-string": "^6.11.1",
"query-string": "^6.13.1",
"react-is": "^16.13.0"
},
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-native-testing-library": "^1.12.0",
"react-test-renderer": "^16.9.2"
"@react-native-community/bob": "^0.16.2",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-testing-library": "^6.0.0",
"react-test-renderer": "~16.13.1"
},
"peerDependencies": {
"react": "*"

View File

@@ -1,6 +1,6 @@
/* eslint-disable react/sort-comp */
import React from 'react';
import * as React from 'react';
import { NavigationActions, getNavigation, NavigationProvider } from '../index';
export default function createNavigationContainer(Component) {

View File

@@ -1,5 +1,5 @@
export default function getChildRouter(router: any, routeName: string) {
if (router.childRouters && router.childRouters[routeName]) {
if (router.childRouters?.[routeName]) {
return router.childRouters[routeName];
}

View File

@@ -1,6 +1,6 @@
/* eslint no-shadow:0, react/no-multi-comp:0, react/display-name:0 */
import React from 'react';
import * as React from 'react';
import SwitchRouter from '../SwitchRouter';
import StackRouter from '../StackRouter';

View File

@@ -1,6 +1,6 @@
/* eslint react/no-multi-comp:0, react/display-name:0 */
import React from 'react';
import * as React from 'react';
import StackRouter from '../StackRouter';
import TabRouter from '../TabRouter';

View File

@@ -1,6 +1,6 @@
/* eslint no-shadow:0, react/no-multi-comp:0, react/display-name:0 */
import React from 'react';
import * as React from 'react';
import StackRouter from '../StackRouter';
import * as StackActions from '../StackActions';

View File

@@ -1,6 +1,6 @@
/* eslint react/display-name:0 */
import React from 'react';
import * as React from 'react';
import SwitchRouter from '../SwitchRouter';
import StackRouter from '../StackRouter';
import * as NavigationActions from '../../NavigationActions';

View File

@@ -1,6 +1,6 @@
/* eslint react/display-name:0 */
import React from 'react';
import * as React from 'react';
import TabRouter from '../TabRouter';
import * as NavigationActions from '../../NavigationActions';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import validateRouteConfigMap from '../validateRouteConfigMap';
import StackRouter from '../StackRouter';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import withNavigation from './withNavigation';
const EventNameToPropName = {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import NavigationContext from './NavigationContext';
export default class SceneView extends React.PureComponent {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import SceneView from '../SceneView';
export default class SwitchView extends React.Component {

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import renderer from 'react-test-renderer';
import NavigationEvents from '../NavigationEvents';
import NavigationContext from '../NavigationContext';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import hoistStatics from 'hoist-non-react-statics';
import invariant from '../utils/invariant';
import NavigationContext from './NavigationContext';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import hoistStatics from 'hoist-non-react-statics';
import withNavigation from './withNavigation';

View File

@@ -38,19 +38,19 @@
},
"homepage": "https://github.com/react-navigation/drawer#readme",
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"@types/react": "^16.9.23",
"@types/react-native": "^0.61.22",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"@react-native-community/bob": "^0.16.2",
"@types/react": "^16.9.44",
"@types/react-native": "^0.63.4",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-lifecycles-compat": "^3.0.4",
"react-native": "~0.61.5",
"react-native-gesture-handler": "^1.6.0",
"react-native-reanimated": "^1.2.0",
"react-native-screens": "^2.3.0",
"react-native-testing-library": "^1.12.0",
"react-native": "~0.63.2",
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-screens": "~2.10.1",
"react-native-testing-library": "^6.0.0",
"react-navigation": "^4.4.0",
"typescript": "^3.9.5"
"typescript": "^4.0.3"
},
"peerDependencies": {
"react": "*",

View File

@@ -38,18 +38,16 @@
},
"homepage": "https://github.com/react-navigation/react-navigation-material-bottom-tabs#readme",
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"@react-native-community/bob": "^0.16.2",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/react": "^16.9.23",
"@types/react-native": "^0.61.22",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-native-gesture-handler": "^1.6.0",
"react-native-paper": "^3.1.1",
"react-native-reanimated": "^1.2.0",
"@types/react": "^16.9.44",
"@types/react-native": "^0.63.4",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-paper": "^4.2.0",
"react-navigation": "^4.4.0",
"typescript": "^3.9.5"
"typescript": "^4.0.3"
},
"peerDependencies": {
"react": "*",

View File

@@ -39,14 +39,14 @@
"react-native-safe-area-view": "^0.14.9"
},
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"@react-native-community/bob": "^0.16.2",
"@react-navigation/core": "^3.7.6",
"@types/react-test-renderer": "^16.9.2",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-native-gesture-handler": "^1.6.0",
"react-test-renderer": "^16.9.2"
"@types/react-test-renderer": "^16.9.3",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-gesture-handler": "~1.7.0",
"react-test-renderer": "~16.13.1"
},
"@react-native-community/bob": {
"source": "src",

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Platform, StyleSheet, View } from 'react-native';
import { SceneView } from '@react-navigation/core';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
ScrollView,
Platform,
@@ -6,7 +6,6 @@ import {
SectionList,
RefreshControl,
} from 'react-native';
// eslint-disable-next-line import/named
import { ScrollView as GHScrollView } from 'react-native-gesture-handler';
import createNavigationAwareScrollable from './createNavigationAwareScrollable';
import invariant from './utils/invariant';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View } from 'react-native';
import renderer from 'react-test-renderer';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View } from 'react-native';
import renderer from 'react-test-renderer';
import withOrientation, { isOrientationLandscape } from '../withOrientation';

View File

@@ -1,6 +1,6 @@
/* eslint-disable react/sort-comp */
import React from 'react';
import * as React from 'react';
import { Linking, Platform, BackHandler } from 'react-native';
import {
NavigationActions,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { TextInput } from 'react-native';
export default (Navigator, navigatorConfig) =>

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import hoistStatics from 'hoist-non-react-statics';
import { withNavigation } from '@react-navigation/core';

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { Dimensions } from 'react-native';
import hoistNonReactStatic from 'hoist-non-react-statics';

View File

@@ -28,12 +28,12 @@
"@react-navigation/native": "^3.8.0"
},
"devDependencies": {
"@types/react": "^16.9.23",
"@types/react-native": "^0.61.22",
"@types/react-test-renderer": "^16.9.2",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-test-renderer": "^16.9.2",
"typescript": "^3.9.5"
"@types/react": "^16.9.44",
"@types/react-native": "^0.63.4",
"@types/react-test-renderer": "^16.9.3",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-test-renderer": "~16.13.1",
"typescript": "^4.0.3"
}
}

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View } from 'react-native';
import renderer from 'react-test-renderer';

View File

@@ -812,6 +812,7 @@ export interface NavigationDescriptor<
getComponent: () => React.ComponentType;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type NavigationView<Options, State, ScreenProps = unknown> =
| React.ComponentType<
{
@@ -897,11 +898,13 @@ export function withNavigation<
}
>;
// eslint-disable-next-line no-redeclare
export function withNavigation<P extends NavigationInjectedProps>(
Component: React.ComponentType<P>
): React.ComponentType<Omit<P, keyof NavigationInjectedProps>>;
// For backwards compatibility
// eslint-disable-next-line no-redeclare
export function withNavigation<T = {}, P = NavigationParams>(
Component: React.ComponentType<T & NavigationInjectedProps<P>>
): React.ComponentType<
@@ -929,11 +932,13 @@ export function withNavigationFocus<
}
>;
// eslint-disable-next-line no-redeclare
export function withNavigationFocus<P extends NavigationFocusInjectedProps>(
Component: React.ComponentType<P>
): React.ComponentType<Omit<P, keyof NavigationFocusInjectedProps>>;
// For backwards compatibility
// eslint-disable-next-line no-redeclare
export function withNavigationFocus<T = {}, P = NavigationParams>(
Component: React.ComponentType<T & NavigationFocusInjectedProps<P>>
): React.ComponentType<

View File

@@ -43,22 +43,22 @@
"react-native-iphone-x-helper": "^1.2.1"
},
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"@react-native-community/masked-view": "^0.1.7",
"@react-navigation/stack": "^5.7.0",
"@react-native-community/bob": "^0.16.2",
"@react-native-community/masked-view": "0.1.10",
"@react-navigation/stack": "^5.9.0",
"@types/color": "^3.0.1",
"@types/react": "^16.9.23",
"@types/react-native": "^0.61.22",
"@types/react-test-renderer": "^16.9.2",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.4",
"react-native-gesture-handler": "^1.6.0",
"react-native-safe-area-context": "^0.7.3",
"react-native-screens": "^2.3.0",
"@types/react": "^16.9.44",
"@types/react-native": "^0.63.4",
"@types/react-test-renderer": "^16.9.3",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-gesture-handler": "~1.7.0",
"react-native-safe-area-context": "3.1.4",
"react-native-screens": "~2.10.1",
"react-navigation": "^4.4.0",
"react-test-renderer": "~16.9.0",
"typescript": "^3.9.5"
"react-test-renderer": "~16.13.1",
"typescript": "^4.0.3"
},
"peerDependencies": {
"@react-native-community/masked-view": ">=0.1.0",

View File

@@ -21,6 +21,7 @@ import type {
} from 'react-navigation';
// @ts-ignore
// eslint-disable-next-line @typescript-eslint/no-unused-vars
export type Route<T extends string> = NavigationRoute;
export type NavigationStackState = NavigationState;
@@ -288,7 +289,9 @@ export type StackNavigationOptions = StackHeaderOptions &
/**
* Function that returns a React Element to display as a overlay for the card.
*/
cardOverlay?: (props: { style: StyleProp<ViewStyle> }) => React.ReactNode;
cardOverlay?: (props: {
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
}) => React.ReactNode;
/**
* Style object for the card in stack.
* You can provide a custom background color to use instead of the default background here.

View File

@@ -39,7 +39,6 @@ export default class BorderlessButton extends React.Component<Props> {
const { children, style, enabled, ...rest } = this.props;
return (
// @ts-expect-error: the Animated.createAnimatedComponent types don't work properly
<AnimatedBaseButton
{...rest}
onActiveStateChange={this.handleActiveStateChange}

View File

@@ -314,8 +314,10 @@ export default class HeaderSegment extends React.Component<Props, State> {
style={[StyleSheet.absoluteFill, { zIndex: 0 }, backgroundStyle]}
>
{headerBackground ? (
// @ts-ignore
headerBackground({ style: safeStyles })
) : headerTransparent ? null : (
// @ts-ignore
<HeaderBackground style={safeStyles} />
)}
</Animated.View>

View File

@@ -17,7 +17,7 @@ export default class KeyboardManager extends React.Component<Props> {
// Numeric id of the previously focused text input
// When a gesture didn't change the tab, we can restore the focused input with this
private previouslyFocusedTextInput: number | null = null;
private previouslyFocusedTextInput: any = null;
private startTimestamp: number = 0;
private keyboardTimeout: any;
@@ -35,10 +35,8 @@ export default class KeyboardManager extends React.Component<Props> {
this.clearKeyboardTimeout();
// @ts-expect-error: currentlyFocusedInput is pretty new, so not in the type definitions
const input = TextInput.State.currentlyFocusedInput
? // @ts-expect-error
TextInput.State.currentlyFocusedInput()
const input: any = TextInput.State.currentlyFocusedInput
? TextInput.State.currentlyFocusedInput()
: TextInput.State.currentlyFocusedField();
// When a page change begins, blur the currently focused input

View File

@@ -58,7 +58,6 @@ export const MaybeScreen = ({
children: React.ReactNode;
}) => {
if (enabled && Platform.OS === 'web') {
// @ts-expect-error: the Animated.createAnimatedComponent types don't work properly
return <AnimatedWebScreen active={active} {...rest} />;
}

View File

@@ -508,9 +508,10 @@ export default class Card extends React.Component<Props> {
: undefined;
const { backgroundColor } = StyleSheet.flatten(contentStyle || {});
const isTransparent = backgroundColor
? Color(backgroundColor).alpha() === 0
: false;
const isTransparent =
typeof backgroundColor === 'string'
? Color(backgroundColor).alpha() === 0
: false;
return (
<CardAnimationContext.Provider value={animationContext}>

View File

@@ -27,7 +27,9 @@ type Props = TransitionPreset & {
safeAreaInsetRight: number;
safeAreaInsetBottom: number;
safeAreaInsetLeft: number;
cardOverlay?: (props: { style: StyleProp<ViewStyle> }) => React.ReactNode;
cardOverlay?: (props: {
style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
}) => React.ReactNode;
cardOverlayEnabled?: boolean;
cardShadowEnabled?: boolean;
cardStyle?: StyleProp<ViewStyle>;

View File

@@ -43,21 +43,21 @@
"hoist-non-react-statics": "^3.3.2",
"react-lifecycles-compat": "^3.0.4",
"react-native-safe-area-view": "^0.14.9",
"react-native-tab-view": "^2.11.0"
"react-native-tab-view": "^2.15.1"
},
"devDependencies": {
"@react-native-community/bob": "^0.10.0",
"@react-native-community/bob": "^0.16.2",
"@types/hoist-non-react-statics": "^3.3.1",
"@types/react": "^16.9.23",
"@types/react-native": "^0.61.22",
"del-cli": "^3.0.0",
"react": "~16.9.0",
"react-native": "~0.61.5",
"react-native-gesture-handler": "^1.6.0",
"react-native-reanimated": "^1.2.0",
"@types/react": "^16.9.44",
"@types/react-native": "^0.63.4",
"del-cli": "^3.0.1",
"react": "~16.13.1",
"react-native": "~0.63.2",
"react-native-gesture-handler": "~1.7.0",
"react-native-reanimated": "~1.13.0",
"react-native-tab-view": "^2.13.0",
"react-navigation": "^4.4.0",
"typescript": "^3.9.5"
"typescript": "^4.0.3"
},
"peerDependencies": {
"react": "*",

View File

@@ -1,10 +1,5 @@
import * as React from 'react';
import {
View,
StyleSheet,
AccessibilityRole,
AccessibilityStates,
} from 'react-native';
import { View, StyleSheet, AccessibilityRole } from 'react-native';
import { NavigationRoute } from 'react-navigation';
import { ScreenContainer } from 'react-native-screens';
@@ -35,7 +30,7 @@ type Props = NavigationViewProps &
getAccessibilityStates: (props: {
route: NavigationRoute;
focused: boolean;
}) => AccessibilityStates[];
}) => string[];
navigation: NavigationTabProp;
descriptors: SceneDescriptorMap;
screenProps?: unknown;
@@ -49,11 +44,8 @@ class TabNavigationView extends React.PureComponent<Props, State> {
static defaultProps = {
lazy: true,
getAccessibilityRole: (): AccessibilityRole => 'button',
getAccessibilityStates: ({
focused,
}: {
focused: boolean;
}): AccessibilityStates[] => (focused ? ['selected'] : []),
getAccessibilityStates: ({ focused }: { focused: boolean }) =>
focused ? ['selected'] : [],
};
static getDerivedStateFromProps(nextProps: Props, prevState: State) {

View File

@@ -1,7 +1,7 @@
import * as React from 'react';
import {
AccessibilityRole,
AccessibilityStates,
AccessibilityState,
StyleProp,
TextStyle,
ViewStyle,
@@ -106,7 +106,8 @@ export type ButtonComponentProps = {
testID?: string;
accessibilityLabel?: string;
accessibilityRole?: AccessibilityRole;
accessibilityStates?: AccessibilityStates[];
accessibilityState?: AccessibilityState;
accessibilityStates?: string[];
style?: StyleProp<ViewStyle>;
};
@@ -123,7 +124,7 @@ export type BottomTabBarProps = BottomTabBarOptions & {
getAccessibilityStates: (props: {
route: NavigationRoute;
focused: boolean;
}) => AccessibilityStates[];
}) => string[];
getButtonComponent: (props: {
route: NavigationRoute;
}) => React.ComponentType<ButtonComponentProps> | undefined;

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import {
Animated,
TouchableWithoutFeedback,
@@ -62,6 +62,7 @@ class TouchableWithoutFeedbackWrapper extends React.Component<
testID,
accessibilityLabel,
accessibilityRole,
accessibilityState,
accessibilityStates,
...rest
} = this.props;
@@ -74,6 +75,8 @@ class TouchableWithoutFeedbackWrapper extends React.Component<
hitSlop={{ left: 15, right: 15, top: 0, bottom: 5 }}
accessibilityLabel={accessibilityLabel}
accessibilityRole={accessibilityRole}
accessibilityState={accessibilityState}
// @ts-expect-error: support older RN versions
accessibilityStates={accessibilityStates}
>
<View {...rest} />
@@ -170,6 +173,7 @@ class TabBarBottom extends React.Component<BottomTabBarProps, State> {
const { animation, config } = this._getKeyboardAnimationConfigByType(
'show'
);
// @ts-expect-error
Animated[animation](this.state.visible, {
toValue: 0,
...config,
@@ -181,6 +185,7 @@ class TabBarBottom extends React.Component<BottomTabBarProps, State> {
const { animation, config } = this._getKeyboardAnimationConfigByType(
'hide'
);
// @ts-expect-error
Animated[animation](this.state.visible, {
toValue: 1,
...config,

View File

@@ -1,4 +1,4 @@
import React from 'react';
import * as React from 'react';
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
import Animated from 'react-native-reanimated';
import { NavigationRoute } from 'react-navigation';

9845
yarn.lock

File diff suppressed because it is too large Load Diff