From 0b050cf7c32b6696cd9e389cb68f786a2d798ea4 Mon Sep 17 00:00:00 2001 From: aksonov Date: Tue, 25 Jul 2017 11:32:36 +0200 Subject: [PATCH] add compiled OverlayNavigator --- Example/package.json | 2 +- Example/yarn.lock | 4 ++-- dist/OverlayNavigator.js | 50 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 3 deletions(-) create mode 100644 dist/OverlayNavigator.js diff --git a/Example/package.json b/Example/package.json index 72987ed18..4d9363967 100644 --- a/Example/package.json +++ b/Example/package.json @@ -14,7 +14,7 @@ "react-native": "0.44.0", "react-native-button": "^2.0.0", "react-native-message-bar": "^1.6.0", - "react-native-router-flux": "github:aksonov/react-native-router-flux#bff0a814e011588553ea986360cacbec4a425292", + "react-native-router-flux": "github:aksonov/react-native-router-flux#36a5296d9fa4f7d0f509127936d1446483e185c9", "react-navigation": "^1.0.0-beta.11" }, "devDependencies": { diff --git a/Example/yarn.lock b/Example/yarn.lock index ce6b9c777..fe68fc516 100644 --- a/Example/yarn.lock +++ b/Example/yarn.lock @@ -3237,9 +3237,9 @@ react-native-message-bar@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/react-native-message-bar/-/react-native-message-bar-1.6.0.tgz#79623e89655475216927090771b0238616b6f1c7" -"react-native-router-flux@github:aksonov/react-native-router-flux#bff0a814e011588553ea986360cacbec4a425292": +"react-native-router-flux@github:aksonov/react-native-router-flux#36a5296d9fa4f7d0f509127936d1446483e185c9": version "4.0.0-beta.13" - resolved "https://codeload.github.com/aksonov/react-native-router-flux/tar.gz/bff0a814e011588553ea986360cacbec4a425292" + resolved "https://codeload.github.com/aksonov/react-native-router-flux/tar.gz/36a5296d9fa4f7d0f509127936d1446483e185c9" dependencies: mobx "^3.1.16" mobx-react "^4.2.1" diff --git a/dist/OverlayNavigator.js b/dist/OverlayNavigator.js new file mode 100644 index 000000000..1c649d329 --- /dev/null +++ b/dist/OverlayNavigator.js @@ -0,0 +1,50 @@ +Object.defineProperty(exports,"__esModule",{value:true});var _jsxFileName='src/OverlayNavigator.js'; + +var _react=require('react');var _react2=_interopRequireDefault(_react); +var _reactNavigation=require('react-navigation'); +var _reactNative=require('react-native');function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj};} + +var OverlayNavigator=function OverlayNavigator( +routeConfigs) + +{var tabsConfig=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{}; +var router=(0,_reactNavigation.TabRouter)(routeConfigs,tabsConfig); + +var navigator=(0,_reactNavigation.createNavigator)( +router, +routeConfigs, +tabsConfig, +'react-navigation/STACK')( +function(_ref){var navigation=_ref.navigation;var +state=navigation.state,dispatch=navigation.dispatch;var +routes=state.routes; + + +var Component=routeConfigs[tabsConfig.initialRouteName].screen; +var initialIndex=0; +for(var i=0;i