diff --git a/flow-typed/npm/react-navigation-redux-helpers_vx.x.x.js b/flow-typed/npm/react-navigation-redux-helpers_vx.x.x.js index 9034f9e51d0..9147a1d99ab 100644 --- a/flow-typed/npm/react-navigation-redux-helpers_vx.x.x.js +++ b/flow-typed/npm/react-navigation-redux-helpers_vx.x.x.js @@ -1,5 +1,5 @@ -// flow-typed signature: a054ec95ad9fa7f765d69681575bd14f -// flow-typed version: <>/react-navigation-redux-helpers_v^1.1.1/flow_v0.92.0 +// flow-typed signature: b384a698eb5597eec585ee5ff06a615c +// flow-typed version: <>/react-navigation-redux-helpers_v^2.0.9/flow_v0.78.0 /** * This is an autogenerated libdef stub for: @@ -22,7 +22,7 @@ declare module 'react-navigation-redux-helpers' { * require those files directly. Feel free to delete any files that aren't * needed. */ -declare module 'react-navigation-redux-helpers/src' { +declare module 'react-navigation-redux-helpers/src/index' { declare module.exports: any; } @@ -34,16 +34,17 @@ declare module 'react-navigation-redux-helpers/src/reducer' { declare module.exports: any; } +declare module 'react-navigation-redux-helpers/src/reduxify-navigator' { + declare module.exports: any; +} + declare module 'react-navigation-redux-helpers/src/types' { declare module.exports: any; } // Filename aliases -declare module 'react-navigation-redux-helpers/src/index' { - declare module.exports: $Exports<'react-navigation-redux-helpers/src'>; -} declare module 'react-navigation-redux-helpers/src/index.js' { - declare module.exports: $Exports<'react-navigation-redux-helpers/src'>; + declare module.exports: $Exports<'react-navigation-redux-helpers/src/index'>; } declare module 'react-navigation-redux-helpers/src/middleware.js' { declare module.exports: $Exports<'react-navigation-redux-helpers/src/middleware'>; @@ -51,6 +52,9 @@ declare module 'react-navigation-redux-helpers/src/middleware.js' { declare module 'react-navigation-redux-helpers/src/reducer.js' { declare module.exports: $Exports<'react-navigation-redux-helpers/src/reducer'>; } +declare module 'react-navigation-redux-helpers/src/reduxify-navigator.js' { + declare module.exports: $Exports<'react-navigation-redux-helpers/src/reduxify-navigator'>; +} declare module 'react-navigation-redux-helpers/src/types.js' { declare module.exports: $Exports<'react-navigation-redux-helpers/src/types'>; } diff --git a/flow-typed/npm/react-navigation_v1.x.x.js b/flow-typed/npm/react-navigation_v2.x.x.js similarity index 72% rename from flow-typed/npm/react-navigation_v1.x.x.js rename to flow-typed/npm/react-navigation_v2.x.x.js index 88bbcdb3087..233f22407d6 100644 --- a/flow-typed/npm/react-navigation_v1.x.x.js +++ b/flow-typed/npm/react-navigation_v2.x.x.js @@ -1,8 +1,9 @@ -// flow-typed signature: 89ebdb469424ffd80a1c4e583485b8b1 -// flow-typed version: c6154227d1/react-navigation_v1.x.x/flow_>=v0.60.x <=v0.103.x +// flow-typed signature: 03d357611ad08df0d1587876c0affeb7 +// flow-typed version: 0729e77d3a/react-navigation_v2.x.x/flow_>=v0.60.x + +// @flow declare module 'react-navigation' { - import type { ComponentType, Node, ElementType, Ref, Element } from 'react' /** * First, a bunch of things we would love to import but instead must * reconstruct (mostly copy-pasted). @@ -71,6 +72,14 @@ declare module 'react-navigation' { [key: string]: mixed, }; + declare export type NavigationBackAction = {| + type: 'Navigation/BACK', + key?: ?string, + |}; + declare export type NavigationInitAction = {| + type: 'Navigation/INIT', + params?: NavigationParams, + |}; declare export type NavigationNavigateAction = {| type: 'Navigation/NAVIGATE', routeName: string, @@ -81,12 +90,6 @@ declare module 'react-navigation' { key?: string, |}; - - declare export type NavigationBackAction = {| - type: 'Navigation/BACK', - key?: ?string, - |}; - declare export type NavigationSetParamsAction = {| type: 'Navigation/SET_PARAMS', @@ -97,23 +100,28 @@ declare module 'react-navigation' { params: NavigationParams, |}; - declare export type NavigationInitAction = {| - type: 'Navigation/INIT', - params?: NavigationParams, + declare export type NavigationPopAction = {| + +type: 'Navigation/POP', + +n?: number, + +immediate?: boolean, + |}; + declare export type NavigationPopToTopAction = {| + +type: 'Navigation/POP_TO_TOP', + +immediate?: boolean, + |}; + declare export type NavigationPushAction = {| + +type: 'Navigation/PUSH', + +routeName: string, + +params?: NavigationParams, + +action?: NavigationNavigateAction, + +key?: string, |}; - declare export type NavigationResetAction = {| type: 'Navigation/RESET', index: number, key?: ?string, actions: Array, |}; - - declare export type NavigationUriAction = {| - type: 'Navigation/URI', - uri: string, - |}; - declare export type NavigationReplaceAction = {| +type: 'Navigation/REPLACE', +key: string, @@ -121,33 +129,48 @@ declare module 'react-navigation' { +params?: NavigationParams, +action?: NavigationNavigateAction, |}; - declare export type NavigationPopAction = {| - +type: 'Navigation/POP', - +n?: number, - +immediate?: boolean, + declare export type NavigationCompleteTransitionAction = {| + +type: 'Navigation/COMPLETE_TRANSITION', + +key?: string, |}; - declare export type NavigationPopToTopAction = {| - +type: 'Navigation/POP_TO_TOP', - +immediate?: boolean, + + declare export type NavigationOpenDrawerAction = {| + +type: 'Navigation/OPEN_DRAWER', + +key?: string, |}; - declare export type NavigationPushAction = {| - +type: 'Navigation/PUSH', - +routeName: string, - +params?: NavigationParams, - +action?: NavigationNavigateAction, + declare export type NavigationCloseDrawerAction = {| + +type: 'Navigation/CLOSE_DRAWER', + +key?: string, + |}; + declare export type NavigationToggleDrawerAction = {| + +type: 'Navigation/TOGGLE_DRAWER', + +key?: string, + |}; + declare export type NavigationDrawerOpenedAction = {| + +type: 'Navigation/DRAWER_OPENED', + +key?: string, + |}; + declare export type NavigationDrawerClosedAction = {| + +type: 'Navigation/DRAWER_CLOSED', +key?: string, |}; declare export type NavigationAction = + | NavigationBackAction | NavigationInitAction | NavigationNavigateAction - | NavigationReplaceAction + | NavigationSetParamsAction | NavigationPopAction | NavigationPopToTopAction | NavigationPushAction - | NavigationBackAction - | NavigationSetParamsAction - | NavigationResetAction; + | NavigationResetAction + | NavigationReplaceAction + | NavigationCompleteTransitionAction + | NavigationOpenDrawerAction + | NavigationCloseDrawerAction + | NavigationToggleDrawerAction + | NavigationDrawerOpenedAction + | NavigationDrawerClosedAction; /** * NavigationState is a tree of routes for a single navigator, where each @@ -174,7 +197,7 @@ declare module 'react-navigation' { | NavigationLeafRoute | NavigationStateRoute; - declare export type NavigationLeafRoute = { + declare export type NavigationLeafRoute = {| /** * React's key used by some navigators. No need to specify these manually, * they will be defined by the router. @@ -194,10 +217,12 @@ declare module 'react-navigation' { * e.g. `{ car_id: 123 }` in a route that displays a car. */ params?: NavigationParams, - }; + |}; - declare export type NavigationStateRoute = NavigationLeafRoute & - NavigationState; + declare export type NavigationStateRoute = {| + ...NavigationLeafRoute, + ...$Exact, + |}; /** * Router @@ -271,23 +296,36 @@ declare module 'react-navigation' { declare export type NavigationComponent = | NavigationScreenComponent - | NavigationContainer; + | NavigationContainer<*, *, *>; + + declare interface withOptionalNavigationOptions { + navigationOptions?: NavigationScreenConfig; + } declare export type NavigationScreenComponent< Route: NavigationRoute, Options: {}, Props: {} - > = ComponentType & Props> & - ({} | { navigationOptions: NavigationScreenConfig }); + > = React$ComponentType<{ + ...Props, + ...NavigationNavigatorProps, + }> & + withOptionalNavigationOptions; + + declare interface withRouter { + router: NavigationRouter; + } declare export type NavigationNavigator< State: NavigationState, Options: {}, Props: {} - > = ComponentType & Props> & { - router: NavigationRouter, - navigationOptions?: ?NavigationScreenConfig, - }; + > = React$ComponentType<{ + ...Props, + ...NavigationNavigatorProps, + }> & + withRouter & + withOptionalNavigationOptions; declare export type NavigationRouteConfig = | NavigationComponent @@ -336,22 +374,22 @@ declare module 'react-navigation' { */ declare export type NavigationStackScreenOptions = NavigationScreenOptions & { - header?: ?(Node | (HeaderProps => Node)), + header?: ?(React$Node | (HeaderProps => React$Node)), headerTransparent?: boolean, - headerTitle?: string | Node | ElementType, + headerTitle?: string | React$Node | React$ElementType, headerTitleStyle?: AnimatedTextStyleProp, headerTitleAllowFontScaling?: boolean, headerTintColor?: string, - headerLeft?: Node | ElementType, + headerLeft?: React$Node | React$ElementType, headerBackTitle?: string, - headerBackImage?: ImageSource, + headerBackImage?: React$Node | React$ElementType, headerTruncatedBackTitle?: string, headerBackTitleStyle?: TextStyleProp, headerPressColorAndroid?: string, - headerRight?: Node, + headerRight?: React$Node, headerStyle?: ViewStyleProp, headerForceInset?: HeaderForceInset, - headerBackground?: Node | ElementType, + headerBackground?: React$Node | React$ElementType, gesturesEnabled?: boolean, gestureResponseDistance?: { vertical?: number, horizontal?: number }, gestureDirection?: 'default' | 'inverted', @@ -369,10 +407,18 @@ declare module 'react-navigation' { mode?: 'card' | 'modal', headerMode?: HeaderMode, headerTransitionPreset?: 'fade-in-place' | 'uikit', + headerLayoutPreset?: 'left' | 'center', + headerBackTitleVisible?: boolean, cardStyle?: ViewStyleProp, - transitionConfig?: () => TransitionConfig, + transitionConfig?: ( + transitionProps: NavigationTransitionProps, + prevTransitionProps: ?NavigationTransitionProps, + isModal: boolean + ) => TransitionConfig, onTransitionStart?: () => void, onTransitionEnd?: () => void, + transparentCard?: boolean, + disableKeyboardHandling?: boolean, |}; declare export type StackNavigatorConfig = {| @@ -419,18 +465,18 @@ declare module 'react-navigation' { declare export type NavigationTabScreenOptions = {| ...$Exact, tabBarIcon?: - | Node - | ((options: { tintColor: ?string, focused: boolean }) => ?Node), + | React$Node + | ((options: { tintColor: ?string, focused: boolean }) => ?React$Node), tabBarLabel?: | string - | Node - | ((options: { tintColor: ?string, focused: boolean }) => ?Node), + | React$Node + | ((options: { tintColor: ?string, focused: boolean }) => ?React$Node), tabBarVisible?: boolean, tabBarTestIDProps?: { testID?: string, accessibilityLabel?: string }, - tabBarOnPress?: ( - scene: TabScene, - jumpToIndex: (index: number) => void - ) => void, + tabBarOnPress?: ({ + navigation: NavigationScreenProp, + defaultHandler: () => void, + }) => void, |}; /** @@ -440,11 +486,11 @@ declare module 'react-navigation' { declare export type NavigationDrawerScreenOptions = {| ...$Exact, drawerIcon?: - | Node - | ((options: { tintColor: ?string, focused: boolean }) => ?Node), + | React$Node + | ((options: { tintColor: ?string, focused: boolean }) => ?React$Node), drawerLabel?: - | Node - | ((options: { tintColor: ?string, focused: boolean }) => ?Node), + | React$Node + | ((options: { tintColor: ?string, focused: boolean }) => ?React$Node), drawerLockMode?: 'unlocked' | 'locked-closed' | 'locked-open', |}; @@ -486,30 +532,68 @@ declare module 'react-navigation' { declare export type NavigationScreenProp<+S> = { +state: S, dispatch: NavigationDispatch, + addListener: ( + eventName: string, + callback: NavigationEventCallback + ) => NavigationEventSubscription, + getParam: ( + paramName: ParamName, + fallback?: $ElementType< + $PropertyType< + {| + ...{| params: {| [ParamName]: void |} |}, + ...$Exact, + |}, + 'params' + >, + ParamName + > + ) => $ElementType< + $PropertyType< + {| + ...{| params: {| [ParamName]: void |} |}, + ...$Exact, + |}, + 'params' + >, + ParamName + >, + dangerouslyGetParent: () => NavigationScreenProp<*>, + isFocused: () => boolean, + // Shared action creators that exist for all routers goBack: (routeKey?: ?string) => boolean, navigate: ( - routeName: string, + routeName: + | string + | { + routeName: string, + params?: NavigationParams, + action?: NavigationNavigateAction, + key?: string, + }, params?: NavigationParams, action?: NavigationNavigateAction ) => boolean, setParams: (newParams: NavigationParams) => boolean, - getParam: (paramName: string, fallback?: any) => any, - addListener: ( - eventName: string, - callback: NavigationEventCallback - ) => NavigationEventSubscription, - push: ( + // StackRouter action creators + pop?: (n?: number, params?: { immediate?: boolean }) => boolean, + popToTop?: (params?: { immediate?: boolean }) => boolean, + push?: ( routeName: string, params?: NavigationParams, action?: NavigationNavigateAction ) => boolean, - replace: ( + replace?: ( routeName: string, params?: NavigationParams, action?: NavigationNavigateAction ) => boolean, - pop: (n?: number, params?: { immediate?: boolean }) => boolean, - popToTop: (params?: { immediate?: boolean }) => boolean, + reset?: (actions: NavigationAction[], index: number) => boolean, + dismiss?: () => boolean, + // DrawerRouter action creators + openDrawer?: () => boolean, + closeDrawer?: () => boolean, + toggleDrawer?: () => boolean, }; declare export type NavigationNavigatorProps = $Shape<{ @@ -518,28 +602,20 @@ declare module 'react-navigation' { navigationOptions?: O, }>; - //declare export type NavigationNavigatorProps = - // | {} - // | { navigation: NavigationScreenProp } - // | { screenProps: {} } - // | { navigationOptions: O } - // | { - // navigation: NavigationScreenProp, - // screenProps: {}, - // } - // | { - // navigation: NavigationScreenProp, - // navigationOptions: O, - // } - // | { - // screenProps: {}, - // navigationOptions: O, - // } - // | { - // navigation: NavigationScreenProp, - // screenProps: {}, - // navigationOptions: O, - // }; + /** + * NavigationEvents component + */ + + declare type _NavigationEventsProps = { + navigation?: NavigationScreenProp, + onWillFocus?: NavigationEventCallback, + onDidFocus?: NavigationEventCallback, + onWillBlur?: NavigationEventCallback, + onDidBlur?: NavigationEventCallback, + }; + declare export var NavigationEvents: React$ComponentType< + _NavigationEventsProps + >; /** * Navigation container @@ -549,10 +625,12 @@ declare module 'react-navigation' { State: NavigationState, Options: {}, Props: {} - > = ComponentType & Props> & { - router: NavigationRouter, - navigationOptions?: ?NavigationScreenConfig, - }; + > = React$ComponentType<{ + ...Props, + ...NavigationContainerProps, + }> & + withRouter & + withOptionalNavigationOptions; declare export type NavigationContainerProps = $Shape<{ uriPrefix?: string | RegExp, @@ -562,6 +640,8 @@ declare module 'react-navigation' { NavigationAction ) => void, navigation?: NavigationScreenProp, + persistenceKey?: ?string, + renderLoadingExperimental?: React$ComponentType<{}>, screenProps?: *, navigationOptions?: O, }>; @@ -658,7 +738,7 @@ declare module 'react-navigation' { lastState: NavigationState ) => void; - declare export type NavigationSceneRenderer = () => Node; + declare export type NavigationSceneRenderer = () => React$Node; declare export type NavigationStyleInterpolator = ( props: NavigationSceneRendererProps @@ -715,94 +795,114 @@ declare module 'react-navigation' { ) => NavigationState, }; - declare export function addNavigationHelpers( - navigation: NavigationProp - ): NavigationScreenProp; - declare export var NavigationActions: { BACK: 'Navigation/BACK', INIT: 'Navigation/INIT', NAVIGATE: 'Navigation/NAVIGATE', + SET_PARAMS: 'Navigation/SET_PARAMS', + + back: (payload?: { key?: ?string }) => NavigationBackAction, + init: (payload?: { params?: NavigationParams }) => NavigationInitAction, + navigate: (payload: { + routeName: string, + params?: ?NavigationParams, + action?: ?NavigationNavigateAction, + key?: string, + }) => NavigationNavigateAction, + setParams: (payload: { + key: string, + params: NavigationParams, + }) => NavigationSetParamsAction, + }; + + declare export var StackActions: { + POP: 'Navigation/POP', + POP_TO_TOP: 'Navigation/POP_TO_TOP', + PUSH: 'Navigation/PUSH', RESET: 'Navigation/RESET', REPLACE: 'Navigation/REPLACE', - SET_PARAMS: 'Navigation/SET_PARAMS', - URI: 'Navigation/URI', - back: { - (payload?: { key?: ?string }): NavigationBackAction, - toString: () => string, - }, - init: { - (payload?: { params?: NavigationParams }): NavigationInitAction, - toString: () => string, - }, - navigate: { - (payload: { - routeName: string, - params?: ?NavigationParams, - action?: ?NavigationNavigateAction, - }): NavigationNavigateAction, - toString: () => string, - }, - reset: { - (payload: { - index: number, - key?: ?string, - actions: Array, - }): NavigationResetAction, - toString: () => string, - }, - replace: { - (payload: { - routeName: string, - key: string, - newKey?: ?string, - params?: ?NavigationParams, - action?: ?NavigationNavigateAction, - immediate?: ?boolean, - }): NavigationReplaceAction, - toString: () => string, - }, - setParams: { - (payload: { - key: string, - params: NavigationParams, - }): NavigationSetParamsAction, - toString: () => string, - }, - uri: { - (payload: { uri: string }): NavigationUriAction, - toString: () => string, - }, + COMPLETE_TRANSITION: 'Navigation/COMPLETE_TRANSITION', + + pop: (payload: { + n?: number, + immediate?: boolean, + }) => NavigationPopAction, + popToTop: (payload: { + immediate?: boolean, + }) => NavigationPopToTopAction, + push: (payload: { + routeName: string, + params?: NavigationParams, + action?: NavigationNavigateAction, + key?: string, + }) => NavigationPushAction, + reset: (payload: { + index: number, + key?: ?string, + actions: Array, + }) => NavigationResetAction, + replace: (payload: { + key?: string, + routeName: string, + params?: NavigationParams, + action?: NavigationNavigateAction, + }) => NavigationReplaceAction, + completeTransition: (payload: { + key?: string, + }) => NavigationCompleteTransitionAction, + }; + + declare export var DrawerActions: { + OPEN_DRAWER: 'Navigation/OPEN_DRAWER', + CLOSE_DRAWER: 'Navigation/CLOSE_DRAWER', + TOGGLE_DRAWER: 'Navigation/TOGGLE_DRAWER', + DRAWER_OPENED: 'Navigation/DRAWER_OPENED', + DRAWER_CLOSED: 'Navigation/DRAWER_CLOSED', + + openDrawer: (payload: { + key?: string, + }) => NavigationOpenDrawerAction, + closeDrawer: (payload: { + key?: string, + }) => NavigationCloseDrawerAction, + toggleDrawer: (payload: { + key?: string, + }) => NavigationToggleDrawerAction, }; declare type _RouterProp = { router: NavigationRouter, }; - declare type _NavigatorCreator< - NavigationViewProps: {}, - S: NavigationState, - O: {} - > = ( - NavigationView: ComponentType<_RouterProp & NavigationViewProps> - ) => NavigationNavigator; - declare export function createNavigator< - S: NavigationState, - O: {}, - NavigatorConfig: {}, - NavigationViewProps: NavigationNavigatorProps - >( + + declare type NavigationDescriptor = { + key: string, + state: NavigationLeafRoute | NavigationStateRoute, + navigation: NavigationScreenProp<*>, + getComponent: () => React$ComponentType<{}>, + }; + + declare type NavigationView = React$ComponentType<{ + descriptors: { [key: string]: NavigationDescriptor }, + navigation: NavigationScreenProp, + }>; + + declare export function createNavigator( + view: NavigationView, router: NavigationRouter, - routeConfigs?: NavigationRouteConfigMap, navigatorConfig?: NavigatorConfig - ): _NavigatorCreator; + ): NavigationNavigator; declare export function StackNavigator( routeConfigMap: NavigationRouteConfigMap, stackConfig?: StackNavigatorConfig ): NavigationContainer<*, *, *>; + declare export function createStackNavigator( + routeConfigMap: NavigationRouteConfigMap, + stackConfig?: StackNavigatorConfig + ): NavigationContainer<*, *, *>; declare type _TabViewConfig = {| - tabBarComponent?: ElementType, + tabBarComponent?: React$ElementType, tabBarPosition?: 'top' | 'bottom', tabBarOptions?: {}, swipeEnabled?: boolean, @@ -824,6 +924,19 @@ declare module 'react-navigation' { routeConfigs: NavigationRouteConfigMap, config?: _TabNavigatorConfig ): NavigationContainer<*, *, *>; + declare export function createTabNavigator( + routeConfigs: NavigationRouteConfigMap, + config?: _TabNavigatorConfig + ): NavigationContainer<*, *, *>; + /* TODO: fix the config for each of these tab navigator types */ + declare export function createBottomTabNavigator( + routeConfigs: NavigationRouteConfigMap, + config?: _TabNavigatorConfig + ): NavigationContainer<*, *, *>; + declare export function createMaterialTopTabNavigator( + routeConfigs: NavigationRouteConfigMap, + config?: _TabNavigatorConfig + ): NavigationContainer<*, *, *>; declare type _SwitchNavigatorConfig = {| ...NavigationSwitchRouterConfig, |}; @@ -831,15 +944,16 @@ declare module 'react-navigation' { routeConfigs: NavigationRouteConfigMap, config?: _SwitchNavigatorConfig ): NavigationContainer<*, *, *>; + declare export function createSwitchNavigator( + routeConfigs: NavigationRouteConfigMap, + config?: _SwitchNavigatorConfig + ): NavigationContainer<*, *, *>; declare type _DrawerViewConfig = {| drawerLockMode?: 'unlocked' | 'locked-closed' | 'locked-open', drawerWidth?: number | (() => number), drawerPosition?: 'left' | 'right', - drawerOpenRoute?: string, - drawerCloseRoute?: string, - drawerToggleRoute?: string, - contentComponent?: ElementType, + contentComponent?: React$ElementType, contentOptions?: {}, style?: ViewStyleProp, useNativeAnimations?: boolean, @@ -855,6 +969,10 @@ declare module 'react-navigation' { routeConfigs: NavigationRouteConfigMap, config?: _DrawerNavigatorConfig ): NavigationContainer<*, *, *>; + declare export function createDrawerNavigator( + routeConfigs: NavigationRouteConfigMap, + config?: _DrawerNavigatorConfig + ): NavigationContainer<*, *, *>; declare export function StackRouter( routeConfigs: NavigationRouteConfigMap, @@ -877,9 +995,9 @@ declare module 'react-navigation' { render: ( transitionProps: NavigationTransitionProps, prevTransitionProps: ?NavigationTransitionProps - ) => Node, + ) => React$Node, }; - declare export var Transitioner: ComponentType<_TransitionerProps>; + declare export var Transitioner: React$ComponentType<_TransitionerProps>; declare type _CardStackTransitionerProps = { headerMode: HeaderMode, @@ -893,14 +1011,14 @@ declare module 'react-navigation' { */ transitionConfig?: () => TransitionConfig, } & NavigationNavigatorProps; - declare export var CardStackTransitioner: ComponentType< + declare export var CardStackTransitioner: React$ComponentType< _CardStackTransitionerProps >; declare type _CardStackProps = { screenProps?: {}, headerMode: HeaderMode, - headerComponent?: ElementType, + headerComponent?: React$ElementType, mode: 'card' | 'modal', router: NavigationRouter, cardStyle?: ViewStyleProp, @@ -919,16 +1037,16 @@ declare module 'react-navigation' { scene: NavigationScene, index: number, }; - declare export var CardStack: ComponentType<_CardStackProps>; + declare export var CardStack: React$ComponentType<_CardStackProps>; declare type _CardProps = { ...$Exact, - children: Node, - onComponentRef: Ref<*>, + children: React$Node, + onComponentRef: React$Ref<*>, pointerEvents: string, style: any, }; - declare export var Card: ComponentType<_CardProps>; + declare export var Card: React$ComponentType<_CardProps>; declare type _SafeAreaViewForceInsetValue = 'always' | 'never' | number; declare type _SafeAreaViewProps = { @@ -940,21 +1058,21 @@ declare module 'react-navigation' { vertical?: _SafeAreaViewForceInsetValue, horizontal?: _SafeAreaViewForceInsetValue, }, - children?: Node, + children?: React$Node, style?: AnimatedViewStyleProp, }; - declare export var SafeAreaView: ComponentType<_SafeAreaViewProps>; + declare export var SafeAreaView: React$ComponentType<_SafeAreaViewProps>; - declare export var Header: ComponentType & { + declare export var Header: React$ComponentType & { HEIGHT: number, }; declare type _HeaderTitleProps = { - children: Node, + children: React$Node, selectionColor?: string | number, style?: AnimatedTextStyleProp, }; - declare export var HeaderTitle: ComponentType<_HeaderTitleProps>; + declare export var HeaderTitle: React$ComponentType<_HeaderTitleProps>; declare type _HeaderBackButtonProps = { onPress?: () => void, @@ -965,7 +1083,7 @@ declare module 'react-navigation' { truncatedTitle?: ?string, width?: ?number, }; - declare export var HeaderBackButton: ComponentType< + declare export var HeaderBackButton: React$ComponentType< _HeaderBackButtonProps >; @@ -973,10 +1091,7 @@ declare module 'react-navigation' { drawerLockMode?: 'unlocked' | 'locked-closed' | 'locked-open', drawerWidth: number | (() => number), drawerPosition: 'left' | 'right', - drawerOpenRoute: string, - drawerCloseRoute: string, - drawerToggleRoute: string, - contentComponent: ElementType, + contentComponent: React$ElementType, contentOptions?: {}, style?: ViewStyleProp, useNativeAnimations: boolean, @@ -985,7 +1100,7 @@ declare module 'react-navigation' { navigation: NavigationScreenProp, router: NavigationRouter, }; - declare export var DrawerView: ComponentType<_DrawerViewProps>; + declare export var DrawerView: React$ComponentType<_DrawerViewProps>; declare type _DrawerScene = { route: NavigationRoute, @@ -1005,8 +1120,8 @@ declare module 'react-navigation' { activeBackgroundColor?: string, inactiveTintColor?: string, inactiveBackgroundColor?: string, - getLabel: (scene: _DrawerScene) => ?(Node | string), - renderIcon: (scene: _DrawerScene) => ?Node, + getLabel: (scene: _DrawerScene) => ?(React$Node | string), + renderIcon: (scene: _DrawerScene) => ?React$Node, onItemPress: (info: _DrawerItem) => void, itemsContainerForceInset?: Object, itemsContainerStyle?: ViewStyleProp, @@ -1017,10 +1132,10 @@ declare module 'react-navigation' { iconContainerStyle?: ViewStyleProp, drawerPosition: 'left' | 'right', }; - declare export var DrawerItems: ComponentType<_DrawerItemsProps>; + declare export var DrawerItems: React$ComponentType<_DrawerItemsProps>; declare type _TabViewProps = { - tabBarComponent?: ElementType, + tabBarComponent?: React$ElementType, tabBarPosition?: 'top' | 'bottom', tabBarOptions?: {}, swipeEnabled?: boolean, @@ -1034,7 +1149,7 @@ declare module 'react-navigation' { navigation: NavigationScreenProp, router: NavigationRouter, }; - declare export var TabView: ComponentType<_TabViewProps>; + declare export var TabView: React$ComponentType<_TabViewProps>; declare type _TabBarTopProps = { activeTintColor: string, @@ -1047,7 +1162,7 @@ declare module 'react-navigation' { tabBarPosition: string, navigation: NavigationScreenProp, jumpToIndex: (index: number) => void, - getLabel: (scene: TabScene) => ?(Node | string), + getLabel: (scene: TabScene) => ?(React$Node | string), getOnPress: ( previousScene: NavigationRoute, scene: TabScene @@ -1056,11 +1171,11 @@ declare module 'react-navigation' { scene: TabScene, jumpToIndex: (index: number) => void, }) => void, - renderIcon: (scene: TabScene) => Element<*>, + renderIcon: (scene: TabScene) => React$Element<*>, labelStyle?: TextStyleProp, iconStyle?: ViewStyleProp, }; - declare export var TabBarTop: ComponentType<_TabBarTopProps>; + declare export var TabBarTop: React$ComponentType<_TabBarTopProps>; declare type _TabBarBottomProps = { activeTintColor: string, @@ -1074,7 +1189,7 @@ declare module 'react-navigation' { position: AnimatedValue, navigation: NavigationScreenProp, jumpToIndex: (index: number) => void, - getLabel: (scene: TabScene) => ?(Node | string), + getLabel: (scene: TabScene) => ?(React$Node | string), getOnPress: ( previousScene: NavigationRoute, scene: TabScene @@ -1084,18 +1199,18 @@ declare module 'react-navigation' { jumpToIndex: (index: number) => void, }) => void, getTestIDProps: (scene: TabScene) => (scene: TabScene) => any, - renderIcon: (scene: TabScene) => Node, + renderIcon: (scene: TabScene) => React$Node, style?: ViewStyleProp, animateStyle?: ViewStyleProp, labelStyle?: TextStyleProp, tabStyle?: ViewStyleProp, showIcon?: boolean, }; - declare export var TabBarBottom: ComponentType<_TabBarBottomProps>; + declare export var TabBarBottom: React$ComponentType<_TabBarBottomProps>; declare export function withNavigation( - Component: ComponentType - ): ComponentType< + Component: React$ComponentType + ): React$ComponentType< $Diff< Props, { @@ -1104,6 +1219,15 @@ declare module 'react-navigation' { > >; declare export function withNavigationFocus( - Component: ComponentType - ): ComponentType<$Diff>; + Component: React$ComponentType + ): React$ComponentType<$Diff>; + + declare export function getNavigation( + router: NavigationRouter, + state: State, + dispatch: NavigationDispatch, + actionSubscribers: Set, + getScreenProps: () => {}, + getCurrentNavigation: () => ?NavigationScreenProp + ): NavigationScreenProp; } diff --git a/package.json b/package.json index 004834f99b9..9df66841f36 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "react-native-text-input-reset": "^1.0.2", "react-native-vector-icons": "^4.6.0", "react-native-webview": "^5.0.0", - "react-navigation": "^1.5.12", - "react-navigation-redux-helpers": "^1.1.1", + "react-navigation": "^2.18.2", + "react-navigation-redux-helpers": "^2.0.9", "react-redux": "^5.0.7", "react-test-renderer": "16.8.3", "redux": "^4.0.0", diff --git a/src/actionTypes.js b/src/actionTypes.js index ac45b130b2b..b7ba140c9e9 100644 --- a/src/actionTypes.js +++ b/src/actionTypes.js @@ -1,6 +1,4 @@ /* @flow strict-local */ -import type { NavigationNavigateAction } from 'react-navigation'; - import { REHYDRATE, APP_ONLINE, @@ -90,6 +88,8 @@ import type { UserStatusEvent, } from './types'; +export type { NavigationAction } from 'react-navigation'; + /** * Dispatched by redux-persist when the stored state is loaded. * @@ -152,8 +152,6 @@ type DebugFlagToggleAction = {| value: boolean, |}; -export type NavigateAction = NavigationNavigateAction; - type AccountSwitchAction = {| type: typeof ACCOUNT_SWITCH, index: number, diff --git a/src/main/MainScreenWithTabs.js b/src/main/MainScreenWithTabs.js index 3638f4bfae7..4eb338fe47a 100644 --- a/src/main/MainScreenWithTabs.js +++ b/src/main/MainScreenWithTabs.js @@ -1,6 +1,6 @@ /* @flow strict-local */ import React, { PureComponent } from 'react'; -import { View } from 'react-native'; +import { SafeAreaView } from 'react-native'; import type { Context } from '../types'; import { OfflineNotice, ZulipStatusBar } from '../common'; @@ -18,11 +18,11 @@ export default class MainScreenWithTabs extends PureComponent<{}> { const { styles: contextStyles } = this.context; return ( - + - + ); } } diff --git a/src/main/MainTabs.js b/src/main/MainTabs.js index a56b83e2758..797d51d206c 100644 --- a/src/main/MainTabs.js +++ b/src/main/MainTabs.js @@ -1,7 +1,7 @@ /* @flow strict-local */ import React from 'react'; import { Platform } from 'react-native'; -import { TabNavigator, TabBarBottom } from 'react-navigation'; +import { createMaterialTopTabNavigator } from 'react-navigation'; import type { TabNavigationOptionsPropsType } from '../types'; import tabsOptions from '../styles/tabs'; @@ -14,7 +14,7 @@ import { OwnAvatar } from '../common'; import IconUnreadConversations from '../nav/IconUnreadConversations'; import ProfileCard from '../account-info/ProfileCard'; -export default TabNavigator( +export default createMaterialTopTabNavigator( { home: { // $FlowFixMe react-navigation types are twisty and seem wrong @@ -66,7 +66,6 @@ export default TabNavigator( }, { backBehavior: 'none', - tabBarComponent: TabBarBottom, tabBarPosition: 'bottom', ...tabsOptions({ showLabel: !!Platform.isPad, diff --git a/src/main/StreamTabs.js b/src/main/StreamTabs.js index 5aa6f887f53..df7310511cb 100644 --- a/src/main/StreamTabs.js +++ b/src/main/StreamTabs.js @@ -1,7 +1,7 @@ /* @flow strict-local */ import React from 'react'; import { StyleSheet, Text } from 'react-native'; -import { TabNavigator, TabBarTop } from 'react-navigation'; +import { createMaterialTopTabNavigator } from 'react-navigation'; import { FormattedMessage } from 'react-intl'; import type { TabNavigationOptionsPropsType } from '../types'; @@ -16,7 +16,7 @@ const styles = StyleSheet.create({ }, }); -export default TabNavigator( +export default createMaterialTopTabNavigator( { subscribed: { // $FlowFixMe react-navigation types are twisty and seem wrong @@ -41,12 +41,8 @@ export default TabNavigator( }, }, }, - { - tabBarComponent: TabBarTop, - tabBarPosition: 'top', - ...tabsOptions({ - showLabel: true, - showIcon: false, - }), - }, + tabsOptions({ + showLabel: true, + showIcon: false, + }), ); diff --git a/src/nav/AppNavigator.js b/src/nav/AppNavigator.js index 9efce95569d..b0bdd316084 100644 --- a/src/nav/AppNavigator.js +++ b/src/nav/AppNavigator.js @@ -1,5 +1,5 @@ /* @flow strict-local */ -import { StackNavigator } from 'react-navigation'; +import { createStackNavigator } from 'react-navigation'; import AccountPickScreen from '../account/AccountPickScreen'; import RealmScreen from '../start/RealmScreen'; @@ -35,8 +35,7 @@ import EmojiPickerScreen from '../emoji/EmojiPickerScreen'; import LegalScreen from '../settings/LegalScreen'; import UserStatusScreen from '../user-status/UserStatusScreen'; -export default StackNavigator( - // $FlowFixMe react-navigation types :-/ -- see a36814e80 +export default createStackNavigator( { account: { screen: AccountPickScreen }, 'account-details': { screen: AccountDetailsScreen }, diff --git a/src/nav/AppWithNavigation.js b/src/nav/AppWithNavigation.js index eab913bb9f6..43ad2273887 100644 --- a/src/nav/AppWithNavigation.js +++ b/src/nav/AppWithNavigation.js @@ -1,38 +1,12 @@ /* @flow strict-local */ +import { reduxifyNavigator } from 'react-navigation-redux-helpers'; -import React, { PureComponent } from 'react'; -import { addNavigationHelpers } from 'react-navigation'; -import { createReduxBoundAddListener } from 'react-navigation-redux-helpers'; - -import type { Dispatch, NavigationState, PlainDispatch } from '../types'; import { connect } from '../react-redux'; import { getNav } from '../selectors'; import AppNavigator from './AppNavigator'; -type Props = {| - dispatch: Dispatch, - nav: NavigationState, -|}; - -class AppWithNavigation extends PureComponent { - render() { - const { nav } = this.props; - const dispatch = (this.props.dispatch: PlainDispatch); - const addListener = createReduxBoundAddListener('root'); - - return ( - - ); - } -} +const AppWithNavigation = reduxifyNavigator(AppNavigator, 'root'); export default connect(state => ({ - nav: getNav(state), + state: getNav(state), }))(AppWithNavigation); diff --git a/src/nav/__tests__/navSelectors-test.js b/src/nav/__tests__/navSelectors-test.js index d78d4d549d7..fbd76038fef 100644 --- a/src/nav/__tests__/navSelectors-test.js +++ b/src/nav/__tests__/navSelectors-test.js @@ -7,7 +7,6 @@ import { getChatScreenParams, getTopMostNarrow, getCanGoBack, - getSameRoutesCount, } from '../navSelectors'; describe('getCurrentRouteName', () => { @@ -120,47 +119,3 @@ describe('getCanGoBack', () => { expect(getCanGoBack(state)).toBe(false); }); }); - -describe('getSameRoutesCount', () => { - test('if no routes the count of same routes is 0', () => { - const state = deepFreeze({ - nav: { - routes: [], - }, - }); - - const count = getSameRoutesCount(state); - - expect(count).toEqual(0); - }); - - test('if last route differs from routes the count of same routes is 0', () => { - const state = deepFreeze({ - nav: { - routes: [{ routeName: 'main' }, { routeName: 'chat' }], - }, - }); - - const count = getSameRoutesCount(state); - - expect(count).toEqual(1); - }); - - test('if several of the routes are the same ignore the params and return their count', () => { - const state = deepFreeze({ - nav: { - routes: [ - { routeName: 'login' }, - { routeName: 'main' }, - { routeName: 'chat', params: { key: 'value' } }, - { routeName: 'chat', params: { key: 'another value' } }, - { routeName: 'chat', params: { anotherKey: 'some value' } }, - ], - }, - }); - - const count = getSameRoutesCount(state); - - expect(count).toEqual(3); - }); -}); diff --git a/src/nav/navActions.js b/src/nav/navActions.js index 7a035a0fdf0..c0e4cbbb02b 100644 --- a/src/nav/navActions.js +++ b/src/nav/navActions.js @@ -1,113 +1,109 @@ /* @flow strict-local */ -import { NavigationActions } from 'react-navigation'; +import { NavigationActions, StackActions } from 'react-navigation'; import type { - Dispatch, - NavigateAction, - GetState, + NavigationAction, Message, Narrow, UserOrBot, ApiResponseServerSettings, } from '../types'; -import { getSameRoutesCount } from '../selectors'; -export const navigateBack = () => (dispatch: Dispatch, getState: GetState): NavigateAction => - // $FlowFixMe - dispatch(NavigationActions.pop({ n: getSameRoutesCount(getState()) })); +export const navigateBack = (): NavigationAction => StackActions.popToTop({}); /** Only call this via `doNarrow`. See there for details. */ -export const navigateToChat = (narrow: Narrow): NavigateAction => +export const navigateToChat = (narrow: Narrow): NavigationAction => NavigationActions.navigate({ routeName: 'chat', params: { narrow } }); -export const navigateToAllStreams = (): NavigateAction => +export const navigateToAllStreams = (): NavigationAction => NavigationActions.navigate({ routeName: 'subscriptions' }); -export const navigateToUsersScreen = (): NavigateAction => +export const navigateToUsersScreen = (): NavigationAction => NavigationActions.navigate({ routeName: 'users' }); -export const navigateToSearch = (): NavigateAction => +export const navigateToSearch = (): NavigationAction => NavigationActions.navigate({ routeName: 'search' }); -export const navigateToSettings = (): NavigateAction => +export const navigateToSettings = (): NavigationAction => NavigationActions.navigate({ routeName: 'settings' }); -export const navigateToEmojiPicker = (messageId: number): NavigateAction => +export const navigateToEmojiPicker = (messageId: number): NavigationAction => NavigationActions.navigate({ routeName: 'emoji-picker', params: { messageId } }); -export const navigateToAuth = (serverSettings: ApiResponseServerSettings): NavigateAction => +export const navigateToAuth = (serverSettings: ApiResponseServerSettings): NavigationAction => NavigationActions.navigate({ routeName: 'auth', params: { serverSettings } }); -export const navigateToDev = (): NavigateAction => NavigationActions.navigate({ routeName: 'dev' }); +export const navigateToDev = (): NavigationAction => + NavigationActions.navigate({ routeName: 'dev' }); -export const navigateToPassword = (requireEmailFormat: boolean): NavigateAction => +export const navigateToPassword = (requireEmailFormat: boolean): NavigationAction => NavigationActions.navigate({ routeName: 'password', params: { requireEmailFormat } }); -export const navigateToAccountPicker = (): NavigateAction => +export const navigateToAccountPicker = (): NavigationAction => NavigationActions.navigate({ routeName: 'account' }); -export const navigateToAccountDetails = (email: string): NavigateAction => +export const navigateToAccountDetails = (email: string): NavigationAction => NavigationActions.navigate({ routeName: 'account-details', params: { email } }); -export const navigateToGroupDetails = (recipients: UserOrBot[]): NavigateAction => +export const navigateToGroupDetails = (recipients: UserOrBot[]): NavigationAction => NavigationActions.navigate({ routeName: 'group-details', params: { recipients } }); -export const navigateToRealmScreen = (realm?: string): NavigateAction => +export const navigateToRealmScreen = (realm?: string): NavigationAction => NavigationActions.navigate({ routeName: 'realm', params: { realm } }); -export const navigateToLightbox = (src: string, message: Message): NavigateAction => +export const navigateToLightbox = (src: string, message: Message): NavigationAction => NavigationActions.navigate({ routeName: 'lightbox', params: { src, message } }); -export const navigateToLoading = (): NavigateAction => +export const navigateToLoading = (): NavigationAction => NavigationActions.navigate({ routeName: 'loading' }); -export const navigateToLanguage = (): NavigateAction => +export const navigateToLanguage = (): NavigationAction => NavigationActions.navigate({ routeName: 'language' }); -export const navigateToCreateGroup = (): NavigateAction => +export const navigateToCreateGroup = (): NavigationAction => NavigationActions.navigate({ routeName: 'group' }); -export const navigateToDiagnostics = (): NavigateAction => +export const navigateToDiagnostics = (): NavigationAction => NavigationActions.navigate({ routeName: 'diagnostics' }); -export const navigateToWelcomeHelp = (): NavigateAction => +export const navigateToWelcomeHelp = (): NavigationAction => NavigationActions.navigate({ routeName: 'welcome-help' }); -export const navigateToWelcomeScreen = (): NavigateAction => +export const navigateToWelcomeScreen = (): NavigationAction => NavigationActions.navigate({ routeName: 'welcome' }); -export const navigateToVariables = (): NavigateAction => +export const navigateToVariables = (): NavigationAction => NavigationActions.navigate({ routeName: 'variables' }); -export const navigateToTiming = (): NavigateAction => +export const navigateToTiming = (): NavigationAction => NavigationActions.navigate({ routeName: 'timing' }); -export const navigateToStorage = (): NavigateAction => +export const navigateToStorage = (): NavigationAction => NavigationActions.navigate({ routeName: 'storage' }); -export const navigateToDebug = (): NavigateAction => +export const navigateToDebug = (): NavigationAction => NavigationActions.navigate({ routeName: 'debug' }); -export const navigateToStream = (streamId: number): NavigateAction => +export const navigateToStream = (streamId: number): NavigationAction => NavigationActions.navigate({ routeName: 'stream', params: { streamId } }); -export const navigateToTopicList = (streamId: number): NavigateAction => +export const navigateToTopicList = (streamId: number): NavigationAction => NavigationActions.navigate({ routeName: 'topics', params: { streamId } }); -export const navigateToCreateStream = (): NavigateAction => +export const navigateToCreateStream = (): NavigationAction => NavigationActions.navigate({ routeName: 'stream-create' }); -export const navigateToEditStream = (streamId: number): NavigateAction => +export const navigateToEditStream = (streamId: number): NavigationAction => NavigationActions.navigate({ routeName: 'stream-edit', params: { streamId } }); -export const navigateToStreamSubscribers = (streamId: number): NavigateAction => +export const navigateToStreamSubscribers = (streamId: number): NavigationAction => NavigationActions.navigate({ routeName: 'invite-users', params: { streamId } }); -export const navigateToNotifications = (): NavigateAction => +export const navigateToNotifications = (): NavigationAction => NavigationActions.navigate({ routeName: 'notifications' }); -export const navigateToLegal = (): NavigateAction => +export const navigateToLegal = (): NavigationAction => NavigationActions.navigate({ routeName: 'legal' }); -export const navigateToUserStatus = (): NavigateAction => +export const navigateToUserStatus = (): NavigationAction => NavigationActions.navigate({ routeName: 'user-status' }); diff --git a/src/nav/navSelectors.js b/src/nav/navSelectors.js index 6e043d8187c..11201eec8a5 100644 --- a/src/nav/navSelectors.js +++ b/src/nav/navSelectors.js @@ -41,17 +41,3 @@ export const getTopMostNarrow: Selector = createSelector( ); export const getCanGoBack = (state: GlobalState) => state.nav.index > 0; - -export const getSameRoutesCount: Selector = createSelector( - getNav, - nav => { - let i = nav.routes.length - 1; - while (i >= 0) { - if (nav.routes[i].routeName !== nav.routes[nav.routes.length - 1].routeName) { - break; - } - i--; - } - return nav.routes.length - i - 1; - }, -); diff --git a/src/reduxTypes.js b/src/reduxTypes.js index e1e9e6c5971..bf5f220ce42 100644 --- a/src/reduxTypes.js +++ b/src/reduxTypes.js @@ -7,11 +7,11 @@ * * @flow strict-local */ - +import type { NavigationAction } from 'react-navigation'; import type { InputSelector } from 'reselect'; import type { Account, Outbox } from './types'; -import type { Action, NavigateAction } from './actionTypes'; +import type { Action } from './actionTypes'; import type { Topic, HuddlesUnreadItem, @@ -322,9 +322,9 @@ export type Selector = InputSelector GlobalState; -export type PlainDispatch = (action: A) => A; +export type PlainDispatch = (action: A) => A; export interface Dispatch { - (action: A): A; + (action: A): A; ((Dispatch, GetState) => T): T; } diff --git a/yarn.lock b/yarn.lock index deb86cc8204..b015cb4acf8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2337,6 +2337,14 @@ create-react-class@^15.6.3: loose-envify "^1.3.1" object-assign "^4.1.1" +create-react-context@0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca" + integrity sha512-KkpaLARMhsTsgp0d2NA/R94F/eDLbhXERdIq3LvX2biCAXcDvHYoOqHfWCHf1+OLj+HKBotLG3KqaOOf+C1C+A== + dependencies: + fbjs "^0.8.0" + gud "^1.0.0" + cross-spawn@^5.0.1, cross-spawn@^5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" @@ -2460,6 +2468,11 @@ date-fns@^1.29.0: resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.30.1.tgz#2e71bf0b119153dbb4cc4e88d9ea5acfb50dc05c" integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw== +debounce@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131" + integrity sha512-mYtLl1xfZLi1m4RtQYlZgJUNQjl4ZxVnHzIR8nLLgi4q1YT8o/WM+MK/f8yfcc9s5Ir5zRaPZyZU6xs1Syoocg== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -3333,7 +3346,7 @@ fbjs-scripts@^1.0.0: semver "^5.1.0" through2 "^2.0.0" -fbjs@^0.8.9: +fbjs@^0.8.0, fbjs@^0.8.9: version "0.8.17" resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd" integrity sha1-xNWY6taUkRJlPWWIsBpc3Nn5D90= @@ -3865,6 +3878,11 @@ growly@^1.3.0: resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081" integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE= +gud@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0" + integrity sha512-zGEOVKFM5sVPPrYs7J5/hYEw2Pof8KCyOwyhG8sAF26mCAeUFAcYPu1mwB7hhpIP29zOIBaDqwuHdLp0jvZXjw== + handlebars@^4.0.3, handlebars@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" @@ -3966,7 +3984,7 @@ has@^1.0.1, has@^1.0.3: dependencies: function-bind "^1.1.1" -hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.2.2, hoist-non-react-statics@^2.3.1: +hoist-non-react-statics@^2.2.0, hoist-non-react-statics@^2.2.2, hoist-non-react-statics@^2.3.1, hoist-non-react-statics@^2.5.0: version "2.5.5" resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47" integrity sha512-rqcy4pJo55FTTLWt+bU8ukscqHeE/e9KWvsOW2b/a3afxQZhwkQdT1rPPCJ0rYXdj4vNcasY8zHTH+jF/qStxw== @@ -7496,6 +7514,15 @@ query-string@^5.0.1: object-assign "^4.1.0" strict-uri-encode "^1.0.0" +query-string@^6.1.0: + version "6.8.2" + resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.8.2.tgz#36cb7e452ae11a4b5e9efee83375e0954407b2f6" + integrity sha512-J3Qi8XZJXh93t2FiKyd/7Ec6GNifsjKXUsVFkSBj/kjLsDylWhnCz4NT1bkPcKotttPW+QbKGqqPH8OoI2pdqw== + dependencies: + decode-uri-component "^0.2.0" + split-on-first "^1.0.0" + strict-uri-encode "^2.0.0" + querystringify@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.1.1.tgz#60e5a5fd64a7f8bfa4d2ab2ed6fdf4c85bad154e" @@ -7583,12 +7610,17 @@ react-intl@^2.4.0: intl-relativeformat "^2.1.0" invariant "^2.1.1" +react-is@^16.5.2: + version "16.9.0" + resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.9.0.tgz#21ca9561399aad0ff1a7701c01683e8ca981edcb" + integrity sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw== + react-is@^16.6.0, react-is@^16.7.0, react-is@^16.8.1, react-is@^16.8.3, react-is@^16.8.4: version "16.8.6" resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16" integrity sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA== -react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.2: +react-lifecycles-compat@^3, react-lifecycles-compat@^3.0.0, react-lifecycles-compat@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362" integrity sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA== @@ -7672,6 +7704,13 @@ react-native-safe-area@^0.4.1: resolved "https://registry.yarnpkg.com/react-native-safe-area/-/react-native-safe-area-0.4.4.tgz#c9e267ef06cd6047da854c30e6c955eff7cc7105" integrity sha512-u1RmFqJMmlzqDT5SezAfRv8MCLwteKsB1fPym4J//wy9zIuYJe60Ni664NRwqCKwDyQmwGcvfGqmA1hTpOOhhQ== +react-native-screens@^1.0.0-alpha.11: + version "1.0.0-alpha.23" + resolved "https://registry.yarnpkg.com/react-native-screens/-/react-native-screens-1.0.0-alpha.23.tgz#25d7ea4d11bda4fcde2d1da7ae50271c6aa636e0" + integrity sha512-tOxHGQUN83MTmQB4ghoQkibqOdGiX4JQEmeyEv96MKWO/x8T2PJv84ECUos9hD3blPRQwVwSpAid1PPPhrVEaw== + dependencies: + debounce "^1.2.0" + react-native-sentry@^0.37.0: version "0.37.1" resolved "https://registry.yarnpkg.com/react-native-sentry/-/react-native-sentry-0.37.1.tgz#22809b7fdca4552b8efea7e42b36a58a0e791794" @@ -7690,12 +7729,20 @@ react-native-sound@^0.10.9: resolved "https://registry.yarnpkg.com/react-native-sound/-/react-native-sound-0.10.12.tgz#f912d6f9d6e9e2b42b391e0226787628d940f01a" integrity sha512-lhvzZ+ekNSHW9s4FjmxxGAQmd7yDT9FnHgJNP824cMyHRrTES/LgHnSOxES/1FWVoaQ8FdfbEHkWd2rN0G/L9A== -"react-native-tab-view@github:react-navigation/react-native-tab-view": - version "0.0.74" - resolved "https://codeload.github.com/react-navigation/react-native-tab-view/tar.gz/d87a5cb3ddbcb9e5ea1651450f6c12a7f41355df" +react-native-tab-view@^0.0.77: + version "0.0.77" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-0.0.77.tgz#11ceb8e7c23100d07e628dc151b57797524d00d4" + integrity sha512-9vjD4Ly1Zlum1Y4g23ODpi/F3gYIUIsKWrsZO/Oh5cuX1eiB1DRVn11nY1z+j/hsQfhfyW6nDlmySyDvYQvYCA== dependencies: prop-types "^15.6.0" +react-native-tab-view@^1.0.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.1.tgz#f113cd87485808f0c991abec937f70fa380478b9" + integrity sha512-Bke8KkDcDhvB/z0AS7MnQKMD2p6Kwfc1rSKlMOvg9CC5CnClQ2QEnhPSbwegKDYhUkBI92iH/BYy7hNSm5kbUQ== + dependencies: + prop-types "^15.6.1" + react-native-text-input-reset@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/react-native-text-input-reset/-/react-native-text-input-reset-1.0.2.tgz#cfaa6d9b45da934e1725c01b1698f8a05591661c" @@ -7774,26 +7821,60 @@ react-native@0.59.10: xmldoc "^0.4.0" yargs "^9.0.0" -react-navigation-redux-helpers@^1.1.1: - version "1.1.2" - resolved "https://registry.yarnpkg.com/react-navigation-redux-helpers/-/react-navigation-redux-helpers-1.1.2.tgz#13013230ac74aa125a5505eefc005db3801f9e07" - integrity sha512-S4fihqxHQud2VcPjqmp4VzSNlkw2AG/lHxXn7gbnvHIDcXVsjVRMWQ1q5Yo/ulLTSDqcUfCR0D8Gifa2BU2b+A== +react-navigation-deprecated-tab-navigator@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/react-navigation-deprecated-tab-navigator/-/react-navigation-deprecated-tab-navigator-1.3.0.tgz#015dcae1e977b984ca7e99245261c15439026bb7" + integrity sha512-Cm+qYOPFWbvvcuv0YYX0ioYwLGgw7XAqdhAfpo3sIr3trxRW8871ePmfFOPezjQtz4v6ItjZt6LPgtBAVZoroQ== + dependencies: + react-native-tab-view "^0.0.77" + +react-navigation-drawer@0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-0.5.0.tgz#d91b6a6ec65c34ba78c00f814b1e6508922cc9ec" + integrity sha512-F1y593uC6pqBMGH+Omz75oNODEbxB/s0EGO8QtYwu1NmOOEUuuLA+c14zm+pgMsI4HlDabiHxPkWqsgGz25xVQ== + dependencies: + react-native-drawer-layout-polyfill "^1.3.2" + +react-navigation-redux-helpers@^2.0.9: + version "2.0.9" + resolved "https://registry.yarnpkg.com/react-navigation-redux-helpers/-/react-navigation-redux-helpers-2.0.9.tgz#244e7ebbc43481602b1e7948a491b34a312dca06" + integrity sha512-V1eyQ22T1znZeaou38f/JBp5DUV5X2T4hVVSlsjh8dk2unkWhaugzvrgFMF80Mzg1gH4rVE1yADyI9hzuwbbSw== dependencies: invariant "^2.2.2" -react-navigation@^1.5.12: - version "1.6.1" - resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-1.6.1.tgz#f08b560637edb5517f375bbd9bae3123e3027206" - integrity sha512-18qvuGEMorsYAtedvcDvrWi6eqdTOC7T2u1mSLddWCXKIwGsC44d4PfAzKtnd6JtMpvbCd+livTGyylfRHT2fA== +react-navigation-stack@0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-0.7.0.tgz#0b2f139ee1cba953037ef51353df992ec6c74fa2" + integrity sha512-3Tbb/SsustBrM9R/qaI6XuOfyqYMVbwkeHFC8NbU890vB0aKZvjAtioWLZ18e/4LgbiOCmoTdp37z3gkGDyNDQ== + +react-navigation-tabs@0.8.4: + version "0.8.4" + resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-0.8.4.tgz#aa767f28b899f13c99f2b034b4a665f8cf0a5737" + integrity sha512-CbS3xIVJVtpu+AYslv0PMLmjddJFVtU3XAhSJ9XnMrKLUJNmnQdW/L0w/Gp5qcBEF9h6bgsY3CoTtp7I6bqyOQ== + dependencies: + hoist-non-react-statics "^2.5.0" + prop-types "^15.6.1" + react-lifecycles-compat "^3.0.4" + react-native-tab-view "^1.0.0" + +react-navigation@^2.18.2: + version "2.18.3" + resolved "https://registry.yarnpkg.com/react-navigation/-/react-navigation-2.18.3.tgz#de9a24dc37dfc33f3e4779a9f13f45ea97dfe19e" + integrity sha512-/5KGMG1Oj5LN/x/7AKF0MWrpX9Qe29307RxEsMCiRT/A4jCYT0DPY99Bl7ZAGtROxExEy3rwTfTrtvpIT+CU7A== dependencies: clamp "^1.0.1" + create-react-context "0.2.2" hoist-non-react-statics "^2.2.0" path-to-regexp "^1.7.0" - prop-types "^15.5.10" - react-lifecycles-compat "^3.0.2" - react-native-drawer-layout-polyfill "^1.3.2" + query-string "^6.1.0" + react-is "^16.5.2" + react-lifecycles-compat "^3" react-native-safe-area-view "0.11.0" - react-native-tab-view "github:react-navigation/react-native-tab-view" + react-native-screens "^1.0.0-alpha.11" + react-navigation-deprecated-tab-navigator "1.3.0" + react-navigation-drawer "0.5.0" + react-navigation-stack "0.7.0" + react-navigation-tabs "0.8.4" react-proxy@^1.1.7: version "1.1.8" @@ -8652,6 +8733,11 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz#3694b5804567a458d3c8045842a6358632f62654" integrity sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q== +split-on-first@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/split-on-first/-/split-on-first-1.1.0.tgz#f610afeee3b12bce1d0c30425e76398b78249a5f" + integrity sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw== + split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" @@ -8729,6 +8815,11 @@ strict-uri-encode@^1.0.0: resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= +strict-uri-encode@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546" + integrity sha1-ucczDHBChi9rFC3CdLvMWGbONUY= + string-length@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/string-length/-/string-length-1.0.1.tgz#56970fb1c38558e9e70b728bf3de269ac45adfac"