Compare commits

..

6 Commits

Author SHA1 Message Date
satyajit.happy
40e7ff1655 chore: release 3.10.1 2019-05-17 19:54:00 +02:00
satyajit.happy
d1419cd2ed fix: upgrade react-navigation-tabs. closes #5914 2019-05-17 19:53:49 +02:00
William Schurman
cd342935a1 Add cardShadowEnabled and cardOverlayEnabled to NavigationStackViewConfig flow type (#5918)
* Add cardShadowEnabled and cardOverlayEnabled to NavigationStackViewConfig flow type

* Update changelog
2019-05-17 11:52:24 -04:00
Brent Vatne
97d21c39be Release 3.10.0 2019-05-16 11:14:11 -07:00
Luong Dang Hai
2f38d420aa remove old exports and add export for SceneView and SwitchRouter (#5872)
* remove old exports and add export for SceneView and SwitchRouter

* Update CHANGELOG.md

* add type arg to NavigationScreenProp
2019-05-15 20:24:51 -07:00
Timmy Willison
6d9bc8d869 Add safeAreaInset type to BottomTabBarProps (#5906)
* Add safeAreaInset type to BottomTabBarProps

* Update CHANGELOG.md
2019-05-15 20:24:12 -07:00
6 changed files with 100 additions and 57 deletions

4
.gitignore vendored
View File

@@ -13,8 +13,8 @@ yarn-error.log
# OS X
.DS_Store
# Exponent
.exponent
# Expo
.expo
# Jest
coverage

View File

@@ -5,14 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
## [Unreleased]
- Update typescript with headerLeftContainerStyle and headerRightContainerStyle
## [3.10.1]
## Fixes
- Update Flow types - Add `cardShadowEnabled` and `cardOverlayEnabled` to NavigationStackViewConfig
- Upgrade react-navigation-tabs [#5914](https://github.com/react-navigation/react-navigation/issues/5914)
## [3.10.0] - [2019-05-16](https://github.com/react-navigation/react-navigation/releases/tag/3.10.0)
## Removed
- `persistenceKey` no longer automatically saves and restores navigation state using AsyncStorage. Typically this would be a breaking change that would require a major version bump, but because this has always been marked as experimental in the documentation and it is unlikely to impact production apps, we are rolling it in a minor release. `persistenceKey` has been replaced with `persistNavigationState` and `loadNavigationState`. See the diff in docs: https://github.com/react-navigation/react-navigation.github.io/pull/425/files?short_path=b668b1a#diff-b668b1a4201e40b1378036dc012100fe
## Changed
- Removed animations from stack on web
- Ensure that headerMode is float by default on web
## Fixes
- Prevent transitionConfig's useNativeDriver value being overwritten. (https://github.com/react-navigation/stack/commit/8b2af7d94209d4658abd8d799bc78744a1004b4e)
- Update typescript with headerLeftContainerStyle and headerRightContainerStyle
- Update typescript - Add `safeAreaInset` to `BottomTabBarProps`
- Update typescript - `TabBarTop` is now `MaterialTopTabBar`
- Update typescript - Remove `SwitchNavigator`, `TabNavigator` and `StackNavigator`. Added exports for `SceneView` and `SwitchRouter`
- Update typescript - `getLabel` is now `getLabelText` in BottomTabProps and TopTabProps
- Silence deprecated lifecycle warning in Stack Transitioner
## [3.9.0] - [2019-04-23](https://github.com/react-navigation/react-navigation/releases/tag/3.9.0)
@@ -264,7 +283,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- [2.x](https://github.com/react-navigation/react-navigation/blob/2.x/CHANGELOG.md)
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.9.0...HEAD
[Unreleased]: https://github.com/react-navigation/react-navigation/compare/3.10.0...HEAD
[3.10.0]: https://github.com/react-navigation/react-navigation/compare/3.10.0...3.9.0
[3.9.0]: https://github.com/react-navigation/react-navigation/compare/3.8.1...3.9.0
[3.8.1]: https://github.com/react-navigation/react-navigation/compare/3.8.0...3.8.1
[3.8.0]: https://github.com/react-navigation/react-navigation/compare/3.7.1...3.8.0

View File

@@ -451,6 +451,8 @@ declare module 'react-navigation' {
headerLayoutPreset?: 'left' | 'center',
headerBackTitleVisible?: boolean,
cardStyle?: ViewStyleProp,
cardShadowEnabled?: boolean,
cardOverlayEnabled?: boolean,
transitionConfig?: (
transitionProps: NavigationTransitionProps,
prevTransitionProps: ?NavigationTransitionProps,

View File

@@ -1,6 +1,6 @@
{
"name": "react-navigation",
"version": "3.9.2",
"version": "3.10.1",
"description": "Routing and navigation for your React Native apps",
"main": "src/react-navigation.js",
"types": "typescript/react-navigation.d.ts",
@@ -37,10 +37,10 @@
},
"dependencies": {
"@react-navigation/core": "~3.4.1",
"@react-navigation/native": "~3.4.0",
"react-navigation-drawer": "1.2.1",
"react-navigation-stack": "1.3.0",
"react-navigation-tabs": "1.1.3"
"@react-navigation/native": "~3.5.0",
"react-navigation-drawer": "~1.2.1",
"react-navigation-stack": "~1.4.0",
"react-navigation-tabs": "~1.1.4"
},
"devDependencies": {
"@types/react-native": "~0.57.38",

View File

@@ -68,7 +68,7 @@ declare module 'react-navigation' {
export type ScreenProps = {
[key: string]: any;
}
};
// @todo - any..
export function getActiveChildNavigationOptions<S>(
@@ -440,6 +440,8 @@ declare module 'react-navigation' {
* Switch Navigator
*/
export interface SwitchRouter extends NavigationRouter {}
export interface NavigationSwitchRouterConfig {
initialRouteName?: string;
initialRouteParams?: NavigationParams;
@@ -588,7 +590,9 @@ declare module 'react-navigation' {
tabBarLabel?:
| string
| React.ReactElement<any>
| ((options: TabBarLabelProps) => React.ReactElement<any> | string | null);
| ((
options: TabBarLabelProps
) => React.ReactElement<any> | string | null);
tabBarVisible?: boolean;
tabBarTestIDProps?: { testID?: string; accessibilityLabel?: string };
}
@@ -667,7 +671,9 @@ declare module 'react-navigation' {
lastState: NavigationState | null | undefined;
}
export type NavigationEventCallback = (payload: NavigationEventPayload) => void;
export type NavigationEventCallback = (
payload: NavigationEventPayload
) => void;
export interface NavigationEventSubscription {
remove: () => void;
@@ -897,7 +903,15 @@ declare module 'react-navigation' {
action: NavigationAction
) => void | null | undefined;
navigation?: NavigationScreenProp<S>;
/*
* This prop is no longer supported. Use `loadNavigationState` and
* `persistNavigationState` instead.
*/
persistenceKey?: string | null;
loadNavigationState?: () => Promise<any>;
persistNavigationState?: (state: NavigationState) => Promise<any>;
renderLoadingExperimental?: React.ComponentType;
screenProps?: ScreenProps;
navigationOptions?: O;
@@ -932,12 +946,6 @@ declare module 'react-navigation' {
containerOptions?: any;
}
// Return createNavigationContainer
export function StackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
): NavigationContainer;
export function createStackNavigator(
routeConfigMap: NavigationRouteConfigMap,
stackConfig?: StackNavigatorConfig
@@ -953,11 +961,6 @@ declare module 'react-navigation' {
// Return createNavigationContainer
export type _SwitchNavigatorConfig = NavigationSwitchRouterConfig;
export function SwitchNavigator(
routeConfigMap: NavigationRouteConfigMap,
switchConfig?: SwitchNavigatorConfig
): NavigationContainer;
export function createSwitchNavigator(
routeConfigMap: NavigationRouteConfigMap,
switchConfig?: SwitchNavigatorConfig
@@ -1089,12 +1092,6 @@ declare module 'react-navigation' {
initialLayout?: InitialLayout;
}
// From navigators/TabNavigator.js
export function TabNavigator(
routeConfigMap: NavigationRouteConfigMap,
drawConfig?: TabNavigatorConfig
): NavigationContainer;
export function createBottomTabNavigator(
routeConfigMap: NavigationRouteConfigMap,
drawConfig?: BottomTabNavigatorConfig
@@ -1158,6 +1155,12 @@ declare module 'react-navigation' {
labelStyle?: TextStyle;
tabStyle?: ViewStyle;
showIcon?: boolean;
safeAreaInset?: {
top?: SafeAreaViewForceInsetValue;
bottom?: SafeAreaViewForceInsetValue;
left?: SafeAreaViewForceInsetValue;
right?: SafeAreaViewForceInsetValue;
};
}
export const MaterialTopTabBar: React.ComponentType<MaterialTopTabBarProps>;
@@ -1212,7 +1215,9 @@ declare module 'react-navigation' {
): NavigationPopToTopAction;
function push(options: NavigationPushActionPayload): NavigationPushAction;
function reset(options: NavigationResetActionPayload): NavigationResetAction;
function reset(
options: NavigationResetActionPayload
): NavigationResetAction;
function replace(
options: NavigationReplaceActionPayload
@@ -1465,7 +1470,23 @@ declare module 'react-navigation' {
export const SafeAreaView: React.ComponentClass<SafeAreaViewProps>;
export const NavigationContext: React.Context<NavigationScreenProp<NavigationRoute>>;
export const NavigationContext: React.Context<
NavigationScreenProp<NavigationRoute>
>;
export const StackGestureContext: React.Context<React.Ref<PanGestureHandler>>;
export const DrawerGestureContext: React.Context<React.Ref<PanGestureHandler>>;
export const DrawerGestureContext: React.Context<
React.Ref<PanGestureHandler>
>;
/**
* SceneView
*/
export interface SceneViewProps {
component: React.ComponentType;
screenProps: ScreenProps;
navigation: NavigationScreenProp<NavigationRoute>;
}
export class SceneView extends React.Component {}
}

View File

@@ -837,13 +837,13 @@
query-string "^6.4.2"
react-is "^16.8.6"
"@react-navigation/native@~3.4.0":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.4.1.tgz#e1fbf334ac834a9f10dd7d9c3af3e36939486089"
integrity sha512-pMAPQfvwC4DvhQfsrXKAf+FiU+A5XAh216v17rEePSFcbeOEt7cvewmWxCxydN/vFjJChFiPV+xnjJyJBdPLOg==
"@react-navigation/native@~3.5.0":
version "3.5.0"
resolved "https://registry.yarnpkg.com/@react-navigation/native/-/native-3.5.0.tgz#f5d16e0845ac26d1147d1caa481f18a00740e7ae"
integrity sha512-TmGOis++ejEXG3sqNJhCSKqB0/qLu3FQgDtO959qpqif36R/diR8SQwJqeSdofoEiK3CepdhFlTCeHdS1/+MsQ==
dependencies:
hoist-non-react-statics "^3.0.1"
react-native-safe-area-view "^0.13.0"
react-native-safe-area-view "^0.14.1"
react-native-screens "^1.0.0 || ^1.0.0-alpha"
"@sindresorhus/is@^0.7.0":
@@ -8054,10 +8054,10 @@ react-lifecycles-compat@^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==
react-native-safe-area-view@^0.13.0:
version "0.13.1"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.13.1.tgz#834bbb6d22f76a7ff07de56725ee5667ba1386b0"
integrity sha512-d/pu2866jApSwLtK/xWAvMXZkNTIQcFrjjbcTATBrmIfFNnu8TNFUcMRFpfJ+eOn5nmx7uGmDvs9B53Ft7JGpQ==
react-native-safe-area-view@^0.14.1:
version "0.14.3"
resolved "https://registry.yarnpkg.com/react-native-safe-area-view/-/react-native-safe-area-view-0.14.3.tgz#3cc34d2fcc8886bc8a8bd1ab226d4345d02c23b0"
integrity sha512-TNs2aJ9HZs4adWRo8ICVyggyqqu72VqTbkxVSS8utlI4VTQ0ERxY6PlFEYRkO3/OcSwV8X/fifWJWiVp+r/NCg==
dependencies:
hoist-non-react-statics "^2.3.1"
@@ -8073,10 +8073,10 @@ react-native-tab-view@^1.2.0:
dependencies:
prop-types "^15.6.1"
react-native-tab-view@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/react-native-tab-view/-/react-native-tab-view-1.4.0.tgz#c70a1f6a86a12bdb6e8b30c390afc751dfe41275"
integrity sha512-YnTO4tavO0TXN1nHVQel+4IB0SYoke+moAbdsai9I5DlQ2PTtW4077Vm2N9cdN7zCb5JoWKHulyB9jtTdKR3fQ==
react-native-tab-view@^1.4.1:
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"
@@ -8147,27 +8147,27 @@ react-native@~0.57.7:
xmldoc "^0.4.0"
yargs "^9.0.0"
react-navigation-drawer@1.2.1:
react-navigation-drawer@~1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/react-navigation-drawer/-/react-navigation-drawer-1.2.1.tgz#7bd5efeee7d2f611d3ebb0933e0c8e8eb7cafe52"
integrity sha512-T2kaBjY2c4/3I6noWFnaf/c18ntNH5DsST38i+pdc2NPxn5Yi5lkK+ZZTeKuHSFD4a7G0jWY9OGf1iRkHWLMAQ==
dependencies:
react-native-tab-view "^1.2.0"
react-navigation-stack@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.3.0.tgz#34bbddb068c094c9ab843e36059b9fd92b728250"
integrity sha512-ouyD1GkRksJSGuvAuqrJnlJnZ5g2g/+/WB/MTa8BzjSBvyOgruD5TrmEkpViCOMr1R17C8D4Htln90H4D+NV3Q==
react-navigation-stack@~1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/react-navigation-stack/-/react-navigation-stack-1.4.0.tgz#69cdb029ea4ee5877d7e933b3117dc90bc841eb2"
integrity sha512-zEe9wCA0Ot8agarYb//0nSWYW1GM+1R0tY/nydUV0EizeJ27At0EklYVWvYEuYU6C48va6cu8OPL7QD/CcJACw==
react-navigation-tabs@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.3.tgz#72dded7764cffc6b1de029cd1f0468da3976ed30"
integrity sha512-MP3QIiIPA1YNqAsL0x55tU+KoTXHrBucicR6eA5aC1wgkk9Hh++DzS34pXrC6u5LZ59MWu7FWjrSFS1aDxqHyg==
react-navigation-tabs@~1.1.3:
version "1.1.4"
resolved "https://registry.yarnpkg.com/react-navigation-tabs/-/react-navigation-tabs-1.1.4.tgz#00a312250df3c519c60b7815a523ace5ee11163a"
integrity sha512-py2hLCRxPwXOzmY1W9XcY1rWXxdK6RGW/aXh56G9gIf8cpHNDhy/bJV4e46/JrVcse3ybFaN0liT09/DM/NdwQ==
dependencies:
hoist-non-react-statics "^2.5.0"
prop-types "^15.6.1"
react-lifecycles-compat "^3.0.4"
react-native-tab-view "^1.4.0"
react-native-tab-view "^1.4.1"
react-proxy@^1.1.7:
version "1.1.8"