Skip to content

Commit

Permalink
chore: [#173729510] upgrade @types/react-native: 0.60.20 (#2025)
Browse files Browse the repository at this point in the history
  • Loading branch information
fabriziofff authored Jul 9, 2020
1 parent 4796cbd commit f3c52c3
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
"@types/node-fetch": "^2.1.7",
"@types/prettier": "^1.13.2",
"@types/react": "16.8.18",
"@types/react-native": "0.60.5",
"@types/react-native": "0.60.20",
"@types/react-native-background-timer": "^2.0.0",
"@types/react-native-i18n": "^2.0.0",
"@types/react-native-loading-spinner-overlay": "^0.5.1",
Expand Down
7 changes: 5 additions & 2 deletions ts/components/cie/CieRequestAuthenticationOverlay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
*/
import { View } from "native-base";
import * as React from "react";
import { BackHandler, NavState, StyleSheet } from "react-native";
import { BackHandler, StyleSheet } from "react-native";
import WebView from "react-native-webview";
import {
WebViewErrorEvent,
WebViewNavigation,
WebViewNavigationEvent
} from "react-native-webview/lib/WebViewTypes";
import I18n from "../../i18n";
Expand Down Expand Up @@ -79,7 +80,9 @@ export default class CieRequestAuthenticationOverlay extends React.PureComponent
});
};

private handleOnShouldStartLoadWithRequest = (event: NavState): boolean => {
private handleOnShouldStartLoadWithRequest = (
event: WebViewNavigation
): boolean => {
if (this.state.findOpenApp) {
return false;
}
Expand Down
7 changes: 4 additions & 3 deletions ts/screens/authentication/IdpLoginScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { fromNullable, none } from "fp-ts/lib/Option";
import * as pot from "italia-ts-commons/lib/pot";
import { Text, View } from "native-base";
import * as React from "react";
import { Image, NavState, StyleSheet } from "react-native";
import { Image, StyleSheet } from "react-native";
import { WebView } from "react-native-webview";
import { WebViewNavigation } from "react-native-webview/lib/WebViewTypes";
import { NavigationScreenProps } from "react-navigation";
import { connect } from "react-redux";
import ButtonDefaultOpacity from "../../components/ButtonDefaultOpacity";
Expand Down Expand Up @@ -120,7 +121,7 @@ class IdpLoginScreen extends React.Component<Props, State> {
private setRequestStateToLoading = (): void =>
this.setState({ requestState: pot.noneLoading });

private handleNavigationStateChange = (event: NavState): void => {
private handleNavigationStateChange = (event: WebViewNavigation): void => {
if (event.url) {
const urlChanged = event.url.split("?")[0];
if (urlChanged !== this.state.loginTrace) {
Expand All @@ -138,7 +139,7 @@ class IdpLoginScreen extends React.Component<Props, State> {
});
};

private handleShouldStartLoading = (event: NavState): boolean => {
private handleShouldStartLoading = (event: WebViewNavigation): boolean => {
const isLoginUrlWithToken = onLoginUriChanged(
this.handleLoginFailure,
this.props.dispatchLoginSuccess
Expand Down
5 changes: 3 additions & 2 deletions ts/screens/authentication/cie/CieConsentDataUsageScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
* to backend and proceed with the onbording process
*/
import * as React from "react";
import { Alert, BackHandler, NavState } from "react-native";
import { Alert, BackHandler } from "react-native";
import WebView from "react-native-webview";
import { WebViewNavigation } from "react-native-webview/lib/WebViewTypes";
import {
NavigationScreenProp,
NavigationScreenProps,
Expand Down Expand Up @@ -95,7 +96,7 @@ class CieConsentDataUsageScreen extends React.PureComponent<Props, State> {
this.props.loginSuccess(token);
};

private handleShouldStartLoading = (event: NavState): boolean => {
private handleShouldStartLoading = (event: WebViewNavigation): boolean => {
const isLoginUrlWithToken = onLoginUriChanged(
this.handleLoginFailure,
this.handleLoginSuccess
Expand Down
5 changes: 3 additions & 2 deletions ts/screens/modal/Checkout3DsModal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as React from "react";
import { Alert, Modal, NavState, StyleSheet, View } from "react-native";
import { Alert, Modal, StyleSheet, View } from "react-native";
import { WebView } from "react-native-webview";
import { WebViewNavigation } from "react-native-webview/lib/WebViewTypes";
import { NavigationInjectedProps, withNavigation } from "react-navigation";
import BaseScreenComponent, {
ContextualHelpPropsMarkdown
Expand Down Expand Up @@ -44,7 +45,7 @@ class Checkout3DsModal extends React.Component<Props, State> {
private updateLoadingState = (isLoading: boolean) =>
this.setState({ isWebViewLoading: isLoading });

private navigationStateChanged = (navState: NavState) => {
private navigationStateChanged = (navState: WebViewNavigation) => {
// pagoPA-designated URL for exiting the webview
// (visisted when the user taps the "close" button)
const exitUrl = "/wallet/loginMethod";
Expand Down
4 changes: 2 additions & 2 deletions ts/utils/login.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NavState } from "react-native";
import { WebViewNavigation } from "react-native-webview/lib/WebViewTypes";
import * as config from "../config";
import { SessionToken } from "../types/SessionToken";
/**
Expand Down Expand Up @@ -72,7 +72,7 @@ export const getIdpLoginUri = (idpId: string) =>
export const onLoginUriChanged = (
onFailure: (errorCode: string | undefined) => void,
onSuccess: (_: SessionToken) => void
) => (navState: NavState): boolean => {
) => (navState: WebViewNavigation): boolean => {
if (navState.url) {
// If the url is not related to login this will be `null`
const loginResult = extractLoginResult(navState.url);
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1379,10 +1379,10 @@
dependencies:
"@types/react" "*"

"@types/[email protected].5":
version "0.60.5"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.5.tgz#24371cdc724f95381f9b309b08204827dd8de251"
integrity sha512-OWk8r2HzDKkas5WGFfin7CFuSgDsXvO9tDUqNemitbrlXhQ41Zk1R3lv8Vsc843X8NIb/+BO0IQKw72Pd84UNA==
"@types/[email protected].20":
version "0.60.20"
resolved "https://registry.yarnpkg.com/@types/react-native/-/react-native-0.60.20.tgz#890cdb5e8e67eb24a5207210ab978e712b192195"
integrity sha512-Of4g1Ngn33Tw558HoFwvvS/sGJw8dlpgTOEdKNGyvg51fbnuVDEUvWpNgSs1oGkHJub1TFSolJEmowGtqeWYow==
dependencies:
"@types/prop-types" "*"
"@types/react" "*"
Expand Down

0 comments on commit f3c52c3

Please sign in to comment.