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

@@ -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>;