mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-01-29 22:53:52 +08:00
Compare commits
9 Commits
react-navi
...
react-navi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
720d1f970d | ||
|
|
66a4dbccd8 | ||
|
|
7925f0c8a3 | ||
|
|
b3d77b79b7 | ||
|
|
1d527ce16a | ||
|
|
3bec1c964a | ||
|
|
a7e0c193cd | ||
|
|
ac98c0a668 | ||
|
|
14a6538cc8 |
@@ -41,7 +41,7 @@ import StackWithTranslucentHeader from './src/StackWithTranslucentHeader';
|
|||||||
import SwitchWithStacks from './src/SwitchWithStacks';
|
import SwitchWithStacks from './src/SwitchWithStacks';
|
||||||
import TabsInDrawer from './src/TabsInDrawer';
|
import TabsInDrawer from './src/TabsInDrawer';
|
||||||
import DragLimitedToModal from './src/DragLimitedToModal';
|
import DragLimitedToModal from './src/DragLimitedToModal';
|
||||||
import EventsStack from './src/EventsStack';
|
import FocusEvents from './src/FocusEvents';
|
||||||
import FullScreen from './src/FullScreen';
|
import FullScreen from './src/FullScreen';
|
||||||
import GestureInteraction from './src/GestureInteraction';
|
import GestureInteraction from './src/GestureInteraction';
|
||||||
import {
|
import {
|
||||||
@@ -144,7 +144,7 @@ const ExampleInfo = {
|
|||||||
name: 'Drag limited to modal',
|
name: 'Drag limited to modal',
|
||||||
screen: DragLimitedToModal,
|
screen: DragLimitedToModal,
|
||||||
},
|
},
|
||||||
EventsStack: { name: 'Events Stack', screen: EventsStack },
|
EventsStack: { name: 'Focus Events', screen: FocusEvents },
|
||||||
FullScreen: { name: 'Fullscreen Stack', screen: FullScreen },
|
FullScreen: { name: 'Fullscreen Stack', screen: FullScreen },
|
||||||
GestureInteraction: {
|
GestureInteraction: {
|
||||||
name: 'Gesture interaction',
|
name: 'Gesture interaction',
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Button, ScrollView, View, Text } from 'react-native';
|
import { Button, ScrollView, View, Text } from 'react-native';
|
||||||
|
import { createBottomTabNavigator } from 'react-navigation-tabs';
|
||||||
import {
|
import {
|
||||||
createStackNavigator,
|
createStackNavigator,
|
||||||
NavigationStackProp,
|
NavigationStackProp,
|
||||||
@@ -22,24 +23,36 @@ class FocusTag extends React.Component<NavigationStackScreenProps> {
|
|||||||
state = { mode: 'didBlur' };
|
state = { mode: 'didBlur' };
|
||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.props.navigation.addListener('willFocus', () => {
|
this._willFocusSub = this.props.navigation.addListener('willFocus', () => {
|
||||||
this.setMode('willFocus');
|
this._handleEvent('willFocus');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.navigation.addListener('willBlur', () => {
|
this._willBlurSub = this.props.navigation.addListener('willBlur', () => {
|
||||||
this.setMode('willBlur');
|
this._handleEvent('willBlur');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.navigation.addListener('didFocus', () => {
|
this._didFocusSub = this.props.navigation.addListener('didFocus', () => {
|
||||||
this.setMode('didFocus');
|
this._handleEvent('didFocus');
|
||||||
});
|
});
|
||||||
|
|
||||||
this.props.navigation.addListener('didBlur', () => {
|
this._didBlurSub = this.props.navigation.addListener('didBlur', () => {
|
||||||
this.setMode('didBlur');
|
this._handleEvent('didBlur');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setMode = (mode: string) => {
|
componentWillUnmount() {
|
||||||
|
this._willFocusSub?.remove();
|
||||||
|
this._willBlurSub?.remove();
|
||||||
|
this._didFocusSub?.remove();
|
||||||
|
this._didBlurSub?.remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
_willFocusSub: { remove: () => void } | undefined;
|
||||||
|
_willBlurSub: { remove: () => void } | undefined;
|
||||||
|
_didFocusSub: { remove: () => void } | undefined;
|
||||||
|
_didBlurSub: { remove: () => void } | undefined;
|
||||||
|
|
||||||
|
_handleEvent = (mode: string) => {
|
||||||
this.setState({ mode });
|
this.setState({ mode });
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -119,18 +132,19 @@ class SampleScreen extends React.Component<NavigationStackScreenProps> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const SimpleStack = createStackNavigator(
|
const Stack = createStackNavigator(
|
||||||
{
|
{
|
||||||
PageOne: {
|
PageOne: SampleScreen,
|
||||||
screen: SampleScreen,
|
PageTwo: SampleScreen,
|
||||||
},
|
|
||||||
PageTwo: {
|
|
||||||
screen: SampleScreen,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
initialRouteName: 'PageOne',
|
initialRouteName: 'PageOne',
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export default SimpleStack;
|
const Tabs = createBottomTabNavigator({
|
||||||
|
A: Stack,
|
||||||
|
B: Stack,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default Tabs;
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"author": "Adam Miskiewicz <adam@sk3vy.com>, Eric Vicenti <ericvicenti@gmail.com>, Brent Vatne <brent@expo.io>, Satyajit Sahoo <satyajit.happy@gmail.com>",
|
"author": "Adam Miskiewicz <adam@sk3vy.com>, Eric Vicenti <ericvicenti@gmail.com>, Brent Vatne <brent@expo.io>, Satyajit Sahoo <satyajit.happy@gmail.com>",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint": "eslint --ext '.js,.ts,.tsx' .",
|
"lint": "eslint --ext '.js,.ts,.tsx' .",
|
||||||
"typescript": "tsc --noEmit",
|
"typescript": "tsc --noEmit --composite false",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"prerelease": "yarn lerna run clean",
|
"prerelease": "yarn lerna run clean",
|
||||||
"release": "yarn lerna publish",
|
"release": "yarn lerna publish",
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"jest": "^25.1.0",
|
"jest": "^25.1.0",
|
||||||
"lerna": "^3.20.2",
|
"lerna": "^3.20.2",
|
||||||
"prettier": "^2.0.1",
|
"prettier": "^2.0.1",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"react": "~16.9.0",
|
"react": "~16.9.0",
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [0.5.10](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.9...react-navigation-animated-switch@0.5.10) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-animated-switch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.5.9](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.8...react-navigation-animated-switch@0.5.9) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-animated-switch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [0.5.8](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.6...react-navigation-animated-switch@0.5.8) (2020-03-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-animated-switch
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [0.5.7](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.6...react-navigation-animated-switch@0.5.7) (2020-03-27)
|
## [0.5.7](https://github.com/react-navigation/react-navigation/compare/react-navigation-animated-switch@0.5.6...react-navigation-animated-switch@0.5.7) (2020-03-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package react-navigation-animated-switch
|
**Note:** Version bump only for package react-navigation-animated-switch
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation-animated-switch",
|
"name": "react-navigation-animated-switch",
|
||||||
"version": "0.5.7",
|
"version": "0.5.10",
|
||||||
"description": "Animated switch for React Navigation",
|
"description": "Animated switch for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"react-native": "lib/module/index.js",
|
"react-native": "lib/module/index.js",
|
||||||
@@ -28,8 +28,8 @@
|
|||||||
"react": "~16.9.0",
|
"react": "~16.9.0",
|
||||||
"react-native": "~0.61.5",
|
"react-native": "~0.61.5",
|
||||||
"react-native-reanimated": "~1.7.0",
|
"react-native-reanimated": "~1.7.0",
|
||||||
"react-navigation": "^4.3.4",
|
"react-navigation": "^4.3.7",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
|||||||
@@ -3,6 +3,42 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [3.7.5](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.4...@react-navigation/core@3.7.5) (2020-04-02)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* emit refocus for child navigators ([66a4dbc](https://github.com/react-navigation/react-navigation-core/commit/66a4dbccd8e7b3cda51a1d9c7e9397dfc58d6b9e))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.7.4](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.3...@react-navigation/core@3.7.4) (2020-03-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove isTransitioning from SwitchRouter state ([3bec1c9](https://github.com/react-navigation/react-navigation-core/commit/3bec1c964a49136c0ead8e8ba8a8c66c556bbcba))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.7.3](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.1...@react-navigation/core@3.7.3) (2020-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* always emit didFocus/didBlur for root navigator ([ac98c0a](https://github.com/react-navigation/react-navigation-core/commit/ac98c0a668fe21200d0c6f62ae3043f92cc5aa7e))
|
||||||
|
* don't handle prune if there's only one route ([d2433f0](https://github.com/react-navigation/react-navigation-core/commit/d2433f0ab8f9791df8169de4ddfdeed9bc699e3e))
|
||||||
|
* emit didFocus and didBlur events based on parent's transition ([14a6538](https://github.com/react-navigation/react-navigation-core/commit/14a6538cc8e12c50d5d10722d75c9395a0a281ec))
|
||||||
|
* rework focus and blur events to make them more reliable ([cd08338](https://github.com/react-navigation/react-navigation-core/commit/cd083381866506a192f1ec842ac169f2b4277ca5)), closes [#4867](https://github.com/react-navigation/react-navigation-core/issues/4867) [#6187](https://github.com/react-navigation/react-navigation-core/issues/6187) [#6451](https://github.com/react-navigation/react-navigation-core/issues/6451) [#7628](https://github.com/react-navigation/react-navigation-core/issues/7628) [#7749](https://github.com/react-navigation/react-navigation-core/issues/7749)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [3.7.2](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.1...@react-navigation/core@3.7.2) (2020-03-27)
|
## [3.7.2](https://github.com/react-navigation/react-navigation-core/compare/@react-navigation/core@3.7.1...@react-navigation/core@3.7.2) (2020-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/core",
|
"name": "@react-navigation/core",
|
||||||
"version": "3.7.2",
|
"version": "3.7.5",
|
||||||
"description": "Core utilities for the react-navigation framework",
|
"description": "Core utilities for the react-navigation framework",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"react-native": "lib/module/index.js",
|
"react-native": "lib/module/index.js",
|
||||||
|
|||||||
@@ -128,8 +128,8 @@ export default (routeConfigs, config = {}) => {
|
|||||||
const initialState = {
|
const initialState = {
|
||||||
routes,
|
routes,
|
||||||
index: initialRouteIndex,
|
index: initialRouteIndex,
|
||||||
isTransitioning: false,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (backBehavior === 'history') {
|
if (backBehavior === 'history') {
|
||||||
const initialKey = routes[initialRouteIndex].key;
|
const initialKey = routes[initialRouteIndex].key;
|
||||||
initialState['routeKeyHistory'] = [initialKey];
|
initialState['routeKeyHistory'] = [initialKey];
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
};
|
};
|
||||||
expect(state).toEqual(expectedState);
|
expect(state).toEqual(expectedState);
|
||||||
const state2 = router.getStateForAction(
|
const state2 = router.getStateForAction(
|
||||||
@@ -39,7 +38,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
};
|
};
|
||||||
expect(state2).toEqual(expectedState2);
|
expect(state2).toEqual(expectedState2);
|
||||||
expect(router.getComponentForState(expectedState)).toEqual(ScreenA);
|
expect(router.getComponentForState(expectedState)).toEqual(ScreenA);
|
||||||
@@ -65,7 +63,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
};
|
};
|
||||||
expect(state).toEqual(expectedState);
|
expect(state).toEqual(expectedState);
|
||||||
const state2 = router.getStateForAction(
|
const state2 = router.getStateForAction(
|
||||||
@@ -78,7 +75,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
};
|
};
|
||||||
expect(state2).toEqual(expectedState2);
|
expect(state2).toEqual(expectedState2);
|
||||||
expect(router.getComponentForState(expectedState)).toEqual(ScreenA);
|
expect(router.getComponentForState(expectedState)).toEqual(ScreenA);
|
||||||
@@ -102,7 +98,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -118,7 +113,6 @@ describe('TabRouter', () => {
|
|||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar', params: { name: 'Qux' } },
|
{ key: 'Bar', routeName: 'Bar', params: { name: 'Qux' } },
|
||||||
],
|
],
|
||||||
isTransitioning: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -230,7 +224,7 @@ describe('TabRouter', () => {
|
|||||||
const state = router.getStateForAction(navAction);
|
const state = router.getStateForAction(navAction);
|
||||||
expect(state).toEqual({
|
expect(state).toEqual({
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
@@ -238,7 +232,7 @@ describe('TabRouter', () => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
key: 'Baz',
|
key: 'Baz',
|
||||||
routeName: 'Baz',
|
routeName: 'Baz',
|
||||||
params: { foo: '42' },
|
params: { foo: '42' },
|
||||||
@@ -281,14 +275,14 @@ describe('TabRouter', () => {
|
|||||||
let state = router.getStateForAction(navAction);
|
let state = router.getStateForAction(navAction);
|
||||||
expect(state).toEqual({
|
expect(state).toEqual({
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Baz',
|
key: 'Baz',
|
||||||
routeName: 'Baz',
|
routeName: 'Baz',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Boo', routeName: 'Boo' },
|
{ key: 'Boo', routeName: 'Boo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
@@ -308,7 +302,7 @@ describe('TabRouter', () => {
|
|||||||
);
|
);
|
||||||
expect(state && state.routes[1]).toEqual({
|
expect(state && state.routes[1]).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
key: 'Baz',
|
key: 'Baz',
|
||||||
routeName: 'Baz',
|
routeName: 'Baz',
|
||||||
routes: [
|
routes: [
|
||||||
@@ -335,14 +329,14 @@ describe('TabRouter', () => {
|
|||||||
});
|
});
|
||||||
expect(state).toEqual({
|
expect(state).toEqual({
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{
|
{
|
||||||
index: 1,
|
index: 1,
|
||||||
key: 'Baz',
|
key: 'Baz',
|
||||||
routeName: 'Baz',
|
routeName: 'Baz',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
@@ -357,14 +351,14 @@ describe('TabRouter', () => {
|
|||||||
);
|
);
|
||||||
expect(state2).toEqual({
|
expect(state2).toEqual({
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Baz',
|
key: 'Baz',
|
||||||
routeName: 'Baz',
|
routeName: 'Baz',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
@@ -403,19 +397,19 @@ describe('TabRouter', () => {
|
|||||||
const state = router.getStateForAction(INIT_ACTION);
|
const state = router.getStateForAction(INIT_ACTION);
|
||||||
expect(state).toEqual({
|
expect(state).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
routeName: 'Foo',
|
routeName: 'Foo',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Fee',
|
key: 'Fee',
|
||||||
routeName: 'Fee',
|
routeName: 'Fee',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Boo', routeName: 'Boo' },
|
{ key: 'Boo', routeName: 'Boo' },
|
||||||
{ key: 'Baz', routeName: 'Baz' },
|
{ key: 'Baz', routeName: 'Baz' },
|
||||||
@@ -425,7 +419,7 @@ describe('TabRouter', () => {
|
|||||||
index: 0,
|
index: 0,
|
||||||
key: 'Bar',
|
key: 'Bar',
|
||||||
routeName: 'Bar',
|
routeName: 'Bar',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Zoo', routeName: 'Zoo' },
|
{ key: 'Zoo', routeName: 'Zoo' },
|
||||||
{ key: 'Zap', routeName: 'Zap' },
|
{ key: 'Zap', routeName: 'Zap' },
|
||||||
@@ -442,19 +436,19 @@ describe('TabRouter', () => {
|
|||||||
);
|
);
|
||||||
expect(state2).toEqual({
|
expect(state2).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 1,
|
index: 1,
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
routeName: 'Foo',
|
routeName: 'Foo',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Fee',
|
key: 'Fee',
|
||||||
routeName: 'Fee',
|
routeName: 'Fee',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Boo', routeName: 'Boo' },
|
{ key: 'Boo', routeName: 'Boo' },
|
||||||
{ key: 'Baz', routeName: 'Baz' },
|
{ key: 'Baz', routeName: 'Baz' },
|
||||||
@@ -464,7 +458,7 @@ describe('TabRouter', () => {
|
|||||||
index: 1,
|
index: 1,
|
||||||
key: 'Bar',
|
key: 'Bar',
|
||||||
routeName: 'Bar',
|
routeName: 'Bar',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Zoo', routeName: 'Zoo' },
|
{ key: 'Zoo', routeName: 'Zoo' },
|
||||||
{ key: 'Zap', routeName: 'Zap' },
|
{ key: 'Zap', routeName: 'Zap' },
|
||||||
@@ -494,19 +488,19 @@ describe('TabRouter', () => {
|
|||||||
});
|
});
|
||||||
expect(state4).toEqual({
|
expect(state4).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 1,
|
index: 1,
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
routeName: 'Foo',
|
routeName: 'Foo',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Fee',
|
key: 'Fee',
|
||||||
routeName: 'Fee',
|
routeName: 'Fee',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Boo', routeName: 'Boo' },
|
{ key: 'Boo', routeName: 'Boo' },
|
||||||
{ key: 'Baz', routeName: 'Baz' },
|
{ key: 'Baz', routeName: 'Baz' },
|
||||||
@@ -516,7 +510,7 @@ describe('TabRouter', () => {
|
|||||||
index: 1,
|
index: 1,
|
||||||
key: 'Bar',
|
key: 'Bar',
|
||||||
routeName: 'Bar',
|
routeName: 'Bar',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Zoo', routeName: 'Zoo' },
|
{ key: 'Zoo', routeName: 'Zoo' },
|
||||||
{ key: 'Zap', routeName: 'Zap' },
|
{ key: 'Zap', routeName: 'Zap' },
|
||||||
@@ -557,7 +551,7 @@ describe('TabRouter', () => {
|
|||||||
const state = router.getStateForAction({ type: NavigationActions.INIT });
|
const state = router.getStateForAction({ type: NavigationActions.INIT });
|
||||||
const expectedState = {
|
const expectedState = {
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo' },
|
{ key: 'Foo', routeName: 'Foo' },
|
||||||
{ key: 'Bar', routeName: 'Bar' },
|
{ key: 'Bar', routeName: 'Bar' },
|
||||||
@@ -567,7 +561,7 @@ describe('TabRouter', () => {
|
|||||||
const state2 = router.getStateForAction(expectedAction, state);
|
const state2 = router.getStateForAction(expectedAction, state);
|
||||||
const expectedState2 = {
|
const expectedState2 = {
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
||||||
{
|
{
|
||||||
@@ -628,13 +622,13 @@ describe('TabRouter', () => {
|
|||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
index: 1,
|
index: 1,
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
routeName: 'Foo',
|
routeName: 'Foo',
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Boo', routeName: 'Boo' },
|
{ key: 'Boo', routeName: 'Boo' },
|
||||||
{ key: 'Baz', routeName: 'Baz' },
|
{ key: 'Baz', routeName: 'Baz' },
|
||||||
@@ -660,7 +654,7 @@ describe('TabRouter', () => {
|
|||||||
|
|
||||||
expect(state0).toEqual({
|
expect(state0).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'a', routeName: 'a' },
|
{ key: 'a', routeName: 'a' },
|
||||||
{ key: 'b', routeName: 'b' },
|
{ key: 'b', routeName: 'b' },
|
||||||
@@ -676,7 +670,7 @@ describe('TabRouter', () => {
|
|||||||
|
|
||||||
expect(state1).toEqual({
|
expect(state1).toEqual({
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'a', routeName: 'a' },
|
{ key: 'a', routeName: 'a' },
|
||||||
{ key: 'b', routeName: 'b', params },
|
{ key: 'b', routeName: 'b', params },
|
||||||
@@ -765,13 +759,13 @@ describe('TabRouter', () => {
|
|||||||
const screenApreState = {
|
const screenApreState = {
|
||||||
index: 0,
|
index: 0,
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
isTransitioning: false,
|
|
||||||
routeName: 'Foo',
|
routeName: 'Foo',
|
||||||
routes: [{ key: 'Bar', routeName: 'Bar' }],
|
routes: [{ key: 'Bar', routeName: 'Bar' }],
|
||||||
};
|
};
|
||||||
const preState = {
|
const preState = {
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [screenApreState],
|
routes: [screenApreState],
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -51,12 +51,30 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
'willBlur',
|
'willBlur',
|
||||||
this._handleWillBlur
|
this._handleWillBlur
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this._didFocusSubscription = navigation.addListener(
|
||||||
|
'didFocus',
|
||||||
|
this._handleDidFocus
|
||||||
|
);
|
||||||
|
|
||||||
|
this._didBlurSubscription = navigation.addListener(
|
||||||
|
'didBlur',
|
||||||
|
this._handleDidBlur
|
||||||
|
);
|
||||||
|
|
||||||
|
this._refocusSubscription = navigation.addListener(
|
||||||
|
'refocus',
|
||||||
|
this._handleRefocus
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
this._actionSubscription?.remove();
|
this._actionSubscription?.remove();
|
||||||
this._willFocusSubscription?.remove();
|
this._willFocusSubscription?.remove();
|
||||||
this._willBlurSubscription?.remove();
|
this._willBlurSubscription?.remove();
|
||||||
|
this._didFocusSubscription?.remove();
|
||||||
|
this._didBlurSubscription?.remove();
|
||||||
|
this._refocusSubscription?.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -74,6 +92,21 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
*/
|
*/
|
||||||
_willBlurSubscription;
|
_willBlurSubscription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {{ remove(): void } | undefined}
|
||||||
|
*/
|
||||||
|
_didFocusSubscription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {{ remove(): void } | undefined}
|
||||||
|
*/
|
||||||
|
_didBlurSubscription;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {{ remove(): void } | undefined}
|
||||||
|
*/
|
||||||
|
_refocusSubscription;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {string | undefined}
|
* @type {string | undefined}
|
||||||
*/
|
*/
|
||||||
@@ -84,6 +117,16 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
*/
|
*/
|
||||||
_lastWillFocusKey;
|
_lastWillFocusKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string | undefined}
|
||||||
|
*/
|
||||||
|
_lastDidBlurKey;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @type {string | undefined}
|
||||||
|
*/
|
||||||
|
_lastDidFocusKey;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The 'action' event will fire when navigation state changes.
|
* The 'action' event will fire when navigation state changes.
|
||||||
* Detect if the focused route changed here and emit appropriate events.
|
* Detect if the focused route changed here and emit appropriate events.
|
||||||
@@ -113,10 +156,10 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if (previous?.key !== current.key) {
|
if (previous?.key !== current.key) {
|
||||||
this._emitFocus(current.key, payload);
|
this._emitWillFocus(current.key, payload);
|
||||||
|
|
||||||
if (previous?.key) {
|
if (previous?.key) {
|
||||||
this._emitBlur(previous.key, payload);
|
this._emitWillBlur(previous.key, payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -125,11 +168,11 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
state.isTransitioning === false
|
state.isTransitioning === false
|
||||||
) {
|
) {
|
||||||
if (this._lastWillBlurKey) {
|
if (this._lastWillBlurKey) {
|
||||||
onEvent(this._lastWillBlurKey, 'didBlur', payload);
|
this._emitDidBlur(this._lastWillBlurKey, payload);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this._lastWillFocusKey) {
|
if (this._lastWillFocusKey) {
|
||||||
onEvent(this._lastWillFocusKey, 'didFocus', payload);
|
this._emitDidFocus(this._lastWillFocusKey, payload);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -143,7 +186,7 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
const { navigation } = this.props;
|
const { navigation } = this.props;
|
||||||
const route = navigation.state.routes[navigation.state.index];
|
const route = navigation.state.routes[navigation.state.index];
|
||||||
|
|
||||||
this._emitFocus(route.key, {
|
this._emitWillFocus(route.key, {
|
||||||
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
||||||
state: route,
|
state: route,
|
||||||
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
||||||
@@ -159,7 +202,7 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
const { navigation } = this.props;
|
const { navigation } = this.props;
|
||||||
const route = navigation.state.routes[navigation.state.index];
|
const route = navigation.state.routes[navigation.state.index];
|
||||||
|
|
||||||
this._emitBlur(route.key, {
|
this._emitWillBlur(route.key, {
|
||||||
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
||||||
state: route,
|
state: route,
|
||||||
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
||||||
@@ -168,11 +211,64 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ParentPayload} payload
|
||||||
|
*/
|
||||||
|
_handleDidFocus = ({ lastState, action, context, type }) => {
|
||||||
|
const { navigation } = this.props;
|
||||||
|
|
||||||
|
if (this._lastWillFocusKey) {
|
||||||
|
const route = navigation.state.routes.find(
|
||||||
|
(r) => r.key === this._lastWillFocusKey
|
||||||
|
);
|
||||||
|
|
||||||
|
if (route) {
|
||||||
|
this._emitDidFocus(route.key, {
|
||||||
|
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
||||||
|
state: route,
|
||||||
|
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
||||||
|
action,
|
||||||
|
type,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {ParentPayload} payload
|
||||||
|
*/
|
||||||
|
_handleDidBlur = ({ lastState, action, context, type }) => {
|
||||||
|
const { navigation } = this.props;
|
||||||
|
|
||||||
|
if (this._lastWillBlurKey) {
|
||||||
|
const route = navigation.state.routes.find(
|
||||||
|
(r) => r.key === this._lastWillBlurKey
|
||||||
|
);
|
||||||
|
|
||||||
|
if (route) {
|
||||||
|
this._emitDidBlur(route.key, {
|
||||||
|
context: `${route.key}:${action.type}_${context || 'Root'}`,
|
||||||
|
state: route,
|
||||||
|
lastState: lastState?.routes?.find((r) => r.key === route.key),
|
||||||
|
action,
|
||||||
|
type,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
_handleRefocus = () => {
|
||||||
|
const { onEvent, navigation } = this.props;
|
||||||
|
const route = navigation.state.routes[navigation.state.index];
|
||||||
|
|
||||||
|
onEvent(route.key, 'refocus');
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {string} target
|
* @param {string} target
|
||||||
* @param {Payload} payload
|
* @param {Payload} payload
|
||||||
*/
|
*/
|
||||||
_emitFocus = (target, payload) => {
|
_emitWillFocus = (target, payload) => {
|
||||||
if (this._lastWillBlurKey === target) {
|
if (this._lastWillBlurKey === target) {
|
||||||
this._lastWillBlurKey = undefined;
|
this._lastWillBlurKey = undefined;
|
||||||
}
|
}
|
||||||
@@ -181,14 +277,19 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._lastDidFocusKey = undefined;
|
||||||
this._lastWillFocusKey = target;
|
this._lastWillFocusKey = target;
|
||||||
|
|
||||||
const { navigation, onEvent } = this.props;
|
const { navigation, onEvent } = this.props;
|
||||||
|
|
||||||
onEvent(target, 'willFocus', payload);
|
onEvent(target, 'willFocus', payload);
|
||||||
|
|
||||||
if (typeof navigation.state.isTransitioning !== 'boolean') {
|
if (
|
||||||
onEvent(target, 'didFocus', payload);
|
typeof navigation.state.isTransitioning !== 'boolean' ||
|
||||||
|
(navigation.state.isTransitioning !== true &&
|
||||||
|
!navigation.dangerouslyGetParent())
|
||||||
|
) {
|
||||||
|
this._emitDidFocus(target, payload);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -196,7 +297,7 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
* @param {string} target
|
* @param {string} target
|
||||||
* @param {Payload} payload
|
* @param {Payload} payload
|
||||||
*/
|
*/
|
||||||
_emitBlur = (target, payload) => {
|
_emitWillBlur = (target, payload) => {
|
||||||
if (this._lastWillFocusKey === target) {
|
if (this._lastWillFocusKey === target) {
|
||||||
this._lastWillFocusKey = undefined;
|
this._lastWillFocusKey = undefined;
|
||||||
}
|
}
|
||||||
@@ -205,17 +306,54 @@ export default class NavigationEventManager extends React.Component {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this._lastDidBlurKey = undefined;
|
||||||
this._lastWillBlurKey = target;
|
this._lastWillBlurKey = target;
|
||||||
|
|
||||||
const { navigation, onEvent } = this.props;
|
const { navigation, onEvent } = this.props;
|
||||||
|
|
||||||
onEvent(target, 'willBlur', payload);
|
onEvent(target, 'willBlur', payload);
|
||||||
|
|
||||||
if (typeof navigation.state.isTransitioning !== 'boolean') {
|
if (
|
||||||
onEvent(target, 'didBlur', payload);
|
typeof navigation.state.isTransitioning !== 'boolean' ||
|
||||||
|
(navigation.state.isTransitioning !== true &&
|
||||||
|
!navigation.dangerouslyGetParent())
|
||||||
|
) {
|
||||||
|
this._emitDidBlur(target, payload);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} target
|
||||||
|
* @param {Payload} payload
|
||||||
|
*/
|
||||||
|
_emitDidFocus = (target, payload) => {
|
||||||
|
if (this._lastWillFocusKey !== target || this._lastDidFocusKey === target) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._lastDidFocusKey = target;
|
||||||
|
|
||||||
|
const { onEvent } = this.props;
|
||||||
|
|
||||||
|
onEvent(target, 'didFocus', payload);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} target
|
||||||
|
* @param {Payload} payload
|
||||||
|
*/
|
||||||
|
_emitDidBlur = (target, payload) => {
|
||||||
|
if (this._lastWillBlurKey !== target || this._lastDidBlurKey === target) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this._lastDidBlurKey = target;
|
||||||
|
|
||||||
|
const { onEvent } = this.props;
|
||||||
|
|
||||||
|
onEvent(target, 'didBlur', payload);
|
||||||
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.4.11](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.10...react-navigation-drawer@2.4.11) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-drawer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.10](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.9...react-navigation-drawer@2.4.10) (2020-03-31)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* remove isTransitioning from SwitchRouter state ([3bec1c9](https://github.com/react-navigation/drawer/commit/3bec1c964a49136c0ead8e8ba8a8c66c556bbcba))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.4.9](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.7...react-navigation-drawer@2.4.9) (2020-03-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-drawer
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.4.8](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.7...react-navigation-drawer@2.4.8) (2020-03-27)
|
## [2.4.8](https://github.com/react-navigation/drawer/compare/react-navigation-drawer@2.4.7...react-navigation-drawer@2.4.8) (2020-03-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package react-navigation-drawer
|
**Note:** Version bump only for package react-navigation-drawer
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation-drawer",
|
"name": "react-navigation-drawer",
|
||||||
"version": "2.4.8",
|
"version": "2.4.11",
|
||||||
"description": "Drawer navigator component for React Navigation",
|
"description": "Drawer navigator component for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"react-native": "lib/module/index.js",
|
"react-native": "lib/module/index.js",
|
||||||
@@ -49,8 +49,8 @@
|
|||||||
"react-native-reanimated": "^1.2.0",
|
"react-native-reanimated": "^1.2.0",
|
||||||
"react-native-screens": "^2.3.0",
|
"react-native-screens": "^2.3.0",
|
||||||
"react-native-testing-library": "^1.12.0",
|
"react-native-testing-library": "^1.12.0",
|
||||||
"react-navigation": "^4.3.4",
|
"react-navigation": "^4.3.7",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ it('handles basic drawer logic and fires close on switch', () => {
|
|||||||
const state = router.getStateForAction(INIT_ACTION);
|
const state = router.getStateForAction(INIT_ACTION);
|
||||||
const expectedState = {
|
const expectedState = {
|
||||||
index: 0,
|
index: 0,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
||||||
{ key: 'Bar', routeName: 'Bar', params: undefined },
|
{ key: 'Bar', routeName: 'Bar', params: undefined },
|
||||||
@@ -32,7 +32,7 @@ it('handles basic drawer logic and fires close on switch', () => {
|
|||||||
);
|
);
|
||||||
const expectedState2 = {
|
const expectedState2 = {
|
||||||
index: 1,
|
index: 1,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
{ key: 'Foo', routeName: 'Foo', params: undefined },
|
||||||
{ key: 'Bar', routeName: 'Bar', params: undefined },
|
{ key: 'Bar', routeName: 'Bar', params: undefined },
|
||||||
@@ -65,7 +65,7 @@ it('handles initial route navigation', () => {
|
|||||||
expect(state).toEqual({
|
expect(state).toEqual({
|
||||||
index: 0,
|
index: 0,
|
||||||
isDrawerOpen: false,
|
isDrawerOpen: false,
|
||||||
isTransitioning: false,
|
|
||||||
routes: [
|
routes: [
|
||||||
{
|
{
|
||||||
key: 'Foo',
|
key: 'Foo',
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.2.10](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.9...react-navigation-material-bottom-tabs@2.2.10) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-material-bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.9](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.8...react-navigation-material-bottom-tabs@2.2.9) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-material-bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.2.8](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.6...react-navigation-material-bottom-tabs@2.2.8) (2020-03-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-material-bottom-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.2.7](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.6...react-navigation-material-bottom-tabs@2.2.7) (2020-03-27)
|
## [2.2.7](https://github.com/react-navigation/react-navigation-material-bottom-tabs/compare/react-navigation-material-bottom-tabs@2.2.6...react-navigation-material-bottom-tabs@2.2.7) (2020-03-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package react-navigation-material-bottom-tabs
|
**Note:** Version bump only for package react-navigation-material-bottom-tabs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation-material-bottom-tabs",
|
"name": "react-navigation-material-bottom-tabs",
|
||||||
"version": "2.2.7",
|
"version": "2.2.10",
|
||||||
"description": "Material Bottom Tab Navigation component for React Navigation",
|
"description": "Material Bottom Tab Navigation component for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"module": "lib/module/index.js",
|
"module": "lib/module/index.js",
|
||||||
@@ -48,8 +48,8 @@
|
|||||||
"react-native-gesture-handler": "^1.6.0",
|
"react-native-gesture-handler": "^1.6.0",
|
||||||
"react-native-paper": "^3.1.1",
|
"react-native-paper": "^3.1.1",
|
||||||
"react-native-reanimated": "^1.2.0",
|
"react-native-reanimated": "^1.2.0",
|
||||||
"react-navigation": "^4.3.4",
|
"react-navigation": "^4.3.7",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
|||||||
@@ -3,6 +3,33 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [3.7.11](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.10...@react-navigation/native@3.7.11) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/native
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.7.10](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.9...@react-navigation/native@3.7.10) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package @react-navigation/native
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [3.7.9](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.7...@react-navigation/native@3.7.9) (2020-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* rework focus and blur events to make them more reliable ([cd08338](https://github.com/react-navigation/react-navigation-native/commit/cd083381866506a192f1ec842ac169f2b4277ca5)), closes [#4867](https://github.com/react-navigation/react-navigation-native/issues/4867) [#6187](https://github.com/react-navigation/react-navigation-native/issues/6187) [#6451](https://github.com/react-navigation/react-navigation-native/issues/6451) [#7628](https://github.com/react-navigation/react-navigation-native/issues/7628) [#7749](https://github.com/react-navigation/react-navigation-native/issues/7749)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [3.7.8](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.7...@react-navigation/native@3.7.8) (2020-03-27)
|
## [3.7.8](https://github.com/react-navigation/react-navigation-native/compare/@react-navigation/native@3.7.7...@react-navigation/native@3.7.8) (2020-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@react-navigation/native",
|
"name": "@react-navigation/native",
|
||||||
"version": "3.7.8",
|
"version": "3.7.11",
|
||||||
"description": "React Native support for React Navigation",
|
"description": "React Native support for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"react-native": "lib/module/index.js",
|
"react-native": "lib/module/index.js",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-native-community/bob": "^0.10.0",
|
"@react-native-community/bob": "^0.10.0",
|
||||||
"@react-navigation/core": "^3.7.2",
|
"@react-navigation/core": "^3.7.5",
|
||||||
"@types/react-test-renderer": "^16.9.2",
|
"@types/react-test-renderer": "^16.9.2",
|
||||||
"del-cli": "^3.0.0",
|
"del-cli": "^3.0.0",
|
||||||
"react": "~16.9.0",
|
"react": "~16.9.0",
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [4.3.7](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.6...react-navigation@4.3.7) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.3.6](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.5...react-navigation@4.3.6) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [4.3.5](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.3...react-navigation@4.3.5) (2020-03-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [4.3.4](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.3...react-navigation@4.3.4) (2020-03-27)
|
## [4.3.4](https://github.com/react-navigation/react-navigation/compare/react-navigation@4.3.3...react-navigation@4.3.4) (2020-03-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package react-navigation
|
**Note:** Version bump only for package react-navigation
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation",
|
"name": "react-navigation",
|
||||||
"version": "4.3.4",
|
"version": "4.3.7",
|
||||||
"description": "Routing and navigation for your React Native apps",
|
"description": "Routing and navigation for your React Native apps",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"types": "typescript/react-navigation.d.ts",
|
"types": "typescript/react-navigation.d.ts",
|
||||||
@@ -24,8 +24,8 @@
|
|||||||
"react-native": "*"
|
"react-native": "*"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@react-navigation/core": "^3.7.2",
|
"@react-navigation/core": "^3.7.5",
|
||||||
"@react-navigation/native": "^3.7.8"
|
"@react-navigation/native": "^3.7.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/react": "^16.9.23",
|
"@types/react": "^16.9.23",
|
||||||
@@ -34,6 +34,6 @@
|
|||||||
"react": "~16.9.0",
|
"react": "~16.9.0",
|
||||||
"react-native": "~0.61.5",
|
"react-native": "~0.61.5",
|
||||||
"react-test-renderer": "^16.9.2",
|
"react-test-renderer": "^16.9.2",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,34 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.3.11](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.10...react-navigation-stack@2.3.11) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.3.10](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.9...react-navigation-stack@2.3.10) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-stack
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.3.9](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.7...react-navigation-stack@2.3.9) (2020-03-28)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* emit didFocus and didBlur events based on parent's transition ([14a6538](https://github.com/react-navigation/react-navigation-stack/commit/14a6538cc8e12c50d5d10722d75c9395a0a281ec))
|
||||||
|
* rework focus and blur events to make them more reliable ([cd08338](https://github.com/react-navigation/react-navigation-stack/commit/cd083381866506a192f1ec842ac169f2b4277ca5)), closes [#4867](https://github.com/react-navigation/react-navigation-stack/issues/4867) [#6187](https://github.com/react-navigation/react-navigation-stack/issues/6187) [#6451](https://github.com/react-navigation/react-navigation-stack/issues/6451) [#7628](https://github.com/react-navigation/react-navigation-stack/issues/7628) [#7749](https://github.com/react-navigation/react-navigation-stack/issues/7749)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.3.8](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.7...react-navigation-stack@2.3.8) (2020-03-27)
|
## [2.3.8](https://github.com/react-navigation/react-navigation-stack/compare/react-navigation-stack@2.3.7...react-navigation-stack@2.3.8) (2020-03-27)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation-stack",
|
"name": "react-navigation-stack",
|
||||||
"version": "2.3.8",
|
"version": "2.3.11",
|
||||||
"description": "Stack navigator component for React Navigation",
|
"description": "Stack navigator component for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"module": "lib/module/index.js",
|
"module": "lib/module/index.js",
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@react-native-community/bob": "^0.10.0",
|
"@react-native-community/bob": "^0.10.0",
|
||||||
"@react-native-community/masked-view": "^0.1.7",
|
"@react-native-community/masked-view": "^0.1.7",
|
||||||
"@react-navigation/stack": "^5.2.8",
|
"@react-navigation/stack": "^5.2.9",
|
||||||
"@types/color": "^3.0.1",
|
"@types/color": "^3.0.1",
|
||||||
"@types/react": "^16.9.23",
|
"@types/react": "^16.9.23",
|
||||||
"@types/react-native": "^0.61.22",
|
"@types/react-native": "^0.61.22",
|
||||||
@@ -56,9 +56,9 @@
|
|||||||
"react-native-gesture-handler": "^1.6.0",
|
"react-native-gesture-handler": "^1.6.0",
|
||||||
"react-native-safe-area-context": "^0.7.3",
|
"react-native-safe-area-context": "^0.7.3",
|
||||||
"react-native-screens": "^2.3.0",
|
"react-native-screens": "^2.3.0",
|
||||||
"react-navigation": "^4.3.4",
|
"react-navigation": "^4.3.7",
|
||||||
"react-test-renderer": "~16.9.0",
|
"react-test-renderer": "~16.9.0",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"@react-native-community/masked-view": "^0.1.1",
|
"@react-native-community/masked-view": "^0.1.1",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/index.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/index.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/index.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/index.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/index.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -3,11 +3,6 @@
|
@@ -3,11 +3,6 @@
|
||||||
import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
|
import * as TransitionSpecs from './TransitionConfigs/TransitionSpecs';
|
||||||
import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
|
import * as TransitionPresets from './TransitionConfigs/TransitionPresets';
|
||||||
@@ -28,7 +28,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/index.tsx src/vendor/i
|
|||||||
StackHeaderTitleProps,
|
StackHeaderTitleProps,
|
||||||
StackCardInterpolatedStyle,
|
StackCardInterpolatedStyle,
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx src/vendor/navigators/createStackNavigator.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/navigators/createStackNavigator.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100
|
+++ src/vendor/navigators/createStackNavigator.tsx 1970-01-01 01:00:00.000000000 +0100
|
||||||
@@ -1,81 +0,0 @@
|
@@ -1,81 +0,0 @@
|
||||||
-import * as React from 'react';
|
-import * as React from 'react';
|
||||||
@@ -113,8 +113,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/navigators/createStack
|
|||||||
- typeof StackNavigator
|
- typeof StackNavigator
|
||||||
->(StackNavigator);
|
->(StackNavigator);
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/types.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/types.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/types.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/types.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/types.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -8,14 +8,28 @@
|
@@ -8,14 +8,28 @@
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
import { EdgeInsets } from 'react-native-safe-area-context';
|
import { EdgeInsets } from 'react-native-safe-area-context';
|
||||||
@@ -240,8 +240,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/types.tsx src/vendor/t
|
|||||||
|
|
||||||
export type StackNavigationConfig = {
|
export type StackNavigationConfig = {
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx src/vendor/views/Header/Header.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/Header.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/Header.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/Header.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -1,12 +1,14 @@
|
@@ -1,12 +1,14 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
-import { StackActions } from '@react-navigation/native';
|
-import { StackActions } from '@react-navigation/native';
|
||||||
@@ -321,8 +321,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/Header.ts
|
|||||||
+
|
+
|
||||||
+export default Header;
|
+export default Header;
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx src/vendor/views/Header/HeaderBackButton.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackButton.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/HeaderBackButton.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/HeaderBackButton.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -8,9 +8,9 @@
|
@@ -8,9 +8,9 @@
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
LayoutChangeEvent,
|
LayoutChangeEvent,
|
||||||
@@ -335,8 +335,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBac
|
|||||||
|
|
||||||
type Props = StackHeaderLeftButtonProps;
|
type Props = StackHeaderLeftButtonProps;
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx src/vendor/views/Header/HeaderBackground.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBackground.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/HeaderBackground.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/HeaderBackground.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Animated, StyleSheet, Platform, ViewProps } from 'react-native';
|
import { Animated, StyleSheet, Platform, ViewProps } from 'react-native';
|
||||||
@@ -346,8 +346,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderBac
|
|||||||
type Props = ViewProps & {
|
type Props = ViewProps & {
|
||||||
children?: React.ReactNode;
|
children?: React.ReactNode;
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx src/vendor/views/Header/HeaderContainer.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderContainer.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/HeaderContainer.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/HeaderContainer.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -1,11 +1,6 @@
|
@@ -1,11 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
import { View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
||||||
@@ -399,8 +399,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderCon
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx src/vendor/views/Header/HeaderSegment.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSegment.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/HeaderSegment.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/HeaderSegment.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -8,7 +8,7 @@
|
@@ -8,7 +8,7 @@
|
||||||
ViewStyle,
|
ViewStyle,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
@@ -420,8 +420,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderSeg
|
|||||||
};
|
};
|
||||||
|
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx src/vendor/views/Header/HeaderTitle.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTitle.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Header/HeaderTitle.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Header/HeaderTitle.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Animated, StyleSheet, Platform } from 'react-native';
|
import { Animated, StyleSheet, Platform } from 'react-native';
|
||||||
@@ -431,8 +431,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Header/HeaderTit
|
|||||||
type Props = React.ComponentProps<typeof Animated.Text> & {
|
type Props = React.ComponentProps<typeof Animated.Text> & {
|
||||||
tintColor?: string;
|
tintColor?: string;
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx src/vendor/views/Stack/Card.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Stack/Card.tsx 2020-03-23 11:43:59.000000000 +0100
|
+++ src/vendor/views/Stack/Card.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -138,7 +138,7 @@
|
@@ -138,7 +138,7 @@
|
||||||
|
|
||||||
private interactionHandle: number | undefined;
|
private interactionHandle: number | undefined;
|
||||||
@@ -443,8 +443,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/Card.tsx s
|
|||||||
private animate = ({
|
private animate = ({
|
||||||
closing,
|
closing,
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx src/vendor/views/Stack/CardContainer.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardContainer.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Stack/CardContainer.tsx 2020-03-27 14:41:20.000000000 +0100
|
+++ src/vendor/views/Stack/CardContainer.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -1,10 +1,16 @@
|
@@ -1,10 +1,16 @@
|
||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
import { Animated, View, StyleSheet, StyleProp, ViewStyle } from 'react-native';
|
||||||
@@ -474,8 +474,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardContai
|
|||||||
>
|
>
|
||||||
<View style={styles.container}>
|
<View style={styles.container}>
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx src/vendor/views/Stack/CardStack.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Stack/CardStack.tsx 2020-03-27 14:41:20.000000000 +0100
|
+++ src/vendor/views/Stack/CardStack.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -9,9 +9,8 @@
|
@@ -9,9 +9,8 @@
|
||||||
ViewProps,
|
ViewProps,
|
||||||
} from 'react-native';
|
} from 'react-native';
|
||||||
@@ -496,8 +496,8 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/CardStack.
|
|||||||
StackHeaderMode,
|
StackHeaderMode,
|
||||||
StackCardMode,
|
StackCardMode,
|
||||||
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx
|
diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx src/vendor/views/Stack/StackView.tsx
|
||||||
--- ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-03-23 11:43:17.000000000 +0100
|
--- ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.tsx 2020-03-31 17:47:04.000000000 +0200
|
||||||
+++ src/vendor/views/Stack/StackView.tsx 2020-03-27 14:41:20.000000000 +0100
|
+++ src/vendor/views/Stack/StackView.tsx 2020-03-31 18:06:18.000000000 +0200
|
||||||
@@ -4,9 +4,9 @@
|
@@ -4,9 +4,9 @@
|
||||||
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
||||||
import {
|
import {
|
||||||
@@ -527,7 +527,7 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
|
|||||||
};
|
};
|
||||||
|
|
||||||
type State = {
|
type State = {
|
||||||
@@ -290,14 +292,37 @@
|
@@ -322,14 +324,37 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -548,25 +548,25 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
|
|||||||
return <HeaderContainer {...props} />;
|
return <HeaderContainer {...props} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
+ private handleTransitionComplete = ({ route }: { route: Route<string> }) => {
|
+ private handleTransitionComplete = () => {
|
||||||
+ const { state, navigation } = this.props;
|
+ const { state, navigation } = this.props;
|
||||||
+
|
+
|
||||||
+ if (state.isTransitioning) {
|
+ if (state.isTransitioning) {
|
||||||
+ navigation.dispatch(
|
+ navigation.dispatch(
|
||||||
+ StackActions.completeTransition({
|
+ StackActions.completeTransition({
|
||||||
+ key: navigation.state.key,
|
+ key: navigation.state.key,
|
||||||
+ toChildKey: route.key,
|
+ toChildKey: state.routes[state.index].key,
|
||||||
+ })
|
+ })
|
||||||
+ );
|
+ );
|
||||||
+ }
|
+ }
|
||||||
+ };
|
+ };
|
||||||
+
|
+
|
||||||
private handleOpenRoute = ({ route }: { route: Route<string> }) => {
|
private handleOpenRoute = ({ route }: { route: Route<string> }) => {
|
||||||
+ this.handleTransitionComplete({ route });
|
+ this.handleTransitionComplete();
|
||||||
this.setState((state) => ({
|
this.setState((state) => ({
|
||||||
routes: state.replacingRouteKeys.length
|
routes: state.replacingRouteKeys.length
|
||||||
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key))
|
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key))
|
||||||
@@ -319,12 +344,17 @@
|
@@ -351,12 +376,11 @@
|
||||||
// If a route exists in state, trigger a pop
|
// If a route exists in state, trigger a pop
|
||||||
// This will happen in when the route was closed from the card component
|
// This will happen in when the route was closed from the card component
|
||||||
// e.g. When the close animation triggered from a gesture ends
|
// e.g. When the close animation triggered from a gesture ends
|
||||||
@@ -578,18 +578,12 @@ diff -Naur ../../node_modules/@react-navigation/stack/src/views/Stack/StackView.
|
|||||||
+ // @ts-ignore
|
+ // @ts-ignore
|
||||||
+ navigation.dispatch(StackActions.pop({ key: route.key, prune: false }));
|
+ navigation.dispatch(StackActions.pop({ key: route.key, prune: false }));
|
||||||
} else {
|
} else {
|
||||||
+ // While closing route we need to point to the previous one assuming that
|
+ this.handleTransitionComplete();
|
||||||
+ // this previous one in routes array
|
|
||||||
+ const index = this.state.routes.findIndex((r) => r.key === route.key);
|
|
||||||
+
|
|
||||||
+ this.handleTransitionComplete({
|
|
||||||
+ route: this.state.routes[Math.max(index - 1, 0)],
|
|
||||||
+ });
|
|
||||||
+
|
+
|
||||||
// We need to clean up any state tracking the route and pop it immediately
|
// We need to clean up any state tracking the route and pop it immediately
|
||||||
this.setState((state) => ({
|
this.setState((state) => ({
|
||||||
routes: state.routes.filter((r) => r.key !== route.key),
|
routes: state.routes.filter((r) => r.key !== route.key),
|
||||||
@@ -341,22 +371,24 @@
|
@@ -373,22 +397,24 @@
|
||||||
private handleTransitionStart = (
|
private handleTransitionStart = (
|
||||||
{ route }: { route: Route<string> },
|
{ route }: { route: Route<string> },
|
||||||
closing: boolean
|
closing: boolean
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import * as React from 'react';
|
import * as React from 'react';
|
||||||
import { TextInput } from 'react-native';
|
import { TextInput, Platform, Keyboard } from 'react-native';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
@@ -56,7 +56,9 @@ export default class KeyboardManager extends React.Component<Props> {
|
|||||||
|
|
||||||
const input = this.previouslyFocusedTextInput;
|
const input = this.previouslyFocusedTextInput;
|
||||||
|
|
||||||
if (input) {
|
if (Platform.OS === 'android') {
|
||||||
|
Keyboard.dismiss();
|
||||||
|
} else if (input) {
|
||||||
TextInput.State.blurTextInput(input);
|
TextInput.State.blurTextInput(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
packages/stack/src/vendor/views/Stack/Card.tsx
vendored
12
packages/stack/src/vendor/views/Stack/Card.tsx
vendored
@@ -246,11 +246,21 @@ export default class Card extends React.Component<Props> {
|
|||||||
this.handleStartInteraction();
|
this.handleStartInteraction();
|
||||||
onGestureBegin?.();
|
onGestureBegin?.();
|
||||||
break;
|
break;
|
||||||
case GestureState.CANCELLED:
|
case GestureState.CANCELLED: {
|
||||||
this.isSwiping.setValue(FALSE);
|
this.isSwiping.setValue(FALSE);
|
||||||
this.handleEndInteraction();
|
this.handleEndInteraction();
|
||||||
|
|
||||||
|
const velocity =
|
||||||
|
gestureDirection === 'vertical' ||
|
||||||
|
gestureDirection === 'vertical-inverted'
|
||||||
|
? nativeEvent.velocityY
|
||||||
|
: nativeEvent.velocityX;
|
||||||
|
|
||||||
|
this.animate({ closing: this.props.closing, velocity });
|
||||||
|
|
||||||
onGestureCanceled?.();
|
onGestureCanceled?.();
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case GestureState.END: {
|
case GestureState.END: {
|
||||||
this.isSwiping.setValue(FALSE);
|
this.isSwiping.setValue(FALSE);
|
||||||
|
|
||||||
|
|||||||
@@ -48,31 +48,63 @@ type State = {
|
|||||||
|
|
||||||
const GestureHandlerWrapper = GestureHandlerRootView ?? View;
|
const GestureHandlerWrapper = GestureHandlerRootView ?? View;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compare two arrays with primitive values as the content.
|
||||||
|
* We need to make sure that both values and order match.
|
||||||
|
*/
|
||||||
|
const isArrayEqual = (a: any[], b: any[]) =>
|
||||||
|
a.length === b.length && a.every((it, index) => it === b[index]);
|
||||||
|
|
||||||
export default class StackView extends React.Component<Props, State> {
|
export default class StackView extends React.Component<Props, State> {
|
||||||
static getDerivedStateFromProps(
|
static getDerivedStateFromProps(
|
||||||
props: Readonly<Props>,
|
props: Readonly<Props>,
|
||||||
state: Readonly<State>
|
state: Readonly<State>
|
||||||
) {
|
) {
|
||||||
// If there was no change in routes, we don't need to compute anything
|
// If there was no change in routes, we don't need to compute anything
|
||||||
if (props.state.routes === state.previousRoutes && state.routes.length) {
|
if (
|
||||||
if (props.descriptors !== state.previousDescriptors) {
|
(props.state.routes === state.previousRoutes ||
|
||||||
const descriptors = state.routes.reduce<StackDescriptorMap>(
|
isArrayEqual(
|
||||||
(acc, route) => {
|
props.state.routes.map((r) => r.key),
|
||||||
acc[route.key] =
|
state.previousRoutes.map((r) => r.key)
|
||||||
props.descriptors[route.key] || state.descriptors[route.key];
|
)) &&
|
||||||
|
state.routes.length
|
||||||
|
) {
|
||||||
|
let routes = state.routes;
|
||||||
|
let previousRoutes = state.previousRoutes;
|
||||||
|
let descriptors = props.descriptors;
|
||||||
|
let previousDescriptors = state.previousDescriptors;
|
||||||
|
|
||||||
|
if (props.descriptors !== state.previousDescriptors) {
|
||||||
|
descriptors = state.routes.reduce<StackDescriptorMap>((acc, route) => {
|
||||||
|
acc[route.key] =
|
||||||
|
props.descriptors[route.key] || state.descriptors[route.key];
|
||||||
|
|
||||||
|
return acc;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
previousDescriptors = props.descriptors;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (props.state.routes !== state.previousRoutes) {
|
||||||
|
// if any route objects have changed, we should update them
|
||||||
|
const map = props.state.routes.reduce<Record<string, Route<string>>>(
|
||||||
|
(acc, route) => {
|
||||||
|
acc[route.key] = route;
|
||||||
return acc;
|
return acc;
|
||||||
},
|
},
|
||||||
{}
|
{}
|
||||||
);
|
);
|
||||||
|
|
||||||
return {
|
routes = state.routes.map((route) => map[route.key] || route);
|
||||||
previousDescriptors: props.descriptors,
|
previousRoutes = props.state.routes;
|
||||||
descriptors,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return {
|
||||||
|
routes,
|
||||||
|
previousRoutes,
|
||||||
|
descriptors,
|
||||||
|
previousDescriptors,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
// Here we determine which routes were added or removed to animate them
|
// Here we determine which routes were added or removed to animate them
|
||||||
@@ -308,21 +340,21 @@ export default class StackView extends React.Component<Props, State> {
|
|||||||
return <HeaderContainer {...props} />;
|
return <HeaderContainer {...props} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
private handleTransitionComplete = ({ route }: { route: Route<string> }) => {
|
private handleTransitionComplete = () => {
|
||||||
const { state, navigation } = this.props;
|
const { state, navigation } = this.props;
|
||||||
|
|
||||||
if (state.isTransitioning) {
|
if (state.isTransitioning) {
|
||||||
navigation.dispatch(
|
navigation.dispatch(
|
||||||
StackActions.completeTransition({
|
StackActions.completeTransition({
|
||||||
key: navigation.state.key,
|
key: navigation.state.key,
|
||||||
toChildKey: route.key,
|
toChildKey: state.routes[state.index].key,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private handleOpenRoute = ({ route }: { route: Route<string> }) => {
|
private handleOpenRoute = ({ route }: { route: Route<string> }) => {
|
||||||
this.handleTransitionComplete({ route });
|
this.handleTransitionComplete();
|
||||||
this.setState((state) => ({
|
this.setState((state) => ({
|
||||||
routes: state.replacingRouteKeys.length
|
routes: state.replacingRouteKeys.length
|
||||||
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key))
|
? state.routes.filter((r) => !state.replacingRouteKeys.includes(r.key))
|
||||||
@@ -347,13 +379,7 @@ export default class StackView extends React.Component<Props, State> {
|
|||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
navigation.dispatch(StackActions.pop({ key: route.key, prune: false }));
|
navigation.dispatch(StackActions.pop({ key: route.key, prune: false }));
|
||||||
} else {
|
} else {
|
||||||
// While closing route we need to point to the previous one assuming that
|
this.handleTransitionComplete();
|
||||||
// this previous one in routes array
|
|
||||||
const index = this.state.routes.findIndex((r) => r.key === route.key);
|
|
||||||
|
|
||||||
this.handleTransitionComplete({
|
|
||||||
route: this.state.routes[Math.max(index - 1, 0)],
|
|
||||||
});
|
|
||||||
|
|
||||||
// We need to clean up any state tracking the route and pop it immediately
|
// We need to clean up any state tracking the route and pop it immediately
|
||||||
this.setState((state) => ({
|
this.setState((state) => ({
|
||||||
|
|||||||
@@ -3,6 +3,30 @@
|
|||||||
All notable changes to this project will be documented in this file.
|
All notable changes to this project will be documented in this file.
|
||||||
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
||||||
|
|
||||||
|
## [2.8.11](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.10...react-navigation-tabs@2.8.11) (2020-04-02)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.8.10](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.9...react-navigation-tabs@2.8.10) (2020-03-31)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [2.8.9](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.7...react-navigation-tabs@2.8.9) (2020-03-28)
|
||||||
|
|
||||||
|
**Note:** Version bump only for package react-navigation-tabs
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## [2.8.8](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.7...react-navigation-tabs@2.8.8) (2020-03-27)
|
## [2.8.8](https://github.com/react-navigation/tabs/compare/react-navigation-tabs@2.8.7...react-navigation-tabs@2.8.8) (2020-03-27)
|
||||||
|
|
||||||
**Note:** Version bump only for package react-navigation-tabs
|
**Note:** Version bump only for package react-navigation-tabs
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-navigation-tabs",
|
"name": "react-navigation-tabs",
|
||||||
"version": "2.8.8",
|
"version": "2.8.11",
|
||||||
"description": "Tab Navigation components for React Navigation",
|
"description": "Tab Navigation components for React Navigation",
|
||||||
"main": "lib/commonjs/index.js",
|
"main": "lib/commonjs/index.js",
|
||||||
"module": "lib/module/index.js",
|
"module": "lib/module/index.js",
|
||||||
@@ -56,8 +56,8 @@
|
|||||||
"react-native-gesture-handler": "^1.6.0",
|
"react-native-gesture-handler": "^1.6.0",
|
||||||
"react-native-reanimated": "^1.2.0",
|
"react-native-reanimated": "^1.2.0",
|
||||||
"react-native-tab-view": "^2.13.0",
|
"react-native-tab-view": "^2.13.0",
|
||||||
"react-navigation": "^4.3.4",
|
"react-navigation": "^4.3.7",
|
||||||
"typescript": "~3.7.5"
|
"typescript": "~3.8.3"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"react": "*",
|
"react": "*",
|
||||||
|
|||||||
Reference in New Issue
Block a user